/* Kids English Stories Studio (nível 2) — visual "livro de aventuras".
   Mesma família do front ("parque de figurinhas": contorno marrom, botões de brinquedo que afundam, Fredoka + Nunito),
   com a assinatura do nível 2: céu lilás, fita dourada, livrinho de verdade, palco de teatro, álbum e diploma.
   TODAS as cores saem das 8 cores do personalizador (customization.js → colors):
   primary → --primary · secondary → --teal · accent → --yellow · lilac → --lilac · mint → --mint · bg → --bg · card → --card · ink → --ink.
   Os outros tons são misturas (color-mix) dessas 8 — o revendedor troca uma cor e o app inteiro acompanha. */
@font-face { font-family: 'Fredoka'; src: url('assets/fonts/fredoka.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('assets/fonts/nunito.woff2') format('woff2'); font-weight: 200 1000; font-display: swap; }

:root {
  --primary: #E9553F; --teal: #3CCFC0; --yellow: #FFC93C; --lilac: #C9A7F2; --mint: #9BE3B9;
  --bg: #FFF6EA; --card: #FFFFFF; --ink: #4A2617;
  --white: #FFFFFF; --danger: #B3261E; --ios-blue: #0A84FF;
  /* tons calculados — mudam sozinhos quando o revendedor troca as cores */
  --sky: color-mix(in srgb, var(--teal) 50%, var(--lilac));
  --pink: color-mix(in srgb, var(--primary) 55%, var(--white));
  --gold: color-mix(in srgb, var(--yellow) 84%, var(--primary));
  --gold-dark: color-mix(in srgb, var(--gold) 70%, var(--ink));
  --ink-soft: color-mix(in srgb, var(--ink) 74%, var(--bg));
  --line: color-mix(in srgb, var(--ink) 14%, var(--bg));
  --primary-dark: color-mix(in srgb, var(--primary) 72%, var(--ink));
  --teal-dark: color-mix(in srgb, var(--teal) 62%, var(--ink));
  --lilac-dark: color-mix(in srgb, var(--lilac) 62%, var(--ink));
  --t-primary: color-mix(in srgb, var(--primary) 16%, var(--white));
  --t-teal: color-mix(in srgb, var(--teal) 22%, var(--white));
  --t-yellow: color-mix(in srgb, var(--yellow) 30%, var(--white));
  --t-lilac: color-mix(in srgb, var(--lilac) 30%, var(--white));
  --t-mint: color-mix(in srgb, var(--mint) 38%, var(--white));
  --t-sky: color-mix(in srgb, var(--sky) 28%, var(--white));
  --t-pink: color-mix(in srgb, var(--pink) 34%, var(--white));
  --paper: color-mix(in srgb, var(--yellow) 9%, var(--card));
  --paper-edge: color-mix(in srgb, var(--yellow) 22%, var(--bg));
  --story: var(--primary); --conv: var(--teal);
  --r-xl: 34px; --r-lg: 28px; --r-md: 22px; --r-sm: 16px;
  --bw: 3px; --lift: 0 6px 0 var(--ink); --lift-sm: 0 4px 0 var(--ink);
  --soft-shadow: 0 10px 26px color-mix(in srgb, var(--ink) 16%, transparent);
  --head: 'Fredoka', 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --tabbar-h: 78px;
  --spring: cubic-bezier(.3, 1.6, .5, 1);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; background-color: var(--bg); }
body {
  margin: 0; min-height: 100dvh; font-family: var(--body); font-size: 17px; line-height: 1.45; color: var(--ink);
  background-color: var(--bg);
  /* nível 2: céu lilás com estrelinhas e confetes nas cores do app */
  background-image:
    radial-gradient(circle, color-mix(in srgb, var(--primary) 28%, transparent) 3px, transparent 3.6px),
    radial-gradient(circle, color-mix(in srgb, var(--teal) 32%, transparent) 4px, transparent 4.6px),
    radial-gradient(circle, color-mix(in srgb, var(--gold) 55%, transparent) 3.4px, transparent 4px),
    radial-gradient(circle, color-mix(in srgb, var(--lilac) 60%, transparent) 2.6px, transparent 3.2px),
    linear-gradient(180deg, color-mix(in srgb, var(--lilac) 34%, var(--bg)) 0, color-mix(in srgb, var(--sky) 14%, var(--bg)) 300px, var(--bg) 560px);
  background-size: 97px 89px, 131px 117px, 73px 103px, 61px 67px, 100% 100%;
  background-position: 11px 7px, 53px 61px, 29px 37px, 5px 44px, 0 0;
  background-repeat: repeat, repeat, repeat, repeat, no-repeat;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: calc(var(--tabbar-h) + 30px + env(safe-area-inset-bottom));
  overflow-x: hidden;
}
/* nuvens fixas no alto */
body::before {
  content: ''; position: fixed; z-index: -1; left: 0; right: 0; top: 60px; height: 190px; pointer-events: none;
  background:
    radial-gradient(28px 22px at 9% 40%, var(--white) 96%, transparent), radial-gradient(40px 30px at 15% 32%, var(--white) 96%, transparent),
    radial-gradient(30px 22px at 21% 44%, var(--white) 96%, transparent), radial-gradient(24px 18px at 80% 20%, var(--white) 96%, transparent),
    radial-gradient(36px 26px at 86% 13%, var(--white) 96%, transparent), radial-gradient(26px 19px at 92% 24%, var(--white) 96%, transparent);
  opacity: .85;
}
img { max-width: 100%; display: block; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 4px solid color-mix(in srgb, var(--teal) 75%, var(--white)); outline-offset: 3px; border-radius: 14px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 10px 14px; border-radius: 12px; z-index: 99; }
.skip:focus { left: 12px; }
[hidden] { display: none !important; }
.ico { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- tipografia ---------- */
.title-xl { font-family: var(--head); font-weight: 700; font-size: clamp(32px, 8vw, 50px); line-height: 1.05; margin: 8px 0; text-shadow: 0 3px 0 color-mix(in srgb, var(--yellow) 70%, var(--white)); }
.title-lg { font-family: var(--head); font-weight: 700; font-size: clamp(26px, 6.4vw, 36px); line-height: 1.1; margin: 0 0 6px; }
.title-md { font-family: var(--head); font-weight: 700; font-size: clamp(22px, 5.4vw, 29px); line-height: 1.12; margin: 0; }
.title-sm { font-family: var(--head); font-weight: 650; font-size: 21px; margin: 4px 0 10px; }
.lead { font-size: 18px; color: var(--ink-soft); margin: 4px 0 14px; font-weight: 700; }
.hint { font-size: 14.5px; color: var(--ink-soft); }
.muted { color: var(--ink-soft); }
.center { text-align: center; }
.sub { font-family: var(--head); font-weight: 650; font-size: 20px; margin: 16px 0 8px; }

/* ---------- topo ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: var(--bw) solid var(--ink);
}
/* faixa arco-íris do front + fio dourado do nível 2 */
.topbar::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -10px; height: 7px; pointer-events: none;
  background: linear-gradient(90deg, var(--primary) 0 20%, var(--gold) 20% 40%, var(--teal) 40% 60%, var(--lilac) 60% 80%, var(--mint) 80%);
  border-bottom: 2px solid color-mix(in srgb, var(--ink) 25%, transparent);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; min-width: 0; }
.brand-logo-wrap { position: relative; width: 48px; height: 48px; flex: none; border-radius: 15px; overflow: hidden; border: var(--bw) solid var(--ink); background: var(--card); display: grid; place-items: center; box-shadow: 0 3px 0 var(--ink); transform: rotate(-4deg); }
.brand-logo-wrap img { width: 100%; height: 100%; object-fit: cover; }
.brand-logo-wrap.logo-fallback { background: var(--t-lilac); }
.brand-logo-wrap svg { width: 92%; height: 92%; }
.brand-name { display: flex; flex-direction: column; min-width: 0; }
.brand-name b { font-family: var(--head); font-weight: 700; font-size: 20px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-name small { font-size: 12.5px; font-weight: 800; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; gap: 8px; flex: none; }
.icon-btn {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--ink);
  background: var(--card); border: var(--bw) solid var(--ink); box-shadow: 0 4px 0 var(--ink), inset 0 -4px 0 var(--line); padding: 0;
  transition: transform .1s, box-shadow .1s;
}
.icon-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--ink), inset 0 -2px 0 var(--line); }
#soundToggle { background: var(--t-teal); }
.install-arrow { background: var(--primary); box-shadow: 0 4px 0 var(--ink), inset 0 -4px 0 var(--primary-dark); }
.install-arrow svg { stroke: var(--white); stroke-width: 2.8; }

/* ---------- conteúdo ---------- */
main { width: 100%; max-width: 1060px; margin: 0 auto; padding: 26px 16px 8px; outline: none; }
.card { background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--r-lg); box-shadow: var(--lift); }
.pad { padding: 20px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin: 18px 0 6px; }
.actions.stack { flex-direction: column; align-items: stretch; }
.actions:empty { display: none; }
.page-head { margin: 4px 0 16px; }
.page-head p { margin: 2px 0 8px; font-weight: 700; }
.meter { display: flex; align-items: center; gap: 12px; font-weight: 800; color: var(--ink-soft); font-size: 15px; }
.meter .bar { flex: 1; }
.bar { height: 18px; border-radius: 999px; border: var(--bw) solid var(--ink); background: var(--card); overflow: hidden; box-shadow: inset 0 3px 0 var(--line); }
.bar i { display: block; height: 100%; min-width: 0; border-right: var(--bw) solid var(--ink); background: repeating-linear-gradient(-45deg, var(--mint) 0 9px, color-mix(in srgb, var(--mint) 70%, var(--teal)) 9px 18px); }
.bar i[style="width:0%"] { border-right: 0; }

/* ---------- botões: brinquedo que afunda ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 56px; padding: 12px 22px;
  font-family: var(--head); font-weight: 650; font-size: 19px; line-height: 1.1; text-decoration: none; text-align: center;
  border: var(--bw) solid var(--ink); border-radius: 999px; background: var(--card); color: var(--ink);
  box-shadow: var(--lift), inset 0 -5px 0 var(--line), inset 0 3px 0 color-mix(in srgb, var(--white) 70%, transparent);
  transition: transform .1s, box-shadow .1s, background .2s, opacity .2s;
}
.btn .ico { width: 24px; height: 24px; stroke-width: 2.7; }
.btn:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 1px 0 var(--ink), inset 0 -2px 0 var(--line); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--primary); color: var(--white); text-shadow: 0 2px 0 var(--primary-dark); box-shadow: var(--lift), inset 0 -6px 0 var(--primary-dark), inset 0 3px 0 color-mix(in srgb, var(--white) 35%, transparent); }
.btn.primary .ico { filter: drop-shadow(0 2px 0 var(--primary-dark)); }
.btn.primary:hover { background: color-mix(in srgb, var(--primary) 90%, var(--ink)); }
.btn.primary:active:not(:disabled) { box-shadow: 0 1px 0 var(--ink), inset 0 -2px 0 var(--primary-dark); }
.btn.ghost:hover { background: var(--t-yellow); }
.btn.danger { background: var(--card); color: var(--danger); border-color: var(--danger); box-shadow: 0 5px 0 var(--danger); }
.btn.xl { min-height: 66px; font-size: 23px; padding: 14px 28px; width: 100%; }
.btn.xl .ico { width: 28px; height: 28px; }
.btn.round { width: 72px; height: 72px; min-height: 0; padding: 0; border-radius: 50%; flex: none; }
.btn.round .ico { width: 34px; height: 34px; stroke-width: 3; }
.speaking { animation: talk .5s ease-in-out infinite alternate; }
@keyframes talk { from { transform: scale(1); } to { transform: scale(1.04); } }

/* ---------- campos ---------- */
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 700; margin: 0 0 14px; }
.field > span { font-size: 15px; }
.field input, .field select { min-height: 54px; padding: 10px 16px; border-radius: 18px; border: var(--bw) solid var(--ink); background: var(--white); font-size: 18px; font-weight: 700; box-shadow: inset 0 4px 0 var(--line); }
.field input:focus { background: var(--t-yellow); }
.field.big > span { font-family: var(--head); font-size: 24px; font-weight: 650; }
.field.big input { min-height: 64px; font-size: 24px; text-align: center; font-family: var(--head); }
input[type=range] { width: 100%; accent-color: var(--primary); min-height: 40px; }
.error { color: var(--danger); font-weight: 700; min-height: 1.2em; margin: 0; }

/* ---------- mascote e imagens ---------- */
.mascot, .mascot-svg { display: block; }
.mascot img { width: 100%; height: auto; }
.mascot-svg svg { width: 100%; height: auto; }
.bob { animation: bob 3s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-9px) rotate(-3deg); } }
.ph { display: grid; place-items: center; width: 100%; height: 100%; background: radial-gradient(circle at 30% 25%, var(--white) 0 18%, transparent 19%), linear-gradient(160deg, var(--t-sky), var(--t-mint)); }
.ph svg { width: min(46%, 150px); height: auto; }
.story-picture, .page-art, .cover-art, .poster-art, .order-art, .book-cover, .scene-backdrop { overflow: hidden; background: linear-gradient(160deg, var(--t-sky), var(--t-mint)); }
.story-picture img, .page-art img, .cover-art img, .poster-art img, .order-art img, .book-cover img, .scene-backdrop img { width: 100%; height: 100%; object-fit: cover; }
.avatar { width: 58px; height: 58px; flex: none; border-radius: 50%; overflow: hidden; border: var(--bw) solid var(--ink); background: color-mix(in srgb, var(--bc, var(--lilac)) 45%, var(--white)); box-shadow: 0 3px 0 var(--ink); display: grid; place-items: center; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-fallback { font-family: var(--head); font-weight: 700; font-size: 27px; color: var(--ink); background: color-mix(in srgb, var(--bc, var(--lilac)) 70%, var(--white)); }

/* ---------- professora: mascote + balão + ouvir de novo ---------- */
.coach-box { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; width: 100%; }
.coach-av { flex: none; width: 62px; height: 62px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, var(--white) 0 30%, var(--t-lilac) 31%); border: var(--bw) solid var(--ink); box-shadow: 0 4px 0 var(--ink); display: grid; place-items: center; overflow: hidden; }
.coach-av .mascot, .coach-av .mascot-svg { width: 96%; margin-top: 8%; }
.coach-bubble { position: relative; flex: 1; min-width: 0; margin: 0; background: var(--white); border: var(--bw) solid var(--ink); border-radius: 20px; padding: 9px 14px; font-family: var(--head); font-weight: 600; font-size: 18px; line-height: 1.25; box-shadow: 0 4px 0 var(--ink); min-height: 52px; display: flex; align-items: center; transition: border-color .2s, background .2s; }
.coach-av + .coach-bubble::before { content: ''; position: absolute; left: -10px; top: 50%; width: 14px; height: 14px; margin-top: -7px; background: inherit; border-left: var(--bw) solid var(--ink); border-bottom: var(--bw) solid var(--ink); transform: rotate(45deg); }
.coach.empty .coach-bubble:empty { visibility: hidden; }
.coach-rep { flex: none; width: 60px; height: 60px; border-radius: 50%; border: var(--bw) solid var(--ink); background: var(--teal); color: var(--ink); box-shadow: 0 5px 0 var(--ink), inset 0 -5px 0 var(--teal-dark), inset 0 3px 0 color-mix(in srgb, var(--white) 45%, transparent); display: grid; place-items: center; padding: 0; position: relative; transition: transform .1s; }
.coach-rep:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.coach-rep:disabled { opacity: .45; }
.coach-rep svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.coach-rep.invite::before { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 5px solid var(--teal); animation: ring 1.6s ease-out infinite; }
@keyframes ring { from { transform: scale(1); opacity: .9; } to { transform: scale(1.5); opacity: 0; } }
.coach.talking .mascot, .coach.talking .mascot-svg { animation: chat .26s ease-in-out infinite alternate; transform-origin: 50% 90%; }
.coach.talking .coach-av { animation: waves 1s ease-out infinite; }
.coach.talking .coach-rep { animation: talk .45s ease-in-out infinite alternate; background: var(--yellow); }
.coach.talking .coach-bubble { border-color: var(--primary); background: color-mix(in srgb, var(--yellow) 14%, var(--white)); }
@keyframes chat { from { transform: translateY(0) scale(1, 1); } to { transform: translateY(-4px) scale(1.04, .96); } }
@keyframes waves { 0% { box-shadow: 0 4px 0 var(--ink), 0 0 0 0 color-mix(in srgb, var(--gold) 85%, transparent); } 100% { box-shadow: 0 4px 0 var(--ink), 0 0 0 14px transparent; } }
.coach-line { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 520px; margin: 4px auto 14px; text-align: left; }

