.gr-screen {
  --gr-border: var(--line, #30364e);
  --gr-accent: var(--aqua, #69e7dc);
  color: var(--text, #f1f3fc);
  font: 1rem/1.45 var(--sans, "Barlow", sans-serif);
  max-width: 1450px;
  margin: 0 auto;
}
.gr-screen *,
.gr-screen *::before,
.gr-screen *::after {
  box-sizing: border-box;
}
.gr-screen h1,
.gr-screen h2,
.gr-screen h3,
.gr-screen p {
  margin: 0;
}
.gr-screen h1,
.gr-screen h2,
.gr-screen h3,
.gr-position,
.gr-code,
.gr-bank strong,
.gr-buzz,
.gr-team-score,
.gr-pts {
  font-family: var(--display, "Barlow Condensed", "Arial Narrow", sans-serif);
  font-weight: 700;
}
.gr-screen h1 {
  font-family: var(--headline, sans-serif);
  font-size: clamp(2.15rem, 4.4vw, 4rem);
  letter-spacing: -0.055em;
  line-height: 1.04;
}
.gr-screen h2 {
  font-size: clamp(1.45rem, 2.3vw, 2rem);
  line-height: 1.1;
  text-transform: uppercase;
}
.gr-screen h3 {
  font-size: 1.22rem;
  line-height: 1.15;
}
.gr-screen button,
.gr-screen input,
.gr-screen select {
  font: inherit;
}
.gr-screen button,
.gr-screen a,
.gr-screen input,
.gr-screen select,
.gr-screen summary {
  -webkit-tap-highlight-color: transparent;
}
.gr-screen :focus-visible {
  outline: 2px solid var(--gr-accent);
  outline-offset: 3px;
}
.gr-screen a {
  color: inherit;
}
.gr-heading,
.gr-row,
.gr-buttons,
.gr-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.gr-heading,
.gr-row {
  justify-content: space-between;
}
.gr-heading {
  align-items: flex-end;
  margin-bottom: 1.5rem;
}
.gr-heading h1 {
  margin-top: 0.45rem;
  overflow-wrap: anywhere;
}
.gr-kicker,
.gr-label {
  font:
    600 0.78rem/1.3 ui-monospace,
    Consolas,
    monospace;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted, #adb6ce);
}
.gr-kicker {
  color: var(--gr-accent);
}
.gr-game-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.gr-game-mark .icon {
  width: 1.35rem;
  height: 1.35rem;
  stroke-width: 2;
}
.gr-muted {
  color: var(--muted, #adb6ce);
}
.gr-lead {
  margin-top: 0.65rem !important;
  max-width: 52ch;
  color: var(--muted, #adb6ce);
}
.gr-code,
.gr-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 0.5rem;
  background: #122b36;
  color: var(--gr-accent);
  border: 1px solid #2e5a6a;
  border-radius: 4px;
}
.gr-code {
  padding: 0.4rem 0.72rem;
  font:
    650 1.1rem/1.1 ui-monospace,
    Consolas,
    monospace;
  letter-spacing: 0.12em;
}
.gr-pill {
  padding: 0.32rem 0.55rem;
  font: 700 0.77rem/1.2 var(--sans, sans-serif);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.gr-deck,
.gr-entry,
.gr-board,
.gr-scorecard,
.gr-callout {
  background: var(--panel, #151a2b);
  border: 1px solid var(--gr-border);
  border-radius: 9px;
}
.gr-deck,
.gr-entry,
.gr-callout {
  padding: clamp(1.05rem, 2.4vw, 1.65rem);
}
.gr-entry {
  max-width: 680px;
}
.gr-entry form,
.gr-stack {
  display: grid;
  gap: 1rem;
}
.gr-entry form {
  margin-top: 1.25rem;
}
.gr-form-grid,
.gr-scores {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}
.gr-field {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
  font-weight: 600;
}
.gr-field input,
.gr-field select {
  width: 100%;
  height: 2.85rem;
  padding: 0.55rem 0.75rem;
  background: #0c1121;
  color: var(--text, #f1f3fc);
  border: 1px solid #454c67;
  border-radius: 5px;
}
.gr-field input::placeholder {
  color: #9ba5be;
  opacity: 1;
}
.gr-screen button,
.gr-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.65rem;
  padding: 0.6rem 0.95rem;
  border: 1px solid #424964;
  border-radius: 5px;
  color: var(--text, #f1f3fc);
  background: #252a42;
  text-decoration: none;
  font-weight: 650;
  cursor: pointer;
}
.gr-screen button:hover:not(:disabled),
.gr-button:hover {
  border-color: var(--gr-accent);
  color: var(--gr-accent);
}
.gr-screen button.gr-primary,
.gr-button.gr-primary {
  color: #0a2330;
  background: var(--gr-accent);
  border-color: var(--gr-accent);
}
.gr-screen button.gr-primary:hover:not(:disabled),
.gr-button.gr-primary:hover {
  background: #a3faf2;
  color: #0a1f2c;
}
.gr-screen button:disabled {
  cursor: default;
  opacity: 0.48;
}
.gr-screen button.gr-danger {
  color: #ffbfd3;
  border-color: #805069;
  background: #352438;
}
.gr-screen button.gr-small,
.gr-button.gr-small {
  min-height: 2.2rem;
  font-size: 0.9rem;
  padding: 0.3rem 0.7rem;
}
.gr-error,
.gr-connection {
  background: #312435;
  border: 1px solid #67425a;
  border-radius: 5px;
  color: #ffc4d6;
  margin-bottom: 1rem;
  padding: 0.65rem 0.85rem;
}
.gr-screen [hidden] {
  display: none !important;
}
.gr-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(245px, 1fr);
  gap: 1rem;
  align-items: start;
}
.gr-deck > :not(:first-child),
.gr-callout > :not(:first-child) {
  margin-top: 0.85rem;
}
.gr-scorecard {
  --gr-team: var(--gr-accent);
  --gr-team-glow: #194351;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 0.8rem 1rem 0.8rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  background: linear-gradient(105deg, var(--gr-team-glow) -65%, var(--panel) 75%);
}
.gr-scorecard[data-team-id="b"] {
  --gr-team: var(--iris, #b3a1ff);
  --gr-team-glow: #44356b;
}
.gr-scorecard::before {
  content: "";
  position: absolute;
  inset: 13% auto 13% 0;
  width: 0.22rem;
  background: var(--gr-team);
  border-radius: 0 2px 2px 0;
}
.gr-team-name {
  font-weight: 650;
  overflow-wrap: anywhere;
}
.gr-team-score {
  color: var(--gr-team);
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}
.gr-board {
  overflow: hidden;
}
.gr-question {
  padding: clamp(1rem, 2.4vw, 1.8rem);
  background: linear-gradient(115deg, #23223f, transparent 85%);
  border-bottom: 1px solid var(--gr-border);
}
.gr-question h2 {
  font-family: var(--headline, sans-serif);
  letter-spacing: -0.035em;
  text-transform: none;
  font-size: clamp(1.5rem, 2.6vw, 2.5rem);
  margin-top: 0.55rem;
  overflow-wrap: anywhere;
}
.gr-answers {
  display: grid;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 1rem;
}
.gr-answer {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.65rem;
  min-height: 3.1rem;
  background: #192135;
  border: 1px solid #33415a;
  padding: 0.35rem 0.7rem;
  border-radius: 4px;
}
.gr-position {
  display: grid;
  place-items: center;
  min-height: 1.78rem;
  max-width: 2rem;
  border: 1px solid #586789;
  border-radius: 3px;
  color: #c8d4ee;
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
}
.gr-answer.gr-revealed {
  background: #15333d;
  border-color: #33757c;
}
.gr-answer.gr-revealed .gr-position {
  color: var(--gr-accent);
  border-color: #409a9d;
}
.gr-answer-text {
  font-weight: 650;
  overflow-wrap: anywhere;
}
.gr-pts {
  color: var(--iris, #b3a1ff);
  font-size: 1.45rem;
  font-variant-numeric: tabular-nums;
}
.gr-answer-status {
  min-width: 4.1rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--gr-accent);
}
.gr-bank {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  align-items: flex-start;
}
.gr-bank strong {
  font-size: 2.25rem;
  line-height: 1;
  color: var(--iris, #b3a1ff);
}
.gr-strikes {
  display: inline-flex;
  gap: 0.3rem;
}
.gr-strike {
  display: inline-grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  font: 700 1.4rem/1 var(--display, sans-serif);
  color: #9ba7c6;
  background: #252a42;
  border: 1px solid #424963;
  border-radius: 3px;
}
.gr-strike.is-active {
  background: #5a2c48;
  border-color: #a75c83;
  color: #ffbad7;
}
.gr-meta {
  gap: 0.55rem;
}
.gr-players {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
}
.gr-players li {
  border: 1px solid #3c4865;
  border-radius: 4px;
  background: #20283b;
  padding: 0.25rem 0.55rem;
  overflow-wrap: anywhere;
}
.gr-disclosure {
  border-top: 1px solid var(--gr-border);
  padding-top: 0.9rem;
  margin-top: 1rem;
}
.gr-disclosure summary {
  cursor: pointer;
  font-weight: 650;
}
.gr-disclosure p,
.gr-disclosure .gr-field {
  margin-top: 0.7rem;
}
.gr-callout {
  background: #252139;
  border-color: #584c8b;
}
.gr-board-stage {
  display: grid;
  gap: clamp(0.65rem, 1.6vw, 1.3rem);
  border: 1px solid #454769;
  border-radius: 14px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: #14182d;
  background-image:
    radial-gradient(ellipse at 80% -20%, #55419377, transparent 54%),
    linear-gradient(125deg, #19283c, #171b31 46%, #17162c);
  box-shadow:
    inset 0 1px #a89add33,
    inset 0 -1px #101425;
  padding: clamp(0.85rem, 2.4vw, 2rem);
}
.gr-board-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: repeating-radial-gradient(
    circle at 102% -80px,
    transparent 0 38px,
    #a290df1f 39px 40px,
    transparent 41px 56px
  );
  mask-image: linear-gradient(220deg, #000 0%, transparent 55%);
}
.gr-standing {
  text-align: center;
  padding: clamp(1rem, 3vw, 2.75rem) 0.5rem;
}
.gr-standing h2 {
  font-size: clamp(2rem, 5vw, 4.8rem);
  margin: 0.4rem 0;
  overflow-wrap: anywhere;
}
.gr-contestant {
  max-width: 600px;
}
.gr-buzzer-panel {
  isolation: isolate;
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 1.45rem 1rem 1.15rem;
  background: radial-gradient(ellipse at 50% 60%, #263249, #191d34 68%);
  border-color: #414965;
}
.gr-buzzer-panel h2 {
  font-family: var(--headline, sans-serif);
  letter-spacing: -0.03em;
  text-transform: none;
  font-size: clamp(1.3rem, 3.6vw, 1.65rem);
  text-wrap: balance;
}
.gr-buzz-dock {
  display: grid;
  place-items: center;
  isolation: isolate;
  position: relative;
  width: 100%;
  margin: 0.6rem 0;
  padding: 1.8rem 0;
  overflow: hidden;
}
.gr-buzz-dock::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: repeating-radial-gradient(
    ellipse 80px 75px at center,
    transparent 0 18px,
    #8cbcc33b 19px 20px,
    transparent 21px 25px
  );
  mask-image: radial-gradient(ellipse at center, #000 44%, transparent 75%);
}
.gr-screen button.gr-buzz {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.35rem;
  width: min(57vw, 13rem);
  aspect-ratio: 1.08;
  padding: 1.25rem;
  font-family: var(--display, sans-serif);
  font-size: clamp(1.8rem, 7vw, 2.7rem);
  text-transform: uppercase;
  line-height: 0.95;
  border-radius: 50%;
  border: 2px solid #abfff3;
  color: #092935;
  background: radial-gradient(ellipse at 42% 25%, #b9fff3, #69e7dc 42%, #4bbbad 79%, #398e8a);
  box-shadow:
    inset 0 0.22rem 0.4rem #efffff87,
    inset 0 -0.35rem 0.5rem #194d6c55,
    0 0.48rem 0 #266b73,
    0 0.58rem 0 0.32rem #141c30,
    0 0.56rem 0 0.44rem #485269,
    0 0.85rem 1.25rem #080c22b0;
  touch-action: manipulation;
}
.gr-buzz .icon {
  width: 1.7rem;
  height: 1.7rem;
  stroke-width: 1.75;
}
.gr-screen button.gr-buzz:hover:not(:disabled) {
  color: #092935;
  border-color: white;
  filter: brightness(1.06);
}
.gr-screen button.gr-buzz:active:not(:disabled) {
  transform: translateY(4px);
}
.gr-screen button.gr-buzz:disabled {
  background: radial-gradient(ellipse at 42% 25%, #3c4862, #28334c 61%, #212b41);
  color: #c1cae2;
  border-color: #5e6b86;
  opacity: 1;
  box-shadow:
    inset 0 0.18rem 0.45rem #a5b7de30,
    0 0.38rem 0 #20283a,
    0 0.45rem 0 0.32rem #111a2d,
    0 0.45rem 0 0.43rem #414b64,
    0 0.7rem 0.9rem #080c2280;
}
.gr-screen button.gr-buzz.gr-winner:disabled {
  color: #f6f0ff;
  border-color: #beb1fb;
  background: radial-gradient(ellipse at 40% 25%, #8579bf, #67599f 56%, #463f77);
  box-shadow:
    inset 0 2px 5px #e9e2ff66,
    0 0.3rem 0 #463a6d,
    0 0.4rem 0 0.32rem #171b30,
    0 0.4rem 0 0.42rem #796d9e;
}
@media (max-width: 900px) {
  .gr-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 620px) {
  .gr-heading {
    align-items: flex-start;
  }
  .gr-heading,
  .gr-deck > .gr-row {
    gap: 0.6rem;
  }
  .gr-answer {
    grid-template-columns: 1.6rem minmax(0, 1fr) auto auto;
    gap: 0.4rem;
    padding: 0.3rem 0.4rem;
  }
  .gr-position {
    min-height: 1.5rem;
    font-size: 1rem;
  }
  .gr-answers {
    padding: 0.6rem;
  }
  .gr-scorecard {
    padding: 0.65rem;
    flex-wrap: wrap;
  }
  .gr-screen button.gr-small {
    min-height: 2.5rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .gr-screen *,
  .gr-screen *::before,
  .gr-screen *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
/* Keep the current buzzer and navigation within reach while the operator scrolls. */
.gr-host-live {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  min-width: 0;
  padding: 0.65rem 1rem;
  border: 1px solid #355962;
  border-radius: 8px;
  background: #152835;
}
.gr-host-live strong {
  color: var(--aqua, #69e7dc);
  overflow-wrap: anywhere;
}
.gr-jump {
  display: none;
}
.gr-clock-setting {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.85rem 0;
}
.gr-clock-setting .gr-field {
  max-width: 11rem;
}
.gr-timer-controls [data-countdown] {
  font-variant-numeric: tabular-nums;
}
.gr-players li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.gr-presence-dot {
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border: 1px solid #939bb6;
  border-radius: 50%;
}
.gr-players [data-online="true"] .gr-presence-dot {
  background: #79e8d6;
  border-color: #79e8d6;
}
@media (max-width: 900px), (max-height: 550px) and (max-width: 1000px) {
  .gr-host-live {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #142332f7;
    box-shadow: 0 2px 10px #080a164d;
  }
  .gr-jump {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
  }
  .gr-jump a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.4rem 0.65rem;
    background: #202d45;
    border: 1px solid #435675;
    border-radius: 5px;
    font-size: 0.95rem;
  }
  #host-board,
  #host-controls {
    scroll-margin-top: 4.75rem;
  }
  .gr-host-round button,
  .gr-host-round button.gr-small {
    min-height: 44px;
  }
}
.gr-lightning-nav {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.gr-lightning-nav button {
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem;
}
.gr-lightning-nav button[aria-pressed="true"] {
  border-color: var(--iris);
  color: var(--iris);
  background: #332e4c;
}
.gr-lightning-entry form {
  display: grid;
  gap: 0.8rem;
}
.gr-lightning-entry h3 {
  font: 650 1.35rem/1.2 var(--headline, sans-serif);
}
.gr-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.gr-check input {
  width: 1.2rem;
  min-height: 1.2rem;
  accent-color: var(--aqua);
}
.gr-lightning-console .gr-buttons {
  margin-top: 0.6rem;
}
