/* css/studio.css — Teacher Studio preview (js/studio.mjs). Prefix st-. Needs css/tokens.css.
   Illustrative only: a light app window with three tabs. Responsive by container queries on .st (the whole
   widget) and .st-work (the mock area), so it fits any mount width without page overflow. */

.st {
  --st-win: #FFFDF8;
  --st-bar: #F2EEE5;
  --st-well: #F7F4ED;
  --st-tile: #FFFFFF;
  --st-hair: rgba(18, 19, 24, .09);
  --st-cobalt-tint: #E9EDFF;
  --st-yellow-ink: #7A5A06;
  --st-muted: #666560; /* ink-3, a touch darker so tiny mono labels pass 4.5:1 on the wells */
  container: st / inline-size;
  min-width: 0;
  color: var(--ink);
  font: 400 16px/1.5 var(--display);
  -webkit-font-smoothing: antialiased;
}
.st *, .st *::before, .st *::after { box-sizing: border-box; }
.st [hidden] { display: none !important; }
/* zero-specificity resets, so every st- class below wins */
:where(.st) :where(button) { font: inherit; color: inherit; }
:where(.st) :where(p, ul, ol, h3, h4) { margin: 0; }
:where(.st) :where(ul, ol) { padding: 0; list-style: none; }
.st :focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; }
.st-cv { display: block; width: var(--cw); max-width: 100%; height: auto; }
.st-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* ─────────────────────────────────────────────────────────────── the window */
.st-window {
  background: var(--st-win);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, var(--shadow-2);
  overflow: hidden;
}
.st-titlebar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  padding: 13px 18px;
  background: var(--st-bar);
  border-bottom: 1px solid var(--st-hair);
}
.st-lights { display: inline-flex; gap: 7px; }
.st-lights i { width: 11px; height: 11px; border-radius: 50%; background: var(--chii); box-shadow: inset 0 0 0 1px rgba(59, 46, 46, .18); }
.st-lights i:nth-child(2) { background: var(--usagi); }
.st-lights i:nth-child(3) { background: var(--hachi); }
.st-title { display: inline-flex; align-items: center; gap: 8px; font: 650 14px/1 var(--display); letter-spacing: -.005em; color: var(--ink); }
.st-title-sep { color: var(--stone); }
.st-logo { width: 9px; height: 9px; border-radius: 50%; background: var(--cobalt); box-shadow: 0 0 0 3px rgba(35, 64, 255, .14); }
.st-badge {
  margin-left: auto;
  font: 500 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap;
  color: var(--cobalt); background: var(--st-cobalt-tint);
  padding: 8px 12px; border-radius: var(--r-pill);
}
.st-badge::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 8px; vertical-align: 1px; }

/* ─────────────────────────────────────────────────────────────── tabs */
.st-tabbar { padding: 16px 22px 0; }
.st-tabs {
  position: relative; display: inline-flex; gap: 2px; max-width: 100%;
  padding: 4px; border-radius: var(--r-pill); background: var(--paper-2);
  overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
}
.st-tabs::-webkit-scrollbar { display: none; }
.st-tab {
  position: relative; z-index: 1; flex: none;
  display: inline-flex; align-items: baseline; gap: 9px;
  min-height: 44px; padding: 13px 20px 12px;
  border: 0; border-radius: var(--r-pill); background: transparent; cursor: pointer;
  font: 600 15px/1 var(--display); letter-spacing: -.005em; color: var(--ink-2); white-space: nowrap;
  transition: color .2s var(--ease-swift);
}
.st-tab:hover { color: var(--ink); }
.st-tab[aria-selected="true"] { color: var(--ink); }
.st-tab:focus-visible { outline-offset: -2px; }
.st-tab-n { font: 500 10.5px/1 var(--mono); letter-spacing: .08em; color: var(--st-muted); transition: color .2s; }
.st-tab[aria-selected="true"] .st-tab-n { color: var(--cobalt); }
.st-ink {
  position: absolute; left: 0; top: 4px; bottom: 4px; width: 0;
  border-radius: var(--r-pill); background: var(--st-tile);
  box-shadow: 0 1px 2px rgba(18, 19, 24, .08), 0 6px 18px -8px rgba(18, 19, 24, .28);
  transition: transform .42s var(--ease-swift), width .42s var(--ease-swift);
}

