/* ===========================================================================
   level.html — one level of the Hanzi path, as a work surface.

   The page is a full-height app: a rail listing this level's sessions — five
   characters each — and a main column holding the level's stats, the current
   session's strip, and one lesson card worked in three steps
   (Meet 认 → Write 写 → Discover 组).

   Every class is lp- prefixed. The page also loads style.css, site-nav.css and
   and the short names the design wanted — .side, .main,
   .chip, .go, .step, .brand — already mean something in those files.

   Type follows the rest of the site: Outfit for UI, LXGW WenKai for hanzi.
   =========================================================================== */

/* The --lp-* names are kept exactly as they were — every rule below still
   reads them — but they are now ALIASES of assets/theme.css. The name
   "--lp-blue" is a lie this codebase already told: writing-today.css
   re-declared the same nine names in a GREEN family, so a browser without
   :has() painted both palettes at once. Both sheets now resolve to one
   family, and the family is the site's brand / character-area green — this
   page IS the Hanzi character path, and the four-area taxonomy gives that
   area green. Answer verdicts keep their own hues (see --lp-green below):
   "correct" must never be mistaken for "this is the UI accent". */
.level-page {
  /* Held white text and small type, so it takes an *-ink, never a *-mark:
     .lp-go, .lp-zh-tag, .lp-step.is-on i and .lp-chip-btns[aria-pressed]
     all put #fff on it. 6.4:1. */
  --lp-blue:      var(--t-area-char-ink);   /* was #2563eb */
  --lp-blue-dk:   var(--t-green-deep);      /* was #1d4ed8 — 8.6:1 */
  --lp-blue-soft: var(--t-green-tint);      /* was #eaf1fe */
  /* The faintest surface: a near-white, not a tint. No green token sits
     above --t-green-tint, and the warm page white is what that step is. */
  --lp-blue-faint:var(--t-cream);           /* was #f3f7ff */
  --lp-ink:       var(--t-ink);             /* was #0f172a */
  --lp-ink-2:     var(--t-ink);             /* was #1e293b — the hanzi glyphs */
  --lp-body:      var(--t-ink-2);           /* was #334155 */
  --lp-muted:     var(--t-muted);           /* was #64748b */
  /* theme.css declares --t-faint DECORATION ONLY (2.6:1 on --t-white). This
     alias carries TEXT at nine sites — the rail's path label and tick, the
     hanzi half of the h1, the strip count, the cell captions, the card label,
     the step names and the chip's compound line — so it points at --t-muted
     instead: 5.42:1 on --t-white, 4.89:1 on --t-sand (the main column),
     4.87:1 on --t-green-tint (a known chip), 4.63:1 on --t-line-soft (the
     rail's hover face). --t-faint survives below at the one consumer here
     that really is decoration, .lp-next-line .lp-dot. */
  --lp-faint:     var(--t-muted);           /* was #94a3b8, then --t-faint */
  --lp-line:      var(--t-line);            /* was #e2e8f0 */
  --lp-line-soft: var(--t-line-soft);       /* was #eef2f7 */
  --lp-card-line: var(--t-line);            /* was #e8edf5 */
  --lp-bg:        var(--t-sand);            /* was #f6f8fb — white cards on it */
  /* The sound half of a formula. Was #b45309; --t-gold-ink is the site's
     gold carried deep enough to be type AND to hold white in .lp-zh-tag
     (4.9:1 both ways). NOT --t-area-vocab-*: §3 reserves those four hues. */
  --lp-amber:     var(--t-gold-ink);
  /* CORRECT, the answer verdict — kept as its own hue, and as the *-mark
     because every rule that reads it draws an EDGE. The one place it set
     type (.lp-hint.is-good) now takes --t-correct-ink instead. */
  --lp-green:     var(--t-correct-mark);    /* was #16a34a */
  --lp-ui:    var(--t-ui);
  --lp-hanzi: var(--t-chinese);

  margin: 0;
  background: var(--lp-bg);
  color: var(--lp-ink);
  font-family: var(--lp-ui);
  font-size: 15px;
  line-height: 1.6;
}
.level-page [lang="zh"] { font-family: var(--lp-hanzi); }
/* alpha preserved — the accent's own channels, tinting a selection. */
.level-page ::selection { background: rgba(var(--t-green-rgb), .16); }

