/* Camino Hanzi — porcelana azul y blanco, con sellos rojos para lo aprendido. */
:root {
  --bg: #F5F4EF; --surface: #FFFFFF; --ink: #0E1630; --ink2: #4A5578; --line: #D3DCEF; --line2: #B7C4E4;
  --blue: #1B3A9C; --blue-d: #102766; --wash: #E3EAFA; --on-blue: #FFFFFF;
  --seal: #D63A2E; --seal-d: #A52E1E; --seal-w: #FBE5E2; --jade: #1B7F66; --jade-w: #DAF1E8;
  --t1: #D63A2E; --t2: #B26A00; --t3: #1B7F66; --t4: #7A3FB8; --t5: #6B7599;
  --r: 16px; --r-s: 10px; --nav: 64px; --side: 232px;
  --f-ui: "Bricolage Grotesque", "Segoe UI", system-ui, -apple-system, "PingFang SC", "Noto Sans SC", sans-serif;
  --f-han: "Noto Serif SC", "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --t1:#F0645A; --t2:#F0B04A; --t3:#4FCBA5; --t4:#B48CFF; --t5:#9DAAD6; --bg:#0A1024; --surface:#121A38; --ink:#EAF0FF; --ink2:#9DAAD6; --line:#26315C; --line2:#34427A; --blue:#7C98FF; --blue-d:#4B64C4; --wash:#1A2550; --on-blue:#0A1024; --seal:#F0645A; --seal-w:#3A1E24; --jade:#4FCBA5; --jade-w:#143A33; color-scheme: dark; } }
:root[data-theme="dark"] { --t1:#F0645A; --t2:#F0B04A; --t3:#4FCBA5; --t4:#B48CFF; --t5:#9DAAD6; --bg:#0A1024; --surface:#121A38; --ink:#EAF0FF; --ink2:#9DAAD6; --line:#26315C; --line2:#34427A; --blue:#7C98FF; --blue-d:#4B64C4; --wash:#1A2550; --on-blue:#0A1024; --seal:#F0645A; --seal-w:#3A1E24; --jade:#4FCBA5; --jade-w:#143A33; color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--f-ui); -webkit-tap-highlight-color: transparent; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-weight: 700; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); } h2 { font-size: 1.3rem; } h3 { font-size: 1.05rem; }
p { margin: 0 0 .6em; } a { color: var(--blue); }
.muted { color: var(--ink2); } .small { font-size: .875rem; } .py { color: var(--blue); font-weight: 600; }
.hz { font-family: var(--f-han); font-weight: 600; line-height: 1.1; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ===== Estructura ===== */
.shell { min-height: 100dvh; }
.main { padding: 0 16px calc(var(--nav) + 28px + env(safe-area-inset-bottom)); max-width: 1020px; margin: 0 auto; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1.5px solid var(--line); }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1.5px; height: 6px; background: var(--meander); opacity: .5; pointer-events: none; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.05rem; letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.mark { width: 34px; height: 34px; display: grid; place-items: center; background: var(--seal); color: #fff; border-radius: 7px; transform: rotate(-4deg); font: 700 20px/1 var(--f-han); box-shadow: inset 0 0 0 2px color-mix(in srgb, #fff 55%, transparent); }
.top-stats { margin-left: auto; display: flex; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 1.5px solid var(--line); border-radius: 99px; background: var(--surface); font-weight: 600; font-size: .9rem; }
.pill b { font-variant-numeric: tabular-nums; }
.tabbar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: flex; background: var(--surface); border-top: 1.5px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
.tab { flex: 1; display: grid; justify-items: center; gap: 2px; padding: 6px 2px; border: 0; background: none; border-radius: 12px; color: var(--ink2); font-size: .75rem; font-weight: 600; text-decoration: none; }
.tab svg { width: 24px; height: 24px; }
.tab[aria-current="page"] { color: var(--blue); background: var(--wash); }
.side { display: none; }
@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: var(--side) 1fr; }
  .topbar, .tabbar { display: none; }
  .side { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100dvh; padding: 24px 16px; border-right: 1.5px solid var(--line); background: var(--surface); }
  .side .brand { padding: 0 8px 18px; font-size: 1.15rem; }
  .side .tab { flex: none; display: flex; align-items: center; gap: 12px; padding: 11px 12px; font-size: 1rem; justify-items: start; }
  .side-foot { margin-top: auto; display: grid; gap: 8px; }
  .main { padding: 32px 36px 60px; width: 100%; }
}

/* ===== Componentes ===== */
.card { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r); padding: 16px; }
.stack { display: grid; gap: 14px; min-width: 0; } .stack > *, .home-grid > * { min-width: 0; } .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.section { margin-top: 26px; } .section > h2 { margin-bottom: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border: 0; border-radius: 12px; background: var(--blue); color: var(--on-blue); font-weight: 700; box-shadow: 0 4px 0 var(--blue-d); text-decoration: none; transition: transform .08s, box-shadow .08s; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--blue-d); }
.btn.ghost { background: var(--surface); color: var(--blue); border: 1.5px solid var(--line2); box-shadow: 0 3px 0 var(--line2); }
.btn.ghost:active { box-shadow: 0 0 0 var(--line2); }
.btn.small { min-height: 38px; padding: 0 14px; font-size: .9rem; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; } .chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 7px 14px; border: 1.5px solid var(--line); border-radius: 99px; background: var(--surface); font-weight: 600; font-size: .92rem; color: var(--ink); }
.chip[aria-pressed="true"], .chip.on { background: var(--blue); border-color: var(--blue); color: var(--on-blue); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--wash); border-radius: 14px; }
.seg button { border: 0; background: none; padding: 8px 14px; border-radius: 10px; font-weight: 600; color: var(--ink2); }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--blue); box-shadow: 0 1px 0 var(--line2); }
.tag { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: var(--wash); color: var(--blue); }
.tag.seal { background: var(--seal-w); color: var(--seal); }
.tag.jade { background: var(--jade-w); color: var(--jade); }
.bar { height: 8px; border-radius: 99px; background: var(--wash); overflow: hidden; } .bar i { display: block; height: 100%; background: var(--blue); border-radius: 99px; transition: width .4s; }
.notice { padding: 12px 14px; border-radius: 12px; background: var(--wash); border: 1.5px solid var(--line); }
.notice.warn { background: var(--seal-w); border-color: color-mix(in srgb, var(--seal) 40%, transparent); }
.notice.ok { background: var(--jade-w); border-color: color-mix(in srgb, var(--jade) 40%, transparent); }
.empty { text-align: center; padding: 28px 16px; }
.empty .hz { font-size: 3rem; color: var(--line2); display: block; }

/* ===== Inicio ===== */
.hello { margin: 22px 0 16px; } .hello p { margin: 4px 0 0; }
.home-grid { display: grid; gap: 16px; }
@media (min-width: 900px) { .home-grid { grid-template-columns: 1.35fr 1fr; align-items: start; } }
.hero { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 6px 22px; align-items: center; padding: 20px; border-color: var(--line2); overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 10px; background: var(--meander); opacity: .55; }
.hero-char { font-size: clamp(5.5rem, 22vw, 8.5rem); color: var(--ink); cursor: pointer; border: 0; background: none; padding: 0; }
.hero-info .py { font-size: 1.5rem; } .hero-info .mean { font-size: 1.15rem; margin: 2px 0 12px; }
.hero .label { font-size: .85rem; color: var(--ink2); padding-right: 52px; }
.stamp { position: absolute; top: 20px; right: 14px; width: 44px; height: 44px; display: grid; place-items: center; background: var(--seal); color: #fff; border-radius: 8px; font: 700 21px/1 var(--f-han); transform: rotate(7deg); box-shadow: inset 0 0 0 3px color-mix(in srgb, #fff 50%, transparent); animation: stamp .55s cubic-bezier(.2, 1.4, .4, 1) .25s both; }
@keyframes stamp { from { transform: rotate(-12deg) scale(2.3); opacity: 0; } 60% { opacity: 1; } to { transform: rotate(7deg) scale(1); opacity: 1; } }
.path { display: flex; gap: 0; overflow-x: auto; padding: 8px 2px 10px; scrollbar-width: none; } .path::-webkit-scrollbar { display: none; }
.stop { position: relative; flex: 1 0 96px; display: grid; justify-items: center; gap: 6px; padding: 0 4px; border: 0; background: none; color: var(--ink); text-align: center; }
.stop::before { content: ""; position: absolute; top: 28px; left: -50%; width: 100%; height: 3px; background: var(--line2); } .stop:first-child::before { display: none; }
.stop.done::before, .stop.cur::before { background: var(--blue); }
.node { position: relative; z-index: 1; width: 58px; height: 58px; display: grid; place-items: center; border: 2.5px solid var(--line2); border-radius: 16px; background: var(--surface); font: 700 1.5rem/1 var(--f-han); color: var(--ink2); }
.stop.cur .node { border-color: var(--blue); color: var(--blue); background: var(--wash); box-shadow: 0 4px 0 var(--blue-d); }
.stop.done .node { border-color: var(--blue); background: var(--blue); color: var(--on-blue); }
.stop small { font-weight: 600; } .stop .mu { font-size: .75rem; color: var(--ink2); }
.ring-wrap { display: flex; gap: 16px; align-items: center; }
.ring { position: relative; width: 92px; height: 92px; flex: none; } .ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; } .ring .bg { stroke: var(--wash); } .ring .fg { stroke: var(--blue); stroke-linecap: round; transition: stroke-dashoffset .6s; }
.ring.done .fg { stroke: var(--jade); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.15rem; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fact { text-align: left; } .fact b { display: block; font-size: 1.6rem; line-height: 1.1; font-variant-numeric: tabular-nums; } .fact span { font-size: .8rem; color: var(--ink2); }
.game-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .game-grid { grid-template-columns: repeat(3, 1fr); } .game-grid.g4 { grid-template-columns: repeat(4, 1fr); } }
.gcard { display: grid; gap: 6px; align-content: start; text-align: left; padding: 14px; border: 1.5px solid var(--line); border-bottom-width: 5px; border-radius: var(--r); background: var(--surface); color: var(--ink); transition: transform .08s; }
.gcard:active { transform: translateY(2px); border-bottom-width: 3px; }
.gcard .g-ic { font: 700 2.1rem/1 var(--f-han); color: var(--blue); } .gcard b { font-size: 1.02rem; } .gcard span { font-size: .85rem; color: var(--ink2); }
.gcard.feat { grid-column: 1 / -1; background: var(--blue); border-color: var(--blue-d); color: var(--on-blue); }
.gcard.feat .g-ic, .gcard.feat span { color: var(--on-blue); opacity: .92; }

