/* Amigo Oculto · Stillo Digital · cores da marca: fundo escuro, dourado e creme; vermelho só nos detalhes de Natal */
:root {
  --bg: #15120E; --card: #231E18; --card2: #2C251D; --line: #3A3128;
  --gold: #D9AE4E; --gold2: #E8C46A; --text: #F3ECDF; --muted: #B5A892; --dim: #A39580;
  --red: #C8372D; --ok: #6FBF73; --raio: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 Manrope, system-ui, sans-serif;
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--gold); }
h1, h2, h3 { font-family: Unbounded, Manrope, sans-serif; font-weight: 800; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; font-weight: 600; }
p { margin: 0 0 .8em; }
small, .fraco { color: var(--muted); }

/* ---------- Topo com a Lara (único lugar onde ela aparece) ---------- */
.topo {
  position: relative; overflow: hidden; min-height: 300px;
  padding: max(16px, env(safe-area-inset-top)) 20px 24px;
  background: radial-gradient(120% 90% at 85% 30%, #3a2a16 0%, var(--bg) 60%);
  border-bottom: 1px solid var(--line);
}
.topo.baixo { min-height: 200px; }
.topo-lara {
  position: absolute; right: 6px; bottom: 6px; height: calc(100% - 26px); max-height: 380px; width: auto; max-width: 50%;
  object-fit: contain; object-position: bottom right;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,.55));
  pointer-events: none;
}
.btn-musica {
  position: absolute; z-index: 3; left: 138px; top: max(18px, env(safe-area-inset-top)); width: 40px; height: 40px;
  border-radius: 50%; border: 1px solid var(--line); background: rgba(35,30,24,.85); font-size: 18px; cursor: pointer;
}
.topo-marca { position: relative; z-index: 2; display: inline-flex; flex-direction: column; align-items: center; }
.topo-marca img { width: 108px; height: auto; display: block; }
.topo-marca small { font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.topo-texto { position: relative; z-index: 2; max-width: 52%; margin-top: 22px; }
.topo.baixo .topo-texto { margin-top: 16px; }
.topo-chapeu { color: var(--gold); font-weight: 800; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 6px; }
.topo h1 { font-size: clamp(1.45rem, 6.4vw, 2.3rem); text-shadow: 0 2px 18px rgba(0,0,0,.6); }
.topo.baixo h1 { font-size: clamp(1.15rem, 5vw, 1.7rem); }
.topo-sub { color: var(--text); opacity: .88; font-size: .95rem; text-shadow: 0 1px 10px rgba(0,0,0,.7); }

/* ---------- Conteúdo ---------- */
.tela { width: 100%; max-width: 620px; margin: 0 auto; padding: 20px 16px 40px; flex: 1; }
.carregando { text-align: center; color: var(--muted); padding: 40px 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--raio); padding: 18px; margin-bottom: 16px; }
.card.dourado { border-color: rgba(217,174,78,.55); background: linear-gradient(160deg, #2e2414, var(--card) 60%); }
.linha { display: flex; gap: 10px; align-items: center; }
.linha > * { flex: 1; }
.entre { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.passos { list-style: none; padding: 0; margin: 0; counter-reset: p; }
.passos li { counter-increment: p; position: relative; padding: 0 0 14px 44px; }
.passos li::before {
  content: counter(p); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%;
  background: var(--gold); color: var(--bg); font: 800 14px/30px Unbounded, sans-serif; text-align: center;
}
.info { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: .95rem; }
.info dt { color: var(--muted); }
.info dd { margin: 0; font-weight: 700; }

/* ---------- Formulários ---------- */
label { display: block; font-weight: 700; font-size: .92rem; margin: 12px 0 6px; }
label small { font-weight: 400; }
input, textarea, select {
  width: 100%; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-height: 48px;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent; }
textarea { min-height: 90px; resize: vertical; }
input[type=date] { color-scheme: dark; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 600; margin: 14px 0 4px; }
.check input { width: 22px; height: 22px; min-height: 0; accent-color: var(--gold); }
.pessoa-linha { display: grid; grid-template-columns: 1fr 1fr 40px; gap: 8px; margin-bottom: 8px; }
.pin { font: 800 28px/1 Unbounded, sans-serif; letter-spacing: .5em; text-align: center; max-width: 220px; margin: 0 auto; display: block; padding-left: .5em; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 800 1rem Manrope, sans-serif; border: 0; border-radius: 999px; cursor: pointer;
  padding: 14px 22px; min-height: 50px; text-decoration: none;
  background: var(--gold); color: #1d1608; width: 100%;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; cursor: default; }
.btn.claro { background: transparent; color: var(--gold); border: 1.5px solid var(--gold); }
.btn.fraco { background: var(--card2); color: var(--text); }
.btn.zap { background: #1FAF55; color: #fff; }
.btn.peq { width: auto; min-height: 40px; padding: 8px 14px; font-size: .88rem; }
.btn.perigo { background: transparent; color: #ef8f86; border: 1.5px solid #6b2c26; }
.x { background: none; border: 0; color: var(--muted); font-size: 22px; width: 40px; height: 44px; cursor: pointer; }
.botoes { display: grid; gap: 10px; margin-top: 16px; }
.botoes.dois { grid-template-columns: 1fr 1fr; }

/* ---------- Lista de pessoas no painel ---------- */
.pessoas { list-style: none; margin: 0; padding: 0; }
.pessoas li { padding: 12px 0; border-top: 1px solid var(--line); }
.pessoas li:first-child { border-top: 0; }
.pessoas .nome { font-weight: 800; }
.pessoas .acoes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { display: inline-block; font-size: .78rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--card2); color: var(--muted); white-space: nowrap; }
.chip.sim { background: rgba(111,191,115,.16); color: #9ad79d; }
.chip.nao { background: rgba(200,55,45,.16); color: #ef8f86; }
.chip.ouro { background: rgba(217,174,78,.16); color: var(--gold2); }
.contagem { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.contagem b { display: block; font: 800 1.6rem Unbounded, sans-serif; }
.contagem div { background: var(--bg); border-radius: 12px; padding: 10px 4px; font-size: .82rem; color: var(--muted); }

/* ---------- Preço, tipos de presente, pedidos ---------- */
.preco { text-align: center; }
.preco .valor { font: 800 2.6rem/1 Unbounded, sans-serif; color: var(--gold2); margin: 6px 0 12px; }
.tipos { display: flex; flex-wrap: wrap; gap: 8px; }
.tipo { margin: 0; font-weight: 600; }
.tipo input { position: absolute; opacity: 0; pointer-events: none; }
.tipo span { display: inline-block; padding: 9px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--bg); cursor: pointer; font-size: .9rem; }
.tipo input:checked + span { background: var(--gold); border-color: var(--gold); color: #1d1608; }
.tipo input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.pedido { margin-top: 6px; font-size: .86rem; color: var(--muted); line-height: 1.45; }
.pares li { font-size: 1rem; }
.pares .seta { color: var(--gold); margin: 0 6px; }
.ouro { color: var(--gold2); }
.contagem.quatro { grid-template-columns: repeat(2, 1fr); }
.contagem.quatro b { font-size: 1.3rem; }

/* ---------- Revelação ---------- */
.presente { position: relative; width: 170px; height: 170px; margin: 10px auto 20px; cursor: pointer; }
.presente .caixa { position: absolute; left: 15px; right: 15px; bottom: 0; height: 110px; background: var(--gold); border-radius: 10px; }
.presente .tampa { position: absolute; left: 5px; right: 5px; top: 40px; height: 34px; background: var(--gold2); border-radius: 10px; transition: transform .7s cubic-bezier(.3,1.6,.5,1); transform-origin: 10% 100%; }
.presente .fita-v { position: absolute; left: 50%; width: 22px; margin-left: -11px; top: 40px; bottom: 0; background: var(--red); border-radius: 4px; }
.presente .laco { position: absolute; left: 50%; top: 6px; width: 70px; height: 40px; margin-left: -35px; transition: transform .7s; }
.presente .laco::before, .presente .laco::after { content: ''; position: absolute; top: 0; width: 32px; height: 32px; border: 7px solid var(--red); border-radius: 50%; }
.presente .laco::before { left: 0; } .presente .laco::after { right: 0; }
.presente.aberto .tampa, .presente.aberto .laco { transform: translate(40px, -70px) rotate(28deg); opacity: .0; transition: transform .7s, opacity .6s .3s; }
.presente:not(.aberto) { animation: balanca 2.4s ease-in-out infinite; }
@keyframes balanca { 0%, 100% { transform: rotate(0); } 8% { transform: rotate(-4deg); } 16% { transform: rotate(4deg); } 24% { transform: rotate(0); } }
.revelado { text-align: center; animation: surge .6s ease-out both; }
.revelado .quem { font: 800 clamp(2rem, 9vw, 3rem)/1.1 Unbounded, sans-serif; color: var(--gold2); margin: 6px 0 14px; }
@keyframes surge { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
.desejos-dele { text-align: left; background: var(--bg); border-radius: 12px; padding: 14px; margin-top: 10px; }
.desejos-dele p { white-space: pre-wrap; }

/* ---------- Avisos, instalação, rodapé ---------- */
.aviso {
  position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translate(-50%, 140%);
  background: var(--text); color: var(--bg); font-weight: 700; padding: 12px 18px; border-radius: 12px;
  max-width: calc(100% - 32px); box-shadow: 0 8px 30px rgba(0,0,0,.5); transition: transform .3s, opacity .3s; z-index: 30;
  opacity: 0; pointer-events: none;
}
.aviso.ver { transform: translate(-50%, 0); opacity: 1; }
.aviso.erro { background: #ef8f86; color: #2a0b08; }
.instalar {
  position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 20;
  display: flex; gap: 12px; align-items: center; background: var(--card2); border: 1px solid var(--gold);
  border-radius: var(--raio); padding: 12px; box-shadow: 0 10px 40px rgba(0,0,0,.6); max-width: 560px; margin: 0 auto;
}
.instalar img { width: 44px; height: 44px; border-radius: 10px; }
.instalar div { flex: 1; font-size: .9rem; line-height: 1.35; }
.instalar b { display: block; }
.guia { list-style: none; padding: 0; margin: 0; }
.guia li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.guia li:first-child { border-top: 0; }
.guia .ic { flex: 0 0 42px; height: 42px; border-radius: 10px; background: var(--bg); display: grid; place-items: center; font-size: 22px; }
.rodape { text-align: center; padding: 26px 16px calc(30px + env(safe-area-inset-bottom)); color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); }
.rodape img { width: 90px; height: auto; opacity: .9; }
.rodape p { margin: 6px 0 0; }
.oculto { display: none !important; }
details summary { cursor: pointer; font-weight: 800; color: var(--gold); padding: 4px 0; }
@media (min-width: 640px) {
  .topo { min-height: 380px; padding-left: max(20px, calc(50% - 300px)); padding-right: max(20px, calc(50% - 300px)); }
  .topo-lara { right: calc(50% - 310px); }
  .btn-musica { left: calc(max(20px, calc(50% - 300px)) + 120px); }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