/* ── Shell ────────────────────────────────────────────────────────────────
   The site header is sticky and 80px tall (--mw-header-h, from site-nav.css),
   so the rail sticks below it rather than under it. */
.lp-shell { display: flex; align-items: flex-start; min-height: 60vh; }

.lp-side {
  width: 264px; flex: none;
  background: var(--t-white); border-right: 1px solid var(--lp-card-line);
  padding: 1.5rem 1.1rem 1.4rem;
  display: flex; flex-direction: column; gap: .15rem;
  position: sticky; top: var(--mw-header-h, 80px);
  height: calc(100vh - var(--mw-header-h, 80px));
  overflow-y: auto;
}
.lp-path-label {
  margin: .1rem .3rem .55rem; font-size: .62rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; color: var(--lp-faint);
}
/* A button, so the frame and grey face a button carries by default have to be
   stated away — the row is a list item, not a control to be pressed. */
.lp-nav-item {
  display: flex; align-items: center; gap: .65rem; width: 100%;
  padding: .55rem .65rem; border: 0; border-radius: .7rem; background: none;
  text-align: left; cursor: pointer;
  font-family: var(--lp-ui); font-size: .875rem; font-weight: 600;
  color: var(--lp-body); text-decoration: none;
  transition: background .15s, color .15s;
}
.lp-nav-item:hover { background: var(--lp-line-soft); color: var(--lp-ink); }
.lp-nav-item .lp-tick { margin-left: auto; color: var(--lp-faint); font-weight: 400; font-size: .78rem; font-variant-numeric: tabular-nums; }
/* Kept on one line: a wrapped label would make the rail rows differ in height. */
.lp-nav-item .lp-ses-name {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
/* "You are here" and "finished" both resolved to #1d4ed8 — one colour for
   two different facts. They are now the two progress tokens, which the theme
   guarantees are never equal to each other.

   They also CO-OCCUR. level-view.js adds .is-active for the session you are
   in and .is-done when done === total, and the session you are sitting in can
   be complete. Both selectors are (0,2,0), so whichever was declared second
   won the label — "finished" silently overwrote "you are here". .is-done now
   sets no label colour at all: a finished row keeps the base --lp-body
   (--t-ink-2, 10.3:1 on --t-white), --t-current stays the ONLY coloured label
   in the rail, and "finished" is carried by the count reading N/N and by the
   tick glyph — never by the label's colour alone.

   --t-done is #3d9163: 3.87:1 on --t-white, 3.48:1 on --t-current-tint. Those
   clear the 3:1 floor for a mark and miss the 4.5:1 floor for type, so it is
   scoped to the appended glyph and to nothing else. The count beside it is
   text and keeps --lp-faint (--t-muted — 5.42:1 on --t-white, 4.63:1 on the
   hover face), or --t-current at 7.10:1 on --t-current-tint when active. */
.lp-nav-item.is-active { background: var(--t-current-tint); color: var(--t-current); }
.lp-nav-item.is-active .lp-tick { color: var(--t-current); }
/* Without the numbered badge, a finished session is marked on its count. */
.lp-nav-item.is-done .lp-tick::after { color: var(--t-done); content: "\A0\2713"; }
.lp-side-card {
  margin-top: auto; background: var(--t-cream); border: 1px solid var(--lp-line-soft);
  border-radius: 1rem; padding: 1rem 1.1rem;
}
.lp-side-card b { display: block; font-size: .875rem; line-height: 1.45; }
.lp-side-card p { margin: .35rem 0 0; font-size: .78rem; color: var(--lp-muted); line-height: 1.55; }
.lp-side-card a { color: var(--lp-blue-dk); font-weight: 600; text-decoration: none; }
.lp-side-card a:hover { text-decoration: underline; }

/* ── Main column ──────────────────────────────────────────────────────────── */
.lp-main { flex: 1; min-width: 0; padding: 2.1rem 3rem 2.4rem; }
@media (max-width: 1280px) { .lp-main { padding: 1.8rem 2rem 2.2rem; } }
@media (max-width: 960px) {
  .lp-side { display: none; }
  .lp-main { padding: 1.4rem 1.15rem 2rem; }
}

.lp-kicker {
  font-size: .68rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  color: var(--lp-blue);
}
.lp-title-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: .45rem; }
.lp-title-row h1 {
  margin: 0; font-size: clamp(1.6rem, 2.6vw, 2.15rem); font-weight: 800;
  letter-spacing: -.02em; line-height: 1.15; font-family: var(--lp-ui);
}
.lp-title-row h1 b { font-weight: 800; }
/* The Chinese name sits beside the English one, lighter and a size down, so
   the pair reads as one title rather than as a heading and a translation. */
