/* ===== Maná — design system ===== */
:root {
  --fs: 1;
  --bg: #f6f2e9; --bg2: #eee6d6; --card: #ffffff; --card2: #fbf8f2;
  --ink: #1c1838; --ink2: #5d5878; --ink3: #8d88a6; --line: #e7dfcf;
  --pri: #5b45e0; --pri-ink: #ffffff; --pri-soft: #ece8ff;
  --gold: #e29a2d; --gold2: #ffd36b; --gold-soft: #fff3d6;
  --ok: #15803d; --ok-soft: #dcfce7; --danger: #c2410c;
  --hero: linear-gradient(160deg, #24175f 0%, #3b22a3 55%, #6d33d6 100%);
  --glow: radial-gradient(60% 80% at 70% 0%, rgba(255, 211, 107, .35), transparent 70%);
  --shadow: 0 1px 2px rgba(28, 24, 56, .05), 0 10px 30px -10px rgba(28, 24, 56, .18);
  --shadow-lg: 0 24px 60px -20px rgba(36, 23, 95, .45);
  --r: 22px; --r-sm: 14px; --tab-h: 70px;
  --read: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, 'Noto Serif', serif;
  --ui: ui-rounded, 'SF Pro Rounded', 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0a1f; --bg2: #131031; --card: #19163a; --card2: #1e1a44;
    --ink: #f4f1ff; --ink2: #b3add6; --ink3: #7f79a8; --line: #2b2656;
    --pri: #9a88ff; --pri-ink: #120e2e; --pri-soft: #2a2462; --gold-soft: #3a2d12; --ok-soft: #12351f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -12px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c0a1f; --bg2: #131031; --card: #19163a; --card2: #1e1a44;
  --ink: #f4f1ff; --ink2: #b3add6; --ink3: #7f79a8; --line: #2b2656;
  --pri: #9a88ff; --pri-ink: #120e2e; --pri-soft: #2a2462; --gold-soft: #3a2d12; --ok-soft: #12351f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -12px rgba(0, 0, 0, .6);
  color-scheme: dark;
}
:root.hc { --ink2: var(--ink); --ink3: var(--ink); --line: var(--ink); }
:root.hc .card, :root.hc .tile { border: 2px solid var(--ink); }

[hidden] { display: none !important; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: calc(16px * var(--fs)); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--ui);
  line-height: 1.5; min-height: 100dvh; overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--pri); }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ic { width: 1.4em; height: 1.4em; flex: none; }
.muted { color: var(--ink2); }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: .75rem; }
.row.wrap { flex-wrap: wrap; }
.spread { justify-content: space-between; }
.stack > * + * { margin-top: 1rem; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.01em; }
h1 { font-size: 1.75rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.1rem; }
p { margin: 0 0 .75rem; }

