/* O atributo hidden sempre esconde, mesmo em elementos com display próprio (barra de abas etc.). */
[hidden] { display: none !important; }

/* App de verdade: a "tela do celular" ocupa a janela inteira (no PC fica centralizada). */
html, body { height: 100%; }
/* o app diz que cuida do modo escuro sozinho: assim o celular (Chrome/Samsung) não escurece as cores à força.
   As cores continuam as do tema claro, escritas à mão em cada parte. */
html { color-scheme: light dark; background: #FFF3E4; }
input, textarea, select, button, video { color-scheme: light; }
input, textarea, select { background-color: #fff; color: #2B2238; }
.app {
  max-width: 480px; height: 100dvh; margin: 0 auto;
  background: #FFFAF4; display: flex; flex-direction: column;
  box-shadow: 0 0 0 2px var(--grid), 0 30px 60px -30px rgba(34, 32, 74, .35);
}
.view { flex: 1; overflow-y: auto; display: flex; flex-direction: column; min-height: 0; }
.pad { padding: 16px 18px 24px; }
.tabbar { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
.tabbar a { text-decoration: none; }
a { color: inherit; }

.topbar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 2px solid #F3E6D6; }
.topbar a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; }
.topbar a svg { width: 24px; height: 24px; }
.topbar b { font-family: var(--f-head); font-size: 1.15rem; }
.topbar .sub { font-size: .8rem; color: var(--ink-soft); }

.empty { text-align: center; padding: 28px 18px; color: var(--ink-soft); line-height: 1.5; }
.empty svg { width: 90px; height: 94px; display: block; margin: 0 auto 10px; }
.empty a { display: inline-block; margin-top: 12px; }

.wc-story { font-size: .86rem; color: var(--ink-soft); margin: 0 0 10px; line-height: 1.45; }
.wc-more { align-self: center; font-size: .82rem; font-weight: 600; color: var(--t4); padding: 8px 4px; }
.wc-actions { flex-wrap: wrap; }
a.cta-talk, a.btn-ink, a.btn-soft { text-decoration: none; text-align: center; display: flex; align-items: center; justify-content: center; }

/* ---------- barra de abas com 5 itens ---------- */
.tabbar { grid-template-columns: repeat(5, 1fr); }

/* ---------- caça ao tesouro ---------- */
.cta-hunt {
  margin-top: 12px; display: flex; align-items: center; gap: 12px; text-decoration: none;
  padding: 14px 18px; border-radius: var(--r-card); background: var(--sun); color: var(--ink);
  box-shadow: 0 5px 0 #C99A1C;
}
.cta-hunt:active { transform: translateY(3px); box-shadow: 0 2px 0 #C99A1C; }
.cta-hunt svg { width: 34px; height: 34px; flex: none; }
.cta-hunt b { font-family: var(--f-head); font-size: 1.15rem; display: block; line-height: 1.1; }
.cta-hunt small { font-size: .82rem; }
.hunt-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.hunt-head h2 { margin: 6px 0; }
.missions { list-style: none; padding: 0; margin: 4px 0 12px; display: grid; gap: 6px; }
.missions li { display: flex; gap: 8px; align-items: center; font-size: .9rem; padding: 8px 12px; border-radius: 14px; background: var(--paper); }
.missions li span { font-weight: 800; color: var(--ink-soft); width: 1.1em; text-align: center; }
.missions li.done { background: #DDF4EA; color: var(--t3); text-decoration: line-through; }
.missions li.done span { color: var(--t3); }
.viewfinder {
  position: relative; aspect-ratio: 1; max-width: 100%; border-radius: 26px; overflow: hidden;
  background: var(--ink); border: 3px solid var(--ink);
}
.viewfinder video, .viewfinder img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vf-msg {
  position: absolute; inset: auto 12px 12px; background: rgba(34, 32, 74, .82); color: #fff;
  padding: 10px 14px; border-radius: 16px; font-weight: 600; font-size: .92rem; text-align: center;
}
.corner { position: absolute; width: 34px; height: 34px; border: 4px solid var(--sun); }
.corner.tl { top: 14px; left: 14px; border-right: 0; border-bottom: 0; border-radius: 12px 0 0 0; }
.corner.tr { top: 14px; right: 14px; border-left: 0; border-bottom: 0; border-radius: 0 12px 0 0; }
.corner.bl { bottom: 14px; left: 14px; border-right: 0; border-top: 0; border-radius: 0 0 0 12px; }
.corner.br { bottom: 14px; right: 14px; border-left: 0; border-top: 0; border-radius: 0 0 12px 0; }
.hunt-tip { text-align: center; color: var(--ink-soft); font-size: .9rem; margin: 10px 0 6px; }
.shutter {
  display: block; margin: 0 auto; width: 78px; height: 78px; border-radius: 50%;
  border: 5px solid var(--ink); background: var(--white); padding: 5px;
}
.shutter span { display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--seal); transition: transform .12s; }
.shutter:active span { transform: scale(.85); }
.shutter:disabled { opacity: .4; }
.found-label { font-family: var(--f-head); font-size: 1.1rem; margin: 16px 0 6px; }
.found { display: grid; grid-template-columns: 92px 1fr; gap: 12px; align-items: center; }
.found img { width: 92px; height: 92px; border-radius: 18px; object-fit: cover; border: 3px solid var(--ink); transform: rotate(-4deg); }
.found .word-card { margin: 0; }
#achado .star-pop { display: block; text-align: center; }
.st-photo { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; margin-bottom: 2px; }
.word-photo { display: block; width: 120px; height: 120px; border-radius: 20px; object-fit: cover; margin: 14px auto 0; border: 3px solid var(--ink); }

/* ---------- vídeo de orgulho ---------- */
.cta-video {
  margin-top: 12px; display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff;
  padding: 13px 16px; border-radius: var(--r-card); background: linear-gradient(120deg, #E23D4B, #5A54D8);
}
.cta-video > span:first-child { font-size: 1.9rem; }
.cta-video b { font-family: var(--f-head); font-size: 1.12rem; display: block; line-height: 1.1; }
.cta-video small { font-size: .8rem; opacity: .9; }
.vid-gate .vid-hero { font-size: 3rem; margin: 0; }
.vid-consent { text-align: left; font-size: .85rem; color: var(--ink); margin: 14px auto 0; max-width: 320px; display: flex; gap: 8px; align-items: flex-start; }
.vid { display: grid; gap: 6px; }
.frases { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.frase-chip { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border-radius: 16px; border: 2px solid var(--grid); background: var(--white); position: relative; }
.frase-chip .zh { font-size: 1.25rem; }
.frase-chip small { font-size: .74rem; color: var(--ink-soft); line-height: 1.25; }
.frase-chip em { position: absolute; top: 6px; right: 8px; font-style: normal; font-size: .62rem; font-weight: 700; color: var(--t2); }
.frase-chip.on { border-color: var(--ink); background: var(--paper); }
.vid-propria { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.vid-propria .btn-ink { padding: 10px 14px; }
.vid-longa { background: #FFF6E0; border-radius: 14px; padding: 10px 12px; font-size: .85rem; margin: 10px 0 0; }
.ganchos { display: grid; gap: 6px; }
.ganchos button { text-align: left; border: 2px solid var(--grid); background: var(--white); border-radius: 14px; padding: 9px 12px; font-size: .88rem; }
.ganchos button.on { border-color: var(--ink); background: var(--paper); font-weight: 600; }
.cam { flex: 1; display: flex; flex-direction: column; background: #111; min-height: 0; }
.cam canvas { flex: 1; min-height: 0; width: 100%; object-fit: contain; display: block; }
.cam-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 12px 16px 16px; background: #111; color: #fff; }
.cam-bar .btn-soft { justify-self: start; padding: 9px 14px; color: var(--ink); }
.cam { user-select: none; -webkit-user-select: none; }
.cam-som { display: flex; justify-content: center; gap: 10px; padding: 10px 16px 0; background: #111; }
.cam-som button { display: flex; align-items: center; gap: 6px; background: #fff; color: var(--ink); border: 0; border-radius: 999px; padding: 9px 18px; font: inherit; font-weight: 700; }
.cam-som button svg { width: 18px; height: 18px; }
.vid-topo { display: flex; justify-content: flex-start; }
.vid-x { background: none; border: 0; color: var(--ink); font: inherit; font-weight: 700; padding: 6px 2px; opacity: .75; }
.cam-dica { font-size: .74rem; opacity: .85; line-height: 1.3; }
.rec-btn { width: 76px; height: 76px; border-radius: 50%; border: 5px solid #fff; background: transparent; padding: 6px; }
.rec-btn span { display: block; width: 100%; height: 100%; border-radius: 50%; background: #E23D4B; transition: all .15s; }
.rec-btn.on span { border-radius: 12px; transform: scale(.6); }
.rec-btn:disabled { opacity: .5; }
.vid-pronto { display: grid; gap: 10px; }
.vid-pronto h2 { text-align: center; margin: 4px 0; }
.vid-legenda { background: var(--paper); border-radius: 16px; padding: 12px 14px; font-size: .88rem; display: grid; gap: 6px; }
.vid-legenda p { margin: 0; }
.vid-legenda .btn-soft { justify-self: start; padding: 8px 14px; }
.presente { background: #FFF1D6; color: #8A5200; border-radius: 14px; padding: 10px 12px; text-align: center; font-weight: 600; margin: 0 0 6px; }
.indique { display: grid; gap: 8px; padding: 14px; border-radius: 16px; background: linear-gradient(120deg, #FFF1D6, #FDE7EA); }
.indique p { margin: 0; font-size: .86rem; line-height: 1.4; }
.ind-cod { display: grid; justify-items: center; gap: 2px; background: var(--white); border-radius: 14px; padding: 10px; }
.ind-cod span { font-family: var(--f-head); font-size: 1.8rem; letter-spacing: 4px; color: var(--seal); }
.ind-cod small { font-size: .74rem; color: var(--ink-soft); word-break: break-all; }

/* ---------- conta e créditos ---------- */
.login { display: grid; gap: 10px; }
.login .mo-big { width: 90px; height: 94px; }
.lg-tabs { grid-template-columns: 1fr 1fr; }
a.lg-codigo { display: block; text-align: center; }
.lg-codigo { background: none; border: 0; color: var(--ink-soft); font-size: .85rem; text-decoration: underline; padding: 8px; }
.mins-left { text-align: center; margin: 10px 0 0; font-size: .9rem; font-weight: 600; color: var(--t3); }
.mins-left.low { color: var(--seal); }
.plano-box { display: grid; gap: 12px; background: var(--white); border-radius: 16px; padding: 14px; border: 1.5px solid #F1E2CF; }
.plano-box .cat { margin: 4px 0 0; }
.saldo { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.saldo b { font-family: var(--f-head); font-size: 2rem; display: block; line-height: 1; }
.saldo span { font-size: .78rem; color: var(--ink-soft); }
.pill { font-style: normal; font-size: .74rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: #FBEBD9; white-space: nowrap; }
.pill.ativo { background: #DDF4EA; color: var(--t3); }
.pill.atrasado, .pill.cancelado { background: #FBE0E3; color: var(--seal); }
.aberta { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: #FFF6E0; font-size: .85rem; }
.aberta a { text-decoration: none; padding: 8px 12px; font-size: .82rem; }
.planos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.plano-op { display: grid; gap: 2px; text-align: left; padding: 12px; border-radius: 16px; border: 2px solid #F1E2CF; background: var(--white); }
.plano-op.rec { border-color: var(--ink); }
.plano-op b { font-size: .85rem; }
.plano-op strong { font-family: var(--f-head); font-size: 1.15rem; white-space: nowrap; }
.plano-op small { font-family: var(--f-body); font-size: .72rem; font-weight: 500; color: var(--ink-soft); }
.plano-op span { font-size: .74rem; color: var(--ink-soft); line-height: 1.3; }
.pacotes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pacote { display: grid; justify-items: center; gap: 0; padding: 10px 4px; border-radius: 14px; border: 2px solid #F1E2CF; background: var(--white); }
.pacote b { font-family: var(--f-head); font-size: 1.3rem; }
.pacote span { font-size: .7rem; color: var(--ink-soft); }
.pacote em { font-style: normal; font-weight: 600; font-size: .85rem; margin-top: 2px; }
.cpf { display: grid; gap: 8px; padding: 12px; border-radius: 16px; background: #FFF1E2; }
.cpf p { margin: 0; font-size: .88rem; }
.movs li span { display: grid; }
.movs li small { color: var(--ink-soft); font-size: .72rem; }
.movs .pos { color: var(--t3); } .movs .neg { color: var(--seal); }
.link-cancelar { background: none; border: 0; color: var(--ink-soft); font-size: .8rem; text-decoration: underline; justify-self: center; padding: 6px; }

/* ---------- desafio (prova gravada) ---------- */
.cta-exam {
  margin-top: 12px; display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink);
  padding: 12px 16px; border-radius: var(--r-card); border: 2.5px solid var(--seal); background: var(--white);
}
.cta-exam .zh { width: 44px; height: 44px; display: grid; place-items: center; background: var(--seal); color: #fff; border-radius: 10px; font-size: 1.5rem; transform: rotate(-6deg); flex: none; }
.cta-exam b { font-family: var(--f-head); font-size: 1.1rem; display: block; line-height: 1.1; }
.cta-exam small { font-size: .8rem; color: var(--ink-soft); }
.cta-exam.slim { margin: 0 0 12px; }
.dsf { display: grid; gap: 10px; }
.dsf-seal { justify-self: center; width: 120px; height: 120px; display: grid; place-items: center; background: var(--seal); color: #fff; font-size: 4.2rem; border-radius: 22px; transform: rotate(-8deg); margin: 10px 0 18px; box-shadow: 6px 6px 0 var(--grid); }
.muted-c { text-align: center; color: var(--ink-soft); font-size: .84rem; margin: 6px 0; }
.dsf-top { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: .9rem; color: var(--ink-soft); }
.dots { display: flex; gap: 6px; }
.dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--grid); }
.dots i.cur { background: var(--ink); }
.dots i.ok { background: var(--t3); }
.dots i.no { background: var(--seal); }
.dsf-q { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 18px 10px; }
.dsf-q img { width: 150px; height: 150px; object-fit: cover; border-radius: 24px; border: 3px solid var(--ink); transform: rotate(-3deg); }
.dsf-q p { font-family: var(--f-head); font-size: 1.5rem; margin: 0; line-height: 1.25; }
.dsf-fb { min-height: 64px; text-align: center; }
.dsf-ok { font-weight: 700; color: var(--t3); font-size: 1.1rem; margin: 0; }
.dsf-ok .zh { font-size: 1.4rem; color: var(--ink); }
.dsf-no { font-weight: 700; color: var(--seal); margin: 0; }
.dsf .row-2 { margin-top: 4px; }
.cert { text-align: center; border: 3px solid var(--ink); border-radius: 26px; padding: 22px 16px; background: var(--white); box-shadow: 6px 6px 0 var(--grid); display: grid; gap: 8px; margin: 8px 0 14px; }
.cert-seal { justify-self: center; width: 130px; height: 130px; display: grid; place-items: center; background: var(--seal); color: #fff; font-size: 2.9rem; border-radius: 20px; transform: rotate(-8deg); }
.cert.fail .cert-seal { background: var(--t2); }
.cert h2 { margin: 6px 0 0; }
.cert p { margin: 0; color: var(--ink-soft); }
.cert-words { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 6px; text-align: left; }
.cert-words li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 14px; background: var(--paper); font-family: var(--f-py); }
.cert-words li .zh { font-size: 1.3rem; }
.cert-words li.no { opacity: .6; }
.cert-words em { font-style: normal; }
.cert-video { width: 100%; max-height: 70vh; border-radius: 20px; background: var(--ink); margin: 12px 0 10px; }
#vid .row-2 a { display: flex; align-items: center; justify-content: center; text-decoration: none; }

/* ---------- boas-vindas ---------- */
.welcome { display: grid; gap: 8px; }
.welcome h3 { margin-top: 8px; }
.welcome .mo-big { width: 96px; height: 100px; }
.langs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.langs button { border: 2px solid var(--grid); background: var(--white); border-radius: 16px; padding: 12px 6px; font-weight: 600; }
.langs button.on { background: var(--ink); color: var(--white); border-color: var(--ink); }
select.search { appearance: auto; }

/* ---------- início ---------- */
.install { margin-top: 16px; padding: 14px 16px; border-radius: var(--r-card); border: 2.5px dashed var(--ink); display: grid; gap: 6px; }
.install p { margin: 0; font-size: .88rem; color: var(--ink-soft); line-height: 1.45; }
.install .row-2 { margin-top: 6px; }
.home .parents-link { font-size: .78rem; color: var(--ink-soft); display: inline-flex; gap: 4px; align-items: center; margin-top: 18px; }
.home .parents-link svg { width: 14px; height: 14px; }
.challenge a { text-decoration: none; }

/* ---------- conversa ---------- */
.talk { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.talk-stage { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 2px solid #F3E6D6; }
.talk-stage svg.mo-talk { width: 64px; height: 66px; flex: none; transition: transform .2s; }
.talk-stage.falando svg.mo-talk { animation: talkbob .35s ease-in-out infinite alternate; }
.talk-stage.falando .mo-mouth { transform: scaleY(1.6); transform-origin: 61px 92px; }
@keyframes talkbob { to { transform: translateY(-4px) scale(1.04); } }
.talk-stage b { font-family: var(--f-head); font-size: 1.2rem; display: block; }
.talk-stage .state { font-size: .82rem; color: var(--t3); font-weight: 500; }
.talk-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 14px 14px 18px; background: #FFF8F0; min-height: 0; }
.talk-log .sys { font-size: .78rem; color: var(--ink-soft); align-self: center; text-align: center; margin: 2px 10px; }
.talk-log .sys.err { color: var(--seal); font-weight: 600; }
.talk-log .word-card { animation: card-in .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.talk-log .star-pop { align-self: center; font-family: var(--f-head); font-weight: 800; color: #9A5B00; background: #FFF1D6; padding: 6px 14px; border-radius: 999px; animation: card-in .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.talk-dock { display: grid; justify-items: center; gap: 6px; padding: 12px 18px 14px; background: var(--white); border-top: 2px solid #F3E6D6; }
.talk-dock .mic-btn { margin: 0; }
.talk-dock .mic-btn.live { background: var(--ink); }
.talk-dock .mic-btn:not(.live) .ring { display: none; }
.talk-dock .mic-btn.live .ring { border-color: var(--ink); }
.talk-dock .mic-btn:disabled { opacity: .5; }

/* ---------- álbum ---------- */
.stickers .sticker { text-decoration: none; color: inherit; }

/* ---------- palavra ---------- */
.char-tabs { flex-wrap: wrap; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.btn-row .wide { grid-column: 1 / -1; }

/* ---------- tom ---------- */
.verdict .ok { color: var(--t3); }
.verdict .no { color: var(--seal); }
.mic-wide .bar-rec { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--sun); }
.mic-wide { position: relative; overflow: hidden; }
.tone-chart .ref { opacity: .4; }
.ref.t1s { stroke: var(--t1); } .ref.t2s { stroke: var(--t2); } .ref.t4s { stroke: var(--t4); }

/* ---------- tradutor ---------- */
.trans-in textarea {
  width: 100%; border: 0; background: transparent; resize: none; font: inherit; font-size: 1.15rem; font-weight: 500;
  color: var(--ink); padding: 4px 50px 0 0; min-height: 56px;
}
.trans-in textarea:focus { outline: none; }
.trans-go { margin-top: 10px; width: 100%; }
.mic-small.rec { background: var(--ink); animation: pulse 1s ease-in-out infinite; }

/* ---------- pais ---------- */
.gate-box { text-align: center; padding: 40px 24px; }
.gate-box p { color: var(--ink-soft); }
.gate-box input { font: inherit; font-size: 1.4rem; width: 120px; text-align: center; padding: 10px; border-radius: 14px; border: 2px solid var(--grid); }
.gate-box button { margin-top: 14px; }
.settings select { font: inherit; font-size: .82rem; border-radius: 10px; border: 1.5px solid #F1E2CF; padding: 4px 6px; background: var(--white); }
.danger { margin-top: 16px; background: none; border: 2px solid #F3C3C7; color: var(--seal); border-radius: 14px; padding: 10px 14px; font-weight: 600; width: 100%; }
.pais { background: #FFF8F0; flex: 1; }