.lp-title-row h1 .lp-title-zh {
  font-family: var(--lp-hanzi); font-weight: 400; color: var(--lp-faint);
  font-size: .82em; margin-left: .1rem; letter-spacing: .04em;
}
.lp-pill {
  margin-left: auto; background: var(--lp-blue-soft); color: var(--lp-blue-dk);
  font-size: .78rem; font-weight: 600; padding: .42rem .95rem; border-radius: 999px;
  white-space: nowrap;
}
.lp-sub { margin: .4rem 0 0; color: var(--lp-muted); font-size: .95rem; max-width: 46rem; }

.lp-stats { display: flex; flex-wrap: wrap; align-items: baseline; margin-top: 1.45rem; row-gap: .6rem; }
.lp-stat { display: flex; align-items: baseline; gap: .55rem; }
.lp-stat + .lp-stat { margin-left: 1.7rem; padding-left: 1.7rem; border-left: 1px solid var(--lp-line); }
.lp-stat b { font-size: 1.45rem; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.lp-stat b em { font-style: normal; font-size: .8rem; font-weight: 700; }
.lp-stat span { font-size: .85rem; color: var(--lp-muted); }
@media (max-width: 700px) {
  .lp-stat + .lp-stat { margin-left: 1rem; padding-left: 1rem; }
  .lp-stat b { font-size: 1.2rem; }
}

/* ── Session strip ────────────────────────────────────────────────────────
   One cell per character in the session you are in — five of them. Capped in
   width so five cells stay card-sized instead of stretching to fill a wide
   screen; the rail below the fold is where you move between sessions. */
.lp-strip-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  margin: 1.9rem 0 .7rem;
}
.lp-strip-head h2 { margin: 0; font-size: .95rem; font-weight: 700; font-family: var(--lp-ui); }
.lp-strip-head span { font-size: .78rem; font-weight: 600; color: var(--lp-faint); font-variant-numeric: tabular-nums; }

.lp-strip {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .8rem; max-width: 46rem;
}
@media (max-width: 640px) { .lp-strip { gap: .5rem; } }
.lp-cell {
  background: var(--t-white); border: 1px solid var(--lp-line); border-radius: .9rem;
  padding: .85rem 0 .7rem; text-align: center; cursor: pointer;
  font-family: var(--lp-ui);
  transition: border-color .15s, background .15s, transform .15s, box-shadow .15s;
}
.lp-cell:hover { transform: translateY(-2px); border-color: var(--t-action-edge); box-shadow: var(--t-sh-2); }
.lp-cell i { display: block; font-style: normal; font-family: var(--lp-hanzi); font-size: 1.7rem; line-height: 1.25; color: var(--lp-ink-2); }
.lp-cell small { display: block; margin-top: .25rem; font-size: .68rem; font-weight: 600; color: var(--lp-faint); }
/* Same pair as the rail: the cell you are on and the cells you finished were
   both blue. Now the surface says which — a near-white face under a deep
   "current" ring, against a filled "done" face. The ✓ below still carries it
   without colour. Type stays at the deep ink on both, so the .68rem label
   keeps its contrast. */
