:root {
  --bg-a: #1a1d22;
  --bg-b: #141117;
  --panel: #242830;
  --panel-soft: #2d333d;
  --ink: #f4f4f3;
  --ink-dim: #a3afc2;
  --accent: #f5b14b;
  --accent-strong: #ef8c2f;
  --ok: #59d185;
  --danger: #eb6868;
  --line: #3d4654;
  --side-rail-max: clamp(300px, 35vw, 700px);
  --side-gap-no-center: clamp(36px, 8vw, 160px);
  --bingo-edge-shift-left: 25%;
  --bingo-edge-shift-right: 25%;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--ink);
  font-family: "Chakra Petch", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 8% 12%, rgba(245, 177, 75, 0.16), transparent 42%),
    radial-gradient(circle at 82% 18%, rgba(239, 140, 47, 0.18), transparent 40%),
    linear-gradient(140deg, var(--bg-a), var(--bg-b) 62%);
}

#appShell {
  width: min(1920px, 99vw);
  margin: 6px auto;
}

body.roleStage {
  height: 100dvh;
  overflow: hidden;
}

body.roleStage #appShell {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  margin: 0;
}

body.roleStage #showView,
body.roleStage #roleContent {
  height: 100dvh;
  gap: 0;
}

.hidden {
  display: none !important;
}

.card {
  background: linear-gradient(150deg, rgba(49, 58, 70, 0.88), rgba(31, 35, 41, 0.92));
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  padding: 20px;
}

h1,
h2,
h3,
h4 {
  margin: 0;
}

h1,
.displayGameTitle {
  font-family: "Bebas Neue", "Chakra Petch", sans-serif;
  letter-spacing: 0.06em;
}

h1 {
  font-size: clamp(2rem, 3.8vw, 3.2rem);
}

.muted {
  color: var(--ink-dim);
}

form,
.stack {
  display: grid;
  gap: 10px;
}

label {
  color: var(--ink-dim);
  font-size: 0.94rem;
}

input,
textarea,
select,
button {
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(18, 20, 25, 0.82);
}

textarea {
  resize: vertical;
}

button {
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  color: #1d160f;
  border: none;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(239, 140, 47, 0.28);
}

button.secondary {
  background: rgba(84, 100, 123, 0.38);
  color: var(--ink);
  border: 1px solid var(--line);
}

button.danger {
  background: linear-gradient(90deg, #e16f6f, #bd4646);
  color: #fff;
}

.error {
  color: #ff9a9a;
}

.errorBox {
  margin: 0;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 154, 154, 0.4);
  background: rgba(140, 35, 35, 0.2);
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.86rem;
}

.hintBox {
  margin-top: 14px;
  display: grid;
  gap: 4px;
  color: var(--ink-dim);
  border: 1px dashed rgba(163, 175, 194, 0.3);
  border-radius: 10px;
  padding: 10px;
}

#showView {
  display: grid;
  gap: 12px;
}

#topBar {
  display: grid;
  gap: 10px;
  background: rgba(22, 24, 29, 0.8);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  backdrop-filter: blur(4px);
}

.topRow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.topRowActions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rolePill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(245, 177, 75, 0.4);
  background: rgba(245, 177, 75, 0.16);
  color: #ffd9a8;
  border-radius: 999px;
  padding: 5px 10px;
  font-weight: 700;
}

.statusLine {
  color: var(--ink-dim);
  font-size: 0.9rem;
}

.scoreGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.scoreCard {
  border-radius: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(120deg, rgba(57, 66, 80, 0.55), rgba(26, 29, 35, 0.9));
}

.scoreCard h3 {
  margin-bottom: 4px;
}

.scoreValue {
  font-size: 2rem;
  font-family: "Bebas Neue", sans-serif;
}

.winnerBanner {
  border-radius: 10px;
  border: 1px solid rgba(89, 209, 133, 0.5);
  background: rgba(89, 209, 133, 0.18);
  color: #c8ffdb;
  padding: 10px;
  font-weight: 600;
}

#roleContent {
  display: grid;
  gap: 12px;
}

.moderatorTabs {
  padding: 10px;
}

.tabRow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tabButton {
  background: rgba(84, 100, 123, 0.35);
  color: var(--ink);
}

.tabButton.active {
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  color: #1d160f;
}

.layoutTwo {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 12px;
}

.miniGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

.rowActions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  font-size: 0.75rem;
  color: #ffd9a8;
  border: 1px solid rgba(255, 217, 168, 0.35);
  border-radius: 999px;
  padding: 3px 9px;
}

.roundCard {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(22, 24, 29, 0.56);
  padding: 12px;
}

.scoreLiveCard {
  display: grid;
  gap: 8px;
}

.scoreLiveValue {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(1.8rem, 3.4vh, 3rem);
  line-height: 1;
}

.teamPanelCard {
  display: grid;
  gap: 8px;
}

.teamPanelTitle {
  font-size: 1.05rem;
}

.teamPanelTable {
  width: 100%;
  border-collapse: collapse;
}

.teamPanelTable th,
.teamPanelTable td {
  padding: 6px 4px;
  text-align: left;
  vertical-align: middle;
}

.teamPanelTable th {
  width: 34%;
  color: var(--ink-dim);
  font-size: 0.92rem;
  font-weight: 600;
}

.teamPanelTable td input {
  width: 100%;
}

.teamPanelNoteToggle {
  margin: 0;
}

.accessCodeTableWrap {
  overflow-x: auto;
}

.accessCodeTable {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.accessCodeTable th,
.accessCodeTable td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 6px;
  text-align: left;
  vertical-align: middle;
}

.accessCodeTable th {
  color: var(--ink-dim);
  font-size: 0.9rem;
  font-weight: 600;
}

.accessCodeTable td input[type="text"],
.accessCodeTable td input:not([type]) {
  width: 100%;
}

.accessCodeRole {
  font-weight: 700;
  color: #ffd9a8;
}

.accessCodePath {
  color: var(--ink-dim);
  font-size: 0.84rem;
}

.accessCodeDirectToggle {
  margin: 0;
  justify-content: flex-start;
}

.roundCard ul,
.roundCard ol {
  margin: 8px 0 0 18px;
  color: #d6deee;
}

.optionGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.optionChip {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(38, 44, 52, 0.8);
  padding: 8px;
}

.checklist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

.choiceLabel {
  display: flex;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(22, 24, 29, 0.7);
  padding: 8px;
}

.choiceLabel input {
  margin: 0;
}

.playerBanner {
  font-size: 1.08rem;
  color: #ffd9a8;
  font-weight: 600;
}

.submissionTable {
  width: 100%;
  border-collapse: collapse;
}

.submissionTable th,
.submissionTable td {
  border-bottom: 1px solid rgba(163, 175, 194, 0.2);
  padding: 8px 6px;
  text-align: left;
  vertical-align: top;
}

