/* Layout: uma coluna de leitura (max 1080px) sobre um corredor noturno; nÃºmeros de apartamento
   aparecem sempre como plaquinhas de porta em latÃ£o, o elemento-assinatura do site. */
:root {
  --night: #16111d;
  --hall: #1f1829;
  --hall-2: #2a2136;
  --line: #3b3049;
  --bone: #f2ebdf;
  --dust: #b2a5bd;
  --pumpkin: #ff7b22;
  --pumpkin-deep: #d65c08;
  --brass-1: #e9c77b;
  --brass-2: #b58a3c;
  --brass-ink: #2b1d08;
  --moss: #93c47d;
  --blood: #ff6b6b;
  --candy-ended-bg: #51282e;
  --candy-ended-ink: #bd8f91;
  --candy-ended-line: #704047;

  --font-display: 'Grenze Gotisch', 'Georgia', serif;
  --font-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-plate: 'IBM Plex Mono', ui-monospace, 'Consolas', monospace;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: 2.2rem;
  --step-4: clamp(2.6rem, 7vw, 4.4rem);

  --radius: 10px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(255, 123, 34, 0.12), transparent 60%),
    var(--night);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: var(--pumpkin); }
a:hover { color: var(--brass-1); }
:focus-visible { outline: 2px solid var(--brass-1); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { text-wrap: balance; margin: 0; line-height: 1.1; }
h1, h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: 0.01em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); font-weight: 700; }
p { margin: 0; }

.wrap { max-width: 1080px; margin: 0 auto; padding-inline: 16px; }
@media (min-width: 700px) { .wrap { padding-inline: 32px; } }

/* ---------- topo ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(22, 17, 29, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 16px; padding-block: 10px; flex-wrap: wrap; }
.brand {
  font-family: var(--font-display);
  font-size: var(--step-1);
  color: var(--bone);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
}
.brand-title { display: flex; align-items: baseline; gap: 10px; line-height: 1.1; }
.brand-name { color: var(--bone); }
.brand-edition { color: var(--pumpkin); font-family: var(--font-plate); font-size: 0.7rem; letter-spacing: 0.09em; text-transform: uppercase; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  color: var(--dust);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: var(--step--1);
}
.nav a:hover { color: var(--bone); background: var(--hall-2); }
.nav a[aria-current='page'] { color: var(--night); background: var(--pumpkin); }

main { padding-block: 32px 64px; display: grid; gap: 48px; }
footer { border-top: 1px solid var(--line); color: var(--dust); font-size: var(--step--1); }
footer .wrap { padding-block: 24px; display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
footer .footer-credit { flex-basis: 100%; text-align: right; }
footer .footer-credit a { color: var(--dust); text-underline-offset: 3px; }
footer .footer-credit a:hover { color: var(--pumpkin); }

/* ---------- elementos comuns ---------- */
.eyebrow {
  font-family: var(--font-plate);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--pumpkin);
}
.muted { color: var(--dust); }
.lede { font-size: var(--step-1); color: var(--dust); max-width: 60ch; }
.section { display: grid; gap: 20px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.section-head p { max-width: 60ch; }

/* ---------- abas da organizaÃ§Ã£o ---------- */
.admin-navigation { display: grid; gap: 24px; min-width: 0; }
.admin-edition { min-width: 160px; }
.admin-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--hall); }
.admin-tabs [role='tab'] { flex: 1; min-width: 0; padding: 14px 16px; border: 0; border-radius: 6px; background: transparent; color: var(--dust); font: 700 var(--step-0) / 1.3 var(--font-body); cursor: pointer; }
.admin-tabs [role='tab']:hover { background: var(--hall-2); color: var(--bone); }
.admin-tabs [role='tab'][aria-selected='true'] { background: var(--pumpkin); color: var(--night); }
.admin-tab-panel { display: grid; gap: 28px; min-width: 0; }
.edition-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 8px 0; border: 0; background: transparent; color: var(--dust); font: 600 var(--step--1) / 1.2 var(--font-body); cursor: pointer; white-space: nowrap; }
.edition-toggle-track { display: inline-flex; align-items: center; width: 42px; height: 24px; padding: 3px; border-radius: 999px; background: var(--line); transition: background .15s; }
.edition-toggle-track > span { width: 18px; height: 18px; border-radius: 50%; background: var(--bone); transition: transform .15s; }
.edition-toggle[aria-checked='true'] { color: var(--bone); }
.edition-toggle[aria-checked='true'] .edition-toggle-track { background: var(--pumpkin); }
.edition-toggle[aria-checked='true'] .edition-toggle-track > span { transform: translateX(18px); background: var(--night); }
.edition-toggle:disabled { opacity: .55; cursor: wait; }
.admin-statistics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 12px; }
.admin-stat-card { display: grid; align-content: start; gap: 6px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--hall); }
.admin-stat-card strong { font: 600 var(--step-3) / 1.2 var(--font-plate); font-variant-numeric: tabular-nums; }
.admin-stat-card span { color: var(--dust); font-size: var(--step--1); }
.admin-stat-card.hot { border-color: var(--pumpkin); }
.admin-stat-card.hot strong { color: var(--pumpkin); }
.admin-filters-fields { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.admin-filter-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 800px) {
  .admin-filters-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-filter-search { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .admin-filters-fields { grid-template-columns: minmax(0, 1fr); }
}
.edition-modal { width: min(620px, calc(100% - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 28px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--hall); color: var(--bone); box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45); }
.edition-modal::backdrop { background: rgba(10, 6, 14, 0.8); backdrop-filter: blur(4px); }
.edition-modal .section-head { align-items: start; flex-wrap: nowrap; }
.edition-modal [data-close-edition] { flex-shrink: 0; }
body:has(.edition-modal[open]) { overflow: hidden; }
@media (max-width: 480px) {
  .admin-tabs [role='tab'] { padding: 12px 8px; font-size: var(--step--1); }
  .admin-edition { width: 100%; }
  .edition-modal { padding: 20px; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 700 var(--step-0) / 1 var(--font-body);
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  background: var(--pumpkin);
  color: var(--night);
  transition: background 0.15s, transform 0.15s;
}
.btn:hover { background: var(--brass-1); color: var(--night); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--bone); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--dust); color: var(--bone); }
.btn.small { padding: 8px 14px; font-size: var(--step--1); }
.btn.danger { background: transparent; color: var(--blood); border-color: rgba(255, 107, 107, 0.4); }
.btn.danger:hover { background: rgba(255, 107, 107, 0.12); }
.btn.danger.armed { background: var(--blood); color: var(--night); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.panel {
  background: var(--hall);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: grid;
  gap: 18px;
  min-width: 0;
}
.notice {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  color: var(--dust);
  display: grid;
  gap: 10px;
}
.notice strong { color: var(--bone); }
.notice.warn { border-color: rgba(255, 123, 34, 0.5); background: rgba(255, 123, 34, 0.06); }

/* ---------- plaquinha de porta ---------- */
.plate {
  --size: 1;
  position: relative;
  display: inline-grid;
  justify-items: center;
  align-content: center;
  min-width: calc(5.2rem * var(--size));
  padding: calc(8px * var(--size)) calc(16px * var(--size));
  border-radius: 6px;
  background: linear-gradient(160deg, var(--brass-1), var(--brass-2));
  color: var(--brass-ink);
  font-family: var(--font-plate);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -2px 0 rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.35);
  line-height: 1.1;
}
.plate::before, .plate::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 5px;
  height: 5px;
  margin-top: -2.5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff6d8, #7a5a22);
}
.plate::before { left: 6px; }
.plate::after { right: 6px; }
.plate small { font-size: calc(0.62rem * var(--size)); letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; }
.plate b { font-size: calc(1.35rem * var(--size)); font-weight: 600; letter-spacing: 0.04em; }
.plate.lg { --size: 1.5; }
.plate.sm { --size: 0.8; }

/* ---------- formulÃ¡rios ---------- */
form { display: grid; gap: 18px; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.field { display: grid; gap: 6px; min-width: 0; }
.field label, .label { font-weight: 600; font-size: var(--step--1); }
.field .hint { color: var(--dust); font-size: var(--step--1); }
input[type='text'], input[type='search'], input[type='url'], input[type='tel'], input[type='number'], input[type='password'], input[type='date'], input[type='time'], textarea, select {
  width: 100%;
  font: inherit;
  color: var(--bone);
  background: var(--night);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}
input:focus, textarea:focus, select:focus { border-color: var(--pumpkin); outline: none; box-shadow: 0 0 0 3px rgba(255, 123, 34, 0.2); }
input.pin { font-family: var(--font-plate); letter-spacing: 0.4em; font-size: var(--step-1); max-width: 12rem; }

.choice { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.choice label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--night);
}
.choice label:has(input:checked) { border-color: var(--pumpkin); background: rgba(255, 123, 34, 0.08); }
.choice input { margin-top: 4px; accent-color: var(--pumpkin); }
.choice small { display: block; color: var(--dust); }

.kid-rows { display: grid; gap: 10px; }
.kid-row { display: grid; gap: 10px; grid-template-columns: 1fr 5rem auto; align-items: end; }
@media (max-width: 480px) {
  .brand { gap: 9px; }
  .brand-name { font-size: 1.12rem; }
  .kid-row { grid-template-columns: 1fr 5rem; }
  .kid-row > button { grid-column: 1 / -1; justify-self: start; }
}
.icon-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--dust);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  font: inherit;
  font-size: var(--step--1);
}
.icon-btn:hover { color: var(--blood); border-color: var(--blood); }

.form-error { color: var(--blood); font-weight: 600; min-height: 1.2em; }
.form-error:empty { display: none; }