/* ---------- boas-vindas ---------- */
.onboard { max-width: 520px; margin: 0 auto; text-align: center; padding-top: 4px; }
.onboard-art { width: min(220px, 56vw); margin: 0 auto -4px; position: relative; isolation: isolate; }
.onboard-art::before { content: ''; position: absolute; z-index: -1; inset: 10% 0 0; border-radius: 50%; background: repeating-conic-gradient(from 0deg, var(--t-yellow) 0 15deg, var(--t-lilac) 15deg 30deg); border: var(--bw) solid var(--ink); animation: spin 40s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
.onboard .coach-line .coach-bubble { min-height: 0; }
.child-type-card { max-width: 520px; margin: 0 auto; text-align: center; }
.child-type-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.child-type-choice { flex-direction: column; gap: 10px; min-width: 0; white-space: normal; }
.child-type-choice .avatar { width: 80px; height: 80px; }
.child-type-choice[aria-pressed="true"] { background: var(--t-yellow); outline: 3px solid var(--primary); outline-offset: 2px; }
.name-card { text-align: left; margin-top: 8px; background: linear-gradient(180deg, var(--card) 60%, var(--t-lilac)); }

/* ---------- início ---------- */
.home { display: grid; gap: 20px; grid-template-columns: 1fr; }
.hero {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 6px; padding: 30px 14px 0 18px; isolation: isolate;
  background:
    radial-gradient(circle at 88% 18%, color-mix(in srgb, var(--white) 70%, transparent) 0 3px, transparent 4px),
    radial-gradient(circle at 70% 9%, color-mix(in srgb, var(--white) 70%, transparent) 0 2px, transparent 3px),
    radial-gradient(130% 90% at 50% 120%, color-mix(in srgb, var(--mint) 75%, var(--white)) 0 34%, transparent 34.5%),
    linear-gradient(170deg, color-mix(in srgb, var(--lilac) 70%, var(--white)) 0, color-mix(in srgb, var(--sky) 45%, var(--white)) 100%);
}
.hero::after { content: ''; position: absolute; z-index: -1; left: -10%; right: -10%; bottom: -1px; height: 26%; border-top: var(--bw) solid var(--ink); border-radius: 50% 50% 0 0; background: var(--mint); }
.level-ribbon { position: absolute; top: 12px; right: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 5px; font-family: var(--head); font-weight: 700; font-size: 15px; padding: 4px 12px 4px 9px; background: var(--gold); border: 2.5px solid var(--ink); border-radius: 999px; box-shadow: 0 3px 0 var(--ink); transform: rotate(4deg); }
.level-ribbon .ico { width: 18px; height: 18px; fill: var(--white); stroke-width: 2.2; }
.hero { grid-template-areas: "hello mascot" "coach coach"; }
.hero-copy { display: contents; }
.hello { grid-area: hello; align-self: center; justify-self: start; position: relative; z-index: 1; }
.hero-coach { grid-area: coach; position: relative; z-index: 1; padding-bottom: 18px; }
.hero-mascot { grid-area: mascot; }
.hello { display: inline-block; margin: 0 0 6px; font-family: var(--head); font-weight: 700; font-size: clamp(28px, 7.6vw, 44px); line-height: 1.05; background: var(--white); border: var(--bw) solid var(--ink); border-radius: 24px; padding: 9px 18px; box-shadow: 0 5px 0 var(--ink); transform: rotate(-1.5deg); overflow-wrap: anywhere; }
.hello-name { color: var(--primary); }
.hero-coach { display: flex; align-items: center; gap: 10px; }
.hero-coach .coach-bubble { font-size: 17px; }
.hero-mascot { width: clamp(104px, 29vw, 190px); align-self: end; margin-bottom: -4px; filter: drop-shadow(0 6px 0 color-mix(in srgb, var(--ink) 18%, transparent)); animation: bob 3.4s ease-in-out infinite; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stat { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: var(--r-md); text-align: left; min-height: 84px; color: var(--ink); }
.stat > span:last-child { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.stat b { font-family: var(--head); font-size: 23px; }
.stat small { font-size: 13.5px; font-weight: 800; color: var(--ink-soft); }
.s-days { background: var(--t-mint); }
.s-stickers { background: var(--t-yellow); font: inherit; transition: transform .1s, box-shadow .1s; }
.s-stickers:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--ink); }
.ring { --p: 0; width: 54px; height: 54px; flex: none; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--teal) calc(var(--p) * 1%), var(--white) 0); border: var(--bw) solid var(--ink); position: relative; }
.ring::before { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: var(--white); border: 2px solid var(--ink); }
.ring b { position: relative; font-size: 18px; }
.stat-ico { width: 54px; height: 54px; flex: none; border-radius: 16px; display: grid; place-items: center; background: var(--gold); border: var(--bw) solid var(--ink); box-shadow: 0 3px 0 var(--ink); transform: rotate(-6deg); }
.stat-ico .ico { width: 30px; height: 30px; }
.today { overflow: hidden; display: grid; padding: 0; }
.today-art { position: relative; margin: 10px 10px 0; border: var(--bw) solid var(--ink); border-radius: calc(var(--r-lg) - 8px); overflow: hidden; aspect-ratio: 4 / 3; }
.today-art .story-picture { height: 100%; }
.day-flag { position: absolute; left: 10px; top: 10px; font-family: var(--head); font-weight: 700; font-size: 20px; background: var(--white); border: var(--bw) solid var(--ink); border-radius: 14px; padding: 3px 12px; box-shadow: 0 3px 0 var(--ink); }
.day-flag small { font-size: 14px; color: var(--ink-soft); }
.today-body { padding: 14px 16px 18px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.today-body .muted { margin: 0 0 12px; font-weight: 700; }
.today.all-done .today-body { align-items: center; }
.done-mascot { width: 150px; }
.type-badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--head); font-weight: 650; font-size: 15px; padding: 3px 12px 3px 8px; border: 2.5px solid var(--ink); border-radius: 999px; box-shadow: 0 2px 0 var(--ink); background: var(--t-primary); }
.type-badge .ico { width: 20px; height: 20px; }
.type-badge.conv { background: var(--t-teal); }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 12px; border-radius: var(--r-md); min-height: 120px; color: var(--ink); font: inherit; transition: transform .1s, box-shadow .1s; }
.tile:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--ink); }
.tile b { font-family: var(--head); font-weight: 700; font-size: 17px; line-height: 1.15; }
.tile small { font-size: 13px; font-weight: 800; color: var(--ink-soft); }
.tile-ico { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--white); box-shadow: 0 3px 0 var(--ink); margin-bottom: 6px; }
.tile-ico .ico { width: 26px; height: 26px; }
.t-map { background: var(--t-mint); } .t-album { background: var(--t-yellow); } .t-books { background: var(--t-lilac); } .t-diploma { background: color-mix(in srgb, var(--gold) 45%, var(--white)); }

/* ---------- trilha: mapa de aventura (tabuleiro que vai e volta) ---------- */
.trail { max-width: 720px; margin: 0 auto; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; justify-content: center; margin: 0 0 14px; font-weight: 800; font-size: 14px; color: var(--ink-soft); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend .ico { width: 20px; height: 20px; color: var(--ink); }
.map { list-style: none; margin: 0; padding: 0; position: relative; display: flex; flex-direction: column; gap: 20px; }
.map > .road { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.road path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.road .road-edge { stroke: var(--ink); stroke-width: 26; }
.road .road-fill { stroke: color-mix(in srgb, var(--gold) 35%, var(--white)); stroke-width: 20; }
.road .road-dash { stroke: var(--white); stroke-width: 4; stroke-dasharray: 2 13; }
.land { --land: var(--mint); border: var(--bw) solid var(--ink); border-radius: var(--r-xl); box-shadow: var(--lift); padding: 12px 10px 18px;
  background-color: color-mix(in srgb, var(--land) 26%, var(--white));
  background-image: radial-gradient(circle, color-mix(in srgb, var(--land) 75%, var(--white)) 2.2px, transparent 2.8px), radial-gradient(circle, color-mix(in srgb, var(--gold) 50%, transparent) 2.6px, transparent 3.2px);
  background-size: 44px 38px, 83px 71px; background-position: 0 0, 21px 17px; }
.land[data-land="2"] { --land: var(--sky); } .land[data-land="3"] { --land: var(--yellow); } .land[data-land="4"] { --land: var(--lilac); } .land[data-land="5"] { --land: var(--pink); } .land[data-land="6"] { --land: var(--teal); }
.land-title { position: relative; z-index: 2; display: flex; align-items: baseline; justify-content: center; gap: 8px; margin: -28px auto 6px; width: max-content; max-width: 100%; font-family: var(--head); font-weight: 700; font-size: 18px; background: var(--land); border: var(--bw) solid var(--ink); border-radius: 12px; padding: 5px 18px; box-shadow: 0 4px 0 var(--ink); }
.land-title small { font-family: var(--body); font-weight: 800; font-size: 13px; }
.land-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); row-gap: 26px; }
.spot { position: relative; display: grid; place-items: center; padding-top: 10px; }
.node { --nc: var(--story); position: relative; z-index: 2; width: 62px; height: 62px; padding: 0; border: var(--bw) solid var(--ink); border-radius: 20px; background: color-mix(in srgb, var(--nc) 30%, var(--white)); color: var(--ink); display: grid; place-items: center; transition: transform .12s;
  box-shadow: 0 6px 0 var(--ink), inset 0 -6px 0 color-mix(in srgb, var(--nc) 55%, var(--white)), inset 0 3px 0 color-mix(in srgb, var(--white) 60%, transparent); }
.node.conv { --nc: var(--conv); border-radius: 50%; }
.node.conv::after { content: ''; position: absolute; left: 7px; bottom: -8px; width: 14px; height: 14px; background: inherit; border-left: var(--bw) solid var(--ink); border-bottom: var(--bw) solid var(--ink); transform: rotate(-20deg) skewX(20deg); border-bottom-left-radius: 3px; z-index: -1; }
.node:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--ink); }
.node-face { width: 100%; height: 100%; display: grid; place-items: center; border-radius: inherit; overflow: hidden; }
.node-face .ico { width: 30px; height: 30px; stroke-width: 2.5; }
.node.open { background: color-mix(in srgb, var(--nc) 55%, var(--white)); }
.node.done { background: var(--white); }
.node-sticker { width: 100%; height: 100%; }
.node-sticker img { width: 100%; height: 100%; object-fit: cover; }
.node-sticker .ph svg { width: 80%; }
.node.locked { background: color-mix(in srgb, var(--ink) 7%, var(--bg)); border-color: color-mix(in srgb, var(--ink) 42%, var(--bg)); color: color-mix(in srgb, var(--ink) 45%, var(--bg)); box-shadow: 0 6px 0 color-mix(in srgb, var(--ink) 38%, var(--bg)); }
.node.locked .ico { width: 24px; height: 24px; }
.node-n { position: absolute; bottom: -13px; left: 50%; transform: translateX(-50%); min-width: 30px; font-family: var(--head); font-weight: 700; font-size: 14px; line-height: 1.25; text-align: center; background: var(--white); border: 2.5px solid var(--ink); border-radius: 999px; padding: 0 6px; box-shadow: 0 2px 0 var(--ink); }
.node.locked .node-n { border-color: color-mix(in srgb, var(--ink) 42%, var(--bg)); box-shadow: none; }
.node-check { position: absolute; top: -9px; right: -9px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--mint); border: 2.5px solid var(--ink); box-shadow: 0 2px 0 var(--ink); }
.node-check .ico { width: 16px; height: 16px; stroke-width: 3.4; }
.node.current { width: 72px; height: 72px; background: var(--nc); color: var(--white); animation: pulse 1.8s ease-in-out infinite; }
.node.current .ico { filter: drop-shadow(0 2px 0 var(--ink)); width: 34px; height: 34px; }
.node.current .node-n { background: var(--gold); }
@keyframes pulse { 0%, 100% { box-shadow: 0 6px 0 var(--ink), 0 0 0 0 color-mix(in srgb, var(--gold) 85%, transparent); } 50% { box-shadow: 0 6px 0 var(--ink), 0 0 0 14px transparent; } }
.node-mascot { position: absolute; z-index: 3; width: 44px; bottom: -26px; right: -14px; pointer-events: none; animation: bob 2.4s ease-in-out infinite; }
.land.finish { --land: var(--gold); display: flex; align-items: center; justify-content: center; gap: 16px; padding: 18px; }
.node.trophy { --nc: var(--gold); width: 80px; height: 80px; border-radius: 50%; }
.node.trophy .ico { width: 42px; height: 42px; }
.node.trophy.done { background: var(--gold); }
.finish-copy { display: flex; flex-direction: column; position: relative; z-index: 2; background: var(--white); border: 2.5px solid var(--ink); border-radius: 14px; padding: 6px 12px; box-shadow: 0 3px 0 var(--ink); }
.finish-copy b { font-family: var(--head); font-size: 18px; }
.finish-copy small { font-weight: 800; color: var(--ink-soft); }
.shake { animation: shake .42s; }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

