/*
 * Scores-only styles. Loaded ALONGSIDE core/public/css/home.css, never
 * instead of it: app/public is mounted before core/public on /static, so an
 * app file named home.css would shadow core's entirely and lose every base
 * style. Hence a separate sheet with its own name.
 */

/* /score — the admin's request and playing rows (public/js/score-admin.js).
   Each row is
   built as DOM nodes, so these class names are set there, not in a view. */
.score-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Anyone who has left the meeting, or whom the host has unticked. Still
   listed, and still holding their score, just visibly out of play. */
.score-row-out {
  opacity: 0.55;
}

.score-rank {
  min-width: 2rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.score-name {
  flex: 1 1 8rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-value {
  min-width: 2.5rem;
  text-align: right;
  font-size: 1.15rem;
  font-weight: 700;
}

/* Three of these sit in every row, so they have to be far smaller than the
   page's standard .btn. */
.btn-small {
  padding: 0.25rem 0.6rem;
  font-size: 0.85rem;
  border: none;
  cursor: pointer;
}

/* Secondary action in a row of buttons - Remove, next to the scoring ones.
   Same size, visibly not the thing you reach for. */
.btn-quiet {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}

.btn-small:disabled {
  opacity: 0.4;
  cursor: default;
}

.score-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.85rem;
}

/* The player's own score on /score/playing — the point of that page. */
.score-big {
  margin: 0;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.1;
}

/* Camera Mode off-screen webview readout (server/views/score/tile.ejs).
   Transparent background so only the score box composites onto the camera
   feed — the rest of the drawWebView rectangle stays see-through. */
html.camera-mode,
html.camera-mode body {
  background: transparent;
}

#score-camera-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100vh;
  background: rgba(11, 16, 32, 0.75);
  border-radius: 12px;
  color: #fff;
  font-size: 2.5rem;
  font-weight: 700;
}

/* The admin's camera-message composer (/score/admin). */
.score-camera-compose {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.score-camera-compose input {
  flex: 1 1 12rem;
  min-width: 0;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}

.score-camera-compose input:disabled { opacity: 0.5; }

/* Live position picker, next to the composer it controls (/score/admin). */
.score-camera-place {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.score-camera-place select {
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}

.score-camera-place select:disabled { opacity: 0.5; }

/* ── What Scores paints into the camera tile ──────────────────────────
   app/public/js/score-camera.js builds these two boxes and sets their
   position + theme classes from the session settings. The webview core
   draws is full-frame and transparent, so the real camera shows through
   and only these boxes are added on top. */

.score-camera-score,
.score-camera-message {
  position: fixed;
  padding: 0.5rem 1.25rem;
  border-radius: 12px;
  font-weight: 700;
  max-width: 80%;
  text-align: center;
}

.score-camera-score { font-size: 3rem; }
.score-camera-message { font-size: 1.75rem; }

/* The ranked board the admin can toggle on from /score/play. Positioned by
   the same .score-pos-* classes, but sized as a list rather than one line.
   max-height keeps a long game from running off the tile; the rows the admin
   cares about are at the top, so overflow is simply clipped. */
.score-camera-board {
  position: fixed;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1.5rem;
  max-height: 80%;
  overflow: hidden;
}

.score-camera-board-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.score-camera-board-list li {
  display: grid;
  /* Fixed position column so the names line up whether the place is 1 or 10. */
  grid-template-columns: 1.6em 1fr auto;
  gap: 0.6em;
  align-items: baseline;
  padding: 0.15em 0;
}

.score-camera-board-pos { text-align: right; opacity: 0.75; }
.score-camera-board-name { text-align: left; }
.score-camera-board-score { text-align: right; }

/* Header row. Two cells rather than three: "Position" spans the place and name
   columns so it left-aligns with the frame, while "Score" stays over the
   numbers it labels. Lighter and smaller than the rows so it reads as a label
   and never competes with a player's name on a busy tile. */
.score-camera-board-list li.score-camera-board-head {
  grid-template-columns: 1fr auto;
  font-size: 0.7em;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.65;
  border-bottom: 1px solid currentColor;
  margin-bottom: 0.2em;
  padding-bottom: 0.2em;
}

.score-camera-board-heading { text-align: left; }

/* Positions. The four edges keep a 2rem margin so nothing sits against the
   frame; `centre` is the middle of the tile. Both axes are translated when
   centring on that axis, which is why the transforms differ per class. */
.score-pos-top {
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
}

.score-pos-bottom {
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
}

.score-pos-left {
  left: 2rem;
  top: 50%;
  transform: translateY(-50%);
}

.score-pos-right {
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
}

.score-pos-centre {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

/* Themes. Set on the camera region, inherited by both boxes, so the score
   and the message always match. Backgrounds stay semi-transparent — this is
   sitting on live video, and a solid block hides the speaker's face. */
.score-theme-blue .score-camera-score,
.score-theme-blue .score-camera-message,
.score-theme-blue .score-camera-board {
  background: rgba(45, 140, 255, 0.82);
  color: #fff;
}

.score-theme-black .score-camera-score,
.score-theme-black .score-camera-message,
.score-theme-black .score-camera-board {
  background: rgba(11, 16, 32, 0.78);
  color: #fff;
}

.score-theme-white .score-camera-score,
.score-theme-white .score-camera-message,
.score-theme-white .score-camera-board {
  background: rgba(255, 255, 255, 0.88);
  color: #0b1020;
}

/* ── The settings form on the dashboard ─────────────────────────────── */
.score-settings {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem 1rem;
  align-items: center;
  margin: 0.75rem 0 0;
}

.score-settings label {
  color: var(--muted);
  font-size: 0.9rem;
}

.score-settings select {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}

/* The submit button spans both columns rather than sitting in the value
   column, so it reads as an action on the form and not as a third field. */
.score-settings .actions {
  grid-column: 1 / -1;
  margin-top: 0.25rem;
}

/* Section headings inside the grid (the show's Look / Play) take a whole
   row; otherwise each one shifts every label below it into the wrong
   column, beside the wrong dropdown. */
.score-settings h4 {
  grid-column: 1 / -1;
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
}

/* ── The question builder (/score/questions/build) ───────────────────────
   The page is one long form whose fields appear and disappear per question
   type, so the layout has to survive blocks being toggled with the `hidden`
   attribute: everything here is laid out with flow or flex on the WRAPPER,
   never on a block the script hides. home.css already makes `hidden` win
   over a class's `display` globally, so there is no need to repeat it. */

/* One field: label above its control, the whole thing a block so fields
   stack predictably however many of them are currently visible. */
.qb-field { margin: 0 0 0.9rem; }

.qb-field > label {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Controls are styled by tag, not class: the script swaps the answer field
   between <input> and <textarea> at runtime (matching needs multiple lines)
   and a replacement element carries no classes. */
.qb-form input[type="text"],
.qb-form input[type="number"],
.qb-form textarea,
.qb-form select {
  width: 100%;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}

.qb-form textarea { resize: vertical; min-height: 3.5rem; }

.qb-form input:focus-visible,
.qb-form textarea:focus-visible,
.qb-form select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* Type / Points / Required belong together: three short fields on one line
   on a normal window, stacked in a narrow meeting side panel. */
.qb-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}

.qb-row > .qb-field { flex: 1 1 10rem; margin-bottom: 0; }
.qb-row > .qb-field.qb-narrow { flex: 0 1 7rem; }

/* A checkbox reads as one line, not as a label stacked over a control. */
.qb-check {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  align-self: flex-end;
  padding-bottom: 0.45rem;
  flex: 0 0 auto;
}

.qb-check input { accent-color: var(--accent); }

.qb-hint {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

/* The warnings block is a failure notice inside the card, so it gets the
   same warn border the page uses elsewhere rather than looking like a
   third section of the form. */
.qb-warnings {
  margin-top: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(240, 180, 41, 0.5);
  border-radius: 10px;
  background: rgba(240, 180, 41, 0.08);
}

.qb-warnings h3 { margin: 0 0 0.4rem; font-size: 0.95rem; }

/* ── Rehearse (/questions/rehearse) ──────────────────────────────────────
   A director's view: a big stage holding the REAL tile (a 1280x720 frame,
   scaled by questions-rehearse.js) over a stand-in for the presenter's
   video, a transport bar, a strip of every question coloured by status,
   side panels for the host, and a style studio underneath. */
.rh-page { max-width: 1320px; }
.rh-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.5rem 0 1rem;
  padding: 1.1rem 1.3rem;
  border-radius: 14px;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(45, 140, 255, 0.28), transparent 55%),
    radial-gradient(ellipse at 100% 100%, rgba(185, 140, 255, 0.22), transparent 55%),
    var(--card);
  border: 1px solid var(--line);
}
.rh-kicker {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.rh-title { margin: 0.15rem 0 0.2rem; font-size: 1.7rem; line-height: 1.15; }
.rh-note { margin: 0; color: var(--muted); }
.rh-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1rem;
  align-items: start;
}
@media (max-width: 1000px) { .rh-layout { grid-template-columns: 1fr; } }

.rh-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), 0 0 0 6px rgba(255, 255, 255, 0.03);
  background: #000;
}
.rh-stage:fullscreen { border-radius: 0; border: 0; box-shadow: none; }
.rh-camera {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 35%, #4a5568 0%, #2d3748 45%, #1a202c 100%);
}
.rh-person {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 34%;
  height: 78%;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 50% 28%, #718096 0 17%, transparent 17.5%),
    radial-gradient(ellipse at 50% 100%, #718096 0 48%, transparent 48.5%);
  opacity: 0.55;
}
.rh-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 1280px;
  height: 720px;
  border: 0;
  background: transparent;
  transform-origin: 0 0;
}
.rh-badge,
.rh-keys {
  position: absolute;
  z-index: 2;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.55);
  color: #e7ecf5;
  backdrop-filter: blur(4px);
  pointer-events: none;
}
.rh-badge { top: 0.6rem; right: 0.6rem; font-weight: 700; letter-spacing: 0.04em; }
.rh-keys { bottom: 0.6rem; right: 0.6rem; opacity: 0.7; }
.rh-stage:fullscreen .rh-keys,
.rh-stage:fullscreen .rh-badge { display: none; }

