.live-page { max-width: 58rem; margin: var(--s7) auto; overflow-wrap: anywhere; color-scheme: dark; }
.live-page [hidden] { display: none !important; }
.live-page h1, .live-page h2 { font-family: var(--f-head); line-height: 1; }
.live-page h1 { font-size: var(--t-2xl); margin: 0 0 var(--s5); }
.live-page h2 { font-size: var(--t-xl); }
.live-panel {
  display: grid; gap: var(--s3); max-width: 38rem; padding: clamp(12px, 4vw, 24px); box-sizing: border-box;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l);
}
.live-panel p, .live-panel h2, #live-membership p { margin: 0; }
.live-panel label { font: 700 var(--t-m) var(--f-ui); }
.live-panel input, .live-panel select {
  width: 100%; min-width: 0; min-height: 44px; box-sizing: border-box;
  padding: var(--s2) var(--s3); color: var(--ink); background: var(--bg);
  border: 1px solid var(--edge); border-radius: var(--r-s); font: inherit;
}
.arcade .live-page button {
  justify-self: start; min-height: 44px; padding: var(--s2) var(--s4);
  background: var(--accent); color: var(--accent-ink);
  border: 1px solid transparent; border-radius: var(--r-s); font: 700 var(--t-s) var(--f-ui); cursor: pointer;
}
.arcade .live-page button.ghost { background: var(--surface); color: var(--ink); border-color: var(--edge); }
.live-page a { color: var(--accent-fg); text-decoration: underline; }
.live-actions { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }
.live-actions input { flex: 1 1 12rem; }
#live-room { display: grid; gap: var(--s4); }
#live-room > :is(p, h2, ul) { margin: 0; }
.live-countdown { font: 700 var(--t-xl) var(--f-head); color: var(--accent-fg); font-variant-numeric: tabular-nums; }
.live-countdown:empty { display: none; }
#live-entries { padding: 0; list-style: none; }
#live-entries li { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s2) 0; border-top: 1px solid var(--line); }
#live-stage canvas { display: block; width: 100%; height: auto; margin-bottom: var(--s3); }
#live-result-names { color: var(--accent-fg); font-size: var(--t-l); margin: 0; padding-inline-start: var(--s6); }

