/* Motor de idiomas: home.css. Tela inicial em mapa: barra superior (contadores), seletor de nível, cartões do dia,
   faixa ilustrada da unidade, percurso serpenteado de lições, guia da unidade, modal da lição, mascote, confete e
   boas-vindas (onboarding). Cores só por tokens (tokens.css + lang.css). Missões e semana da ofensiva: quests.css. */

/* ---------- barra superior: contadores ---------- */
button.stat { position: relative; border: 0; font-family: inherit; cursor: pointer; transition: box-shadow .15s, background-color .15s; }
button.stat::after { content: ""; position: absolute; inset: -5px -2px; } /* alvo de toque >= 44px */
button.stat:hover { box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.stat .num { display: inline-block; min-width: 1ch; }
.stat .num.bump { animation: num-bump .3s cubic-bezier(.2, 1.4, .4, 1); color: var(--primary-ink); }
@keyframes num-bump { 50% { transform: scale(1.22); } }
.stat.streak .fl-in { fill: var(--accent); stroke: none; opacity: 0; transition: opacity .2s; }
.stat.streak.risk .ico { fill: none; }
.stat.streak.lit { background: var(--flame-soft); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--flame) 40%, transparent); }
.stat.streak.lit .fl-in { opacity: 1; }
.stat.streak.lit .ico { filter: drop-shadow(0 0 3px color-mix(in srgb, var(--flame) 70%, transparent)); }
.stat.streak.ignite .ico { animation: ignite .5s cubic-bezier(.2, 1.4, .4, 1) .15s both; }
@keyframes ignite { 0% { transform: scale(.55); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }
.hearts-row { display: flex; gap: 6px; margin: 4px 0 12px; }
.hearts-row .ico { width: 34px; height: 34px; stroke-width: 1.6; }
.hearts-row .ico.on { color: var(--heart); fill: var(--heart); }
.hearts-row .ico.off { color: var(--line-strong); fill: var(--line); }

/* ---------- estrutura ---------- */
.home { padding: 14px 16px calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 32px); }
.home-rail { display: grid; gap: 12px; }

/* anel de meta (também usado na barra lateral) */
.ring { position: relative; width: 64px; height: 64px; flex: none; }
.ring svg { display: block; width: 64px; height: 64px; }
.ring .trk { fill: none; stroke: var(--accent-soft); stroke-width: 7; }
.ring .val { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset .6s cubic-bezier(.2, .8, .2, 1); }
.ring span { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 19px; font-variant-numeric: tabular-nums; }
.meter { height: 6px; margin: 12px 4px 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .4s; }
.review-btn { margin-left: auto; flex: none; }

/* ---------- cartão do dia ---------- */
.today-card {
  padding: 14px 16px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-1);
}
.tc-top { display: flex; align-items: center; gap: 14px; }
.tc-txt { min-width: 0; flex: 1; }
.tc-txt b { display: block; font-family: var(--font-display); font-size: 17px; line-height: 1.25; }
.tc-txt small { display: block; color: var(--muted); font-size: 14px; line-height: 1.35; }
.today-card .review-btn { margin-left: 0; }
.today-card .review-btn .ico { width: 17px; height: 17px; }
.today-card.met { background: linear-gradient(160deg, var(--accent-wash), var(--card) 75%); border-color: var(--accent-soft); }
.today-card.met .tc-txt b { color: var(--accent-ink); }
.tc-mascot { width: 52px; height: 52px; }