@media (max-width: 420px) { .album-tab { font-size: 16px; padding: 8px 8px; gap: 4px; } .album-tab small { font-size: 12px; } }
/* história = livro (quadrado inclinado) · conversa = balão redondo */
.node.story { transform: rotate(-4deg); }
.node.story:active { transform: rotate(-4deg) translateY(5px); }
.node.story .node-n { transform: translateX(-50%) rotate(4deg); }

/* ---------- dia: cabeçalho e passos ---------- */
.day { max-width: 960px; margin: 0 auto; --tc: var(--story); }
.day.conv { --tc: var(--conv); }
.day-head { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; margin-bottom: 12px; }
.day-title { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.day-title .title-md { font-size: clamp(21px, 5.2vw, 28px); overflow-wrap: anywhere; }
.day-num { color: var(--ink-soft); }
.stepper { list-style: none; display: grid; grid-template-columns: repeat(7, 1fr); padding: 0; margin: 0 0 16px; position: relative; }
.stepper::before { content: ''; position: absolute; left: 7%; right: 7%; top: 21px; height: 6px; border-radius: 4px; background: color-mix(in srgb, var(--ink) 15%, var(--white)); }
.stepper li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; }
.st-dot { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--white); border: var(--bw) solid color-mix(in srgb, var(--ink) 35%, var(--white)); color: color-mix(in srgb, var(--ink) 45%, var(--white)); transition: transform .3s var(--spring); }
.st-dot .ico { width: 22px; height: 22px; }
.st-label { font-size: 12px; font-weight: 800; color: var(--ink-soft); text-align: center; line-height: 1.1; }
.stepper li.done .st-dot { background: var(--mint); border-color: var(--ink); color: var(--ink); }
.stepper li.active .st-dot { background: var(--tc); border-color: var(--ink); color: var(--white); box-shadow: 0 4px 0 var(--ink); transform: scale(1.14); }
.stepper li.active .st-dot .ico { filter: drop-shadow(0 1.5px 0 var(--ink)); }
.stepper li.active .st-label { color: var(--ink); }
@media (max-width: 560px) {
  .st-dot { width: 40px; height: 40px; } .st-dot .ico { width: 20px; height: 20px; } .stepper::before { top: 18px; }
  .st-label { position: absolute; top: 46px; white-space: nowrap; opacity: 0; }
  .stepper li.active .st-label { opacity: 1; background: var(--white); border: 2px solid var(--ink); border-radius: 999px; padding: 0 8px; }
  .stepper li:first-child.active .st-label { left: 0; } .stepper li:last-child.active .st-label { right: 0; }
  .stepper { margin-bottom: 34px; }
}
.lesson { animation: rise .4s var(--spring) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.english-line { font-family: var(--head); font-weight: 600; font-size: clamp(23px, 5.8vw, 32px); line-height: 1.32; margin: 0; overflow-wrap: anywhere; }
.w { border-radius: 8px; padding: 0 1px; transition: background .12s, box-shadow .12s, color .12s; }
.w.on { background: color-mix(in srgb, var(--yellow) 80%, var(--white)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--yellow) 80%, var(--white)), inset 0 -4px 0 color-mix(in srgb, var(--gold) 80%, var(--ink)); color: var(--ink); }

/* ---------- abertura: capa de livro / cartaz de teatro ---------- */
.opening { display: grid; gap: 18px; }
.opening-art { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.cover-book { position: relative; width: 100%; max-width: 480px; padding: 12px 12px 16px 26px; border: var(--bw) solid var(--ink); border-radius: 10px 26px 26px 10px; box-shadow: 8px 8px 0 var(--ink); transform: rotate(-1.2deg);
  background: linear-gradient(90deg, color-mix(in srgb, var(--primary) 80%, var(--ink)) 0 12px, var(--primary) 12px); }
.cover-spine { position: absolute; left: 12px; top: 0; bottom: 0; width: 3px; background: color-mix(in srgb, var(--ink) 50%, transparent); }
.cover-art { aspect-ratio: 4 / 3; border: var(--bw) solid var(--ink); border-radius: 16px; }
.cover-label { margin: -26px 14px 0; position: relative; text-align: center; background: var(--paper); border: var(--bw) solid var(--ink); border-radius: 16px; padding: 8px 12px 10px; box-shadow: 0 4px 0 var(--ink); }
.cover-label h2 { font-family: var(--head); font-weight: 700; font-size: clamp(24px, 6.4vw, 34px); line-height: 1.08; margin: 0; }
.cover-label p, .poster-label p { margin: 2px 0 0; font-weight: 800; color: var(--ink-soft); }
.poster { position: relative; width: 100%; max-width: 500px; padding: 12px; border: var(--bw) solid var(--ink); border-radius: 24px; box-shadow: var(--lift); transform: rotate(1deg);
  background: repeating-linear-gradient(90deg, var(--teal) 0 18px, color-mix(in srgb, var(--teal) 80%, var(--white)) 18px 36px); }
.poster-art { aspect-ratio: 4 / 3; border: var(--bw) solid var(--ink); border-radius: 16px; }
.poster-label { margin: -24px 18px 0; position: relative; text-align: center; background: var(--white); border: var(--bw) solid var(--ink); border-radius: 16px; padding: 8px 12px 10px; box-shadow: 0 4px 0 var(--ink); }
.poster-label h2 { font-family: var(--head); font-weight: 700; font-size: clamp(24px, 6.4vw, 34px); line-height: 1.08; margin: 0; }
.poster-place { position: absolute; top: 2px; left: 2px; display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 14px; background: var(--gold); border: 2.5px solid var(--ink); border-radius: 999px; padding: 2px 12px 2px 8px; box-shadow: 0 3px 0 var(--ink); transform: rotate(-4deg); }
.poster-place .ico { width: 18px; height: 18px; }
.cast { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-bottom: 4px; }
.cast-member { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 14px 12px; border: var(--bw) solid var(--ink); border-radius: var(--r-md); background: color-mix(in srgb, var(--bc) 30%, var(--white)); box-shadow: var(--lift-sm); min-width: 120px; }
.cast-member .avatar { width: 74px; height: 74px; }
.cast-member b { font-family: var(--head); font-size: 19px; }
.cast-member.is-you { transform: rotate(-2deg); background: color-mix(in srgb, var(--bc) 50%, var(--white)); }
.you-tag { display: inline-block; font-family: var(--head); font-weight: 700; font-size: 14px; background: var(--gold); border: 2px solid var(--ink); border-radius: 999px; padding: 1px 10px; box-shadow: 0 2px 0 var(--ink); }
.new-words { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.word-chip { --wc: var(--primary); position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 92px; padding: 22px 6px 10px; border: var(--bw) solid var(--ink); border-radius: var(--r-md); background: color-mix(in srgb, var(--wc) 22%, var(--white)); box-shadow: var(--lift-sm), inset 0 -5px 0 color-mix(in srgb, var(--wc) 40%, var(--white)); color: var(--ink); transition: transform .1s, box-shadow .1s; }
.word-chip.w1 { --wc: var(--teal); } .word-chip.w2 { --wc: var(--lilac); }
.word-chip:active { transform: translateY(4px); box-shadow: 0 0 0 var(--ink); }
.word-chip b { font-family: var(--head); font-weight: 700; font-size: clamp(18px, 4.6vw, 22px); line-height: 1.1; overflow-wrap: anywhere; text-align: center; }
.word-chip small { font-weight: 800; font-size: 14px; color: var(--ink-soft); text-align: center; }
.wc-ico { position: absolute; top: -14px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--wc); border: 2.5px solid var(--ink); color: var(--white); box-shadow: 0 2px 0 var(--ink); }
.wc-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.word-chip.speaking { background: color-mix(in srgb, var(--yellow) 50%, var(--white)); }
.title-voice { min-height: 52px; }

/* ---------- livrinho: página de livro de verdade ---------- */
.book { --page: var(--paper); position: relative; perspective: 1600px; margin: 0 auto; max-width: 940px; }
.book-spread { position: relative; display: grid; grid-template-columns: 1fr; border: var(--bw) solid var(--ink); border-radius: 12px 26px 26px 12px; background: var(--page);
  box-shadow: 6px 7px 0 var(--ink), 10px 12px 0 -2px var(--paper-edge), 10px 12px 0 1px var(--ink), 14px 17px 0 -1px var(--paper-edge), 14px 17px 0 2px var(--ink);
  transform-origin: left center; }
/* lombada à esquerda (celular) */
.book-spread::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 26px; border-radius: 9px 0 0 9px; pointer-events: none; z-index: 2;
  background: linear-gradient(90deg, color-mix(in srgb, var(--ink) 22%, transparent), color-mix(in srgb, var(--ink) 4%, transparent) 70%, transparent); }
/* canto dobrado */
.book-spread::after { content: ''; position: absolute; right: -3px; bottom: -3px; width: 44px; height: 44px; z-index: 3; pointer-events: none;
  background: linear-gradient(135deg, var(--page) 0 48%, color-mix(in srgb, var(--paper-edge) 70%, var(--ink)) 49% 52%, var(--paper-edge) 53%);
  border-radius: 0 0 26px 0; clip-path: polygon(100% 0, 100% 100%, 0 100%); border-right: var(--bw) solid var(--ink); border-bottom: var(--bw) solid var(--ink); }
.leaf { position: relative; min-width: 0; }
.leaf-art { padding: 14px 14px 0 30px; }
.page-art { aspect-ratio: 4 / 3; border-radius: 14px; border: var(--bw) solid var(--ink); }
.leaf-text { padding: 14px 22px 30px 34px; display: flex; flex-direction: column; justify-content: center; gap: 10px; min-height: 140px;
  background-image: repeating-linear-gradient(180deg, transparent 0 41px, color-mix(in srgb, var(--teal) 16%, transparent) 41px 43px); background-position: 0 6px; }
.leaf-text .english-line { font-size: clamp(25px, 6.4vw, 36px); }
.translation { margin: 0; padding: 8px 12px; font-weight: 800; font-size: 17px; color: var(--ink); background: var(--t-lilac); border: 2.5px dashed var(--lilac-dark); border-radius: 14px; transform: rotate(-.6deg); }
.folio { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); font-family: var(--head); font-weight: 700; font-size: 15px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--ink); background: var(--white); }
.book.turn-next .book-spread { animation: turnNext .55s var(--spring) both; }
.book.turn-prev .book-spread { animation: turnPrev .55s var(--spring) both; transform-origin: right center; }
@keyframes turnNext { from { transform: rotateY(-62deg); opacity: .2; } }
@keyframes turnPrev { from { transform: rotateY(62deg); opacity: .2; } }
.book-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 560px; margin: 26px auto 0; }
.book-nav .nav.primary { background: var(--tc); text-shadow: none; box-shadow: var(--lift), inset 0 -6px 0 color-mix(in srgb, var(--tc) 65%, var(--ink)); }
.book-nav .nav.primary .ico { color: var(--white); filter: drop-shadow(0 2px 0 var(--ink)); }
.page-dots { flex: 1; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 7px; }
.page-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--white); transition: transform .3s var(--spring); }
.page-dots i.seen { background: var(--mint); }
.page-dots i.here { background: var(--gold); transform: scale(1.35); }
.page-count { width: 100%; text-align: center; font-weight: 800; font-size: 14px; color: var(--ink-soft); }
.tool-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 560px; margin: 16px auto 0; }
.btn.tool { flex-direction: column; gap: 4px; min-height: 78px; padding: 8px 4px; border-radius: var(--r-md); font-size: 15px; }
.btn.tool .ico { width: 28px; height: 28px; }
.btn.tool.t-listen { background: var(--t-teal); } .btn.tool.t-slow { background: var(--t-mint); } .btn.tool.t-trans { background: var(--t-lilac); }
.btn.tool[aria-pressed="true"] { background: var(--lilac); }

/* ---------- conversa: palco de teatro com balões coloridos por personagem ---------- */
.stage { position: relative; isolation: isolate; overflow: hidden; border: var(--bw) solid var(--ink); border-radius: var(--r-lg); box-shadow: var(--lift); padding: 50px 40px 26px; min-height: 260px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--sky) 30%, var(--white)) 0 78%, color-mix(in srgb, var(--gold) 55%, var(--white)) 78%); }
.stage-scene { position: absolute; inset: 0; z-index: -1; opacity: .26; }
.stage-scene .scene-backdrop { width: 100%; height: 100%; background: none; }
.stage-scene .ph { display: none; }
.stage::after { content: ''; position: absolute; z-index: -1; left: 0; right: 0; bottom: 0; height: 18px; background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--gold) 70%, var(--ink)) 0 2px, transparent 2px 46px), color-mix(in srgb, var(--gold) 60%, var(--white)); border-top: var(--bw) solid var(--ink); }
.curtain { position: absolute; top: 0; bottom: 0; width: 30px; z-index: 2; pointer-events: none; border-color: var(--ink); border-style: solid; border-width: 0;
  background: repeating-linear-gradient(90deg, var(--primary) 0 9px, var(--primary-dark) 9px 12px, var(--primary) 12px 15px); }
.curtain.l { left: 0; border-right-width: var(--bw); border-bottom-right-radius: 26px; }
.curtain.r { right: 0; border-left-width: var(--bw); border-bottom-left-radius: 26px; }
.valance { position: absolute; left: 0; right: 0; top: 0; height: 30px; z-index: 3; pointer-events: none; border-bottom: var(--bw) solid var(--ink);
  background: radial-gradient(circle at 50% 0, var(--primary) 0 15px, transparent 15.5px) 0 100% / 36px 18px repeat-x, linear-gradient(var(--primary-dark), var(--primary)) 0 0 / 100% 18px no-repeat; }