#live-room-note:empty { display: none; }
.live-muted, #live-room-note, #live-drawn-at { color: var(--muted); }
#live-create { max-width: none; }
.live-picker { min-inline-size: 0; padding: 0; border: 0; margin: var(--s2) 0; }
.live-picker legend { font: 700 var(--t-m) var(--f-ui); margin-bottom: var(--s2); }
.live-game-grid, .live-settings {
  display: grid;
  gap: var(--s3);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
}
.live-game-card {
  display: grid;
  align-content: start;
  gap: var(--s1);
  padding: var(--s3);
  border: 1px solid var(--edge);
  border-radius: var(--r-m);
  cursor: pointer;
}
.live-game-card:has(:checked), .live-share { border-color: var(--accent-fg); }
.live-panel .live-game-card input {
  width: 1.1rem;
  min-height: 0;
  height: 1.1rem;
  margin: 0 0 var(--s1);
  accent-color: var(--accent);
}
.live-game-card > span, .live-game-card small { font: var(--t-s)/1.4 var(--f-body); color: var(--muted); }
.live-settings > label { min-width: 0; }
.live-settings :is(input, select) { margin-top: var(--s1); }
.live-private { background: var(--bg); border-style: dashed; }
#live-waiting { display: grid; gap: var(--s3); justify-items: start; }
#live-waiting > p { margin: 0; }
.live-room-game { padding: var(--s2) var(--s3); border: 1px solid var(--line); border-radius: var(--r-s); }
#live-membership { padding: var(--s3); border-inline-start: 3px solid var(--accent-fg); background: var(--surface); }
#live-your-name { font-size: var(--t-l); font-weight: 700; }
#live-host { padding-block: var(--s3); border-block: 1px solid var(--line); }
#live-names-copy { margin-top: var(--s3); width: 100%; min-height: 8rem; color: var(--ink); background: var(--bg); }
#live-entries { display: grid; gap: var(--s2); grid-template-columns: repeat(auto-fill, minmax(min(100%, 10rem), 1fr)); }
#live-entries li {
  flex-wrap: wrap;
  min-width: 0;
  padding: var(--s2) var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: var(--surface);
}
#live-entries li.live-duplicate { border-color: var(--accent-fg); }
.live-duplicate small { color: var(--accent-fg); }
.live-countdown.live-final-seconds { font-size: var(--t-2xl); }
#live-screen { position: relative; background: var(--bg); }
#live-screen canvas { margin: 0; }
#live-screen canvas:first-child { position: relative; z-index: 1; }
#live-screen canvas + canvas { position: absolute; inset: 0; }
#live-skip { margin-top: var(--s2); }
#live-result { width: 100%; max-width: none; }
#live-result-names { font: 700 var(--t-xl)/1.15 var(--f-head); }
#live-result-names li::marker { font-size: var(--t-l); }
#live-result-names li:nth-child(1)::marker { content: "1st  "; }
#live-result-names li:nth-child(2)::marker { content: "2nd  "; }
#live-result-names li:nth-child(3)::marker { content: "3rd  "; }
#live-result summary { min-height: 44px; padding-block: var(--s2); cursor: pointer; }
#live-fallback { margin-top: var(--s4); }
html.live-presenter[data-season]::before, html.live-presenter[data-season]::after,
html.live-presenter[data-season] body::before, html.live-presenter[data-season] body::after { display: none; }
.live-presenter #main-content { width: auto; max-width: none; margin: 0; padding: 0; }
.live-presenter .live-page {
  max-width: none; min-height: 100vh; box-sizing: border-box;
  margin: 0; padding: clamp(12px, 3vw, 4rem); text-align: center;
}
.live-presenter #live-waiting { justify-items: center; }
.live-presenter #live-present-link { min-width: 0; max-width: 100%; justify-content: center; }
#live-present-href {
  display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center;
  min-height: 44px; max-width: 100%; min-width: 0;
  font: 700 clamp(1.25rem, 3vw, 4rem)/1.2 var(--f-ui);
}
#live-present-href span { min-width: 0; max-width: 100%; }
#live-present-href span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#live-present-url { width: min(100%, 36rem); }
.live-presenter #live-entries-title { margin: 0 0 var(--s2); }
.live-presenter #live-entries {
  display: flex; flex-wrap: wrap; justify-content: center; align-content: start;
  margin: 0 auto; padding: var(--s2); max-width: 100rem; max-height: 32vh; overflow: auto;
}
.live-presenter #live-entries li { font-size: clamp(1rem, 1.5vw, 2rem); }
.live-presenter #live-result { justify-items: center; }
.live-presenter #live-result details { text-align: start; }
.live-presenter .arcade .live-page #live-sound { background: transparent; color: var(--muted); }
.live-presenter .live-page h1 { font-size: clamp(3rem, 8vw, 8rem); }
.live-presenter #live-entries-title { font-size: clamp(1.5rem, 3vw, 3rem); }
.live-presenter .live-countdown { font-size: clamp(2.75rem, 6vw, 6rem); }
.live-presenter .live-countdown.live-final-seconds { font-size: clamp(4rem, 14vw, 15rem); }
.live-presenter #live-result-names { font-size: clamp(3rem, 8vw, 9rem); }
.live-presenter #live-stage {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  align-content: center;
  justify-items: center;
  background: var(--bg);
}
.live-presenter #live-screen { width: min(100%, calc(100vh * 16 / 9)); width: min(100%, calc(100dvh * 16 / 9)); }
.live-presenter #live-skip { position: absolute; inset: auto var(--s3) var(--s3) auto; z-index: 2; }
.live-presenter:has(#live-stage:not([hidden])) .skip { display: none; }

#live-share-links { display: grid; gap: var(--s2); }
#live-share-links .live-panel { max-width: none; }
.live-private summary { cursor: pointer; padding-block: var(--s2); min-height: 44px; box-sizing: border-box; }
.live-private[open] summary { margin-bottom: var(--s2); }
.live-private .live-actions { margin-top: var(--s2); }
#live-host { display: grid; gap: var(--s3); max-width: 100%; }
.live-danger { margin: 0; padding: var(--s2) 0 0; min-inline-size: 0; border: 0; border-top: 1px solid var(--line); }
.live-danger legend { padding-inline-end: var(--s2); color: var(--muted); }
.arcade .live-page button.live-remove { min-width: 44px; padding: 0; font-size: 1.25rem; }
#live-entries li > span { flex: 1 1 4rem; }
#live-entries li > small { flex-basis: 100%; order: 1; text-align: start; }
#live-roster h2 { margin: 0 0 var(--s2); }
#live-roster ul { margin: 0; }
/* Presenter: exactly one screen tall; the names cloud takes the space left and scrolls inside itself,
   so 200+ names never push the countdown or link off a 1080p projector. */
.live-presenter .live-page { display: flex; flex-direction: column; height: 100vh; min-height: 0; overflow: auto; }
.live-presenter #live-roster:not([hidden]) { flex: 1 1 0; min-height: 7rem; display: flex; flex-direction: column; }
.live-presenter #live-roster #live-entries { flex: 1 1 0; min-height: 0; max-height: none; }
.live-presenter .live-page h1 { font-size: clamp(2.5rem, min(8vw, 11vh), 8rem); }
.live-presenter .live-countdown { font-size: clamp(2.25rem, min(6vw, 9vh), 6rem); }
.live-presenter #live-room:not([hidden]) { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.live-presenter #live-sound { justify-self: center; align-self: center; }