/* ─────────────────────────────────────────────────────────────── panel + story */
.st-panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; padding: 26px 16px 20px; }
.st-story { min-width: 0; }
.st-eyebrow { font: 500 10.5px/1.5 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--cobalt); margin-bottom: 12px; }
.st-h { font: 850 30px/1.02 var(--display); letter-spacing: -.035em; margin-bottom: 14px; text-wrap: balance; }
.st-copy { font-size: 16px; line-height: 1.55; color: var(--ink-2); max-width: 46ch; margin-bottom: 16px; }
.st-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.st-tags li {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px 7px 10px; border-radius: var(--r-pill);
  background: var(--st-tile); border: 1px solid var(--st-hair);
  font: 600 13px/1 var(--display); color: var(--ink);
}
.st-tags i { width: 8px; height: 8px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(59, 46, 46, .2); }
.st-try { margin-top: 22px; font: italic 400 16px/1.4 var(--human); color: var(--ink-2); }
/* the arrow is set in Roboto Flex (already loaded): upright Fraunces here was the site's only use of that face (121 KB) */
.st-try span { color: var(--cobalt); font: 500 1em/1 var(--display); margin-right: 4px; }

@container st (min-width: 1000px) {
  .st-panel { grid-template-columns: 280px minmax(0, 1fr); gap: 44px; padding: 36px 32px 34px 38px; }
  .st-story { padding-top: 10px; position: sticky; top: 24px; align-self: start; }
  .st-h { font-size: 38px; }
}
@container st (min-width: 1160px) {
  .st-panel { grid-template-columns: 300px minmax(0, 1fr); gap: 56px; }
}
@container st (min-width: 620px) and (max-width: 999.98px) {
  .st-panel { padding: 32px 26px 28px; }
  .st-story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); column-gap: 32px; align-items: start; }
  .st-eyebrow, .st-h { grid-column: 1; }
  .st-copy, .st-tags, .st-try { grid-column: 2; }
  .st-copy { grid-row: 1 / span 2; }
  .st-h { font-size: 34px; }
}

/* ─────────────────────────────────────────────────────────────── shared mock parts */
.st-work { container: work / inline-size; min-width: 0; display: grid; gap: 14px; align-content: start; }
.st-block { min-width: 0; background: var(--st-well); border: 1px solid var(--st-hair); border-radius: 20px; padding: 16px; }
.st-bh { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 14px; }
.st-label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font: 500 10.5px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.st-ex {
  font: 500 9px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--st-muted);
  border: 1px dashed var(--stone); border-radius: var(--r-pill); padding: 5px 8px 4px; white-space: nowrap;
}
.st-meta { font: 500 10.5px/1 var(--mono); letter-spacing: .06em; color: var(--st-muted); }
.st-link {
  border: 0; background: none; padding: 6px 2px; cursor: pointer;
  font: 600 14px/1.2 var(--display); color: var(--cobalt); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.st-link:hover { color: var(--cobalt-ink); }

/* ─────────────────────────────────────────────────────────────── 01 characters & growth */
.st-grid-cast { display: grid; gap: 14px; grid-template-areas: "who" "mode" "path"; }
.st-block-who { grid-area: who; }
.st-block-mode { grid-area: mode; display: flex; flex-direction: column; }
.st-block-path { grid-area: path; }
@container work (min-width: 700px) {
  .st-grid-cast { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); grid-template-areas: "who mode" "path path"; }
}