.valance::after { content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 10px; background: radial-gradient(circle at 18px -4px, transparent 0 13px, var(--ink) 13.5px 16px, transparent 16.5px) 0 0 / 36px 12px repeat-x; }
.chat { position: relative; display: flex; flex-direction: column; gap: 14px; }
.chat-bubble { --bc: var(--lilac); display: flex; align-items: flex-start; gap: 10px; width: fit-content; max-width: min(100%, 560px); padding: 0; border: 0; background: none; text-align: left; color: var(--ink); animation: pop .4s var(--spring) both; }
.chat-copy { position: relative; display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 9px 14px 11px; border: var(--bw) solid var(--ink); border-radius: 6px 22px 22px 22px; background: color-mix(in srgb, var(--bc) 32%, var(--white)); box-shadow: 0 4px 0 var(--ink); }
.chat-copy .who { font-family: var(--head); font-weight: 700; font-size: 15px; color: color-mix(in srgb, var(--bc) 30%, var(--ink)); display: flex; align-items: center; gap: 6px; }
.chat-copy .english-line { font-size: clamp(20px, 5vw, 26px); }
.chat-translation { font-weight: 800; font-size: 15.5px; color: var(--ink-soft); border-top: 2px dashed color-mix(in srgb, var(--bc) 60%, var(--ink)); padding-top: 4px; }
.chat-bubble.child { align-self: flex-end; flex-direction: row-reverse; }
.chat-bubble.child .chat-copy { border-radius: 22px 6px 22px 22px; background: color-mix(in srgb, var(--bc) 55%, var(--white)); }
.chat-bubble.speaking { animation: none; }
.chat-bubble.speaking .chat-copy { box-shadow: 0 4px 0 var(--ink), 0 0 0 5px color-mix(in srgb, var(--gold) 70%, transparent); }
.chat-bubble.current .chat-copy { outline: 3px dashed color-mix(in srgb, var(--bc) 60%, var(--ink)); outline-offset: 4px; }
.chat-bubble.waiting .chat-copy { background: var(--gold); }
.chat-bubble.waiting .english-line { animation: talk .7s ease-in-out infinite alternate; }
.chat-bubble .avatar { width: 54px; height: 54px; background: color-mix(in srgb, var(--bc) 50%, var(--white)); }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
.line-count { text-align: center; font-weight: 800; color: var(--ink-soft); margin: 0 0 8px; }
.turn-panel { margin-top: 18px; padding: 16px 14px 18px; border: var(--bw) solid var(--ink); border-radius: var(--r-lg); background: color-mix(in srgb, var(--gold) 28%, var(--white)); box-shadow: var(--lift); }
.your-turn { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 12px; font-family: var(--head); font-weight: 700; font-size: 26px; }
.your-turn .ico { width: 30px; height: 30px; color: var(--primary); }
.listen-panel { display: flex; justify-content: center; margin-top: 16px; }
.bravo { text-align: center; display: flex; flex-direction: column; align-items: center; }
.bravo-mascot { width: min(200px, 50vw); }

/* ---------- respostas (quiz, teatrinho, completar) ---------- */
.answer-options { display: grid; gap: 14px; max-width: 620px; margin: 0 auto; }
.answer-row { --oc: var(--primary); display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: stretch; }
.answer-row.o1 { --oc: var(--teal); } .answer-row.o2 { --oc: var(--lilac); }
.answer-card { justify-content: flex-start; text-align: left; min-height: 70px; border-radius: var(--r-md); padding: 10px 16px 10px 10px; font-size: clamp(19px, 4.8vw, 23px); background: color-mix(in srgb, var(--oc) 18%, var(--white)); box-shadow: var(--lift), inset 0 -5px 0 color-mix(in srgb, var(--oc) 38%, var(--white)); }
.answer-mark { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--oc); border: 2.5px solid var(--ink); color: transparent; }
.answer-mark .ico { width: 24px; height: 24px; stroke-width: 3.4; }
.answer-text { min-width: 0; overflow-wrap: anywhere; }
.answer-card.correct { background: var(--mint); animation: jelly .5s var(--spring); }
.answer-card.correct .answer-mark { background: var(--white); color: var(--ink); }
.answer-card.wrong { opacity: .4; }
.answer-card:disabled:not(.wrong) { opacity: 1; }
.option-audio { width: 64px; min-height: 64px; padding: 0; border-radius: var(--r-md); background: var(--t-teal); }
.option-audio .ico, .option-audio svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
@keyframes jelly { 30% { transform: scale(1.06, .95); } 55% { transform: scale(.98, 1.04); } 100% { transform: scale(1); } }
.quiz-card { max-width: 620px; margin: 0 auto 18px; text-align: center; padding: 16px 16px 18px; border: var(--bw) solid var(--ink); border-radius: var(--r-lg); background: var(--white); box-shadow: var(--lift); }
.q-head { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.q-count { font-weight: 800; color: var(--ink-soft); }
.q-dots { display: flex; gap: 6px; }
.q-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--white); }
.q-dots i.seen { background: var(--mint); } .q-dots i.here { background: var(--gold); }
.question { font-family: var(--head); font-weight: 700; font-size: clamp(22px, 5.6vw, 30px); line-height: 1.2; margin: 8px 0 12px; }
.small-btn { min-height: 50px; font-size: 17px; }
#answerNext:empty, #gameNext:empty { display: none; }

/* ---------- minha vez de falar ---------- */
.speak-card { --bc: var(--yellow); position: relative; max-width: 620px; margin: 0 auto; text-align: center; padding: 26px 16px 18px; border: var(--bw) solid var(--ink); border-radius: var(--r-lg); background: color-mix(in srgb, var(--bc) 28%, var(--white)); box-shadow: var(--lift); }
.speak-count { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-family: var(--head); font-weight: 700; font-size: 15px; background: var(--white); border: 2.5px solid var(--ink); border-radius: 999px; padding: 3px 12px; box-shadow: 0 3px 0 var(--ink); }
.speak-count .ico { width: 18px; height: 18px; color: var(--primary); }
.speak-card .english-line { font-size: clamp(26px, 6.6vw, 38px); }
.speak-pt { margin: 6px 0 14px; font-weight: 800; color: var(--ink-soft); }
.record-zone { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 26px auto 0; max-width: 620px; }
.record-tip { margin: 0; font-family: var(--head); font-weight: 600; font-size: 18px; }
.record-button { flex-direction: column; gap: 2px; width: 132px; height: 132px; min-height: 0; padding: 0; border-radius: 50%; font-size: 18px; background: var(--primary); color: var(--white); text-shadow: 0 2px 0 var(--primary-dark);
  box-shadow: 0 8px 0 var(--ink), inset 0 -8px 0 var(--primary-dark), inset 0 4px 0 color-mix(in srgb, var(--white) 35%, transparent), 0 0 0 10px color-mix(in srgb, var(--primary) 18%, transparent); }
.record-button .ico { width: 50px; height: 50px; stroke-width: 2.6; }
.record-button.recording { background: var(--danger); animation: recording 1.1s ease-in-out infinite; }
.record-button.spoke { background: var(--teal); color: var(--ink); text-shadow: none; box-shadow: 0 8px 0 var(--ink), inset 0 -8px 0 var(--teal-dark), 0 0 0 10px color-mix(in srgb, var(--teal) 22%, transparent); }
@keyframes recording { 0%, 100% { box-shadow: 0 8px 0 var(--ink), 0 0 0 0 color-mix(in srgb, var(--danger) 55%, transparent); } 50% { box-shadow: 0 8px 0 var(--ink), 0 0 0 20px transparent; } }
.record-time { margin: 6px 0 0; font-family: var(--head); font-weight: 700; font-size: 20px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.cmp-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 8px; min-height: 112px; border: var(--bw) solid var(--ink); border-radius: var(--r-md); box-shadow: var(--lift); color: var(--ink); font-family: var(--head); font-size: 19px; transition: transform .1s, box-shadow .1s; }
.cmp-card:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--ink); }
.cmp-card.me { background: color-mix(in srgb, var(--gold) 45%, var(--white)); }
.cmp-card.model { background: var(--t-teal); }
.cmp-ico { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--white); border: 2.5px solid var(--ink); box-shadow: 0 3px 0 var(--ink); }
.cmp-ico .ico { width: 26px; height: 26px; fill: currentColor; }

/* ---------- jogos ---------- */
.game-count { display: flex; align-items: center; justify-content: center; gap: 0; margin: 0 auto 14px; }
.game-count span { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-family: var(--head); font-weight: 700; border: var(--bw) solid var(--ink); background: var(--white); }
.game-count span.here { background: var(--gold); box-shadow: 0 3px 0 var(--ink); } .game-count span.seen { background: var(--mint); }
.game-count i { width: 40px; height: 5px; background: var(--ink); opacity: .3; }
.game { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.game-title { display: flex; align-items: center; gap: 8px; font-family: var(--head); font-weight: 700; font-size: clamp(22px, 5.6vw, 28px); margin: 0; text-align: center; }
.game-title .ico { width: 30px; height: 30px; color: var(--tc); }
.order-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; }
.order-slot { position: relative; aspect-ratio: 4 / 3; border: var(--bw) dashed color-mix(in srgb, var(--ink) 50%, var(--white)); border-radius: 14px; background: color-mix(in srgb, var(--white) 70%, transparent); display: grid; place-items: center; overflow: hidden; }
.order-slot > b { font-family: var(--head); font-size: 26px; color: color-mix(in srgb, var(--ink) 40%, var(--white)); }
.order-slot:has(.order-art) { border-style: solid; border-color: var(--ink); box-shadow: 0 3px 0 var(--ink); }
.order-slot:has(.order-art) > b { position: absolute; z-index: 1; top: 3px; left: 3px; font-size: 15px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--gold); color: var(--ink); border: 2px solid var(--ink); }
.order-slot .order-art { position: absolute; inset: 0; animation: pop .35s var(--spring); }
.order-bank { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: 100%; }
.order-choice { position: relative; }
.order-piece { width: 100%; padding: 6px; min-height: 0; border-radius: var(--r-md); background: var(--white); touch-action: none; display: block; }
.order-piece .order-art { aspect-ratio: 4 / 3; border-radius: 14px; border: 2px solid var(--ink); }
.order-piece:disabled { opacity: .25; }
.order-choice .option-audio { position: absolute; right: -6px; top: -10px; width: 52px; min-height: 52px; height: 52px; border-radius: 50%; }
.dragging { z-index: 50; position: relative; opacity: .9; box-shadow: 0 14px 22px color-mix(in srgb, var(--ink) 30%, transparent) !important; transition: none !important; }
.sentence-slots { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; width: 100%; padding: 14px 10px; border: var(--bw) solid var(--ink); border-radius: var(--r-md); background: var(--paper); box-shadow: inset 0 4px 0 var(--line);
  background-image: repeating-linear-gradient(180deg, transparent 0 34px, color-mix(in srgb, var(--teal) 14%, transparent) 34px 36px); }
.sentence-slot { min-width: 70px; min-height: 60px; display: grid; place-items: center; border: 2.5px dashed color-mix(in srgb, var(--ink) 40%, var(--white)); border-radius: 16px; }
.sentence-slot:has(.word-piece) { border-color: transparent; }
.sentence-slot > span { font-family: var(--head); font-weight: 700; color: color-mix(in srgb, var(--ink) 35%, var(--white)); }
.word-bank { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; min-height: 60px; width: 100%; }
.word-piece { --pc: var(--primary); min-height: 56px; padding: 8px 18px; border-radius: 16px; font-size: 21px; touch-action: none; background: color-mix(in srgb, var(--pc) 30%, var(--white)); box-shadow: 0 5px 0 var(--ink), inset 0 -5px 0 color-mix(in srgb, var(--pc) 55%, var(--white)); }
.word-piece .ico { width: 18px; height: 18px; }
.word-bank .word-piece:nth-child(4n+2), .sentence-slot:nth-child(4n+2) .word-piece { --pc: var(--teal); }
.word-bank .word-piece:nth-child(4n+3), .sentence-slot:nth-child(4n+3) .word-piece { --pc: var(--lilac); }
.word-bank .word-piece:nth-child(4n+4), .sentence-slot:nth-child(4n+4) .word-piece { --pc: var(--yellow); }
.word-piece.correct { --pc: var(--mint) !important; animation: jelly .5s var(--spring); }
.word-piece.wrong { --pc: var(--danger) !important; animation: shake .42s; }
.word-piece:disabled { opacity: 1; cursor: default; }
#builtSentence { text-align: center; padding: 8px 14px; background: color-mix(in srgb, var(--mint) 40%, var(--white)); border: var(--bw) solid var(--ink); border-radius: var(--r-md); }
.complete-card { --bc: var(--lilac); display: flex; align-items: flex-start; gap: 10px; width: 100%; max-width: 620px; }
.complete-card .avatar { width: 64px; height: 64px; background: color-mix(in srgb, var(--bc) 50%, var(--white)); }
.complete-bubble { flex: 1; min-width: 0; padding: 10px 16px 14px; border: var(--bw) solid var(--ink); border-radius: 6px 24px 24px 24px; background: color-mix(in srgb, var(--bc) 32%, var(--white)); box-shadow: var(--lift-sm); }
.complete-bubble .who { font-family: var(--head); font-size: 15px; }
.blank { display: inline-block; min-width: 3.2em; color: transparent; border-bottom: 5px solid var(--primary); background: color-mix(in srgb, var(--gold) 40%, var(--white)); border-radius: 8px 8px 0 0; animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { background: color-mix(in srgb, var(--gold) 80%, var(--white)); } }
#completeSentence.correct { color: var(--ink); }

/* ---------- figurinha ganha: carta que vira ---------- */
.reward { text-align: center; display: flex; flex-direction: column; align-items: center; max-width: 560px; margin: 0 auto; }
.reward-kicker { display: inline-flex; align-items: center; gap: 6px; font-family: var(--head); font-weight: 700; font-size: 21px; margin: 0 0 14px; }
.reward-kicker .ico { width: 24px; height: 24px; fill: var(--gold); }
.flip { width: min(260px, 66vw); aspect-ratio: 1; perspective: 1000px; margin-bottom: 14px; }
.flip-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; animation: flipIn 1.3s .25s var(--spring) both; }
.flip-back, .flip-front { position: absolute; inset: 0; border-radius: 50%; backface-visibility: hidden; -webkit-backface-visibility: hidden; border: var(--bw) solid var(--ink); box-shadow: 0 8px 0 var(--ink); }
.flip-back { display: grid; place-items: center; background: repeating-conic-gradient(from 0deg, var(--gold) 0 15deg, color-mix(in srgb, var(--gold) 60%, var(--white)) 15deg 30deg); }
.flip-back span { width: 46%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-family: var(--head); font-weight: 700; font-size: 64px; background: var(--white); border: var(--bw) solid var(--ink); }
.flip-front { transform: rotateY(180deg); padding: 10px; background: var(--white); }
.flip-front .sticker-image { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; border: var(--bw) solid var(--ink); }
.flip-front::after { content: ''; position: absolute; inset: 10px; border-radius: 50%; pointer-events: none; background: linear-gradient(120deg, transparent 30%, color-mix(in srgb, var(--white) 55%, transparent) 45%, transparent 60%); }
@keyframes flipIn { 0% { transform: rotateY(0) scale(.6); } 35% { transform: rotateY(0) scale(1.05); } 100% { transform: rotateY(180deg) scale(1); } }
.sticker-image img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- álbum de figurinhas ---------- */
.album-view { max-width: 920px; margin: 0 auto; }
.album-cover { position: relative; display: grid; gap: 10px; padding: 18px 18px 18px 34px; margin-bottom: 18px; border: var(--bw) solid var(--ink); border-radius: 12px var(--r-lg) var(--r-lg) 12px; box-shadow: var(--lift);
  background: linear-gradient(90deg, color-mix(in srgb, var(--lilac) 60%, var(--ink)) 0 16px, var(--lilac) 16px); }