/* ---------- novo usuário ---------- */
.hero-card {
  position: relative; overflow: hidden; display: grid; gap: 6px; padding: 18px 18px 18px;
  border-radius: 24px; background: linear-gradient(160deg, var(--tint) 0%, var(--card) 70%); border: 1px solid var(--tint-2);
}
.hero-scene { display: flex; align-items: flex-end; gap: 4px; }
.hero-mascot { width: 104px; height: 104px; }
.hero-bubble {
  order: 2; margin-bottom: 52px; padding: 9px 14px; border-radius: 16px 16px 16px 4px; background: var(--card);
  box-shadow: inset 0 0 0 2px var(--tint-edge); font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--primary-ink);
  animation: pop-in .3s cubic-bezier(.2, 1.4, .4, 1) .2s both;
}
.hero-txt .eyebrow { display: block; font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--primary-ink); }
.hero-txt h2 { margin: 2px 0 6px; font-size: 23px; line-height: 1.18; letter-spacing: -.02em; }
.hero-txt p { margin: 0 0 14px; color: var(--ink-2); font-size: 15.5px; }
.hero-go .ico { width: 20px; height: 20px; }
@keyframes pop-in { from { transform: scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- seletor de nível ---------- */
.lv-bar {
  position: sticky; top: var(--tb-h, 55px); z-index: 4; margin: 14px -16px 0; padding: 8px 16px;
  background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 10px 14px -14px rgb(0 0 0 / .35);
}
.lv-inner { display: flex; gap: 8px; }
.lv-chip {
  position: relative; flex: 1; min-width: 0; min-height: 46px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  padding: 4px 6px 6px; border: 0; border-radius: 13px; background: var(--card); color: var(--ink-2);
  box-shadow: inset 0 0 0 1.5px var(--line), inset 0 -3px 0 var(--line);
  font-family: var(--font-display); font-weight: 800; font-size: 15px; line-height: 1; transition: background-color .18s, color .18s, box-shadow .18s;
}
.lv-chip:hover { box-shadow: inset 0 0 0 1.5px var(--line-strong), inset 0 -3px 0 var(--line-strong); }
.lv-c { display: inline-flex; align-items: center; gap: 3px; }
.lv-c .ico { width: 13px; height: 13px; stroke-width: 2.6; }
.lv-m { width: 64%; height: 4px; border-radius: 99px; background: var(--line); overflow: hidden; }
.lv-m i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.lv-chip.locked { color: var(--muted); }
.lv-chip.cur::after { content: ""; position: absolute; top: 6px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--card); }
.lv-chip.on { background: var(--primary); color: #fff; box-shadow: inset 0 -3px 0 var(--primary-edge); }
.lv-chip.on .lv-m { background: rgb(255 255 255 / .3); }
.lv-chip.on .lv-m i { background: #fff; }
.lv-chip.on.cur::after { box-shadow: 0 0 0 2px var(--primary); }

/* ---------- cabeçalho de nível ---------- */
.level-head { display: flex; align-items: center; gap: 14px; margin: 34px 0 4px; padding: 0 2px; scroll-margin-top: calc(var(--tb-h, 55px) + 74px); }
.unit { scroll-margin-top: calc(var(--tb-h, 55px) + 78px); }
.node { scroll-margin-top: calc(var(--tb-h, 55px) + 96px); scroll-margin-bottom: calc(var(--tabbar-h, 63px) + 24px); }
.home-main > .lv-bar + .level-head { margin-top: 20px; }
.level-head .lv-code {
  flex: none; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; color: #fff;
  font-family: var(--font-display); font-weight: 800; font-size: 23px; letter-spacing: -.03em;
  background: linear-gradient(135deg, var(--band), var(--band-2)); box-shadow: inset 0 -4px 0 rgb(0 0 0 / .2);
}
.level-head .lv-txt { min-width: 0; }
.level-head .eyebrow { display: block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary-ink); }
.level-head h2 { margin: 1px 0 2px; font-size: 22px; line-height: 1.15; letter-spacing: -.02em; }
.level-head p { margin: 0; font-size: 14px; line-height: 1.4; color: var(--ink-2); }

/* ---------- unidade: faixa ilustrada ---------- */
.unit { margin: 18px 0 4px; }
.unit-band {
  position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 10px 12px;
  padding: 16px 16px 14px 18px; border-radius: 22px; color: #fff;
  background: linear-gradient(135deg, var(--band) 0%, var(--band-2) 100%); box-shadow: inset 0 -5px 0 rgb(0 0 0 / .16);
}
.unit-band::before {
  content: ""; position: absolute; right: -30px; bottom: -40px; width: 170px; height: 120px; pointer-events: none;
  background: var(--route-deco) center / contain no-repeat; opacity: .16;
}
.ub-txt { position: relative; min-width: 0; }
.ub-eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .92; }
.ub-done { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 6px; border-radius: 99px; background: rgb(255 255 255 / .2); letter-spacing: .04em; }
.ub-done .ico { width: 14px; height: 14px; fill: currentColor; }
.unit-band h3 { margin: 4px 0 2px; font-size: 21px; line-height: 1.18; letter-spacing: -.015em; }
.unit-band .sub { font-size: 14.5px; line-height: 1.35; opacity: .94; }
.ub-prog { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.ub-meter { flex: 1; max-width: 180px; height: 7px; border-radius: 99px; background: rgb(255 255 255 / .25); overflow: hidden; }
.ub-meter i { display: block; height: 100%; border-radius: inherit; background: #fff; transition: width .4s; }
.unit-prog { font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; opacity: .95; }
.unit-prog b { font-family: var(--font-display); font-size: 16px; }
.unit-art { position: relative; display: block; width: 84px; height: 84px; }
.unit-art svg { display: block; width: 100%; height: 100%; }
.unit-art.illu-t { filter: drop-shadow(0 4px 8px rgb(0 0 0 / .18)); }
.unit-band.locked .unit-art.illu-t { filter: grayscale(1); opacity: .55; }
.ua-halo { fill: rgb(255 255 255 / .1); }
.ua-disc { fill: rgb(255 255 255 / .2); }
.ua-dot { fill: #fff; opacity: .55; }
.ua-spark { fill: var(--accent); }
.ua-glyph { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.guide-btn {
  position: relative; grid-column: 1 / -1; justify-self: start; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 12px;
  border: 0; border-radius: 13px; background: rgb(255 255 255 / .16); color: #fff; font-weight: 700; font-size: 14.5px;
  box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / .35); transition: background-color .15s;
}
.guide-btn:hover { background: rgb(255 255 255 / .26); }
.guide-btn .ico { width: 19px; height: 19px; }
.unit-band.complete { box-shadow: inset 0 -5px 0 rgb(0 0 0 / .16), inset 0 0 0 3px var(--accent); }
.unit-band.locked { color: var(--ink); background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line), inset 0 -4px 0 var(--line); }
.unit-band.locked::before { opacity: 0; }
.unit-band.locked .sub { color: var(--muted); opacity: 1; }
.unit-band.locked .ub-eyebrow { color: var(--muted); opacity: 1; }
.unit-band.locked .ub-meter { background: var(--line); }
.unit-band.locked .ub-meter i { background: var(--accent); }
.unit-band.locked .unit-prog { color: var(--muted); }
.unit-band.locked .ua-halo { fill: var(--bg); }
.unit-band.locked .ua-disc { fill: var(--line); }
.unit-band.locked .ua-dot { fill: var(--line-strong); }
.unit-band.locked .ua-spark { fill: var(--line-strong); }
.unit-band.locked .ua-glyph { stroke: var(--muted); }
.unit-band.locked .guide-btn { background: var(--bg); color: var(--primary-ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.unit.soon { display: flex; align-items: center; gap: 12px; margin: 14px 0; padding: 14px 16px; border: 1.5px dashed var(--line-strong); border-radius: 18px; color: var(--muted); }
.unit.soon h3 { margin: 0; font-size: 16px; color: var(--ink-2); }
.unit.soon .sub { font-size: 13.5px; }
.soon-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--card); flex: none; }
.soon-ic .ico { width: 20px; height: 20px; }

/* ---------- percurso serpenteado ---------- */
.path { position: relative; max-width: 520px; margin: 18px auto 10px; }
.path-line { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.path-line .road { fill: none; stroke: var(--line); stroke-width: 16; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.path-line .lane { fill: none; stroke: var(--line-strong); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1 9; vector-effect: non-scaling-stroke; }
.path-line .road.done { stroke: var(--accent-soft); }
.path-line .lane.done { stroke: var(--accent); stroke-width: 4; stroke-dasharray: none; }
.node {
  position: absolute; z-index: 2; left: calc(var(--x) - 36px); right: 6px; display: flex; align-items: center; gap: 14px;
  min-height: 72px; padding: 0; margin: 0; text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  background: transparent; border: 0; border-radius: 20px;
}
.node.side-R { left: 6px; right: calc(100% - var(--x) - 36px); flex-direction: row-reverse; text-align: right; }
.node .badge {
  --edge: var(--line-strong);
  position: relative; flex: none; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center;
  background: var(--line); color: var(--muted); box-shadow: inset 0 -6px 0 var(--edge);
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.node .badge .ico { width: 30px; height: 30px; stroke-width: 2.4; }
.node:hover .badge { transform: translateY(-2px); filter: brightness(1.05); }
.node:active .badge { transform: translateY(3px); box-shadow: inset 0 -2px 0 var(--edge); }
.node:focus-visible { outline: none; }
.node:focus-visible .badge { outline: 3px solid var(--focus); outline-offset: 5px; }
.node.open .badge { --edge: var(--primary-edge); background: var(--primary); color: #fff; }
.node.open .badge .ico { fill: currentColor; fill-opacity: .25; }
.node.done .badge { --edge: var(--accent-edge); background: var(--accent); color: var(--on-accent); }
.node.done .badge .ico { stroke-width: 3; }
.node.crown .badge .ico { stroke-width: 2.4; fill: currentColor; fill-opacity: .2; }
.node.locked .badge .ico { width: 28px; height: 28px; fill: var(--line-strong); fill-opacity: .6; }
.node.cp .badge { border-radius: 24px; }
.node.cp.locked .badge { color: var(--muted); }
.node .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.node .txt .where { font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--primary-ink); margin: 0 0 1px; }
.node .txt b { font-size: 16px; font-weight: 700; line-height: 1.22; overflow-wrap: anywhere; }
.node .txt small { color: var(--muted); font-size: 13.5px; line-height: 1.3; margin-top: 2px; }
.node.done .txt .where { color: var(--accent-ink); }
.node.locked .txt .where, .node.locked .txt b { color: var(--muted); }
.node.locked .txt b { font-weight: 600; }
/* estado: estrelas sob o círculo, cadeado no canto, balão "Começar/Continuar" acima do nó atual */
.node .status { position: absolute; z-index: 3; font-size: 13px; font-weight: 700; }
.node .status.stars { top: 60px; left: 36px; translate: -50% 0; display: inline-flex; padding: 2px 6px; border-radius: 99px; background: var(--card); box-shadow: 0 0 0 1.5px var(--line); }
.node.side-R .status.stars { left: auto; right: 36px; translate: 50% 0; }
.node .status.stars .stars-row .ico { width: 15px; height: 15px; }
.node .status.lock { top: 50px; left: 48px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--card); color: var(--muted); box-shadow: 0 0 0 2px var(--bg), inset 0 0 0 1.5px var(--line-strong); }
.node.side-R .status.lock { left: auto; right: 48px; }
.node .status.lock .ico { width: 15px; height: 15px; }
.node .status.go { top: 60px; left: 36px; translate: -50% 0; padding: 3px 10px 4px; border-radius: 99px; background: var(--tint-2); color: var(--primary-ink); font-family: var(--font-display); font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; }
.node.side-R .status.go { left: auto; right: 36px; translate: 50% 0; }
.node .status.go.bal {
  top: -48px; padding: 9px 16px 10px; border-radius: 14px; font-size: 15px; letter-spacing: .05em; white-space: nowrap;
  background: var(--card); color: var(--primary-ink); box-shadow: inset 0 0 0 2px var(--line-strong), 0 6px 16px -10px rgb(0 0 0 / .4);
  animation: bal 1.8s ease-in-out infinite;
}
.node .status.go.bal::after {
  content: ""; position: absolute; left: 50%; bottom: -7px; width: 12px; height: 12px; margin-left: -6px; transform: rotate(45deg);
  background: var(--card); box-shadow: 2px 2px 0 0 var(--line-strong);
}
@keyframes bal { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
#next-node .badge { box-shadow: inset 0 -6px 0 var(--edge), 0 0 0 7px var(--tint-2); }
#next-node:active .badge { box-shadow: inset 0 -2px 0 var(--edge), 0 0 0 7px var(--tint-2); }
#next-node .badge::before {
  content: ""; position: absolute; inset: -9px; border-radius: inherit; border: 3px solid var(--primary);
  opacity: 0; animation: beacon 2.2s ease-out infinite;
}
@keyframes beacon { 0% { transform: scale(.9); opacity: .7; } 70%, 100% { transform: scale(1.22); opacity: 0; } }
.map-mascot { position: absolute; z-index: 1; width: 58px; height: 58px; margin-top: 8px; pointer-events: none; }
.map-mascot.side-L { left: max(0px, calc(27% - 36px - 72px)); }
.map-mascot.side-R { right: max(0px, calc(27% - 36px - 72px)); }
.map-mascot .hm-mascot { width: 100%; height: 100%; }

/* estrelas */
.stars-row { display: inline-flex; align-items: center; gap: 1px; }
.stars-row .ico { stroke-width: 1.6; }
.stars-row .ico.on { color: var(--accent-edge); fill: var(--accent); }
.stars-row .ico.off { color: var(--line-strong); fill: var(--line); }

/* ---------- modal da lição ---------- */
.modal .lm-sub { margin: -4px 0 10px; color: var(--muted); font-weight: 600; font-size: 15px; }
.lm-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 20px; }
.lm-pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 99px; background: var(--bg); color: var(--ink-2); font-weight: 700; font-size: 14px; }
.lm-pill .ico { width: 17px; height: 17px; }
.lm-pill.xp .ico { color: var(--accent-edge); fill: var(--accent); stroke-width: 1.6; }
.lm-pill .stars-row .ico { width: 16px; height: 16px; }
.lm-link {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 46px; margin-top: 8px;
  border: 0; border-radius: 13px; background: none; color: var(--primary-ink); font-weight: 700; font-size: 15px;
}
.lm-link:hover { background: var(--tint); }
.lm-link .ico { width: 19px; height: 19px; }

/* ---------- guia da unidade (folha) ---------- */
.modal.guide { max-height: 90dvh; overflow-y: auto; overscroll-behavior: contain; padding-top: 26px; }
.g-close {
  position: absolute; z-index: 2; top: 12px; right: 12px; display: grid; place-items: center; width: 44px; height: 44px;
  border: 0; border-radius: 50%; background: var(--bg); color: var(--ink-2);
}
.g-close:hover { background: var(--line); }
.g-close .ico { width: 20px; height: 20px; }
.g-head { display: flex; align-items: center; gap: 14px; margin: 0 48px 16px 0; }
.g-head .unit-art { flex: none; width: 68px; height: 68px; padding: 4px; border-radius: 20px; background: linear-gradient(135deg, var(--band), var(--band-2)); }
.g-head .eyebrow { margin-bottom: 2px; }
.modal .g-head h3 { margin: 0; font-size: 22px; }
.modal .g-sub { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.g-tabs { position: sticky; top: -26px; z-index: 1; display: flex; gap: 6px; padding: 5px; margin: 0 0 6px; border-radius: 15px; background: var(--bg); }
.g-tabs button {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 8px;
  border: 0; border-radius: 11px; background: none; color: var(--muted); font-weight: 700; font-size: 14px;
}
.g-tabs button .ico { width: 18px; height: 18px; }
.g-tabs button small { min-width: 22px; padding: 1px 6px; border-radius: 99px; background: var(--line); font-size: 12px; color: var(--ink-2); }
.g-tabs button.on { background: var(--card); color: var(--primary-ink); box-shadow: inset 0 0 0 1px var(--line), 0 2px 6px -3px rgb(0 0 0 / .25); }
.g-tabs button.on small { background: var(--tint-2); color: var(--primary-ink); }
.g-lesson { margin: 18px 2px 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.g-tip { margin: 0 0 10px; padding: 14px 16px; border-radius: 16px; background: var(--bg); }
.g-tip h4 { margin: 0 0 6px; font-size: 16.5px; line-height: 1.25; }
.modal .g-tip p { margin: 0 0 10px; color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.modal .g-tip p:last-child { margin-bottom: 0; }
.g-tip p b { color: var(--ink); }
.g-ex, .g-words { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.g-ex li { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border-radius: 12px; background: var(--card); }
.g-ex li > span { display: flex; flex-direction: column; min-width: 0; }
.g-ex b { font-size: 15px; }
.g-ex small { color: var(--muted); font-size: 13.5px; }
.modal .say.g-say { flex: none; width: 44px; height: 44px; border-radius: 12px; }
.modal .say.g-say .ico { width: 20px; height: 20px; }
.g-words li { display: grid; grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border-radius: 13px; background: var(--bg); }
.gw-t b { display: block; font-size: 15.5px; line-height: 1.25; overflow-wrap: anywhere; }
.gw-ipa { display: block; color: var(--muted); font-size: 12.5px; }
.gw-pt { color: var(--ink-2); font-size: 14.5px; line-height: 1.3; }
.g-empty { color: var(--muted); }

/* ---------- mascote (desenho próprio; a frente de identidade pode trocar por Illu.mascot) ---------- */
.hm-mascot { display: inline-block; flex: none; width: 64px; height: 64px; }
.hm-mascot > svg { display: block; width: 100%; height: 100%; overflow: visible; }
.hm-mascot.own > svg { animation: msc-bob 2.8s ease-in-out infinite; }
.msc-body { fill: var(--primary); }
.msc-edge { fill: var(--primary-edge); }
.msc-arm { fill: none; stroke: var(--primary); stroke-width: 10; stroke-linecap: round; }
.msc-wave { animation: msc-wave 1.4s ease-in-out infinite; transform-origin: 96px 64px; }
.msc-belly { fill: #fff; opacity: .16; }
.msc-leaf { fill: var(--ok-solid); }
.msc-leaf2 { fill: var(--accent); }
.msc-eye { fill: #fff; }
.msc-pupil { fill: var(--ink-fixed); }
.msc-shine { fill: #fff; }
.msc-cheek { fill: var(--accent); opacity: .55; }
.msc-mouth { fill: none; stroke: var(--ink-fixed); stroke-width: 4.5; stroke-linecap: round; }
.msc-mouth-open { fill: var(--ink-fixed); }
.msc-shadow { fill: var(--ink); opacity: .1; }
@keyframes msc-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes msc-wave { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-14deg); } }

/* ---------- confete leve (meta do dia) ---------- */
.hm-confetti { position: fixed; inset: 0; z-index: 40; overflow: hidden; pointer-events: none; }
.hm-confetti i { position: absolute; top: -14px; left: var(--x); width: 8px; height: 13px; border-radius: 2px; animation: hm-conf 1.5s cubic-bezier(.25, .6, .45, 1) var(--d) both; }
.hm-confetti .c0 { background: var(--primary); }
.hm-confetti .c1 { background: var(--accent); }
.hm-confetti .c2 { background: var(--flame); }
.hm-confetti .c3 { background: var(--ok-solid); }
.hm-confetti .c4 { background: var(--heart); border-radius: 50%; width: 9px; height: 9px; }
@keyframes hm-conf { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 85% { opacity: 1; } 100% { transform: translate(var(--dx), 96vh) rotate(var(--r)); opacity: 0; } }

/* ---------- boas-vindas (4 telas) ---------- */
.modal.onb { display: flex; flex-direction: column; min-height: min(94dvh, 820px); max-height: 100dvh; overflow-y: auto; padding: 14px 20px calc(18px + env(safe-area-inset-bottom)); }
.modal.onb::before { display: none; }
.ob-top { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.ob-back { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 13px; background: none; color: var(--muted); }
.ob-back:hover { background: var(--bg); }
.ob-back.ph { visibility: hidden; }
.ob-steps { flex: 1; display: flex; gap: 6px; }
.ob-steps i { flex: 1; height: 8px; border-radius: 99px; background: var(--line); transition: background-color .25s; }
.ob-steps i.past, .ob-steps i.cur { background: var(--primary); }
.ob-count { flex: none; width: 34px; text-align: right; color: var(--muted); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ob-slide { flex: 1; display: flex; flex-direction: column; padding-top: 16px; }
/* seletor do idioma das explicações (1ª tela; só com 2+ camadas) */
.ob-ui { display: flex; align-items: center; gap: 8px; align-self: flex-end; margin: -6px 0 6px; color: var(--muted); font-size: 13px; font-weight: 600; }
.ob-ui .ico { width: 18px; height: 18px; flex: none; }
.ob-ui .ui-sel {
  min-height: 40px; padding: 0 32px 0 12px; border: 1.5px solid var(--line-strong); border-radius: 12px; color: var(--ink);
  background: var(--card) var(--ic-chev) right 9px center / 15px no-repeat; -webkit-appearance: none; appearance: none; font-size: 15px; font-weight: 600;
}
.ob-slide.in-r { animation: ob-in-r .26s cubic-bezier(.2, .8, .2, 1); }
.ob-slide.in-l { animation: ob-in-l .26s cubic-bezier(.2, .8, .2, 1); }
@keyframes ob-in-r { from { transform: translateX(36px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ob-in-l { from { transform: translateX(-36px); opacity: 0; } to { transform: none; opacity: 1; } }
.ob-scene { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 6px; }
.ob-mascot { width: 96px; height: 96px; }
.ob-say {
  position: relative; flex: 1; min-width: 0; margin-bottom: 40px; padding: 12px 16px; border-radius: 18px 18px 18px 6px;
  background: var(--card); box-shadow: inset 0 0 0 2px var(--line);
}
.ob-say h2 { margin: 0; font-size: 21px; line-height: 1.2; letter-spacing: -.015em; outline: none; }
.modal .ob-lead { margin: 4px 0 16px; color: var(--ink-2); font-size: 15.5px; line-height: 1.5; }
.ob-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ob-list { display: grid; gap: 10px; }
.ob-opt {
  display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 10px 12px; border: 0; border-radius: 16px; text-align: left;
  background: var(--card); color: var(--ink); font-weight: 700; font-size: 15px; line-height: 1.25;
  box-shadow: inset 0 0 0 2px var(--line), inset 0 -4px 0 var(--line); transition: box-shadow .15s, background-color .15s, transform .15s;
}
.ob-opt:hover { box-shadow: inset 0 0 0 2px var(--line-strong), inset 0 -4px 0 var(--line-strong); }
.ob-opt:active { transform: translateY(2px); }
.ob-opt.on { background: var(--tint); color: var(--primary-ink); box-shadow: inset 0 0 0 2px var(--primary), inset 0 -4px 0 var(--primary); }
.ob-opt .o-ic, .ob-big .o-ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--bg); color: var(--primary-ink); }
.ob-opt .o-ic .ico { width: 20px; height: 20px; }
.ob-opt.on .o-ic { background: var(--primary); color: #fff; }
.ob-opt .o-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ob-opt .o-t b { font-size: 16px; }
.ob-opt .o-t small { color: var(--muted); font-size: 13.5px; font-weight: 500; }
.ob-opt.on .o-t small { color: var(--ink-2); }
.o-tag { flex: none; padding: 3px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-ink); font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.o-xp { flex: none; min-width: 54px; text-align: right; font-family: var(--font-display); font-weight: 800; font-size: 16px; color: var(--primary-ink); }
.ob-ics { display: grid; gap: 6px; margin-top: 14px; text-align: center; }
.ob-ics small { color: var(--muted); font-size: 13px; }
.ob-start { display: grid; gap: 12px; margin-top: 2px; }
.ob-big {
  display: flex; align-items: center; gap: 14px; min-height: 86px; padding: 14px 16px; border: 0; border-radius: 18px; text-align: left;
  background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 2px var(--line), inset 0 -5px 0 var(--line); transition: box-shadow .15s, transform .15s;
}
.ob-big:hover { box-shadow: inset 0 0 0 2px var(--primary), inset 0 -5px 0 var(--primary); }
.ob-big:active { transform: translateY(2px); }
.ob-big .o-ic { width: 50px; height: 50px; border-radius: 15px; }
.ob-big .o-ic .ico { width: 26px; height: 26px; }
.ob-big.zero .o-ic { background: var(--ok-bg); color: var(--ok); }
.ob-big.test .o-ic { background: var(--tint-2); color: var(--primary-ink); }
.ob-big .o-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ob-big .o-t b { font-family: var(--font-display); font-size: 17.5px; }
.ob-big .o-t small { color: var(--muted); font-size: 14px; }
.ob-big .o-go { color: var(--muted); }
.ob-foot { display: grid; gap: 10px; padding-top: 16px; }
.placement-result .pr-mascot { align-self: center; width: 120px; height: 120px; margin-bottom: 6px; }

/* ---------- celular: título até 3 linhas e subtítulo em 1 (não invade o balão "Continuar" da lição seguinte) ---------- */
@media (max-width: 599px) {
  .node .txt b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
  .node .txt small:not(.where) { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* ---------- celular estreito ---------- */
@media (max-width: 360px) {
  .node .txt b { font-size: 15px; }
  .node .txt small { font-size: 12.5px; }
  .ob-grid { grid-template-columns: 1fr; }
}

/* ---------- desktop ---------- */
@media (min-width: 600px) {
  .modal.onb { max-width: 520px; min-height: 0; padding: 18px 26px 24px; }
  .modal.guide { max-width: 620px; max-height: 86vh; }
}
@media (min-width: 1024px) {
  .lv-bar { top: 0; margin: 0 0 0; padding: 12px 0; border-bottom: 0; }
  .home-main > .lv-bar + .level-head { margin-top: 12px; }
  .level-head { scroll-margin-top: 84px; }
  .unit { scroll-margin-top: 92px; }
  .node { scroll-margin-top: 110px; scroll-margin-bottom: 24px; }
  .path { max-width: 600px; }
}
@media (min-width: 1200px) {
  #app:has(> .tabbar) > .home.home-map {
    max-width: 1180px; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 0 28px; align-items: start; padding-left: 28px; padding-right: 28px;
  }
  .home-map > .home-rail { grid-column: 2; grid-row: 1; position: sticky; top: 24px; }
  .home-map > .home-main { grid-column: 1; grid-row: 1; min-width: 0; }
}
