/* Clooit · teacher account pages, the signed-in teacher home, the class editor and the student class page.
   Builds on /shared/site.css (Ink, Paper, Graphite, Inter; Probe yellow only on Ink). */

/* ---------- small pieces ---------- */
.t-wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--gut); }
.t-narrow { max-width: 440px; margin: 0 auto; padding: 48px var(--gut) 72px; display: grid; gap: 22px; }
.t-narrow h1 { font-size: clamp(26px, 3vw, 32px); }
.t-sub { color: var(--muted); font-size: 15.5px; }
.t-field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.t-field input, .t-field select, .t-input { width: 100%; height: 46px; padding: 0 14px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: 400 16px var(--font); }
.t-field input:focus, .t-field select:focus, .t-input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px #e5e7eb; }
.t-field small { font-weight: 400; color: var(--muted); font-size: 13px; }
.t-pw { position: relative; } .t-pw input { padding-right: 70px; }
.t-pw button { position: absolute; right: 6px; top: 7px; height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: var(--surface-2); color: var(--ink-2); font: 500 13px var(--font); cursor: pointer; }
.t-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--ink-2); cursor: pointer; }
.t-check input { margin-top: 3px; width: 18px; height: 18px; accent-color: #121212; flex: none; }
.t-err { color: var(--bad); font-size: 14px; font-weight: 500; min-height: 1.2em; margin: 0; }
.t-ok { color: var(--good); font-size: 14px; font-weight: 500; }
.btn.wide { width: 100%; height: 48px; font-size: 16px; }
.t-link { all: unset; cursor: pointer; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; font-size: 14.5px; }
.t-link:focus-visible { outline: 3px solid var(--focus); border-radius: 4px; }
.t-or { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; color: var(--muted); font-size: 13px; }
.t-or::before, .t-or::after { content: ''; height: 1px; background: var(--line); }
.t-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: grid; gap: 14px; }
.t-note { font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.t-code { font: 700 15px var(--mono); letter-spacing: .12em; }
.t-pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font: 600 12.5px var(--font); background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.t-pill.live { background: #121212; color: #fff; } .t-pill.live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #ffc531; }
.t-seg { display: inline-grid; grid-auto-flow: column; background: var(--surface-2); border-radius: 11px; padding: 4px; gap: 4px; }
.t-seg button { border: 0; background: none; padding: 8px 14px; border-radius: 8px; font: 600 14px var(--font); color: var(--ink-2); cursor: pointer; }
.t-seg button[aria-selected="true"], .t-seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.t-recovery { background: #121212; color: #fff; border-radius: 14px; padding: 18px; display: grid; gap: 6px; }
.t-recovery span { color: #9ca3af; font-size: 13px; } .t-recovery b { font: 700 20px var(--mono); letter-spacing: .06em; color: #ffc531; word-break: break-all; }

/* sign-in buttons (no provider logos or scripts: plain links with the provider's name) */
.t-sso { display: grid; gap: 10px; }
.t-sso a { display: flex; align-items: center; justify-content: center; gap: 12px; height: 52px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); text-decoration: none; font: 600 16px var(--font); }
.t-sso a:hover { background: var(--surface-2); border-color: #9ca3af; }
.t-sso .mk { width: 22px; height: 22px; display: grid; place-items: center; }

/* ---------- the dialog ---------- */
.t-dlg-bg { position: fixed; inset: 0; z-index: 200; background: rgba(18, 18, 18, .5); display: grid; place-items: center; padding: 16px; }
.t-dlg { position: relative; width: min(600px, 100%); max-height: calc(100dvh - 32px); overflow: auto; background: var(--surface); color: var(--ink); border-radius: 18px; padding: 24px; display: grid; gap: 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, .3); }
.t-dlg.big { width: min(880px, 100%); }
.t-dlg h2 { font-size: 21px; padding-right: 40px; }
.t-dlg .x { position: absolute; right: 14px; top: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--ink-2); font-size: 18px; cursor: pointer; }
.t-dlg .acts { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; position: sticky; bottom: -24px; background: var(--surface); padding: 12px 0 0; margin-bottom: -4px; }
.t-dlg .sel { display: grid; grid-template-columns: 112px 1fr; gap: 14px; align-items: center; }
.t-dlg .sel img { width: 112px; aspect-ratio: 16/9; object-fit: cover; border-radius: 9px; }
.t-dlg .sel b { font-size: 17px; font-weight: 600; } .t-dlg .sel small { display: block; color: var(--muted); font-size: 13.5px; }

/* where a game goes: radio cards */
.t-where { display: grid; gap: 8px; }
.t-where > label { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.t-where > label:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.t-where input[type=radio] { width: 18px; height: 18px; accent-color: #121212; margin: 0; }
.t-where .lbl { font-weight: 600; font-size: 15px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.t-where .more { grid-column: 2; display: grid; gap: 10px; }
.t-where select, .t-where input[type=text], .t-where input[type=datetime-local] { height: 40px; border-radius: 9px; border: 1px solid var(--line-2); padding: 0 10px; font: 400 15px var(--font); background: var(--surface); color: var(--ink); max-width: 100%; }
.t-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .t-dates label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 500; }
@media (max-width: 520px) { .t-dates { grid-template-columns: 1fr; } }

/* question settings */
.t-qs { display: grid; gap: 14px; }
.t-qs .t-row { display: grid; gap: 8px; } .t-qs .t-row > b { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.t-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.t-chip { border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); border-radius: 999px; height: 34px; padding: 0 13px; font: 500 14px var(--font); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.t-chip:hover { border-color: #9ca3af; }
.t-chip[aria-pressed="true"] { background: #121212; border-color: #121212; color: #fff; }
.t-chip:disabled { opacity: .45; cursor: default; }
.t-chip b { font-weight: 700; }
.t-sum { display: flex; gap: 10px; align-items: center; justify-content: space-between; background: var(--surface-2); border-radius: 12px; padding: 12px 14px; font-size: 14.5px; }
.t-sum span { color: var(--ink-2); }

/* game picker grid */
.t-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.t-pk { position: relative; display: grid; gap: 6px; padding: 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; font: 500 13.5px var(--font); color: var(--ink); }
.t-pk img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; }
.t-pk span { padding: 0 4px 2px; line-height: 1.25; }
.t-pk:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.t-pk[aria-pressed="true"] { border-color: #121212; box-shadow: 0 0 0 2px #121212; }
.t-pk[aria-pressed="true"]::after { content: '✓'; position: absolute; right: 12px; top: 12px; width: 24px; height: 24px; border-radius: 50%; background: #121212; color: #fff; display: grid; place-items: center; font-size: 13px; }
.t-search { position: relative; }
.t-search svg { position: absolute; left: 16px; top: 50%; translate: 0 -50%; width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.t-search input { width: 100%; height: 52px; border-radius: 14px; border: 1px solid var(--line-2); padding: 0 16px 0 46px; font: 400 17px var(--font); background: var(--surface); color: var(--ink); }
.t-search input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px #e5e7eb; }
.t-search.sm input { height: 42px; font-size: 15px; border-radius: 11px; }

.t-toast { position: fixed; left: 50%; bottom: 22px; translate: -50% 0; z-index: 300; background: #121212; color: #fff; padding: 12px 18px; border-radius: 12px; font: 500 15px var(--font); box-shadow: 0 10px 30px rgba(0, 0, 0, .3); max-width: calc(100vw - 32px); }

/* ---------- the signed-in teacher home ---------- */
.h-home { display: grid; gap: 30px; padding: 0 0 64px; }
.h-top { display: grid; gap: 14px; }
.h-hello { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; }
.h-hello h1 { font-size: clamp(24px, 2.6vw, 30px); }
.h-sec { display: grid; gap: 14px; }
.h-sec > header { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.h-sec h2 { font-size: 19px; }
.h-classes { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.h-cls { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: grid; gap: 12px; align-content: start; }
.h-cls .hd { display: flex; justify-content: space-between; gap: 8px; align-items: start; }
.h-cls .hd a { color: var(--ink); text-decoration: none; font: 600 17px var(--font); } .h-cls .hd a:hover { text-decoration: underline; }
.h-cls .hd small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.h-cls .today { display: grid; grid-template-columns: 88px 1fr; gap: 12px; align-items: center; }
.h-cls .today img, .h-cls .today .ph { width: 88px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.h-cls .today b { font-weight: 600; font-size: 15px; } .h-cls .today small { display: block; color: var(--muted); font-size: 13px; }
.h-cls .acts { display: flex; gap: 8px; flex-wrap: wrap; } .h-cls .acts .btn { flex: 1; }
.h-new { border: 1px dashed var(--line-2); border-radius: 16px; padding: 16px; display: grid; gap: 10px; align-content: center; }
.h-new form { display: flex; gap: 8px; } .h-new input { flex: 1; min-width: 0; height: 42px; border-radius: 10px; border: 1px solid var(--line-2); padding: 0 12px; font: 400 15px var(--font); }
.h-rows { display: grid; gap: 8px; }
.h-row { display: grid; grid-template-columns: 96px 1fr auto; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.h-row img { width: 96px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; }
.h-row b { font-weight: 600; } .h-row small { display: block; color: var(--muted); font-size: 13px; }
.h-row .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 700px) { .h-row { grid-template-columns: 72px 1fr; } .h-row img { width: 72px; } .h-row .acts { grid-column: 1 / -1; justify-content: flex-start; } }
.h-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.h-game { display: grid; gap: 10px; align-content: start; }
.h-game img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 12px; }
.h-game b { font-weight: 600; font-size: 15.5px; display: block; } .h-game small { color: var(--muted); font-size: 13px; }
.h-game small.f-need { display: block; color: var(--ink-2); margin-top: 2px; }
.h-game .acts { display: flex; gap: 8px; } .h-game .acts .btn { flex: 1; }
.h-topic { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; font-size: 14.5px; color: var(--ink-2); }
.h-empty { color: var(--muted); font-size: 15px; padding: 18px; border: 1px dashed var(--line-2); border-radius: 14px; text-align: center; }
.h-live { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: #121212; color: #fff; border-radius: 14px; padding: 12px 16px; }
.h-live .btn { background: #ffc531; color: #121212; } .h-live .btn:hover { background: #e6ad1f; }
/* "Your question sets": cards for things that are planned, not built. Dashed like the "New class" box, and nothing
   in them can be pressed. */
.h-sets { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.h-soon { border: 1px dashed var(--line-2); border-radius: 16px; padding: 16px; display: grid; gap: 8px; align-content: start; }
.h-soon .hd { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.h-soon b { font-weight: 600; font-size: 16px; } .h-soon p { color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }

/* ---------- the three steps: what questions (teacher/choose.js), pick a game, how to run it ---------- */
.f-step { display: grid; gap: 14px; }
.f-step > h2 { font-size: 19px; display: flex; gap: 10px; align-items: center; }
.f-step > h2:focus { outline: none; } .f-step > h2:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 6px; }
.f-step > h2 .n { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--surface); display: inline-grid; place-items: center; font-size: 13px; font-weight: 600; flex: none; }
.f-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 640px) { .f-cards { grid-template-columns: 1fr; } }
.f-card { display: grid; gap: 4px; align-content: start; text-align: left; padding: 14px 18px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); cursor: pointer; font: 400 14.5px/1.45 var(--font); position: relative; }
.f-card b { font-size: 17px; font-weight: 600; padding-right: 28px; }
.f-card span { color: var(--ink-2); }
.f-card::after { content: ''; position: absolute; right: 18px; top: 20px; width: 9px; height: 9px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); rotate: 45deg; transition: rotate .15s; }
.f-card[aria-expanded="true"]::after { rotate: 225deg; top: 25px; }
.f-card:hover { border-color: #9ca3af; box-shadow: var(--shadow); }
.f-card[aria-expanded="true"], .f-card.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.f-card:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.f-panel { border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); padding: 16px 18px; display: grid; gap: 16px; }
.f-panel > p { color: var(--ink-2); font-size: 15px; }
.f-row { display: grid; gap: 8px; } .f-row > b { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.f-panel .t-chip { background: var(--surface); height: auto; min-height: 34px; padding: 6px 13px; text-align: left; }
.f-panel .t-chip[aria-pressed="true"] { background: #121212; color: #fff; }
.f-panel .t-chip small { font-size: 12px; color: var(--ink-2); }
.f-group { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.f-group h3 { font-size: 15.5px; font-weight: 600; }
.f-group .t-note { margin-top: -4px; }
.f-panel .t-note { color: var(--ink-2); }
.f-sets { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.f-set { display: grid; gap: 2px; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); cursor: pointer; font: 400 14px var(--font); }
.f-set b { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; } .f-set small { color: var(--muted); font-size: 13px; }
.f-set:hover { border-color: #9ca3af; }
.f-set[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.f-acts { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.f-none { color: var(--ink-2); font-size: 15px; }
.f-chosen { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-radius: 14px; padding: 12px 16px; background: var(--surface-2); border: 1px solid var(--line); }
.f-chosen small { display: block; font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.f-chosen b { font-weight: 600; font-size: 15.5px; }
.f-for { color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }
.f-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
#h-games { display: grid; gap: 12px; } #h-games:empty { display: none; }
/* (on a phone, two games a row in step 2, so a long list stays short) */
@media (max-width: 560px) { .h-results { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .h-game .acts .btn { padding: 0 8px; } }
.f-find { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; } .f-find .t-search { flex: 1 1 320px; } .f-find .btn { height: 52px; } .f-find .btn[hidden] { display: none; }

/* ---------- class editor ---------- */
.c-page { display: grid; gap: 28px; padding: 24px 0 72px; }
.c-crumb { font-size: 14px; color: var(--muted); } .c-crumb a { color: var(--muted); }
.c-head { display: flex; justify-content: space-between; gap: 16px; align-items: start; flex-wrap: wrap; }
.c-name { font: 700 clamp(26px, 3vw, 34px) var(--font); letter-spacing: -.02em; border: 1px solid transparent; border-radius: 10px; padding: 2px 8px; margin-left: -9px; background: none; color: var(--ink); width: min(560px, 100%); }
.c-name:hover { border-color: var(--line-2); } .c-name:focus { outline: none; border-color: var(--ink); }
.c-share { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 14.5px; margin-top: 6px; }
.c-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
@media (max-width: 960px) { .c-grid { grid-template-columns: 1fr; } }
.c-sec { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: grid; gap: 14px; }
.c-sec > header { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.c-sec h2 { font-size: 18px; } .c-sec p.t-note { margin-top: -6px; }
.c-today { display: grid; grid-template-columns: 200px 1fr; gap: 18px; align-items: center; }
.c-today img { width: 200px; aspect-ratio: 16/9; object-fit: cover; border-radius: 12px; }
.c-today b { font-size: 19px; font-weight: 600; display: block; } .c-today small { color: var(--muted); }
@media (max-width: 560px) { .c-today { grid-template-columns: 1fr; } .c-today img { width: 100%; } }
.c-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.c-board figure { margin: 0; display: grid; gap: 6px; font-size: 13.5px; } .c-board img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 9px; }
.c-side { display: grid; gap: 16px; position: sticky; top: 84px; }
.c-side .big { font: 800 44px/1 var(--mono); letter-spacing: .1em; }
.c-qr { display: grid; gap: 8px; }

/* ---------- the student class page ---------- */
.j-page { display: grid; gap: 34px; padding: 28px 0 72px; }
.j-enter { max-width: 460px; margin: 8vh auto 0; display: grid; gap: 18px; text-align: center; padding: 0 var(--gut) 64px; }
.j-enter h1 { font-size: clamp(28px, 4vw, 40px); }
.j-enter input { height: 64px; text-align: center; font: 700 30px var(--mono); letter-spacing: .3em; text-transform: uppercase; border-radius: 14px; border: 1px solid var(--line-2); padding: 0 12px; width: 100%; background: var(--surface); color: var(--ink); }
.j-enter input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px #e5e7eb; }
.j-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.j-head h1 { font-size: clamp(28px, 3.4vw, 40px); }
.j-me { display: inline-flex; align-items: center; gap: 10px; padding: 6px 8px 6px 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.j-me .av { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; display: inline-flex; } .j-me .av svg { width: 100%; height: 100%; }
.j-me b { font-weight: 600; font-size: 15px; }
.j-livebar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #121212; color: #fff; border-radius: 14px; padding: 12px 16px; font-size: 15px; }
.j-livebar b { color: #ffc531; font-weight: 600; }
.j-today { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--surface); }
.j-today img { width: 100%; height: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.j-today .txt { padding: clamp(20px, 3vw, 34px); display: grid; gap: 12px; align-content: center; }
.j-today .txt h2 { font-size: clamp(26px, 3vw, 36px); }
.j-today .btn { height: 52px; font-size: 17px; justify-self: start; padding: 0 28px; }
@media (max-width: 760px) { .j-today { grid-template-columns: 1fr; } }
.j-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.j-board a { display: grid; gap: 8px; color: var(--ink); text-decoration: none; } .j-board img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 12px; }
.j-board a:hover img { box-shadow: var(--shadow-lift); } .j-board b { font-weight: 600; }
.j-assign { display: grid; gap: 8px; }
.j-assign a { display: grid; grid-template-columns: 96px 1fr auto; gap: 14px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); text-decoration: none; background: var(--surface); }
.j-assign a:hover { border-color: var(--line-2); box-shadow: var(--shadow); } .j-assign a.hl { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.j-assign img { width: 96px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; } .j-assign small { display: block; color: var(--muted); font-size: 13.5px; }
.j-assign .go { font-weight: 600; font-size: 14.5px; padding-right: 8px; }

/* the gamertag picker */
.g-pick { display: grid; gap: 20px; }
.g-prev { display: flex; align-items: center; gap: 16px; }
.g-prev .av { width: 72px; height: 72px; border-radius: 50%; overflow: hidden; flex: none; display: inline-flex; } .g-prev .av svg { width: 100%; height: 100%; }
.g-prev b { font: 800 clamp(24px, 3.4vw, 32px)/1.1 var(--font); letter-spacing: -.01em; word-break: break-word; }
.g-sugg { display: flex; flex-wrap: wrap; gap: 8px; }
.g-build { display: grid; grid-template-columns: 1fr 1fr 90px; gap: 8px; }
.g-build select { height: 44px; border-radius: 10px; border: 1px solid var(--line-2); padding: 0 10px; font: 500 15px var(--font); background: var(--surface); color: var(--ink); min-width: 0; }
@media (max-width: 520px) { .g-build { grid-template-columns: 1fr 1fr; } .g-build select:last-child { grid-column: 1 / -1; } }
.g-taken { background: #fff7e6; border: 1px solid #f3dfa6; color: #6b4500; border-radius: 12px; padding: 12px 14px; display: grid; gap: 10px; font-size: 15px; }
#hl:empty { display: none; }

/* ---------- My questions: the teacher's own question sets (teacher/sets.js) ---------- */
.h-mine { border: 1px solid var(--line); background: var(--surface); border-radius: 16px; padding: 16px; display: grid; gap: 8px; align-content: start; justify-items: start; }
.h-mine b { font-weight: 600; font-size: 16px; } .h-mine p { color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }
.qs { display: grid; gap: 18px; padding: 0 0 64px; }
.qs-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.qs-head h1 { font-size: clamp(24px, 2.6vw, 30px); } .qs-head p { color: var(--ink-2); max-width: 62ch; margin-top: 4px; }
.qs-new { display: grid; gap: 4px; justify-items: end; } .qs-new small { color: var(--muted); font-size: 13px; }
.qs-out { justify-items: start; padding: 28px 0 64px; } .qs-out p { font-size: 16px; color: var(--ink-2); }
.qs-list { display: grid; gap: 8px; }
.qs-row { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.qs-row b { font-weight: 600; font-size: 16px; word-break: break-word; } .qs-row small { display: block; color: var(--muted); font-size: 13px; }
.qs-row .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 700px) { .qs-row { grid-template-columns: 1fr; } .qs-row .acts { justify-content: flex-start; } }
.qs-draft { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--surface-2); border-radius: 12px; padding: 12px 14px; font-size: 14.5px; }
.qs-draft .acts { display: flex; gap: 8px; }

.qe { display: grid; gap: 14px; padding: 0 0 72px; }
.qe-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
@media (max-width: 980px) { .qe-grid { grid-template-columns: 1fr; } }
.qe-main { display: grid; gap: 18px; min-width: 0; }
.qe-side { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; display: grid; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
@media (max-width: 980px) { .qe-side { position: static; } }
.qe-state { font-size: 14px; color: var(--ink-2); margin: 0; min-height: 1.3em; } .qe-state.ok { color: var(--good); font-weight: 600; }
.qe-cover { display: grid; gap: 6px; font-size: 13.5px; color: var(--ink-2); border-top: 1px solid var(--line); padding-top: 12px; }
.qe-cover b { font-weight: 600; color: var(--ink); } .qe-cover ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.qe-delset { color: var(--bad); justify-self: start; font-size: 14px; }
.qe-field { display: grid; gap: 6px; min-width: 0; }
.qe-lbl { font-size: 14px; font-weight: 600; color: var(--ink-2); } .qe-lbl small { font-weight: 400; color: var(--muted); font-size: 13px; }
.qe input[type=text], .qe textarea, .qe select { width: 100%; min-width: 0; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: 400 15.5px/1.45 var(--font); padding: 9px 12px; }
.qe input[type=text], .qe select { height: 42px; padding-block: 0; }
.qe textarea { resize: vertical; min-height: 64px; }
.qe input[type=text]:focus, .qe textarea:focus, .qe select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--surface-2); }
.qe .t-err[hidden] { display: none; }
.qe-topics { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.qe-topic { display: inline-flex; gap: 4px; align-items: center; } .qe-topic input[type=text] { width: 230px; }
.qe-h { font-size: 19px; display: flex; gap: 10px; align-items: center; }
.qe-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.qe-q { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.qe-q.open { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.qe-q.bad { border-color: var(--bad); } .qe-q.bad.open { box-shadow: 0 0 0 1px var(--bad); }
.qe-qhead { display: flex; gap: 10px; align-items: center; padding: 8px 10px 8px 8px; }
.qe-toggle { all: unset; cursor: pointer; flex: 1; min-width: 0; display: flex; gap: 12px; align-items: center; padding: 4px; border-radius: 8px; }
.qe-toggle:focus-visible { outline: 3px solid var(--focus); }
.qe-n { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--surface); display: grid; place-items: center; font: 600 14px var(--font); }
.qe-what { display: grid; min-width: 0; } .qe-what b { font-weight: 600; font-size: 14.5px; }
.qe-what span { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qe-flag { flex: none; font: 600 12.5px var(--font); color: var(--bad); border: 1px solid var(--bad); border-radius: 999px; padding: 2px 9px; }
.qe-qacts { display: flex; gap: 4px; flex: none; align-items: center; }
.qe-mini { flex: none; min-width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font: 600 15px var(--font); cursor: pointer; padding: 0 6px; }
.qe-mini.wide { font-size: 13.5px; padding: 0 10px; } .qe-mini:hover:not(:disabled) { background: var(--surface-2); } .qe-mini:disabled { opacity: .35; cursor: default; }
@media (max-width: 760px) { .qe-qhead { flex-wrap: wrap; } .qe-qacts { width: 100%; justify-content: flex-end; } }
.qe-body { display: grid; gap: 16px; padding: 6px 16px 18px 50px; }
@media (max-width: 600px) { .qe-body { padding-left: 14px; } }
.qe-choices, .qe-levels { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.qe-choices legend, .qe-levels legend { font-size: 14px; font-weight: 600; color: var(--ink-2); padding: 0; margin-bottom: 6px; }
.qe-choices legend small { font-weight: 400; color: var(--muted); font-size: 13px; margin-left: 4px; }
.qe-ch { display: flex; gap: 8px; align-items: center; min-width: 0; } .qe-ch input[type=text] { flex: 1; }
.qe-right { flex: none; display: inline-flex; align-items: center; gap: 6px; width: 164px; white-space: nowrap; height: 42px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line-2); font: 500 14px var(--font); color: var(--muted); cursor: pointer; }
.qe-right input { width: 18px; height: 18px; accent-color: #0f7a50; margin: 0; flex: none; }
.qe-right.on { border-color: var(--good); color: var(--good); font-weight: 600; background: color-mix(in srgb, var(--good) 8%, var(--surface)); }
.qe-right:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (max-width: 600px) { .qe-right { width: auto; } .qe-right span:not(.vh) { display: none; } }
.qe-step { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font: 600 14px var(--font); color: var(--ink-2); }
.qe-lvls { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 860px) { .qe-lvls { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.qe-lvl { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 11px; cursor: pointer; position: relative; }
.qe-lvl input { position: absolute; opacity: 0; pointer-events: none; }
.qe-lvl b { font-weight: 600; font-size: 14px; } .qe-lvl small { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.qe-lvl.on { border-color: var(--ink); background: var(--ink); } .qe-lvl.on b, .qe-lvl.on small { color: var(--surface); }
.qe-lvl:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.qe-num { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 700px) { .qe-num { grid-template-columns: 1fr; } }
.qe-add { display: grid; gap: 10px; border: 1px dashed var(--line-2); border-radius: 16px; padding: 16px; }
.qe-add > b { font-weight: 600; font-size: 16px; }
.qe-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.qe-type { display: grid; gap: 4px; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; align-content: start; }
.qe-type:hover { border-color: var(--ink); } .qe-type b { font-weight: 600; font-size: 15px; } .qe-type small { color: var(--muted); font-size: 13px; line-height: 1.4; }
.qe-paste { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.qe-frame { width: 100%; height: min(600px, 66vh); border: 0; border-radius: 14px; background: #070b14; }
.qe-cols { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 8px 0; } .qe-cols th, .qe-cols td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.qe-cols td:first-child { font: 600 13px var(--mono); white-space: nowrap; }
.qe-sum { cursor: pointer; font-weight: 600; font-size: 14.5px; }
.qe-pastebox { width: 100%; min-height: 150px; font: 400 13.5px/1.45 var(--mono); border-radius: 10px; border: 1px solid var(--line-2); padding: 10px 12px; background: var(--surface); color: var(--ink); }
.qe-result { display: grid; gap: 8px; } .qe-result:empty { display: none; }
.qe-ready { margin: 0; font-size: 15px; }
.qe-bad { border: 1px solid var(--bad); border-radius: 12px; padding: 12px 14px; display: grid; gap: 8px; font-size: 14.5px; }
.qe-bad b { font-weight: 600; } .qe-bad ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; color: var(--ink-2); }
/* the share builder's "Which questions" (teacher/share.js) */
#srcs a, #srcnote a { color: var(--ink); }
.t-field input[type=file] { height: auto; padding: 10px 12px; font-size: 14.5px; }
/* review and usability fixes (November 28, 2026) */
.qe textarea.qe-grow { flex: 1; min-height: 42px; height: auto; resize: none; field-sizing: content; padding-block: 9px; overflow: hidden; }
.qe-ch { align-items: flex-start; }
.qe-cover p { margin: 0; } .qe-cover summary { cursor: pointer; font-weight: 600; font-size: 13.5px; margin-top: 4px; }
.qe-undo { position: fixed; left: 50%; bottom: 22px; translate: -50% 0; z-index: 250; display: flex; gap: 14px; align-items: center; background: #121212; color: #fff; padding: 10px 12px 10px 18px; border-radius: 12px; font: 500 15px var(--font); box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.qe-undo .btn { background: #ffc531; color: #121212; }
.qe-readylist { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 6px; max-height: 260px; overflow: auto; font-size: 14px; }
.qe-readylist li { display: grid; gap: 2px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.qe-readylist span { color: var(--ink-2); } .qe-readylist b { font-weight: 600; }
.t-more { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; display: grid; gap: 10px; }
.t-more > summary { cursor: pointer; font-weight: 600; font-size: 14.5px; }
.qe-sidebody { display: grid; gap: 12px; }
/* ---------- joining a live class with one short address (November 29, 2026) ---------- */
/* the live board's QR code and code (/shared/joinqr.js draws the block; its own CSS sizes everything from --cjq-qr) */
#joinqr { --cjq-qr: 185px; } /* 37 squares across (29 and the margin), so 5 whole pixels a square */
body.proj #joinqr { --cjq-qr: min(44vh, 400px); }
body.proj .board-top { justify-content: center; }
.lb-today { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.lb-today > b { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.lb-today .lb-tpick { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.lb-today .lb-tpick small { color: var(--muted); font-size: 13.5px; } .lb-today .lb-tnone { color: var(--muted); }
.lb-today .t-note { margin: 0; }
/* the student class page: one box for every code */
.j-enter .j-big { height: 76px; font-size: 36px; }
.j-me-line { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; color: var(--ink-2); font-size: 15px; }
.j-me-line .av { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; display: inline-flex; } .j-me-line .av svg { width: 100%; height: 100%; }
.j-me-line b { font-weight: 600; }
.j-board.j-all { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
@media (max-width: 480px) { .j-board.j-all { grid-template-columns: repeat(2, minmax(0, 1fr)); } .j-enter .j-big { height: 68px; font-size: 30px; } }