.rh-transport {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin: 0.9rem 0 0.7rem;
}
.rh-reveal {
  min-width: 11rem;
  font-size: 1.05rem;
  padding: 0.7rem 1.4rem;
  background: linear-gradient(180deg, #38c172, #23935a);
  border-color: transparent;
}
.rh-step { padding: 0.65rem 1rem; }
.rh-counter { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }

.rh-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
}
.rh-strip-round { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; }
.rh-strip-label {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--muted);
  margin-right: 0.15rem;
  letter-spacing: 0.05em;
}
.rh-dot {
  width: 0.95rem;
  height: 0.95rem;
  padding: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  display: inline-block;
  vertical-align: middle;
  transition: transform 120ms ease;
}
.rh-dot:hover { transform: scale(1.25); }
.rh-dot.is-ok { background: #38c172; border-color: #38c172; }
.rh-dot.is-warn { background: #f0b429; border-color: #f0b429; }
.rh-dot.is-bad { background: #e5534b; border-color: #e5534b; }
.rh-dot.is-current { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent); transform: scale(1.2); }
.rh-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.9rem;
  margin: 0.45rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}
.rh-legend .rh-dot { cursor: default; margin-right: -0.5rem; }
.rh-legend .rh-dot:hover { transform: none; }

.rh-panel {
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  margin-bottom: 1rem;
}
.rh-panel h3 { margin: 0 0 0.6rem; font-size: 1rem; }
.rh-panel h4 { margin: 0.8rem 0 0.4rem; font-size: 0.85rem; color: var(--warn); }
.rh-small { font-size: 0.82rem; color: var(--muted); margin: 0.3rem 0 0.6rem; }
.rh-facts { list-style: none; margin: 0; padding: 0; }
.rh-facts li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.rh-fact-key { color: var(--muted); font-size: 0.85rem; }
.rh-fact-value { text-align: right; font-weight: 600; overflow-wrap: anywhere; }
.rh-issues ul { margin: 0; padding-left: 1.1rem; font-size: 0.88rem; }
.rh-issues li { margin: 0.25rem 0; }
.rh-allgood { margin: 0.7rem 0 0; color: var(--ok); font-weight: 700; }
.rh-found { list-style: none; margin: 0.5rem 0 0; padding: 0; max-height: 22rem; overflow: auto; }
.rh-found li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.45rem 0;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.rh-found-go {
  flex: 0 0 auto;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  border: 0;
  font-weight: 800;
  cursor: pointer;
  color: #0b1020;
  background: #f0b429;
}
.rh-found li.is-bad .rh-found-go { background: #e5534b; color: #fff; }

.rh-studio {
  margin-top: 0.5rem;
  padding: 1.1rem 1.2rem 1.3rem;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line);
}
.rh-studio h3 { margin: 0; font-size: 1.1rem; }
.rh-studio h4 { margin: 1rem 0 0.5rem; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.rh-studio-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.rh-save { display: flex; align-items: center; gap: 0.8rem; }
.rh-save .rh-small { margin: 0; }

.rh-designs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.7rem;
}
.rh-design {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.55rem;
  border-radius: 12px;
  border: 2px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: border-color 120ms ease, transform 120ms ease;
}
.rh-design:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.18); }
.rh-design.is-on { border-color: var(--sw1, var(--accent)); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06); }
.rh-design-name { font-weight: 800; font-size: 0.9rem; }
.rh-design-about { font-size: 0.74rem; color: var(--muted); line-height: 1.3; }

