/* === Time Station — /games/station ===================================
   Companion to js/games/station/*. The scene itself is canvas (its own
   day/night palette); everything around it — top bar, the day's line,
   PA console, log, station office and summary cards — uses the site
   tokens so it themes light/dark with the rest of the site.
   (2026-09-23: consolidated; v1/v2 keypad, route-map, timer and rank
   rules removed — backups/station-2026-09-23/ has the old sheet.)
   ==================================================================== */

.station-page { max-width: 1040px; margin: 0 auto; }

.st {
  position: relative;
  display: flex; flex-direction: column; gap: 12px;
  padding: 14px;
  border-radius: 22px;
  background: var(--card);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-card);
  font-family: var(--font-ui);
  color: var(--ink);
  --st-ok: var(--green);
  --st-hint: #d4a21c;
  --st-bad: var(--red);
}

/* ── top bar ─────────────────────────────────────────────────── */
.st-top { display: flex; align-items: center; gap: 12px; min-height: 40px; }
.st-top__title { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.st-top__line {
  flex: none; display: inline-grid; place-items: center;
  min-width: 40px; height: 40px; padding: 0 8px; border-radius: 10px;
  background: var(--accent); color: #fff;
  font-family: var(--font-kana-sans); font-weight: 700; font-size: 15px;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18);
}
.st-top__name { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-top__hud { display: flex; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.st-top__hud span:empty { display: none; }
.st-top__hud span { white-space: nowrap; padding: 5px 10px; border-radius: 999px; background: var(--inset); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.st-top__clock { font-weight: 800; color: var(--ink); letter-spacing: .02em; }
.st-top__today { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-kana-sans); font-weight: 700; color: var(--ink); }
.st-top__today b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; color: #fff; font-size: 12px; }
.st-top__today i { font-style: normal; font-size: 14px; line-height: 1; }
.st-top__rush { color: #fff; background: var(--red) !important; border-color: var(--red) !important; font-family: var(--font-kana-sans); animation: st-onair 1.2s ease-in-out infinite; }
.st-top__btns { display: flex; gap: 6px; }
.st-ib {
  width: 38px; height: 38px; border-radius: 10px; cursor: pointer;
  background: var(--inset); border: 1px solid var(--line); color: var(--ink); font-size: 16px;
  transition: background .15s, border-color .15s;
}
.st-ib:hover { border-color: var(--accent-line); background: var(--accent-bg); }
.st-ib.is-off { opacity: .45; }
.st-ib--voice.is-off { text-decoration: line-through; }
@keyframes st-onair { 50% { opacity: .35; } }

/* ── the day as a railway line ───────────────────────────────── */
.st-run {
  --run-p: 0;
  position: relative; list-style: none; margin: 0; padding: 2px 4px 0;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
}
.st.is-menu .st-run { display: none; }
.st-run::before, .st-run::after {   /* the track, and how far along it the day is */
  content: ''; position: absolute; top: 12px; height: 4px; border-radius: 2px;
  left: calc(100% / 24 + 4px);
}
.st-run::before { right: calc(100% / 24 + 4px); background: var(--line-2); }
.st-run::after { width: calc((100% - 100% / 12 - 8px) * var(--run-p)); background: var(--accent); transition: width .6s ease; }
.st-run__s { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; }
.st-run__dot {
  display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--card); border: 3px solid var(--line-2);
  font-size: 10px; font-weight: 900; line-height: 1; color: #fff;
  transition: transform .25s, background .25s, border-color .25s;
}
.st-run__s.is-open .st-run__dot, .st-run__s.is-last .st-run__dot { border-radius: 6px; }
.st-run__t { font-size: 10.5px; font-weight: 700; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-run__s.is-ok .st-run__dot { background: var(--st-ok); border-color: var(--st-ok); }
.st-run__s.is-hint .st-run__dot { background: var(--card); border-color: var(--st-hint); font-size: 9px; }
.st-run__s.is-bad .st-run__dot { background: var(--st-bad); border-color: var(--st-bad); }
.st-run__s.is-ok .st-run__t, .st-run__s.is-hint .st-run__t, .st-run__s.is-bad .st-run__t { color: var(--muted); }
.st-run__s.is-cur .st-run__dot { border-color: var(--accent); background: var(--accent); transform: scale(1.2); box-shadow: 0 0 0 4px var(--accent-bg); animation: st-here 1.6s ease-in-out infinite; }
.st-run__s.is-cur .st-run__t { color: var(--accent); }
@keyframes st-here { 50% { box-shadow: 0 0 0 8px transparent; } }

/* ── the stage ───────────────────────────────────────────────── */
.st-stage {
  position: relative; overflow: hidden;
  border-radius: 14px; background: #0c0e16;
  aspect-ratio: 5 / 3;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04), 0 6px 20px rgba(0, 0, 0, .18);
}
.st-cv { display: block; width: 100%; height: 100%; }
.st-toast {
  position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%) scale(.9);
  padding: 8px 16px; border-radius: 999px;
  background: rgba(12, 14, 22, .82); color: #fff; font-weight: 700; font-size: 15px;
  opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none;
}
.st-toast.is-on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.st-toast.is-bad { background: rgba(177, 50, 42, .92); }
.st-toast.is-good { background: rgba(47, 143, 91, .92); }
.st-pop { position: absolute; left: 50%; top: 38%; pointer-events: none; }
.st-pop__i {
  position: absolute; left: 0; top: 0; transform: translateX(-50%);
  font-weight: 900; font-size: 26px; color: #ffd35a; text-shadow: 0 2px 0 rgba(0,0,0,.45), 0 0 14px rgba(0,0,0,.35);
  animation: st-rise 1.3s ease-out forwards; white-space: nowrap;
}
@keyframes st-rise { from { opacity: 0; transform: translate(-50%, 10px) scale(.8); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.1); } to { opacity: 0; transform: translate(-50%, -60px) scale(1); } }