.st-block-who { display: flex; flex-direction: column; }
.st-cast { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@container work (min-width: 520px) and (max-width: 699.98px) { .st-cast { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.st-cast-tile {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-width: 0; padding: 8px 6px 10px; border-radius: 16px;
  background: var(--st-tile); border: 1px solid var(--st-hair); cursor: pointer; text-align: center;
  transition: background-color .25s var(--ease-swift), border-color .25s, box-shadow .25s;
}
.st-cast-tile[data-kind]:hover { box-shadow: var(--shadow-1); }
.st-cast-tile[aria-pressed="true"] { background: var(--tint); border-color: color-mix(in srgb, var(--acc) 55%, transparent); }
.st-cast-tile .st-cv { transition: opacity .3s, filter .3s; }
.st-cast-tile[aria-pressed="false"] .st-cv { opacity: .5; filter: grayscale(.8); }
.st-cast-name { font: 700 14.5px/1.1 var(--display); letter-spacing: -.01em; }
.st-cast-tile[aria-pressed="false"] .st-cast-name { color: var(--st-muted); }
.st-cast-state { font: 500 9px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.st-cast-state .st-on { color: var(--mint-ink); }
.st-tick-badge {
  position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--mint); color: var(--ink); box-shadow: 0 0 0 2px var(--st-tile);
  transition: background-color .2s, box-shadow .2s;
}
.st-tick-badge svg { width: 12px; height: 12px; }
.st-cast-tile[aria-pressed="false"] .st-tick-badge { background: transparent; box-shadow: inset 0 0 0 1.5px var(--stone); }
.st-cast-tile[aria-pressed="false"] .st-tick-badge svg { opacity: 0; }
.st-cast-state .st-off { display: none; color: var(--st-muted); }
.st-cast-tile[aria-pressed="false"] .st-on { display: none; }
.st-cast-tile[aria-pressed="false"] .st-off { display: inline; }
.st-idea { cursor: default; background: transparent; border: 1.5px dashed var(--stone); justify-content: center; gap: 6px; padding: 12px 8px; }
.st-idea-mark {
  display: grid; place-items: center; width: 54px; height: 54px; margin: 6px 0 4px; border-radius: 50%;
  border: 1.5px dashed var(--cobalt); color: var(--cobalt); background: var(--st-tile);
  font: 300 34px/1 var(--display);
}
.st-idea-mark span { transform: translateY(-2px); }
.st-idea .st-cast-name { font: italic 500 17px/1.1 var(--human); letter-spacing: 0; }
.st-idea-sub { font-size: 11.5px; line-height: 1.3; color: var(--st-muted); max-width: 13ch; }

.st-seg { display: inline-flex; padding: 3px; border-radius: var(--r-pill); background: var(--paper-2); }
.st-seg button {
  min-height: 38px; padding: 0 16px; border: 0; border-radius: var(--r-pill); background: transparent; cursor: pointer;
  font: 600 13.5px/1 var(--display); color: var(--ink-2); transition: background-color .2s, color .2s, box-shadow .2s;
}
.st-seg button[aria-pressed="true"] { background: var(--st-tile); color: var(--ink); box-shadow: 0 1px 2px rgba(18, 19, 24, .1), 0 4px 10px -6px rgba(18, 19, 24, .3); }
.st-mode-view { flex: 1; display: flex; flex-direction: column; justify-content: center; min-height: 150px; }
.st-fixed { flex: 1; display: grid; gap: 8px; align-content: center; }
@container work (min-width: 700px) { .st-fixed { grid-auto-rows: minmax(64px, 88px); } }
.st-fixed li {
  display: grid; grid-template-columns: 40px 26px 44px minmax(0, 1fr); align-items: center; gap: 10px;
  padding: 9px 14px 9px 12px; border-radius: 16px; background: var(--st-tile); border: 1px solid var(--st-hair);
}
.st-fixed .st-egg-cv { width: 40px; }
.st-fixed .st-mini-ava { width: 44px; }
.st-arrow { position: relative; height: 2px; background: repeating-linear-gradient(90deg, var(--stone) 0 4px, transparent 4px 7px); }
.st-arrow::after { content: ""; position: absolute; right: -1px; top: -4px; width: 8px; height: 8px; border: solid var(--stone); border-width: 2px 2px 0 0; transform: rotate(45deg); }
.st-fixed-t { display: flex; flex-direction: column; min-width: 0; }
.st-fixed-t small { font: 500 9.5px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--st-muted); }
.st-fixed-t b { font: 650 14.5px/1.25 var(--display); }
@container work (max-width: 420px) {
  .st-fixed li { grid-template-columns: 36px 16px 40px minmax(0, 1fr); gap: 8px; padding: 8px 12px 8px 10px; }
  .st-fixed .st-egg-cv { width: 36px; }
  .st-fixed .st-mini-ava { width: 40px; }
}
.st-surprise { display: flex; align-items: center; gap: 18px; padding: 4px 6px; }
.st-mystery { position: relative; flex: none; width: 88px; }
.st-mystery span {
  position: absolute; left: 0; right: 0; top: 46%; text-align: center; pointer-events: none;
  font: 900 40px/1 var(--display); color: #FFFFFF; letter-spacing: -.02em; text-shadow: 0 2px 10px rgba(11, 13, 20, .25);
}
.st-pool small { display: block; font: 500 9.5px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--st-muted); margin-bottom: 8px; }
.st-pool ul { display: flex; flex-wrap: wrap; gap: 10px; }
.st-pool li { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.st-pool li span { font: 600 12px/1 var(--display); color: var(--ink-2); }
.st-pool .st-cv { width: 46px; }
.st-mode-note { margin-top: 12px; font: italic 400 14.5px/1.4 var(--human); color: var(--ink-2); }

.st-picks { display: flex; gap: 6px; }
.st-pick {
  width: 40px; height: 40px; padding: 4px; border-radius: 50%; border: 0; background: transparent; cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--st-hair); transition: box-shadow .2s;
}
.st-pick .st-cv { width: 32px; }
.st-pick[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--cobalt); }

