/* The game look for the phone page (owner: "it looks like an app, make it look like a game", 2 Nov 2026).
   Loaded after the page's own styles and shared by SnapGap and SnapDigits: a rounded game font, a glowing arena
   background, chunky 3D buttons that press down, 3D tiles, a glowing timer, medal ranks. Colours come from the page's
   own light/dark variables, so both themes keep working; motion stops with Reduce motion. */

:root { --g-accent-deep: color-mix(in srgb, var(--accent) 62%, #000); --g-green-deep: color-mix(in srgb, var(--success) 58%, #000);
  --g-gold-deep: color-mix(in srgb, var(--gold-btn, #FFD60A) 60%, #000); --g-edge: color-mix(in srgb, var(--line) 70%, #000); }

/* A rounded, chunkier type: SF Pro Rounded on Apple phones, the system font elsewhere */
html, body, button, input, select, textarea { font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "SF Pro Text", Roboto, "Segoe UI", sans-serif; }
h1, h2, .lb-count b, .lb-you .h, .big-start, .rc-code, .code { font-weight: 800; letter-spacing: -0.015em; }

/* The arena: a soft glow from the top and a faint dotted floor, on every screen */
body { background:
  radial-gradient(900px 520px at 50% -140px, color-mix(in srgb, var(--success) 16%, transparent), transparent 70%),
  radial-gradient(700px 500px at 110% 110%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%),
  var(--bg); background-attachment: fixed; }
body::before { content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(color-mix(in srgb, var(--text) 9%, transparent) 1px, transparent 1.4px); background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 75%); mask-image: linear-gradient(180deg, #000, transparent 75%); }
main { position: relative; z-index: 1; }
body.home::before { display: none; }

/* Chunky buttons with a 3D edge that press down when tapped */
button { border-width: 2px; border-radius: 16px; box-shadow: 0 4px 0 var(--g-edge); transition: transform .08s ease, box-shadow .08s ease, filter .15s ease; }
button:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--g-edge); }
button.primary, .big-start { box-shadow: 0 5px 0 var(--g-accent-deep), 0 10px 22px color-mix(in srgb, var(--accent) 28%, transparent); }
button.primary:active:not(:disabled), .big-start:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--g-accent-deep); }
.lb-card button.go, #create-btn, .roomcard button.go { box-shadow: 0 5px 0 var(--g-green-deep), 0 10px 22px color-mix(in srgb, var(--success) 26%, transparent); }
.lb-card button.go:active, #create-btn:active, .roomcard button.go:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--g-green-deep); }
button.gold { box-shadow: 0 5px 0 var(--g-gold-deep); } button.gold:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--g-gold-deep); }
#ready-btn.done { box-shadow: 0 4px 0 var(--g-green-deep); }
button.link, .appbar-leave, .stars button, .mode button, .later, .close, .x, .free-line button, .chosen button, .unl-top button,
.drawer .row, button.row, .lb-settings .chg, #rooms-btn, .gs-top .link, .ginv svg { box-shadow: none !important; }
button.link:active, .appbar-leave:active, .mode button:active, .stars button:active, button.row:active { transform: scale(.97); }
button:disabled { filter: saturate(.6); opacity: .65; }
.seg button { box-shadow: 0 3px 0 var(--g-edge); }
.seg button[aria-pressed=true] { box-shadow: 0 4px 0 var(--g-accent-deep); }

/* Cards: thicker edges and a soft top highlight, like game panels */
.list, .lb-card, .lb-settings, .lb-you, .jcard, .roomcard, .goldcard, .howto, .track3, .facts, .ready-banner, .free-line, .champ, .notify, .install {
  border-width: 2px; border-radius: 20px; box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 6%, transparent), 0 6px 18px rgba(0,0,0,.18); }