.lp-cell.is-now { border-color: var(--t-current); background: var(--lp-blue-faint); box-shadow: 0 0 0 1px var(--t-current) inset; }
.lp-cell.is-now i, .lp-cell.is-now small { color: var(--t-current); }
.lp-cell.is-done { background: var(--t-done-tint); border-color: var(--t-done); }
.lp-cell.is-done i, .lp-cell.is-done small { color: var(--lp-blue-dk); }
.lp-cell.is-done small::before { content: "\2713\A0"; }

/* ── Lesson card ──────────────────────────────────────────────────────────── */
.lp-lesson {
  margin-top: 1.5rem; background: var(--t-white);
  border: 1px solid var(--lp-card-line); border-radius: 1.1rem;
  box-shadow: var(--t-sh-3);
  overflow: hidden;
}
.lp-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 1.05rem 2.2rem; border-bottom: 1px solid var(--lp-line-soft);
}
@media (max-width: 700px) { .lp-card-head { padding: 1rem 1.2rem; } }
.lp-card-label {
  font-size: .66rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: var(--lp-faint);
}
.lp-steps { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.lp-step {
  display: flex; align-items: center; gap: .45rem;
  font-family: var(--lp-ui); font-size: .875rem; font-weight: 600; color: var(--lp-faint);
  background: none; border: 0; padding: 0; cursor: pointer;
}
.lp-step i {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: var(--t-sunk); color: var(--lp-muted);
  font-size: .68rem; font-weight: 700; font-style: normal;
  display: grid; place-items: center;
}
.lp-step [lang] { font-size: .95em; }
.lp-step.is-on { color: var(--lp-blue-dk); }
.lp-step.is-on i { background: var(--lp-blue); color: var(--t-white); }
.lp-step.is-done i { background: var(--t-done-tint); color: var(--lp-blue-dk); }

.lp-card-body { padding: 2rem 2.2rem; }
@media (max-width: 700px) { .lp-card-body { padding: 1.4rem 1.2rem; } }

/* ── Step 1 · Meet ────────────────────────────────────────────────────────── */
.lp-meet { display: grid; gap: 2.2rem; align-items: start; }
@media (min-width: 880px) { .lp-meet { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); } }
.lp-panel { background: var(--t-sunk); border-radius: 1rem; padding: 1.2rem 1.2rem 1rem; text-align: center; }
.lp-panel-label {
  display: block; text-align: left;
  font-size: .6rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  /* A label, so --t-muted and not --t-faint: it was #8fa3c8 at 3.2:1. */
  color: var(--t-muted);
}
.lp-box {
  position: relative; width: min(300px, 78vw); height: min(300px, 78vw);
  margin: 1.2rem auto 0; background: var(--t-paper);
  border: 1px solid var(--lp-line); border-radius: 8px;
}
.lp-box svg.lp-grid { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.lp-box .lp-target { position: absolute; inset: 0; }
.lp-box .lp-fallback {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--lp-hanzi); font-size: 9rem; line-height: 1; color: var(--lp-ink-2);
}
.lp-panel-cap { margin: .85rem 0 .1rem; font-size: .8rem; color: var(--lp-muted); }
.lp-panel-btns { display: flex; gap: .5rem; justify-content: center; margin-top: .55rem; flex-wrap: wrap; }
.lp-panel-btns button {
  font-family: var(--lp-ui); font-size: .75rem; font-weight: 600; color: var(--lp-muted);
  background: none; border: 1px solid transparent; border-radius: 999px;
  padding: .28rem .8rem; cursor: pointer;
  transition: color .15s, background .15s;
}
.lp-panel-btns button:hover { color: var(--lp-blue-dk); background: var(--t-green-tint); }