/* The little drawings: a 16:9 "camera" with the layout's shapes in the
   chosen colourway (--sw1 accent, --sw2 second colour). a/b/c are three
   spare shapes each design places as it likes. */
.rh-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 30%, #4a5568, #1a202c);
}
.rh-thumb::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 26%;
  height: 62%;
  transform: translateX(-50%);
  border-radius: 50% 50% 0 0;
  background: rgba(160, 174, 192, 0.4);
}
.rh-thumb i { position: absolute; display: block; z-index: 1; }
.rh-thumb .a { background: rgba(10, 14, 28, 0.9); border: 2px solid var(--sw1); border-radius: 4px; }
.rh-thumb .b, .rh-thumb .c { background: var(--sw1); border-radius: 2px; height: 8%; }
.rh-thumb .c { background: var(--sw2); }
.rh-thumb-design1 .a { left: 12%; right: 12%; top: 28%; bottom: 28%; }
.rh-thumb-design1 .b { left: 20%; width: 26%; top: 55%; } .rh-thumb-design1 .c { right: 20%; width: 26%; top: 55%; }
.rh-thumb-design2 .a { left: 0; right: 0; bottom: 0; height: 30%; border-radius: 0; border-width: 2px 0 0; }
.rh-thumb-design2 .b { left: 6%; width: 18%; bottom: 7%; } .rh-thumb-design2 .c { left: 30%; width: 18%; bottom: 7%; }
.rh-thumb-design3 .a { right: 4%; width: 52%; top: 18%; bottom: 18%; border-width: 0 0 0 3px; }
.rh-thumb-design3 .b { right: 10%; width: 18%; top: 34%; } .rh-thumb-design3 .c { right: 10%; width: 18%; top: 50%; }
.rh-thumb-design4 .a { left: 4%; right: 4%; top: 12%; bottom: 12%; }
.rh-thumb-design4 .b { left: 10%; width: 36%; height: 16%; top: 56%; } .rh-thumb-design4 .c { right: 10%; width: 36%; height: 16%; top: 56%; }
.rh-thumb-design5 .a { left: 14%; right: 14%; top: 26%; bottom: 26%; border-style: dotted; border-width: 3px; box-shadow: 0 0 8px var(--sw1); }
.rh-thumb-design5 .b { left: 0; top: 0; width: 30%; height: 100%; opacity: 0.25; clip-path: polygon(40% 0, 60% 0, 100% 100%, 0 100%); }
.rh-thumb-design5 .c { right: 0; top: 0; width: 30%; height: 100%; opacity: 0.25; clip-path: polygon(40% 0, 60% 0, 100% 100%, 0 100%); background: var(--sw1); }
.rh-thumb-design6 .a { left: 14%; right: 14%; top: 18%; bottom: 36%; box-shadow: 0 0 8px var(--sw1); }
.rh-thumb-design6 .b { left: 0; right: 0; bottom: 0; height: 26%; border-radius: 0; opacity: 0.35;
  background: repeating-linear-gradient(90deg, var(--sw2) 0 1px, transparent 1px 12%), repeating-linear-gradient(0deg, var(--sw2) 0 1px, transparent 1px 30%); }
