/* Page and navigation */
:root {
  color-scheme: light;
  --ink: #20282e;
  --muted: #58646e;
  --line: #d8dfe3;
  --blue: #235d8d;
  --wash: #edf4f8;
  --paper: #fff;
  --soft: #f6f8f9;
  --radius: 7px;
}
* { box-sizing: border-box; }
body { margin: 0; background: #fafbf9; color: var(--ink); font: 16px/1.5 "Segoe UI", system-ui, sans-serif; }
a { color: var(--blue); }
button, input { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: default; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid #598db7; outline-offset: 3px; }
header { background: var(--paper); border-bottom: 1px solid var(--line); }
.bar, main { width: min(936px, calc(100% - 48px)); margin-inline: auto; }
.bar { display: flex; align-items: center; gap: 30px; min-height: 65px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-weight: 680; font-size: 20px; letter-spacing: -.65px; }
.brand .ico { color: var(--blue); width: 24px; height: 24px; }
nav, .actions, .interval, .back, .btn, .meta { display: inline-flex; align-items: center; gap: 8px; }
.account-actions { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.account-actions button { min-height: 37px; padding: 7px 14px; border-radius: 7px; font-size: 13px; font-weight: 650; transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
.account-actions button:hover { transform: translateY(-1px); }
.account-login { color: #263746; background: #fff; border: 1px solid #d5dde3; }
.account-login:hover { background: #f4f7f9; box-shadow: 0 3px 10px #26374612; }
.account-signup { color: #fff; background: #2878df; border: 1px solid #2878df; box-shadow: 0 2px 5px #2878df25; }
.account-signup:hover { background: #1e68c7; box-shadow: 0 4px 12px #2878df35; }
nav a { color: var(--muted); text-decoration: none; font-weight: 550; font-size: 14px; padding: 7px 12px; border-radius: 5px; }
nav a.active { background: var(--wash); color: var(--blue); }
.sound { display: grid; place-items: center; margin-left: 0; border: 0; background: transparent; width: 40px; height: 40px; color: var(--muted); border-radius: 5px; }
.sound:hover, nav a:hover { background: var(--soft); }
.ico { width: 18px; height: 18px; vertical-align: middle; flex-shrink: 0; }
main { padding-block: clamp(28px, 5vw, 58px) 48px; min-height: calc(100vh - 66px); }
main:focus { outline: none; }
.skip { position: fixed; top: -70px; left: 12px; background: white; padding: 10px; z-index: 1; }
.skip:focus { top: 8px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(34px, 4vw, 47px); letter-spacing: -.055em; line-height: 1.12; font-weight: 650; }
h2 { font-size: clamp(20px, 2.7vw, 25px); margin-bottom: 12px; line-height: 1.3; letter-spacing: -.035em; font-weight: 620; }
p { color: var(--muted); }
.intro { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 29px; }
.intro p { margin: 0; max-width: 51ch; }
.actions { flex-wrap: wrap; }
.btn { min-height: 42px; justify-content: center; padding: 9px 16px; border-radius: var(--radius); font-weight: 600; font-size: 14px; text-decoration: none; border: 1px solid var(--line); }
.primary { background: var(--blue); color: white; border-color: var(--blue); }
.primary:hover { background: #184b75; }
.secondary, .option, .square { background: var(--paper); }
.secondary:hover { background: var(--soft); }
.btn .ico { width: 15px; height: 15px; }

/* Game directory */
.directory-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.filters { display: flex; flex-wrap: wrap; gap: 3px; }
.chip { color: var(--muted); background: transparent; border: none; border-radius: 5px; padding: 8px 12px; font-size: 14px; }
.chip.on { background: #e7eff4; color: #204e70; font-weight: 600; }
.chip:hover { color: var(--blue); }
.gcount, .meta { color: var(--muted); font-size: 13px; }
.cards { margin-top: 12px; border-block: 1px solid var(--line); }
.card { display: grid; grid-template-columns: 42px minmax(0, 1fr) 72px 20px; gap: 16px; align-items: center; padding: 18px 8px; text-decoration: none; color: inherit; }
.card + .card { border-top: 1px solid var(--line); }
.card:hover { background: #f0f4f5; }
.game-icon { border: 1px solid #d7dfe1; border-radius: 9px; background: #f2f5f4; color: #4d6468; width: 42px; height: 42px; display: grid; place-items: center; }
.game-icon .ico { width: 21px; height: 21px; }
.card h3 { margin: 0 0 1px; font-size: 18px; letter-spacing: -.025em; font-weight: 620; }
.card p { margin: 0; font-size: 14px; line-height: 1.45; }
.card .meta { justify-self: end; }
.card > .ico { color: #6a7f8d; width: 16px; }
.enter, .feedback { animation: appear .17s ease-out; }
@keyframes appear { from { opacity: .65; transform: translateY(2px); } to { opacity: 1; transform: none; } }
button, .card, nav a, .btn { transition: background-color .16s ease, color .16s ease, border-color .16s ease; }

/* Game boards */
.stage, .stats { max-width: 800px; margin: auto; }
.back { font-size: 14px; text-decoration: none; margin-bottom: 18px; }
.back:hover, .floor-pass:hover { text-decoration: underline; }
.pane, dialog { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: clamp(18px, 4vw, 34px); }
.pane h1, .stats h1 { font-size: clamp(29px, 4vw, 38px); }
.game-kicker, .cap, .label, .hint, .game-note { color: var(--muted); font-size: 13px; }
.game-kicker, .cap, .label { display: block; margin-bottom: 5px; }
.instructions { max-width: 66ch; margin: 12px 0 22px; }
.settings { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; }
.settings input { width: 18px; height: 18px; accent-color: var(--blue); }
.statebar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; color: #415361; background: var(--soft); border-block: 1px solid var(--line); font-size: 14px; padding: 10px 12px; margin: 18px 0; }
.question { margin-block: 15px; }
.options, .answer-grid, .floor-modes { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.option, .clue, .flip, .square, .floor-mode { border: 1px solid #c9d2d8; border-radius: var(--radius); padding: 11px; min-height: 45px; font-weight: 550; }
.option:hover:enabled, .flip:hover:enabled, .square:hover:enabled, .clue:hover:enabled, .floor-mode:hover:enabled { border-color: #7393ac; background: var(--wash); }
.option.good, .flip.matched { color: #275b3c; border-color: #95b7a1; background: #edf6ee; }
.option.bad { color: #863e36; border-color: #cfa39d; background: #fcf0ee; }
.feedback { background: var(--soft); border-left: 3px solid #8099ab; padding: 10px 14px; margin: 16px 0; }
.feedback p { margin: 3px 0; }
.board-slot { display: flex; align-items: center; gap: 12px; background: var(--soft); border: 1px solid var(--line); border-radius: 5px; padding: 10px 13px; min-height: 44px; }
.board-slot strong { color: var(--blue); }.hidden-line { height: 2px; width: 45%; background: #c2cdd4; }
.jeop-board { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 7px; }
.col-title { text-align: center; align-self: end; font-size: 13px; color: var(--muted); }
.clue, .flip { background: var(--wash); color: #254f73; }
.clue { font-size: 18px; }.clue:disabled { color: #859299; background: var(--soft); }
.tile-board { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin: 16px 0; }
.flip { min-height: 72px; }.flip.revealed { background: white; border-color: #7294b2; }
.square-board { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; max-width: 300px; margin: 18px auto; }
.square { aspect-ratio: 1; font-size: 27px; color: var(--blue); }.square.bot { color: #955b3a; }
.chart { display: block; background: #fafcfd; width: min(260px,100%); height: 132px; margin: 14px 0; border: 1px solid var(--line); border-radius: 5px; }
.scorecards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 22px 0; }
.metric { padding: 14px; background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); }
.metric b, .metric small { display: block; }.metric b { font-size: 24px; }.metric small { color: var(--muted); }
.record { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.key-list { list-style: none; }
.key-list li + li { margin-top: 1.25rem; }
.key-list a { color: var(--blue); font-weight: 650; }
.key-list p { margin: .25rem 0 0; }
.record span { font-size: 14px; color: var(--muted); }
.result .trophy { display: none; }.result .cap { text-transform: capitalize; }
dialog { position: fixed; max-width: min(420px, calc(100% - 28px)); color: var(--ink); }
dialog h2 { padding-right: 24px; }dialog li { margin-block: 6px; }dialog p:last-child { margin-bottom: 0; }
dialog::backdrop { background: #18252c60; }.close { position: absolute; right: 8px; top: 7px; width: 40px; height: 40px; background: transparent; border: 0; font-size: 25px; }
/* Account sign-in experience */
.auth-locked { position: relative; min-height: 560px; isolation: isolate; }
.auth-preview { filter: blur(5px); opacity: .52; pointer-events: none; user-select: none; }
.auth-preview .preview-title { font-size: 38px; font-weight: 700; margin-bottom: 10px; }
.auth-preview .preview-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 22px 0; }
.auth-preview .preview-card { min-height: 90px; padding: 16px; border: 1px solid var(--line); background: #fff; border-radius: 10px; }
.auth-preview .preview-card b { display:block; font-size: 25px; }
.auth-preview .preview-card span { color: var(--muted); font-size: 13px; }
.auth-preview .preview-record { padding: 15px 10px; border-top: 1px solid var(--line); display:flex; justify-content:space-between; }
.auth-overlay { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; padding: 24px 12px; background: #f7fafc3b; backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); animation: authFade .22s ease both; }
.auth-card { width: min(440px,100%); background: rgba(255,255,255,.97); border: 1px solid #e0e7ed; border-radius: 17px; padding: clamp(22px,4vw,32px); box-shadow: 0 22px 70px #172b3b25, 0 4px 14px #172b3b0d; animation: authRise .28s cubic-bezier(.2,.75,.25,1) both; }
.auth-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom: 5px; }
.auth-card h2 { font-size: 25px; margin: 0 0 5px; letter-spacing: -.04em; }
.auth-card .auth-subtitle { margin:0 0 20px; font-size:14px; }
.auth-close { width:34px; height:34px; flex:0 0 auto; border:0; border-radius:9px; background:#f1f4f7; color:#586775; font-size:22px; line-height:1; }
.auth-close:hover { background:#e8eef3; }
.auth-tabs { display:grid; grid-template-columns:1fr 1fr; gap:5px; padding:4px; background:#f1f4f7; border-radius:10px; margin:0 0 19px; }
.auth-tabs button { min-height:39px; border:0; border-radius:7px; color:#667481; background:transparent; font-weight:650; font-size:14px; }
.auth-tabs button.active { background:white; color:#1f5fae; box-shadow:0 1px 4px #20384c18; }
.auth-form { display:grid; gap:8px; }
.auth-form .label { margin:3px 0 0; font-size:13px; font-weight:650; color:#3c4a56; }
.auth-form input:not([type=checkbox]) { width:100%; min-height:45px; border:1px solid #d7e0e7; border-radius:9px; padding:10px 12px; background:#fff; color:var(--ink); outline:none; transition:border .16s, box-shadow .16s; }
.auth-form input:not([type=checkbox]):focus { border-color:#4388d6; box-shadow:0 0 0 3px #4388d61c; }
.auth-form .settings { margin:7px 0 5px; font-size:13px; color:#586775; }
.auth-form .btn { width:100%; min-height:46px; border-radius:9px; margin-top:3px; }
.auth-card .hint { margin:15px 0 0; font-size:12px; line-height:1.5; }
.auth-card .feedback { border-radius:7px; font-size:13px; }
@keyframes authFade { from { opacity:0; } to { opacity:1; } }
@keyframes authRise { from { opacity:0; transform:translateY(10px) scale(.985); } to { opacity:1; transform:none; } }



/* Extra personality: bright but calm arcade accents */
body { background:
  radial-gradient(ellipse at 8% 4%, #eaf4ff 0, transparent 28rem),
  radial-gradient(ellipse at 94% 18%, #f7efff 0, transparent 24rem),
  #fbfcfe; }
.bar { position: relative; }
.brand { letter-spacing: -.7px; }
.brand .ico { filter: drop-shadow(0 2px 3px #286fc033); }
.intro h1 { background: linear-gradient(100deg,#1e3446 15%,#286fc0 75%,#6b69bd); -webkit-background-clip:text; background-clip:text; color:transparent; }
.cards { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:13px; border:0; background:transparent; overflow:visible; }
.card { position:relative; min-height:120px; grid-template-columns:42px minmax(0,1fr) 18px; gap:13px; padding:18px; border:1px solid #e1e8ef; border-radius:13px; background:rgba(255,255,255,.92); box-shadow:0 2px 8px #25384a08; transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease; }
.card + .card { border-top:1px solid #e1e8ef; }
.card:hover { transform:translateY(-2px); border-color:#c8dced; background:#fff; box-shadow:0 9px 22px #29496612; }
.card h3 { margin-bottom:5px; }
.card p { line-height:1.5; }
.card .meta { grid-column:2; justify-self:start; margin-top:1px; font-size:12px; }
.card > .ico { grid-column:3; grid-row:1; align-self:center; }
.game-icon { border-radius:12px; width:42px; height:42px; background:linear-gradient(145deg,#f2f7fd,#eaf2fb); border-color:#e0eaf4; color:#3b6f9e; }
.card:nth-child(4n+2) .game-icon { background:linear-gradient(145deg,#fff5eb,#ffede0); color:#a5683c; border-color:#f4e4d6; }
.card:nth-child(4n+3) .game-icon { background:linear-gradient(145deg,#f3efff,#ece7ff); color:#7862ad; border-color:#e5def7; }
.card:nth-child(4n) .game-icon { background:linear-gradient(145deg,#eaf9f5,#e1f5ef); color:#438a78; border-color:#d9eee7; }
.pane { box-shadow:0 8px 26px #25384a08; }
.game-kicker { display:inline-flex; align-items:center; gap:6px; padding:5px 9px; border-radius:999px; background:#edf5fd; color:#356b9c; font-weight:650; letter-spacing:.01em; }
.option:hover:enabled, .clue:hover:enabled, .flip:hover:enabled, .square:hover:enabled { transform:translateY(-1px); }
.option, .clue, .flip, .square { transition:transform .15s ease, border-color .15s ease, background .15s ease; }
.metric { background:linear-gradient(145deg,#f5f9fe,#f0f5fb); }
.btn.primary { box-shadow:0 3px 9px #286fc01c; }
.btn.primary:hover { transform:translateY(-1px); }
@media (max-width:650px) { .cards { grid-template-columns:1fr; } .card { min-height:unset; } }

/* A little more breathing room and color throughout the arcade */
:root {
  --blue: #2867a5;
  --wash: #edf5fc;
  --soft: #f7f9fc;
  --line: #dce4ec;
}
main { padding-block: clamp(34px, 5.5vw, 68px) 64px; }
.intro { margin-bottom: 36px; gap: 28px; }
.intro h1 { margin-bottom: 12px; }
.intro p { line-height: 1.65; }
.actions { gap: 12px; }
.btn { min-height: 44px; padding: 10px 18px; border-radius: 9px; }
.primary { background: #286fc0; border-color: #286fc0; box-shadow: 0 3px 9px #286fc01a; }
.primary:hover { background: #205d9f; box-shadow: 0 5px 13px #286fc026; }
.secondary { border-color: #d8e1e9; }
.directory-tools { gap: 14px; margin-bottom: 8px; }
.filters { gap: 6px; }
.chip { padding: 9px 14px; border-radius: 8px; }
.cards { margin-top: 16px; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; background: #fff; }
.card { gap: 18px; padding: 21px 17px; }
.card + .card { border-top: 1px solid #e8edf2; }
.card:hover { background: #f5f9fd; }
.game-icon { background: #eef5fb; border-color: #dce9f4; color: #376f9f; }
.pane { border-radius: 14px; padding: clamp(23px, 4.5vw, 38px); box-shadow: 0 8px 28px #26374608; }
.instructions { line-height: 1.7; margin: 14px 0 27px; }
.statebar { border: 1px solid #e3eaf0; border-radius: 9px; padding: 12px 15px; margin: 22px 0; }
.options, .answer-grid, .floor-modes { gap: 12px; }
.option, .clue, .flip, .square, .floor-mode { border-radius: 9px; padding: 13px; }
.feedback { border-radius: 0 9px 9px 0; padding: 13px 16px; margin: 19px 0; }
.scorecards { gap: 12px; }
.metric { border-radius: 11px; padding: 17px; background: #f2f7fc; border-color: #e1ebf4; }
.study-card { margin: 20px 0 24px; padding: clamp(20px, 4vw, 30px); border: 1px solid #dce8f2; border-radius: 13px; background: linear-gradient(145deg,#f2f8ff 0%,#fbfdff 75%); }
.study-card h2 { margin: 8px 0 20px; font-size: clamp(23px, 3vw, 30px); }
.study-notes { margin-top: 26px; background: #fbfcfe; }
.study-notes li { margin: 9px 0; padding-left: 3px; line-height: 1.6; }
.study-controls { display: flex; align-items: end; flex-wrap: wrap; gap: 14px; margin: 22px 0 8px; padding: 18px; border: 1px solid #dfe8f0; border-radius: 12px; background: #f7faff; }
.study-controls .field { display: grid; gap: 6px; min-width: 180px; flex: 1; }
.study-controls label { font-size: 13px; font-weight: 650; color: #465969; }
.study-controls input { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid #ccd9e5; border-radius: 8px; background: #fff; color: var(--ink); }
.study-controls .hint { flex-basis: 100%; }
.stage, .stats { max-width: 850px; }
@media (max-width: 670px) {
  main { padding-block: 28px 48px; }
  .intro { margin-bottom: 27px; }
  .card { padding: 17px 12px; }
  .study-controls { align-items: stretch; }
}
@media (max-width: 480px) {
  .actions { gap: 9px; }
  .btn { padding-inline: 14px; }
  .pane { padding: 19px; }
  .study-controls { padding: 14px; }
}


.account-actions { position:relative; }
.account-trigger { display:flex; align-items:center; gap:8px; background:#fff; border:1px solid var(--line); max-width:210px; }
.account-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.account-avatar { display:grid; place-items:center; flex:none; width:27px; height:27px; border-radius:50%; background:#e9f2fc; color:#2867a5; }
.account-menu { position:absolute; right:0; top:calc(100% + 9px); z-index:20; width:205px; background:white; border:1px solid var(--line); border-radius:12px; padding:6px; box-shadow:0 12px 32px #20384c20; animation:authRise .16s ease; }
.account-menu[hidden] { display:none; }
.account-menu button { display:block; width:100%; text-align:left; border:0; background:transparent; }
.account-menu button:hover { background:var(--wash); transform:none; }
.account-menu .logout { color:#a33d3d; }
.account-settings { max-width:650px; margin:auto; }
.account-settings .pane { margin-top:16px; }
.account-settings .auth-form { max-width:420px; }
.account-settings .danger { border-color:#e9caca; }
.danger-button { background:#a93636; color:white; border-color:#a93636; }
.account-settings [role=status] { margin:10px 0 0; font-size:14px; }
@media(max-width:600px){ .bar{flex-wrap:wrap; gap:8px; padding-block:8px;} .bar nav{order:4; width:100%;} .account-trigger{max-width:145px;} .brand{font-size:17px;} }

/* Jeopardy multiplayer */
.j-scores {display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:16px 0}.j-active {border-color:#286fc0;background:#eaf4ff}.j-scores .metric {min-width:0}.study-controls select {font:inherit;padding:10px;border:1px solid var(--line);border-radius:8px;background:white}.jeop-board button {min-width:0}.jeop-board .col-title {overflow-wrap:anywhere}@media(max-width:480px){.j-scores .metric b{font-size:20px}.jeop-board{gap:5px}.jeop-board .clue{min-height:48px}.study-controls .field{min-width:0;width:100%}}
/* The Floor */
.floor-mode { text-align: left; padding: 16px; background: var(--soft); }.floor-mode:disabled { opacity: .6; }
.floor-mode span, .floor-mode b { display: block; }.floor-mode span { color: var(--muted); font-size: 14px; margin-top: 3px; }
.floor-head, .floor-clocks { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.floor-head h1 { margin: 0; }.floor-head .btn { min-height: 36px; }
.floor-clock { flex: 1; padding: 8px 12px; text-align: center; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); }
.floor-clock.active { border-color: #6d91ad; background: var(--wash); }
.floor-clock small { display: block; font-size: 13px; color: var(--muted); }.floor-clock b { font-size: 29px; font-weight: 620; font-variant-numeric: tabular-nums; }
.floor-clock span, .floor-vs { color: var(--muted); font-size: 12px; margin-left: 4px; }
.floor-turn { text-align: center; color: var(--blue); font-weight: 600; font-size: 14px; }
.floor-card { margin: 9px 0 14px; padding: 17px 10px; min-height: 116px; display: grid; justify-items: center; align-content: center; background: #f7f9f9; border: 1px solid var(--line); border-radius: 7px; text-align: center; }
.floor-card h2 { margin-bottom: 7px; }.floor-count { font-size: 35px; }
.floor-expression { font: 550 clamp(20px,4vw,28px)/1.45 ui-monospace, Consolas, monospace; white-space: pre-line; }
.floor-chart { display: block; width: min(240px,100%); height: 138px; }.floor-coords { font-size: 13px; color: var(--muted); }
.floor-words { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 9px; }.floor-words button { flex: 1; }
#floor-form { display: flex; gap: 7px; }#floor-guess { min-width: 0; flex: 1; padding: 10px 12px; border: 1px solid #aebfc9; border-radius: var(--radius); font-size: 16px; }
.floor-pass { border: 0; padding: 10px 0; font-size: 14px; color: var(--blue); background: transparent; }
.share-address { padding: 12px; background: var(--wash); border-radius: 5px; overflow-wrap: anywhere; }.share-address small { display: block; }
.skip-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 670px) {
  .intro { align-items: flex-start; flex-direction: column; gap: 14px; }
  .bar, main { width: calc(100% - 32px); }.bar { gap: 10px; min-height: 56px; }
  .card { gap: 12px; }.tile-board { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 480px) {
  .brand { font-size: 17px; gap: 5px; }.brand .ico { width: 19px; }.bar { gap: 5px; }
  nav { gap: 1px; }nav a { font-size: 12px; padding: 7px 7px; }
  .account-actions { gap:4px; }.account-actions button { min-height:34px; padding:6px 9px; font-size:12px; }
  .sound { width:32px; }
  .auth-preview .preview-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .auth-locked { min-height:590px; }

  .intro { margin-bottom: 20px; }.gcount { display: none; }.filters { gap: 0; }.chip { padding: 8px 10px; font-size: 13px; }
  .card { grid-template-columns: 33px minmax(0,1fr) 15px; gap: 10px; padding: 14px 1px; }.card .meta { display: none; }.game-icon { width: 33px; height: 33px; border-radius: 7px; }
  .card h3 { font-size: 17px; }.card p { font-size: 13px; }
  .pane { padding: 16px; }.metric { padding: 10px; }.metric small { font-size: 12px; }.scorecards { gap: 6px; }
  .board-slot { padding: 8px; gap: 6px; font-size: 14px; }.col-title { font-size: 11px; }.clue { padding: 9px 4px; }
  .floor-words .option { padding: 7px; font-size: 13px; }.floor-clocks { gap: 4px; }.floor-clock { padding: 6px; }
  .record { flex-wrap: wrap; }.floor-chart { height: 118px; }.floor-mode { padding: 12px; }
}
/* Mobile-first responsive refinements */
@media (max-width: 760px) {
  .bar { display:grid; grid-template-columns:minmax(0,1fr) auto 44px; gap:8px 10px; width:100%; padding:10px 16px 0; min-height:unset; }
  .brand { grid-column:1; grid-row:1; min-width:0; font-size:clamp(15px,4vw,19px); gap:5px; line-height:1.2; }
  .brand .ico { width:20px; height:20px; }
  .account-actions { grid-column:2; grid-row:1; margin:0; gap:5px; min-width:0; }
  .account-actions button { min-height:40px; padding:7px 10px; font-size:13px; }
  .account-trigger { max-width:150px; min-width:0; }
  .sound { grid-column:3; grid-row:1; width:44px; height:44px; }
  .bar nav { grid-column:1/-1; grid-row:2; display:flex; width:100%; gap:8px; padding:0 0 9px; }
  nav a { flex:1; text-align:center; padding:10px; font-size:14px; }
  .account-menu { z-index:30; width: min(220px, calc(100vw - 32px)); }
  .account-menu button { min-height:44px; }
  main { width:calc(100% - 32px); padding-block:28px 48px; }
  .intro { align-items:stretch; gap:16px; margin-bottom:24px; }
  .intro h1 { font-size:clamp(29px,7.5vw,42px); }
  .intro .actions { display:flex; }
  .intro .actions .btn { flex:1; }
  .directory-tools { gap:8px; }
  .filters { gap:4px; }
  .chip { padding:9px 11px; min-height:40px; }
  .cards { grid-template-columns:minmax(0,1fr); border:0; border-radius:0; overflow:visible; background:transparent; gap:10px; }
  .card, .card + .card { grid-template-columns:42px minmax(0,1fr) 16px; gap:10px 12px; padding:15px; border:1px solid var(--line); border-radius:12px; min-height:unset; }
  .card .meta { display:block; grid-column:2; margin:0; }
  .game-icon { width:42px; height:42px; }
  .card > .ico { grid-row:1/3; }
  .stage, .stats, .account-settings, .pane { min-width:0; }
  .pane { padding:18px; }
  .pane h1, .stats h1, .account-settings h1 { font-size:clamp(26px,7vw,35px); }
  .question, .option, .floor-expression, .metric, .record, .account-settings { overflow-wrap:anywhere; }
  .option, .flip, .clue, .btn, .floor-mode { min-height:44px; }
  .auth-form input:not([type=checkbox]), .study-controls input { font-size:16px; }
  .study-controls .field { min-width:0; flex-basis:100%; }
  .study-controls .btn { width:100%; }
  .auth-locked { min-height:0; }
  .auth-preview { display:none; }
  .auth-overlay { position:static; padding:0; background:none; backdrop-filter:none; }
  .auth-card { width:100%; padding:22px; box-shadow:0 6px 24px #20384c12; }
  dialog { width:calc(100% - 32px); max-height:calc(100dvh - 32px); overflow:auto; padding:22px; }
  .scorecards { grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
  .metric { padding:10px 8px; }
  .metric b { font-size:clamp(17px,5vw,24px); }
  .metric small { line-height:1.35; }
  .record { gap:6px; }
  .floor-clock { min-width:0; }
  .floor-clock b { font-size:25px; }
  .jeop-board { gap:4px; }
  .col-title { overflow-wrap:anywhere; }
  .tile-board { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:420px) {
  .bar { grid-template-columns:minmax(0,1fr) auto; padding-inline:12px; gap:6px; }
  .sound { grid-column:2; grid-row:2; }
  .bar nav { grid-column:1; grid-row:2; padding:0 0 6px; }
  .account-actions { grid-column:2; }
  .account-trigger { max-width:135px; }
  main { width:calc(100% - 24px); }
  .options, .floor-modes { grid-template-columns:1fr; }
  .pane { padding:14px; }
  .answer-grid { gap:6px; }
  .flip { padding:8px 4px; font-size:13px; }
  .floor-head { flex-wrap:wrap; }
  .floor-words .option { min-height:44px; }
  .auth-card { padding:18px; }
}

/* Keep the field of symbols below the interactive game surfaces. */
body { isolation: isolate; }
.math-sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; user-select: none; }
.math-sky span { position: absolute; font: 500 var(--size)/1 Georgia, serif; color: #4789ae; opacity: .21;
  animation: symbol-float var(--speed) ease-in-out var(--delay) infinite alternate; }
.math-sky span:nth-child(3n) { color: #9270ae; }
.math-sky span:nth-child(3n+1) { color: #458d80; }
@keyframes symbol-float {
  from { transform: translate(calc(0px - var(--dx)), var(--dy)) rotate(-16deg); }
  to { transform: translate(var(--dx), calc(0px - var(--dy))) rotate(16deg); }
}
.cards { border: 0; background: transparent; overflow: visible; }
.card, .card + .card, .stage > .pane { border: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