/* ---------- inscriÃ§Ã£o em etapas ---------- */
.registration-page { display: grid; gap: 24px; width: 100%; max-width: 800px; margin-inline: auto; min-width: 0; }
.registration-head { display: grid; gap: 12px; }
.registration-head h1 { font-size: clamp(2.3rem, 6vw, 3.2rem); }
.registration-intro { max-width: 60ch; color: var(--dust); }
.registration-event { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; color: var(--brass-1); font-size: var(--step--1); }
.registration-event > span { display: inline-flex; align-items: center; gap: 7px; }
.registration-event svg { width: 18px; height: 18px; flex-shrink: 0; }
.registration-form.panel { gap: 0; padding: 28px; }
.registration-form .reg-step { min-width: 0; margin: 0; padding: 0 0 28px; border: 0; }
.registration-form .reg-step + .reg-step { border-top: 1px solid var(--line); }
.registration-form .reg-step > legend { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0 0 18px; padding: 0; color: var(--bone); font: 700 var(--step-1) / 1.35 var(--font-body); }
.registration-form .reg-step + .reg-step > legend { padding-top: 28px; }
.reg-step-number { display: inline-grid; place-items: center; flex-shrink: 0; width: 30px; height: 30px; border: 1px solid rgba(255, 123, 34, .35); border-radius: 50%; background: rgba(255, 123, 34, .1); color: var(--pumpkin); font: 600 var(--step--1) / 1 var(--font-plate); }
.reg-step-content { display: grid; gap: 16px; min-width: 0; }
.reg-identity-grid, .reg-contact-grid, .reg-pin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; min-width: 0; }
.reg-contact-grid label small { font-weight: 400; }
.reg-participation { min-width: 0; }
.reg-participation .choice { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.reg-participation .choice label { gap: 10px; padding: 16px; }
.reg-participation .choice input[type='checkbox'] { width: 18px; height: 18px; flex-shrink: 0; margin: 3px 0 0; }
.reg-participation .choice small { margin-top: 4px; line-height: 1.45; }
.registration-form .reg-children { display: grid; gap: 14px; min-width: 0; margin: 0; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: rgba(22, 17, 29, .5); }
.reg-children > legend { padding: 0 6px; font: 600 var(--step--1) / 1.4 var(--font-body); }
.reg-child-rows { display: grid; gap: 14px; min-width: 0; }
.reg-child-row { display: grid; grid-template-columns: minmax(0, 1fr) 6rem 44px; align-items: start; gap: 10px; min-width: 0; }
.reg-child-label { display: block; font-size: .75rem; color: var(--dust); }
.reg-child-row > .reg-child-label { grid-column: 1 / -1; }
.reg-child-row > button, .reg-child-row > .icon-btn { display: grid; place-items: center; align-self: start; width: 44px; height: 44px; padding: 0; margin-top: 28px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--dust); cursor: pointer; }
.reg-child-row > button:hover { color: var(--blood); border-color: var(--blood); }
.reg-child-row > button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.reg-child-hint { color: var(--dust); font-size: var(--step--1); line-height: 1.5; }
.reg-children > .btn, .reg-children > div > .btn { justify-self: start; min-height: 44px; }
.reg-pin-grid input.pin { width: 100%; max-width: none; min-width: 0; }
.reg-pin-visibility { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: fit-content; min-height: 44px; padding: 10px 12px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--dust); font: 600 var(--step--1) / 1.4 var(--font-body); cursor: pointer; }
.reg-pin-visibility:hover { background: var(--hall-2); color: var(--bone); }
.reg-pin-visibility[aria-pressed='true'] { color: var(--brass-1); }
.reg-pin-visibility svg { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.reg-pin-grid > .reg-pin-visibility { grid-column: 1 / -1; justify-self: start; }
.reg-field-error { color: var(--blood); font-size: var(--step--1); line-height: 1.4; overflow-wrap: anywhere; }
.reg-field-error:empty { display: none; }
.registration-form [aria-invalid='true'] { border-color: var(--blood); }
.reg-submit { display: grid; gap: 16px; padding-top: 24px; border-top: 1px solid var(--line); min-width: 0; }
.reg-security { color: var(--dust); font-size: var(--step--1); }
.reg-security > summary { width: fit-content; min-height: 44px; padding-block: 10px; cursor: pointer; }
.reg-security > summary:hover { color: var(--bone); }
.reg-security > p { margin-top: 6px; line-height: 1.55; }
.reg-submit-row { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 20px; }
.reg-submit-row > .btn { min-height: 46px; }
.reg-submit-row > a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; color: var(--dust); font-size: var(--step--1); text-underline-offset: 4px; }
.reg-submit-row > a:not(.btn):hover { color: var(--bone); }
.reg-status:empty { display: none; }
.reg-success.notice { border-style: solid; border-color: rgba(147, 196, 125, .4); background: rgba(147, 196, 125, .06); }
.reg-success strong { color: var(--moss); }
.reg-success .actions { margin-top: 8px; }
.registration-form[aria-busy='true'] input, .registration-form[aria-busy='true'] select, .registration-form[aria-busy='true'] .reg-participation { opacity: .75; }
@media (max-width: 600px) {
  .registration-page { gap: 20px; }
  .registration-form.panel { padding: 20px; }
  .reg-contact-grid { grid-template-columns: minmax(0, 1fr); }
  .reg-participation .choice { grid-template-columns: minmax(0, 1fr); }
  .registration-form .reg-step > legend { font-size: 1.1rem; gap: 10px; }
  .registration-form .reg-children { padding: 14px; }
  .reg-child-row { grid-template-columns: minmax(0, 1fr) 4.5rem 44px; gap: 8px; }
  .reg-child-row input { padding-inline: 10px; }
  .reg-submit-row { align-items: stretch; }
  .reg-submit-row > .btn { width: 100%; }
}
@media (max-width: 380px) {
  .registration-form.panel { padding: 16px; }
  .reg-pin-grid { grid-template-columns: minmax(0, 1fr); }
  .registration-form .reg-children { padding: 12px; }
  .reg-child-row { grid-template-columns: minmax(0, 1fr) 44px; gap: 10px; }
  .reg-child-row > .field:first-of-type { grid-column: 1 / -1; }
  .reg-child-row > .field:nth-of-type(2) { max-width: 5rem; }
}

/* ---------- home ---------- */
main.wrap:has(> .hero) { max-width: none; padding-inline: 0; padding-top: 0; }
main:has(> .hero) > section:not(.hero) { width: 100%; max-width: 1080px; margin-inline: auto; padding-inline: 32px; }
main:has(> .hero) > .kids-panel { width: calc(100% - 64px); max-width: 1016px; padding: 24px; }
.hero { position: relative; isolation: isolate; width: 100%; max-width: 1600px; margin-inline: auto; min-height: 640px; display: grid; align-items: center; overflow: hidden; background: var(--night); }
.hero-visual { position: absolute; inset: 0; z-index: -1; }
.hero-art { width: 100%; height: 100%; object-fit: cover; object-position: right center; }
.hero-visual::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(22,17,29,.9), rgba(22,17,29,.66) 30%, rgba(22,17,29,.12) 58%, transparent 72%), linear-gradient(0deg, var(--night), transparent 18%); }
.hero-content { width: 100%; max-width: 1080px; margin-inline: auto; padding: 56px 32px 64px; }
.hero-copy { max-width: 440px; display: grid; gap: 20px; }
.hero h1 { font-size: clamp(2.6rem, 5vw, 4.1rem); max-width: 100%; }
.hero h1 em { font-style: normal; color: var(--pumpkin); }
.hero .lede { font-size: 1.1rem; color: var(--bone); }
.hero .muted { color: var(--bone); }
.event-meeting { display: flex; align-items: center; gap: 10px; color: var(--brass-1); }
.event-meeting svg { width: 22px; height: 26px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; }
.event-text { white-space: pre-line; overflow-wrap: anywhere; }
.event-invitation { color: var(--brass-1); text-align: center; font-weight: 600; }
.participation-guide { display: grid; gap: 24px; }
.participation-guide .panel { align-content: start; }
.participation-guide .actions { margin-top: auto; }
.event-settings { margin-block: 24px; }
.event-guide { margin-bottom: 24px; }
.review-item { margin-block: 12px; }
.review-item > summary { display: flex; align-items: center; gap: 16px; cursor: pointer; list-style: none; }
.review-item[open] > summary { margin-bottom: 16px; }
.review-item .grid-2 > div { display: grid; gap: 10px; align-content: start; }
.audit-item { border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin-block: 10px; }
.audit-item > summary { cursor: pointer; overflow-wrap: anywhere; }
.audit-item > summary > * { margin-right: 8px; }
.audit-item[open] { display: grid; gap: 12px; }
.audit-json { max-height: 420px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .8rem; background: var(--night); padding: 12px; border-radius: 8px; }
#history-apartment { width: auto; max-width: 100%; }
.security-notice { font-size: .85rem; max-width: 680px; }
.security-notice summary { cursor: pointer; }
.security-notice p { margin-top: 10px; }
.countdown { font-family: var(--font-plate); color: var(--brass-1); font-size: var(--step-1); }

@media (min-width: 1601px) {
  .hero-art { object-position: center; }
  .hero-visual::after { background: linear-gradient(90deg, var(--night), transparent 6%, transparent 94%, var(--night)), linear-gradient(90deg, rgba(22,17,29,.9), rgba(22,17,29,.66) 30%, rgba(22,17,29,.12) 58%, transparent 72%), linear-gradient(0deg, var(--night), transparent 18%); }
}

@media (max-width: 760px) {
  .hero { display: block; min-height: 0; }
  .hero-visual { position: relative; z-index: 0; }
  .hero-art { height: auto; object-fit: contain; }
  .hero-visual::after { background: linear-gradient(0deg, var(--night), transparent 28%); }
  .hero-content { padding: 12px 24px 32px; }
  .hero-copy { max-width: none; }
  .hero h1 { font-size: clamp(2.2rem, 7.5vw, 3.6rem); max-width: 15ch; }
  main:has(> .hero) > section:not(.hero) { padding-inline: 24px; }
  main:has(> .hero) > .kids-panel { width: calc(100% - 48px); padding: 24px; }
}
@media (max-width: 480px) {
  .hero-content { padding-inline: 16px; }
  .hero h1 { font-size: clamp(2rem, 10vw, 3rem); max-width: 100%; }
  main:has(> .hero) > section:not(.hero) { padding-inline: 16px; }
  main:has(> .hero) > .kids-panel { width: calc(100% - 32px); padding: 20px; }
}

.stats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.stat { border-top: 2px solid var(--line); padding-top: 12px; display: grid; gap: 2px; }
.stat b { font-family: var(--font-plate); font-size: var(--step-3); font-weight: 600; font-variant-numeric: tabular-nums; }
.stat span { color: var(--dust); font-size: var(--step--1); }
.stat.hot { border-color: var(--pumpkin); }
.stat.hot b { color: var(--pumpkin); }

