.st-lead { margin: 0 0 14px; max-width: 760px; }
.st-build { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
@container (max-width: 760px) { .st-build { grid-template-columns: minmax(0, 1fr); } }
.st-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.st-sec { gap: 12px; }
.st-sec h2 { font-size: 1.2rem; }
.st-room { font-weight: 700; color: var(--muted); font-size: .92rem; }

.st-have { font-size: .8rem; font-weight: 700; color: var(--ess, #17825a); }

.st-side { min-width: 0; align-self: stretch; }   /* as tall as the page beside it, so the card can stay in view */
.st-stick { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; }   /* the small board stays in view as the page scrolls (8 Nov) */
@container (max-width: 760px) { .st-stick { position: static; max-height: none; overflow: visible; } }
.st-stick .spread h2 { margin: 0; }

.st-x { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 1rem; line-height: 1; cursor: pointer; }
.st-x:hover { background: #fde0dc; color: #c0392b; }

/* ---------- The starter on the board ---------- */
/* Use the page colour selected in the reading settings on the projector, too. */
.bg-play.st-play {
  --bg: inherit; --card: inherit; --ink: inherit; --muted: inherit; --line: var(--rule);
}
.st-play .bg-top { flex-wrap: nowrap; }
.st-clock { flex: none; display: flex; align-items: center; gap: calc(6 * var(--u)); }
/* Play (or pause) and start again: small, one above the other beside the time (9 Nov 2026, teacher) */
.st-ctl { display: flex; flex-direction: column; gap: calc(4 * var(--u)); }
.st-ctl button { display: grid; place-items: center; width: calc(34 * var(--u)); height: calc(21 * var(--u)); min-width: 28px; min-height: 19px; padding: 0; border-radius: calc(7 * var(--u));
  border: 1.5px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.st-ctl button:hover { border-color: var(--ink); }
.st-ctl button[hidden] { display: none; }
.st-ctl svg { width: calc(13 * var(--u)); height: calc(13 * var(--u)); min-width: 11px; min-height: 11px; }
.st-time { font: inherit; font-family: var(--display); font-weight: 800; font-size: calc(30 * var(--u)); font-variant-numeric: tabular-nums; line-height: 1; min-width: 3.4em; text-align: center;
  padding: calc(6 * var(--u)) calc(14 * var(--u)); border-radius: calc(12 * var(--u)); border: 2px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.st-clock.run .st-time { border-color: var(--web); }
.st-clock.low .st-time { border-color: #d6402f; color: #d6402f; animation: bg-pulse 1s ease infinite; }
.st-clock.up .st-time { background: #c0392b; border-color: #c0392b; color: #fff; animation: st-flash 1s ease 3; }
@keyframes st-flash { 50% { transform: scale(1.08); } }
.st-play .bg-tool kbd { font-size: .78em; }

.st-board { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: calc(12 * var(--u)); }
.st-panel {
  position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: calc(8 * var(--u)); padding: calc(12 * var(--u)) calc(18 * var(--u)) calc(14 * var(--u));
  border-radius: calc(18 * var(--u)); background: var(--bg); border: calc(3 * var(--u)) solid var(--line);
  overflow: hidden; transition: border-color .25s; }

.st-panel.shown, .st-panel.shown:hover { border-color: #23a05c; }
.st-ph { flex: none; display: flex; align-items: center; gap: calc(10 * var(--u)); min-width: 0; }

.st-k { flex: 1; min-width: 0; font-weight: 700; color: var(--ink); font-size: calc(18 * var(--u)); line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.st-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; font-size: 20px; }
.st-in { margin: auto 0; width: 100%; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .35em; overflow-wrap: normal; word-break: normal; }

/* Match-up */
.st-match { position: relative; width: 100%; display: grid; grid-template-columns: minmax(0, .8fr) minmax(1.6em, .14fr) minmax(0, 2fr); align-items: stretch; text-align: left; }
.st-ml, .st-mr { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; justify-content: space-between; gap: .32em; position: relative; z-index: 1; }
.st-ml { grid-column: 1; } .st-mr { grid-column: 3; }
.st-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 0; }
.st-match li { display: flex; align-items: center; gap: .45em; padding: .28em .5em; border-radius: .45em; border: .1em solid var(--line); background: var(--card); cursor: pointer; line-height: 1.22; transition: border-color .2s, background .2s; }
.st-match li:hover { border-color: var(--muted); }
.st-mk { flex: none; display: grid; place-items: center; min-width: 1.5em; height: 1.5em; border-radius: .35em; background: color-mix(in srgb, var(--tint, #151935) 55%, #151935); color: #fff; font-family: var(--display); font-weight: 800; font-size: .85em; }
.st-mw { flex: 1; min-width: 0; font-family: var(--display); font-weight: 800; }
.st-md { flex: 1; min-width: 0; font-size: .74em; font-weight: 600; }
.st-mto { flex: none; visibility: hidden; font-family: var(--display); font-weight: 800; color: #fff; background: var(--pc); border-radius: .3em; padding: 0 .3em; }
.st-match li.on { border-color: var(--pc); box-shadow: inset 0 0 0 .06em var(--pc); }
.st-match li.on .st-mk { background: var(--pc); color: #fff; }
.st-match li.on .st-mto { visibility: visible; }

.st-nav { flex: none; display: inline-flex; gap: calc(4 * var(--u)); }
.st-nav button { width: calc(30 * var(--u)); height: calc(30 * var(--u)); display: grid; place-items: center; padding: 0 0 calc(2 * var(--u)); border-radius: 99px; border: 1.5px solid var(--line);
  background: transparent; color: var(--muted); font: inherit; font-weight: 800; font-size: calc(20 * var(--u)); line-height: 1; cursor: pointer; opacity: .75; transition: opacity .2s; }
.st-nav button:hover:not(:disabled), .st-nav button:focus-visible { opacity: 1; color: var(--ink); border-color: var(--ink); }
.st-nav button:disabled { opacity: .25; cursor: default; }

/* Match-up: choosing the words */
.mt-bar { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.mt-list { display: flex; flex-direction: column; gap: 6px; max-height: 70vh; overflow-y: auto; padding-right: 4px; }
.mt-w { display: flex; gap: 10px; align-items: flex-start; padding: 8px 12px; border-radius: 10px; border: 2px solid var(--line); background: var(--bg); cursor: pointer; }
.mt-w:hover { border-color: var(--muted); }
.mt-w.on { border-color: var(--ink); }
.mt-w input { margin-top: 4px; flex: none; width: 18px; height: 18px; accent-color: var(--ink); }
.mt-w small { font-size: .78rem; color: var(--muted); font-weight: 700; margin-left: 4px; }
.mt-w .note, .mt-picked .note { display: block; font-size: .88rem; }
.mt-picked { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mt-picked li { position: relative; display: flex; gap: 8px; align-items: flex-start; padding: 6px 28px 6px 8px; border-radius: 10px; background: var(--bg); border: 1.5px solid var(--line); font-size: .95rem; line-height: 1.3; }
.mt-picked li > span:nth-child(2) { min-width: 0; }
.mt-picked .st-mk { font-size: .8rem; margin-top: 1px; }
.mt-picked .mt-none { color: var(--muted); padding: 10px; border-style: dashed; }
.mt-link { font: inherit; font-size: .88rem; background: none; border: 0; padding: 0; color: var(--web); text-decoration: underline; cursor: pointer; }

.st-play { padding-bottom: calc(16 * var(--u)); }

.st-more { align-self: stretch; padding: 0 calc(10 * var(--u)); min-width: 44px; border-radius: calc(10 * var(--u)); border: 1.5px solid var(--line); background: var(--card); color: var(--ink);
  font: inherit; font-weight: 800; font-size: max(13px, calc(15 * var(--u))); cursor: pointer; white-space: nowrap; }
.st-more:hover { border-color: var(--ink); }


.st-panel.full { grid-column: 1 / -1; }
.st-sec h2 { margin: 0; font-family: var(--display); }
.st-sec .choice { display: flex; align-items: baseline; gap: .65em; }
.st-sec .choice input { accent-color: var(--ink); }
@media (max-width: 620px) {
  .st-play .bg-top { flex-wrap: wrap; }
  .st-match { grid-template-columns: minmax(0, 1fr) 1em minmax(0, 1.5fr); }
  .st-mw { overflow-wrap: anywhere; }
  .st-body { overflow: auto; }
}
