.new-controls, .sidebar-links { display: grid; gap: 8px; }
.sidebar-links { margin-top: auto; justify-items: start; }
.sidebar-links .text-button { margin: 0; }
.starter-list { display: grid; gap: 10px; }
.starter { display: grid; gap: 4px; text-align: left; width: 100%; padding: 14px; border-radius: 10px; background: var(--rail); border: 1px solid var(--line); }
.starter strong { font-size: 16px; }
.starter span { color: var(--muted); font-size: 13px; }
.starter:hover { border-color: var(--ink); }

:root, :root[data-edition="standard"] {
  color-scheme: light;
  --page: #f9fcfe;
  --rail: #fff;
  --panel: #fff;
  --line: #cedee7;
  --ink: #344151;
  --muted: #516171;
  --gold: #286382;
  --coral: #e26856;
  --mint: #215d7c;
  --brand-blue: #50a8d2;
  --brand-blue-light: #e8f4fa;
  --brand-coral: #e26856;
  --board-ink: #f6fbfe;
  --board-value: #e9f9ff;
  --display: Georgia, 'Times New Roman', serif;
  --body: Inter, 'Avenir Next', system-ui, sans-serif;
  background: var(--page);
}
:root[data-edition="standard"] .sidebar { background: #eef7fb; }
:root[data-edition="standard"] .brand-mark { color: #16394c; background: var(--brand-blue); border-radius: 10px; font: 850 22px/1 var(--body); }
:root[data-edition="standard"] .brand strong { font: 820 23px/1 var(--body); letter-spacing: -.055em; }
:root[data-edition="standard"] .button.primary { background: var(--brand-coral); color: #281512; border-color: #ce5948; }
:root[data-edition="standard"] .button.primary:hover:not(:disabled) { background: #ef8575; border-color: #ac4233; }
:root[data-edition="standard"] .button.new-game { background: #d9edf8; border-color: #a8cde0; color: #204e68; }
:root[data-edition="standard"] .button.new-game:hover { background: #cde9f7; border-color: #6faccb; }
:root[data-edition="standard"] .library-item:hover,
:root[data-edition="standard"] .button.secondary:hover:not(:disabled) { background: #eaf5fb; border-color: #84b5ce; }
:root[data-edition="standard"] .button.secondary { box-shadow: 0 1px 2px #1c4c6614; }
:root[data-edition="standard"] .topline > span { font-size: 18px; color: var(--ink); letter-spacing: -.035em; }
:root[data-edition="standard"] .marquee { min-height: 160px; border-color: #214d68; background: #214d68; color: #fff; }
:root[data-edition="standard"] .marquee-meta { color: #b9dfee; }
:root[data-edition="standard"] .marquee h1 { font: 570 clamp(39px, 5.5vw, 79px)/1.03 var(--display); letter-spacing: -.05em; }
:root[data-edition="standard"] .marquee-art i { border-color: #6294ad; border-radius: 30px; top: -185px; transform: rotate(23deg); }
:root[data-edition="standard"] .marquee-art i:nth-child(2) { top: -153px; }
:root[data-edition="standard"] .marquee-art i:nth-child(3) { top: -125px; }
:root[data-edition="standard"] .marquee-art span { color: #b2d9ea; }
:root[data-edition="standard"] .category { color: #29495d; border-color: #a8c8d8; background: #e7f2f9; }
:root[data-edition="standard"] .tone-1 { background: #e1f1f6; border-color: #a9cdd7; }
:root[data-edition="standard"] .tone-2 { background: #e8edf7; border-color: #b5c5dc; }
:root[data-edition="standard"] .tone-3 { background: #e5f2f2; border-color: #a8cdd3; }
:root[data-edition="standard"] .tone-4 { background: #eaf2f9; border-color: #b2cada; }
:root[data-edition="standard"] .category textarea { border-color: transparent; }
:root[data-edition="standard"] .category textarea:hover { border-color: currentColor; }
:root[data-edition="standard"] .square { color: var(--board-value); border-color: #2b6485; background: #2c6283; font: 820 clamp(18px, 2.4vw, 33px)/1 var(--body); }
:root[data-edition="standard"] .square:nth-child(odd) { background: #275877; }
:root[data-edition="standard"] button.square:hover:not(:disabled) { background: #397c9e; border-color: #2f7496; }
:root[data-edition="standard"] .square.selected { border-color: #ec8c78; background: #275a77; box-shadow: inset 0 0 0 2px #ef9e8c; }
:root[data-edition="standard"] .square.incomplete { color: #cfdfe9; }
:root[data-edition="standard"] .square.incomplete::after { background: #b3d7e9; }
:root[data-edition="standard"] .square.finished { color: #4f6a7b; border-color: #bad0dc; background: #dcecf4; }
:root[data-edition="standard"] input,
:root[data-edition="standard"] select,
:root[data-edition="standard"] textarea { border-color: #b5cdd9; }
:root[data-edition="standard"] textarea::placeholder,
:root[data-edition="standard"] input::placeholder { color: #566b79; }
:root[data-edition="standard"] .point-badge { color: #275a76; background: #e0f0f8; }
:root[data-edition="standard"] .clue-stage { background: #234f68; border-color: #234f68; color: var(--board-ink); }
:root[data-edition="standard"] .clue-kicker { color: #bce7fc; }
:root[data-edition="standard"] .private-answer { background: #e5f5eb; border-color: #9fc6a9; }
:root[data-edition="standard"] .private-answer span { color: #245b35; }
:root[data-edition="standard"] .adjudicate.right { color: #164b29; background: #e2f3e9; }
:root[data-edition="standard"] .adjudicate.wrong { color: #7f2529; background: #fce7e8; }
:root[data-edition="standard"] .theme-christmas .marquee { background: #244c3d; border-color: #294c3d; }
:root[data-edition="standard"] .theme-christmas .marquee-meta,
:root[data-edition="standard"] .theme-christmas .marquee-art span,
:root[data-edition="standard"] .theme-christmas .clue-kicker { color: #ffe5a2; }
:root[data-edition="standard"] .theme-christmas .marquee-art i { border-color: #97ba9c; }
:root[data-edition="standard"] .theme-christmas .square:not(.finished),
:root[data-edition="standard"] .theme-christmas .clue-stage { color: #fff0c4; background: #325e4f; border-color: #376151; }
:root[data-edition="standard"] .toast { border-color: #7cacbf; }
:root[data-edition="standard"] .toast.error { border-color: #bc5264; }

:root[data-edition="holiday"] {
  color-scheme: dark;
  --page: #192e28;
  --rail: #203d32;
  --panel: #223d32;
  --line: #587369;
  --ink: #fff3d7;
  --muted: #d5dec8;
  --gold: #f9d68c;
  --coral: #ffb49b;
  --mint: #cfebcc;
  --display: Georgia, 'Times New Roman', serif;
  --body: 'Avenir Next', system-ui, sans-serif;
}
:root[data-edition="holiday"] .room-page { max-width: 1200px; padding-top: 18px; }
:root[data-edition="holiday"] .brand { gap: 11px; }
:root[data-edition="holiday"] .brand-mark { color: #351e21; background: var(--gold); border-radius: 50%; border: 2px solid #372b1f; box-shadow: 2px 2px 0 #c35948; font-style: normal; }
:root[data-edition="holiday"] .brand strong { letter-spacing: -.05em; }
:root[data-edition="holiday"] .marquee { color: #322a23; border: 2px solid #231f1b; border-radius: 14px; background: #f3e2b8; box-shadow: 4px 5px 0 #a6423e; }
:root[data-edition="holiday"] .marquee-copy { padding-block: 4px; }
:root[data-edition="holiday"] .marquee h1 { color: #9d302b; text-shadow: 2px 3px #efbc83; }
:root[data-edition="holiday"] .marquee-meta { color: #573b32; letter-spacing: .14em; }
:root[data-edition="holiday"] .marquee-art {
  inset: 0 0 0 55%;
  background-image: radial-gradient(#9e554a55 1px, transparent 1px);
  background-size: 6px 6px;
  mask-image: linear-gradient(90deg, transparent, black 45%);
}
:root[data-edition="holiday"] .marquee-art i { border-color: #b8725a; }
:root[data-edition="holiday"] .marquee-art span { color: #912b26; opacity: .9; }
:root[data-edition="holiday"] .marquee .button.primary { color: #fff1d5; background: #8f312b; border: 1px solid #632723; box-shadow: 2px 2px 0 #543528; }
:root[data-edition="holiday"] .marquee .button.primary:hover { background: #712821; }
:root[data-edition="holiday"] .category { border-color: #acb988; background: #36533e; color: #fff2cd; }
:root[data-edition="holiday"] .tone-1 { background: #6b393a; border-color: #c3837f; }
:root[data-edition="holiday"] .tone-2 { background: #5c4b32; border-color: #c5aa6b; }
:root[data-edition="holiday"] .tone-3 { background: #6b393a; border-color: #c3837f; }
:root[data-edition="holiday"] .tone-4 { background: #36533e; border-color: #acb988; }
:root[data-edition="holiday"] .square { background: #28483a; border-color: #607959; color: #f8d795; }
:root[data-edition="holiday"] .square.finished { background: #233930; color: #c0d1c4; }
:root[data-edition="holiday"] .clue-stage { color: #381f21; background: #f3e2b8; border: 2px solid #241c1a; box-shadow: 3px 4px 0 #a6423e; }
:root[data-edition="holiday"] .clue-kicker { color: #8c312a; }
.holiday-landing { width: min(930px, 100%); margin: auto; padding: clamp(18px, 5vw, 52px); }
.holiday-landing-brand { margin-bottom: 20px; }
.holiday-landing .marquee { min-height: 260px; align-items: center; }
.holiday-landing > p { margin-top: 18px; color: var(--muted); }

@media (max-width: 930px) {
  .new-controls { display: flex; margin-left: auto; }
  .sidebar-links { margin-top: 0; display: flex; flex-wrap: wrap; }
}
@media (max-width: 420px) {
  :root[data-edition="standard"] .marquee h1 { font-size: clamp(32px, 10vw, 42px); }
  :root[data-edition="holiday"] .brand strong { font-size: 18px; }
  .new-controls, .sidebar-links { gap: 5px; }
}

.entry-page { max-width: 1240px; margin: auto; min-height: 100svh; padding: 24px clamp(16px, 4vw, 52px) 48px; }
.entry-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.parent-brand, .entry-detail { font-size: 13px; color: var(--muted); }
.parent-brand:hover { text-decoration: underline; }
.entry-hero { display: grid; grid-template-columns: 1fr .95fr; align-items: center; gap: clamp(20px, 5vw, 64px); margin-top: 28px; padding: clamp(22px, 4.5vw, 56px); border-radius: 22px; background: linear-gradient(145deg,#f9fcfe 5%,#e9f5fb 70%,#dceff8); border: 1px solid #c9e1ec; }
.entry-topic { color: #215e7b; font-size: 12px; font-weight: 780; letter-spacing: .1em; text-transform: uppercase; }
.entry-copy h1 { color: #213b4d; margin-top: 7px; font: 550 clamp(43px, 6.5vw, 84px)/.98 var(--display); letter-spacing: -.06em; }
.entry-description { max-width: 42ch; margin: 14px 0 18px; color: var(--muted); font-size: clamp(15px, 1.65vw, 18px); line-height: 1.5; }
.entry-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.entry-copy .button { min-height: 46px; padding-inline: 14px; font-size: 14px; }
.entry-extras { display: flex; flex-wrap: wrap; align-items: baseline; gap: 1px 14px; margin-top: 9px; }
.entry-ai { color: #7d3025; }
.entry-plan { color: var(--muted); font-size: 13px; }
.entry-plan .text-button { color: #7d3025; }
.entry-extras .text-button { min-height: 40px; }
.advanced-preview .game-meta { color: #215e7b; font-size: 12px; font-weight: 750; }
.advanced-preview .dialog-actions { margin-top: 17px; }
.entry-detail { margin-top: 8px; }
.entry-board { margin: 0; min-width: 0; padding: clamp(8px, 1.5vw, 16px); border-radius: 18px; border: 1px solid #b1cfde; background: #fff; box-shadow: 0 9px 25px #2b60711e; transform: rotate(1.2deg); }
.entry-board figcaption { padding: 0 0 8px 2px; color: #335b71; font-size: 12px; font-weight: 750; }
.entry-board .board-column { grid-template-rows: 41px repeat(5, minmax(32px, 1fr)); }
:root[data-edition="standard"] .entry-board .square { min-height: 35px; font-size: clamp(16px, 2.1vw, 23px); }
.entry-board .category { font-size: clamp(9px, 1vw, 13px); }
.ready-section { margin-top: 30px; scroll-margin-top: 16px; }
.ready-section h2 { font: 550 clamp(26px, 3.5vw, 37px)/1.1 var(--display); letter-spacing: -.04em; color: #253e51; }
.ready-section > p { margin: 6px 0 13px; color: var(--muted); }
.game-catalog { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(203px, 100%), 1fr)); gap: 11px; }
.game-card { display: grid; grid-template-rows: auto auto 1fr auto; gap: 5px; align-content: start; min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--rail); }
.game-card h3 { margin: 0; color: var(--ink); letter-spacing: -.025em; font-size: 17px; }
.game-card .game-meta { margin: 0; color: #315f7b; font-size: 11px; font-weight: 740; }
.game-card .game-description { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.game-card .button { justify-self: start; min-height: 40px; color: #225b77; margin-top: 5px; }
:root[data-edition="standard"] dialog { color: var(--ink); }
@media (max-width: 930px) { .new-controls { flex-wrap: wrap; } }
@media (max-width: 740px) {
  .entry-hero { grid-template-columns: 1fr; }
  .entry-board { max-width: 525px; transform: none; }
}

@media (max-width: 560px) {
  .entry-board { display: none; }
}

.card-actions { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.card-actions .text-button { min-height: 44px; }
.player-preview { display: inline-block; margin-top: 8px; }
.score-result { margin-top: 10px; color: var(--mint); font-weight: 750; }
.room-panel .room-help { margin-top: 8px; }
.judging > div { grid-template-columns: 1fr 1fr; }
.judging > div > span { grid-column: 1 / -1; font-weight: 700; }
.judging .adjudicate { min-height: 44px; }
@media (max-width: 759px) {
  .player-lobby .room-panel { grid-row: 1; }
  .room-page .marquee { min-height: 0; }
}
@media (max-width: 759px) {
  :root[data-edition="standard"] .in-clue .marquee {
    min-height: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
  }
  .in-clue .marquee-meta, .in-clue .marquee-art { display: none; }
  :root[data-edition="standard"] .in-clue .marquee h1 { font-size: 22px; }
  .in-clue .marquee-actions { width: auto; }
}

@font-face { font-family: "Bangers"; src: url("/brand/bangers.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/brand/nunito.woff2") format("woff2"); font-display: swap; }

:root[data-edition="sleigh"] {
  --page:#fff3e1; --rail:#fffaf1; --panel:#fffaf1; --line:#bec6c8; --ink:#023354; --muted:#465560;
  --gold:#023354; --mint:#175636; --action:#cf2c39; --action-ink:white; --stage:#023354; --pale:#b6cdda;
  --display:"Bangers","Arial Black",sans-serif; --body:"Nunito",system-ui,sans-serif;
}
:root[data-edition="scout"] {
  --page:#faf7f0; --rail:#fffcf5; --panel:#fffcf5; --line:#d7cfbf; --ink:#172a43; --muted:#49594e;
  --gold:#1f4c73; --mint:#30594b; --action:#ef7336; --action-ink:#172a43; --stage:#172a43; --pale:#eadbc7;
  --display:Georgia,serif; --body:system-ui,sans-serif;
}
:root:is([data-edition="sleigh"],[data-edition="scout"]) {
  color-scheme:light;
  & .entry-hero { grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr); position:relative; overflow:hidden; padding:clamp(20px,4vw,54px); background:var(--stage); border:0; }
  & .entry-copy { position:relative; z-index:1; }
  & .entry-copy h1 { margin:0; color:var(--rail); }
  & .entry-copy h1 span { display:block; font:700 clamp(16px,2vw,25px)/1.2 var(--body); letter-spacing:.02em; margin-top:10px; }
  & .entry-copy h1 br { display:none; }
  & .entry-copy .entry-description { color:#fff; max-width:44ch; }
  & .entry-detail, & .entry-extras .text-button { color:var(--pale); }
  & .brand-illustration { position:relative; margin:0; }
  & .brand-illustration img { display:block; width:100%; max-height:335px; object-fit:contain; }
  & .button.primary, & .game-card .button.primary { background:var(--action); color:var(--action-ink); border-color:transparent; }
  & .button.secondary, & .new-game { background:var(--rail); color:var(--ink); border-color:var(--line); }
  & .button:hover:not(:disabled) { filter:brightness(.94); }
  & .marquee, & .clue-stage { background:var(--stage); color:white; border-color:var(--stage); }
  & .marquee-meta, & .clue-kicker { color:var(--pale); }
  & .game-card h3, & .ready-section h2 { color:var(--ink); }
  & .game-card .game-meta { color:var(--mint); }
  & .square { background:var(--stage); border-color:#698093; color:#fff; }
  & .square.finished { background:var(--pale); color:var(--ink); }
  & .square.selected { border-color:var(--action); box-shadow:inset 0 0 0 2px var(--action); }
  & .category { background:var(--pale); color:var(--ink); border-color:var(--line); }
  & .private-answer, & .point-badge { background:#e6efe1; color:#193b28; border-color:#9bac97; }
  & .private-answer span { color:#25492c; }
  & .adjudicate.right { background:#d9eedc; color:#16462a; }
  & .adjudicate.wrong { background:#fce2dd; color:#77282b; }
  & .brand strong { white-space:normal; }
  & .room-page .brand strong { font-size:17px; }
  & .riddle-hints { margin:8px 0; font-size:13px; }
  & .riddle-hints summary { cursor:pointer; font-weight:700; }
}
:root[data-edition="sleigh"] {
  & .entry-hero { border:3px solid var(--stage); border-radius:7px; box-shadow:5px 5px 0 var(--action); background-image:radial-gradient(#1d5472 1px,transparent 1px); background-size:7px 7px; }
  & .entry-copy h1 { font-weight:400; letter-spacing:.02em; text-shadow:3px 4px #cf2c39; }
  & .entry-copy h1 span { text-shadow:none; }
  & .game-card { border-radius:4px; border-top:5px solid var(--action); }
  & .brand strong, & .ready-section h2, & .game-card h3, & .marquee h1 { font-family:var(--display); font-weight:400; letter-spacing:.03em; }
  & .game-card h3 { font-size:23px; }
}
:root[data-edition="scout"] {
  & .entry-hero { border-radius:4px 24px 24px 4px; border-left:8px solid var(--mint); }
  & .brand-illustration { background:#faf7f0; border:6px solid var(--pale); border-radius:3px; transform:rotate(2deg); }
  & .entry-copy h1 span, & .game-meta { font-family:ui-monospace,monospace; }
  & .game-card { border-radius:0; border-width:0 0 1px 3px; border-left-color:var(--mint); }
  & .game-card h3 { font:700 20px/1.15 var(--display); }
}
@media(max-width:759px) {
  :root:is([data-edition="sleigh"],[data-edition="scout"]) {
    & .entry-hero { display:block; }
    & .entry-copy h1 { max-width:72%; font-size:clamp(33px,7.4vw,52px); }
    & .brand-illustration { position:absolute; width:23%; top:12px; right:12px; }
    & .entry-copy h1 span { max-width:100%; font-size:16px; }
    & .entry-description { margin-top:22px; }
    & .in-clue .marquee { min-height:0; padding:10px 12px; gap:7px; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; }
    & .in-clue .marquee h1 { font-size:22px; }
  }
}
.holiday-finish { display:flex; flex-wrap:wrap; align-items:center; gap:6px 16px; margin:0 0 12px; }
.holiday-finish p, .final-editor p { color:var(--muted); font-size:13px; }
.final-editor { margin:16px 0; }
.final-editor summary { cursor:pointer; font-weight:700; }
.final-editor label { margin-top:9px; }
.bonus-rule { margin-top:6px; color:var(--pale); }
.holiday-special { border-top:5px solid var(--action); }