.kids-panel { display: grid; gap: 24px; background: radial-gradient(ellipse at top right, rgba(255, 123, 34, .1), transparent 65%), var(--hall); border-top: 2px solid var(--pumpkin); }
.kids-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.kids-heading h2 { margin: 8px 0; }
.kids-pumpkin { width: 58px; height: 58px; flex: 0 0 auto; filter: drop-shadow(0 0 12px rgba(255, 123, 34, .2)); }
.kids-ages { display: grid; gap: 12px; width: 100%; max-width: 560px; }
.kids-ages h3 { color: var(--brass-1); font-family: var(--font-plate); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
.kids-list { border: 1px solid var(--line); border-radius: var(--radius); overflow: clip; }
.kids-list summary { display: flex; align-items: center; gap: 12px; padding: 15px 18px; min-height: 56px; list-style: none; cursor: pointer; color: var(--bone); background: var(--hall-2); font-weight: 600; }
.kids-list summary::-webkit-details-marker { display: none; }
.kids-list summary:hover { color: var(--brass-1); }
.kids-list summary:focus-visible { outline-offset: -3px; }
.kids-list summary > svg { width: 22px; height: 22px; margin-left: auto; flex: 0 0 auto; fill: none; stroke: var(--pumpkin); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.kids-list[open] summary > svg { transform: rotate(180deg); }
.kids-list-count { color: var(--brass-1); background: var(--night); border-radius: 999px; padding: 2px 9px; font-family: var(--font-plate); font-size: .75rem; }
.kids-list-open, .kids-list[open] .kids-list-closed { display: none; }
.kids-list[open] .kids-list-open { display: inline; }
.kids-list .kids-table-wrap { border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.kids-table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.kids-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: var(--step-0); }
.kids-table thead { background: var(--hall-2); }
.kids-table thead th { color: var(--brass-1); background: transparent; text-transform: uppercase; font-family: var(--font-plate); font-size: .75rem; letter-spacing: .08em; }
.kids-table th, .kids-table td { padding: 15px 18px; text-align: left; border-bottom: 0; vertical-align: middle; }
.kids-table thead th:first-child { width: 65%; }
.kids-table thead th:last-child { width: 35%; }
.kids-table .kids-count { text-align: right; font-family: var(--font-plate); }
.kids-table tbody .kids-count { color: var(--pumpkin); font-weight: 600; }
.kids-table tbody tr + tr { border-top: 1px solid var(--line); }
.kids-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, .025); }
.kids-table tbody tr:hover { background: rgba(255, 123, 34, .055); }
.kids-table tbody th { font-weight: 600; font-size: var(--step-0); color: var(--bone); text-transform: none; letter-spacing: normal; background: transparent; overflow-wrap: anywhere; }
.kids-apartment { display: inline-block; padding: 4px 10px; border: 1px solid var(--brass-2); border-radius: 5px; color: var(--brass-1); background: rgba(233, 199, 123, .06); font-family: var(--font-plate); font-size: .875rem; overflow-wrap: anywhere; }
.kids-age { color: var(--dust); font-size: .875rem; }
.kids-note { font-size: .875rem; }
.kids-empty { display: grid; gap: 6px; padding: 20px; border: 1px dashed var(--line); border-radius: var(--radius); }
@media (max-width: 480px) {
  .kids-pumpkin { width: 40px; height: 40px; }
  .kids-heading h2 { font-size: 1.8rem; }
  .kids-table th, .kids-table td { padding: 12px 8px; }
  .kids-table thead th { font-size: .65rem; letter-spacing: .02em; }
  .kids-table thead th:first-child { width: 65%; }
  .kids-table thead th:last-child { width: 35%; }
  .kids-apartment { padding: 4px 6px; font-size: .75rem; }
}
.kids-panel .big { font-family: var(--font-plate); font-size: var(--step-2); color: var(--brass-1); }
.ages { display: grid; gap: 8px; }
.age-row { display: grid; grid-template-columns: 9.5rem 1fr 2.5rem; gap: 10px; align-items: center; font-size: var(--step--1); }
.age-row .bar { height: 10px; border-radius: 5px; background: var(--hall-2); overflow: hidden; }
.age-row .bar i { display: block; height: 100%; background: var(--pumpkin); border-radius: 5px; }
.age-row b { font-family: var(--font-plate); text-align: right; font-variant-numeric: tabular-nums; }