.album-cover::before { content: ''; position: absolute; left: 22px; top: 14px; bottom: 14px; border-left: 3px dotted color-mix(in srgb, var(--white) 70%, transparent); }
.album-cover h1 { margin: 0; }
.album-count { margin: 0; font-weight: 800; }
.album-count b { font-family: var(--head); font-size: 24px; }
.album-done { position: absolute; top: -14px; right: 12px; display: inline-flex; align-items: center; gap: 5px; font-family: var(--head); font-weight: 700; background: var(--gold); border: 2.5px solid var(--ink); border-radius: 999px; padding: 3px 12px; box-shadow: 0 3px 0 var(--ink); transform: rotate(3deg); }
.album-tabs { display: flex; gap: 8px; padding: 0 8px; position: relative; z-index: 1; margin-bottom: -3px; }
.album-tab { flex: 1 1 0; min-width: 0; justify-content: center; display: inline-flex; align-items: center; gap: 6px; min-height: 54px; padding: 8px 16px; font-family: var(--head); font-weight: 650; font-size: 18px; border: var(--bw) solid var(--ink); border-bottom: 0; border-radius: 18px 18px 0 0; background: color-mix(in srgb, var(--story) 25%, var(--white)); color: var(--ink); opacity: .75; }
.album-tab.conv { background: color-mix(in srgb, var(--conv) 30%, var(--white)); }
.album-tab small { font-family: var(--body); font-weight: 800; font-size: 13px; }
.album-tab[aria-pressed="true"] { opacity: 1; padding-bottom: 12px; margin-top: -6px; }
.album-tab .ico { width: 22px; height: 22px; }
.album-page { border: var(--bw) solid var(--ink); border-radius: 6px var(--r-lg) var(--r-lg) var(--r-lg); box-shadow: var(--lift); padding: 20px 12px 24px;
  background-color: color-mix(in srgb, var(--story) 25%, var(--white));
  background-image: radial-gradient(circle, color-mix(in srgb, var(--ink) 12%, transparent) 1.4px, transparent 2px); background-size: 22px 22px; }
.album-page.conv { background-color: color-mix(in srgb, var(--conv) 30%, var(--white)); }
.album-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 10px; }
.album-sticker { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--ink); min-width: 0; }
.slot { width: 100%; max-width: 116px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; overflow: hidden; border: 3px dashed color-mix(in srgb, var(--ink) 40%, var(--white)); background: color-mix(in srgb, var(--white) 55%, transparent); }
.sticker-silhouette { font-family: var(--head); font-weight: 700; font-size: 40px; color: color-mix(in srgb, var(--ink) 30%, var(--white)); }
.album-sticker.earned .slot { border: var(--bw) solid var(--ink); background: var(--white); padding: 5px; box-shadow: 0 5px 0 var(--ink); transform: rotate(var(--tilt)); transition: transform .25s var(--spring); }
.album-sticker.earned:active .slot { transform: rotate(0) scale(.95); }
.album-sticker.earned .sticker-image { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; }
.slot-tag { display: flex; flex-direction: column; align-items: center; font-size: 13px; font-weight: 800; line-height: 1.15; text-align: center; max-width: 100%; }
.slot-tag b { font-family: var(--head); font-size: 14px; width: 30px; height: 24px; display: grid; place-items: center; border-radius: 999px; background: var(--white); border: 2px solid var(--ink); }
.slot-tag span { margin-top: 3px; overflow-wrap: anywhere; }
.album-sticker.speaking .slot { box-shadow: 0 5px 0 var(--ink), 0 0 0 6px color-mix(in srgb, var(--gold) 70%, transparent); }

/* ---------- livrinhos: estante ---------- */
.books-view { max-width: 920px; margin: 0 auto; }
.shelf { display: grid; grid-template-columns: 1fr; gap: 14px; }
.book-row { display: flex; align-items: center; gap: 14px; padding: 10px 14px 10px 10px; min-height: 96px; text-align: left; color: var(--ink); background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--r-md); box-shadow: var(--lift-sm); transition: transform .1s, box-shadow .1s; }
.book-row:active { transform: translateY(4px); box-shadow: 0 0 0 var(--ink); }
.mini-book { position: relative; flex: none; width: 104px; padding: 5px 5px 5px 13px; border: 2.5px solid var(--ink); border-radius: 5px 12px 12px 5px; background: linear-gradient(90deg, color-mix(in srgb, var(--primary) 75%, var(--ink)) 0 8px, var(--primary) 8px); box-shadow: 3px 3px 0 var(--ink); }
.mini-book .book-cover { aspect-ratio: 4 / 3; border-radius: 7px; border: 2px solid var(--ink); }
.book-row:nth-child(3n+2) .mini-book { background: linear-gradient(90deg, var(--teal-dark) 0 8px, var(--teal) 8px); }
.book-row:nth-child(3n+3) .mini-book { background: linear-gradient(90deg, var(--lilac-dark) 0 8px, var(--lilac) 8px); }
.mini-num { position: absolute; top: -10px; left: -8px; min-width: 28px; height: 28px; display: grid; place-items: center; font-family: var(--head); font-weight: 700; font-size: 14px; border-radius: 50%; background: var(--gold); border: 2px solid var(--ink); }
.mini-lock { position: absolute; inset: 0; display: grid; place-items: center; border-radius: inherit; background: color-mix(in srgb, var(--bg) 70%, transparent); }
.mini-lock .ico { width: 30px; height: 30px; }
.book-txt { display: flex; flex-direction: column; min-width: 0; }
.book-txt b { font-family: var(--head); font-weight: 700; font-size: 19px; line-height: 1.15; }
.book-txt span { font-weight: 700; color: var(--ink-soft); }
.book-row.locked { opacity: .7; }

/* ---------- folhas do livrinho (prévia = impressão): A4 deitada, 2 páginas A5 por folha ---------- */
.book-print-view { max-width: 1060px; margin: 0 auto; }
.print-bar { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; margin-bottom: 14px; position: sticky; top: 82px; z-index: 5; padding: 8px 0; background: color-mix(in srgb, var(--bg) 92%, transparent); }
.print-bar > div { display: flex; flex-direction: column; min-width: 0; }
.print-bar b { font-family: var(--head); font-size: 19px; }
.print-bar span { font-weight: 700; color: var(--ink-soft); font-size: 14px; }
.print-tips { padding: 6px 16px 12px; margin-bottom: 18px; }
.howto { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0 0; font-weight: 700; }
.howto .ico { margin-top: 2px; color: var(--primary); }
.book-sheets { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.book-sheet { position: relative; width: 100%; max-width: 1000px; aspect-ratio: 297 / 210; container-type: inline-size; display: grid; grid-template-columns: 1fr 1fr; background: var(--white); border: 2px solid var(--line); border-radius: 8px; box-shadow: var(--soft-shadow); overflow: hidden; color: var(--ink); }
.cut-line { position: absolute; z-index: 2; left: 50%; top: 0; bottom: 0; border-left: .25cqw dashed color-mix(in srgb, var(--ink) 45%, var(--white)); }
.cut-line .ico { position: absolute; top: 1.2cqw; left: -1.3cqw; width: 2.6cqw; height: 2.6cqw; background: var(--white); color: var(--ink-soft); }
.cut-line > span { position: absolute; top: 4cqw; left: .6cqw; font-size: 1cqw; font-weight: 800; color: var(--ink-soft); writing-mode: vertical-rl; }
.sheet-n { position: absolute; right: 1.2cqw; bottom: .8cqw; font-size: .95cqw; font-weight: 800; color: color-mix(in srgb, var(--ink) 40%, var(--white)); }
.book-half { position: relative; min-width: 0; padding: 3.2cqw 3.4cqw 3.6cqw; display: flex; flex-direction: column; gap: 1.6cqw; }
.book-half .story-picture { aspect-ratio: 4 / 3; border-radius: 1.8cqw; border: .35cqw solid var(--ink); }
.print-english { font-family: var(--head); font-weight: 600; font-size: 2.9cqw; line-height: 1.3; margin: 0; }
.print-translation { font-weight: 700; font-size: 1.75cqw; color: color-mix(in srgb, var(--ink) 62%, var(--white)); margin: 0; }
.page-number { position: absolute; bottom: 1.6cqw; left: 50%; transform: translateX(-50%); width: 3.4cqw; height: 3.4cqw; display: grid; place-items: center; font-family: var(--head); font-weight: 700; font-size: 1.7cqw; border-radius: 50%; border: .25cqw solid var(--ink); }
.book-front { text-align: center; justify-content: center; align-items: center; border: .5cqw solid var(--ink); border-radius: 2cqw; margin: 2cqw; padding: 2.4cqw; background: color-mix(in srgb, var(--yellow) 8%, var(--white)); }
.book-front .story-picture { width: 100%; }
.book-front h1 { font-family: var(--head); font-weight: 700; font-size: 4.2cqw; line-height: 1.05; margin: 0; }
.book-front h2 { font-family: var(--head); font-weight: 600; font-size: 2.3cqw; margin: 0; color: var(--ink-soft); }
.owner { font-weight: 800; font-size: 1.9cqw; margin: 1cqw 0 0; display: flex; align-items: flex-end; gap: 1cqw; width: 90%; }
.owner-line { flex: 1; border-bottom: .3cqw solid var(--ink); }
.book-brand { font-weight: 800; font-size: 1.4cqw; color: var(--ink-soft); }
.book-back h2 { font-family: var(--head); font-weight: 700; font-size: 3cqw; margin: 0; }
.draw-pt { margin: -1cqw 0 0; font-weight: 800; font-size: 1.7cqw; color: var(--ink-soft); }
.drawing-box { flex: 1; min-height: 12cqw; border: .35cqw dashed color-mix(in srgb, var(--ink) 50%, var(--white)); border-radius: 2cqw; }
.print-quiz { display: flex; flex-direction: column; gap: 1.1cqw; font-size: 1.55cqw; }
.print-quiz b { font-weight: 800; }
.print-quiz p { margin: .4cqw 0 0; display: flex; flex-wrap: wrap; gap: .6cqw 2.2cqw; }
.print-quiz span { display: inline-flex; align-items: center; gap: .7cqw; font-family: var(--head); font-weight: 600; }
.box { display: inline-block; width: 1.8cqw; height: 1.8cqw; border: .25cqw solid var(--ink); border-radius: .4cqw; }

/* ---------- diploma ---------- */
.diploma-view { max-width: 1060px; margin: 0 auto; }
.diploma-locked { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 6px; background: linear-gradient(180deg, var(--t-lilac), var(--card) 55%); }
.diploma-locked .meter { width: 100%; margin: 8px 0 14px; }
.mid-mascot { width: 150px; }
.diploma-sheet { width: 100%; max-width: 1000px; aspect-ratio: 297 / 210; margin: 18px auto 0; container-type: inline-size; background: var(--white); border-radius: 8px; box-shadow: var(--soft-shadow); padding: 2.4cqw; color: var(--ink); }
.cert-frame { position: relative; height: 100%; display: flex; flex-direction: column; border: .7cqw solid var(--ink); border-radius: 2.4cqw; padding: 4cqw 4.6cqw 3cqw;
  background: radial-gradient(circle at 0 0, var(--t-lilac) 0 14cqw, transparent 14.2cqw), radial-gradient(circle at 100% 100%, var(--t-teal) 0 16cqw, transparent 16.2cqw), color-mix(in srgb, var(--yellow) 6%, var(--white));
  box-shadow: inset 0 0 0 1cqw var(--white), inset 0 0 0 1.35cqw var(--gold); }
.cert-ribbon { align-self: center; position: relative; margin-top: -1cqw; }
.cert-ribbon span { position: relative; z-index: 1; display: block; font-family: var(--head); font-weight: 700; font-size: 4.4cqw; line-height: 1; padding: 1.3cqw 5cqw; background: var(--primary); color: var(--white); border: .45cqw solid var(--ink); border-radius: 1.4cqw; text-shadow: 0 .4cqw 0 var(--primary-dark); }
.cert-ribbon::before, .cert-ribbon::after { content: ''; position: absolute; top: 1.6cqw; width: 5cqw; height: 5cqw; background: var(--primary-dark); border: .45cqw solid var(--ink); }
.cert-ribbon::before { left: -3.4cqw; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 35% 50%); }
.cert-ribbon::after { right: -3.4cqw; clip-path: polygon(0 0, 100% 0, 65% 50%, 100% 100%, 0 100%); }
.cert-body { flex: 1; display: grid; grid-template-columns: 26cqw 1fr; gap: 3cqw; align-items: center; }
.cert-art { position: relative; }
.cert-art .mascot { width: 100%; }
.seal { position: absolute; right: -1cqw; bottom: -1cqw; width: 11cqw; height: 11cqw; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--gold); border: .45cqw solid var(--ink); box-shadow: 0 0 0 .8cqw var(--white), 0 0 0 1.15cqw var(--ink); transform: rotate(-10deg); }
.seal b { font-family: var(--head); font-weight: 700; font-size: 4.4cqw; line-height: 1; }
.seal small { font-weight: 800; font-size: 1.6cqw; }
.cert-small { margin: 0; font-weight: 800; font-size: 2.2cqw; color: var(--ink-soft); }
.cert-name { font-family: var(--head); font-weight: 700; font-size: 7cqw; line-height: 1.05; margin: .4cqw 0 1cqw; overflow-wrap: anywhere; color: var(--primary-dark); border-bottom: .4cqw dashed var(--gold); padding-bottom: .6cqw; }
.cert-text { margin: 0; font-size: 2.3cqw; font-weight: 700; line-height: 1.35; }
.cert-meta { display: flex; flex-wrap: wrap; gap: 1cqw 3cqw; margin: 1.6cqw 0 0; font-family: var(--head); font-weight: 600; font-size: 2.2cqw; }
.cert-meta span { display: inline-flex; align-items: center; gap: .8cqw; }
.cert-meta svg { width: 3cqw; height: 3cqw; }
.cert-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 3cqw; }
.signature { display: block; width: 36cqw; border-top: .3cqw solid var(--ink); padding-top: .6cqw; font-weight: 800; font-size: 1.7cqw; text-align: center; }
.cert-stars { display: flex; gap: .6cqw; }
.cert-stars svg { width: 3.6cqw; height: 3.6cqw; }