/* the growth path: three cards standing on one red thread */
.st-path { position: relative; display: grid; gap: 10px; --tint: var(--chii-tint); --floor: 140px; }
.st-path::before { content: none; }
.st-stage-art::after { /* narrow: each pal stands on its own piece of the red thread */
  content: ""; position: absolute; z-index: 1; left: 0; right: 0; bottom: 7px; border-top: 2px solid var(--thread);
}
.st-stage {
  position: relative; display: grid; grid-template-columns: 128px minmax(0, 1fr); align-items: stretch; align-content: start;
  border-radius: 18px; background: var(--st-tile); border: 1px solid var(--st-hair); overflow: hidden;
}
.st-stage-art { position: relative; display: grid; place-items: end center; background: var(--tint); transition: background-color .35s; }
.st-stage-art .st-cv { position: relative; z-index: 2; width: 128px; }
.st-stage-meta { padding: 12px 14px 12px; min-width: 0; }
.st-stage-name { font: 750 17px/1.1 var(--display); letter-spacing: -.015em; }
.st-stage-name span { display: block; margin-top: 4px; font: 500 9px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--st-muted); }
.st-stage-pts { margin-top: 8px; font: 600 14px/1 var(--display); color: var(--st-muted); }
.st-stage-pts b { font: 900 34px/1 var(--display); letter-spacing: -.035em; color: var(--ink); font-variant-numeric: tabular-nums; margin-right: 2px; }
.st-stage-eq { font: 500 10px/1.3 var(--mono); letter-spacing: .04em; color: var(--st-muted); }
.st-outfit { margin-top: 8px; font: italic 400 14px/1.35 var(--human); color: var(--ink-2); }
.st-path-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 12px; font-size: 13px; color: var(--st-muted); }
@container work (min-width: 600px) {
  .st-path { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .st-path::before { /* wide: one straight thread at the pals' feet, through every card */
    content: ""; position: absolute; z-index: 1; left: -16px; right: -16px; top: var(--floor); height: 0;
    border-top: 2px solid var(--thread);
  }
  .st-stage-art::after { content: none; }
  .st-stage { grid-template-columns: minmax(0, 1fr); }
  .st-stage-art { height: 150px; }
  .st-stage-art .st-cv { width: 176px; }
  .st-stage-meta { padding: 14px 16px 16px; }
}
.st-path.st-swap .st-stage-art .st-cv { animation: st-fade .38s var(--ease-swift) both; }

/* example sliders */
.st-range {
  --p: .5;
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 30px; margin: 4px 0 2px;
  background: transparent; cursor: pointer;
}
.st-range:focus-visible { outline-offset: 0; border-radius: 8px; }
.st-range::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--cobalt) calc(var(--p) * 100%), #E2DDD2 0); }
.st-range::-moz-range-track { height: 6px; border-radius: 999px; background: #E2DDD2; }
.st-range::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--cobalt); }
.st-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%;
  background: var(--st-tile); border: 2px solid var(--cobalt); box-shadow: 0 2px 6px rgba(18, 19, 24, .22);
  transition: box-shadow .2s;
}
.st-range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--st-tile); border: 2px solid var(--cobalt); box-shadow: 0 2px 6px rgba(18, 19, 24, .22); }
.st-range:active::-webkit-slider-thumb { box-shadow: 0 0 0 6px rgba(35, 64, 255, .16), 0 2px 6px rgba(18, 19, 24, .22); }
/* phones and touch screens: 44 px hit areas for the example controls (track and pill keep their look) */
@media (max-width: 599.98px), (pointer: coarse) {
  .st-seg button { min-height: 44px; }
  .st-range { height: 44px; margin: 0; }
  .st-range::-webkit-slider-thumb { width: 28px; height: 28px; margin-top: -11px; }
  .st-range::-moz-range-thumb { width: 28px; height: 28px; }
}