.submissionTable th {
  color: #ffd9a8;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.bingoMarkGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.bingoMarkButton {
  min-height: 78px;
  aspect-ratio: 1 / 1;
  background: rgba(84, 100, 123, 0.35);
  color: var(--ink);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.bingoMarkButton.active {
  background: rgba(89, 209, 133, 0.2);
  border-color: rgba(89, 209, 133, 0.6);
}

.bingoMarkButton.teamMarked {
  background: rgba(245, 177, 75, 0.25);
  border-color: rgba(245, 177, 75, 0.8);
}

.bingoMarkButton.active.teamMarked {
  background: rgba(89, 209, 133, 0.26);
  border-color: rgba(89, 209, 133, 0.85);
}

.bingoBoard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.bingoCell {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  background: rgba(17, 20, 24, 0.8);
  display: grid;
  gap: 4px;
  aspect-ratio: 1 / 1;
}

.bingoCell input[data-bingo-word] {
  font-size: clamp(0.9rem, 1.8vh, 1.2rem);
  padding: 8px;
  height: 100%;
}

.previewImage,
.optionImage {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  object-fit: cover;
  max-height: 210px;
}

.optionMediaLabel {
  align-items: flex-start;
  flex-direction: column;
}

.emojiPoolGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 6px;
}

.emojiChip {
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 6px;
  background: rgba(28, 32, 38, 0.9);
}

.emojiChip input {
  margin: 0;
}

.emojiChip.active {
  border-color: rgba(245, 177, 75, 0.8);
  background: rgba(245, 177, 75, 0.15);
}

.displayStage {
  height: 100dvh;
  min-height: 100dvh;
  border-radius: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(52, 62, 75, 0.95), rgba(18, 20, 26, 0.95)),
    repeating-linear-gradient(
      -35deg,
      rgba(255, 255, 255, 0.02) 0,
      rgba(255, 255, 255, 0.02) 8px,
      transparent 8px,
      transparent 16px
    );
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.42);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
}

.displayMain {
  padding: 15px clamp(14px, 2.2vw, 28px) clamp(8px, 1.2vh, 12px);
  overflow: hidden;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: clamp(6px, 1vh, 12px);
}

.displayHeaderRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start;
  column-gap: clamp(10px, 1.4vw, 20px);
  min-height: clamp(62px, 8.6vh, 96px);
}

.displayHeaderSide.left {
  display: flex;
  align-items: flex-start;
  justify-self: start;
}

.displayHeaderSide.right {
  display: flex;
  align-items: flex-start;
  justify-self: end;
}

.displayChoiceStrip {
  padding: clamp(6px, 0.8vh, 10px) clamp(12px, 1.6vw, 18px) 0;
}

.displayChoiceStrip .displayChoiceGroups {
  margin: 0;
}

.displayInputArea {
  margin-bottom: clamp(4px, 0.8vh, 10px);
}

.playerInputCard {
  border-radius: 12px;
  padding: 10px 12px;
  gap: 8px;
}

.playerInputCard h2 {
  font-size: clamp(1.1rem, 2.1vh, 1.5rem);
}

.playerInputCard h3 {
  font-size: clamp(1rem, 1.9vh, 1.3rem);
}

.playerInputCard textarea {
  min-height: 56px;
  max-height: 18vh;
}

.playerInputCard.talkBingoInline {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.displayGameTitle {
  font-size: clamp(1.8rem, 4.1vh, 3.6rem);
  text-align: center;
  line-height: 1;
  margin: 0;
}

.displayHeaderRow .displayGameTitle {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  align-self: start;
  margin: 0;
  transform: none;
  line-height: 1;
  position: relative;
  top: 5px;
}

.displayRoundMeta {
  justify-self: start;
  align-self: start;
  color: #ffd9a8;
  font-weight: 700;
  margin: 0;
  font-size: clamp(0.95rem, 1.6vh, 1.25rem);
  border: 1px solid rgba(255, 217, 168, 0.45);
  border-radius: 10px;
  background: rgba(20, 24, 30, 0.85);
  padding: clamp(4px, 0.6vh, 8px) clamp(10px, 1vw, 14px);
  line-height: 1;
}

.displayRoundMetaBottom {
  justify-self: center;
  align-self: center;
  font-size: clamp(1.2rem, 2vh, 1.55rem);
  padding: clamp(4px, 0.7vh, 8px) clamp(10px, 1.1vw, 15px);
  border-radius: 12px;
}

.displayRoundTimer {
  color: #ffe4ba;
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 0.04em;
  font-size: clamp(2.43rem, 4.5vh, 3.75rem);
  border: 1px solid rgba(255, 217, 168, 0.45);
  border-radius: 12px;
  background: rgba(20, 24, 30, 0.85);
  padding: clamp(8px, 1.32vh, 15px) clamp(21px, 2.15vw, 30px);
  line-height: 1;
}

.displayEstimateBoard {
  margin-top: clamp(-24px, -2vh, -12px);
  display: grid;
  gap: clamp(10px, 1.5vh, 22px);
  align-content: start;
}

.displayEstimateRow {
  --estimate-q-height: clamp(44px, 5.4vh, 74px);
  display: grid;
  grid-template-columns:
    clamp(72px, 7vw, 120px)
    minmax(170px, 1fr)
    minmax(260px, 1.3fr)
    minmax(170px, 1fr)
    clamp(72px, 7vw, 120px);
  gap: clamp(8px, 0.9vw, 14px);
  align-items: start;
}

.displayEstimateCenterCol {
  display: grid;
  gap: clamp(4px, 0.55vh, 8px);
}

.displayEstimateQuestion,
.displayEstimateCorrect,
.displayEstimatePoints {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background: rgba(24, 30, 38, 0.82);
  display: grid;
  place-items: center;
  text-align: center;
}

.displayEstimateQuestion {
  padding: clamp(6px, 0.9vh, 12px);
  min-height: var(--estimate-q-height);
  font-size: clamp(1rem, 2vh, 1.55rem);
  font-weight: 700;
}

.displayEstimateCorrect {
  padding: clamp(5px, 0.8vh, 10px);
  min-height: clamp(32px, 4.2vh, 56px);
  font-size: clamp(0.95rem, 1.7vh, 1.3rem);
  color: #ffe7c2;
}

.displayEstimateCorrect.empty {
  visibility: hidden;
}

.displayEstimateAnswer {
  display: flex;
  align-items: center;
}

.displayEstimateAnswerValue {
  width: 75%;
  min-height: var(--estimate-q-height);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background: rgba(24, 30, 38, 0.82);
  display: grid;
  place-items: center;
  text-align: center;
  padding: clamp(6px, 0.9vh, 10px);
  font-size: clamp(0.95rem, 1.85vh, 1.35rem);
}

.displayEstimateAnswer.left {
  justify-content: flex-start;
}

.displayEstimateAnswer.right {
  justify-content: flex-end;
}

.displayEstimatePoints {
  min-height: var(--estimate-q-height);
  align-self: start;
  padding: 0 clamp(4px, 0.6vw, 8px);
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(1.45rem, 2.8vh, 2.3rem);
  line-height: 1;
}

.estimatePreviewList {
  display: grid;
  gap: 6px;
}

.estimatePreviewRow {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
}

.estimatePrepGrid {
  display: grid;
  gap: 12px;
}

.estimatePrepRow {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.biddingPrepGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 10px;
}

.biddingPrepItem {
  display: grid;
  gap: 4px;
}

.biddingPrepItem span {
  font-weight: 700;
  color: var(--muted);
}

.estimateModGrid {
  display: grid;
  gap: 12px;
}

.estimateModRow {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  display: grid;
  grid-template-columns: 90px 1fr 1.15fr 1fr 90px;
  gap: 8px 10px;
  align-items: center;
}

.estimateModQuestion {
  font-weight: 700;
  text-align: center;
}

.estimateModAnswer.left {
  text-align: left;
}

.estimateModAnswer.right {
  text-align: right;
}

.estimateModPoints {
  text-align: center;
  font-weight: 700;
}

.estimateModCorrectWrap {
  grid-column: 3;
  display: grid;
  gap: 6px;
}

.estimateModCorrectInput {
  width: 100%;
}

.estimateVisibilityGrid {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, minmax(84px, 0.8fr));
  gap: 6px 10px;
  align-items: center;
}