/* ---------- área dos pais (mais calma) ---------- */
.locked-view { max-width: 520px; margin: 10px auto; display: flex; flex-direction: column; align-items: center; background: linear-gradient(180deg, var(--t-lilac), var(--card) 55%); }
.parents { max-width: 980px; margin: 0 auto; }
.set-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.set { position: relative; overflow: hidden; }
.set::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: var(--lilac); border-bottom: 2px solid var(--ink); }
.set:nth-child(4n+2)::before { background: var(--teal); } .set:nth-child(4n+3)::before { background: var(--yellow); } .set:nth-child(4n)::before { background: var(--mint); }
.set p { margin: 0 0 10px; }
.set > .btn { width: 100%; margin-top: 8px; }
.switch { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 2px dashed var(--line); cursor: pointer; min-height: 56px; }
.switch:last-child { border-bottom: 0; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw { width: 60px; height: 36px; border-radius: 999px; border: var(--bw) solid var(--ink); background: color-mix(in srgb, var(--ink) 10%, var(--white)); position: relative; transition: background .2s; }
.sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--white); border: 2px solid var(--ink); transition: transform .25s var(--spring); box-shadow: 0 2px 0 var(--ink); }
.switch input:checked + .sw { background: var(--teal); }
.switch input:checked + .sw::after { transform: translateX(24px); }
.switch input:focus-visible + .sw { outline: 4px solid color-mix(in srgb, var(--teal) 70%, var(--white)); outline-offset: 3px; }
.sw-txt b { display: block; font-weight: 800; }
.sw-txt small { display: block; color: var(--ink-soft); font-weight: 600; }
.mini-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 0 0 12px; }
.mini-stat { display: flex; flex-direction: column; padding: 8px 10px; border: 2.5px solid var(--ink); border-radius: 14px; background: var(--t-mint); }
.mini-stat:nth-child(2) { background: var(--t-primary); } .mini-stat:nth-child(3) { background: var(--t-teal); } .mini-stat:nth-child(4) { background: var(--t-yellow); }
.mini-stat b { font-family: var(--head); font-size: 22px; line-height: 1.1; }
.mini-stat small { font-weight: 800; font-size: 13px; color: var(--ink-soft); }
.prog-list { list-style: none; padding: 0; margin: 0 0 12px; max-height: 240px; overflow: auto; }
.prog-list li { padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 15px; display: flex; gap: 4px 6px; flex-wrap: wrap; }
.prog-list li span { margin-left: auto; font-weight: 800; color: var(--ink-soft); }