/* ─────────────────────────────────────────────────────────────── 02 lessons → quests */
.st-flow { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.st-files .st-bh { margin-bottom: 12px; }
.st-file-list { display: grid; gap: 8px; }
@container work (min-width: 560px) and (max-width: 759.98px) {
  .st-file-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .st-file { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }
}
.st-file { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--st-tile); border: 1px solid var(--st-hair); }
.st-file-ico { flex: none; }
.st-file b { display: block; font: 650 14px/1.25 var(--display); letter-spacing: -.005em; }
.st-file small { display: block; margin-top: 3px; font: 500 9.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--st-muted); }
.st-ai { position: relative; display: grid; place-items: center; min-height: 76px; }
.st-ai::before { /* the red thread from the materials to the draft */
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 2px solid var(--thread);
}
.st-ai-chip {
  position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 10px 15px; border-radius: var(--r-pill);
  background: var(--cobalt); color: #fff; font: 650 13.5px/1 var(--display); white-space: nowrap;
  box-shadow: 0 6px 18px -8px rgba(35, 64, 255, .7);
}
.st-spark { flex: none; }
@container work (min-width: 760px) {
  .st-flow { grid-template-columns: minmax(0, 250px) 124px minmax(0, 1fr); align-items: center; }
  .st-ai { min-height: 0; height: 100%; }
  .st-ai::before { left: -1px; right: -1px; top: 50%; bottom: auto; border-left: 0; border-top: 2px solid var(--thread); }
  .st-ai-chip { flex-direction: column; gap: 6px; padding: 12px 10px; border-radius: 16px; white-space: normal; text-align: center; line-height: 1.15; max-width: 108px; }
}