.lp-info { min-width: 0; padding-top: .3rem; }
.lp-py-row { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.lp-py { font-size: 2.5rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.1; }
.lp-py[lang] { font-family: var(--lp-hanzi); font-weight: 400; }
.lp-spk {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: var(--lp-blue-soft); color: var(--lp-blue);
  border: 0; cursor: pointer;
  display: grid; place-items: center;
  transition: background .15s, transform .15s;
}
.lp-spk:hover { background: var(--t-green-tint-2); transform: scale(1.05); }
.lp-mean { margin-top: .1rem; font-size: 1.15rem; color: var(--lp-muted); }
.lp-desc { margin: 1.05rem 0 0; font-size: .95rem; color: var(--lp-body); line-height: 1.75; max-width: 34rem; }
.lp-tags { display: flex; gap: .5rem; margin-top: 1.15rem; flex-wrap: wrap; }
.lp-tags span {
  background: var(--t-sunk); border: 1px solid var(--lp-line); color: var(--lp-body);
  font-size: .75rem; font-weight: 600; padding: .28rem .7rem; border-radius: .55rem;
}
.lp-rule { border: 0; border-top: 1px solid var(--lp-line-soft); margin: 1.5rem 0 1.2rem; }
/* The variant note. Set apart from the fact tags because it is a sentence
   about the character, not another label on it. */
.lp-variant {
  margin: 1.15rem 0 0; padding: .8rem .95rem;
  background: var(--lp-blue-faint); border: 1px solid var(--lp-line); border-radius: .7rem;
  font-size: .875rem; line-height: 1.7; color: var(--lp-body); max-width: 34rem;
}
.lp-variant .lp-variant-head { display: block; margin-bottom: .15rem; color: var(--lp-blue-dk); }
.lp-variant .lp-variant-head b { font-size: 1.3em; font-weight: 400; }
.lp-variant .lp-variant-head span { font-size: .95em; }
.lp-next-line { margin: 0; font-size: .9rem; color: var(--lp-body); line-height: 1.9; }
.lp-next-line [lang] { font-size: 1.15em; }
/* A separator glyph between items, not text — the one --lp-faint consumer on
   this page that is genuinely decoration, so it keeps --t-faint by name. */
.lp-next-line .lp-dot { color: var(--t-faint); margin: 0 .15rem; }

/* ── Step 1 · the video stage ──────────────────────────────────────────────
   Always a stage, whether or not a film exists for this character: step 1 is
   where you watch, and a panel that turned into a writing grid whenever art
   was missing made step 1 look like step 4. Dark ground, because that is what
   a video sits on and it stops a letterboxed film looking like a mistake. */
.lp-stage {
  position: relative; width: 100%; max-width: 460px;
  margin: 1.2rem auto 0; aspect-ratio: 4 / 3;
  background: var(--t-inverted); border-radius: 12px; overflow: hidden;
  display: grid; place-items: center;
}
.lp-video { display: block; width: 100%; height: 100%; object-fit: contain; background: var(--t-inverted); }

/* On the inverted panel the neutral ramp runs the other way. --t-faint is
   marked "decoration only" because it is 2.6:1 against WHITE; on
   --t-inverted the same value measures 5.7:1, so it can carry this label and
   still sit a step below the ghost glyph, which is the hierarchy this panel
   always had (it was #64748b on #0f172a — 3.6:1, and failing). */
.lp-stage-empty { text-align: center; color: var(--t-faint); padding: 1rem; }
.lp-stage-empty .lp-stage-glyph {
  font-family: var(--lp-hanzi); font-size: clamp(4rem, 14vw, 6.5rem); line-height: 1;
  color: var(--t-on-inverted);
}
.lp-stage-empty p {
  margin: .7rem 0 0; font-size: .78rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--t-faint);
}

/* The stroke animation, when it stands in, plays on the stage rather than
   replacing it — white card centred on the dark ground. */