/* ── the desk: PA console + log ──────────────────────────────── */
.st-desk { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 12px; align-items: stretch; }
@media (min-width: 761px) {
  .st-pa { min-height: 248px; }
  /* the log never makes the desk taller: it fills the console's height and scrolls */
  .st-desk .st-tt { height: 0; min-height: 100%; box-sizing: border-box; }
  .st-desk .st-tt__list { max-height: none; }
}
.st.is-menu .st-desk { display: none; }
.st-pa {
  --kc: var(--accent);
  position: relative;
  padding: 14px 16px 16px; border-radius: 14px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--kc) 6%, var(--inset)), var(--inset) 70px);
  border: 1px solid var(--line); border-top: 3px solid var(--kc);
}
.st-pa[data-kind="open"] { --kc: #e08a2e; }
.st-pa[data-kind="last"] { --kc: #8f8fd0; }
.st-pa[data-kind="future"] { --kc: var(--green); }
.st-pa[data-kind="past"] { --kc: #a07a52; }
.st-pa__head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 8px; }
.st-pa__ic { font-size: 17px; line-height: 1; }
.st-pa__label { font-weight: 800; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--kc); }
.st-pa__hint { font-size: 14px; color: var(--muted); }

/* ON AIR lamp: lit while the chime plays and the announcer speaks */
.st-air {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px 3px 6px; border-radius: 6px;
  font: 800 10px/1 var(--font-ui); letter-spacing: .1em;
  color: var(--faint); background: var(--card); border: 1px solid var(--line-2);
  transition: color .2s, background .2s, border-color .2s, box-shadow .2s;
}
.st-air i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); transition: background .2s; }
.st-pa.is-air .st-air { color: #fff; background: #d6322a; border-color: #d6322a; box-shadow: 0 0 14px rgba(214, 50, 42, .55); }
.st-pa.is-air .st-air i { background: #fff; animation: st-onair 1s ease-in-out infinite; }

/* the announcement line: chunks with their meaning underneath */
.st-pa__line {
  margin: 6px 0 4px; font-family: var(--font-kana-sans); font-size: 22px; font-weight: 500;
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px; line-height: 1.35;
  word-break: keep-all; overflow-wrap: anywhere;
}
.st-ck { display: inline-flex; flex-direction: column; align-items: center; }
.st-ck__jp { white-space: nowrap; }
.st-ck__g {
  margin-top: 3px; max-width: 12em; text-align: center;
  font-family: var(--font-ui); font-size: 11.5px; font-weight: 600; line-height: 1.2; color: var(--faint);
}
.st-ck.is-plain .st-ck__g { visibility: hidden; }
.st-ck.is-blank .st-ck__g { color: var(--accent); font-weight: 800; }
.st-ck.is-just .st-ck__g { color: var(--green); font-weight: 800; animation: st-gpop .5s ease-out; }
@keyframes st-gpop { from { transform: scale(1.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.st-pa.no-gloss .st-ck__g { display: none; }

.st-slot {
  display: inline-block; padding: 0 5px; min-width: 2.2em; text-align: center;
  border-bottom: 3px solid var(--line-2); line-height: 1.45; color: var(--faint);
}
.st-slot.is-given { color: var(--muted); border-bottom-style: dotted; }
.st-slot.is-filled { color: var(--accent); border-bottom-color: var(--accent); font-weight: 700; animation: st-fill .35s ease-out; }
.st-slot.is-active {
  color: var(--accent); border-bottom-color: var(--accent); background: var(--accent-bg); border-radius: 6px 6px 0 0;
  animation: st-blink 1.1s ease-in-out infinite;
}
@keyframes st-blink { 50% { background: transparent; } }
@keyframes st-fill { from { transform: translateY(-6px) scale(1.15); opacity: .3; } to { transform: none; opacity: 1; } }

.st-pa__kanji {
  margin: 0 0 2px; min-height: 1.5em; font-family: var(--font-kana); font-size: 16px; color: var(--muted);
  opacity: 0; transition: opacity .4s;
}
.st-pa__kanji.is-on { opacity: 1; }
.st-pa__tr {
  margin: 0 0 10px; min-height: 1.4em; font-size: 15px; font-weight: 600; color: var(--ink);
  opacity: 0; transition: opacity .4s;
}
.st-pa__tr.is-on { opacity: 1; }

/* 放送 hanko: stamped on the console once the announcement goes out */
.st-pa.is-done::after {
  content: '放送'; position: absolute; right: 18px; bottom: 16px;
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%;
  border: 3px solid #d6322a; color: #d6322a;
  font: 900 17px/1 var(--font-kana-sans); letter-spacing: .05em;
  transform: rotate(-14deg); opacity: .85; pointer-events: none;
  animation: st-stamp .38s cubic-bezier(.2, 1.6, .4, 1) both;
}
.st-pa.is-done .st-pa__kanji, .st-pa.is-done .st-pa__tr { padding-right: 64px; }
@keyframes st-stamp { from { transform: rotate(-14deg) scale(2.2); opacity: 0; } to { transform: rotate(-14deg) scale(1); opacity: .85; } }

/* header toggles: Hint + Meanings */
.st-hintb, .st-gl {
  padding: 4px 11px; border-radius: 999px; cursor: pointer;
  font: 700 12px var(--font-ui);
}
.st-hintb { margin-left: auto; background: var(--accent-bg); border: 1px solid var(--accent-line); color: var(--accent); }
.st-hintb[hidden] + .st-gl { margin-left: auto; }
.st-hintb span, .st-gl span { font-family: var(--font-kana-sans); }
.st-hintb:hover:not([disabled]) { background: var(--accent); color: #fff; }
.st-hintb.is-used { opacity: .5; cursor: default; }
.st-gl { background: var(--card); border: 1px solid var(--line-2); color: var(--muted); font-weight: 600; }
.st-gl span { font-weight: 700; color: var(--accent); }
.st-gl[aria-pressed="false"] { opacity: .6; }

/* new-word card */
.st-tip {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px;
  margin: 0 0 8px; padding: 10px 12px; border-radius: 12px;
  background: var(--accent-bg); border: 1px solid var(--accent-line);
  animation: st-in .35s ease-out;
}
.st-tip[hidden] { display: none; }
.st-tip__new { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--accent); padding: 2px 8px; border-radius: 999px; }
.st-tip__k { font-family: var(--font-kana-sans); font-weight: 700; font-size: 20px; }
.st-tip__r { font-family: var(--font-kana-sans); font-size: 20px; color: var(--accent); font-weight: 700; }
.st-tip__en { color: var(--muted); font-size: 14px; }
.st-tip__note { flex-basis: 100%; color: var(--muted); font-size: 13.5px; }
@keyframes st-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* answer keys: chunky keycaps */
.st-input.st-chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-top: 4px; }
.st-input.st-chips.is-long { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.st-chip {
  position: relative; padding: 13px 8px 12px; border-radius: 12px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line-2); color: var(--ink);
  box-shadow: 0 3px 0 var(--line-2);
  font-family: var(--font-kana-sans); font-size: 19px; font-weight: 600;
  transition: border-color .15s, background .15s, transform .08s, box-shadow .08s;
  animation: st-in .25s ease-out both;
}
.st-chip:nth-child(2) { animation-delay: .04s; } .st-chip:nth-child(3) { animation-delay: .08s; } .st-chip:nth-child(4) { animation-delay: .12s; }
.st-chip small {
  position: absolute; left: 7px; top: 5px; min-width: 15px; padding: 1px 3px; border-radius: 4px;
  font-family: var(--font-ui); font-size: 10px; font-weight: 800; line-height: 1.2; color: var(--faint);
  border: 1px solid var(--line);
}
.st-chip:hover:not([disabled]) { border-color: var(--accent); background: var(--accent-bg); box-shadow: 0 3px 0 var(--accent-line); }
.st-chip:active:not([disabled]) { transform: translateY(2px); box-shadow: 0 1px 0 var(--line-2); }
.st-chip.is-right { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 3px 0 color-mix(in srgb, var(--green) 60%, #000); animation: st-yes .35s ease-out; }
.st-chip.is-right small { color: rgba(255,255,255,.85); border-color: rgba(255,255,255,.35); }
.st-chip.is-wrong { border-color: var(--red); color: var(--red); opacity: .55; box-shadow: none; transform: translateY(2px); animation: st-shake .35s; }
.st-chip.is-hint { border-color: var(--accent); box-shadow: 0 3px 0 var(--accent-line), 0 0 0 3px var(--accent-line); animation: st-pulse 1s ease-in-out infinite; }
@keyframes st-shake { 25% { transform: translate(-5px, 2px); } 75% { transform: translate(5px, 2px); } }
@keyframes st-pulse { 50% { box-shadow: 0 3px 0 var(--accent-line), 0 0 0 6px var(--accent-bg); } }
@keyframes st-yes { 40% { transform: scale(1.06); } }
.st-chip__g {
  display: block; margin-top: 3px; font-family: var(--font-ui); font-size: 11.5px; font-weight: 600;
  line-height: 1.15; color: var(--muted); white-space: normal;
}
.st-chip.is-right .st-chip__g { color: rgba(255,255,255,.9); }
.st-input.is-glossed .st-chip { padding-top: 11px; padding-bottom: 10px; }
.st-input.st-chips.is-long .st-chip { font-size: 17px; white-space: nowrap; }

/* today's log */
.st-tt {
  display: flex; flex-direction: column; min-height: 0;
  padding: 12px 12px 10px; border-radius: 14px; background: var(--inset); border: 1px solid var(--line);
}
.st-tt__h { margin: 0 2px 8px; font-size: 16px; font-family: var(--font-kana-sans); }
.st-tt__h small { font-family: var(--font-ui); font-size: 12px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.st-tt__list {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; align-content: start;
  flex: 1; max-height: 330px; overflow-y: auto; scrollbar-width: thin;
}
.st-tt__list li {
  display: grid; grid-template-columns: 38px minmax(0, 1fr) 18px; align-items: start; gap: 6px;
  padding: 6px 6px; border-radius: 8px; font-size: 13px; color: var(--muted);
  border-left: 3px solid transparent;
}
.st-tt__list li.is-ok { border-left-color: var(--st-ok); }
.st-tt__list li.is-hint { border-left-color: var(--st-hint); }
.st-tt__list li.is-bad { border-left-color: var(--st-bad); }
.st-tt__list li.is-new { background: var(--card); animation: st-in .4s ease-out; }
.st-log__at { font-weight: 700; font-size: 12px; font-variant-numeric: tabular-nums; padding-top: 1px; }
.st-log__b { display: flex; flex-direction: column; min-width: 0; }
.st-log__t { font-family: var(--font-kana-sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.st-log__tr { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--faint); }
.st-log__p { font-weight: 800; font-size: 12px; text-align: center; }
.st-tt__list li.is-ok .st-log__p { color: var(--st-ok); }
.st-tt__list li.is-bad .st-log__p { color: var(--st-bad); }
.st-log__empty { display: block !important; color: var(--faint) !important; font-style: italic; border: none !important; }

/* ── the station office (home) ───────────────────────────────── */
.st-menu { display: none; }
.st.is-menu .st-menu { display: block; }
.st-menu__h { margin: 2px 0 6px; font-family: var(--font-display); font-size: 26px; font-weight: 500; line-height: 1.15; }
.st-menu__lead { margin: 12px 2px 14px; color: var(--muted); font-size: 15px; line-height: 1.5; max-width: 680px; }
.st-office { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.st-office__day, .st-office__skills { padding: 16px 18px; border-radius: 14px; background: var(--inset); border: 1px solid var(--line); }
.st-office__hero { display: flex; align-items: center; gap: 16px; }
.st-office__badge {
  flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 84px; height: 84px; border-radius: 20px; background: var(--dc); color: #fff;
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .18), 0 6px 18px color-mix(in srgb, var(--dc) 35%, transparent);
}
.st-office__badge b { font-family: var(--font-kana-sans); font-size: 40px; line-height: 1; }
.st-office__badge small { margin-top: 4px; font-family: var(--font-kana-sans); font-size: 11px; font-weight: 700; opacity: .9; }
.st-office__hh { min-width: 0; }
.st-office__date { font-family: var(--font-kana-sans); font-weight: 700; font-size: 14px; color: var(--muted); }
.st-wx {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line-2); font-size: 12.5px; font-weight: 600; color: var(--muted);
}
.st-wx b { font-family: var(--font-kana-sans); color: var(--ink); }
.st-btn--big { width: 100%; padding: 15px 20px; font-size: 17px; }
.st-btn--big[style*="--dc"] { background: var(--dc); border-color: var(--dc); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18); text-shadow: 0 1px 1px rgba(0, 0, 0, .2); }
.st-keys { margin: 10px 0 0; text-align: center; font-size: 12.5px; color: var(--faint); }
.st-keys kbd {
  display: inline-block; min-width: 18px; padding: 1px 5px; border-radius: 4px;
  font: 700 11px var(--font-ui); color: var(--muted); background: var(--card); border: 1px solid var(--line-2); box-shadow: 0 1px 0 var(--line-2);
}
.st-office__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 0; }
.st-office__stats div { padding: 10px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); text-align: center; }
.st-office__stats b { display: block; font-size: 22px; font-family: var(--font-kana-sans); }
.st-office__stats b small { font-size: 13px; color: var(--muted); font-weight: 600; }
.st-office__stats span { font-size: 12px; color: var(--muted); }

/* week strip (office + summaries) */
.st-wk { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 4px 0 14px; }
.st-wk__d {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px 7px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--line-2); min-height: 66px;
}
.st-wk__d b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; font-family: var(--font-kana-sans); font-size: 16px;
  color: var(--dc); border: 2px solid var(--dc); }
.st-wk__d span { font-size: 11px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.st-wk__d.is-done b { background: var(--dc); color: #fff; }
.st-wk__d.is-cur { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.st-wk__d.is-cur span { color: var(--accent); }
.st-wk--mini { gap: 4px; margin: 12px auto 6px; max-width: 380px; }
.st-wk--mini .st-wk__d { min-height: 0; padding: 5px 2px; }
.st-wk--mini .st-wk__d b { width: 24px; height: 24px; font-size: 13px; border-radius: 6px; }
.st-wk--mini .st-wk__d span:empty { display: none; }

/* mastery board */
.st-office__skills h3 { margin: 0 0 10px; font-size: 16px; }
.st-office__skills h3 small { color: var(--accent); font-weight: 800; }
.st-m { margin: 0 0 9px; }
.st-m__h { display: flex; align-items: baseline; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.st-m__h span { font-family: var(--font-kana-sans); color: var(--ink); }
.st-m__h small { margin-left: auto; font-size: 11px; font-variant-numeric: tabular-nums; color: var(--faint); }
.st-m__row { display: flex; flex-wrap: wrap; gap: 4px; }
.st-m__c {
  display: grid; place-items: center; min-width: 30px; height: 26px; padding: 0 5px; border-radius: 6px;
  font-family: var(--font-kana-sans); font-size: 12px; font-weight: 700;
  background: var(--card); border: 1px solid var(--line-2); color: var(--muted);
}
.st-m__c.is-new { border-style: dashed; color: var(--faint); opacity: .55; font-weight: 500; }
.st-m__c.b1 { background: color-mix(in srgb, var(--accent) 18%, var(--card)); color: var(--ink); }
.st-m__c.b2 { background: color-mix(in srgb, var(--accent) 34%, var(--card)); color: var(--ink); }
.st-m__c.b3 { background: color-mix(in srgb, var(--accent) 55%, var(--card)); color: #fff; }
.st-m__c.b4 { background: color-mix(in srgb, var(--accent) 78%, var(--card)); color: #fff; }
.st-m__c.b5 { background: var(--green); border-color: var(--green); color: #fff; }
.st-m__key { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--faint); }
.st-m__key .st-m__c { min-width: 16px; height: 14px; padding: 0; font-size: 9px; }

/* ── summary cards ───────────────────────────────────────────── */
.st-modal {
  position: absolute; inset: 0; z-index: 20;
  display: grid; place-items: center; padding: 16px;
  background: rgba(10, 12, 20, .45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  border-radius: 22px;
}
.st-modal[hidden] { display: none; }
.st-b {
  width: min(540px, 100%); max-height: 100%; overflow: auto;
  padding: 22px 22px 20px; border-radius: 18px;
  background: var(--card); border: 1px solid var(--line-2); box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
  animation: st-card .45s cubic-bezier(.2, 1.3, .4, 1) both;
}
@keyframes st-card { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }
.st-b h3 { margin: 4px 0 6px; font-family: var(--font-display); font-weight: 500; font-size: 26px; }
.st-b__btns { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.st-btn {
  padding: 11px 20px; border-radius: 999px; cursor: pointer;
  background: var(--accent); color: #fff; border: 1px solid var(--accent);
  font-family: var(--font-ui); font-weight: 700; font-size: 15px;
  transition: filter .15s, transform .08s;
}
.st-btn:hover { filter: brightness(1.08); }
.st-btn:active { transform: translateY(1px); }
.st-btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.st-btn--ghost:hover { border-color: var(--accent); color: var(--accent); filter: none; }
.st-sum { text-align: center; }
.st-sum .st-b__btns { justify-content: center; }
.st-sum__jp { font-family: var(--font-kana-sans); font-weight: 700; color: var(--accent); font-size: 18px; }
.st-sum p { color: var(--muted); margin: 4px 0; }
.st-sum__big { font-size: 46px; font-weight: 800; color: var(--accent); margin: 8px 0 2px; line-height: 1; font-variant-numeric: tabular-nums; }
.st-sum__big small { display: block; margin-top: 6px; font-size: 14px; font-weight: 600; color: var(--muted); }
.st-sum__hint { white-space: nowrap; }
.st-sum__new { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 10px 0 0; }
.st-sum__new b { flex-basis: 100%; font-size: 13px; color: var(--muted); }
.st-sum__new span { padding: 4px 10px; border-radius: 999px; background: var(--accent-bg); border: 1px solid var(--accent-line); font-family: var(--font-kana-sans); font-weight: 700; }
.st-sum__new small { color: var(--muted); font-weight: 500; }
.st-sum__new.is-grown span { background: color-mix(in srgb, var(--green) 14%, transparent); border-color: color-mix(in srgb, var(--green) 40%, transparent); }
.st-sum__tmr { font-family: var(--font-kana-sans); font-size: 18px; color: var(--ink) !important; margin-top: 10px !important; }
.st-sum .st-wk { margin: 10px 0; }
.st-sum .st-wk--mini { margin: 12px auto 6px; }

/* ── narrow screens ──────────────────────────────────────────── */
@media (max-width: 760px) {
  .st { padding: 10px; gap: 10px; border-radius: 18px; }
  .st-desk { grid-template-columns: 1fr; }
  .st-office { grid-template-columns: 1fr; }
  .st-top__hud { display: none; }
  .st.is-playing .st-top__hud { display: flex; flex-wrap: wrap; gap: 4px; }
  .st.is-playing .st-top__name { display: none; }
  .st.is-playing .st-top__title { flex: none; }
  .st.is-playing .st-top__hud { flex: 1; min-width: 0; }
  .st-pa__kanji:not(.is-on), .st-pa__tr:not(.is-on) { display: none; }
  .st-top__hud span { padding: 3px 7px; font-size: 12px; }
  .st-top__name { font-size: 14px; }
  .st-run__t { display: none; }
  .st-run::before, .st-run::after { top: 8px; }
  .st-run__dot { width: 14px; height: 14px; border-width: 2px; font-size: 0; }
  .st-pa { padding: 12px; }
  .st-pa__line { font-size: 18px; gap: 5px; }
  .st-ck__g { font-size: 10.5px; }
  .st-pa.is-done::after { width: 42px; height: 42px; font-size: 13px; right: 10px; bottom: 10px; }
  .st-input.st-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-chip { font-size: 17px; padding: 12px 6px; }
  .st-input.st-chips.is-long .st-chip { font-size: 14.5px; padding: 12px 4px; letter-spacing: -.02em; }
  .st-desk .st-tt__list { max-height: none; }
  .st-tt__list li:nth-child(n+4) { display: none; }
  .st-office__badge { width: 64px; height: 64px; border-radius: 16px; }
  .st-office__badge b { font-size: 30px; }
  .st-menu__h { font-size: 22px; }
}

/* mobile fullscreen (GameFS pins .st to the viewport) */
.st.gfs--fs { border-radius: 0; border: none; overflow: auto;
  padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); }
.st.gfs--fs .st-tt { display: none; }
.st.gfs--fs .st-modal { border-radius: 0; }

@media (prefers-reduced-motion: reduce) {
  .st *, .st *::after { animation: none !important; transition: none !important; }
}
