
:root {
  --t-display: 30px;
  --t-h1: 26px;
  --t-h2: 19px;
  --t-h3: 15px;
  --t-body: 14.5px;
  --t-label: 12.5px;
  --t-cap: 11px;
  --t-over: 12.5px;

  --hz-hero: 96px;
  --hz-card: 64px;
  --hz-row: 28px;
  --hz-cell: 22px;
  --hz-glyph: 15px;

  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 24px; --s6: 32px; --s7: 48px;

  --r-panel: 20px;
  --r-card: 16px;
  --r-chip: 10px;
  --r-pill: 99px;

  --ease: cubic-bezier(.2, .7, .3, 1);
  --fast: 120ms;
  --base: 220ms;
  --slow: 380ms;
  --lift: 0 1px 2px rgba(0, 0, 0, .16), 0 10px 26px -18px rgba(0, 0, 0, .5);

  --edge: inset 0 1px 0 rgba(255, 255, 255, .9);
  --sink: 0 1px 2px rgba(26, 24, 19, .05), 0 18px 40px -26px rgba(26, 24, 19, .26);
  --panel: var(--edge), var(--sink);
}

*, *::before, *::after { box-sizing: border-box; }

button { border: 0; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }

html { touch-action: manipulation; -webkit-text-size-adjust: 100%; }
body.in-session { overscroll-behavior-y: none; }
.screen.review, .screen.result { touch-action: pan-y; }
.grades, .tones, .opts, .limits, .seg-rows { -webkit-user-select: none; user-select: none; }

@media (pointer: coarse) {
  input, select, textarea { font-size: max(16px, var(--t-body)); }
}

[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg-sunken);
  color: var(--fg);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: var(--fs-small);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Fraunces', 'Noto Serif SC', Georgia, serif;
  font-weight: 600;
  margin: 0;
}

a { color: inherit; }

.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;
}

.chop {
  width: 28px; height: 28px; border-radius: 8px; background: var(--seal);
  color: #F4EEE0; display: grid; place-items: center; flex: 0 0 auto;
  font-family: 'Noto Serif SC', serif; font-size: 9px; line-height: 1.02; font-weight: 600;
}

.boot {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center;
  align-content: center; row-gap: 28px;
  background: #0B0A08;
}
.boot-fail {
  display: grid; justify-items: center; gap: 16px;
  max-width: 34ch; margin: 0 24px; text-align: center;
  color: #EDE6D8; font-size: var(--t-body); line-height: 1.5;
}
.boot-fail p { margin: 0; }

.boot.is-out { opacity: 0; pointer-events: none; transition: opacity 420ms var(--ease); }

html.no-anim *,
html.no-anim *::before,
html.no-anim *::after {
  transition: none !important;
  animation-duration: 0s !important;
  animation-delay: 0s !important;
}

html.booting .app,
html.booting .signin { opacity: 0; }
.app.is-in, .signin.is-in { opacity: 1; transition: opacity 420ms var(--ease); }
@media (prefers-reduced-motion: reduce) {
  .app.is-in, .signin.is-in, .boot.is-out { transition: none; }
}
.boot .chop {
  width: 52px; height: 52px; border-radius: 13px; font-size: 16px;
  animation: boot-breathe 2.4s ease-in-out infinite, boot-turn 5.6s linear infinite;
}
@keyframes boot-breathe { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes boot-turn { from { rotate: 0deg; } to { rotate: 360deg; } }
@media (prefers-reduced-motion: reduce) { .boot .chop { animation: none; } }

.waiting { display: grid; place-items: center; padding: 18vh 0; margin: 0; }
.waiting .chop { width: 44px; height: 44px; border-radius: 12px; font-size: 14px; }
.chop.is-turning { animation: boot-turn 900ms cubic-bezier(.4, 0, .3, 1); }
.waiting .chop.is-turning { animation: boot-turn 1.5s linear infinite; }
.top-brand .chop { will-change: rotate; }
@media (prefers-reduced-motion: reduce) {
  .chop.is-turning, .waiting .chop.is-turning { animation: none; }
}

.signin { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.signin-card {
  width: 100%; max-width: 500px; container-type: inline-size;
  background: var(--card);
  border-radius: var(--r-panel);
  padding: clamp(26px, 5vw, 38px);
  box-shadow: var(--panel);
}
.signin-brand { display: flex; align-items: center; gap: 10px; }
.signin-brand .chop { width: 34px; height: 34px; border-radius: 9px; font-size: 11px; }
.signin-brand .brand { font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: 19px; letter-spacing: -.005em; }
.signin-card .kicker {
  margin: 14px 0 0; font-size: 11.5px; font-weight: 500;
  letter-spacing: .13em; text-transform: uppercase; color: var(--muted);
}
.signin-card h1 { margin-top: var(--s2); font-size: 30px; letter-spacing: -.012em; line-height: 1.16; }
.signin-card .lead { margin: var(--s3) 0 0; color: var(--fg-2); line-height: 1.6; }

.signin { position: relative; }
.signin-art { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.signin-art .art { position: absolute; inset: 0; width: 100%; height: 100%; }
.signin-art::after {
  content: ''; position: absolute; inset: 0;
  background: color-mix(in srgb, var(--bg) 18%, transparent);
}
:root[data-theme="dark"] .signin-art .art {
  filter: invert(1) hue-rotate(180deg) brightness(1.04) contrast(.9) saturate(.72);
}
:root[data-theme="dark"] .signin-art::after { background: color-mix(in srgb, var(--bg) 42%, transparent); }
.signin-card { position: relative; z-index: 1; }

.signin.has-panel {
  grid-template-columns: minmax(0, 440px) minmax(0, 500px);
  justify-content: center; align-items: center; column-gap: clamp(28px, 5vw, 72px);
}
.signin-book {
  position: relative; z-index: 1;
  background: color-mix(in srgb, var(--card) 82%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-radius: var(--r-panel);
  padding: clamp(26px, 4vw, 38px);
  box-shadow: var(--panel);
}
.signin-book .kicker {
  margin: 0; font-size: 11.5px; font-weight: 500;
  letter-spacing: .13em; text-transform: uppercase; color: var(--muted);
}
.signin-book-head { display: flex; align-items: center; gap: 16px; margin-top: 14px; }
.signin-book-glyph {
  flex: none; width: 56px; height: 72px; border-radius: 4px 7px 7px 4px;
  display: grid; place-items: center;
  background: var(--seal); color: #FBF6EC; font-size: 28px; font-family: 'Noto Serif SC', serif;
  box-shadow: inset 6px 0 0 rgba(0, 0, 0, .14), 0 6px 14px rgba(0, 0, 0, .14);
}
.signin-book h2 { margin: 0; font-size: 26px; letter-spacing: -.01em; line-height: 1.18; }
.signin-book-blurb { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.signin-book-facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 18px 0 0; }
.signin-book-facts dt {
  font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.signin-book-facts dd { margin: 2px 0 0; }
.signin-book .lead { margin: 22px 0 0; color: var(--fg-2); line-height: 1.6; }
.signin-book-steps { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; }
.signin-book-steps li { display: flex; align-items: flex-start; gap: 12px; line-height: 1.5; }
.signin-book-mark {
  flex: none; width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center; margin-top: -2px;
  background: color-mix(in srgb, var(--seal) 12%, transparent); color: var(--seal-text); font-size: 15px; font-family: 'Noto Serif SC', serif;
}
.signin-book-steps li.is-focus .signin-book-mark { background: var(--seal); color: #FBF6EC; }
.signin-book-focus {
  display: block; margin-bottom: 2px; font-size: 11px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--seal-text);
}
.signin-book-slogan {
  margin: 24px 0 0; padding-top: 16px; border-top: 1px solid var(--hair);
  font-family: 'Fraunces', Georgia, serif; font-style: italic; color: var(--fg-2);
}
.signin.has-book #signin-lead { display: none; }
.signin-concept-seal { width: 64px; height: 64px; border-radius: 16px; font-size: 19px; line-height: 1.02; font-weight: 600; }
.signin-concept-demo {
  margin: 18px 0 0; padding: 18px 16px 16px; border-radius: 14px;
  background: color-mix(in srgb, var(--bg-sunken) 70%, transparent);
  box-shadow: inset 0 0 0 1px var(--hair);
}
.signin-concept-sum { display: flex; align-items: flex-start; justify-content: center; gap: 10px; }
.signin-concept-part { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.signin-concept-part small { font-size: 12px; color: var(--muted); }
.signin-concept-glyph {
  width: 58px; height: 58px; border-radius: 12px; display: grid; place-items: center;
  background: var(--card); color: var(--fg); box-shadow: 0 1px 0 var(--hair), 0 4px 12px rgba(0, 0, 0, .06);
  font-family: 'Noto Serif SC', serif; font-size: 32px; font-weight: 600; line-height: 1;
}
.signin-concept-part.is-whole .signin-concept-glyph { background: var(--seal); color: #FBF6EC; }
.signin-concept-part.is-whole small { color: var(--seal-text); font-weight: 600; }
.signin-concept-op { height: 58px; display: grid; place-items: center; color: var(--muted); font-size: 20px; }
.signin-concept-demo figcaption { margin: 14px 0 0; text-align: center; text-wrap: balance; color: var(--fg-2); font-size: 14.5px; line-height: 1.5; }

@media (max-width: 760px) {
  .signin.has-panel { grid-template-columns: minmax(0, 460px); row-gap: 20px; padding-block: 40px; }
  .signin-book.is-concept { order: 2; }
}

#signin:not([hidden]) ~ .fb-open { display: none; }
body:not(.in-intro):not(.in-course) #app:not([hidden]) ~ .fb-open { display: none; }

.app { display: flex; flex-direction: column; min-height: 100dvh; }

.top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: var(--s5);
  padding: 10px clamp(14px, 2.4vw, 28px);
  padding-top: calc(10px + env(safe-area-inset-top));
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: blur(14px) saturate(1.06);
  border-bottom: 1px solid var(--hair);
}
.top-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.top-brand .brand { font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: 16px; }
.top-acct { margin-left: auto; display: flex; align-items: center; gap: var(--s3); }

@media (min-width: 744px) {
  .top {
    background: none;
    border-bottom: 0;
    backdrop-filter: none;
    position: absolute; left: 0; right: 0;
    padding-top: calc(16px + env(safe-area-inset-top));
  }
  .top-brand,
  .acct {
    padding: 5px 12px 5px 6px;
    border-radius: var(--r-pill);
    background: color-mix(in srgb, var(--card) 78%, transparent);
    backdrop-filter: blur(10px);
    box-shadow: var(--sink);
  }

  body.in-court .top,
  body.in-court .main,
  body.in-court #view { pointer-events: none; }
  body.in-court #view { padding: 0 clamp(16px, 2.2vw, 32px); max-width: none; }
  body.in-court .scroll,
  body.in-court .top-brand,
  body.in-court .acct,
  body.in-court .acct { pointer-events: auto; }

  body.in-court,
  html:has(body.in-court) {
    overflow: hidden;
    overscroll-behavior: none;
    height: 100%;
  }
  html { overscroll-behavior: none; }
}


.main { position: relative; z-index: 1; }

.main { min-width: 0; display: flex; flex-direction: column; align-items: center; }
#view { padding: clamp(20px, 3vw, 56px) clamp(20px, 3.4vw, 64px) 96px;
        max-width: 1120px; width: 100%; margin-inline: auto; }

@media (min-width: 744px) {
  body:not(.in-court):not(.in-intro) #view {
    margin-top: calc(58px + env(safe-area-inset-top));
    margin-bottom: clamp(16px, 2.4vw, 34px);
    max-height: calc(100dvh - 58px - env(safe-area-inset-top) - clamp(32px, 4.8vw, 68px));
    overflow-y: auto;
    overflow-x: clip;
    overscroll-behavior: contain;
    --gutter: clamp(16px, 4.5vw, 56px);
    max-width: min(980px, calc(100% - 2 * var(--gutter)));
    padding: clamp(24px, 2.6vw, 44px) clamp(24px, 3vw, 52px) clamp(28px, 3vw, 52px);
    border-radius: var(--r-panel);
    background: var(--card);
    box-shadow: var(--panel);
  }
  body.in-session #view { background: color-mix(in srgb, var(--card) 97%, transparent); backdrop-filter: none; }
}

@media (max-width: 860px) {
  .top { gap: var(--s3); padding-inline: 14px; }
  .acct-who { display: none; }
}

.top-i {
  display: grid; place-items: center; flex: 0 0 auto;
  width: 34px; height: 34px; padding: 0; border: 0; border-radius: var(--r-pill);
  background: var(--bg-sunken); color: var(--fg-2);
  font: inherit; font-size: 16px; line-height: 1; text-decoration: none; cursor: pointer;
  transition: color var(--fast) var(--ease);
}
.top-i:hover { color: var(--fg); }
.top-i:focus-visible { outline: 2px solid var(--seal); outline-offset: 2px; }
.top-i svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.top-acct { gap: 6px; }
.top-acct .acct {
  flex: 0 1 auto; width: auto; min-width: 0; margin-left: 2px;
  max-width: calc((100vw - 880px) / 2 - 112px);
}
.top-acct .acct-av { flex: none; }
.top-acct .acct-who { display: block; }
@media (min-width: 744px) {
  .top-i { box-shadow: var(--sink); }
  body.in-court .top-i { pointer-events: auto; }
}
@media (min-width: 1440px) {
  .top-acct .acct { max-width: calc((100vw - 1040px) / 2 - 112px); }
}
@media (max-width: 1279px) {
  .top-acct .acct { max-width: none; }
  .top-acct .acct-who { display: none; }
}

.toast {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
  margin: 0; max-width: min(560px, calc(100vw - 32px));
  background: var(--card); color: var(--fg);
   border-radius: var(--r-card);
  padding: 11px 15px;
  z-index: 60;
  box-shadow: var(--panel);
}
@media (max-width: 860px) {
  .toast { bottom: calc(82px + env(safe-area-inset-bottom)); }
}

.toast.party {
  display: flex; align-items: center; gap: 10px; font-weight: 500;
  padding: 10px 14px 10px 12px; border-radius: var(--r-pill);
  background: linear-gradient(100deg, color-mix(in srgb, var(--t2) 24%, var(--card)),
              color-mix(in srgb, var(--seal) 16%, var(--card)));
  box-shadow: var(--panel), inset 0 0 0 1.5px color-mix(in srgb, var(--t2) 55%, transparent);
  animation: party-in .55s cubic-bezier(.3, 1.5, .5, 1) both;
}
.party-pop { font-size: 22px; line-height: 1; display: inline-block; animation: party-wiggle .9s ease-in-out .15s 2; }
.party-xp {
  padding: 3px 10px; border-radius: var(--r-pill); font-weight: 700; font-variant-numeric: tabular-nums;
  color: color-mix(in srgb, var(--growth-4) var(--jade-keep), var(--fg));
  background: color-mix(in srgb, var(--growth-4) 16%, var(--card));
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--growth-4) 60%, transparent);
}
@keyframes party-in { from { opacity: 0; scale: .5; translate: 0 18px; } }
@keyframes party-wiggle {
  0%, 100% { rotate: 0deg; }
  25% { rotate: -16deg; scale: 1.15; }
  60% { rotate: 12deg; }
}
.welcome-veil {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  animation: welcome-fade .25s ease-out both;
}
.welcome-card {
  display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center;
  width: min(360px, 100%); padding: 28px 24px 24px; border-radius: var(--r-card);
  background: var(--card); color: var(--fg); box-shadow: var(--panel);
  animation: party-in .55s cubic-bezier(.3, 1.5, .5, 1) both;
}
.welcome-card h2 { margin: 0; font-family: 'Fraunces', Georgia, serif; font-size: 22px; }
.welcome-pop { font-size: 52px; line-height: 1; display: inline-block; animation: party-wiggle .9s ease-in-out .2s 2; }
@keyframes welcome-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .welcome-veil, .welcome-card, .welcome-pop { animation: none; }
}

.confetti {
  position: fixed; left: 0; top: 0; z-index: 96; pointer-events: none;
  width: 7px; height: 11px; margin: -5px 0 0 -3px; border-radius: 2px;
}
.confetti.round { width: 8px; height: 8px; border-radius: 50%; }
@media (prefers-reduced-motion: reduce) {
  .toast.party, .party-pop { animation: none; }
}


.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px; border-radius: var(--r-chip); border: 0;
  background: var(--raised); color: var(--fg); font: inherit; font-size: var(--fs-fine);
  font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background var(--fast) var(--ease), filter var(--fast) var(--ease);
}
.btn:hover { background: color-mix(in srgb, var(--fg) 12%, var(--raised)); }
.btn:disabled { opacity: .5; cursor: default; }
.btn:disabled:hover { background: var(--raised); }
.btn-primary { background: var(--seal); color: var(--seal-on); }
.btn-primary:hover { background: var(--seal-press); }
.btn-lg { padding: 13px 22px; font-size: var(--fs-small); border-radius: var(--r-chip); }

.btn-ghost { background: none; color: var(--fg-2); }
.btn-ghost:hover { background: var(--raised); color: var(--fg); }
.btn-danger { color: var(--seal-text); background: none; box-shadow: inset 0 0 0 1px var(--hair); }
.btn-danger:hover { background: none; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--seal) 45%, transparent); }

.ibtn {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; padding: 0;
  border: 0; border-radius: var(--r-pill);
  background: none; color: var(--fg-2); cursor: pointer;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.ibtn:hover { background: var(--raised); color: var(--fg); }
.ibtn svg { width: 17px; height: 17px; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--seal);
  outline-offset: 2px;
  border-radius: var(--r-chip);
}

@media (max-width: 860px) {
  .btn, .ibtn, .opt, .seg button, [data-setup], [data-review] { min-height: 44px; }
  .ibtn { width: 44px; }
}

label { display: block; font-size: var(--fs-fine); font-weight: 500; margin-bottom: 5px; color: var(--fg-2); }
input, textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--r-chip);
  border: 1px solid var(--hair); background: var(--bg-sunken); color: var(--fg);
  font: inherit; font-size: var(--fs-small);
  transition: border-color var(--fast) var(--ease);
}
input:focus, textarea:focus { border-color: color-mix(in srgb, var(--fg) 30%, transparent); }
.code-input { font-family: 'SF Mono', Menlo, Consolas, monospace; letter-spacing: 8px; text-align: center; font-size: 21px; }

.lead { color: var(--fg-2); }
.fine { color: var(--muted); font-size: var(--fs-fine); }
.msg { font-size: var(--fs-fine); color: var(--seal-text); }
.btn-link-id { display: inline-flex; align-items: center; gap: 10px; }
.btn-link-id svg { flex: none; }
.intro-name-said:not([hidden]) {
  display: flex; gap: 10px; align-items: flex-start; margin: 8px 0 2px; padding: 10px 12px;
  font-size: var(--fs-body, 15px); line-height: 1.4; font-weight: 500; color: var(--seal-text);
  background: var(--seal-soft); border: 1px solid color-mix(in srgb, var(--seal) 30%, transparent); border-radius: 12px;
  animation: intro-said-pop .45s ease-out;
}
.intro-name-said::before {
  content: "!"; flex: none; width: 20px; height: 20px; border-radius: 50%; margin-top: 1px;
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
  background: var(--seal); color: var(--seal-on);
}
@keyframes intro-said-pop { 0%, 100% { transform: none; } 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); }
                            60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
@media (prefers-reduced-motion: reduce) { .intro-name-said:not([hidden]) { animation: none; } }
.msg-stop { font-weight: 500; }

.signin form { margin-top: 18px; }
.signin form > * + * { margin-top: 13px; }
.signin-alt {
  display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4);
  margin: var(--s3) 0 0;
}
.linkish {
  padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; color: var(--fg-2); text-decoration: underline;
  text-underline-offset: 3px; text-decoration-thickness: 1px;
  transition: color var(--fast) var(--ease);
}
.linkish:hover { color: var(--fg); }
#pw-hint { margin: 6px 0 0; }

.pw-field { position: relative; }
.pw-field input { padding-right: 44px; }
.pw-field input::-ms-reveal { display: none; }
.pw-eye {
  position: absolute; right: 4px; top: 50%; translate: 0 -50%;
  display: grid; place-items: center; width: 36px; height: 36px; padding: 0;
  border: 0; border-radius: var(--r-chip); background: none; color: var(--muted); cursor: pointer;
}
.pw-eye:hover { color: var(--fg); }
.pw-eye::before {
  content: ''; width: 18px; height: 18px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pw-eye[aria-pressed="true"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.7 5.1A10.4 10.4 0 0 1 12 5c6.4 0 10 7 10 7a17.8 17.8 0 0 1-2.7 3.7'/%3E%3Cpath d='M6.6 6.6C3.9 8.4 2 12 2 12s3.6 7 10 7a10.2 10.2 0 0 0 5.4-1.6'/%3E%3Cpath d='M9.9 9.9a3 3 0 0 0 4.2 4.2'/%3E%3Cpath d='M3 3l18 18'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.7 5.1A10.4 10.4 0 0 1 12 5c6.4 0 10 7 10 7a17.8 17.8 0 0 1-2.7 3.7'/%3E%3Cpath d='M6.6 6.6C3.9 8.4 2 12 2 12s3.6 7 10 7a10.2 10.2 0 0 0 5.4-1.6'/%3E%3Cpath d='M9.9 9.9a3 3 0 0 0 4.2 4.2'/%3E%3Cpath d='M3 3l18 18'/%3E%3C/svg%3E");
}

.signin-note { margin: 20px 0 0; padding-top: 14px; border-top: 1px solid var(--hair); }

#providers:not(:empty) { margin-top: 18px; }
#providers { display: flex; flex-wrap: wrap; gap: 10px; }
#providers > .provider { flex: 1 1 auto; white-space: nowrap; padding-inline: 12px; }
#providers > .or { flex: 1 1 100%; margin-top: 6px; }
#providers > .social-optin { flex: 1 1 100%; margin-top: 2px; }

.provider {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  font-weight: 600;
}
.provider-mark { display: flex; align-items: center; line-height: 0; }
.provider[data-provider="apple"] .provider-mark { margin-top: -2px; }

.or {
  display: flex; align-items: center; gap: 12px;
  margin: 16px 0 0; color: var(--muted); font-size: var(--t-label);
}
.or::before, .or::after {
  content: ''; flex: 1 1 0; height: 1px; background: var(--hair);
}
#code-sent { margin: 0; }
.signin-plats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px;
  margin: 18px 0 0; padding: 4px; border-radius: 12px; background: var(--bg-sunken, var(--hair));
}
.signin-plat {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 56px; padding: 7px 6px;
  border-radius: 9px; color: var(--fg-2); font-size: 13px; font-weight: 500; line-height: 1.2;
  text-decoration: none; text-align: center; white-space: nowrap;
}
.signin-plat svg { flex: none; width: 18px; height: 18px; }
.signin-plat:not(.is-here):not(.is-soon) svg { color: var(--fg); }
@container (min-width: 340px) {
  .signin-plat { flex-direction: row; gap: 9px; min-height: 46px; text-align: left; }
  .signin-plat svg { width: 20px; height: 20px; }
}
.signin-plat small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }
a.signin-plat:hover { color: var(--fg); background: color-mix(in srgb, var(--card) 60%, transparent); }
.signin-plat.is-soon { color: var(--muted); }
.signin-plat.is-here { background: var(--card); color: var(--fg); box-shadow: 0 0 0 1.5px var(--seal); }
.signin-plat.is-here small { color: var(--seal-text); }

.theapp { margin-top: var(--s6); padding-top: var(--s5); border-top: 1px solid var(--hair); }
.theapp .fine { margin: var(--s1) 0 0; }
.theapp-row { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; margin-top: var(--s3); }
.theapp-mark { display: flex; align-items: center; line-height: 0; margin-top: -2px; }
.theapp-soon { color: var(--muted); font-size: var(--fs-fine); font-style: italic; }
.theapp a { color: var(--seal-text); text-decoration: none; }
.theapp .btn { color: var(--fg); }
.theapp a:hover { text-decoration: underline; }

body.in-intro .top { display: none; }
body.in-intro .main { padding-bottom: 0; }
body.in-intro #view { padding: 0; max-width: none; }

.intro {
  min-height: 100dvh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: var(--s6);
  padding: var(--s6) var(--s5);
}
.intro-step {
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--s3);
  width: 100%; max-width: 560px;
}
.intro-step .chop { width: 40px; height: 40px; border-radius: 11px; font-size: 12px; }
.intro-step h1 {
  font-size: clamp(28px, 3vw, 38px); letter-spacing: -.015em; line-height: 1.14;
  margin-top: var(--s2);
}
.intro-step .lead { color: var(--fg-2); line-height: 1.6; margin: 0; max-width: 52ch; }
.intro-step .fine { margin: 0; max-width: 52ch; line-height: 1.6; }
.intro-step .btn { align-self: flex-start; margin-top: var(--s3); }

.intro-opts {
  display: grid; gap: var(--s2); width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(124px, 1fr));
  margin: var(--s3) 0 var(--s2);
}
.intro-opt {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: var(--s4); border-radius: var(--r-card); cursor: pointer;
  background: var(--raised); color: var(--fg); font: inherit; text-align: left;
  transition: background var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.intro-opt:hover { background: color-mix(in srgb, var(--fg) 10%, var(--raised)); }
.intro-opt.on { box-shadow: inset 0 0 0 1.5px var(--seal); background: var(--seal-soft); }
.intro-opt-n { font-family: 'Fraunces', Georgia, serif; font-size: 21px; font-weight: 600; }
.intro-opt-k { font-size: var(--t-label); color: var(--muted); line-height: 1.35; }
.intro-opt.on .intro-opt-k { color: var(--fg-2); }

.intro-rail {
  display: flex; gap: 7px;
  width: 100%; max-width: 560px;
}
.intro-rail span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--raised);
  transition: background var(--base) var(--ease), width var(--base) var(--ease);
}
.intro-rail span.on { width: 20px; border-radius: 3px; background: var(--seal); }

.screen { display: flex; flex-direction: column; gap: var(--s6); }
.screen.char, .screen.reading, .screen.result, .screen.run { max-width: 760px; }
.screen-head { margin-bottom: var(--s1); }
.screen-head h1 {
  font-size: clamp(28px, 2.4vw, 36px); letter-spacing: -.015em; line-height: 1.12;
}
.screen-head h1::after {
  content: ''; display: block; width: 34px; height: 2px; border-radius: 2px;
  margin-top: var(--s4); background: var(--seal);
}
.screen-head .fine { margin: var(--s4) 0 0; max-width: 62ch; line-height: 1.6; }

.today-head { position: relative; isolation: isolate; }
.today-art {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  overflow: hidden; border-radius: var(--r-panel);
  background: var(--bg-sunken);
  box-shadow: var(--panel);
}
.today-art .art {
  position: absolute; left: 50%; top: 84%;
  width: max(100%, 760px); height: auto;
  translate: -50% -70%;
  opacity: .95;
}
.today-art::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg,
    var(--bg) 0%,
    color-mix(in srgb, var(--bg) 76%, transparent) 26%,
    color-mix(in srgb, var(--bg) 14%, transparent) 48%,
    transparent 66%);
}
.today-said {
  position: relative; padding: 26px 22px 30px; max-width: 30ch;
  min-height: 150px; box-sizing: border-box;
  display: flex; flex-direction: column; justify-content: center;
}
@media (prefers-reduced-motion: no-preference) {
  .today-art { animation: today-art-in .5s ease-out both; }
}
@keyframes today-art-in { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 560px) {
  .today-said {
    padding: 20px 16px; max-width: none;
    min-height: 208px; justify-content: flex-start;
  }
  .today-art .art { top: 95%; }
  .today-art::after { background: color-mix(in srgb, var(--bg) 64%, transparent); }
  .today-said .fine { color: var(--fg-2); }
}

.row-fact {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  margin: 0; padding: 12px 0 0;
  border-top: 1px solid var(--hair);
}
.row-fact span { color: var(--muted); font-size: var(--fs-fine); }

.note { margin: 0; max-width: 62ch; }
.empty { max-width: 52ch; gap: var(--s4); }
.empty h1 { font-size: 30px; }
.empty p { margin: 0; line-height: 1.6; }
.empty .btn { align-self: flex-start; margin-top: var(--s2); }
.empty .note { margin-top: var(--s3); }

.side-you {
  margin: 0; padding-top: 11px; border-top: 1px solid var(--hair);
  color: var(--muted); font-size: var(--fs-fine);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.sub {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: var(--t-over); font-weight: 600; margin: 0 0 var(--s3);
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.panel { display: flex; flex-direction: column; gap: 10px; }
.crumb { margin: 0 0 var(--s2); font-size: var(--t-label); font-weight: 500; }
.crumb a {
  color: var(--muted); text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.crumb a::before { content: '←'; font-size: 13px; }
.crumb a:hover { color: var(--fg); }

.py { font-weight: 500; }
.t1 { color: var(--t1-ink); } .t2 { color: var(--t2-ink); } .t3 { color: var(--t3-ink); }
.t4 { color: var(--t4-ink); } .t5 { color: var(--t5-ink); }

:root {
  --t1-keep: 76%; --t2-keep: 54%; --t3-keep: 63%; --t4-keep: 72%; --t5-keep: 74%;
  --jade-keep: 63%; --amber-keep: 54%; --violet-keep: 71%; --wordchar-keep: 64%;
  --learning-keep: 45%;
}
:root[data-theme="dark"] {
  --t1-keep: 80%; --t2-keep: 100%; --t3-keep: 100%; --t4-keep: 88%; --t5-keep: 86%;
  --jade-keep: 100%; --amber-keep: 100%; --violet-keep: 89%; --wordchar-keep: 100%;
  --learning-keep: 100%;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --t1-keep: 80%; --t2-keep: 100%; --t3-keep: 100%; --t4-keep: 88%; --t5-keep: 86%;
    --jade-keep: 100%; --amber-keep: 100%; --violet-keep: 89%; --wordchar-keep: 100%;
    --learning-keep: 100%;
  }
}
:is(.cell, .set-a):is(.ph-ready, .ph-learning, .ph-learned) {
  --t1-keep: 72%; --t2-keep: 52%; --t3-keep: 60%; --t4-keep: 69%; --t5-keep: 70%;
  --jade-keep: 60%; --amber-keep: 52%; --violet-keep: 67%; --learning-keep: 40%;
}
:root[data-theme="dark"] :is(.cell, .set-a):is(.ph-ready, .ph-learning, .ph-learned) {
  --t1-keep: 46%; --t2-keep: 87%; --t3-keep: 62%; --t4-keep: 52%; --t5-keep: 52%;
  --jade-keep: 62%; --amber-keep: 87%; --violet-keep: 53%;
}
:is(.r-hanzi, .char-py, .ref-h, .tone-n, .bs-mark, .bs-tonew) {
  --t1-keep: 100%; --t2-keep: 73%; --t3-keep: 85%; --t4-keep: 97%; --t5-keep: 100%;
  --jade-keep: 85%; --amber-keep: 73%; --violet-keep: 96%;
}
:root[data-theme="dark"] :is(.r-hanzi, .char-py, .ref-h, .tone-n, .bs-mark, .bs-tonew) {
  --t1-keep: 100%; --t2-keep: 100%; --t3-keep: 100%; --t4-keep: 100%; --t5-keep: 100%;
  --jade-keep: 100%; --amber-keep: 100%; --violet-keep: 100%;
}
* {
  --t1-ink: color-mix(in srgb, var(--t1) var(--t1-keep), var(--fg));
  --t2-ink: color-mix(in srgb, var(--t2) var(--t2-keep), var(--fg));
  --t3-ink: color-mix(in srgb, var(--t3) var(--t3-keep), var(--fg));
  --t4-ink: color-mix(in srgb, var(--t4) var(--t4-keep), var(--fg));
  --t5-ink: color-mix(in srgb, var(--t5) var(--t5-keep), var(--fg));
  --jade-ink: color-mix(in srgb, var(--jade) var(--jade-keep), var(--fg));
  --amber-ink: color-mix(in srgb, var(--amber) var(--amber-keep), var(--fg));
  --violet-ink: color-mix(in srgb, var(--violet) var(--violet-keep), var(--fg));
  --wordchar-ink: color-mix(in srgb, var(--wordchar) var(--wordchar-keep, 100%), var(--fg));
  --learning-ink: color-mix(in srgb, var(--learning) var(--learning-keep, 100%), var(--fg));
}

.play {
   background: var(--raised); color: var(--fg-2);
  display: inline-grid; place-items: center;
  width: 28px; height: 28px; border-radius: var(--r-card); padding: 0;
  font-size: 15px; line-height: 1; cursor: pointer; vertical-align: middle;
}
.play:hover { background: var(--seal-soft); color: var(--seal-text); }
.spk { display: inline-block; width: 1.2em; height: 1.2em; vertical-align: -0.22em; flex: none; }
.play .spk { width: 16px; height: 16px; vertical-align: 0; }
.r-audio .spk { width: 34px; height: 34px; vertical-align: 0; }
.r-audio { display: inline-grid; place-items: center; }

.lanes { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(124px, 1fr)); }
.lane {
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px 14px; border-radius: 12px;
  background: var(--seal-soft); border: 1px solid color-mix(in srgb, var(--seal) 22%, transparent);
}
.lane-n { font-family: 'Fraunces', Georgia, serif; font-size: 22px; font-weight: 600; color: var(--seal-text); }
.lane-k { font-size: var(--fs-fine); color: var(--fg-2); }

.primary {
  display: flex; align-items: center; gap: var(--s5);
  padding: var(--s5); border-radius: var(--r-panel); color: var(--fg);
  background: var(--card);
  box-shadow: var(--panel);
}
.primary-lede { display: flex; flex-direction: column; gap: var(--s1); min-width: 0; }
.primary-lede .btn { align-self: flex-start; margin-top: var(--s3); }
.primary-k {
  font-size: var(--t-over); font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--seal-text);
}
.primary-n { font-family: 'Fraunces', Georgia, serif; font-size: var(--t-display); font-weight: 600; line-height: 1.12; }
.primary-m { color: var(--fg-2); font-size: var(--fs-fine); }

.primary-ring { position: relative; flex: 0 0 auto; width: 104px; height: 104px; }
.ring { width: 104px; height: 104px; transform: rotate(-90deg); display: block; }
.ring circle { fill: none; stroke-width: 9; }
.ring-track { stroke: var(--raised); }
.ring-fill {
  stroke: var(--seal); stroke-linecap: round;
  transition: stroke-dashoffset var(--slow) var(--ease);
}
.ring-done .ring-fill { stroke: var(--jade); }
.ring-n {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: 'Fraunces', Georgia, serif; font-size: 27px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.primary-clear .ring-n { color: var(--jade-ink); font-size: 30px; }

.dayline { margin: 0 0 var(--s4); color: var(--fg-2); font-size: var(--t-body); }
.dayline b { color: var(--fg); font-weight: 600; }

.drows-box {
  border-radius: var(--r-panel); overflow: hidden;
  background: var(--card);
  box-shadow: var(--panel);
}
.drow {
  display: flex; align-items: center; gap: var(--s4);
  padding: var(--s4) var(--s5); text-decoration: none; color: var(--fg);
  transition: background var(--fast) var(--ease);
}
.drow + .drow { box-shadow: inset 0 1px 0 var(--hair); }
.drow:hover { background: color-mix(in srgb, var(--fg) 5%, transparent); }
.drow-g {
  flex: 0 0 auto; width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: var(--r-chip); background: var(--raised);
  font-family: 'Noto Serif SC', serif; font-size: 19px; color: var(--fg-2);
}
.drow-t { flex: 1 1 auto; min-width: 0; font-size: var(--t-body); font-weight: 500; }
.drow-r { display: flex; align-items: center; gap: var(--s2); flex: 0 0 auto; }
.drow-none { color: var(--muted); font-size: var(--fs-fine); }
.drow-c { color: var(--muted); font-size: 19px; line-height: 1; flex: 0 0 auto; }
.drow-quiet .drow-g, .drow-quiet .drow-t { color: var(--muted); }

.pill {
  font-size: var(--t-label); font-weight: 500; line-height: 1;
  padding: 5px 9px; border-radius: var(--r-pill);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.pill-due { background: var(--seal-soft); color: var(--seal-text); }
.pill-new {
  background: color-mix(in srgb, var(--jade) 20%, transparent);
  color: color-mix(in srgb, var(--jade) 63%, var(--fg));
}
.pill-bad {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--seal) 40%, transparent);
  color: var(--seal-text);
}

.mini-cells {
  display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr);
  gap: 3px; overflow: hidden;
}
.mini .sub { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); }
.mini-more { color: var(--seal-text); text-decoration: none; font-size: var(--t-label); font-weight: 500; }
.mini-more:hover { text-decoration: underline; }

.today-grid { display: grid; gap: var(--s5); align-items: start; }
.today-col { display: flex; flex-direction: column; gap: var(--s5); min-width: 0; }
@media (min-width: 1100px) {
  .today-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .primary { flex-direction: column; align-items: flex-start; gap: var(--s4); }
}
.primary-glyphs {
  font-family: 'Noto Serif SC', serif; font-size: 28px; color: var(--fg-2);
  letter-spacing: 6px; white-space: nowrap; margin-left: auto;
}
.primary-clear { border-style: dashed; box-shadow: none; }

.opts { display: flex; flex-direction: column; gap: 6px; }
.opt {
  display: flex; align-items: center; gap: 14px; justify-content: space-between;
  width: 100%; text-align: left;
  padding: 12px 15px; border-radius: var(--r-card); text-decoration: none;
  background: var(--raised);  color: var(--fg);
  font: inherit; font-size: var(--fs-small); cursor: pointer;
  transition: border-color .12s ease-out;
}
.opt:hover { background: color-mix(in srgb, var(--fg) 10%, var(--raised)); }
.opt:disabled { cursor: default; opacity: .5; }
.opt:disabled:hover { background: var(--raised); }
.opt-l { display: flex; align-items: center; gap: 11px; min-width: 0; }
.opt-g {
  font-family: 'Noto Serif SC', serif; font-size: 16px; color: var(--muted);
  width: 19px; text-align: center; flex: none;
}
.opt-r { color: var(--muted); font-size: var(--fs-fine); flex: none; font-variant-numeric: tabular-nums; }
.opt.on { box-shadow: inset 0 0 0 1.5px var(--seal); background: var(--seal-soft); }
.opt.on .opt-r { color: var(--seal-text); font-weight: 500; }
.opt.on .opt-g { color: var(--seal-text); }
.tick {
  width: 15px; height: 15px; border-radius: 99px; flex: none;
  border: 1.5px solid var(--hair);
}
.opt.on .tick { border-color: var(--seal); background: var(--seal); box-shadow: inset 0 0 0 3px var(--card); }

.limits { display: flex; gap: var(--s2); flex-wrap: wrap; }
.limits button {
  font: inherit; font-size: var(--fs-fine); font-weight: 500; cursor: pointer;
  padding: 9px 18px; border-radius: var(--r-pill);
  background: var(--raised); border: 0; color: var(--fg-2);
  transition: color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.limits button:hover { color: var(--fg); }
.limits button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }

.setup-go { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 6px; }
.setup-go .fine { color: var(--muted); margin: 0; }
.setup-else { display: flex; gap: 18px; flex-wrap: wrap; }
.setup-else a { color: var(--seal-text); text-decoration: none; font-size: var(--fs-fine); }
.setup-else a:hover { text-decoration: underline; }

.seg { display: flex; flex-direction: column; gap: var(--s3); }
.seg-h {
  display: flex; align-items: center; gap: var(--s2);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: var(--t-over); font-weight: 600; margin: 0;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.seg-g {
  font-family: 'Noto Serif SC', serif; font-size: 14px; color: var(--fg-2);
  letter-spacing: 0; text-transform: none;
}
.seg-rows { display: flex; flex-direction: column; gap: 5px; }
.seg-row {
  display: flex; align-items: center; gap: 14px; justify-content: space-between;
  padding: 11px 15px; border-radius: var(--r-card); text-decoration: none;
  background: var(--raised);  color: var(--fg);
  font-size: var(--fs-small);
}
a.seg-row:hover { background: color-mix(in srgb, var(--fg) 10%, var(--raised)); }
.seg-soon {
  border-style: dashed; background: transparent; color: var(--muted);
}
.seg-soon .opt-g { color: var(--hair); }
.seg-soon .opt-r { font-style: italic; }

.profile-email { margin: 2px 0 0; }

.brows {
  display: flex; flex-direction: column;
  background: var(--card); border-radius: var(--r-panel); overflow: hidden;
  box-shadow: var(--panel);
}
.brow {
  display: flex; align-items: center; gap: var(--s4);
  padding: var(--s4) var(--s5);
  text-decoration: none; color: var(--fg);
  transition: background var(--fast) var(--ease);
}
.brow + .brow { box-shadow: inset 0 1px 0 var(--hair); }
a.brow:hover { background: color-mix(in srgb, var(--fg) 5%, transparent); }
.brow-g {
  flex: 0 0 auto; width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: var(--r-chip);
  font-family: 'Noto Serif SC', serif; font-size: 19px;
}
.brow-mid { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 auto; }
.brow-t {
  display: flex; align-items: baseline; gap: var(--s2);
  font-size: var(--t-body); font-weight: 500;
}
.brow-tag {
  font-size: var(--t-over); font-weight: 600; letter-spacing: .04em;
  padding: 2px 6px; border-radius: var(--r-pill);
  background: var(--raised); color: var(--muted);
}
.brow-s {
  font-size: var(--t-label); color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.brow-r { display: flex; align-items: center; gap: var(--s2); flex: 0 0 auto; }
.brow-note { color: var(--muted); font-size: var(--fs-fine); }
.brow-off .brow-t { color: var(--muted); }
.brow-off .brow-g { opacity: .55; }
.brow-soon {
  font-size: var(--t-over); font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
  background: var(--raised); border-radius: var(--r-pill);
  padding: 5px 11px; white-space: nowrap;
}

.acc-tone1 { background: color-mix(in srgb, var(--t1) 18%, var(--card)); color: color-mix(in srgb, var(--t1) 68%, var(--fg)); }
.acc-tone2 { background: color-mix(in srgb, var(--t2) 18%, var(--card)); color: color-mix(in srgb, var(--t2) 68%, var(--fg)); }
.acc-tone3 { background: color-mix(in srgb, var(--t3) 18%, var(--card)); color: color-mix(in srgb, var(--t3) 68%, var(--fg)); }
.acc-tone4 { background: color-mix(in srgb, var(--t4) 18%, var(--card)); color: color-mix(in srgb, var(--t4) 68%, var(--fg)); }
.acc-jade  { background: color-mix(in srgb, var(--jade) 18%, var(--card)); color: color-mix(in srgb, var(--jade) 68%, var(--fg)); }
.acc-seal  { background: var(--seal-soft); color: var(--seal-text); }
.acc-block { background: var(--raised); color: var(--fg-2); }
.acc-sound { background: color-mix(in srgb, var(--t5) 18%, var(--card)); color: color-mix(in srgb, var(--t5) 68%, var(--fg)); }

@media (max-width: 560px) {
  .brow-s { display: none; }
  .brow { padding: var(--s3); gap: var(--s2); }
}

.camp-screen { --camp-w: min(100%, calc((100dvh - 162px) * 1.50)); }
.camp-gate {
  position: relative;
  width: var(--camp-w);
  margin: 0 auto;
  aspect-ratio: 1000 / 180;
  color: color-mix(in srgb, var(--fg) 82%, transparent);
}
.camp-gate-art {
  position: absolute; inset: 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 58%, transparent 96%);
  mask-image: linear-gradient(to bottom, #000 58%, transparent 96%);
}
.camp-gate-art svg { width: 100%; height: 100%; display: block; }
.camp-gate {
  --gate-roof: #2F7A68;
  --gate-lacquer: #B8402C;
  --gate-band: #2D6E8E;
  --gate-gold: #C9952E;
}
body[data-phase="night"] .camp-gate {
  --gate-roof: #4E9C86;
  --gate-lacquer: #C9533A;
  --gate-band: #4F8CAB;
  --gate-gold: #DDB054;
}
.camp-gate-art .gate-roof { fill: var(--gate-roof); fill-opacity: .78; stroke: var(--gate-roof); stroke-opacity: .9; }
.camp-gate-art .gate-lacquer { fill: var(--gate-lacquer); fill-opacity: .86; stroke: var(--gate-lacquer); stroke-opacity: .85; }
.camp-gate-art .gate-band { fill: var(--gate-band); fill-opacity: .62; stroke: var(--gate-band); stroke-opacity: .85; }
.camp-gate-art .gate-gold { fill: var(--gate-gold); fill-opacity: .9; stroke: var(--gate-gold); }
.camp-board {
  position: absolute;
  left: 50%; top: 41%;
  translate: -50% 0;
  color: var(--fg);
}
.camp-board h1 { margin: 0; white-space: nowrap; }
.camp-board h1::after { display: none; }
.camp-lead,
.camp-next {
  position: absolute;
  left: 50%;
  translate: -50% 0;
  margin: 0;
  max-width: 62ch;
  text-align: center;
  white-space: nowrap;
  padding: .5em 1.4em;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--card) 90%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--fg) 7%, transparent),
              0 8px 18px -12px rgba(26, 24, 19, .35);
  color: var(--fg-2);
  line-height: 1.3;
}
.camp-lead { top: 71%; }
.camp-next { top: 88%; color: var(--seal-text); font-weight: 600; }

.camp {
  position: relative;
  width: var(--camp-w);
  margin: calc(var(--camp-w) * -0.05) auto 0;
  aspect-ratio: 1200 / 640;
  overflow: clip;
  container-type: size;
  --cu: calc(100cqw / 1200);
  --cscale: calc(100cqw / 1200px);
  color: color-mix(in srgb, #1C1E18 70%, transparent);
  filter: var(--art-filter, none);
  transition: filter 4s linear;
}

.camp-ground { position: absolute; inset: 0; pointer-events: none; color: #1C1E18; }
.camp-ground svg { width: 100%; height: 100%; display: block; }

.camp-prop {
  position: absolute;
  left: var(--x); top: var(--y);
  transform: translate(-50%, -100%);
  pointer-events: none;
  color: var(--camp-fig);
}
.camp-prop svg { width: calc(var(--w, 46) * var(--cu)); height: auto; display: block; }

.camp-lantern {
  position: absolute;
  left: var(--x); top: var(--y);
  transform: translate(-50%, -100%);
  pointer-events: none;
  color: var(--camp-fig);
}
.camp-lantern svg { width: calc(var(--w, 24) * var(--cu)); height: auto; display: block; }

.camp-paths {
  position: absolute; left: 0; top: 0;
  width: 1200px; height: 640px;
  transform: scale(var(--cscale));
  transform-origin: 0 0;
  pointer-events: none;
}
.camp-walk {
  position: absolute; left: 0; top: 0;
  width: 26px;
  opacity: 0;
  color: var(--camp-fig);
  animation: var(--walk, none) var(--wd, 40s) linear infinite;
  animation-delay: var(--wdelay, 0s);
}
.camp-walk svg {
  width: 100%; height: auto; display: block;
  animation: camp-bob .62s ease-in-out infinite;
}
.camp-walk-back svg { scale: -1 1; }
@keyframes camp-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-2.5px); }
}
@media (prefers-reduced-motion: reduce) {
  .camp-paths { display: none; }
}

body[data-phase="night"] .camp-art {
  color: color-mix(in srgb, var(--camp-night-tint)
                   calc((var(--ink, 70) + var(--camp-night-lift)) * 1%), transparent);
}
body[data-phase="night"] .camp-ground { color: var(--camp-night-tint); }
body[data-phase="night"] {
  --camp-fig: color-mix(in srgb, var(--camp-night-tint) 74%, transparent);
}
body[data-phase="night"] .camp-art svg,
body[data-phase="night"] .camp-lantern svg { --court-hole: #F2C27A; }
body[data-phase="night"] .camp-lantern { --camp-fire: #F7CE86; }
body[data-phase="night"] .camp-fire {
  filter: drop-shadow(0 0 calc(7 * var(--cu)) rgba(247, 206, 134, .85))
          drop-shadow(0 0 calc(18 * var(--cu)) rgba(247, 206, 134, .45));
}
body[data-phase="night"] .camp-art svg > g:last-of-type {
  filter: drop-shadow(0 0 calc(5 * var(--cu)) rgba(242, 194, 122, .6));
}
body[data-phase="dusk"] .camp-art svg { --court-hole: #F6E2C0; }
body[data-phase="dusk"] .camp-lantern { --camp-fire: #F3CE95; }
.camp-lantern { --camp-lamp: #C8452E; }
body[data-phase="dusk"] .camp-lantern { --camp-lamp: #E0673F; }
body[data-phase="night"] .camp-lantern { --camp-lamp: #F59A5E; }

.camp-b {
  position: absolute;
  left: var(--x); top: var(--y);
  transform: translate(-50%, -100%);
  display: block;
}
.camp-art {
  display: block; position: relative;
  color: color-mix(in srgb, #1C1E18 calc(var(--ink, 70) * 1%), transparent);
}
.camp-art svg {
  --court-hole: #F4F1E9;
  width: calc(var(--w, 110) * var(--cu)); height: auto; display: block;
}
.camp-art::before {
  content: '';
  position: absolute; left: 50%; bottom: 1%;
  width: 92%; height: 13%;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(28, 30, 24, .3), rgba(28, 30, 24, 0) 76%);
}

.camp-below {
  position: absolute; top: 100%; left: 50%;
  translate: -50% calc(10 * var(--cu));
  display: grid; justify-items: center; gap: calc(19 * var(--cu));
  width: max-content;
}
.camp-tag {
  padding: calc(3 * var(--cu)) calc(13 * var(--cu));
  border-radius: var(--r-pill);
  white-space: nowrap;
  font-size: calc(16 * var(--cu)); font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--fg-2);
  background: color-mix(in srgb, var(--card) 86%, transparent);
  backdrop-filter: blur(8px);
}

:root {
  --camp-night-tint: #1C1E18;
  --camp-night-lift: 14;
  --camp-fig: color-mix(in srgb, #1C1E18 72%, transparent);
  --dchip-face: color-mix(in srgb, currentColor 20%, var(--card));
  --dchip-face-on: color-mix(in srgb, currentColor 32%, var(--card));
  --dchip-ring: 0 0 0 1px color-mix(in srgb, currentColor 34%, transparent),
                0 calc(2 * var(--cu)) calc(5 * var(--cu)) rgba(26, 24, 19, .18);
  --dchip-ring-on: 0 0 0 calc(2 * var(--cu)) color-mix(in srgb, currentColor 62%, transparent),
                   0 calc(4 * var(--cu)) calc(10 * var(--cu)) rgba(26, 24, 19, .24);
  --dchip-glow: none;
  --dchip-glow-on: none;
}

.camp-decks { display: flex; gap: calc(9 * var(--cu)); }
.dchip {
  position: relative;
  flex: 0 0 auto;
  width: calc(42 * var(--cu)); height: calc(42 * var(--cu));
  text-decoration: none;
  transition: transform var(--fast) var(--ease);
}
.dchip-g {
  display: grid; place-items: center;
  width: 100%; height: 100%;
  border-radius: var(--r-chip);
  font-family: 'Noto Serif SC', serif; font-size: calc(23 * var(--cu)); line-height: 1;
  background-color: var(--dchip-face);
  box-shadow: var(--dchip-ring);
  filter: var(--dchip-glow);
  transition: box-shadow var(--fast) var(--ease), background-color var(--fast) var(--ease),
              filter var(--fast) var(--ease);
}
.dchip:hover, .dchip:focus-visible { transform: translateY(-2px); }
.dchip:hover .dchip-g, .dchip:focus-visible .dchip-g {
  background-color: var(--dchip-face-on);
  box-shadow: var(--dchip-ring-on);
  filter: var(--dchip-glow-on);
}
.dchip-off { opacity: .5; }

.dchip-counts {
  position: absolute;
  bottom: calc(100% + 2 * var(--cu));
  left: 50%;
  translate: -50% 0;
  display: flex; gap: calc(3 * var(--cu));
  white-space: nowrap;
}
.dchip-new,
.dchip-rev {
  min-width: calc(16 * var(--cu)); height: calc(16 * var(--cu));
  padding: 0 calc(5 * var(--cu));
  display: grid; place-items: center;
  border-radius: var(--r-pill);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: calc(11 * var(--cu)); font-weight: 600;
  line-height: 1;
}
.dchip-g.acc-block { color: var(--fg); }

.dchip-rev { color: var(--seal-text); background: color-mix(in srgb, var(--seal) 14%, var(--card)); }
.dchip-new { color: var(--fg-2); background: var(--raised); }
.dchip-new.dchip-paused {
  display: inline-flex; align-items: center; gap: 3px;
  background: none; border: 1px dashed currentColor;
}
.dchip-paused svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2; }

.dchip-b {
  position: absolute;
  bottom: calc(100% + 24 * var(--cu)); left: 0;
  width: max-content; max-width: 218px;
  display: grid; gap: 1px;
  padding: var(--s2) var(--s3);
  border-radius: var(--r-chip);
  background: color-mix(in srgb, var(--card) 72%, transparent);
  backdrop-filter: blur(14px) saturate(1.06);
  box-shadow: var(--sink), 0 0 0 1px color-mix(in srgb, var(--fg) 6%, transparent);
  text-align: left;
  opacity: 0;
  transition: opacity var(--fast) var(--ease);
  pointer-events: none;
  z-index: 3;
}
.dchip:hover .dchip-b,
.dchip:focus-visible .dchip-b { opacity: 1; }
.camp-b:hover, .camp-b:focus-within { z-index: 4; }
.camp-b[data-open="left"] .dchip-b { left: auto; right: 0; }
.dchip-t {
  display: flex; align-items: baseline; gap: var(--s2);
  font-family: 'Inter', system-ui, -apple-system, sans-serif; font-size: var(--t-label); font-weight: 600;
  color: var(--fg);
}
.dchip-tag {
  font-size: var(--t-over); font-weight: 600; letter-spacing: .04em;
  padding: 1px 5px; border-radius: var(--r-pill);
  background: var(--raised); color: var(--muted);
}
.dchip-done { color: var(--jade-ink); font-weight: 700; }
.dchip-s, .dchip-note {
  font-family: 'Inter', system-ui, -apple-system, sans-serif; font-size: var(--fs-fine); font-weight: 400;
  color: var(--muted); line-height: 1.35;
}
.dchip-note { color: var(--seal-text); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  .dchip:hover, .dchip:focus-visible { transform: none; }
}

@media (max-width: 743px) {
  .camp {
    aspect-ratio: auto;
    container-type: normal;
    display: grid; gap: var(--s5);
    filter: none;
    color: inherit;
  }
  .camp-gate { aspect-ratio: auto; width: auto; margin-bottom: var(--s5); }
  .camp-gate-art { display: none; }
  .camp-board {
    position: static; translate: none;
    padding: 0; background: none; box-shadow: none;
  }
  .camp-board h1 { white-space: normal; }
  .camp-board h1::after { display: block; }
  .camp-lead,
  .camp-next {
    position: static; translate: none;
    margin-top: var(--s4);
    text-align: left; white-space: normal;
    padding: 0; background: none; backdrop-filter: none;
  }
  .camp-ground, .camp-prop,
  .camp-lantern, .camp-paths { display: none; }
  .camp-b {
    position: relative;
    left: auto; top: auto;
    transform: none;
  }
  .camp-art { display: none; }
  .camp-below {
    position: static;
    translate: none;
    justify-items: stretch;
    gap: var(--s3);
    width: auto;
  }
  .camp-tag {
    justify-self: start;
    padding: 0; background: none; backdrop-filter: none;
    color: var(--muted);
  }
  .camp-decks {
    flex-direction: column; gap: 0;
    background: var(--card); border-radius: var(--r-panel); overflow: hidden;
    box-shadow: var(--panel);
  }
  .camp-decks { gap: 0; }
  .dchip {
    width: auto; height: auto;
    display: flex; align-items: center; gap: var(--s4);
    padding: var(--s4);
  }
  .dchip + .dchip { box-shadow: inset 0 1px 0 var(--hair); }
  .dchip:hover, .dchip:focus-visible { transform: none; }
  .dchip:hover .dchip-g, .dchip:focus-visible .dchip-g { box-shadow: none; }
  .camp .dchip-lit { display: none; }
  .dchip-g {
    flex: 0 0 auto; width: 38px; height: 38px;
    font-size: 19px;
    box-shadow: none;
  }
  .camp-tag { padding: 0; font-size: var(--t-body); }
  .camp-below { translate: none; gap: var(--s3); }
  .dchip-counts { display: none; }
  .dchip-b {
    position: static;
    opacity: 1;
    width: auto; max-width: none;
    padding: 0; background: none; box-shadow: none; backdrop-filter: none;
    flex: 1 1 auto; min-width: 0;
  }
  .dchip-s { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

.camp-b--quiet { color: inherit; text-decoration: none; cursor: pointer; outline: none; }
.camp-b--quiet .camp-art { opacity: .62; transition: opacity var(--fast) var(--ease); }
.camp-b--quiet:is(:hover, :focus-visible, :focus) .camp-art { opacity: .8; }
.camp-quiet { margin: 0; color: var(--muted); white-space: nowrap; }
@media (min-width: 744px) {
  .camp .camp-b--quiet .camp-below { min-width: 0; }
  .camp .camp-b--quiet .camp-tag { box-shadow: none; padding-bottom: 0; }
  .camp .camp-b--quiet .camp-quiet {
    display: none;
    padding: calc(2 * var(--cu)) calc(8 * var(--cu)) calc(1 * var(--cu));
    font-size: calc(12.5 * var(--cu)); text-align: center;
    box-shadow: inset 0 1px 0 var(--hair);
  }
  .camp .camp-b--quiet:is(:hover, :focus-visible, :focus) .camp-quiet { display: block; }
  .camp .camp-b--quiet[data-quiet="off"]:is(:hover, :focus-visible) .camp-quiet { color: var(--seal-text); }
  .camp .camp-b--quiet:focus-visible .camp-below { outline: 2px solid var(--seal); outline-offset: 2px; }
}
@media (max-width: 743px) {
  .camp-b--quiet .camp-below {
    display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3);
  }
  .camp-b--quiet .camp-tag { opacity: .7; }
  .camp-quiet { font-size: var(--t-label); }
}

.shelf {
  background: none; box-shadow: none; overflow: visible;
  gap: var(--s2);
  max-width: 780px;
}
.shelf li + li a { box-shadow: var(--panel); }
.shelf a {
  position: relative;
  margin-left: 7px;
  padding-left: var(--s5);
  border-radius: 3px var(--r-card) var(--r-card) 3px;
  background:
    repeating-linear-gradient(to bottom,
      rgba(120, 104, 78, .03) 0 1px, transparent 1px 3px),
    var(--card);
  box-shadow: var(--panel);
}
.shelf a::before {
  content: '';
  position: absolute; left: -7px; top: -3px; bottom: -3px;
  width: 13px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--fg) 52%, transparent);
  box-shadow: inset -2px 0 3px -2px rgba(0, 0, 0, .45);
}

.gate-arch {
  display: block; height: 22px;
  margin-bottom: calc(-1 * var(--s1));
  color: color-mix(in srgb, var(--fg) 40%, transparent);
}
.gate-arch svg { width: 100%; height: 100%; display: block; }
.heat-cell {
  border-radius: 34%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28);
}

.profile-head {
  padding: var(--s5);
  border-radius: var(--r-panel);
  background: var(--raised);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fg) 7%, transparent);
}
.profile-head {
  padding: var(--s2) var(--s1);
  background: none;
  box-shadow: none;
}
.profile-head > div {
  flex: 1 1 auto;
  display: flex; flex-direction: column; gap: 4px;
}
.profile-head .fine, .profile-head .pf-chips { margin: 0; }
.profile-head .pf-chips { margin: 4px 0; }
.profile-head .name-form { flex-wrap: nowrap; }
.profile-head .name-form input { flex: 0 1 12ch; }
.name-form button { flex: none; opacity: 0; transition: opacity var(--fast) var(--ease); }
.name-form:focus-within button, .name-form button:focus-visible { opacity: 1; }

.tr-canvas {
  width: min(100%, 360px); aspect-ratio: 1; display: block;
  touch-action: none; cursor: crosshair; border-radius: 14px;
}
.tr-ground { fill: var(--bg-sunken); }
.tr-grid { stroke: var(--hair); stroke-width: 2; fill: none; }
.tr-done { fill: var(--fg); }
.tr-now { fill: color-mix(in srgb, var(--fg) 18%, transparent); }
.tr-dot { fill: var(--seal); opacity: .85; }
.tr-ink {
  fill: none; stroke: var(--seal); stroke-width: 34;
  stroke-linecap: round; stroke-linejoin: round;
}
.tr-head { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.tr-hanzi { font-family: 'Noto Serif SC', serif; font-size: 30px; line-height: 1.1; }
.tr-preview { width: min(100%, 360px); aspect-ratio: 1; display: grid; place-items: center;
  background: var(--bg-sunken); border-radius: 14px; }
.tr-preview .strokes { width: 86%; height: 86%; }
@media (min-width: 820px) {
  .tr-screen .drill-card {
    max-width: 900px;
    display: grid; grid-template-columns: auto minmax(220px, 1fr);
    grid-template-areas: "canvas head" "canvas after";
    align-items: center; justify-items: center;
    column-gap: var(--s6); row-gap: var(--s4);
    padding: clamp(18px, 2.4vw, 30px);
  }
  .tr-screen .tr-head { grid-area: head; align-self: end; }
  .tr-screen .drill-after { grid-area: after; align-self: start; text-align: center; }
  .tr-screen :is(.tr-canvas, .tr-preview) {
    grid-area: canvas;
    width: clamp(240px, calc(100dvh - 350px), 480px);
  }
  .tr-screen .screen-head .fine { margin-top: var(--s2); max-width: none; }
}

.tr-scope select {
  font: inherit; font-size: var(--fs-fine); color: var(--fg-2);
  background: var(--raised); border: 1px solid var(--hair); border-radius: 99px;
  padding: 4px 10px;
}

.py-filter { display: flex; flex-wrap: wrap; gap: 5px; }
.chip {
  padding: 5px 11px; border-radius: var(--r-card); text-decoration: none;
  background: var(--raised);  color: var(--fg-2);
  font-size: var(--fs-fine); font-weight: 500;
}
.chip:hover { color: var(--fg); }
.chip.on { background: var(--seal); border-color: var(--seal); color: var(--seal-on); }

.py-group { display: flex; flex-direction: column; gap: 6px; }
.py-rows { display: flex; flex-direction: column; gap: 4px; }
.py-row {
  display: grid; grid-template-columns: 84px 1fr; gap: 14px; align-items: center;
  padding: 6px 12px; border-radius: 10px;
}
.py-row:hover { background: var(--bg-sunken); }
.py-s { font-weight: 500; font-variant-numeric: tabular-nums; }
.py-slots { display: grid; grid-template-columns: repeat(5, 58px); gap: 6px; }
.py-slot {
  display: flex; align-items: baseline; justify-content: center; gap: 5px;
  padding: 6px 4px; border-radius: var(--r-chip); cursor: pointer; font: inherit;
  background: var(--raised);
}
.py-slot:hover { border-color: currentColor; }
.py-h { font-family: 'Noto Serif SC', serif; font-size: 17px; color: var(--fg); }
.py-t { font-size: 12px; letter-spacing: 0.01em; }
.py-slot.t1 .py-t { color: var(--t1-ink); }
.py-slot.t2 .py-t { color: var(--t2-ink); }
.py-slot.t3 .py-t { color: var(--t3-ink); }
.py-slot.t4 .py-t { color: var(--t4-ink); }
.py-slot.t5 .py-t { color: var(--t5-ink); }
.py-none { border-style: dashed; opacity: .45; cursor: default; }

.lib-more { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; align-items: start; }
.lib-more-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
@media (max-width: 640px) { .lib-more { grid-template-columns: 1fr; } }
.list-id { font-family: 'Noto Serif SC', serif; font-size: 17px; }
.opt-flat { cursor: default; background: transparent; }
.opt-flat:hover { border-color: var(--hair); }

@media (max-width: 620px) {
  .py-row { grid-template-columns: 1fr; gap: 5px; }
  .py-slots { grid-template-columns: repeat(5, 1fr); }
}

.wb { width: min(100%, 300px); aspect-ratio: 1; display: block;
      touch-action: none; cursor: crosshair; border-radius: 14px; margin: 4px auto 0; }
.wb-ink { fill: none; stroke: var(--fg); stroke-width: 30;
          stroke-linecap: round; stroke-linejoin: round; }
.wb-truth { fill: color-mix(in srgb, var(--fg) 26%, transparent); }
.wb.wb-play .wb-truth {
  animation: wb-stroke .42s ease-out calc(var(--i) * .5s) both;
}
.wb.wb-play :is(.wb-ink, .wb-snap) {
  animation: wb-ink-back calc(var(--n, 1) * .5s + .5s) linear both;
}
.wb-snap { fill: var(--fg); }
.wb-snap.wb-failed { fill: color-mix(in srgb, var(--seal) 70%, var(--fg)); }
.wb.wb-ok { box-shadow: 0 0 0 2px var(--jade); }
.wb.wb-bad { box-shadow: 0 0 0 2px var(--seal); }
@keyframes wb-stroke {
  from { opacity: 0; fill: var(--seal); }
  to { opacity: 1; }
}
@keyframes wb-ink-back {
  0%, 92% { opacity: .18; }
  100% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .wb.wb-play .wb-truth, .wb.wb-play :is(.wb-ink, .wb-snap) { animation: none; }
}

.wb-hint { fill: color-mix(in srgb, var(--fg) 18%, transparent); }
.wb-dot { fill: var(--seal); opacity: .7; }
.wb-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
              justify-content: center; margin-top: 10px; }
.wb-actions .fine { margin: 0; color: var(--muted); }
.wb-actions .btn { padding-inline: 8px; }
.wb-switch[aria-pressed="true"],
.wb-switch[aria-pressed="true"]:hover {
  box-shadow: inset 0 0 0 1.5px var(--seal); color: var(--seal-text);
  background: color-mix(in srgb, var(--seal) 14%, var(--raised));
}
.wb-tiles { display: flex; gap: 8px; width: 100%; max-width: 360px; }
.wb-tile {
  flex: 1 1 0; min-width: 0; height: 54px; padding: 0 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 1px solid var(--hair); border-radius: 12px; background: var(--raised);
  color: var(--fg-2); font: inherit; font-size: 11px; font-weight: 600; text-decoration: none;
  cursor: pointer; transition: color var(--fast) var(--ease);
}
.wb-tile span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-tile:hover, .wb-tile:focus-visible { color: var(--fg); }
.wb-tile.on {
  border-color: var(--seal); color: var(--seal-text);
  background: color-mix(in srgb, var(--seal) 14%, transparent);
}
.r-write .r-face { display: contents; }
.r-write .wb-side { width: 100%; }

@media (min-width: 820px) {
  .r-card.r-write {
    --wb: clamp(190px, calc(100dvh - 440px), 300px);
    display: grid; grid-template-columns: auto minmax(0, 1fr);
    align-items: center; column-gap: var(--s4);
    min-height: 0; padding: 18px;
  }
  .r-write .r-face {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    grid-column: 2; grid-row: 1; min-width: 0;
  }
  .r-write .wb-side { grid-column: 1; grid-row: 1; width: auto; }
  .r-write .wb { width: var(--wb); margin: 0; }
  .r-write .wb-actions { margin-top: 6px; gap: 4px 6px; max-width: var(--wb); margin-inline: auto; }
  .r-write .r-hanzi { font-size: 44px; line-height: 1.05; }
  .r-write .rpairs { row-gap: 6px; }
  .r-write .r-cast { gap: 6px; margin-top: 2px; }
  .r-write .r-cast li { padding: 5px 9px; gap: 6px; }
  .r-write .r-cast .cast-f { font-size: 19px; }
}

.facts { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.fact {
  display: flex; flex-direction: column; gap: 2px;
  padding: 14px 16px; border-radius: var(--r-card); text-decoration: none; color: var(--fg);
  background: var(--raised);
  transition: border-color .12s ease-out;
}
.fact:hover { border-color: color-mix(in srgb, var(--fg) 26%, transparent); }
.fact-n { font-family: 'Fraunces', Georgia, serif; font-size: 24px; font-weight: 600;
          line-height: 1.1; font-variant-numeric: tabular-nums; }
.fact-k { color: var(--muted); font-size: var(--fs-fine); }

.fb-open {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0; border-radius: 99px; cursor: pointer;
  background: var(--bg-sunken);
  border: 1px solid color-mix(in srgb, var(--fg) 30%, transparent);
  color: var(--fg-2); font: inherit; font-size: 16px; line-height: 1;
  box-shadow: var(--shadow);
  transition: padding .16s ease-out, color .12s ease-out, border-color .12s ease-out;
}
.fb-open::after {
  content: attr(aria-label);
  max-width: 0; overflow: hidden; white-space: nowrap;
  font-size: var(--fs-fine);
  transition: max-width .16s ease-out;
}
.drill-pause { text-align: center; }
.drill-pause-n { margin: 0 0 4px; font-family: 'Fraunces', Georgia, serif; font-size: 30px; font-weight: 600; }
.drill-pause .gy-acts { justify-content: center; margin-top: var(--s3); }
.fb-open[aria-busy="true"], #top-fb[aria-busy="true"] { opacity: .55; cursor: progress; }
.fb-open:hover, .fb-open:focus-visible {
  color: var(--seal-text); border-color: var(--seal); padding: 0 14px 0 12px;
}
.fb-open:hover::after, .fb-open:focus-visible::after { max-width: 12rem; margin-left: 8px; }
@media (max-width: 860px) {
  .fb-open { bottom: calc(74px + env(safe-area-inset-bottom)); }
}
@media (hover: none) {
  .fb-open { padding: 0 14px 0 12px; }
  .fb-open::after { max-width: 12rem; margin-left: 8px; }
}

.fb {
  width: min(92vw, 460px); padding: 0;
  border-radius: var(--r-panel); background: var(--raised); color: var(--fg);
}
.fb::backdrop { background: rgba(0, 0, 0, .5); }
dialog:not([open]) { display: none; }
.fb-form { display: flex; flex-direction: column; gap: 12px; padding: 22px; }
.fb-form h2 { font-size: 19px; }
.fb-form .fine { margin: 0; color: var(--muted); }
.path-step { display: flex; flex-direction: column; gap: 8px; }
.path-step[data-way="down"] > * { animation: path-down .2s ease-out; }
.path-step[data-way="up"] > * { animation: path-up .2s ease-out; }
@keyframes path-down { from { opacity: 0; translate: 16px 0; } }
@keyframes path-up { from { opacity: 0; translate: -16px 0; } }
@media (prefers-reduced-motion: reduce) { .path-step > * { animation: none !important; } }
.path-up {
  align-self: flex-start; padding: 2px 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: var(--fs-small); color: var(--seal);
}
.path-volume { margin: 0; font-size: 16px; }
.fb-label { font-size: var(--fs-fine); color: var(--fg-2); }
.fb textarea {
  width: 100%; resize: vertical; font: inherit; font-size: var(--fs-small);
  padding: 10px 12px; border-radius: 10px;
  background: var(--bg-sunken); border: 1px solid var(--hair); color: var(--fg);
}
.fb textarea:focus-visible { outline: 2px solid var(--seal); outline-offset: -1px; }
.fb-msg-box {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0 6px;
  border-radius: 10px; background: var(--bg-sunken); border: 1px solid var(--hair);
}
.fb-msg-box:has(textarea:focus-visible) { outline: 2px solid var(--seal); outline-offset: -1px; }
.fb-msg-box textarea { display: block; flex: 0 0 100%; border: 0; background: none; }
.fb-msg-box textarea:focus-visible { outline: 0; }
.fb-mic {
  order: 2; margin: 0 6px 6px 0;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; padding: 0; cursor: pointer;
  border: 1px solid var(--hair); background: var(--raised); color: var(--fg-2);
  transition: background .15s, color .15s, border-color .15s;
}
.fb-mic[hidden] { display: none; }
.fb-mic:hover, .fb-mic:focus-visible { color: var(--seal-text); border-color: var(--seal); }
.fb-mic.on {
  color: var(--seal-on, #fff); background: var(--seal); border-color: var(--seal);
  animation: fb-mic-breathe 1.4s ease-in-out infinite;
}
@keyframes fb-mic-breathe {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--seal) 45%, transparent); }
  50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--seal) 0%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .fb-mic.on { animation: none; } }
.fb-mark { display: flex; flex-direction: column; gap: 8px; }
.fb-mark[hidden] { display: none; }
.fb-thumb {
  display: block; align-self: center;
  max-width: 100%; max-height: 44vh; width: auto; height: auto;
  border-radius: var(--r-card);
  box-shadow: 0 0 0 1px var(--hair);
  cursor: crosshair; touch-action: none;
}
.fb-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fb-tools .fine { margin-left: 4px; }
.fb-tool {
  padding: 5px 12px; border-radius: var(--r-pill); border: 0; cursor: pointer;
  font: inherit; font-size: var(--fs-fine); font-weight: 600;
  color: var(--fg-2); background: var(--raised);
}
.fb-tool.on { color: #fff; background: var(--seal); }
.fb-tool[data-tool="marker"].on { color: #2A2310; background: #F2C94C; }
.fb-actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; margin-top: 2px; }
.fb-key {
  margin-left: 6px; padding: 3px 7px; border-radius: 6px;
  font: 600 12px/1.2 -apple-system, 'Segoe UI', system-ui, sans-serif; color: var(--muted);
  background: var(--raised); box-shadow: inset 0 0 0 1px var(--hair), 0 1px 0 var(--hair);
}
.fb-mic-key { order: 1; margin: 0 0 6px; }
.fb-msg-box textarea:not(:placeholder-shown) ~ .fb-mic-key { display: none; }
#fb:not(.big) { max-height: calc(100dvh - 16px); }
#fb:not(.big) .fb-thumb { max-height: max(64px, min(44vh, calc(100dvh - 536px))); }
#fb .fb-actions {
  position: sticky; bottom: 0; z-index: 1;
  margin: -8px -22px -10px; padding: 10px 22px;
  background: linear-gradient(to bottom, transparent, var(--raised) 8px);
}
@media (hover: none), (max-width: 600px) { .fb-key { display: none; } }
.fb-thumb { cursor: zoom-in; }
.fb-grow, .fb-done { margin-left: auto; }
#fb.big {
  width: 100vw; height: 100vh; height: 100dvh;
  max-width: 100vw; max-height: 100vh; max-height: 100dvh;
  margin: 0; border-radius: 0; background: var(--bg-sunken, #111);
}
#fb.big .fb-form { height: 100%; padding: 16px; }
#fb.big .fb-form > :not(.fb-mark) { display: none; }
#fb.big .fb-mark { flex: 1; min-height: 0; justify-content: center; }
#fb.big .fb-thumb {
  max-height: calc(100vh - 96px); max-height: calc(100dvh - 96px);
  cursor: crosshair;
}
#fb.big .fb-tools { justify-content: center; }

.av {
  width: 26px; height: 26px; border-radius: var(--r-pill); flex: 0 0 auto;
  object-fit: cover; display: block; background: var(--raised);
}
.av-none {
  display: grid; place-items: center;
  font-family: 'Fraunces', Georgia, serif; font-size: 12px; font-weight: 600;
  color: var(--fg-2);
}
.profile-head { display: flex; align-items: center; gap: var(--s5); }
.profile-head .av { width: 84px; height: 84px; }
.profile-head .av-none { font-size: 32px; }
.profile-head h1::after { display: none; }
.profile-email { margin-top: var(--s2) !important; }
.board .av { width: 24px; height: 24px; }

.drill-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.drill-tally { display: flex; align-items: center; gap: 14px; }
.drill-tally span { color: var(--muted); font-size: var(--fs-fine); font-variant-numeric: tabular-nums; }
.drill-tally .drill-xp {
  color: var(--t2-ink); font-weight: 600;
  padding: 3px 10px; border-radius: 99px;
  background: color-mix(in srgb, var(--t2) 12%, var(--card));
  border: 1px solid color-mix(in srgb, var(--t2) 35%, transparent);
}

.drill-card {
  background: var(--card); border-radius: var(--r-panel);
  padding: clamp(24px, 3vw, 38px);
  display: flex; flex-direction: column; gap: var(--s5); align-items: center;
  box-shadow: var(--panel);
  max-width: 620px; width: 100%; margin: 0 auto;
}
.drill-ask { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.drill-hanzi { font-family: 'Noto Serif SC', serif; font-size: clamp(56px, 9vw, 88px); line-height: 1; }
.drill-line { font-family: 'Noto Serif SC', serif; font-size: clamp(24px, 3.4vw, 34px); line-height: 1.45; }
.drill-hidden { color: var(--hair); }
.drill-mean { color: var(--muted); font-size: var(--fs-fine); }
.tr-also { font-size: 12px; line-height: 1.4; max-width: 36ch; text-align: center; }
.play-lg { width: 42px; height: 42px; font-size: 17px; margin-top: 6px; }
.play-lg .spk { width: 22px; height: 22px; }

.tone-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.tone-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 84px; padding: 12px 14px; border-radius: var(--r-card); cursor: pointer;
  background: var(--raised);  font: inherit;
  transition: border-color .12s ease-out, background .12s ease-out;
}
.tone-btn:hover:not(:disabled) { background: color-mix(in srgb, var(--fg) 10%, var(--raised)); }
.tone-btn .tone-n { font-family: 'Fraunces', Georgia, serif; font-size: 24px; font-weight: 600; line-height: 1; }
.tone-btn .tone-k { font-size: 11.5px; color: var(--muted); }
.tone-btn:disabled { cursor: default; }
.tone-btn.t1 .tone-n { color: var(--t1-ink); }
.tone-btn.t2 .tone-n { color: var(--t2-ink); }
.tone-btn.t3 .tone-n { color: var(--t3-ink); }
.tone-btn.t4 .tone-n { color: var(--t4-ink); }
.tone-btn.t5 .tone-n { color: var(--t5-ink); }

.tone-btn.right, .opt-answer.right {
  box-shadow: inset 0 0 0 1.5px var(--growth-4);
  background: color-mix(in srgb, var(--growth-4) 15%, var(--card));
}
.tone-btn.wrong, .opt-answer.wrong {
  box-shadow: inset 0 0 0 1.5px var(--seal);
  background: var(--seal-soft);
}
.tone-btn.dim, .opt-answer.dim { opacity: .4; }
.opt-answer { justify-content: flex-start; }
.opt-answer:disabled { opacity: 1; }
.opt-answer.dim:disabled { opacity: .4; }

.drill .opts { width: 100%; max-width: 520px; }
.drill-after { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.drill-after p { margin: 0; font-size: var(--fs-small); }
.drill-yes { color: color-mix(in srgb, var(--growth-4) var(--jade-keep), var(--fg)); }
.drill-no { color: var(--seal-text); }

.hd { display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding-top: 12px; border-top: 1px solid var(--hair); width: 100%; }
.drill-after .hd-k { text-transform: uppercase; letter-spacing: .1em; font-size: 11px;
  font-weight: 600; color: var(--muted); }
.hd-row { display: flex; gap: 22px; align-items: flex-start; justify-content: center; }
.hd-cell {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: none; border: 0; cursor: pointer; padding: 6px 10px; border-radius: 12px;
  color: var(--tc, var(--fg));
}
.hd-cell:hover { background: var(--raised); }
.hd-cell.t1 { --tc: var(--t1-ink); } .hd-cell.t2 { --tc: var(--t2-ink); } .hd-cell.t3 { --tc: var(--t3-ink); }
.hd-cell.t4 { --tc: var(--t4-ink); } .hd-cell.t5 { --tc: var(--t5-ink); }
.hd-hanzi { font-family: 'Noto Serif SC', serif; font-size: 30px; line-height: 1.1; }
.hd-py { font-size: 13px; font-weight: 500; }
.hd-cap { font-size: 11px; color: var(--muted); }
.hd-none { max-width: 18ch; text-align: center; }
.tone-figs .fig.t1 .fig-n { color: var(--t1-ink); } .tone-figs .fig.t2 .fig-n { color: var(--t2-ink); }
.tone-figs .fig.t3 .fig-n { color: var(--t3-ink); } .tone-figs .fig.t4 .fig-n { color: var(--t4-ink); }
.tone-figs .fig.t5 .fig-n { color: var(--t5-ink); }

.acct {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 7px 8px; border-radius: 10px; text-decoration: none;
  background: var(--bg-sunken); color: var(--fg-2);
  backdrop-filter: none;
}
.acct:hover { color: var(--fg); }
.acct-av, .acct .av { width: 24px; height: 24px; border-radius: 99px; font-size: 11px; }
.acct-av img { width: 100%; height: 100%; }
.acct-who {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: var(--fs-fine);
}
.btn-quiet {
  background: transparent; border-color: transparent; color: var(--muted);
  font-size: var(--fs-fine); padding: 6px 8px; justify-content: flex-start;
}
.btn-quiet:hover { color: var(--fg); background: var(--bg-sunken); }

.pg-hero {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  padding: 18px clamp(16px, 2.4vw, 24px); border-radius: var(--r-panel);
  background: var(--card); 
  box-shadow: var(--panel);
}
.pg-main { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pg-n {
  font-family: 'Fraunces', Georgia, serif; font-size: clamp(38px, 6vw, 52px);
  font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums;
  color: var(--seal-text);
}
.pg-k { font-size: var(--fs-small); color: var(--fg-2); }
.pg-best { font-size: var(--fs-fine); color: var(--muted); }
.pg-week { display: flex; gap: 8px; }
.pg-d { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pg-dl { font-size: 11px; color: var(--muted); }
.pg-dot {
  width: 15px; height: 15px; border-radius: 99px;
  border: 1.5px solid var(--hair); background: transparent;
}
.pg-d.on .pg-dot { background: var(--growth-4); border-color: var(--growth-4); }
.pg-d.on .pg-dl { color: var(--fg-2); }
.pg-d.ahead .pg-dot { opacity: .45; }

.heat-block { display: flex; flex-direction: column; gap: 10px; }
.heat-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
}
.heat-head .sub { margin: 0; }
.heat-legend { display: flex; align-items: center; gap: 6px; }
.heat-legend .fine { margin: 0; color: var(--muted); }
.heat-scroll { overflow-x: auto; padding-bottom: 4px; }
.heat { display: flex; flex-direction: column; gap: 5px; min-width: 300px; }
.heat-months {
  display: grid; grid-template-columns: repeat(var(--cols), 1fr);
  margin-left: 26px; font-size: 11px; color: var(--muted);
}
.heat-m { white-space: nowrap; }
.heat-rows { display: flex; gap: 5px; }
.heat-days {
  display: grid; grid-template-rows: repeat(7, 1fr); gap: 3px;
  width: 21px; font-size: 11px; color: var(--muted);
}
.heat-day { display: flex; align-items: center; line-height: 1; }
.heat-cells {
  flex: 1 1 auto; display: grid; gap: 4px;
  grid-template-rows: repeat(7, 1fr);
  grid-auto-flow: column; grid-auto-columns: 1fr;
}
.heat-cell {
  aspect-ratio: 1; min-width: 9px; border-radius: 4px; padding: 0;
  border: 0; background: var(--growth-0);
  font: inherit; cursor: pointer;
}
.heat-legend .heat-cell { width: 11px; cursor: default; }
.h0 { background: color-mix(in srgb, var(--fg) 6%, transparent); }
.h1 { background: var(--growth-1); }
.h2 { background: var(--growth-2); }
.h3 { background: var(--growth-3); }
.h4 { background: var(--growth-4); }
.heat-gap { visibility: hidden; }
button.heat-cell:hover { box-shadow: inset 0 0 0 1.5px var(--fg-2); }
button.heat-cell:focus-visible { outline: 2px solid var(--seal); outline-offset: 1px; }
button.heat-cell.on { border-color: var(--seal); }
.heat-read {
  margin: 0; min-height: 1.4em; font-size: var(--fs-small); color: var(--fg-2);
}


.ear { display: flex; flex-direction: column; gap: 7px; }
.ear-row {
  display: grid; grid-template-columns: 22px 1fr 44px auto; gap: 12px; align-items: center;
}
.ear-t {
  font-family: 'Fraunces', Georgia, serif; font-size: 19px; font-weight: 600;
  line-height: 1; text-align: center;
}
.ear-rail { height: 8px; border-radius: 4px; background: var(--bg-sunken); overflow: hidden; }
.ear-fill { display: block; height: 100%; border-radius: 4px; transition: width .3s ease-out; }
.t1bg { background: var(--t1); } .t2bg { background: var(--t2); } .t3bg { background: var(--t3); }
.t4bg { background: var(--t4); } .t5bg { background: var(--t5); }
.ear-n { font-variant-numeric: tabular-nums; font-size: var(--fs-small); text-align: right; }
.ear-a { color: var(--muted); white-space: nowrap; }
.ear-foot { display: flex; justify-content: flex-end; margin-top: var(--s2); }
.ear-reset {
  padding: 4px 12px; border-radius: var(--r-pill);
  border: 1px solid color-mix(in srgb, var(--fg) 20%, transparent);
  background: none; color: var(--fg-2); font: inherit; font-size: var(--fs-fine); font-weight: 600;
  cursor: pointer;
}
.ear-reset:hover { color: var(--seal-text, var(--seal)); border-color: currentColor; }
.ear-reset:focus-visible { outline: 2px solid var(--seal); outline-offset: 2px; }
@media (max-width: 560px) {
  .ear-row { grid-template-columns: 20px 1fr 44px; }
  .ear-a { display: none; }
}

.gw-block { position: relative; display: flex; flex-direction: column; gap: var(--s4); }
.gw-art {
  position: absolute; inset: 0; z-index: 0;
  display: flex; align-items: flex-end; justify-content: center;
  pointer-events: none; overflow: hidden;
}
.gw-art svg { width: min(100%, 420px); height: 100%; color: var(--fg); }
.gw-seal {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(90px, 16vw, 190px); line-height: 1;
  color: var(--fg); opacity: .09;
}
.gw-tree { opacity: .17; }
.gw-leaves { fill: currentColor; opacity: .055; }
.gw-ground { fill: currentColor; opacity: .1; }
.gw-block > *:not(.gw-art) { position: relative; z-index: 1; }
.gw-panes { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.gw-pane {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto;
  align-items: baseline; column-gap: var(--s3);
}
.gw-glyph {
  grid-row: 1 / 3;
  font-family: 'Noto Serif SC', serif; font-size: 34px; line-height: 1;
  color: var(--muted);
}
.gw-n {
  font-family: 'Fraunces', Georgia, serif; font-size: 32px; font-weight: 600;
  line-height: 1.05; font-variant-numeric: tabular-nums;
}
.gw-k { grid-column: 2; font-size: var(--fs-fine); color: var(--muted); }
.gw-plot { grid-column: 1 / -1; position: relative; display: block;
           width: 100%; margin-top: var(--s3); }
.gw-curve { display: block; width: 100%; height: auto; overflow: visible; }
.gw-wait { aspect-ratio: 400 / 132; }
.gw-line { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.gw-rule { stroke: var(--hair); stroke-width: 1.5; }
.gw-tick { font-family: 'Inter', system-ui, sans-serif; font-size: 15px; fill: var(--muted); }
.gw-hit {
  position: absolute; top: 0;
  padding: 0; border: 0; background: none; cursor: pointer;
}
.gw-hit::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: var(--x, 50%);
  width: 1.5px; translate: -50% 0;
  background: color-mix(in srgb, var(--fg) 30%, transparent);
  opacity: 0; transition: opacity .12s ease-out;
}
.gw-hit:hover::before, .gw-hit:focus-visible::before, .gw-hit.on::before { opacity: 1; }
.gw-hit:focus-visible { outline: none; }
.gw-tip {
  position: absolute; bottom: 100%; left: var(--x, 50%);
  translate: -50% -4px;
  padding: 4px 8px; border-radius: 4px;
  font-size: var(--fs-fine); line-height: 1.2; white-space: nowrap;
  color: #F3EFE4; background: rgba(38, 30, 20, .92);
  pointer-events: none;
  z-index: 3;
  display: none;
}
.gw-hit:first-of-type .gw-tip { translate: -8px -4px; }
.gw-hit:last-of-type .gw-tip { translate: calc(-100% + 8px) -4px; }
.gw-hit:hover .gw-tip, .gw-hit:focus-visible .gw-tip, .gw-hit.on .gw-tip { display: block; }
.gw-plot:hover .gw-hit.on:not(:hover) .gw-tip,
.gw-plot:hover .gw-hit.on:not(:hover)::before { display: none; }
.drawers-k { display: none; }
.gw-thin { grid-column: 1 / -1; margin: var(--s3) 0 0; color: var(--muted); }
.gw-plaques { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.gw-plaque {
  display: grid; grid-template-columns: auto 1fr; align-items: center;
  column-gap: var(--s3); row-gap: 0;
  padding: var(--s3) var(--s4);
  border-radius: 3px;
  background: var(--raised);
}
.gw-p-g {
  grid-row: 1 / 3;
  font-family: 'Noto Serif SC', serif; font-size: 24px; line-height: 1; color: var(--seal-text, var(--seal));
}
.gw-p-n {
  font-family: 'Fraunces', Georgia, serif; font-size: 22px; font-weight: 600;
  line-height: 1.1; font-variant-numeric: tabular-nums;
}
.gw-p-k { grid-column: 2; margin: 0; color: var(--muted); }

.id-block { display: flex; flex-direction: column; gap: var(--s3); }
.id { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.id li + li { border-top: 1px solid var(--hair); }
.id-row {
  display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: var(--s4);
  padding: var(--s3) 0;
  color: inherit; text-decoration: none;
}
a.id-row:hover .id-h { text-decoration: underline; text-underline-offset: 3px; }
.id-g {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 8px;
  font-family: 'Noto Serif SC', serif; font-size: 21px; line-height: 1;
  background: var(--raised);
}
.id-t { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.id-h { font-size: var(--fs-small); font-weight: 500; }
.id-d { margin: 0; color: var(--muted); }
.id-g[data-tint] { background: color-mix(in srgb, var(--tint) 18%, transparent); color: var(--tint-ink); }
:root[data-theme="dark"] .id-g[data-tint] { background: color-mix(in srgb, var(--tint) 36%, transparent); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .id-g[data-tint] { background: color-mix(in srgb, var(--tint) 36%, transparent); }
}
.id-g[data-tint="rarest"] { --tint: var(--violet); --tint-ink: var(--violet-ink); }
.id-g[data-tint="enemy"] { --tint: var(--t1); --tint-ink: var(--t1-ink); }
.id-g[data-tint="anchor"] { --tint: var(--t4); --tint-ink: var(--t4-ink); }
.id-g[data-tint="hour"] { --tint: var(--t2); --tint-ink: var(--t2-ink); }
.id-g[data-tint="best"] { --tint: var(--jade); --tint-ink: var(--jade-ink); }
.id-g[data-tint="flip"] { --tint: var(--rose); --tint-ink: color-mix(in srgb, var(--rose) 80%, var(--fg)); }
.id-g[data-tint="total"] { --tint: var(--t5); --tint-ink: var(--t5-ink); }

.bl-block { display: flex; flex-direction: column; gap: var(--s3); }
.bl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bl li { display: grid; grid-template-columns: 34px 1fr 48px; gap: var(--s4); align-items: center; }
.bl-d { font-size: var(--fs-fine); color: var(--fg-2); font-variant-numeric: tabular-nums; }
.bl-rail { height: 8px; border-radius: 4px; background: var(--bg-sunken); overflow: hidden; }
.bl-fill { display: block; height: 100%; border-radius: 4px; min-width: 2px; }
.bl-fill.b0 { background: var(--muted); }
.bl-fill.b1 { background: var(--t4); }
.bl-fill.b2 { background: var(--t2); }
.bl-fill.b3 { background: var(--seal); }
.bl-fill.b4 { background: color-mix(in srgb, var(--seal) 78%, #000); }
.bl-n { font-size: var(--fs-small); text-align: right; font-variant-numeric: tabular-nums; }

.tn-block { display: flex; flex-direction: column; gap: var(--s3); }
.fc-block, .tc-block, .mem-block, .sp-block { display: flex; flex-direction: column; gap: var(--s3); }
.st-meter { display: block; height: 7px; border-radius: 4px; background: var(--bg-sunken); overflow: hidden; }
.st-meter i { display: block; height: 100%; border-radius: 4px; background: var(--seal); }
.st-meter.jade i { background: var(--jade); }
.fc { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.fc-row { display: grid; grid-template-columns: 4.5em minmax(0, 1fr) 10em; align-items: center; gap: 10px; }
.fc-row .st-meter { height: 6px; }
.fc-say { display: flex; flex-direction: column; align-items: flex-end; font-size: var(--fs-fine); font-variant-numeric: tabular-nums; }
.fc-say small { color: var(--muted); }
.fc-row.done .fc-say { color: var(--jade-ink); }
.fc-more summary { cursor: pointer; font-size: var(--fs-fine); font-weight: 600; color: var(--seal-text, var(--seal)); }
.fc-more[open] summary { margin-bottom: 10px; }
.sp-figs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; text-align: center; }
.sp-figs div { display: flex; flex-direction: column-reverse; gap: 2px; }
.sp-figs dd { margin: 0; font-family: 'Fraunces', Georgia, serif; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sp-figs dt { font-size: 11px; color: var(--fg-2); }
.sp-squares { display: flex; flex-wrap: wrap; gap: 4px; }
.sp-squares .heat-cell { width: 16px; height: 16px; aspect-ratio: auto; }
.sp-squares.month .heat-cell { width: 12px; height: 12px; }
.tn-worst { margin: 0; }
.wall .seal[role="button"] { cursor: pointer; }
.wall .seal[role="button"]:focus-visible { outline: 2px solid var(--seal); outline-offset: 2px; }
.seal-big { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.seal-big .seal-stone { width: 96px; height: 96px; font-size: 48px; display: grid; place-items: center; }
.seal-big .seal-meter { width: 70%; }
.metals { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.metal { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.metal-stone {
  display: grid; place-items: center; width: 72px; height: 72px; border-radius: 18px;
  font-size: 32px; color: var(--muted); background: var(--bg-sunken); box-shadow: inset 0 0 0 1.5px var(--hair);
}
.metal.won .metal-stone { color: #231F19; rotate: -4deg; }
.metal.silver.won .metal-stone { background: linear-gradient(135deg, #DADDE3, #C8CCD4, #8E939D); box-shadow: inset 0 0 0 2.5px #8E939D; }
.metal.gold.won .metal-stone { background: linear-gradient(135deg, #EFD58E, #E5C15C, #A8842B); box-shadow: inset 0 0 0 2.5px #A8842B; }
.metal.jade.won .metal-stone { background: linear-gradient(135deg, #A6DABD, #7FC8A0, #3E7D5C); box-shadow: inset 0 0 0 2.5px #3E7D5C; }
.metal .seal-meter { width: 70px; }
.metal-won { color: var(--jade-ink); }
.pf-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; }
.pf-chip { padding: 3px 10px; border-radius: var(--r-pill); font-size: var(--fs-fine); font-weight: 600; }
.pf-chip.lvl { color: var(--t2-ink); background: color-mix(in srgb, var(--t2) 14%, var(--card)); }
.pf-chip.rank { color: var(--seal-text, var(--seal)); background: color-mix(in srgb, var(--seal) 12%, var(--card)); }
.pf-snap { display: flex; flex-direction: column; gap: 16px; }
.pf-powers { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pf-powers div { display: flex; flex-direction: column; gap: 4px; }
.pf-powers b { font-family: 'Fraunces', Georgia, serif; font-size: 26px; font-variant-numeric: tabular-nums; }
.st-meter.t4 i { background: var(--t4); }
.pf-counts { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; }
.pf-counts div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 7px; }
.pf-counts dd { margin: 0; font-family: 'Fraunces', Georgia, serif; font-size: 24px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pf-counts dt { font-size: 15px; color: var(--fg-2); }
.profile .pf-figures .stat { flex-direction: row; align-items: baseline; flex-wrap: wrap; gap: 0 7px; }
.profile .pf-figures .stat-n { font-size: 24px; font-variant-numeric: tabular-nums; }
.profile .pf-figures .stat-k { font-size: 15px; color: var(--fg-2); }
.profile .sub, .profile .set-head, .profile #screen-set > .set-head {
  font-size: 16px; letter-spacing: .01em; text-transform: none; color: var(--fg);
}
.profile .pf-rung summary b { font-size: 16px; }
.profile-head { position: relative; }
.pf-gear {
  flex: none; align-self: center; margin-left: auto;
  display: grid; place-items: center; width: 48px; height: 48px;
  border-radius: 12px; color: var(--fg-2); background: none;
  transition: color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.pf-gear:hover { color: var(--fg); background: color-mix(in srgb, var(--fg) 5%, transparent); }
.pf-gear:focus-visible { outline: 2px solid var(--seal); outline-offset: 2px; }
.pf-gear svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.set-top { position: relative; }
.set-out { position: absolute; top: 0; right: 0; }
.profile .stats-grid { grid-template-columns: repeat(3, 1fr); }
.pf-ladder { display: flex; flex-direction: column; gap: 6px; }
.bs-g.done { color: var(--jade-ink); }
.ab-tick { margin-left: auto; color: var(--jade-ink); font-weight: 700; }
.ab-inst.reached summary::after { margin-left: 10px; }
.pf-rung summary { display: flex; align-items: baseline; gap: 10px; cursor: pointer; padding: 6px 0; }
.pf-rung.done summary b { color: var(--jade-ink); }
.pf-skills { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pf-skills li { display: grid; grid-template-columns: 8em minmax(0, 1fr) 6em; align-items: center; gap: 8px; font-size: var(--fs-small); }
.pf-skills small { color: var(--muted); margin-left: 4px; }
.pf-skills b { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
button.id-row { width: 100%; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; padding: var(--s3) 0; }
button.id-row:hover .id-h { text-decoration: underline; text-underline-offset: 3px; }
body.at-stats .screen-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s4);
}
.pg-share {
  flex: 0 0 auto; display: grid; place-items: center;
  width: 40px; height: 40px; padding: 0; margin-top: 2px;
  border: 1px solid color-mix(in srgb, var(--fg) 22%, transparent); border-radius: 50%;
  background: color-mix(in srgb, var(--fg) 5%, transparent); color: var(--fg-2); cursor: pointer;
}
.pg-share svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round; }
.pg-share:hover { color: var(--fg); border-color: color-mix(in srgb, var(--fg) 45%, transparent); }
.pg-share:focus-visible { outline: 2px solid var(--seal); outline-offset: 2px; }
.pg-share:disabled { opacity: .5; cursor: progress; }
body.at-stats .sub .info-p { text-transform: none; letter-spacing: normal; font-weight: 400; }
body.at-stats .info-p { background: #F4EEE0; color: #2C2720; --fg-2: #4E463A; }
body:is([data-phase="dusk"], [data-phase="night"]).at-stats .info-p {
  background: #2F2922; color: #EDE5D3; --fg-2: #CFC4AE;
}
.sk-chart { display: block; width: 100%; height: 180px; background: var(--bg-sunken); border-radius: var(--r-chip); }
.sk-line { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.sk-line.t1 { stroke: var(--t1); } .sk-line.t2 { stroke: var(--t2); } .sk-line.t4 { stroke: var(--t4); }
.sk-line.jade { stroke: var(--jade); } .sk-line.seal { stroke: var(--seal); }
.sk-axis { display: flex; justify-content: space-between; margin: 0; }
.sk-legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 14px; font-size: var(--fs-fine); }
.sk-legend li { display: flex; align-items: center; gap: 6px; }
.sk-legend b { margin-left: auto; font-variant-numeric: tabular-nums; }
.sk-legend i { width: 12px; height: 3px; border-radius: 2px; background: currentColor; }
.sk-legend i.t1 { background: var(--t1); } .sk-legend i.t2 { background: var(--t2); } .sk-legend i.t4 { background: var(--t4); }
.sk-legend i.jade { background: var(--jade); } .sk-legend i.seal { background: var(--seal); }
.sk-plot { position: relative; }
.sk-legend i { flex: none; padding: 0; box-shadow: none; border-radius: 2px; }
.sk-grid { stroke: var(--hair); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 3 4; }
.sk-tick {
  position: absolute; left: 6px; translate: 0 -50%;
  font-size: var(--fs-fine); color: var(--muted); font-variant-numeric: tabular-nums;
  pointer-events: none;
}
#st-skills.sheet-wide { width: min(94vw, 920px); }
#st-skills .sk-chart { height: clamp(220px, 42vh, 380px); }
#st-skills .sk-line { stroke-width: 3; }
#st-skills .sk-axis { font-size: var(--fs-small); }
#st-skills .sk-legend { font-size: var(--fs-body); gap: 10px 22px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
#st-skills .sk-legend i { width: 18px; height: 4px; }
.hr-bars { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); align-items: end; gap: 2px; height: 96px; }
.hr-bar { display: block; border-radius: 2px; background: var(--jade); }
.hr-bar.none { background: var(--bg-sunken); }
.hr-parts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hr-parts li { display: grid; grid-template-columns: 8em 3.5em minmax(0, 1fr) 3em; align-items: center; gap: 8px; font-size: var(--fs-small); }
.hr-parts small { color: var(--muted); font-variant-numeric: tabular-nums; }
.hr-parts b { text-align: right; font-variant-numeric: tabular-nums; }
.tn-year { width: 100%; height: 86px; margin-bottom: var(--s3); }
.tn-line { fill: none; stroke-width: 1.6; vector-effect: non-scaling-stroke;
           stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.t1st { stroke: var(--t1); } .t2st { stroke: var(--t2); } .t3st { stroke: var(--t3); }
.t4st { stroke: var(--t4); } .t5st { stroke: var(--t5); }

.bonsai, .room-lamp, .board-seal { display: none; }
.lib-wall, .lib-ivy, .lib-lantern, .room-floor { display: none; }
.lg-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: center; }
.lg-title h1 { margin: 0; }
.lg-title .fine { margin: 4px 0 0; }
.lg-left { font-weight: 600; color: var(--seal-text, var(--seal)); }
.lg-mine { grid-column: 1 / -1; display: flex; gap: 8px; margin: 0; }
.lg-mine > div { flex: 1; padding: 8px 12px; border-radius: var(--r-card); background: var(--raised); }
.lg-mine dt { font-size: 11px; color: var(--muted); }
.lg-mine dd { margin: 2px 0 0; font-family: 'Fraunces', Georgia, serif; font-size: 20px; font-weight: 600; }
.lg-podium {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 10px;
}
.pd { display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; min-width: 0; }
.pd-face { position: relative; }
.pd .av { width: 52px; height: 52px; }
.pd1 .av { width: 66px; height: 66px; }
.pd-medal {
  position: absolute; left: 50%; bottom: -8px; translate: -50% 0;
  display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  font-size: 11px; font-weight: 700; color: #1C1E18; background: #E0B94A;
}
.pd2 .pd-medal { background: #AEB4BF; }
.pd3 .pd-medal { background: #C47A3E; }
.pd-name { margin-top: 8px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-xp { font-family: 'Fraunces', Georgia, serif; font-weight: 600; }
.pd-xp small, .lg-xp small { font-size: .62em; color: var(--muted); }
.pd-today { font-size: 11px; font-weight: 600; color: var(--jade-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pd-streak { font-size: 11px; color: var(--fg-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pd-block { display: none; }
.lg-card { padding: 4px 14px; border-radius: var(--r-panel); background: var(--card); box-shadow: var(--panel); }
.lg-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.lg-row {
  --av: 42px;
  display: grid; align-items: center;
  grid-template-columns: 2.6ch var(--av) minmax(0, 1fr) auto;
  gap: 14px; min-height: 64px;
  box-shadow: inset 0 -1px 0 var(--hair);
}
.lg-row:last-child { box-shadow: none; }
.lg-row .av { width: var(--av); height: var(--av); }
.lg-row .av-none { font-size: calc(var(--av) * .44); }
.lg-rank { font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.lg-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.lg-name { font-size: 16.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-lvl { font-size: 13px; color: var(--muted); white-space: nowrap; }
.lg-xp { font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lg-row.me { background: color-mix(in srgb, var(--seal) 12%, var(--card)); border-radius: 8px; }
.lg-row.me .lg-name { font-weight: 700; }
.lg-pin {
  --card-bg: var(--card);
  position: sticky; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 3;
  display: grid; align-items: center;
  grid-template-columns: 2.6ch 30px minmax(0, 1fr) auto 14px; gap: 12px;
  width: calc(100% - 24px); margin: 12px auto;
  padding: 10px 16px 10px 10px;
  border: 0; border-radius: 14px; cursor: pointer;
  font: inherit; font-size: 14.5px; text-align: left; color: var(--fg);
  background: var(--card-bg);
  box-shadow: inset 0 0 0 1px var(--seal),
              0 0 0 1px color-mix(in srgb, var(--seal) 20%, transparent),
              0 6px 0 12px var(--card-bg),
              0 -8px 26px 16px color-mix(in srgb, var(--card-bg) 88%, transparent);
  animation: lg-pin-in var(--base, .24s) var(--ease, ease-out) both;
}
.lg-pin[hidden] { display: none; }
.lg-pin .av { width: 30px; height: 30px; }
.lg-pin .av-none { font-size: 13px; }
.lg-pin-you { font-weight: 700; color: var(--seal-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-pin-go { width: 14px; height: 14px; color: var(--muted); }
.lg-pin:hover .lg-pin-go, .lg-pin:focus-visible .lg-pin-go { color: var(--fg); }
.lg-pin:focus-visible { outline: 2px solid var(--seal); outline-offset: 3px; }
@keyframes lg-pin-in { from { opacity: 0; translate: 0 8px; } }
@media (prefers-reduced-motion: reduce) { .lg-pin { animation: none; } }
.lg-row.lg-known { background: var(--raised, color-mix(in srgb, var(--fg) 6%, var(--card))); border-radius: 8px; }
.pd.lg-known .lg-name, .pd.lg-known b { text-decoration: underline 2px color-mix(in srgb, var(--fg) 25%, transparent); text-underline-offset: 3px; }
.lg-online-who { font-weight: 600; color: var(--jade-ink); }
.lg-row.cold .av, .pd.cold .pd-face { opacity: .5; }
.lg-row.cold .lg-name, .pd.cold .pd-name { color: var(--muted); }
.lg-row .av-none, .pd .av-none, .lg-pin .av-none {
  background: #E6DECB; color: #5B4E38; text-shadow: none;
  font-family: 'Fraunces', Georgia, serif; font-weight: 600;
}
.pd .av-none { font-size: 26px; }
.pd1 .av-none { font-size: 32px; }
.sheet {
  width: min(94vw, 460px); max-height: min(86vh, 760px); padding: 0; border: 0;
  border-radius: var(--r-panel); background: var(--raised); color: var(--fg);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .6);
}
.sheet-wide { width: min(94vw, 640px); }
.sheet::backdrop { background: rgba(0, 0, 0, .5); }
dialog.sheet:focus-visible { outline: none; }
:root {
  --sheet-raised: var(--raised); --sheet-fg: var(--fg); --sheet-fg-2: var(--fg-2);
  --sheet-muted: var(--muted); --sheet-hair: var(--hair); --sheet-sunken: var(--bg-sunken);
  --sheet-card: var(--card);
}
.sheet {
  --raised: var(--sheet-raised); --fg: var(--sheet-fg); --fg-2: var(--sheet-fg-2);
  --muted: var(--sheet-muted); --hair: var(--sheet-hair); --bg-sunken: var(--sheet-sunken);
  --card: var(--sheet-card);
}
.sheet-in { display: flex; flex-direction: column; gap: 12px; padding: 20px 22px 24px; }
.sheet-head { display: flex; align-items: center; gap: 12px; }
.sheet-head h2 { margin: 0; flex: 1; font-size: 19px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sheet-x {
  width: 32px; height: 32px; border-radius: 50%; border: 0; cursor: pointer;
  font: inherit; font-size: 20px; line-height: 1; color: var(--fg-2); background: var(--bg-sunken);
}
.sheet-x:hover { color: var(--fg); }
.fb-sheet {
  flex: none; width: 32px; height: 32px; border-radius: 50%; border: 0; cursor: pointer;
  font: inherit; font-size: 15px; line-height: 1; color: var(--fg-2); background: var(--bg-sunken);
}
.fb-sheet:hover, .fb-sheet:focus-visible { color: var(--seal-text); }
.fb-sheet-corner { position: absolute; top: 14px; right: 14px; z-index: 2; }
.sheet .fine { margin: 0; color: var(--muted); }
.sheet h3.sub { margin: 8px 0 0; }

.lg-tier {
  display: grid; gap: 2px; justify-items: start; margin-top: 8px; padding: 8px 12px;
  border: 0; border-radius: var(--r-card); cursor: pointer; text-align: left;
  font: inherit; color: inherit; background: color-mix(in srgb, var(--raised) 80%, transparent);
}
.lg-tier b { font-family: 'Fraunces', Georgia, serif; font-size: 16px; }
.lg-tier .lg-tier-n { font-size: 28px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.lg-tier-m1 { --medal: #D4AF37; }
.lg-tier-m2 { --medal: #B9BEC7; }
.lg-tier-m3 { --medal: #CD7F32; }
.lg-tier[class*="lg-tier-m"] .lg-tier-n { color: var(--medal); }
.lg-tier .fine { margin: 0; }
.lg-tier-more { font-size: var(--fs-fine); font-weight: 600; color: var(--seal-text, var(--seal)); }
.lg-meter { display: block; width: 160px; max-width: 100%; height: 4px; border-radius: 2px; background: var(--bg-sunken); overflow: hidden; }
.lg-meter i { display: block; height: 100%; background: var(--seal); border-radius: 2px; }
.lg-tabs { display: flex; gap: 6px; }
.lg-group { margin: 0; color: var(--muted); }
.lg-score { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.lg-today { font-size: 11px; font-weight: 600; color: var(--jade-ink); font-variant-numeric: tabular-nums; }
.lg-row[role="button"], .pd[role="button"] { cursor: pointer; }
.lg-row[role="button"] { transition: background-color .15s; }
.lg-row[role="button"]:hover { background-color: color-mix(in srgb, var(--fg) 6%, transparent); }
.pd[role="button"] .pd-face { transition: transform .15s; }
.pd[role="button"]:hover .pd-face { transform: translateY(-2px); }
.lg-row[role="button"]:focus-visible, .pd[role="button"]:focus-visible { outline: 2px solid var(--seal); outline-offset: 2px; }
.lg-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lg-pager .chip:disabled { opacity: .4; cursor: default; }
.lg-past .lg-row { grid-template-columns: 26px 44px minmax(0, 1fr) auto; }
.lg-past .lg-row .av { justify-self: center; }
.lg-past .lg-row.lg-top { --av: 44px; min-height: 64px; }
.lg-past .lg-row.lg-top .lg-name { font-weight: 600; }
.lg-past .lg-row.m1 { --medal: #E0B94A; }
.lg-past .lg-row.m2 { --medal: #AEB4BF; }
.lg-past .lg-row.m3 { --medal: #C47A3E; }
.lg-medal {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  font-size: 12px; font-weight: 700; color: #1C1E18; text-shadow: none;
  background: var(--medal); box-shadow: inset 0 0 0 2px var(--medal), inset 0 0 0 3px rgba(255, 255, 255, .35);
}
.lg-past .lg-rank { display: grid; justify-items: center; }

.pc { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.pc-face .av { width: 96px; height: 96px; font-size: 40px; }
.pc-rank { margin: 0; color: var(--seal-text, var(--seal)); font-size: var(--fs-fine); }
.pc-figs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; margin: 0; gap: 6px; }
.pc-figs div { display: flex; flex-direction: column-reverse; gap: 2px; }
.pc-figs dd { margin: 0; font-family: 'Fraunces', Georgia, serif; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pc-figs dt { font-size: 11px; color: var(--muted); }
.pc-gap { margin: 4px 0 0; font-weight: 600; color: var(--seal-text, var(--seal)); }
.pc-gap.ahead { color: var(--jade-ink); }

.rk { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rk li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 6px 0; box-shadow: inset 0 -1px 0 var(--hair); }
.rk li:last-child { box-shadow: none; }
.rk li.on span { color: var(--seal-text, var(--seal)); font-weight: 600; }
.rk li span small { display: block; font-size: 11px; color: var(--muted); }
.rk b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.rk b small { font-size: .7em; color: var(--muted); }
#lg-ranks { width: min(94vw, 520px); }
#lg-ranks .sheet-in { gap: 10px; }
#lg-ranks .rk-card {
  padding: 2px 14px; border-radius: var(--r-card); background: var(--card);
  box-shadow: 0 0 0 1px var(--hair);
}
#lg-ranks .rk-price li {
  display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center;
  gap: 12px; padding: 10px 0;
}
#lg-ranks .rk-mark {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px;
  font-family: var(--serif-hz); font-size: 17px; color: var(--seal-text, var(--seal));
  background: color-mix(in srgb, var(--seal) 11%, transparent);
}
#lg-ranks .rk-w { font-size: 15px; font-weight: 500; min-width: 0; }
#lg-ranks .rk-w small { margin-top: 1px; font-size: 12.5px; font-weight: 400; color: var(--muted); }
#lg-ranks .rk-xp {
  display: inline-flex; align-items: baseline; gap: 3px; padding: 3px 10px;
  border-radius: var(--r-pill); background: color-mix(in srgb, var(--t2) 15%, transparent);
  font-family: 'Fraunces', Georgia, serif; font-size: 17px; font-weight: 600; color: var(--t2-ink);
}
#lg-ranks .rk-xp small { font-family: 'Inter', system-ui, sans-serif; font-size: 10.5px; font-weight: 600; color: inherit; }
#lg-ranks .rk-review { grid-template-columns: 32px minmax(0, 1fr); }
#lg-ranks .rk-grades { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
#lg-ranks .rk-g {
  display: grid; justify-items: center; gap: 1px; padding: 7px 4px; border-radius: 9px;
  background: color-mix(in srgb, var(--g) 15%, transparent); color: var(--g-ink);
}
#lg-ranks .rk-g i { font-size: 12px; font-style: normal; font-weight: 500; }
#lg-ranks .rk-g b { font-family: 'Fraunces', Georgia, serif; font-size: 18px; font-weight: 600; }
#lg-ranks .rk-g-again { --g: var(--t1); --g-ink: var(--t1-ink); }
#lg-ranks .rk-g-hard { --g: var(--t2); --g-ink: var(--t2-ink); }
#lg-ranks .rk-g-good { --g: var(--jade); --g-ink: var(--jade-ink); }
#lg-ranks .rk-g-easy { --g: var(--t4); --g-ink: var(--t4-ink); }
.lg-when { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.lg-how {
  padding: 0; border: 0; background: none; cursor: pointer; font: inherit; font-weight: 600;
  color: var(--seal-text, var(--seal));
}
.lg-how:hover { text-decoration: underline; text-underline-offset: 3px; }

.lg-head-r { display: flex; align-items: center; gap: 10px; justify-self: end; }
.lg-dragon-open {
  display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0;
  border-radius: 10px; background: var(--card); border: 1px solid var(--hair);
  cursor: pointer; transition: transform .15s;
}
.lg-dragon-open:hover { transform: translateY(-1px); }
.lg-dragon-open:focus-visible { outline: 2px solid var(--seal); outline-offset: 2px; }
.lg-dragon-open img { display: block; width: 26px; height: 26px; object-fit: contain; }
.dg-art { display: flex; justify-content: center; }
.dg-art .dragon { width: min(300px, 100%); height: auto; }
.dg-legend { list-style: none; margin: 0; padding: 0; }
.dg-legend li { display: flex; align-items: center; gap: 12px; padding: 10px 0; box-shadow: inset 0 -1px 0 var(--hair); }
.dg-legend li:last-child { box-shadow: none; }
.dg-sw { display: inline-grid; place-items: center; width: 22px; }
.dg-l { flex: 1; }
.dg-legend b { font-variant-numeric: tabular-nums; font-size: 16px; }
.dg-body { display: block; width: 14px; height: 14px; border-radius: 50%; }
.dg-scale { display: block; width: 11px; height: 11px; border: 1px solid; transform: scale(.8, 1.15) rotate(45deg); }

.wk .sheet-in {
  align-items: center; text-align: center; gap: 14px; padding: 22px 24px 24px;
  background: radial-gradient(120% 60% at 50% 0%, color-mix(in srgb, var(--seal) 16%, transparent), transparent 70%);
}
.wk .wk-range { font-size: 13px; padding: 0 34px; color: var(--fg-2); }
.wk .sheet-in:focus-visible { outline: none; }
.wk .wk-say { margin: 2px 0 0; max-width: 100%; }
.wk .wk-say .mascot { width: 68px; }
.wk .wk-say .speech-b {
  font-family: 'Fraunces', Georgia, serif; font-size: 17px; line-height: 1.35;
  background: var(--card, var(--bg-sunken)); box-shadow: 0 1px 0 var(--hair) inset, 0 8px 24px -14px rgba(0, 0, 0, .5);
}
.wk .wk-say .speech-b::before { border-right-color: var(--card, var(--bg-sunken)); }
.wk-xp {
  margin: 2px 0 0; font-family: 'Fraunces', Georgia, serif; font-size: 34px; font-weight: 600; line-height: 1.1;
  font-variant-numeric: tabular-nums; color: var(--seal-text, var(--seal));
}
.wk-rows { list-style: none; margin: 4px 0 6px; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 6px; }
.wk-row {
  display: grid; grid-template-columns: 22px 30px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 9px 14px; border-radius: var(--r-chip); text-align: left;
  background: var(--card, var(--bg-sunken)); border: 1px solid var(--hair);
}
.wk-row .av { width: 30px; height: 30px; font-size: 13px; }
.wk-row.me {
  background: color-mix(in srgb, var(--seal) 14%, var(--raised));
  border-color: color-mix(in srgb, var(--seal) 55%, transparent);
}
.wk-n { font-family: 'Fraunces', Georgia, serif; font-size: 16px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.wk-row.me .wk-n, .wk-row.me .wk-pts { color: var(--seal-text, var(--seal)); }
.wk-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.wk-row.me .wk-name { font-weight: 600; }
.wk-pts { font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--fg-2); }
.wk { --wk-gold: #745700; --wk-silver: #555B64; --wk-bronze: #8A4A12; }
:root[data-theme="dark"] .wk {
  --wk-gold: color-mix(in srgb, #D4AF37 82%, var(--fg));
  --wk-silver: color-mix(in srgb, #B9BEC7 62%, var(--fg));
  --wk-bronze: color-mix(in srgb, #CD7F32 85%, var(--fg));
}
.wk-row.m1 :is(.wk-n, .wk-pts) { color: var(--wk-gold); }
.wk-row.m2 :is(.wk-n, .wk-pts) { color: var(--wk-silver); }
.wk-row.m3 :is(.wk-n, .wk-pts) { color: var(--wk-bronze); }
.wk-gap { color: var(--muted); font-size: 12px; line-height: 1; }
.wk-go { width: 100%; }
.wk[open] { animation: wk-in .32s cubic-bezier(.2, .8, .2, 1); }
.wk[open]::backdrop { animation: fade-in .32s ease-out; }
@keyframes wk-in { from { opacity: 0; transform: translateY(10px) scale(.96); } }
@media (prefers-reduced-motion: reduce) { .wk[open], .wk[open]::backdrop { animation: none; } }
.lib-find {
  display: flex; align-items: center; gap: var(--s3);
  padding: 10px var(--s4); border-radius: var(--r-chip);
  background: var(--raised);
  box-shadow: inset 0 0 0 1px var(--hair);
}
.lib-draw {
  flex: 0 0 auto; width: 30px; height: 26px; padding: 0; border: 0; border-radius: var(--r-chip);
  background: none; color: var(--fg-2); cursor: pointer;
  font-family: 'Noto Serif SC', serif; font-size: 16px; line-height: 1;
}
.lib-draw:hover, .lib-draw:focus-visible { background: var(--card); color: var(--fg); }
.lib-draw[aria-pressed="true"] { background: var(--seal); color: #FBF6EC; }
.dw-now { display: block; margin-bottom: 8px; color: var(--seal); font-weight: 600; font-size: 17px; }
.dw {
  position: fixed; inset: auto 0 12px 0; z-index: 50; margin: 0 auto;
  width: min(340px, calc(100vw - 24px)); padding: var(--s4); border: 0; border-radius: var(--r-panel);
  background: var(--bg); color: var(--fg);
  box-shadow: var(--lift), 0 24px 60px -30px rgba(0, 0, 0, .6);
}
.dw[open] { animation: tour-in var(--base) var(--ease) both; }
.lib-find.is-took { animation: lib-took calc(var(--slow) * 2) var(--ease); }
@keyframes lib-took {
  0%   { scale: 1; box-shadow: inset 0 0 0 1px var(--hair), 0 0 0 0 transparent; }
  20%  { scale: 1.025; box-shadow: inset 0 0 0 2px var(--seal), 0 0 0 4px color-mix(in srgb, var(--seal) 22%, transparent); }
  100% { scale: 1; box-shadow: inset 0 0 0 1px var(--hair), 0 0 0 0 transparent; }
}
.dw-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.dw-head h2 { margin: 0; font-family: 'Fraunces', Georgia, serif; font-size: 22px; font-weight: 600; }
.dw-pad { position: relative; margin-top: var(--s3); aspect-ratio: 1; border-radius: var(--r-panel); background: #fff; box-shadow: inset 0 0 0 1px var(--hair); }
.dw-pad canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.dw-hint { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 24px; text-align: center; color: rgba(0, 0, 0, .35); pointer-events: none; }
.dw-hint[hidden] { display: none; }
.dw-found { display: flex; gap: 8px; min-height: 42px; margin-top: var(--s3); }
.dw-c { width: 34px; height: 40px; padding: 0; border: 0; border-radius: var(--r-chip); background: var(--raised); color: var(--fg); font-family: 'Noto Serif SC', serif; font-size: 24px; cursor: pointer; }
.dw-c:hover, .dw-c:focus-visible { background: var(--card); box-shadow: inset 0 0 0 1px var(--hair); }
.dw-acts { display: flex; gap: var(--s2); margin-top: var(--s2); }
.lib-find-g { font-family: 'Noto Serif SC', serif; font-size: 16px; color: var(--muted); }
.lib-find input {
  flex: 1 1 auto; min-width: 0;
  border: 0; background: none; color: var(--fg);
  font: inherit; font-size: var(--fs-small);
  -webkit-appearance: none; appearance: none;
}
.lib-find input::-webkit-search-decoration,
.lib-find input::-webkit-search-cancel-button { -webkit-appearance: none; }
.lib-find input::placeholder { color: var(--muted); }
.lib-find input:focus { outline: none; }
.lib-find:focus-within { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fg) 26%, transparent); }
.lib-hits { display: flex; flex-direction: column; gap: var(--s4); }
.lib-hits .sub { margin: 0; }
.lib-hits .sub .fine { margin-left: var(--s3); }
.lib-browse { display: flex; flex-direction: column; gap: var(--s6); }

.lib-rail { display: flex; flex-wrap: wrap; gap: var(--s4) var(--s5); align-items: center; }
.lib-rail .lsegs, .lib-rail .lchips { margin: 0; }
.lib-rail .lchips { flex: 1 1 auto; }
.lcount { margin: 0; white-space: nowrap; }

.levels {
  display: flex; gap: var(--s2); overflow-x: auto;
  scroll-snap-type: x proximity; scrollbar-width: none;
  padding-bottom: 2px;
}
.levels::-webkit-scrollbar { display: none; }
.level {
  display: flex; align-items: baseline; gap: 6px; flex: 0 0 auto;
  scroll-snap-align: start;
  padding: 8px 14px; border-radius: var(--r-chip); text-decoration: none;
  background: var(--raised); color: var(--fg-2);
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.level b { font-weight: 600; color: var(--fg); }
.level span { font-size: var(--fs-fine); color: var(--muted); }
.level:hover { border-color: color-mix(in srgb, var(--fg) 26%, transparent); }
.level.on { background: var(--seal); border-color: var(--seal); }
.level.on b, .level.on span { color: var(--seal-on); }
button.level { border: 0; font: inherit; cursor: pointer; }
.lchips-units { flex-wrap: wrap; overflow-x: visible; margin-top: var(--s3); }

.rack { display: grid; }
.rack-eave {
  display: block; height: 17px;
  color: color-mix(in srgb, var(--fg) 58%, transparent);
}
.rack-eave svg { width: 100%; height: 100%; display: block; }
.levels-rack {
  gap: 0;
  overflow: visible;
  padding: 4px;
  border-radius: 0 0 5px 5px;
  background: color-mix(in srgb, var(--fg) 8%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fg) 10%, transparent);
}
.levels-rack .level {
  flex: 1 1 0;
  justify-content: center;
  border-radius: 3px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fg) 6%, transparent);
}
.levels-rack .level + .level { margin-left: 3px; }
.levels-rack .level.on {
  background: var(--seal);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--seal) 60%, transparent);
}
body[data-phase="night"] .levels-rack .level.on {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--seal) 50%, transparent),
              0 0 14px color-mix(in srgb, var(--seal) 45%, transparent);
}
@media (max-width: 743px) {
  .rack-eave { display: none; }
  .levels-rack {
    gap: var(--s2); padding: 0; background: none; box-shadow: none;
    overflow-x: auto;
  }
  .levels-rack .level {
    flex: 0 0 auto; border-radius: var(--r-chip);
    background: var(--raised); box-shadow: none;
  }
  .levels-rack .level + .level { margin-left: 0; }
  .levels-rack .level.on { background: var(--seal); }
}

.grid { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
.cell {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 9px 6px; border-radius: var(--r-card); text-decoration: none;
  background: var(--raised); color: var(--fg);
  transition: background var(--fast) var(--ease);
}
.cell:hover { background: color-mix(in srgb, var(--fg) 10%, var(--raised)); }
.cell-h { font-family: 'Noto Serif SC', serif; font-size: 25px; line-height: 1.12; }
.cell .py { font-size: 11px; }
.cell-py { display: inline-flex; align-items: baseline; gap: 2px; }
.cell-more { font-size: 11px; font-weight: 600; color: var(--muted); position: relative; top: -3px; }
.cell:is(.ph-ready, .ph-learning, .ph-learned) .cell-more { color: var(--fg-2); }
:root[data-theme="dark"] .cell:is(.ph-ready, .ph-learning, .ph-learned) .cell-more {
  color: color-mix(in srgb, var(--fg-2) 50%, var(--fg));
}
.cell-m {
  font-size: 10px; color: var(--muted); text-align: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}
.cell.seeded { opacity: .55; }

.cell { --ph: var(--muted); }
.cell.r1 { box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--ph) 28%, transparent); }
.cell.r2 { box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--ph) 48%, transparent); }
.cell.r3 { box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--ph) 72%, transparent); }
.cell.r4 { box-shadow: inset 0 -3px 0 var(--ph); }

.lsegs {
  display: flex; gap: var(--s2); overflow-x: auto;
  scroll-snap-type: x proximity; scrollbar-width: none;
  margin-bottom: var(--s4); padding-bottom: 2px;
}
.lsegs::-webkit-scrollbar { display: none; }
.lseg { flex: 0 0 auto; scroll-snap-align: start; }
.lseg {
  display: inline-flex; align-items: center; gap: var(--s2);
  padding: 9px 15px; border-radius: var(--r-chip);
  background: var(--raised); border: 0; color: var(--fg-2);
  font: inherit; font-size: var(--fs-fine); font-weight: 500; cursor: pointer;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.lseg:hover:not(.lseg-off) { color: var(--fg); }
.lseg.on { background: var(--fg); color: var(--bg); }
.lseg.on .lseg-n { color: var(--bg); opacity: .65; }
.lseg.on .lseg-g { color: var(--bg); }
.lseg-g { font-family: 'Noto Serif SC', serif; font-size: 15px; }
.lseg-n { color: var(--muted); font-variant-numeric: tabular-nums; }
.lseg-off { background: none; box-shadow: inset 0 0 0 1px var(--hair); cursor: default; color: var(--muted); }
.lseg-off .lseg-n { font-style: italic; }

.lchips {
  display: flex; gap: var(--s2); overflow-x: auto;
  scroll-snap-type: x proximity; scrollbar-width: none;
  margin: var(--s4) 0 var(--s2); padding-bottom: 2px;
}
.lchips::-webkit-scrollbar { display: none; }
.lchip { flex: 0 0 auto; scroll-snap-align: start; }
.lchip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: var(--r-pill);
  background: var(--raised); border: 0; color: var(--fg-2);
  font: inherit; font-size: var(--t-label); font-weight: 500; cursor: pointer;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.lchip:hover:not(:disabled) { color: var(--fg); background: color-mix(in srgb, var(--fg) 12%, var(--raised)); }
.lchip.on { background: var(--fg); color: var(--bg); }
.lchip.on .lchip-n { color: var(--bg); opacity: .7; }
.lchip.here:not(.on) { color: var(--seal); font-weight: 600; }
.lchip:disabled { opacity: .45; cursor: default; }
.lchip-n { color: var(--muted); font-variant-numeric: tabular-nums; }

.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.d-ready { background: var(--t4); }
.d-learning { background: var(--learning); }
.d-learned { background: var(--jade); }
.d-none { background: var(--muted); opacity: .45; }

.cell { position: relative; }

.wgrid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
@media (max-width: 600px) {
  .wgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
  .wgrid .wbox { padding: 7px 3px 3px; }
  .wbox .cell-h[data-n="3"] { font-size: 19px; }
  .wbox .cell-h[data-n="4"] { font-size: 14px; }
  .wbox .cell-p { font-size: 10px; }
}
.wchunks { display: flex; flex-direction: column; row-gap: 6px; container-type: inline-size; }
.wchunk {
  --rows: 140; --pitch: 130px; --gap: 6px;
  content-visibility: auto;
  contain-intrinsic-size: auto calc(var(--rows) * var(--pitch) - var(--gap));
  overflow-clip-margin: 6px;
}
@container (min-width: 466px) { .wchunk { --rows: 105; } }
@container (min-width: 584px) { .wchunk { --rows: 84; } }
@container (min-width: 702px) { .wchunk { --rows: 70; } }
@container (min-width: 820px) { .wchunk { --rows: 60; } }
@media (max-width: 600px) {
  .wchunks { row-gap: 5px; }
  .wchunk { --pitch: 121px; --gap: 5px; }
  @container (min-width: 0px) { .wchunk { --rows: 105; } }
}
.wbox { min-width: 0; }
.wbox .mks { align-self: stretch; min-width: 0; }
.wbox .cell-h {
  height: 28px; line-height: 28px; max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wbox .cell-h[data-n="3"] { font-size: 21px; }
.wbox .cell-h[data-n="4"] { font-size: 17px; }
.wbox .cell-p {
  font-size: 11px; max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wbox .cell-m {
  white-space: normal; line-height: 1.25; height: 2.5em; padding: 0 1px; box-sizing: border-box;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
}
.wbox .cell-f {
  align-self: stretch; height: 16px; line-height: 16px; font-size: 9px; text-align: left;
  padding-right: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wgrid .cellw > .star { width: 22px; height: 20px; font-size: 12px; right: 1px; bottom: 1px; }
.mk-zi {
  display: inline-block; margin-right: 3px; vertical-align: middle;
  font-family: 'Noto Serif SC', serif; font-size: 9px; line-height: 12px;
  padding: 0 2px; border-radius: 3px; color: var(--seal-text);
  background: color-mix(in srgb, var(--fg) 8%, transparent);
}
.ggrid { display: flex; flex-direction: column; gap: 2px; }
.gcell {
  display: flex; align-items: baseline; gap: var(--s3);
  padding: 10px 13px; border-radius: var(--r-chip);
  text-decoration: none; color: var(--fg);
  transition: background var(--fast) var(--ease);
}
.gcell:hover { background: var(--raised); }
.gcell .dot { align-self: center; }
.gcell-t {
  color: var(--fg-2); font-size: var(--fs-fine); min-width: 0; text-align: left;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.cell.ph-ready { --ph: var(--t4); }
.cell.ph-learning { --ph: var(--learning); }
.cell.ph-learned { --ph: var(--growth-4); }
.cell.ph-ready, .cell.ph-learning, .cell.ph-learned {
  background: color-mix(in srgb, var(--ph) 22%, var(--card));
  outline: 1px solid color-mix(in srgb, var(--ph) 55%, transparent);
  outline-offset: -1px;
}
:is(.cell, .set-a):is(.ph-ready, .ph-learning, .ph-learned) :is(.cell-m, .mk-d, .fine) {
  color: var(--fg-2);
}
:root[data-theme="dark"] :is(.cell, .set-a):is(.ph-ready, .ph-learning, .ph-learned) :is(.cell-m, .mk-d, .fine) {
  color: color-mix(in srgb, var(--fg-2) 50%, var(--fg));
}

.cell.mem-from { --mem: var(--wordchar); }
.cell.mem-out { --mem: var(--rose); }
.cell.mem {
  background: color-mix(in srgb, var(--mem) 14%, var(--card));
  outline: 1.5px dashed var(--mem);
  outline-offset: -1.5px;
}
.cell.mem:hover { background: color-mix(in srgb, var(--mem) 20%, var(--card)); }
.cell.mem :is(.cell-m, .fine) { color: var(--fg-2); }
.lgd-p { font: 400 var(--fs-small)/1.5 'Inter', system-ui, -apple-system, sans-serif; letter-spacing: normal; text-transform: none; }
.lgd-list { display: grid; gap: 10px; }
.lgd-row { display: flex; align-items: center; gap: 12px; }
.lgd-tile {
  flex: none; display: grid; place-items: center; width: 30px; height: 36px; border-radius: 7px;
  font-family: 'Noto Serif SC', serif; font-size: 15px; color: var(--fg);
  background: var(--raised);
}
.lgd-tile.ph-ready { --ph: var(--t4); }
.lgd-tile.ph-learning { --ph: var(--learning); }
.lgd-tile.ph-learned { --ph: var(--growth-4); }
.lgd-tile:is(.ph-ready, .ph-learning, .ph-learned) {
  background: color-mix(in srgb, var(--ph) 22%, var(--card));
  outline: 1px solid color-mix(in srgb, var(--ph) 55%, transparent); outline-offset: -1px;
}
.lgd-tile.mem-from { --mem: var(--wordchar); }
.lgd-tile.mem-out { --mem: var(--rose); }
.lgd-tile.mem {
  background: color-mix(in srgb, var(--mem) 14%, var(--card));
  outline: 1.5px dashed var(--mem); outline-offset: -1.5px;
}
.lgd-words { display: grid; gap: 1px; }
.lgd-words b { font-size: 13.5px; font-weight: 600; color: var(--fg); }
.lgd-words span { font-size: 12.5px; color: var(--fg-2); }
.lib-beyond { display: block; width: 100%; margin-top: var(--s3); }

.char-head {
  display: flex; gap: var(--s6); align-items: center; flex-wrap: wrap;
  padding: var(--s3) 0 var(--s4);
}
.glyph {
  width: clamp(168px, 18vw, 224px); aspect-ratio: 1; flex: 0 0 auto;
  display: grid; place-items: center;
  background: var(--card); border-radius: var(--r-panel);
  box-shadow: var(--panel);
  position: relative; overflow: hidden;
}
.glyph::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(58% 52% at 50% 42%,
    color-mix(in srgb, var(--seal) 9%, transparent), transparent 70%);
}
.glyph-plain { font-family: 'Noto Serif SC', serif; font-size: var(--hz-hero); position: relative; }
.char-id { display: flex; flex-direction: column; gap: var(--s1); min-width: 0; }
.char-id h1 {
  font-family: 'Noto Serif SC', serif; font-size: 24px; line-height: 1.1;
  color: var(--fg-2); font-weight: 500;
}
.char-py { margin: 0; font-size: 26px; }
.char-m {
  margin: var(--s2) 0 0; color: var(--fg); max-width: 46ch;
  font-family: 'Fraunces', Georgia, serif; font-size: 21px; line-height: 1.35;
}
.char-id .fine { margin: var(--s3) 0 0; }
.char-id .fine + .fine {
  margin-top: var(--s1);
}

.star {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; padding: 0; margin-left: var(--s2);
  border-radius: var(--r-pill); background: none; cursor: pointer;
  color: var(--muted); font-size: 20px; line-height: 1;
  vertical-align: middle;
  transition: color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.star:hover { background: var(--raised); color: var(--fg-2); }
.star.on { color: var(--t2-ink); }
.star.on:hover { color: var(--t2-ink); }
.opt-r .star { margin-left: var(--s3); }

.strokes { width: 148px; height: 148px; }
.strokes path {
  fill: var(--fg);
  opacity: 0;
  animation: stroke-in .34s ease-out calc(var(--i) * .16s) both;
}
@keyframes stroke-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .strokes path { animation: none; opacity: 1; }
}
.strokes.is-stepped path { animation: none; opacity: 1; transition: fill .18s ease-out; }
.strokes.is-stepped path.is-ghost { fill: color-mix(in srgb, var(--fg) 12%, transparent); }
.strokes.is-stepped path.is-new { animation: stroke-in .34s ease-out both; }
@media (prefers-reduced-motion: reduce) {
  .strokes.is-stepped path { transition: none; }
  .strokes.is-stepped path.is-new { animation: none; }
}
.strokes-brush .sk { opacity: 1; animation: none; }
.strokes-brush .bm {
  opacity: 1; fill: none; stroke: #fff; stroke-width: 210;
  stroke-linecap: round; stroke-linejoin: round;
  animation: brush-wipe var(--brush, .7s) ease-in-out calc(var(--i) * var(--brush-step, .95s)) both;
}
.strokes-brush .bm-all {
  fill: #fff; animation: stroke-in .2s ease-out calc(var(--i) * var(--brush-step, .95s)) both;
}
@keyframes brush-wipe { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: 0; } }
.strokes.strokes-brush.is-stepped .sk.is-new { animation: none; }
.strokes.strokes-brush.is-stepped :is(.bm, .bm-all) { animation: none; stroke-dashoffset: 0; opacity: 1; }
.strokes.strokes-brush.is-stepped :is(.bm, .bm-all).is-new { animation: brush-wipe var(--brush, .7s) ease-in-out both; }
.strokes.strokes-brush.is-stepped .bm-all.is-new { animation: stroke-in .2s ease-out both; }
@media (prefers-reduced-motion: reduce) {
  .strokes-brush :is(.bm, .bm-all),
  .strokes.strokes-brush.is-stepped :is(.bm, .bm-all).is-new { animation: none; stroke-dashoffset: 0; opacity: 1; }
}

.cast { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cast li {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 13px; border-radius: var(--r-chip);
  background: var(--raised);
}
.cast-f { font-family: 'Noto Serif SC', serif; font-size: 24px; }
.cast-none { color: var(--muted); }
.fshape { display: inline-block; width: 1em; height: 1em; vertical-align: -0.12em; fill: currentColor; }
.fids { display: inline-flex; align-items: center; font-style: normal; font-size: .6em; line-height: 1; gap: .04em; }
.fids-v { flex-direction: column; gap: 0; }
.fids i { font-style: normal; }
.cast-m { color: var(--fg-2); font-size: var(--fs-fine); }

.sec-blocks li { padding: 0; }
.sec-blocks a {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 13px; border-radius: 11px; text-decoration: none; color: inherit;
}
.sec-blocks li:hover { border-color: color-mix(in srgb, var(--fg) 26%, transparent); }
.sec-blocks .cast-m { display: flex; align-items: baseline; gap: 6px; }

.story {
  display: flex; flex-direction: column; gap: 10px;
  padding: 15px 17px; border-radius: var(--r-card);
  background: var(--raised);
  max-width: 68ch;
}
.story p { margin: 0; }
.story .pron { font-style: italic; color: var(--fg-2); }

.hl-meaning, .hl-block, .hl-sound, .cue {
  font-weight: 600; border-radius: 3px; padding: 0 3px;
}
.hl-meaning, .cue { background: color-mix(in srgb, var(--amber) 18%, transparent); }
.hl-block { background: color-mix(in srgb, var(--violet) 18%, transparent); }
.hl-sound { background: color-mix(in srgb, var(--rose) 18%, transparent); }
:root[data-theme="dark"] :is(.hl-meaning, .cue) { background: color-mix(in srgb, var(--amber) 36%, transparent); }
:root[data-theme="dark"] .hl-block { background: color-mix(in srgb, var(--violet) 36%, transparent); }
:root[data-theme="dark"] .hl-sound { background: color-mix(in srgb, var(--rose) 36%, transparent); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) :is(.hl-meaning, .cue) { background: color-mix(in srgb, var(--amber) 36%, transparent); }
  :root:not([data-theme="light"]) .hl-block { background: color-mix(in srgb, var(--violet) 36%, transparent); }
  :root:not([data-theme="light"]) .hl-sound { background: color-mix(in srgb, var(--rose) 36%, transparent); }
}

.hl-arch { font-weight: 600; }
.hl-arch.t1 { color: var(--t1-ink); } .hl-arch.t2 { color: var(--t2-ink); }
.hl-arch.t3 { color: var(--t3-ink); } .hl-arch.t4 { color: var(--t4-ink); }
.hl-arch.t5 { color: var(--t5-ink); }

.words { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.words > li {
  padding: var(--s4) 0;
}
.words > li + li { box-shadow: inset 0 1px 0 var(--hair); }
.w-top { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.w-h { font-family: 'Noto Serif SC', serif; font-size: 20px; }
.w-m { color: var(--fg-2); font-size: var(--fs-fine); }
.ex { list-style: none; margin: 9px 0 0; padding: 9px 0 0; border-top: 1px solid var(--hair); display: flex; flex-direction: column; gap: 8px; }
.ex li { display: flex; flex-direction: column; gap: 1px; }
.ex-h { font-family: 'Noto Serif SC', serif; }
.ex-p { color: var(--fg-2); font-size: var(--fs-fine); }
.ex-e { color: var(--muted); font-size: var(--fs-fine); }

.board { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.board li {
  display: grid; grid-template-columns: 34px auto 1fr auto minmax(48px, 84px) auto;
  gap: 12px; align-items: center;
  padding: 10px 14px; border-radius: var(--r-card);
  background: var(--raised);
}
.board .rank { color: var(--muted); font-size: var(--fs-fine); }
.board .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board li.me { border-color: var(--seal); background: var(--seal-soft); }

.lg-bar { display: block; height: 5px; border-radius: 3px; background: var(--bg-sunken); overflow: hidden; }
.lg-bar span { display: block; height: 100%; background: var(--growth-3); border-radius: 3px; }
.board li.me .lg-bar span { background: var(--seal); }
.board li.podium .rank { font-weight: 600; color: var(--fg); }
.board li.p1 .rank { color: #D4AF37; }
.board li.p2 .rank { color: #B9BEC7; }
.board li.p3 .rank { color: #CD7F32; }
.board li.p1 .lg-bar span { background: #D4AF37; }
.board li.p2 .lg-bar span { background: #B9BEC7; }
.board li.p3 .lg-bar span { background: #CD7F32; }
@media (max-width: 700px) {
  .board li { grid-template-columns: 30px auto 1fr auto auto; }
  .lg-bar { display: none; }
}

.lg-top {
  display: grid; grid-template-columns: minmax(0, 230px) 1fr;
  gap: clamp(14px, 3vw, 30px); align-items: center;
  padding: clamp(14px, 2vw, 22px);
  background: var(--card); border-radius: var(--r-panel);
  box-shadow: var(--panel);
}
.lg-dragon { pointer-events: none; }
.lg-dragon .dragon { display: block; width: 100%; height: auto; }
.lg-standing { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.lg-standing .fine { margin: 0; color: var(--muted); }
.lg-place { display: flex; align-items: baseline; gap: 10px; margin: 0; }
.lg-place-n {
  font-family: 'Fraunces', Georgia, serif; font-size: 44px; font-weight: 600;
  line-height: 1; font-variant-numeric: tabular-nums;
}
.lg-place-k { color: var(--muted); font-size: var(--fs-fine); }
.lg-place.m1 .lg-place-n { color: #D4AF37; }
.lg-place.m2 .lg-place-n { color: #B9BEC7; }
.lg-place.m3 .lg-place-n { color: #CD7F32; }
.lg-figs { display: flex; gap: 26px; flex-wrap: wrap; }
@media (max-width: 760px) {
  .lg-top { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .lg-dragon { max-width: 210px; }
  .lg-standing { align-items: center; }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--ink);
    --bg-sunken: var(--ink-sunken);
    --card: var(--ink-card);
    --fg: var(--ink-fg);
    --fg-2: var(--ink-fg-2);
    --muted: color-mix(in srgb, var(--ink-muted) 92%, var(--ink-fg));
    --hair: var(--ink-hair);
    --raised: var(--ink-raised);
    --edge: inset 0 1px 0 rgba(255, 255, 255, .045);
    --sink: 0 1px 2px rgba(0, 0, 0, .28), 0 22px 48px -28px rgba(0, 0, 0, .75);
    --seal-text: var(--ink-seal-text);
    --shadow: none;
    --growth-0: var(--growth-ink-0);
    --growth-1: var(--growth-ink-1);
    --growth-2: var(--growth-ink-2);
    --growth-3: var(--growth-ink-3);
    --growth-4: var(--growth-ink-4);
    --xp-deep: var(--xp-deep-ink);
    --xp-bright: var(--xp-bright-ink);
    --camp-night-tint: #F4F1E9;
    --camp-night-lift: -22;
    --camp-night-tint: #F4F1E9;
  --camp-night-lift: -22;
  --dchip-face: transparent;
    --dchip-face-on: color-mix(in srgb, currentColor 14%, transparent);
    --dchip-ring: none;
    --dchip-ring-on: none;
    --dchip-glow: drop-shadow(0 0 calc(4 * var(--cu)) currentColor)
                  drop-shadow(0 0 calc(12 * var(--cu)) color-mix(in srgb, currentColor 55%, transparent));
    --dchip-glow-on: drop-shadow(0 0 calc(5 * var(--cu)) currentColor)
                     drop-shadow(0 0 calc(18 * var(--cu)) currentColor);
  }
}
:root[data-theme="dark"] {
  --bg: var(--ink);
  --bg-sunken: var(--ink-sunken);
  --card: var(--ink-card);
  --fg: var(--ink-fg);
  --fg-2: var(--ink-fg-2);
  --muted: color-mix(in srgb, var(--ink-muted) 92%, var(--ink-fg));
  --hair: var(--ink-hair);
  --raised: var(--ink-raised);
  --edge: inset 0 1px 0 rgba(255, 255, 255, .045);
  --sink: 0 1px 2px rgba(0, 0, 0, .28), 0 22px 48px -28px rgba(0, 0, 0, .75);
  --seal-text: var(--ink-seal-text);
  --shadow: none;
  --growth-0: var(--growth-ink-0);
  --growth-1: var(--growth-ink-1);
  --growth-2: var(--growth-ink-2);
  --growth-3: var(--growth-ink-3);
  --growth-4: var(--growth-ink-4);
  --xp-deep: var(--xp-deep-ink);
  --xp-bright: var(--xp-bright-ink);
  --dchip-face: transparent;
  --dchip-face-on: color-mix(in srgb, currentColor 14%, transparent);
  --dchip-ring: none;
  --dchip-ring-on: none;
  --dchip-glow: brightness(1.15)
                drop-shadow(0 0 calc(3 * var(--cu)) currentColor)
                drop-shadow(0 0 calc(10 * var(--cu)) color-mix(in srgb, currentColor 75%, transparent))
                drop-shadow(0 0 calc(22 * var(--cu)) color-mix(in srgb, currentColor 40%, transparent));
  --dchip-glow-mid: brightness(1.3)
                drop-shadow(0 0 calc(4 * var(--cu)) currentColor)
                drop-shadow(0 0 calc(14 * var(--cu)) currentColor)
                drop-shadow(0 0 calc(28 * var(--cu)) color-mix(in srgb, currentColor 55%, transparent));
  --dchip-glow-on: brightness(1.45)
                drop-shadow(0 0 calc(5 * var(--cu)) currentColor)
                drop-shadow(0 0 calc(18 * var(--cu)) currentColor)
                drop-shadow(0 0 calc(34 * var(--cu)) currentColor);
}

body:is([data-phase="dusk"], [data-phase="night"]) .camp {
  --dchip-face: transparent;
  --dchip-face-on: color-mix(in srgb, currentColor 14%, transparent);
  --dchip-ring: none;
  --dchip-ring-on: none;
  --dchip-glow: brightness(1.15)
                drop-shadow(0 0 calc(3 * var(--cu)) currentColor)
                drop-shadow(0 0 calc(10 * var(--cu)) color-mix(in srgb, currentColor 75%, transparent))
                drop-shadow(0 0 calc(22 * var(--cu)) color-mix(in srgb, currentColor 40%, transparent));
  --dchip-glow-mid: brightness(1.3)
                drop-shadow(0 0 calc(4 * var(--cu)) currentColor)
                drop-shadow(0 0 calc(14 * var(--cu)) currentColor)
                drop-shadow(0 0 calc(28 * var(--cu)) color-mix(in srgb, currentColor 55%, transparent));
  --dchip-glow-on: brightness(1.45)
                drop-shadow(0 0 calc(5 * var(--cu)) currentColor)
                drop-shadow(0 0 calc(18 * var(--cu)) currentColor)
                drop-shadow(0 0 calc(34 * var(--cu)) currentColor);
}
.dchip-lit { display: none; }
.camp .dchip-lit {
  display: block;
  position: absolute; inset: 0;
  opacity: 0;
  pointer-events: none;
}
.camp .dchip-lit-g {
  display: grid; place-items: center;
  width: 100%; height: 100%;
  border-radius: var(--r-chip);
  font-family: 'Noto Serif SC', serif; font-size: calc(23 * var(--cu)); line-height: 1;
  background-color: var(--dchip-face);
  box-shadow: var(--dchip-ring);
  filter: var(--dchip-glow-mid);
}
.camp .dchip-lit-g.acc-block { color: var(--fg); }
:root[data-theme="dark"] .camp .dchip-lit,
body:is([data-phase="dusk"], [data-phase="night"]) .camp .dchip-lit {
  animation: dchip-breathe 4.2s ease-in-out infinite;
}
.camp .dchip:nth-child(2) .dchip-lit { animation-delay: -1.4s; }
.camp .dchip:nth-child(3) .dchip-lit { animation-delay: -2.8s; }
.camp .dchip:nth-child(4) .dchip-lit { animation-delay: -0.7s; }
.camp .dchip:nth-child(5) .dchip-lit { animation-delay: -2.1s; }
.camp .dchip:hover .dchip-lit, .camp .dchip:focus-visible .dchip-lit { animation: none; }
@keyframes dchip-breathe {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .camp .dchip-lit { animation: none !important; }
}

body:is([data-phase="dawn"], [data-phase="morning"], [data-phase="day"]) .camp {
  --dchip-glow: drop-shadow(0 0 calc(5 * var(--cu)) color-mix(in srgb, currentColor 42%, transparent));
  --dchip-glow-mid: drop-shadow(0 0 calc(8 * var(--cu)) color-mix(in srgb, currentColor 50%, transparent));
  --dchip-glow-on: drop-shadow(0 0 calc(10 * var(--cu)) color-mix(in srgb, currentColor 58%, transparent));
}
:root[data-theme="dark"] body:is([data-phase="dawn"], [data-phase="morning"], [data-phase="day"]) .camp {
  --dchip-glow: brightness(1.3)
                drop-shadow(0 0 calc(.8 * var(--cu)) currentColor)
                drop-shadow(0 0 calc(2 * var(--cu)) rgba(20, 21, 17, .8))
                drop-shadow(0 0 calc(7 * var(--cu)) rgba(20, 21, 17, .45))
                drop-shadow(0 0 calc(12 * var(--cu)) color-mix(in srgb, currentColor 65%, transparent));
  --dchip-glow-mid: brightness(1.4)
                drop-shadow(0 0 calc(1 * var(--cu)) currentColor)
                drop-shadow(0 0 calc(2 * var(--cu)) rgba(20, 21, 17, .8))
                drop-shadow(0 0 calc(7 * var(--cu)) rgba(20, 21, 17, .45))
                drop-shadow(0 0 calc(17 * var(--cu)) color-mix(in srgb, currentColor 85%, transparent));
  --dchip-glow-on: brightness(1.5)
                drop-shadow(0 0 calc(1 * var(--cu)) currentColor)
                drop-shadow(0 0 calc(2 * var(--cu)) rgba(20, 21, 17, .85))
                drop-shadow(0 0 calc(8 * var(--cu)) rgba(20, 21, 17, .5))
                drop-shadow(0 0 calc(20 * var(--cu)) currentColor);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body:is([data-phase="dawn"], [data-phase="morning"], [data-phase="day"]) .camp {
    --dchip-glow: brightness(1.3)
                  drop-shadow(0 0 calc(.8 * var(--cu)) currentColor)
                  drop-shadow(0 0 calc(2 * var(--cu)) rgba(20, 21, 17, .8))
                  drop-shadow(0 0 calc(7 * var(--cu)) rgba(20, 21, 17, .45))
                  drop-shadow(0 0 calc(12 * var(--cu)) color-mix(in srgb, currentColor 65%, transparent));
    --dchip-glow-mid: brightness(1.4)
                  drop-shadow(0 0 calc(1 * var(--cu)) currentColor)
                  drop-shadow(0 0 calc(2 * var(--cu)) rgba(20, 21, 17, .8))
                  drop-shadow(0 0 calc(7 * var(--cu)) rgba(20, 21, 17, .45))
                  drop-shadow(0 0 calc(17 * var(--cu)) color-mix(in srgb, currentColor 85%, transparent));
    --dchip-glow-on: brightness(1.5)
                  drop-shadow(0 0 calc(1 * var(--cu)) currentColor)
                  drop-shadow(0 0 calc(2 * var(--cu)) rgba(20, 21, 17, .85))
                  drop-shadow(0 0 calc(8 * var(--cu)) rgba(20, 21, 17, .5))
                  drop-shadow(0 0 calc(20 * var(--cu)) currentColor);
  }
}
body:is([data-phase="dawn"], [data-phase="morning"], [data-phase="day"]) .camp .dchip-lit {
  animation: dchip-breathe 4.2s ease-in-out infinite;
}
@media (max-width: 743px) {
  .camp .dchip-lit { display: none; animation: none; }
}

.stepper {
  display: inline-flex; align-items: center; gap: var(--s2);
  background: var(--raised); border-radius: var(--r-pill); padding: 3px;
}
.stepper .ibtn { width: 34px; height: 34px; font-size: 17px; line-height: 1; }
.stepper .ibtn:disabled { opacity: .35; cursor: default; }
.stepper .ibtn:disabled:hover { background: none; }
.step-n {
  min-width: 3.2ch; text-align: center;
  font-family: 'Fraunces', Georgia, serif; font-size: 18px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.step-n.step-text { font-family: inherit; font-size: var(--fs-small); white-space: nowrap; padding: 0 4px; }

.switch { display: flex; gap: 2px; padding: 2px; border-radius: 10px; background: var(--bg-sunken); }
.switch button {
  flex: 1 1 0; border: 0; background: transparent; color: var(--muted);
  font: inherit; font-size: var(--fs-fine); font-weight: 500;
  padding: 6px 4px; border-radius: 8px; cursor: pointer;
}
.switch button:hover { color: var(--fg); }
.switch button[aria-pressed="true"] { background: var(--card); color: var(--fg); box-shadow: var(--shadow); }

.screen-set-wrap,
.profile .pf-snap,
.profile .pf-figures {
  border-top: 0; padding: var(--s5);
  border-radius: var(--r-panel);
  background: var(--card);
  box-shadow: var(--sink), 0 0 0 1px color-mix(in srgb, var(--fg) 7%, transparent);
}
.screen-set-wrap { display: flex; flex-direction: column; gap: 12px; }
.screen-set-wrap > .sub { margin: 0; }
.profile { gap: var(--s4); }
.screen-set { display: flex; flex-direction: column; gap: 10px; max-width: 320px; }
.set-note { margin: -2px 0 0; color: var(--muted); }

.set-link {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--card); border: 1px solid var(--hair); border-radius: 12px;
  padding: 11px 15px; text-decoration: none; color: inherit;
}
.set-link:hover { border-color: var(--muted); }
.set-link span:first-child { display: flex; flex-direction: column; gap: 2px; }
.set-link small { color: var(--muted); font-size: var(--fs-fine); }
.set-go { color: var(--seal-text); font-size: 15px; }

.profile .screen-set { max-width: none; gap: 0; }
.profile #screen-set > div,
.profile #screen-set > .set-group,
.profile #screen-pw > .set-group,
.profile .screen-set > .set-link,
.profile .cls-row,
.profile .login-row {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  min-height: 52px; padding: 8px 0; margin: 0;
  border: 0; border-top: 1px solid var(--hair); border-radius: 0; background: none;
}
.profile .screen-set > :first-child,
.profile #screen-set > :first-child,
.profile .login-list > :first-child { border-top: 0; }
.profile #screen-set label,
.profile #screen-set .set-label,
.profile #screen-pw .set-label {
  display: inline-flex; align-items: center; margin: 0;
  font-size: var(--fs-small); font-weight: 500; color: var(--fg);
}
.profile #screen-set .switch { flex: 0 1 auto; flex-wrap: wrap; justify-content: flex-end; min-width: 188px; max-width: 100%; padding: 3px; }
.profile #screen-set .switch button { flex: 1 1 auto; min-height: 30px; padding: 5px 12px; }
.profile #screen-set .stepper { flex: none; min-width: 188px; justify-content: space-between; }
.profile #screen-set .stepper .ibtn { width: 30px; height: 30px; }
.profile #screen-set > .pw-form,
.profile #screen-pw > .pw-form { align-items: flex-start; padding-top: 12px; }
.profile #screen-set .pw-form .set-label,
.profile #screen-pw .pw-form .set-label { padding-top: 9px; }
.profile #screen-set > .set-head {
  margin: 22px 0 4px; font-size: 11px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
}
.profile #screen-set > .set-head:first-child { margin-top: 0; }
.profile #screen-set > .set-head + * { border-top: 0; }
.profile #screen-set > .set-path { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 0; }
.set-path-on {
  display: flex; align-items: center; gap: 13px; padding: 14px; border-radius: 16px;
  background: var(--raised); box-shadow: inset 0 0 0 1.5px var(--acc);
}
.set-path-on .set-path-glyph { width: 46px; height: 46px; border-radius: 12px; font-size: 24px; background: var(--acc); color: #fff; }
.set-path-name { display: flex; flex-direction: column; gap: 3px; flex: 1 1 auto; min-width: 0; }
.set-path-name b { font-size: 18px; font-weight: 600; color: var(--fg); }
.set-path-name small { font-size: var(--fs-small); color: var(--fg-2); }
.set-path-tick { color: var(--acc); font-size: 17px; font-weight: 700; }
.set-path-glyph {
  display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 7px;
  font-family: var(--serif-hz); font-size: 14px;
  background: color-mix(in srgb, var(--acc) 14%, var(--card)); color: var(--acc);
}
.set-path-card {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; font: inherit; text-align: left; cursor: pointer;
  background: var(--card); color: inherit; border: 1px solid var(--hair); border-radius: 16px;
}
.set-path-card .set-path-name b { font-size: 14px; }
.set-path-others > summary { list-style: none; }
.set-path-others > summary::-webkit-details-marker { display: none; }
.set-path-others[open] > summary { margin-bottom: 8px; }
.set-path-others[open] .set-path-go { transform: rotate(180deg); }
.set-path-tiles { display: inline-flex; flex-direction: column; gap: 2px; flex: none; }
.set-path-tiles .set-path-glyph { width: 20px; height: 20px; border-radius: 5px; font-size: 11px; }
.set-path-go { flex: none; color: var(--fg-2); }
.set-fact { display: flex; justify-content: space-between; gap: 8px; margin: 0; font-size: var(--fs-small); color: var(--fg-2); }
.set-fact b { color: var(--fg); font-weight: 600; }
.set-fact-ask { margin: 8px 0 0; font-weight: 600; }
.set-path-list { display: flex; flex-direction: column; gap: 2px; }
.set-path-list button {
  display: flex; align-items: center; gap: 10px; padding: 3px 0; border: 0; background: none;
  font: inherit; font-size: var(--fs-small); color: var(--fg-2); text-align: left; cursor: pointer;
}
.set-path-list button:hover { color: var(--fg); }
.profile #screen-pw:empty { display: none; }
.pw-fields { display: flex; flex-direction: column; gap: 8px; width: min(300px, 100%); }
.pw-fields input { margin: 0; }
.pw-fields .btn { align-self: flex-end; }
.pw-fields .set-note { margin: 0; }
.pw-fields .pw-forgot { align-self: flex-end; font-size: var(--t-label); }
.profile .screen-set > .set-link { padding: 10px 0; }
.profile .screen-set > .set-link:hover b { color: var(--seal-text); }
.profile .cls-list { max-width: none; }
.profile .cls-open { padding: 0; border: 0; background: none; }
.profile .login-list { max-width: none; gap: 0; }
.profile .login-row { min-height: 44px; }
.profile .set-foot { margin: 0; }
.set-path-lesson { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 4px; font-size: var(--fs-small); color: var(--fg); }
.pf-lesson-pill {
  justify-self: start; align-self: flex-start; padding: 6px 11px; border-radius: 999px;
  border: 1px solid var(--hair); background: none; color: var(--fg);
  font: inherit; font-size: 12px; font-weight: 600; line-height: 1.3; cursor: pointer;
}
.set-path-lesson .pf-lesson-pill { align-self: center; }
.pf-lesson-pill:hover { color: var(--fg); border-color: color-mix(in srgb, var(--fg) 24%, transparent); }
.pf-lesson-pill:focus-visible { outline: 2px solid var(--seal); outline-offset: 2px; }
.acct-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; }
.acct-who { display: grid; gap: 4px; min-width: 0; }
.acct-who p { margin: 0; }
.profile .acct-danger { margin: 0; padding-top: 12px; border-top: 1px solid var(--hair); }

.sub .fine {
  font-weight: 400; margin-left: 7px;
  text-transform: none; letter-spacing: 0; font-size: var(--t-label);
}
.points {
  display: flex; flex-wrap: wrap;
  gap: var(--s4) var(--s3);
  padding-bottom: var(--s2);
}
.point {
  flex: 0 1 172px;
  position: relative;
  min-height: 136px;
  padding: calc(var(--s6) + var(--s1)) var(--s3) var(--s5);
  display: flex; flex-direction: column; justify-content: flex-start;
  border-radius: 86px 86px 5px 5px;
  background: var(--raised);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fg) 7%, transparent),
              0 2px 5px -3px rgba(26, 24, 19, .3);
  transition: flex-basis var(--base) var(--ease), border-radius var(--base) var(--ease);
}
.point::after {
  content: '';
  position: absolute; left: 50%; bottom: calc(-1 * var(--s2));
  width: 112%; height: var(--s2);
  translate: -50% 0;
  border-radius: 2px;
  background: color-mix(in srgb, var(--fg) 13%, transparent);
}
.point summary {
  display: flex; flex-direction: column; align-items: center; gap: var(--s2);
  text-align: center;
  cursor: pointer; list-style: none;
}
.point summary::-webkit-details-marker { display: none; }
.p-name { font-weight: 500; }
.p-pat {
  font-family: 'SF Mono', Menlo, Consolas, monospace; font-size: var(--fs-fine);
  color: var(--fg-2);
  background: color-mix(in srgb, var(--fg) 6%, transparent);
  box-shadow: inset 0 1px 2px color-mix(in srgb, var(--fg) 12%, transparent);
  padding: 2px 8px; border-radius: 5px;
}
.point[open] {
  flex: 1 1 100%;
  min-height: 0;
  border-radius: 12px;
  padding: var(--s4) var(--s5) var(--s5);
  background: var(--card);
}
.point[open] summary { flex-direction: row; align-items: baseline; gap: var(--s3);
                       text-align: left; flex-wrap: wrap; }
.point[open]::after { width: 46%; }
.p-en { margin: 10px 0 0; color: var(--fg-2); max-width: 66ch; }
.point .ex { margin-top: 10px; }

@media (max-width: 560px) {
  .points { flex-direction: column; gap: 5px; }
  .point, .point[open] {
    flex: 1 1 auto; min-height: 0;
    border-radius: var(--r-card); padding: 11px 15px;
  }
  .point::after { display: none; }
  .point summary { flex-direction: row; align-items: baseline; gap: 11px;
                   text-align: left; flex-wrap: wrap; }
}

.shelf {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column;
  background: var(--card); border-radius: var(--r-panel); overflow: hidden;
  box-shadow: var(--panel);
}
.shelf li + li a { box-shadow: inset 0 1px 0 var(--hair); }
.shelf a {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4);
  padding: var(--s4) var(--s5); text-decoration: none;
  color: var(--fg); flex-wrap: wrap;
  transition: background var(--fast) var(--ease);
}
.shelf a:hover { background: color-mix(in srgb, var(--fg) 5%, transparent); }
.sh-t {
  font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: 18px;
  min-width: 0;
}
.shelf .fine { flex: 0 0 auto; }

.passage {
  font-family: 'Noto Serif SC', serif; font-size: 24px; line-height: 1.3;
  max-width: 34em;
  padding: var(--s6) var(--s6); border-radius: var(--r-panel);
  background: var(--card); box-shadow: var(--panel);
  display: flex; flex-wrap: wrap; align-items: flex-start; row-gap: 6px;
}
.tok, .tok-p {
  font: inherit; color: inherit; background: none; border: 0;
  padding: 0 2px; border-radius: 4px;
  display: inline-flex; flex-direction: column; align-items: center;
}
.tok { cursor: pointer; }
.tok-p { padding: 0; }
.t-py, .t-g {
  font-family: 'Inter', system-ui, sans-serif; font-size: 11px; line-height: 16px;
  height: 16px; visibility: hidden; white-space: nowrap;
}
.t-py { color: var(--fg-2); }
.t-g {
  color: var(--muted); max-width: calc(100% + 14px); min-width: 100%;
  overflow: hidden; text-overflow: ellipsis; text-align: center;
}
.t-h { line-height: 1.35; }
.passage.show-py .t-py, .passage.reveal-all .t-py, .tok.open .t-py,
.passage.reveal-all .t-g, .tok.open .t-g { visibility: visible; }
.s-say {
  align-self: center; margin: 0 4px; padding: 0 5px; min-height: 0;
  font-size: 11px; line-height: 20px; border-radius: 99px; cursor: pointer;
  color: var(--fg-2); background: none; border: 0; opacity: .85;
}
.s-say:hover, .s-say.on { opacity: 1; background: var(--raised); }
.tok:hover { background: var(--bg-sunken); }
.tok.on { background: color-mix(in srgb, var(--amber) 34%, var(--card)); }
.tok.new .t-h { box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--seal) 62%, transparent); }

.gloss {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--seal);
  position: sticky; bottom: 12px;
}
.gloss b { font-family: 'Noto Serif SC', serif; font-size: 21px; }
.g-m { color: var(--fg-2); }
.g-new {
  font-size: var(--fs-fine); color: var(--seal-text);
  background: var(--seal-soft); padding: 2px 8px; border-radius: 20px;
}

.reading details.panel {
  background: var(--card); box-shadow: var(--panel);
  border-radius: var(--r-panel); padding: 0;
}
.reading details.panel summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: center; gap: var(--s3);
  padding: 14px var(--s5);
  transition: color var(--fast) var(--ease);
}
.reading details.panel summary::-webkit-details-marker { display: none; }
.reading details.panel summary::after {
  content: ''; margin-left: auto; width: 8px; height: 8px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform var(--base) var(--ease);
}
.reading details[open].panel summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.reading details.panel summary:hover { color: var(--fg); }
.reading details.panel > :not(summary) { padding: 0 var(--s5) var(--s5); }
.reading details.panel p { margin: 0; max-width: 66ch; color: var(--fg-2); }
.quiz { margin: 12px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 12px; }
.quiz .q { margin: 0 0 5px; font-family: 'Noto Serif SC', serif; color: var(--fg); }
.quiz ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 7px; flex-wrap: wrap; }
.quiz .opt {
  font: inherit; padding: 7px 14px; border-radius: var(--r-chip);
  font-size: var(--fs-fine); color: var(--fg-2);
  background: var(--raised); cursor: pointer;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.quiz .opt:hover:enabled { background: color-mix(in srgb, var(--fg) 10%, var(--raised)); color: var(--fg); }
.quiz .opt:disabled { cursor: default; opacity: 1; }
.quiz .opt.right {
  color: var(--jade-ink); background: color-mix(in srgb, var(--jade) 14%, var(--raised));
  font-weight: 600;
}
.quiz .opt.wrong {
  color: var(--seal-text); background: color-mix(in srgb, var(--seal) 12%, var(--raised));
  text-decoration: line-through;
}

.passage-end {
  display: flex; flex-direction: column; align-items: center;
  gap: var(--s3); margin-top: var(--s5);
}
.read-mark {
  margin: 0; display: inline-flex; align-items: center; gap: 7px;
  font-size: var(--fs-fine); color: var(--fg-2);
  padding: 6px 14px 6px 11px; border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--jade) 14%, var(--card));
}
.read-mark b { color: var(--jade-ink); font-weight: 600; }

@media (max-width: 860px) {
  .passage { font-size: 21px; padding: 16px 17px; }
}

.review { gap: var(--s4); max-width: 620px; margin: 0 auto; width: 100%; }

@media (min-width: 1280px) {
  body.in-session.at-training { --sheet: clamp(1240px, 86vw, 1640px); }
  .review {
    max-width: 100%;
    display: grid; grid-template-columns: minmax(620px, 1.1fr) minmax(0, 1fr);
    grid-template-rows: auto repeat(6, auto) 1fr;
    column-gap: var(--s6); align-items: start;
    row-gap: 0;
  }
  .review > :not(.r-top) { margin-top: var(--s4); }
  .review > * { grid-column: 1; }
  .review > .r-top { grid-column: 1 / -1; }
  .review > .ref {
    grid-column: 2; grid-row: 2 / -1;
    position: sticky; top: var(--s5);
  }
}
.r-top { display: flex; align-items: center; gap: 14px; }
.r-top .fine { margin: 0; white-space: nowrap; }
.r-count { display: flex; flex-direction: column; gap: 1px; }
.r-count .fine { font-variant-numeric: tabular-nums; }
.r-xp {
  margin: 0; white-space: nowrap; font-size: 11px; font-weight: 600;
  color: color-mix(in srgb, var(--growth-4) var(--jade-keep), var(--fg)); font-variant-numeric: tabular-nums;
}
.xp-fly {
  position: fixed; left: 0; top: 0; z-index: 95; pointer-events: none;
  padding: 7px 13px; border-radius: var(--r-pill); white-space: nowrap;
  font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums;
  color: color-mix(in srgb, var(--growth-4) var(--jade-keep), var(--fg));
  background: color-mix(in srgb, var(--growth-4) 16%, var(--card));
  border: 1.5px solid color-mix(in srgb, var(--growth-4) 60%, transparent);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--growth-4) 28%, transparent);
  will-change: transform, opacity;
}
.r-xp.xp-bump { transform-origin: right center; animation: xp-bump var(--slow) var(--ease); }
@keyframes xp-bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.5); }
  100% { transform: scale(1); }
}
.r-top-actions { display: flex; gap: 6px; margin-left: auto; }
.r-home {
  display: inline-grid; place-items: center; flex: none;
  width: 34px; height: 34px; border-radius: var(--r-chip);
  color: var(--fg-2); background: var(--raised); text-decoration: none;
}
.r-home:hover { color: var(--fg); background: color-mix(in srgb, var(--fg) 12%, var(--raised)); }
.r-home svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6;
              stroke-linecap: round; stroke-linejoin: round; }
.r-keys { display: none; }
@media (hover: hover) and (pointer: fine) {
  .r-keys { display: inline-flex; align-items: center; }
  .r-keys .info-b { margin: 0; width: 30px; height: 30px; justify-content: center; color: var(--fg-2); }
  .r-keys .info-b svg { width: 18px; height: 18px; }
}
.r-bar { flex: 1 1 auto; height: 4px; border-radius: 2px; background: var(--hair); overflow: hidden; }
.r-bar span { display: block; height: 100%; background: var(--seal); transition: width .2s ease-out; }

.r-card {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  min-height: 244px; justify-content: center; text-align: center;
  padding: 26px 22px; border-radius: var(--r-panel);
  background: var(--card);
  box-shadow: var(--panel);
}

.r-card::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(60% 52% at 50% 40%,
    color-mix(in srgb, var(--seal) 8%, transparent), transparent 70%);
}
.r-card { position: relative; }
.r-pic {
  --g: 68px;
  position: absolute; top: 10px; right: 6px;
  width: auto; height: auto; max-height: 72px;
  max-width: max(34px, min(112px, calc((100% - var(--n, 1) * var(--g)) / 2 - 18px)));
  border-radius: var(--r-card);
  background: var(--raised);
  rotate: 7deg;
  box-shadow: var(--shadow);
}
@media (max-width: 860px) { .r-pic { --g: 58px; } }
@media (max-width: 520px) {
  .r-pic { max-height: 56px; top: 8px; right: 4px; }
}
@media (prefers-reduced-motion: reduce) { .r-pic { rotate: none; } }
.r-pic.r-old { display: block; width: 52px; height: 52px; padding: 6px; box-sizing: border-box; }
.r-old svg { display: block; width: 100%; height: 100%; }
.r-old path { fill: var(--fg); }
@media (max-width: 520px) { .r-pic.r-old { width: 44px; height: 44px; padding: 5px; } }

.r-ask { margin: 0; color: var(--muted); font-size: var(--fs-fine); }
.r-hanzi { margin: 0; font-family: 'Noto Serif SC', serif; font-size: clamp(68px, 4.9vw, 100px); line-height: 1.1; }
.r-hanzi { width: 100%; container-type: inline-size; display: flex; justify-content: center; }
.r-fit { font-size: min(1em, 100cqi / var(--n, 1)); white-space: nowrap; }
.r-card:has(.r-pic) .r-fit { font-size: min(1em, (100cqi - 60px) / var(--n, 1)); }
.r-py { margin: 0; font-size: clamp(21px, 1.46vw, 29px); }
.r-py :is(.play, .share-b) {
  width: 32px; height: 32px; border-radius: var(--r-pill);
  background: var(--raised); border: 1px solid var(--hair);
  vertical-align: middle;
}
.r-py .share-b svg { width: 16px; height: 16px; }
.r-hanzi-g { position: relative; display: inline-block; }
.r-hanzi-link { text-decoration: none; border-radius: 10px; }
.r-hanzi-link:hover { background: var(--raised); }
.r-share-side {
  position: absolute; left: 100%; top: 50%; transform: translateY(-50%);
  margin-left: 14px; font-size: 16px; line-height: 1; display: flex;
}
.r-rec { display: flex; align-items: center; justify-content: center; gap: 8px; }
.r-rec + .r-reveal { margin-top: 10px; }
.r-rec-dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.r-rec.on .r-rec-dot { animation: r-rec-pulse 1.2s ease-in-out infinite; }
@keyframes r-rec-pulse { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .r-rec.on .r-rec-dot { animation: none; } }
.r-rec-why { margin: 0 0 8px; text-align: center; }
.r-take { font-size: var(--fs-fine); vertical-align: middle; }
.r-meaning { margin: 0; color: var(--fg-2); max-width: 36ch; font-size: clamp(15px, 1.1vw, 20px); }
.r-cast { justify-content: center; margin-top: 4px; }
.r-ex { border: 0; padding: 0; margin-top: 4px; text-align: center; }

.r-audio {
  width: 84px; height: 84px; border-radius: 50%;
  border: 1px solid var(--seal); background: var(--seal-soft); color: var(--seal-text);
  font-size: 28px; cursor: pointer;
}
.r-audio:hover { background: var(--seal); color: var(--seal-on); }

.r-reveal { width: 100%; }

.r-grades { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s2); }
.r-grade {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 56px; padding: 10px 6px; border-radius: 13px; cursor: pointer;
  background: color-mix(in srgb, var(--g) 22%, var(--card));
  border: 1.5px solid color-mix(in srgb, var(--g) 55%, transparent);
  color: var(--fg); font: inherit;
  transition: background var(--fast) var(--ease);
}
.r-grade:hover { background: color-mix(in srgb, var(--g) 34%, var(--card)); }
.r-grade.g1 { --g: var(--seal); }
.r-grade.g2 { --g: var(--t2); }
.r-grade.g3 { --g: var(--jade); }
.r-grade.g4 { --g: var(--t4); }
.g-l { font-weight: 600; font-size: var(--t-body); }
.r-grades.two { grid-template-columns: repeat(2, 1fr); }
.g-x { font-size: 22px; font-weight: 700; line-height: 1; color: var(--g); }
.g-i { font-size: var(--t-cap); color: color-mix(in srgb, var(--fg-2) 60%, var(--fg)); font-variant-numeric: tabular-nums; }
.r-grade.on { outline: 2px solid color-mix(in srgb, var(--g) 80%, transparent); outline-offset: 2px; }

.r-grade kbd { display: none; }
@media (min-width: 861px) and (hover: hover) {
  .r-grade kbd {
    display: block; font: inherit; font-size: var(--t-over);
    color: var(--muted); opacity: 0; transition: opacity var(--fast) var(--ease);
  }
  .r-grades:hover .r-grade kbd { opacity: 1; }
}

@media (max-width: 860px) {
  .r-hanzi { font-size: 58px; }
  .r-card { min-height: 200px; }
  .r-grade { padding: 14px 4px; }
}

.decks { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); }
.deck {
  position: relative;
  display: flex; flex-direction: column; gap: 2px;
  padding: 18px 19px 22px; border-radius: var(--r-card); text-decoration: none;
  background: var(--raised);  color: var(--fg);
  box-shadow: var(--shadow);
  transition: border-color .12s ease-out, transform .12s ease-out;
}
.deck:hover { border-color: var(--seal); transform: translateY(-1px); }
.deck-n { font-family: 'Fraunces', Georgia, serif; font-size: 34px; font-weight: 600; line-height: 1.05; }
.deck-k { color: var(--fg-2); font-weight: 500; }
.deck-go { position: absolute; right: 15px; bottom: 14px; color: var(--muted); display: flex; }
.deck-go svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.deck:hover .deck-go { color: var(--seal-text); }

.result { align-items: center; text-align: center; max-width: 760px; margin: 0 auto; width: 100%; gap: 18px; }
.result h1 { font-size: 30px; }
.result .lead { color: var(--fg-2); max-width: 40ch; }
.result-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.result-more { display: contents; }
.result-manage { margin: 0; font-size: 14px; font-weight: 500; }
.result-manage a { color: var(--fg-2); text-decoration: underline; text-underline-offset: 3px; }
.result-manage a:hover { color: var(--fg); }
.result-pair { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; margin: 0 auto; }
.result-pair :is(.btn-primary, .result-again) { min-width: min(100%, 260px); justify-content: center; }
.result-again { box-shadow: inset 0 0 0 1px var(--hair); }
.result-quiet, .result-pair .result-manage a {
  display: inline-block; padding: 8px 14px; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 500; color: var(--fg-2); text-decoration: none;
}
.result-quiet:hover, .result-pair .result-manage a:hover { color: var(--fg); }
.result-quiet:focus-visible { outline: 2px solid var(--seal); outline-offset: 2px; border-radius: 8px; }
.result-link, .result-info { margin: 0; text-align: center; }
.result-link a, .result-link .result-quiet { font-size: 13px; font-weight: 500; color: var(--seal-text, var(--seal)); }
.tone-offer { width: min(100%, 420px); margin: 0 auto; padding: var(--s3) var(--s4);
  border-radius: var(--r-card); background: var(--card); box-shadow: var(--panel); text-align: left; }
.tone-offer .to-head { display: flex; align-items: center; gap: var(--s1); margin: 0; }
.tone-offer .to-head b { font-weight: 600; }
.tone-offer .fine { margin: var(--s1) 0 0; color: var(--muted); }
.to-switch { margin-left: auto; position: relative; width: 44px; height: 26px; flex: none; border: 0;
  border-radius: var(--r-pill); background: var(--bg-sunken); cursor: pointer; transition: background var(--fast) var(--ease); }
.to-switch span { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--card); box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform var(--fast) var(--ease); }
.to-switch[aria-checked="true"] { background: var(--seal); }
.to-switch[aria-checked="true"] span { transform: translateX(18px); }
.to-close { flex: none; width: 28px; height: 28px; border: 0; background: none; color: var(--muted);
  font-size: 18px; line-height: 1; cursor: pointer; }
.to-close:hover { color: var(--fg); }

.glyph-seal {
  display: grid; place-items: center;
  width: 76px; height: 76px; border-radius: 18px;
  background: var(--seal); color: #F4EEE0;
  font-family: 'Noto Serif SC', serif; font-size: 38px;
}

.mascot {
  position: relative; width: clamp(112px, 16vw, 148px); aspect-ratio: 1;
  flex: 0 0 auto; margin: 0 auto;
}
.hero-face { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.hero-blink { opacity: 0; animation: blink 5.2s steps(1, end) infinite; }
@keyframes blink {
  0%, 92% { opacity: 0; }
  93%, 95% { opacity: 1; }
  96%, 97% { opacity: 0; }
  98%, 99% { opacity: 1; }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .hero-blink { animation: none; } }

.figures { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; }
.fig {
  display: flex; flex-direction: column; gap: 2px;
  padding: 13px 8px; border-radius: var(--r-card);
  background: var(--raised);
}
.fig-n { font-family: 'Fraunces', Georgia, serif; font-size: 24px; font-weight: 600; line-height: 1.05; }
.fig-k { color: var(--muted); font-size: 11px; }

@media (max-width: 560px) {
  .figures { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .screen.result.cheer {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: var(--s6); row-gap: var(--s5); align-items: center;
    max-width: min(1320px, 100%); padding-block: var(--s4);
  }
  .result.cheer > * { grid-column: 1; }
  .result.cheer > .week-tally { grid-column: 2; grid-row: 1; align-self: stretch; justify-content: center; }
  .result.cheer > .result-pair { grid-column: 2; grid-row: 2; }
  .result.cheer > .result-info { grid-column: 1 / -1; }
  .result.cheer h1 { font-size: clamp(32px, 2.5vw, 44px); }
  .result.cheer .figures { gap: var(--s3); }
  .result.cheer .fig { padding: var(--s4) var(--s2); }
  .result.cheer .fig-n { font-size: clamp(30px, 2.3vw, 42px); }
  .result.cheer .fig-k { font-size: 14px; }
  .result.cheer .week-tally { padding: var(--s5); }
  .result.cheer .result-pair { flex-direction: row; justify-content: center; gap: var(--s3); }
  .result.cheer .result-pair :is(.btn-primary, .result-again) { min-width: 0; flex: 1; }
  .result.cheer .result-pair { flex-wrap: wrap; }
  .result.cheer .result-pair .result-manage { flex-basis: 100%; text-align: center; }
}

.week-tally {
  width: 100%; display: flex; flex-direction: column; gap: var(--s2);
  padding: var(--s3) var(--s4); border-radius: var(--r-card);
  background: var(--raised);
}
.wt-hero {
  margin: 0; padding-bottom: var(--s2); text-align: center;
  border-bottom: 1px solid color-mix(in srgb, var(--t2) 35%, transparent);
}
.wt-paid {
  display: inline-block; font-family: 'Fraunces', Georgia, serif; font-weight: 700;
  font-size: 38px; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap;
  color: var(--xp-deep);
  background: linear-gradient(110deg, var(--xp-deep) 26%, var(--xp-bright) 50%, var(--xp-deep) 74%) 50% 0 / 250% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: xp-shine 1.6s cubic-bezier(.45, 0, .55, 1) infinite alternate;
  transition: opacity var(--base) var(--ease), transform .45s cubic-bezier(.3, 1.5, .5, 1);
}
.wt-paid.pre { opacity: 0; transform: scale(.5); }
.wt-paid.xp-land {
  animation: xp-land .66s cubic-bezier(.3, 1.45, .5, 1), xp-shine 1.6s cubic-bezier(.45, 0, .55, 1) infinite alternate;
}
@keyframes xp-land { 24% { transform: scale(1.24); } }
@keyframes xp-shine { from { background-position: 100% 0; } to { background-position: 0% 0; } }
.xp-ring, .xp-ray { position: fixed; left: 0; top: 0; z-index: 96; pointer-events: none; }
.xp-ring { border: 2px solid color-mix(in srgb, var(--t2) 60%, transparent); border-radius: 999px; }
.xp-ray { width: 3px; height: 12px; margin: -6px 0 0 -1.5px; border-radius: 2px; background: var(--t2); }
.xp-ray.short { height: 7px; margin-top: -3.5px; background: #E0B94A; }
.wt-line { display: flex; align-items: baseline; gap: var(--s3); }
.wt-k { color: var(--fg-2); font-size: 13px; }
.wt-n, .wt-place { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.wt-n { font-size: 15px; }
.wt-league {
  padding-top: var(--s2); border-top: 1px solid var(--hair);
  animation: wt-in var(--base) var(--ease);
}
@keyframes wt-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.wt-place { display: inline-flex; align-items: baseline; gap: 6px; }
.wt-from { font-size: 15px; transition: color var(--base) var(--ease), font-size var(--base) var(--ease); }
.wt-arrow, .wt-to {
  color: color-mix(in srgb, var(--growth-4) var(--jade-keep), var(--fg));
  opacity: 0; transform: translateY(10px) scale(.4);
  transition: opacity var(--base) var(--ease), transform var(--slow) cubic-bezier(.34, 1.56, .64, 1);
}
.wt-to { font-size: 17px; font-weight: 700; }
.wt-league.risen .wt-from { color: var(--muted); font-size: 13px; text-decoration: line-through; }
.wt-league.risen .wt-arrow, .wt-league.risen .wt-to { opacity: 1; transform: none; }

.result.cheer { max-width: 560px; gap: 14px; }
.result.cheer .result-actions { align-items: center; }
.result-hero { display: flex; align-items: center; justify-content: center; gap: var(--s4); }
.result-ring {
  display: grid; place-items: center; flex: none; width: 104px; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--t2) 34%, transparent),
              color-mix(in srgb, var(--seal) 12%, transparent) 72%, transparent);
}
.result-ring .mascot { width: 86px; }
.result.cheer h1 { font-size: clamp(28px, 3vw, 36px); text-align: left; }
.fig.k-cards { --fc: var(--t4); --fi: var(--t4-ink); }
.fig.k-kept { --fc: var(--t3); --fi: var(--t3-ink); }
.fig.k-again { --fc: var(--t1); --fi: var(--t1-ink); }
.fig.k-xp { --fc: var(--t2); --fi: var(--t2-ink); }
.result.cheer .fig {
  background: color-mix(in srgb, var(--fc, var(--fg)) 14%, var(--card));
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--fc, var(--fg)) 42%, transparent);
  animation: fig-pop .5s cubic-bezier(.3, 1.45, .5, 1) backwards;
  animation-delay: calc(120ms + var(--i, 0) * 90ms);
}
.result.cheer .fig-n { color: var(--fi, var(--fg)); font-variant-numeric: tabular-nums; }
@keyframes fig-pop { from { opacity: 0; transform: translateY(8px) scale(.7); } }
.result.cheer .week-tally {
  background: linear-gradient(115deg, color-mix(in srgb, var(--t2) 13%, var(--raised)), var(--raised) 65%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t2) 30%, transparent);
}

.wt-slice {
  list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px;
  --row: 34px;
}
.wt-row {
  position: relative; display: grid; grid-template-columns: 2.4ch 24px minmax(0, 1fr) auto;
  align-items: center; gap: 10px; height: var(--row); padding: 0 10px; border-radius: 10px;
  background: var(--card); text-align: left; font-size: 13px;
  transform: translateY(calc(var(--shift, 0) * (var(--row) + 4px)));
  transition: transform .75s cubic-bezier(.3, 1.2, .45, 1);
}
.wt-row .av { width: 24px; height: 24px; font-size: 11px; }
.wt-rank { font-weight: 700; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.wt-who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wt-xp { font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wt-row.me {
  z-index: 1; font-weight: 600;
  background: color-mix(in srgb, var(--seal) 16%, var(--card));
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--seal) 55%, transparent);
}
.wt-row.me .wt-rank { color: var(--seal-text); }
.wt-slice.moved .wt-row { transform: none; }
.wt-slice.moved .wt-row.me {
  animation: climb-glow 1.2s ease-out .55s 1 backwards;
}
@keyframes climb-glow {
  0% { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--seal) 55%, transparent), 0 0 0 0 color-mix(in srgb, var(--t2) 60%, transparent); }
  40% { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--seal) 55%, transparent), 0 0 0 8px color-mix(in srgb, var(--t2) 0%, transparent); }
}
.wt-slice.moved .wt-row.passed .wt-rank { color: var(--muted); }

.wt-news {
  margin: 0; padding-top: var(--s2); border-top: 1px solid var(--hair);
  font-size: 14px; font-weight: 600; text-align: center;
  animation: wt-news-in .55s cubic-bezier(.3, 1.45, .5, 1) backwards;
}
.wt-news.in { animation: none; }
.wt-up { color: color-mix(in srgb, var(--growth-4) var(--jade-keep), var(--fg)); font-weight: 700; }
@keyframes wt-news-in { from { opacity: 0; transform: translateY(8px) scale(.9); } }
@media (prefers-reduced-motion: reduce) {
  .result.cheer .fig, .wt-slice.moved .wt-row.me { animation: none; }
  .wt-paid, .wt-paid.xp-land { animation: none; background-position: 50% 0; }
  .wt-row { transition: none; }
  .wt-news { animation: wt-news-fade .2s ease-out backwards; }
}
@keyframes wt-news-fade { from { opacity: 0; } }

.ref { border-top: 1px solid var(--hair); padding-top: 12px; }
.ref-strip { display: flex; gap: 4px; flex-wrap: wrap; }
.ref-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: 9px; cursor: pointer;
  border: 1px solid transparent; background: transparent; color: var(--muted);
  font: inherit; font-size: var(--fs-fine); font-weight: 500;
}
.ref-chip:hover { color: var(--fg); }
.ref-chip.on { background: var(--card); border-color: var(--hair); color: var(--fg); }
.review .ref-chip { color: var(--fg-2); }
.review .ref-chip:hover { color: var(--fg); background: var(--raised); }
.review .ref-chip.on { background: var(--raised); border-color: var(--hair); color: var(--fg); font-weight: 600; }
.review .sec-head { color: var(--fg-2); }
.ref-g { font-family: 'Noto Serif SC', serif; font-size: 14px; }

.ref-icons { flex-wrap: nowrap; gap: 6px; }
.ref-chip.ref-ic {
  position: relative; flex: 0 1 54px; min-width: 0; height: 34px; padding: 0;
  justify-content: center; border-radius: 12px;
  border-color: var(--hair); background: var(--raised); color: var(--fg-2);
}
.ref-chip.ref-ic:hover { color: var(--fg); }
.ref-chip.ref-ic.on,
.review .ref-chip.ref-ic.on {
  border-color: var(--seal); color: var(--seal-text);
  background: color-mix(in srgb, var(--seal) 14%, transparent);
}
.ref-i { width: 18px; height: 18px; fill: currentColor; flex: none; }

.ref-body { padding: 12px 2px 0; text-align: left; min-height: 68px; font-size: clamp(14.5px, 1.04vw, 19px); }
.sec-empty { margin: 0; }
.sec-head {
  margin: 0 0 8px; font-size: 11px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
}
.r-tale {
  padding: 12px 14px 14px; border-radius: var(--r-card); text-align: left;
  border: 1px solid color-mix(in srgb, var(--seal) 28%, transparent);
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--seal) 8%, transparent), transparent 60%),
    var(--card);
}
.r-tale + .r-tale { margin-top: 10px; }
.ref-body .r-tale { margin-bottom: 22px; }
.r-tale-h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; color: var(--seal-text); }
.r-tale-chop { width: 20px; height: 20px; border-radius: 5px; font-size: 7.5px; transform: rotate(-4deg); }
.r-tale-page { margin: var(--s3) 0 12px; max-width: 72ch; }
.r-tale-page.bt-story-first { margin-top: 0; }
.r-tale-page .fine { margin: 0; }
.r-tale-page .story { padding: 0; background: none; }
.sec-usage { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-width: 64ch; }
.sec-usage li { position: relative; padding-left: 16px; color: var(--fg); line-height: 1.5; }
.sec-usage li::before { content: '\2022'; position: absolute; left: 2px; color: var(--muted); }
.un-claim { font-weight: 650; }
.un-tail { color: var(--fg-2); }
.sec-parts { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.sec-parts a, .sec-parts span:not(.sp-f):not(.sp-m) {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 8px; border-radius: var(--r-chip);
  background: var(--raised); color: var(--fg); text-decoration: none;
}
.sec-parts a:hover { background: color-mix(in srgb, var(--fg) 12%, var(--raised)); }
.sp-f { font-family: 'Noto Serif SC', serif; font-size: 20px; line-height: 1; }
.sp-m { font-size: var(--fs-small); color: var(--fg-2); }
.sec-usage li.sec-fold, .sec-words li.sec-fold { display: block; padding: 0; }
.sec-usage li.sec-fold::before { content: none; }
.sec-more > ul { margin-top: 8px; }
.sec-more > summary {
  list-style: none; cursor: pointer; margin-top: 2px;
  font-size: var(--fs-fine); font-weight: 600; color: var(--seal-text, var(--seal));
}
.sec-more > summary::-webkit-details-marker { display: none; }
.sec-more[open] > summary { display: none; }
.ref-body .story { border: 0; padding: 0; background: none; }
.sec-tree { position: relative; container-type: inline-size; }
@container (min-width: 320px) {
  .sec-tree > .sec-head {
    position: absolute; top: 2px; left: 0; z-index: 1; margin: 0;
    max-width: calc(50% - 39px - 8px); line-height: 1.35;
  }
}
.ref-body .strokes { width: 132px; height: 132px; }
.ref-body { container: refbody / inline-size; }
@container refbody (min-width: 400px) {
  .ref-body .bt-compact:not(.bt-small) .bt-root { width: clamp(116px, 19cqi, 150px); height: clamp(116px, 19cqi, 150px); }
  .ref-body .bt-compact:not(.bt-small) .bt-root svg { width: clamp(96px, 15.5cqi, 124px); height: clamp(96px, 15.5cqi, 124px); }
  .ref-body .bt-compact:not(.bt-small) .bt-root .bt-font { font-size: clamp(64px, 10cqi, 84px); }
  .ref-body .bt-compact:not(.bt-small) .bt-t { width: clamp(60px, 9.5cqi, 78px); height: clamp(60px, 9.5cqi, 78px); }
  .ref-body .bt-compact:not(.bt-small) .bt-t svg { width: clamp(48px, 7.5cqi, 62px); height: clamp(48px, 7.5cqi, 62px); }
  .ref-body .bt-compact:not(.bt-small) .bt-font { font-size: clamp(34px, 5.4cqi, 44px); }
  .ref-body .bt-compact:not(.bt-small) .bt-n.piece ~ ul .bt-t { width: clamp(50px, 8cqi, 64px); height: clamp(50px, 8cqi, 64px); }
  .ref-body .bt-compact:not(.bt-small) .bt-n.piece ~ ul .bt-t svg { width: clamp(40px, 6.3cqi, 50px); height: clamp(40px, 6.3cqi, 50px); }
  .ref-body .bt-compact:not(.bt-small) .bt-n.piece ~ ul .bt-font { font-size: clamp(28px, 4.4cqi, 36px); }
  .ref-body .bt-compact:not(.bt-small) .bt-n { min-width: clamp(72px, 12cqi, 96px); gap: 6px; }
  .ref-body .bt-compact:not(.bt-small) .bt-l { max-width: clamp(84px, 14cqi, 112px); font-size: clamp(13.5px, 2.2cqi, 17px); }
  .ref-body .bt-compact:not(.bt-small) .bt-l-long { font-size: clamp(12.5px, 2cqi, 15.5px); }
  .ref-body .bt-compact:not(.bt-small) .bt-py { font-size: clamp(13px, 2.1cqi, 16px); }
  .ref-body .bt-compact:not(.bt-small) .bt-role { font-size: clamp(12px, 1.8cqi, 14px); }
  .ref-body .bt-compact:not(.bt-small) .bt-tree li { padding-left: 8px; padding-right: 8px; }
  .ref-body .bt-compact:not(.bt-small) { --bt-gap: 20px; }
  .ref-body .sec-tree > .sec-head { max-width: calc(50% - clamp(58px, 9.5cqi, 75px) - 10px); }
}

.sec-words { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.sec-words li { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.sec-ex { border: 0; padding: 0; margin: 0; }

.review .ref { width: 100%; }

@media (min-width: 744px) {
  body.at-training.in-session:not(.in-court):not(.in-intro) #view {
    background: color-mix(in srgb, var(--card) 97%, transparent);
    backdrop-filter: none;
    box-shadow: var(--panel);
  }
}

@media (min-width: 744px) and (max-height: 760px) {
  body.in-session:not(.in-court):not(.in-intro) #view {
    margin-bottom: 12px;
    max-height: calc(100dvh - 58px - env(safe-area-inset-top) - 24px);
    padding-top: clamp(14px, 3vh, 24px); padding-bottom: clamp(14px, 3vh, 24px);
  }
  .review > .r-card { padding-top: 16px; padding-bottom: 16px; }
}
@media (min-width: 744px) and (max-width: 1279px) and (max-height: 760px) {
  .review { gap: var(--s3); }
}
@media (min-width: 1280px) and (max-height: 760px) {
  .review > :not(.r-top) { margin-top: var(--s3); }
}

@media (min-width: 1280px) {
  body.in-session:not(.teach-mode):not(.in-court):not(.in-intro) #view:has(> .screen.review) { height: 100dvh; }
  body.in-session:not(.teach-mode) #view > .screen.review {
    height: 100%;
    grid-template-rows: auto 1fr repeat(6, auto);
  }
  body.in-session:not(.teach-mode) #view > .screen.review > .r-card { align-self: stretch; }
  body.in-session:not(.teach-mode) .review > .r-card:not(.r-write) {
    --rv-g: clamp(68px, min(8vw, 100dvh - 540px), 180px);
  }
  body.in-session:not(.teach-mode) .review > .r-card:not(.r-write) .r-hanzi { font-size: var(--rv-g); }
  body.in-session:not(.teach-mode) .review > .r-card:not(.r-write) .r-pic { --g: var(--rv-g); }
}

.today-stats { display: flex; flex-direction: column; gap: 10px; }
.stats {
  display: flex; flex-wrap: wrap;
  border-top: 1px solid var(--hair);
  padding-top: 13px;
}
.stat {
  display: flex; flex-direction: column; gap: 1px;
  padding-right: 26px; margin-right: 26px;
  border-right: 1px solid var(--hair);
}
.stat:last-child { border-right: 0; margin-right: 0; padding-right: 0; }

.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
  gap: 16px 12px;
}
.stats-grid .stat { padding-right: 0; margin-right: 0; border-right: 0; }
.stat-n { font-family: 'Fraunces', Georgia, serif; font-size: 21px; font-weight: 600; line-height: 1.1; }
.stat-k { color: var(--muted); font-size: var(--fs-fine); }
body.at-stats .stats-grid .stat-n { font-size: 30px; line-height: 1; letter-spacing: -.01em;
  font-variant-numeric: lining-nums tabular-nums; }
body.at-stats .stats-grid .stat-k { font-size: 13px; line-height: 1.3; margin-top: 4px; }

.info-b {
  display: inline-flex; align-items: center; vertical-align: middle;
  margin-left: 6px; padding: 0; border: 0; background: none;
  color: var(--muted); cursor: pointer;
}
.info-b svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.info-b svg circle[r=".2"] { fill: currentColor; stroke-width: 1.9; }
.info-b:hover { color: var(--fg); }
.info-p {
  max-width: 44ch; padding: 18px 20px;
   border-radius: var(--r-panel);
  background: var(--card); color: var(--fg);
  box-shadow: 0 12px 40px -18px rgba(0, 0, 0, .45);
  box-shadow: var(--panel);
}
.info-p::backdrop { background: rgba(26, 24, 19, .22); }
.info-p h3 { font-family: 'Fraunces', Georgia, serif; font-size: 16px; font-weight: 600; margin: 0 0 9px; }
.info-p p { margin: 0 0 10px; font-size: 13.5px; line-height: 1.6; color: var(--fg-2); }
.info-p p:last-child { margin-bottom: 0; }
@supports not selector(:popover-open) { .info-p { display: none; } }
.kbd-list {
  display: grid; grid-template-columns: max-content 1fr;
  column-gap: 16px; row-gap: 8px; align-items: center;
}
.kbd-row { display: contents; }
.kbd-keys { display: inline-flex; align-items: center; gap: 4px; justify-self: start; color: var(--muted); font-size: 12px; }
.kbd-what { font-size: 13.5px; line-height: 1.45; color: var(--fg-2); }
.kbd-line { grid-column: 1 / -1; margin: 0 !important; }
.kbd-p kbd {
  display: inline-block; min-width: 24px; padding: 3px 7px; text-align: center;
  font: 600 12px/1.2 -apple-system, 'Segoe UI', system-ui, sans-serif; color: var(--fg);
  background: var(--raised); border-radius: 6px;
  box-shadow: inset 0 0 0 1px var(--hair), 0 1px 0 var(--hair);
}

@media (max-width: 860px) {
  .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 10px; }
  .stat { padding-right: 0; margin-right: 0; border-right: 0; }

  .decks { grid-template-columns: 1fr 1fr; }
  .deck { padding: 15px 15px 20px; }
  .deck-n { font-size: 28px; }
}

#fly {
  position: fixed; inset: 0; z-index: 30;
  pointer-events: none; overflow: hidden;
}
.fly-d {
  position: absolute; top: 0; left: 0;
  width: 96px; opacity: .55;
  will-change: transform;
}
.fly-back { transform-origin: 50% 50%; }
.fly-back .fly-inner { scale: -1 1; }
.fly-inner { position: relative; }
.fly-d .dragon { display: block; width: 100%; height: auto; animation: fly-hover 1.7s ease-in-out infinite; }
@keyframes fly-hover { 0%, 100% { translate: 0 -6px; } 50% { translate: 0 6px; } }

.fly-flame {
  position: absolute; left: 86%; top: 11%;
  width: 42px; height: 30px; color: var(--seal);
  opacity: 0; transform-origin: left center; scale: .5 1;
  transition: opacity .24s ease-in, scale .24s ease-in;
}
.fly-flame.on {
  opacity: 1; scale: 1.2 1;
  transition: opacity .15s ease-out, scale .15s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .boot .chop { animation: none; }
  #fly { display: none; }

  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

.wall-group { margin-top: var(--s6); }
.wall-group .sub { margin: 0 0 var(--s4); }

.wall {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: var(--s3);
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
}
.seal {
  display: flex; flex-direction: column; align-items: flex-start; gap: 5px;
  padding: var(--s4); border-radius: var(--r-panel);
  background: var(--card); box-shadow: var(--panel);
}
.seal-stone {
  font-family: 'Noto Serif SC', serif; font-size: 26px; line-height: 1;
  width: 46px; height: 46px; border-radius: 7px;
  display: grid; place-items: center;
  background: var(--bg-sunken); color: var(--muted);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .12);
  transition: background var(--base) var(--ease), color var(--base) var(--ease);
}
.seal.won .seal-stone {
  background: var(--seal); color: var(--seal-on);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .18);
}
.seal-t { font-size: var(--fs-small); color: var(--fg); font-weight: 600; margin-top: 3px; }
.seal-need, .seal-at, .seal-on { font-size: var(--fs-fine); color: var(--fg-2); }
.seal.won .seal-on { color: var(--jade-ink); }
.seal-meter {
  width: 100%; height: 3px; border-radius: 99px;
  background: var(--bg-sunken); overflow: hidden; margin-top: 3px;
}
.seal-meter i { display: block; height: 100%; background: var(--muted); border-radius: 99px; }

@media (max-width: 860px) {
  .wall { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
}

.head-more { margin: var(--s3) 0 0; display: flex; gap: var(--s2); flex-wrap: wrap; }
.head-more a {
  display: inline-flex; align-items: baseline; gap: 8px;
  padding: 7px 14px; border-radius: var(--r-pill);
  background: var(--raised); color: var(--fg);
  font-size: var(--fs-small); text-decoration: none;
  transition: background var(--fast) var(--ease);
}
.head-more a:hover { background: color-mix(in srgb, var(--fg) 10%, var(--raised)); }

.run-hero, .run-cal, .run-miles-panel {
  background: var(--card); box-shadow: var(--panel);
  border-radius: var(--r-panel); padding: var(--s5);
}

.run-hero { align-items: center; gap: var(--s2); text-align: center; }
.run-mark {
  font-family: 'Noto Serif SC', serif; font-size: 34px; line-height: 1;
  width: 62px; height: 62px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--bg-sunken); color: var(--muted);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .12);
}
.run-mark.lit {
  background: var(--seal); color: var(--seal-on);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .18);
}
.run-n {
  font-family: 'Fraunces', Georgia, serif; font-weight: 600;
  font-size: clamp(52px, 7vw, 64px); line-height: 1; margin-top: var(--s2);
  font-variant-numeric: tabular-nums;
}
.run-figures {
  display: flex; width: 100%; margin-top: var(--s4);
  border-top: 1px solid var(--hair); padding-top: var(--s4);
}
.run-figures > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.run-figures b {
  font-family: 'Fraunces', Georgia, serif; font-size: 22px; font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.rc, .rc-wd { display: grid; grid-template-columns: repeat(7, 1fr); }
.rc-wd {
  gap: 0; margin-top: var(--s3);
  font-size: var(--fs-fine); color: var(--muted); text-align: center;
}
.rc-wd i { font-style: normal; padding-bottom: 6px; }
.rc-nav { display: inline-flex; align-items: center; gap: 2px; }
.rc-step {
  width: 28px; height: 28px; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 18px; line-height: 1; color: var(--fg);
}
.rc-step:disabled { opacity: .3; cursor: default; }
.rc { row-gap: 5px; }
.rc-pad { height: 34px; }
.rc-d {
  height: 34px; display: grid; place-items: center; font-style: normal;
  font-size: var(--fs-fine); color: var(--fg-2);
  font-variant-numeric: tabular-nums;
}
.rc-d b { font-weight: 500; }
.rc-on {
  background: color-mix(in srgb, var(--seal) 20%, var(--card));
  color: var(--seal-text); border-radius: var(--r-pill);
}
.rc-on.rc-l { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.rc-on.rc-r { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.rc-today b {
  font-weight: 700; text-decoration: underline; text-underline-offset: 3px;
}

.run-miles {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s3);
}
.run-miles li { display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; }
.run-miles b { font-size: var(--fs-fine); color: var(--muted); font-variant-numeric: tabular-nums; }
.run-miles .won b { color: var(--fg); }
.run-miles .won .seal-stone { background: var(--seal); color: var(--seal-on); box-shadow: 0 1px 2px rgba(0, 0, 0, .18); }

@media (max-width: 560px) {
  .run-miles { grid-template-columns: repeat(2, 1fr); }
}

.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); }
.panel-head .sub { margin: 0; }

.sk-block { display: flex; flex-direction: column; gap: var(--s3); }
.sk { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s3); }
.sk li { display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: var(--s4); }
.sk-k { font-size: var(--fs-small); color: var(--fg-2); }
.sk-track {
  position: relative; height: 8px; border-radius: 99px;
  background: var(--bg-sunken); overflow: hidden;
}
.sk-track i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; display: block; }
.sk-started { background: color-mix(in srgb, var(--jade) 34%, transparent);
              width: calc(var(--started, 0) * 1%); }
.sk-learned { background: var(--jade); width: calc(var(--learned, 0) * 1%); }
.sk-pc { display: none; }
.sk-n {
  font-size: var(--fs-fine); color: var(--muted); font-variant-numeric: tabular-nums;
  min-width: 8ch; text-align: right;
}

@media (max-width: 560px) {
  .sk li { grid-template-columns: 72px 1fr auto; gap: var(--s3); }
  .sk-n { min-width: 0; }
}

.screen.gym { max-width: 620px; margin: 0 auto; width: 100%; gap: var(--s4); }

.gy-head {
  display: flex; align-items: baseline; justify-content: space-between;
  font-size: var(--fs-fine); color: var(--muted);
}
.gy-part { text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.gy-count { font-variant-numeric: tabular-nums; }
.gy-rail { height: 3px; border-radius: 99px; background: var(--bg-sunken); overflow: hidden; }
.gy-rail i { display: block; height: 100%; background: var(--seal); transition: width var(--base) var(--ease); }

.gy-ask { margin: var(--s2) 0 0; font-size: var(--fs-small); color: var(--fg-2); }

.gy-card {
  background: var(--card); box-shadow: var(--panel);
  border-radius: var(--r-panel); padding: var(--s5);
  display: flex; flex-direction: column; align-items: center; gap: var(--s3);
  min-height: 96px; justify-content: center;
}
.gy-play { align-self: center; }
.gy-pic { font-size: 64px; line-height: 1.1; }
.gy-line {
  margin: 0; font-family: 'Noto Serif SC', serif; font-size: 26px;
  line-height: 1.7; text-align: center;
}
.py-over {
  display: block; font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: var(--fs-fine); font-weight: 400; line-height: 1.35; color: var(--muted);
  letter-spacing: .02em;
}
.gy-line .py-over, .gy-q .py-over { margin-bottom: 2px; }
.ex-otext { display: inline-block; vertical-align: middle; }
.gy-chip .py-over { text-align: center; font-size: 11px; }
.gy-dlg { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.gy-dlg p {
  margin: 0; font-family: 'Noto Serif SC', serif; font-size: 19px; line-height: 1.6;
  padding: 8px 14px; border-radius: var(--r-chip); background: var(--raised);
}
.gy-q {
  margin: var(--s2) 0 0; font-family: 'Noto Serif SC', serif; font-size: 20px;
  color: var(--fg); text-align: center;
}

.gy-opts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); }
.gy-o {
  width: 100%; text-align: left; font: inherit; font-size: var(--fs-small);
  padding: 13px 16px; border-radius: var(--r-card);
  background: var(--raised); color: var(--fg); cursor: pointer;
  transition: background var(--fast) var(--ease);
}
.gy-o:hover:enabled { background: color-mix(in srgb, var(--fg) 10%, var(--raised)); }
.gy-o:disabled { cursor: default; opacity: 1; }
.gy-o-big { font-size: 40px; text-align: center; line-height: 1.3; }
.gy-o.right {
  background: color-mix(in srgb, var(--jade) 16%, var(--raised)); color: var(--fg);
  box-shadow: inset 0 0 0 1.5px var(--jade);
}
.gy-o.wrong {
  background: color-mix(in srgb, var(--seal) 12%, var(--raised)); color: var(--seal-text);
}

.gy-slot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  min-height: 62px; padding: 12px 14px; border-radius: var(--r-card);
  background: var(--bg-sunken);
  box-shadow: inset 0 0 0 1.5px var(--hair);
  font-family: 'Noto Serif SC', serif; font-size: 22px;
}
.gy-slot .gy-hint { font-family: inherit; font-size: var(--fs-fine); color: var(--muted); }
.gy-chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.gy-chip {
  font-family: 'Noto Serif SC', serif; font-size: 20px; padding: 9px 15px;
  border-radius: var(--r-chip); background: var(--raised); color: var(--fg);
  cursor: pointer; font-weight: inherit;
  transition: background var(--fast) var(--ease);
}
.gy-chip:hover:enabled { background: color-mix(in srgb, var(--fg) 10%, var(--raised)); }
.gy-chip:disabled { opacity: .35; cursor: default; }
.gy-acts { display: flex; flex-wrap: wrap; gap: var(--s2); }

.gy-verdict {
  display: flex; flex-direction: column; gap: 3px;
  padding: 13px 16px; border-radius: var(--r-card);
}
.gy-verdict.good { background: color-mix(in srgb, var(--jade) 13%, var(--card)); }
.gy-verdict.good b { color: var(--jade-ink); }
.gy-verdict.bad { background: color-mix(in srgb, var(--seal) 11%, var(--card)); }
.gy-verdict.bad b { color: var(--seal-text); }

.gy-next { align-self: stretch; }

.gy-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.gy-lvl { display: inline-flex; align-items: center; gap: 6px; }
.gy-sel {
  font: inherit; font-size: var(--fs-fine); font-weight: 600; color: var(--fg);
  background: var(--raised); border: 1px solid var(--hair); border-radius: 99px;
  padding: 4px 10px; cursor: pointer;
}
.gy-py-t {
  width: 30px; height: 30px; border-radius: 50%; flex: none; cursor: pointer;
  font-family: 'Noto Serif SC', serif; font-size: 14px;
  background: var(--raised); color: var(--muted); border: 1px solid var(--hair);
}
.gy-py-t.on { background: color-mix(in srgb, var(--seal) 16%, var(--raised)); color: var(--fg); border-color: var(--seal); }
.gy-xp {
  font-size: var(--fs-fine); font-weight: 600; font-variant-numeric: tabular-nums;
  padding: 3px 10px; border-radius: 99px;
  background: color-mix(in srgb, var(--amber) 13%, var(--card));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--amber) 35%, transparent);
}
.gy-end { margin-left: auto; }
.gy-figs { justify-content: center; }
.gy-upper { align-items: stretch; }
.gy-upper .gy-line { font-size: 19px; text-align: left; }
.gy-score { align-items: center; text-align: center; padding: var(--s6) var(--s5); gap: var(--s2); }
.gy-score b {
  font-family: 'Fraunces', Georgia, serif; font-size: 56px; font-weight: 600;
  line-height: 1; font-variant-numeric: tabular-nums;
}

.pr-card { gap: var(--s2); }
.pr-plays { display: inline-flex; gap: var(--s2); align-self: center; }
.pr-py { margin: 0; font-size: var(--fs-small); color: var(--fg-2); letter-spacing: .02em; }
.pr-en { margin: 0; font-size: var(--fs-small); color: var(--muted); text-align: center; max-width: 40ch; }
.pr-veil {
  margin: 0; font-size: 34px; letter-spacing: .12em; color: var(--muted); opacity: .45;
}
.pr-acts { justify-content: space-between; }

.pl-track { display: flex; flex-direction: column; gap: var(--s3); }
.pl-track .sub { margin: 0; }
.pl-zh { font-family: 'Noto Serif SC', serif; color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.pl-topics {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: var(--s2); grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
}
.pl-topic {
  display: flex; flex-direction: column; gap: var(--s3);
  padding: var(--s4); border-radius: var(--r-panel);
  background: var(--card); box-shadow: var(--panel); color: var(--fg);
  align-self: start;
}
.pl-topic.open { box-shadow: var(--panel), inset 0 0 0 1px color-mix(in srgb, var(--seal) 45%, transparent); }
.pl-head {
  display: flex; align-items: center; gap: var(--s4); width: 100%;
  font: inherit; color: inherit; text-align: left; background: none; padding: 0; cursor: pointer;
}
.pl-chev { flex: none; color: var(--muted); font-size: 16px; }
.pl-prog { display: flex; flex-direction: column; gap: 4px; }
.pl-prog .fine { color: var(--muted); }
.pl-bar { height: 6px; border-radius: 99px; background: var(--raised); overflow: hidden; }
.pl-bar i { display: block; height: 100%; background: var(--jade); }
.pl-detail { display: flex; flex-direction: column; gap: var(--s2); align-items: flex-start; }
.pl-detail > .fine { margin: 0; }
.pl-h {
  margin: var(--s2) 0 0; font-size: var(--t-cap); font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.pl-words { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pl-words li {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 4px 3px 9px; border-radius: 9px; background: var(--raised);
}
.pl-words a { display: inline-flex; align-items: baseline; gap: 4px; color: var(--fg); text-decoration: none; }
.pl-wh { font-family: 'Noto Serif SC', serif; font-size: 15px; }
.pl-wl { font-size: var(--t-cap); color: var(--muted); font-variant-numeric: tabular-nums; }
.pl-words .star { padding: 0 3px; }
.pl-stretch { margin: 0; color: var(--amber-ink); }
.pl-note { margin-top: var(--s4); }

.pl-level { margin: 0; display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); flex-wrap: wrap; }
.pl-level .gy-ask { margin: 0; }
.pl-up { color: var(--amber-ink); }
.pl-ch { color: inherit; text-decoration: none; }
.pl-ch:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.pl-ruby { line-height: 2.1; }
.pl-ruby rt { font-family: system-ui, sans-serif; font-size: 11px; color: var(--muted); letter-spacing: 0; }
.pl-opts { display: grid; grid-template-columns: 1fr 1fr; }
.pl-opts .gy-o {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  text-align: center; text-decoration: none; height: 100%;
}
.pl-opts .gy-o b { font-family: 'Noto Serif SC', serif; font-size: 20px; font-weight: 500; }
.pl-og { font-size: var(--fs-fine); color: var(--fg-2); }
.pl-opts .gy-o .fine { color: var(--muted); }
.pl-placed { display: flex; flex-direction: column; gap: var(--s2); }
.pl-placed > .fine { margin: 0; }
.pl-placed-h { display: flex; align-items: center; gap: var(--s3); }
.pl-chunk { font-family: 'Noto Serif SC', serif; font-size: 24px; font-weight: 500; }
.pl-open { margin-left: auto; font-size: var(--fs-small); }
.pl-gloss { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.pl-gloss li { display: flex; flex-direction: column; align-items: center; max-width: 88px; }
.pl-gloss b { font-family: 'Noto Serif SC', serif; font-size: 16px; font-weight: 500; }
.pl-gloss span { font-size: 11px; color: var(--fg-2); text-align: center; line-height: 1.25; }
.pl-gloss li.on b { color: var(--amber-ink); }

.pl-why { margin: 0; font-size: var(--fs-small); line-height: 1.5; color: var(--fg); }

.pl-stage, .pl-main, .pl-side { display: flex; flex-direction: column; gap: var(--s4); }
@media (min-width: 960px) {
  .screen.gym.play-drill { max-width: 1060px; }
  .play-drill .pl-stage {
    display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: start; gap: var(--s5);
  }
  .play-drill:not(.is-open) .pl-main { grid-column: 1 / -1; justify-self: center; width: min(100%, 620px); }
}

@media (min-width: 744px) {
  body.at-training:not(.in-court):not(.in-intro) #view:has(> .play-drill, > .pl-result, > .pl-shelf, > .pr-deck) {
    background: color-mix(in srgb, var(--card) 97%, transparent);
    backdrop-filter: none;
    box-shadow: var(--panel);
  }
  body.at-training #view:has(> .play-drill, > .pl-result, > .pl-shelf, > .pr-deck) :is(.screen-head, .screen > .note) {
    background: none; box-shadow: none; backdrop-filter: none;
    padding: 0; max-width: none;
  }
}
:is(.play-drill, .pr-deck) .gy-head,
.play-drill :is(.pl-level, .gy-tools) .fine,
.pr-deck .pr-en { color: var(--fg-2); }
.pl-opts .gy-o {
  background: color-mix(in srgb, var(--fg) 6%, var(--card));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fg) 16%, transparent);
}
.pl-opts .gy-o:hover:enabled { background: color-mix(in srgb, var(--fg) 11%, var(--card)); }
.pl-opts .gy-o .fine { color: var(--fg-2); }
.pl-opts .gy-o.right {
  background: color-mix(in srgb, var(--jade) 16%, var(--card));
  box-shadow: inset 0 0 0 1.5px var(--jade);
}
.pl-opts .gy-o.wrong {
  background: color-mix(in srgb, var(--seal) 12%, var(--card));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--seal) 45%, transparent);
}

.hz-w {
  position: relative; color: inherit; text-decoration: none;
  border-radius: 5px; padding: 0 1px;
  transition: background var(--fast) var(--ease);
}
.hz-w:hover, .hz-w:focus-visible {
  background: color-mix(in srgb, var(--seal) 14%, transparent);
  outline: none;
}
.hz-pop {
  display: none; position: absolute; z-index: 20;
  bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  flex-direction: column; align-items: center; gap: 1px;
  width: max-content; max-width: 240px; padding: 7px 11px 8px;
  border-radius: 10px; background: var(--fg); color: var(--bg);
  box-shadow: 0 8px 22px -10px rgba(0, 0, 0, .45);
  font-family: system-ui, -apple-system, sans-serif; font-size: 13px; line-height: 1.35;
  letter-spacing: 0; text-align: center; white-space: normal; pointer-events: none;
}
.hz-w:hover .hz-pop, .hz-w:focus-visible .hz-pop { display: flex; }
.hz-pop b { font-family: 'Noto Serif SC', serif; font-size: 20px; font-weight: 500; }
.hz-py { font-weight: 600; }
.hz-gl { opacity: .85; }
.pr-hint { align-self: center; }
.pr-hint.on { box-shadow: inset 0 0 0 1.5px var(--seal); }
.pr-w {
  font: inherit; color: inherit; background: none; border: 0; margin: 0;
  padding: 0 1px; border-radius: 5px; cursor: pointer;
  transition: background var(--fast) var(--ease);
}
.pr-w:hover, .pr-w:focus-visible {
  background: color-mix(in srgb, var(--seal) 14%, transparent); outline: none;
}
.pr-w rt { visibility: hidden; }
.pr-w.on rt { visibility: visible; }
.pr-peek-hint { text-align: center; margin: 0; }
.pl-glyph {
  font-family: 'Noto Serif SC', serif; font-size: 22px;
  width: 42px; height: 42px; flex: none; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--raised); color: var(--fg-2);
}
.pl-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pl-body b { font-size: var(--fs-small); }
.pl-body .fine { color: var(--fg-2); }
.pl-n { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }

@media (max-width: 560px) {
  .pl-topics { grid-template-columns: 1fr; }
}

.ex-level { display: flex; flex-direction: column; gap: var(--s3); }
.ex-level .sub { margin: 0; }
.ex-papers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); }
.ex-papers a {
  display: flex; align-items: center; gap: var(--s4); justify-content: space-between;
  padding: var(--s4) var(--s5); border-radius: var(--r-panel); text-decoration: none;
  background: var(--card); box-shadow: var(--panel); color: var(--fg);
}
.ex-papers a:hover { background: color-mix(in srgb, var(--fg) 4%, var(--card)); }
.ex-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ex-body b { font-size: var(--fs-small); }
.ex-best {
  flex: none; font-size: var(--fs-fine); color: var(--muted);
  padding: 5px 12px; border-radius: var(--r-pill); background: var(--raised);
}
.ex-best.won { color: var(--jade-ink); background: color-mix(in srgb, var(--jade) 14%, var(--card)); }
.ex-intro {
  margin: 0; max-width: 66ch; font-size: var(--fs-small); color: var(--fg-2);
  padding: 10px 12px; border-radius: 12px; background: var(--raised);
}

.ex-blueprint { background: var(--card); box-shadow: var(--panel); border-radius: var(--r-panel); padding: var(--s5); }
.ex-sections { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s3); }
.ex-sections li { display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; }
.ex-zh { font-family: 'Noto Serif SC', serif; color: var(--muted); }
.ex-sections .fine { margin-left: auto; color: var(--muted); }

.ex-clock {
  font-variant-numeric: tabular-nums; font-weight: 600;
  font-size: var(--fs-small); color: var(--fg-2);
}
.ex-clock.low { color: var(--seal-text); }

.ex-passage {
  font-family: 'Noto Serif SC', serif; font-size: 18px; line-height: 1.95;
  text-align: left; width: 100%; max-width: 44em;
}
.ex-letter {
  display: inline-grid; place-items: center; width: 22px; height: 22px;
  border-radius: 6px; margin-right: 10px; flex: none;
  background: var(--bg-sunken); color: var(--muted);
  font-size: var(--fs-fine); font-weight: 600;
}
.gy-o.on { box-shadow: inset 0 0 0 1.5px var(--seal); background: var(--seal-soft); }
.gy-o.on .ex-letter { background: var(--seal); color: var(--seal-on); }
.gy-o:disabled .ex-letter { opacity: .4; }
.gy-o:disabled { opacity: .45; }

.ex-write { display: flex; flex-direction: column; gap: var(--s2); }
.ex-write textarea {
  font-family: 'Noto Serif SC', serif; font-size: 19px; line-height: 1.8;
  padding: 13px 15px; border-radius: var(--r-card); resize: vertical;
  background: var(--card); color: var(--fg); border: 1px solid var(--hair);
}
.ex-rubric { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--s2); flex-wrap: wrap; }
.ex-rubric li {
  font-family: 'Noto Serif SC', serif; font-size: var(--fs-fine);
  padding: 5px 12px; border-radius: var(--r-pill);
  background: var(--raised); color: var(--muted);
}
.ex-rubric li.ok { background: color-mix(in srgb, var(--jade) 15%, var(--card)); color: var(--jade-ink); }

.ex-acts { justify-content: space-between; }
.ex-verdict { align-items: center; text-align: center; padding: var(--s5); gap: var(--s2); border-radius: var(--r-panel); }
.ex-verdict.good { background: color-mix(in srgb, var(--jade) 13%, var(--card)); }
.ex-verdict.good b { color: var(--jade-ink); font-size: 26px; }
.ex-verdict.bad { background: var(--raised); }
.ex-verdict.bad b { font-size: 26px; }
.ex-marks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); }
.ex-marks li {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 12px 16px; border-radius: var(--r-card); background: var(--raised);
}
.ex-mark { font-variant-numeric: tabular-nums; font-weight: 600; }

.ex-chips { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.ex-chips.hk-chips { grid-template-columns: repeat(3, 1fr); }
.ex-chip {
  border: 0; cursor: pointer; font: inherit; font-size: var(--fs-small);
  padding: 9px 4px; font-family: 'Noto Serif SC', serif;
}
.ex-chip:disabled { opacity: .45; cursor: not-allowed; }
.ex-lock { font-size: 11px; margin-right: 2px; }
details.ex-blueprint > summary {
  cursor: pointer; display: flex; flex-wrap: wrap; gap: 4px var(--s3); align-items: baseline;
}
details.ex-blueprint > summary .fine { color: var(--muted); }
details.ex-blueprint[open] > summary { margin-bottom: var(--s4); }
details.ex-blueprint > summary::-webkit-details-marker { display: none; }
details.ex-blueprint > summary::after {
  content: '\25BE'; margin-left: auto; color: var(--muted); transition: transform var(--base) var(--ease);
}
details.ex-blueprint[open] > summary::after { transform: rotate(180deg); }
.ex-sections li { flex-direction: column; align-items: flex-start; gap: 2px; }
.ex-sec-name { display: flex; gap: var(--s2); align-items: baseline; flex-wrap: wrap; }
.ex-sec-name .fine { color: var(--muted); }
.ex-part { font-size: var(--fs-small); color: var(--fg-2); }
.ex-part-zh { font-size: var(--fs-fine); color: var(--muted); font-family: 'Noto Serif SC', serif; margin-left: 4px; }

.ex-sec-intro { text-align: center; display: flex; flex-direction: column; gap: 4px; padding: var(--s4) 0; }
.ex-sec-intro h2 { margin: 0; }
.ex-sec-zh { margin: 0; font-family: 'Noto Serif SC', serif; font-size: 46px; line-height: 1.1; color: var(--seal-text); }

.ex-tools { display: inline-flex; align-items: center; gap: var(--s3); }
.ex-close, .ex-py {
  border: 0; cursor: pointer; font: inherit; line-height: 1;
  width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--raised); color: var(--fg-2);
}
.ex-close:hover { color: var(--fg); }
.ex-py { font-family: 'Noto Serif SC', serif; font-size: 13px; color: var(--muted); }
.ex-py.on { background: var(--seal-soft); color: var(--fg); box-shadow: inset 0 0 0 1px var(--seal); }

.ex-kind { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.ex-tag {
  font-family: 'Noto Serif SC', serif; font-size: var(--fs-fine);
  padding: 4px 11px; border-radius: var(--r-pill);
  color: var(--seal-text); background: var(--seal-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--seal) 50%, transparent);
}
.ex-kind .fine { color: var(--fg-2); }
.ex-hear { margin: 0; color: var(--muted); font-size: var(--fs-small); }
.ex-who { color: var(--muted); }
.ex-ptitle { margin: 0 0 var(--s2); font-weight: 600; }
.ex-count { margin: 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.ex-count.ok { color: var(--jade-ink); }
.ex-pics { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.ex-pics .gy-o { font-size: 34px; justify-content: center; }

.ex-result-head { align-items: center; text-align: center; }
.ex-seal { margin: 0; font-family: 'Noto Serif SC', serif; font-size: 44px; line-height: 1.1; color: var(--seal-text); }
.ex-seal.good { color: var(--jade-ink); }
.ex-gain { color: var(--jade-ink); }
.result > .ex-sections-block, .result > .ex-answers { width: 100%; text-align: left; }
.ex-marks li { gap: var(--s3); }
.ex-marks li > span:first-child { flex: none; min-width: 9em; }
.ex-bar { flex: 1; height: 6px; border-radius: 99px; background: var(--bg-sunken); overflow: hidden; }
.ex-bar i { display: block; height: 100%; background: var(--seal); }
.ex-bar.good i { background: var(--jade); }
.ex-answers { display: flex; flex-direction: column; gap: var(--s2); }
.ex-sheet { list-style: none; margin: 0; padding: 0; counter-reset: q; }
.ex-sheet li {
  display: flex; gap: var(--s3); align-items: flex-start;
  padding: 10px 0; border-bottom: 1px solid var(--hair); counter-increment: q;
}
.ex-sheet li::before {
  content: counter(q); flex: none; width: 2em; text-align: right;
  color: var(--muted); font-size: var(--fs-fine); font-variant-numeric: tabular-nums; padding-top: 2px;
}
.ex-tick { flex: none; font-weight: 700; width: 1.2em; order: 2; margin-left: auto; }
.ex-sheet li.ok .ex-tick { color: var(--jade-ink); }
.ex-sheet li.miss .ex-tick { color: var(--seal-text); }
.ex-row { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ex-brief { font-family: 'Noto Serif SC', serif; }
.ex-sheet li.ok .ex-yours { color: var(--jade-ink); }
.ex-sheet li.miss .ex-yours { color: var(--seal-text); }

.hk-gloss { font-family: inherit; font-size: var(--fs-small); color: var(--muted); }
.hk-kept { text-align: center; color: var(--muted); margin: 0; }
.hk-glyph { margin: 0; font-family: 'Noto Serif SC', serif; font-size: 44px; color: var(--seal-text); }

.sh-steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s2);
  counter-reset: step;
}
.sh-steps li {
  display: flex; flex-direction: row; align-items: baseline; justify-content: center; gap: 6px;
  padding: 6px 6px; border-radius: var(--r-chip);
  background: var(--raised); color: var(--muted);
  transition: background var(--base) var(--ease), color var(--base) var(--ease);
}
.sh-steps li b { font-family: 'Noto Serif SC', serif; font-size: 17px; font-weight: 500; }
@media (max-width: 520px) {
  .sh-steps li { flex-direction: column; align-items: center; gap: 0; padding: 5px 4px; }
}
.sh-steps li .fine { font-size: var(--t-cap); }
.sh-steps li.was { color: var(--fg-2); }
.sh-steps li.on { background: var(--seal); color: var(--seal-on); }
.sh-steps li.on .fine { color: var(--seal-on); }

.sh-card { min-height: 0; padding-block: var(--s3); }
.sh-card .pr-py, .sh-card .pr-en { margin-block: 2px; }
.sh-card .sh-line { margin-block: 4px; }
.sh-line { display: flex; flex-wrap: wrap; justify-content: center; }
.sh-c { font-weight: inherit; }
.sh-hit { color: var(--jade-ink); }
.sh-tone { color: var(--amber-ink); }
.sh-miss { color: var(--seal-text); text-decoration: underline wavy; text-underline-offset: 6px; }
.sh-skip { color: var(--fg-2); }

.sh-turn {
  margin: 0; text-align: center; font-size: var(--fs-small); color: var(--fg-2);
}
.sh-turn.live { color: var(--seal-text); font-weight: 600; }

.sh-score {
  display: flex; flex-flow: row wrap; align-items: baseline; justify-content: center; gap: 4px 10px;
  padding: var(--s3) var(--s4); border-radius: var(--r-panel);
}
.sh-score > :not(b):not(.sh-verdict) { flex: 0 0 100%; }
.sh-score > .sh-sum { max-width: none; }
.sh-score.good { background: color-mix(in srgb, var(--jade) 13%, var(--card)); }
.sh-score.good b { color: var(--jade-ink); }
.sh-score.bad { background: var(--raised); }
.sh-score b {
  font-family: 'Fraunces', Georgia, serif; font-size: 34px; font-weight: 600;
  line-height: 1; font-variant-numeric: tabular-nums;
}
.sh-words { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.sh-words i {
  font-style: normal; font-family: 'Noto Serif SC', serif; font-size: var(--fs-small);
  padding: 3px 9px; border-radius: var(--r-chip); background: var(--card);
}
.sh-said { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.sh-said-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 8px; }
.sh-said-row > span, .sh-said-row > button {
  display: inline-flex; flex-direction: column; align-items: center;
  min-width: 1.6em; padding: 2px 3px; text-decoration: none;
}
.sh-said-row > button {
  font: inherit; background: none; border: 0; border-radius: 8px; cursor: pointer;
}
.sh-said-row > button:hover, .sh-said-row > button.on {
  background: color-mix(in srgb, currentColor 14%, transparent);
}
.sh-said-row > button:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; }
.sh-diff { font-size: var(--fs-small); color: var(--fg-2); text-align: center; }
.sh-said-row i { font-style: normal; font-size: var(--fs-small); line-height: 1.2; }
.sh-score .sh-said-row b {
  font-family: 'Noto Serif SC', serif; font-size: 22px; font-weight: 400;
  line-height: 1.2; color: inherit;
}
.sh-err { text-align: center; }
.sh-live {
  margin: 0; min-height: 1.6em; text-align: center;
  font-family: 'Noto Serif SC', serif; font-size: 20px; color: var(--fg-2);
}
.sh-lead { text-align: center; }
.sh-verdict { font-size: var(--fs-small); color: var(--fg-2); }
.sh-sum { text-align: center; max-width: 46ch; }
.sh-acts { justify-content: space-between; }
.sh-compare { display: flex; flex-wrap: wrap; gap: var(--s2); justify-content: center; }

.hk-detail { max-width: 46ch; text-align: center; }
.hk-slow { display: inline-flex; align-items: center; }
.ic-tortoise { width: 1.7em; height: 1em; fill: currentColor; }
.hk-model {
  background: var(--card); box-shadow: var(--panel);
  border-radius: var(--r-panel); padding: var(--s5);
  align-items: center; text-align: center; gap: var(--s2);
}

.wd-hero {
  display: flex; align-items: flex-start; gap: var(--s5);
  background: var(--card); box-shadow: var(--panel);
  border-radius: var(--r-panel); padding: var(--s5);
}
.wd-lede { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; flex: 1; }
.wd-h {
  font-family: 'Noto Serif SC', serif; font-size: clamp(40px, 6vw, 56px);
  line-height: 1.1; margin: 0;
}
.wd-py { margin: 0; font-size: 20px; }
.wd-alt { margin: 4px 0 0; font-size: 14px; color: var(--fg-2); }
.wd-alt a { color: inherit; text-decoration: none; border-bottom: 1px solid currentColor; }
.wd-alt .py { margin-right: 4px; font-weight: 600; }
.ref-page.tp .wd-alt { font-size: clamp(16px, 2.4vh, 24px); }
.wd-m { margin: 0; font-size: var(--fs-small); color: var(--fg-2); max-width: 44ch; }
.wd-acts { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s2); }
.wd-pic {
  width: 168px; height: 168px; flex: none; object-fit: cover;
  border-radius: var(--r-card); background: var(--raised);
}

.wd-block { background: var(--card); box-shadow: var(--panel); border-radius: var(--r-panel); padding: var(--s5); }
.wd-block .sub { margin: 0 0 var(--s3); }
.wd-block p { margin: 0; color: var(--fg-2); max-width: 62ch; line-height: 1.65; }

.wd-chars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); }
.wd-chars a {
  display: flex; align-items: center; gap: var(--s4);
  padding: 10px 14px; border-radius: var(--r-card); text-decoration: none;
  background: var(--raised); color: var(--fg);
}
.wd-chars a:hover { background: color-mix(in srgb, var(--fg) 8%, var(--raised)); }
.wd-c { font-family: 'Noto Serif SC', serif; font-size: 30px; line-height: 1; flex: none; }
.wd-cb { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.wd-usage { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: var(--s2); }
.wd-usage li { color: var(--fg-2); line-height: 1.65; max-width: 62ch; }

.wd-ex { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s4); }
.wd-ex-h {
  font-family: 'Noto Serif SC', serif; font-size: 21px; line-height: 1.6;
  margin: 0; color: var(--fg);
}
.wd-ex-p { margin: 2px 0 0; font-size: var(--fs-fine); color: var(--muted); }

a.w-h { text-decoration: none; color: inherit; }
a.w-h:hover { text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 560px) {
  .wd-hero { flex-direction: column; }
  .wd-pic { width: 100%; height: 200px; }
}

.ab-sec { display: flex; flex-direction: column; gap: var(--s3); }
.ab-sec .sub { margin: 0; }
.ab-block {
  background: var(--card); box-shadow: var(--panel);
  border-radius: var(--r-panel); padding: var(--s5); gap: var(--s3);
}
.ab-block p { margin: 0; color: var(--fg-2); line-height: 1.7; max-width: 62ch; white-space: pre-line; }
.ab-block b { font-size: var(--fs-small); }
.ab-tour { margin: 0; }

.tw { margin: 0; max-width: 440px; }
.tw svg { display: block; width: 100%; height: auto; overflow: visible; }
.tw-spoke { stroke: currentColor; stroke-opacity: .45; stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 1 5; }
.tw-tandem { fill: none; stroke: var(--seal); stroke-opacity: .7; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 2 5; }
.tw-ink { fill: var(--fg); }
.tw-hair { fill: none; stroke: var(--bg); stroke-opacity: .8; stroke-width: 1.3; stroke-linecap: round; }
.tw-lines { fill: none; stroke: var(--bg); stroke-opacity: .6; stroke-width: .5; stroke-linecap: round; }
.tw-skill circle { fill: currentColor; fill-opacity: .14; stroke: currentColor; stroke-opacity: .5; stroke-width: 1.5; }
.tw-skill text { fill: currentColor; font-family: 'Noto Serif SC', serif; font-size: 17px; }
.tw-label { fill: var(--fg-2); font-size: 10.5px; font-weight: 600; }

.ab-method { display: flex; flex-direction: column; gap: var(--s2); }
.ab-inst { padding: 0; }
.ab-inst summary {
  display: flex; align-items: center; gap: var(--s3);
  padding: 13px var(--s5); cursor: pointer; list-style: none;
}
.ab-inst summary::-webkit-details-marker { display: none; }
.ab-inst summary::after {
  content: ''; margin-left: auto; width: 8px; height: 8px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform var(--base) var(--ease);
}
.ab-inst[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.ab-glyph {
  font-family: 'Noto Serif SC', serif; font-size: 19px;
  width: 34px; height: 34px; flex: none; border-radius: 8px;
  display: grid; place-items: center; background: var(--raised); color: var(--fg-2);
}
.ab-inst > p { padding: 0 var(--s5) var(--s4); }
.ab-take { color: var(--fg) !important; font-weight: 500; }

.ab-tones { display: flex; gap: var(--s3); flex-wrap: wrap; margin: 0; }
.ab-tones span {
  font-size: var(--fs-fine); font-weight: 600;
  padding: 5px 12px; border-radius: var(--r-pill); background: var(--raised);
}

.hg { display: flex; flex-direction: column; gap: var(--s2); }
.hg h3 { margin: var(--s2) 0 0; font-size: var(--fs-small); font-weight: 600; }
.hg h3:first-child { margin-top: 0; }
.hg-bands { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); margin: 0; }
.hg-bands > span {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 6px; border-radius: 12px; background: var(--raised);
}
.hg-bands b { font-family: 'Fraunces', Georgia, serif; font-size: 18px; font-variant-numeric: tabular-nums; }
.hg-skills { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.hg-skills > span {
  display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-fine);
  padding: 5px 11px; border-radius: var(--r-pill); background: var(--raised);
}
.hg-skills b { font-family: 'Noto Serif SC', serif; font-size: 15px; font-weight: 500; }
.hg-steps { margin: 0; padding-left: 1.4em; color: var(--fg-2); display: flex; flex-direction: column; gap: 4px; }
.hg-steps li::marker { color: var(--seal); font-weight: 600; }
.hg-hub { align-self: flex-start; margin-top: var(--s2); font-weight: 600; color: var(--seal-text, var(--seal)); text-decoration: none; }

.intro-tracks { grid-template-columns: 1fr; }
.intro-tracks .intro-opt { flex-direction: row; align-items: flex-start; gap: var(--s4); }
.intro-opt-g {
  font-family: 'Noto Serif SC', serif; font-size: 20px;
  width: 38px; height: 38px; flex: none; border-radius: 9px;
  display: grid; place-items: center; background: var(--card); color: var(--fg-2);
}
.intro-tracks .intro-opt.on .intro-opt-g { background: var(--seal); color: var(--seal-on); }
.intro-tracks .intro-opt-b { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.intro-tracks .intro-opt-n { font-size: var(--fs-small); font-weight: 600; font-family: inherit; }
.intro-tracks .intro-opt-k { line-height: 1.45; }

.today-course {
  display: flex; align-items: center; gap: var(--s4); text-decoration: none;
  background: var(--card); box-shadow: var(--panel);
  border-radius: var(--r-panel); padding: var(--s4) var(--s5); color: var(--fg);
}
.today-course:hover { background: color-mix(in srgb, var(--fg) 4%, var(--card)); }
.tc-g {
  font-family: 'Noto Serif SC', serif; font-size: 24px; flex: none;
  width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center;
  background: var(--seal); color: var(--seal-on);
}
.tc-b { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tc-b b { font-size: var(--fs-small); }

.bs-shelf { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); }
.bs-shelf a {
  display: flex; align-items: center; gap: var(--s4); text-decoration: none;
  background: var(--card); box-shadow: var(--panel);
  border-radius: var(--r-panel); padding: var(--s4) var(--s5); color: var(--fg);
}
.bs-shelf a:hover { background: color-mix(in srgb, var(--fg) 4%, var(--card)); }
.bs-g {
  font-family: 'Noto Serif SC', serif; font-size: 22px; flex: none;
  width: 42px; height: 42px; border-radius: 9px; display: grid; place-items: center;
  background: var(--raised); color: var(--fg-2);
}
.bs-b { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.bs-b b { font-size: var(--fs-small); }
.bs-min { flex: none; color: var(--muted); }

.bs-home { gap: var(--s5); }
.bs-home .c1 { --c: var(--t1); --ci: var(--t1-ink); }
.bs-home .c2 { --c: var(--t2); --ci: var(--t2-ink); }
.bs-home .c3 { --c: var(--t3); --ci: var(--t3-ink); }
.bs-home .c4 { --c: var(--t4); --ci: var(--t4-ink); }
.bsh-head { display: flex; align-items: center; gap: var(--s5); }
.bsh-face {
  flex: none; display: grid; place-items: center; width: 108px; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--seal) 24%, transparent),
              color-mix(in srgb, var(--seal) 7%, transparent) 70%, transparent);
}
.bsh-b { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.bsh-head.screen-head { margin: 0; }
.bsh-b .fine { margin: 0; max-width: 64ch; }
.bsh-head h1::after { margin-top: var(--s2); }
.bs-steps { list-style: none; display: flex; gap: 6px; margin: 4px 0 0; padding: 0; }
.bs-steps li {
  width: 36px; height: 6px; border-radius: 3px;
  background: color-mix(in srgb, var(--c) 24%, transparent);
}
.bs-steps li.done { background: var(--c); }
.bs-home .bs-shelf { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
@media (min-width: 900px) {
  .bs-home .bs-shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.bs-home .bs-shelf li { animation: bs-in .42s cubic-bezier(.3, 1.3, .5, 1) backwards; animation-delay: calc(80ms + var(--i, 0) * 70ms); }
@keyframes bs-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.bs-home .bs-shelf a {
  position: relative; height: 100%; box-sizing: border-box; overflow: hidden;
  padding: var(--s4) var(--s4) var(--s4) var(--s5);
  background: linear-gradient(120deg, color-mix(in srgb, var(--c) 13%, var(--card)), var(--card) 60%);
  transition: transform var(--fast) var(--ease), background var(--fast) var(--ease);
}
.bs-home .bs-shelf a::before {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--c);
}
.bs-home .bs-shelf a:hover {
  transform: translateY(-2px);
  background: linear-gradient(120deg, color-mix(in srgb, var(--c) 20%, var(--card)), var(--card) 70%);
}
.bs-home .bs-g {
  width: 50px; height: 50px; border-radius: 13px; font-size: 26px;
  background: color-mix(in srgb, var(--c) 20%, var(--card)); color: var(--ci);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 50%, transparent);
}
.bs-home li.done .bs-g { background: var(--c); color: #1C1E18; box-shadow: none; }
.bs-home li.next a { box-shadow: var(--panel), inset 0 0 0 1.5px color-mix(in srgb, var(--c) 70%, transparent); }
.bs-home .bs-min {
  align-self: flex-start; padding: 2px 9px; border-radius: var(--r-pill); font-weight: 600;
  background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--ci);
}
.bs-home li.done .bs-min { background: var(--c); color: #1C1E18; }
.bsh-acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
@media (prefers-reduced-motion: reduce) {
  .bs-home .bs-shelf li { animation: none; }
  .bs-home .bs-shelf a:hover { transform: none; }
}

.screen.basics-lesson { max-width: 620px; margin: 0 auto; width: 100%; gap: var(--s4); }
.bs-screen {
  display: flex; flex-direction: column; align-items: center; gap: var(--s4);
  text-align: center; min-height: 340px; justify-content: center;
  background: var(--card); box-shadow: var(--panel);
  border-radius: var(--r-panel); padding: var(--s6) var(--s5);
}
.bs-screen h1 { font-size: clamp(22px, 3vw, 28px); line-height: 1.2; margin: 0; }
.bs-body { margin: 0; color: var(--fg-2); line-height: 1.7; max-width: 44ch; white-space: pre-line; }
.bs-hero { margin: 0; font-family: 'Noto Serif SC', serif; font-size: 56px; line-height: 1; }

.bs-contour { display: block; }
.bs-tone { display: flex; flex-direction: column; align-items: center; gap: var(--s2); }
.bs-tone-sm { gap: 4px; }
.bs-hanzi {
  margin: 0; font-family: 'Noto Serif SC', serif; font-size: 64px; line-height: 1;
  cursor: pointer;
}
.bs-tone-sm .bs-hanzi { font-size: 44px; }
.bs-py { margin: 0; font-size: 22px; font-weight: 600; }
.bs-hook {
  margin: 0; font-size: var(--fs-small); color: var(--fg);
  padding: 10px 16px; border-radius: var(--r-card);
  background: var(--raised); max-width: 40ch;
}
.bs-swatches, .bs-marks { display: flex; gap: var(--s4); flex-wrap: wrap; justify-content: center; }
.bs-marks span { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bs-marks b { font-size: 30px; line-height: 1; }

.bs-emoji { margin: 0; font-size: 62px; line-height: 1; }
.bs-letters { font-family: 'Fraunces', Georgia, serif; font-size: 46px !important; }
.bs-not { margin: 0; font-size: var(--fs-small); color: var(--muted); }

.bs-build { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; justify-content: center; }
.bs-part { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.bs-part b { font-family: 'Noto Serif SC', serif; font-size: 44px; line-height: 1; font-weight: 400; }
.bs-whole b { font-size: 56px; }
.bs-plus { font-size: 22px; color: var(--muted); }

.bs-anatomy { display: flex; align-items: center; gap: var(--s5); flex-wrap: wrap; justify-content: center; }
.bs-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: var(--s5) var(--s6); border-radius: var(--r-panel);
  background: var(--bg-sunken); box-shadow: inset 0 0 0 1px var(--hair);
}
.bs-card-h { font-family: 'Noto Serif SC', serif; font-size: 52px; line-height: 1; }
.bs-card-p { font-family: 'Noto Serif SC', serif; font-size: 17px; color: var(--fg-2); }
.bs-anatomy-l { margin: 0; padding-left: 20px; text-align: left; display: flex; flex-direction: column; gap: 7px; }
.bs-anatomy-l li { color: var(--fg-2); line-height: 1.6; max-width: 34ch; font-size: var(--fs-fine); }

.bs-q { max-width: 30ch; }
.bs-say { align-self: center; }
.bs-opts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); width: 100%; max-width: 30ch; }
.bs-opts .gy-o { text-align: center; }
.bs-opts-tone { display: grid; grid-template-columns: repeat(2, 1fr); }
.bs-opts-tone .gy-o { display: grid; place-items: center; padding: var(--s3); }
.bs-verdict { margin: 0; font-size: var(--fs-small); font-weight: 600; }
.bs-verdict.good { color: var(--jade-ink); }
.bs-verdict.bad { color: var(--seal-text); }
.bs-acts { justify-content: space-between; }

.setup-limits {
  background: var(--card); box-shadow: var(--panel);
  border-radius: var(--r-panel); padding: 0;
}
.setup-limits summary {
  cursor: pointer; list-style: none; padding: 13px var(--s5);
  display: flex; align-items: center;
}
.setup-limits summary::-webkit-details-marker { display: none; }
.setup-limits summary::after {
  content: ''; margin-left: auto; width: 8px; height: 8px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform var(--base) var(--ease);
}
.setup-limits[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.sl-body { padding: 0 var(--s5) var(--s5); display: flex; flex-direction: column; gap: var(--s2); }
.sl-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); }
.sl-k { font-size: var(--fs-small); }
.sl-body .fine { margin: 0 0 var(--s3); color: var(--fg-2); max-width: 52ch; }
.sl-body .btn-danger { align-self: flex-start; }

.us-table { width: 100%; border-collapse: collapse; font-size: var(--fs-fine); }
.us-table th {
  text-align: right; font-weight: 600; color: var(--muted);
  font-size: var(--t-over); letter-spacing: .1em; text-transform: uppercase;
  padding-bottom: 8px;
}
.us-table th:first-child, .us-table td:first-child { text-align: left; }
.us-table td {
  text-align: right; padding: 7px 0; color: var(--fg-2);
  font-variant-numeric: tabular-nums;
  border-top: 1px solid var(--hair);
}
.us-events { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.us-events li {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: var(--fs-fine); color: var(--fg-2);
}
.us-events b { font-variant-numeric: tabular-nums; color: var(--fg); }

.ls-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); }
.ls-row {
  display: flex; align-items: center; gap: var(--s4); text-decoration: none;
  background: var(--card); box-shadow: var(--panel);
  border-radius: var(--r-panel); padding: var(--s4) var(--s5); color: var(--fg);
}
.ls-row:hover { background: color-mix(in srgb, var(--fg) 4%, var(--card)); }
.ls-n {
  font-family: 'Fraunces', Georgia, serif; font-size: 20px; font-weight: 600;
  width: 38px; height: 38px; flex: none; border-radius: 9px;
  display: grid; place-items: center; background: var(--raised); color: var(--fg-2);
  font-variant-numeric: tabular-nums;
}
.ls-learning .ls-n { background: color-mix(in srgb, var(--learning) 18%, var(--raised)); color: var(--learning-ink); }
.ls-learned .ls-n { background: var(--jade); color: var(--ink); }
.ls-b { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.ls-b b { font-size: var(--fs-small); }
.ls-meter {
  width: 74px; height: 4px; flex: none; border-radius: 99px;
  background: var(--bg-sunken); overflow: hidden;
}
.ls-meter i { display: block; height: 100%; background: var(--jade); border-radius: 99px; }
.ls-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3); }
.ls-head .ls-clear { flex: none; padding: 6px 12px; font-size: var(--fs-fine); margin-top: 6px; }
.ls-go { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s2); }
.ls-go-row { display: flex; align-items: center; gap: var(--s1); }
.ls-grammar { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s3); }
.ls-grammar li { display: flex; flex-direction: column; gap: 2px; }
.ls-grammar b { font-family: 'Noto Serif SC', serif; font-size: var(--fs-small); }

.wd-similar { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); }
.wd-similar a {
  display: flex; align-items: center; gap: var(--s4); text-decoration: none;
  padding: 9px 14px; border-radius: var(--r-card);
  background: var(--raised); color: var(--fg);
}
.wd-similar a:hover { background: color-mix(in srgb, var(--fg) 8%, var(--raised)); }
.wd-s-h { font-family: 'Noto Serif SC', serif; font-size: 22px; flex: none; }
.wd-s-b { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.wd-s-why {
  flex: none; color: var(--muted); white-space: nowrap;
  padding: 3px 9px; border-radius: var(--r-pill); background: var(--card);
}

.court {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  container-type: size;
  background: var(--bg-sunken);

  --ox: 50%;
  --oy: 50%;
  --zoom: 1.06;
  --art-filter: none;
  --sky-wash: transparent;
  --art-dim: 0;
  --u: calc(max(100cqw, 160cqh) / 1600);
}

.court.is-open .mark { opacity: 0; pointer-events: none; }
.court.is-open .mark.is-here { opacity: .5; }
.court.is-open .mark.is-here .mark-tag,
.court.is-open .mark.is-here .around { opacity: 0; }
.court.is-open .court-veil::after { opacity: calc(var(--art-dim) + .12); }
.mark, .mark-tag { transition: opacity var(--slow) var(--ease); }

.court-art .reeds { transition: opacity var(--slow) var(--ease); }
.court.is-open .court-art .reeds { opacity: 0; }

.door {
  position: fixed; z-index: 2;
  left: clamp(16px, 2.2vw, 32px); bottom: clamp(14px, 1.8vw, 24px);
  display: none; align-items: center; justify-content: center;
  width: 56px; height: 56px; padding: 0 0 2px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--card) 78%, transparent);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fg) 16%, transparent),
              var(--sink), 0 4px 14px -6px rgba(20, 14, 8, .45);
  color: var(--seal); text-decoration: none;
  transition: translate var(--base) var(--ease), color var(--fast) var(--ease);
}
.door-art { display: block; width: 36px; height: 36px; color: inherit; }
.door-art svg { width: 100%; height: 100%; display: block; }
.door-t {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.door:hover { translate: 0 -2px; color: color-mix(in srgb, var(--seal) 82%, #000); }
.door:focus-visible { outline: 2px solid var(--seal); outline-offset: 3px; }
@media (min-width: 1120px) {
  body:not(.in-court):not(.in-intro) .door { display: inline-flex; }
}

.court.is-leaning { --zoom: 1.14; }

.court-art,
.marks {
  position: absolute;
  left: 50%;
  top: 50%;
  width: max(100cqw, 160cqh);
  height: max(62.5cqw, 100cqh);
  translate: -50% -50%;
}

.court-art,
.marks {
  transform: scale(var(--zoom));
  transform-origin: var(--ox) var(--oy);
  transition: transform 900ms var(--ease);
}

@media (max-aspect-ratio: 8 / 5) {
  .court {
    --zoom: 1;
    --stage-w: min(160cqh, 100cqw * 8 / 7);
    --u: calc(var(--stage-w) / 1600);
  }
  .court-art,
  .marks { width: var(--stage-w); height: calc(var(--stage-w) * .625); }
  .court-art::before,
  .court-art::after {
    content: '';
    position: absolute; left: 0; right: 0;
    height: 100cqh;
    filter: var(--art-filter);
    transition: filter 4s linear;
    pointer-events: none;
    z-index: 1;
  }
  .court-art::before { bottom: calc(100% - 2px); background: #3C767B; }
  .court-art::after { top: calc(100% - 2px); background: #F4F1E9; }
}
.court-art .art { transition: filter 4s linear; }
.court-veil { transition: background 4s linear; }

.court-art { pointer-events: none; z-index: 0; }
.court-art .art { position: absolute; inset: 0; width: 100%; height: 100%; }

.court[data-phase="dawn"] {
  --art-filter: sepia(.03) saturate(1.16) brightness(1.07) contrast(1.1);
  --sky-wash:
    radial-gradient(42% 34% at 22% 4%, rgba(255, 214, 186, .58) 0%, rgba(255, 206, 178, 0) 74%),
    linear-gradient(to bottom,
      rgba(255, 158, 138, .34) 0%, rgba(255, 196, 164, .2) 18%,
      transparent 48%, rgba(126, 140, 168, .1) 100%);
}
.court[data-phase="morning"] {
  --art-filter: sepia(.04) saturate(1.18) brightness(1.09) contrast(1.14);
  --sky-wash:
    radial-gradient(38% 30% at 15% 2%, rgba(255, 244, 214, .72) 0%, rgba(255, 236, 186, 0) 72%),
    radial-gradient(130% 105% at 12% -12%,
      rgba(255, 220, 148, .52) 0%, rgba(255, 232, 180, .28) 38%, transparent 74%),
    linear-gradient(to bottom, rgba(255, 246, 220, .22) 0%, transparent 48%);
}
.court[data-phase="day"] {
  --art-filter: none;
  --sky-wash: transparent;
}
.court[data-phase="dusk"] {
  --art-filter: sepia(.3) saturate(1.3) brightness(.99) contrast(1.03);
  --sky-wash: linear-gradient(to bottom,
    rgba(214, 84, 60, .4) 0%, rgba(240, 140, 80, .24) 20%,
    transparent 48%, rgba(58, 38, 60, .16) 100%);
}
.court[data-phase="night"] {
  --art-filter: invert(1) hue-rotate(180deg) brightness(1.04) contrast(.9) saturate(.72);
  --sky-wash: linear-gradient(to bottom,
    rgba(28, 34, 78, .5) 0%, rgba(34, 42, 86, .3) 34%, transparent 70%);
}

.court-art { pointer-events: none; z-index: 0; }
.court-art .art {
  position: absolute; inset: 0; width: 100%; height: 100%;
  filter: var(--art-filter);
}

.court-art .sky { position: absolute; inset: 0; pointer-events: none; --sky-ink: #28383C; }
.court[data-phase="dusk"] .sky { --sky-ink: #31393A; }
.court[data-phase="night"] .sky { --sky-ink: #C0CCCF; }
.sky-flock {
  position: absolute; inset: 0;
  animation: sky-fly-r linear infinite;
}
.sky-flock--l { animation-name: sky-fly-l; }
.sky-at { position: absolute; width: 0; height: 0; }
.sky-bird {
  position: absolute;
  left: calc(-11 * var(--u)); top: calc(-8 * var(--u));
  width: calc(22 * var(--u)); height: calc(12 * var(--u));
  animation: sky-bob ease-in-out infinite;
}
.sky-bd {
  position: absolute; inset: 0;
  animation: sky-drift var(--drift, 12s) ease-in-out infinite alternate;
  animation-delay: var(--driftd, 0s);
}
.sky-wing {
  position: absolute; inset: 0; width: 100%; height: 100%;
  overflow: visible;
  transform-origin: 50% 61.667%;
  fill: none; stroke: var(--sky-ink); stroke-width: 2.1; stroke-linecap: round;
  transition: stroke 4s linear;
  animation: sky-beat-l var(--beat, 1.9s) linear infinite;
  animation-delay: var(--beatd, 0s);
}
.sky-wing--r { animation-name: sky-beat-r; }
@keyframes sky-fly-r {
  0%   { transform: translate(-26.25%, 2.4%); }
  25%  { transform: translate(11.875%, .4%); }
  50%  { transform: translate(50%, -.8%); }
  75%  { transform: translate(88.125%, -2%); }
  100% { transform: translate(126.25%, -2.4%); }
}
@keyframes sky-fly-l {
  0%   { transform: translate(126.25%, -1.8%); }
  25%  { transform: translate(88.125%, -.2%); }
  50%  { transform: translate(50%, 1%); }
  75%  { transform: translate(11.875%, 1.8%); }
  100% { transform: translate(-26.25%, 2.2%); }
}
@keyframes sky-bob {
  0%   { transform: translate(0, 0); }
  34%  { transform: translate(2.273%, -28.333%); }
  66%  { transform: translate(-1.364%, 9.167%); }
  100% { transform: translate(0, 0); }
}
@keyframes sky-drift { from { transform: translate(0, 0); } to { transform: translate(22.727%, -29.167%); } }
@keyframes sky-beat-l {
  0%   { transform: rotate(11deg);  animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  20%  { transform: rotate(-25deg); animation-timing-function: cubic-bezier(.4, 0, .6, 1); }
  50%  { transform: rotate(10deg);  animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  70%  { transform: rotate(-21deg); animation-timing-function: cubic-bezier(.4, 0, .6, 1); }
  100% { transform: rotate(11deg); }
}
@keyframes sky-beat-r {
  0%   { transform: rotate(-11deg); animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  20%  { transform: rotate(25deg);  animation-timing-function: cubic-bezier(.4, 0, .6, 1); }
  50%  { transform: rotate(-10deg); animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  70%  { transform: rotate(21deg);  animation-timing-function: cubic-bezier(.4, 0, .6, 1); }
  100% { transform: rotate(-11deg); }
}
@media (prefers-reduced-motion: reduce) {
  .sky-flock, .sky-bird, .sky-bd, .sky-wing { animation: none; }
  .sky-flock { transform: translateX(var(--rest, 0%)); }
}
.court-art .haze { animation: none; }
.court-art .wing { animation: none; }
@media (min-width: 744px) {
  body:not(.in-court):not(.in-intro):not(:has(#view :is(.camp-screen, .screen.klass)))
    .court-art .sky :is(.sky-flock, .sky-bird, .sky-bd, .sky-wing) { animation-play-state: paused; }
}
:root.tab-hidden .court-art .sky :is(.sky-flock, .sky-bird, .sky-bd, .sky-wing),
.court-art.sky-away .sky :is(.sky-flock, .sky-bird, .sky-bd, .sky-wing) { animation-play-state: paused; }
:root:has(dialog[open]) :is(.sky-flock, .sky-bird, .sky-bd, .sky-wing, .camp-walk, .camp-walk svg),
:root:has(dialog[open]) .camp .dchip-lit { animation-play-state: paused; }

.court { --sun-disc: #E4633D; --sun-halo: #FFB98A; }
.court[data-phase="morning"] { --sun-disc: #F0AE4A; --sun-halo: #FFE0A2; }
.court[data-phase="day"] { --sun-disc: #F2BE5C; --sun-halo: #FFEDC4; }
.court[data-phase="dusk"] { --sun-disc: #D8462B; --sun-halo: #FF9868; }
.court-art .sun { opacity: var(--sun-o, 0); transition: opacity 4s linear; }
.court-art .sun-move {
  transform: translate(calc(var(--sun-x, 606) * 1px), calc(var(--sun-y, 480) * 1px));
  transition: transform 4s linear;
}
.court-art .sun-disc { fill: var(--sun-disc); transition: fill 4s linear; }
.court-art #sun-glow stop { stop-color: var(--sun-halo); transition: stop-color 4s linear; }

.court-art .garden { transition: opacity var(--slow) var(--ease); }
body:is(.at-training, .at-klass) .court.is-open .court-art .garden { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .court-art .sun, .court-art .sun-move, .court-art .sun-disc, .court-art .garden { transition: none; }
}

:root:not([data-theme="light"]) .court { --art-dim: .26; }
:root:not([data-theme="light"]) .court[data-phase="night"] { --art-dim: 0; }

.court-veil {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    var(--sky-wash),
    linear-gradient(to top,
      color-mix(in srgb, var(--bg) 30%, transparent) 0%, transparent 9%);
}
.court-veil::after {
  content: ''; position: absolute; inset: 0;
  background: var(--bg);
  opacity: var(--art-dim);
}

.marks { z-index: 2; pointer-events: none; }

.mark {
  position: absolute;
  left: var(--x); top: var(--y);
  transform: translate(-50%, -100%);
  transition: opacity 420ms var(--ease);
  pointer-events: auto;

  display: block;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--fg);
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

.mark-below {
  position: absolute;
  top: 100%; left: 50%;
  translate: -50% 6px;
  display: grid; justify-items: center; gap: 5px;
  width: max-content;
}

.mark-art {
  display: block;
  color: color-mix(in srgb, #1C1E18 76%, #3E646C);

  filter: var(--art-filter);
  transition: color var(--base) var(--ease), filter 4s linear;
}
.mark-art svg {
  --court-hole: #F4F1E9;
  width: calc(var(--w, 74) * var(--u)); height: auto; display: block;
}
.mark:not(.mark-league) .mark-art svg {
  -webkit-mask-image: linear-gradient(to top, transparent 0, #000 13%);
  mask-image: linear-gradient(to top, transparent 0, #000 13%);
}

.mark-art { position: relative; }
.mark-art::before {
  content: '';
  position: absolute;
  left: 50%; bottom: 3%;
  width: 82%; height: 13%;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(28, 30, 24, .3), rgba(28, 30, 24, 0) 78%);
  pointer-events: none;
}
.mark-flying { transform: translate(-50%, -50%); }
.mark-league .mark-art::before { display: none; }


.mark-tag {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 13px;
  border-radius: var(--r-pill);
  white-space: nowrap;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  box-shadow: var(--sink), 0 0 0 1px color-mix(in srgb, var(--fg) 9%, transparent);
  backdrop-filter: blur(8px);
  scale: calc(1 / var(--zoom));
  transition: background var(--base) var(--ease), opacity var(--slow) var(--ease),
              scale 900ms var(--ease);
}
.mark-g {
  font-family: var(--serif-hz); font-size: 17px;
  color: var(--seal);
  transition: color var(--base) var(--ease);
}
.mark-n {
  font-size: 15.5px; font-weight: 500; letter-spacing: .01em;
  color: var(--fg);
  transition: color var(--base) var(--ease);
}

.mark:hover .mark-art,
.mark:focus-visible .mark-art { color: var(--fg); }
.mark:hover .mark-g,
.mark:focus-visible .mark-g { color: var(--seal); }
.mark:hover .mark-n,
.mark:focus-visible .mark-n { color: var(--fg); }
.mark:hover .mark-tag,
.mark:focus-visible .mark-tag { background: var(--card); }

.around {
  position: relative;
  display: grid;
  justify-items: center;
  margin-top: 5px;
  scale: calc(1 / var(--zoom));
  transition: scale 900ms var(--ease);
}
.mark-league .around { padding-bottom: 13px; }
.around-cloud {
  position: absolute;
  left: 50%; bottom: 1px; translate: -50% 0;
  width: calc(100% + 34px); height: 12px;
  background: color-mix(in srgb, #1C1E18 78%, #3E646C);
  filter: var(--art-filter);
  opacity: .78;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M5 11.4C4.6 8 7.8 6.2 13 6.4C40 7.4 92 8.4 140 9C166 9.3 185 8.8 198 7.2C188 10.8 166 12.6 140 13C92 13.6 42 14.6 15 15C8.4 15.1 5.3 13.8 5 11.4Z'/%3E%3Cpath d='M120 14.6C146 14.4 170 13.4 186 11.6C172 15 148 16.4 120 16.2Z' opacity='.55'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M5 11.4C4.6 8 7.8 6.2 13 6.4C40 7.4 92 8.4 140 9C166 9.3 185 8.8 198 7.2C188 10.8 166 12.6 140 13C92 13.6 42 14.6 15 15C8.4 15.1 5.3 13.8 5 11.4Z'/%3E%3Cpath d='M120 14.6C146 14.4 170 13.4 186 11.6C172 15 148 16.4 120 16.2Z' opacity='.55'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  pointer-events: none;
  z-index: -1;
}

.around-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; }

.around:has(.around-row:empty) { display: none; }

.face {
  width: 26px; height: 26px;
  border-radius: 50%;
  overflow: hidden;
  display: grid; place-items: center;
  background: var(--raised);
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--card) 92%, transparent), var(--sink);
  font-size: 11px; font-weight: 600; color: var(--fg-2);
  animation: face-pop 420ms var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 70ms);
}
.face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.face-more { background: var(--card); color: var(--fg-2); font-size: 11px; }
@keyframes face-pop {
  from { opacity: 0; scale: .4; }
  to   { opacity: 1; scale: 1; }
}
@media (prefers-reduced-motion: reduce) { .face { animation: none; } }

.face { overflow: visible; }
.face > img, .face > .face-i { border-radius: 50%; width: 100%; height: 100%; object-fit: cover; display: block; }
.face { position: relative; }
.face:hover, .face:focus-visible { z-index: 4; }
.face-name {
  position: absolute; left: 50%; top: calc(100% + 6px);
  translate: -50% 0;
  padding: 3px 9px; border-radius: var(--r-pill);
  background: var(--card);
  box-shadow: var(--sink), 0 0 0 1px color-mix(in srgb, var(--fg) 10%, transparent),
              0 6px 14px -8px rgba(26, 24, 19, .4);
  color: var(--fg); font-size: var(--fs-fine); font-weight: 600; line-height: 1.3;
  white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity var(--fast) var(--ease);
  z-index: 3;
}
.face:hover .face-name, .face:focus-visible .face-name { opacity: 1; }

.nc {
  position: absolute; z-index: 5;
  max-width: calc(100vw - 32px);
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 16px 6px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--fg) 90%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--bg) 14%, transparent) inset,
              0 18px 36px -18px rgba(20, 14, 8, .6), 0 2px 6px rgba(20, 14, 8, .12);
  color: var(--bg); text-decoration: none; white-space: nowrap;
  opacity: 0; translate: -14px 0; scale: .92; transform-origin: left center;
  transition: opacity 360ms var(--ease),
              translate 560ms cubic-bezier(.2, 1.25, .3, 1),
              scale 560ms cubic-bezier(.2, 1.25, .3, 1);
}
.nc.is-in { opacity: 1; translate: 0 0; scale: 1; }
.nc.is-out { opacity: 0; translate: 0 -10px; scale: .98; transition-duration: 380ms; }
.nc:hover { background: var(--fg); }
.nc:focus-visible { outline: 2px solid var(--seal); outline-offset: 3px; }
.nc-app {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 34% 28%, #DE6A48, var(--seal) 58%, #A93822);
  color: var(--seal-on); font-family: var(--serif-hz); font-size: 19px; line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
}
.nc-place {
  font-family: var(--serif); font-size: 22px; font-weight: 700; line-height: 1;
  letter-spacing: -.01em; font-variant-numeric: tabular-nums;
}
.nc-move {
  padding: 2px 7px; border-radius: 99px;
  font-size: 12px; font-weight: 700; line-height: 1.3; font-variant-numeric: tabular-nums;
  color: #fff; background: var(--growth-4);
}
.nc-move.down { background: var(--seal); }
.nc-who {
  display: inline-flex; align-items: center; gap: 6px; min-width: 0;
  padding-left: 10px;
  box-shadow: inset 1px 0 0 color-mix(in srgb, var(--bg) 22%, transparent);
  font-size: 13px; font-weight: 600;
}
.nc-who .av { width: 24px; height: 24px; font-size: 11px; }
.nc-name { max-width: 9em; overflow: hidden; text-overflow: ellipsis; }
.nc-who.by .nc-name { color: color-mix(in srgb, #F2A184 60%, var(--bg)); }
.nc-xp {
  margin-left: 2px;
  font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums;
  color: color-mix(in srgb, var(--bg) 78%, transparent);
}
.nc-xp.gained { color: color-mix(in srgb, var(--growth-3) 88%, var(--bg)); }
.nc-xp small { margin-left: 3px; font-size: 11px; font-weight: 600; letter-spacing: .04em; opacity: .75; }
@media (prefers-reduced-motion: reduce) {
  .nc, .nc.is-out { translate: 0 0; scale: 1; transition: opacity 300ms linear; }
}

.mark:focus-visible { outline: none; }
.mark:focus-visible .mark-art {
  outline: 2px solid var(--seal); outline-offset: 6px; border-radius: var(--r-card);
}

.court.is-flying .court-art,
.court.is-flying .marks {
  transition: transform 620ms cubic-bezier(.55, 0, .85, .3);
}
.court.is-flying .mark,
.court.is-flying .scroll { opacity: 0; pointer-events: none; }
.court.is-flying .scroll { transition: opacity 260ms var(--ease); }

.scroll {
  width: min(880px, 100%);
  margin-inline: auto;
  display: grid;
  grid-template-rows: 1fr auto;
  transition: grid-template-rows 620ms var(--ease);
}
.scroll.is-rolled { grid-template-rows: 0fr auto; }
.scroll-body { cursor: pointer; }

.scroll-in { transition: transform 620ms var(--ease); }
.scroll.is-rolled .scroll-in { transform: translateY(-46%); }

.scroll-body { position: relative; }
.scroll-body::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 30px;
  pointer-events: none;
  background: linear-gradient(to top, rgba(26, 24, 19, .16), transparent);
  opacity: 0; transition: opacity 620ms var(--ease);
}
.scroll.is-rolled .scroll-body::after { opacity: 1; }

.rod-bar { transition: height 620ms var(--ease); }
.scroll.is-rolled .rod-bar { height: 17px; }

.scroll-body {
  overflow: hidden;
  border-radius: 0 0 var(--r-panel) var(--r-panel);
  background:
    repeating-linear-gradient(to bottom,
      rgba(150, 122, 78, .06) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(to right,
      rgba(150, 122, 78, .03) 0 1px, transparent 1px 4px),
    radial-gradient(120% 100% at 12% -10%,
      rgba(255, 244, 214, .12) 0%, transparent 62%),
    radial-gradient(90% 80% at 100% 110%,
      rgba(120, 84, 40, .12) 0%, transparent 70%),
    color-mix(in srgb, color-mix(in srgb, var(--card) 86%, #B48A52) 78%, transparent);
  backdrop-filter: blur(26px) saturate(1.12);
  box-shadow: var(--edge), 0 1px 2px rgba(26, 24, 19, .04), 0 26px 54px -36px rgba(26, 24, 19, .32);
}
.scroll-in {
  position: relative;
  padding: var(--s5) var(--s6) var(--s5);
  display: grid;
  gap: var(--s4);
}
.scroll-in::before {
  content: ''; position: absolute; inset: 0 12px 12px; pointer-events: none;
  border: 1px solid color-mix(in srgb, #C9A566 42%, transparent); border-top: 0;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 0 0 3px transparent, inset 0 0 0 2px transparent,
              inset 0 -3px 0 -2px color-mix(in srgb, #C9A566 22%, transparent);
}
.scroll-said h1 { font-size: var(--t-h2); letter-spacing: -.015em; margin: 0; }
.scroll-said .fine { margin: 4px 0 0; }

.scroll-in {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s6);
}
.scroll-do {
  display: grid; justify-items: start; gap: 4px;
  text-align: left;
}
.scroll-n {
  font-family: var(--serif); font-size: var(--t-h2);
  letter-spacing: -.015em; line-height: 1.05;
}
.scroll-do .btn { margin-top: 6px; }

.flame {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 11px 3px 8px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--seal) 12%, var(--card));
  color: var(--fg);
}
.flame-i { display: block; width: 15px; height: 15px; color: var(--seal); }
.flame-i svg { width: 100%; height: 100%; display: block; }
.flame b { font-size: var(--t-body); }
.flame:hover { background: color-mix(in srgb, var(--seal) 20%, var(--card)); }

.scroll-course {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: var(--s4);
  padding: var(--s3) var(--s4);
  border-radius: var(--r-card);
  background: var(--raised);
  text-decoration: none; color: inherit;
}
.scroll-course .tc-g { font-family: var(--serif-hz); font-size: 26px; color: var(--seal-on); }
.scroll-course .tc-b { display: grid; gap: 2px; }

.scroll-nums {
  display: flex; flex-wrap: wrap; gap: var(--s4);
  margin: var(--s3) 0 0;
  font-size: var(--t-cap); color: var(--fg-2);
}
.scroll-nums a { color: inherit; text-decoration: none; }
.scroll-nums a:hover { color: var(--fg); }
.scroll-nums b { font-size: var(--t-body); color: var(--fg); font-weight: 600; }

.scroll-rod {
  position: relative;
  justify-self: center;
  display: grid;
  justify-items: center;
  gap: 3px;
  width: calc(100% + 36px);
  margin-top: -4px;
  padding: 0 0 2px;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.rod-bar {
  position: relative;
  width: calc(100% - 28px); height: 11px;
  border-radius: 3px;
  background: linear-gradient(to bottom, #7A4A2C 0%, #5A3320 42%, #351C10 100%);
  box-shadow: 0 8px 16px -8px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 226, 190, .18);
}
.rod-bar::before,
.rod-bar::after {
  content: ''; position: absolute; top: 50%;
  width: 14px; height: 19px; border-radius: 4px;
  translate: 0 -50%;
  background: linear-gradient(to bottom, #D45A3C 0%, var(--seal) 50%, #8C2C1A 100%);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 220, 200, .3);
}
.rod-bar::before { left: -13px; }
.rod-bar::after { right: -13px; }
.rod-grip {
  position: relative;
  width: 2px; height: 12px;
  border-radius: var(--r-pill);
  background: var(--seal);
  opacity: .75;
  transition: opacity var(--base) var(--ease), height var(--base) var(--ease);
}
.rod-grip::after {
  content: ''; position: absolute; left: 50%; bottom: -5px; translate: -50% 0;
  width: 6px; height: 7px; border-radius: 2px 2px 3px 3px; background: var(--seal);
}
.scroll-rod:hover .rod-grip,
.scroll-rod:focus-visible .rod-grip { opacity: 1; height: 15px; }
.scroll-rod:focus-visible { outline: 2px solid var(--seal); outline-offset: 4px; border-radius: var(--r-pill); }
.rod-say {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 8px; padding: 3px 10px 3px 9px; border-radius: var(--r-pill);
  font-size: var(--fs-fine); line-height: 1.3; color: var(--fg-2);
  background: color-mix(in srgb, var(--card) 82%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fg) 12%, transparent);
  transition: color var(--base) var(--ease), box-shadow var(--base) var(--ease);
}
.rod-say::before {
  content: ''; width: 6px; height: 6px; flex: none;
  border-left: 1.6px solid currentColor; border-top: 1.6px solid currentColor;
  rotate: 45deg; translate: 0 2px;
}
.scroll-rod[aria-expanded="false"] .rod-say::before { rotate: 225deg; translate: 0 -2px; }
.scroll-rod:hover .rod-say,
.scroll-rod:focus-visible .rod-say { color: var(--seal-text); box-shadow: inset 0 0 0 1px var(--seal); }

.scroll.scroll-tight .scroll-in { padding-block: var(--s4); gap: var(--s3); }

@media (max-width: 743px) {
  .court {
    height: auto;
    min-height: 0;
    container-type: normal;
    display: grid;
    gap: var(--s4);
    background: none;
    margin-bottom: var(--s5);
  }

  .court-band { display: block; }

  .court-art {
    position: relative;
    left: auto; top: auto; translate: none;
    width: 100%; height: 190px;
    transform: none;
    border-radius: var(--r-panel);
    overflow: hidden;
    box-shadow: var(--panel);
    background: var(--bg-sunken);
  }
  .court-veil { display: none; }

  .marks {
    position: relative;
    left: auto; top: auto; translate: none;
    width: 100%; height: auto;
    transform: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    gap: var(--s3);
  }
  .mark {
    position: relative;
    left: auto; top: auto;
    transform: none;
    padding: var(--s4) var(--s2);
    border-radius: var(--r-card);
    background: var(--card);
    box-shadow: var(--panel);
    gap: var(--s2);
  }
  .mark-art { background: none; }
  .mark-art svg { width: 58px; height: 58px; }
  .mark-tag { padding: 0; background: none; backdrop-filter: none; scale: 1; }

  .scroll {
    position: relative;
    left: auto; translate: none;
    width: 100%;
    order: -1;
  }
  .scroll-body { border-radius: var(--r-panel); backdrop-filter: none; background: var(--card); }
  .scroll-in { padding: var(--s5) var(--s4); }
  .scroll-in { grid-template-columns: 1fr; gap: var(--s4); }
  .scroll-do, .scroll-do:has(.camp-plan) { justify-items: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  .court.is-leaning { --zoom: 1; }
  .court-art,
  .marks,
  .mark,
  .scroll { transition: none; }
}

@media (min-width: 744px) {
  .lintel {
    position: relative;
    z-index: 0;
    width: min(calc(var(--sheet, 980px) - 60px), calc(100% - 60px));
    margin: calc(58px + env(safe-area-inset-top)) auto 6px;
    height: 26px;
    color: color-mix(in srgb, #1C1E18 74%, transparent);
    filter: var(--art-filter);
    pointer-events: none;
  }
  .lintel svg { width: 100%; height: 100%; display: block; }
  body.at-league .lintel {
    color: color-mix(in srgb, #1C1E18 34%, transparent);
    filter: var(--art-filter) blur(4px);
    height: 34px;
    mask-image: linear-gradient(to bottom, #000 0, #000 58%, transparent 100%);
  }

  body.at-league .board li {
    background: color-mix(in srgb, var(--raised) 34%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fg) 7%, transparent);
  }
  body.at-league .board li.me {
    background: color-mix(in srgb, var(--raised) 92%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--seal) 34%, transparent);
  }

  body:not(.in-court):not(.in-intro) #view {
    max-width: min(var(--sheet, 980px), calc(100% - 2 * var(--gutter)));
  }
  body:not(.in-court):not(.in-intro):has(#lintel:not([hidden])) #view { margin-top: 0; }
  #view { position: relative; z-index: 1; }

  body.at-training { --sheet: 1240px; }
  body.at-training:not(.in-court):not(.in-intro) #view:has(.camp-screen) {
    padding: var(--s2);
    margin-top: calc(44px + env(safe-area-inset-top));
    margin-bottom: var(--s4);
    max-height: calc(100dvh - 44px - env(safe-area-inset-top) - var(--s4));
    overflow: hidden;
  }
  body:has(.camp-screen),
  html:has(.camp-screen) {
    overflow: hidden;
    overscroll-behavior: none;
    height: 100%;
  }

  body.at-training .court.is-open .mark.is-here { opacity: 0; }
  body.at-training:not(.in-court):not(.in-intro) #view:has(.camp-screen) {
    background: none;
    backdrop-filter: none;
    box-shadow: none;
  }
  body.at-training .seg {
    gap: var(--s4);
    padding: var(--s5);
    border-radius: var(--r-panel);
    background: color-mix(in srgb, var(--card) 84%, transparent);
    box-shadow: var(--sink), 0 0 0 1px color-mix(in srgb, var(--fg) 7%, transparent),
                0 30px 60px -44px rgba(26, 24, 19, .5);
    backdrop-filter: blur(16px) saturate(1.06);
  }
  body.at-training .brows {
    background: none;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
  }
  body.at-training .brow { padding-inline: 0; }
  body.at-training .brow:first-child { padding-top: 0; }
  body.at-training .brow:last-child { padding-bottom: 0; }
  body.at-training .seg-h { color: var(--fg-2); }
  body.at-training .screen-head,
  body.at-training .screen > .note {
    align-self: start;
    max-width: max-content;
    padding: var(--s4) var(--s5);
    border-radius: var(--r-panel);
    background: color-mix(in srgb, var(--card) 86%, transparent);
    box-shadow: var(--sink), 0 0 0 1px color-mix(in srgb, var(--fg) 8%, transparent);
    backdrop-filter: blur(10px);
  }
  body.at-training .screen > .note { padding: var(--s3) var(--s5); }

  body.at-library { --sheet: 1300px; }
  body.at-library:not(.in-court):not(.in-intro) #view:not(:has(.lib-wall)) {
    max-width: min(1020px, 100%);
  }
  body.at-library:not(.in-court):not(.in-intro) #view:has(.lib-wall) {
    display: flex; flex-direction: column;
    --fg: #EFE7D5;
    --fg-2: #C8BCA4;
    --muted: #B1A691;
    --hair: rgba(240, 232, 214, .13);
    --card: rgba(58, 45, 34, .5);
    --raised: rgba(240, 228, 202, .07);
    --bg-sunken: rgba(20, 15, 10, .4);
    --seal-text: #E0A886;
    --edge: none;
    --bg: #2A2019;
    color: var(--fg);
    --room-x: 224px;
    --room-b: 116px;
    --room-floor-h: 84px;
    padding-left: var(--room-x);
    padding-right: var(--room-x);
    padding-bottom: var(--room-b);
    background:
      radial-gradient(90% 60% at 50% 0%, rgba(250, 206, 136, .16), transparent 70%),
      radial-gradient(120% 90% at 50% 46%, transparent 40%, rgba(14, 9, 5, .5) 100%),
      repeating-linear-gradient(to bottom,
        transparent 0 33px, rgba(240, 228, 202, .035) 33px 34px),
      linear-gradient(168deg, #3A2D22 0%, #2A2019 100%);
    box-shadow:
      inset 0 0 0 1px rgba(240, 228, 202, .07),
      0 0 0 16px #241B14,
      0 0 0 21px #3B2E23,
      0 24px 60px -24px rgba(0, 0, 0, .7);
    --t1-keep: 66%; --t2-keep: 100%; --t3-keep: 93%; --t4-keep: 77%; --t5-keep: 76%;
    --jade-keep: 93%; --amber-keep: 67%; --violet-keep: 79%;
  }
  body.at-library #view:has(.lib-wall) .cell:is(.ph-ready, .ph-learning, .ph-learned) {
    background: color-mix(in srgb, var(--ph) 22%, #241B14);
    --t1-keep: 57%; --t2-keep: 100%; --t3-keep: 76%; --t4-keep: 63%; --t5-keep: 63%;
    --jade-keep: 76%; --amber-keep: 100%; --violet-keep: 65%;
  }
  body.at-library #view:has(.lib-wall) .cell:is(.ph-ready, .ph-learning, .ph-learned):hover {
    background: color-mix(in srgb, var(--ph) 32%, #241B14);
  }
  body.at-library .screen { flex: 1 1 auto; }
  body.at-library .room-floor, body.at-stats .room-floor {
    display: block;
    order: 9; margin-top: auto;
    margin-inline: calc(-1 * var(--room-x));
    margin-bottom: calc(-1 * var(--room-b));
    height: var(--room-floor-h);
    background:
      linear-gradient(to bottom, rgba(22, 15, 9, .5) 0 5px, transparent 5px),
      repeating-linear-gradient(to right,
        rgba(22, 15, 9, .34) 0 1px, transparent 1px 68px),
      linear-gradient(to bottom, #6B5238 0%, #4C3A27 100%);
    z-index: 0;
  }
  body.at-stats .room-floor { grid-column: 1 / -1; }
  body.at-library .screen { position: relative; }
  body.at-library .screen > *:not(.lib-wall):not(.lib-ivy):not(.lib-lantern):not(.room-floor) {
    position: relative; z-index: 1;
  }
  body.at-library .screen.char { max-width: none; }
  body.at-library .screen.char
    > *:not(.lib-wall):not(.lib-ivy):not(.lib-lantern):not(.room-floor) {
    width: min(100%, 760px);
    margin-inline: auto;
  }

  body.at-library .lib-wall {
    position: absolute; top: 0; bottom: 0; z-index: 0;
    width: 164px;
    display: block;
    overflow: hidden;
    background:
      var(--books, none) 0 0 / 100% auto repeat-y,
      repeating-linear-gradient(to bottom,
        transparent 0 90px, #4A392A 90px 96px),
      linear-gradient(to bottom, #2E241B 0%, #241B14 100%);
    box-shadow: inset 0 0 0 7px #3B2E23, inset 0 0 0 8px rgba(0, 0, 0, .34);
  }
  body.at-library .lib-wall-l { left: calc(-1 * var(--room-x) + 24px); }
  body.at-library .lib-wall-r { right: calc(-1 * var(--room-x) + 24px); }
  .b0 { background-color: #6E3226; }
  .b1 { background-color: #7C6330; }
  .b2 { background-color: #34503C; }
  .b3 { background-color: #2F4257; }
  .b4 { background-color: #C0B193; }
  .b5 { background-color: #4A3428; }

  body.at-library .lib-ivy {
    display: block;
    position: absolute; top: -6px; z-index: 2;
    width: 62px;
    color: #4E6B44;
    pointer-events: none;
    filter: drop-shadow(0 4px 6px rgba(12, 8, 4, .55));
  }
  body.at-library .lib-ivy svg { width: 100%; height: auto; display: block; }
  .ivy-leaf { opacity: .95; }
  body.at-library .lib-ivy-l { left: calc(-1 * var(--room-x) + 40px); }
  body.at-library .lib-ivy-r { right: calc(-1 * var(--room-x) + 32px); scale: -1 1; }

  body.at-library .lib-lantern {
    display: block;
    position: absolute; top: 18px; z-index: 3;
    right: calc(-1 * var(--room-x) + 120px);
    width: 76px;
    color: #241B14;
    pointer-events: none;
  }
  body.at-library .lib-lantern svg { width: 100%; height: auto; display: block; overflow: visible; }
  .lib-lamp-body {
    filter: drop-shadow(0 0 9px rgba(244, 118, 66, .85))
            drop-shadow(0 0 28px rgba(232, 96, 52, .55))
            drop-shadow(0 0 70px rgba(240, 146, 78, .36));
  }
  .lib-lamp-rib { stroke: rgba(98, 22, 12, .5); }
  .lib-lamp-gold { fill: #D19A38; }
  .lib-lamp-band { stroke: #8A5F1C; }
  .lib-lamp-tassel { fill: #B8392A; }
  .lib-lamp-fringe { fill: none; stroke: rgba(70, 14, 8, .45); stroke-width: 1; }

  body.at-library .rack-eave { color: #6B5238; }
  body.at-library .levels-rack {
    background: linear-gradient(to bottom, #3A2D22 0%, #2E241B 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 248, 232, .09),
                0 3px 8px -4px rgba(0, 0, 0, .6);
  }
  body.at-library .levels-rack .level {
    background: rgba(18, 13, 8, .45);
    box-shadow: inset 0 0 0 1px rgba(255, 248, 232, .05);
  }
  body.at-library .levels-rack .level.on {
    background: linear-gradient(to bottom, #8C4A2E 0%, #77391F 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 220, 170, .3),
                0 0 16px rgba(240, 176, 88, .35);
  }

  body.at-stats { --sheet: 1260px; }
  body.at-stats .screen {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 40px; 
    align-items: stretch;
  }
  body.at-stats .screen > * { grid-column: 1 / -1; }
  body.at-stats .screen-head { grid-row: 1; }
  body.at-stats .gw-block { min-height: 322px; }
  body.at-stats .gw-art {
    left: auto; right: 0; width: 36%; bottom: 96px;
    align-items: center;
  }
  body.at-stats .gw-panes { grid-template-columns: 1fr; width: 62%; gap: var(--s5); }
  body.at-stats .gw-plaques { margin-top: auto; }
  body.at-stats .gw-plot { margin-top: var(--s2); }
  body.at-stats .gw-seal {
    place-items: center;
    font-size: 76px;
    padding-top: 42px;
    opacity: .12;
  }
  body.at-stats .pg-hero { grid-column: 1; grid-row: 2; }
  body.at-stats .gw-block { grid-column: 2; grid-row: 2; }
  body.at-stats .sk-block { grid-column: 1; grid-row: 3; }
  body.at-stats .id-block { grid-column: 2; grid-row: 3; }
  body.at-stats .bl-block { grid-column: 1; grid-row: 4; }
  body.at-stats .tn-block { grid-column: 2; grid-row: 4; }
  body.at-stats .stats-grid { grid-row: 5; margin-top: 82px; }
  body.at-stats .heat-block { order: 2; }
  body.at-stats .pg-hero {
    flex-direction: column; align-items: center; justify-content: center;
    gap: var(--s5);
    text-align: center;
    min-height: 210px;
  }
  body.at-stats .pg-main {
    flex-direction: column; align-items: center; gap: 2px;
  }
  body.at-stats .pg-n { font-size: clamp(56px, 6.4vw, 88px); }
  body.at-stats .pg-k { font-size: var(--fs-body); letter-spacing: .02em; }
  body.at-stats .pg-week { gap: 14px; }
  body.at-stats .pg-d { gap: 9px; }
  body.at-stats .pg-dl { font-size: var(--fs-fine); letter-spacing: .04em; }
  body.at-stats .pg-dot {
    width: 26px; height: 26px;
    border-width: 2px; border-color: rgba(240, 236, 224, .32);
  }
  body.at-stats .pg-d.on .pg-dot {
    background: #EFEBDF; border-color: #EFEBDF;
    box-shadow: 0 0 9px rgba(240, 236, 224, .45);
  }
  body.at-stats:not(.in-court):not(.in-intro) #view {
    --fg: #2C2720;
    --fg-2: #4E463A;
    --muted: #564F42;
    --t1-keep: 55%; --t2-keep: 37%; --t3-keep: 44%; --t4-keep: 51%; --t5-keep: 52%;
    --jade-keep: 44%; --amber-keep: 37%; --violet-keep: 50%;
    --hair: rgba(58, 48, 34, .15);
    --card: rgba(255, 252, 243, .5);
    --raised: rgba(92, 78, 54, .1);
    --bg-sunken: rgba(92, 78, 54, .14);
    --seal-text: #9E3B24;
    --sink: 0 1px 2px rgba(48, 40, 28, .12);
    --panel: 0 1px 3px rgba(48, 40, 28, .12);
    --edge: none;
    color: var(--fg);

    border-radius: 2px;
    background:
      linear-gradient(to top, rgba(48, 40, 28, .22) 0, transparent 120px),
      radial-gradient(70% 90% at -6% 34%, rgba(255, 246, 226, .7), transparent 66%),
      radial-gradient(56% 46% at 92% 78%, rgba(74, 60, 40, .16), transparent 70%),
      radial-gradient(120% 100% at 42% 44%, transparent 46%, rgba(60, 48, 30, .19) 100%),
      repeating-linear-gradient(126deg,
        rgba(92, 78, 54, .022) 0 2px, transparent 2px 5px),
      linear-gradient(172deg, #DED6C6 0%, #D5CCB8 62%, #CAC0A9 100%);
    box-shadow:
      inset 0 0 0 1px rgba(255, 250, 238, .16),
      0 0 0 16px #2D2721,
      0 0 0 21px #443A2D,
      0 0 0 22px rgba(0, 0, 0, .35),
      0 30px 60px -28px rgba(0, 0, 0, .55);
    --room-x: 148px;
    --room-b: clamp(28px, 3vw, 52px);
    --room-floor-h: 92px;
    padding-left: var(--room-x);
    padding-right: var(--room-x);
    backdrop-filter: none;
  }
  body.at-stats .screen { position: relative; z-index: 1; }
  body.at-stats .screen > *:not(.board-seal):not(.room-lamp) { position: relative; z-index: 1; }
  body.at-stats .screen::before,
  body.at-stats .screen::after {
    content: '';
    position: absolute; top: 0; bottom: 0;
    width: 128px;
    z-index: 0;
    background:
      repeating-linear-gradient(to right, #2A221A 0 6px, transparent 6px 38px),
      repeating-linear-gradient(to bottom, #2A221A 0 6px, transparent 6px 38px),
      linear-gradient(to bottom, #5B5A86 0%, #9E7390 38%, #E0A07C 72%, #F2C48E 100%);
    box-shadow: inset 0 0 0 9px #241D16, inset 0 0 0 10px rgba(0, 0, 0, .4);
  }
  body.at-stats .screen::before {
    left: calc(-1 * var(--s5) - 148px);
    box-shadow: inset 0 0 0 9px #241D16, inset 0 0 0 10px rgba(0, 0, 0, .4),
                9px 0 30px -10px rgba(240, 170, 110, .3);
  }
  body.at-stats .screen::after {
    right: calc(-1 * var(--s5) - 148px);
    box-shadow: inset 0 0 0 9px #241D16, inset 0 0 0 10px rgba(0, 0, 0, .4),
                -9px 0 30px -10px rgba(240, 170, 110, .3);
  }

  .room-lamp {
    display: block;
    position: absolute; top: -14px; z-index: 2;
    right: calc(-1 * var(--s5) - 112px);
    width: 84px;
    color: #2F281F;
    pointer-events: none;
  }
  .room-lamp svg { width: 100%; height: auto; display: block; }
  .room-lamp .lamp-hang { fill: #2F281F; }
  .room-lamp .lamp-body { fill: url(#pg-lamp-lit); }
  .room-lamp::before {
    content: ""; position: absolute; z-index: -1;
    left: 50%; top: 79px; width: 210px; height: 210px;
    translate: -50% -50%; border-radius: 50%;
    background: radial-gradient(circle, rgba(246, 128, 78, .5) 0%,
      rgba(246, 150, 92, .22) 34%, rgba(250, 190, 120, .08) 56%, transparent 70%);
  }
  .room-lamp .lamp-rib { fill: none; stroke: #8E2216; stroke-width: 1.3; opacity: .55; }
  .room-lamp .lamp-gold { fill: #D6A03C; }
  .room-lamp .lamp-band { fill: #9A6A1E; }

  body.at-stats .pg-hero {
    --fg: #EFEBDF;
    --fg-2: #C8C2B0;
    --muted: #A19A8A;
    --seal: #E9B3A2;
    --hair: rgba(240, 236, 224, .16);
    color: var(--fg);
    border-radius: 3px;
    background:
      radial-gradient(70% 60% at 22% 26%, rgba(240, 236, 224, .05), transparent 72%),
      radial-gradient(60% 70% at 84% 78%, rgba(240, 236, 224, .04), transparent 70%),
      linear-gradient(168deg, #24241F 0%, #1D1D19 100%);
    box-shadow:
      0 0 0 7px #4A3F30,
      0 0 0 8px rgba(0, 0, 0, .4),
      0 14px 28px -14px rgba(0, 0, 0, .55);
    text-shadow: 0 0 6px rgba(240, 236, 224, .18);
  }
  body.at-stats .pg-n { color: #F3EFE4; }

  body.at-stats .sk-block,
  body.at-stats .fc-block,
  body.at-stats .tc-block,
  body.at-stats .mem-block,
  body.at-stats .sp-block,
  body.at-stats .gw-block,
  body.at-stats .id-block,
  body.at-stats .bl-block,
  body.at-stats .tn-block,
  body.at-stats .heat-block {
    --fg: #2C2720;
    --fg-2: #4E463A;
    --muted: #544D40;
    --hair: rgba(58, 48, 34, .16);
    --growth-0: rgba(58, 48, 34, .08);
    --growth-1: #C9D9C2;
    --growth-2: #A6C8A4;
    --growth-3: #82B887;
    --growth-4: #5FA86A;
    color: var(--fg);
    padding: var(--s5);
    border-radius: 2px;
    background:
      radial-gradient(56% 46% at 14% 14%, rgba(255, 255, 255, .28), transparent 70%),
      radial-gradient(120% 100% at 50% 50%, transparent 58%, rgba(58, 74, 70, .12) 100%),
      repeating-linear-gradient(to bottom,
        rgba(70, 86, 82, .03) 0 1px, transparent 1px 3px),
      linear-gradient(168deg, #E5EBE6 0%, #D6E0DC 100%);
    box-shadow:
      inset 0 0 0 5px #EDE5D2,
      inset 0 0 0 6px rgba(176, 134, 58, .7),
      0 0 0 3px #46392C,
      0 0 0 11px #2B241C,
      0 0 0 12px rgba(0, 0, 0, .3),
      0 0 34px 8px rgba(250, 226, 178, .38),
      0 16px 30px -16px rgba(0, 0, 0, .45);
  }

  body.at-stats .sk {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-top: var(--s4);
    border-radius: 2px;
    background: linear-gradient(168deg, #6B573C 0%, #57462F 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 248, 232, .1),
                0 2px 6px -3px rgba(38, 30, 20, .5);
  }
  body.at-stats .sk li {
    display: flex; flex-direction: column; align-items: center;
    gap: var(--s3);
    padding: var(--s4) var(--s3) var(--s4);
    box-shadow: inset -1px 0 0 rgba(38, 30, 20, .4),
                inset 0 -4px 0 rgba(38, 30, 20, .28);
  }
  body.at-stats .sk li:nth-child(2n) { box-shadow: inset 0 -4px 0 rgba(38, 30, 20, .28); }
  body.at-stats .sk-track {
    position: relative;
    width: 62px; height: 96px;
    border-radius: 6px 6px 11px 11px;
    overflow: hidden;
    background: linear-gradient(to bottom, rgba(255, 252, 244, .5), rgba(240, 232, 214, .3));
    box-shadow: inset 0 0 0 1px rgba(255, 252, 244, .5),
                inset 0 8px 0 rgba(58, 48, 34, .22),
                0 2px 4px -2px rgba(38, 30, 20, .6);
  }
  body.at-stats .sk-track::after {
    content: '';
    position: absolute; left: 8px; top: 16px; bottom: 8px; width: 6px;
    border-radius: 3px;
    background: linear-gradient(to bottom, rgba(255, 253, 248, .62), transparent);
    z-index: 2;
  }
  body.at-stats .sk-track i { inset: auto 0 0 0; width: auto; border-radius: 0; }
  body.at-stats .sk-started {
    height: calc(var(--started, 0) * 0.86px);
    background: color-mix(in srgb, var(--jade) 40%, #E7DFC8);
  }
  body.at-stats .sk-learned { height: calc(var(--learned, 0) * 0.86px); }
  body.at-stats .sk-pc {
    display: block;
    position: absolute; left: 0; right: 0; top: 50%; z-index: 3;
    translate: 0 -30%;
    text-align: center;
    font-family: 'Fraunces', Georgia, serif; font-size: 17px; font-weight: 600;
    font-variant-numeric: lining-nums tabular-nums; line-height: 1;
    color: #2C2720;
    text-shadow: 0 0 3px rgba(255, 252, 244, .95), 0 0 7px rgba(255, 252, 244, .8);
  }
  body.at-stats .sk-k { color: #F0E9D8; font-weight: 500; font-size: var(--fs-body);
    text-align: center; line-height: 1.25; text-wrap: balance; }
  body.at-stats .sk-track { margin-top: auto; }
  body.at-stats .sk-n { min-width: 0; text-align: center; color: #D2C9B5; }

  body.at-stats .stats-grid {
    --fg: #EDE7D8;
    --muted: #A2998A;
    position: relative;
    gap: 2px;
    padding: 6px;
    border-radius: 3px;
    background: linear-gradient(168deg, #2C251D 0%, #221C16 100%);
    box-shadow:
      0 0 0 5px #4A3F30,
      0 0 0 6px rgba(0, 0, 0, .4),
      0 16px 30px -16px rgba(0, 0, 0, .5);
  }
  body.at-stats .stats-grid > *:not(.bonsai):not(.drawers-k) {
    position: relative;
    padding: var(--s4) var(--s4) var(--s4) var(--s6);
    border-radius: 2px;
    color: var(--fg);
    background: linear-gradient(168deg, #3A3027 0%, #2E2720 100%);
    box-shadow: inset 0 1px 0 rgba(240, 236, 224, .07),
                inset 0 -1px 0 rgba(0, 0, 0, .3);
  }
  body.at-stats .stats-grid { grid-template-columns: repeat(3, 1fr); }
  body.at-stats .stats-grid > .stat:not(.bonsai):not(.drawers-k) {
    padding: 20px var(--s5) 20px 42px; justify-content: center; }
  body.at-stats .stats-grid .stat-n { font-size: 40px; color: #F6F0E2; }
  body.at-stats .stats-grid .stat-k { font-size: 14px; color: #CFC6B4; margin-top: 6px; }
  body.at-stats .stats-grid > *:not(.bonsai):not(.drawers-k)::before {
    content: '';
    position: absolute; left: var(--s4); top: 50%;
    width: 9px; height: 9px;
    translate: 0 -50%;
    border-radius: 50%;
    background: radial-gradient(circle at 34% 30%, #D9B87C, #8A6B38);
    box-shadow: 0 1px 1px rgba(0, 0, 0, .5);
  }

  body.at-stats .bonsai {
    display: block;
    position: absolute; right: 44px; bottom: calc(100% - 5px);
    width: 112px;
    color: #2A2119;
    pointer-events: none;
    filter: drop-shadow(0 3px 5px rgba(28, 22, 14, .3));
  }
  body.at-stats .bonsai svg { width: 100%; height: auto; display: block; }
  body.at-stats .drawers-k {
    display: block;
    position: absolute; left: 12px; bottom: calc(100% + 7px);
    font-size: var(--fs-fine); letter-spacing: .08em; text-transform: uppercase;
    color: #8A7B62;
  }
  body.at-stats .bon-leaf { fill: #4E6B44; }
  body.at-stats .bon-pot { fill: #7C4A33; }

  body:is([data-phase="dusk"], [data-phase="night"]).at-stats:not(.in-court):not(.in-intro) #view {
    --fg: #EDE5D3;
    --fg-2: #CFC4AE;
    --t1-keep: 75%; --t2-keep: 100%; --t3-keep: 100%; --t4-keep: 82%; --t5-keep: 81%;
    --jade-keep: 100%; --amber-keep: 100%; --violet-keep: 84%;
    --muted: #B2A891;
    --hair: rgba(240, 230, 210, .14);
    --card: rgba(30, 25, 20, .5);
    --raised: rgba(240, 228, 202, .07);
    --bg-sunken: rgba(0, 0, 0, .28);
    --seal-text: #E6A58A;
    color: var(--fg);
    background:
      linear-gradient(to top, rgba(0, 0, 0, .38) 0, transparent 120px),
      radial-gradient(48% 56% at 97% 10%, rgba(246, 190, 110, .26), transparent 72%),
      radial-gradient(40% 50% at 2% 30%, rgba(120, 136, 196, .1), transparent 70%),
      radial-gradient(120% 100% at 42% 44%, transparent 40%, rgba(0, 0, 0, .34) 100%),
      repeating-linear-gradient(126deg,
        rgba(255, 240, 210, .018) 0 2px, transparent 2px 5px),
      linear-gradient(172deg, #3A3129 0%, #2F2821 62%, #26201A 100%);
  }
  body:is([data-phase="dusk"], [data-phase="night"]).at-stats .screen::before,
  body:is([data-phase="dusk"], [data-phase="night"]).at-stats .screen::after {
    background:
      repeating-linear-gradient(to right, #2A221A 0 6px, transparent 6px 38px),
      repeating-linear-gradient(to bottom, #2A221A 0 6px, transparent 6px 38px),
      radial-gradient(1.3px 1.3px at 30% 9%, #FFF6E0, transparent),
      radial-gradient(1px 1px at 72% 17%, #FFF6E0, transparent),
      radial-gradient(1.5px 1.5px at 54% 31%, #FFF6E0, transparent),
      radial-gradient(1px 1px at 18% 44%, #FFF6E0, transparent),
      radial-gradient(1.2px 1.2px at 84% 50%, #FFF6E0, transparent),
      linear-gradient(to bottom, #141A33 0%, #1D2443 58%, #262A44 100%);
  }
  body:is([data-phase="dusk"], [data-phase="night"]).at-stats .screen::before {
    box-shadow: inset 0 0 0 9px #241D16, inset 0 0 0 10px rgba(0, 0, 0, .4),
                9px 0 30px -10px rgba(130, 150, 210, .22);
  }
  body:is([data-phase="dusk"], [data-phase="night"]).at-stats .screen::after {
    box-shadow: inset 0 0 0 9px #241D16, inset 0 0 0 10px rgba(0, 0, 0, .4),
                -9px 0 30px -10px rgba(130, 150, 210, .22);
  }
  body[data-phase="dusk"].at-stats .screen::before,
  body[data-phase="dusk"].at-stats .screen::after {
    background:
      repeating-linear-gradient(to right, #2A221A 0 6px, transparent 6px 38px),
      repeating-linear-gradient(to bottom, #2A221A 0 6px, transparent 6px 38px),
      linear-gradient(to bottom, #5B5A86 0%, #9E7390 38%, #E0A07C 72%, #F2C48E 100%);
  }
  body[data-phase="dusk"].at-stats .screen::before {
    box-shadow: inset 0 0 0 9px #241D16, inset 0 0 0 10px rgba(0, 0, 0, .4),
                9px 0 30px -10px rgba(240, 170, 110, .3);
  }
  body[data-phase="dusk"].at-stats .screen::after {
    box-shadow: inset 0 0 0 9px #241D16, inset 0 0 0 10px rgba(0, 0, 0, .4),
                -9px 0 30px -10px rgba(240, 170, 110, .3);
  }
  body[data-phase="morning"].at-stats .screen::before,
  body[data-phase="morning"].at-stats .screen::after {
    background:
      repeating-linear-gradient(to right, #2A221A 0 6px, transparent 6px 38px),
      repeating-linear-gradient(to bottom, #2A221A 0 6px, transparent 6px 38px),
      linear-gradient(to bottom, #D9C07A 0%, #E8D296 34%, #F2E2B4 68%, #F9EFD4 100%);
  }
  body[data-phase="morning"].at-stats .screen::before {
    box-shadow: inset 0 0 0 9px #241D16, inset 0 0 0 10px rgba(0, 0, 0, .4),
                9px 0 30px -10px rgba(240, 204, 110, .36);
  }
  body[data-phase="morning"].at-stats .screen::after {
    box-shadow: inset 0 0 0 9px #241D16, inset 0 0 0 10px rgba(0, 0, 0, .4),
                -9px 0 30px -10px rgba(240, 204, 110, .36);
  }
  body:is([data-phase="dusk"], [data-phase="night"]).at-stats .sk-block,
  body:is([data-phase="dusk"], [data-phase="night"]).at-stats .fc-block,
  body:is([data-phase="dusk"], [data-phase="night"]).at-stats .tc-block,
  body:is([data-phase="dusk"], [data-phase="night"]).at-stats .mem-block,
  body:is([data-phase="dusk"], [data-phase="night"]).at-stats .sp-block,
  body:is([data-phase="dusk"], [data-phase="night"]).at-stats .gw-block,
  body:is([data-phase="dusk"], [data-phase="night"]).at-stats .id-block,
  body:is([data-phase="dusk"], [data-phase="night"]).at-stats .bl-block,
  body:is([data-phase="dusk"], [data-phase="night"]).at-stats .tn-block,
  body:is([data-phase="dusk"], [data-phase="night"]).at-stats .heat-block {
    --fg: #EDE5D3;
    --fg-2: #CFC4AE;
    --muted: #B2A891;
    --hair: rgba(240, 230, 210, .13);
    --raised: rgba(240, 228, 202, .07);
    --bg-sunken: rgba(0, 0, 0, .3);
    --growth-0: rgba(240, 230, 210, .07);
    --growth-1: #2E4632;
    --growth-2: #3C6443;
    --growth-3: #4E8757;
    --growth-4: #63A86D;
    color: var(--fg);
    background:
      radial-gradient(56% 46% at 86% 12%, rgba(246, 196, 120, .08), transparent 70%),
      radial-gradient(120% 100% at 50% 50%, transparent 54%, rgba(0, 0, 0, .28) 100%),
      repeating-linear-gradient(to bottom,
        rgba(255, 240, 210, .02) 0 1px, transparent 1px 3px),
      linear-gradient(168deg, #3A332A 0%, #312B23 100%);
    box-shadow:
      0 0 0 3px #3A2F24,
      0 0 0 11px #1E1914,
      0 0 0 12px rgba(0, 0, 0, .4),
      0 0 30px 6px rgba(246, 190, 110, .1),
      0 16px 30px -16px rgba(0, 0, 0, .6);
  }
  body:is([data-phase="dusk"], [data-phase="night"]).at-stats .room-lamp::before {
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(250, 132, 80, .7) 0%,
      rgba(246, 150, 90, .3) 30%, rgba(246, 176, 100, .12) 52%, transparent 70%);
  }
  body:is([data-phase="dusk"], [data-phase="night"]).at-stats .room-floor { filter: brightness(.55); }
  body.at-klass { --sheet: 1280px; }
  body.at-klass .court.is-open .mark.is-here { opacity: 0; }
  body.at-klass:not(.in-court):not(.in-intro) #view:has(.screen.klass) {
    background: none;
    backdrop-filter: none;
    box-shadow: none;
    display: flex; flex-direction: column;
    padding: var(--s2) clamp(16px, 2.4vw, 34px) var(--s3);
  }
  body.at-klass .screen.klass {
    position: relative; flex: 1 1 auto;
    gap: var(--s3); align-items: center;
  }
  body.at-klass .screen.klass > .yard { align-self: stretch; }

  body.at-klass .kp-pine {
    position: absolute; z-index: 0; top: 2%;
    height: min(74%, 580px, 40vw); aspect-ratio: 140 / 210;
    color: var(--kp-ink); opacity: .86;
    pointer-events: none;
    --kp-pine: color-mix(in srgb, #5F8A6A 58%, var(--kp-ink));
    --kp-pine-lit: color-mix(in srgb, #A9C7A0 74%, var(--kp-ink));
  }
  body.at-klass .kp-pine svg { width: 100%; height: 100%; display: block; --court-hole: var(--kp-hole); }
  body.at-klass .kp-pine-l { left: calc(-1 * clamp(16px, 2.4vw, 34px) - 1.5vw); }
  body.at-klass .kp-pine-r { right: calc(-1 * clamp(16px, 2.4vw, 34px) - 1.5vw); }
  body.at-klass .kp-pine-note {
    position: absolute; z-index: 3; top: 2%;
    height: min(74%, 580px, 40vw); aspect-ratio: 140 / 210;
    left: calc(-1 * clamp(16px, 2.4vw, 34px) - 1.5vw);
    pointer-events: none;
  }
  body.at-klass .kp-pine-note .info-b {
    position: absolute; left: 62%; bottom: 1%; margin: 0;
    width: 26px; height: 26px; justify-content: center; border-radius: 50%;
    pointer-events: auto;
    color: var(--kp-ink);
    background: color-mix(in srgb, var(--card) 70%, transparent);
    backdrop-filter: blur(6px);
  }
  body.at-klass .kp-pine-note .info-b svg { width: 18px; height: 18px; }
  body.at-klass .kp-pine-note .info-b:hover { color: var(--fg); }
  body.at-klass .kp-pine-note .info-p { background: #F4EEE0; color: #2C2720; --fg-2: #4E463A; }
  body:is([data-phase="dusk"], [data-phase="night"]).at-klass .kp-pine-note .info-p {
    background: #2F2922; color: #EDE5D3; --fg-2: #CFC4AE;
  }

  body.at-klass .screen > .note {
    position: relative; z-index: 1;
    background: none; box-shadow: none; backdrop-filter: none;
    padding: 0; margin: 0; text-align: center; color: var(--muted);
  }

  body.at-league { --sheet: 1080px; }
  body.at-league:not(.in-court):not(.in-intro) #view {
    height: calc(100dvh - 58px - env(safe-area-inset-top) - clamp(32px, 4.8vw, 68px) + 4px);
    margin-bottom: 0;
    border-bottom-left-radius: 0; border-bottom-right-radius: 0;
    --fg: #1C1E18; --fg-2: #3A3C34; --muted: #5E6056;
    --halo: rgba(244, 241, 233, .9);
    color: var(--fg);
    background: color-mix(in srgb, #F4F1E9 22%, transparent);
    backdrop-filter: blur(3px) saturate(1.05);
    box-shadow: inset 0 0 0 1px rgba(28, 30, 24, .08), 0 20px 50px -30px rgba(0, 0, 0, .4);
    mask-image: none;
    padding-bottom: 0;
  }
  body.at-league .lg-card { margin-bottom: clamp(20px, 2.4vw, 32px); }
  body[data-phase="night"].at-league:not(.in-court):not(.in-intro) #view,
  body[data-phase="dusk"].at-league:not(.in-court):not(.in-intro) #view {
    --fg: #F1EEE6; --fg-2: #E3E0D8; --muted: #B3AFA3;
    --halo: rgba(12, 14, 30, .85);
    color: var(--fg);
    background: color-mix(in srgb, #0E1024 26%, transparent);
  }
  body.at-league .screen { gap: var(--s4); }
  body.at-league .lg-head, body.at-league .lg-foot, body.at-league .lg-podium {
    text-shadow: 0 0 6px var(--halo), 0 0 2px var(--halo);
  }

  body.at-league .lg-head {
    display: grid; grid-template-columns: minmax(0, 1fr) auto;
    align-items: center; gap: var(--s5);
  }
  body.at-league .lg-title h1 { margin: 0; }
  body.at-league .lg-title .fine { margin: 6px 0 0; color: var(--fg-2); }
  body.at-league .lg-left {
    display: inline-block; margin-left: 8px; padding: 2px 9px; border-radius: 99px;
    font-weight: 600; font-size: 11.5px; text-shadow: none;
    color: var(--seal-on); background: var(--seal);
  }
  body.at-league .lg-mine { grid-column: auto; display: flex; gap: var(--s3); margin: 0; }
  body.at-league .lg-mine > div {
    min-width: 84px; padding: 10px 14px; border-radius: var(--r-card);
    background: rgba(244, 241, 233, .64); box-shadow: 0 1px 2px rgba(28, 30, 24, .12);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    text-shadow: none; color: #1C1E18;
  }
  body.at-league .lg-mine dt { font-size: 11px; color: #5E6056; letter-spacing: .02em; }
  body.at-league .lg-mine dd {
    margin: 2px 0 0; font-family: 'Fraunces', Georgia, serif; font-size: 22px; font-weight: 600;
    line-height: 1.05; font-variant-numeric: tabular-nums;
  }

  body.at-league .lg-podium {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(3, minmax(0, 190px));
    justify-content: center; align-items: end; gap: var(--s5);
  }
  body.at-league .pd { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
  body.at-league .pd-face { position: relative; }
  body.at-league .pd .av {
    width: 54px; height: 54px; font-size: 22px;
    box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .5);
  }
  body.at-league .pd1 .av { width: 68px; height: 68px; font-size: 28px; }
  body.at-league .pd1 { --medal: #E0B94A; }
  body.at-league .pd2 { --medal: #AEB4BF; }
  body.at-league .pd3 { --medal: #C47A3E; }
  body.at-league .pd-medal {
    position: absolute; left: 50%; bottom: -9px; translate: -50% 0;
    display: grid; place-items: center;
    width: 24px; height: 24px; border-radius: 50%;
    font-size: 12px; font-weight: 700; color: #1C1E18; text-shadow: none;
    background: var(--medal); box-shadow: 0 0 0 2px #F4F1E9;
  }
  body.at-league .pd-name {
    margin-top: 8px; max-width: 100%;
    font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    padding: 2px 10px; border-radius: var(--r-pill);
    text-shadow: none;
  }
  body.at-league .pd-xp { padding: 1px 9px; border-radius: var(--r-pill); text-shadow: none; }
  body.at-league .pd-name, body.at-league .pd-xp {
    background: rgba(244, 241, 233, .84); color: #1C1E18;
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  }
  body[data-phase="night"].at-league .pd-name, body[data-phase="night"].at-league .pd-xp,
  body[data-phase="dusk"].at-league .pd-name, body[data-phase="dusk"].at-league .pd-xp {
    background: rgba(20, 22, 38, .82); color: #F1EEE6;
  }
  body.at-league .pd-xp small { color: inherit; }
  body.at-league .pd-today {
    padding: 0 8px; border-radius: var(--r-pill); line-height: 1.6;
    background: rgba(244, 241, 233, .84); color: #2F6B2E;
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  }
  body[data-phase="night"].at-league .pd-today,
  body[data-phase="dusk"].at-league .pd-today { background: rgba(20, 22, 38, .82); color: #8FCD72; }
  body.at-league .pd-streak {
    padding: 0 8px; border-radius: var(--r-pill); line-height: 1.6;
    background: rgba(244, 241, 233, .84); color: #4A463C;
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  }
  body[data-phase="night"].at-league .pd-streak,
  body[data-phase="dusk"].at-league .pd-streak { background: rgba(20, 22, 38, .82); color: #D9D4C7; }
  body.at-league .pd.me .pd-name { color: #A13A20; text-shadow: none; }
  body[data-phase="night"].at-league .pd.me .pd-name,
  body[data-phase="dusk"].at-league .pd.me .pd-name { color: #F2A184; }
  body.at-league .pd-xp { font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; }
  body.at-league .pd-xp small, body.at-league .lg-xp small { font-size: .62em; color: var(--muted); letter-spacing: .04em; }
  body.at-league .pd-block {
    display: block;
    width: 100%; margin-top: 6px; border-radius: 10px 10px 0 0;
    background: linear-gradient(to bottom, rgba(244, 241, 233, .82), rgba(244, 241, 233, .5));
    box-shadow: inset 0 2px 0 #F4F1E9;
    height: 10px;
  }
  body.at-league .pd1 .pd-block { height: 26px; }
  body.at-league .pd2 .pd-block { height: 18px; }
  body.at-league .pd.cold .pd-face { opacity: .5; }

  body.at-league .lg-card {
    display: block;
    padding: 6px 18px; border-radius: var(--r-panel);
    --fg: #1C1E18; --muted: #6A6C62; --hair: rgba(28, 30, 24, .1);
    --card-bg: rgb(244, 241, 233);
    color: var(--fg); text-shadow: none;
    background: rgba(244, 241, 233, .88);
    -webkit-backdrop-filter: blur(12px) saturate(1.1);
    backdrop-filter: blur(12px) saturate(1.1);
    box-shadow: 0 1px 2px rgba(28, 30, 24, .12), 0 18px 40px -26px rgba(28, 30, 24, .5);
  }
  body[data-phase="night"].at-league .lg-card, body[data-phase="dusk"].at-league .lg-card {
    --fg: #F1EEE6; --muted: #A9A597; --hair: rgba(241, 238, 230, .1);
    --card-bg: rgb(20, 22, 38);
    background: rgba(20, 22, 38, .9);
  }
  body.at-league .lg-list { display: flex; flex-direction: column; }
  body.at-league .lg-row {
    --av: 36px;
    min-height: 56px; padding: 0 6px;
    font-size: 14.5px; gap: 14px;
    background: none; border-radius: 0;
    box-shadow: inset 0 -1px 0 var(--hair);
  }
  body.at-league .lg-row:last-child { box-shadow: none; }
  body.at-league .lg-row.lg-known {
    background: color-mix(in srgb, var(--fg) 7%, transparent); border-radius: 10px;
  }
  body.at-league .lg-row.me {
    border-radius: 10px;
    background: color-mix(in srgb, var(--seal) 14%, var(--card-bg));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--seal) 40%, transparent);
  }
  body.at-league .lg-pin {
    --fg: #1C1E18; --muted: #6A6C62; --card-bg: rgb(244, 241, 233);
    width: min(calc(100% - 28px), 980px, calc(100vw - 160px));
  }
  body[data-phase="night"].at-league .lg-pin, body[data-phase="dusk"].at-league .lg-pin {
    --fg: #F1EEE6; --muted: #A9A597; --card-bg: rgb(20, 22, 38);
  }
  body.at-league .lg-pin .lg-pin-you { color: #A13A20; }
  body[data-phase="night"].at-league .lg-pin .lg-pin-you,
  body[data-phase="dusk"].at-league .lg-pin .lg-pin-you { color: #F2A184; }
  body.at-league .lg-row.me .lg-name { color: #A13A20; font-weight: 700; }
  body[data-phase="night"].at-league .lg-row.me .lg-name,
  body[data-phase="dusk"].at-league .lg-row.me .lg-name { color: #F2A184; }
  body.at-league .lg-foot { margin: 2px 0 0; color: var(--fg-2); }
  body.at-league .lg-tabs .chip:not(.on), body.at-league .lg-pager .chip {
    --fg: #1C1E18; --muted: #5E6056;
    background: rgba(244, 241, 233, .86); color: #1C1E18; text-shadow: none;
    box-shadow: 0 1px 2px rgba(28, 30, 24, .12);
  }
  body.at-league .lg-group, body.at-league .lg-pager b { text-shadow: 0 0 6px var(--halo), 0 0 2px var(--halo); }

  body.at-league .lg-head { align-items: end; }
  body.at-league .lg-when { display: flex; align-items: center; flex-wrap: wrap; gap: 0 2px; }
  body.at-league .lg-when, body.at-league .lg-foot {
    font-weight: 500;
    text-shadow: 0 0 2px var(--halo), 0 0 5px var(--halo), 0 0 10px var(--halo);
  }
  body.at-league .lg-seg {
    flex-wrap: wrap; justify-content: flex-end; gap: 2px; padding: 3px;
    border-radius: 18px; background: rgba(244, 241, 233, .86);
    box-shadow: 0 1px 2px rgba(28, 30, 24, .12);
  }
  body.at-league .lg-seg .chip { border-radius: var(--r-pill); padding: 6px 14px; }
  body.at-league .lg-seg .chip:not(.on) { background: transparent; box-shadow: none; }
  body.at-league .lg-status {
    display: flex; align-items: stretch;
    border-radius: var(--r-panel); overflow: hidden; text-shadow: none;
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  }
  body.at-league .lg-tier {
    flex: 1; min-width: 0; margin: 0;
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center;
    gap: var(--s4); padding: var(--s4) var(--s5);
    border-radius: 0; background: transparent; color: var(--fg); text-shadow: none;
  }
  body.at-league .lg-tier:hover { background: color-mix(in srgb, var(--fg) 5%, transparent); }
  body.at-league .lg-tier-g {
    display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px;
    font-family: var(--serif-hz); font-size: 20px; letter-spacing: .02em;
    color: #A13A20; background: rgba(161, 58, 32, .1);
  }
  body.at-league .lg-tier-b { display: grid; gap: 6px; min-width: 0; }
  body.at-league .lg-tier-b b { font-family: 'Fraunces', Georgia, serif; font-size: 18px; line-height: 1.15; }
  body.at-league .lg-tier-place {
    font-family: 'Inter', system-ui, sans-serif; font-size: var(--fs-fine); font-weight: 600; color: var(--fg-2);
  }
  body.at-league .lg-tier .fine { color: var(--fg-2); }
  body.at-league .lg-tier .lg-meter { width: min(340px, 100%); height: 5px; background: var(--hair); }
  body.at-league .lg-tier-more { color: #A13A20; white-space: nowrap; }
  body.at-league .lg-status .lg-mine {
    flex: none; display: grid; place-content: center; text-align: center;
    padding: var(--s4) var(--s6); border-left: 1px solid var(--hair);
  }
  body.at-league .lg-status .lg-mine > div {
    display: flex; flex-direction: column-reverse; align-items: center;
    min-width: 0; padding: 0; background: none; box-shadow: none; color: inherit;
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  body.at-league .lg-status .lg-mine dt { color: var(--fg-2); font-size: var(--fs-fine); }
  body.at-league .lg-status .lg-mine dd { margin: 0 0 2px; font-size: 26px; }
  body[data-phase="night"].at-league .lg-tier-g,
  body[data-phase="dusk"].at-league .lg-tier-g { color: #F2A184; background: rgba(242, 161, 132, .14); }
  body[data-phase="night"].at-league .lg-tier-more,
  body[data-phase="dusk"].at-league .lg-tier-more { color: #F2A184; }
  body.at-league .lg-tier-b { gap: 2px; }
  body.at-league .lg-tier-b .lg-tier-n { font-size: 32px; line-height: 1.05; }
  body.at-league .lg-tier[class*="lg-tier-m"] .lg-tier-g {
    font-size: 26px; color: var(--medal); background: color-mix(in srgb, var(--medal) 14%, transparent);
  }
}

.screen.klass {
  --kp-ink: color-mix(in srgb, #1C1E18 76%, #3E646C);
  --kp-hole: #F4F1E9;
  --kp-ground: #F3EFE5;
  --kp-mat: rgba(150, 124, 80, .3);
  --kp-lamp: #C8452E;
  --kp-glow: none;
  --fg: #2C2720;
  --fg-2: #4E463A;
  --muted: #564F42;
  --hair: rgba(58, 48, 34, .15);
  --raised: rgba(92, 78, 54, .1);
  --card: rgba(255, 252, 243, .6);
  --seal-text: #9E3B24;
  color: var(--fg);
}
body[data-phase="dawn"] .screen.klass { --kp-ground: #F5EDE6; }
body[data-phase="morning"] .screen.klass { --kp-ground: #F6F0DE; }
body[data-phase="dusk"] .screen.klass {
  --kp-ink: color-mix(in srgb, #241C18 80%, #6B3A2A);
  --kp-hole: #F6E2C0;
  --kp-ground: rgba(234, 212, 186, .9);
  --kp-lamp: #E0673F;
  --kp-glow: drop-shadow(0 0 5px rgba(243, 206, 149, .8));
}
body[data-phase="night"] .screen.klass {
  --kp-ink: color-mix(in srgb, #F4F1E9 54%, transparent);
  --kp-hole: #20242F;
  --kp-ground: rgba(25, 29, 41, .9);
  --kp-mat: rgba(214, 200, 168, .14);
  --kp-lamp: #F59A5E;
  --kp-glow: drop-shadow(0 0 6px rgba(247, 206, 134, .9)) drop-shadow(0 0 16px rgba(247, 206, 134, .45));
  --fg: #EDE5D3;
  --fg-2: #CFC4AE;
  --muted: #BDB4A0;
  --hair: rgba(240, 230, 210, .16);
  --raised: rgba(240, 228, 202, .08);
  --card: rgba(30, 25, 20, .5);
  --seal-text: #E6A58A;
}

.kp-pav {
  position: relative; z-index: 2;
  align-self: center;
  width: min(780px, 100%);
  display: flex; flex-direction: column; align-items: center;
  padding-bottom: 22px;
  background:
    linear-gradient(var(--kp-ink), var(--kp-ink)) 50% calc(100% - 12px) / 94% 2.5px no-repeat,
    linear-gradient(color-mix(in srgb, var(--kp-ink) 26%, transparent),
                    color-mix(in srgb, var(--kp-ink) 26%, transparent)) 50% 100% / 94% 14px no-repeat;
}
.kp-roof { position: relative; z-index: 1; display: block; width: 100%; color: var(--kp-ink); }
.kp-roof svg { display: block; width: 100%; height: auto; overflow: visible; --court-hole: var(--kp-hole); }
.kp-roof .kp-lamps { --pearl: var(--kp-lamp); filter: var(--kp-glow); }
.kp-pav::before,
.kp-pav::after {
  content: ''; position: absolute; z-index: 0; top: min(64px, 8vw); bottom: 14px;
  width: clamp(5px, 1.1%, 9px);
  background: var(--kp-ink);
}
.kp-pav::before { left: 10.5%; }
.kp-pav::after { right: 10.5%; }

body.at-klass .screen-head.kp-board {
  position: relative; z-index: 2;
  margin: 12px 0 0;
  width: min(540px, 74%);
  padding: 14px 30px 12px;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  column-gap: 16px; row-gap: 5px;
  text-align: center;
  --fg: #F1E6C8;
  --fg-2: #D9CDB2;
  --muted: #CBC0A6;
  --seal: #E9B3A2;
  --hair: rgba(241, 230, 200, .18);
  --raised: rgba(241, 230, 200, .1);
  color: var(--fg);
  border-radius: 2px;
  background: linear-gradient(168deg, #2C2722 0%, #201C18 100%);
  box-shadow:
    inset 0 0 0 5px #2C2722,
    inset 0 0 0 6.5px rgba(194, 59, 37, .8),
    0 0 0 2px #14120F,
    0 12px 24px -12px rgba(0, 0, 0, .5);
}
.kp-board::before,
.kp-board::after {
  content: ''; position: absolute; bottom: 100%; height: 13px; width: 2px;
  background: var(--kp-ink);
}
.kp-board::before { left: 16%; }
.kp-board::after { right: 16%; }
.kp-board h1 { flex: 1 0 100%; margin: 0; color: #F4E7C4; }
.kp-board h1::after { margin: 7px auto 3px; opacity: .85; }
.kp-board > p { margin: 0; }
.kp-board .klass-at { justify-content: center; }
.kp-board .chip { color: var(--fg); background: var(--raised); box-shadow: 0 0 0 1px var(--hair); }

.kp-lectern {
  position: relative; z-index: 2;
  margin-top: 14px;
  padding: 7px 16px 6px;
  border-radius: 2px;
  background:
    linear-gradient(to bottom, transparent 4px, color-mix(in srgb, var(--kp-hole) 45%, transparent) 4px 5px, transparent 5px),
    var(--kp-ink);
}
.kp-lectern::before,
.kp-lectern::after {
  content: ''; position: absolute; top: 100%; width: 5px; height: 8px;
  background: var(--kp-ink);
}
.kp-lectern::before { left: 8%; }
.kp-lectern::after { right: 8%; }
.kp-lectern .klass-teachers {
  --fg: #2C2720; --muted: #5A5246;
  margin: 0; padding: 3px 12px;
  color: var(--fg);
  border-radius: 2px;
  background: #F4EEE0;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .25);
}
.kp-lectern .fine { color: var(--muted); }
.kp-lectern .av-none { background: #E9E1CF; color: #2C2720; }

.yard {
  position: relative; z-index: 1;
  isolation: isolate;
  display: grid; justify-items: center; align-content: center;
  row-gap: 14px;
  padding: var(--s3) 0 var(--s3);
}
.yard-rows { position: relative; }
.yard-rows::before {
  content: '';
  position: absolute; z-index: -1;
  left: calc(-.5 * var(--seat, 112px) - 40px); right: calc(-.5 * var(--seat, 112px) - 40px);
  top: -34px; bottom: -64px;
  border-radius: 50% 50% 34% 34% / 42% 42% 26% 26%;
  background: var(--kp-ground);
  filter: blur(14px);
  pointer-events: none;
}
.yard-legend { margin: 0; text-align: center; color: var(--muted); }

.yard-rows {
  list-style: none; margin: 0; padding: 0; display: grid;
  --seat: clamp(84px, min(
      calc(((100dvh - 440px) / var(--rows, 3) - 40px) / 0.86),
      calc((var(--sheet, 980px) - 360px) / (var(--cols, 4) * 1.24))),
    200px);
  row-gap: clamp(10px, calc(var(--seat) * .14), 22px);
}
.yard-row {
  list-style: none; margin: 0; padding: 0;
  display: flex; justify-content: center;
  gap: clamp(14px, calc(var(--seat) * .24), 36px);
}

.seat {
  position: relative; z-index: 0;
  display: grid; justify-items: center;
  width: var(--seat, 112px);
  text-align: center;
}
.seat::before {
  content: ''; position: absolute; z-index: 0;
  top: calc(var(--seat, 112px) * .36); left: 50%; translate: -50% 0;
  width: calc(var(--seat, 112px) * .62); height: calc(var(--seat, 112px) * .26);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background: var(--kp-ink);
}
.seat::after {
  content: ''; position: absolute; z-index: -1;
  top: calc(var(--seat, 112px) * .6); left: 50%; translate: -50% 0;
  width: calc(var(--seat, 112px) * 1.12); height: calc(var(--seat, 112px) * .3);
  border-radius: 50%;
  background: var(--kp-mat);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--kp-ink) 16%, transparent);
}
.seat-head {
  position: relative; z-index: 1;
  display: grid; place-items: center;
  width: calc(var(--seat, 112px) * .46); height: calc(var(--seat, 112px) * .46);
  margin-bottom: calc(var(--seat, 112px) * .06);
  border-radius: 50%;
  overflow: hidden;
  background: #E9E1CF;
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--kp-ink) 50%, transparent), 0 2px 4px rgba(40, 30, 18, .18);
  font-family: var(--serif); font-size: calc(var(--seat, 112px) * .2); color: #2C2720;
}
.seat-head img { width: 100%; height: 100%; object-fit: cover; display: block; }
.seat-desk {
  position: relative; z-index: 2;
  display: grid; place-items: center;
  width: 100%; height: calc(var(--seat, 112px) * .26);
  border-radius: 2px;
  background:
    linear-gradient(to bottom, transparent 4px, color-mix(in srgb, var(--kp-hole) 45%, transparent) 4px 5px, transparent 5px),
    var(--kp-ink);
}
.seat-desk::before,
.seat-desk::after {
  content: ''; position: absolute; top: 100%;
  width: 5px; height: calc(var(--seat, 112px) * .06);
  background: var(--kp-ink);
}
.seat-desk::before { left: 9%; }
.seat-desk::after { right: 9%; }
.seat-who {
  margin-top: 3px;
  padding: 2px 7px;
  border-radius: 2px;
  background: #F4EEE0;
  color: #2C2720;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .25);
  font-size: clamp(11px, calc(var(--seat, 112px) * .105), 14px);
  font-weight: 600; line-height: 1.35;
  max-width: 118%;
  text-align: center; text-wrap: balance; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.seat-who.seat-who-long { font-size: clamp(9.5px, calc(var(--seat, 112px) * .088), 12px); line-height: 1.15; }
.seat-figs {
  position: relative; z-index: 1;
  display: flex; justify-content: center; gap: 6px;
  margin-top: calc(var(--seat, 112px) * .06 + 7px);
  white-space: nowrap;
  font-size: clamp(10px, calc(var(--seat, 112px) * .092), 12.5px);
  color: color-mix(in srgb, var(--fg) 80%, transparent);
}
.seat-xp::before { content: '\00B7'; margin-right: 6px; }

.seat-lit .seat-head {
  box-shadow: 0 0 0 2.5px var(--growth-4), 0 0 0 5px color-mix(in srgb, var(--growth-4) 22%, transparent);
}
.seat-me .seat-head { background: color-mix(in srgb, var(--seal) 18%, #E9E1CF); }
.seat-me .seat-who { background: #F6DCD2; color: #8E2E1A; }

@media (max-width: 640px) {
  .yard-rows { --seat: 96px; }
}
@media (max-width: 999px) {
  .kp-pine, .kp-pine-note { display: none; }
}

@media (min-width: 744px) {
  body.at-klass:not(.in-court):not(.in-intro) #view {
    height: calc(100dvh - 58px - env(safe-area-inset-top) - clamp(32px, 4.8vw, 68px));
  }
  body.at-klass .screen.klass { min-height: 100%; }
  body.at-klass .yard {
    flex: 1 1 0;
    container-type: size;
    min-height: calc(var(--rows, 3) * (84px * .86 + 40px) + 70px);
    align-self: stretch;
    align-content: center;
  }
  body.at-klass .yard-rows {
    --seat: clamp(84px, min(
        calc(((100cqh - 70px) / var(--rows, 3) - 40px) / 0.86),
        calc(100cqw / (var(--cols, 4) * 1.24))),
      200px);
  }
}

.klass-at { display: inline-flex; align-items: center; gap: 7px; }
.klass-at-mark {
  display: block; width: 19px; height: 19px;
  color: color-mix(in srgb, var(--fg) 76%, transparent);
}
.klass-at-mark svg { width: 100%; height: 100%; display: block; }

.check { display: flex; align-items: flex-start; gap: 10px; font-size: var(--fs-small); cursor: pointer; }
.check[hidden] { display: none; }
.check input { margin-top: 3px; accent-color: var(--seal); width: auto; flex: none; }
.check small { display: block; margin-top: 2px; color: var(--muted); }
.check .av { width: 34px; height: 34px; flex: none; }
.pw-match { margin: 6px 0 0; }
.pw-match.is-met { color: var(--jade-ink); }
.pw-match.is-off { color: var(--seal-text); }
#confirm .btn + .btn { margin-top: 6px; }
.signin-legal { margin: 8px 0 0; color: var(--muted); }
.signin-legal a { color: inherit; text-decoration: underline; }

.face-pick { position: relative; cursor: pointer; flex: none; }
.face-cam {
  position: absolute; right: -4px; bottom: -4px;
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--raised); box-shadow: 0 0 0 1px var(--hair); font-size: 12px; color: var(--fg-2);
}
.face-pick:hover .face-cam, .face-pick:focus-within .face-cam { color: var(--seal); }
.profile-head > div { min-width: 0; }
.name-form { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.name-form input {
  font: inherit; font-size: 26px; font-weight: 600;
  background: transparent; border: 0; border-bottom: 1px dashed var(--hair); color: var(--fg);
  padding: 2px 0; min-width: 0; width: 100%; max-width: 12ch;
}
@media (max-width: 560px) {
  .profile-head { gap: var(--s3); padding: var(--s2) 0; }
  .profile-head .av { width: 64px; height: 64px; }
  .profile-head > div { padding: 0; }
  .name-form input { font-size: 21px; }
}
.name-form input:focus-visible { outline: none; border-bottom-color: var(--seal); }
.chips { display: flex; gap: 6px; margin: 6px 0 0; }

.lv-pick > summary { list-style: none; cursor: pointer; display: inline-flex; }
.lv-pick > summary::-webkit-details-marker { display: none; }
.lv-pick[open] > summary { margin-bottom: 8px; }
.lv-list { list-style: none; margin: 8px 0; padding: 0; display: grid;
           grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; max-width: 640px; }
.lv-row {
  width: 100%; display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  font: inherit; padding: 8px 12px; border-radius: 10px; cursor: pointer;
  background: var(--card); color: var(--fg); border: 1px solid var(--hair);
}
.lv-row span { color: var(--muted); font-size: var(--fs-fine); }
.lv-row:hover:not(:disabled) { border-color: var(--seal); }
.lv-row.on { border-color: var(--seal); background: color-mix(in srgb, var(--seal) 12%, var(--card)); }
.lv-row:disabled:not(.on) { opacity: .5; cursor: default; }

.cls-list { list-style: none; padding: 0; margin: 0; max-width: 480px; }
.cls-row { display: flex; align-items: center; gap: 10px; }
.cls-open { flex: 1; display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit;
            background: var(--card); border: 1px solid var(--hair); border-radius: 12px; padding: 10px 14px; }
.cls-open:hover { border-color: var(--muted); }
.cls-open span:last-child { display: flex; flex-direction: column; gap: 2px; }
.cls-open small { color: var(--muted); font-size: var(--fs-fine); }
.cls-mark { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 10px;
            font-size: 21px; color: var(--seal); background: color-mix(in srgb, var(--seal) 12%, var(--card)); }

.profile .screen-set > .set-link.pf-door { justify-content: flex-start; gap: 12px; }
.set-link.pf-door > .pf-mark {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 10px;
  color: var(--fg); background: color-mix(in srgb, var(--fg) 6%, var(--card));
  box-shadow: inset 0 0 0 1px var(--hair);
}
.set-link.pf-door > .pf-door-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pf-mark svg {
  width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.pf-mark .pf-seal { fill: var(--seal); stroke: none; }
.pf-mark .pf-seal-line { stroke: var(--seal); }
.set-link.pf-door .pf-mark .chop {
  display: grid; place-items: center; gap: 0;
  width: 26px; height: 26px; border-radius: 7px; font-size: 8.5px;
}
.set-link.pf-door .pf-mark .chop > span { display: block; }

.acct-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.acct-danger { display: flex; flex-wrap: wrap; gap: 18px; margin: 4px 0 0; }
.linkish.danger { color: var(--seal-text); }
.login-list { list-style: none; padding: 0; margin: 0; max-width: 480px; display: flex; flex-direction: column; gap: 6px; }
.login-row { display: flex; justify-content: space-between; gap: 12px; font-size: var(--fs-small); }
.login-row b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.login-row b.muted { color: var(--muted); font-weight: 400; }
.login-row .btn-link-id { padding: 6px 12px; font-size: var(--fs-small); }
.email-add { display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
.email-add input, .join-form input:not([type=checkbox]) {
  font: inherit; padding: 9px 12px; border-radius: 10px;
  background: var(--bg-sunken); border: 1px solid var(--hair); color: var(--fg);
}
.set-link-inline { color: var(--seal-text); text-decoration: none; font-size: var(--fs-small); }

.buy { display: flex; flex-direction: column; gap: 12px; max-width: 480px; }
.buy-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.buy-plan { position: relative; cursor: pointer; }
.buy-plan input { position: absolute; opacity: 0; pointer-events: none; }
.buy-plan > span {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 12px;
  border-radius: 12px; border: 1.5px solid var(--hair); background: var(--bg-sunken);
}
.buy-plan small { color: var(--fg-2); font-size: var(--fs-small); }
.buy-plan input:checked + span { border-color: var(--seal); }
.buy-plan input:focus-visible + span { outline: 2px solid var(--seal); outline-offset: 2px; }
.buy-legal { margin: 0; font-size: var(--fs-small); color: var(--fg-2); }
.pw .buy-legal { text-align: center; }
.buy-legal a { color: var(--seal-text); }
.buy-row { margin: 0; display: flex; gap: 8px; align-items: center; }
.buy-code input {
  font: inherit; padding: 8px 12px; border-radius: 10px; min-width: 0; flex: 1; max-width: 200px;
  background: var(--bg-sunken); border: 1px solid var(--hair); color: var(--fg); text-transform: uppercase;
}
.buy-msg { margin: 0; font-size: var(--fs-small); color: var(--seal-text); }
.buy-starts { margin: 0; font-size: var(--fs-small); color: var(--fg); }
.code-form { display: flex; flex-direction: column; gap: 6px; max-width: 480px; margin-top: 18px; }
.code-l { font-size: var(--fs-small); color: var(--fg-2); }
.pw .code-form { margin-top: 0; }
.code-name input {
  font: inherit; padding: 8px 12px; border-radius: 10px; min-width: 0; flex: 1; max-width: 320px;
  background: var(--bg-sunken); border: 1px solid var(--hair); color: var(--fg);
}
.code-hint, .code-consent { margin: 0; font-size: var(--fs-small); color: var(--fg-2); }

.pw { width: min(94vw, 470px); max-height: min(94vh, 1000px); position: relative; overflow: auto; }
.pw-scene {
  position: absolute; inset: 0 0 auto 0; height: 190px; pointer-events: none;
  background: url(/assets/paywall/scene.jpg) center 22% / cover no-repeat;
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
  mask-image: linear-gradient(#000 55%, transparent);
}
:root[data-theme="dark"] .pw-scene { background-image: url(/assets/paywall/scene_dark.jpg); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pw-scene { background-image: url(/assets/paywall/scene_dark.jpg); }
}
.pw .sheet-in.pw-in { position: relative; gap: 12px; padding-top: 26px; }
.pw-head { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 30px; }
.pw-logo { width: 68px; height: 68px; border-radius: 16px; box-shadow: 0 8px 22px -8px rgba(120, 30, 15, .55); }
.pw-slogan { margin: 0; font-size: var(--t-label); color: var(--fg); text-align: center;
  text-shadow: 0 0 12px var(--raised), 0 0 4px var(--raised); }
.pw-badge { margin: 0; text-align: center; font-size: var(--t-cap); font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--jade-ink, var(--jade)); }
.pw-badge.is-over { color: var(--seal-text); }
.pw-title { margin: 0; text-align: center; font-family: 'Fraunces', Georgia, serif; font-size: 25px; line-height: 1.15;
  text-wrap: balance; }

.pw-bar { display: grid; grid-template-columns: 1fr auto auto; align-items: center;
  border: 1px solid var(--hair); border-radius: 14px; background: var(--card); padding: 9px 0;
  box-shadow: 0 6px 16px -10px rgba(0, 0, 0, .25); }
.pw-path { display: flex; align-items: center; gap: 9px; padding: 0 12px; min-width: 0; }
.pw-path small, .pw-stat small, .pw-cap, .pw-end small { font-size: 9.5px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--fg-2); }
.pw-path > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.pw-path b { font-size: 13px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; }
.pw-tile { flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  font-family: 'Noto Serif SC', 'Songti SC', serif; font-size: 15px; color: #FFF8EC;
  background: linear-gradient(#D4583F, #B23A25); box-shadow: 0 2px 6px -2px rgba(178, 58, 37, .6); }
.pw-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 78px; padding: 0 8px;
  border-left: 1px solid var(--hair); }
.pw-stat b { font-family: 'Fraunces', Georgia, serif; font-size: 21px; line-height: 1.1; font-variant-numeric: lining-nums; }
.pw-stat i, .pw-end i { font-style: normal; color: var(--seal-text); margin-right: 3px; font-family: 'Noto Serif SC', serif; }
.pw-plain { margin: -2px 0 0; text-align: center; color: var(--seal-text); font-weight: 500; }

.pw-journey { position: relative; border: 1px solid var(--hair); border-radius: 18px; background: var(--card);
  padding: 11px 16px 12px; margin-top: 10px; box-shadow: 0 10px 26px -14px rgba(0, 0, 0, .3); }
.pw-dragon { position: absolute; right: 16px; top: -22px; width: 44px; height: 44px; }
.pw-cap { margin: 0 0 10px; letter-spacing: .08em; }
.pw-journey-row { display: flex; align-items: center; gap: 14px; }
.pw-journey-road { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.pw-road { position: relative; display: flex; align-items: center; }
.pw-road i { display: block; }
.pw-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--seal); box-sizing: border-box; }
.pw-dot.is-full { background: var(--seal); box-shadow: 0 0 8px color-mix(in srgb, var(--seal) 45%, transparent); }
.pw-dot.is-ahead { border-color: color-mix(in srgb, var(--seal) 60%, transparent); }
.pw-dot.pw-small { width: 10px; height: 10px; border-width: 1.5px; }
.pw-line { flex: 1; height: 2px; background: linear-gradient(90deg, color-mix(in srgb, var(--seal) 25%, transparent), var(--seal)); }
.pw-line.is-ahead { background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--seal) 55%, transparent) 0 4px, transparent 4px 9px); }
.pw-line.pw-tail { flex: none; width: 30px; }
.pw-gain { position: absolute; left: 50%; transform: translateX(-60%); font-size: 10px; font-weight: 600;
  color: var(--jade-ink, var(--jade)); background: color-mix(in srgb, var(--jade) 14%, var(--raised));
  border-radius: 99px; padding: 2px 7px; white-space: nowrap; }
.pw-ends { display: flex; justify-content: space-between; gap: 8px; }
.pw-end { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.pw-end small { color: var(--muted); }
.pw-end.is-today small { color: var(--seal-text); }
.pw-end b { font-family: 'Fraunces', Georgia, serif; font-size: 28px; line-height: 1.05; color: var(--fg-2); }
.pw-end.is-today b { color: var(--fg); }
.pw-end span { font-size: 11.5px; color: var(--fg-2); }

.pw-turn { flex: none; width: 64px; height: 80px; perspective: 400px; transform: rotate(4deg); }
.pw-card { position: relative; width: 100%; height: 100%; transition: transform 400ms var(--ease); transform-style: preserve-3d; }
.pw-card.is-back { transform: rotateY(180deg); }
.pw-card > span { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 0 5px; text-align: center; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 12px; border: 1px solid var(--hair); background: var(--raised);
  box-shadow: inset 0 0 0 4px var(--raised), inset 0 0 0 4.75px color-mix(in srgb, var(--seal) 22%, transparent),
              0 6px 14px -6px rgba(0, 0, 0, .35); }
.pw-face-front { font-family: 'Noto Serif SC', 'Songti SC', serif; font-size: 26px; white-space: nowrap; }
.pw-face-front::before { content: ''; position: absolute; left: 9px; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--seal); }
.pw-face-back { transform: rotateY(180deg); }
.pw-face-back small { font-size: 9px; color: var(--muted); line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; }
.pw-face-back b { font-size: 13px; }

.pw-schools { margin: 10px 0 2px; display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-2); }
.pw-schools img { height: 34px; width: auto; mix-blend-mode: multiply; }
:root[data-theme="dark"] .pw-schools img { mix-blend-mode: normal; background: #FBF7EE; border-radius: 6px; padding: 3px 5px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pw-schools img { mix-blend-mode: normal; background: #FBF7EE; border-radius: 6px; padding: 3px 5px; }
}
.pw-schools > span:not(.pw-laurel) { max-width: 190px; line-height: 1.3; }
.pw-schools .pw-partners { display: grid; flex: none; width: 118px; }
.pw-partners img { grid-area: 1 / 1; width: 118px; height: auto; align-self: center; justify-self: center; }
.pw-partners img:nth-child(1) { animation: pw-partner-a 6.4s ease-in-out infinite; }
.pw-partners img:nth-child(2) { animation: pw-partner-b 6.4s ease-in-out infinite; }
@keyframes pw-partner-a { 0%, 42% { opacity: 1; transform: none; } 50%, 92% { opacity: 0; transform: translateY(6px); } 100% { opacity: 1; transform: none; } }
@keyframes pw-partner-b { 0%, 42% { opacity: 0; transform: translateY(-6px); } 50%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) {
  .pw-partners { gap: 4px; }
  .pw-partners img { grid-area: auto; animation: none; }
}
.pw-laurel { flex: none; width: 14px; color: var(--fg-2); opacity: .8; }
.pw-laurel svg { display: block; width: 14px; height: 28px; }
.pw-laurel.is-right svg { transform: scaleX(-1); }

.pw-plans { display: flex; flex-direction: column; gap: 10px; }
.pw-plan > span { display: revert; padding: 0; border: 0; border-radius: 0; background: none; min-height: 0; }
.pw-plan > span.pw-band { display: block; padding: 4px 0; background: linear-gradient(90deg, #1F1D17, #5E2318 55%, var(--seal)); color: #fff; }
.pw-plan > .pw-plan-name { display: flex; }
.pw-plan > .pw-radio { display: block; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--muted); }
.pw-plan small { color: var(--jade-ink, var(--jade)); }
.pw-plan { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  border: 1.5px solid var(--hair); border-radius: 16px; padding: 14px 16px; background: var(--card); cursor: pointer; }
.pw-plan input { position: absolute; opacity: 0; pointer-events: none; }
.pw-plan.pw-popular { padding-top: 38px; overflow: hidden; }
.pw-band { position: absolute; inset: 0 0 auto 0; padding: 4px 0; text-align: center; font-size: 10.5px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: #fff; background: linear-gradient(90deg, #1F1D17, #5E2318 55%, var(--seal)); }
.pw-radio { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--hair); box-sizing: border-box; }
.pw-plan-name { display: flex; flex-direction: column; gap: 2px; }
.pw-plan-name b { font-size: 17px; }
.pw-plan-name small { color: var(--jade-ink, var(--jade)); font-weight: 500; }
.pw-plan-price { font-family: 'Fraunces', Georgia, serif; font-size: 22px; font-weight: 600; }
.pw-plan:has(input:checked) { border-color: var(--seal); box-shadow: 0 8px 22px -12px color-mix(in srgb, var(--seal) 70%, transparent); }
.pw-plan:has(input:checked) .pw-radio { border: 0; background: var(--seal); position: relative; }
.pw-plan:has(input:checked) .pw-radio::after { content: ''; position: absolute; left: 7.5px; top: 4.5px; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.pw-plan:has(input:focus-visible) { outline: 2px solid var(--seal); outline-offset: 2px; }
.pw .buy-row .btn-primary { width: 100%; padding: 13px 18px; font-size: 16px; border-radius: 99px; }
.pw-anytime { margin: -4px 0 0; text-align: center; font-size: var(--t-label); color: var(--fg-2); }
.pw-foot { margin: 0; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: center; }
.pw-account { position: relative; display: inline-block; }
.pw-account[open] { flex-basis: 100%; text-align: center; }
.pw-account[open] .pw-account-menu { justify-content: center; }
.pw-account summary { list-style: none; cursor: pointer; }
.pw-account summary::-webkit-details-marker { display: none; }
.pw-account-menu { display: flex; gap: 14px; margin-top: 8px; }
@media (prefers-reduced-motion: reduce) { .pw-card { transition: none; } }

.sb-card { display: flex; flex-direction: column; gap: 4px; }
.sb-badge {
  display: inline-flex; align-items: center; min-height: 24px; padding: 3px 11px;
  border-radius: var(--r-pill); font-size: var(--fs-fine); font-weight: 600;
  color: var(--fg-2); background: var(--bg-sunken);
}
.sb-badge.is-active, .sb-badge.is-trial {
  color: var(--jade-ink); background: color-mix(in srgb, var(--jade) 16%, var(--card));
}
.sb-badge.is-canceled { color: var(--fg); background: color-mix(in srgb, var(--fg) 9%, var(--card)); }
.sb-badge.is-past_due { color: var(--seal-text); background: color-mix(in srgb, var(--seal) 14%, var(--card)); }
.sb-badge.is-wait { width: 72px; }
.sb-rows { display: flex; flex-direction: column; }
.sb-row {
  display: flex; align-items: center; gap: var(--s4); min-height: 52px; padding: 8px 0;
  border-top: 1px solid var(--hair); font-size: var(--fs-small);
}
.sb-row:first-child { border-top: 0; }
.sb-l { flex: 0 0 11.5rem; color: var(--fg-2); }
.sb-v { flex: 1; min-width: 0; font-weight: 500; color: var(--fg); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.sb-c { flex: none; margin-left: auto; }
.sb-bar, .sb-badge.is-wait {
  display: inline-block; height: 12px; width: 9rem; max-width: 100%; border-radius: 6px;
  background: linear-gradient(90deg, var(--bg-sunken) 0%, color-mix(in srgb, var(--fg) 10%, var(--bg-sunken)) 50%, var(--bg-sunken) 100%);
  background-size: 200% 100%; animation: sb-wait 1.4s ease-in-out infinite;
}
.sb-badge.is-wait { height: 24px; width: 72px; border-radius: var(--r-pill); }
@keyframes sb-wait { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .sb-bar, .sb-badge.is-wait { animation: none; } }
.sb-foot { margin: 6px 0 0; padding-top: 12px; border-top: 1px solid var(--hair); display: flex; }
.sb-cancel { padding-left: 0; color: var(--fg-2); }
.sb-cancel:hover { background: none; color: var(--seal-text); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 560px) {
  .sb-row { flex-wrap: wrap; gap: 2px var(--s3); }
  .sb-l { flex: 1 0 100%; font-size: var(--fs-fine); }
  .sb-v:empty { display: none; }
  .sb-row:has(> .sb-v:empty) > .sb-l { flex: 1 1 auto; font-size: var(--fs-small); }
}
.cx-facts dt { flex: none; }

.cxs { width: min(94vw, 480px); }
.cx-in { gap: 16px; padding: 22px 24px 24px; }
.cx-in h2 { margin: 0; font-family: 'Fraunces', Georgia, serif; font-size: 22px; line-height: 1.2; }
.cx-in h2:focus { outline: none; }
.cx-opt { font-size: var(--fs-fine); color: var(--muted); flex: none; }
.cx-facts { margin: 0; display: flex; flex-direction: column; border-radius: var(--r-card); background: var(--bg-sunken); padding: 4px 14px; }
.cx-facts > div { display: flex; justify-content: space-between; gap: var(--s4); padding: 10px 0; border-top: 1px solid var(--hair); }
.cx-facts > div:first-child { border-top: 0; }
.cx-facts dt { color: var(--fg-2); font-size: var(--fs-small); }
.cx-facts dd { margin: 0; text-align: right; font-size: var(--fs-small); font-weight: 500; overflow-wrap: anywhere; min-width: 0; }
.cx-acts { margin: 4px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cx-acts > :only-child { grid-column: 1 / -1; }
.cx-acts .btn { width: 100%; white-space: normal; text-align: center; }
.cx-acts .btn:not(.btn-primary) { background: color-mix(in srgb, var(--fg) 8%, var(--raised)); }
.cx-acts .btn:not(.btn-primary):hover { background: color-mix(in srgb, var(--fg) 14%, var(--raised)); }
.cx-reasons { display: flex; flex-wrap: wrap; gap: 8px; }
.cx-reason { position: relative; cursor: pointer; }
.cx-reason input { position: absolute; opacity: 0; pointer-events: none; }
.cx-reason > span {
  display: inline-flex; align-items: center; min-height: 36px; padding: 7px 14px;
  border-radius: var(--r-pill); font-size: var(--fs-small);
  background: var(--bg-sunken); color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--hair);
  transition: box-shadow var(--fast) var(--ease), background var(--fast) var(--ease);
}
.cx-reason:hover > span { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--fg) 30%, transparent); }
.cx-reason input:checked + span {
  background: color-mix(in srgb, var(--seal) 12%, var(--bg-sunken)); box-shadow: inset 0 0 0 1.5px var(--seal);
}
.cx-reason input:focus-visible + span { outline: 2px solid var(--seal); outline-offset: 2px; }
.cxs textarea {
  width: 100%; resize: vertical; font: inherit; font-size: var(--fs-small); min-height: 64px;
  padding: 10px 12px; border-radius: 12px;
  background: var(--bg-sunken); border: 1px solid var(--hair); color: var(--fg);
}
.cx-msg { margin: 0; }
.pays .pay-element { min-height: 150px; }
.pays .pay-element[aria-busy="true"] { border-radius: 10px; background: var(--bg-sunken); }
.cx-done { text-align: center; align-items: stretch; }
.cx-done .cx-facts dt { text-align: left; }
.cx-mark {
  margin: 4px auto 0; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  font-size: 24px; font-weight: 700; color: var(--jade-ink);
  background: color-mix(in srgb, var(--jade) 18%, var(--raised));
}
.cx-line { margin: -6px 0 0; color: var(--fg-2); font-size: var(--fs-small); }
@media (max-width: 440px) {
  .cx-in { padding: 18px 16px 20px; }
  .cx-acts { grid-template-columns: 1fr; }
  .cx-acts .btn-primary { order: -1; }
}

.teach { padding: 0; overflow: hidden; }
.teach-d > summary {
  display: flex; align-items: center; gap: 14px;
  padding: var(--s4) var(--s5);
  cursor: pointer; list-style: none;
}
.teach-d > summary::-webkit-details-marker { display: none; }
.teach-d > summary:hover { background: color-mix(in srgb, var(--fg) 4%, transparent); }
.tch-seal {
  flex: none; display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 12px;
  background: color-mix(in srgb, var(--seal) 12%, var(--card));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--seal) 38%, transparent);
  color: var(--seal-text); font-family: var(--serif-hz); font-size: 20px; line-height: 1;
}
.tch-ask { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tch-ask small { color: var(--muted); font-size: var(--fs-fine); }
.teach-d > summary .set-go { margin-left: auto; transition: rotate var(--fast) var(--ease); }
.teach-d[open] > summary .set-go { rotate: 90deg; }

.teach-body {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  align-items: start; gap: var(--s5);
  padding: 0 var(--s5) var(--s5);
}
.teach-say, .teach-do { display: flex; flex-direction: column; gap: 14px; }
.teach-say { max-width: 60ch; }
@media (max-width: 899px) {
  .teach-body { grid-template-columns: 1fr; }
}
.teach-d h3 { font-family: var(--serif); font-size: 21px; margin: 0; }
.teach-lead { margin: 0; color: var(--fg-2); }
.teach-points {
  margin: 0; padding: 0; list-style: none;
  border-radius: var(--r-panel);
  background: var(--bg-sunken);
  box-shadow: inset 0 0 0 1px var(--hair);
}
.teach-points li {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 13px 16px; font-size: var(--fs-small);
}
.teach-points li + li { box-shadow: inset 0 1px 0 var(--hair); }
.tp-g {
  flex: none; width: 26px; text-align: center;
  font-family: var(--serif-hz); font-size: 19px; line-height: 1.3; color: var(--fg-2);
}
.tch-share { height: 50px; border-radius: var(--r-pill); font-size: var(--fs-small); font-weight: 600; }
.tch-share-i { font-size: 15px; }
.tch-share-note { text-align: center; }

.rails { display: flex; flex-direction: column; gap: 6px; color: var(--fg); }
.rails svg { display: block; width: 100%; height: auto; }
.rail-tile rect { fill: var(--card); stroke-width: 1.2; }
.rail-tile text { font-family: var(--serif-hz); font-size: 22px; }
.rail-tile.home rect { stroke: color-mix(in srgb, var(--growth-3) 60%, transparent); }
.rail-tile.home text { fill: var(--growth-3); }
.rail-tile.teach rect { stroke: color-mix(in srgb, var(--seal) 60%, transparent); }
.rail-tile.teach text { fill: var(--seal-text); }
.rail-labels { display: flex; }
.rail-labels span {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  text-align: center;
}
.rail-labels b { font-size: var(--fs-fine); }
.rail-labels small { color: var(--muted); font-size: var(--fs-fine); }
.dots { margin: 6px 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; font-size: var(--fs-small); }
@media (prefers-reduced-motion: reduce) { .teach-d > summary .set-go { transition: none; } }

.join-form { max-width: 440px; }
.join-name { font-size: 20px; margin: 0; }
.join-sees { max-width: 560px; margin-top: 14px; }
.join-sees .sub { margin: 0; }
.join-sees .dots { margin: -4px 0 0; }
.join-sees .dots + .sub { margin-top: var(--s3); }
.klass-teachers { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0 0; }
.klass-teachers .teacher { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-small); }
.klass-teachers .av { width: 26px; height: 26px; font-size: 13px; }
.ask p { margin: 0; color: var(--fg-2); white-space: pre-line; }


.day-meter {
  display: block; height: 5px; margin: 8px 0 0; max-width: 320px;
  border-radius: 3px; background: var(--hair); overflow: hidden;
}
.day-meter i { display: block; height: 100%; background: var(--seal); border-radius: inherit; }
.day-meter.day-met i { background: var(--growth-4); }

.day-stats { display: flex; flex-wrap: wrap; margin: var(--s3) 0 0; }
.day-stat {
  display: inline-flex; align-items: baseline; gap: 6px; padding: 0 var(--s4);
  border-left: 1px solid var(--hair);
  color: color-mix(in srgb, var(--fg-2) 50%, var(--fg)); text-decoration: none;
}
.day-stat:first-child { padding-left: 0; border-left: 0; }
.day-stat b {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--serif); font-size: 22px; font-weight: 600; line-height: 1;
  font-variant-numeric: tabular-nums; color: var(--muted);
  align-self: center;
}
.day-stat.lit b { color: var(--fg); }
.day-stat .flame-i { width: 18px; height: 18px; color: var(--muted); }
.day-stat.lit .flame-i { color: var(--seal); }
.day-stat > span { font-size: 14px; }
.day-stat:hover > span { color: var(--fg); }
.day-stat .stat-i { width: 19px; height: 19px; }
.day-stat.lit .stat-cards { color: var(--jade); }

.scroll-do:has(.camp-plan) { justify-items: center; }
.camp-plan {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; margin: 0;
  font-size: var(--t-cap); line-height: 1.3;
  color: color-mix(in srgb, var(--fg-2) 50%, var(--fg));
}
.camp-plan .cp { white-space: nowrap; color: var(--muted); }
.camp-plan .cp.on { color: inherit; }
.camp-plan .cp b { font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.camp-plan .cp.on b { color: var(--fg); }
.camp-plan .cp + .cp::before { content: '·'; margin-right: 12px; color: var(--muted); }

.dchip-slot { position: relative; flex: 0 0 auto; display: flex; }
.dchip-lim {
  position: absolute; right: calc(-6 * var(--cu)); bottom: calc(-6 * var(--cu));
  width: calc(18 * var(--cu)); height: calc(18 * var(--cu));
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: calc(12 * var(--cu)); line-height: 1; text-decoration: none;
  color: var(--fg-2); background: var(--card);
  box-shadow: 0 0 0 1px var(--hair), 0 1px 3px rgba(26, 24, 19, .18);
  z-index: 2;
}
.dchip-lim:hover, .dchip-lim:focus-visible { color: var(--fg); background: var(--raised); }
.dchip-bar {
  display: block; height: 4px; margin-top: 5px; border-radius: 2px;
  background: var(--hair); overflow: hidden;
}
.dchip-bar i { display: block; height: 100%; background: var(--growth-4); border-radius: inherit; }
@media (max-width: 743px) {
  .dchip-slot { display: flex; align-items: center; }
  .dchip-slot .dchip { flex: 1 1 auto; }
  .dchip-lim {
    position: static; width: 32px; height: 32px; margin-right: var(--s4);
    font-size: 16px; box-shadow: 0 0 0 1px var(--hair);
  }
  .dchip-slot + .dchip, .dchip + .dchip-slot, .dchip-slot + .dchip-slot {
    box-shadow: inset 0 1px 0 var(--hair);
  }
}

.dchip-g.dmark,
.dchip:hover .dchip-g.dmark, .dchip:focus-visible .dchip-g.dmark {
  background: none; box-shadow: none; filter: none;
  color: var(--ink);
}
.dchip-g.dmark--stack { color: #fff; }
.dchip-g.dmark svg { display: block; width: 100%; height: 100%; overflow: visible; }
.dchip-g.dmark .dmark-i path {
  fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round;
}
.dchip-g.dmark .dmark-i path.f { fill: currentColor; stroke: none; }
.dchip-chev { display: none; }
.camp-boxes { display: contents; }

@media (max-width: 743px) {
  .camp-boxes {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    padding: 10px 12px 12px;
  }
  .dchip-slot + .camp-boxes, .dchip + .camp-boxes { box-shadow: inset 0 1px 0 var(--hair); }
  .camp-boxes > .dchip:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .camp-boxes .dchip--box {
    display: grid; grid-template-columns: auto 1fr auto; align-items: center;
    gap: 6px 8px; padding: 6px 10px;
    background: var(--card); border-radius: 12px;
    box-shadow: inset 0 0 0 1px var(--hair);
  }
  .camp-boxes .dchip--box .dchip-g { width: 32px; height: 32px; }
  .camp-boxes .dchip--box .dchip-chev {
    display: block; grid-column: 3; justify-self: end;
    color: var(--muted); font-size: 16px; line-height: 1;
  }
  .camp-boxes .dchip--box .dchip-b { grid-column: 1 / -1; align-self: end; }
  .camp-boxes .dchip--box .dchip-t { flex-wrap: wrap; row-gap: 2px; }
  .camp-boxes .dchip--box .dchip-s:not(.dchip-pct),
  .camp-boxes .dchip--box .dchip-note {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
  }
}

.dchip-barrow { display: contents; }
.dchip-scope, .dchip-pctn, .dchip-lim-sl { display: none; }
:root { --deck-wash: 7%; }
:root[data-theme="dark"] { --deck-wash: 12%; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --deck-wash: 12%; }
}
@media (max-width: 743px) {
  .camp-decks:has(.dchip) { gap: 12px; padding: 14px; }
  .camp-decks > .camp-boxes { margin-top: 0; padding: 0; gap: 10px; box-shadow: none; }
  .camp-decks > .dchip-slot,
  .camp-decks > .dchip {
    position: relative;
    background: color-mix(in srgb, var(--deck-ink) var(--deck-wash), var(--bg));
    border-radius: 12px;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--deck-ink) 26%, var(--bg));
  }
  .camp-decks > .dchip-slot > .dchip,
  .camp-decks > .dchip {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center; column-gap: 6px; row-gap: 10px;
    padding: 12px;
  }
  .camp-decks > .dchip-slot > .dchip {
    flex: 1 1 auto; grid-template-columns: auto minmax(0, 1fr) auto 24px;
    background: none; box-shadow: none;
  }
  .camp-decks > .dchip-slot .dchip-g,
  .camp-decks > .dchip > .dchip-g {
    grid-column: 1; grid-row: 1; width: 34px; height: 34px; margin-right: 3px;
  }
  .camp-decks > .dchip-slot .dchip-b,
  .camp-decks > .dchip > .dchip-b { display: contents; }
  .camp-decks > .dchip-slot .dchip-t,
  .camp-decks > .dchip > .dchip-b .dchip-t {
    grid-column: 2; grid-row: 1; min-width: 0;
    flex-wrap: wrap; align-items: center; row-gap: 3px; column-gap: 8px;
    font-size: 16px;
  }
  .camp-decks > .dchip-slot .dchip-tag,
  .camp-decks > .dchip > .dchip-b .dchip-tag {
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .camp-decks > .dchip-slot .dchip-counts,
  .camp-decks > .dchip > .dchip-counts {
    position: static; translate: none; display: flex; gap: 6px;
    grid-column: 3; grid-row: 1; flex: none;
  }
  .camp-decks > .dchip-slot :is(.dchip-new, .dchip-rev),
  .camp-decks > .dchip > .dchip-counts :is(.dchip-new, .dchip-rev) {
    display: inline-flex; align-items: center;
    min-width: 0; height: 22px; padding: 0 8px; font-size: 12px; font-variant-numeric: tabular-nums;
  }
  .camp-decks > .dchip-slot .dchip-rev,
  .camp-decks > .dchip > .dchip-counts .dchip-rev {
    order: -1; background: var(--deck-ink); color: var(--card);
  }
  .camp-decks > .dchip-slot .dchip-new,
  .camp-decks > .dchip > .dchip-counts .dchip-new {
    background: none; color: var(--deck-ink);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--deck-ink) 50%, transparent);
  }
  .camp-decks > .dchip-slot .dchip-new::before,
  .camp-decks > .dchip > .dchip-counts .dchip-new::before { content: '+'; }
  .camp-decks > .dchip-slot .dchip-paused,
  .camp-decks > .dchip > .dchip-counts .dchip-paused { box-shadow: none; }
  .camp-decks > .dchip-slot .dchip-paused::before,
  .camp-decks > .dchip > .dchip-counts .dchip-paused::before { content: none; }
  .camp-decks > .dchip-slot .dchip-b :is(.dchip-s, .dchip-note),
  .camp-decks > .dchip > .dchip-b :is(.dchip-s, .dchip-note) {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
  }
  .camp-decks > .dchip-slot .dchip-barrow,
  .camp-decks > .dchip > .dchip-b .dchip-barrow {
    grid-column: 1 / -1; grid-row: 2;
    display: flex; align-items: center; gap: 10px;
  }
  .camp-decks > .dchip-slot :is(.dchip-scope, .dchip-pctn),
  .camp-decks > .dchip > .dchip-b :is(.dchip-scope, .dchip-pctn) {
    display: block; font-size: 13px; color: var(--fg-2); white-space: nowrap;
  }
  .camp-decks > .dchip-slot .dchip-scope,
  .camp-decks > .dchip > .dchip-b .dchip-scope { overflow: hidden; text-overflow: ellipsis; max-width: 60%; }
  .camp-decks > .dchip-slot .dchip-pctn,
  .camp-decks > .dchip > .dchip-b .dchip-pctn {
    min-width: 30px; text-align: right; font-variant-numeric: tabular-nums;
  }
  .camp-decks > .dchip-slot .dchip-bar,
  .camp-decks > .dchip > .dchip-b .dchip-bar { flex: 1 1 auto; margin-top: 0; }
  .camp-decks > .dchip-slot .dchip-bar i,
  .camp-decks > .dchip > .dchip-b .dchip-bar i { background: var(--deck-ink); }
  .camp-decks > .dchip-slot .dchip-lim {
    position: absolute; top: 12px; right: 12px;
    width: 24px; height: 34px; margin: 0; border-radius: 8px;
    background: none; box-shadow: none; color: var(--fg-2);
  }
  .camp-decks > .dchip-slot .dchip-lim:is(:hover, :focus-visible) { background: var(--raised); }
  .camp-decks > .dchip-slot .dchip-lim-dots { display: none; }
  .camp-decks > .dchip-slot .dchip-lim-sl { display: block; width: 21px; height: 21px; }
}

.dchip-name { display: none; }
@media (min-width: 744px) {
  .camp .camp-below {
    translate: -50% calc(2 * var(--cu));
    gap: calc(2 * var(--cu));
    justify-items: stretch;
    min-width: calc(150 * var(--cu));
    padding: calc(4 * var(--cu)) calc(5 * var(--cu));
    border-radius: calc(12 * var(--cu));
    background: color-mix(in srgb, var(--card) 88%, transparent);
    -webkit-backdrop-filter: blur(10px) saturate(1.05);
    backdrop-filter: blur(10px) saturate(1.05);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--fg) 8%, transparent),
                0 calc(10 * var(--cu)) calc(24 * var(--cu)) calc(-14 * var(--cu)) rgba(26, 24, 19, .4);
  }
  .camp .camp-tag {
    justify-self: stretch; text-align: center;
    padding: 0 calc(8 * var(--cu)) calc(3 * var(--cu));
    font-size: calc(12.5 * var(--cu)); line-height: 1.15; letter-spacing: .1em;
    color: var(--muted);
    background: none; -webkit-backdrop-filter: none; backdrop-filter: none;
    border-radius: 0;
    box-shadow: inset 0 -1px 0 var(--hair);
  }
  .camp .camp-soon {
    display: block; max-width: calc(220 * var(--cu));
    padding: calc(3 * var(--cu)) calc(7 * var(--cu));
    font-size: calc(12.5 * var(--cu)); line-height: 1.35; text-align: center; white-space: normal;
  }
  .camp .camp-decks:has(.dchip) {
    display: grid; gap: calc(1 * var(--cu)) calc(6 * var(--cu));
    grid-template-columns: minmax(0, 1fr) auto calc(18 * var(--cu));
  }
  .camp .camp-decks > :is(.dchip, .dchip-slot) { grid-column: 1 / -1; }
  .camp .camp-decks .camp-boxes { display: contents; }
  .camp .camp-boxes > .dchip { grid-column: 1 / -1; }
  .camp .dchip-slot {
    position: static;
    display: grid; grid-template-columns: subgrid; align-items: center;
    border-radius: calc(7 * var(--cu));
  }
  .camp .dchip-slot > .dchip { grid-column: 1 / 3; }
  .camp .dchip {
    position: static;
    width: auto; height: calc(22 * var(--cu));
    display: grid; grid-template-columns: subgrid; align-items: center;
    padding: 0 calc(5 * var(--cu));
    border-radius: calc(7 * var(--cu));
    color: var(--fg);
    transition: background-color var(--fast) var(--ease);
  }
  .camp .dchip-slot > .dchip { padding-right: 0; }
  .camp :is(.dchip-slot:hover, .dchip-slot:focus-within, .dchip:not(.dchip-slot > .dchip):hover,
            .dchip:not(.dchip-slot > .dchip):focus-visible) {
    background: color-mix(in srgb, var(--fg) 6%, transparent);
  }
  .camp .dchip:hover, .camp .dchip:focus-visible { transform: none; }
  .camp .dchip:focus-visible { outline: 2px solid var(--seal); outline-offset: 1px; }

  .camp .dchip-g, .camp .dchip-lit { display: none; animation: none; }

  .camp .dchip-name {
    grid-column: 1;
    display: flex; align-items: baseline; gap: calc(6 * var(--cu));
    min-width: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: calc(14.5 * var(--cu)); font-weight: 500; line-height: 1.2;
    white-space: nowrap;
  }
  .camp .dchip-name-g {
    flex: none; width: 1.15em; text-align: center;
    font-family: 'Noto Serif SC', serif; font-size: calc(15.5 * var(--cu)); font-weight: 600;
  }
  .camp .dchip-name-t { overflow: hidden; text-overflow: ellipsis; max-width: calc(170 * var(--cu)); }
  .camp .dchip-name-done { color: var(--jade-ink); font-weight: 700; }

  .camp .dchip-counts {
    grid-column: 2;
    position: static; translate: none;
    display: flex; align-items: baseline; justify-content: flex-end;
    gap: calc(6 * var(--cu));
    padding-left: calc(6 * var(--cu));
  }
  .camp :is(.dchip-new, .dchip-rev) {
    display: inline; min-width: 0; height: auto; padding: 0;
    border-radius: 0; background: none; box-shadow: none; border: 0;
    font-size: calc(13.5 * var(--cu)); font-variant-numeric: tabular-nums;
  }
  .camp .dchip-rev { order: -1; color: var(--seal-text); font-weight: 700; }
  .camp .dchip-new { color: var(--fg-2); font-weight: 500; }
  .camp .dchip-new:not(.dchip-paused)::before { content: '+'; }
  .camp .dchip-new.dchip-paused { display: inline-flex; align-items: center; gap: calc(3 * var(--cu)); color: var(--muted); }
  .camp .dchip-paused svg { width: calc(11 * var(--cu)); height: calc(11 * var(--cu)); }

  .camp .dchip-lim,
  .camp .dchip-lim:hover, .camp .dchip-lim:focus-visible {
    grid-column: 3;
    position: static;
    width: calc(18 * var(--cu)); height: calc(18 * var(--cu));
    margin-right: calc(2 * var(--cu));
    border-radius: calc(5 * var(--cu));
    background: none; box-shadow: none;
  }
  .camp .dchip-lim { color: var(--muted); opacity: .55; transition: opacity var(--fast) var(--ease); }
  .camp .dchip-slot:is(:hover, :focus-within) .dchip-lim { opacity: 1; }
  .camp .dchip-lim:is(:hover, :focus-visible) { color: var(--fg); }
  .camp .dchip-lim-dots { display: none; }
  .camp .dchip-lim-sl { display: block; width: calc(15 * var(--cu)); height: calc(15 * var(--cu)); }

  .camp .dchip-b {
    bottom: 0; left: calc(100% + 8 * var(--cu)); right: auto;
    background: color-mix(in srgb, var(--card) 96%, transparent);
  }
  .camp .camp-b[data-open="left"] .dchip-b { left: auto; right: calc(100% + 8 * var(--cu)); }
}

.r-new {
  position: absolute; top: 14px; left: 14px;
  padding: 2px 8px; border-radius: var(--r-pill);
  font-size: 11px; font-weight: 600; letter-spacing: .06em;
  color: var(--fg); background: color-mix(in srgb, var(--growth-4) 24%, var(--card));
}
.r-part { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.r-part-g {
  display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 5px;
  font-family: 'Noto Serif SC', serif; font-size: 11px; font-weight: 600;
  color: var(--seal); background: var(--raised);
}
.r-part-wc { padding-right: 8px; border-radius: 999px; background: color-mix(in srgb, var(--wordchar) 16%, transparent); }
.r-part-wc .r-part-w { color: var(--wordchar-ink); }
.r-new ~ :is(.r-lesson, .r-part) { margin-left: 46px; }
.r-new-star { margin-left: 3px; font-size: 9px; color: var(--t2-ink); }
.r-new.r-starred ~ :is(.r-lesson, .r-part) { margin-left: 60px; }
.r-lesson {
  display: inline-block; align-self: flex-start; padding: 3px 8px; border-radius: 999px;
  border: 1px solid var(--hair); background: var(--raised);
  font-size: 10px; font-weight: 600; line-height: 1.2; color: var(--fg-2);
}
.r-idiom {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px;
  border: 1px solid var(--hair); background: var(--raised);
  font-size: 10px; font-weight: 600; line-height: 1.2; color: var(--fg-2);
}
.r-idiom-g { font-family: 'Noto Serif SC', serif; color: var(--seal); }
.wd-lede .r-idiom { align-self: flex-start; }

.tf { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 0; text-align: left; min-width: 0; }
.scroll-in > .tf { grid-column: 1 / -1; width: min(100%, 680px); margin: 0 auto; }
.scroll-in > .tf .tf-head { justify-content: center; column-gap: 14px; }
.scroll-in > .tf .tf-meta { margin-left: 0; }
.scroll-in > .wb { grid-column: 1 / -1; width: min(100%, 680px); margin: 0 auto; text-align: left;
  padding: var(--s3) var(--s4); border-radius: var(--r-card); background: var(--card); box-shadow: var(--panel); }
.wb .wb-head { display: flex; align-items: center; gap: var(--s1); margin: 0; }
.wb .wb-head b { font-weight: 600; }
.wb .wb-head .to-close { margin-left: auto; }
.wb .fine { margin: var(--s1) 0 0; color: var(--muted); }
.tf-next {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0;
  padding: 10px 12px; border-radius: 14px;
  background: color-mix(in srgb, var(--seal) 10%, var(--card));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--seal) 40%, transparent);
}
.tf-next b { flex: 1 1 auto; font-weight: 600; }
.tf-ready {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px;
  padding: 8px 10px; border-radius: 10px;
  background: color-mix(in srgb, var(--jade) 12%, var(--card));
}
.tf-ready b { flex: 1 1 auto; font-size: 13px; font-weight: 600; }
.tf-head { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; row-gap: 2px; }
.tf-label { flex: 0 1 auto; min-width: 0; max-width: 100%; font-size: 15px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tf-meta { display: inline-flex; align-items: baseline; gap: 8px; margin-left: auto; white-space: nowrap; }
.tf-n { font-size: 13px; color: var(--fg-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tf-at { display: inline-flex; align-items: baseline; gap: 4px; white-space: nowrap;
  font-size: 12px; font-weight: 600; color: var(--fg-2); }
.tf-at.on { color: var(--jade-ink); }
.tf-at.late { color: var(--seal-text); }
.tf-over { font-size: 11px; font-weight: 400; color: var(--seal-text); font-variant-numeric: tabular-nums; }
.tf-at.on .tf-over { color: var(--jade-ink); }
.tf-dot { font-weight: 400; color: var(--muted); }
.tf-tiles { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.tf-tile {
  position: relative; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px;
  margin: 0; padding: 8px 4px; border-radius: 10px; border: 1px solid transparent;
  background: var(--raised); color: var(--fg); font: inherit; cursor: pointer;
}
.tf-tile[data-tint] { --wash: 12%; --wash-lit: 22%;
  background: color-mix(in srgb, var(--tint) var(--wash), transparent); }
:root[data-theme="dark"] .tf-tile[data-tint] { --wash: 24%; --wash-lit: 38%; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tf-tile[data-tint] { --wash: 24%; --wash-lit: 38%; }
}
.tf-tile[data-tint] .tf-i { color: var(--tint-ink); }
.tf-tile[data-tint="lesson"] { --tint: var(--t4); --tint-ink: var(--t4-ink); }
.tf-tile[data-tint="pace"] { --tint: var(--t2); --tint-ink: var(--t2-ink); }
.tf-tile[data-tint="perDay"] { --tint: var(--jade); --tint-ink: var(--jade-ink); }
.tf-tile[data-tint="pause"] { --tint: var(--seal); --tint-ink: var(--seal-text); }
.tf-tile:hover { border-color: color-mix(in srgb, var(--tint, var(--fg)) 40%, transparent); }
.tf-tile.lit { color: var(--seal-text); border-color: var(--seal);
  background: color-mix(in srgb, var(--tint) var(--wash-lit), transparent); }
.tf-i { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; }
.tf-v { max-width: 100%; font-size: 12px; font-weight: 600; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tf-sel select {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0;
  opacity: 0; border: 0; font: inherit; font-size: 16px; cursor: pointer;
}
.tf-sel:focus-within, .tf-tile:focus-visible { outline: 2px solid var(--seal); outline-offset: 2px; }
.tf-note { margin: 0 0 10px; color: var(--muted); }

@media (min-width: 744px) {
  .scroll-in .camp-plan { font-size: 12.5px; }
  .scroll-in > .tf .tf-label { font-size: 16px; }
  .scroll-in > .tf .tf-n { font-size: 14px; }
  .scroll-in > .tf .tf-at { font-size: 13.5px; }
  .scroll-in > .tf .tf-over { font-size: 12.5px; }
  .scroll-in > .tf .tf-i { width: 17px; height: 17px; }
  .scroll-in > .tf .tf-v { font-size: 14px; }
}
@media (min-width: 1440px) {
  .scroll { width: min(1040px, 100%); }
  .scroll-said h1 { font-size: 26px; }
  .scroll-said .today-book { font-size: 16px; }
  .scroll-in .day-stat b { font-size: 27px; }
  .scroll-in .day-stat > span { font-size: 17px; }
  .scroll-in .day-stat .flame-i { width: 21px; height: 21px; }
  .scroll-in .day-stat .stat-i { width: 22px; height: 22px; }
  .scroll-in .camp-plan { font-size: 15px; }
  .scroll-in .btn-lg { font-size: 17px; }
  .scroll-in > .tf .tf-label { font-size: 18px; }
  .scroll-in > .tf .tf-n { font-size: 16px; }
  .scroll-in > .tf .tf-at { font-size: 15px; }
  .scroll-in > .tf .tf-over { font-size: 14px; }
  .scroll-in > .tf .tf-tile { padding: 9px 6px; gap: 4px; }
  .scroll-in > .tf .tf-i { width: 18px; height: 18px; }
  .scroll-in > .tf .tf-v { font-size: 15.5px; }
}
.tf-list { display: flex; flex-direction: column; max-height: 60vh; overflow-y: auto; }
.tf-row {
  display: flex; justify-content: space-between; gap: 8px; padding: 10px 4px; border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--fg) 8%, transparent);
  background: none; color: var(--fg); font: inherit; font-size: 15px; text-align: left; cursor: pointer;
}
.tf-row:hover { background: var(--raised); }
.tf-tick { color: var(--seal); font-weight: 600; }
.tf-until { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 16px; }
.tf-until input { font: inherit; padding: 6px 8px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--fg) 14%, transparent);
  background: var(--raised); color: var(--fg); }
.tf-acts { display: flex; flex-direction: column; gap: 8px; }

.r-others { display: inline; margin-left: .6em; font-size: var(--fs-fine); color: var(--muted); }

.tg { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 2px; }
.tg-col { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.tg-l { font-family: 'Noto Serif SC', serif; font-size: 13px; color: var(--muted); }
.tg-dots { display: flex; gap: 9px; }
.tg-dot {
  width: 20px; height: 20px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 0; background: currentColor; opacity: .38;
  transition: opacity var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.tg-dot:hover:not(:disabled) { opacity: .7; }
.tg-dot.on { opacity: 1; transform: scale(1.12); }
.tg-dot:disabled { cursor: default; }
.tg-dot.t1 { color: var(--t1); } .tg-dot.t2 { color: var(--t2); } .tg-dot.t3 { color: var(--t3); }
.tg-dot.t4 { color: var(--t4); } .tg-dot.t5 { color: var(--t5); }
.tg-dot.right { opacity: 1; box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px var(--growth-4); }
.tg-dot.wrong { opacity: 1; box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px var(--seal); }
.tg-verdict { margin: 0; font-size: 11px; color: var(--muted); }
.tg-verdict.ok { color: color-mix(in srgb, var(--growth-4) var(--jade-keep), var(--fg)); }

.r-grade.held, .r-grade:disabled { opacity: .45; cursor: not-allowed; }
.r-held { margin: 0; text-align: center; }
.tg.under.multi { font-size: 68px; gap: 0; flex-wrap: nowrap; }
.tg.under.multi .tg-col { width: 1em; }
.tg.under.multi { width: 100%; container-type: inline-size; justify-content: center; }
.tg.under.multi .tg-col { font-size: min(1em, 100cqi / var(--n, 1)); }
.r-card:has(.r-pic) .tg.under.multi .tg-col { font-size: min(1em, (100cqi - 60px) / var(--n, 1)); }
.tg.under.multi .tg-dots { gap: .045em; }
.tg.under.multi .tg-dot { font-size: inherit; width: .14em; height: .14em; opacity: .5; }
.tg.under.multi .tg-dot:hover:not(:disabled) { opacity: .8; }
.tg.under.multi .tg-dot.on, .tg.under.multi .tg-dot.right, .tg.under.multi .tg-dot.wrong { opacity: 1; }
.tg.under.multi .tg-dot.right { box-shadow: 0 0 0 1px var(--card), 0 0 0 2px var(--growth-4); }
.tg.under.multi .tg-dot.wrong { box-shadow: 0 0 0 1px var(--card), 0 0 0 2px var(--seal); }
@media (max-width: 860px) { .tg.under.multi { font-size: 58px; } }

.r-grade:disabled { opacity: .45; cursor: not-allowed; }

.scope-menu {
  font: inherit; font-size: var(--fs-fine); font-weight: 600;
  height: 30px; padding: 0 10px; border-radius: var(--r-pill);
  color: var(--fg-2); background: var(--raised);
  border: 1px solid var(--hair); cursor: pointer; max-width: 16em;
}
.scope-menu.on { color: var(--seal-text); background: var(--seal-soft); border-color: var(--seal); }
.r-top-actions { align-items: center; }

.scope-pop { position: relative; display: inline-block; }
.scope-menu { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.scope-caret { font-size: .8em; opacity: .7; }
.scope-list {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 30;
  min-width: 12em; max-height: min(70vh, 420px); overflow-y: auto;
  display: flex; flex-direction: column; gap: 1px; padding: 6px;
  background: var(--card); border: 1px solid var(--hair); border-radius: var(--r-card);
  box-shadow: var(--edge), var(--sink);
}
.scope-list[hidden], .scope-lessons[hidden] { display: none; }
[data-scope-menu="setup"] .scope-list { left: 0; right: auto; }
.scope-item {
  font: inherit; font-size: var(--fs-fine); text-align: left; color: var(--fg);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 7px 10px; border: 0; border-radius: var(--r-chip); background: none; cursor: pointer;
}
.scope-item:hover, .scope-item:focus-visible { background: var(--raised); }
.scope-item.on { color: var(--seal-text); font-weight: 600; }
.scope-fold { transition: transform var(--fast) var(--ease); opacity: .6; }
.scope-level[aria-expanded="true"] .scope-fold { transform: rotate(90deg); }
.scope-lessons { display: flex; flex-direction: column; gap: 1px; padding-left: 12px;
                 margin-left: 10px; border-left: 1px solid var(--hair); }
.scope-star { margin-top: 4px; border-top: 1px solid var(--hair); border-radius: 0;
              justify-content: flex-start; gap: 8px; }

.w-link { display: inline-flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
          color: inherit; text-decoration: none; }
.w-link:hover .w-h { color: var(--seal-text); }
.w-lv, .ref-lv { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ref-lv { margin-left: auto; flex: none; }

.speech { display: flex; align-items: center; gap: 14px; max-width: 460px; margin: 0 auto; }
.speech .mascot { width: 84px; margin: 0; }
.speech-b {
  position: relative; margin: 0; padding: 12px 16px; text-align: left;
  border-radius: 16px; background: var(--card); box-shadow: var(--panel);
  font-size: var(--t-body); line-height: 1.45;
}
.speech-b::before {
  content: ''; position: absolute; left: -7px; top: 50%; translate: 0 -50%;
  border: 7px solid transparent; border-left: 0; border-right-color: var(--card);
}

.deck-intro {
  align-items: center; text-align: center; max-width: 520px; margin: 0 auto;
  width: 100%; gap: 18px; padding-top: 6vh;
}
.di-g {
  display: grid; place-items: center; width: 62px; height: 62px; border-radius: 15px;
  font-family: 'Noto Serif SC', serif; font-size: 30px; line-height: 1;
}
.deck-intro h1 { margin: 0; font-size: 24px; }
.deck-limits { max-width: 560px; gap: 16px; }
.deck-limits { position: relative; }
.dl-close {
  position: absolute; top: var(--s4); left: var(--s4);
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  color: var(--fg-2); background: var(--raised);
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.dl-close:hover, .dl-close:focus-visible { color: var(--fg); background: color-mix(in srgb, var(--fg) 10%, var(--raised)); }
.deck-limits .dl-head { padding-left: 44px; }
.dl-head { display: flex; align-items: center; gap: 14px; }
.dl-head .di-g { width: 44px; height: 44px; font-size: 22px; border-radius: 11px; flex: 0 0 auto; }
.dl-t { display: flex; flex-direction: column; gap: 2px; }
.dl-t h1 { margin: 0; font-size: 22px; }
.dl-t .fine { margin: 0; }
.deck-limits .setup-limits .sl-body { padding-top: var(--s5); }
.deck-limits .result-actions { justify-content: flex-start; }
body.at-training .deck-limits {
  width: 100%; margin: var(--s5) auto 0;
  padding: var(--s6);
  border-radius: var(--r-panel);
  background: color-mix(in srgb, var(--card) 90%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.06);
  backdrop-filter: blur(16px) saturate(1.06);
  box-shadow: var(--sink), 0 0 0 1px color-mix(in srgb, var(--fg) 7%, transparent),
              0 30px 60px -44px rgba(26, 24, 19, .5);
}
body.at-training .deck-limits .dl-head {
  padding: 0; background: none; box-shadow: none; backdrop-filter: none; max-width: none;
}
body.at-training .deck-limits .dl-t .fine { color: var(--fg-2); }
body.at-training .deck-limits .setup-limits {
  padding: var(--s5) 0 0; border-radius: 0;
  background: none; box-shadow: none; backdrop-filter: none;
  border-top: 1px solid var(--hair);
}
body.at-training .deck-limits .setup-limits .sl-body { padding: 0; }
.sl-today { margin: var(--s2) 0 0; font-size: var(--fs-fine); color: var(--fg-2); }
.sl-today-k {
  display: block; font-size: 11px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
}

.unlock-veil {
  position: fixed; inset: 0; z-index: 40;
  display: grid; place-items: center; padding: var(--s5);
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  backdrop-filter: blur(6px);
}
.unlock {
  width: min(460px, 100%); max-height: calc(100vh - 2 * var(--s5)); overflow: auto;
  display: flex; flex-direction: column; gap: 12px; padding: 22px;
  border-radius: var(--r-panel); background: var(--card); box-shadow: var(--panel);
}
.unlock-top { display: flex; align-items: center; gap: 14px; }
.unlock-top .mascot { width: 56px; margin: 0; }
.unlock-g {
  display: grid; place-items: center; width: 62px; height: 62px; border-radius: 15px;
  font-family: 'Noto Serif SC', serif; font-size: 30px; line-height: 1;
  color: var(--seal-on); background: var(--seal); rotate: -4deg;
}
.unlock h2 { margin: 4px 0 0; font-size: 26px; }
.unlock-k { margin: 0; font-size: 11px; font-weight: 600; letter-spacing: .06em;
            text-transform: uppercase; color: var(--muted); }
.unlock-decks { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.unlock-decks span { padding: 5px 10px; border-radius: var(--r-chip); background: var(--raised);
                     font-size: 13px; font-weight: 500; }
.unlock-body { margin: 0; color: var(--fg-2); line-height: 1.55; }
.unlock-take { margin: 0; display: flex; gap: 11px; padding: 14px; border-radius: var(--r-card);
               box-shadow: inset 0 0 0 1px var(--hair); }
.unlock-take span { font-family: 'Noto Serif SC', serif; color: var(--seal-text); }
.unlock .fine { margin: 0; text-align: center; }

.result .speech-b, .deck-intro .speech-b { background: var(--raised); }
.result .speech-b::before, .deck-intro .speech-b::before { border-right-color: var(--raised); }

.scroll-course-row { display: flex; align-items: stretch; gap: 4px; }
.scroll-course-row .scroll-course { flex: 1 1 auto; }
.scroll-course-x {
  flex: 0 0 auto; width: 34px; border: 0; background: none; cursor: pointer;
  color: var(--muted); font-size: 16px; border-radius: var(--r-chip);
}
.scroll-course-x:hover { color: var(--fg); background: var(--raised); }

.shelf-m a { flex-wrap: nowrap; align-items: center; justify-content: flex-start; }
.sh-pic {
  width: 56px; height: 56px; flex: none; object-fit: cover;
  border-radius: 10px; background: var(--raised);
}
.sh-b { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sh-tick { color: var(--jade-ink); font-weight: 600; }
.shelf-m li.is-read a {
  background: color-mix(in srgb, var(--jade) 5%, transparent);
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--jade) 70%, transparent);
}
.sh-more { text-align: center; margin-top: var(--s3); }

.rd-pic {
  width: 100%; max-width: 34em; height: 170px; object-fit: cover;
  border-radius: var(--r-panel); background: var(--raised);
}
.rd-meter { display: flex; flex-direction: column; gap: 6px; max-width: 34em; }
.rd-bar { display: block; height: 6px; border-radius: 99px; background: var(--bg-sunken); overflow: hidden; }
.rd-bar i { display: block; height: 100%; background: var(--jade); }
.rd-tools { display: flex; flex-wrap: wrap; gap: var(--s2); max-width: 34em; }
.rd-tools .btn.on { box-shadow: inset 0 0 0 1.5px var(--seal); background: var(--seal-soft); }
.rd-shadow { font-family: 'Noto Serif SC', serif; }
.rd-seal {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  max-width: 34em; padding: var(--s3) 0;
}
.rd-seal-g {
  width: 64px; height: 64px; display: grid; place-items: center;
  font-family: 'Noto Serif SC', serif; font-size: 32px; color: #fff;
  background: var(--seal); border-radius: 14px; transform: rotate(-4deg);
}
.rd-seal b { font-family: 'Fraunces', Georgia, serif; font-size: 20px; }
.rd-xp { font-weight: 600; color: var(--amber-ink); }
.rd-q { display: flex; flex-direction: column; gap: var(--s2); max-width: 34em; }
.rd-q .q { margin: 0; font-family: 'Noto Serif SC', serif; font-size: 17px; }
.quiz-o { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.rd-v { margin: 0; }
.rd-v.good { color: var(--jade-ink); }

.gd-door { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; }
.gd-door .fine { margin: 0; max-width: 52ch; }
.p-py { display: block; font-size: var(--fs-fine); color: var(--muted); font-family: 'Inter', system-ui, sans-serif; }

.gd-kind { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.gd-kind-zh {
  font-family: 'Noto Serif SC', serif; font-size: 13px; padding: 3px 9px;
  border-radius: 8px; background: color-mix(in srgb, var(--seal) 16%, var(--card));
}
.gd-tag {
  margin-left: auto; font-size: 11px; font-weight: 600; letter-spacing: .06em;
  padding: 2px 7px; border-radius: 8px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--jade) 60%, transparent);
  background: color-mix(in srgb, var(--jade) 10%, var(--card));
}
.gd-line ruby { ruby-position: over; }
.gd-line rt { font-family: 'Inter', system-ui, sans-serif; font-size: 12px; color: var(--fg-2); }
.gd-line.with-py { line-height: 2.3; }
.gd-gap { display: inline-block; width: .25em; }
.gd-hint { align-self: stretch; border-top: 1px solid var(--hair); padding-top: var(--s3); }
.gd-hint p { margin: 0; }
.gd-hint-t { font-family: 'Noto Serif SC', serif; font-size: 15px; color: var(--t2, var(--fg)); margin-bottom: 4px !important; }
.gy-o kbd {
  font: inherit; font-size: 11px; color: var(--muted); margin-right: 6px;
  padding: 0 5px; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--hair);
}
.gd-cloze .gy-o { display: flex; align-items: center; gap: 8px; }
.gd-cloze .gd-o-t { font-family: 'Noto Serif SC', serif; font-size: 20px; }
.gd-o-py { margin-left: auto; font-size: var(--fs-fine); color: var(--muted); }
.gy-o.gd-dim { opacity: .5; }
.gd-placed {
  font: inherit; padding: 6px 10px; border-radius: 10px; cursor: pointer;
  background: var(--raised); color: var(--fg); border: 0;
  box-shadow: inset 0 0 0 1px var(--hair);
}
.gd-placed.right { box-shadow: inset 0 0 0 1.5px var(--jade); }
.gd-placed.wrong { box-shadow: inset 0 0 0 1.5px var(--seal); }
.gd-placed:disabled { cursor: default; }
.gd-placed[draggable="true"], .gy-chip[draggable="true"] { cursor: grab; }
.gd-carried { opacity: .3; }
.gd-placed.gd-drop-before { box-shadow: inset 3px 0 0 var(--seal), inset 0 0 0 1px var(--hair); }
.gd-slot.gd-drop-end::after {
  content: ''; align-self: stretch; width: 3px; min-height: 28px; border-radius: 2px; background: var(--seal);
}
.gd-reveal { display: flex; flex-direction: column; gap: 6px; }
.gd-reveal p { margin: 0; }
.gd-verdict { display: flex; align-items: baseline; gap: var(--s2); }
.gd-verdict.good b { color: var(--jade-ink); }
.gd-verdict.bad b { color: var(--seal-text); }
.gd-name { font-family: 'Noto Serif SC', serif; font-size: 18px; }
.gd-pat { font-weight: 600; color: var(--fg-2); }
.gd-sent { display: flex; align-items: center; gap: var(--s2); border-top: 1px solid var(--hair); padding-top: var(--s2); margin: 0; }
.gd-zh { font-family: 'Noto Serif SC', serif; font-size: 18px; }
.gd-py { font-size: var(--fs-fine); color: var(--fg-2); }
.gd-explain-t {
  font: inherit; font-weight: 600; font-size: var(--fs-small); color: var(--fg-2);
  background: none; border: 0; padding: var(--s2) 0; cursor: pointer;
}
.gd-explain-t::after { content: ' \25be'; color: var(--muted); }
.gd-explain-t[aria-expanded="true"]::after { content: ' \25b4'; }
.gd-explain-b { display: flex; flex-direction: column; gap: var(--s3); }
.gd-explain-b p { margin: 0; }
.gd-break { display: flex; flex-wrap: wrap; gap: 10px; }
.gd-b { display: inline-flex; flex-direction: column; align-items: center; max-width: 90px; }
.gd-b-h { font-family: 'Noto Serif SC', serif; font-size: 17px; }
.gd-b-g { font-size: 11px; color: var(--fg-2); text-align: center; }
.gd-alt { display: flex; flex-direction: column; gap: 3px; }
.gd-alt p { margin: 0; }
.gd-cap { margin: 0; font-size: 11px; font-weight: 600; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }

.gd-shape-wrap {
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: center;
  background: color-mix(in srgb, var(--bg) 88%, transparent); padding: var(--s4);
}
.gd-shape {
  max-width: 460px; width: 100%; display: flex; flex-direction: column; gap: var(--s3);
  background: var(--card); box-shadow: var(--panel); border-radius: var(--r-panel); padding: var(--s6);
}
.gd-stage, .gd-main, .gd-side { display: flex; flex-direction: column; gap: var(--s4); }
@media (min-width: 960px) {
  .screen.gym.gd { max-width: 1060px; }
  .gd .gd-stage {
    display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: start; gap: var(--s5);
  }
  .gd:not(.is-open) .gd-main { grid-column: 1 / -1; justify-self: center; width: min(100%, 620px); }
  .gd.is-open .gd-side { position: sticky; top: var(--s4); }
}

.gd .gy-o:disabled { color: var(--fg); }
.gd .gy-o.wrong:disabled { color: var(--seal-text); }
.gd-shape h2 { margin: 0; font-family: 'Fraunces', Georgia, serif; }
.gd-shape p { margin: 0; }
.gd-slots { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s3); }
.gd-slots li { display: flex; align-items: flex-start; gap: 10px; }
.gd-slot-n {
  width: 26px; height: 26px; flex: none; display: grid; place-items: center;
  border-radius: 8px; background: var(--raised); font-size: 12px; font-weight: 600;
}
.gd-slot-b { flex: 1; display: flex; flex-wrap: wrap; gap: 0 6px; }
.gd-slot-note { flex-basis: 100%; }
.gd-slot-ex { font-family: 'Noto Serif SC', serif; font-size: 17px; color: var(--t2-ink, var(--fg)); }


.gface { position: relative; display: inline-block; flex: none; aspect-ratio: 1; }
.gface-xs { width: 34px; }
.gface-sm { width: 46px; }
.gface-md { width: 72px; }
.gface-lg { width: clamp(112px, 16vw, 140px); }

.gface-hero {
  position: relative; display: grid; place-items: center;
  width: clamp(150px, 22vw, 190px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--seal) 26%, transparent),
              color-mix(in srgb, var(--seal) 8%, transparent) 70%, transparent);
}
.gface-hero > .gface { grid-area: 1 / 1; }
.gface-hero.pulse::before {
  content: ''; position: absolute; inset: 6%; border-radius: 50%;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--seal) 40%, transparent);
  animation: ring 2.2s ease-in-out infinite;
}
@keyframes ring {
  0%, 100% { transform: scale(.94); opacity: .9; }
  50% { transform: scale(1.04); opacity: .35; }
}
.gface-hero.greet > .gface + .gface { animation: fade-in .3s ease-out .7s backwards; }
@keyframes fade-in { from { opacity: 0; } }

[data-gushi] { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.gface-hero:has([data-gushi]) { cursor: pointer; }
:is(.gface.is-blinking, .mascot.is-blinking, .gface-hero.is-blinking > .gface:last-child) > .hero-blink {
  animation: none; opacity: 1;
}

.bob { animation: bob 2.4s ease-in-out infinite alternate; }
@keyframes bob {
  from { transform: translateY(4px) rotate(1.1deg); }
  to { transform: translateY(-4px) rotate(-1.1deg); }
}
.arrive { animation: arrive .45s ease-out backwards; animation-delay: calc(.15s + var(--i, 0) * .35s); }
@keyframes arrive { from { opacity: 0; transform: translateY(12px); } }
.pop { animation: pop .38s cubic-bezier(.3, 1.45, .5, 1) backwards; }
@keyframes pop { from { opacity: 0; transform: scale(.3); } }

@media (prefers-reduced-motion: reduce) {
  .bob, .arrive, .pop, .gface-hero.pulse::before,
  .gface-hero.greet > .gface + .gface { animation: none; }
}

.ask:not(dialog) { display: flex; align-items: flex-end; gap: 10px; width: 100%; margin-top: var(--s3); }
.ask:not(dialog) .gface { margin-bottom: -4px; }
.ask-bubble {
  position: relative; flex: 1; margin: 0 0 34px;
  padding: 13px 16px; border-radius: 20px;
  background: var(--fg); color: var(--bg);
  font-family: var(--serif); font-size: clamp(19px, 2.2vw, 23px); line-height: 1.25;
  letter-spacing: -.01em; font-weight: 500;
  transform-origin: 0 100%;
}
.ask-bubble::after {
  content: ''; position: absolute; left: 12px; bottom: -12px;
  width: 17px; height: 13px; background: inherit;
  clip-path: polygon(100% 0, 6% 100%, 45% 0);
}
.hello-bubble {
  position: relative; margin: 14px 0 0; max-width: 34ch;
  padding: 14px 18px; border-radius: 20px;
  background: var(--fg); color: var(--bg); font-weight: 500; line-height: 1.45;
  transform-origin: 50% 0;
  white-space: pre-line;
}
.hello-bubble::before {
  content: ''; position: absolute; left: calc(50% - 8px); top: -12px;
  width: 17px; height: 13px; background: inherit;
  clip-path: polygon(0 100%, 94% 0, 55% 100%);
}
.says { display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left; }
.says-bubble {
  position: relative; flex: 1; margin: 0;
  padding: 11px 14px; border-radius: 16px;
  background: var(--fg); color: var(--bg); line-height: 1.55; font-weight: 500;
  transform-origin: 0 20px;
}
.says-bubble::before {
  content: ''; position: absolute; left: -9px; top: 14px;
  width: 11px; height: 14px; background: inherit;
  clip-path: polygon(100% 0, 0 50%, 100% 100%);
}
.says-bubble b { font-weight: 700; }

.intro-welcome { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s2); width: 100%; }
.intro-welcome h1 { margin: var(--s2) 0 0; }
.intro-welcome .lead, .intro-welcome .fine { max-width: 46ch; }
.intro-rows { display: grid; gap: var(--s2); width: 100%; margin: var(--s2) 0; }
.intro-row {
  display: flex; align-items: center; gap: 13px; width: 100%;
  padding: 14px; border-radius: var(--r-card); cursor: pointer; text-align: left;
  background: var(--card); color: var(--fg); font: inherit;
  box-shadow: var(--panel);
  transition: background var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.intro-row:hover { background: color-mix(in srgb, var(--fg) 5%, var(--card)); }
.intro-row.on { background: var(--raised); box-shadow: var(--panel), inset 0 0 0 1.5px var(--seal); }
.intro-row-g { width: 36px; flex: none; text-align: center; font-size: 26px; line-height: 1; }
.intro-row-b { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.intro-row-b b { font-size: var(--fs-small); font-weight: 600; }
.intro-row-c {
  width: 19px; height: 19px; border-radius: 50%; flex: none;
  box-shadow: inset 0 0 0 1.5px var(--hair);
}
.intro-row.on .intro-row-c {
  background: var(--seal); box-shadow: none;
  background-image: radial-gradient(circle, var(--seal-on) 0 3px, transparent 3.5px);
}
.intro-glyph {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  font-family: var(--serif-hz); font-size: 18px; background: var(--raised); color: var(--fg-2);
}
.intro-row.on .intro-glyph { background: var(--seal); color: var(--seal-on); }
.intro-row[style*="--acc"] .intro-glyph { background: color-mix(in srgb, var(--acc) 16%, var(--card)); color: var(--acc); }
.intro-row.on[style*="--acc"] { box-shadow: var(--panel), inset 0 0 0 1.5px var(--acc); }
.intro-row[data-recommended]:not(.on)[style*="--acc"] { box-shadow: var(--panel), inset 0 0 0 1.5px color-mix(in srgb, var(--acc) 60%, transparent); }
.intro-row.on[style*="--acc"] .intro-glyph { background: var(--acc); color: #fff; }
.intro-row.on[style*="--acc"] .intro-row-c { background-color: var(--acc); }
.intro-pace-kind { width: 100%; margin: var(--s2) 0; }
.intro-hsk {
  display: grid; gap: 6px; width: 100%; padding: 12px 14px 4px; border-radius: var(--r-card);
  background: var(--card); box-shadow: var(--panel);
}
.intro-hsk.on { background: var(--raised); box-shadow: var(--panel), inset 0 0 0 1.5px var(--seal); }
.intro-hsk-head { display: flex; align-items: center; gap: 13px; }
.intro-hsk-head b { font-size: var(--fs-small); font-weight: 600; }
.intro-hsk-chips .intro-chip { min-width: 0; min-height: 0; padding: 8px 12px; background: var(--card); }
.intro-hsk-chips .intro-chip b { font-size: 16px; }
.intro-pace-kind button { padding: 9px 8px; font-size: var(--fs-small); }
.intro-chips {
  position: relative; display: flex; gap: var(--s2); width: 100%; overflow-x: auto; padding: 4px 2px 10px;
  scroll-snap-type: x proximity; scrollbar-width: thin;
}
.intro-chip {
  flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-width: 64px; min-height: 64px; padding: 10px 14px; border-radius: var(--r-card); cursor: pointer;
  background: var(--card); color: var(--fg); font: inherit; box-shadow: var(--panel); scroll-snap-align: center;
  transition: background var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.intro-chip:hover { background: color-mix(in srgb, var(--fg) 5%, var(--card)); }
.intro-chip.on { background: var(--raised); box-shadow: var(--panel), inset 0 0 0 1.5px var(--seal); }
.intro-chip { position: relative; }
.intro-chip b { font-size: 22px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.intro-chip.on b, .intro-tile.on b { color: var(--seal); }
.intro-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); width: 100%; }
.intro-tile {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 72px; padding: 8px 4px; border-radius: var(--r-card); cursor: pointer;
  background: var(--card); color: var(--fg); font: inherit; box-shadow: var(--panel);
  transition: background var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.intro-tile:hover { background: color-mix(in srgb, var(--fg) 5%, var(--card)); }
.intro-tile.on { background: var(--raised); box-shadow: var(--panel), inset 0 0 0 1.5px var(--seal); }
.intro-tile b { font-size: 26px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.intro-tile small { font-size: 12px; color: var(--muted); white-space: nowrap; }
.intro-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--seal); flex: none; }
.intro-chip .intro-dot, .intro-tile .intro-dot { position: absolute; top: 8px; right: 8px; }
.intro-popular { display: flex; align-items: center; gap: 6px; margin: var(--s2) 0 0; }
.intro-chips[data-intro-chips] {
  --wh: 46px;
  flex-direction: column; align-items: stretch; gap: 0; width: min(100%, 260px); margin: 2px auto 0;
  height: calc(var(--wh) * 3); padding: var(--wh) 0; overflow-x: hidden; overflow-y: auto;
  scroll-snap-type: y mandatory; scrollbar-width: none; overscroll-behavior: contain;
  -webkit-mask-image: linear-gradient(transparent, #000 32%, #000 68%, transparent);
          mask-image: linear-gradient(transparent, #000 32%, #000 68%, transparent);
}
.intro-chips[data-intro-chips]::-webkit-scrollbar { display: none; }
.intro-chips[data-intro-chips] .intro-chip {
  flex-direction: row; gap: 8px; min-width: 0; min-height: 0; height: var(--wh); padding: 0 14px;
  border-radius: 12px; background: transparent; box-shadow: none; scroll-snap-align: center;
  color: var(--muted); transition: color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.intro-chips[data-intro-chips] .intro-chip b { font-size: 19px; }
.intro-chips[data-intro-chips] .intro-chip:hover { background: color-mix(in srgb, var(--fg) 4%, transparent); }
.intro-chips[data-intro-chips] .intro-chip.mid { color: var(--fg); }
.intro-chips[data-intro-chips] .intro-chip.on { color: var(--seal-text); background: var(--raised);
  box-shadow: var(--panel), inset 0 0 0 1.5px var(--seal); }
.intro-chips[data-intro-chips] .intro-dot { position: static; }
.intro-hsk .intro-chips[data-intro-chips] { margin-bottom: 8px; }
.intro-shelf {
  margin: var(--s2) 0 0; font-size: 11px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}
.intro-shelf:first-child { margin-top: 0; }
.intro-quiet {
  align-self: flex-start; background: none; border: 0; padding: 4px 0; cursor: pointer;
  font: inherit; font-size: var(--fs-small); color: var(--muted);
  text-decoration: underline; text-underline-offset: 3px;
}
.intro-quiet.on { color: var(--seal-text); font-weight: 600; }
.intro-offer {
  display: flex; flex-direction: column; gap: 6px; width: 100%;
  padding: 14px; border-radius: var(--r-card); background: var(--card); box-shadow: var(--panel);
}
.intro-offer .btn { align-self: flex-start; margin-top: 4px; }
.intro-placed { margin: 0; color: var(--jade-ink); font-weight: 600; font-size: var(--fs-small); }
.intro-acts { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s2); margin-top: var(--s3); }
.intro-acts .btn { margin-top: 0; }
.intro-back {
  background: none; border: 0; padding: 6px 0; cursor: pointer;
  font: inherit; font-size: var(--fs-small); color: var(--muted);
}
.intro-back:hover { color: var(--fg); }
.intro-at-welcome .intro-acts, .intro-at-ready .intro-acts { align-items: center; align-self: center; }

.intro-q, .intro-a { display: contents; }
@media (min-width: 900px) {
  .intro-step.split {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
    column-gap: var(--s6); align-items: center; max-width: 1000px;
  }
  .intro:has(> .split) .intro-rail { max-width: 1000px; }
  .intro-step.split > .intro-q, .intro-step.split > .intro-a {
    display: flex; flex-direction: column; align-items: flex-start; gap: var(--s3); min-width: 0;
  }
  .intro-step.split .intro-rows, .intro-step.split .intro-hsk,
  .intro-step.split .intro-gtable { margin: 0; }
  .intro-step.split .intro-acts { flex-direction: row; align-items: center; gap: var(--s5); margin-top: var(--s2); }
}
@media (min-width: 900px) and (max-height: 820px) {
  .intro { padding-block: var(--s4); gap: var(--s3); }
  .intro-step { padding-top: var(--s5); }
  .intro-step .ask { margin-top: 0; }
  .intro-row { padding-block: 10px; }
  .intro-band { padding-block: 10px; }
}

.intro-find { padding-block: 11px; font-size: 15px; }
.intro-scroll { width: 100%; }
.intro-none { padding: var(--s3) 2px; }
.intro-rows.finding .kh { display: none; }
@media (min-width: 900px) {
  .intro-at-syllabus .intro-scroll {
    max-height: min(56vh, 560px); overflow-y: auto; overscroll-behavior: contain;
    padding: 2px 6px 18px 2px; margin: -2px -6px 0 -2px; scrollbar-width: thin;
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent);
            mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent);
  }
}
@media (max-width: 899px) {
  .intro-at-syllabus .intro-acts {
    position: sticky; bottom: 0; z-index: 2; width: calc(100% + 2 * var(--s5)); margin: 0 calc(-1 * var(--s5));
    padding: var(--s3) var(--s5) calc(var(--s3) + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bg) 84%, transparent);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  }
  .intro-at-syllabus .intro-acts .btn { width: 100%; margin-top: 0; justify-content: center; }
}

.kh { display: none; }
@media (min-width: 861px) and (hover: hover) {
  .kh {
    display: inline-block; margin-left: 10px; padding: 0 5px; border-radius: 4px;
    font: 500 10.5px/1.6 'Inter', system-ui, sans-serif; letter-spacing: .02em;
    color: inherit; opacity: .62; box-shadow: inset 0 0 0 1px currentColor; vertical-align: 1px;
  }
  .intro-row .kh {
    margin: 0; color: var(--muted); opacity: 1; box-shadow: inset 0 0 0 1px var(--hair);
  }
  .gy-o .kh { margin: 0 8px 0 0; vertical-align: 3px; }
  .pl-opts .gy-o { position: relative; }
  .pl-opts .gy-o .kh { position: absolute; left: 10px; top: 9px; margin: 0; }
  .pl-hear .kh { margin-left: 4px; }
}
.intro-who { align-self: center; margin: 0; text-align: center; overflow-wrap: anywhere; }
.intro-who .intro-quiet { display: inline; padding: 0; }

.pc-safety { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin-top: 14px; }
.pc-act {
  font: inherit; font-size: var(--t-cap); color: var(--fg-2); background: none; border: 0;
  padding: 6px 2px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.pc-act.stop { color: var(--seal-text); }
.pc-act:disabled { opacity: .5; cursor: default; }

.pc-pearls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; margin-top: 6px; }
.pc-pearls[hidden] { display: none; }
.kd-head { display: block; flex: none; object-fit: contain; }
.kd-give {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 16px 6px 10px;
  font: inherit; font-weight: 600; color: var(--fg); cursor: pointer;
  background: var(--raised); border: 1px solid var(--hair); border-radius: 999px;
}
.kd-give:hover:not(:disabled) { border-color: #E0B94A; }
.kd-give:focus-visible { outline: 2px solid var(--seal); outline-offset: 2px; }
.kd-give.given, .kd-give:disabled { color: var(--muted); background: none; cursor: default; }
.kd-give { position: relative; }
.kd-fly {
  position: absolute; left: 22px; top: 50%; width: 0; height: 0; pointer-events: none; z-index: 2;
  animation: kd-rise .92s cubic-bezier(.2, .9, .3, 1) forwards;
}
.kd-pearl {
  position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle at 35% 30%, #fff 0, #F6EBDD 45%, #D8B47A 100%);
  box-shadow: 0 0 10px rgba(224, 185, 74, .7);
  animation: kd-pearl .62s ease-out forwards;
}
.kd-spark {
  position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; opacity: 0;
  background: #E0B94A; --kd-r: 38px;
  animation: kd-spark .44s cubic-bezier(.2, .7, .3, 1) .48s forwards;
}
.kd-spark.s { left: -2px; top: -2px; width: 4px; height: 4px; background: var(--seal); --kd-r: 28px; }
@keyframes kd-rise { 0% { transform: translateY(0); } 45% { transform: translateY(-72px); } 100% { transform: translateY(-76px); } }
@keyframes kd-pearl {
  0% { opacity: 1; transform: scale(.3); }
  68% { opacity: 1; transform: scale(1); }
  84% { opacity: 1; transform: scale(1.45); }
  100% { opacity: 0; transform: scale(.2); }
}
@keyframes kd-spark {
  0% { opacity: 1; transform: rotate(var(--kd-a)) translateX(0); }
  45% { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--kd-a)) translateX(var(--kd-r)); }
}
@media (prefers-reduced-motion: reduce) { .kd-fly { display: none; } }
.kd-give.pop .kd-head { animation: kd-pop .42s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes kd-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.35) rotate(-8deg); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) { .kd-give.pop .kd-head { animation: none; } }
.kd-count { color: var(--fg-2); font-size: var(--t-cap); font-variant-numeric: tabular-nums; }
.kd-mine { display: inline-flex; align-items: center; gap: 6px; margin: 0; }

.kd-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px 2px 5px; cursor: pointer;
  font: inherit; font-size: var(--fs-fine); font-weight: 600; color: var(--fg-2);
  background: var(--raised); border: 1px solid var(--hair);
}
.kd-chip:hover { border-color: #E0B94A; }
.kd-chip:focus-visible { outline: 2px solid var(--seal); outline-offset: 2px; }
.kd-chip[aria-expanded="true"] { border-color: #E0B94A; }
.pf-pearls { border: 1px solid var(--hair); border-radius: var(--r-chip); padding: 10px 14px; }
.pf-pearls > h2 { display: flex; align-items: center; gap: 8px; margin: 0; }
.kd-total { font-weight: 600; font-variant-numeric: tabular-nums; }
.kd-new {
  padding: 1px 8px; border-radius: 99px; font-size: var(--t-cap); font-weight: 700;
  color: #1F1A0C; background: #E0B94A;
}
.kd-chip .kd-new { padding: 0 6px; }
.kd-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; }
.kd-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--hair); }
.kd-row b { font-weight: 600; overflow-wrap: anywhere; }
.kd-row small { color: var(--muted); font-size: var(--t-cap); white-space: nowrap; }
.kd-row.new b::after { content: ''; display: inline-block; width: 7px; height: 7px; margin-left: 6px; border-radius: 99px; background: #E0B94A; vertical-align: middle; }
.kd-empty { margin: 10px 0 0; }

.intro-name { display: flex; align-items: center; gap: 14px; width: 100%; }
.intro-photo {
  position: relative; flex: none; width: 64px; height: 64px; cursor: pointer;
  border-radius: 14px; rotate: -4deg; background: var(--seal); color: var(--seal-on);
  display: grid; place-items: center;
}
.intro-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.intro-photo:focus-within { outline: 2px solid var(--seal); outline-offset: 3px; }
.intro-cam {
  position: absolute; right: -5px; bottom: -5px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; background: var(--raised); color: var(--fg-2);
  box-shadow: inset 0 0 0 1px var(--hair);
}
.intro-photo { width: 70px; height: 70px; border-radius: 16px; animation: intro-wiggle .7s linear .65s 1 both; }
.intro-photo-busy {
  position: absolute; inset: 0; margin: auto; width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid color-mix(in srgb, var(--seal-on) 35%, transparent); border-top-color: var(--seal-on);
  animation: spin 0.9s linear infinite;
}
@media (prefers-reduced-motion: reduce) { .intro-photo-busy { animation: none; } }
.intro-photo.empty .intro-cam {
  width: 26px; height: 26px; right: -6px; bottom: -6px;
  background: var(--card); color: var(--seal); box-shadow: inset 0 0 0 1.5px var(--seal);
}
@keyframes intro-wiggle {
  0%, 100% { rotate: -4deg; }
  12% { rotate: 6deg; }
  28% { rotate: -12deg; }
  45% { rotate: 3deg; }
  62% { rotate: -9deg; }
  80% { rotate: -2deg; }
}
@media (prefers-reduced-motion: reduce) { .intro-photo { animation: none; } }
.intro-name-b { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.intro-input {
  width: 100%; padding: 14px; border-radius: var(--r-chip); font: inherit; font-size: 17px;
  background: var(--card); color: var(--fg); border: 0; box-shadow: inset 0 0 0 1px var(--hair);
}
.intro-input:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--seal); }

.intro-summary {
  width: 100%; margin: var(--s3) 0 0; padding: 0; border-radius: var(--r-card);
  background: var(--card); box-shadow: var(--panel);
}
.intro-summary > div {
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3);
  padding: 13px 15px;
}
.intro-summary > div + div { border-top: 1px solid var(--hair); }
.intro-summary dt { color: var(--fg-2); font-size: var(--fs-small); }
.intro-summary dd { margin: 0; font-weight: 600; text-align: right; }
.intro-receipt { padding: 4px 0; border-radius: 20px; }
.intro-receipt > .ir-row {
  display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto;
  column-gap: 14px; row-gap: 3px; align-items: center; justify-content: stretch; padding: 10px 16px;
}
.intro-done .gface-hero { width: clamp(100px, 15vw, 126px); }
.intro-done .gface-hero > .gface-lg { width: clamp(74px, 11vw, 92px); }
.intro-receipt > .ir-row + .ir-row { border-top: 0; background: linear-gradient(var(--hair), var(--hair)) 74px 0 / calc(100% - 74px) 1px no-repeat; }
.ir-seal {
  grid-row: 1 / span 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  font-family: var(--serif-hz); font-size: 21px; color: var(--acc);
  background: color-mix(in srgb, var(--acc) 16%, var(--card));
}
.ir-seal.filled { background: var(--acc); color: #fff; }
.intro-receipt dt {
  align-self: end; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.intro-receipt dd {
  align-self: start; text-align: left; font-family: var(--serif); font-weight: 500; font-size: 19px; line-height: 1.2; color: var(--fg);
  font-variant-numeric: lining-nums;
}
.intro-receipt dd.big { font-size: 26px; }
.intro-receipt dd small { font-family: 'Inter', system-ui, sans-serif; font-size: 13px; font-weight: 500; color: var(--fg-2); margin-left: 3px; }

.intro-hsk { display: grid; gap: var(--s2); width: 100%; margin: var(--s2) 0 0; }
.intro-hsk h2 { margin: 0; font-size: var(--t-body); }
.intro-band {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px 12px;
  padding: 14px; border-radius: var(--r-card); background: var(--card); box-shadow: var(--panel);
}
.intro-band-rungs { display: flex; gap: 4px; }
.intro-band-rungs span {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px;
  font-size: var(--fs-small); font-weight: 600; font-variant-numeric: tabular-nums;
}
.intro-band-rungs.r0 span { background: color-mix(in srgb, var(--seal) 14%, transparent); }

.intro-stamp {
  display: flex; gap: 14px; align-items: center; width: 100%; max-width: 340px;
  padding: 12px 16px 12px 12px; border-radius: var(--r-card);
  background: var(--card); box-shadow: var(--panel); color: var(--fg); text-decoration: none;
  transition: box-shadow var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.intro-stamp:hover { box-shadow: var(--panel), inset 0 0 0 1px var(--seal); transform: translateY(-1px); }
.intro-stamp-mark {
  flex: none; display: grid; place-content: center; gap: 1px; width: 56px; height: 56px;
  border: 2px solid var(--seal); border-radius: 8px; color: var(--seal-text);
  box-shadow: inset 0 0 0 1px var(--card), inset 0 0 0 3px var(--seal-soft);
}
.intro-stamp-mark b { display: block; font-family: var(--serif-hz); font-size: 14px; font-weight: 600; line-height: 1.1; text-align: center; }
.intro-stamp-txt { display: grid; gap: 2px; min-width: 0; }
.intro-stamp-k { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.intro-stamp-txt > b { font-family: var(--serif-hz); font-size: 15px; font-weight: 600; }
.intro-stamp-go { font-size: 12.5px; font-weight: 600; color: var(--seal-text); }
.intro-band b { font-weight: 600; }
.intro-band .fine { margin: 0; font-variant-numeric: tabular-nums; }
.intro-band-bar {
  grid-column: 1 / -1; height: 5px; border-radius: 99px; background: var(--hair); overflow: hidden;
}
.intro-band-bar i { display: block; height: 100%; border-radius: inherit; background: var(--seal); }

.intro-stages {
  width: 100%; box-sizing: border-box; align-self: stretch;
  margin-top: var(--s3); padding: 12px 14px; border-radius: var(--r-card);
  background: var(--card); box-shadow: var(--panel);
}
.intro-stages-k { margin: 0 0 8px; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.intro-stages ol { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 6px; }
.intro-stages li { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.intro-stages li + li::before {
  content: '→'; position: absolute; left: -3px; top: 10px; transform: translateX(-50%);
  color: var(--muted); font-size: 12px;
}
.intro-stages li span {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  font-family: 'Noto Serif SC', serif; font-size: 18px; color: var(--fg);
  background: color-mix(in srgb, var(--g) 12%, var(--card));
  border: 1.5px solid color-mix(in srgb, var(--g) 70%, transparent);
}
.intro-stages li b { font-size: 11.5px; font-weight: 600; color: var(--g); }
.intro-stages li small { font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.intro-gtable .g1, .gl-chips .g1 { --g: var(--seal); }
.intro-gtable .g2, .gl-chips .g2 { --g: var(--t2); }
.intro-gtable .g3, .gl-chips .g3 { --g: var(--jade); }
.intro-gtable .g4, .gl-chips .g4 { --g: var(--t4); }
.intro-gtable {
  width: 100%; border-collapse: separate; border-spacing: 0; overflow: hidden;
  border-radius: var(--r-card); background: var(--card); box-shadow: var(--panel);
}
.intro-gtable th {
  padding: 10px 14px 8px; text-align: left; font-size: 11px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.intro-gtable th:last-child, .intro-gtable td:last-child { text-align: right; }
.intro-gtable td { padding: 10px 14px; border-top: 1px solid var(--hair); color: var(--fg-2); vertical-align: middle; }
.intro-gtable td:first-child { width: 1%; padding-right: 0; }
.intro-gtable td:last-child { white-space: nowrap; }
.intro-gtable td:last-child b { display: block; color: var(--fg); font-weight: 600; font-variant-numeric: tabular-nums; }
.intro-gtable td:last-child i {
  display: block; width: 64px; height: 4px; margin: 6px 0 0 auto; border-radius: 99px;
  background: linear-gradient(to right, var(--g) var(--w), var(--hair) var(--w));
}
.intro-gtable .ig {
  display: grid; place-items: center; width: 88px; height: 34px; border-radius: 10px;
  font-weight: 600; font-size: var(--fs-small); color: var(--fg);
  background: color-mix(in srgb, var(--g) 22%, var(--card));
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--g) 55%, transparent);
}

.gl { width: 100%; height: 250px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 20px; overflow: hidden; perspective: 700px; }
.gl-stage {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  transform-origin: 50% 100%; animation: gl-zoom 5s ease-in-out infinite;
}
.gl-card {
  position: relative; width: 124px; height: 112px; transform-style: preserve-3d;
  animation: gl-turn 5s ease-in-out infinite;
}
.gl-face {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 2px;
  border-radius: 14px; background: var(--card); box-shadow: var(--panel);
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.gl-front { font-family: var(--serif-hz); font-size: 40px; color: var(--fg); }
.gl-back { transform: rotateY(180deg); }
.gl-back small { font-size: 12px; color: var(--muted); }
.gl-back b { font-size: 17px; font-weight: 600; color: var(--fg); }
.gl-back span { font-family: var(--serif-hz); font-size: 18px; color: var(--fg-2); }
.gl-front { animation: gl-front 5s step-end infinite; }
.gl-back { animation: gl-back 5s step-end infinite; }
@keyframes gl-front { 0% { opacity: 1; } 17% { opacity: 0; } 92%, 100% { opacity: 1; } }
@keyframes gl-back { 0% { opacity: 0; } 17% { opacity: 1; } 92%, 100% { opacity: 0; } }
.gl-chips { display: flex; gap: 6px; animation: gl-rise 5s ease-in-out infinite; }
.gl-chips span {
  display: grid; place-items: center; min-width: 64px; height: 30px; padding: 0 8px; border-radius: 9px;
  font-size: 12px; font-weight: 600; color: var(--fg);
  background: color-mix(in srgb, var(--g) 22%, var(--card));
  box-shadow: inset 0 0 0 1.2px color-mix(in srgb, var(--g) 60%, transparent);
  animation: gl-lit 5s linear infinite; animation-delay: calc(var(--i) * .35s);
}
@keyframes gl-turn {
  0%, 10% { transform: rotateY(0); }
  24%, 86% { transform: rotateY(180deg); }
  98%, 100% { transform: rotateY(360deg); }
}
@keyframes gl-rise {
  0%, 24% { opacity: 0; transform: translateY(10px); }
  36%, 86% { opacity: 1; transform: none; }
  98%, 100% { opacity: 0; transform: translateY(10px); }
}
@keyframes gl-zoom {
  0%, 40% { transform: none; }
  52%, 84% { transform: scale(1.35); }
  96%, 100% { transform: none; }
}
@keyframes gl-lit {
  0%, 52% { background: color-mix(in srgb, var(--g) 22%, var(--card)); transform: none; }
  55%, 58% { background: color-mix(in srgb, var(--g) 55%, var(--card)); transform: scale(1.08); }
  61%, 100% { background: color-mix(in srgb, var(--g) 22%, var(--card)); transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .gl-stage, .gl-card, .gl-chips, .gl-chips span, .gl-face { animation: none; }
  .gl-card { transform: rotateY(180deg); }
  .gl-front { opacity: 0; }
}

.st { display: grid; justify-items: center; width: 100%; }
.st-idea {
  width: 120px; height: 120px; border-radius: 20px; background: #F4F1E9;
  box-shadow: inset 0 0 0 1px var(--hair);
}
.st-branch { width: 208px; height: 18px; overflow: visible; }
.st-branch path { fill: none; stroke: color-mix(in srgb, var(--seal) 55%, transparent); stroke-width: 2; stroke-linecap: round; }
.st-pair { display: flex; gap: 40px; }
.st .intro-part { flex: none; width: 84px; padding: 7px 6px; gap: 4px; }
.st .intro-part b { font-size: 32px; }
.st-line { margin: 10px 0 0; text-align: center; font-size: 15px; color: var(--fg-2); }
.st-told .story { padding: 0; background: none; max-width: 34ch; margin: 0 auto; color: var(--fg); }
.st-draw { fill: none; stroke-dasharray: 1; stroke-dashoffset: 1; animation: st-draw var(--st-l) linear var(--st-d) forwards; }
.st-fade { opacity: 0; animation: st-fade var(--st-l) ease-out var(--st-d) forwards; }
@keyframes st-draw { to { stroke-dashoffset: 0; } }
@keyframes st-fade { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .st-draw { stroke-dashoffset: 0; animation: none; }
  .st-fade { opacity: 1; animation: none; }
}

.intro-part {
  flex: 1; display: grid; justify-items: center; gap: 6px; padding: 16px 6px; border-radius: 16px;
  background: var(--card); box-shadow: inset 0 0 0 1px var(--hair);
}
.intro-part b { font-family: var(--serif-hz); font-size: 44px; font-weight: 400; line-height: 1.1; color: var(--fg); }
.intro-part small { font-size: 13px; font-weight: 500; color: var(--fg-2); }
.intro-part.whole { background: color-mix(in srgb, var(--seal) 12%, var(--card)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--seal) 55%, transparent); }
.intro-part.whole b, .intro-part.whole small { color: var(--seal); }

.intro-league { display: grid; gap: 8px; width: 100%; }
.intro-league-scope span {
  flex: 1; display: grid; place-items: center; height: 30px; border-radius: 8px;
  font-size: 12px; font-weight: 600; color: var(--fg-2);
}
.intro-league-scope span.on { background: var(--card); color: var(--fg); box-shadow: var(--shadow); }
.intro-league ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.intro-league li {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px;
  background: var(--card); box-shadow: inset 0 0 0 1px var(--hair);
}
.intro-league li.me { background: color-mix(in srgb, var(--seal) 14%, var(--card)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--seal) 50%, transparent); }
.intro-league .il-rank { width: 22px; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
.intro-league .il-face {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover; display: grid; place-items: center;
  font-size: 14px; font-weight: 600; color: #fff; background: var(--acc, var(--seal));
}
.intro-league li b { flex: 1; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.intro-league .il-xp { color: var(--fg-2); font-variant-numeric: tabular-nums; white-space: nowrap; }

.pl-head { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.pl-glyph { margin: 0; font-family: var(--serif-hz); font-size: 46px; line-height: 1; color: var(--seal); }
.pl-loading { display: flex; align-items: center; gap: 10px; }
.pl-loading .spin {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--hair); border-top-color: var(--fg-2);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) { .pl-loading .spin { animation: none; } }
.pl-top { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.pl-skill {
  font-size: var(--t-cap); font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--seal-text); padding: 4px 9px; border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--seal) 13%, var(--card));
}
.placement .gy-rail { width: 100%; }
.pl-prompt { display: flex; flex-direction: column; gap: 6px; width: 100%; margin: var(--s2) 0; }
.pl-prompt .fine { margin: 0; }
.pl-hanzi { margin: 0; font-family: var(--serif-hz); font-size: 46px; line-height: 1.15; }
.pl-hanzi.long { font-size: 34px; }
.pl-note { color: var(--muted); font-style: italic; }
.pl-hear {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 64px;
  border: 0; border-radius: var(--r-card); cursor: pointer; font: inherit; font-weight: 600;
  background: var(--raised); color: var(--seal-text);
}
.pl-opts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; width: 100%; }
.pl-opts .gy-o { width: 100%; text-align: left; }
.pl-opts.zh .gy-o { font-family: var(--serif-hz); font-size: 22px; }
.gy-o.dim { opacity: .55; }

body.in-course .top { display: none; }
.bs-close {
  background: none; border: 0; cursor: pointer; color: var(--muted);
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; flex: none;
}
.bs-close:hover { color: var(--fg); background: var(--raised); }
.basics-lesson .gy-head { align-items: center; gap: var(--s3); }
.basics-lesson .gy-head .gy-part { flex: 1; }
.bs-acts { display: flex; flex-direction: column; align-items: center; gap: var(--s2); }
.bs-acts .btn-lg { min-width: 220px; }
.bs-hero.two { font-size: 44px; }
.bs-screen .says { max-width: 44ch; }

@media (min-width: 900px) {
  .bs-k-anatomy {
    display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--s5);
    align-items: center; text-align: left;
  }
  .bs-k-anatomy > h1 { grid-column: 1 / -1; text-align: center; }
}
@media (min-width: 900px) and (max-height: 820px) {
  .screen.basics-lesson { gap: var(--s3); }
  .bs-screen { min-height: 0; gap: var(--s3); padding: var(--s5); }
  .basics-lesson .bs-acts { flex-direction: row; justify-content: center; gap: var(--s5); }
}

.bs-tonehead { margin: 0; display: flex; align-items: baseline; gap: 10px; }
.bs-tonehead [lang="zh"] { font-family: var(--serif-hz); font-size: 26px; }
.bs-tonecard {
  display: flex; flex-direction: column; align-items: center; gap: var(--s3); width: 100%; max-width: 380px;
  padding: 18px; border: 0; border-radius: var(--r-card); cursor: pointer; font: inherit;
  background: var(--raised); color: currentColor;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 50%, transparent);
}
.bs-tonerow { display: flex; align-items: center; gap: 12px; width: 100%; color: var(--fg); }
.bs-tonerow .bs-hanzi { font-size: 48px; }
.bs-tonew { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; flex: 1; }
.bs-tonew .bs-py { font-size: 24px; }
.bs-spk { color: var(--muted); display: grid; }
.bs-note { margin: 0; display: flex; gap: 11px; text-align: left; max-width: 44ch; color: var(--fg-2); line-height: 1.6; width: 100%; }
.bs-note span { font-family: var(--serif-hz); color: var(--muted); width: 22px; flex: none; font-size: 17px; }

.bs-staff { stroke: var(--hair); }
.bs-contour.draw path + path { stroke-dasharray: 1; animation: drawline .75s ease-in-out both; }
@keyframes drawline { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .bs-contour.draw path + path { animation: none; } }

.bs-swatches span { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bs-swatches i { display: block; width: 100%; height: 6px; border-radius: 6px; }
.bs-marks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: 100%; max-width: 440px; }
.bs-mark {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 14px 6px; border: 0; border-radius: 14px; cursor: pointer; font: inherit;
  background: var(--raised); color: var(--fg);
}
.bs-mark b { font-family: 'Fraunces', Georgia, serif; font-size: 30px; line-height: 1; font-weight: 700; }
.bs-mark:hover, .bs-chip:hover, .bs-whole:hover { filter: brightness(1.06); }

.bs-trap {
  display: flex; align-items: center; justify-content: center; gap: 14px; width: 100%; max-width: 380px;
  padding: 26px; border-radius: 22px;
  background: color-mix(in srgb, currentColor 12%, transparent);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, currentColor 40%, transparent);
}
.bs-trap b { font-family: 'Fraunces', Georgia, serif; font-size: 64px; line-height: 1; color: var(--seal-text); }
.bs-trap > span:not(.bs-emoji) { font-family: 'Fraunces', Georgia, serif; font-size: 34px; color: var(--muted); }
.bs-trap .bs-emoji { font-size: 72px; line-height: 1; }
.bs-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; cursor: pointer;
  border: 0; border-radius: var(--r-pill); font: inherit; color: var(--fg-2);
  background: var(--raised); box-shadow: inset 0 0 0 1px var(--hair);
}
.bs-chip [lang="zh"] { font-family: var(--serif-hz); font-size: 26px; color: var(--fg); }
.bs-chip b { font-size: 20px; font-weight: 700; }

.bs-build { display: flex; flex-direction: column; align-items: center; gap: 18px; width: 100%; }
.bs-whole {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: none; border: 0; cursor: pointer; font: inherit; color: var(--fg);
}
.bs-whole b { font-family: var(--serif-hz); font-weight: 400; font-size: 76px; line-height: 1; }
.bs-parts { display: flex; align-items: center; gap: 10px; }
.bs-parts .bs-part {
  min-width: 78px; padding: 12px 8px; border-radius: 14px; background: var(--raised); gap: 5px;
}
.bs-parts .bs-part b { font-size: 36px; }
.bs-gloss { font-size: 12px; color: var(--violet-ink); }
.bs-line { margin: 0; line-height: 1.6; max-width: 40ch; }
.bs-story { margin-top: var(--s3); padding: 14px; border-radius: var(--r-card); background: var(--card); box-shadow: var(--panel); max-width: 46ch; }
.bs-story .sec-head { margin: 0 0 6px; }

.bs-card hr { width: 100%; border: 0; border-top: 1px solid var(--hair); margin: 6px 0; }
.bs-chips { display: flex; gap: 8px; }
.bs-gloss-chip {
  font-size: 12px; color: var(--violet-ink); padding: 5px 9px; border-radius: var(--r-chip); background: var(--raised);
}
.bs-card > .fine:last-child { max-width: 28ch; text-align: center; }

.bs-say { display: inline-flex; align-items: center; gap: 9px; }
.bs-opts-tone .gy-o { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bs-qn { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bs-verdict { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.bs-rest { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.bs-rest .bs-body { text-align: center; }

.scroll-course-row { grid-column: 1 / -1; display: flex; align-items: stretch; gap: 4px; }
.scroll-course-row .scroll-course { flex: 1; }
.scroll-course-x {
  flex: none; width: 34px; border: 0; background: none; cursor: pointer; color: var(--muted);
  border-radius: var(--r-card);
}
.scroll-course-x:hover { color: var(--fg); background: var(--raised); }

.unlock-veil {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center;
  padding: var(--s4); overflow-y: auto;
  background: color-mix(in srgb, #000 48%, transparent);
}
.unlock {
  width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 18px;
  padding: 22px 22px 26px; border-radius: var(--r-panel);
  background: var(--bg); color: var(--fg); box-shadow: var(--lift);
  animation: arrive .35s ease-out backwards;
}
@media (prefers-reduced-motion: reduce) { .unlock { animation: none; } }
.unlock-head { display: flex; align-items: center; gap: 14px; }
.unlock-glyph {
  width: 62px; height: 62px; border-radius: 15px; rotate: -4deg; display: grid; place-items: center;
  font-family: var(--serif-hz); font-size: 30px; background: var(--seal); color: var(--seal-on);
}
.unlock h2 { margin: 0; font-family: var(--serif); font-size: 27px; line-height: 1.2; font-weight: 500; }
.unlock-k { margin: 0 0 -10px; font-size: var(--t-cap); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.unlock-chips { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.unlock-chips span { font-size: 13px; padding: 6px 10px; border-radius: var(--r-chip); background: var(--raised); }
.unlock-art {
  padding: 16px; border-radius: var(--r-card); background: var(--card); box-shadow: var(--panel);
  display: flex; flex-direction: column; align-items: center; gap: 9px;
}
.unlock-body { margin: 0; color: var(--fg-2); line-height: 1.65; }
.unlock-take {
  margin: 0; display: flex; gap: 11px; padding: 14px; border-radius: var(--r-card);
  background: var(--card); box-shadow: var(--panel); line-height: 1.5;
}
.unlock-take span { font-family: var(--serif-hz); color: var(--seal); font-size: 18px; width: 24px; flex: none; }
.unlock .btn { align-self: stretch; }
.unlock-again { margin: 0; text-align: center; }

.sk-listen { color: var(--t4-ink); } .sk-speak { color: var(--jade-ink); } .sk-read { color: var(--t1-ink); }
.sk-write { color: var(--t3-ink); } .sk-trans { color: var(--t2-ink); }
.ia-comp { display: flex; align-items: center; gap: 10px; }
.ia-part, .ia-whole { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ia-part { min-width: 56px; padding: 9px 6px; border-radius: 11px; background: var(--raised); }
.ia-part b { font-family: var(--serif-hz); font-weight: 400; font-size: 28px; }
.ia-whole b { font-family: var(--serif-hz); font-weight: 400; font-size: 36px; }
.ia-part i, .ia-whole i { font-style: normal; font-size: 11px; }
.ia-part i { color: var(--violet-ink); }
.ia-whole i { color: var(--fg-2); }
.ia-sym { font-family: var(--serif); font-size: 17px; color: var(--muted); }
.ia-curve { width: 100%; height: 96px; overflow: visible; }
.ia-target { stroke: var(--hair); stroke-width: 1; stroke-dasharray: 3 3; fill: none; vector-effect: non-scaling-stroke; }
.ia-saw { stroke: var(--seal); stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ia-saw.draw { stroke-dasharray: 1; animation: drawline .9s ease-in-out both; }
@media (prefers-reduced-motion: reduce) { .ia-saw.draw { animation: none; } }
.ia-dots { fill: var(--seal); }
.ia-cap { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); align-self: flex-start; }
.ia-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--seal); display: inline-block; }
.ia-big { margin: 0; font-family: var(--serif-hz); font-size: 30px; }
.ia-pair { display: grid; gap: 8px; width: 100%; }
.ia-meter { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 8px; }
.ia-meter b { font-family: var(--serif-hz); font-weight: 400; font-size: 17px; }
.ia-track { height: 8px; border-radius: 8px; background: var(--raised); overflow: hidden; }
.ia-track i { display: block; height: 100%; border-radius: 8px; background: currentColor; }
.ia-lbl { font-size: 11px; color: var(--fg-2); }
.ia-steps { display: flex; align-items: flex-end; }
.ia-step { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ia-step b { font-family: var(--serif-hz); font-weight: 400; font-size: 19px; }
.ia-step i {
  display: block; width: 68px; border-radius: 6px;
  background: color-mix(in srgb, currentColor 28%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 70%, transparent);
}
.ia-step span { font-size: 11px; color: var(--fg-2); }
.ia-rule { width: 26px; height: 1px; background: var(--hair); margin-bottom: 21px; }
.ia-words { margin: 0; display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; }
.ia-words span {
  font-family: var(--serif-hz); font-size: 19px; padding: 4px 7px; border-radius: 7px;
  background: color-mix(in srgb, var(--jade) 16%, var(--card));
}
.ia-hand { display: flex; align-items: center; gap: 12px; }
.ia-glyph { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ia-glyph b {
  display: grid; place-items: center; width: 68px; height: 68px; border-radius: 11px;
  font-family: var(--serif-hz); font-weight: 400; font-size: 36px; background: var(--raised);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 70%, transparent);
}
.ia-glyph.traced b {
  color: color-mix(in srgb, var(--t3-ink) 32%, transparent); box-shadow: none;
  outline: 1px dashed color-mix(in srgb, var(--t3-ink) 70%, transparent); outline-offset: -1px;
}
.ia-glyph span { font-size: 11px; color: var(--fg-2); }
.ia-bars { display: flex; align-items: flex-end; gap: 12px; height: 130px; }
.ia-bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; width: 44px; }
.ia-bar i { display: block; width: 18px; border-radius: 5px; background: currentColor; opacity: .8; max-height: 80px; }
.ia-bar b { font-family: var(--serif-hz); font-weight: 400; font-size: 15px; }
.ia-bar span { font-size: 11px; color: var(--fg-2); text-align: center; }

.intro-step .ask-bubble {
  font-size: clamp(19px, 2.2vw, 23px); line-height: 1.25; margin: 0 0 34px; letter-spacing: -.01em;
}
.intro-step {
  padding: var(--s6) var(--s5) var(--s5); border-radius: var(--r-panel);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--lift);
}

.ref-page .char-head, .ref-page .wd-hero { position: relative; align-items: flex-start; }
.ref-page .char-head .char-id { flex: 1 1 0; }
.ref-corner {
  margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: var(--s3);
}
.ref-corner .wd-acts { margin: 0; }
.ref-kind { margin: 0; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }
.also { font-family: Inter, system-ui, sans-serif; font-size: var(--fs-fine); color: var(--muted); }
.also-under { margin: 4px 0 0; line-height: 1.4; }
.also-under.char-m-also { max-width: 46ch; }
.also-under.wd-m-also { max-width: 44ch; }
.also-under.r-meaning-also { max-width: 36ch; margin-left: auto; margin-right: auto; }
.hz { font-family: 'Noto Serif SC', serif; }

.sched { margin: 0; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.sched-row { display: flex; gap: 6px; align-items: baseline; font-size: var(--fs-fine); }
.sched-row dt { font-family: 'Noto Serif SC', serif; color: var(--muted); }
.sched-row dd { margin: 0; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.sched-ready dd { color: var(--t4-ink); font-weight: 500; }

.share-b {
  display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0;
  border-radius: var(--r-pill); background: none; cursor: pointer; color: var(--muted);
}
.share-b:hover { background: var(--raised); color: var(--fg-2); }
.share-b svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round; }

.ref-jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 var(--s2); }
.ref-sec { scroll-margin-top: var(--s6); }
.ref-sec .sub { display: flex; align-items: baseline; gap: 8px; }
.ref-sec-g { font-family: 'Noto Serif SC', serif; color: var(--seal-text); font-size: 17px; }
.ref-h3 {
  margin: var(--s3) 0 0; font-size: 11px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
}
.ref-set {
  margin-left: 10px; text-transform: none; letter-spacing: 0; font-size: var(--fs-fine);
  font-weight: 600; color: var(--seal-text); text-decoration: none;
}
.ref-set:hover { text-decoration: underline; }
.ref-set-p { margin: 0 0 6px; }
.ref-set-p .ref-set { margin-left: 0; }
.un-list { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 8px; max-width: 72ch; }
.readings { margin: 0; display: flex; gap: 8px; align-items: baseline; }
.chip-taught {
  display: inline-block; padding: 1px 8px; border-radius: var(--r-pill);
  background: var(--raised); color: var(--fg-2); font-size: 11px; font-weight: 500;
}
.taught-check { color: var(--growth-4); font-weight: 700; font-size: 0.85em; }
.rpairs { display: grid; grid-template-columns: auto auto 1fr; column-gap: 10px; row-gap: 10px; align-items: baseline; }
.rpair { display: contents; }
.rp-py { font-size: 17px; font-weight: 600; }
.rpairs .play { align-self: baseline; }
.rp-nope { display: block; width: 22px; }
.rp-m { color: var(--fg-2); font-size: 15px; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.rpair-main .rp-m { color: var(--fg); font-family: 'Fraunces', Georgia, serif; font-size: 21px; line-height: 1.3; }
.rpair-main .rp-m.rp-long { font-size: 18px; }
.rpair-main .rp-m.rp-longer { font-size: 16px; }
.rp-m .also { font-family: 'Inter', system-ui, -apple-system, sans-serif; font-size: 13px; line-height: 1.4; color: var(--muted); }
.rpairs.r-pairs { width: fit-content; max-width: 36ch; margin: 0 auto; text-align: left; }
.rpairs.char-pairs { margin: var(--s2) 0 0; max-width: 46ch; }
.rd { display: flex; flex-direction: column; gap: 10px; }
.rd-in { position: absolute; opacity: 0; pointer-events: none; }
.rd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rd-chip {
  padding: 4px 12px; border-radius: var(--r-pill); cursor: pointer;
  background: var(--raised); border: 1px solid var(--hair); font-weight: 500;
}
.rd-p { display: none; flex-direction: column; gap: 8px; }
.rd-m { margin: 0; font-weight: 600; display: flex; gap: 8px; align-items: baseline; }
.rd-in:nth-of-type(1):checked ~ .rd-panels > .rd-p:nth-child(1),
.rd-in:nth-of-type(2):checked ~ .rd-panels > .rd-p:nth-child(2),
.rd-in:nth-of-type(3):checked ~ .rd-panels > .rd-p:nth-child(3),
.rd-in:nth-of-type(4):checked ~ .rd-panels > .rd-p:nth-child(4),
.rd-in:nth-of-type(5):checked ~ .rd-panels > .rd-p:nth-child(5),
.rd-in:nth-of-type(6):checked ~ .rd-panels > .rd-p:nth-child(6) { display: flex; }
.rd-in:nth-of-type(1):checked ~ .rd-chips > .rd-chip:nth-child(1),
.rd-in:nth-of-type(2):checked ~ .rd-chips > .rd-chip:nth-child(2),
.rd-in:nth-of-type(3):checked ~ .rd-chips > .rd-chip:nth-child(3),
.rd-in:nth-of-type(4):checked ~ .rd-chips > .rd-chip:nth-child(4),
.rd-in:nth-of-type(5):checked ~ .rd-chips > .rd-chip:nth-child(5),
.rd-in:nth-of-type(6):checked ~ .rd-chips > .rd-chip:nth-child(6) {
  border-color: var(--seal); background: color-mix(in srgb, var(--seal) 12%, var(--card)); font-weight: 650;
}
.rd-in:focus-visible ~ .rd-chips { outline: 2px solid var(--seal); outline-offset: 2px; border-radius: var(--r-pill); }
.un-exs { display: flex; flex-direction: column; gap: 2px; margin-top: 3px; }
.un-ex { color: var(--fg-2); }
.un-exh { font-family: 'Noto Serif SC', serif; color: var(--fg); font-size: 1.05em; }
.un-exp { color: var(--muted); font-size: .92em; }
.un-exg { color: var(--fg-2); }
.rf-facts { margin: var(--s2) 0 0; display: flex; flex-direction: column; gap: 7px; max-width: 520px; }
.rf-fact { display: flex; justify-content: space-between; gap: var(--s4); font-size: var(--fs-small); }
.rf-fact dt { color: var(--muted); }
.rf-fact dd { margin: 0; text-align: right; }
.rf-fact dd a { color: var(--seal-text); text-decoration: none; }
.measure { margin-left: 6px; color: var(--fg-2); }
.measure b { font-weight: 400; color: var(--fg); font-size: 17px; }

.origin { margin: 0; line-height: 1.55; max-width: 68ch; }

.ref-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ref-list > li + li { box-shadow: inset 0 1px 0 var(--hair); }
.ref-row {
  display: flex; align-items: center; gap: var(--s4); padding: 9px 2px;
  text-decoration: none; color: var(--fg);
}
.ref-row:hover .ref-h { color: var(--seal-text); }
.ref-h { font-family: 'Noto Serif SC', serif; font-size: 24px; flex: none; }
.ref-h.t1 { color: var(--t1-ink); } .ref-h.t2 { color: var(--t2-ink); } .ref-h.t3 { color: var(--t3-ink); }
.ref-h.t4 { color: var(--t4-ink); }
.ref-b { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ref-why { margin-left: auto; padding: 2px 9px; border-radius: var(--r-pill); background: var(--raised); flex: none; }
.ref-more > summary, .sec-more > summary { cursor: pointer; color: var(--seal-text); font-size: var(--fs-fine); padding: 6px 0; }

.tree { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tree-sub { margin: 6px 0 0 13px; padding-left: 17px; border-left: 1px solid var(--hair); }
.tree > li { display: flex; align-items: flex-start; gap: 6px; }
.tree > li > details { flex: 1; }
.tree-node > summary { list-style: none; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.tree-node > summary::-webkit-details-marker { display: none; }
.tree-chev {
  width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--raised); color: var(--fg-2); font-size: 14px; transition: transform var(--fast) var(--ease);
}
.tree-node[open] > summary .tree-chev { transform: rotate(90deg); }
.tree-pad { width: 24px; flex: none; }
.tree-row { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); min-width: 0; }
.tree-g {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center;
  border-radius: var(--r-chip); background: var(--raised);
  font-family: 'Noto Serif SC', serif; font-size: 22px;
}
.tree-g.known { box-shadow: inset 0 0 0 2px var(--jade); }
.tree-b { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tree-b b { font-size: var(--fs-small); font-weight: 600; }
.tree-py { font-size: var(--fs-fine); display: flex; gap: 8px; }
.tree-alt { color: var(--muted); }
.tree-n { margin-left: auto; }
.tree-node[open] > summary .tree-n { display: none; }
.tree-role {
  display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: var(--r-pill);
  background: var(--raised); color: var(--fg-2); font-size: 11px; font-weight: 500; vertical-align: 1px;
}
.tree-story {
  margin: 4px 0 2px 30px; color: var(--fg-2); font-size: var(--fs-fine); line-height: 1.5; max-width: 60ch;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}


.etym { display: flex; gap: 14px; overflow-x: auto; padding: 2px 0; --etym-art: 64px; }
.etym-c { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 72px; flex: none; }
.etym-art {
  width: 64px; height: 64px; border-radius: 8px; background: var(--raised);
  display: grid; place-items: center;
}
.etym-art svg { width: 56px; height: 56px; }
.etym-art path { fill: var(--fg); }
.etym-now { font-family: 'Noto Serif SC', serif; font-size: 48px; line-height: 1; }
.etym-c figcaption { display: flex; flex-direction: column; align-items: center; font-size: 11px; color: var(--muted); text-align: center; }
.etym-zh { font-family: 'Noto Serif SC', serif; font-size: 12px; }

.ex-rv { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ex-rv li { display: flex; align-items: flex-start; gap: 8px; }
.ex-rv details { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ex-rv summary { cursor: pointer; list-style: none; font-size: 19px; }
.ex-rv summary::-webkit-details-marker { display: none; }
.ex-rv mark { background: color-mix(in srgb, var(--amber) 22%, var(--card)); color: inherit; border-radius: 3px; padding: 0 2px; }
.ex-rv .ex-p, .ex-rv .ex-e { display: block; }

.stk { display: flex; flex-wrap: wrap; gap: var(--s5); align-items: flex-start; }
.stk-reveal { margin-top: 16px; text-align: center; }
.stk-reveal > summary { list-style: none; display: inline-flex; cursor: pointer; }
.stk-reveal > summary::-webkit-details-marker { display: none; }
.stk-reveal[open] > summary { display: none; }
.stk-reveal .stk { justify-content: center; }
.stk-watch { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.stk-ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.stk-step { display: inline-flex; align-items: center; gap: 2px; }
.stk-step [data-stk-step] {
  min-width: 32px; min-height: 32px; justify-content: center;
  font-size: 18px; line-height: 1; color: var(--seal);
}
.stk-step [data-stk-step]:disabled { color: var(--muted); opacity: .4; cursor: default; background: transparent; }
.stk-at { min-width: 3.2em; text-align: center; font-variant-numeric: tabular-nums; }
.stk-at:empty { display: none; }
.stk.is-writing .stk-step { display: none; }

.stk-try { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.stk-try-ctl { display: flex; align-items: center; gap: 6px; margin: 0; }
.stk:not(.is-writing) .ink-pad,
.stk:not(.is-writing) .ink-say,
.stk:not(.is-writing) .ink-clear { display: none; }
.stk.is-writing .stk-watch svg.strokes { display: none; }
.ink-pad {
  display: block; width: min(220px, 100%); height: auto; aspect-ratio: 1;
  border-radius: 14px; cursor: crosshair;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  transition: box-shadow var(--fast) var(--ease);
}
.ink-pad.is-ok { box-shadow: 0 0 0 2px var(--jade); }
.ink-pad.is-bad { box-shadow: 0 0 0 2px var(--seal); }
.ink-ghost { fill: color-mix(in srgb, var(--fg) 12%, transparent); transition: fill .18s ease-out; }
.ink-ghost.is-hint { fill: color-mix(in srgb, var(--fg) 34%, transparent); }
.ink-ghost.is-done { fill: var(--fg); }
.ink-ghost.is-failed { fill: color-mix(in srgb, var(--seal) 70%, var(--fg)); }
.ink-live {
  fill: none; stroke: var(--seal); stroke-opacity: .8; stroke-width: 32;
  stroke-linecap: round; stroke-linejoin: round; pointer-events: none;
}
.ink-say { max-width: 30ch; margin: 0; }
@media (prefers-reduced-motion: reduce) { .ink-ghost, .ink-pad { transition: none; } }

.part-head { display: flex; gap: var(--s5); align-items: center; }
.part-g {
  width: 96px; height: 96px; flex: none; display: grid; place-items: center;
  border-radius: var(--r-panel); background: var(--card); box-shadow: var(--panel);
  font-family: 'Noto Serif SC', serif; font-size: 58px;
}
.part-none { color: var(--muted); border: 2px dashed var(--hair); box-shadow: none; }
.part-t { font-family: 'Fraunces', Georgia, serif; font-size: 26px; margin: 0; }
.part-head p { margin: 4px 0 0; }
.part-full .hz { font-size: 20px; }
.part-story { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--fg); }
.part-page .part-head { margin-bottom: var(--s4); }
.part-full { margin-left: 8px; color: var(--fg-2); font-size: var(--fs-fine); }
.other-form {
  margin-left: .4em; padding-left: .4em; border-left: 1px solid var(--hair);
  color: var(--muted); font-family: 'Noto Serif SC', serif;
}
.part-other .other-form { margin-left: 0; padding-left: var(--s4); font-size: 40px; }
.part-lead-form { margin-left: auto; }
.part-lead-form .other-form { font-size: 30px; }
.other-line { display: flex; align-items: baseline; gap: 8px; margin: var(--s2) 0 0; }
.other-line .hz { font-family: 'Noto Serif SC', serif; font-size: 22px; text-decoration: none; }
.part-tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px;
  grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); }
.part-tile {
  display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 2px 5px;
  border-radius: var(--r-chip, 10px); background: var(--raised); text-decoration: none; color: var(--fg);
}
.part-tile:hover { background: color-mix(in srgb, var(--violet) 12%, var(--raised)); }
.part-tile .hz { font-family: 'Noto Serif SC', serif; font-size: 24px; line-height: 1.15; }
.part-tile-m { max-width: 100%; font-size: 11px; line-height: 1.2; color: var(--fg-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.part-words { display: flex; flex-wrap: wrap; }
.part-words .part-tile { min-width: 58px; padding-inline: 8px; }
.part-words .part-tile .hz { white-space: nowrap; }
.part-words .part-tile-m { width: 0; min-width: 100%; text-align: center; }
.parts-band { display: flex; flex-direction: column; gap: 6px; }
.parts-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.parts-b { display: flex; flex-direction: column; min-width: 0; }

.set-hero { display: flex; flex-direction: column; gap: 6px; }
.set-hero p { margin: 0; }
.set-find { margin-top: 14px; }
.set-py { color: var(--muted); }
.set-t[hidden], .ab-block[hidden], .set-part[hidden] { display: none; }
.set-face { font-family: 'Noto Serif SC', serif; font-size: 28px; }
.set-meter { width: min(320px, 100%); height: 5px; }
.ls-learning .ls-meter i, .ls-meter.ls-learning i { background: var(--learning); }
.set-grid { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.set-t { position: relative; display: flex; align-items: center; }
.set-a {
  --ph: var(--hair);
  display: flex; flex-direction: column; min-width: 72px; max-width: 150px; gap: 1px;
  padding: 7px 10px; border-radius: var(--r-chip); text-decoration: none; color: var(--fg);
  background: color-mix(in srgb, var(--ph) 10%, var(--raised));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ph) 55%, transparent);
}
.set-a.ph-ready { --ph: var(--t4); } .set-a.ph-learning { --ph: var(--learning); } .set-a.ph-learned { --ph: var(--jade); }
.set-a .fine { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-h { font-family: 'Noto Serif SC', serif; font-size: 20px; }
.set-t .star { width: 28px; height: 28px; font-size: 15px; margin-left: 2px; }
.set-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.set-r .set-a { flex: 1; max-width: none; gap: 3px; padding: 9px 12px; }
.set-r1 { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.set-r1 .set-py { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-r .set-a .set-m { white-space: normal; overflow: visible; }
.set-article { margin-bottom: var(--s4); }
.ls-hz { font-family: 'Noto Serif SC', serif; font-size: 16px; color: var(--fg-2); }
.ls-done { color: var(--jade-ink); font-weight: 600; font-size: 11px; margin-left: 6px; }

.cellw { position: relative; display: flex; flex-direction: column; }
.cellw > .cell { flex: 1; }
.cellw > .star {
  position: absolute; right: 2px; bottom: 2px; width: 26px; height: 26px; font-size: 13px; margin: 0;
}
.mks { display: flex; gap: 5px; align-items: baseline; min-height: 13px; }
.mk { display: inline-flex; gap: 2px; align-items: baseline; }
.mk-g { font-family: 'Noto Serif SC', serif; font-size: 11px; color: var(--hair); }
.mk-ready { color: var(--t4-ink); } .mk-learning { color: var(--learning-ink); } .mk-learned { color: var(--jade-ink); }
.mk-d { font-size: 8.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mks4 { justify-content: space-between; gap: 2px; overflow: hidden; white-space: nowrap; }
.mks4 .mk-g { font-size: 10px; }
.mk-none { color: var(--muted); opacity: .55; }
.sched4 { display: grid; grid-template-columns: auto auto; column-gap: 10px; row-gap: 3px; }
.sched4 .mk-g { font-size: 13px; }
.sched4 .mk-d { font-size: 11.5px; }
.mk-lv { font-size: 11px; }
.lchips-f { flex: 0 0 auto; }
.lchip-t.on { background: var(--t2); color: var(--bg); }
.lib-halves { margin-bottom: var(--s2); }
.level-all b { font-size: 12px; }
.lib-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }

.glist { display: flex; flex-direction: column; gap: 4px; }
.gband { margin: var(--s4) 0 0; color: var(--seal-text); }
.gcat { margin: var(--s3) 0 2px; font-size: 11px; font-weight: 600; letter-spacing: .07em; color: var(--muted); }
.gpoint { background: var(--raised); border-radius: var(--r-card); padding: 10px 14px; }
.gpoint[open] { background: var(--card); box-shadow: var(--panel); }
.gpoint > summary { list-style: none; display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.gpoint > summary::-webkit-details-marker { display: none; }
.gpoint .dot { margin-top: 7px; }
.gpoint-b { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gpoint-n { font-size: 16px; }
.gpoint-p { color: var(--t2-ink); font-weight: 500; font-size: var(--fs-fine); }
.gpoint-e { color: var(--fg-2); font-size: var(--fs-fine); }
.gpoint-x { margin: 8px 0 0 17px; padding-top: 8px; border-top: 1px solid var(--hair); display: flex; flex-direction: column; }

.lib-sets { display: flex; flex-direction: column; gap: 8px; }
.lib-sets > .fine { margin: 0; max-width: 72ch; }
.lsh-head { display: flex; align-items: baseline; gap: 10px; margin: var(--s4) 0 0; }
.lsh-more { margin-left: auto; font-size: var(--fs-fine); color: var(--seal-text); text-decoration: none; font-weight: 500; }
.lsh { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.lsh-c {
  flex: 0 0 auto; width: 170px; min-height: 112px; display: flex; flex-direction: column; gap: 5px;
  padding: 12px 14px; border-radius: var(--r-panel); background: var(--card); box-shadow: var(--panel);
  text-decoration: none; color: var(--fg);
}
.lsh-c .ls-meter { width: 100%; margin-top: auto; }
.lsh-hz { color: var(--fg-2); font-size: 15px; }
.lsh-g { font-size: 22px; }
.star-g { color: var(--t2-ink); }
.lvl-row .ls-meter { flex: 1; width: auto; margin: 0 var(--s4); }
.lvl-ahead .opt-l b { color: var(--muted); }

.py-cell { display: inline-flex; flex-direction: column; align-items: stretch; gap: 1px; }
.py-open {
  font-size: 11px; color: var(--muted); text-decoration: none; text-align: center;
  max-width: 58px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.py-open:hover { color: var(--fg); }
.py-none { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.py-none .py-t { color: var(--muted); font-size: 11px; }
.py-nd { font-size: 8.5px; color: var(--muted); text-align: center; line-height: 1.1; }
.py-pin { margin-left: auto; font-size: var(--fs-fine); }
.py-pin.on { color: var(--seal-text); }
.py-compare .py-row { background: var(--raised); }
.sec-alt { margin: 0 0 8px; font-size: var(--fs-fine); color: var(--fg-2); }
.py-row { grid-template-columns: 84px 1fr auto; }
.wd-chars .tree { margin: 8px 0 4px 18px; }
.wd-chars .tree a.tree-row { display: flex; padding: 0; background: none; gap: 10px; }

.pd-face, .pc-face { position: relative; }
.lg-row .av, .pd .av, .pc-face .av { transition: box-shadow var(--fast) var(--ease); }
.lg-row.is-online .av,
.pd.is-online .av,
.pc-face.is-online .av {
  box-shadow: 0 0 0 2px var(--card), 0 0 0 4.5px var(--growth-4);
}
.pc-face.is-online .av { box-shadow: 0 0 0 3px var(--card), 0 0 0 6.5px var(--growth-4); }
body.at-league .pd.is-online .av {
  box-shadow: 0 0 0 2.5px var(--card), 0 0 0 5.5px var(--growth-4), 0 6px 16px -6px rgba(0, 0, 0, .5);
}
.face:not(.face-more):not(.face-me) {
  box-shadow: 0 0 0 1.5px var(--card), 0 0 0 3px var(--growth-4), var(--sink);
}
.face-me {
  width: 32px; height: 32px; margin-right: 3px;
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--card) 92%, transparent), 0 3px 8px -3px rgba(20, 14, 8, .45);
}
.face-me .face-i { display: grid; place-items: center; font-size: 13px; }
.around-row:has(.face-me) { align-items: flex-end; }
.lg-online, .fl-head .lg-online { margin: 0; color: var(--growth-4); font-weight: 600; }
.lg-online::before { content: '● '; }

.lg-scope {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  color: color-mix(in srgb, var(--seal) 72%, var(--fg));
}
.lg-scope-orn { flex: none; width: 40px; height: 22px; opacity: .85; }
.lg-scope-orn-r { transform: scaleX(-1); }
.lg-scope-band {
  display: inline-flex; gap: 4px; padding: 4px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--card) 86%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--seal) 34%, transparent),
              0 0 0 3px color-mix(in srgb, var(--card) 45%, transparent),
              0 12px 26px -16px rgba(26, 24, 19, .55);
}
.lg-sc {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-width: 9.2em; padding: 7px 18px 7px 8px;
  border-radius: var(--r-pill);
  font-size: 15px; font-weight: 650; letter-spacing: .01em;
  color: var(--fg); text-decoration: none;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease),
              box-shadow var(--fast) var(--ease);
}
.lg-sc-g {
  display: grid; place-items: center; flex: none;
  width: 28px; height: 28px; border-radius: 7px;
  font-family: var(--serif-hz); font-size: 17px; line-height: 1;
  background: var(--seal); color: var(--seal-on);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--seal-on) 38%, transparent);
}
.lg-sc:not(.on):hover { background: color-mix(in srgb, var(--seal) 10%, transparent); }
.lg-sc.on {
  background: var(--seal); color: var(--seal-on);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), 0 8px 18px -10px var(--seal);
}
.lg-sc.on .lg-sc-g {
  background: var(--seal-on); color: var(--seal);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--seal) 45%, transparent);
}
.lg-sc:focus-visible { outline: 2px solid var(--seal); outline-offset: 3px; }
@media (max-width: 560px) {
  .lg-scope-orn { display: none; }
  .lg-sc { min-width: 0; padding-right: 14px; }
}
.fl-tabs { display: flex; justify-content: flex-end; margin-top: calc(-1 * var(--s2)); }
.fl { gap: var(--s4); }
.fl-title h1 { margin: 0; }
.fl-title .lg-foot { margin: 6px 0 0; }
.fl-card, body.at-league .fl-card { display: flex; flex-direction: column; gap: var(--s5); padding: var(--s5) var(--s6); }
.fl-empty h2 { margin: 0; font-size: 19px; }
.fl-empty > p { margin: 0; color: var(--fg-2); max-width: 56ch; }
.fl-forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s4); }
.fl-form { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.fl-form label { font-size: var(--fs-fine); font-weight: 600; color: var(--fg-2); }
.fl-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fl-row input, .fl-link {
  flex: 1 1 10em; min-width: 0; font: inherit; padding: 9px 12px;
  border-radius: 10px; border: 1px solid var(--hair);
  background: var(--raised); color: var(--fg);
}
.fl-row input::placeholder { color: var(--muted); }
#fl-code, .fl-code { text-transform: uppercase; letter-spacing: .18em; font-variant-numeric: tabular-nums; }
.fl-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s4); flex-wrap: wrap;
  padding: var(--s4) var(--s5); border-radius: var(--r-panel);
  background: color-mix(in srgb, var(--card) 86%, transparent); color: var(--fg);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: var(--sink), 0 0 0 1px color-mix(in srgb, var(--fg) 8%, transparent);
}
.fl-head h2 { margin: 0; font-size: 21px; }
.fl-head .cl-name { flex: 1; min-width: 0; }
.fl-head .cl-logo {
  display: inline-flex; align-items: center; height: 48px; padding: 6px 8px; margin-bottom: 10px;
  border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px color-mix(in srgb, var(--fg) 10%, transparent);
}
.fl-head .cl-logo img { display: block; height: 100%; width: auto; max-width: 144px; object-fit: contain; }
.fl-head .cl-room { flex: none; white-space: nowrap; }
.fl-head.cl-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start;
  column-gap: var(--s4); row-gap: 12px;
}
.fl-head.cl-head.has-logo { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; }
.fl-head.cl-head .cl-logo { margin: 0; justify-self: start; }
.fl-head.cl-head h2 {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.fl-head .fine { margin: 4px 0 0; color: var(--fg-2); }
.fl-rename { margin-top: 6px; }
.fl-rename > summary { list-style: none; cursor: pointer; display: inline-block; }
.fl-rename > summary::-webkit-details-marker { display: none; }
.fl-rename form { margin-top: 8px; }
.fl-invite { position: relative; }
.fl-invite > summary { list-style: none; cursor: pointer; }
.fl-invite > summary::-webkit-details-marker { display: none; }
.fl-invite-in {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 5; width: min(360px, 86vw);
  display: flex; flex-direction: column; gap: 10px; padding: var(--s4);
  border-radius: var(--r-card); background: var(--card); color: var(--fg);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .45), 0 0 0 1px color-mix(in srgb, var(--fg) 10%, transparent);
}
.fl-invite-in .fine { margin: 0; }
.fl-code { margin: 0; font-family: 'Fraunces', Georgia, serif; font-size: 30px; font-weight: 600; text-align: center; }
.fl-invite-in .fl-link { flex: none; font-size: var(--fs-fine); }
.fl-notice, .fl-error { margin: 0; padding: 8px 12px; border-radius: 10px; font-weight: 500; }
.fl-notice { background: color-mix(in srgb, var(--growth-4) 18%, var(--card)); color: var(--fg); }
.fl-error { background: color-mix(in srgb, var(--seal) 14%, var(--card)); color: var(--seal-text); }
.fl-pick { flex-wrap: wrap; }
.fl-more > summary { list-style: none; cursor: pointer; display: inline-flex; }
.fl-more > summary::-webkit-details-marker { display: none; }
.fl-more[open] .fl-forms { margin-top: var(--s3); padding: var(--s4); border-radius: var(--r-card);
  background: color-mix(in srgb, var(--card) 88%, transparent); color: var(--fg);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.fl-leave { margin: 0; text-align: center; }
body.at-league .fl-head,
body.at-league .lg-status,
body.at-league .fl-card,
body.at-league .fl-invite-in,
body.at-league .fl-more[open] .fl-forms {
  --fg: #1C1E18; --fg-2: #4E5046; --muted: #6A6C62;
  --hair: rgba(28, 30, 24, .12); --card: rgb(244, 241, 233); --raised: rgb(252, 250, 245);
  color: var(--fg);
  background: rgba(244, 241, 233, .86);
}
body[data-phase="night"].at-league .fl-head,
body[data-phase="night"].at-league .lg-status,
body[data-phase="dusk"].at-league .lg-status,
body[data-phase="night"].at-league .fl-card,
body[data-phase="night"].at-league .fl-invite-in,
body[data-phase="night"].at-league .fl-more[open] .fl-forms,
body[data-phase="dusk"].at-league .fl-head,
body[data-phase="dusk"].at-league .fl-card,
body[data-phase="dusk"].at-league .fl-invite-in,
body[data-phase="dusk"].at-league .fl-more[open] .fl-forms {
  --fg: #F1EEE6; --fg-2: #D6D2C6; --muted: #A9A597;
  --hair: rgba(241, 238, 230, .12); --card: rgb(20, 22, 38); --raised: rgb(30, 32, 50);
  background: rgba(20, 22, 38, .9);
}
body.at-league .fl-invite-in { background: var(--card); }
body.at-league .fl-title h1, body.at-league .fl-title .fine { text-shadow: 0 0 6px var(--halo), 0 0 2px var(--halo); }
body.at-league .lg-status { box-shadow: var(--sink), 0 0 0 1px color-mix(in srgb, var(--fg) 8%, transparent); }

.fl-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s4); }
.fl-foot .fl-more { flex: 1; min-width: 0; }
.fl-foot .fl-leave { flex: none; }
body.at-league .fl-more > summary.chip {
  background: rgba(244, 241, 233, .86); color: #1C1E18; text-shadow: none;
  box-shadow: 0 1px 2px rgba(28, 30, 24, .12);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
body.at-league .fl-more > summary.chip:hover { background: rgba(252, 250, 245, .95); }
body.at-league .fl-leave .btn-quiet { color: var(--fg-2); text-shadow: 0 0 6px var(--halo), 0 0 2px var(--halo); }
body.at-league .fl .lg-foot { margin: 0; color: var(--fg-2); }
body.at-league .fl-title .lg-when { text-shadow: 0 0 2px var(--halo), 0 0 5px var(--halo), 0 0 10px var(--halo); }

.lg-scope-band:has(> :nth-child(3)) .lg-sc { min-width: 7.4em; }
.fl-pick > a.chip { display: inline-flex; align-items: center; }
.cl-room-g { font-family: var(--serif-hz); font-size: 16px; line-height: 1; color: var(--seal); }
.klass-board { margin: 8px 0 0; }
.klass-board .chip { display: inline-flex; align-items: center; gap: 6px; }

.cm-top {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center; column-gap: var(--s4); row-gap: var(--s3);
}
.cm-top > .cm-switch { grid-column: 1; justify-self: start; }
.cm-top > .lg-scope { grid-column: 2; }
.cm-top > .cm-side { grid-column: 3; justify-self: end; }
.cm-switch { display: inline-flex; align-items: baseline; gap: 18px; }
.cm-w {
  position: relative; padding-bottom: 7px;
  font-family: 'Fraunces', Georgia, serif; font-size: 20px; font-weight: 600; line-height: 1.1;
  color: var(--muted); text-decoration: none; white-space: nowrap;
  transition: color var(--fast) var(--ease);
}
.cm-w:hover { color: var(--fg-2); }
.cm-w.on { color: var(--fg); }
.cm-w.on::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 22px; height: 3px;
  border-radius: 2px; background: var(--seal);
}
.cm-w:focus-visible { outline: 2px solid var(--seal); outline-offset: 4px; border-radius: 4px; }
body.at-league .cm-switch { text-shadow: 0 0 6px var(--halo), 0 0 2px var(--halo); }
@media (max-width: 900px) {
  .cm-top { grid-template-columns: minmax(0, 1fr) auto; }
  .cm-top > .lg-scope { grid-column: 1 / -1; }
  .cm-top > .cm-side { grid-column: 2; }
}
@media (max-width: 560px) {
  .cm-top > .cm-side { padding: 0; width: 40px; height: 40px; border-radius: 50%; justify-content: center; font-size: 20px; line-height: 1; }
  .cm-side-l { display: none; }
}

.ch { gap: var(--s4); }
.ch-find { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.ch-search {
  flex: 1 1 260px; display: flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 12px; border-radius: 12px;
  background: var(--card); color: var(--fg);
  box-shadow: 0 0 0 1px var(--hair);
}
.ch-search svg { flex: none; width: 16px; height: 16px; color: var(--muted); }
.ch-search input {
  flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: none;
  background: transparent; color: inherit; font: inherit;
}
.ch-search input::placeholder { color: var(--muted); }
.ch-search input::-webkit-search-cancel-button { cursor: pointer; }
.ch-search:focus-within { box-shadow: 0 0 0 2px var(--seal); }
.ch-kinds { flex: none; }
.ch-lists { display: flex; flex-direction: column; gap: var(--s5); }
.ch-sec { display: flex; flex-direction: column; gap: 10px; }
.ch-h {
  margin: 0; font-family: inherit; font-size: 12px; font-weight: 650;
  letter-spacing: .1em; text-transform: uppercase; color: var(--fg-2);
}
body.at-league .ch-h, body.at-league .ch-none {
  text-shadow: 0 0 2px var(--halo), 0 0 5px var(--halo), 0 0 10px var(--halo);
}
.ch-none { margin: var(--s6) 0; text-align: center; color: var(--fg-2); font-weight: 500; }
.ch-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.ch-grid-open { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }
.ch-card {
  position: relative; display: flex; align-items: center; gap: 12px;
  min-width: 0; padding: 14px 16px; border-radius: var(--r-panel);
  background: var(--card); color: var(--fg);
  box-shadow: 0 0 0 1px var(--hair);
  transition: box-shadow var(--fast) var(--ease), translate var(--fast) var(--ease);
}
.ch-card:hover { translate: 0 -1px; }
.ch-open {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px;
  color: inherit; text-decoration: none;
}
.ch-open::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.ch-open:focus-visible { outline: none; }
.ch-open:focus-visible::after { outline: 2px solid var(--seal); outline-offset: 2px; }
.ch-join { position: relative; z-index: 1; flex: none; border-radius: var(--r-pill); min-width: 64px; }
.ch-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ch-title {
  font-size: 16px; font-weight: 650; line-height: 1.25;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.ch-goal, .ch-progress {
  font-size: var(--fs-fine); color: var(--fg-2); font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ch-progress.done { color: var(--ch-jade); font-weight: 600; }
.ch-facts {
  display: flex; align-items: center; gap: 6px; min-height: 20px;
  font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.ch-faces { display: inline-flex; flex: none; }
.ch-faces:empty { display: none; }
.ch-faces .av { width: 20px; height: 20px; box-shadow: 0 0 0 1.5px var(--card); }
.ch-faces .av + .av { margin-left: -6px; }
.ch-faces .av-none { font-size: 10px; }
.ch-lock { flex: none; width: 10px; height: 12px; color: var(--muted); }

.ch-k-words { --ch-tint: var(--seal); }
.ch-k-xp { --ch-tint: var(--amber); }
.ch-k-level { --ch-tint: var(--jade); }
.ch-card, .ch-head, .ch-board {
  --ch-tint: var(--seal);
  --ch-jade: color-mix(in srgb, var(--jade) 62%, var(--fg));
}
.ch-mark {
  flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px;
  font-family: var(--serif-hz); font-size: 23px; line-height: 1;
  color: color-mix(in srgb, var(--ch-tint) 72%, var(--fg));
  background: color-mix(in srgb, var(--ch-tint) 15%, transparent);
}
.ch-house-mark { color: var(--seal-on); background: var(--seal); }

.ch-ring {
  --p: 0;
  position: relative; flex: none; display: grid; place-items: center; width: 54px; height: 54px;
}
.ch-ring::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(var(--ch-tint) calc(var(--p) * 1%), color-mix(in srgb, var(--fg) 11%, transparent) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5.5px), #000 calc(100% - 5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 5.5px), #000 calc(100% - 5px));
}
.ch-ring b { position: relative; font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
.ch-ring.done { --ch-tint: var(--jade); }
.ch-ring.done b { font-size: 18px; color: var(--ch-jade); }

.ch-card.ch-official {
  flex-direction: column; align-items: stretch; gap: 0; min-height: 152px; padding: 16px; overflow: hidden;
  color: var(--seal-on);
  background: linear-gradient(135deg, var(--seal), #9A2F1E);
  box-shadow: 0 14px 30px -18px rgba(154, 47, 30, .9);
}
.ch-official .ch-open { flex-direction: column; align-items: flex-start; gap: 4px; }
.ch-house { display: flex; align-items: center; gap: 6px; width: 100%; font-size: 12px; font-weight: 600; opacity: .92; }
.ch-house-g { font-family: var(--serif-hz); font-size: 13px; }
.ch-when { margin-left: auto; font-weight: 500; font-variant-numeric: tabular-nums; }
.ch-official .ch-title { margin-top: 8px; font-family: 'Fraunces', Georgia, serif; font-size: 22px; font-weight: 600; line-height: 1.15; }
.ch-official .ch-goal { color: inherit; opacity: .86; }
.ch-official .ch-facts { margin-top: auto; padding-top: 16px; min-height: 50px; color: inherit; opacity: .92; font-size: 12.5px; }
.ch-official .ch-faces .av { width: 22px; height: 22px; box-shadow: 0 0 0 1.5px var(--seal); }
.ch-official .ch-join {
  position: absolute; right: 16px; bottom: 16px;
  background: var(--seal-on); color: var(--seal);
}
.ch-official .ch-join:hover { background: color-mix(in srgb, var(--seal-on) 90%, var(--seal)); }
.ch-bigmark {
  position: absolute; right: -8px; bottom: -40px; pointer-events: none;
  font-family: var(--serif-hz); font-size: 132px; line-height: 1; color: var(--seal-on); opacity: .09;
}

.fl-head.ch-head {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; column-gap: 14px; row-gap: 14px;
  position: relative; z-index: 2;
}
.ch-head h1 { margin: 0; font-size: 24px; line-height: 1.2; overflow-wrap: anywhere; }
.ch-head h1 .ch-lock { margin-left: 9px; width: 12px; height: 14px; }
.ch-head .ch-join, .ch-head .ch-invite { justify-self: end; }
.ch-by-house { font-weight: 650; color: var(--fg); }
.ch-stats {
  grid-column: 1 / -1; margin: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 26px;
}
.ch-stats > div { display: flex; align-items: baseline; gap: 8px; }
.ch-stats dt { font-size: var(--fs-fine); color: var(--muted); }
.ch-stats dd { margin: 0; }
.ch-stats div:not(.ch-stat-when) dd {
  font-family: 'Fraunces', Georgia, serif; font-size: 19px; font-weight: 600;
  line-height: 1.1; font-variant-numeric: tabular-nums;
}
.ch-left {
  display: inline-block; padding: 3px 10px; border-radius: 99px;
  font-size: 12px; font-weight: 600; line-height: 1.3;
  color: var(--seal-on); background: var(--seal);
}
.ch-left.over { color: var(--fg-2); background: color-mix(in srgb, var(--fg) 10%, transparent); }
.ch-mybar { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; }
.ch-bar {
  flex: 1; height: 8px; border-radius: 99px; overflow: hidden;
  background: color-mix(in srgb, var(--fg) 11%, transparent);
}
.ch-bar i {
  --p: 0;
  display: block; height: 100%; width: calc(var(--p) * 1%); border-radius: inherit;
  background: var(--ch-tint);
}
.ch-mybar.done .ch-bar i { background: var(--jade); }
.ch-mybar .ch-progress { flex: none; overflow: visible; }
.ch-one .ch-h { margin-top: var(--s2); }
.ch-row .lg-xp { font-family: 'Fraunces', Georgia, serif; font-variant-numeric: tabular-nums; }
.ch-through { font-size: 18px; line-height: 1; color: var(--ch-jade); }
.ch-row.ch-gap { margin-top: 8px; border-top: 1px dashed var(--hair); }
.ch-leave { text-align: right; }
@media (max-width: 560px) {
  .fl-head.ch-head { grid-template-columns: auto minmax(0, 1fr); }
  .ch-head .ch-join, .ch-head .ch-invite { grid-column: 1 / -1; justify-self: stretch; }
  .ch-grid, .ch-grid-open { grid-template-columns: minmax(0, 1fr); }
}

.ch-form { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.ch-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.ch-field > span, .ch-field > legend { padding: 0; font-size: var(--fs-fine); font-weight: 600; color: var(--fg-2); }
.ch-field > legend { margin-bottom: 6px; }
.ch-name input {
  font: inherit; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--hair); background: var(--card); color: var(--fg);
}
.ch-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.ch-targets { margin-top: -4px; }
.ch-pill { position: relative; display: inline-flex; }
.ch-pill input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ch-pill span {
  display: inline-flex; align-items: center; height: 34px; padding: 0 13px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap;
  color: var(--fg-2); background: var(--card);
  box-shadow: inset 0 0 0 1px var(--hair);
}
.ch-pill input:checked + span {
  color: var(--fg); background: color-mix(in srgb, var(--seal) 14%, var(--card));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--seal) 55%, transparent);
}
.ch-pill input:focus-visible + span { outline: 2px solid var(--seal); outline-offset: 2px; }
.ch-date { font: inherit; font-size: var(--fs-fine); color: var(--fg); background: var(--raised);
  border: 1px solid var(--hair); border-radius: var(--r-chip); padding: 6px 12px; }
.ch-date[hidden] { display: none; }
.ch-form .btn-lg { align-self: stretch; margin-top: 2px; }
.ch-form.ch-code { gap: 6px; margin-top: 6px; padding-top: 16px; border-top: 1px solid var(--hair); }
.ch-code .btn { background: var(--card); box-shadow: inset 0 0 0 1px var(--hair); }
.ch-code .fl-row input { background: var(--card); }

body.at-league .ch-card:not(.ch-official),
body.at-league .ch-search {
  --fg: #1C1E18; --fg-2: #4E5046; --muted: #6A6C62;
  --hair: rgba(28, 30, 24, .12); --card: rgb(244, 241, 233); --raised: rgb(252, 250, 245);
  color: var(--fg);
  background: rgba(244, 241, 233, .88);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 1px 2px rgba(28, 30, 24, .12), 0 18px 40px -28px rgba(28, 30, 24, .5);
}
body[data-phase="night"].at-league .ch-card:not(.ch-official),
body[data-phase="night"].at-league .ch-search,
body[data-phase="dusk"].at-league .ch-card:not(.ch-official),
body[data-phase="dusk"].at-league .ch-search {
  --fg: #F1EEE6; --fg-2: #D6D2C6; --muted: #A9A597;
  --hair: rgba(241, 238, 230, .12); --card: rgb(20, 22, 38); --raised: rgb(30, 32, 50);
  background: rgba(20, 22, 38, .9);
}
body.at-league .ch-search:focus-within { box-shadow: 0 0 0 2px var(--seal); }
body.at-league .ch-leave .btn-quiet { color: var(--fg-2); text-shadow: 0 0 6px var(--halo), 0 0 2px var(--halo); }

html { overflow-x: clip; }

.phone-gate { display: none; }

@media (max-width: 719px), (max-height: 519px) and (pointer: coarse), (max-width: 900px) and (pointer: fine) {
  html:not(.arriving) body > *:not(.phone-gate) { display: none !important; }
  html:not(.arriving), html:not(.arriving) body { overflow: hidden; height: 100%; }
  html:not(.arriving) .phone-gate {
    display: grid; place-items: center;
    min-height: 100dvh; padding: 28px 22px calc(28px + env(safe-area-inset-bottom));
    background: var(--bg); color: var(--fg);
  }
}

.pg-in {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 14px; max-width: 30rem;
}
.phone-gate .chop { width: 68px; height: 68px; border-radius: 18px; font-size: 21px; }
.pg-brand {
  margin: 2px 0 0; font-family: 'Fraunces', Georgia, serif;
  font-size: 30px; font-weight: 600; letter-spacing: .01em;
}
.pg-lead { margin: 0; font-size: 18px; line-height: 1.45; max-width: 24ch; }
.pg-stores { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }
.pg-store {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 14px;
  background: var(--fg); color: var(--bg); text-decoration: none;
  box-shadow: var(--panel);
}
.pg-store svg { width: 22px; height: 22px; flex: none; }
.pg-store span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.pg-store small { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; opacity: .78; }
.pg-store b { font-size: 15px; font-weight: 600; }
.pg-store.is-soon {
  background: color-mix(in srgb, var(--fg) 12%, var(--card));
  color: var(--fg-2); box-shadow: inset 0 0 0 1px var(--hair);
}
.pg-hint { margin: 8px 0 0; font-size: var(--fs-fine); color: var(--muted); max-width: 30ch; }
.pg-link { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 4px; }
.pg-link-btn {
  min-height: 40px; padding: 9px 14px; border: 1px solid var(--hair); border-radius: 10px;
  background: var(--card); color: var(--seal-text); font: inherit; font-size: var(--fs-fine); font-weight: 500;
  text-decoration: none; cursor: pointer;
}

@media (min-width: 744px) and (max-width: 999px) {
  body.at-stats .screen::before,
  body.at-stats .screen::after,
  body.at-stats .room-lamp,
  body.at-stats .room-floor { display: none; }
  body.at-stats:not(.in-court):not(.in-intro) #view {
    --room-x: var(--s5); --room-b: var(--s6);
  }
  body.at-stats .screen { grid-template-columns: minmax(0, 1fr); }
  body.at-stats .pg-hero, body.at-stats .gw-block,
  body.at-stats .sk-block, body.at-stats .id-block,
  body.at-stats .bl-block, body.at-stats .tn-block {
    grid-column: 1 / -1; grid-row: auto;
  }
  body.at-library .lib-wall,
  body.at-library .lib-ivy,
  body.at-library .lib-lantern,
  body.at-library .room-floor { display: none; }
  body.at-library:not(.in-court):not(.in-intro) #view:has(.lib-wall) {
    --room-x: var(--s5); --room-b: var(--s6);
  }
  body.in-court #view { padding-top: calc(50px + env(safe-area-inset-top)); }
}

.levels .level .lv-hsk {
  font-style: normal; font-size: .72em; font-weight: 600;
  letter-spacing: .04em; margin-right: .28em; opacity: .8;
}
@media (min-width: 744px) {
  .levels-rack .level { padding-inline: 6px; gap: 4px; min-width: 0; }
}

.camp-b--boom .camp-art {
  transform-origin: 50% 100%;
  animation: camp-boom 900ms var(--ease) both;
}
.camp-b--boom .camp-art::after {
  content: '';
  position: absolute; left: 50%; bottom: 0;
  width: 140%; aspect-ratio: 4 / 1;
  translate: -50% 40%;
  border-radius: 50%;
  border: calc(3 * var(--cu)) solid color-mix(in srgb, var(--seal) 55%, transparent);
  opacity: 0;
  animation: camp-dust 900ms 420ms ease-out both;
  pointer-events: none;
}
.camp-b--boom .camp-below { animation: camp-below-in 500ms 520ms var(--ease) both; }
.camp--shake { animation: camp-shake 520ms 380ms linear both; }

@keyframes camp-boom {
  0%   { scale: .2; translate: 0 -60%; opacity: 0; }
  45%  { scale: 1.08; translate: 0 0; opacity: 1; }
  62%  { scale: .96 1.04; }
  80%  { scale: 1.02 .98; }
  100% { scale: 1; translate: 0 0; opacity: 1; }
}
@keyframes camp-dust {
  0%   { opacity: .9; scale: .4; }
  100% { opacity: 0; scale: 1.25; }
}
@keyframes camp-below-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes camp-shake {
  0%, 100% { translate: 0 0; }
  15% { translate: -6px 2px; }
  30% { translate: 5px -2px; }
  45% { translate: -4px 1px; }
  60% { translate: 3px -1px; }
  80% { translate: -1px 0; }
}

.camp-screen { position: relative; }
.camp-cheer {
  position: absolute; left: 50%; top: 34%;
  translate: -50% 0;
  z-index: 40;
  display: grid; justify-items: center; gap: 2px;
  padding: 12px 22px 13px;
  border-radius: var(--r-pill);
  background: var(--seal); color: #fff;
  box-shadow: var(--lift);
  text-align: center;
  cursor: pointer;
  animation: camp-cheer 4200ms 700ms var(--ease) both;
}
.camp-cheer b { font-family: var(--serif, inherit); font-size: var(--t-h3); font-weight: 600; }
.camp-cheer-k {
  font-size: var(--t-over); font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; opacity: .82;
}
@keyframes camp-cheer {
  0%   { opacity: 0; translate: -50% 14px; scale: .9; }
  10%  { opacity: 1; translate: -50% 0; scale: 1.04; }
  16%  { scale: 1; }
  86%  { opacity: 1; translate: -50% 0; }
  100% { opacity: 0; translate: -50% -8px; visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  .camp-b--boom .camp-art, .camp-b--boom .camp-below, .camp--shake { animation: none; }
  .camp-b--boom .camp-art::after { display: none; }
  .camp-cheer { animation: none; }
}

body.at-training .deck-limits .dl-head { padding-left: 44px; }
body.at-training .deck-limits .dl-close { top: var(--s5); left: var(--s5); }

.tour { position: fixed; inset: 0; z-index: 60; }
.tour-dim { position: absolute; inset: 0; }
.tour-spot {
  position: fixed;
  border-radius: 18px;
  box-shadow: 0 0 0 2.5px var(--seal), 0 0 0 9999px rgba(12, 11, 8, .58);
  pointer-events: none;
  transition: left var(--slow) var(--ease), top var(--slow) var(--ease),
              width var(--slow) var(--ease), height var(--slow) var(--ease);
}
.tour-card {
  position: fixed;
  width: min(340px, calc(100vw - 24px));
  padding: 18px 18px 16px;
  border-radius: var(--r-panel);
  background: var(--card); color: var(--fg);
  box-shadow: var(--lift), 0 24px 60px -30px rgba(0, 0, 0, .6);
  transition: left var(--slow) var(--ease), top var(--slow) var(--ease);
  animation: tour-in var(--base) var(--ease) both;
}
.tour-card h2 { margin: 2px 0 6px; font-family: var(--serif); font-size: var(--t-h2); }
.tour-n { margin: 0; font-size: var(--t-cap); font-weight: 600; letter-spacing: .04em; color: var(--muted); }
.tour-line { margin: 0; font-size: var(--t-body); line-height: 1.45; color: var(--fg-2); }
.tour-acts { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.tour-acts .btn { margin-left: auto; }
.tour-skip {
  border: 0; background: none; padding: 6px 2px; cursor: pointer;
  font: inherit; font-size: var(--t-label); color: var(--fg-2);
}
.tour-skip:hover, .tour-skip:focus-visible { color: var(--fg); text-decoration: underline; }
@keyframes tour-in { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
.tour-moving .tour-spot, .tour-moving .tour-card { visibility: hidden; }
@media (prefers-reduced-motion: reduce) {
  .tour-spot, .tour-card { transition: none; animation: none; }
}
.origin-was { margin: 0 0 8px; }

.r-meaning.r-say { font-size: 30px; font-weight: 600; line-height: 1.2; margin: 6px 0 0; }
.r-ctx-l { margin: 14px 0 2px; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }
.r-ctx { margin: 0; font-size: 18px; opacity: .85; }
.r-ask-under { margin: 6px 0 0; }
.r-ctx-box {
  width: min(440px, 100%); margin: 18px auto 0; padding: 12px 16px;
  background: var(--raised); border: 1px solid var(--hair); border-radius: var(--r-card);
  text-align: center;
}
.r-ctx-box .r-ctx-l { margin: 0 0 4px; }
.r-ctx-back { margin: 10px 0 0; text-align: center; }
.r-ctx-back .gy-line { font-size: 22px; margin: 0 0 4px; }
.r-ctx-back rt, .pr-deck .gy-line rt { font-size: .5em; }
.pr-speak { font-size: 22px; }

.char-m, .wd-m, .r-meaning, .rpair-main .rp-m {
  hyphens: auto; -webkit-hyphens: auto; overflow-wrap: normal; word-break: normal;
}

.getapp-dock {
  display: none;
  position: fixed; z-index: 60; right: 18px; bottom: 18px;
  align-items: center; gap: 6px; flex-direction: row-reverse;
}
@media (hover: hover) and (pointer: fine) and (min-width: 1000px) and (min-height: 600px) {
  body.in-court.wants-app:not(.in-intro) .getapp-dock { display: flex; }
}
.getapp {
  display: flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0; border-radius: 99px; cursor: pointer;
  background: var(--bg-sunken);
  border: 1px solid color-mix(in srgb, var(--fg) 30%, transparent);
  color: var(--fg-2); font: inherit; line-height: 1;
  box-shadow: var(--shadow);
  transition: padding .16s ease-out, color .12s ease-out, border-color .12s ease-out;
}
.getapp-i { width: 20px; height: 20px; flex: none; }
.getapp::after {
  content: attr(aria-label);
  max-width: 0; overflow: hidden; white-space: nowrap;
  font-size: var(--fs-fine);
  transition: max-width .16s ease-out;
}
.getapp:hover, .getapp:focus-visible, .getapp-dock:hover .getapp {
  color: var(--seal-text); border-color: var(--seal); padding: 0 14px 0 10px;
}
.getapp:hover::after, .getapp:focus-visible::after, .getapp-dock:hover .getapp::after { max-width: 16rem; margin-left: 8px; }
.getapp:focus-visible { outline: 2px solid var(--seal); outline-offset: 3px; }
.getapp-hide {
  width: 26px; height: 26px; padding: 0; border-radius: 99px; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--fg) 22%, transparent);
  background: var(--bg-sunken); color: var(--fg-2); font: inherit; font-size: 12px; line-height: 1;
  opacity: 0; pointer-events: none; transition: opacity .12s ease-out;
}
.getapp-dock:hover .getapp-hide, .getapp-dock:focus-within .getapp-hide { opacity: 1; pointer-events: auto; }
.getapp-hide:hover { color: var(--seal-text); border-color: var(--seal); }
.getapp-qr {
  flex: none; display: block; padding: 6px; border-radius: 8px;
  background: #FFFFFF; color: #14120E;
}
.getapp-qr[hidden] { display: none; }
.getapp-qr svg { display: block; width: 100%; height: 100%; }

.getapp-sheet { width: min(94vw, 660px); overflow: hidden; }
.getapp-in { display: grid; grid-template-columns: 240px minmax(0, 1fr); }
.getapp-stage {
  position: relative; display: flex; align-items: flex-end; justify-content: center;
  min-height: 380px; padding-top: 34px; overflow: hidden;
  background:
    radial-gradient(120% 70% at 30% 10%, color-mix(in srgb, var(--seal) 70%, #FFFFFF) 0%, transparent 60%),
    linear-gradient(170deg, var(--seal) 0%, color-mix(in srgb, var(--seal) 45%, #120A06) 100%);
}
.getapp-phone {
  width: 172px; margin-bottom: -56px; padding: 6px; border-radius: 30px;
  background: #111; box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .65);
  rotate: -4deg;
}
.getapp-phone img { display: block; width: 100%; height: auto; border-radius: 24px; }
.getapp-body {
  display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
  padding: 40px 30px 28px;
}
.getapp-body h2 { margin: 0; font-family: 'Fraunces', Georgia, serif; font-size: 28px; line-height: 1.15; }
.getapp-body h2:focus { outline: none; }
.getapp-lead { margin: 0; color: var(--fg-2); }
.getapp-stores { justify-content: flex-start; margin-top: 2px; }
.getapp-scan { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.getapp-scan .getapp-qr { width: 128px; height: 128px; padding: 8px; }
.getapp-scan small { font-size: var(--fs-fine); color: var(--muted); max-width: 14ch; line-height: 1.35; }
.getapp-x { position: absolute; top: 14px; right: 14px; z-index: 1; }

@media (min-width: 744px) {
  body.at-library { --sheet: 1240px; }
  body.at-library .lib-wall,
  body.at-library .lib-ivy,
  body.at-library .lib-lantern,
  body.at-library .room-floor { display: none; }
  body.at-library:not(.in-court):not(.in-intro) #view:has(.lib-wall) {
    --fg: inherit; --fg-2: inherit; --muted: inherit; --hair: inherit;
    --card: inherit; --raised: inherit; --bg-sunken: inherit; --seal-text: inherit;
    --edge: inherit; --bg: inherit;
    --t1-keep: inherit; --t2-keep: inherit; --t3-keep: inherit; --t4-keep: inherit; --t5-keep: inherit;
    --jade-keep: inherit; --amber-keep: inherit; --violet-keep: inherit;
    --room-x: clamp(28px, 4.4vw, 72px);
    --room-b: 56px;
    padding-left: var(--room-x);
    padding-right: var(--room-x);
    padding-bottom: var(--room-b);
    color: var(--fg);
    background:
      radial-gradient(70% 38% at 50% 0%, color-mix(in srgb, var(--seal) 5%, transparent), transparent 72%),
      var(--card);
    box-shadow:
      0 1px 0 color-mix(in srgb, var(--fg) 5%, transparent),
      0 22px 60px -30px color-mix(in srgb, var(--fg) 30%, transparent);
  }
  body.at-library #view:has(.lib-wall) .cell:is(.ph-ready, .ph-learning, .ph-learned) {
    background: color-mix(in srgb, var(--ph) 13%, var(--card));
    outline-color: color-mix(in srgb, var(--ph) 40%, transparent);
    --t1-keep: inherit; --t2-keep: inherit; --t3-keep: inherit; --t4-keep: inherit; --t5-keep: inherit;
    --jade-keep: inherit; --amber-keep: inherit; --violet-keep: inherit;
  }
  body.at-library #view:has(.lib-wall) .cell:is(.ph-ready, .ph-learning, .ph-learned):hover {
    background: color-mix(in srgb, var(--ph) 20%, var(--card));
  }

  body.at-library #view:has(.lib-wall) .lib-find {
    border-radius: 999px; padding-inline: 20px 10px;
    background: var(--card);
    box-shadow: inset 0 0 0 1px var(--hair), 0 8px 24px -16px color-mix(in srgb, var(--fg) 40%, transparent);
  }
  body.at-library #view:has(.lib-wall) .lib-find:focus-within {
    box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--seal) 55%, transparent),
                0 10px 28px -16px color-mix(in srgb, var(--seal) 45%, transparent);
  }

  body.at-library #view:has(.lib-wall) .rack-eave { display: none; }
  body.at-library #view:has(.lib-wall) .levels-rack {
    gap: 6px; padding: 0; border-radius: 0; background: none; box-shadow: none;
  }
  body.at-library #view:has(.lib-wall) .levels-rack .level {
    border-radius: 999px;
    background: color-mix(in srgb, var(--fg) 4%, transparent);
    box-shadow: inset 0 0 0 1px var(--hair);
    transition: background var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
  }
  body.at-library #view:has(.lib-wall) .levels-rack .level + .level { margin-left: 0; }
  body.at-library #view:has(.lib-wall) .levels-rack .level:hover {
    background: color-mix(in srgb, var(--fg) 8%, transparent);
  }
  body.at-library #view:has(.lib-wall) .levels-rack .level.on {
    background: var(--seal); color: #fff;
    box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--seal) 80%, transparent);
  }
  body.at-library #view:has(.lib-wall) .levels-rack .level.on :is(b, span, i) { color: #fff; }

  body.at-library #view:has(.lib-wall) .wgrid {
    gap: 10px; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  }
  body.at-library #view:has(.lib-wall) .wchunks { row-gap: 10px; }
  body.at-library #view:has(.lib-wall) .wgrid .cell {
    padding: 12px 8px 10px;
    background: var(--card);
    box-shadow: inset 0 0 0 1px var(--hair);
    transition: background var(--fast) var(--ease), box-shadow var(--fast) var(--ease),
                transform var(--fast) var(--ease);
  }
  body.at-library #view:has(.lib-wall) .wgrid .cell:hover {
    transform: translateY(-2px);
    box-shadow: inset 0 0 0 1px var(--hair), 0 10px 22px -14px color-mix(in srgb, var(--fg) 45%, transparent);
  }
  body.at-library #view:has(.lib-wall) .wgrid .cell:is(.ph-ready, .ph-learning, .ph-learned) {
    background: color-mix(in srgb, var(--ph) 13%, var(--card));
    box-shadow: none;
  }
  body.at-library #view:has(.lib-wall) .wbox .cell-h { height: 36px; line-height: 36px; font-size: 30px; }
  body.at-library #view:has(.lib-wall) .wbox .cell-h[data-n="3"] { font-size: 24px; }
  body.at-library #view:has(.lib-wall) .wbox .cell-h[data-n="4"] { font-size: 19px; }
  @media (prefers-reduced-motion: reduce) {
    body.at-library #view:has(.lib-wall) .wgrid .cell:hover { transform: none; }
  }
}

body.teach-mode .getapp { display: none !important; }

.teach-head { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s4); }
.teach-head h1 { margin: 0; font-family: 'Fraunces', Georgia, serif; font-size: clamp(30px, 3.2vw, 48px); line-height: 1.1; }
.teach-back {
  display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  font-size: 32px; line-height: 1; text-decoration: none; color: var(--fg);
  background: var(--raised); border: 1px solid var(--hair);
}
.teach-badge {
  margin-left: auto; padding: 4px 12px; border-radius: 999px; font-size: var(--t-cap); font-weight: 600;
  color: var(--fg-2); border: 1px solid var(--hair); background: var(--card);
}
.screen.teach { gap: var(--s3); }
.screen.teach .teach-head { margin-bottom: 0; }
.screen.teach .teach-sub { margin: var(--s4) 0 0; font-size: var(--t-body); color: var(--fg-2); font-weight: 600; }

.teach-books { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s3); }
.teach-book {
  display: flex; align-items: center; gap: var(--s3); min-height: 84px; padding: 14px 18px;
  border-radius: 16px; text-decoration: none; color: var(--fg);
  background: color-mix(in srgb, var(--acc) 10%, var(--card));
  border: 1.5px solid color-mix(in srgb, var(--acc) 45%, transparent);
}
.teach-book:hover { background: color-mix(in srgb, var(--acc) 20%, var(--card)); }
.teach-book-g {
  flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px;
  font-family: 'Noto Serif SC', serif; font-size: 30px; color: #fff; background: var(--acc);
}
.teach-book-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.teach-book-t b { font-weight: 600; font-size: clamp(16px, 1.2vw, 20px); line-height: 1.22; text-wrap: balance; }
.teach-book-t small { font-size: var(--t-body); color: var(--fg-2); line-height: 1.3; }
.teach-book-t small [lang="zh"] { white-space: nowrap; font-family: 'Noto Serif SC', serif; }
.teach-ed { white-space: nowrap; }

.teach-vols { display: flex; flex-wrap: wrap; gap: var(--s2); }
.teach-vol {
  min-height: 52px; padding: 10px 22px; border-radius: 999px; cursor: pointer;
  font: inherit; font-weight: 600; font-size: clamp(16px, 1.2vw, 20px); color: var(--fg);
  background: var(--card); border: 1.5px solid color-mix(in srgb, var(--acc) 40%, var(--hair));
}
.teach-vol[aria-pressed="true"] { background: var(--acc); border-color: var(--acc); color: #fff; }
.teach-lessons { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: var(--s2); }
.teach-lesson {
  display: grid; place-items: center; aspect-ratio: 1; padding: 8px; border-radius: 16px;
  text-decoration: none; color: var(--fg); font-weight: 700; font-size: clamp(24px, 2vw, 34px);
  font-variant-numeric: tabular-nums; text-align: center; line-height: 1.15;
  background: var(--card); border: 1.5px solid color-mix(in srgb, var(--acc) 40%, var(--hair));
}
.teach-lesson:hover { background: color-mix(in srgb, var(--acc) 14%, var(--card)); }

.teach-drills { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s3); }
.teach-drill {
  display: flex; flex-direction: column; justify-content: center; gap: 4px; min-height: 104px;
  padding: 16px 20px; border-radius: 18px; text-decoration: none; color: #fff;
  background: var(--acc); box-shadow: 0 2px 0 color-mix(in srgb, var(--acc) 60%, #000);
}
.teach-drill:hover { filter: brightness(1.06); }
.teach-drill.is-empty { opacity: .35; pointer-events: none; }
.teach-drill-t { font-size: clamp(22px, 2vw, 32px); font-weight: 700; line-height: 1.1; }
.teach-drill-n { font-size: var(--t-body); opacity: .9; }

.teach-tiles { display: flex; flex-wrap: wrap; gap: var(--s2); }
.teach-tile {
  display: grid; place-items: center; min-width: 96px; height: 96px; padding: 0 14px; border-radius: 16px;
  font-family: 'Noto Serif SC', serif; font-size: 56px; line-height: 1; text-decoration: none; color: var(--fg);
  background: var(--card); border: 1px solid var(--hair);
}
.teach-tile-w { font-size: 40px; }
.teach-tile:hover { background: var(--raised); }
.teach-finish { display: flex; gap: var(--s3); justify-content: center; flex-wrap: wrap; margin-top: var(--s4); }

@media (min-width: 744px) {
  body.teach-mode.in-session:not(.in-court):not(.in-intro) #view {
    margin-bottom: 12px;
    max-height: calc(100dvh - 58px - env(safe-area-inset-top) - 24px);
    padding-top: clamp(14px, 3vh, 24px); padding-bottom: clamp(14px, 3vh, 24px);
  }
}
@media (min-width: 1280px) {
  body.teach-mode.in-session:not(.in-court):not(.in-intro) #view:has(> .screen.review) {
    height: calc(100dvh - 58px - env(safe-area-inset-top) - 24px); overflow: hidden;
  }
  body.teach-mode #view > .screen.review { height: 100%; min-height: 0; }
  body.teach-mode .review > .ref {
    position: static; align-self: stretch; min-height: 0; overflow: hidden;
    display: flex; flex-direction: column;
  }
  body.teach-mode .review > .ref > .ref-body { flex: 1 1 0; min-height: 0; overflow: hidden auto; }
  body.teach-mode .review > .ref > .ref-body > * { zoom: var(--fit, 1); }
}
body.teach-mode .review .r-hanzi { font-size: clamp(96px, min(14vw, 22vh, 100vh - 540px), 260px); }
body.teach-mode .review .r-py { font-size: clamp(24px, min(2.6vw, 4.6vh), 48px); }
body.teach-mode .review .r-meaning { font-size: clamp(18px, min(1.8vw, 3.4vh), 32px); max-width: 40ch; }
body.teach-mode .review .r-reveal { min-height: clamp(46px, 7vh, 72px); font-size: clamp(20px, 1.6vw, 28px); }
.r-grades.r-teach { grid-template-columns: auto 1fr 2fr; }
.r-grades.r-teach .r-grade { min-height: clamp(60px, 9vh, 84px); }
.r-grades.r-teach .g-l { font-size: clamp(20px, 1.6vw, 28px); }
.r-grades.r-teach .t-prev {
  --g: var(--fg-2); width: clamp(60px, 9vh, 84px); padding-left: 0; padding-right: 0;
}
.t-arrow { width: 12px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2;
           stroke-linecap: round; stroke-linejoin: round; }
.r-grades.r-teach .t-prev { display: grid; place-items: center; }
.r-grades.r-teach .t-prev .t-arrow { width: 15px; height: 25px; }
.r-grades.r-teach kbd { display: none !important; }

.t-bar { display: flex; gap: var(--s2); align-items: stretch; }
.t-sw {
  flex: 1 1 0; min-width: 0; min-height: clamp(46px, 7vh, 56px); padding: 8px 12px; cursor: pointer;
  border-radius: var(--r-chip); border: 1.5px solid var(--hair);
  background: var(--card); color: var(--fg);
  font: inherit; font-weight: 600; font-size: clamp(17px, 1.3vw, 22px);
  transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.t-sw:hover { background: var(--raised); }
.t-sw[aria-pressed="true"] { background: color-mix(in srgb, var(--fg) 13%, var(--card)); border-color: var(--fg); }
.t-step {
  flex: none; display: grid; place-items: center; width: 56px; min-height: clamp(46px, 7vh, 56px);
  border-radius: var(--r-chip); border: 1.5px solid var(--hair);
  background: var(--card); color: var(--fg); text-decoration: none;
}
a.t-step:hover { background: var(--raised); }
.t-step.is-off { opacity: .3; }

.r-card.r-split .r-ask.is-off,
.r-card.no-sound :is(.r-py, .rp-py, .rpairs .play, .r-share-side),
.r-card.no-meaning :is(.r-meaning, .r-meaning-also, .rp-m, .r-pic, .r-idiom) { visibility: hidden; }
.r-card.no-sound .r-hanzi span[class] { color: inherit; }

.ref-page.tp > .t-bar { max-width: 520px; }
.ref-page.tp.no-text :is(.glyph, .wd-h, .wd-pic) { visibility: hidden; }
.ref-page.tp.m-listen.no-text :is(.wd-py, .char-py) { visibility: hidden; }
.ref-page.tp.m-listen.no-text :is(.wd-py, .char-py) .play {
  visibility: visible; width: clamp(72px, 14vh, 120px); height: clamp(72px, 14vh, 120px); border-radius: 50%;
}
.ref-page.tp.m-listen.no-text :is(.wd-py, .char-py) .play .spk { width: 50%; height: 50%; }
.ref-page.tp.no-sound :is(.wd-py, .wd-alt, .char-py, .rp-py, .rpairs .play),
.ref-page.tp.no-meaning :is(.wd-m, .wd-m-also, .char-m, .char-m-also, .rp-m, .wd-pic, .r-idiom) { visibility: hidden; }
.ref-page.tp.no-more :is(.ref-jump, .ref-sec, .ref-corner .wd-acts, .ref-corner .sched, .ref-kind),
.ref-page.tp.no-more :is(.wd-lede, .char-id) > .fine { display: none; }

@media (min-width: 744px) {
  body.teach-mode:not(.in-court):not(.in-intro):has(#view > :is(.ref-page.tp, .teach-sent, .screen.teach)) #lintel {
    display: none;
  }
  body.teach-mode:not(.in-court):not(.in-intro):has(#view > :is(.ref-page.tp, .teach-sent, .screen.teach)) #view {
    --gutter: clamp(10px, 1.6vw, 28px);
    max-width: calc(100% - 2 * var(--gutter));
    margin-top: calc(58px + env(safe-area-inset-top));
    margin-bottom: 12px;
    height: calc(100dvh - 58px - env(safe-area-inset-top) - 24px);
    max-height: calc(100dvh - 58px - env(safe-area-inset-top) - 24px);
    padding: clamp(12px, 2.2vh, 26px) clamp(16px, 2.2vw, 40px);
    overflow: hidden;
    display: flex; flex-direction: column;
  }
  body.teach-mode #view > :is(.ref-page.tp, .teach-sent, .screen.teach) { flex: 1 1 auto; min-height: 0; }
  body.teach-mode:not(.in-court):not(.in-intro):has(#view > :is(.ref-page.tp, .teach-sent, .screen.teach)) .door {
    display: none;
  }
  body.teach-mode #view > .screen.teach { overflow: hidden auto; gap: clamp(8px, 1.6vh, var(--s3)); }
  body.teach-mode #view > .screen.teach.teach-lesson-s { overflow: hidden; }
  body.at-library .screen.char.ref-page.tp
    > *:not(.lib-wall):not(.lib-ivy):not(.lib-lantern):not(.room-floor) { width: auto; margin-inline: 0; }
  .ref-page.tp > :is(.lib-wall, .lib-ivy, .lib-lantern, .room-floor) { display: none; }

  .ref-page.tp {
    --tp-g: clamp(140px, min(100dvh - 430px, 40vw), 520px);
    display: grid; height: 100%; min-height: 0;
    gap: clamp(8px, 1.6vh, 18px) clamp(18px, 2.6vw, 44px);
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas: "top" "head" "bar";
  }
  .ref-page.tp.has-side {
    --tp-g: clamp(130px, min(100dvh - 430px, 27vw), 440px);
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    grid-template-areas: "top top" "head jump" "head sec" "bar bar";
  }
  .ref-page.tp.is-line {
    grid-template-columns: minmax(0, 1fr) minmax(0, max-content) minmax(0, max-content) minmax(0, 1fr);
    grid-template-areas: "top top top top" ". head sec ." ". head sec ." "bar bar bar bar";
  }
  .ref-page.tp.is-line > .wd-hero { container-type: normal; }
  .ref-page.tp.is-line > .t-lines { max-width: 50vw; }
  .ref-page.tp > .crumb { grid-area: top; justify-self: start; align-self: center; margin: 0; }
  .ref-page.tp > .t-top { grid-area: top; justify-self: end; }
  .ref-page.tp > :is(.char-head, .wd-hero) { grid-area: head; min-height: 0; }
  .ref-page.tp > .t-bar { grid-area: bar; justify-self: center; max-width: 880px; min-width: min(100%, 760px); }
  .ref-page.tp > .ref-jump { grid-area: jump; margin: 0; }
  .ref-page.tp > :is(.ref-sec, .t-lines) { grid-area: sec; min-height: 0; margin: 0; overflow: hidden auto; }
  .ref-page.tp > .ref-sec > *, .ref-page.tp > .t-lines > .t-ln { zoom: var(--fit, 1); }
  .ref-page.tp > .ref-sec > * { flex-shrink: 0; }
  .ref-page.tp > #rs-history > .hist-beside {
    flex: 1 1 0; min-height: 0; zoom: 1;
    container: tphist / size;
    display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; justify-items: center;
    gap: clamp(12px, 2vh, 24px) clamp(18px, 2.6vw, 44px);
  }
  .ref-page.tp > #rs-history > .hist-beside > .hist-say { zoom: var(--fit, 1); justify-self: stretch; }
  .ref-page.tp > #rs-history > .hist-beside > .hist-film { --side: min(100cqw, 62cqh, 760px); width: var(--side); height: var(--side); }
  @container tphist (orientation: landscape) {
    .ref-page.tp > #rs-history > .hist-beside > .hist-film { grid-column: 2; grid-row: 1; --side: min(62cqw, 100cqh, 760px); }
    .ref-page.tp > #rs-history > .hist-beside > .hist-say { grid-column: 1; grid-row: 1; align-self: center; }
  }
  .ref-page.tp > .t-lines { display: none; }
  .ref-page.tp.is-line > .t-lines { display: flex; flex-direction: column; justify-content: center; }
}
body.teach-mode .top { background: var(--card); backdrop-filter: none; -webkit-backdrop-filter: none; }
@media (min-width: 744px) {
  body.teach-mode:not(.in-court):not(.in-intro) #view {
    background: color-mix(in srgb, var(--card) 97%, transparent);
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
}

.ref-page.tp .rf-facts,
.ref-page.tp .ref-corner > :not(.wd-pic),
.ref-page.tp :is(.wd-lede, .char-id) > .fine,
.ref-page.tp .char-id > h1 { display: none; }
.ref-page.tp .ref-corner { margin: 0; }

.ref-page.tp > .char-head {
  display: flex; flex-direction: column; flex-wrap: nowrap; align-items: center; justify-content: center;
  gap: clamp(8px, 2vh, 22px); padding: 0; text-align: center;
}
.ref-page.tp .char-head .char-id { flex: 0 0 auto; align-items: center; gap: clamp(4px, 1vh, 12px); }
.ref-page.tp .glyph { width: var(--tp-g); }
.ref-page.tp .glyph .strokes { width: 84%; height: 84%; }
.ref-page.tp .glyph .strokes path { animation: none; opacity: 1; }
.ref-page.tp .glyph-plain { font-size: calc(var(--tp-g) * .62); }
.ref-page.tp :is(.char-py, .wd-py) { margin: 0; font-size: clamp(24px, 4.6vh, 46px); }
.ref-page.tp :is(.char-py, .wd-py) .play { font-size: .6em; }
.ref-page.tp :is(.char-m, .wd-m) { margin: 0 auto; max-width: 30ch; font-size: clamp(19px, 3.4vh, 34px); color: var(--fg); }
.ref-page.tp :is(.char-m-also, .wd-m-also) { margin-inline: auto; font-size: clamp(14px, 2.2vh, 21px); }
.ref-page.tp .rpairs { font-size: clamp(18px, 3vh, 30px); }
.ref-page.tp > .wd-hero {
  container-type: inline-size;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: clamp(12px, 3vw, 48px); padding: 0; background: none; box-shadow: none; text-align: center;
}
.ref-page.tp .wd-lede { flex: 0 1 auto; align-items: center; gap: clamp(4px, 1.2vh, 14px); }
.ref-page.tp .wd-h { font-size: clamp(48px, min(20vh, 86cqi / var(--n, 2)), 230px); line-height: 1.05; }
.ref-page.tp > .wd-hero:has(.wd-pic) .wd-h { font-size: clamp(44px, min(18vh, 52cqi / var(--n, 2)), 200px); }
.ref-page.tp .wd-pic { width: clamp(110px, 26vh, 260px); height: clamp(110px, 26vh, 260px); }
.ref-page.tp > .ref-sec .ref-list {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px);
}
.ref-page.tp > .ref-sec .ref-list > li { box-shadow: inset 0 1px 0 var(--hair); }
.ref-page.tp > .ref-jump { gap: 8px; }
.ref-page.tp > .ref-jump .ref-chip { min-height: 44px; min-width: 54px; }
.ref-page.tp .t-sw-line { flex-grow: 1.5; }

.t-lines { justify-content: center; }
.t-ln { display: flex; flex-direction: column; gap: clamp(6px, 1.4vh, 16px); }
.t-ln-zh { margin: 0; font-family: 'Noto Serif SC', serif; font-size: clamp(30px, 5.4vh, 58px); line-height: 1.35; }
.t-ln-zh mark, .teach-line mark {
  color: inherit; background: color-mix(in srgb, var(--seal) 16%, transparent);
  border-radius: 6px; padding: 0 .06em; box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--seal) 55%, transparent);
}
.t-ln-py { margin: 0; font-size: clamp(18px, 3vh, 30px); color: var(--fg-2); }
.t-ln-py .play { font-size: .8em; vertical-align: middle; }
.t-ln-m { margin: 0; font-size: clamp(18px, 3vh, 30px); }
.t-ln-n {
  display: flex; align-items: center; gap: 10px; margin: clamp(4px, 1vh, 12px) 0 0;
  color: var(--fg-2); font-size: clamp(14px, 1.9vh, 19px); font-variant-numeric: tabular-nums;
}
.t-ln-go {
  display: grid; place-items: center; width: 36px; height: 36px; padding: 0; cursor: pointer;
  border-radius: 99px; border: 1.5px solid var(--hair); background: var(--card); color: var(--fg);
}
.t-ln-go:hover:not(:disabled) { background: var(--raised); }
.t-ln-go:disabled { opacity: .3; cursor: default; }
.t-ln-go .t-arrow { width: 9px; height: 15px; }
.tp.no-sound .t-ln-py, .tp.no-meaning .t-ln-m,
.t-round-line.no-sound .t-ln-py, .t-round-line.no-meaning .t-ln-m { visibility: hidden; }
.t-round-line > .ref-body { display: flex; flex-direction: column; justify-content: center; }
.t-round-line .t-ln-zh { font-size: clamp(30px, min(6vh, 3.4vw), 60px); }

.teach-sent {
  display: grid; height: 100%; min-height: 0; gap: clamp(8px, 1.6vh, 18px);
  grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas: "top" "main" "bar";
}
.teach-sent > .crumb { grid-area: top; justify-self: start; align-self: center; margin: 0; }
.teach-sent > .t-top { grid-area: top; justify-self: end; }
.teach-sent > .t-sent-main {
  grid-area: main; min-height: 0; overflow: hidden auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.teach-sent > .t-sent-main > * { zoom: var(--fit, 1); }
.teach-sent .t-ln { max-width: min(100%, 1500px); }
.teach-sent .t-ln-zh { font-size: clamp(40px, min(10vh, 5vw), 104px); }
.teach-sent :is(.t-ln-py, .t-ln-m) { font-size: clamp(20px, 4vh, 44px); }
.teach-sent .t-sent-n { margin: clamp(8px, 2vh, 20px) 0 0; }
.teach-sent > .t-bar { grid-area: bar; justify-self: center; width: min(100%, 760px); }

.t-top { display: flex; align-items: center; gap: var(--s2); }
.t-close { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.t-x { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

.teach-tabs { display: flex; flex-wrap: wrap; gap: var(--s1); border-bottom: 1px solid var(--hair); }
.teach-tab {
  margin-bottom: -1px; padding: 8px 16px 10px; cursor: pointer;
  font: inherit; font-size: clamp(18px, 1.5vw, 24px); font-weight: 400; color: var(--fg-2);
  background: none; border: 0; border-bottom: 3px solid transparent;
}
.teach-tab:hover { color: var(--fg); }
.teach-tab[aria-selected="true"] { font-weight: 800; color: var(--fg); border-bottom-color: var(--acc); }
.teach-pane[hidden] { display: none !important; }
.teach-filter { flex: none; display: flex; flex-wrap: wrap; gap: 8px; }
.teach-filter-b {
  padding: 6px 14px; border-radius: var(--r-pill); cursor: pointer;
  font: inherit; font-size: clamp(14px, 1.1vw, 17px); color: var(--fg-2);
  background: none; border: 1px solid var(--hair);
}
.teach-filter-b:hover { color: var(--fg); border-color: var(--fg-2); }
.teach-filter-b[aria-pressed="true"] { color: var(--fg); font-weight: 700; border-color: var(--acc); background: var(--card); }
.teach-pane { min-height: 0; overflow: hidden auto; }
.teach-lesson-s > .teach-pane { display: flex; flex-direction: column; gap: var(--s3); }
.teach-lesson-s .teach-drills { flex: none; grid-template-columns: repeat(var(--n, 4), 1fr); }
.teach-sent.no-text .t-ln-zh { visibility: hidden; }
.teach-sent.m-listen.no-text .t-ln-pyt { display: none; }
.teach-sent.m-listen.no-text .t-ln-py .play { width: clamp(72px, 14vh, 120px); height: clamp(72px, 14vh, 120px); border-radius: 50%; }
.teach-sent.m-listen.no-text .t-ln-py .play .spk { width: 50%; height: 50%; }
.teach-pane > .teach-fit { zoom: var(--fit, 1); }
.teach-lesson-s > .teach-pane { flex: 1 1 0; }
.teach-lesson-s .teach-drill { min-height: clamp(66px, 11vh, 104px); }
.teach-lines { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: var(--s2); }
.teach-line {
  display: block; padding: 12px 16px; border-radius: 14px; text-decoration: none; color: var(--fg);
  font-family: 'Noto Serif SC', serif; font-size: 24px; line-height: 1.4;
  background: var(--card); border: 1px solid var(--hair);
}
.teach-line:hover { background: var(--raised); }

.t-find {
  display: flex; align-items: center; gap: 8px; width: min(100%, 420px); height: 46px; padding: 0 14px;
  border-radius: var(--r-pill); border: 1px solid var(--hair); background: var(--card);
}
.t-find:focus-within { border-color: var(--fg-2); }
.t-find svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--fg-2); stroke-width: 1.8; stroke-linecap: round; }
.t-find input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font: inherit; font-size: 17px; color: var(--fg); }
.t-covers { --cw: 120px; display: grid; grid-template-columns: repeat(auto-fill, var(--cw)); gap: 14px; }
.screen.teach-shelf { padding: 0 7px 7px; }
.t-cv {
  --sp: calc(var(--cw) * .14);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(var(--cw) * .07);
  width: var(--cw); height: calc(var(--cw) * 4 / 3);
  padding: 0 0 calc(var(--cw) * .06) var(--sp); overflow: hidden;
  border-radius: max(3px, calc(var(--cw) * .09)); text-decoration: none;
  background:
    linear-gradient(to right, rgba(0, 0, 0, .22) 0 var(--sp),
      rgba(255, 255, 255, .3) var(--sp) calc(var(--sp) + max(1px, calc(var(--cw) * .015))), transparent 0),
    linear-gradient(135deg, var(--acc), color-mix(in srgb, var(--acc) 80%, transparent));
  box-shadow: 0 0 0 .5px var(--hair), 0 2px 8px rgba(0, 0, 0, .14);
  transition: transform var(--fast) var(--ease);
}
.t-cv:hover { transform: translateY(-2px); }
.t-cv[hidden] { display: none; }
.t-cv.is-own { outline: 3px solid var(--acc); outline-offset: 3px; }
.t-cv-label {
  display: grid; place-items: center; width: 80%; min-height: 36%; padding: 5% 5%;
  border-radius: max(1.5px, calc(var(--cw) * .06)); background: #F4F1E9; color: var(--acc);
}
.t-cv-label b {
  font-weight: 600; font-size: max(9.5px, calc(var(--cw) * .1)); line-height: 1.15; text-align: center;
  overflow-wrap: anywhere; hyphens: auto;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.t-cv-lines {
  display: flex; flex-direction: column; align-items: center; gap: 1px; width: 86%;
  color: #fff; font-weight: 600; font-size: max(9px, calc(var(--cw) * .1)); line-height: 1.2; text-align: center;
}
.t-cv-lines span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-cv-lines [lang="zh"] { font-family: 'Noto Serif SC', serif; }
.t-cv-rule { width: 44%; height: max(1px, calc(var(--cw) * .025)); border-radius: 9px; background: rgba(255, 255, 255, .55); }
.t-cv-path { padding: 0; background: color-mix(in srgb, var(--acc) 16%, var(--card)); }
.t-cv-plain { display: flex; flex-direction: column; align-items: center; gap: 6%; text-align: center; color: var(--acc); }
.t-cv-g { font-family: 'Noto Serif SC', serif; font-size: calc(var(--cw) * .5); line-height: 1; }
.t-cv-plain b { padding: 0 8%; font-weight: 600; font-size: max(10px, calc(var(--cw) * .11)); line-height: 1.15; color: var(--fg); }

.teach-school {
  display: inline-flex; align-items: center; flex: none; height: 68px; box-sizing: border-box;
  padding: 5px 12px; border-radius: 14px; background: #fff; border: 1px solid var(--hair);
}
.teach-school[hidden] { display: none; }
.teach-school img { display: block; width: auto; height: 56px; }
.teach-school span { padding: 0 4px; font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: 20px; color: #1C1E18; }
.t-top .teach-school { height: 60px; padding: 4px 10px; border-radius: 12px; }
.t-top .teach-school img { height: 50px; }

.fs-b { display: none; }
.fs-ok .fs-b {
  display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; padding: 0;
  border: 0; border-radius: var(--r-chip); cursor: pointer;
  color: var(--fg-2); background: var(--raised);
}
.fs-ok .fs-b:hover { color: var(--fg); background: color-mix(in srgb, var(--fg) 12%, var(--raised)); }
.fs-b svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6;
            stroke-linecap: round; stroke-linejoin: round; }
.fs-b .fs-out, .is-fs .fs-b .fs-in { display: none; }
.is-fs .fs-b .fs-out { display: block; }
.fs-ok .teach-head .fs-b { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--hair); }
.teach-head .fs-b svg { width: 22px; height: 22px; }

@media (max-width: 860px) {
  .teach-drills, .teach-lesson-s .teach-drills { grid-template-columns: repeat(2, 1fr); }
  .teach-tile { min-width: 72px; height: 72px; font-size: 40px; }
  .teach-tile-w { font-size: 30px; }
}

body.parent-mode .mks,
body.parent-mode .sched,
body.parent-mode .cellw > .star,
body.parent-mode .getapp { display: none !important; }
body.parent-mode .lib-rail .lchips,
body.parent-mode a[href="#/library/list"] { display: none !important; }

.pk { display: flex; flex-direction: column; gap: var(--s2); margin-bottom: var(--s4); }
.pk-list { display: flex; flex-direction: column; gap: var(--s2); }
.pk-row {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 16px;
  border-radius: var(--r-card); text-decoration: none; color: var(--fg);
  background: var(--card); box-shadow: var(--panel);
}
a.pk-row:hover { background: color-mix(in srgb, var(--jade) 8%, var(--card)); }
.pk-g {
  flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  font-family: 'Noto Serif SC', serif; font-size: 21px;
  color: var(--jade-ink); background: color-mix(in srgb, var(--jade) 14%, var(--card));
}
.pk-row.is-waiting .pk-g { color: var(--muted); background: color-mix(in srgb, var(--fg) 6%, var(--card)); }
.pk-row.is-ended .pk-g { color: var(--muted); background: color-mix(in srgb, var(--fg) 6%, var(--card)); }
.pk-row.is-waiting .pk-t, .pk-row.is-ended .pk-t { color: var(--fg-2); }
.pk-t { flex: 1; min-width: 0; font-size: var(--t-body); line-height: 1.35; }
.pk-t b { font-weight: 650; }
.pk-row.is-waiting .pk-t b { display: block; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-chip {
  display: flex; align-items: center; gap: 6px; width: fit-content; margin: 4px 0 3px; padding: 2px 9px;
  border-radius: 999px; font-size: 12px; font-weight: 650; line-height: 1.4;
  color: var(--seal-text); background: color-mix(in srgb, var(--seal) 12%, transparent);
}
.pk-chip i { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--seal); animation: pk-breathe 1.1s ease-in-out infinite alternate; }
@keyframes pk-breathe { to { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .pk-chip i { animation: none; } }
.pk-dot { color: var(--muted); }
.pk-go { color: var(--muted); font-size: 22px; line-height: 1; }
.pk-add { align-self: flex-start; }

.pa-fields { display: flex; flex-direction: column; gap: var(--s3); align-self: stretch; }
.pa-field .intro-input { width: 100%; box-sizing: border-box; }
.pa-field { display: flex; flex-direction: column; gap: 6px; }
.pa-field > span { font-size: var(--t-label); font-weight: 600; color: var(--fg-2); }
.pa-fields .msg.ok { color: var(--jade-ink); }
.pa-panel { display: flex; flex-direction: column; gap: var(--s4); max-width: 520px; }
.pa-acts { display: flex; gap: var(--s3); }
.intro-parent { margin: var(--s4) 0 0; max-width: 360px; }
.intro-parent .intro-row-g { font-size: 22px; }

.intro-partner {
  display: flex; align-items: center; gap: 12px; margin: var(--s4) 0 0; max-width: 380px;
  padding: 12px 14px; border-radius: var(--r-card); background: var(--card);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--seal) 45%, var(--hair));
}
.intro-partner b { font-size: var(--fs-small); font-weight: 600; }
.intro-partner-logos { display: flex; gap: 8px; flex: none; }
.intro-partner-logos img { height: 30px; width: auto; max-width: 64px; object-fit: contain; border-radius: 6px; background: #fff; padding: 2px; }
.intro-laoshi {
  display: flex; align-items: center; gap: 13px; width: 100%; box-sizing: border-box; margin: var(--s2) 0;
  padding: 14px; border-radius: var(--r-card); background: var(--card); color: var(--fg); text-decoration: none;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--seal) 40%, var(--hair));
}
.intro-laoshi:hover { background: color-mix(in srgb, var(--fg) 5%, var(--card)); }
.intro-laoshi .fine { color: var(--seal); }
.intro-laoshi-g { width: 36px; flex: none; text-align: center; font-size: 26px; }
.intro-laoshi-go {
  display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%;
  color: var(--seal); background: color-mix(in srgb, var(--seal) 15%, transparent); font-weight: 700;
}
.intro-badge {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; vertical-align: 1px;
  font-size: 11px; font-weight: 600; color: var(--seal-on); background: var(--seal);
}
.intro-note { margin: var(--s1) 2px; }
.intro-say { margin-top: var(--s3); max-width: 42ch; }
.intro-busy { color: var(--muted); }
.intro-chev, .intro-x { box-shadow: none; display: grid; place-items: center; color: var(--muted); font-size: 16px; }
.intro-row.on .intro-x { background: none; }
.intro-info { margin-left: 4px; cursor: help; color: var(--muted); letter-spacing: 0; text-transform: none; }
.intro-country { display: flex; flex-direction: column; gap: 4px; width: 100%; margin: 0 0 var(--s2); }
.intro-country select {
  width: 100%; padding: 12px; border-radius: var(--r-chip); font: inherit; font-size: 15px;
  background: var(--card); color: var(--fg); border: 0; box-shadow: inset 0 0 0 1px var(--hair);
}
.intro-code { display: flex; gap: var(--s2); align-items: center; width: 100%; }
.intro-code .intro-input { flex: 1; text-transform: uppercase; }
.intro-sheet { display: flex; flex-direction: column; gap: var(--s2); width: 100%; }
.intro-sheet .intro-acts { margin-top: var(--s2); }
.intro-row[aria-busy="true"] { opacity: .6; }

.pc-head { display: flex; align-items: center; gap: var(--s3); }
.pc-head h1 { margin: 0; }
.pc-place { margin: 4px 0 0; color: var(--fg-2); font-size: var(--t-body); }
.pc-g { width: 52px; height: 52px; font-size: 28px; border-radius: 14px; }
.pc-figures { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.pc-cal, .pc-recent { display: flex; flex-direction: column; gap: var(--s3); }
.pc-grid { display: flex; gap: 4px; }
.pc-col { display: flex; flex-direction: column; gap: 4px; flex: 1; max-width: 30px; }
.pc-col i {
  display: block; aspect-ratio: 1; border-radius: 4px;
  background: color-mix(in srgb, var(--fg) 7%, var(--card));
}
.pc-col i.on { background: var(--jade); }
.pc-col i.on.l1 { background: var(--growth-2); }
.pc-col i.on.l2 { background: var(--growth-3); }
.pc-col i.on.l3 { background: var(--growth-4); }
.pc-col i.today { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--fg) 45%, transparent); }
.pc-col i.none { background: transparent; }
.pc-recent { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5, 28px); }
.pc-chart .sub { margin: 0 0 var(--s2); }
.pc-bars { display: flex; align-items: flex-end; gap: 4px; height: 120px; }
.pc-bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; }
.pc-bar b { font-size: 10px; font-weight: 600; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.pc-bar i { display: block; width: 100%; min-height: 2px; border-radius: 3px 3px 0 0; background: var(--jade); }
.pc-axis { display: flex; justify-content: space-between; margin: 4px 0 0; }
.pc-end { display: flex; justify-content: center; margin-top: var(--s4); }
.pc-end-b { color: var(--seal-text, var(--seal)); }
.pc-lesson { display: flex; flex-direction: column; gap: var(--s3); }
.pc-lesson-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s2); margin: 0; }
.pc-tally { display: flex; gap: 8px; font-size: var(--fs-fine); font-weight: 600; font-variant-numeric: tabular-nums; }
.pc-tally .ph-ready { color: var(--t4); }
.pc-tally .ph-learning { color: var(--learning); }
.pc-tally .ph-learned { color: var(--growth-4); }
.pc-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.pc-chip { padding: 6px 10px; border-radius: 999px; background: color-mix(in srgb, var(--fg) 6%, var(--card)); color: var(--fg-2); font-size: var(--fs-fine); font-weight: 500; }
.pc-week { display: flex; flex-direction: column; gap: var(--s3); }
.pc-before { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pc-path { margin-bottom: 10px; }
.pc-class-name { margin: 0 0 6px; display: flex; flex-direction: column; gap: 2px; }
.pc-class-name small { color: var(--fg-2); font-size: var(--fs-fine); }
.pc-class-who { margin: 0 0 10px; color: var(--fg-2); font-size: 13px; }
.pc-class-who span { font-family: var(--serif-hz); color: var(--muted); }
.pc-board { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; counter-reset: pcb; }
.pc-board li { counter-increment: pcb; display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  border-radius: 10px; background: var(--raised); font-variant-numeric: tabular-nums; }
.pc-board li::before { content: counter(pcb); width: 22px; color: var(--muted); font-size: 13px; }
.pc-board li.me { background: color-mix(in srgb, var(--seal) 12%, var(--card)); font-weight: 600; }
.pc-board-h { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-board-xp { color: var(--fg-2); font-size: 13px; }
.pc-path-bar { position: relative; display: block; height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--fg) 9%, var(--card)); overflow: hidden; }
.pc-path-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 3px; }
.pc-path-bar i.here { background: color-mix(in srgb, var(--learning) 45%, transparent); }
.pc-path-bar i.done { background: var(--growth-4); }
.pc-wcell { position: relative; }
.pc-note { position: absolute; top: 4px; right: 4px; padding: 1px 6px; border-radius: 999px; background: var(--seal); color: #fff; font-size: 10px; font-weight: 600; }
.pk-when { display: block; color: var(--muted); font-size: 12px; }
@media (max-width: 860px) {
  .pc-recent { grid-template-columns: 1fr; }
}
.ol, .ol-page { --acc: #2F7E8F; }
.ol {
  width: min(96vw, 1240px); height: min(92vh, 980px); max-width: none; max-height: none;
  padding: 0; border: 0; border-radius: var(--r-panel); background: var(--raised); color: var(--fg);
}
.ol[open] { display: flex; flex-direction: column; }
.ol::backdrop { background: rgba(0, 0, 0, .5); }
.ol-wait { margin: auto; }
.ol-pane { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
.ol-pane[hidden] { display: none; }
.ol-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px 10px; flex-wrap: wrap; }
.ol-head h2 { margin: 0; font-size: 20px; flex: 0 1 auto; }
.ol-name { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.ol-name > span:last-child { color: var(--muted); font-size: 14px; }
.ol-name:hover > span:first-child { text-decoration: underline; }
.ol-seal {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; flex: none;
  font-family: var(--serif-hz); font-size: 18px; background: var(--acc); color: #fff;
}
.ol-find {
  flex: 1 1 260px; max-width: 420px; margin-left: auto; padding: 9px 14px; font: inherit; font-size: var(--t-body);
  border-radius: var(--r-pill); border: 1px solid var(--hair); background: var(--bg-sunken); color: var(--fg);
}
.ol-find:focus-visible { outline: 2px solid var(--acc); outline-offset: -1px; }
.ol-import { white-space: nowrap; }
.ol-x {
  width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; color: var(--fg-2);
  font-size: 22px; line-height: 1; cursor: pointer;
}
.ol-x:hover { background: var(--bg-sunken); color: var(--fg); }
.ol-hint { margin: 0; padding: 0 22px 8px; }
.ol-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 0 22px 16px; overscroll-behavior: contain; }
.ol-sec { content-visibility: auto; contain-intrinsic-size: auto 2400px; }
.ol-sec[hidden] { display: none; }
.ol-none { max-width: 420px; padding-top: 12px; }
.ol-none[hidden] { display: none; }
.ol-sec > header {
  position: sticky; top: 0; z-index: 1; display: flex; align-items: baseline; gap: 12px;
  padding: 12px 0 8px; background: var(--raised);
}
.ol-sec > header h3 { margin: 0; font-size: var(--t-label); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-variant-numeric: tabular-nums; }
.ol-sec > header button {
  border: 0; background: none; padding: 0; font: inherit; font-size: var(--t-label); color: var(--acc); cursor: pointer;
}
.ol-sec > header button:hover { text-decoration: underline; }
.ol-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px;
  user-select: none; -webkit-user-select: none;
}
.ol-tile {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0;
  padding: 10px 12px 9px; border: 1px solid var(--hair); border-radius: var(--r-chip);
  background: var(--card); color: var(--fg); font: inherit; text-align: left; cursor: pointer;
  transition: background var(--fast), border-color var(--fast), color var(--fast);
}
.ol-tile[hidden] { display: none; }
.ol-tile:hover { border-color: color-mix(in srgb, var(--acc) 55%, var(--hair)); }
.ol-tile:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.ol-h { font-family: var(--serif-hz); font-size: 24px; line-height: 1.15; }
.ol-p { font-size: var(--t-label); color: var(--fg-2); }
.ol-m { width: 100%; font-size: var(--t-label); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ol-m:empty { display: none; }
.ol-tile[aria-pressed="true"] { background: var(--acc); border-color: var(--acc); color: #fff; }
.ol-tile[aria-pressed="true"] :is(.ol-p, .ol-m) { color: rgba(255, 255, 255, .86); }
.ol-tile[aria-pressed="true"]::after {
  content: '✓'; position: absolute; top: 7px; right: 8px; width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center; font-size: 11px; font-weight: 700; background: #fff; color: var(--acc);
}
.ol-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 22px; padding: 12px 22px;
  border-top: 1px solid var(--hair); flex: none;
}
.ol-num { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.1; }
.ol-num b { font-size: 22px; font-variant-numeric: tabular-nums; }
.ol-num small { font-size: var(--t-cap); color: var(--muted); letter-spacing: .04em; }
.ol-foot .btn-primary { min-width: 140px; }
.ol-delete {
  margin-right: auto; border: 0; background: none; padding: 0; font: inherit; font-size: var(--fs-small);
  color: var(--seal-text); cursor: pointer;
}
.ol-pane-name { flex: 0 0 auto; margin: auto; width: min(92%, 440px); gap: 14px; }
.ol-sum { display: flex; gap: 22px; }
.ol-pane-name h2 { margin: 0; font-size: 20px; }
.ol-sum { margin: 0; }
.ol-import-body {
  display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 24px;
  flex: 1 1 auto; min-height: 0; overflow: auto; padding: 6px 22px 22px;
}
@media (max-width: 900px) { .ol-import-body { grid-template-columns: 1fr; } }
.ol-in { display: flex; flex-direction: column; gap: 10px; }
.ol-in > .btn { align-self: flex-end; }
.ol-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 240px;
  padding: 24px; border: 2px dashed color-mix(in srgb, var(--acc) 45%, var(--hair)); border-radius: var(--r-card);
  background: color-mix(in srgb, var(--acc) 5%, var(--card)); text-align: center; cursor: pointer;
}
.ol-drop.over, .ol-drop:hover { background: color-mix(in srgb, var(--acc) 12%, var(--card)); border-color: var(--acc); }
.ol-drop-mark { font-size: 34px; color: var(--acc); line-height: 1; }
.ol-drop b { font-size: 17px; }
.ol-paste {
  width: 100%; resize: vertical; font: inherit; font-size: var(--fs-small); padding: 10px 12px; border-radius: 10px;
  background: var(--bg-sunken); border: 1px solid var(--hair); color: var(--fg);
}
.ol-out { min-width: 0; }
.ol-error { margin: 0; padding: 12px 14px; border-radius: var(--r-chip); background: color-mix(in srgb, var(--seal) 10%, var(--card)); }
.ol-nums { display: flex; align-items: center; gap: 22px; margin-bottom: 12px; }
.ol-more { margin: 8px 0; }
.ol-more summary { cursor: pointer; font-weight: 600; }
.ol-more summary b { color: var(--acc); font-variant-numeric: tabular-nums; margin-left: 4px; }
.ol-more ul { margin: 8px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.ol-more li select { margin-left: 8px; font: inherit; }
.ol-missing { flex-direction: row !important; flex-wrap: wrap; gap: 4px 12px !important; list-style: none; padding-left: 0 !important; }
.ol-sub { margin: 16px 0 6px; font-size: var(--t-label); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ol-out { container-type: inline-size; }
.ol-sub-row { display: flex; align-items: center; gap: 4px; margin: 16px 0 6px; }
.ol-sub-row .ol-sub { margin: 0; }
.ol-org { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.ol-les {
  display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: start; gap: 2px 8px;
  padding: 4px 6px; border-radius: var(--r-chip); outline: 1px dashed transparent;
}
.ol-les.over { background: color-mix(in srgb, var(--acc) 10%, transparent); outline-color: var(--acc); }
.ol-grip { cursor: grab; color: var(--muted); user-select: none; line-height: 30px; text-align: center; }
.ol-les-name {
  width: 100%; min-width: 0; padding: 4px 6px; border: 1px solid transparent; border-radius: 6px;
  background: none; color: inherit; font: inherit; font-size: var(--fs-small); font-weight: 600;
}
.ol-les-name:hover { border-color: var(--hair); }
.ol-les-name:focus { outline: none; border-color: var(--acc); background: var(--card); }
.ol-chips { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; padding-top: 2px; grid-row: 2; grid-column: 2 / -1; }
.ol-chips:empty { display: none; }
.ol-chip {
  padding: 1px 7px; border: 1px solid var(--hair); border-radius: 6px; background: var(--card); color: var(--fg-2);
  font-family: var(--serif-hz); font-size: 16px; line-height: 1.45; cursor: grab;
}
.ol-chip:hover { border-color: color-mix(in srgb, var(--acc) 55%, var(--hair)); }
.ol-chip:focus-visible { outline: 2px solid var(--acc); outline-offset: 1px; }
.ol-chip[aria-pressed="true"] { background: var(--acc); border-color: var(--acc); color: #fff; }
.ol-les-acts { display: flex; gap: 2px; grid-row: 1; grid-column: 3; }
.ol-les-acts button {
  display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px;
  background: none; color: var(--muted); font: inherit; font-size: 15px; cursor: pointer;
}
.ol-les-acts button:hover:not(:disabled) { background: var(--bg-sunken); color: var(--fg); }
.ol-les-acts button:disabled { opacity: .3; cursor: default; }
.ol-org-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; }
.ol-org-bar .btn { box-shadow: inset 0 0 0 1px var(--hair); }
.ol-org-bar .btn.over { box-shadow: inset 0 0 0 1px var(--acc); background: color-mix(in srgb, var(--acc) 10%, var(--card)); }
.ol-num-row { flex-direction: row; align-items: baseline; gap: 6px; }
.ol-num-row b { font-size: 17px; }
.ol-moveto {
  padding: 6px 8px; border: 1px solid var(--hair); border-radius: 6px; background: var(--card); color: inherit;
  font: inherit; font-size: var(--fs-small);
}
@container (min-width: 640px) {
  .ol-les { grid-template-columns: 16px minmax(96px, 160px) minmax(0, 1fr) auto; }
  .ol-les-acts { grid-column: 4; }
  .ol-chips { grid-row: 1; grid-column: 3; }
}
.ol-in .btn:not(.btn-primary), .ol-finish .btn:not(.btn-primary), .ol-pane-name .btn:not(.btn-primary) {
  box-shadow: inset 0 0 0 1px var(--hair);
}
.ol-drop .btn { background: var(--acc); color: #fff; box-shadow: none; }
.ol-finish { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.ol-finish .intro-input { flex: 1 1 200px; margin: 0; }
.ol-target { margin-top: 18px; flex-wrap: wrap; }
.ol-target button { flex: 1 1 160px; }
.ol-target + .ol-finish { margin-top: 10px; }
.ol-page { max-width: 1100px; margin: 0 auto; padding: 24px 0; }
.ol-page .ol-pane-import { background: var(--raised); border-radius: var(--r-panel); }
.ol-page-foot { text-align: center; margin-top: 12px; }
.set-path-shelf { margin: 10px 0 2px; font-size: var(--t-label); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ol-row { display: flex; align-items: center; gap: 6px; }
.ol-row > button:first-child { flex: 1 1 auto; }
.ol-edit {
  display: inline-grid; place-items: center; width: 30px; height: 30px; flex: none; padding: 0;
  border: 0; border-radius: 8px; background: none; color: var(--fg-2); cursor: pointer;
}
.ol-edit:hover { background: var(--bg-sunken); color: var(--fg); }
@media (prefers-reduced-motion: reduce) { .ol-tile { transition: none; } }

.seal.won .seal-stone.seal-bronze, .seal-big.won .seal-stone.seal-bronze {
  background: linear-gradient(135deg, #E0A86A 0%, #B87333 48%, #7A4A1F 100%);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, .35), inset 0 -2px 3px rgba(0, 0, 0, .25), 0 1px 3px rgba(122, 74, 31, .45);
  transform: rotate(-4deg);
}
.seal-stone.seal-bronze img {
  width: 82%; height: 82%; object-fit: contain;
  filter: grayscale(1) sepia(.9) saturate(1.5) brightness(1.08) contrast(1.05)
          drop-shadow(0 1px 0 rgba(255, 236, 200, .35));
}
.ch-k-together { --ch-tint: #B87333; }
.ch-reward {
  grid-column: 1 / -1; margin: 0; display: flex; align-items: center; gap: 10px;
  font-size: var(--fs-small); color: var(--fg-2);
}
.ch-reward .seal-stone.seal-bronze {
  width: 30px; height: 30px; flex: none;
  background: linear-gradient(135deg, #E0A86A 0%, #B87333 48%, #7A4A1F 100%);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, .35), 0 1px 2px rgba(122, 74, 31, .4);
  transform: rotate(-4deg);
}

.ask-school-note { display: flex; align-items: flex-start; gap: 8px; margin: var(--s2) 0 0; padding: 0 4px; color: var(--fg-2); }
.ask-school-note > span:first-child { flex: none; }
.ask-school-trouble { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.ask-school-trouble p { margin: 0; color: var(--fg-2); }
.ask-school { display: flex; flex-direction: column; gap: var(--s2); }
.ask-school-l { font-weight: 600; font-size: var(--fs-fine); color: var(--muted); }
.ask-school-hint, .ask-school-consent { margin: 0; }
.ask-school-consent { color: var(--muted); }
.ask-school .btn-lg { align-self: stretch; }
.intro-asked {
  display: flex; align-items: center; gap: 13px; width: 100%; padding: 14px;
  border-radius: var(--r-card); background: var(--card); box-shadow: var(--panel); opacity: .55;
}
.intro-asked .intro-row-b { flex: 1; }
.intro-asked.lapsed { opacity: 1; }
.intro-asked.lapsed .intro-row-g, .intro-asked.lapsed .intro-row-b { opacity: .55; }
.ask-school-list { display: flex; flex-direction: column; gap: var(--s2); margin: var(--s2) 0; }
.ask-school-row {
  display: flex; align-items: center; gap: var(--s3); padding: 12px 14px;
  border-radius: var(--r-card); background: var(--card); box-shadow: var(--panel);
}
.ask-school-dim { display: flex; align-items: center; gap: var(--s3); flex: 1; opacity: .55; min-width: 0; }
.ask-school-dim > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ask-school-dim small { color: var(--muted); font-size: var(--fs-fine); }
.ask-school-logo { width: 38px; height: 38px; flex: none; border-radius: 10px; object-fit: contain; }
.pf-school { margin: var(--s2) 0; }
.join-hint { margin-top: 0; }

.set-group-h { margin: 0; font-size: 17px; font-weight: 600; color: var(--seal-text, var(--seal)); }
.set-group-note { margin: 2px 0 var(--s2, 8px); color: var(--fg-2); }

.set-group-chips { margin: var(--s2, 8px) 0 var(--s3, 12px); }
.set-group-n { opacity: .65; font-variant-numeric: tabular-nums; margin-left: 2px; }
.set-reg { margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 500; color: var(--muted); }
.set-reg-i { width: 11px; height: 11px; fill: none; stroke: var(--fg-2); stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round; }
.set-reg-spoken .set-reg-i, .set-reg-online .set-reg-i { stroke: var(--seal-text, var(--seal)); }

.kid-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  margin-left: 5px; vertical-align: middle; background: currentColor; }
.kid-c0 { --kid: var(--growth-2); } .kid-c1 { --kid: var(--seal); }
.kid-c2 { --kid: var(--t4); } .kid-c3 { --kid: var(--learning); }
.kid-dot[class*="kid-c"] { background: var(--kid); }
.lchip.kid-on:not(.on) { color: var(--kid); font-weight: 600; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--kid) 60%, transparent); }
.lchip.kid-on.on { background: color-mix(in srgb, var(--kid) 16%, var(--card)); color: var(--fg); font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--kid); }
.pk-g[class*="kid-c"] { color: var(--kid); }