.st-draft { background: var(--st-tile); box-shadow: var(--shadow-1); padding: 18px 18px 16px; }
.st-draft-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 14px; }
.st-qtype { font: 700 10px/1 var(--mono); letter-spacing: .1em; color: #fff; background: var(--ink); padding: 5px 8px 4px; border-radius: 6px; }
.st-status {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: var(--r-pill);
  font: 500 9.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  background: var(--usagi-tint); color: var(--st-yellow-ink);
}
.st-status svg { width: 11px; height: 11px; }
.st-draft[data-draft="review"] .st-status { background: var(--st-cobalt-tint); color: var(--cobalt); }
.st-draft[data-draft="added"] .st-status { background: #DDF4EA; color: var(--mint-ink); }
.st-q-n { font: 500 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--st-muted); margin-bottom: 8px; }
.st-q-text { font: 650 19px/1.32 var(--display); letter-spacing: -.012em; margin-bottom: 14px; text-wrap: pretty; }
.st-q-text span { border-radius: 6px; transition: background-color .25s, outline-color .25s; outline: 1.5px dashed transparent; outline-offset: 4px; }
.st-choices { display: grid; gap: 6px; }
.st-choices li {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px 9px 9px; border-radius: 12px;
  background: var(--paper); border: 1px solid transparent; font: 550 15px/1.3 var(--display);
  transition: outline-color .25s;
  outline: 1.5px dashed transparent; outline-offset: 2px;
}
.st-letter { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--st-tile); border: 1px solid var(--st-hair); font: 600 10.5px/1 var(--mono); color: var(--ink-2); }
.st-choices .st-right { background: #E6F6EF; border-color: rgba(31, 122, 90, .28); }
.st-choices .st-right .st-letter { background: var(--mint); border-color: transparent; color: var(--ink); }
.st-choices em { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font: 500 9px/1 var(--mono); font-style: normal; letter-spacing: .1em; text-transform: uppercase; color: var(--mint-ink); white-space: nowrap; }
.st-why { margin-top: 12px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.st-why b { font: 500 9.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--st-muted); margin-right: 6px; }
.st-review-note { margin-top: 10px; font: italic 400 15px/1.4 var(--human); color: var(--cobalt); }
.st-draft[data-draft="review"] .st-q-text span { background: var(--st-cobalt-tint); outline-color: var(--cobalt); }
.st-draft[data-draft="review"] .st-choices li { outline-color: rgba(35, 64, 255, .45); }
.st-caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 3px; vertical-align: -.15em; background: var(--cobalt); animation: st-blink 1.05s steps(1) infinite; }
.st-draft-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--st-hair); }
.st-dots { display: flex; gap: 4px; }
.st-dot { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.st-dot span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font: 600 10.5px/1 var(--mono); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--st-hair); transition: background-color .2s, color .2s; }
.st-dot[aria-pressed="true"] span { background: var(--ink); color: #fff; box-shadow: none; }
.st-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@container work (max-width: 480px) {
  .st-actions { width: 100%; }
  .st-actions .st-btn { flex: 1 1 auto; justify-content: center; }
}
.st-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: var(--r-pill);
  background: var(--st-tile); border: 1px solid var(--line); cursor: pointer; white-space: nowrap;
  font: 650 14px/1 var(--display); transition: background-color .2s, border-color .2s, box-shadow .2s;
}
.st-btn:hover { border-color: rgba(18, 19, 24, .28); }
.st-btn[aria-pressed="true"] { background: var(--st-cobalt-tint); border-color: rgba(35, 64, 255, .4); color: var(--cobalt); }
.st-btn-primary { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.st-btn-primary:hover { background: var(--cobalt-ink); border-color: var(--cobalt-ink); }
.st-added { margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: #EEF8F3; border: 1px solid rgba(31, 122, 90, .2); animation: st-fade .35s var(--ease-swift) both; }
.st-added-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 15px; }
.st-stamp { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: var(--r-pill); background: var(--mint); font: 600 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.st-added-copy { margin: 8px 0 4px; font-size: 14px; color: var(--ink-2); }

.st-rule-list { display: grid; gap: 8px; }
@container work (min-width: 620px) { .st-rule-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; } }
.st-rule {
  position: relative; padding: 16px 16px 14px; border-radius: 16px; background: var(--st-tile);
  border: 1px solid var(--st-hair); transition: border-color .3s, box-shadow .3s;
}
.st-rule::before { content: ""; position: absolute; left: 16px; top: 0; width: 28px; height: 4px; border-radius: 0 0 4px 4px; background: var(--usagi); }
.st-rule-quiz::before { background: var(--chii); }
.st-rule-test::before { background: var(--hachi); }
.st-rule-type { font: 800 19px/1.1 var(--display); letter-spacing: -.02em; margin-bottom: 10px; }
.st-rule ul li { padding: 7px 0; border-top: 1px dashed var(--st-hair); font: 500 11.5px/1.45 var(--mono); color: var(--ink); }
.st-rule-extra { margin-top: 4px; font-size: 13px; color: var(--st-muted); }
.st-rule-demo { margin-top: 8px; font: italic 400 13.5px/1.35 var(--human); color: var(--ink-2); }
.st-rule-hot { border-color: var(--cobalt); box-shadow: 0 0 0 3px rgba(35, 64, 255, .12); }
.st-rule-hot .st-rule-type::after { content: "This quest"; margin-left: 8px; vertical-align: 3px; font: 500 9px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #fff; background: var(--cobalt); padding: 4px 7px 3px; border-radius: var(--r-pill); }

/* ─────────────────────────────────────────────────────────────── 03 class & matches */
.st-bh-roster { align-items: flex-end; }
.st-goal { display: grid; gap: 6px; min-width: 190px; }
.st-goal-t { font: 500 10.5px/1.2 var(--mono); letter-spacing: .04em; color: var(--st-muted); }
.st-goal-t b { font: 650 13px/1 var(--display); letter-spacing: -.005em; color: var(--ink); margin-right: 6px; }
.st-goal-bar { position: relative; display: block; height: 8px; border-radius: 999px; background: #E6E1D6; overflow: hidden; }
.st-goal-bar span { position: absolute; inset: 0; border-radius: inherit; background: var(--cobalt); transform-origin: left; transform: scaleX(0); transition: transform 1s var(--ease-swift) .15s; }
.st-shown .st-goal-bar span { transform: scaleX(var(--f)); }
.st-cols { display: none; }
.st-rows { display: grid; gap: 6px; }
.st-row {
  --acc: var(--chii);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who pts" "prog score" "stk stk";
  align-items: center; gap: 8px 14px; width: 100%; padding: 8px 14px 10px 8px; border-radius: 16px; cursor: pointer; text-align: left;
  background: var(--st-tile); border: 1px solid var(--st-hair); transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.st-row:hover { box-shadow: var(--shadow-1); }
.st-row[aria-pressed="true"] { border-color: var(--cobalt); box-shadow: 0 0 0 2px rgba(35, 64, 255, .12); }
.st-rrow:nth-child(1) .st-row, .st-rrow:nth-child(2) .st-row { --acc: var(--hachi); }
.st-rrow:nth-child(3) .st-row, .st-rrow:nth-child(5) .st-row { --acc: var(--usagi); }
.st-rrow:nth-child(4) .st-row { --acc: var(--chii); }
.st-who { grid-area: who; display: flex; align-items: center; gap: 10px; min-width: 0; }
.st-who .st-ava { width: 46px; flex: none; }
.st-who-t { display: flex; flex-direction: column; min-width: 0; }
.st-who-t b { font: 700 15.5px/1.15 var(--display); letter-spacing: -.01em; }
.st-who-t small { font-size: 12.5px; color: var(--st-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-prog { grid-area: prog; display: grid; gap: 5px; min-width: 0; padding-left: 4px; }
.st-prog small { font: 500 10px/1.2 var(--mono); letter-spacing: .03em; color: var(--st-muted); }
.st-bar { position: relative; display: block; height: 8px; border-radius: 999px; background: #EDE8DE; }
.st-bar-fill { position: absolute; inset: 0; border-radius: inherit; background: var(--acc); transform-origin: left; transform: scaleX(0); box-shadow: inset 0 0 0 1px rgba(59, 46, 46, .12);
  transition: transform .9s var(--ease-swift) calc(.2s + var(--i, 0) * 70ms); }
.st-shown .st-bar-fill { transform: scaleX(var(--f)); }
.st-tick { position: absolute; top: -3px; left: calc(var(--x) * 100%); width: 2px; height: 14px; margin-left: -1px; border-radius: 2px; background: rgba(18, 19, 24, .16); }
.st-tick-on { background: var(--ink); }
.st-pts, .st-score { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.st-pts { grid-area: pts; }
.st-score { grid-area: score; }
.st-pts b, .st-score b { font: 800 18px/1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.st-score b { font-size: 15px; color: var(--ink-2); }
.st-pts small, .st-score small { margin-top: 3px; font: 500 9px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--st-muted); }
.st-sticker { grid-area: stk; display: none; justify-self: start; max-width: 100%; }
.st-sticker-on {
  display: inline-block; padding: 5px 11px 6px; border-radius: 12px 12px 12px 4px;
  background: var(--usagi-tint); border: 1px solid rgba(201, 151, 31, .35);
  font: italic 500 13.5px/1.25 var(--human); color: var(--ink);
}
.st-sticker.st-pop { animation: st-pop .5s var(--ease-back) both; }
@container work (min-width: 640px) {
  .st-cols, .st-row { grid-template-columns: minmax(196px, 1.45fr) minmax(110px, 1.3fr) 52px 48px minmax(110px, 1fr); grid-template-areas: "who prog pts score stk"; }
  .st-cols { display: grid; gap: 14px; padding: 0 14px 8px 8px; font: 500 9.5px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--st-muted); }
  .st-cols span:nth-child(3), .st-cols span:nth-child(4), .st-cols span:nth-child(5) { text-align: right; }
  .st-row { padding: 7px 14px 7px 8px; }
  .st-sticker { justify-self: end; }
}

.st-duo { display: grid; gap: 14px; }
@container work (min-width: 700px) { .st-duo { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); } }
.st-cup { position: relative; overflow: hidden; display: flex; flex-direction: column; background: var(--ink); color: var(--paper); border-color: transparent; padding: 18px 18px 16px; }
.st-cup .st-vs { flex: 1; display: grid; align-content: center; width: 100%; }
.st-cup-eyebrow { display: flex; align-items: center; gap: 8px; font: 500 10px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--usagi); }
.st-cup-title { margin-top: 8px; font: 850 26px/1 var(--display); letter-spacing: -.03em; color: #fff; }
.st-vs { position: relative; margin: 6px auto 0; max-width: 300px; }
.st-vs .st-cv { margin: 0 auto; }
.st-vs-mark {
  position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%);
  font: 950 italic 34px/1 var(--display); font-stretch: 80%; letter-spacing: -.04em; color: var(--usagi);
}
.st-vs-names { display: flex; justify-content: space-around; width: 100%; max-width: 300px; margin: 2px auto 12px; font: 500 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: rgba(244, 241, 234, .7); }
.st-cup-facts { display: grid; gap: 0; border-top: 1px solid rgba(244, 241, 234, .14); }
.st-cup-facts li { padding: 8px 0; border-bottom: 1px solid rgba(244, 241, 234, .1); font-size: 14px; color: rgba(244, 241, 234, .72); }
.st-cup-facts li:last-child { border-bottom: 0; padding-bottom: 0; }
.st-cup-facts b { color: #fff; font-weight: 650; }
.st-fb { display: flex; flex-direction: column; }
.st-fb-who { margin-bottom: 12px; }
.st-fb-who small { display: block; font: italic 400 14px/1.2 var(--human); color: var(--st-muted); }
.st-fb-who b { font: 750 19px/1.15 var(--display); letter-spacing: -.015em; }
.st-fb-preview {
  display: flex; align-items: flex-end; gap: 4px; margin-top: 14px; padding: 10px 14px 8px 6px;
  border-radius: 16px; background: var(--st-tile); border: 1px solid var(--st-hair);
}
.st-fb-preview .st-cv { flex: none; width: 96px; }
.st-fb-bubble {
  position: relative; align-self: center; margin-bottom: 18px; padding: 8px 14px 10px; border-radius: 16px 16px 16px 4px;
  background: var(--usagi-tint); border: 1px solid rgba(201, 151, 31, .35);
}
.st-fb-bubble small { display: block; margin-bottom: 3px; font: 500 9px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--st-yellow-ink); }
.st-fb-bubble span { font: italic 500 16px/1.25 var(--human); color: var(--ink); }
.st-fb-bubble.st-fb-empty { background: transparent; border-style: dashed; border-color: var(--stone); }
.st-fb-bubble.st-fb-empty small, .st-fb-bubble.st-fb-empty span { color: var(--st-muted); }
.st-fb-bubble.st-pop { animation: st-pop .5s var(--ease-back) both; }
.st-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.st-chipbtn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: var(--r-pill);
  background: var(--st-tile); border: 1px solid var(--line); cursor: pointer; font: 600 14px/1 var(--display);
  transition: background-color .2s, border-color .2s;
}
.st-chipbtn:hover { border-color: rgba(18, 19, 24, .28); }
.st-chipbtn[aria-pressed="true"] { background: var(--usagi-tint); border-color: rgba(201, 151, 31, .55); }
.st-chipbtn[aria-pressed="true"]::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--st-yellow-ink); }
.st-fb-note { margin-top: 12px; font-size: 13px; line-height: 1.45; color: var(--st-muted); }
.st-fb .st-chips { margin-bottom: auto; }

/* ─────────────────────────────────────────────────────────────── foot + motion */
.st-foot { max-width: 72ch; margin: 16px auto 0; padding: 0 8px; text-align: center; font-size: 13.5px; line-height: 1.5; color: var(--st-muted); }

@container st (max-width: 619.98px) {
  .st-window { border-radius: 22px; }
  .st-titlebar { padding: 12px 14px; }
  .st-badge { margin-left: 0; }
  .st-tabbar { padding: 12px 12px 0; }
  .st-tabs { display: flex; width: 100%; scroll-snap-type: x proximity; }
  .st-tab { scroll-snap-align: start; padding: 13px 15px 12px; font-size: 14.5px; }
}

.st-panel.st-in .st-story { animation: st-rise .5s var(--ease-swift) both; }
.st-panel.st-in .st-rv { animation: st-rise .55s var(--ease-swift) both; animation-delay: calc(60ms + var(--i, 0) * 55ms); }
.st-cast-tile.st-hop .st-cv { animation: st-hop .5s var(--ease-swift); }
.st-cast-tile.st-nope { animation: st-nope .4s var(--ease-swift); }
@keyframes st-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes st-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes st-hop { 0% { transform: none; } 40% { transform: translateY(-10px); } 70% { transform: translateY(1px); } 100% { transform: none; } }
@keyframes st-nope { 0%, 100% { transform: none; } 25% { transform: translateX(-5px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }
@keyframes st-pop { from { opacity: 0; transform: translateY(6px) rotate(-3deg); } to { opacity: 1; transform: none; } }
@keyframes st-blink { 50% { opacity: 0; } }

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