/* ===== Aprender ===== */
.wgrid { display: grid; gap: 10px; } @media (min-width: 700px) { .wgrid { grid-template-columns: 1fr 1fr; } }
.wcard { display: grid; grid-template-columns: 74px 1fr auto; gap: 4px 12px; align-items: center; padding: 12px; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r); }
.wcard .hz { font-size: 2.3rem; text-align: center; border: 0; background: none; color: var(--ink); padding: 0; }
.wcard .acts { display: flex; gap: 6px; }
.wcard .mn { grid-column: 1 / -1; font-size: .85rem; color: var(--ink2); padding-top: 6px; border-top: 1px dashed var(--line); }
.ck { display: inline-grid; justify-items: center; gap: 1px; margin: 4px 8px 4px 0; padding: 6px 8px; min-width: 64px; max-width: 96px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); text-align: center; }
.ck .hz { font-size: 1.7rem; } .ck small { font-size: .72rem; line-height: 1.2; color: var(--ink2); } .ck .py { color: var(--blue); }
.tk { cursor: pointer; border-bottom: 2px dotted var(--line2); }
details.acc { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r); padding: 4px 16px; } details.acc + details.acc { margin-top: 10px; }
details.acc summary { cursor: pointer; font-weight: 700; padding: 12px 0; list-style: none; display: flex; gap: 10px; align-items: center; justify-content: space-between; } details.acc summary::-webkit-details-marker { display: none; }
details.acc summary::after { content: "+"; font-size: 1.4rem; color: var(--blue); } details.acc[open] summary::after { content: "–"; }
.ex { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px dashed var(--line); } .ex > div { flex: 1; } .ex .big { font-family: var(--f-han); font-size: 1.35rem; line-height: 1.4; }
.tones { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tones button { display: grid; gap: 2px; justify-items: center; padding: 10px 4px; border: 1.5px solid var(--line); border-bottom-width: 4px; border-radius: 14px; background: var(--surface); }
.tones .py { font-size: 1.5rem; } .tones small { font-size: .72rem; color: var(--ink2); text-align: center; }
.rcard { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 14px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--surface); margin-bottom: 10px; }
.rcard .num { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--wash); color: var(--blue); font-weight: 700; }
.rcard.done .num { background: var(--seal); color: #fff; font-family: var(--f-han); }
.sent { padding: 12px 0; border-top: 1px dashed var(--line); } .sent .big { font-family: var(--f-han); font-size: 1.5rem; line-height: 1.55; }
.rad { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--surface); margin-bottom: 10px; } .rad .rb { font: 700 2.4rem/1 var(--f-han); width: 56px; text-align: center; color: var(--blue); }
select.in, textarea.in, input.in { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line2); border-radius: 12px; background: var(--surface); font-size: 1.1rem; } textarea.in { font-family: var(--f-han); resize: vertical; }
label.f { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }

/* ===== Juegos ===== */
.gbar { display: flex; align-items: center; gap: 12px; margin: 16px 0; } .gbar .bar { flex: 1; } .gbar b { font-variant-numeric: tabular-nums; }
.opts { display: grid; gap: 10px; } .opts.twof { grid-template-columns: 1fr 1fr; } .opts.twof .opt { padding: 12px; font-size: 1rem; } @media (min-width: 560px) { .opts.two { grid-template-columns: 1fr 1fr; } }
.opt { text-align: left; padding: 14px 16px; border: 1.5px solid var(--line2); border-bottom-width: 4px; border-radius: 14px; background: var(--surface); font-size: 1.08rem; font-weight: 500; }
.opt:active { transform: translateY(2px); }
.opt.ok { background: var(--jade); border-color: var(--jade); color: #fff; } .opt.no { background: var(--seal-w); border-color: var(--seal); animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.prompt { text-align: center; padding: 18px 8px; } .prompt .hz { font-size: clamp(4rem, 18vw, 6rem); } .prompt .py { font-size: 1.3rem; }
.fb { margin: 12px 0; padding: 12px 14px; border-radius: 12px; background: var(--seal-w); } .fb.ok { background: var(--jade-w); }
.result { text-align: center; padding: 26px 16px; } .result .score { font-size: 3.4rem; font-weight: 800; line-height: 1; color: var(--blue); } .result .xp { margin: 8px 0 16px; font-weight: 700; }
.mgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .mcol { display: grid; gap: 10px; align-content: start; }
.mt { min-height: 62px; padding: 8px; border: 1.5px solid var(--line2); border-bottom-width: 4px; border-radius: 14px; background: var(--surface); display: grid; place-items: center; text-align: center; font-size: 1rem; }
.mt.h { font: 600 1.9rem/1.1 var(--f-han); }
.mt.sel { border-color: var(--blue); background: var(--wash); } .mt.done { visibility: hidden; } .mt.bad { animation: shake .3s; border-color: var(--seal); }
.arena { position: relative; height: min(34vh, 300px); min-height: 200px; overflow: hidden; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--surface) var(--meander-bg); }
.arena .drop { position: absolute; left: 50%; top: 0; translate: -50% 0; padding: 4px 18px; border: 2px solid var(--blue); border-bottom-width: 5px; border-radius: 14px; background: var(--wash); font: 700 2.4rem/1.2 var(--f-han); white-space: nowrap; }
.arena .floor { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--seal); opacity: .7; }
.lives { letter-spacing: 3px; color: var(--seal); }
.bank { display: flex; flex-wrap: wrap; gap: 8px; min-height: 58px; padding: 10px; border-radius: 14px; }
.bank.ans { border: 1.5px dashed var(--line2); background: var(--surface); min-height: 70px; }
.wchip { padding: 8px 14px; border: 1.5px solid var(--line2); border-bottom-width: 4px; border-radius: 12px; background: var(--surface); font: 600 1.35rem/1.3 var(--f-han); }
.wchip.used { opacity: .25; pointer-events: none; }