.tower-group { display: grid; gap: 12px; }
.tower-group h3 { font-family: var(--font-plate); font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.12em; color: var(--dust); font-weight: 600; }
.doors { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 180px)); }
.door {
  position: relative;
  display: grid;
  gap: 4px;
  align-content: start;
  align-self: start;
  justify-items: center;
  text-align: center;
  width: 100%;
  aspect-ratio: 128 / 150;
  padding: 32px 22% 40px;
  background: transparent;
  border: 0;
  isolation: isolate;
  min-width: 0;
}
.door::before { content: ''; position: absolute; inset: 0; z-index: -1; background: url('/assets/lapide-apartamento.svg?v=2') center / 100% 100% no-repeat; pointer-events: none; }
.door .plate { padding: 0; min-width: 0; max-width: 100%; background: transparent; color: var(--bone); box-shadow: none; text-shadow: 0 -1px 0 rgba(0, 0, 0, .5); }
.door .plate::before, .door .plate::after { display: none; }
.door .plate small { color: var(--bone); }
.door p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: var(--step--1); line-height: 1.35; color: var(--bone); overflow-wrap: anywhere; }
.door .tag { max-width: 100%; padding: 3px 6px; font-size: .7rem; white-space: nowrap; }
.door .tag.on { background: #28342a; }
.door .cam { font-size: 0.75rem; color: var(--bone); font-family: var(--font-plate); text-decoration: underline; text-underline-offset: 2px; }
.door.candy-finished { color: var(--candy-ended-ink); }
.door.candy-finished::before { background-image: url('/assets/lapide-apartamento-acabou.svg?v=2'); }
.door.candy-finished .plate { background: transparent; color: inherit; border-color: var(--candy-ended-line); box-shadow: none; }
.door.candy-finished .plate small { color: inherit; }
.door.candy-finished .tag { background: transparent; color: inherit; }
.door.candy-finished p, .door.candy-finished .cam { color: inherit; }
.candy-number, .door.candy-finished .plate b { position: relative; display: inline-block; white-space: nowrap; }
.candy-unavailable::before, .candy-unavailable::after,
.door.candy-finished .plate b::before, .door.candy-finished .plate b::after {
  content: '';
  position: absolute;
  left: -5%;
  top: 50%;
  width: 110%;
  border-top: 2px solid #e43d3d;
  transform: rotate(32deg);
  filter: drop-shadow(0 0 1px #3b1414);
  pointer-events: none;
}
.candy-unavailable::after, .door.candy-finished .plate b::after { transform: rotate(-32deg); }
.door.candy-finished .plate b::before, .door.candy-finished .plate b::after { border-top-width: 3px; }
.candy-summary { color: var(--brass-1); font-weight: 600; }
.candy-control { border-color: var(--pumpkin); }
.admin-candy-control { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; cursor: pointer; }
.admin-candy-control input { width: 16px; height: 16px; margin: 0; flex-shrink: 0; accent-color: var(--pumpkin); }

/* ---------- home: concurso, roteiro e apoio ---------- */
.hero-actions { display: grid; gap: 10px; justify-items: start; }
.hero-actions .actions { gap: 10px; }
.home-hero-login { display: inline-flex; align-items: center; min-height: 36px; padding-block: 6px; color: var(--dust); font-size: var(--step--1); text-underline-offset: 4px; }
.home-hero-login:hover { color: var(--bone); }
.home-contest-invite.panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 220px); align-items: center; gap: 24px; padding: 24px; border-top: 2px solid var(--pumpkin); background: radial-gradient(ellipse at top right, rgba(255, 123, 34, .08), transparent 65%), var(--hall); }
.home-contest-copy { display: grid; gap: 10px; min-width: 0; }
.home-contest-copy .eyebrow { font-size: .75rem; }
.home-contest-copy h2 { font-size: 1.9rem; }
.home-contest-copy > p:not(.eyebrow) { color: var(--dust); font-size: var(--step--1); }
.home-contest-pumpkins { display: flex; align-items: center; gap: 4px; color: var(--pumpkin); }
.home-contest-pumpkins > svg { display: block; width: 25px; height: 25px; flex: 0 0 25px; }
.home-contest-invite > .actions { flex-direction: column; align-items: stretch; gap: 10px; }
.home-contest-invite > .actions > .btn { min-height: 44px; font-size: var(--step--1); }
@media (max-width: 640px) {
  .home-contest-invite.panel { grid-template-columns: minmax(0, 1fr); padding: 20px; gap: 20px; }
  .home-contest-copy h2 { font-size: 1.8rem; }
  .home-contest-invite > .actions { flex-direction: row; flex-wrap: wrap; }
  .home-contest-invite > .actions > .btn { flex: 1 1 auto; }
}
@media (max-width: 480px) {
  .kids-panel .age-row { grid-template-columns: minmax(0, 8.5rem) minmax(24px, 1fr) 2rem; gap: 8px; }
}
.home-contest-card.panel { padding: 32px; gap: 24px; background: radial-gradient(ellipse at top right, rgba(255, 123, 34, .1), transparent 58%), radial-gradient(ellipse at bottom left, rgba(101, 67, 143, .12), transparent 65%), var(--hall); border-color: #554035; }
.home-contest-heading { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 16px 24px; }
.home-contest-heading h2 { margin-top: 7px; }
.contest-badges { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.home-contest-card .lede { font-size: var(--step-0); max-width: 68ch; }
.contest-intro { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 32px; align-items: center; min-width: 0; }
.contest-intro-copy { display: grid; gap: 20px; min-width: 0; }
.contest-intro-copy .contest-steps { grid-template-columns: minmax(0, 1fr); gap: 14px; }
.contest-invitation-art { position: relative; isolation: isolate; display: grid; justify-items: center; align-content: center; gap: 10px; width: 180px; min-height: 226px; padding: 12px; background: radial-gradient(ellipse at 50% 55%, rgba(255, 123, 34, .15), transparent 70%); }
.contest-invitation-art::after { content: ''; position: absolute; z-index: -1; left: 50%; bottom: 40px; transform: translateX(-50%); width: 134px; height: 12px; border-radius: 50%; background: rgba(0, 0, 0, .3); }
.contest-door-art { position: relative; display: block; width: 110px; height: 160px; border: 7px solid #635069; border-bottom-width: 9px; border-radius: 24px 24px 3px 3px; background: linear-gradient(110deg, #503344, #302435); box-shadow: inset 2px 0 0 rgba(255, 255, 255, .08), 0 0 0 1px #201724, 0 8px 20px rgba(0, 0, 0, .25); }
.contest-door-art::before { content: ''; position: absolute; inset: 50px 12px 12px; border: 1px solid rgba(233, 199, 123, .22); border-radius: 2px; box-shadow: inset 0 1px 5px rgba(0, 0, 0, .12); }
.contest-door-art::after { content: ''; position: absolute; right: 8px; top: 53%; width: 8px; height: 8px; border-radius: 50%; background: var(--brass-1); box-shadow: 0 0 8px rgba(233, 199, 123, .3); }
.contest-door-art > span { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); display: grid; place-items: center; width: 38px; height: 22px; border-radius: 3px; background: linear-gradient(140deg, var(--brass-1), var(--brass-2)); color: var(--brass-ink); font: 600 .8rem / 1 var(--font-plate); box-shadow: 0 2px 4px rgba(0, 0, 0, .2); }
.contest-pumpkin-line { display: flex; align-items: center; justify-content: center; gap: 4px; color: var(--pumpkin); }
.contest-pumpkin-line > svg { display: block; width: 26px; height: 26px; flex: 0 0 26px; filter: drop-shadow(0 2px 6px rgba(255, 123, 34, .18)); }
.contest-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.contest-steps > li { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.contest-step-number { display: inline-grid; place-items: center; width: 28px; height: 28px; flex-shrink: 0; margin-top: 1px; border: 1px solid rgba(233, 199, 123, .25); border-radius: 50%; color: var(--brass-1); font: 600 .75rem / 1 var(--font-plate); }
.contest-steps strong { display: block; font-size: var(--step--1); }
.contest-steps p { margin-top: 4px; color: var(--dust); font-size: var(--step--1); line-height: 1.45; }
.contest-preview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 14px; min-width: 0; }
.contest-preview { display: block; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--night); color: var(--bone); text-decoration: none; }
.contest-preview:hover { border-color: var(--brass-1); color: var(--bone); }
.contest-preview > img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; max-height: 220px; object-fit: cover; }
.contest-preview > span { display: grid; gap: 4px; min-width: 0; padding: 12px; font-size: var(--step--1); }
.contest-preview strong { display: block; overflow-wrap: anywhere; }
.contest-preview small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dust); font-size: .8rem; font-weight: 400; }
.contest-empty { padding: 16px 18px; border: 1px dashed var(--line); border-radius: 8px; color: var(--dust); font-size: var(--step--1); }
.contest-actions { gap: 12px; }
.contest-actions > a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; color: var(--dust); font-size: var(--step--1); text-underline-offset: 4px; }
.contest-actions > a:not(.btn):hover { color: var(--bone); }
.contest-note { font-size: var(--step--1); line-height: 1.5; }
.home-route { scroll-margin-top: 100px; }
.home-blocks { display: grid; gap: 10px; min-width: 0; }
.home-block { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: clip; background: var(--hall); }
.home-block > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; padding: 16px 20px; cursor: pointer; list-style: none; }
.home-block > summary::-webkit-details-marker { display: none; }
.home-block > summary:hover { background: var(--hall-2); }
.home-block > summary > span { display: grid; gap: 4px; min-width: 0; }
.home-block > summary strong { font-size: var(--step-0); font-weight: 700; }
.home-block > summary small { color: var(--dust); font-size: var(--step--1); }
.home-block > summary > svg { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: var(--brass-1); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.home-block[open] > summary { border-bottom: 1px solid var(--line); }
.home-block[open] > summary > svg { transform: rotate(180deg); }
.home-block-doors.doors { padding: 16px; }
.home-support-card.panel { gap: 20px; padding: 28px 32px; }
.home-support-heading { display: grid; gap: 10px; }
.home-support-heading h2 { font-size: 2rem; }
.home-support-heading p { color: var(--dust); max-width: 65ch; }
.home-support-links { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; }
.home-support-links > a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; color: var(--brass-1); font-size: var(--step--1); text-underline-offset: 4px; }
.home-guidance, .home-ages { min-width: 0; border-top: 1px solid var(--line); }
.home-guidance > summary, .home-ages > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; padding-block: 14px; cursor: pointer; list-style: none; font-size: var(--step--1); font-weight: 600; }
.home-guidance > summary::-webkit-details-marker, .home-ages > summary::-webkit-details-marker { display: none; }
.home-guidance > summary:hover, .home-ages > summary:hover { color: var(--brass-1); }
.home-guidance > summary > svg, .home-ages > summary > svg { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.home-guidance[open] > summary > svg, .home-ages[open] > summary > svg { transform: rotate(180deg); }
.home-guidance > summary:not(:has(svg))::after, .home-ages > summary:not(:has(svg))::after { content: ''; width: 8px; height: 8px; margin-right: 5px; flex-shrink: 0; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.home-guidance[open] > summary:not(:has(svg))::after, .home-ages[open] > summary:not(:has(svg))::after { transform: rotate(225deg); }
.home-guidance-body, .home-ages-body { display: grid; gap: 20px; padding-block: 4px 16px; }
.home-guidance-body .grid-2, .home-guidance-body.grid-2 { gap: 24px; }
.home-guidance-body h3 { margin-bottom: 8px; font-size: var(--step-0); }
.home-guidance-body p { color: var(--dust); font-size: var(--step--1); }
.home-guidance-body p + p { margin-top: 10px; }
.home-ages-body .kids-ages { gap: 12px; }
.home-ages-body .kids-note { color: var(--dust); }
@media (max-width: 700px) {
  .home-contest-card.panel, .home-support-card.panel { padding: 24px; }
  .contest-intro { grid-template-columns: 150px minmax(0, 1fr); gap: 20px; }
  .contest-invitation-art { width: 150px; padding-inline: 0; }
  .contest-steps { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .contest-steps p { margin-top: 2px; }
  .contest-preview-grid { gap: 10px; }
  .contest-preview > img { aspect-ratio: 4 / 5; max-height: 200px; }
  .contest-preview > span { padding: 10px; font-size: .8rem; }
  .contest-preview small { font-size: .75rem; }
}
@media (max-width: 480px) {
  .hero-actions .actions > .btn { min-height: 44px; }
  .home-contest-card.panel, .home-support-card.panel { padding: 20px; gap: 20px; }
  .home-contest-heading h2 { font-size: 2rem; }
  .contest-intro { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .contest-intro-copy { gap: 18px; }
  .contest-invitation-art { justify-self: center; width: 140px; min-height: 124px; gap: 6px; padding: 0; }
  .contest-invitation-art::after { bottom: 25px; width: 90px; height: 8px; }
  .contest-door-art { width: 70px; height: 98px; border-width: 5px; border-radius: 17px 17px 2px 2px; }
  .contest-door-art::before { inset: 33px 8px 8px; }
  .contest-door-art::after { width: 5px; height: 5px; right: 5px; }
  .contest-door-art > span { top: 10px; width: 34px; height: 17px; font-size: .65rem; }
  .contest-pumpkin-line { gap: 3px; }
  .contest-pumpkin-line > svg { width: 20px; height: 20px; flex-basis: 20px; }
  .contest-preview-grid { gap: 8px; }
  .contest-preview > span { padding: 8px; font-size: .75rem; }
  .contest-preview small { font-size: .7rem; }
  .contest-actions > .btn { min-height: 44px; }
  .home-block > summary { min-height: 68px; padding: 14px 16px; }
  .home-block-doors.doors { grid-template-columns: repeat(2, minmax(0, 160px)); gap: 8px; padding: 12px 8px; }
  .home-block-doors .door { padding: 18% 19% 22%; gap: 3px; }
  .home-block-doors .door .plate small { font-size: .5rem; }
  .home-block-doors .door .plate b { font-size: 1.1rem; }
  .home-block-doors .door .tag { padding: 2px 4px; font-size: .6rem; }
  .home-block-doors .door p { font-size: .65rem; line-height: 1.2; }
  .home-block-doors .door .cam { font-size: .6rem; }
  .home-ages-body .age-row { grid-template-columns: minmax(0, 8rem) minmax(24px, 1fr) 2rem; gap: 8px; font-size: .8rem; }
  .home-guidance-body .grid-2, .home-guidance-body.grid-2 { gap: 20px; }
}

/* ---------- apresentaÃ§Ã£o permanente do concurso ---------- */
.competition-overview { gap: 20px; min-width: 0; }
.competition-overview > .year-tabs a { display: inline-flex; align-items: center; min-height: 44px; }
.competition-introduction.panel { gap: 20px; padding: 28px; border-top: 2px solid var(--pumpkin); background: radial-gradient(ellipse at top right, rgba(255, 123, 34, .08), transparent 60%), var(--hall); }
.competition-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 24px; min-width: 0; }
.competition-heading > div:first-child { display: grid; gap: 8px; min-width: 0; }
.competition-heading h1 { font-size: clamp(2.6rem, 5vw, 2.9rem); }
.competition-heading .eyebrow { font-size: .75rem; }
.competition-pumpkins { display: flex; align-items: center; gap: 4px; flex-shrink: 0; color: var(--pumpkin); }
.competition-pumpkins > svg { display: block; width: 25px; height: 25px; flex: 0 0 25px; }
.competition-introduction > .lede { max-width: 64ch; font-size: var(--step-0); }
.competition-actions { gap: 10px 16px; }
.competition-actions > .btn { min-height: 44px; line-height: 1.25; font-size: var(--step--1); }
.competition-actions > a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; color: var(--dust); font-size: var(--step--1); text-underline-offset: 4px; }
.competition-actions > a:not(.btn):hover { color: var(--bone); }
.competition-status { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.competition-access-note { flex-basis: 100%; margin: 0; color: var(--dust); font-size: var(--step--1); }
.competition-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 20px 0 0; list-style: none; border-top: 1px solid var(--line); }
.competition-steps > li { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.competition-steps > li > span { display: inline-grid; place-items: center; width: 28px; height: 28px; flex-shrink: 0; border: 1px solid rgba(255, 123, 34, .35); border-radius: 50%; background: rgba(255, 123, 34, .06); color: var(--pumpkin); font: 600 .75rem / 1 var(--font-plate); }
.competition-steps > li > div { display: grid; gap: 6px; min-width: 0; padding-top: 3px; }
.competition-steps h2 { font: 700 var(--step-0) / 1.3 var(--font-body); letter-spacing: normal; }
.competition-steps p, .competition-rating-note { color: var(--dust); font-size: var(--step--1); line-height: 1.5; }
.competition-rules { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: clip; }
.competition-rules > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 16px 20px; list-style: none; cursor: pointer; font-weight: 600; }
.competition-rules > summary::-webkit-details-marker { display: none; }
.competition-rules > summary:hover { background: var(--hall); }
.competition-rules > summary > svg { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: var(--brass-1); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.competition-rules[open] > summary > svg { transform: rotate(180deg); }
.competition-rules > div { padding: 0 20px 20px; }
.competition-rules ul { display: grid; gap: 10px; margin: 0; padding-left: 20px; color: var(--dust); font-size: var(--step--1); }
.competition-rules li::marker { color: var(--pumpkin); }
.competition-entries { min-width: 0; }
.competition-entries #contest-participants-title { scroll-margin-top: 100px; }
.competition-entries #contest-participants-title:focus-visible { outline: 2px solid var(--brass-1); outline-offset: 4px; }
@media (max-width: 640px) {
  .competition-introduction.panel { padding: 20px; }
  .competition-heading h1 { font-size: 2.3rem; }
  .competition-actions > .btn { flex: 1 1 auto; }
  .competition-steps { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .competition-steps > li > div { gap: 3px; }
  .competition-rules > summary { padding-inline: 16px; }
  .competition-rules > div { padding: 0 16px 16px; }
}

/* ---------- galeria ---------- */
.year-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.year-tabs a {
  font-family: var(--font-plate);
  text-decoration: none;
  color: var(--dust);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
}
.year-tabs a[aria-current='true'] { background: var(--bone); color: var(--night); border-color: var(--bone); }

.gallery { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.entry { background: var(--hall); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: grid; grid-template-rows: auto 1fr; min-width: 0; }
.entry.rated { border-color: var(--pumpkin); box-shadow: 0 0 0 1px var(--pumpkin); }
.entry[id^="contest-door-"] { scroll-margin-top: 100px; }
.entry[id^="contest-door-"]:focus-visible { outline: 2px solid var(--brass-1); outline-offset: 4px; }
.entry .cover { aspect-ratio: 4 / 5; width: 100%; object-fit: cover; cursor: zoom-in; background: var(--night); border: 0; padding: 0; }
.entry .cover img { width: 100%; height: 100%; object-fit: cover; }
.photo-carousel { position: relative; min-width: 0; background: var(--night); }
.photo-carousel .cover { display: block; }
.carousel-arrow { position: absolute; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid rgba(242, 235, 223, .35); border-radius: 50%; background: rgba(22, 17, 29, .8); color: var(--bone); cursor: pointer; box-shadow: 0 2px 12px rgba(0, 0, 0, .3); }
.carousel-arrow.previous { left: 10px; }
.carousel-arrow.next { right: 10px; }
.carousel-arrow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.carousel-arrow:hover, .carousel-arrow:focus-visible { background: var(--pumpkin); color: var(--night); border-color: var(--pumpkin); }
.carousel-count { position: absolute; top: 12px; right: 12px; padding: 4px 10px; border: 1px solid rgba(242, 235, 223, .2); border-radius: 999px; background: rgba(22, 17, 29, .8); color: var(--bone); font-family: var(--font-plate); font-size: .75rem; pointer-events: none; }
.carousel-dots { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 0; padding: 2px 6px; border-radius: 999px; background: rgba(22, 17, 29, .8); }
.carousel-dots button { position: relative; width: 28px; height: 28px; border: 0; padding: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.carousel-dots button::after { content: ''; position: absolute; inset: 9px; border-radius: 50%; background: var(--dust); }
.carousel-dots button[aria-pressed='true']::after { background: var(--pumpkin); }
.carousel-dots button:hover::after { background: var(--bone); }
.entry .body { padding: 14px 16px 16px; display: grid; gap: 12px; align-content: start; }
.entry .who { display: flex; gap: 12px; align-items: center; }
.entry .who p { color: var(--dust); font-size: var(--step--1); min-width: 0; overflow-wrap: anywhere; }
.rank { font-family: var(--font-plate); color: var(--brass-1); }
.votes { font-family: var(--font-plate); font-variant-numeric: tabular-nums; }
.door-rating { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; }
.rating-label { font-family: var(--font-plate); font-size: .75rem; color: var(--brass-1); }
.pumpkin-options { display: flex; gap: 4px; }
.pumpkin-choice { display: grid; place-items: center; padding: 2px; width: 44px; height: 46px; border: 0; border-radius: 6px; background: transparent; color: #64536e; cursor: pointer; transition: color .15s, transform .15s; }
.rating-pumpkin { width: 38px; height: 38px; flex: 0 0 auto; }
.pumpkin-body, .pumpkin-stem { fill: currentColor; }
.pumpkin-ribs { fill: none; stroke: var(--night); stroke-width: 2; opacity: .25; }
.pumpkin-face { fill: var(--night); }
.pumpkin-choice.filled { color: var(--pumpkin); }
.pumpkin-choice:disabled { cursor: default; opacity: .55; }
.pumpkin-options:has(.pumpkin-choice:not(:disabled):hover) .pumpkin-choice:not(:disabled) { color: #64536e; }
.pumpkin-options:has(.pumpkin-choice:not(:disabled):hover) .pumpkin-choice:not(:disabled):is(:hover, :has(~ .pumpkin-choice:hover)) { color: var(--pumpkin); }
.pumpkin-choice:hover:not(:disabled) { transform: translateY(-2px); }
.rating-feedback { color: var(--dust); font-size: .75rem; min-height: 2.4em; }
.rating-remove { justify-self: start; padding: 2px 0; border: 0; background: transparent; color: var(--dust); font-size: .75rem; text-decoration: underline; cursor: pointer; }
.rating-remove:hover { color: var(--pumpkin); }
.rating-result { display: flex; align-items: center; gap: 6px; color: var(--dust); font-size: .875rem; flex-wrap: wrap; }
.rating-result .rating-pumpkin { width: 25px; height: 25px; color: var(--pumpkin); }
.rating-result strong { color: var(--brass-1); font-family: var(--font-plate); }
.tag { display: inline-block; font-family: var(--font-plate); font-size: 0.75rem; padding: 3px 10px; border-radius: 999px; background: var(--hall-2); color: var(--dust); }
.tag.on { background: rgba(147, 196, 125, 0.15); color: var(--moss); }
.tag.hot { background: var(--pumpkin); color: var(--night); }
.tag.candy-ended { background: rgba(255, 107, 107, .12); color: var(--blood); }

dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: min(96vw, 1100px); max-height: 92vh; }
dialog.lightbox::backdrop { background: rgba(10, 6, 14, 0.9); }
dialog.lightbox img { max-height: 84vh; width: auto; margin: 0 auto; border-radius: 6px; }
dialog.lightbox p { color: var(--bone); text-align: center; padding-top: 8px; }
dialog.lightbox button { position: fixed; top: 16px; right: 16px; }

/* ---------- minha porta ---------- */
/* Resumos primeiro; formulÃ¡rios sÃ£o abertos somente na aÃ§Ã£o correspondente. */
.mine-page { display: grid; gap: 24px; min-width: 0; }
.mine-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; min-width: 0; }
.mine-head > .plate { flex-shrink: 0; }
.mine-identity { flex: 1 1 220px; min-width: 0; display: grid; gap: 5px; }
.mine-identity h1 { font-size: clamp(2rem, 5vw, 2.7rem); }
.mine-identity .eyebrow { font-size: .75rem; }
.mine-address { font-size: var(--step-0); font-weight: 600; }
.mine-responsible { color: var(--dust); font-size: var(--step--1); overflow-wrap: anywhere; }
.mine-complete { flex-shrink: 0; }
.mine-event-strip { display: flex; gap: 8px 20px; flex-wrap: wrap; align-items: center; padding-block: 14px; border-block: 1px solid var(--line); color: var(--dust); font-size: var(--step--1); }
.mine-event-strip > span { display: inline-flex; align-items: center; gap: 7px; }
.mine-event-strip svg { width: 18px; height: 18px; flex-shrink: 0; }
.mine-event-strip a { margin-left: auto; color: var(--brass-1); text-underline-offset: 4px; }
.mine-dashboard { display: grid; gap: 20px; min-width: 0; }
.mine-cards { order: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; min-width: 0; }
.mine-card.panel { gap: 18px; align-content: start; grid-template-rows: auto 1fr auto; padding: 24px; }
.mine-card-heading { display: flex; gap: 12px; align-items: center; justify-content: space-between; min-width: 0; }
.mine-card-heading h2 { font-size: 1.8rem; }
.mine-card-heading > span > svg { display: block; width: 32px; height: 32px; }
.mine-count { flex-shrink: 0; color: var(--dust); font: 500 var(--step--1) / 1.3 var(--font-plate); }
.mine-card-body { display: grid; gap: 10px; align-content: center; min-width: 0; min-height: 120px; }
.mine-card-body > p { color: var(--dust); font-size: var(--step--1); }
.mine-card .actions { margin-top: auto; }
.mine-card-body .mine-count-big { color: var(--brass-1); font: 600 3.5rem / 1 var(--font-plate); font-variant-numeric: tabular-nums; }
.mine-thumbnails { display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; max-width: 360px; }
.mine-thumbnail { display: block; width: 100%; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 8px; padding: 0; overflow: hidden; background: var(--night); cursor: zoom-in; }
.mine-thumbnail:hover { border-color: var(--brass-1); }
.mine-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.mine-photo-empty { display: grid; place-items: center; gap: 8px; min-height: 120px; padding: 16px; border: 1px dashed var(--line); border-radius: 8px; color: var(--dust); text-align: center; font-size: var(--step--1); }
.mine-photo-empty svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.mine-theme { color: var(--dust); font-size: var(--step--1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mine-candy { order: 2; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 24px; padding: 20px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--hall); min-width: 0; }
.mine-candy > div { display: grid; gap: 7px; min-width: 0; }
.mine-candy h2 { font-family: var(--font-body); font-size: var(--step-1); font-weight: 700; }
.mine-candy p { color: var(--dust); font-size: var(--step--1); }
.mine-candy .actions { display: flex; }
.mine-candy .tag { justify-self: start; }
.mine-candy .eyebrow { font-size: .7rem; }
.mine-candy > .mine-feedback, .mine-candy > .form-error { flex-basis: 100%; }
.mine-dashboard.is-event .mine-candy { order: 0; border-color: var(--pumpkin); background: linear-gradient(110deg, rgba(255, 123, 34, .07), transparent 75%), var(--hall); }
.mine-dashboard.is-event .mine-cards { order: 1; }
.mine-settings, .mine-account { border: 1px solid var(--line); border-radius: var(--radius); overflow: clip; min-width: 0; }
.mine-settings > summary, .mine-account > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 62px; padding: 18px 24px; cursor: pointer; list-style: none; font-weight: 600; }
.mine-settings > summary::-webkit-details-marker, .mine-account > summary::-webkit-details-marker { display: none; }
.mine-settings > summary:hover, .mine-account > summary:hover { background: var(--hall); }
.mine-settings > summary > svg, .mine-account > summary > svg { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.mine-settings[open] > summary > svg, .mine-account[open] > summary > svg { transform: rotate(180deg); }
.mine-settings-body, .mine-account-body { padding: 4px 24px 24px; }
.mine-settings-body { display: grid; gap: 20px; }
fieldset.mine-participation { margin: 0; padding: 0; border: 0; min-width: 0; }
.mine-participation > legend { margin-bottom: 10px; padding: 0; font: 600 var(--step--1) / 1.4 var(--font-body); }
.mine-account-body { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.mine-cancel-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 0; border: 0; background: transparent; color: var(--blood); font: 600 var(--step--1) / 1.4 var(--font-body); cursor: pointer; text-underline-offset: 4px; }
.mine-cancel-link:hover { text-decoration: underline; }
.mine-session-row { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px; }
.mine-session-row .btn { color: var(--dust); font-size: var(--step--1); }
.mine-feedback { color: var(--moss); font-size: var(--step--1); overflow-wrap: anywhere; }
.mine-feedback:empty { display: none; }
.mine-feedback.error { color: var(--blood); }

.mine-modal { width: min(620px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--hall); color: var(--bone); box-shadow: 0 24px 80px rgba(0, 0, 0, .5); }
.mine-modal[open] { display: flex; flex-direction: column; }
.mine-modal::backdrop { background: rgba(10, 6, 14, .82); backdrop-filter: blur(4px); }
body:has(.mine-modal[open]) { overflow: hidden; }
.mine-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.mine-modal-head h2 { font-size: 2rem; }
.mine-modal-head button { display: grid; place-items: center; width: 44px; height: 44px; min-width: 44px; padding: 0; border-radius: 50%; }
.mine-modal-head button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.mine-modal-content { display: grid; gap: 24px; padding: 24px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.mine-modal-content > p { color: var(--dust); }
.mine-modal-content > form { min-width: 0; }
.mine-modal .kid-list { gap: 10px; }
.mine-modal .kid { padding: 12px 14px; }
.mine-modal .kid strong { overflow-wrap: anywhere; }
.mine-modal .kid small { display: block; }
.mine-modal .kid .btn { min-height: 40px; }
.mine-modal .kid-row { grid-template-columns: minmax(0, 1fr) 5rem; }
.mine-modal .kid-row > button { grid-column: 1 / -1; justify-self: start; min-height: 44px; }
.mine-modal-footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; padding-top: 6px; }
.mine-modal-footer > .btn { min-height: 44px; }
.mine-managed-photos { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mine-managed-photos figure { display: flex; flex-direction: column; min-width: 0; margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--night); }
.mine-managed-photos figure > img, .mine-managed-photos figure > a > img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.mine-managed-photos figcaption { padding: 8px 10px; font-size: .8rem; color: var(--dust); overflow-wrap: anywhere; }
.mine-managed-photos figure > button { position: static; margin: auto 8px 8px; min-height: 38px; align-self: stretch; }
.mine-upload-preview { margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--night); }
.mine-upload-preview img { width: 100%; height: 220px; object-fit: contain; }
.mine-file-picker { max-width: 100%; width: 100%; padding: 10px; border: 1px dashed var(--line); border-radius: 8px; background: var(--night); color: var(--dust); font: inherit; font-size: var(--step--1); }
.mine-file-picker::file-selector-button { min-height: 44px; margin-right: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--hall-2); color: var(--bone); font: 600 var(--step--1) / 1.3 var(--font-body); cursor: pointer; }
.mine-file-picker::file-selector-button:hover { border-color: var(--dust); }
.mine-caption { min-width: 0; }
.mine-caption > summary { padding-block: 8px; color: var(--dust); font-size: var(--step--1); cursor: pointer; }
.mine-caption .field { margin-top: 8px; }
@media (max-width: 640px) {
  .mine-page { gap: 20px; }
  .mine-head { gap: 14px; }
  .mine-head > .plate.lg { --size: 1.1; }
  .mine-identity { flex-basis: 180px; }
  .mine-complete { margin-left: 0; }
  .mine-event-strip { gap: 8px 16px; }
  .mine-event-strip a { margin-left: 0; }
  .mine-cards { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .mine-card.panel { padding: 20px; gap: 16px; }
  .mine-card-body { min-height: 100px; }
  .mine-card-body .mine-count-big { font-size: 3rem; }
  .mine-card .actions > .btn { min-height: 44px; }
  .mine-candy { padding: 20px; }
  .mine-candy > .btn, .mine-candy .actions > .btn { min-height: 44px; }
  .mine-settings > summary, .mine-account > summary { padding: 16px 20px; }
  .mine-settings-body, .mine-account-body { padding: 2px 20px 20px; }
  .mine-modal-head, .mine-modal-content { padding: 20px; }
  .mine-modal-head h2 { font-size: 1.8rem; }
  .mine-managed-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 380px) {
  .mine-modal { width: calc(100% - 16px); max-height: calc(100dvh - 16px); }
  .mine-modal-head, .mine-modal-content { padding: 16px; }
  .mine-modal-footer > .btn { flex: 1 1 auto; }
}
.kid-list { display: grid; gap: 8px; }
.kid { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--night); border: 1px solid var(--line); border-radius: 8px; flex-wrap: wrap; }
.kid > div { min-width: 0; }
.kid small { color: var(--dust); }
.photo-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); }
.photo-grid figure { margin: 0; position: relative; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--night); }
.photo-grid img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.photo-grid figcaption { font-size: var(--step--1); padding: 6px 8px; color: var(--dust); overflow-wrap: anywhere; }
.photo-grid figure button { position: absolute; top: 6px; right: 6px; }
.two-col { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); align-items: start; }

/* ---------- admin ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--dust); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.72rem; background: var(--hall); }
td.num { font-family: var(--font-plate); font-variant-numeric: tabular-nums; text-align: right; }
tr:last-child td { border-bottom: 0; }
.switch { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; white-space: nowrap; }
.switch input { accent-color: var(--pumpkin); width: 18px; height: 18px; }
.mini-thumbs { display: flex; gap: 4px; flex-wrap: wrap; }
.mini-thumbs span { position: relative; }
.mini-thumbs img { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; }
.mini-thumbs a[data-view-photo] { display: block; border-radius: 4px; cursor: zoom-in; }
.mini-thumbs button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: var(--blood); color: var(--night); font-weight: 700; cursor: pointer; line-height: 1; padding: 0; }
.admin-photo-lightbox { width: min(1100px, calc(100% - 24px)); max-height: calc(100dvh - 24px); margin: auto; padding: 20px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--hall); color: var(--bone); box-shadow: 0 24px 80px rgba(0, 0, 0, .45); }
.admin-photo-lightbox::backdrop { background: rgba(10, 6, 14, .9); backdrop-filter: blur(4px); }
.admin-photo-lightbox .section-head { align-items: center; flex-wrap: nowrap; margin-bottom: 16px; }
.admin-photo-stage { position: relative; padding-inline: 56px; background: var(--night); border-radius: 6px; }
.admin-photo-stage img { width: 100%; height: min(62dvh, 650px); object-fit: contain; }
.admin-photo-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 48px; padding: 0; font-size: 2rem; background: var(--hall) !important; }
.admin-photo-arrow:active { transform: translateY(-50%); }
#admin-photo-prev { left: 8px; }
#admin-photo-next { right: 8px; }
.admin-photo-caption { padding-top: 14px; text-align: center; color: var(--dust); overflow-wrap: anywhere; }
body:has(.admin-photo-lightbox[open]) { overflow: hidden; }
@media (max-width: 480px) {
  .admin-photo-lightbox { padding: 12px; }
  .admin-photo-stage { padding-inline: 0; }
  .admin-photo-arrow { opacity: .95; }
}
.pin-reveal { font-family: var(--font-plate); font-size: var(--step-1); color: var(--brass-1); letter-spacing: 0.3em; }

/* ---------- administraÃ§Ã£o: operaÃ§Ã£o, concurso e revisÃµes ---------- */
.admin-tabs [role='tab'] { min-height: 52px; }
.admin-tab-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-left: 6px; padding-inline: 6px; border-radius: 999px; background: rgba(255, 123, 34, .15); color: var(--pumpkin); font: 600 .7rem / 1 var(--font-plate); vertical-align: middle; }
.admin-tabs [aria-selected='true'] .admin-tab-count { color: var(--night); background: rgba(22, 17, 29, .12); }
.admin-overview { min-width: 0; }
button.admin-stat-card { color: var(--bone); font: inherit; text-align: left; cursor: pointer; }
button.admin-stat-card:hover { border-color: var(--dust); }
.admin-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; }
.admin-toolbar .btn { min-height: 44px; }
.admin-auto-update { display: inline-flex; align-items: center; gap: 7px; color: var(--dust); font-size: .8rem; }
.admin-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 14px; min-width: 0; }
.admin-control-card { display: grid; align-content: start; grid-template-rows: 1fr auto; gap: 10px; min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--hall); }
.admin-control-card > div:first-child { display: grid; gap: 6px; }
.admin-control-card h3 { font-size: var(--step-0); }
.admin-control-card p { color: var(--dust); font-size: var(--step--1); line-height: 1.45; }
.admin-control-card .edition-toggle { justify-self: start; min-height: 44px; }
#admin-contest-content { display: grid; gap: 28px; min-width: 0; }
.admin-contest-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; color: var(--dust); font-size: var(--step--1); }
.admin-contest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 20px; min-width: 0; }
.admin-contest-entry { display: grid; align-content: start; min-width: 0; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--hall); }
.admin-contest-cover { display: block; width: 100%; aspect-ratio: 3 / 4; max-height: 280px; padding: 0; border: 0; background: var(--night); cursor: zoom-in; }
.admin-contest-cover img { width: 100%; height: 100%; object-fit: cover; }
.admin-contest-entry-body { display: grid; gap: 12px; min-width: 0; padding: 20px; }
.admin-contest-entry-body > header { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.admin-contest-entry-body > .plate, .admin-contest-entry-body > .tag { justify-self: start; }
.admin-contest-entry-body h3 { font-size: var(--step-0); overflow-wrap: anywhere; }
.admin-contest-entry-body p { color: var(--dust); font-size: var(--step--1); }
.admin-contest-entry-body > .btn { min-height: 44px; }
.admin-contest-entry > .btn, .admin-contest-entry .actions > .btn { min-height: 44px; }
.admin-contest-entry .rating-result { gap: 6px; }
.admin-settings-fold { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: clip; }
.admin-settings-fold.panel { display: block; padding: 0; }
.admin-settings-fold > p, .admin-settings-fold > button { margin: 0 24px 24px; }
.admin-settings-fold > p { font-size: var(--step--1); }
.admin-settings-fold > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 18px 24px; cursor: pointer; list-style: none; font-weight: 600; }
.admin-settings-fold > summary::-webkit-details-marker { display: none; }
.admin-settings-fold > summary:hover { background: var(--hall); }
.admin-settings-fold > summary svg { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.admin-settings-fold[open] > summary svg { transform: rotate(180deg); }
.admin-settings-fold > summary:not(:has(svg))::after { content: ''; width: 8px; height: 8px; flex-shrink: 0; margin-right: 4px; border-right: 2px solid var(--dust); border-bottom: 2px solid var(--dust); transform: rotate(45deg); }
.admin-settings-fold[open] > summary:not(:has(svg))::after { transform: rotate(225deg); }
.admin-settings-fold > div { padding: 0 24px 24px; }
.admin-edition-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--dust); font-size: var(--step--1); }
table.admin-participants-table { min-width: 720px; font-size: var(--step--1); }
.admin-participants-table td { vertical-align: middle; }
.admin-participants-table td:nth-child(2) > strong { display: block; }
.admin-participants-table td:nth-child(2) > .tag { margin-top: 6px; }
.admin-participants-table .btn { min-height: 40px; }
.admin-participants-table .admin-candy-control { min-height: 40px; }