.lp-stage .lp-box-on-stage { margin: 0; width: min(260px, 70%); height: auto; aspect-ratio: 1 / 1; }

/* ── Step 2 · Match 图 ─────────────────────────────────────────────────────
   The picture the character was drawn from, then four characters to choose
   between. The options are big enough to read as characters, not as buttons. */
.lp-match { text-align: center; }
.lp-match .lp-panel { max-width: 430px; margin: 0 auto; }
.lp-pic {
  width: min(300px, 78vw); height: min(300px, 78vw);
  margin: 1.2rem auto 0; background: var(--t-paper);
  border: 1px solid var(--lp-line); border-radius: 8px;
  display: grid; place-items: center; overflow: hidden;
}
.lp-pic img { max-width: 86%; max-height: 86%; object-fit: contain; }

.lp-options { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; margin-top: 1.2rem; }
.lp-option {
  font-family: var(--lp-hanzi); font-size: 2.1rem; line-height: 1;
  width: 5rem; height: 5rem; flex: none;
  background: var(--t-white); border: 1px solid var(--lp-line); border-radius: .9rem;
  color: var(--lp-ink-2); cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s, color .15s;
}
.lp-option:hover:enabled { border-color: var(--lp-blue); transform: translateY(-2px); }
/* right vs wrong: the verdict trio, tint + edge + ink, so the two stay an
   unmistakable pair whatever the UI accent is doing. */
.lp-option.is-right { background: var(--t-correct-tint); border-color: var(--lp-green); color: var(--t-correct-ink); }
.lp-option.is-wrong { background: var(--t-wrong-tint); border-color: var(--t-wrong-edge); color: var(--t-wrong-ink); opacity: .65; }
.lp-option:disabled { cursor: default; }

/* ── Step 3 · Rain 雨 ──────────────────────────────────────────────────────
   Characters fall down the field and are caught by tapping. Positions are set
   in percent so the field can be any size; each drop is absolutely placed and
   moved by a single rAF loop rather than a transition per drop. */
.lp-rain-wrap { text-align: center; }
.lp-rain-ask { margin: 0 0 .9rem; font-size: 1rem; color: var(--lp-body); }
.lp-rain-ask b { font-size: 1.35rem; font-weight: 700; color: var(--lp-ink); }
.lp-rain {
  position: relative; overflow: hidden;
  width: 100%; max-width: 560px; height: 340px; margin: 0 auto;
  background: linear-gradient(180deg, var(--t-cream) 0%, var(--t-green-tint) 100%);
  border: 1px solid var(--lp-line); border-radius: 1rem;
}
.lp-drop {
  position: absolute; transform: translateX(-50%);
  font-family: var(--lp-hanzi); font-size: 2rem; line-height: 1;
  width: 3.4rem; height: 3.4rem; padding: 0;
  display: grid; place-items: center;
  background: var(--t-white); border: 1px solid var(--t-green-tint-2); border-radius: .8rem;
  color: var(--lp-ink-2); cursor: pointer;
  box-shadow: var(--t-sh-2);
  transition: background .18s, border-color .18s, color .18s, transform .18s;
}
.lp-drop:hover { border-color: var(--lp-blue); }
.lp-drop.is-right { background: var(--t-correct-tint); border-color: var(--lp-green); color: var(--t-correct-ink); transform: translateX(-50%) scale(1.18); }
.lp-drop.is-wrong { background: var(--t-wrong-tint); border-color: var(--t-wrong-edge); color: var(--t-wrong-ink); transform: translateX(-50%) scale(.86); }
@media (prefers-reduced-motion: reduce) { .lp-drop { transition: none; } }
@media (max-width: 560px) { .lp-rain { height: 280px; } .lp-drop { font-size: 1.6rem; width: 2.8rem; height: 2.8rem; } }