/* ===== Layout ===== */
#app { max-width: 720px; margin: 0 auto; min-height: 100dvh; position: relative; }
#view { padding-bottom: calc(var(--tab-h) + 24px + env(safe-area-inset-bottom)); }
.screen { padding: 1rem 1rem 0; animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
:root.rm *, :root.rm *::before { animation: none !important; transition: none !important; }

.topbar { display: flex; align-items: center; gap: .5rem; padding: .75rem 1rem; position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  padding-top: calc(.75rem + env(safe-area-inset-top)); }
.topbar h1 { font-size: 1.2rem; margin: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== Hero ===== */
.hero { position: relative; overflow: hidden; color: #fff; background: var(--hero); border-radius: 0 0 32px 32px;
  padding: calc(1.25rem + env(safe-area-inset-top)) 1.25rem 1.75rem; margin: 0 0 1rem; box-shadow: var(--shadow-lg); }
.hero::before { content: ""; position: absolute; inset: 0; background: var(--glow); pointer-events: none; }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image: radial-gradient(1.5px 1.5px at 12% 22%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 32% 68%, #fff 50%, transparent 51%),
  radial-gradient(1.5px 1.5px at 78% 30%, #ffe7a3 50%, transparent 51%), radial-gradient(1px 1px at 88% 72%, #fff 50%, transparent 51%),
  radial-gradient(1px 1px at 55% 15%, #fff 50%, transparent 51%), radial-gradient(1.2px 1.2px at 62% 82%, #ffe7a3 50%, transparent 51%); }
.hero > * { position: relative; z-index: 1; }
.hero .date { opacity: .8; font-size: .9rem; text-transform: capitalize; }
.hero h1 { font-size: 1.85rem; margin: .15rem 0 .25rem; }
.hero .brand { display: flex; align-items: center; gap: .5rem; font-weight: 800; letter-spacing: .02em; }
.hero .brand img { width: 30px; height: 30px; border-radius: 9px; }

/* ===== Cards ===== */
.card { background: var(--card); border-radius: var(--r); padding: 1.1rem; box-shadow: var(--shadow); position: relative; }
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.card + .card { margin-top: 1rem; }
.card h3 { display: flex; align-items: center; gap: .5rem; }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); margin-bottom: .35rem; display: flex; gap: .4rem; align-items: center; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 1.5rem 0 .75rem; }
.section-title h2 { margin: 0; font-size: 1.15rem; }

.today-card { background: linear-gradient(140deg, var(--card) 0%, var(--card2) 100%); border: 1px solid var(--line); overflow: hidden; }
.today-card .badge-emoji { position: absolute; right: -10px; top: -14px; font-size: 6rem; opacity: .14; transform: rotate(-12deg); pointer-events: none; }
.char-avatar { width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center; font-size: 2.1rem; flex: none;
  background: var(--c, var(--pri)); box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .12), 0 8px 18px -8px var(--c, var(--pri)); }
.char-avatar.sm { width: 44px; height: 44px; border-radius: 15px; font-size: 1.4rem; }
.char-avatar.xl { width: 104px; height: 104px; border-radius: 34px; font-size: 3.6rem; }

.verse { font-family: var(--read); font-size: 1.22rem; line-height: 1.55; margin: .25rem 0 .5rem; }
.verse-ref { font-weight: 700; color: var(--gold); font-size: .95rem; }
.quote-card { background: var(--gold-soft); border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent); }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 52px; padding: .7rem 1.25rem;
  border-radius: 16px; border: 0; font-weight: 700; font-size: 1rem; background: var(--pri); color: var(--pri-ink);
  box-shadow: 0 8px 20px -10px var(--pri); transition: transform .12s ease, filter .2s; text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.block { width: 100%; }
.btn.gold { background: linear-gradient(180deg, var(--gold2), var(--gold)); color: #2b1a00; box-shadow: 0 8px 20px -10px var(--gold); }
.btn.ghost { background: var(--pri-soft); color: var(--pri); box-shadow: none; }
.btn.line { background: transparent; color: var(--ink); border: 1.5px solid var(--line); box-shadow: none; }
.btn.white { background: #fff; color: #2a1b6e; }
.btn.sm { min-height: 40px; padding: .4rem .9rem; font-size: .9rem; border-radius: 12px; }
.icon-btn { width: 48px; height: 48px; display: inline-grid; place-items: center; border-radius: 14px; border: 0; background: transparent; color: inherit; flex: none; }
.icon-btn:hover { background: color-mix(in srgb, currentColor 8%, transparent); }
.icon-btn.solid { background: var(--card); box-shadow: var(--shadow); }
.icon-btn.glass { background: rgba(255, 255, 255, .16); color: #fff; }
.link { background: none; border: 0; color: var(--pri); font-weight: 700; padding: .5rem; text-decoration: underline; text-underline-offset: 3px; }
/* Botão OUVIR: grande, com texto, cor forte — fácil para idosos, crianças e quem não lê */
.say { display: inline-flex; align-items: center; gap: .45rem; min-height: 52px; padding: .45rem 1rem .45rem .5rem; border-radius: 999px; border: 0; flex: none;
  background: linear-gradient(180deg, #ffcf4d, #f5a524); color: #2b1a00; font-weight: 900; font-size: 1rem; letter-spacing: .01em;
  box-shadow: 0 4px 0 #c27c0e, 0 8px 18px -8px rgba(197, 124, 14, .8); transition: transform .1s; }
.say .say-ic { width: 38px; height: 38px; border-radius: 50%; background: #fff; color: #d97706; display: grid; place-items: center; flex: none; }
.say .say-ic .ic { width: 24px; height: 24px; }
.say:active { transform: translateY(4px); box-shadow: 0 0 0 #c27c0e; }
.say.big { min-height: 60px; font-size: 1.08rem; padding-right: 1.2rem; }
.say.big .say-ic { width: 46px; height: 46px; }
.say.big .say-ic .ic { width: 28px; height: 28px; }
.say.icon-only { padding: .45rem; }
.say.light { background: #fff; color: #3b2a8a; box-shadow: 0 4px 0 rgba(0, 0, 0, .18); }
.say.light .say-ic { background: #ffcf4d; color: #2b1a00; }
.say.on { animation: pulse 1.2s infinite; }
.say.on .say-ic { background: #2b1a00; color: #ffcf4d; }
#read-screen { position: fixed; right: max(14px, calc(50% - 350px)); bottom: calc(var(--tab-h) + 26px + env(safe-area-inset-bottom)); z-index: 41;
  width: 76px; height: 76px; border-radius: 50%; border: 4px solid #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  background: linear-gradient(180deg, #ffcf4d, #f5a524); color: #2b1a00; font-weight: 900; font-size: .62rem; line-height: 1.05; text-align: center;
  box-shadow: 0 5px 0 #c27c0e, 0 14px 30px -10px rgba(0, 0, 0, .5); }
#read-screen .ic { width: 30px; height: 30px; }
#read-screen.on { animation: pulse 1.2s infinite; background: #2b1a00; color: #ffcf4d; }
#read-screen:active { transform: translateY(4px); box-shadow: 0 1px 0 #c27c0e; }
body.no-tabs #read-screen { bottom: calc(18px + env(safe-area-inset-bottom)); }
body.in-lesson #read-screen, body.no-tabs.in-lesson #read-screen { display: none; }
#player.show ~ #read-screen, #read-screen.on { bottom: calc(var(--tab-h) + 96px + env(safe-area-inset-bottom)); }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--gold) 20%, transparent); } }

/* ===== Big action tiles (fáceis para crianças e idosos) ===== */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .75rem; }
.tiles.four { grid-template-columns: repeat(4, 1fr); }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; text-align: center; min-height: 104px;
  padding: .9rem .5rem; border-radius: var(--r); background: var(--card); border: 0; box-shadow: var(--shadow); color: var(--ink); text-decoration: none; font-weight: 700; }
.tile .ic { width: 2rem; height: 2rem; color: var(--tc, var(--pri)); }
.tile .emo { font-size: 2rem; line-height: 1; }
.tile small { font-weight: 500; color: var(--ink2); }
.tiles.four .tile { min-height: 88px; font-size: .85rem; padding: .6rem .25rem; }
.tile:active { transform: scale(.97); }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { display: inline-flex; align-items: center; gap: .4rem; min-height: 48px; padding: .5rem 1rem; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--card); font-weight: 600; }
.chip[aria-pressed="true"] { background: var(--pri); color: var(--pri-ink); border-color: var(--pri); }
.chip .emo { font-size: 1.2rem; }
.pill { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .65rem; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--pri-soft); color: var(--pri); }
.pill.gold { background: var(--gold-soft); color: var(--gold); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }

/* ===== Tab bar ===== */
#tabbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 40;
  width: min(720px - 20px, calc(100% - 20px)); height: var(--tab-h); display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-radius: 24px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); padding: 6px; }
#tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--ink3);
  font-size: .72rem; font-weight: 700; border-radius: 18px; transition: background .2s, color .2s; }
#tabbar a .ic { width: 1.6rem; height: 1.6rem; }
#tabbar a[aria-current="page"] { color: var(--pri); background: var(--pri-soft); }
body.no-tabs #tabbar { display: none; }
body.no-tabs #view { padding-bottom: 2rem; }

/* ===== Mini player ===== */
#player { position: fixed; left: 50%; transform: translate(-50%, 140%); bottom: calc(var(--tab-h) + 20px + env(safe-area-inset-bottom)); z-index: 39;
  width: min(700px, calc(100% - 20px)); display: flex; align-items: center; gap: .75rem; padding: .6rem .6rem .6rem 1rem; border-radius: 20px;
  background: var(--hero); color: #fff; box-shadow: var(--shadow-lg); transition: transform .3s cubic-bezier(.2, .9, .3, 1.2); }
#player.show { transform: translate(-50%, 0); }
#player .t { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#player .eq { display: flex; gap: 3px; align-items: end; height: 18px; }
#player .eq i { width: 4px; background: var(--gold2); border-radius: 2px; animation: eq 1s infinite ease-in-out; }
#player .eq i:nth-child(2) { animation-delay: .2s; } #player .eq i:nth-child(3) { animation-delay: .4s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 18px; } }
body.no-tabs #player { bottom: calc(16px + env(safe-area-inset-bottom)); }

/* ===== Trilha (mapa) ===== */
.trail { position: relative; padding: .5rem 0 2rem; }
.trail-node { display: flex; align-items: center; gap: 1rem; margin: 0 0 1.25rem; position: relative; text-decoration: none; color: inherit; }
.trail-node:nth-child(4n+2) { margin-left: 18%; } .trail-node:nth-child(4n+3) { margin-left: 30%; } .trail-node:nth-child(4n) { margin-left: 14%; }
.trail-node .orb { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; font-size: 2.2rem; flex: none; position: relative;
  background: var(--c); box-shadow: inset 0 -7px 0 rgba(0, 0, 0, .15), 0 10px 22px -10px var(--c); border: 4px solid var(--card); }
.trail-node.locked .orb { filter: grayscale(1); opacity: .45; }
.trail-node.locked .orb::after { content: "🔒"; position: absolute; right: -6px; bottom: -6px; font-size: 1.1rem; background: var(--card); border-radius: 50%; padding: 3px; }
.trail-node.done .orb::after { content: "✓"; position: absolute; right: -6px; bottom: -6px; width: 28px; height: 28px; border-radius: 50%; background: var(--ok); color: #fff;
  font-size: 1rem; font-weight: 900; display: grid; place-items: center; border: 3px solid var(--card); }
.trail-node.current .orb { animation: bob 2.2s ease-in-out infinite; outline: 4px solid var(--gold2); outline-offset: 4px; }
@keyframes bob { 50% { transform: translateY(-6px); } }
.trail-node .lbl small { color: var(--ink3); font-weight: 700; display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.trail-node .lbl strong { display: block; line-height: 1.2; }
.trail-progress { height: 12px; border-radius: 999px; background: var(--bg2); overflow: hidden; }
.trail-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold2), var(--gold)); border-radius: inherit; transition: width .6s; }

.story { font-family: var(--read); font-size: 1.18rem; line-height: 1.7; }
.lesson { display: flex; gap: .75rem; align-items: flex-start; background: var(--ok-soft); color: var(--ink); border-radius: var(--r-sm); padding: 1rem; font-weight: 700; }
.quiz-opts { display: grid; gap: .6rem; }
.quiz-opt { display: flex; align-items: center; gap: .9rem; min-height: 64px; padding: .6rem 1rem; border-radius: 18px; background: var(--card); border: 2px solid var(--line); font-weight: 700; text-align: left; }
.quiz-opt .emo { font-size: 2rem; }
.quiz-opt.right { border-color: var(--ok); background: var(--ok-soft); }
.quiz-opt.wrong { border-color: var(--danger); opacity: .6; }

.celebrate { text-align: center; padding: 2rem 1rem; }
.celebrate .big { font-size: 5rem; animation: pop .6s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes pop { from { transform: scale(.2); opacity: 0; } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 14px; border-radius: 3px; animation: fall 2.4s ease-in forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* ===== Árvore da vida (gamificação sem punição) ===== */
.tree-box { display: flex; align-items: center; gap: 1rem; }
.tree-box svg { width: 96px; height: 96px; flex: none; }

/* ===== Bíblia ===== */
.books { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .5rem; }
.book-btn { min-height: 64px; border-radius: 16px; border: 0; background: var(--card); box-shadow: var(--shadow); display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: .4rem; font-weight: 700; font-size: .9rem; border-top: 4px solid var(--c); text-align: center; line-height: 1.15; }
.book-btn small { color: var(--ink3); font-weight: 600; font-size: .72rem; }
.chapters { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: .5rem; }
.chapters button { min-height: 58px; border-radius: 14px; border: 0; background: var(--card); box-shadow: var(--shadow); font-weight: 800; font-size: 1.05rem; }
.chapters button.read { background: var(--pri-soft); color: var(--pri); }
.seg { display: inline-flex; background: var(--bg2); border-radius: 14px; padding: 4px; gap: 4px; }
.seg button { border: 0; background: transparent; border-radius: 10px; padding: .55rem 1rem; font-weight: 700; color: var(--ink2); min-height: 44px; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }

.reader { font-family: var(--read); font-size: calc(1.2rem * var(--rs, 1)); line-height: 1.75; padding: .5rem 1.25rem 2rem; }
.reader h2 { font-family: var(--ui); text-align: center; font-size: 1.6rem; margin: .5rem 0 1.25rem; }
.reader .v { border-radius: 8px; padding: 2px 3px; transition: background .25s; cursor: pointer; }
.reader .v sup { font-family: var(--ui); font-size: .62em; font-weight: 800; color: var(--gold); margin-right: .2em; }
.reader .v.hl-y { background: #fff1a8; } .reader .v.hl-g { background: #c9f7d4; } .reader .v.hl-b { background: #cfe3ff; } .reader .v.hl-p { background: #f3d4ff; }
:root[data-theme="dark"] .reader .v[class*="hl-"], :root:not([data-theme="light"]) .reader .v[class*="hl-"] { color: inherit; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .reader .v.hl-y { background: #4d4317; } :root:not([data-theme="light"]) .reader .v.hl-g { background: #173f26; } :root:not([data-theme="light"]) .reader .v.hl-b { background: #19305a; } :root:not([data-theme="light"]) .reader .v.hl-p { background: #3d1f4f; } }
:root[data-theme="dark"] .reader .v.hl-y { background: #4d4317; } :root[data-theme="dark"] .reader .v.hl-g { background: #173f26; } :root[data-theme="dark"] .reader .v.hl-b { background: #19305a; } :root[data-theme="dark"] .reader .v.hl-p { background: #3d1f4f; }
.reader .v.speaking { background: color-mix(in srgb, var(--gold) 28%, transparent); }
.reader .v.sel { outline: 2px dashed var(--pri); }
.reader-nav { display: flex; gap: .75rem; justify-content: space-between; padding: 0 1rem 1rem; }
.colors { display: flex; gap: .75rem; }
.colors button { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--card); box-shadow: var(--shadow); }

/* ===== Listas ===== */
.list { display: grid; gap: .6rem; }
.item { display: flex; align-items: center; gap: .9rem; padding: .85rem; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); border: 0; width: 100%; text-align: left; color: inherit; text-decoration: none; min-height: 64px; }
.item .emo { font-size: 1.8rem; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--bg2); flex: none; }
.item .grow { flex: 1; min-width: 0; }
.item .grow strong { display: block; }
.item .grow span { color: var(--ink2); font-size: .9rem; }

/* ===== Formulários ===== */
label.field { display: block; font-weight: 700; margin-bottom: .9rem; }
label.field span { display: block; margin-bottom: .35rem; }
.input, select.input, textarea.input { width: 100%; min-height: 52px; padding: .75rem 1rem; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); font-size: 1rem; }
textarea.input { min-height: 110px; resize: vertical; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.switch:last-child { border-bottom: 0; }
.switch input { appearance: none; width: 54px; height: 32px; border-radius: 999px; background: var(--line); position: relative; flex: none; transition: background .2s; }
.switch input::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 2px 4px rgba(0, 0, 0, .2); }
.switch input:checked { background: var(--ok); }
.switch input:checked::after { transform: translateX(22px); }
.switch small { display: block; color: var(--ink2); font-weight: 500; }

/* ===== Onboarding ===== */
.ob { min-height: 100dvh; display: flex; flex-direction: column; padding: calc(1rem + env(safe-area-inset-top)) 1.25rem calc(1.25rem + env(safe-area-inset-bottom)); }
.ob .dots { display: flex; gap: 6px; justify-content: center; margin: .5rem 0 1.25rem; }
.ob .dots i { width: 8px; height: 8px; border-radius: 99px; background: var(--line); transition: all .3s; }
.ob .dots i.on { width: 26px; background: var(--pri); }
.ob .body { flex: 1; }
.ob .q { display: flex; gap: .75rem; align-items: center; margin-bottom: 1.25rem; }
.ob .q h2 { margin: 0; font-size: 1.5rem; flex: 1; }
.ob-hero { text-align: center; padding: 2rem 0 1rem; }
.ob-hero img { width: 112px; height: 112px; border-radius: 30px; box-shadow: var(--shadow-lg); animation: bob 3s ease-in-out infinite; }
.ob-hero h1 { font-size: 2.3rem; margin: 1rem 0 .25rem; }
.big-choices { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.big-choice { min-height: 130px; border-radius: 24px; border: 2.5px solid var(--line); background: var(--card); display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: .4rem; font-weight: 800; font-size: 1.05rem; padding: .75rem; text-align: center; }
.big-choice .emo { font-size: 2.8rem; line-height: 1; }
.big-choice small { font-weight: 500; color: var(--ink2); font-size: .82rem; }
.big-choice[aria-pressed="true"] { border-color: var(--pri); background: var(--pri-soft); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pri) 18%, transparent); }
.ob .actions { display: flex; gap: .75rem; margin-top: 1.25rem; }
.ob .actions .btn { flex: 1; }
.consent-box { font-size: .92rem; background: var(--card2); border-radius: var(--r-sm); padding: .25rem 1rem; border: 1px solid var(--line); }

/* ===== Sheet / toast / overlays ===== */
.sheet-wrap { position: fixed; inset: 0; z-index: 80; background: rgba(12, 10, 31, 0); transition: background .22s; display: flex; align-items: flex-end; justify-content: center; }
.sheet-wrap.open { background: rgba(12, 10, 31, .5); }
.sheet { width: min(720px, 100%); max-height: 88dvh; overflow: auto; background: var(--bg); border-radius: 28px 28px 0 0; transform: translateY(100%); transition: transform .26s cubic-bezier(.2, .9, .3, 1);
  padding-bottom: env(safe-area-inset-bottom); }
.sheet-wrap.open .sheet { transform: none; }
.sheet-head { display: flex; align-items: center; gap: .5rem; padding: 1rem 1rem .25rem 1.25rem; position: sticky; top: 0; background: var(--bg); z-index: 1; }
.sheet-head h3 { flex: 1; margin: 0; }
.sheet-grip { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 40px; height: 5px; border-radius: 9px; background: var(--line); }
.sheet-body { padding: .5rem 1.25rem 1.5rem; }
#toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + 30px); transform: translate(-50%, 20px); opacity: 0; z-index: 90; background: var(--ink); color: var(--bg);
  padding: .8rem 1.2rem; border-radius: 14px; font-weight: 700; transition: all .25s; pointer-events: none; max-width: 90vw; text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.offline-bar { background: var(--gold-soft); color: var(--ink); font-size: .85rem; font-weight: 700; display: flex; gap: .5rem; align-items: center; justify-content: center; padding: .4rem; }

/* ===== Anúncios ===== */
.ad-wrap { margin: 1.25rem 0; }
.ad-label { display: block; font-size: .7rem; color: var(--ink3); text-transform: uppercase; letter-spacing: .08em; margin-bottom: .25rem; }
.ad-house { display: flex; align-items: center; gap: .8rem; padding: .8rem; border-radius: 18px; background: var(--card2); border: 1px dashed var(--line); text-decoration: none; color: var(--ink); }
.ad-house img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; }
.ad-house div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ad-house small { color: var(--ink3); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.ad-house span { color: var(--ink2); font-size: .88rem; }
.interstitial { position: fixed; inset: 0; z-index: 95; background: rgba(12, 10, 31, .78); display: grid; place-items: center; padding: 1rem; }
.interstitial .card { width: min(440px, 100%); text-align: center; }
.interstitial .btn { margin-top: 1rem; width: 100%; }
.ad-placeholder { padding: 2rem; color: var(--gold); }
.ad-placeholder .ic { width: 3rem; height: 3rem; }

/* ===== Chat IA ===== */
.chat { display: flex; flex-direction: column; gap: .75rem; padding-bottom: 1rem; }
.bubble { max-width: 88%; padding: .85rem 1rem; border-radius: 20px; line-height: 1.55; white-space: pre-wrap; }
.bubble.me { align-self: flex-end; background: var(--pri); color: var(--pri-ink); border-bottom-right-radius: 6px; }
.bubble.ai { align-self: flex-start; background: var(--card); box-shadow: var(--shadow); border-bottom-left-radius: 6px; }
.bubble.alert { background: #fff1f0; color: #7f1d1d; border: 2px solid #fca5a5; }
.chat-input { position: sticky; bottom: calc(var(--tab-h) + 18px + env(safe-area-inset-bottom)); display: flex; gap: .5rem; padding: .5rem; background: var(--card); border-radius: 20px; box-shadow: var(--shadow-lg); }
.chat-input textarea { flex: 1; border: 0; background: transparent; min-height: 48px; max-height: 140px; resize: none; padding: .7rem; outline: none; }
.typing i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ink3); margin: 0 2px; animation: eq 1s infinite; }

/* ===== Planos ===== */
.plans { display: grid; gap: 1rem; }
.plan { border: 2px solid var(--line); }
.plan.best { border-color: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 15%, transparent), var(--shadow); }
.plan .price { font-size: 2rem; font-weight: 900; }
.plan ul { padding: 0; list-style: none; margin: .75rem 0; }
.plan li { display: flex; gap: .5rem; align-items: flex-start; padding: .25rem 0; }
.plan li .ic { color: var(--ok); width: 1.2rem; height: 1.2rem; margin-top: .15rem; }
.compare { width: 100%; border-collapse: collapse; font-size: .92rem; }
.compare th, .compare td { padding: .6rem .4rem; border-bottom: 1px solid var(--line); text-align: center; }
.compare td:first-child, .compare th:first-child { text-align: left; }

/* ===== Kids ===== */
body.kids { --bg: #fff7e8; --card: #ffffff; --ink: #2b1d4a; --pri: #ff7a1a; --pri-soft: #ffe7d1; --pri-ink: #fff; }
body.kids .hero { background: linear-gradient(160deg, #ff9a3c, #ff5f8f 60%, #b065ff); }
.kids-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.kids-btn { min-height: 150px; border-radius: 32px; border: 0; font-size: 1.2rem; font-weight: 900; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem;
  box-shadow: inset 0 -8px 0 rgba(0, 0, 0, .15), 0 14px 26px -14px rgba(0, 0, 0, .4); text-decoration: none; }
.kids-btn .emo { font-size: 3.6rem; line-height: 1; }
.kids-btn:active { transform: scale(.96) translateY(3px); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15); }
.kid-story { font-size: 1.5rem; line-height: 1.6; font-weight: 600; }
.memory { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; }
.memory button { aspect-ratio: 1; border-radius: 18px; border: 0; font-size: 2.2rem; background: linear-gradient(160deg, #6d4bff, #b065ff); color: #fff; box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .18); }
.memory button.open, .memory button.ok { background: #fff; box-shadow: var(--shadow); }
.memory button.ok { opacity: .55; }
.stars { font-size: 1.6rem; letter-spacing: .1em; }

/* ===== Utilitários ===== */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.stat { background: var(--card); border-radius: 18px; padding: .9rem; box-shadow: var(--shadow); }
.stat strong { font-size: 1.6rem; display: block; line-height: 1.1; }
.stat span { color: var(--ink2); font-size: .85rem; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 1.25rem 0; }
.footer-note { font-size: .8rem; color: var(--ink3); text-align: center; padding: 1.5rem 1rem; }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--ink2); }
.empty .emo { font-size: 3rem; display: block; margin-bottom: .5rem; }
.progress-ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-weight: 900;
  background: radial-gradient(closest-side, var(--card) 76%, transparent 78% 100%), conic-gradient(var(--gold) calc(var(--p) * 1%), var(--bg2) 0); }
@media (min-width: 720px) { .screen { padding: 1.5rem 1.5rem 0; } .hero { border-radius: 0 0 40px 40px; } }


/* =====================================================================
   ESTILO JOGO (Aprender) — botões 3D, mapa, lições, comemorações
   ===================================================================== */
:root { --green: #22b35e; --green-d: #178a47; --red: #ef4444; --red-d: #b91c1c; --gold-d: #c27c0e; --gray: #e5e1ee; --gray-d: #c2bdd0; }
.btn { box-shadow: 0 4px 0 color-mix(in srgb, var(--pri) 65%, #000); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 color-mix(in srgb, var(--pri) 65%, #000); }
.btn.gold { box-shadow: 0 4px 0 var(--gold-d); }
.btn.ghost, .btn.line { box-shadow: 0 3px 0 var(--line); }
.tile, .item, .book-btn, .chapters button { box-shadow: 0 3px 0 var(--line), var(--shadow); }
.btn3d { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 56px; padding: .7rem 1.4rem; border: 0; border-radius: 18px;
  font-weight: 900; font-size: 1.05rem; letter-spacing: .03em; text-transform: uppercase; text-decoration: none; color: #fff; background: var(--pri);
  box-shadow: 0 5px 0 color-mix(in srgb, var(--pri) 60%, #000); transition: transform .08s, box-shadow .08s, filter .2s; }
.btn3d:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 0 0 transparent; }
.btn3d:disabled { background: var(--gray); color: #9a94ad; box-shadow: 0 5px 0 var(--gray-d); cursor: default; }
.btn3d.green { background: var(--green); box-shadow: 0 5px 0 var(--green-d); }
.btn3d.red { background: var(--red); box-shadow: 0 5px 0 var(--red-d); }
.btn3d.gold { background: linear-gradient(180deg, #ffcf4d, #f5a524); color: #2b1a00; box-shadow: 0 5px 0 var(--gold-d); }
.btn3d.gray { background: var(--gray); color: #6d6884; box-shadow: 0 5px 0 var(--gray-d); }
.btn3d.block { width: 100%; }
.btn3d.sm { min-height: 44px; padding: .4rem .9rem; font-size: .85rem; border-radius: 14px; }
.big-emoji { font-size: 4rem; line-height: 1.1; }

/* Barra de status */
.stats-bar { display: flex; gap: .5rem; justify-content: space-between; }
.stats-bar.compact { margin: -.25rem 0 1rem; }
.stat-chip { flex: 1; display: flex; align-items: center; justify-content: center; gap: .3rem; min-height: 50px; border-radius: 16px; background: var(--card);
  box-shadow: 0 3px 0 var(--line); text-decoration: none; color: var(--ink); font-weight: 900; font-size: 1.05rem; border: 2px solid var(--line); }
.stat-chip .emo { font-size: 1.35rem; }
.stat-chip.flame b { color: #f97316; } .stat-chip.flame:not(.lit) .emo { filter: grayscale(1); opacity: .5; }
.stat-chip.flame.lit .emo { animation: flick 1.6s ease-in-out infinite; display: inline-block; }
@keyframes flick { 50% { transform: scale(1.15) rotate(-6deg); } }
.stat-chip.gem b { color: #d97706; } .stat-chip.lvl b { color: var(--pri); }
.goal-ring { --p: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem;
  background: radial-gradient(closest-side, var(--card) 70%, transparent 72%), conic-gradient(#f59e0b calc(var(--p) * 1%), var(--bg2) 0); }
.mini-bar { height: 10px; border-radius: 99px; background: var(--bg2); overflow: hidden; margin-top: .35rem; }
.mini-bar.big { height: 16px; }
.mini-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ffcf4d, #f59e0b); transition: width .5s; }
.quest-strip { display: flex; align-items: center; gap: .75rem; padding: .8rem 1rem; border-radius: 18px; background: var(--card); border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line);
  text-decoration: none; color: var(--ink); }
.quest-strip .emo { font-size: 1.8rem; }
.quest-strip small { display: block; font-size: .78rem; }
.learn-cta { display: flex; align-items: center; gap: .75rem; padding: .9rem; border-radius: 22px; background: linear-gradient(135deg, var(--card), var(--card2)); border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line); }
.learn-cta small { display: block; color: var(--ink2); }
.learn-cta .btn3d { min-width: 60px; font-size: 1.4rem; padding: .6rem 1rem; }

/* Mapa da jornada */
.learn-screen { min-height: 100dvh; }
.learn-top { position: sticky; top: 0; z-index: 25; padding: calc(.6rem + env(safe-area-inset-top)) 1rem .6rem; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.unit { margin: 1.5rem 0 1rem; }
.unit-head { display: flex; gap: .75rem; align-items: flex-start; padding: 1rem 1.1rem; border-radius: 22px; color: #fff; background: var(--c);
  box-shadow: 0 5px 0 color-mix(in srgb, var(--c) 60%, #000); }
.unit-head small { text-transform: uppercase; letter-spacing: .08em; font-weight: 800; opacity: .85; font-size: .75rem; }
.unit-head h2 { margin: .1rem 0 .25rem; font-size: 1.3rem; }
.unit-head p { margin: 0 0 .4rem; opacity: .92; font-size: .92rem; }
.unit-head .why { display: inline-block; background: rgba(255, 255, 255, .22); border-radius: 999px; padding: .2rem .65rem; font-size: .8rem; font-weight: 800; }
.nodes { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2.4rem; padding: 3rem 0 .5rem; }
.node-row { position: relative; display: flex; flex-direction: column; align-items: center; }
.lnode { position: relative; width: 78px; height: 72px; border-radius: 50%; border: 0; font-size: 2rem; color: #fff; background: var(--c);
  box-shadow: 0 7px 0 color-mix(in srgb, var(--c) 60%, #000), 0 0 0 6px color-mix(in srgb, var(--c) 18%, transparent); transition: transform .1s; }
.lnode:active { transform: translateY(6px); box-shadow: 0 1px 0 color-mix(in srgb, var(--c) 60%, #000); }
.lnode.done { background: linear-gradient(180deg, #ffcf4d, #f5a524); box-shadow: 0 7px 0 var(--gold-d), 0 0 0 6px rgba(245, 165, 36, .2); color: #2b1a00; font-weight: 900; }
.lnode.locked { background: var(--gray); box-shadow: 0 7px 0 var(--gray-d); font-size: 1.5rem; }
.lnode.current { animation: nodepulse 1.8s ease-in-out infinite; }
@keyframes nodepulse { 50% { box-shadow: 0 7px 0 color-mix(in srgb, var(--c) 60%, #000), 0 0 0 14px color-mix(in srgb, var(--c) 22%, transparent); } }
.lnode .crowns { position: absolute; right: -10px; bottom: -6px; font-style: normal; font-size: .72rem; background: var(--card); color: var(--ink); border-radius: 99px; padding: 1px 6px; box-shadow: var(--shadow); }
.node-bubble { position: absolute; bottom: calc(100% + 10px); background: var(--card); color: var(--green); font-weight: 900; font-size: .8rem; letter-spacing: .06em;
  padding: .45rem .8rem; border-radius: 12px; border: 2px solid var(--line); white-space: nowrap; animation: bob 1.6s ease-in-out infinite; }
.node-bubble::after { content: ""; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); border: 8px solid transparent; border-top-color: var(--card); }
.chest { width: 74px; height: 66px; border-radius: 20px; border: 0; font-size: 2.4rem; background: var(--gray); box-shadow: 0 6px 0 var(--gray-d); filter: grayscale(.6); }
.chest.ready { filter: none; background: linear-gradient(180deg, #ffe08a, #f5a524); box-shadow: 0 6px 0 var(--gold-d); animation: wiggle 1.4s ease-in-out infinite; }
.chest.opened { filter: none; opacity: .7; }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
.lumi-side { position: absolute; left: 0; top: 4.5rem; }
.lumi .lumi-body { transform-origin: 60px 110px; animation: lumibob 2.6s ease-in-out infinite; }
.lumi-cheer .lumi-body { animation: lumijump .9s ease-in-out infinite; }
@keyframes lumibob { 50% { transform: translateY(-3px) scale(1.02, .98); } }
@keyframes lumijump { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-10px); } }

/* Lição */
body.in-lesson #tabbar { display: none; }
.lsn { min-height: 100dvh; display: flex; flex-direction: column; padding: calc(.5rem + env(safe-area-inset-top)) 1rem 0; }
.lesson-top { display: flex; align-items: center; gap: .6rem; }
.lprog { flex: 1; height: 18px; border-radius: 99px; background: var(--bg2); overflow: hidden; }
.lprog i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(180deg, #4ade80, var(--green)); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .12); transition: width .4s cubic-bezier(.3, 1.4, .5, 1); }
.combo { font-weight: 900; color: #f97316; font-size: .9rem; white-space: nowrap; }
.combo.pop { animation: pop .4s cubic-bezier(.2, 1.6, .4, 1); }
.stage { flex: 1; padding: 1.25rem 0 1rem; }
.ex { animation: rise .3s ease both; }
.ex-title { display: flex; align-items: center; gap: .75rem; justify-content: space-between; margin-bottom: 1.25rem; }
.ex-title h2 { margin: 0; font-size: 1.4rem; flex: 1; }
.ex-char { width: 84px; height: 84px; border-radius: 26px; display: grid; place-items: center; font-size: 3rem; margin: 0 auto 1rem; background: var(--c); box-shadow: 0 6px 0 color-mix(in srgb, var(--c) 60%, #000); }
.choices { display: grid; gap: .75rem; }
.choice { display: flex; align-items: center; gap: 1rem; min-height: 70px; padding: .75rem 1rem; border-radius: 18px; border: 2px solid var(--line); background: var(--card);
  box-shadow: 0 4px 0 var(--line); font-weight: 800; font-size: 1.1rem; text-align: left; color: var(--ink); transition: transform .08s; }
.choice:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.choice .cemo { font-size: 2.2rem; width: 52px; text-align: center; flex: none; }
.choice.sel { border-color: #60a5fa; background: color-mix(in srgb, #60a5fa 14%, var(--card)); box-shadow: 0 4px 0 #3b82f6; color: #1d4ed8; }
:root[data-theme="dark"] .choice.sel { color: #bfdbfe; }
.statement { display: flex; flex-direction: column; align-items: center; gap: .75rem; padding: 1.25rem; border-radius: 22px; background: var(--card); border: 2px solid var(--line); margin-bottom: 1.25rem; text-align: center; }
.statement p { font-size: 1.35rem; font-weight: 800; margin: 0; }
.tf-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.tf { min-height: 120px; border-radius: 22px; border: 2px solid var(--line); background: var(--card); box-shadow: 0 5px 0 var(--line); font-weight: 900; font-size: 1.15rem; color: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; }
.tf span { font-size: 2.6rem; }
.tf.yes.sel { border-color: var(--green); background: color-mix(in srgb, var(--green) 15%, var(--card)); box-shadow: 0 5px 0 var(--green-d); }
.tf.no.sel { border-color: var(--red); background: color-mix(in srgb, var(--red) 12%, var(--card)); box-shadow: 0 5px 0 var(--red-d); }
.verse-fill { font-family: var(--read); font-size: 1.35rem; line-height: 1.8; padding: 1.1rem; border-radius: 20px; background: var(--card); border: 2px solid var(--line); margin-bottom: 1.25rem; }
.slot { display: inline-block; min-width: 90px; border-bottom: 3px dashed var(--pri); color: var(--ink3); font-family: var(--ui); font-weight: 800; text-align: center; padding: 0 .3rem; }
.slot.filled { color: var(--pri); border-bottom-style: solid; }
.chips-bank { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.wchip { min-height: 52px; padding: .5rem 1rem; border-radius: 14px; border: 2px solid var(--line); background: var(--card); box-shadow: 0 4px 0 var(--line); font-weight: 800; font-size: 1.1rem; color: var(--ink); }
.wchip.sel { border-color: #60a5fa; box-shadow: 0 4px 0 #3b82f6; color: #2563eb; }
.wchip:disabled { opacity: .25; box-shadow: none; }
.wchip.in { background: color-mix(in srgb, var(--pri) 10%, var(--card)); }
.answer-line { min-height: 120px; display: flex; flex-wrap: wrap; gap: .5rem; align-content: flex-start; padding: .75rem 0 1rem; margin-bottom: 1rem;
  border-bottom: 2px solid var(--line); background-image: linear-gradient(transparent 58px, var(--line) 58px, var(--line) 60px, transparent 60px); }
.match { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.mcol { display: grid; gap: .6rem; }
.mtile { min-height: 62px; border-radius: 16px; border: 2px solid var(--line); background: var(--card); box-shadow: 0 4px 0 var(--line); font-weight: 800; font-size: 1rem; color: var(--ink); padding: .4rem; }
.mtile.big { font-size: 1.6rem; }
.mtile.sel { border-color: #60a5fa; box-shadow: 0 4px 0 #3b82f6; }
.mtile.ok { border-color: var(--green); background: color-mix(in srgb, var(--green) 14%, var(--card)); box-shadow: none; opacity: .55; }
.mtile.err { border-color: var(--red); animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.listen-box { text-align: center; margin-bottom: 1.25rem; }
.listen-box h2 { font-size: 1.35rem; }
.play-big { width: 110px; height: 110px; border-radius: 30px; border: 0; font-size: 3rem; background: #3b82f6; box-shadow: 0 7px 0 #1d4ed8; margin: .5rem; }
.play-slow { width: 70px; height: 70px; border-radius: 22px; border: 0; font-size: 2rem; background: #93c5fd; box-shadow: 0 6px 0 #3b82f6; margin: .5rem; align-self: flex-end; }
.play-big:active, .play-slow:active { transform: translateY(5px); box-shadow: none; }
.lesson-foot { position: sticky; bottom: 0; margin: 0 -1rem; padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom)); background: var(--bg); border-top: 2px solid var(--line); }
.feedback { animation: rise .25s ease both; }
.feedback strong { font-size: 1.35rem; }
.feedback p { margin: .2rem 0 0; font-weight: 700; }
.feedback .row { margin-bottom: .75rem; }
.feedback.ok strong, .feedback.ok p { color: var(--green-d); }
.feedback.bad strong, .feedback.bad p { color: var(--red-d); }
.lesson-foot:has(.feedback.ok) { background: color-mix(in srgb, var(--green) 16%, var(--bg)); border-top-color: transparent; }
.lesson-foot:has(.feedback.bad) { background: color-mix(in srgb, var(--red) 14%, var(--bg)); border-top-color: transparent; }
:root[data-theme="dark"] .feedback.ok strong, :root[data-theme="dark"] .feedback.ok p { color: #4ade80; }
:root[data-theme="dark"] .feedback.bad strong, :root[data-theme="dark"] .feedback.bad p { color: #fca5a5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .feedback.ok strong, :root:not([data-theme="light"]) .feedback.ok p { color: #4ade80; } :root:not([data-theme="light"]) .feedback.bad strong, :root:not([data-theme="light"]) .feedback.bad p { color: #fca5a5; } }

/* Resultado */
.result-wrap { min-height: 100dvh; display: flex; flex-direction: column; justify-content: space-between; padding: 2rem 0 calc(1.25rem + env(safe-area-inset-bottom)); }
.result { text-align: center; display: flex; flex-direction: column; align-items: center; gap: .5rem; animation: rise .35s ease both; }
.result h1 { font-size: 1.9rem; color: #f59e0b; }
.result-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; width: 100%; margin: 1rem 0; }
.rcard { border-radius: 18px; border: 3px solid var(--c); overflow: hidden; background: var(--card); }
.rcard small { display: block; background: var(--c); color: #fff; font-weight: 900; text-transform: uppercase; font-size: .72rem; padding: .3rem; letter-spacing: .05em; }
.rcard b { display: flex; align-items: center; justify-content: center; gap: .3rem; font-size: 1.35rem; padding: .7rem .2rem; color: var(--c); }
.flame-big { font-size: 7rem; line-height: 1; animation: pop .7s cubic-bezier(.2, 1.6, .4, 1) both, flick 1.6s 0.7s ease-in-out infinite; }
.flame-count { font-size: 4rem; font-weight: 900; color: #f97316; line-height: 1; margin-top: -.5rem; }
.badge-big { width: 130px; height: 130px; border-radius: 50%; display: grid; place-items: center; font-size: 4.2rem; background: radial-gradient(circle, #fff6d6, #ffcf4d); box-shadow: 0 8px 0 var(--gold-d); animation: pop .6s cubic-bezier(.2, 1.6, .4, 1) both; }
.week { display: flex; gap: .4rem; justify-content: center; margin-top: 1rem; }
.wd { display: flex; flex-direction: column; align-items: center; font-weight: 800; color: var(--ink3); }
.wd span { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--bg2); font-size: 1.2rem; }
.wd.on span { background: #ffedd5; }
.wd.today span { outline: 3px solid #f97316; }

/* Missões e conquistas */
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.hs { display: flex; flex-direction: column; align-items: center; padding: .9rem .4rem; border-radius: 20px; background: var(--card); border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line); }
.hs span { font-size: 2rem; } .hs b { font-size: 1.4rem; } .hs small { color: var(--ink2); font-size: .78rem; text-align: center; }
.hs.flame b { color: #f97316; }
.quest { display: flex; align-items: center; gap: .75rem; padding: .85rem; border-radius: 18px; background: var(--card); border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line); }
.quest .emo { font-size: 1.9rem; }
.week-chart { display: grid; grid-template-columns: repeat(7, 1fr); gap: .4rem; align-items: end; height: 150px; }
.wbar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: .3rem; }
.wbar i { width: 70%; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, #ffcf4d, #f59e0b); }
.wbar.today i { background: linear-gradient(180deg, #fb923c, #f97316); }
.wbar small { font-weight: 800; color: var(--ink3); }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; }
.badge { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .2rem; padding: .9rem .5rem; border-radius: 18px; background: var(--card); border: 2px solid var(--line); opacity: .55; }
.badge span { font-size: 2.2rem; } .badge small { color: var(--ink2); font-size: .76rem; }
.badge.got { opacity: 1; border-color: #f5a524; box-shadow: 0 4px 0 #f5a524; }

/* Cadastro: revelação da jornada */
.journey-lumi { display: flex; justify-content: center; margin: .5rem 0; }
.jlist { display: grid; gap: .6rem; text-align: left; margin: 1rem 0; }
.jline { display: flex; gap: .75rem; align-items: center; padding: .85rem; border-radius: 18px; background: var(--card); border: 2px solid var(--line); animation: rise .4s ease both; }
.jline small { display: block; color: var(--ink2); }
.jcheck { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; font-weight: 900; flex: none; }