.admin-apartment-dialog { width: min(800px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--hall); color: var(--bone); box-shadow: 0 24px 80px rgba(0, 0, 0, .5); }
.admin-apartment-dialog[open] { display: flex; flex-direction: column; }
.admin-apartment-dialog::backdrop { background: rgba(10, 6, 14, .82); backdrop-filter: blur(4px); }
body:has(.admin-apartment-dialog[open]) { overflow: hidden; }
.admin-apartment-header { display: flex; align-items: center; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.admin-apartment-header > .plate, .admin-apartment-header > [data-apartment-slot="plate"] { flex-shrink: 0; }
.admin-apartment-heading { flex: 1; display: grid; gap: 5px; min-width: 0; }
.admin-apartment-heading h2 { font-size: 2rem; overflow-wrap: anywhere; }
.admin-apartment-heading p { color: var(--dust); font-size: var(--step--1); }
.admin-apartment-close.btn { min-width: 44px; min-height: 44px; padding: 10px 12px; flex-shrink: 0; font-size: var(--step--1); }
.admin-apartment-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.admin-apartment-body { display: grid; gap: 24px; min-height: 0; padding: 24px; overflow-y: auto; overscroll-behavior: contain; }
.admin-apartment-section { display: grid; gap: 14px; min-width: 0; }
.admin-apartment-section h3 { font-size: var(--step-0); }
.admin-apartment-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; margin: 0; }
.admin-apartment-facts > div { display: grid; gap: 3px; min-width: 0; }
.admin-apartment-facts dt { color: var(--dust); font-size: .8rem; }
.admin-apartment-facts dd { margin: 0; overflow-wrap: anywhere; }
.admin-apartment-children { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.admin-apartment-children > li { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--night); }
.admin-apartment-children strong { min-width: 0; overflow-wrap: anywhere; }
.admin-apartment-children .muted { font-size: .8rem; }
.admin-apartment-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.admin-apartment-photos > .muted { grid-column: 1 / -1; }
.admin-apartment-photo { display: flex; flex-direction: column; min-width: 0; margin: 0; padding-bottom: 10px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--night); }
.admin-apartment-photo-open { display: block; width: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.admin-apartment-photo-open img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.admin-apartment-photo figcaption { padding: 10px; color: var(--dust); font-size: .8rem; overflow-wrap: anywhere; }
.admin-apartment-photo > .btn { min-height: 40px; margin: auto 10px 0; }
.admin-apartment-feedback { color: var(--moss); font-size: var(--step--1); overflow-wrap: anywhere; }
.admin-apartment-feedback[role='alert'] { color: var(--blood); }
.admin-apartment-feedback:empty { display: none; }
.admin-apartment-access { min-width: 0; border-top: 1px solid var(--line); }
.admin-apartment-access > summary { min-height: 52px; padding-block: 14px; cursor: pointer; color: var(--dust); font-size: var(--step--1); font-weight: 600; }
.admin-apartment-access > summary:hover { color: var(--bone); }
.admin-apartment-actions { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.admin-apartment-actions .btn { min-height: 44px; }
.admin-apartment-confirm { display: grid; gap: 14px; padding: 18px; border: 1px solid rgba(255, 107, 107, .3); border-radius: 8px; background: rgba(255, 107, 107, .05); }
.admin-apartment-confirm h3 { font-size: var(--step-0); }
.admin-apartment-confirm p { color: var(--dust); font-size: var(--step--1); }
.admin-apartment-access > [data-apartment-pin-result] { display: grid; gap: 12px; padding-top: 16px; }
.admin-apartment-access > [data-apartment-pin-result] > p { color: var(--dust); font-size: var(--step--1); }
.admin-apartment-pin { display: block; width: fit-content; padding: 14px 18px; border: 1px solid var(--brass-2); border-radius: 8px; background: var(--night); color: var(--brass-1); font: 600 1.6rem / 1.2 var(--font-plate); letter-spacing: .15em; }

.security-overview { display: grid; gap: 8px; min-width: 0; }
.security-overview p { color: var(--dust); font-size: var(--step--1); }
.security-overview > .eyebrow { color: var(--pumpkin); }
.review-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.review-filters > button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--dust); font: 600 var(--step--1) / 1.3 var(--font-body); cursor: pointer; }
.review-filters > button:hover { color: var(--bone); border-color: var(--dust); }
.review-filters > button[aria-pressed='true'] { border-color: var(--brass-2); background: rgba(233, 199, 123, .09); color: var(--brass-1); }
.review-filter-count { display: inline-grid; place-items: center; min-width: 22px; min-height: 22px; padding: 2px 5px; border-radius: 999px; background: var(--hall-2); color: inherit; font: 500 .7rem / 1 var(--font-plate); }
.protection-settings, .security-history { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: clip; }
.protection-settings.section, .security-history.section { display: block; }
.protection-settings > form.panel { padding: 20px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; }
.security-history > p, .security-history > button { margin: 0 20px 20px; }
.protection-settings > summary, .security-history > summary { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; min-height: 62px; padding: 18px 20px; cursor: pointer; font-weight: 600; }
.protection-settings > summary:hover, .security-history > summary:hover { background: var(--hall); }
.security-details-title { color: var(--bone); }
.protection-settings > summary:not(:has(svg))::after, .security-history > summary:not(:has(svg))::after, .review-item > summary:not(:has(svg))::after { content: ''; width: 8px; height: 8px; flex-shrink: 0; margin-left: auto; margin-right: 3px; border-right: 2px solid var(--dust); border-bottom: 2px solid var(--dust); transform: rotate(45deg); }
.protection-settings[open] > summary:not(:has(svg))::after, .security-history[open] > summary:not(:has(svg))::after, .review-item[open] > summary:not(:has(svg))::after { transform: rotate(225deg); }
.protection-settings > div, .security-history > div { padding: 0 20px 20px; }
.protection-options { display: grid; gap: 12px; }
.protection-option { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--hall); }
.protection-option .switch { align-items: flex-start; min-height: 44px; white-space: normal; line-height: 1.4; }
.protection-option .switch input { flex-shrink: 0; margin: 3px 0 0; }
.protection-option h3 { font-size: var(--step-0); }
.protection-option p { color: var(--dust); font-size: var(--step--1); }
.protection-option .edition-toggle { justify-self: start; min-height: 44px; }
.review-item { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--hall); }
.review-item > summary { min-height: 44px; flex-wrap: wrap; }
.review-item > summary::-webkit-details-marker { display: none; }
.review-summary-meta { display: grid; gap: 4px; min-width: 0; flex: 1; overflow-wrap: anywhere; }
.review-summary-meta .review-status { margin-left: 0; color: var(--dust); font-size: .8rem; }
.review-summary-meta > small, .review-summary-meta > p { color: var(--dust); font-size: .8rem; }
.review-status { margin-left: auto; }
.review-changes { display: grid; gap: 12px; margin: 0; }
.review-change { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; padding-block: 12px; border-bottom: 1px solid var(--line); min-width: 0; }
.review-change:last-child { border-bottom: 0; }
.review-change-label { grid-column: 1 / -1; font-size: var(--step--1); }
.review-before, .review-after { display: grid; align-content: start; gap: 5px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; min-width: 0; overflow-wrap: anywhere; font-size: var(--step--1); background: var(--night); }
.review-before { color: var(--dust); }
.review-after { border-color: rgba(147, 196, 125, .3); background: rgba(147, 196, 125, .04); }
.review-before > small, .review-after > small { color: var(--dust); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }
.review-full-details, .review-other-actions, .history-technical { margin-block: 12px; border-top: 1px solid var(--line); }
.review-full-details > summary, .review-other-actions > summary, .history-technical > summary { min-height: 44px; padding-block: 10px; color: var(--dust); font-size: var(--step--1); cursor: pointer; }
.review-full-details > summary:hover, .review-other-actions > summary:hover, .history-technical > summary:hover { color: var(--bone); }
.review-decision { display: grid; gap: 14px; padding: 18px; margin-top: 16px; border: 1px solid rgba(255, 123, 34, .35); border-radius: 8px; background: rgba(255, 123, 34, .04); }
.review-decision .btn, .review-item > .actions .btn { min-height: 44px; }
.review-full-details > p + p { margin-top: 10px; }
.review-full-details > p { overflow-wrap: anywhere; font-size: var(--step--1); }
.review-decision h4 { margin: 0; font-size: var(--step-0); }
.review-decision p { color: var(--dust); font-size: var(--step--1); }
.history-toolbar { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; margin-block: 12px; }
.history-toolbar .field { flex: 1 1 200px; }
.history-toolbar > select { flex: 1 1 220px; min-width: 0; min-height: 44px; }
.history-toolbar .switch { white-space: normal; min-height: 44px; }
.history-toolbar .switch input { flex-shrink: 0; }
.history-toolbar .btn { min-height: 44px; }
.history-change-list { display: grid; gap: 12px; }
.security-history .audit-item { background: var(--hall); }
.security-history .audit-item > summary { min-height: 44px; }
.security-history #history-title { scroll-margin-top: 100px; }
.history-technical > p { overflow-wrap: anywhere; font-size: .8rem; }
.history-technical > p + p, .history-technical > details { margin-top: 12px; }
.history-technical .audit-json { margin-block: 10px 0; }
@media (max-width: 700px) {
  .admin-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-tabs [role='tab'] { min-height: 56px; padding: 12px 10px; }
  .admin-tab-panel { gap: 24px; }
  .admin-overview.admin-statistics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .admin-overview .admin-stat-card { padding: 16px; }
  .admin-overview .admin-stat-card strong { font-size: 1.9rem; }
  .admin-settings-fold > summary { padding: 16px 20px; }
  .admin-settings-fold > div { padding: 0 20px 20px; }
  .admin-settings-fold > p, .admin-settings-fold > button { margin: 0 20px 20px; }
  .admin-apartment-header { gap: 12px; padding: 16px 20px; }
  .admin-apartment-heading h2 { font-size: 1.7rem; }
  .admin-apartment-body { padding: 20px; }
  .admin-apartment-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
@media (max-width: 480px) {
  .admin-control-card, .admin-contest-entry-body, .review-item { padding: 16px; }
  .admin-apartment-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); }
  .admin-apartment-header { gap: 10px; padding: 16px; }
  .admin-apartment-header > .plate, .admin-apartment-header > [data-apartment-slot="plate"] .plate { --size: .85; }
  .admin-apartment-heading h2 { font-size: 1.5rem; }
  .admin-apartment-body { padding: 16px; gap: 20px; }
  .admin-apartment-facts { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .admin-apartment-actions .btn { flex: 1 1 auto; }
  .admin-apartment-confirm { padding: 14px; }
  .protection-settings > summary, .security-history > summary { padding: 16px; }
  .protection-settings > div, .security-history > div { padding: 0 16px 16px; }
  .protection-settings > form.panel { padding: 16px; }
  .security-history > p, .security-history > button { margin: 0 16px 16px; }
  .review-filters { gap: 6px; }
  .review-filters > button { padding: 10px 12px; }
  .review-change { grid-template-columns: minmax(0, 1fr); }
  .review-summary-meta { flex-basis: 160px; }
  .review-status { margin-left: 0; }
}