/* ===== Cuenta ===== */
.auth { max-width: 440px; }
.google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 46px; border: 1.5px solid var(--line2); border-radius: 12px; background: var(--surface); font-weight: 600; box-shadow: 0 3px 0 var(--line2); }
.google svg { width: 20px; height: 20px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--ink2); font-size: .85rem; } .or::before, .or::after { content: ""; flex: 1; height: 1.5px; background: var(--line); }
.badges { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); } @media (min-width: 700px) { .badges { grid-template-columns: repeat(4, 1fr); } }
.badge { padding: 12px; border: 1.5px solid var(--line); border-radius: var(--r); text-align: center; background: var(--surface); }
.badge .hz { display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto 6px; border-radius: 9px; background: var(--seal); color: #fff; font-size: 1.5rem; } .badge.off { opacity: .55; } .badge.off .hz { background: var(--line2); }
.badge b { display: block; font-size: .9rem; } .badge span { font-size: .75rem; color: var(--ink2); }

/* ===== Tonos y ruta ===== */
.t1 { color: var(--t1); } .t2 { color: var(--t2); } .t3 { color: var(--t3); } .t4 { color: var(--t4); } .t5 { color: var(--t5); }
.py .sp, .sp { display: inline-block; width: .28em; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0; font-weight: 600; font-size: .92rem; } .legend span { display: inline-flex; gap: 5px; align-items: baseline; }
svg.tc { width: 100%; height: auto; display: block; }
svg.tc .grid line { stroke: var(--line); stroke-width: .6; stroke-dasharray: 2 3; } svg.tc text { font-size: 7px; fill: var(--ink2); }
svg.tc .ln { fill: none; stroke: currentColor; stroke-width: 4.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
svg.tc .dot { fill: currentColor; } svg.tc.anim .ln { animation: tdraw .9s ease-out both; } @keyframes tdraw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
svg.tc.mini { width: 56px; flex: none; }
.tgrid { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; margin-top: 12px; } @media (min-width: 700px) { .tgrid { grid-template-columns: repeat(3, 1fr); } }
.tcard { padding: 12px; border: 1.5px solid var(--line); border-bottom-width: 4px; border-radius: 14px; background: var(--surface); }
.tcard-h { display: grid; margin-bottom: 4px; } .tcard-h span { font-size: .85rem; color: var(--ink2); } .tcard .mk { font: 700 1.6rem/1 var(--f-ui); }
.tcard.wide { max-width: 300px; margin: 10px auto; display: grid; gap: 8px; justify-items: center; }
.tco { display: flex; align-items: center; gap: 10px; } .tco span { display: grid; } .tco small { color: var(--ink2); font-size: .8rem; }
.opt .tco b { font-weight: 700; }
.opt .tco b .py { font-style: normal; font-weight: 600; margin-left: 4px; } .tcombo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; } .tplus { font-weight: 700; color: var(--ink2); } .opt.ok .tplus { color: #fff; }
.how { padding-left: 1.2em; margin: 10px 0; display: grid; gap: 6px; } .mistake { padding: 8px 12px; border-radius: 10px; background: var(--seal-w); }
.exw { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0; } @media (min-width: 560px) { .exw { grid-template-columns: repeat(6, 1fr); } }
.exw-i, .pcell, .combo { display: grid; justify-items: center; gap: 1px; padding: 8px 4px; border: 1.5px solid var(--line); border-bottom-width: 4px; border-radius: 12px; background: var(--surface); color: var(--ink); } .exw-i .hz, .pcell .hz, .combo .hz { font-size: 1.7rem; } .exw-i small, .pcell small, .combo small { font-size: .7rem; color: var(--ink2); line-height: 1.2; text-align: center; }
.pairs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; } .pcell .hz { font-size: 2.6rem; } .pcell .py { font-size: 1.2rem; }
.combos { display: grid; gap: 8px; grid-template-columns: repeat(2, 1fr); margin: 10px 0; } @media (min-width: 700px) { .combos { grid-template-columns: repeat(4, 1fr); } } .combo b { font-size: .75rem; color: var(--ink2); }
.sandhi { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 12px 0; text-align: center; } .sandhi > div { display: grid; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); } .sandhi .hz { font-size: 2rem; } .sandhi small { color: var(--ink2); font-size: .72rem; }
.rules { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; } .rules > div { display: grid; justify-items: center; gap: 1px; padding: 10px 6px; border: 1.5px solid var(--jade); border-radius: 12px; background: var(--jade-w); text-align: center; } .rules > div.no { border-color: var(--line2); background: var(--surface); } .rules .hz { font-size: 1.8rem; } .rules small { font-size: .72rem; color: var(--ink2); }
.center { text-align: center; } .muted-py { font-size: 1.1rem; color: var(--ink2); }
.lsn { max-width: 640px; margin: 0 auto; padding-top: 14px; } .lbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; } .lbar .bar { flex: 1; height: 10px; } .lbar .small { min-width: 3ch; text-align: right; font-variant-numeric: tabular-nums; }
.lsn h2 { margin-bottom: 10px; } .lbody { display: block; } .lfoot { margin-top: 18px; display: flex; justify-content: flex-end; } .lfoot .btn { min-width: 160px; }
.qp .prompt .mean { font-size: 1.6rem; font-weight: 700; } .lsn .tag { margin-bottom: 8px; }
.lsn .opts { margin-top: 12px; } .opt:disabled { cursor: default; } .opt.ok, .opt.ok * { color: #fff; } .opt.ok .tco small { color: #fff; } .opt.ok .tco svg.tc { color: #fff; }
.opts.two { grid-template-columns: 1fr; } @media (min-width: 560px) { .opts.two { grid-template-columns: 1fr 1fr; } }
.stamp.big { position: static; margin: 0 auto 12px; width: 72px; height: 72px; font-size: 38px; border-radius: 12px; animation: stamp .55s cubic-bezier(.2, 1.4, .4, 1) both; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.step { position: relative; display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 12px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--surface); }
.step .nd { width: 44px; height: 44px; display: grid; place-items: center; border: 2.5px solid var(--line2); border-radius: 12px; font-weight: 700; color: var(--ink2); } .step .nd .hz { font-size: 1.4rem; }
.step.cur { border-color: var(--blue); box-shadow: 0 4px 0 var(--blue-d); } .step.cur .nd { border-color: var(--blue); color: var(--blue); background: var(--wash); }
.step.done .nd { background: var(--seal); border-color: var(--seal); color: #fff; } .step.lock { opacity: .78; } .step.lock .nd { border-style: dashed; }
.step .sa { display: flex; } @media (max-width: 520px) { .step { grid-template-columns: 44px 1fr; } .step .sa { grid-column: 1 / -1; } .step .sa .btn { width: 100%; } }
.card.next { border-color: var(--blue); box-shadow: 0 4px 0 var(--blue-d); } .card.next .label { font-size: .85rem; color: var(--ink2); font-weight: 600; margin-bottom: 4px; }
.hwbox { position: relative; width: fit-content; max-width: 100%; margin: 12px auto 4px; border: 1.5px solid var(--line); border-radius: 12px; background: linear-gradient(to right, transparent calc(50% - .5px), var(--line) calc(50% - .5px), var(--line) calc(50% + .5px), transparent calc(50% + .5px)), linear-gradient(to bottom, transparent calc(50% - .5px), var(--line) calc(50% - .5px), var(--line) calc(50% + .5px), transparent calc(50% + .5px)), var(--bg); touch-action: none; min-height: 180px; min-width: 180px; } .hwbox svg { display: block; max-width: 100%; }

@media (max-width: 520px) { .lsn .wcard { grid-template-columns: auto 1fr auto; gap: 4px 10px; } .lsn .wcard .hz { font-size: 2rem; } .lsn .wcard .acts { gap: 4px; } .lsn .wcard .icon-btn { width: 36px; height: 36px; border-radius: 10px; } }

/* ===== Ventana ===== */
.modal { position: fixed; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(8, 12, 30, .6); }
.modal.open { display: flex; }
.sheet { position: relative; width: min(100%, 420px); max-height: 90dvh; overflow: auto; text-align: center; padding: 22px 18px 18px; background: var(--surface); border: 1.5px solid var(--line2); border-radius: 20px; }
.sheet .x { position: absolute; top: 8px; right: 8px; }
.sheet .bigc { font-size: 5rem; line-height: 1.1; } .sheet canvas { background: var(--bg); border: 1.5px solid var(--line); border-radius: 12px; touch-action: none; max-width: 100%; }

/* Meandro (回纹): franja decorativa */
:root { --meander: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='10' viewBox='0 0 24 10'%3E%3Cpath d='M0 9.2H2V1.2H10V7H5V4h3' fill='none' stroke='%231B3A9C' stroke-width='1.4'/%3E%3Cpath d='M12 9.2H14V1.2H22V7H17V4h3' fill='none' stroke='%231B3A9C' stroke-width='1.4'/%3E%3C/svg%3E"); --meander-bg: none; }
:root[data-theme="dark"] { --meander: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='10' viewBox='0 0 24 10'%3E%3Cpath d='M0 9.2H2V1.2H10V7H5V4h3' fill='none' stroke='%237C98FF' stroke-width='1.4'/%3E%3Cpath d='M12 9.2H14V1.2H22V7H17V4h3' fill='none' stroke='%237C98FF' stroke-width='1.4'/%3E%3C/svg%3E"); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --meander: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='10' viewBox='0 0 24 10'%3E%3Cpath d='M0 9.2H2V1.2H10V7H5V4h3' fill='none' stroke='%237C98FF' stroke-width='1.4'/%3E%3Cpath d='M12 9.2H14V1.2H22V7H17V4h3' fill='none' stroke='%237C98FF' stroke-width='1.4'/%3E%3C/svg%3E"); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

.top-stats .icon-btn { width: 34px; height: 34px; } .top-stats { align-items: center; }
label.f textarea.in { font-family: inherit; } details summary { cursor: pointer; }

/* Lector de lecturas */
.rd-line { line-height: 1; padding-top: 4px; }
.wd { display: inline-flex; flex-direction: column; align-items: center; margin: 0 1px 4px; border-bottom: 0; cursor: pointer; vertical-align: bottom; }
.wd.tk { border-bottom: 0; }
.wd b { font-weight: 400; font-size: 1.5rem; line-height: 1.5; border-bottom: 2px dotted var(--line2); }
.wd .wp { font-style: normal; font-size: .72rem; line-height: 1.1; color: var(--muted, #6b6b6b); font-family: var(--f-body, inherit); min-height: 1.1em; }
.rd-line .pu { font-size: 1.5rem; line-height: 1.5; align-self: flex-end; }
.sent.playing { background: color-mix(in srgb, var(--accent, #c0392b) 10%, transparent); border-radius: 10px; }
.gl { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.glc { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: inherit; font: inherit; font-size: .8rem; cursor: pointer; text-align: left; }
.glc .hz { font-size: 1.05rem; } .glc .py { font-size: .72rem; opacity: .75; }

/* Portada */
.wl { display: grid; gap: clamp(36px, 7vw, 72px); max-width: 1040px; margin: 0 auto; padding-bottom: 24px; }
.wl h1 { font-size: clamp(2rem, 6vw, 3.4rem); line-height: 1.06; letter-spacing: -.035em; font-weight: 800; margin: 0 0 14px; text-wrap: balance; }
.wl h2 { font-size: clamp(1.35rem, 3.2vw, 1.85rem); letter-spacing: -.02em; line-height: 1.15; margin: 0 0 8px; }
.wl-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(24px, 5vw, 56px); align-items: center; padding-top: 8px; }
.wl-lead { font-size: 1.1rem; line-height: 1.55; color: var(--ink2); max-width: 46ch; margin: 0; }
.wl-cta { gap: 10px; margin: 22px 0 12px; flex-wrap: wrap; }
.wl-tgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wt { position: relative; color: var(--t5); } .wt.t1 { color: var(--t1); } .wt.t2 { color: var(--t2); } .wt.t3 { color: var(--t3); } .wt.t4 { color: var(--t4); }
.wt-main { all: unset; box-sizing: border-box; cursor: pointer; display: grid; justify-items: center; gap: 2px; width: 100%; padding: 14px 10px 12px; border: 1.5px solid var(--line); border-radius: 18px; background: var(--surface); transition: border-color .15s, transform .15s; }
.wt-main:hover { border-color: currentColor; } .wt-main:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; } .wt.on .wt-main { border-color: currentColor; transform: translateY(-2px); }
.wt .hz { font-family: var(--f-han); font-size: clamp(2.6rem, 9vw, 3.6rem); line-height: 1.1; color: var(--ink); font-weight: 600; }
.wt-py { font-weight: 700; font-size: 1.15rem; } .wt-m { font-size: .8rem; color: var(--ink2); }
.wt svg.tc { width: 72%; margin: 4px 0; } .wt-say { position: absolute; top: 6px; right: 6px; width: 34px; height: 34px; }
.wl-cap { margin: 10px 2px 0; }
.wl-read { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(20px, 4vw, 48px); align-items: center; }
.wl-sent { background: var(--surface); border: 1.5px solid var(--line); border-radius: 18px; padding: 16px 18px 14px; }
.wl-sent .rd-line { font-size: 1.1em; } .wl-sent .wd b { font-size: 2rem; }
.wl-steps ol { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: s; border-top: 2px solid var(--ink); }
.wl-steps li { counter-increment: s; padding: 14px 16px 0 0; display: grid; gap: 4px; align-content: start; }
.wl-steps li::before { content: counter(s); font-weight: 800; color: var(--blue); font-size: 1.4rem; line-height: 1; }
.wl-steps li b { font-size: 1.05rem; } .wl-steps li span { font-size: .9rem; }
.wl-path { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 14px 0 10px; position: relative; }
.wl-lv { display: grid; gap: 2px; padding: 16px 18px; border: 1.5px solid var(--line); background: var(--surface); }
.wl-lv:first-child { border-radius: 18px 0 0 18px; } .wl-lv:last-child { border-radius: 0 18px 18px 0; } .wl-lv + .wl-lv { border-left: 0; }
.wl-lv b { font-size: 1.15rem; } .wl-lv span { color: var(--blue); font-weight: 700; } .wl-lv small { color: var(--ink2); }
.wl-lv.cur { background: var(--wash); border-color: var(--blue); } .wl-lv.cur + .wl-lv { border-left: 1.5px solid var(--blue); }
.wl-lv.soon { background: transparent; border-style: dashed; } .wl-lv.soon span { color: var(--ink2); }
.wl-end { border-top: 2px solid var(--ink); padding-top: 28px; max-width: 62ch; } .wl-end .muted { margin: 0; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--blue); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
@media (max-width: 760px) { .wl-hero, .wl-read { grid-template-columns: 1fr; } .wl-steps ol { grid-template-columns: 1fr 1fr; row-gap: 14px; } .wl-path { grid-template-columns: 1fr; } .wl-lv:first-child { border-radius: 18px 18px 0 0; } .wl-lv:last-child { border-radius: 0 0 18px 18px; } .wl-lv + .wl-lv { border-left: 1.5px solid var(--line); border-top: 0; } .wl-lv.cur + .wl-lv { border-top: 0; } }
@media (prefers-reduced-motion: reduce) { .wt-main { transition: none; } svg.tc.anim .ln { animation: none; } }

/* Entrada: sin menús hasta iniciar sesión o probar como invitado */
body.landing .side, body.landing .tabbar, body.landing .top-stats { display: none !important; }
body.landing .main { padding-bottom: 60px; }
@media (min-width: 900px) {
  body.landing .shell { display: block; }
  body.landing .topbar { display: flex; }
  body.landing .main { padding: 24px 36px 60px; max-width: 1100px; }
}

.top-auth { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.seg-s button { padding: 4px 10px; font-size: .8rem; min-height: 0; }
@media (max-width: 420px) { .top-auth { gap: 6px; } .top-auth .btn.small { padding: 0 10px; } }

/* Sonidos del pinyin */
.snd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.snd { padding: 14px; }
.snd-top { display: flex; align-items: center; justify-content: space-between; }
.snd-l { font-size: 1.7rem; letter-spacing: -.02em; }
.snd-ex { display: flex; align-items: baseline; gap: 10px; margin-top: 4px; }
.snd-ex .hz { font-size: 1.8rem; }
/* Entrenamiento del oído */
.oi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 8px; }
.oi-t { display: grid; place-items: center; align-content: center; min-height: 54px; padding: 4px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-decoration: none; text-align: center; }
.oi-t b { font-size: .95rem; } .oi-t i { font-style: normal; font-size: .7rem; color: var(--ink2); }
.oi-t.test { border-style: dashed; border-color: var(--blue); }
.oi-t.done { background: var(--wash); border-color: var(--blue); }
.oi-t.done b::after { content: " ✓"; color: var(--blue); }
.oi-t.lock { opacity: .45; }
a.oi-t:hover { border-color: var(--blue); }
.oi-card { margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: var(--wash); text-align: left; }
.oi-diff { margin: 8px 0 0; padding: 0; list-style: none; text-align: left; font-size: .92rem; display: grid; gap: 2px; }
.oi-diff .ok::before { content: "✓ "; color: var(--blue); } .oi-diff .no::before { content: "✗ "; color: var(--seal); } .oi-diff .no { font-weight: 600; }
/* Cabecera y pestañas en pantallas estrechas */
.seg[role="tablist"] { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.seg[role="tablist"]::-webkit-scrollbar { display: none; }
.seg[role="tablist"] button { white-space: nowrap; flex: none; }
.top-stats { flex-wrap: nowrap; align-items: center; }
@media (max-width: 430px) {
  .topbar { gap: 6px; padding-left: 12px; padding-right: 12px; }
  .topbar .brand { font-size: .92rem; gap: 7px; min-width: 0; }
  .topbar .brand .mark { width: 30px; height: 30px; font-size: 17px; flex: none; }
  .top-stats { gap: 5px; }
  .top-stats .pill { padding: 4px 8px; font-size: .82rem; }
  .top-stats .chip { padding: 4px 9px; font-size: .8rem; }
}

/* ===== Rediseño: Inicio, Ruta y lecciones (mismo lenguaje que la portada) ===== */
h1 { font-weight: 800; letter-spacing: -.03em; }
.hello { margin: 26px 0 18px; } .hello h1 { font-size: clamp(1.9rem, 5vw, 2.7rem); line-height: 1.05; }
.hello p { font-size: 1.02rem; }

/* Próxima lección: el elemento principal de Inicio */
.next-hero { position: relative; overflow: hidden; display: block; padding: 26px 24px 24px; border-radius: 24px; background: var(--blue-d); color: #fff; box-shadow: 0 6px 0 color-mix(in srgb, var(--blue-d) 70%, #000); }
.nh-copy { position: relative; z-index: 1; max-width: 30em; }
.nh-k { font-size: .9rem; font-weight: 600; opacity: .8; }
.next-hero h2 { margin: 6px 0 4px; font-size: clamp(1.7rem, 4.6vw, 2.35rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; color: #fff; }
.next-hero p { margin: 0 0 18px; opacity: .85; }
.nh-deco { position: absolute; right: -10px; top: 50%; width: min(48%, 250px); transform: translateY(-50%); color: #fff; opacity: .16; pointer-events: none; }
.btn.inv { background: #fff; color: var(--blue-d); box-shadow: 0 4px 0 #B7C4E4; }
.btn.inv:active { box-shadow: 0 1px 0 #B7C4E4; }
.btn.ghost-inv { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.45); }
:root[data-theme="dark"] .next-hero, :root:not([data-theme="light"]) .next-hero { background: var(--wash); color: var(--ink); box-shadow: 0 6px 0 var(--line2); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .next-hero { background: var(--blue-d); color: #fff; } }
:root[data-theme="dark"] .next-hero h2, :root[data-theme="dark"] .nh-deco { color: var(--ink); }
:root[data-theme="dark"] .btn.inv { background: var(--blue); color: var(--on-blue); box-shadow: 0 4px 0 var(--blue-d); }
:root[data-theme="dark"] .btn.ghost-inv { color: var(--ink); box-shadow: inset 0 0 0 2px var(--line2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .next-hero h2, :root:not([data-theme="light"]) .nh-deco { color: var(--ink); } :root:not([data-theme="light"]) .btn.inv { background: var(--blue); color: var(--on-blue); box-shadow: 0 4px 0 var(--blue-d); } :root:not([data-theme="light"]) .btn.ghost-inv { color: var(--ink); box-shadow: inset 0 0 0 2px var(--line2); } }

/* Palabra del día, más tranquila */
.card.hero { border-radius: 22px; padding: 18px 20px; }
.card.hero::before { display: none; }
.hero-char { font-size: clamp(4.6rem, 18vw, 6.8rem); }

/* Niveles: cuadrícula en lugar de línea que se corta */
.path { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; overflow: visible; padding: 4px 0; }
.stop { flex: none; padding: 12px 8px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--surface); }
.stop::before { display: none !important; }
.stop.cur { border-color: var(--blue); box-shadow: 0 4px 0 var(--blue-d); }
.stop .node { font-family: var(--f-han); }

/* Meta de hoy + cifras: una sola tarjeta */
.home-grid > .stack > .card + .card.facts { margin-top: -12px; border-top: 1.5px dashed var(--line); border-radius: 0 0 22px 22px; padding-top: 14px; }
.home-grid > .stack > .card:has(+ .card.facts) { border-radius: 22px 22px 0 0; border-bottom: 0; }
.gcard.feat { background: var(--surface); color: var(--ink); border-color: var(--seal); border-bottom-width: 5px; }
.gcard.feat .g-ic { color: var(--seal); } .gcard.feat span { color: var(--ink2); opacity: 1; }
.gcard { border-radius: 18px; }

/* Ruta: camino con línea vertical */
.blk-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.blk-n { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink2); font-size: .95rem; }
.steps { gap: 0; }
.step { border: 0; border-radius: 0; background: transparent; padding: 14px 0; align-items: start; }
.step::before { content: ""; position: absolute; left: 21px; top: 0; bottom: 0; width: 3px; background: var(--line2); z-index: 0; }
.step:first-child::before { top: 24px; } .step:last-child::before { bottom: calc(100% - 24px); }
.step.done::before { background: var(--seal); opacity: .55; }
.step .nd { position: relative; z-index: 1; background: var(--bg); border-radius: 14px; }
.step.cur { margin: 6px 0; padding: 16px 14px 16px 0; border-radius: 20px; background: var(--surface); box-shadow: 0 0 0 2px var(--blue), 0 5px 0 var(--blue-d); }
.step.cur::before { background: var(--blue); }
.step.cur .nd { background: var(--blue); color: #fff; border-color: var(--blue); transform: scale(1.08); }
.step.cur .sb b { font-size: 1.2rem; }
.step.done .sb b { font-weight: 600; } .step.done .sb .tag { display: none; }
.step.done .sa .btn, .step.lock .sa .btn { min-height: 0; padding: 2px 0; background: none; box-shadow: none; color: var(--blue); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.step.lock { opacity: 1; } .step.lock .sb b { color: var(--ink2); font-weight: 600; } .step.lock .nd { background: var(--bg); }
@media (max-width: 520px) { .step .sa { grid-column: 2; } .step.cur .sa .btn { width: 100%; } .step:not(.cur) .sa .btn { width: auto; } }

/* Lecciones: columna centrada y pasos con número */
.lsn h2 { font-size: clamp(1.5rem, 4.2vw, 2rem); font-weight: 800; letter-spacing: -.025em; margin-bottom: 12px; }
.lbar .bar { height: 12px; }
.how { list-style: none; padding: 0; counter-reset: s; gap: 10px; }
.how li { counter-increment: s; position: relative; padding: 2px 0 2px 44px; min-height: 32px; }
.how li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: var(--wash); color: var(--blue); font-weight: 800; }
.lsn .lfoot { position: sticky; bottom: calc(var(--nav) + 12px + env(safe-area-inset-bottom)); padding: 10px 0; }
@media (min-width: 900px) { .lsn .lfoot { bottom: 16px; } }
.step .sa .btn.ghost { border: 0; box-shadow: none; background: none; }
.step.cur .sa .btn { min-height: 44px; padding: 0 20px; background: var(--blue); color: #fff; text-decoration: none; box-shadow: 0 4px 0 var(--blue-d); }
.step.cur { margin: 6px -12px; padding: 16px 12px; } .step.cur::before { left: 33px; }
.nh-deco { right: -24px; width: min(40%, 210px); opacity: .12; }

.chk { display: flex; align-items: flex-start; gap: 10px; font-size: .92rem; line-height: 1.4; }
.chk input { width: 20px; height: 20px; margin-top: 1px; flex: none; accent-color: var(--blue); }
/* Oído: camino ondulado */
.oi-ban { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-radius: 20px; background: var(--blue); color: #fff; box-shadow: 0 5px 0 var(--blue-d); }
.oi-ban h2 { margin: 2px 0 2px; color: #fff; font-size: 1.25rem; } .oi-ban p { margin: 0; font-size: .9rem; opacity: .9; } .oi-ban .small { opacity: .85; font-weight: 600; }
.oi-ban > b { flex: none; display: grid; place-items: center; min-width: 54px; height: 54px; border-radius: 16px; background: rgba(255,255,255,.18); font-variant-numeric: tabular-nums; }
.oi-trail { position: relative; margin: 14px 0 8px; color: var(--line2); }
.oi-trail svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; z-index: 0; }
.oi-d { position: absolute; font-size: 3.2rem; line-height: 1; color: var(--line2); opacity: .55; user-select: none; pointer-events: none; font-family: var(--hz, inherit); }
.oi-n { position: absolute; z-index: 1; width: 68px; height: 68px; margin-left: -34px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); border: 3px solid var(--line2); box-shadow: 0 6px 0 var(--line2); color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.25rem; transition: transform .12s, box-shadow .12s; }
a.oi-n:hover { border-color: var(--blue); } a.oi-n:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--blue-d); }
.oi-n.done { background: var(--wash); border-color: var(--blue); box-shadow: 0 6px 0 var(--blue-d); color: var(--blue); font-size: 1.6rem; }
.oi-n.cur { background: var(--blue); border-color: var(--blue-d); box-shadow: 0 6px 0 var(--blue-d), 0 0 0 7px var(--wash); color: #fff; }
.oi-n.test { width: 78px; height: 78px; margin-left: -39px; border-radius: 26px; font-size: 1.7rem; }
.oi-n.lock { background: var(--bg); color: var(--ink2); box-shadow: 0 6px 0 var(--line); border-color: var(--line); } .oi-n.lock b { opacity: .55; }
.oi-go { position: absolute; bottom: calc(100% + 14px); left: 50%; transform: translateX(-50%); padding: 7px 14px; border-radius: 12px; background: var(--surface); color: var(--blue); border: 2px solid var(--blue); font-style: normal; font-size: .85rem; font-weight: 800; white-space: nowrap; }
.oi-go::after { content: ""; position: absolute; left: 50%; top: 100%; width: 10px; height: 10px; background: var(--surface); border: solid var(--blue); border-width: 0 2px 2px 0; transform: translate(-50%, -6px) rotate(45deg); }
.oi-n:focus-visible { outline: 3px solid var(--blue); outline-offset: 5px; }
@media (prefers-reduced-motion: no-preference) { .oi-n.cur .oi-go { animation: oibob 1.6s ease-in-out infinite; } }
@keyframes oibob { 50% { transform: translate(-50%, -5px); } }
.oi-blk > summary { list-style: none; cursor: pointer; } .oi-blk > summary::-webkit-details-marker { display: none; }
.oi-blk > summary .blk-h h2::after { content: " ▾"; color: var(--ink2); font-size: .8em; } .oi-blk[open] > summary .blk-h h2::after { content: " ▴"; }
.oi-blk > summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 8px; }
/* Encabezado de la portada */
body.landing .topbar { padding: calc(12px + env(safe-area-inset-top)) max(16px, calc((100% - 1100px) / 2 + 36px)) 12px; background: color-mix(in srgb, var(--surface) 90%, transparent); border-bottom: 1px solid var(--line); box-shadow: 0 1px 12px rgba(20, 40, 110, .06); }
body.landing .topbar::after { display: none; }
body.landing .topbar .brand { font-size: 1.2rem; gap: 11px; white-space: nowrap; flex: none; }
body.landing .topbar .brand .mark { width: 38px; height: 38px; font-size: 21px; border-radius: 10px; }
body.landing .top-auth { gap: 10px; flex-wrap: nowrap; }
body.landing .top-auth .seg { display: inline-flex; flex-direction: row; flex-wrap: nowrap; margin: 0; padding: 3px; }
body.landing .top-auth .seg button { flex: none; width: auto; padding: 5px 11px; min-height: 0; }
body.landing .top-auth .btn.small { min-height: 40px; padding: 0 18px; white-space: nowrap; }
body.landing .top-auth .ta-in { border: 1.5px solid var(--line2); background: var(--surface); color: var(--blue); box-shadow: none; }
@media (max-width: 520px) {
  body.landing .topbar { padding-left: 12px; padding-right: 12px; gap: 8px; }
  body.landing .topbar .brand { font-size: 1rem; gap: 8px; }
  body.landing .topbar .brand .mark { width: 32px; height: 32px; font-size: 18px; }
  body.landing .top-auth { gap: 6px; }
  body.landing .top-auth .seg button { padding: 4px 8px; font-size: .75rem; }
  body.landing .top-auth .btn.small { min-height: 36px; padding: 0 12px; font-size: .85rem; }
}
@media (max-width: 440px) { body.landing .topbar .brand { font-size: .84rem; gap: 7px; white-space: normal; line-height: 1.05; flex: 0 1 auto; min-width: 0; max-width: 5.6em; } body.landing .topbar .brand .mark { font-size: 18px; } }
@media (max-width: 339px) { body.landing .topbar .brand { font-size: 0; gap: 0; max-width: none; } body.landing .topbar .brand .mark { font-size: 20px; } }

/* Cabecera con paisaje (Inicio, Ruta, Aprender) */
.hello.pano { position: relative; overflow: hidden; isolation: isolate; margin: 0 -16px 18px; padding: calc(26px + env(safe-area-inset-top, 0px) * 0) 20px 84px; border-radius: 0 0 26px 26px; background: linear-gradient(#FBE3D2, var(--bg) 92%); }
.hello.pano::before { content: ""; position: absolute; z-index: -1; left: 0; right: 0; bottom: 0; height: 120px; background: url(../icons/paisaje.svg) center bottom / cover no-repeat; }
.hello.pano h1 { color: #14213D; } .hello.pano p { color: #3E4A6B; max-width: 34em; }
@media (min-width: 900px) { .hello.pano { margin: 22px 0 20px; border-radius: 26px; padding: 30px 32px 104px; } .hello.pano::before { height: 150px; } }
:root[data-theme="dark"] .hello.pano { background: linear-gradient(var(--wash), var(--bg) 92%); } :root[data-theme="dark"] .hello.pano::before { opacity: .45; } :root[data-theme="dark"] .hello.pano h1 { color: var(--ink); } :root[data-theme="dark"] .hello.pano p { color: var(--ink2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hello.pano { background: linear-gradient(var(--wash), var(--bg) 92%); } :root:not([data-theme="light"]) .hello.pano::before { opacity: .45; } :root:not([data-theme="light"]) .hello.pano h1 { color: var(--ink); } :root:not([data-theme="light"]) .hello.pano p { color: var(--ink2); } }
/* Acento del sello: la acción del momento */
.step.cur { box-shadow: 0 0 0 2px var(--seal), 0 5px 0 var(--seal-d); } .step.cur::before { background: var(--seal); }
.step.cur .nd { background: var(--seal); border-color: var(--seal-d); }
.step.cur .sa .btn { background: var(--seal); box-shadow: 0 4px 0 var(--seal-d); }
.next-hero .btn.inv { background: var(--seal); color: #fff; box-shadow: 0 4px 0 var(--seal-d); }
/* Paisaje tenue detrás de lecciones y entrenamiento del oído */
.lsn, #oido { position: relative; isolation: isolate; }
.lsn::before, #oido::before { content: ""; position: fixed; z-index: -1; left: 0; right: 0; bottom: calc(var(--nav) - 6px); height: 190px; background: url(../icons/paisaje.svg) center bottom / cover no-repeat; opacity: .28; pointer-events: none; }
@media (min-width: 900px) { .lsn::before, #oido::before { left: var(--side); bottom: 0; height: 240px; } }
:root[data-theme="dark"] .lsn::before, :root[data-theme="dark"] #oido::before { opacity: .12; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lsn::before, :root:not([data-theme="light"]) #oido::before { opacity: .12; } }
/* Oído: nivel actual con el sello y línea más visible */
.oi-trail { color: #8FA2C2; }
.oi-n.cur { background: var(--seal); border-color: var(--seal-d); box-shadow: 0 6px 0 var(--seal-d), 0 0 0 7px var(--seal-w); }
.oi-go { color: var(--seal); border-color: var(--seal); } .oi-go::after { border-color: var(--seal); }
.oi-ban { background: var(--blue); }
/* Aprender: portada de módulos */
.mods { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 700px) { .mods { grid-template-columns: repeat(3, 1fr); } } @media (min-width: 1100px) { .mods { grid-template-columns: repeat(4, 1fr); } }
.mod { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 18px 10px 16px; text-align: center; text-decoration: none; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 20px; box-shadow: 0 4px 0 var(--line); transition: transform .08s, box-shadow .08s; }
.mod .hz { font-size: 2.2rem; margin-bottom: 4px; } .mod b { font-size: 1.05rem; } .mod small { color: var(--ink2); font-weight: 500; font-size: .8rem; line-height: 1.3; }
.mod:hover { border-color: var(--blue); } .mod:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.mhead { margin: 18px 0 14px; } .mhead .back { display: inline-block; margin-bottom: 6px; font-weight: 700; text-decoration: none; padding: 4px 0; }
.mhead h1 .hz { color: var(--seal); margin-right: 4px; }
@media (max-width: 899px) { .dhead { display: none; } } @media (min-width: 900px) { .mhead { display: none; } }
.oi-d.l { left: 6%; } .oi-d.r { right: 6%; }
/* Oído en pantallas anchas: camino más estrecho y centrado, con los caracteres a los lados */
@media (min-width: 700px) {
  .oi-trail { max-width: 400px; margin-left: auto; margin-right: auto; }
  .oi-d.l { left: -70px; } .oi-d.r { right: -70px; }
  .oi-ban { max-width: 560px; margin-left: auto; margin-right: auto; }
}
.oi-trail { margin-top: 40px; }

/* Oído: imagen de referencia (emoji) en la tarjeta de respuesta */
.oi-card.has-emo { display: flex; align-items: center; gap: 14px; text-align: left; }
.oi-emo { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: var(--wash); font-size: 2.2rem; line-height: 1; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }

/* Tarjetas */
.fc-h { font-size: 1rem; margin: 18px 0 8px; color: var(--ink2); font-weight: 700; }
.fc-decks { display: grid; grid-template-columns: 1fr; gap: 10px; } @media (min-width: 600px) { .fc-decks { grid-template-columns: 1fr 1fr; } }
.fc-deck { position: relative; display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 14px 16px; border-radius: 16px; border: 1.5px solid var(--line); border-bottom-width: 4px; background: var(--surface); color: var(--ink); }
.fc-deck b { font-size: 1.05rem; } .fc-deck small { color: var(--ink2); }
.fc-deck:hover:not([disabled]) { border-color: var(--blue); } .fc-deck[disabled] { opacity: .5; cursor: default; }
.fc-n { position: absolute; top: 12px; right: 14px; min-width: 30px; padding: 2px 9px; border-radius: 99px; background: var(--wash); color: var(--blue); font-weight: 800; text-align: center; }
.fc-card { perspective: 1200px; margin: 14px 0; cursor: pointer; outline-offset: 4px; }
.fc-inner { display: grid; transition: transform .45s; transform-style: preserve-3d; }
.fc-card.flipped .fc-inner { transform: rotateY(180deg); }
.fc-face { grid-area: 1 / 1; position: relative; backface-visibility: hidden; -webkit-backface-visibility: hidden; min-height: 340px; padding: 24px 18px; border-radius: 24px; background: var(--surface); border: 1.5px solid var(--line); box-shadow: 0 5px 0 var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.fc-face.back { transform: rotateY(180deg); justify-content: flex-start; }
.fc-hz { font-size: clamp(4.5rem, 22vw, 7rem); line-height: 1.1; } .fc-hz2 { font-size: 3rem; line-height: 1.1; }
.fc-hint { margin: 14px 0 0; } .fc-py { font-size: 1.3rem; } .fc-mean { font-size: 1.15rem; font-weight: 600; margin-bottom: 4px; }
.fc-star { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 1.5px solid var(--line2); background: var(--surface); color: var(--ink2); }
.fc-star[aria-pressed="true"] { color: #E0A100; background: #FFF5D6; border-color: #E0A100; } .fc-star[aria-pressed="true"] svg { fill: currentColor; }
.fc-mn { margin: 4px 0 0; max-width: 32em; }
.fc-ex { width: 100%; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line2); display: grid; gap: 10px; text-align: left; }
.fc-sz { font-size: 1.15rem; line-height: 1.6; } .fc-sz .icon-btn { margin-left: 6px; width: 30px; height: 30px; vertical-align: middle; }
.fc-grade { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; } .fc-grade[hidden] { display: none; }
.fc-g { min-height: 52px; border-radius: 14px; border: 0; color: #fff; font-weight: 800; font-size: 1rem; }
.fc-g.no { background: #D9770B; box-shadow: 0 4px 0 #A55608; } .fc-g.mid { background: var(--blue); box-shadow: 0 4px 0 var(--blue-d); } .fc-g.yes { background: var(--jade); box-shadow: 0 4px 0 #11604C; }
.fc-g:active { transform: translateY(3px); box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .fc-inner { transition: none; } }
.ckgrid { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
/* Consola de administración y modo supervisión */
.segl { flex: 1; text-align: center; padding: 8px 14px; border-radius: 10px; font-weight: 600; text-decoration: none; color: var(--ink2); }
.segl[aria-selected="true"] { background: var(--surface); color: var(--blue); box-shadow: 0 1px 3px rgba(20,40,110,.15); }
.adm-ks { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin: 14px 0 0; }
.adm-k { display: flex; flex-direction: column; padding: 12px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--line); }
.adm-k b { font-size: 1.6rem; line-height: 1.1; color: var(--blue); } .adm-k span { font-size: .8rem; color: var(--ink2); }
.adm-list { display: grid; gap: 10px; margin-top: 12px; }
.adm-u { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); padding: 12px 14px; }
.adm-u:hover { border-color: var(--blue); }
.adm-av { flex: none; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--wash); color: var(--blue); font-weight: 800; } .adm-av img { width: 100%; height: 100%; object-fit: cover; }
.adm-m { flex: 1; min-width: 0; display: flex; flex-direction: column; } .adm-m b, .adm-m small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .adm-m small, .adm-r small { color: var(--ink2); font-size: .8rem; }
.adm-r { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.adm-r2 { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); } .adm-r2:last-child { border-bottom: 0; } .adm-r2 b { text-align: right; }
.supbar { position: fixed; z-index: 60; left: 12px; right: 12px; bottom: calc(var(--nav) + 10px + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px 10px 16px; border-radius: 16px; background: #14213D; color: #fff; font-size: .85rem; box-shadow: 0 6px 20px rgba(0,0,0,.28); }
.supbar[hidden] { display: none; } .supbar .btn.ghost { min-height: 34px; background: transparent; color: #fff; border-color: rgba(255,255,255,.5); box-shadow: none; }
@media (min-width: 900px) { .supbar { left: calc(var(--side) + 16px); right: auto; bottom: 16px; max-width: 560px; } }
@media (max-width: 520px) { .adm-r small:last-child { display: none; } }
.ppn { margin: 12px 0; } .ppn .chip { margin-left: 6px; }
/* Portada: preguntas frecuentes */
.wl-faq { max-width: 760px; } .wl-faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.wl-faq summary { cursor: pointer; padding: 12px 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; } .wl-faq summary::-webkit-details-marker { display: none; }
.wl-faq summary::after { content: "+"; color: var(--blue); font-size: 1.3rem; line-height: 1; } .wl-faq details[open] summary::after { content: "–"; }
.wl-faq details p { margin: 0 0 12px; max-width: 60ch; }
/* Cuenta */
.acc-head { display: flex; align-items: center; gap: 16px; }
.acc-av { width: 64px; height: 64px; font-size: 1.6rem; } .acc-id { min-width: 0; } .acc-id h2 { margin: 0; overflow: hidden; text-overflow: ellipsis; } .acc-id p { margin: 2px 0 0; overflow: hidden; text-overflow: ellipsis; }
.acc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px !important; }
.acc-ks { margin: 0; grid-template-columns: repeat(2, 1fr); } @media (min-width: 700px) { .acc-ks { grid-template-columns: repeat(4, 1fr); } }
.acc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0; } .acc-row > div:first-child { min-width: 0; } .acc-row .btn { white-space: nowrap; }
.acc-adm { border-color: var(--seal); } .acc-act { display: flex; flex-wrap: wrap; gap: 10px; }
.acc-sup { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px dashed var(--line2); }
.vnote { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; } .vnote .chip { flex: none; }
/* Reportar este ejercicio */
.rpt-ex { margin: 18px 0 4px; text-align: center; } .rpt-ex .linkbtn { font-size: .85rem; color: var(--ink2); text-decoration: underline; text-underline-offset: 3px; }
/* Ordena la oración: pinyin en fichas y explicación */
.wchip { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; } .wchip .wh { font: 600 1.35rem/1.3 var(--f-han); } .wchip .wp { font: 500 .72rem/1.1 var(--f-ui, inherit); color: var(--ink2); }
#pyt[aria-pressed="true"] { background: var(--wash, #e4ebfa); color: var(--blue); }
.why { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line2); font-size: .92rem; text-align: left; } .why ul { margin: 6px 0 0; padding-left: 18px; } .why li { margin: 4px 0; }
/* Botón Reportar dentro del ejercicio */
.rpt-top { display: flex; justify-content: flex-end; margin: 0 0 8px; } .rpt-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 1.5px solid var(--line2); border-radius: 999px; background: var(--surface); color: var(--ink2); font: 600 .8rem/1 inherit; cursor: pointer; } .rpt-chip svg { width: 14px; height: 14px; } .rpt-chip:hover { color: var(--blue); border-color: var(--blue); }
.adm-tags { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
@media (max-width: 520px) { .adm-tags { flex-direction: column; align-items: flex-end; gap: 3px; } .adm-m { min-width: 0; } }
.adm-list { min-width: 0; } .adm-u { min-width: 0; max-width: 100%; box-sizing: border-box; } .adm-m { flex: 1 1 0; }
.adm-act { margin-top: 4px; display: block; } .adm-act .tag { font-size: .72rem; }
/* Ejemplo de uso en las fichas de palabra */
.wcard .wex { grid-column: 1 / -1; padding-top: 8px; border-top: 1px dashed var(--line); display: grid; gap: 2px; min-width: 0; }
.wex .wex-t { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wex .wex-l { font-size: .72rem; font-weight: 700; color: var(--ink2); background: var(--bg2, rgba(0,0,0,.05)); border-radius: 6px; padding: 1px 6px; }
.wex .big { font-size: 1.15rem; line-height: 1.5; overflow-wrap: anywhere; }
.wex .py { font-size: .9rem; color: var(--ink2); overflow-wrap: anywhere; }
.wex .icon-btn.sm { width: 30px; height: 30px; }
.wex .icon-btn.sm svg { width: 16px; height: 16px; }
.modal .wex { text-align: left; margin: 10px 0 14px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; display: grid; gap: 2px; }
/* Portada: cinco niveles (HSK 1–4 y «HSK 5 en adelante») */
.wl-path { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.wl-lv { padding: 14px 14px; min-width: 0; }
@media (max-width: 980px) and (min-width: 761px) { .wl-path { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 10px; } .wl-lv { border-radius: 14px !important; border-left: 1.5px solid var(--line) !important; } .wl-lv.cur { border-color: var(--blue) !important; } .wl-path { gap: 10px; } }
@media (max-width: 760px) { .wl-path { grid-template-columns: 1fr; } }
/* ===== Avatares (galería propia) ===== */
.av { display: inline-grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: var(--av, var(--wash)); color: #fff; font-family: var(--f-han); font-weight: 600; line-height: 1; overflow: hidden; }
.av-ini { background: var(--wash); color: var(--blue); font-family: inherit; }
.av-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av-ill svg { width: 100%; height: 100%; display: block; }
.av-sec { font-size: .9rem; font-weight: 600; margin: 14px 0 8px; color: var(--ink2, inherit); }
.acc-avw { display: grid; justify-items: center; gap: 6px; }
.acc-avb { font-size: .75rem; padding: 3px 9px; }
.av-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; justify-items: center; }
.av-opt { border: 2px solid transparent; background: none; border-radius: 50%; padding: 3px; cursor: pointer; }
.av-opt[aria-pressed="true"] { border-color: var(--blue); }
.av-opt:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
/* ===== Opiniones ===== */
.stars { display: flex; gap: 4px; }
.star { font-size: 1.9rem; line-height: 1; background: none; border: 0; padding: 2px; color: var(--t2); cursor: pointer; }
.star[aria-pressed="false"] { color: var(--line2); }
.star:focus-visible { outline: 3px solid var(--blue); border-radius: 8px; }
.stars-ro { color: var(--t2); letter-spacing: 1px; white-space: nowrap; }
.rv-card { display: grid; gap: 6px; padding: 14px; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r); min-width: 0; }
.rv-card p { margin: 0; overflow-wrap: anywhere; }
.rv-h { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rv-h > div { display: grid; min-width: 0; flex: 1; }
.rv-h b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-d { font-size: .75rem; }
.rv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.rv-sum { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; }
.wl-reviews { margin: 28px 0; }
.rv-adm .rv-card { border: 0; padding: 0; }
/* ===== Campana del superadministrador ===== */
.adm-bell { display: inline-flex; align-items: center; gap: 4px; }
.adm-bell svg { width: 16px; height: 16px; }
.adm-bell.on { background: var(--seal); color: #fff; border-color: var(--seal); }
/* ===== Apoyo ===== */
.sup-line { text-align: center; margin: 22px 0 6px; }
.sup-qrs { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.sup-qr { display: grid; justify-items: center; gap: 6px; text-align: center; }
.sup-qr img { width: 220px; height: 220px; max-width: 100%; object-fit: contain; background: #fff; border-radius: 12px; border: 1.5px solid var(--line); }
@media (max-width: 520px) { .rv-grid { grid-template-columns: 1fr; } .star { font-size: 1.7rem; } }
.rv-err { color: var(--seal); font-weight: 600; margin-top: -4px; }
.rv-bad.stars .star { color: var(--seal); }
.chk.rv-bad { outline: 2px solid var(--seal); outline-offset: 4px; border-radius: 6px; }
#rvmsg:focus { outline: none; }
/* Pie de la portada */
.wl-foot { position: relative; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px 40px; padding: 34px 0 8px; border-top: 1.5px solid var(--line); }
.wl-foot::before { content: ""; position: absolute; top: -1.5px; left: 0; right: 0; height: 6px; background: var(--meander); opacity: .4; pointer-events: none; }
.wl-fb .brand { margin-bottom: 8px; }
.wl-fb p { margin: 0; max-width: 40ch; }
.wl-fl { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 16px; }
.wl-fl > div { display: grid; gap: 8px; align-content: start; justify-items: start; }
.wl-fl b { font-size: .9rem; }
.wl-fl a, .wl-fl .lnk { font-size: .9rem; color: var(--ink2); text-decoration: none; background: none; border: 0; padding: 0; font: inherit; font-size: .9rem; cursor: pointer; text-align: left; }
.wl-fl a:hover, .wl-fl .lnk:hover { color: var(--blue); text-decoration: underline; }
.wl-fl a:focus-visible, .wl-fl .lnk:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.wl-fc { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.wl-fc a { color: var(--ink); font-weight: 700; white-space: nowrap; text-decoration-color: var(--line2); text-underline-offset: 3px; }
.wl-fc a:hover { color: var(--blue); }
.wl-fc a:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
@media (max-width: 640px) { .wl-foot { grid-template-columns: 1fr; } .wl-fc { flex-direction: column; } }
/* Página «Invítanos un té» */
.sup { display: grid; gap: 18px; max-width: 720px; margin: 0 auto; }
.sup-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center; padding: 8px 0 4px; }
.sup-hero h1 { margin: 0 0 4px; }
.sup-hero p { margin: 0; }
.sup-hero .muted { margin-top: 10px; max-width: 52ch; }
.sup-cup { width: 104px; height: 104px; border-radius: 50%; background: #2E8B6E; display: block; overflow: hidden; box-shadow: 0 0 0 6px color-mix(in srgb, #2E8B6E 18%, transparent); }
.sup-cup svg { width: 100%; height: 100%; display: block; }
.sup-zh { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.sup-zh .hz { font-size: 1.25rem; color: var(--seal); }
.sup-zh .py { color: var(--ink2); font-size: .9rem; }
.sup-steps { margin: 4px 0 2px; padding-left: 1.3em; text-align: left; display: grid; gap: 4px; font-size: .92rem; }
.sup-ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sup-way { display: grid; gap: 4px; align-content: start; text-align: left; padding: 14px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); text-decoration: none; font: inherit; cursor: pointer; }
.sup-way span { font-size: .85rem; color: var(--ink2); }
.sup-way:hover { border-color: var(--blue); }
.sup-way:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.sup-thanks { text-align: center; color: var(--ink2); margin: 4px 0 12px; }
.sup-thanks .hz { color: var(--seal); font-size: 1.15rem; }
@media (max-width: 600px) { .sup-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; } .sup-hero .muted { margin-inline: auto; } .sup-zh { justify-content: center; } .sup-ways { grid-template-columns: 1fr; } .sup-cup { width: 88px; height: 88px; } }
/* Invitación a apoyar: franja de la portada y tarjeta de Inicio */
.tea-cup { display: block; flex: 0 0 auto; border-radius: 50%; background: #2E8B6E; overflow: hidden; }
.tea-cup svg { width: 100%; height: 100%; display: block; }
.wl-tea { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 20px 22px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--surface); }
.wl-tea h2 { margin: 0 0 4px; }
.wl-tea p { margin: 0; max-width: 56ch; }
.tea-card { display: grid; gap: 12px; border-color: color-mix(in srgb, #2E8B6E 45%, var(--line)); }
.tea-h { display: flex; gap: 12px; align-items: flex-start; }
@media (max-width: 640px) { .wl-tea { grid-template-columns: 1fr; justify-items: center; text-align: center; } .wl-tea p { margin-inline: auto; } }

/* ---- Portada: personajes (Muy pronto) ---- */
.wl-cast { --tea: #FDEEDD; background: var(--tea); border-radius: 26px; padding: clamp(20px, 4vw, 36px); display: grid; gap: 8px; }
:root[data-theme="dark"] .wl-cast { --tea: #1E2244; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wl-cast { --tea: #1E2244; } }
.wl-cast h2 { margin: 0; }
.wl-cast-lead { max-width: 58ch; margin: 0; }
.wl-soon { justify-self: start; display: inline-flex; gap: 6px; align-items: center; background: var(--surface); border: 1.5px solid var(--line); border-radius: 99px; padding: 4px 12px; font-weight: 700; font-size: .85rem; color: var(--seal); }
.wl-soon .hz { font-size: 1rem; }
.wl-friends { list-style: none; margin: 30px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.fr { display: grid; grid-template-rows: auto 1fr; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.fr-card > * { min-width: 0; overflow-wrap: anywhere; }
.fr-peek { height: 150px; display: flex; justify-content: center; align-items: flex-end; margin-bottom: -26px; position: relative; z-index: 1; overflow: visible; pointer-events: none; }
.fr-peek svg { height: 176px; width: auto; max-width: none; flex: none; transform-origin: 50% 100%; }
.fr-peek .lids { display: none; }
.fr:hover .fr-peek svg, .fr:focus-within .fr-peek svg { animation: fr-hop .5s ease; }
@keyframes fr-hop { 40% { transform: translateY(-8px); } }
.fr-card { position: relative; z-index: 2; background: var(--surface); border: 1.5px solid var(--line); border-radius: 18px; padding: 16px 14px 14px; display: grid; gap: 4px; align-content: start; }
.fr-card h3 { margin: 0; font-size: 1.15rem; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.fr-card h3 .hz { font-size: 1rem; color: var(--ink2); }
.fr-role { font-weight: 700; color: var(--blue); font-size: .92rem; }
.fr-sp { font-size: .85rem; color: var(--ink2); }
.fr-say { margin-top: 8px; justify-self: start; text-align: left; border: 1.5px dashed var(--line2); background: var(--bg); color: var(--ink); border-radius: 12px; padding: 7px 10px; font: inherit; cursor: pointer; display: grid; }
.fr-say:hover { border-color: var(--blue); }
.fr-say .hz { font-size: 1.15rem; } .fr-say .py { font-size: .85rem; } .fr-tr { font-size: .82rem; color: var(--ink2); }
@media (max-width: 860px) { .wl-friends { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 22px; } }
@media (max-width: 420px) { .fr-peek { height: 124px; } .fr-peek svg { height: 146px; } .wl-friends { gap: 10px; } .fr-card { padding: 14px 10px 12px; } .fr-card h3 { font-size: 1.05rem; } }
@media (prefers-reduced-motion: reduce) { .fr:hover .fr-peek svg, .fr:focus-within .fr-peek svg { animation: none; } }

/* Portada: botones principales a todo el ancho en celular */
@media (max-width: 760px) { .wl-cta .btn { flex: 1 1 100%; } }
/* Portada: Lucía saluda en la presentación */
.wl-hi { display: inline-flex; align-items: flex-end; gap: 10px; margin-top: 18px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.wl-hi-av { width: 64px; height: 64px; flex: none; border-radius: 50%; background: #FDEEDD; border: 1.5px solid var(--line); overflow: hidden; display: grid; place-items: end center; }
:root[data-theme="dark"] .wl-hi-av { background: #1E2244; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wl-hi-av { background: #1E2244; } }
.wl-hi-av svg { width: 64px; height: 64px; }
.wl-hi-av .lids { display: none; }
.wl-hi-b { position: relative; display: grid; background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 6px 12px; margin-bottom: 18px; }
.wl-hi-b .hz { font-size: 1.1rem; } .wl-hi-b .py { font-size: .82rem; } .wl-hi-t { font-size: .85rem; color: var(--ink2); }
.wl-hi:hover .wl-hi-b { border-color: var(--blue); }
.wl-hi:hover .wl-hi-av svg { animation: fr-hop .5s ease; }
@media (prefers-reduced-motion: reduce) { .wl-hi:hover .wl-hi-av svg { animation: none; } }

/* Barra superior: invitar al invitado a crear cuenta */
.chip.chip-cta { background: var(--blue); color: var(--on-blue); border-color: var(--blue); font-weight: 700; }
.chip.chip-cta:hover { background: var(--blue-d); border-color: var(--blue-d); }
/* Ruta: niveles plegables */
details.blk { border: 1.5px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 0; margin-top: 14px; }
details.blk > summary { list-style: none; cursor: pointer; padding: 14px 44px 14px 16px; position: relative; border-radius: var(--r); }
details.blk > summary::-webkit-details-marker { display: none; }
details.blk > summary::after { content: ""; position: absolute; right: 18px; top: 22px; width: 9px; height: 9px; border-right: 2.5px solid var(--ink2); border-bottom: 2.5px solid var(--ink2); transform: rotate(45deg); transition: transform .2s; }
details.blk[open] > summary::after { transform: rotate(-135deg); top: 26px; }
details.blk > summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
details.blk > summary .blk-h h2 { font-size: 1.1rem; }
.blk-bar { height: 6px; border-radius: 99px; background: var(--wash); margin-top: 10px; overflow: hidden; }
.blk-bar i { display: block; height: 100%; background: var(--jade, #1B7F66); border-radius: 99px; }
.blk-in { padding: 0 16px 14px; }
@media (prefers-reduced-motion: reduce) { details.blk > summary::after { transition: none; } }

/* Palabras: buscador y filtros */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wtools { display: grid; gap: 10px; margin-bottom: 10px; }
.wsearch .in { width: 100%; }
.chip .muted { font-weight: 500; margin-left: 2px; }
.w-count { margin: 6px 0 10px; }

/* Chips: el nivel HSK pasa a una segunda línea en vez de cortarse; las demás filas muestran un degradado si hay más */
.chips.lvchips { flex-wrap: wrap; overflow: visible; }
.chips.more { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); }

/* Personajes dentro de la app */
.cast-line { margin-top: 0; }
.cast-cheer { display: flex; justify-content: center; margin: 4px 0 10px; }
.cast-cheer .wl-hi-b { text-align: left; }
.cast-tip { margin: 0 0 14px; }
.cast-tip .wl-hi-b, .cast-goal .wl-hi-b { max-width: 34ch; }
.cast-goal { margin-top: 12px; }
.chip[aria-pressed="true"] .muted { color: inherit; opacity: .85; }

/* Encabezados con escenario propio (js/scenes.js) */
.hello.pano.has-art { padding-bottom: 136px; }
.hello.pano.has-art::before { display: none; }
.pano-art { position: absolute; z-index: -1; left: 0; right: 0; bottom: 0; height: 160px; pointer-events: none; }
.pano-art svg { display: block; width: 100%; height: 100%; }
.pano-art .lids { display: none; }
.pano-art .walker { transition: transform 1.4s cubic-bezier(.3, .7, .3, 1); }
.pano-art .walker .bob { animation: walk-bob 1.6s ease-in-out infinite; }
@keyframes walk-bob { 50% { transform: translateY(-4px); } }
@media (min-width: 900px) { .hello.pano.has-art { padding-bottom: 150px; } .pano-art { height: 200px; } }
@media (prefers-reduced-motion: reduce) { .pano-art .walker { transition: none; } .pano-art .walker .bob { animation: none; } }
.hello.pano.pv-inicio-manana { background: linear-gradient(#FCE1DA, var(--bg) 92%); }
.hello.pano.pv-inicio-tarde, .hello.pano.pv-ruta { background: linear-gradient(#FBE3D2, var(--bg) 92%); }
.hello.pano.pv-aprender { background: linear-gradient(#E2EEE3, var(--bg) 92%); }
.hello.pano.pv-jugar { background: linear-gradient(#DDEAF8, var(--bg) 92%); }
.hello.pano.pv-cuenta { background: linear-gradient(#FDEEDD, var(--bg) 92%); }
.hello.pano.pv-inicio-noche { background: linear-gradient(#26315C, var(--bg) 92%); }
.hello.pano.pv-inicio-noche h1 { color: #F4F6FF; } .hello.pano.pv-inicio-noche p { color: #C9D2F0; }
:root[data-theme="dark"] .hello.pano.has-art { background: linear-gradient(#1E2A55, var(--bg) 92%); }
:root[data-theme="dark"] .hello.pano.pv-aprender { background: linear-gradient(#16263A, var(--bg) 92%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hello.pano.has-art { background: linear-gradient(#1E2A55, var(--bg) 92%); } :root:not([data-theme="light"]) .hello.pano.pv-aprender { background: linear-gradient(#16263A, var(--bg) 92%); } }
/* Sonidos: sonido aislado arriba y palabra de ejemplo abajo, cada uno con su altavoz */
.snd-iso { margin: 2px 0 6px; } .snd-iso b { color: var(--blue); }
.snd-ex { display: flex; align-items: center; gap: 8px; } .snd-ex .snd-w { margin-left: auto; width: 32px; height: 32px; }
.btn .py { display: inline; color: inherit; font-weight: 700; margin-left: 2px; }
/* Aviso cuando la voz china no empieza a sonar */
.voz-off { margin: 12px 0; text-align: left; } .voz-off p { margin: 4px 0 8px; } .voz-off ol { margin: 0 0 10px; padding-left: 20px; } .voz-off .row { gap: 8px; }
/* Consola: resumen con indicadores y gráficos */
.adm-sec { margin-top: 20px; } .adm-sec > h2 { font-size: 1.15rem; margin: 0 0 8px; }
.adm-k small { font-size: .74rem; color: var(--ink2); margin-top: 4px; line-height: 1.3; }
a.adm-k { text-decoration: none; color: inherit; } a.adm-k:hover, a.adm-k:focus-visible { border-color: var(--blue); }
.adm-ks3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 6px; } .adm-ks3 .adm-k b { font-size: 1.3rem; }
.adm-chs { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin-top: 12px; }
.adm-chc h3 { margin: 0; font-size: 1rem; } .adm-chc p { margin: 2px 0 8px; }
.adm-ch { display: block; width: 100%; height: auto; overflow: visible; }
.adm-ch .ch-bar { fill: var(--blue); } .adm-ch .ch-grid { stroke: var(--line); stroke-width: 1; } .adm-ch .ch-ax { fill: var(--ink2); font-size: 15px; font-family: var(--f-ui); }
.adm-ch .ch-b:hover .ch-bar, .adm-ch .ch-b:focus .ch-bar { fill: var(--blue-d); } .adm-ch .ch-b:focus { outline: none; }
.adm-fun { display: grid; gap: 6px; } .adm-fr { display: grid; grid-template-columns: 112px 1fr 36px; align-items: center; gap: 8px; font-size: .9rem; } .adm-fr b { text-align: right; }
.adm-fb { height: 12px; border-radius: 4px; background: var(--wash); overflow: hidden; } .adm-fb i { display: block; height: 100%; background: var(--blue); border-radius: 0 4px 4px 0; }
.adm-pre { margin: 0 0 12px; flex-wrap: wrap; } .adm-prog { color: var(--ink) !important; }
:root[data-theme="dark"] .adm-ch .ch-b:hover .ch-bar { fill: #A9BCFF; }
/* Franja «Hay una versión nueva» */
.upd { position: fixed; z-index: 60; left: 12px; right: 12px; top: calc(66px + env(safe-area-inset-top)); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--line2); box-shadow: 0 8px 24px rgba(14, 22, 48, .18); max-width: 560px; margin: 0 auto; }
.upd span { flex: 1 1 200px; font-weight: 600; }
@media (min-width: 900px) { .upd { top: 16px; left: calc(var(--side) + 20px); } }

/* Redes sociales (js/redes.js) */
.red-ic { flex: none; }
.wl-fl .red-l { display: inline-flex; align-items: center; gap: 8px; }
.red-row { display: flex; flex-wrap: wrap; gap: 8px; }
.red-b { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }

/* Palabras según el temario oficial (js/oficial.js) */
.of-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.of-sum { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag.alt { background: var(--jade-w); color: var(--jade); }
.tag.muted-tag { background: transparent; border: 1px dashed var(--line2); color: var(--ink2); }

/* Más significados (js/lecturas.js, v95) */
.lect { margin-top: 6px; font-size: .9rem; }
.lect summary { cursor: pointer; color: var(--blue); font-weight: 600; font-size: .85rem; width: max-content; }
.lect summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.lect ul { margin: 6px 0 0; padding-left: 0; list-style: none; display: grid; gap: 6px; }
.lect li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.lect .icon-btn.sm { width: 30px; height: 30px; min-width: 30px; }
.lect .icon-btn.sm svg { width: 16px; height: 16px; }
.lect-box { display: flex; justify-content: center; margin: -6px 0 12px; } .lect-box .lect { text-align: left; }

/* Consola: aceptaciones en bloques (legibles en el celular) */
.adm-cons { display: grid; gap: 4px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.adm-cons:last-of-type { border-bottom: 0; }
.adm-cons-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.adm-cons-d { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.adm-cons-t { font-weight: 700; font-variant-numeric: tabular-nums; }