/* ---------- barra inferior ---------- */
.tabbar {
  position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: calc(10px + env(safe-area-inset-bottom));
  width: min(560px, calc(100% - 20px)); height: var(--tabbar-h); display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; padding: 6px;
  background: var(--card); border: var(--bw) solid var(--ink); border-radius: 28px; box-shadow: var(--lift);
}
.tabbar button { --tc: var(--primary); border: 0; background: transparent; border-radius: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-weight: 800; font-size: 12px; color: var(--ink-soft); padding: 0; min-width: 0; transition: background .2s, color .2s, transform .1s; }
.tabbar button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tabbar button[data-tab="trilha"] { --tc: var(--teal); } .tabbar button[data-tab="album"] { --tc: var(--yellow); } .tabbar button[data-tab="livrinhos"] { --tc: var(--lilac); } .tabbar button[data-tab="pais"] { --tc: var(--mint); }
.tabbar button:active { transform: scale(.94); }
.tabbar svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tabbar button[aria-current] { background: color-mix(in srgb, var(--tc) 45%, var(--white)); color: var(--ink); box-shadow: inset 0 0 0 2.5px var(--ink), inset 0 -4px 0 color-mix(in srgb, var(--tc) 70%, var(--ink)); }
.tabbar button[aria-current] svg { animation: hop .45s var(--spring); }
@keyframes hop { 40% { transform: translateY(-5px) scale(1.12); } }
/* lição em tela cheia: sem a barra inferior dentro do dia */
body[data-view="dia"] { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
body[data-view="dia"] .tabbar { display: none; }
body[data-view="dia"] #toast { bottom: calc(24px + env(safe-area-inset-bottom)); }
body[data-view="dia"] main { padding-top: 20px; }

/* ---------- diálogos, aviso, confete ---------- */
dialog { border: var(--bw) solid var(--ink); border-radius: 28px; box-shadow: var(--lift); padding: 24px 22px 22px; width: min(440px, calc(100% - 32px)); background: var(--card); color: var(--ink); overflow: hidden; }
dialog::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: linear-gradient(90deg, var(--primary) 0 25%, var(--gold) 25% 50%, var(--teal) 50% 75%, var(--lilac) 75%); }
dialog[open] { animation: pop .4s var(--spring); }
dialog::backdrop { background: color-mix(in srgb, var(--ink) 45%, transparent); backdrop-filter: blur(2px); }
dialog h2 { font-family: var(--head); font-weight: 700; font-size: 25px; margin: 0 0 8px; line-height: 1.15; }
dialog p { margin: 0 0 12px; }
dialog .actions { justify-content: flex-end; margin-top: 12px; }
dialog .actions .btn { flex: 1; min-width: 120px; }
.install-id { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.install-id h2 { margin: 0; font-size: 21px; }
.install-id small { font-weight: 800; color: var(--ink-soft); }
.install-logo { width: 58px; height: 58px; flex: none; border-radius: 16px; overflow: hidden; border: var(--bw) solid var(--ink); display: grid; place-items: center; background: var(--t-lilac); transform: rotate(-4deg); }
.install-logo img, .install-logo svg { width: 100%; height: 100%; object-fit: cover; }
.steps { margin: 0 0 8px; padding-left: 22px; }
.steps li { margin: 6px 0; }
.ios-share svg { width: 20px; height: 20px; vertical-align: -4px; fill: none; stroke: var(--ios-blue); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
#toast { position: fixed; z-index: 60; left: 50%; bottom: calc(var(--tabbar-h) + 28px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--ink); color: var(--white); font-weight: 800; padding: 12px 18px; border-radius: 18px; border: var(--bw) solid var(--ink); box-shadow: 0 4px 0 color-mix(in srgb, var(--primary) 70%, var(--ink)); width: max-content; max-width: calc(100% - 32px); text-align: center; transition: opacity .25s, transform .3s var(--spring); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#fx { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
#fx i { position: absolute; top: -16px; width: 12px; height: 16px; border-radius: 3px; border: 1.5px solid var(--ink); animation: fall 2.3s cubic-bezier(.25,.6,.45,1) forwards; }
@keyframes fall { to { transform: translate(var(--x), 105vh) rotate(var(--r)); } }

/* ---------- telas maiores ---------- */
@media (min-width: 720px) {
  .home { grid-template-columns: 1.2fr 1fr; grid-template-rows: auto auto auto 1fr; align-items: start; }
  .hero { grid-column: 1 / -1; padding: 34px 40px 0 34px; grid-template-areas: "hello mascot" "coach mascot"; }
  .hero-mascot { margin-bottom: 10px; }
  .today { grid-row: 2 / span 3; }
  .stats { grid-column: 2; grid-row: 2; grid-template-columns: 1fr 1fr; }
  .quick { grid-column: 2; grid-row: 3; grid-template-columns: 1fr 1fr; }
  .opening { grid-template-columns: 1.05fr 1fr; align-items: start; }
  .opening-art { position: sticky; top: 100px; }
  .book-spread { grid-template-columns: 1.15fr 1fr; border-radius: 14px; min-height: 420px; }
  /* livro aberto: imagem na página da esquerda, texto na da direita, lombada no meio */
  .book-spread::before { left: calc(53.5% - 20px); width: 40px; border-radius: 0; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--ink) 14%, transparent) 45%, color-mix(in srgb, var(--ink) 24%, transparent) 50%, color-mix(in srgb, var(--ink) 10%, transparent) 56%, transparent); }
  .book-spread::after { border-radius: 0 0 14px 0; }
  .leaf-art { padding: 22px 30px 22px 22px; display: flex; align-items: center; }
  .leaf-art .page-art { width: 100%; }
  .leaf-text { padding: 26px 30px 44px 36px; }
  .order-bank { grid-template-columns: repeat(4, 1fr); }
  .album-grid { grid-template-columns: repeat(5, 1fr); }
  .shelf { grid-template-columns: 1fr 1fr; }
  .set-grid { grid-template-columns: 1fr 1fr; }
  .mini-stats { grid-template-columns: repeat(4, 1fr); }
  .land-grid { row-gap: 34px; }
  .node { width: 72px; height: 72px; }
  .node.current { width: 82px; height: 82px; }
  .chat { padding: 0 10px; }
  .stage { padding: 56px 56px 30px; min-height: 340px; }
  .curtain { width: 44px; }
}
@media (max-width: 380px) {
  body { font-size: 16px; }
  .node { width: 54px; height: 54px; border-radius: 17px; } .node.current { width: 62px; height: 62px; }
  .node-face .ico { width: 26px; height: 26px; }
  .quick { grid-template-columns: 1fr 1fr; }
  .stage { padding: 46px 32px 24px; } .curtain { width: 24px; }
  .coach-av { width: 50px; height: 50px; } .coach-rep { width: 54px; height: 54px; } .coach-bubble { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .flip-inner { animation: none; transform: rotateY(180deg); }
}

/* ---------- impressão ---------- */
@media print {
  html, body { background: var(--white) !important; padding: 0 !important; margin: 0 !important; }
  body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body::before { display: none !important; }
  .topbar, .tabbar, .no-print, #toast, #fx, .skip, dialog { display: none !important; }
  main { padding: 0 !important; max-width: none !important; }
  .book-print-view, .diploma-view { max-width: none; }
  .book-sheets { display: block; }
  .book-sheet { width: 297mm; height: 210mm; max-width: none; aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none; margin: 0; break-after: page; page-break-after: always; break-inside: avoid; }
  .book-sheet:last-child { break-after: auto; page-break-after: auto; }
  .sheet-n { display: none; }
  .diploma-sheet { width: 297mm; height: 210mm; max-width: none; aspect-ratio: auto; margin: 0; border-radius: 0; box-shadow: none; break-inside: avoid; }
  body:not([data-view="livrinho"]):not([data-view="diploma"]) main::before { content: 'Para imprimir, abra um livrinho ou o diploma.'; }
}

/* U11: navegação e estrelas F3 */
.day-actions {
  position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: calc(10px + env(safe-area-inset-bottom));
  width: min(520px, calc(100% - 24px)); height: var(--tabbar-h); display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 6px;
  background: var(--card); border: var(--bw) solid var(--ink); border-radius: 28px; box-shadow: var(--lift);
}
/* lição em tela cheia: sem a barra inferior dentro do dia */
body[data-view="dia"] { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
body[data-view="dia"] .tabbar, body[data-view="onboarding"] .tabbar { display: none; }
body[data-view="dia"] { padding-bottom: calc(var(--tabbar-h) + 20px + env(safe-area-inset-bottom)); }
body[data-view="onboarding"] { padding-bottom: 12px; }
.day-actions { display: flex; align-items: stretch; gap: 8px; }
.day-home { background: transparent; border: 0; border-radius: 20px; color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 54px; font: inherit; font-size: 13px; font-weight: 800; }
.day-home svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.day-primary { margin-left: auto; display: flex; gap: 6px; align-items: center; min-width: 0; }
.day-primary .btn { min-height: 48px; padding: 10px 12px; font-size: 16px; }
.day-primary #prevWord { padding: 8px; min-width: 36px; }
.home-cta .btn { width: 100%; }
.game-stars { display: flex; justify-content: center; gap: 4px; grid-column: 1 / -1; }
.game-stars .star-ico { width: 30px; height: 30px; }
.game-result { text-align: center; max-width: 520px; margin: 20px auto; }
.game-result .game-stars .star-ico { width: 54px; height: 54px; }
.star-leaving { animation: star-leaving .6s ease both; }
@keyframes star-leaving { to { transform: translateY(-18px) rotate(50deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .star-leaving { animation: none; } }
.redo-small { padding: 4px 8px; min-height: 32px; font-size: 12px; margin-top: 4px; }
.step-6 .stepper { margin-bottom: 22px; }
.reward .actions { margin-top: 6px; }
@media (max-width:699px) and (max-height:760px) {
  .step-6 .day-head { margin-bottom: 8px; }
  .step-6 .stepper { margin-bottom: 20px; }
  .step-6 .reward .flip { width: 115px; height: 115px; margin: 5px auto; }
  .step-6 .reward h2, .step-6 .reward p { margin: 5px 0; }
  .step-6 .reward .result-band { font-size: 14px; line-height: 1.35; }
  .step-6 .reward .title-lg { font-size: 22px; }
}
body[data-view="dia"] #toast { bottom: calc(24px + env(safe-area-inset-bottom)); }
body[data-view="dia"] main { padding-top: 18px; }


body[data-view="dia"] {padding-bottom:calc(var(--tabbar-h) + 20px + env(safe-area-inset-bottom))}
.day-primary .btn{font-size:14px;line-height:1.15;white-space:normal}.day-primary #previous{min-width:32px;padding:6px}.day-home{max-width:78px;flex-shrink:0}.day-primary{flex:1;justify-content:flex-end}.day-primary .primary{max-width:100%}
#fx{z-index:0}.day{position:relative;z-index:1}.day-actions,.tabbar{position:fixed;z-index:30}.topbar{z-index:20}
.result-stars{display:flex;justify-content:center;gap:12px}.result-stars>div{display:flex;gap:2px}.result-stars .star-ico{width:25px;height:25px}.reward .flip{width:150px;height:150px;margin:8px auto}.reward{position:relative;z-index:1}.reward h2,.reward p{margin:8px 0}.reward .actions{gap:6px}.reward .actions .btn{font-size:13px;min-height:38px;padding:8px}.reward .title-lg{font-size:25px}.home-cta{display:none}.spot>small{display:block;text-align:center}.turn-panel{scroll-margin-bottom:calc(var(--tabbar-h) + 35px)}
@media(max-width:699px){.home{display:flex;flex-direction:column;gap:14px}.home .hero{order:0;min-height:150px;padding:16px}.home-cta{display:block;order:1}.home-cta .btn{width:100%}.home .today{order:2}.home .stats{order:3}.home .quick{order:4}.home .hero-mascot{width:104px;height:120px}.home .hello{font-size:28px}.home .today-body>.primary{display:none}.home .hero-coach{margin:8px 0 0}.home .coach-bubble{font-size:14px}.onboard{padding:8px 0;gap:8px}.onboard-art,.onboard-art .mascot{height:115px;width:115px;margin:0 auto}.onboard .title-xl{font-size:25px;margin:6px 0}.onboard .lead{font-size:14px;margin:5px 0}.onboard .coach-line{margin:6px 0}.onboard .name-card{padding:12px;margin:6px auto}.onboard .field{margin-bottom:10px}.onboard .hint{font-size:11px;margin:6px 0}.onboard .coach-bubble{font-size:14px}.onboard .btn{min-height:48px}.reward .flip{max-width:150px;max-height:150px}.step-6 .coach-box{display:none}}

/* =====================================================================================================
   U11C (26/11): estrelas sempre à vista na barra do dia + barra fixa que nunca cobre a atividade + instalar.
   ===================================================================================================== */
@media screen {
  html { scroll-padding-bottom: calc(var(--tabbar-h) + 34px + env(safe-area-inset-bottom)); }
  /* chão atrás da barra do dia: o conteúdo que rola some atrás dele, nunca aparece cortado em volta da barra */
  .day-floor { position: fixed; z-index: 29; left: 0; right: 0; bottom: 0; height: calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--mint) 72%, var(--teal)); border-top: var(--bw) solid var(--ink); border-radius: 26px 26px 0 0; box-shadow: inset 0 5px 0 color-mix(in srgb, var(--white) 35%, transparent); }
  body[data-view="dia"] { padding-bottom: calc(var(--tabbar-h) + 44px + env(safe-area-inset-bottom)); }
  /* estrelas: ganhas hoje + total geral, ao lado de "Início" */
  .day-stars { flex: none; align-self: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 64px; padding: 5px 9px 4px; border: 2.5px solid var(--ink); border-radius: 18px; background: color-mix(in srgb, var(--yellow) 58%, var(--white)); box-shadow: inset 0 -4px 0 color-mix(in srgb, var(--yellow) 72%, var(--ink)); line-height: 1; }
  .ds-today { display: flex; align-items: center; gap: 3px; font-family: var(--head); font-weight: 700; white-space: nowrap; }
  .ds-today .star-ico { width: 22px; height: 22px; flex: none; }
  .ds-today b { font-size: 21px; }
  .ds-today small { font-family: var(--body); font-size: 12px; font-weight: 800; }
  .ds-total { font-size: 11.5px; font-weight: 800; white-space: nowrap; padding-bottom: 3px; }
  .ds-total b { font-weight: 900; }
  .day-stars.bump { animation: ds-bump .7s var(--spring) both; }
  .day-primary .btn { min-width: 0; }
}
@keyframes ds-bump { 0% { transform: scale(1); } 35% { transform: scale(1.22) rotate(-4deg); } }
@media (prefers-reduced-motion: reduce) { .day-stars.bump { animation: none; } }
@media screen and (max-width: 719px) { .day-primary .btn { padding: 8px 10px; } }
/* instalar: espera pelo pedido do Chrome e atalho "Abrir no Chrome" (outros navegadores do Android) */
#installDialog .btn[aria-busy="true"] { opacity: .8; cursor: progress; box-shadow: 0 2px 0 var(--ink); transform: translateY(4px); }
.install-alt { display: grid; gap: 10px; }

/* U11C, passo 5.5: o rótulo longo da última página cabe inteiro na barra móvel. */
@media screen and (max-width: 719px) {
  .day-primary #pageNext { padding: 4px 5px; gap: 3px; }
  .day-primary #pageNext .ico { width: 16px; flex: none; }
}

/* =====================================================================================================
   V2 (26/11/2026): O DIA É UMA MOLDURA FIXA — nada rola; o que se ajusta à altura é a figura.
   topo compacto · "Dia N · título" · caminho do dia (6 etapas com nome) · Pipa (balão de altura fixa) · UMA tarefa · barra.
   Tudo aqui vale só dentro de .d2 (o dia) ou de body[data-view="dia"]; as outras telas não mudam.
   ===================================================================================================== */
@media screen {
  body[data-view="dia"] { display: flex; flex-direction: column; height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; padding-bottom: 0; }
  body[data-view="dia"] .topbar { position: relative; flex: none; gap: 8px; padding: calc(6px + env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 7px max(12px, env(safe-area-inset-left)); }
  body[data-view="dia"] .brand-logo-wrap { width: 38px; height: 38px; border-radius: 12px; }
  body[data-view="dia"] .brand-name b { font-size: 17px; }
  body[data-view="dia"] .brand-name small { display: none; }
  body[data-view="dia"] .topbar .icon-btn { width: 40px; height: 40px; }
  body[data-view="dia"] .topbar .icon-btn svg { width: 21px; height: 21px; }
  body[data-view="dia"] main { flex: 1; min-height: 0; max-width: 560px; padding: 15px 12px 0; display: flex; flex-direction: column; }
  .d2 { flex: 1; min-height: 0; width: 100%; max-width: none; margin: 0; display: flex; flex-direction: column; gap: 7px; padding-bottom: calc(var(--tabbar-h) + 30px + env(safe-area-inset-bottom)); }
}
/* cabeçalho de uma linha */
.d2-head { flex: none; display: flex; align-items: center; gap: 7px; min-height: 22px; }
.d2-kind { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; border: 2px solid var(--ink); background: color-mix(in srgb, var(--tc) 32%, var(--white)); }
.d2-kind .ico { width: 15px; height: 15px; stroke-width: 2.6; }
.d2-title { flex: 1; min-width: 0; margin: 0; display: flex; align-items: baseline; gap: 7px; font-family: var(--head); font-weight: 650; font-size: 16px; line-height: 1.15; }
.d2-title b { flex: none; color: var(--ink-soft); font-weight: 700; }
.d2-title span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* caminho do dia: 6 etapas, TODAS com nome. É indicador (achatado, sem relevo de botão). */
.d2-path { flex: none; position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.d2-path::before { content: ''; position: absolute; left: 8.33%; right: 8.33%; top: 13px; height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--ink) 16%, var(--white)); }
.d2-path li { position: relative; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.p-dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--white); border: 2px solid color-mix(in srgb, var(--ink) 30%, var(--white)); color: color-mix(in srgb, var(--ink) 42%, var(--white)); }
.p-dot .ico { width: 16px; height: 16px; stroke-width: 2.5; }
.p-dot .ico-abc { width: 22px; height: 22px; }
.p-lbl { max-width: 100%; font-family: var(--head); font-weight: 600; font-size: 11px; line-height: 1.1; letter-spacing: -.1px; white-space: nowrap; color: var(--ink-soft); }
.d2-path li.done .p-dot { background: var(--mint); border-color: var(--ink); color: var(--ink); }
.d2-path li.done .p-dot .ico { stroke-width: 3.4; }
.d2-path li.now .p-dot { background: var(--tc); border-color: var(--ink); color: var(--white); transform: scale(1.12); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 85%, var(--white)); }
.d2.conv .d2-path li.now .p-dot { color: var(--ink); }
.d2-path li.now .p-lbl { color: var(--ink); font-weight: 700; }
/* Pipa: sempre no mesmo lugar; balão com altura fixa (3 linhas) para a tela não pular */
.d2 .d2-coach { flex: none; margin: 0; gap: 8px; }
.d2 .d2-coach .coach-av { width: 48px; height: 48px; }
.d2 .d2-coach .coach-bubble { height: 64px; min-height: 0; overflow: hidden; padding: 4px 12px; border-radius: 18px; font-size: 15px; line-height: 1.2; }
.d2 .d2-coach .coach-bubble.fit1 { font-size: 13.5px; line-height: 1.18; }
.d2 .d2-coach .coach-bubble.fit2 { font-size: 12.5px; line-height: 1.14; }
.d2 .d2-coach .coach-rep { width: 48px; height: 48px; }
.d2 .d2-coach .coach-rep svg { width: 24px; height: 24px; }
.d2.d2 .coach.empty .coach-bubble:empty { visibility: visible; }
/* a tarefa: ocupa o que sobra; não rola (só rolaria numa tela menor que qualquer celular atual) */
.d2-task { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; padding: 2px 3px 9px; overflow: hidden auto; animation-duration: .25s; container-type: size; }
.d2-task > * { flex: none; }
.fitbox, .page2-art, .conv2-scene, .cover2-art { flex: 1 1 0; min-height: 0; container-type: size; display: grid; place-items: center; }
/* ---------- barra: botão principal sempre no mesmo lugar ---------- */
.d2 .day-primary { flex: 1; position: relative; justify-content: flex-end; gap: 6px; }
.d2 .day-primary .main { position: relative; min-width: 120px; max-width: 100%; min-height: 56px; padding: 6px 12px 8px 16px; gap: 6px; font-size: 19px; line-height: 1.05; white-space: nowrap; }
.d2 .day-primary .main .ico { width: 22px; height: 22px; flex: none; }
.d2 .day-primary .main[data-act="start"] .ico { fill: currentColor; }
.main-txt { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.main-txt b { font-weight: 700; }
.main-txt small { max-width: 100%; font-family: var(--body); font-weight: 800; font-size: 11.5px; line-height: 1.1; text-shadow: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .96; }
.d2 .day-primary .prev { flex: none; min-width: 40px; min-height: 46px; padding: 6px; }
.d2 .day-primary .prev .ico { width: 20px; height: 20px; }
/* pronto: anel dourado fixo + pulso + seta pulando em cima do botão */
.d2 .day-primary .main.ready { animation: mainPulse 1.15s ease-in-out infinite; outline: 4px solid var(--gold); outline-offset: 2px; }
.d2 .day-primary .main.ready::before { content: ''; position: absolute; left: 50%; top: -31px; width: 28px; height: 28px; margin-left: -14px; border-radius: 50%; background: var(--gold); border: var(--bw) solid var(--ink); box-shadow: 0 3px 0 var(--ink); animation: hintBob .7s ease-in-out infinite alternate; pointer-events: none; }
.d2 .day-primary .main.ready::after { content: ''; position: absolute; left: 50%; top: -24px; width: 9px; height: 9px; margin-left: -4.5px; border-right: 3.5px solid var(--ink); border-bottom: 3.5px solid var(--ink); transform: rotate(45deg); animation: hintBob2 .7s ease-in-out infinite alternate; pointer-events: none; box-sizing: border-box; }
@keyframes mainPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes hintBob { to { transform: translateY(6px); } }
@keyframes hintBob2 { from { transform: rotate(45deg); } to { transform: translateY(6px) rotate(45deg); } }
/* alvo da fala da Pipa e convite para tocar */
.cue { outline: 4px solid var(--gold); outline-offset: 3px; animation: cuePulse .6s ease-in-out infinite alternate; }
@keyframes cuePulse { to { outline-offset: 8px; } }
@keyframes wiggle { 0%, 55%, 100% { transform: rotate(0); } 68% { transform: rotate(-2.2deg) scale(1.02); } 84% { transform: rotate(2.2deg) scale(1.02); } }
.node.current { outline: 4px solid var(--gold); outline-offset: 3px; }
.redo-small.restart { margin-top: 26px; position: relative; z-index: 3; white-space: nowrap; }
/* ---------- capa ---------- */
.cover2 { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cover2-art { width: 100%; cursor: pointer; }
.d2 .cover-book, .d2 .poster { width: 100%; max-width: 440px; }
.d2 .cover-label h2, .d2 .poster-label h2 { font-size: clamp(20px, 6vw, 28px); }
.d2 .cover-label p, .d2 .poster-label p { font-size: 15px; }
.d2 .cast { flex: none; margin: 0; gap: 10px; flex-wrap: nowrap; }
.d2 .cast-member { flex-direction: row; flex-wrap: wrap; justify-content: center; min-width: 0; gap: 4px 8px; padding: 6px 12px 6px 6px; }
.d2 .cast-member .avatar { width: 44px; height: 44px; }
.d2 .cast-member b { font-size: 16px; }
.d2 .cast-member .you-tag { font-size: 12.5px; padding: 0 8px; }
.d2 .best-mark { flex: none; margin: 0; display: inline-flex; align-items: center; gap: 6px; font-family: var(--head); font-weight: 650; font-size: 15px; background: var(--mint); border: 2.5px solid var(--ink); border-radius: 999px; padding: 3px 14px 3px 8px; box-shadow: 0 3px 0 var(--ink); }
.d2 .best-mark .ico { width: 18px; height: 18px; stroke-width: 3.2; }
/* ---------- palavras novas: 3 cartões grandes ---------- */
.words2 { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 13px; }
.word-card { --wc: var(--primary); flex: 0 1 104px; min-height: 70px; width: 100%; display: flex; align-items: center; gap: 14px; padding: 8px 14px; text-align: left; font: inherit; color: var(--ink); border: var(--bw) solid var(--ink); border-radius: var(--r-md); background: color-mix(in srgb, var(--wc) 20%, var(--white)); box-shadow: var(--lift), inset 0 -5px 0 color-mix(in srgb, var(--wc) 38%, var(--white)); transition: transform .1s, box-shadow .1s, background .2s; }
.word-card.w1 { --wc: var(--teal); } .word-card.w2 { --wc: var(--lilac); }
.word-card:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--ink); }
.wc2-ico { flex: none; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--wc); border: var(--bw) solid var(--ink); box-shadow: 0 3px 0 var(--ink); color: var(--ink); }
.wc2-ico .ico { width: 28px; height: 28px; stroke-width: 2.7; }
.wc2-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wc2-txt b { font-family: var(--head); font-weight: 700; font-size: clamp(22px, 6.6vw, 28px); line-height: 1.08; overflow-wrap: anywhere; }
.wc2-txt small { font-weight: 800; font-size: 16px; line-height: 1.15; color: var(--ink-soft); }
.wc2-ok { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--mint); border: 2.5px solid var(--ink); opacity: 0; transform: scale(.4); transition: opacity .2s, transform .3s var(--spring); }
.wc2-ok .ico { width: 18px; height: 18px; stroke-width: 3.4; }
.word-card.heard .wc2-ok { opacity: 1; transform: none; }
.word-card.speaking { background: color-mix(in srgb, var(--yellow) 55%, var(--white)); }
.word-card.invite { animation: wiggle 1.5s ease-in-out infinite; }
.word-card.invite .wc2-ico { box-shadow: 0 3px 0 var(--ink), 0 0 0 5px color-mix(in srgb, var(--gold) 80%, transparent); }
/* ---------- página da história ---------- */
.page2 { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 7px; padding: 9px 11px 10px 18px; border: var(--bw) solid var(--ink); border-radius: 10px 22px 22px 10px; background: var(--paper); box-shadow: 4px 5px 0 var(--ink); }
.page2::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 14px; border-radius: 7px 0 0 7px; pointer-events: none; background: linear-gradient(90deg, color-mix(in srgb, var(--ink) 20%, transparent), transparent); }
.page2-art { cursor: pointer; }
.page2-art .page-art { width: 100%; aspect-ratio: 4 / 3; border-radius: 12px; }
.page2-text { flex: none; display: flex; flex-direction: column; gap: 5px; }
.d2 .page2-text .english-line { font-size: clamp(20px, 5.8vw, 24px); line-height: 1.22; }
.d2 .page2-text .translation { padding: 4px 10px; font-size: 14.5px; line-height: 1.25; transform: none; border-width: 2px; }
.page2.turn-next { animation: pageNext .32s ease-out both; } .page2.turn-prev { animation: pagePrev .32s ease-out both; }
@keyframes pageNext { from { opacity: .3; transform: translateX(26px); } } @keyframes pagePrev { from { opacity: .3; transform: translateX(-26px); } }
.pager { flex: none; display: flex; align-items: center; gap: 8px; min-height: 20px; padding: 0 2px; }
.pager-lbl { flex: none; display: inline-flex; align-items: center; gap: 4px; font-family: var(--head); font-weight: 650; font-size: 13.5px; }
.pager-lbl .ico { width: 16px; height: 16px; }
.d2 .pager .page-dots { flex: 1; flex-wrap: nowrap; gap: 6px; }
.d2 .pager .page-dots i { width: 12px; height: 12px; border-width: 2px; }
.d2 .pager .page-count { flex: none; width: auto; font-size: 13px; }
.d2 .tool-row { flex: none; max-width: none; margin: 0; gap: 8px; }
.d2 .tool-row.one { grid-template-columns: 1fr; justify-items: center; }
.d2 .btn.tool { flex-direction: row; gap: 6px; min-height: 44px; padding: 5px 8px 7px; border-radius: 16px; font-size: 13.5px; line-height: 1.05; box-shadow: var(--lift-sm), inset 0 -4px 0 var(--line); }
.d2 .btn.tool .ico { width: 20px; height: 20px; }
.d2 .tool-row.one .btn.tool, .d2 .btn.tool.wide { padding: 5px 20px 7px; font-size: 15.5px; }
.d2 .btn.tool:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 0 0 var(--ink); }
/* ---------- conversa: cena + UMA fala por vez ---------- */
.conv2 { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.conv2-scene .scene-art { width: 100%; aspect-ratio: 4 / 3; overflow: hidden; border: var(--bw) solid var(--ink); border-radius: 16px; box-shadow: var(--lift-sm); background: linear-gradient(160deg, var(--t-sky), var(--t-mint)); }
.scene-art img { width: 100%; height: 100%; object-fit: cover; }
.line2 { --bc: var(--lilac); flex: none; width: 100%; display: flex; align-items: flex-start; gap: 9px; padding: 0; border: 0; background: none; text-align: left; font: inherit; color: var(--ink); }
.line2 .avatar { width: 52px; height: 52px; background: color-mix(in srgb, var(--bc) 50%, var(--white)); }
.line2-copy { flex: 1; min-width: 0; min-height: 100px; display: flex; flex-direction: column; gap: 3px; padding: 6px 12px 9px; border: var(--bw) solid var(--ink); border-radius: 6px 20px 20px 20px; background: color-mix(in srgb, var(--bc) 32%, var(--white)); box-shadow: 0 4px 0 var(--ink); }
.conv2.understand .line2-copy { min-height: 144px; }
.line2 .who, .turn-copy .who { font-family: var(--head); font-weight: 700; font-size: 14px; color: color-mix(in srgb, var(--bc) 30%, var(--ink)); }
.d2 .line2 .english-line, .d2 .turn-copy .english-line { font-size: clamp(19px, 5.4vw, 22px); line-height: 1.2; }
.d2 .line2 .translation { padding: 4px 0 0; font-size: 14.5px; line-height: 1.25; transform: none; background: none; border: 0; border-top: 2px dashed color-mix(in srgb, var(--bc) 60%, var(--ink)); border-radius: 0; color: var(--ink-soft); }
.line2.speaking { animation: none; }
.line2.speaking .line2-copy, .turn-card.speaking .turn-copy { box-shadow: 0 4px 0 var(--ink), 0 0 0 4px color-mix(in srgb, var(--gold) 80%, transparent); }
.line2.pop .line2-copy { animation: pop .3s var(--spring) both; }
/* ---------- fases com estrelas: cabeçalho ---------- */
.phase-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 32px; }
.d2 .phase-head .game-stars { justify-content: flex-start; gap: 3px; }
.d2 .phase-head .game-stars .star-ico { width: 30px; height: 30px; }
.phase-lbl { font-family: var(--head); font-weight: 650; font-size: 14px; background: var(--white); border: 2px solid var(--ink); border-radius: 999px; padding: 2px 12px; }
/* ---------- respostas ---------- */
.q2 { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; }
.d2 .answer-options { width: 100%; max-width: none; margin: 0; gap: 11px; border-radius: 18px; }
.d2 .answer-card { min-height: 62px; padding: 7px 12px 9px 9px; font-size: clamp(18px, 5.2vw, 22px); line-height: 1.12; }
.d2 .answer-card.long { font-size: 16px; }
.d2 .answer-mark { width: 34px; height: 34px; }
.d2 .answer-mark .ico { width: 20px; height: 20px; }
.d2 .option-audio { width: 56px; min-height: 56px; }
.answer-row.speaking { animation: none; }
.answer-row.speaking .answer-card { background: color-mix(in srgb, var(--yellow) 60%, var(--white)); box-shadow: var(--lift), 0 0 0 4px color-mix(in srgb, var(--gold) 80%, transparent); }
.answer-row.speaking .option-audio { background: var(--yellow); }
/* ---------- teatrinho ---------- */
.th2 { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 9px; }
.ctx-line { --bc: var(--lilac); flex: none; width: 100%; display: flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; text-align: left; font: inherit; color: var(--ink); }
.ctx-line .avatar { width: 40px; height: 40px; background: color-mix(in srgb, var(--bc) 50%, var(--white)); }
.ctx-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 4px 12px 6px; border: 2.5px solid var(--ink); border-radius: 6px 16px 16px 16px; background: color-mix(in srgb, var(--bc) 32%, var(--white)); font-family: var(--head); font-weight: 600; font-size: 16px; line-height: 1.18; }
.ctx-copy .who { font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.ctx-line.speaking { animation: none; } .ctx-line.speaking .ctx-copy { box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 80%, transparent); }
.turn-card { --bc: var(--lilac); flex: none; display: flex; flex-direction: row-reverse; align-items: center; gap: 9px; }
.turn-card .avatar { width: 52px; height: 52px; background: color-mix(in srgb, var(--bc) 50%, var(--white)); }
.turn-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; padding: 6px 14px 8px; border: var(--bw) solid var(--ink); border-radius: 20px 6px 20px 20px; background: color-mix(in srgb, var(--gold) 60%, var(--white)); box-shadow: 0 4px 0 var(--ink); }
.turn-copy .you-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 19px; padding: 0; border: 0; background: none; box-shadow: none; }
.turn-copy .you-tag .ico { width: 22px; height: 22px; color: var(--primary); }
.turn-card.said .turn-copy { align-items: flex-start; background: color-mix(in srgb, var(--bc) 50%, var(--white)); }
.turn-card.speaking { animation: none; }
/* ---------- minha vez de falar ---------- */
.speak2 { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding-top: 14px; }
.d2 .speak-card { max-width: none; margin: 0; padding: 20px 12px 12px; }
.d2 .speak-card .english-line { font-size: clamp(23px, 6.6vw, 30px); line-height: 1.15; }
.d2 .speak-pt { margin: 4px 0 9px; font-size: 15px; }
.d2 .record-zone { flex: none; max-width: none; margin: 0; gap: 6px; }
.d2 .record-button { width: 108px; height: 108px; font-size: 16px; }
.d2 .record-button .ico { width: 42px; height: 42px; }
.d2 .record-button.invite { animation: recording 1.2s ease-in-out infinite; }
.d2 .record-time { margin: 0; font-size: 17px; }
.d2 .record-tip { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 0; font-size: 19px; }
.d2 .record-tip .ico { width: 26px; height: 26px; }
.d2 .cmp-card { flex-direction: row; justify-content: center; gap: 8px; min-height: 0; padding: 9px 6px; font-size: 16px; box-shadow: var(--lift-sm); }
.d2 .cmp-ico { width: 38px; height: 38px; } .d2 .cmp-ico .ico { width: 20px; height: 20px; }
.d2 .cmp-card.speaking { animation: none; box-shadow: var(--lift-sm), 0 0 0 4px color-mix(in srgb, var(--gold) 80%, transparent); }
.d2 .btn.again { min-height: 40px; padding: 5px 14px 7px; font-size: 14px; box-shadow: var(--lift-sm), inset 0 -4px 0 var(--line); }
.d2 .btn.again .ico { width: 18px; height: 18px; }
.d2 .speak-privacy { flex: none; margin: 0; font-size: 12px; line-height: 1.2; }
/* ---------- jogos ---------- */
.d2 .g2 { flex: 1; min-height: 0; width: 100%; max-width: none; margin: 0; gap: 9px; justify-content: center; align-items: stretch; }
.d2 .g2 > * { flex: none; }
.d2 .order-slots { gap: 6px; }
.d2 .order-slot { border-width: 2.5px; border-radius: 12px; }
.d2 .order-slot.speaking { animation: none; border-color: var(--ink); border-style: solid; background: color-mix(in srgb, var(--yellow) 60%, var(--white)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 80%, transparent); }
.d2 .g2 > .order-bank { flex: 1 1 0; min-height: 0; grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 12px; }
.d2 .order-choice { min-height: 0; min-width: 0; container-type: size; display: grid; place-items: center; }
.d2 .order-piece { padding: 5px; width: 100%; }
.d2 .order-choice .option-audio { right: -2px; top: -6px; width: 44px; height: 44px; min-height: 44px; }
.d2 .order-choice .option-audio svg { width: 22px; height: 22px; }
.d2 .order-choice.placed .option-audio { opacity: .35; }
.d2 .order-choice.speaking { animation: none; } .d2 .order-choice.speaking .order-piece { box-shadow: var(--lift), 0 0 0 4px color-mix(in srgb, var(--gold) 80%, transparent); }
.d2 .order-bank.invite .order-piece:not(:disabled) { animation: wiggle 1.6s ease-in-out infinite; }
.d2 .order-bank.invite .order-choice:nth-child(2n) .order-piece { animation-delay: .25s; }
.d2 .sentence-slots { padding: 8px 6px 10px; gap: 6px; }
.d2 .sentence-slot { min-width: 54px; min-height: 48px; border-radius: 14px; }
.d2 .word-piece { min-height: 46px; padding: 5px 13px 8px; border-radius: 14px; font-size: 19px; }
.d2 .word-bank { gap: 11px 8px; min-height: 52px; padding-bottom: 5px; }
.d2 #builtSentence { padding: 5px 12px; font-size: 20px; line-height: 1.2; }
.d2 .complete-card { max-width: none; }
.d2 .complete-card .avatar { width: 52px; height: 52px; }
.d2 .complete-bubble { padding: 6px 12px 10px; }
.d2 .complete-bubble .english-line { font-size: clamp(19px, 5.4vw, 22px); line-height: 1.28; }
.d2 .g2 .answer-card { min-height: 54px; }
.d2 .g2 .option-audio { width: 52px; min-height: 52px; }
/* ---------- fim de fase ---------- */
.result2 { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.result-mascot { flex: 0 1 130px; min-height: 60px; aspect-ratio: 1; width: auto; }
.result-mascot img { width: 100%; height: 100%; object-fit: contain; }
.d2 .game-result { width: 100%; max-width: 340px; margin: 0; padding: 14px 16px; }
.d2 .game-result p { margin: 6px 0 0; }
/* ---------- figurinha ---------- */
.d2 .r2 { flex: 1; min-height: 0; max-width: none; margin: 0; justify-content: center; gap: 4px; }
.d2 .r2 > h2, .d2 .r2 > p { margin: 0; }
.d2 .r2 .title-md { font-size: 20px; }
.d2 .r2 .flip { flex: 0 1 150px; min-height: 84px; width: auto; height: auto; aspect-ratio: 1; margin: 7px auto 5px; }
.d2 .r2 .sticker-name { font-weight: 800; font-size: 15px; }
.d2 .r2 .title-lg { font-size: 23px; }
.d2 .r2 .result-band { font-size: 13.5px; line-height: 1.3; color: var(--ink-soft); }
.r2-more { display: flex; justify-content: center; gap: 10px; margin-top: 8px; }
.d2 .r2-more .btn { min-height: 40px; padding: 5px 14px 7px; font-size: 14.5px; box-shadow: var(--lift-sm), inset 0 -4px 0 var(--line); }
.d2 .r2-more .btn .ico { width: 18px; height: 18px; }
/* ---------- menino ou menina ---------- */
.gate2 { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; text-align: center; gap: 6px; }
.gate2 .child-type-options { margin: 10px 0; border-radius: 18px; }
@media (prefers-reduced-motion: reduce) { .d2 .day-primary .main.ready::before, .d2 .day-primary .main.ready::after { animation: none; } }
@media (max-height: 640px) and (max-width: 699px) {
  .d2-head { display: none; }
  .d2 .d2-coach .coach-bubble { height: 54px; font-size: 14px; }
  .d2 .d2-coach .coach-av, .d2 .d2-coach .coach-rep { width: 44px; height: 44px; }
}
/* ajustes V2 */
.d2 { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.d2.step-6 .coach-box { display: flex; }
.d2 .day-primary .prev { min-width: 36px; }
.d2 .day-primary .prev + .main { min-width: 0; padding: 6px 9px 8px 13px; gap: 4px; font-size: 18px; }
.d2 .q2 .answer-options { gap: 14px; }
.d2 .q2 .answer-card { min-height: 72px; font-size: clamp(20px, 5.8vw, 24px); }
.d2 .q2 .option-audio { width: 62px; min-height: 62px; }
/* figuras que se ajustam à ALTURA disponível (unidades de contêiner); sem suporte, valem as larguras de 100% acima */
@supports (width: 1cqh) {
  .d2 .cover-book, .d2 .poster { max-width: none; width: min(100cqw - 18px, calc((100cqh - 66px) * 4 / 3)); }
  .d2 .page2-art .page-art, .d2 .conv2-scene .scene-art { width: min(100cqw, calc(100cqh * 4 / 3)); }
  .d2 .order-choice .order-piece { width: min(100cqw, calc((100cqh - 16px) * 4 / 3 + 10px)); }
}
.d2 .tool-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.d2 .btn.tool { min-width: 0; }
.d2 .btn.tool > span { min-width: 0; overflow-wrap: anywhere; }
.d2 .day-primary .main.long { font-size: 16px; padding-left: 13px; padding-right: 10px; }
.home-go-on { animation: mainPulse 1.6s ease-in-out infinite; }
/* "escute": selo de som no canto da página enquanto a narradora lê (some quando termina e o botão passa a pulsar) */
.hear-badge { position: absolute; z-index: 2; right: 7px; top: 7px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); border: 2.5px solid var(--ink); box-shadow: 0 3px 0 var(--ink); opacity: 0; transform: scale(.5); transition: opacity .2s, transform .25s var(--spring); pointer-events: none; }
.hear-badge .ico { width: 19px; height: 19px; stroke-width: 2.6; }
.page2:has(.english-line.speaking) .hear-badge { opacity: 1; transform: none; animation: talk .5s ease-in-out infinite alternate; }
.d2 .english-line.speaking { animation: none; }