/* ---------- toast ---------- */
#toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(20px);
  background: var(--bone);
  color: var(--night);
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  max-width: calc(100vw - 32px);
  z-index: 50;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { background: var(--blood); }

.skeleton { color: var(--dust); padding-block: 40px; }

/* ---------- mapa da caÃ§a aos doces ---------- */
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.map-invite { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 20px; background: var(--hall); border: 1px solid var(--line); border-radius: var(--radius); }
.candy-map { display: grid; gap: 24px; min-width: 0; }
.map-heading { gap: 12px; }
.map-heading h1 { font-size: var(--step-4); }
.map-heading .lede { font-size: 1.1rem; }
.map-status { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: var(--step--1); }
#map-summary { font-weight: 700; color: var(--brass-1); }
.map-picture { overflow: hidden; background: var(--night); color: var(--bone); border-radius: var(--radius); border: 1px solid var(--line); }
.map-scroll-hint { padding: 12px 16px; font-size: .875rem; background: var(--hall); color: var(--dust); border-bottom: 1px solid var(--line); }
.map-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
.map-stage { position: relative; min-width: 620px; width: 100%; aspect-ratio: 1774 / 887; }
.map-stage > img { width: 100%; height: 100%; }
.map-pin { position: absolute; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 2px; width: 116px; max-width: 17%; min-height: 48px; border: 1px solid #ac9cba; border-radius: 10px; background: rgba(242, 235, 223, .97); color: #302a38; cursor: pointer; padding: 6px; box-shadow: 0 2px 8px #09060e66; font: inherit; line-height: 1.25; }
.map-pin strong { font-size: .9rem; }
.map-pin small { font-size: .7rem; overflow-wrap: anywhere; }
.map-pin.has-candy { background: #ff7b22; color: #21182f; border-color: #8c3c08; font-weight: 700; }
.map-pin.candy-ended { background: #403747; color: #f2ebdf; border-style: dashed; border-color: #ff6b6b; }
.map-pin:hover, .map-pin[aria-pressed='true'] { outline: 3px solid var(--brass-1); outline-offset: 3px; }
.map-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 14px 16px; font-size: .8rem; border-top: 1px solid var(--line); background: var(--hall); color: var(--dust); }
.map-legend > span { display: flex; align-items: center; gap: 6px; }
.map-dot { width: 12px; height: 12px; border: 1px solid #78717f; background: white; border-radius: 50%; display: inline-block; }
.map-dot.active { background: #ff7b22; border-color: #8c3c08; }
.map-dot.ended { display: inline-flex; align-items: center; justify-content: center; background: #403747; color: #f2ebdf; border-color: #ff6b6b; font: 700 12px / 1 Arial, sans-serif; }
.map-block-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.map-block { display: grid; align-content: start; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--hall); min-width: 0; }
.map-block.has-candy { border-top: 3px solid var(--pumpkin); }
.map-block.candy-ended { border-top: 3px dashed var(--blood); }
.map-block.selected { outline: 2px solid var(--brass-1); outline-offset: 3px; }
.map-block-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.map-block h2 { font-family: var(--font-body); font-size: 1.25rem; overflow-wrap: anywhere; scroll-margin-top: 140px; }
.map-door-count { font-size: .8rem; color: var(--dust); }
.map-apartments { list-style: none; margin: 0; padding: 0 0 4px; display: flex; align-items: end; flex-wrap: wrap; gap: 12px; }
.map-apt {
  position: relative;
  display: inline-grid;
  align-content: center;
  justify-items: center;
  gap: 3px;
  min-width: 84px;
  min-height: 110px;
  padding: 32px 22px 24px;
  background: transparent;
  isolation: isolate;
  color: var(--bone);
  font-family: var(--font-plate);
  font-weight: 600;
  text-align: center;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, .5);
  max-width: 100%;
  overflow-wrap: anywhere;
}
.map-apt::before { content: ''; position: absolute; inset: 0; z-index: -1; background: url('/assets/lapide-apartamento.svg?v=2') center / 100% 100% no-repeat; pointer-events: none; }
.map-apt.candy-finished { color: var(--candy-ended-ink); }
.map-apt.candy-finished::before { background-image: url('/assets/lapide-apartamento-acabou.svg?v=2'); }
.map-apt.candy-finished small { font: 600 .7rem / 1.3 var(--font-body); color: inherit; }
.map-empty, .map-extra-note { color: var(--dust); font-size: .875rem; }
.map-print-note { color: var(--dust); font-size: .875rem; }
@media (max-width: 760px) {
  .map-block-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .map-block-grid { grid-template-columns: 1fr; }
  .map-actions { gap: 10px; }
  .map-actions > .btn { flex: 1 1 auto; }
}
@media print {
  @page { size: A4 portrait; margin: 12mm; }
  body:has(.candy-map) { color-scheme: light; background: white; color: #21182f; font-size: 10pt; line-height: 1.35; }
  body:has(.candy-map) .top, body:has(.candy-map) footer, body:has(.candy-map) #toast,
  .candy-map .map-actions, .candy-map .map-scroll-hint, .candy-map .map-extra-note { display: none !important; }
  main.wrap:has(.candy-map) { max-width: none; padding: 0; margin: 0; display: block; }
  .candy-map { display: block; }
  .candy-map .map-heading { gap: 5px; margin-bottom: 12px; }
  .candy-map .map-heading h1 { font: 700 22pt / 1.15 Arial, sans-serif; }
  .candy-map .lede { font-size: 10pt; }
  .candy-map .muted, .candy-map .map-empty, .candy-map .map-door-count, .candy-map .map-print-note { color: #554c5e; }
  .candy-map .eyebrow, .candy-map #map-summary { color: #21182f; }
  .candy-map .event-meeting { color: #21182f; font-weight: 700; }
  .candy-map .map-status { margin-bottom: 10px; font-size: 9pt; }
  .candy-map .map-picture { border: 1px solid #bbb; margin-bottom: 14px; break-inside: avoid; background: white; color: #21182f; }
  .candy-map .map-scroll { overflow: visible; }
  .candy-map .map-stage { min-width: 0; width: 100%; }
  .candy-map .map-pin { width: 96px; min-height: 35px; padding: 4px; border-radius: 6px; box-shadow: none; background: white; border: 1px solid #777; }
  .candy-map .map-pin.has-candy { border: 2px solid #21182f; background: #fff0df; }
  .candy-map .map-pin strong { font-size: 9pt; }
  .candy-map .map-pin small { font-size: 7pt; }
  .candy-map .map-pin[aria-pressed='true'] { outline: none; }
  .candy-map .map-legend { padding: 8px; font-size: 8pt; background: white; color: #21182f; border-color: #bbb; }
  .candy-map > .section { display: block; }
  .candy-map .section-head { margin-bottom: 12px; gap: 6px; }
  .candy-map .section-head h2 { font: 700 16pt Arial, sans-serif; }
  .candy-map .section-head p { font-size: 9pt; }
  .candy-map .map-block-grid { display: block; columns: 3; column-gap: 10px; }
  .candy-map .map-block { break-inside: avoid; margin-bottom: 10px; padding: 10px; border: 1px solid #aaa; background: white; display: block; }
  .candy-map .map-block-head { margin-bottom: 10px; }
  .candy-map .map-block h2 { font: 700 11pt Arial, sans-serif; }
  .candy-map .map-block.selected { outline: none; }
  .candy-map .map-apartments { gap: 5px; }
  .candy-map .map-apt { background: white; color: #21182f; border: 1px solid #777; border-radius: 24px 24px 2px 2px; min-width: 38px; min-height: 46px; padding: 12px 6px 8px; font: 600 10pt Arial, sans-serif; text-shadow: none; }
  .candy-map .map-apt::before { display: none; }
  .candy-map .map-apt.candy-finished, .candy-map .map-pin.candy-ended { background: white; color: #21182f; border: 1px dashed #21182f; }
  .candy-map .map-apt.candy-finished small { color: #21182f; font: 600 7pt Arial, sans-serif; }
  .candy-map .map-print-note { margin-top: 12px; font-size: 8pt; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- Doce ou Porta: marca em volta do evento do condomínio ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -64px; z-index: 100; background: var(--pumpkin); color: var(--brass-ink); padding: 10px 16px; border-radius: 10px; font-weight: 700; }
.skip-link:focus { top: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 40px; height: 40px; object-fit: contain; flex: none; }
.error-page { margin-top: 40px; display: grid; gap: 8px; }
.footer-credit a { color: inherit; }

/* concurso: etapas reais e vitrine inicial */
.competition-stages { list-style: none; margin: 24px 0 8px; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.competition-stages .stage { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--hall); }
.competition-stages .stage h2 { font-family: var(--font-body); font-size: 1rem; margin: 0 0 2px; }
.competition-stages .stage p { margin: 0; font-size: var(--step--1); color: var(--dust); }
.stage-number { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 700 .9rem var(--font-plate); background: var(--hall-2); color: var(--bone); border: 1px solid var(--line); }
.stage.done .stage-number { background: var(--moss); color: var(--brass-ink); border-color: var(--moss); }
.stage.current { border-color: var(--pumpkin); box-shadow: 0 0 0 1px var(--pumpkin) inset; }
.stage.current .stage-number { background: var(--pumpkin); color: var(--brass-ink); border-color: var(--pumpkin); }
.stage.next { opacity: .8; }
.contest-info { display: grid; gap: 16px; margin-top: 16px; }
.contest-info h2 { font-family: var(--font-body); font-size: 1.1rem; }
.contest-info p { white-space: pre-line; }
.contest-empty-panel { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.contest-empty-panel img { width: 140px; height: auto; flex: none; }
.contest-empty-panel > div { flex: 1 1 260px; display: grid; gap: 8px; }
.map-meeting-pin { position: absolute; transform: translate(-50%, -100%); width: 40px; height: 40px; pointer-events: none; }
.map-meeting-pin img { width: 100%; height: 100%; display: block; }
.link-button { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--brass-1); text-decoration: underline; cursor: pointer; }

/* ---------- painel: abas novas, mapa e equipe ---------- */
.condo-form { display: grid; gap: 16px; margin-top: 16px; }
.condo-form h3 { margin: 0; }
.map-upload { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.map-editor { display: grid; gap: 12px; margin-top: 8px; }
.map-editor-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.map-editor-tools .btn[aria-pressed='true'] { background: var(--pumpkin); color: var(--brass-ink); border-color: var(--pumpkin); }
.map-editor-tools .unplaced { border-style: dashed; }
.map-editor-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--night); }
.map-editor-stage { position: relative; min-width: 520px; width: 100%; touch-action: none; cursor: crosshair; user-select: none; }
.map-editor-stage > img { width: 100%; height: 100%; display: block; pointer-events: none; }
.map-editor-pin { position: absolute; transform: translate(-50%, -50%); min-width: 44px; min-height: 44px; border-radius: 12px; border: 2px solid #8c3c08; background: var(--pumpkin); color: var(--brass-ink); font: 700 .95rem var(--font-plate); cursor: grab; touch-action: none; }
.map-editor-pin.meeting { background: #aa87d9; border-color: #352044; border-radius: 50%; }
.invite-list { list-style: none; padding: 0; display: grid; gap: 8px; }
.invite-list li { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.matrix td, .matrix th { text-align: center; }
.matrix td:first-child, .matrix th:first-child { text-align: left; }

/* ---------- zoom e casas no mapa ---------- */
.map-zoomable { position: relative; }
.map-zoomable .map-scroll, .map-zoomable .map-editor-scroll, .map-zoomable .pick-scroll { overflow: auto; overscroll-behavior: contain; }
.map-zoomable .is-zoomed { max-height: 78vh; cursor: grab; }
.map-zoomable .is-panning { cursor: grabbing; user-select: none; }
.map-zoom-controls { position: absolute; right: 10px; bottom: 10px; z-index: 3; display: grid; gap: 6px; }
.map-zoom-controls button { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--hall); color: var(--bone); font: 700 1.25rem / 1 var(--font-body); cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.map-zoom-controls button[data-zoom='reset'] { font-size: .8rem; }
.map-zoom-controls button:disabled { opacity: .45; cursor: not-allowed; }
.map-zoom-controls button:hover:not(:disabled) { border-color: var(--pumpkin); }
.map-editor-stage { touch-action: pan-x pan-y; }
.map-editor-pin { touch-action: none; }

/* uma marca por casa (condomínios de casas) */
.map-house { position: absolute; transform: translate(-50%, -50%); display: grid; place-items: center; min-width: 32px; height: 32px; padding: 0 8px; border: 2px solid #8c3c08; border-radius: 999px; background: #ff7b22; color: #21182f; font: 700 .8rem / 1 var(--font-plate); cursor: pointer; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.map-house.candy-ended { background: #403747; color: #f2ebdf; border: 2px dashed #ff6b6b; }
.map-house:hover, .map-house[aria-pressed='true'] { outline: 3px solid var(--brass-1); outline-offset: 2px; z-index: 2; }
.map-house[aria-pressed='true'] { z-index: 2; }
.map-editor-pin.house { min-width: 36px; min-height: 36px; padding: 0 6px; border-radius: 999px; font-size: .8rem; }
.map-editor-pin.house.suggested { background: #aa87d9; border: 2px dashed #352044; color: #fff; }
.map-editor-pin.house.selected { outline: 3px solid var(--brass-1); outline-offset: 2px; z-index: 2; }
.map-editor-pin.house.nonparticipant { background: #bdb3c4; border-color: #6b6272; color: #352044; opacity: .8; }

/* lista de casas do editor */
.houses-panel { display: grid; gap: 12px; }
.houses-list { display: grid; gap: 6px; max-height: 320px; overflow: auto; padding: 4px; border: 1px solid var(--line); border-radius: 10px; }
.houses-group h4 { margin: 8px 4px 4px; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--dust); }
.house-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--hall); color: var(--bone); font: inherit; text-align: left; cursor: pointer; }
.house-row[aria-pressed='true'] { border-color: var(--pumpkin); box-shadow: 0 0 0 2px rgba(245, 130, 32, .35); }
.house-state { font-size: .75rem; white-space: nowrap; }
.house-state.pending { color: #6b3fa0; font-weight: 700; }
.house-state.missing { color: #a3293d; }
.house-state.ok { color: #246346; }
.house-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* escolha da casa pelo morador */
.pick-map { display: grid; gap: 8px; }
.pick-stage { position: relative; width: 100%; min-width: 520px; touch-action: pan-x pan-y; cursor: crosshair; user-select: none; }
.pick-stage > img { width: 100%; height: 100%; display: block; pointer-events: none; }
.pick-scroll { border: 1px solid var(--line); border-radius: var(--radius); background: var(--night); }
.pick-pin { position: absolute; transform: translate(-50%, -100%); width: 36px; height: 36px; pointer-events: none; font-size: 28px; line-height: 36px; text-align: center; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); }
.pick-pin.confirmed { filter: drop-shadow(0 0 0 #000) hue-rotate(80deg); }