.lb-settings { box-shadow: 0 4px 0 var(--g-edge), inset 0 1px 0 color-mix(in srgb, #fff 6%, transparent); }

/* The round clock: thicker, rounded, glowing */
.track { height: 12px; border-radius: 999px; background: color-mix(in srgb, var(--text) 10%, transparent); box-shadow: inset 0 2px 3px rgba(0,0,0,.35); }
.fill { border-radius: 999px; box-shadow: 0 0 14px color-mix(in srgb, #30D158 60%, transparent); transition: width .25s linear, background .4s; }
#r-secs { font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; }
#r-round { font-weight: 700; }

/* SnapGap: the word as 3D letter tiles; the gaps glow */
.wordbox { border-radius: 22px; border: 2px solid var(--line); box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 6%, transparent), 0 8px 24px rgba(0,0,0,.22); }
.ch { width: 40px; height: 54px; border-radius: 12px; font-family: inherit; font-weight: 800; font-size: 28px; color: var(--text);
  background: var(--slot); box-shadow: 0 4px 0 var(--g-edge); }
.word.long .ch { width: 30px; height: 44px; font-size: 22px; }
.ch.gap { background: color-mix(in srgb, var(--success) 8%, transparent); border: 2.5px dashed var(--success); color: var(--success); box-shadow: none; }
.ch.gap.filled { background: color-mix(in srgb, var(--success) 18%, var(--card)); border-style: solid; border-color: var(--success); box-shadow: 0 4px 0 var(--g-green-deep), 0 0 18px color-mix(in srgb, var(--success) 35%, transparent); }
.ch.gap.next { border: 2.5px solid var(--success); box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 22%, transparent); }
@keyframes g-gap { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 0%, transparent); } 50% { box-shadow: 0 0 16px 2px color-mix(in srgb, var(--success) 40%, transparent); } }
@media (prefers-reduced-motion: no-preference) { .ch.gap:not(.filled):not(.next) { animation: g-gap 1.6s ease-in-out infinite; } }

/* SnapDigits: the sum, answer slots and number pad as game keys */
.question-display { font-weight: 800; }
.answer-display .slot { border-bottom-width: 4px; border-radius: 4px; }
.num-pad button { border-radius: 16px; font-weight: 800; font-size: 26px; box-shadow: 0 5px 0 var(--g-edge); }
.num-pad button:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--g-edge); }
.num-pad button.submit { box-shadow: 0 5px 0 var(--g-accent-deep); }
.num-pad button.submit:active { box-shadow: 0 1px 0 var(--g-accent-deep); }

/* Leaderboards: gold, silver and bronze ranks */
.row[data-rank="1"] .rk { background: linear-gradient(180deg, #FFE27A, #F2B705) !important; color: #3A2A00 !important; box-shadow: 0 2px 0 #9C7400; }
.row[data-rank="2"] .rk { background: linear-gradient(180deg, #F2F4F7, #B9C0CA) !important; color: #2C3036 !important; box-shadow: 0 2px 0 #7D858F; }
.row[data-rank="3"] .rk { background: linear-gradient(180deg, #F3B98A, #C9783E) !important; color: #3B1F08 !important; box-shadow: 0 2px 0 #8A4E22; }
.rk { font-weight: 800; }
.champ { border-width: 3px; }

/* Player avatars in the lobby get a little ring */
#l-players .av { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px color-mix(in srgb, var(--text) 8%, transparent); }

/* ---- Moments (fx.js): round splash, result burst, confetti ---- */
.fx-layer { position: fixed; inset: 0; z-index: 60; pointer-events: none; display: grid; place-items: center; }
.fx-splash { text-align: center; transform: scale(.6); opacity: 0; }
.fx-splash .k { font-size: 18px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.fx-splash .big { font-size: 64px; font-weight: 900; letter-spacing: -0.03em; line-height: 1; color: var(--text);
  text-shadow: 0 6px 0 color-mix(in srgb, var(--success) 45%, #000), 0 0 40px color-mix(in srgb, var(--success) 55%, transparent); }
.fx-splash .big.go { color: var(--success); }
.fx-result { padding: 16px 26px; border-radius: 24px; font-size: 30px; font-weight: 900; letter-spacing: -0.02em; color: #000; transform: scale(.5); opacity: 0;
  box-shadow: 0 8px 0 rgba(0,0,0,.25), 0 20px 50px rgba(0,0,0,.35); }
.fx-result.win { background: linear-gradient(180deg, #FFE27A, #F2B705); }
.fx-result.right { background: linear-gradient(180deg, #6FE38B, #30D158); }
.fx-result.miss { background: linear-gradient(180deg, #FFB0A8, #FF6961); }
.fx-confetti { position: fixed; inset: 0; z-index: 61; pointer-events: none; width: 100%; height: 100%; }
