/* App de verdade: a "tela do celular" ocupa a janela inteira (no PC fica centralizada). */
html, body { height: 100%; }
.app {
  max-width: 480px; height: 100dvh; margin: 0 auto;
  background: #FBFDFC; 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 #EEF2F0; }
.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; }

/* ---------- início ---------- */
.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 #EEF2F0; }
.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: #F6FAF8; 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 #EEF2F0; }
.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 #E6E5F0; 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: #F7F7FB; flex: 1; }