/* ── Step 2 · Write ───────────────────────────────────────────────────────── */
.lp-write { text-align: center; }
.lp-write .lp-panel { max-width: 430px; margin: 0 auto; }
.lp-hint { margin: 1rem 0 0; font-size: .875rem; color: var(--lp-muted); min-height: 1.4em; }
/* The one place the correct-verdict colour sets TYPE, so it takes the ink,
   not the mark that --lp-green carries for edges. */
.lp-hint.is-good { color: var(--t-correct-ink); font-weight: 600; }
.lp-tools { display: flex; gap: .5rem; justify-content: center; margin-top: .8rem; flex-wrap: wrap; }
.lp-tools button {
  font-family: var(--lp-ui); font-size: .78rem; font-weight: 600; color: var(--lp-body);
  border: 1px solid var(--lp-line); border-radius: 999px; padding: .36rem .95rem;
  background: var(--t-white); cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.lp-tools button:hover { border-color: var(--lp-blue); color: var(--lp-blue-dk); }
.lp-tools button[aria-pressed="true"] { background: var(--lp-blue-soft); border-color: var(--t-green-tint-2); color: var(--lp-blue-dk); }

/* ── Step 3 · Discover ────────────────────────────────────────────────────── */
.lp-shelf { margin-top: 1.7rem; }
.lp-shelf:first-child { margin-top: .1rem; }
.lp-shelf-head { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.lp-shelf-head h3 { margin: 0; font-size: 1rem; font-weight: 700; font-family: var(--lp-ui); }
.lp-zh-tag {
  font-size: .68rem; font-weight: 600; letter-spacing: .1em; color: var(--t-white);
  background: var(--lp-blue); border-radius: 5px; padding: .14rem .5rem .1rem;
}
.lp-zh-tag.is-gold { background: var(--lp-amber); }
.lp-shelf-head p { margin: .1rem 0 0; font-size: .8125rem; color: var(--lp-muted); flex-basis: 100%; }
.lp-chips { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .85rem; }
.lp-chip {
  border: 1px solid var(--lp-line); border-radius: .8rem; background: var(--t-white);
  padding: .6rem .85rem .55rem; text-align: center; min-width: 5.6rem;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.lp-chip:hover { border-color: var(--t-action-edge); transform: translateY(-2px); box-shadow: var(--t-sh-2); }
.lp-chip.is-known { background: var(--t-green-tint); border-color: var(--t-green-tint-2); }
.lp-chip-glyph {
  display: block; width: 100%; background: none; border: 0; padding: 0; cursor: pointer;
  font-style: normal; font-family: var(--lp-hanzi); font-size: 1.9rem; line-height: 1.2; color: var(--lp-ink-2);
}
.lp-chip.is-known .lp-chip-glyph { color: var(--lp-blue-dk); }
.lp-chip-writer { width: 76px; height: 76px; margin: 0 auto; }
.lp-chip .lp-make { display: block; font-size: .72rem; color: var(--lp-faint); margin-top: .1rem; font-family: var(--lp-hanzi); }
.lp-chip .lp-make .lp-s { color: var(--lp-blue-dk); font-weight: 700; }  /* the seed  */
.lp-chip .lp-make .lp-o { color: var(--lp-amber); }                      /* the other */
.lp-chip small { display: block; font-size: .7rem; color: var(--lp-muted); margin-top: .2rem; font-family: var(--lp-ui); }
.lp-chip-btns { display: flex; gap: .3rem; justify-content: center; margin-top: .4rem; }
.lp-chip-btns button {
  font-family: var(--lp-ui); font-size: .66rem; font-weight: 700; color: var(--lp-muted);
  background: var(--t-sunk); border: 0; border-radius: 999px; padding: .2rem .55rem; cursor: pointer;
  transition: background .15s, color .15s;
}
.lp-chip-btns button:hover { background: var(--lp-blue-soft); color: var(--lp-blue-dk); }
.lp-chip-btns button[aria-pressed="true"] { background: var(--lp-blue); color: var(--t-white); }
.lp-chip.is-word { display: inline-flex; align-items: baseline; gap: .5rem; padding: .45rem .8rem; min-width: 0; }
.lp-chip.is-word .lp-chip-glyph { width: auto; font-size: 1.25rem; }
.lp-chip.is-word small { margin: 0; }

.lp-note {
  margin-top: 1.9rem; padding: .95rem 1.15rem; border-radius: .8rem;
  /* An advisory note, so it keeps the theme's INFO role rather than joining
     the accent green — otherwise it would read like another "known" surface
     two rules above it. */
  background: var(--t-info-tint); border: 1px solid var(--lp-line);
  font-size: .9rem; color: var(--lp-body); display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap;
}
.lp-note b { color: var(--t-info-ink); font-weight: 700; }
.lp-empty { margin: 0; color: var(--lp-muted); font-size: .95rem; line-height: 1.75; max-width: 40rem; }

/* ── Card foot ────────────────────────────────────────────────────────────── */
.lp-card-foot {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 1.1rem 2.2rem; border-top: 1px solid var(--lp-line-soft);
}
@media (max-width: 700px) { .lp-card-foot { padding: 1rem 1.2rem; } }
.lp-foot-hint { font-size: .875rem; color: var(--lp-muted); }
.lp-quiet {
  font-family: var(--lp-ui); color: var(--lp-muted); font-size: .84rem; font-weight: 600;
  background: none; border: 0; padding: .5rem .3rem; cursor: pointer; text-decoration: none;
}
.lp-quiet:hover { color: var(--lp-ink); }
.lp-quiet:disabled { opacity: .4; cursor: default; }
.lp-go {
  margin-left: auto; font-family: var(--lp-ui);
  background: var(--lp-blue); color: var(--t-white); font-weight: 600; font-size: .875rem;
  border: 0; border-radius: .75rem; padding: .68rem 1.4rem; cursor: pointer;
  text-decoration: none; display: inline-block;
  /* the button's own hue, carried into its shadow — alpha unchanged. */
  box-shadow: 0 10px 20px -12px rgba(var(--t-green-rgb), .65);
  transition: background .15s, transform .15s;
}
.lp-go:hover { background: var(--lp-blue-dk); transform: translateY(-1px); color: var(--t-white); }

/* ── Finish ───────────────────────────────────────────────────────────────── */
.lp-finish { text-align: center; padding: 3rem 1.5rem 3.2rem; }
.lp-finish .lp-check {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 1.1rem;
  background: var(--lp-blue); color: var(--t-white); font-size: 1.6rem;
  display: grid; place-items: center;
  box-shadow: 0 14px 28px -14px rgba(var(--t-green-rgb), .7);
}
.lp-finish h2 { margin: 0 0 .5rem; font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em; font-family: var(--lp-ui); }
.lp-finish p { margin: .35rem auto; max-width: 34rem; color: var(--lp-body); font-size: .95rem; line-height: 1.7; }
.lp-finish .lp-big { color: var(--lp-blue-dk); font-weight: 700; font-size: 1.05rem; margin-top: .9rem; }
.lp-finish-row { display: flex; gap: 1rem; justify-content: center; margin-top: 1.6rem; flex-wrap: wrap; }
.lp-finish-row .lp-go { margin-left: 0; }

/* ── Bottom progress bar ──────────────────────────────────────────────────── */
.lp-bottom {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  margin-top: 1.4rem; font-size: .85rem; color: var(--lp-muted);
}
.lp-bb-right { margin-left: auto; display: flex; align-items: center; gap: .8rem; }
.lp-bb-count { font-variant-numeric: tabular-nums; }
.lp-bb-bar { width: 200px; max-width: 40vw; height: 6px; border-radius: 999px; background: var(--lp-line); overflow: hidden; }
.lp-bb-bar i { display: block; height: 100%; width: 0; background: var(--lp-blue); transition: width .4s ease; }

.level-page .site-footer { background: var(--t-white); border-top: 1px solid var(--lp-card-line); }
