/* Camino Hanzi — porcelana azul y blanco, con sellos rojos para lo aprendido. */
:root {
  --bg: #F3F6FC; --surface: #FFFFFF; --ink: #0E1630; --ink2: #4A5578; --line: #D3DCEF; --line2: #B7C4E4;
  --blue: #1B3A9C; --blue-d: #102766; --wash: #E3EAFA; --on-blue: #FFFFFF;
  --seal: #D63A2E; --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; }
.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; }
