/* Game show layer: stage lights, gold rims, chunky glossy buttons and raised boxes. Loaded last on every page. */
:root {
  --rim: linear-gradient(180deg, #FFF4C2 0%, #FFD25A 35%, #E89A1C 70%, #B86E00 100%);
  --cream-face: linear-gradient(180deg, #FFFFFF 0%, #FFF8EC 50%, #F8EAD2 100%);
  --candy: linear-gradient(180deg, rgba(255, 255, 255, 0.38) 0%, rgba(255, 255, 255, 0.08) 48%, rgba(0, 0, 0, 0.05) 52%, rgba(0, 0, 0, 0.16) 100%);
  --deep: 0 16px 28px rgba(10, 0, 40, 0.45);
}

/* Stage: spotlight beams from the top, a warm glow above and a cool one below */
body, #stage { background-color: #22086A; background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"),
    repeating-conic-gradient(from 160deg at 50% -25%, rgba(255, 240, 200, 0.06) 0deg 5deg, transparent 5deg 15deg),
    radial-gradient(ellipse 70% 45% at 50% -5%, rgba(255, 214, 120, 0.32), transparent 70%),
    radial-gradient(ellipse 90% 30% at 50% 108%, rgba(111, 195, 255, 0.26), transparent 70%),
    linear-gradient(180deg, #34128A 0%, #1C0652 100%); }
body { background-attachment: fixed; }
body, #stage { background-size: 160px 160px, auto, auto, auto, auto; }
body::before, #stage::before { opacity: 0.6; }

/* ---------- Buttons: candy-gloss pills with a thick 3D edge ---------- */
.btn { --edge: #B97F00; position: relative; isolation: isolate; border-radius: 999px;
  background-image: var(--candy);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.75), inset 0 -4px 0 rgba(0, 0, 0, 0.16), inset 0 0 0 2px rgba(255, 255, 255, 0.2),
    0 6px 0 var(--edge), 0 8px 0 rgba(20, 5, 60, 0.45), 0 14px 22px rgba(10, 0, 40, 0.4) !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45); }
.btn::before { content: ""; position: absolute; z-index: -1; left: 9%; right: 9%; top: 4px; height: 40%; border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.08)); pointer-events: none; }
.btn:active { transform: translateY(5px);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.6), inset 0 -2px 0 rgba(0, 0, 0, 0.16), 0 1px 0 var(--edge), 0 3px 0 rgba(20, 5, 60, 0.45), 0 5px 10px rgba(10, 0, 40, 0.35) !important; }
.btn:not(.mint):not(.coral):not(.sky):not(.ghost):not(.ghost-ink) { background-color: #FFC93C; }
.btn.mint { --edge: #0E7A63; }
.btn.coral { --edge: #A83636; }
.btn.sky { --edge: #2C78AE; }
.btn.ghost { --edge: rgba(10, 0, 40, 0.55); background-color: rgba(255, 255, 255, 0.14); text-shadow: 0 1px 0 rgba(10, 0, 40, 0.4); }
.btn.ghost::before { opacity: 0.35; }
.btn.small::before { top: 3px; }

/* ---------- Home page: the two big choices ---------- */
.ctacard { position: relative; isolation: isolate; border-radius: 28px; padding: 20px 22px; background-image: var(--candy);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.7), inset 0 -6px 0 rgba(0, 0, 0, 0.16),
    0 0 0 4px #FFE08A, 0 0 0 6px #B86E00, 0 9px 0 6px var(--edge), var(--deep);
  }
.ctacard::before { content: ""; position: absolute; z-index: -1; left: 4%; right: 4%; top: 5px; height: 44%; border-radius: 24px 24px 60px 60px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.05)); pointer-events: none; }
.ctacard.join { --edge: #0B6A56; box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.7), inset 0 -6px 0 rgba(0, 0, 0, 0.16), 0 0 0 4px #FFE08A, 0 0 0 6px #B86E00, 0 9px 0 6px var(--edge), var(--deep); }
.ctacard.host { --edge: #A06A00; box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.7), inset 0 -6px 0 rgba(0, 0, 0, 0.16), 0 0 0 4px #FFE08A, 0 0 0 6px #B86E00, 0 9px 0 6px var(--edge), var(--deep); }
.ctacard:active { transform: translateY(6px); }
.cta { gap: 34px; padding: 14px 6px 10px; }
.ctaemoji { flex: 0 0 auto; display: grid; place-items: center; width: 70px; height: 70px; border-radius: 50%; font-size: 40px;
  background: radial-gradient(circle at 35% 28%, #FFFFFF, rgba(255, 255, 255, 0.55) 60%, rgba(255, 255, 255, 0.3));
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.12), 0 3px 0 rgba(0, 0, 0, 0.18); }
.ctago { flex: 0 0 auto; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; font-size: 1.6rem;
  background: rgba(20, 5, 60, 0.22); color: #fff; box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(255, 255, 255, 0.4); text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25); }
.ctatext b { text-shadow: 0 2px 0 rgba(255, 255, 255, 0.4); }
@keyframes twinkle { 50% { outline-color: #FFC93C; } }

/* ---------- Cream boxes: framed in gold, raised off the stage ---------- */
.card, .gcard, .pausebox, .board, .secret-card:not(.imp) {
  border: 4px solid transparent;
  background: var(--cream-face) padding-box, var(--rim) border-box;
  box-shadow: inset 0 3px 0 #fff, inset 0 -5px 0 rgba(184, 110, 0, 0.14), 0 7px 0 #7A4A00, var(--deep); }
.secret-card.imp { border: 4px solid #FFE08A; box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.5), 0 7px 0 #8A2A2A, var(--deep); }
.modal { border: 4px solid transparent; border-bottom: 0; background: var(--cream-face) padding-box, var(--rim) border-box; }
.gcard { transition: transform 0.15s; }
.gcard:hover { transform: translateY(-3px) rotate(-1deg); }

/* ---------- Glassy panels on the stage: a gold hairline and a little depth ---------- */
.panel, .ptile:not(.empty), .res-row, .srow, .wf-word, .imp-pl, .imp-clue, .imp-bar, .dd-guess, .minimedals,
.steps li, .tip, .gamecard:not(.on), .prow, .toggle, .others .pchip, .endnote, .res-summary, .lr-chip, .wf-chip:not(.got), .cs-total, .lr-current:not(.valid):not(.dupe):not(.bad) {
  box-shadow: inset 0 0 0 1.5px rgba(255, 213, 107, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.18), inset 0 -3px 0 rgba(0, 0, 0, 0.18), 0 6px 14px rgba(10, 0, 40, 0.3); }
.ptile:not(.empty) { background-image: linear-gradient(180deg, rgba(110, 70, 220, 0.5), rgba(40, 12, 110, 0.5)); }

/* ---------- Text boxes: sunk into the card ---------- */
.codeinput, .nameinput, .txt, .suggestcard .txt {
  border: 3px solid #D9CCF7; background: linear-gradient(180deg, #F1ECFF 0%, #FFFFFF 40%);
  box-shadow: inset 0 3px 6px rgba(43, 20, 100, 0.18), 0 2px 0 #fff; transition: border-color 0.15s, box-shadow 0.15s; }
.codeinput:focus, .nameinput:focus, .txt:focus, .suggestcard .txt:focus {
  border-color: #FFC93C; box-shadow: inset 0 3px 6px rgba(43, 20, 100, 0.15), 0 0 0 4px rgba(255, 201, 60, 0.35); }
.codeinput { background: #160640; color: #FFD45A; border-color: #E89A1C; text-shadow: 0 0 14px rgba(255, 212, 90, 0.8);
  box-shadow: inset 0 0 0 3px #3B1F80, inset 0 6px 14px rgba(0, 0, 0, 0.5), 0 2px 0 #fff; }
.codeinput::placeholder { color: #4A3590; text-shadow: none; }
.codeinput:focus { border-color: #FFD25A; box-shadow: inset 0 0 0 3px #3B1F80, inset 0 6px 14px rgba(0, 0, 0, 0.5), 0 0 0 4px rgba(255, 201, 60, 0.4); }

/* ---------- Big-screen room code: gold LED letters ---------- */
.joininfo .code { display: inline-block; align-self: flex-start; max-width: 100%; font-size: 88px; letter-spacing: 4px; background: #120430; color: #FFD45A; border-radius: 18px; padding: 12px 20px 4px;
  text-shadow: 0 0 18px rgba(255, 212, 90, 0.9), 0 0 4px rgba(255, 240, 180, 0.9);
  box-shadow: inset 0 0 0 4px #3B1F80, inset 0 8px 18px rgba(0, 0, 0, 0.6), 0 0 0 4px #E89A1C, 0 5px 0 4px #7A4A00; }

/* ---------- Little things ---------- */
.chip { box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.2), inset 0 -2px 0 rgba(0, 0, 0, 0.2), 0 3px 0 rgba(10, 0, 40, 0.35); }
.chip.on { background-image: var(--candy); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.7), 0 3px 0 #B97F00, 0 0 12px rgba(255, 201, 60, 0.5); }
.segpick, .hosttabs, .phbar .seg { box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.4), inset 0 0 0 1.5px rgba(255, 213, 107, 0.4); }
.segpick button.on, .hosttabs button.on, .phbar .seg button.on, .modaltabs button.on {
  background-image: var(--candy); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.7), 0 3px 0 rgba(150, 100, 0, 0.8); }
.gamecard.on { background-image: var(--candy); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.7), 0 4px 0 #B97F00, 0 0 16px rgba(255, 201, 60, 0.55); }
.upnext { background-image: var(--candy); box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.7), inset 0 -5px 0 rgba(0, 0, 0, 0.14), 0 0 0 4px #FFE08A, 0 0 0 6px #B86E00, 0 9px 0 6px #A06A00, var(--deep); }
.stepnum { background: radial-gradient(circle at 35% 28%, #FFC2C2, #FF7A7A 55%, #D04A4A); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18), 0 3px 0 #9A2E2E, 0 0 0 3px #FFE08A; }
.avpick.on { background: radial-gradient(circle, #FFE48A, #FFB82E); box-shadow: 0 0 0 3px #B86E00, 0 0 16px rgba(255, 201, 60, 0.8); }
.savedp { box-shadow: inset 0 2px 0 #fff, 0 3px 0 #CFC3F2; }
.savedp.on { background-image: var(--candy); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.7), 0 3px 0 #B97F00; }
.roomtag, .groupname, .tjoin { box-shadow: inset 0 0 0 1.5px rgba(255, 213, 107, 0.5), inset 0 2px 0 rgba(255, 255, 255, 0.15); }

/* Gold headings on the stage */
.block h2, .lobby-head h2 { background: linear-gradient(180deg, #FFF2B8, #FFC93C 55%, #E89A1C); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none; filter: drop-shadow(0 3px 0 #7A3E00) drop-shadow(0 8px 14px rgba(10, 0, 40, 0.4)); }

/* ---------- Answer tiles in the party games: glossy, raised, gold glow for the winner ---------- */
.qz-opt, .qz-btn, .wy-side, .wy-btn { background-image: var(--candy);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.55), inset 0 -5px 0 rgba(0, 0, 0, 0.14), inset 0 0 0 2px rgba(255, 255, 255, 0.15), 0 7px 0 rgba(20, 5, 60, 0.5), 0 12px 20px rgba(10, 0, 40, 0.35); }
.qz-btn:active, .wy-btn:active { box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.5), 0 2px 0 rgba(20, 5, 60, 0.5); }
.qz-opt.right, .wy-side.win { box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.55), 0 0 0 6px #FFE08A, 0 0 0 9px #B86E00, 0 0 36px rgba(255, 201, 60, 0.75), 0 9px 0 6px rgba(20, 5, 60, 0.5); }
.qz-opt b, .qz-btn b { background: radial-gradient(circle at 35% 28%, #fff, rgba(255, 255, 255, 0.6) 60%, rgba(255, 255, 255, 0.35)); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.12), 0 2px 0 rgba(0, 0, 0, 0.15); }
.fa-card, .fa-opt { background: var(--cream-face);
  box-shadow: inset 0 3px 0 #fff, inset 0 -4px 0 rgba(184, 110, 0, 0.12), inset 0 0 0 2px rgba(255, 213, 107, 0.6), 0 6px 0 #8F7FC2, 0 12px 20px rgba(10, 0, 40, 0.35); }
.fa-opt:active { box-shadow: inset 0 3px 0 #fff, inset 0 0 0 2px rgba(255, 213, 107, 0.6), 0 2px 0 #8F7FC2; }
.fa-card.win { box-shadow: inset 0 3px 0 #fff, 0 0 0 6px #FFE08A, 0 0 0 9px #B86E00, 0 0 30px rgba(255, 201, 60, 0.7); }
.fa-card i { background: radial-gradient(circle at 35% 28%, #FFF3B0, #FFC93C 55%, #E0A200); box-shadow: 0 3px 0 #B86E00; }

/* ---------- Game boards: gold-framed trays, raised tiles, keycaps ---------- */
:root { --tray: 0 0 0 4px #FFD25A, 0 0 0 7px #B86E00, 0 9px 0 7px #4A2A00, 0 18px 30px rgba(10, 0, 40, 0.5); }
.sd-grid, .ms-grid, .sp-grid:not(.pic), .c4-board { box-shadow: var(--tray); }
.ms-grid, .sp-grid:not(.pic) { background: linear-gradient(180deg, #1A0848, #2B1464); box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.55), var(--tray); }
.sp-grid.pic, .wf-wrap { box-shadow: 0 0 0 4px #FFD25A, 0 0 0 7px #B86E00, 0 9px 0 7px #4A2A00, 0 18px 30px rgba(10, 0, 40, 0.5); }
.dd-canvas { box-shadow: 0 0 0 5px #FFD25A, 0 0 0 9px #B86E00, 0 12px 0 9px #4A2A00, 0 20px 34px rgba(10, 0, 40, 0.5); }
.dd-canvas.pad { box-shadow: 0 0 0 5px #FFE48A, 0 0 0 9px #B86E00, 0 0 30px rgba(255, 201, 60, 0.6), 0 12px 0 9px #4A2A00; }

/* Sudoku: lit cells, glossy number pad */
.sd-cell { background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 55%, rgba(43, 20, 100, 0.05) 100%); }
.sd-num { background-image: var(--candy); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.7), inset 0 -3px 0 rgba(0, 0, 0, 0.12), 0 4px 0 #B97F00, 0 7px 12px rgba(10, 0, 40, 0.35); }
.sd-num:active { box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.6), 0 1px 0 #B97F00; }

/* Minesweeper: shiny covered squares, opened ones sink in */
.ms-c { background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(0, 0, 0, 0.08) 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), inset 0 -3px 0 rgba(43, 20, 100, 0.4); }
.ms-c.o { background-image: linear-gradient(180deg, #EDE4D2, #FFF8EC 40%); box-shadow: inset 0 2px 4px rgba(43, 20, 100, 0.3); }
.ms-c.f { background-color: #FFC07A; }

/* Sliding Puzzle and Copycat: candy tiles */
.sp-t:not(.gap) { background-image: var(--candy); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.65), inset 0 -4px 0 rgba(0, 0, 0, 0.14), 0 4px 0 rgba(10, 0, 40, 0.55); }
.sp-grid.pic .sp-t { background-image: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4); }
.cc-pad { background-image: radial-gradient(ellipse 70% 40% at 50% 18%, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0) 70%), linear-gradient(180deg, rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.16));
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.6), inset 0 -10px 0 rgba(0, 0, 0, 0.18), 0 8px 0 rgba(10, 0, 40, 0.55), 0 14px 22px rgba(10, 0, 40, 0.35); }
.cc-pad.lit { box-shadow: 0 0 0 5px #fff, 0 0 50px 10px rgba(255, 255, 255, 0.6), inset 0 3px 0 rgba(255, 255, 255, 0.6), inset 0 -10px 0 rgba(0, 0, 0, 0.12); }

/* Word Guess: sunken empty squares, glossy coloured ones, keycaps */
.wg-t { box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.3); }
.wg-t.g, .wg-t.y, .wg-t.x { background-image: var(--candy); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), inset 0 -3px 0 rgba(0, 0, 0, 0.15), 0 3px 0 rgba(10, 0, 40, 0.45); }
.wg-key { background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.04) 55%, rgba(0, 0, 0, 0.06));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -2px 0 rgba(0, 0, 0, 0.18), 0 3px 0 rgba(10, 0, 40, 0.55); }
.wg-key:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 0 rgba(10, 0, 40, 0.55); }
.wg-key.x { background-image: none; box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3); }

/* Doodle Dash word picks, 4 in a Row */
.dd-pick { background-image: var(--candy); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.6), inset 0 -4px 0 rgba(0, 0, 0, 0.14), 0 5px 0 rgba(10, 0, 40, 0.5), 0 9px 16px rgba(10, 0, 40, 0.3); }
.dd-pick.on { box-shadow: 0 0 0 4px #FFE08A, 0 0 0 6px #B86E00, 0 0 24px rgba(255, 201, 60, 0.7); }
.c4-board { background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0) 40%, rgba(0, 0, 0, 0.12)); }
.c4-arrow { background-image: var(--candy); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.6), 0 4px 0 rgba(10, 0, 40, 0.5); }
.c4-bm, .c4-game, .cc-pl, .wg-board { box-shadow: inset 0 0 0 1.5px rgba(255, 213, 107, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.15), 0 6px 14px rgba(10, 0, 40, 0.3); }
.c4-bm .w { background-image: var(--candy); }

/* Scoreboards: the leader's row glows gold */
.race-board .srow:first-child, .res-rows .res-row:first-child { background-color: rgba(255, 201, 60, 0.22); box-shadow: inset 0 0 0 2px #FFD56B, inset 0 2px 0 rgba(255, 255, 255, 0.2), 0 0 18px rgba(255, 201, 60, 0.25), 0 6px 14px rgba(10, 0, 40, 0.3); }

/* Podium: polished metal blocks with bulb lights on the winner's */
