/* Zelai Mídia In — base visual compartilhada (cores oficiais do doc 05 + Fredoka/Inter servidas localmente) */
@font-face {
  font-family: "Fredoka";
  src: url("/shared/fonts/Fredoka-Variable.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/shared/fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  src: url("/shared/fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --laranja: #E87820;
  --laranja-escuro: #C9620F;
  --laranja-suave: #FCE9D8;
  --chocolate: #3D2010;
  --chocolate-escuro: #231208;
  --chocolate-medio: #5A3520;
  --linho: #FAF6F0;
  --areia: #F5EDE3;
  --areia-escura: #E8DCCB;
  --texto: #2A170B;
  --texto-suave: #6B5444;
  --verde: #1F8A4C;
  --verde-suave: #DDF3E6;
  --vermelho: #C0392B;
  --vermelho-suave: #FBE3E0;
  --branco: #FFFFFF;

  --fonte-titulo: "Fredoka", ui-rounded, "Segoe UI", system-ui, sans-serif;
  --fonte-texto: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --raio: 16px;
  --raio-p: 10px;
  --sombra: 0 1px 2px rgba(35, 18, 8, .06), 0 8px 24px rgba(35, 18, 8, .08);
  --sombra-forte: 0 20px 60px rgba(35, 18, 8, .28);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--fonte-texto);
  color: var(--texto);
  background: var(--linho);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--fonte-titulo); line-height: 1.12; margin: 0; color: inherit; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--laranja-escuro); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--laranja); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* Marca tipográfica: "zelai" + selo MÍDIA IN */
.marca { display: inline-flex; align-items: center; gap: .45rem; text-decoration: none; color: inherit; }
.marca-nome { font-family: var(--fonte-titulo); font-weight: 700; font-size: 1.45rem; letter-spacing: -.02em; }
.marca-nome b { color: var(--laranja); font-weight: 700; }
.marca-selo {
  font-family: var(--fonte-titulo); font-weight: 700; font-size: .62rem; letter-spacing: .14em;
  padding: .22rem .5rem; border-radius: 999px; border: 2px solid var(--laranja); color: var(--laranja);
}

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: 0 1.4rem; border-radius: 999px; border: 0; cursor: pointer;
  font-family: var(--fonte-titulo); font-weight: 600; font-size: 1.05rem; text-decoration: none;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn-primario { background: var(--laranja); color: var(--branco); box-shadow: 0 6px 18px rgba(232, 120, 32, .35); }
.btn-primario:hover { background: var(--laranja-escuro); }
.btn-claro { background: rgba(255, 255, 255, .12); color: var(--branco); border: 1.5px solid rgba(255, 255, 255, .35); }
.btn-contorno { background: transparent; color: var(--chocolate); border: 1.5px solid var(--areia-escura); }
.btn-contorno:hover { border-color: var(--chocolate); }
.btn-largo { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* Formulários */
.campo { display: grid; gap: .35rem; }
.campo label { font-weight: 600; font-size: .9rem; color: var(--chocolate); }
.dica { font-size: .8rem; color: var(--texto-suave); }
.entrada {
  width: 100%; min-height: 50px; padding: .7rem .95rem; border-radius: 12px;
  border: 1.5px solid var(--areia-escura); background: var(--branco); font-size: 16px; /* 16px evita zoom no iPhone */
  transition: border-color .15s ease, box-shadow .15s ease;
}
.entrada:focus { outline: none; border-color: var(--laranja); box-shadow: 0 0 0 4px rgba(232, 120, 32, .15); }
.entrada[aria-invalid="true"] { border-color: var(--vermelho); }
.marcar { display: flex; gap: .7rem; align-items: flex-start; font-size: .88rem; color: var(--texto-suave); cursor: pointer; }
.marcar input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--laranja); }
.alerta { padding: .75rem .9rem; border-radius: 12px; font-size: .9rem; }
.alerta-erro { background: var(--vermelho-suave); color: var(--vermelho); }
.alerta-ok { background: var(--verde-suave); color: var(--verde); }

/* Janela (dialog nativo) — vira folha de baixo no celular */
dialog.janela {
  border: 0; padding: 0; border-radius: 24px; width: min(440px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px); background: var(--linho); color: var(--texto); box-shadow: var(--sombra-forte);
}
dialog.janela::backdrop { background: rgba(35, 18, 8, .62); backdrop-filter: blur(3px); }
.janela-corpo { padding: 1.6rem 1.4rem 1.4rem; display: grid; gap: 1rem; overflow-y: auto; max-height: calc(100dvh - 24px); }
.janela-topo { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.janela-topo h2 { font-size: 1.6rem; color: var(--chocolate); }
.janela-topo p { color: var(--texto-suave); font-size: .95rem; margin-top: .3rem; }
.fechar {
  flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--areia);
  cursor: pointer; font-size: 1.3rem; line-height: 1; color: var(--chocolate);
}
@media (max-width: 560px) {
  dialog.janela { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: 24px 24px 0 0; }
  .janela-corpo { padding-bottom: calc(1.4rem + env(safe-area-inset-bottom, 0px)); }
}

.carregando { position: relative; color: transparent !important; pointer-events: none; }
.carregando::after {
  content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .5); border-top-color: #fff; animation: gira .7s linear infinite;
}
@keyframes gira { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