.estimateVisibilityHead {
  font-weight: 700;
  color: var(--muted);
}

.estimateVisibilityPlayer {
  font-weight: 600;
}

.displayPrompt {
  margin-top: 4px;
  font-size: clamp(1.15rem, 2.7vh, 2rem);
  line-height: 1.15;
  text-align: center;
}

.displayPrompt.matchingChoicePrompt {
  margin-top: clamp(14px, 2.7vh, 34px);
}

.displayContext {
  font-size: clamp(0.92rem, 1.7vh, 1.2rem);
  margin: 0;
  text-align: center;
}

.displayOptionGrid {
  margin-top: 6px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.displayOptionGrid.choiceMode {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(10px, 1.1vw, 16px);
}

.displayOptionGrid.choiceMode.matchingChoiceOptions {
  margin-top: clamp(14px, 2.5vh, 30px);
}

.displayOption {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 8px;
  background: rgba(30, 34, 40, 0.8);
  font-size: clamp(0.95rem, 1.8vh, 1.25rem);
}

.choiceOption {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  color: var(--ink);
  font-size: clamp(1.05rem, 2.15vh, 1.8rem);
  font-weight: 600;
}

.displayOptionGrid.choiceMode.matchingChoiceOptions .choiceOption {
  font-size: clamp(1.2rem, 2.45vh, 2.05rem);
  padding: clamp(10px, 1.2vh, 16px);
}

button.choiceOption {
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(30, 34, 40, 0.86);
}

button.choiceOption.active {
  border-color: rgba(245, 177, 75, 0.9);
  background: rgba(245, 177, 75, 0.22);
}

.choiceLetter {
  min-width: clamp(2rem, 3.3vh, 2.8rem);
  min-height: clamp(2rem, 3.3vh, 2.8rem);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(14, 18, 23, 0.72);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(1.2rem, 2.8vh, 2.3rem);
  line-height: 1;
}

.displayImageMatchStageHint,
.displayImageMatchWaiting {
  margin-top: clamp(8px, 1.2vh, 14px);
  text-align: center;
  font-size: clamp(1.02rem, 1.95vh, 1.45rem);
  color: #ffe7c2;
  font-weight: 600;
}

.displayImageMatchGrid {
  margin-top: clamp(8px, 1.2vh, 14px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(clamp(142px, 13.2vw, 210px), 1fr));
  gap: clamp(8px, 1vw, 14px);
}

.displayImageMatchGrid.mod {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.displayImageMatchCard {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: rgba(26, 30, 37, 0.84);
  padding: clamp(6px, 0.9vh, 10px);
  display: grid;
  gap: clamp(5px, 0.7vh, 8px);
  align-content: start;
}

.displayImageMatchCard.mod {
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

button.displayImageMatchCard.mod:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.displayImageMatchCard.target {
  border-color: rgba(245, 177, 75, 0.9);
  box-shadow: 0 0 0 2px rgba(245, 177, 75, 0.28) inset;
}

.displayImageMatchCard.picked {
  border-color: rgba(89, 209, 133, 0.88);
  box-shadow: 0 0 0 2px rgba(89, 209, 133, 0.24) inset;
}

.displayImageMatchMedia {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(16, 20, 25, 0.92);
}

.displayImageMatchImage {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.displayImageMatchPlaceholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: clamp(1.3rem, 2.4vh, 2rem);
  font-weight: 700;
  color: #ffd9a8;
}

.displayImageMatchLabel {
  text-align: center;
  font-size: clamp(1rem, 1.85vh, 1.38rem);
  line-height: 1.15;
  font-weight: 700;
}

.displayImageMatchMeta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}

.displayQuizStrip {
  margin-top: clamp(6px, 1vh, 12px);
  width: 100%;
  display: grid;
}

.displayQuizStrip.display {
  grid-template-columns: 1fr 1fr;
  column-gap: var(--side-gap-no-center);
}

.displayQuizStrip.player {
  grid-template-columns: 1fr;
}

.displayQuizControlWrap,
.displayQuizTeamValue,
.displayQuizPlayerValues {
  width: min(100%, var(--side-rail-max));
}

.displayQuizControlWrap {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: rgba(20, 24, 30, 0.84);
  padding: clamp(8px, 1vh, 12px);
  display: grid;
  gap: 8px;
}

.displayQuizControlWrap.done {
  border-color: rgba(89, 209, 133, 0.8);
  box-shadow: 0 0 0 1px rgba(89, 209, 133, 0.28) inset;
}

.displayQuizControlWrap.locked {
  border-color: rgba(255, 120, 120, 0.7);
}

.displayQuizControlWrap.team1 {
  justify-self: start;
}

.displayQuizControlWrap.team2 {
  justify-self: end;
}

.displayQuizControlLabel {
  color: #ffd9a8;
  font-weight: 700;
  font-size: clamp(1rem, 1.8vh, 1.35rem);
}

.displayQuizTextInput {
  min-height: clamp(44px, 5.7vh, 70px);
  font-size: clamp(1.05rem, 2.1vh, 1.55rem);
  font-weight: 600;
}

.displayQuizBuzzer {
  min-height: clamp(56px, 7vh, 90px);
  font-size: clamp(1.4rem, 2.9vh, 2.3rem);
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 0.05em;
}

.displayQuizBuzzer.buzzed {
  background: rgba(89, 209, 133, 0.28);
  color: #dffde9;
  border: 1px solid rgba(89, 209, 133, 0.68);
}

.displayQuizDoneRow {
  display: flex;
  align-items: center;
  gap: 10px;
}

.displayQuizDoneRow button.active {
  border-color: rgba(89, 209, 133, 0.82);
  background: rgba(89, 209, 133, 0.26);
  color: #dcffe9;
}

.displayQuizLockHint {
  color: #ffd6d6;
  font-size: clamp(0.9rem, 1.55vh, 1.15rem);
  font-weight: 600;
}

.displayQuizSliderBounds {
  display: flex;
  justify-content: space-between;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(1rem, 1.9vh, 1.55rem);
  line-height: 1;
}

.displayQuizTeamValue,
.displayQuizPlayerValue {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: rgba(24, 30, 38, 0.82);
  min-height: clamp(48px, 6.1vh, 74px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: clamp(8px, 0.9vh, 12px);
  font-size: clamp(1.02rem, 2.1vh, 1.6rem);
  font-weight: 700;
}

.displayQuizTeamValue.left,
.displayQuizPlayerValues.left {
  justify-self: start;
}

.displayQuizTeamValue.right,
.displayQuizPlayerValues.right {
  justify-self: end;
}

.displayQuizPlayerValues {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(8px, 1vw, 14px);
}

.displayQuizPlayerValue {
  min-height: clamp(42px, 5.4vh, 66px);
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(1.45rem, 3vh, 2.5rem);
}

.displayQuizPromptBox,
.displayQuizSolutionBox {
  margin-top: clamp(10px, 1.3vh, 18px);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 14px;
  background: rgba(20, 24, 30, 0.86);
  padding: clamp(12px, 1.5vh, 20px) clamp(14px, 1.8vw, 24px);
  text-align: center;
  width: min(100%, 1100px);
  margin-inline: auto;
}

.displayQuizPromptBox {
  margin-top: clamp(18px, 2.4vh, 34px);
  font-size: clamp(1.45rem, 3.1vh, 2.6rem);
  font-weight: 700;
}

.displayQuizSolutionBox {
  margin-top: clamp(6px, 0.8vh, 12px);
  font-size: clamp(1.2rem, 2.3vh, 1.9rem);
  color: #ffe7c2;
  font-weight: 700;
}

.displayQuizStrip.display.sliderReveal {
  align-items: start;
}

.displayQuizStrip.display.sliderReveal.noCenter {
  grid-template-columns: 1fr 1fr;
  column-gap: var(--side-gap-no-center);
}

.displayQuizStrip.display.sliderReveal.withCenter {
  grid-template-columns: 1fr auto 1fr;
  column-gap: clamp(14px, 2.4vw, 36px);
}

.displayQuizStrip.display.sliderReveal.single {
  grid-template-columns: 1fr;
}

.displayQuizStrip.display.sliderReveal.single.team1Only .displayQuizSliderTeam.team1 {
  justify-self: start;
}

.displayQuizStrip.display.sliderReveal.single.team2Only .displayQuizSliderTeam.team2 {
  justify-self: end;
}

.displayQuizSliderSpacer {
  pointer-events: none;
}

.displayQuizSliderTeam {
  width: min(100%, var(--side-rail-max));
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: rgba(20, 24, 30, 0.84);
  padding: clamp(8px, 1vh, 12px);
  display: grid;
  gap: 8px;
}

.displayQuizSliderTeam.team1 {
  justify-self: start;
}

.displayQuizSliderTeam.team2 {
  justify-self: end;
}

.displayQuizSliderHead {
  font-weight: 700;
  color: #ffd9a8;
}

.displayQuizSliderTrack {
  position: relative;
  min-height: clamp(78px, 10vh, 120px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background: rgba(13, 17, 22, 0.85);
  overflow: hidden;
}

.displayQuizTick {
  position: absolute;
  top: 0;
  bottom: 0;
  transform: translateX(-1px);
  pointer-events: none;
}

.displayQuizTick.minor {
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.displayQuizTick.major {
  border-left: 2px solid rgba(255, 255, 255, 0.33);
}

.displayQuizSliderMid {
  position: absolute;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: rgba(89, 209, 133, 0.9);
  transform: translateX(-1px);
}

.displayQuizSliderMark {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}

.displayQuizSliderMark.a {
  top: 34%;
}

.displayQuizSliderMark.b {
  top: 68%;
}

.displayQuizSliderNeedle {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  border-radius: 3px;
}

.displayQuizSliderNeedle.a {
  top: -36px;
  height: 76px;
  background: rgba(239, 140, 47, 0.95);
}

.displayQuizSliderNeedle.b {
  bottom: -36px;
  height: 76px;
  background: rgba(89, 209, 133, 0.95);
}

.displayQuizSliderMark span {
  display: inline-block;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(25, 31, 39, 0.94);
  padding: clamp(4px, 0.6vh, 8px) clamp(6px, 0.8vw, 10px);
  font-size: clamp(0.9rem, 1.55vh, 1.2rem);
  font-weight: 700;
  white-space: nowrap;
}

.displayQuizSliderMark.a span {
  border-color: rgba(239, 140, 47, 0.76);
}

.displayQuizSliderMark.b span {
  border-color: rgba(89, 209, 133, 0.76);
}

.displayQuizSliderMean {
  text-align: center;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(1rem, 1.85vh, 1.5rem);
  letter-spacing: 0.03em;
}

.displayQuizSliderScale {
  display: flex;
  justify-content: space-between;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(1rem, 1.85vh, 1.45rem);
  line-height: 1;
}

.displayQuizSliderEmpty {
  min-height: clamp(56px, 6.8vh, 88px);
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.25);
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
}

.displayQuizSliderTeam.hidden {
  visibility: hidden;
}

.matchProgressWrap {
  margin-top: clamp(8px, 1.1vh, 16px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: var(--side-gap-no-center);
  width: 100%;
}

.matchProgressWrap.withWheel {
  grid-template-columns: 1fr minmax(360px, 1.2fr) 1fr;
  align-items: end;
}

.matchProgressCol {
  width: min(100%, var(--side-rail-max));
  display: grid;
  justify-items: center;
  gap: 8px;
}

.matchProgressCol.left {
  justify-self: start;
}

.matchProgressCol.right {
  justify-self: end;
}

.matchProgressTrack {
  width: clamp(36px, 3.8vw, 78px);
  height: clamp(180px, 42vh, 520px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(12, 15, 20, 0.9);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.matchProgressFill {
  width: 100%;
  min-height: 0;
  transition: height 180ms ease-out;
}

.matchProgressMeta {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(2rem, 3.6vh, 3.4rem);
  letter-spacing: 0.04em;
  line-height: 1;
}

.matchProgressCenter {
  align-self: end;
  justify-self: center;
}

.matchWheelCard {
  width: clamp(340px, 30vw, 560px);
  display: grid;
  justify-items: center;
  gap: 10px;
  position: relative;
  padding-top: 8px;
}

.matchWheelDisc {
  width: clamp(330px, 30vw, 540px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 4px solid rgba(255, 217, 168, 0.92);
  background: var(--wheel-bg, conic-gradient(from -90deg, #ef8c2f 0deg 180deg, #59d185 180deg 360deg));
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.38);
  position: relative;
  transform: rotate(var(--wheel-target, 0deg));
  overflow: visible;
}

.matchWheelDisc.spinning {
  animation: wheelSpin 2800ms cubic-bezier(0.18, 0.86, 0.15, 1) forwards;
}

@keyframes wheelSpin {
  from {
    transform: rotate(var(--wheel-prev, -1440deg));
  }
  to {
    transform: rotate(var(--wheel-target, 0deg));
  }
}

.matchWheelLabel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(var(--label-angle))
    translateY(calc(clamp(330px, 30vw, 540px) * -0.38))
    rotate(calc(var(--label-angle) * -1));
  transform-origin: center;
  width: clamp(138px, 11.8vw, 226px);
  text-align: center;
  pointer-events: none;
  z-index: 1;
}

.matchWheelLabel span {
  display: inline-block;
  color: #10151b;
  font-weight: 800;
  line-height: 1.04;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.matchWheelLabel.fitBase span {
  font-size: clamp(1.02rem, 1.9vh, 1.7rem);
}

.matchWheelLabel.fitSmall span {
  font-size: clamp(0.92rem, 1.65vh, 1.42rem);
}

.matchWheelLabel.fitTiny span {
  font-size: clamp(0.8rem, 1.45vh, 1.2rem);
}

.matchWheelPointer {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 24px;
  background: #fff3da;
  clip-path: polygon(50% 100%, 0 0, 100% 0);
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
  z-index: 2;
}

.matchWheelCenterDot {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: clamp(14px, 1.3vw, 20px);
  height: clamp(14px, 1.3vw, 20px);
  border-radius: 50%;
  background: #fff2d8;
  border: 2px solid rgba(20, 24, 30, 0.7);
  z-index: 2;
}

.matchWheelResult {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(20, 24, 30, 0.85);
  text-align: center;
  padding: clamp(8px, 1vh, 12px);
  font-weight: 700;
  font-size: clamp(1.05rem, 1.95vh, 1.55rem);
}

.matchWheelDisc.spinning ~ .matchWheelResult {
  opacity: 0;
  animation: wheelResultReveal 2800ms step-end forwards;
}

@keyframes wheelResultReveal {
  0%,
  99% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.displayList {
  margin: 6px 0 0 18px;
  font-size: clamp(0.94rem, 1.8vh, 1.22rem);
}

.orderingBoardWrap {
  margin-top: clamp(8px, 1.2vh, 14px);
  display: grid;
  grid-template-columns:
    minmax(0, clamp(248px, 26vw, var(--side-rail-max)))
    minmax(0, clamp(286px, 31vw, 540px))
    minmax(0, clamp(248px, 26vw, var(--side-rail-max)));
  justify-content: center;
  align-items: start;
  column-gap: clamp(14px, 2vw, 28px);
}

.orderingSideCol {
  display: grid;
  gap: clamp(6px, 0.9vh, 10px);
  align-content: start;
}

.orderingCenterCol {
  display: grid;
  justify-items: center;
}

.orderingCenterFlow {
  width: min(100%, clamp(286px, 31vw, 540px));
  display: grid;
  gap: 0;
  align-content: start;
}

.orderingSideCell,
.orderingCenterItem {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  background: rgba(24, 30, 38, 0.82);
  min-height: 0;
  padding: clamp(2px, 0.36vh, 5px) clamp(9px, 1.05vw, 16px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  text-align: center;
  font-size: clamp(1.43rem, 2.86vh, 2.145rem);
  line-height: 1.1;
  font-weight: 700;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.orderingCenterItem.fixed {
  border-color: rgba(245, 177, 75, 0.88);
  background: rgba(245, 177, 75, 0.2);
}

.orderingArrowRow {
  position: relative;
  height: 0;
  overflow: visible;
}

.orderingGapMarker {
  position: absolute;
  right: calc(100% + clamp(8px, 1vw, 14px));
  top: 0;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: clamp(6px, 0.72vw, 11px);
}

.orderingGapNum {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(1.2rem, 2.3vh, 1.95rem);
  line-height: 1;
  color: #ffd9a8;
  font-weight: 700;
}

.orderingGapArrow {
  font-family: "Chakra Petch", sans-serif;
  font-size: clamp(1.62rem, 3vh, 2.7rem);
  line-height: 1;
  color: #ffd9a8;
  font-weight: 800;
  text-shadow: 0 0 1px rgba(255, 217, 168, 0.6);
}

.orderingCenterEmpty {
  width: min(100%, clamp(286px, 31vw, 540px));
  min-height: clamp(94px, 13vh, 156px);
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.28);
  background: rgba(20, 24, 30, 0.72);
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 600;
}

.orderingModList {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.orderingModCell {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 10px;
  background: rgba(24, 30, 38, 0.82);
  color: var(--ink);
  min-height: clamp(44px, 5.8vh, 74px);
  padding: clamp(4px, 0.6vh, 8px) clamp(8px, 0.9vw, 12px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 8px;
  text-align: left;
  font-size: clamp(0.98rem, 1.85vh, 1.38rem);
  font-weight: 700;
}

.orderingModCell.active {
  border-color: rgba(89, 209, 133, 0.84);
  background: rgba(89, 209, 133, 0.2);
}

.orderingModCell.fixed {
  border-color: rgba(245, 177, 75, 0.88);
  background: rgba(245, 177, 75, 0.22);
  cursor: default;
}

.orderingModCell:disabled {
  opacity: 1;
}

.orderingModIndex {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(1.02rem, 1.95vh, 1.65rem);
  color: #ffd9a8;
  line-height: 1;
}

.orderingFixedTag {
  font-size: clamp(0.72rem, 1.2vh, 0.98rem);
  font-weight: 700;
  text-transform: uppercase;
  color: #fff3d5;
}

.biddingBoardWrap {
  --bidding-row-h: clamp(34px, 3.9vh, 58px);
  --bidding-gap: clamp(6px, 0.7vw, 10px);
  margin-top: clamp(-10px, -1vh, -4px);
  display: grid;
  grid-template-columns:
    minmax(0, clamp(230px, 24vw, 420px))
    minmax(clamp(66px, 7vw, 112px), auto)
    minmax(0, clamp(230px, 24vw, 420px));
  justify-content: center;
  align-items: stretch;
  column-gap: clamp(10px, 1.5vw, 24px);
}

.biddingBoardCenter {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
}

.biddingBoardMeta {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(1.7rem, 3.2vh, 2.9rem);
  line-height: 1;
  text-align: center;
  border: 1px solid rgba(255, 217, 168, 0.46);
  border-radius: 10px;
  background: rgba(18, 22, 28, 0.9);
  padding: clamp(7px, 1vh, 12px) clamp(8px, 1vw, 16px);
  min-width: clamp(64px, 6vw, 112px);
}

.biddingBoardGrid {
  display: grid;
  gap: var(--bidding-gap);
  grid-auto-rows: minmax(var(--bidding-row-h), auto);
  align-content: center;
  min-height: calc((var(--bidding-row-h) * 12) + (var(--bidding-gap) * 11));
}

.biddingBoardGrid.fixed24 {
  grid-template-rows: none;
}

.biddingCell {
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background: rgba(24, 30, 38, 0.82);
  padding: clamp(5px, 0.65vh, 9px) clamp(8px, 0.9vw, 12px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(6px, 0.7vw, 11px);
  text-align: left;
}

.biddingCell.revealed {
  border-color: rgba(245, 177, 75, 0.88);
  background: rgba(245, 177, 75, 0.18);
}

.biddingCellNumber {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(1.1rem, 2vh, 1.8rem);
  line-height: 1;
  color: #ffd9a8;
  justify-self: start;
  width: clamp(22px, 2.8vw, 34px);
}

.biddingCellText {
  font-size: clamp(1.02rem, 1.9vh, 1.42rem);
  font-weight: 700;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  justify-self: start;
}

.biddingCell.masked .biddingCellText {
  opacity: 0;
}

.biddingModBoard {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  background: rgba(12, 16, 22, 0.58);
}

.biddingBoardGrid.mod .biddingCell {
  cursor: pointer;
}

.biddingBoardGrid.mod button.biddingCell {
  color: var(--ink);
  width: 100%;
  text-align: left;
}

.biddingBoardGrid.mod .biddingCell.masked .biddingCellText {
  opacity: 1;
}

.biddingBoardGrid.display .biddingCell.masked .biddingCellText {
  opacity: 0;
}

.memoryBoardWrap {
  margin-top: clamp(8px, 1.1vh, 14px);
  width: min(100%, 1500px);
  margin-inline: auto;
}

.memoryBoard {
  display: grid;
  grid-template-columns: repeat(10, clamp(64px, 7.2vw, 104px));
  justify-content: center;
  gap: clamp(4px, 0.55vw, 8px);
}

.memoryCell {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 10px;
  background: rgba(24, 30, 38, 0.84);
  min-height: clamp(64px, 7.2vw, 104px);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  padding: 0;
  font-weight: 700;
  line-height: 1;
}

.memoryBoard.mod .memoryCell {
  cursor: pointer;
}

button.memoryCell {
  color: var(--ink);
}

.memoryCell.masked {
  background: rgba(19, 23, 29, 0.86);
  color: #ffd9a8;
}

.memoryCell.open {
  background: rgba(35, 42, 52, 0.9);
}

.memoryCell.matched {
  border-color: rgba(89, 209, 133, 0.88);
  background: rgba(89, 209, 133, 0.2);
}

.memoryCell.selected {
  border-color: rgba(245, 177, 75, 0.95);
  box-shadow: 0 0 0 2px rgba(245, 177, 75, 0.4) inset;
}

.memoryEmoji {
  font-size: clamp(1.3rem, 2.65vh, 2.4rem);
}

.memoryIndex {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(0.82rem, 1.55vh, 1.25rem);
}

.setBoardWrap {
  margin-top: clamp(8px, 1.1vh, 14px);
  width: min(100%, 1320px);
  margin-inline: auto;
}

.setBoard {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, clamp(140px, 15vw, 230px)));
  justify-content: center;
  gap: clamp(8px, 1vw, 14px);
}

.setCard {
  --set-color: #ff6d6d;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  background: rgba(24, 30, 38, 0.84);
  min-height: clamp(104px, 12vh, 166px);
  aspect-ratio: 5 / 3;
  display: grid;
  place-items: center;
  padding: clamp(8px, 1vh, 12px);
  color: var(--set-color);
  position: relative;
}

button.setCard {
  color: var(--set-color);
  width: 100%;
}

.setCard.interactive {
  cursor: pointer;
}

.setCard.selected {
  border-color: rgba(245, 177, 75, 0.92);
  box-shadow: 0 0 0 2px rgba(245, 177, 75, 0.36) inset;
}

.setCard.revealed {
  border-color: rgba(89, 209, 133, 0.92);
  box-shadow: 0 0 0 2px rgba(89, 209, 133, 0.36) inset;
}

.setCard.empty {
  color: #ffd9a8;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(1rem, 1.9vh, 1.55rem);
}

.setCardIndex {
  position: absolute;
  left: clamp(6px, 0.7vw, 10px);
  top: clamp(5px, 0.6vh, 9px);
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(1.02rem, 1.85vh, 1.6rem);
  line-height: 1;
  color: #ffe2bb;
  opacity: 0.9;
}

.setGlyphGroup {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 0.75vw, 10px);
}

.setGlyph {
  display: block;
  width: clamp(34px, 3.2vw, 58px);
  height: clamp(14px, 1.5vh, 22px);
  border: clamp(2px, 0.2vw, 3px) solid currentColor;
  background: transparent;
}

.setGlyph.shape-oval {
  border-radius: 999px;
}

.setGlyph.shape-diamond {
  width: clamp(28px, 2.8vw, 46px);
  height: clamp(28px, 2.8vw, 46px);
  border-radius: 10px;
  transform: rotate(45deg) scale(0.56, 0.56);
}

.setGlyph.shape-squiggle {
  width: clamp(18px, 1.9vw, 30px);
  height: clamp(30px, 3.4vh, 52px);
  border-radius: 999px;
  transform: skewY(-24deg);
}

.setCard.fill-solid .setGlyph {
  background: currentColor;
}

.setCard.fill-striped .setGlyph {
  background: repeating-linear-gradient(
    135deg,
    currentColor 0,
    currentColor 5px,
    transparent 5px,
    transparent 10px
  );
}

.setCard.fill-open .setGlyph {
  background: transparent;
}

.setCard.color-red {
  --set-color: #ff7676;
}

.setCard.color-green {
  --set-color: #6edc9b;
}

.setCard.color-purple {
  --set-color: #bf91ff;
}

.setBoardEmpty {
  min-height: clamp(96px, 12vh, 160px);
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.28);
  background: rgba(20, 24, 30, 0.72);
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 600;
}

.setSolutionBlock {
  display: grid;
  gap: 6px;
}

.setSolutionList {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.setSolutionChip {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(22, 28, 34, 0.85);
  padding: 4px 9px;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(1rem, 1.75vh, 1.35rem);
  line-height: 1;
  color: #ffd9a8;
}

.displayEmojiCompose,
.displayEmojiReveal {
  margin-top: 6px;
  border: 1px solid rgba(255, 217, 168, 0.35);
  border-radius: 12px;
  padding: clamp(8px, 1vh, 12px);
  display: grid;
  gap: clamp(8px, 1vh, 12px);
}

.displayEmojiWordLabel {
  text-align: center;
  font-weight: 700;
  color: #ffd9a8;
  font-size: clamp(1.05rem, 2vh, 1.6rem);
}

.displayEmojiWordBox {
  min-height: clamp(44px, 6.6vh, 76px);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(16, 20, 26, 0.85);
  display: grid;
  place-items: center;
  text-align: center;
  font-weight: 700;
  font-size: clamp(1.2rem, 2.6vh, 2.05rem);
  padding: 4px 10px;
}

.displayEmojiPoolGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(34px, 3.3vw, 52px), 1fr));
  gap: clamp(4px, 0.5vw, 8px);
  max-height: clamp(170px, 27vh, 340px);
  overflow: auto;
  padding-right: 2px;
}

.displayEmojiPick {
  min-height: clamp(34px, 4vh, 50px);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(27, 32, 39, 0.86);
  display: grid;
  place-items: center;
  font-size: clamp(1.25rem, 2.2vh, 2rem);
  line-height: 1;
  padding: 0;
  color: var(--ink);
}

.displayEmojiPick:hover {
  transform: none;
  box-shadow: none;
}

.displayEmojiPick.active {
  border-color: rgba(245, 177, 75, 0.9);
  background: rgba(245, 177, 75, 0.24);
}

.displayEmojiCompose .rowActions button.active {
  border-color: rgba(89, 209, 133, 0.85);
  background: rgba(89, 209, 133, 0.26);
  color: #dcffe9;
}

.displayEmojiSlots {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(6px, 0.75vw, 10px);
}

.displayEmojiSlot {
  min-height: clamp(42px, 6.2vh, 78px);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(16, 20, 26, 0.86);
  display: grid;
  place-items: center;
  font-size: clamp(1.45rem, 2.9vh, 2.45rem);
  line-height: 1;
}

.displayEmojiSlot.mini {
  min-height: clamp(32px, 4.6vh, 54px);
  font-size: clamp(1.1rem, 2.2vh, 1.7rem);
}

.displayEmojiAllSets {
  margin-top: 6px;
  display: grid;
  align-items: start;
}

.displayEmojiAllSets.noCenter {
  grid-template-columns: 1fr 1fr;
  column-gap: var(--side-gap-no-center);
  width: 100%;
}

.displayEmojiAllSets.withCenter {
  grid-template-columns: 1fr min(300px, 31vw) 1fr;
}

.displayEmojiSetColumn {
  display: grid;
  gap: clamp(16px, 2vh, 28px);
  width: min(100%, var(--side-rail-max));
}

.displayEmojiSetColumn.left {
  justify-self: start;
}

.displayEmojiSetColumn.right {
  justify-self: end;
}

.displayEmojiSetCard {
  border: 1px solid rgba(255, 217, 168, 0.28);
  border-radius: 10px;
  background: rgba(20, 24, 30, 0.82);
  padding: clamp(6px, 0.85vh, 10px);
  display: grid;
  gap: clamp(6px, 0.85vh, 10px);
}

.displayEmojiSetName {
  text-align: center;
  font-weight: 700;
  color: #ffd9a8;
  font-size: clamp(1rem, 1.8vh, 1.4rem);
}

.displayEmojiCollectInfo {
  margin-top: 6px;
  text-align: center;
  border: 1px dashed rgba(255, 217, 168, 0.38);
  border-radius: 12px;
  padding: clamp(10px, 1.5vh, 16px);
  color: #ffd9a8;
  font-size: clamp(1.15rem, 2.2vh, 1.7rem);
}

.displayBingoWrap {
  margin-top: 6px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: var(--side-gap-no-center);
  row-gap: clamp(10px, 1.4vw, 18px);
  width: 100%;
}

.displayBingoBoard {
  width: min(90%, calc(var(--side-rail-max) * 0.9));
}

.displayBingoBoard.team1 {
  justify-self: start;
  transform: translateX(var(--bingo-edge-shift-left));
  transform-origin: left center;
}

.displayBingoBoard.team2 {
  justify-self: end;
  transform: translateX(calc(-1 * var(--bingo-edge-shift-right)));
  transform-origin: right center;
}

.displayBingoBoardPlaceholder {
  width: min(90%, calc(var(--side-rail-max) * 0.9));
  height: 0;
  visibility: hidden;
  pointer-events: none;
}

.displayBingoGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(6px, 0.8vw, 10px);
}

.displayBingoCell {
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: clamp(6px, 0.9vh, 10px);
  background: rgba(27, 32, 39, 0.8);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.displayBingoCell.edit {
  padding: 4px;
}

.displayBingoWordInput {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(16, 19, 24, 0.9);
  color: var(--ink);
  border-radius: 8px;
  text-align: center;
  font-weight: 700;
  padding: 6px;
}

.displayBingoPick {
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  border-width: 1px;
  border-style: solid;
}

.displayBingoCell.team {
  border-color: rgba(245, 177, 75, 0.75);
  background: rgba(245, 177, 75, 0.22);
}

.displayBingoCell.moderator {
  border-color: rgba(89, 209, 133, 0.82);
  background: rgba(89, 209, 133, 0.26);
}

.displayBottom {
  border-top: 1px solid rgba(0, 0, 0, 0.35);
  background: linear-gradient(180deg, rgba(8, 10, 14, 0.36), rgba(8, 10, 14, 0.56));
  padding: clamp(8px, 1.1vh, 12px) clamp(12px, 1.6vw, 18px);
  position: relative;
}

.displayBuzzFrame {
  position: absolute;
  top: clamp(6px, 1vh, 10px);
  bottom: clamp(6px, 1vh, 10px);
  width: min(100%, var(--side-rail-max));
  border: 4px solid rgba(89, 209, 133, 0.96);
  border-radius: 14px;
  pointer-events: none;
  z-index: 1;
  box-shadow: 0 0 0 2px rgba(89, 209, 133, 0.24) inset;
}

.displayBuzzFrame.left {
  left: clamp(12px, 1.6vw, 18px);
}

.displayBuzzFrame.right {
  right: clamp(12px, 1.6vw, 18px);
}

.displayPlayersBar {
  display: block;
  margin-bottom: clamp(6px, 0.9vh, 10px);
}

.displayChoiceGroups {
  display: grid;
  gap: clamp(10px, 1.2vw, 16px);
  align-items: stretch;
  margin: clamp(6px, 0.9vh, 12px) 0;
}

.displayChoiceGroups.noCenter {
  grid-template-columns: 1fr 1fr;
  column-gap: var(--side-gap-no-center);
  width: 100%;
}

.displayChoiceGroups.withCenter {
  grid-template-columns: 1fr min(300px, 31vw) 1fr;
}

.displayChoiceGroup {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(8px, 1vw, 14px);
  width: min(100%, var(--side-rail-max));
  max-width: min(100%, var(--side-rail-max));
}

.displayChoiceGroup.left {
  justify-self: start;
}

.displayChoiceGroup.right {
  justify-self: end;
}

.displayChoiceBadge {
  width: 100%;
  min-height: clamp(84px, 11vh, 156px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(23, 28, 34, 0.8);
  display: grid;
  place-items: center;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(2.6rem, 6.6vh, 5.8rem);
  line-height: 1;
  color: #ffd9a8;
}

.displayPlayerGroups,
.displayProfileGroups {
  display: grid;
  gap: clamp(10px, 1.2vw, 16px);
  align-items: stretch;
}

.displayPlayerGroups.noCenter,
.displayProfileGroups.noCenter {
  grid-template-columns: 1fr 1fr;
  column-gap: var(--side-gap-no-center);
  width: 100%;
}

.displayPlayerGroups.withCenter,
.displayProfileGroups.withCenter {
  grid-template-columns: 1fr min(300px, 31vw) 1fr;
}

.displayPlayerGroup,
.displayProfileGroup {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(8px, 1vw, 14px);
  width: min(100%, var(--side-rail-max));
  max-width: min(100%, var(--side-rail-max));
}

.displayPlayerGroup.left,
.displayProfileGroup.left {
  justify-self: start;
}

.displayPlayerGroup.right,
.displayProfileGroup.right {
  justify-self: end;
}

.displayPlayerCenterSpacer.noCenter {
  display: none;
}

.displayPlayerCenterSpacer.withCenter {
  width: min(300px, 31vw);
}

.displayPlayerName {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: clamp(4px, 0.7vh, 9px) clamp(8px, 1vw, 12px);
  text-align: center;
  font-weight: 600;
  font-size: clamp(1rem, 2.05vh, 1.65rem);
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(40, 46, 57, 0.75);
}

.displayProfileGroups {
  margin-bottom: clamp(6px, 0.9vh, 10px);
}

.displayProfileCell {
  height: clamp(94px, 14.4vh, 160px);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(30, 34, 41, 0.8);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.displayProfileImage {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}

.displayProfilePlaceholder {
  font-size: 1.4rem;
  font-weight: 700;
  color: #ffd9a8;
}

.displayNotesStrip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: var(--side-gap-no-center);
  row-gap: clamp(10px, 1.2vw, 16px);
  margin-bottom: clamp(6px, 0.9vh, 10px);
  width: 100%;
}

.displayNoteCol {
  width: min(100%, var(--side-rail-max));
}

.displayNoteCol.left {
  justify-self: start;
}

.displayNoteCol.right {
  justify-self: end;
}

.displayNoteBox {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(30, 34, 41, 0.82);
  padding: 6px 8px;
  display: grid;
  gap: 4px;
}

.displayNoteBox textarea {
  min-height: 62px;
  max-height: 14vh;
}

.displayBottomRow {
  display: grid;
  gap: clamp(10px, 1.3vw, 16px);
  align-items: stretch;
}

.displayBottomRow.noCenter {
  grid-template-columns: 1fr auto 1fr;
  gap: clamp(14px, 2.4vw, 36px);
  width: 100%;
}

.displayBottomRow.withCenter {
  grid-template-columns: 1fr auto 1fr;
  gap: clamp(14px, 2.4vw, 36px);
}

.displayBottomRow.noCenterOnly {
  grid-template-columns: 1fr 1fr;
  column-gap: var(--side-gap-no-center);
  width: 100%;
}

.displayTeamBar {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: clamp(5px, 0.8vh, 9px) clamp(9px, 1vw, 13px);
  background: rgba(30, 34, 41, 0.85);
  display: flex;
  align-items: center;
  gap: clamp(7px, 0.9vw, 14px);
  min-height: clamp(38px, 5.9vh, 62px);
  overflow: hidden;
  width: min(100%, var(--side-rail-max));
}

.displayTeamBar.quizBuzzed {
  border-color: rgba(89, 209, 133, 0.86);
  box-shadow: 0 0 0 2px rgba(89, 209, 133, 0.28) inset;
}

.displayTeamBar.left {
  justify-self: start;
  justify-content: flex-start;
}

.displayTeamBar.right {
  justify-self: end;
  justify-content: flex-end;
}

.displayTeamNameText {
  font-size: clamp(0.9rem, 1.9vh, 1.55rem);
  color: #ffd9a8;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.displayTeamMetric {
  font-size: clamp(2.35rem, 5.4vh, 5.3rem);
  font-family: "Bebas Neue", sans-serif;
  line-height: 1;
  min-width: 3.6ch;
}

.displayTeamLives {
  color: #ff5f5f;
  font-size: clamp(1.2rem, 2.8vh, 2.3rem);
  line-height: 1;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.displayTeamBar.right .displayTeamMetric {
  text-align: right;
}

.displayTeamBar.left .displayTeamMetric {
  text-align: left;
}

.displayCenterMedia {
  width: min(300px, 31vw);
  display: grid;
  place-items: center;
}

.displayBottomCenter {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: clamp(6px, 0.9vh, 10px);
}

.displayBottomCenter.noMedia {
  width: fit-content;
}

.displayBottomCenter.withMedia {
  width: min(300px, 31vw);
}

.streamCenterImage {
  max-height: clamp(74px, 10vh, 124px);
  width: 100%;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.streamCenterPlaceholder {
  width: 100%;
  min-height: clamp(70px, 9vh, 110px);
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.3);
  display: grid;
  place-items: center;
  color: var(--ink-dim);
  font-weight: 600;
  background: rgba(30, 34, 41, 0.7);
}

.bingoPickGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.bingoPickCell {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(30, 34, 41, 0.85);
  min-height: 84px;
  aspect-ratio: 1 / 1;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.playerInputCard .bingoBoard,
.playerInputCard .bingoPickGrid {
  width: min(100%, var(--side-rail-max));
  margin-inline: auto;
}

.playerInputCard .bingoPickCell {
  min-height: 0;
  padding: clamp(6px, 1vh, 10px);
}

.bingoPickCell.active {
  background: rgba(245, 177, 75, 0.28);
  border-color: rgba(245, 177, 75, 0.8);
}

.fitBase {
  font-size: clamp(1.25rem, 2.45vh, 2.1rem);
  line-height: 1.08;
}

.fitSmall {
  font-size: clamp(1.02rem, 2.06vh, 1.6rem);
  line-height: 1.08;
}

.fitTiny {
  font-size: clamp(0.88rem, 1.76vh, 1.3rem);
  line-height: 1.05;
}

@media (max-height: 1200px) {
  :root {
    --side-rail-max: clamp(260px, 30vw, 560px);
    --side-gap-no-center: clamp(24px, 5vw, 110px);
    --bingo-edge-shift-left: 22%;
    --bingo-edge-shift-right: 18%;
  }

  .displayBingoGrid {
    gap: clamp(4px, 0.6vw, 8px);
  }

  .displayBingoCell {
    padding: clamp(4px, 0.65vh, 8px);
  }

  .fitBase {
    font-size: clamp(1rem, 1.85vh, 1.6rem);
  }

  .fitSmall {
    font-size: clamp(0.9rem, 1.55vh, 1.35rem);
  }

  .fitTiny {
    font-size: clamp(0.78rem, 1.3vh, 1.1rem);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  :root {
    --side-gap-no-center: clamp(22px, 5vw, 60px);
    --bingo-edge-shift-left: 14%;
    --bingo-edge-shift-right: 10%;
  }

  #appShell {
    width: min(1400px, 99vw);
    margin: 4px auto;
  }

  .layoutTwo {
    grid-template-columns: 1fr;
  }

  .displayBingoWrap {
    gap: 10px;
  }

  .displayBottomRow.noCenter {
    column-gap: var(--side-gap-no-center);
  }

  .displayBottomRow.noCenterOnly {
    column-gap: var(--side-gap-no-center);
  }

  .biddingPrepGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .setBoard {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .estimateVisibilityGrid {
    grid-template-columns: 1.1fr repeat(3, minmax(70px, 0.7fr));
  }

  .matchProgressWrap.withWheel {
    grid-template-columns: 1fr minmax(240px, 0.9fr) 1fr;
  }

  .matchWheelCard {
    width: clamp(250px, 26vw, 380px);
  }

  .matchWheelDisc {
    width: clamp(210px, 22vw, 320px);
  }

  .matchWheelLabel {
    transform: translate(-50%, -50%) rotate(var(--label-angle))
      translateY(calc(clamp(210px, 22vw, 320px) * -0.38))
      rotate(calc(var(--label-angle) * -1));
    width: clamp(106px, 10vw, 170px);
  }
}

@media (max-width: 760px) {
  :root {
    --bingo-edge-shift-left: 0%;
    --bingo-edge-shift-right: 0%;
  }

  .displayStage {
    border-radius: 0;
  }

  .displayPlayerGroups.withCenter,
  .displayProfileGroups.withCenter,
  .displayChoiceGroups.withCenter,
  .displayEmojiAllSets.withCenter,
  .displayEmojiAllSets.noCenter {
    grid-template-columns: 1fr;
  }

  .displayPlayerCenterSpacer.withCenter {
    display: none;
  }

  .displayBottomRow.withCenter {
    grid-template-columns: 1fr;
  }

  .displayBottomRow.noCenter {
    grid-template-columns: 1fr;
  }

  .displayBottomRow.noCenterOnly {
    grid-template-columns: 1fr;
  }

  .displayCenterMedia {
    width: 100%;
  }

  .displayBingoWrap {
    grid-template-columns: 1fr;
  }

  .displayQuizStrip.display {
    grid-template-columns: 1fr;
    row-gap: 10px;
  }

  .displayQuizStrip.display.sliderReveal.noCenter,
  .displayQuizStrip.display.sliderReveal.withCenter {
    grid-template-columns: 1fr;
    row-gap: 10px;
  }

  .displayQuizSliderSpacer {
    display: none;
  }

  .displayQuizTeamValue.left,
  .displayQuizTeamValue.right,
  .displayQuizPlayerValues.left,
  .displayQuizPlayerValues.right,
  .displayQuizControlWrap.team1,
  .displayQuizControlWrap.team2,
  .displayQuizSliderTeam.team1,
  .displayQuizSliderTeam.team2 {
    justify-self: center;
  }

  .displayEmojiSetColumn.left,
  .displayEmojiSetColumn.right {
    justify-self: center;
  }

  .matchProgressWrap {
    grid-template-columns: 1fr;
    row-gap: 14px;
  }

  .matchProgressCol.left,
  .matchProgressCol.right {
    justify-self: center;
  }

  .orderingBoardWrap {
    grid-template-columns: 1fr;
    row-gap: 10px;
  }

  .orderingModList {
    grid-template-columns: 1fr;
  }

  .setBoard {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }


  .displayBingoBoard.team1,
  .displayBingoBoard.team2 {
    transform: none;
  }
}