.rh-thumb-design6 .c { display: none; }
.rh-thumb-design7 .a { left: 0; width: 80%; bottom: 18%; height: 18%; border: 0; border-radius: 0; clip-path: polygon(0 0, 100% 0, 94% 100%, 0 100%); }
.rh-thumb-design7 .b { left: 0; width: 36%; bottom: 36%; height: 10%; clip-path: polygon(0 0, 100% 0, 90% 100%, 0 100%); }
.rh-thumb-design7 .c { left: 6%; width: 50%; bottom: 7%; height: 8%; }
.rh-thumb-design8 .a { left: 16%; right: 16%; top: 24%; bottom: 24%; border-radius: 10px; transform: rotate(-2deg); border-color: var(--sw2); }
.rh-thumb-design8 .b { left: 22%; width: 24%; height: 12%; top: 52%; border-radius: 6px; transform: rotate(-2deg); }
.rh-thumb-design8 .c { right: 22%; width: 24%; height: 12%; top: 52%; border-radius: 6px; transform: rotate(-2deg); }
.rh-thumb-design9 { background: linear-gradient(160deg, #10162a, #05070f); }
.rh-thumb-design9::after { display: none; }
.rh-thumb-design9 .a { left: 3%; width: 66%; top: 6%; bottom: 16%; }
.rh-thumb-design9 .b { right: 3%; width: 24%; top: 14%; height: 24%; background: #718096; border: 2px solid var(--sw1); border-radius: 2px; }
.rh-thumb-design9 .c { left: 0; right: 0; bottom: 0; height: 9%; border-radius: 0; }
.rh-thumb-design10 { background: linear-gradient(160deg, #10162a, #05070f); }
.rh-thumb-design10::after { display: none; }
.rh-thumb-design10 .a { left: 3%; width: 56%; top: 8%; bottom: 14%; }
.rh-thumb-design10 .b { right: 4%; width: 32%; top: 14%; height: 62%; background: #718096; border: 2px solid var(--sw1); border-radius: 50% 50% 3px 3px / 30% 30% 3px 3px; }
.rh-thumb-design10 .c { right: 9%; width: 22%; bottom: 8%; height: 7%; }
.rh-thumb-design11 { background: linear-gradient(160deg, #10162a, #05070f); }
.rh-thumb-design11::after { display: none; }
.rh-thumb-design11 .a { right: 3%; width: 46%; top: 8%; bottom: 14%; }
.rh-thumb-design11 .b { left: 4%; width: 44%; top: 18%; height: 44%; background: #718096; border: 3px solid #2a3045; border-radius: 3px; box-shadow: 0 0 6px var(--sw1); }
.rh-thumb-design11 .c { left: 4%; width: 12%; top: 8%; height: 7%; background: #d6336c; }

.rh-swatches { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.rh-swatch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.8rem 0.35rem 0.35rem;
  border-radius: 999px;
  border: 2px solid transparent;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}
.rh-swatch:hover { border-color: rgba(255, 255, 255, 0.2); }
.rh-swatch.is-on { border-color: var(--ink); background: rgba(255, 255, 255, 0.1); font-weight: 700; }
.rh-swatch-ball {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25);
}

.rh-extras { display: flex; flex-wrap: wrap; gap: 0.8rem 1.2rem; margin-top: 1.1rem; }
.rh-field { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.82rem; color: var(--muted); }
.rh-field-wide { flex: 1 1 260px; }
.rh-field select,
.rh-field input {
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
}

/* A folded group with a title line (a show's rounds). The summary is the
   title: what the group is and how many are inside; click to open. */
.qb-group {
  margin: 0.75rem 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0.55rem 0.9rem;
}
.qb-group > summary {
  cursor: pointer;
  font-weight: 600;
  list-style-position: inside;
}
.qb-group[open] > summary { margin-bottom: 0.4rem; }
.qb-group.is-empty > summary { cursor: default; font-weight: 400; opacity: 0.7; }

/* Tick-box rows (the poll chooser on Import). The whole row is the label,
   so clicking a poll's name ticks it; a poll with nothing usable is greyed. */
.qb-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}
.qb-check input { width: 1.05rem; height: 1.05rem; margin: 0; cursor: pointer; }
.qb-check input:disabled,
.qb-check input:disabled + span { cursor: not-allowed; opacity: 0.5; }
.qb-check-all { margin: 0.25rem 0 0.4rem; font-weight: 600; }
.qb-checklist li { padding: 0.35rem 0; }

/* The outcome of an Import, shown directly under the button that was
   pressed. Without it a successful import changed only a status line in the
   other card and the list in the other column, so it looked like nothing
   happened. Green for in, red for refused; warnings keep their amber box. */
.qb-result {
  margin-top: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(56, 193, 114, 0.55);
  border-radius: 10px;
  background: rgba(56, 193, 114, 0.1);
}
.qb-result.is-error {
  border-color: rgba(229, 83, 75, 0.55);
  background: rgba(229, 83, 75, 0.08);
}
.qb-result h3 { margin: 0 0 0.3rem; font-size: 1rem; }
.qb-result p { margin: 0 0 0.5rem; }
.qb-result .actions { margin: 0.5rem 0 0; }

/* ── The current-bank list ───────────────────────────────────────────── */
.qb-list { list-style: none; margin: 0.5rem 0 0; padding: 0; }

.qb-list > li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}

.qb-list > li:last-child { border-bottom: 0; }

/* The question is the wide part; the number and the buttons are fixed, so
   a long prompt wraps inside its own column instead of pushing Edit and
   Remove off the row. */
.qb-num { color: var(--muted); font-variant-numeric: tabular-nums; }
.qb-body { flex: 1 1 12rem; min-width: 0; }
.qb-prompt { display: block; overflow-wrap: anywhere; }

.qb-meta {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.qb-actions { display: flex; gap: 0.4rem; flex: 0 0 auto; }

/* The row currently loaded into the form above, so it is obvious what
   "Save changes" is about to overwrite. */
.qb-list > li.qb-editing {
  border-left: 3px solid var(--accent);
  padding-left: 0.6rem;
  margin-left: -0.6rem;
}

/* ── Two columns on a wide screen ────────────────────────────────────────
   The builder is a form plus a running list of what the form has produced,
   which is a poor fit for one narrow column: on a desktop window the bank
   sits beside the form so you can see what you are adding to.

   Below the breakpoint every rule here is inert -- .qb-columns and .qb-col
   are plain blocks, the three cards stack in source order, and the page
   keeps the standard .app width. That is the layout a meeting side panel
   gets, and it is the one the markup reads as. */
@media (min-width: 60rem) {
  /* The standard 720px column cannot hold two of anything. Widened only for
     this page, hence the class on <main> rather than a change to .app. */
  .qb-page { max-width: 1140px; }

  .qb-columns {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 6fr);
    /* No row gap: .card already carries its own margin-bottom. */
    gap: 0 1.25rem;
    /* Deliberately NOT align-items: start -- the columns have to stretch to
       the row height or the sticky card below has no travel inside its own
       containing block and silently stops sticking. */
  }

  /* min-width: 0 lets a long prompt in the bank list wrap instead of forcing
     the grid track wider than its share (the default min-width:auto on a
     grid item is what usually breaks a two-column layout like this). */
  .qb-col { min-width: 0; }

  /* The form is the taller column, so the bank would otherwise scroll out of
     sight while you fill it in. Sticking it near the top keeps it in view;
     its own list scrolls once it outgrows the window rather than the sticky
     block growing past the viewport and defeating the stickiness. */
  .qb-col + .qb-col > .card {
    position: sticky;
    top: 1.25rem;
    max-height: calc(100vh - 2.5rem);
    overflow-y: auto;
  }
}

/* ── The numbered steps on the Live card ─────────────────────────────────
   Starting a game is a sequence — load the questions, choose the look, go —
   and the steps were previously an undifferentiated run of controls. A rule
   above each one is enough to read as a step without turning a card into a
   wizard. */
.score-step {
  margin: 0 0 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.score-step:first-of-type { border-top: 0; padding-top: 0; }

.score-step h3 { margin: 0 0 0.5rem; }

/* The set list is the one place a long quiz title meets a narrow panel. */
.score-step .qb-list > li { padding: 0.5rem 0; }

/* ── The host's copy of the question on screen ───────────────────────────
   Rendered by question-view.js, which the player pages will reuse — so this
   styles the shared markup, not one page's. */
.qv-card {
  margin: 0.75rem 0;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
}

.qv-head { margin: 0 0 0.4rem; }

.qv-question {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

/* Dimmed until the host has actually revealed it to the meeting, so a glance
   answers "have they seen this yet" as well as "what is it". */
.qv-answer { margin: 0; opacity: 0.65; }
.qv-answer.is-revealed { opacity: 1; }
.qv-answer.is-revealed strong { color: var(--ok); }

/* ── Numbered options ────────────────────────────────────────────────────
   Players answer by NUMBER, so the number is the prominent part: it is what
   somebody says out loud or taps, and the text beside it is the reminder of
   what they are choosing. Rendered by question-view.js (sidebar) and
   score-camera-design.js (camera tile) from the same stored order. */

/* The host's sidebar copy. */
.qv-options {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
}

.qv-options li {
  display: flex;
  gap: 0.5rem;
  padding: 0.15rem 0;
  align-items: baseline;
}

.qv-num {
  color: var(--accent);
  font-weight: 700;
  min-width: 1.4rem;
  font-variant-numeric: tabular-nums;
}

.qv-option { overflow-wrap: anywhere; }

/* Only the host sees this, and only because render() was passed showAnswer. */
.qv-options li.is-correct .qv-option { color: var(--ok); font-weight: 600; }

/* ══ QUESTION TILE ═══════════════════════════════════════════════════════
   Drawn into the camera feed by score-camera-design.js. Every design shares
   the markup in views/score/partials/question-tile.ejs and the same element
   ids; what differs is only what follows in this file.

   Everything is sized in vw/vh because the render target is not fixed
   (1280x720 by default) and the same page has to hold up at any of them.

   The presenter is behind all of this, so no design covers the whole frame
   unless it means to. */

/* .tile.qt, not .qt: the camera page's own inline .tile rule (camera-page.ejs)
   loads AFTER this stylesheet at the same specificity, so a bare .qt or
   .qt-designN rule here LOSES to it -- which left every design centred and
   padded the same, "Lower third" included. Two classes beat one. */
.tile.qt { padding: 0; }

.qt-card {
  background: rgba(11, 16, 32, 0.88);
  border-radius: 2.5vh;
  padding: 3.5vh 4vw;
  box-shadow: 0 1vh 4vh rgba(0, 0, 0, 0.45);
}

.qt-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2vw;
  margin-bottom: 2vh;
}

.qt-counter {
  font-size: 2.8vh;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.2vh;
  white-space: nowrap;
}

.qt-set {
  font-size: 2.1vh;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qt-question {
  font-size: 4.6vh;
  line-height: 1.2;
  margin: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.qt-options {
  list-style: none;
  margin: 2.5vh 0 0;
  padding: 0;
  display: grid;
  gap: 1.2vh 2.5vw;
}

.qt-options li {
  display: flex;
  align-items: baseline;
  gap: 1.2vw;
  font-size: 3vh;
  color: var(--ink);
}

/* The number is the prominent part: it is what a player says or presses. */
.qt-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.4vh;
  height: 4.4vh;
  border-radius: 50%;
  background: rgba(45, 140, 255, 0.22);
  border: 0.2vh solid rgba(45, 140, 255, 0.55);
  color: var(--accent);
  font-weight: 700;
  font-size: 2.5vh;
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}

.qt-option { overflow-wrap: anywhere; }

/* The answer holds its space from the start so the reveal cannot resize the
   card, and the correct option only colours once revealed — nothing on the
   tile may give it away early. */
.qt-answer {
  margin-top: 2.5vh;
  min-height: 5.5vh;
  display: flex;
  align-items: center;
  gap: 1.5vw;
  opacity: 0;
  transition: opacity 220ms ease-in;
}

.qt.is-revealed .qt-answer { opacity: 1; }

.qt-answer-label {
  font-size: 2.1vh;
  letter-spacing: 0.25vh;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.qt-answer-text {
  font-size: 3.6vh;
  font-weight: 700;
  color: var(--ok);
  overflow-wrap: anywhere;
}

/* A question with no answer key is normal (an unscored poll question), so it
   reads as a fact rather than a fault. */
.qt-answer.is-none .qt-answer-text {
  color: var(--muted);
  font-weight: 400;
  font-size: 2.4vh;
}

.qt.is-revealed .qt-options li.is-correct .qt-option {
  color: var(--ok);
  font-weight: 700;
}

.qt.is-revealed .qt-options li.is-correct .qt-num {
  background: rgba(56, 193, 114, 0.28);
  border-color: rgba(56, 193, 114, 0.65);
  color: var(--ok);
}

/* ── design1 · Card ──────────────────────────────────────────────────────
   A centred panel with the options in two columns. The general-purpose one:
   holds a long question and up to about six options without shrinking. */
.qt.qt-design1 { justify-content: center; padding: 4vh 5vw; }
.qt-design1 .qt-card {
  width: 80vw;
  border: 0.3vh solid rgba(45, 140, 255, 0.5);
}
.qt-design1 .qt-top { border-bottom: 0.2vh solid rgba(255,255,255,0.12); padding-bottom: 1.5vh; }
.qt-design1 .qt-options { grid-template-columns: repeat(auto-fit, minmax(26vw, 1fr)); }

/* ── design2 · Lower third ───────────────────────────────────────────────
   A band across the bottom. The whole point is what it does NOT cover: the
   presenter's face stays clear, so this is the one to use when the host is
   talking over the question. Everything is smaller and on fewer lines. */
.qt.qt-design2 { justify-content: flex-end; align-items: stretch; padding: 0; }
.qt-design2 .qt-card {
  border-radius: 0;
  border-top: 0.4vh solid var(--accent);
  padding: 2.5vh 4vw 3vh;
  background: rgba(11, 16, 32, 0.92);
}
.qt-design2 .qt-top { margin-bottom: 1vh; }
.qt-design2 .qt-counter { font-size: 2.2vh; }
.qt-design2 .qt-question { font-size: 3.4vh; }
/* Options on one row: a lower third has width but no height to spare. */
.qt-design2 .qt-options {
  margin-top: 1.5vh;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 0 2vw;
}
.qt-design2 .qt-options li { font-size: 2.4vh; }
.qt-design2 .qt-num { min-width: 3.4vh; height: 3.4vh; font-size: 2vh; }
.qt-design2 .qt-answer { margin-top: 1.5vh; min-height: 4vh; }
.qt-design2 .qt-answer-text { font-size: 2.8vh; }

/* ── design3 · Side list ─────────────────────────────────────────────────
   Question large on the left, options numbered down the right, and the left
   half of the frame deliberately left alone — for a host who wants to stay
   visible beside their own question. */
/* The tile is a flex COLUMN (camera-page.ejs), so the card goes to the right
   with align-items, and justify-content centres it vertically. An earlier
   version used justify-content: flex-end, which in a column means "bottom",
   not "right" -- and an inline rule was overriding it anyway (see .tile.qt). */
.qt.qt-design3 { justify-content: center; align-items: flex-end; padding: 4vh 3vw; }
.qt-design3 .qt-card {
  width: 56vw;
  box-sizing: border-box;
  border-left: 0.5vh solid var(--accent);
  border-radius: 0 2.5vh 2.5vh 0;
  text-align: left;
  /* Question left, options right: two columns, with the counter row and
     the answer across the full width. */
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 2.5vw;
  align-items: start;
}
.qt-design3 .qt-top,
.qt-design3 .qt-answer { grid-column: 1 / -1; }
.qt-design3 .qt-question { font-size: 3.6vh; }
/* One per line, beside the question rather than under it. */
.qt-design3 .qt-options { grid-template-columns: 1fr; gap: 1.4vh; margin-top: 0; }
.qt-design3 .qt-options li { font-size: 2.8vh; }

/* ── design4 · Board ─────────────────────────────────────────────────────
   Big, high-contrast, and covering most of the frame: for reading at a
   distance or on a shared screen, when nobody needs to see the presenter
   while the question is up. Options are tiles rather than list rows. */
.qt.qt-design4 { justify-content: center; padding: 3vh 3vw; }
.qt-design4 .qt-card {
  width: 92vw;
  background: rgba(5, 8, 18, 0.94);
  border: 0.3vh solid rgba(255, 255, 255, 0.14);
}
.qt-design4 .qt-question { font-size: 5.6vh; font-weight: 600; }
.qt-design4 .qt-options {
  margin-top: 3vh;
  grid-template-columns: repeat(2, 1fr);
  gap: 2vh 2.5vw;
}
/* Each option is a hit-target-shaped tile, which is also what the player
   pages will need when the same numbers become buttons. */
.qt-design4 .qt-options li {
  background: rgba(255, 255, 255, 0.06);
  border: 0.2vh solid rgba(255, 255, 255, 0.12);
  border-radius: 1.5vh;
  padding: 1.6vh 2vw;
  font-size: 3.2vh;
  align-items: center;
}
.qt-design4 .qt-num {
  min-width: 5.2vh;
  height: 5.2vh;
  font-size: 3vh;
  border-radius: 1.2vh;
}
.qt-design4.is-revealed .qt-options li.is-correct {
  background: rgba(56, 193, 114, 0.16);
  border-color: rgba(56, 193, 114, 0.6);
}

/* ── The question on a player's sidebar ──────────────────────────────────
   Narrow, and read at arm's length rather than across a room, so this is the
   compact cousin of the camera tile's version. Same numbering: the number is
   what a player will answer with, and it is the same number on every screen
   because the order comes from the database. */
.pq-question {
  margin: 0.4rem 0 0.75rem;
  font-size: 1.15rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.pq-options {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

/* Tile-shaped rather than list rows: these become the tap targets when
   players answer by number, so the shape is right from the start. */
.pq-options li { margin: 0; }

.pq-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.9rem;
  height: 1.9rem;
  border-radius: 8px;
  background: rgba(45, 140, 255, 0.18);
  border: 1px solid rgba(45, 140, 255, 0.5);
  color: var(--accent);
  font-weight: 700;
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}

.pq-option { overflow-wrap: anywhere; }

/* ── Answering ───────────────────────────────────────────────────────────
   Each option is a real <button>, so it focuses, takes Enter and Space, and
   reads as a control. Four states, and every one of them carries a MARK as
   well as a colour — roughly one man in twelve cannot tell the green from
   the red, and "which one did I pick" must never depend on that. */
.pq-choice {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.pq-choice:hover:not(:disabled) { border-color: var(--accent); }
.pq-choice:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Locked, not broken: the timer has run out or the answer is out. Kept
   readable rather than greyed into illegibility. */
.pq-choice:disabled { cursor: default; opacity: 0.9; }

.pq-mark {
  margin-left: auto;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
}

/* Their choice, before anyone knows if it is right. */
.pq-choice.is-chosen {
  border-color: var(--accent);
  background: rgba(45, 140, 255, 0.14);
}
.pq-choice.is-chosen .pq-mark { color: var(--accent); }

/* The right answer, once revealed — shown whether or not they picked it, so
   everybody learns the answer and not just the winners. */
.pq-choice.is-correct {
  border-color: rgba(56, 193, 114, 0.7);
  background: rgba(56, 193, 114, 0.16);
}
.pq-choice.is-correct .pq-num {
  background: rgba(56, 193, 114, 0.25);
  border-color: rgba(56, 193, 114, 0.6);
  color: var(--ok);
}
.pq-choice.is-correct .pq-mark { color: var(--ok); }

/* Only ever the option THEY picked: the other wrong ones stay neutral, so
   the screen says "here is your mistake", not "here are four mistakes". */
.pq-choice.is-wrong {
  border-color: rgba(240, 100, 100, 0.7);
  background: rgba(240, 100, 100, 0.14);
}
.pq-choice.is-wrong .pq-num {
  background: rgba(240, 100, 100, 0.2);
  border-color: rgba(240, 100, 100, 0.55);
  color: #f06464;
}
.pq-choice.is-wrong .pq-mark { color: #f06464; }

.pq-timer {
  margin: 0.6rem 0 0;
  font-variant-numeric: tabular-nums;
}

/* The leaderboard on the camera tile, shown in place of the question. */
.qt-board-rows {
  list-style: none;
  margin: 2vh 0 0;
  padding: 0;
  display: grid;
  gap: 1.2vh;
}

.qt-board-rows li {
  display: grid;
  grid-template-columns: 5vh 1fr auto;
  align-items: baseline;
  gap: 2vw;
  font-size: 3.4vh;
}

.qt-board-pos {
  color: var(--accent);
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.qt-board-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.qt-board-score {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ── The win/lose edge on a player's own camera ──────────────────────────
   Option 3 of Player questions. A border around the WHOLE tile rather than
   another box: it frames the score and any message already drawn there,
   instead of competing with them for the same corner.

   Ten pixels at the default 1280x720 render target. Kept in px, not vh,
   because it is a frame around the tile and should not thicken if somebody
   configures a taller target. */
#apphome-camera.score-edge-win,
#apphome-camera.score-edge-lose {
  box-sizing: border-box;
  border-style: solid;
  border-width: 10px;
  /* No transition: the point is that everyone flips at the same instant, and
     a fade would make identical timing look uneven. */
}

#apphome-camera.score-edge-win { border-color: var(--ok); }
#apphome-camera.score-edge-lose { border-color: #f06464; }

/* The player's 3-2-1 before a question (player-questions.js adds
   .is-countin for the last 3 or 5 seconds of the wait). Big, centred and
   ticking, so a glance at the panel says "here it comes". */
#pq-waiting.is-countin { text-align: center; }
#pq-waiting.is-countin #pq-waiting-text {
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  animation: pq-tick 1s ease-out infinite;
}
@keyframes pq-tick {
  0% { transform: scale(1.25); opacity: 0.4; }
  25% { transform: scale(1); opacity: 1; }
}

/* Rehearse: unsaved style changes, flagged in the header beside its own Save
   button (the Style section's button is far down the page). */
.rh-head-actions { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; justify-content: flex-end; }
.rh-unsaved {
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(240, 180, 41, 0.15);
  border: 1px solid rgba(240, 180, 41, 0.55);
  color: var(--warn);
  font-size: 0.8rem;
  font-weight: 700;
}
.rh-save-head { background: linear-gradient(180deg, #38c172, #23935a); border-color: transparent; }

/* Rehearse: pictures -- the show's logo and background, and a question's
   picture -- as small thumbnails beside their buttons. */
.rh-pics { display: flex; flex-wrap: wrap; gap: 0.8rem 1.6rem; }
.rh-pic-slot { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.rh-pic-label { font-weight: 700; font-size: 0.9rem; min-width: 5.5rem; }
.rh-pic-thumb {
  max-height: 3.6rem;
  max-width: 7rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: repeating-conic-gradient(#2a3045 0% 25%, #1a1f2e 0% 50%) 0 0 / 12px 12px;
  object-fit: contain;
}
.rh-picture { margin-top: 0.8rem; border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 0.6rem; }
.rh-picture .rh-pic-thumb { max-height: 6rem; max-width: 100%; display: block; margin-bottom: 0.4rem; }
.rh-pic-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.3rem 0; }
.rh-pic-prompt-text { width: 100%; box-sizing: border-box; font: inherit; font-size: 0.8rem; background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 0.5rem; }

/* ── "This show is full" (player-questions.js showFull) ──────────────────
   Covers the whole player panel: the host's licence caps the room and this
   player is past it. Nothing to press -- they watch the host's video. */
.pq-full {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: radial-gradient(circle at 50% 30%, #2a1f5c 0%, #0d0b1f 75%);
  color: #fff;
  text-align: center;
}
.pq-full[hidden] { display: none; }
.pq-full-inner { max-width: 26rem; }
.pq-full-kicker {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #ffd166;
}
.pq-full-title { margin: 0 0 1rem; font-size: 2rem; line-height: 1.15; }
.pq-full-text { margin: 0 0 0.6rem; font-size: 1.05rem; color: rgba(255, 255, 255, 0.85); }

/* ── Who has GameShow open (host's quiz card, score-quiz-run.js) ───────── */
.quiz-present { margin: 1rem 0 0; }
.quiz-present h3 { margin: 0 0 0.3rem; font-size: 1rem; }
.quiz-present-list { margin: 0.4rem 0 0; padding-left: 1.1rem; font-size: 0.9rem; }
.quiz-present-list li.is-open { color: var(--ok, #2e7d32); }
.quiz-present-list li.is-missing { color: var(--muted); }

/* ── GameShow Live, the one host page (live.ejs, live-show.js) ─────────── */
.live-step h2 { display: flex; align-items: center; gap: 0.6rem; }
.live-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.8rem; height: 1.8rem; border-radius: 50%;
  background: var(--accent, #2d8cff); color: #fff; font-size: 1rem; font-weight: 700;
}
.live-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin: 0.4rem 0; }
.live-row label { font-weight: 600; }
.live-row select { flex: 1 1 16rem; min-width: 0; padding: 0.45rem 0.5rem; font: inherit; }
.live-results { margin: 0.6rem 0 0; padding-left: 1.6rem; }
.live-results li { margin: 0.15rem 0; }

/* ── Manage questions (/questions/manage, questions-manage.js) ──────────
   A set is a row with its buttons; under it, an inline form (rename, split)
   and, when viewed, its questions. A group is a framed block of sets. */
.qb-list > li.manage-set,
.qb-list > li.manage-group { display: block; }
.manage-set-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
}
.manage-set-head .qb-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.manage-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin: 0.5rem 0 0.2rem;
}
.manage-inline input,
.manage-inline select { flex: 1 1 14rem; min-width: 0; }
.manage-questions { margin: 0.4rem 0 0 1.2rem; list-style: decimal; }
.manage-questions > li { display: list-item; padding: 0.35rem 0; }
.qb-list > li.manage-group {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  margin: 0.5rem 0;
}
.manage-group-sets { margin-top: 0.3rem; padding-left: 0.6rem; }
.manage-arrows { display: inline-flex; gap: 0.2rem; margin-right: 0.3rem; }
.manage-arrows .btn { min-width: 2rem; padding-left: 0.4rem; padding-right: 0.4rem; }

/* ── Rehearse: Style and rules as tabs (rehearse-tabs.js) ──────────────── */
.rh-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 1rem 0 0;
  border-bottom: 1px solid var(--line);
}
.rh-tab {
  appearance: none;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  padding: 0.55rem 1rem;
  margin-bottom: -1px;
  cursor: pointer;
}
.rh-tab:hover { color: var(--ink); }
.rh-tab.is-current {
  color: var(--ink);
  background: var(--card);
  border-color: var(--line);
  border-bottom: 1px solid var(--card);
}
.rh-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.rh-tabpanel { padding-top: 1rem; }
.rh-tabpanel > .rh-extras { margin-top: 0; }
/* "Jump to round" moved into the transport row: a step control, not style. */
.rh-jump { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; color: var(--muted); }
.rh-jump select {
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}

/* ── Rehearse in a meeting (body.rh-in-meeting, questions-rehearse.js) ──
   The camera tile is the preview, so the side panel is the controls: one
   column -- step and reveal, the question strip, this question, then the
   Style and rules tabs. The preview frame is kept but moved off-screen at a
   real size, because the checks measure the tile inside it. */
.rh-in-meeting .rh-layout { grid-template-columns: 1fr; }
.rh-in-meeting .rh-stage {
  position: absolute;
  left: -20000px;
  top: 0;
  width: 640px;
  visibility: hidden;
}
.rh-in-meeting #rh-present,
.rh-in-meeting .rh-keys { display: none; }
.rh-in-meeting .rh-oncam { border-color: var(--accent); }
.rh-in-meeting .rh-transport { margin-top: 0.4rem; }
.rh-in-meeting .rh-title { font-size: 1.3rem; }

/* Manage experience: the show block is the page heading, at the very top. */
.rh-head-top { margin-top: 0; }
.rh-head-top h1.rh-title { margin: 0.15rem 0 0.2rem; }

/* The Opening screen step button, lit while the opening screen shows. */
.rh-intro.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent);
}
/* Manage experience's Images tab: the three images stacked, each one's
   description under its buttons, a rule between them. */
.rh-pics-stacked { display: block; }
.rh-pics-stacked .rh-pic-slot { display: block; padding: 0.2rem 0; }
.rh-pic-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.rh-pics-stacked .rh-pic-label { min-width: 9rem; }
.rh-pic-desc { margin: 0.35rem 0 0; }
.rh-pic-rule { border: 0; border-top: 1px solid var(--line); margin: 0.8rem 0; }
/* The in-a-meeting notice's close X, top right. */
.questions-notice { position: relative; padding-right: 2.6rem; }
.notice-close {
  position: absolute;
  top: 0.45rem;
  right: 0.55rem;
  width: 1.9rem;
  height: 1.9rem;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
}
.notice-close:hover,
.notice-close:focus-visible { opacity: 1; background: rgba(127, 127, 127, 0.2); }
/* Manage experience: where the rehearsal is, in the top box, on the right
   of the show's name (before Save / Present). */
.rh-head-top .rh-counter-top {
  margin-left: auto;
  align-self: center;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  font-weight: 600;
  white-space: nowrap;
}
.rh-head-top .rh-counter-top:empty { display: none; }

/* ── Rehearse: the running order (questions-rehearse.js, renderOrder) ──── */
.rh-order { margin-top: 1rem; }
.rh-order h3 { margin: 0 0 0.4rem; font-size: 1rem; }
.rh-order-list {
  list-style: none;
  margin: 0;
  padding: 0.3rem;
  max-height: 22rem;
  overflow-y: auto;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.rh-order-list li { padding: 0.35rem 0.6rem; border-radius: 6px; }
.rh-order-round {
  margin-top: 0.4rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.rh-order-q, .rh-order-intro { display: flex; gap: 0.5rem; cursor: pointer; }
.rh-order-q:hover, .rh-order-intro:hover { background: rgba(127, 127, 127, 0.12); }
.rh-order-num { color: var(--muted); min-width: 2rem; font-variant-numeric: tabular-nums; }
.rh-order-list li.is-current {
  background: var(--accent);
  color: #fff;
}
.rh-order-list li.is-current .rh-order-num { color: inherit; }
/* Round cards in the running order: clickable, like the questions. */
.rh-order-round, .rh-order-end { cursor: pointer; }
.rh-order-round:hover, .rh-order-end:hover { background: rgba(127, 127, 127, 0.12); }
.rh-order-end { font-size: 0.8rem; color: var(--muted); font-style: italic; }
/* Rehearse's Assist-only line in the top block. */
.rh-assist-line { margin: 0.45rem 0 0; font-size: 0.85rem; opacity: 0.85; max-width: 46rem; }
/* Rehearse: "This question" under the step buttons, in the main column. */
.rh-left .rh-this { margin: 0.2rem 0 0.9rem; }

/* The guest panel (/score/inplay): the question box first, always there. */
.pq-box .pq-here { margin: 0.4rem 0; font-size: 1.05rem; opacity: 0.85; }
/* Watching the host's video: no question words here, but the numbered
   answers ("1 Tunisia", "2 Morocco"...), the timer and "Locked in" stay. */
.pq-box.is-elsewhere .pq-question,
.pq-box.is-elsewhere #pq-set { display: none; }
.pq-box .pq-waiting { margin-top: 0.6rem; }
/* Score and position side by side (inplay.ejs). */
.score-row { display: flex; align-items: flex-start; gap: 2.2rem; flex-wrap: wrap; }
.score-cell { display: flex; flex-direction: column; }
.score-label { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.7; }
.score-row .score-big { margin: 0.1rem 0 0; }
.score-rank { margin: 0.1rem 0 0; font-size: 2.2rem; font-weight: 800; line-height: 1.1; color: var(--ink, #f2f4f8); }
.score-of { font-size: 0.85rem; opacity: 0.75; }

/* Guest panel, paced questions: the countdown box and answers held back. */
.pq-waiting.is-paced { text-align: center; font-weight: 700; font-size: 1.1rem; }
.pq-waiting .pq-count {
  display: block;
  font-size: 3.4rem;
  font-weight: 900;
  line-height: 1.1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.pq-waiting .pq-count:empty { display: none; }
.pq-box.is-awaiting-options .pq-options { visibility: hidden; }

/* Live: who answered what (score-quiz-run.js paintAnswers). */
.live-answers { margin-top: 1rem; }
.live-answers h3 { margin: 0 0 0.4rem; font-size: 1rem; }
.live-answers-count { font-weight: 400; opacity: 0.75; font-size: 0.9rem; }
.live-answers-list { list-style: none; margin: 0; padding: 0; max-height: 22rem; overflow-y: auto; }
.live-answers-list li {
  padding: 0.35rem 0.6rem;
  margin: 0.2rem 0;
  border-radius: 6px;
  border-left: 4px solid transparent;
  background: rgba(127, 127, 127, 0.1);
}
.live-answers-list li.is-right { border-left-color: #2fbf71; background: rgba(47, 191, 113, 0.18); color: #b9f5d2; }
.live-answers-list li.is-wrong { border-left-color: #e5383b; background: rgba(229, 56, 59, 0.18); color: #ffc9c9; }
.live-answers-list li.is-waiting { opacity: 0.6; }

/* Guest panel: when the answering time runs out, "Time up" big in a red box. */
.pq-timer.is-timeup {
  display: block;
  margin: 0.8rem 0 0.2rem;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  background: linear-gradient(160deg, #e5383b, #a4161a);
  border: 2px solid rgba(255, 255, 255, 0.85);
  color: #fff;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
  animation: pq-timesup-in 320ms cubic-bezier(.2, .9, .25, 1.25) both;
}
@keyframes pq-timesup-in { from { transform: scale(0.7); opacity: 0; } }

/* Live: play from a phone or browser (join code + QR). */
.live-join {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  flex-wrap: wrap;
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.live-join[hidden] { display: none; }
.live-join-qr { background: #fff; border-radius: 8px; padding: 6px; width: 160px; height: 160px; }
.live-join-text h3 { margin: 0 0 0.3rem; font-size: 1rem; }
.live-join-code-line { margin: 0 0 0.3rem; }
.live-join-code { font-size: 2rem; letter-spacing: 0.18em; font-variant-numeric: tabular-nums; }
.join-page .join-card { max-width: 28rem; }
.join-page input { font-size: 1.2rem; }
#join-code { text-transform: uppercase; letter-spacing: 0.2em; }

/* ── /welcome, the site's front door ─────────────────────────────────── */
.welcome-page { max-width: 980px; }
.welcome-hero { padding: 2.4rem 0 1.2rem; }
.welcome-kicker { margin: 0; font-size: 0.85rem; font-weight: 800; letter-spacing: 0.3em; text-transform: uppercase; color: var(--accent); }
.welcome-hero h1 { margin: 0.4rem 0 0.6rem; font-size: clamp(1.9rem, 4.5vw, 3rem); line-height: 1.1; }
.welcome-lead { margin: 0; max-width: 42rem; font-size: 1.15rem; opacity: 0.85; }
.welcome-join { border: 2px solid var(--accent); }
.welcome-join h2 { margin-top: 0; }
.welcome-join-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.welcome-join-row input {
  flex: 1 1 12rem;
  font-size: 1.5rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  padding: 0.5rem 0.8rem;
}
.welcome-join-row .btn { font-size: 1.15rem; padding-left: 1.6rem; padding-right: 1.6rem; }
.welcome-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}
.welcome-step h3 { margin: 0.4rem 0; }
.welcome-step p { margin: 0; opacity: 0.85; }
.welcome-num {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}
.welcome-hosts h2 { margin-top: 0; }
