/* Calccc Brain Games — isolated from calculator styles */
.game-page { max-width: 1080px; margin: 0 auto; }
.game-hero { margin-bottom: 18px; }
.game-hero h1 { margin: 6px 0 8px; }
.game-hero p { max-width: 760px; color: var(--muted); }
.game-shell { background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 18px; box-shadow: var(--shadow-sm); }
.game-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.game-toolbar .game-spacer { flex: 1; }
.game-modes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.game-mode { border: 1px solid var(--border); background: #fff; color: var(--ink); border-radius: 999px; padding: 7px 12px; font-size: 12px; font-weight: 700; cursor: pointer; }
.game-mode:hover { border-color: var(--brand); color: var(--brand); }
.game-mode.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.game-btn { border: 1px solid var(--border); background: #fff; color: var(--ink); border-radius: 9px; padding: 8px 12px; font-size: 12px; font-weight: 700; cursor: pointer; }
.game-btn:hover { border-color: var(--brand); color: var(--brand); }
.game-btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.game-btn:disabled { opacity: .45; cursor: not-allowed; }
.game-stat { color: var(--muted); font-size: 12px; font-weight: 700; }
.game-stat strong { color: var(--ink); }
.game-status { min-height: 24px; margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.game-status.is-error { color: #9b2c1c; }
.game-status.is-success { color: var(--brand-dark); }

/* 2048 */
.g2048-board { --n: 4; display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 8px; background: #e8f1eb; border-radius: 16px; padding: 8px; max-width: 520px; margin: 0 auto; touch-action: none; user-select: none; }
.g2048-cell { position: relative; aspect-ratio: 1; border-radius: 9px; background: rgba(255,255,255,.55); display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--navy); font-size: clamp(16px, 4.2vw, 30px); transition: background .12s, transform .12s; }
.g2048-cell.has-value { background: #d4eadc; }
.g2048-cell.v2 { background:#d9ecdf; } .g2048-cell.v4 { background:#c7e3d1; } .g2048-cell.v8 { background:#a9d5b9; }
.g2048-cell.v16 { background:#7fc39d; color:#0b3a2b; } .g2048-cell.v32 { background:#53ad83; color:#fff; }
.g2048-cell.v64 { background:#2f906a; color:#fff; } .g2048-cell.v128 { background:#157a57; color:#fff; }
.g2048-cell.v256 { background:#0d6b52; color:#fff; } .g2048-cell.v512 { background:#0a5742; color:#fff; }
.g2048-cell.v1024 { background:#084a38; color:#fff; } .g2048-cell.v2048 { background:#06382b; color:#fff; }
.g2048-cell.v2584 { background:#c9a227; color:#1b1b1b; } .g2048-cell.v3 { background:#cfe6d8; } .g2048-cell.v5 { background:#b7dcc5; }
.g2048-cell.v13 { background:#8dc9a7; } .g2048-cell.v21 { background:#6bb78e; color:#fff; } .g2048-cell.v34 { background:#4aa578; color:#fff; }
.g2048-cell.v55 { background:#2e9068; color:#fff; } .g2048-cell.v89 { background:#1c7d58; color:#fff; } .g2048-cell.v144 { background:#0f6b4d; color:#fff; }
.g2048-cell.v233 { background:#0a5941; color:#fff; } .g2048-cell.v377 { background:#084a37; color:#fff; } .g2048-cell.v610 { background:#063b2c; color:#fff; }
.g2048-cell.v987 { background:#052f23; color:#fff; } .g2048-cell.v1597 { background:#c9a227; color:#1b1b1b; }
.g2048-cell.pop { animation: gamePop .16s var(--ease); }
@keyframes gamePop { 0% { transform: scale(.86); } 100% { transform: scale(1); } }

/* Sudoku */
.sudoku-wrap { max-width: 560px; margin: 0 auto; }
.sudoku-board { display: grid; grid-template-columns: repeat(var(--n), 1fr); background: var(--navy); gap: 2px; padding: 3px; border-radius: 10px; user-select: none; }
.sudoku-cell { position: relative; aspect-ratio: 1; border: 0; background: #fff; color: var(--ink); display: flex; align-items: center; justify-content: center; font-size: clamp(14px, 3.6vw, 23px); font-weight: 600; cursor: pointer; padding: 0; }
.sudoku-cell.given { color: var(--navy); font-weight: 800; background:#f4f8f5; }
.sudoku-cell.selected { background: #dff2e7; box-shadow: inset 0 0 0 2px var(--brand); }
.sudoku-cell.conflict { color: #b42318; }
.sudoku-cell.diag { background:#f7fbf8; }
.sudoku-cell.diag.selected { background:#dff2e7; }
.sudoku-cell.fog { background:#20342c; color:#9fc7b3; font-size: 14px; }
.sudoku-cell.done { background:#e5f5ea; }
.sudoku-cell .notes { position:absolute; inset:2px; display:grid; grid-template-columns:repeat(3,1fr); gap:0; font-size:8px; line-height:1; align-content:center; color:var(--muted); }
.sudoku-cell .cage-sum { position:absolute; top:1px; left:3px; font-size:9px; color:#8a5a12; font-weight:700; }
.sudoku-board .box-right { border-right: 3px solid var(--navy); }
.sudoku-board .box-bottom { border-bottom: 3px solid var(--navy); }
.sudoku-pad { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 12px; }
.sudoku-pad button { min-height: 42px; border: 1px solid var(--border); border-radius: 9px; background:#fff; font-size: 16px; font-weight: 700; cursor:pointer; }
.sudoku-pad button:hover { border-color: var(--brand); color: var(--brand); }
.sudoku-tools { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; align-items:center; }
.sudoku-tools .game-btn.is-active { background: var(--brand); color:#fff; border-color:var(--brand); }

/* Daily number */
.number-wrap { max-width: 620px; margin: 0 auto; }
.number-rows { display:flex; flex-direction:column; gap:6px; }
.number-row { display:grid; grid-template-columns: repeat(var(--len), 1fr); gap:4px; }
.number-tile { aspect-ratio: 1; min-height: 38px; border:1px solid var(--border); border-radius:6px; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:clamp(13px,3vw,22px); background:#fff; color:var(--ink); }
.number-row.current .number-tile { border-color:#a9c7b8; }
.number-tile.green { background:#238a5b; border-color:#238a5b; color:#fff; }
.number-tile.purple { background:#b5860b; border-color:#b5860b; color:#fff; }
.number-tile.black { background:#33413b; border-color:#33413b; color:#fff; }
.number-tile.filled { background:#f2f7f4; }
.number-keypad { display:grid; grid-template-columns: repeat(6,1fr); gap:6px; margin-top:14px; }
.number-keypad button { min-height:42px; border:1px solid var(--border); border-radius:8px; background:#fff; font-size:16px; font-weight:700; cursor:pointer; }
.number-keypad button.wide { grid-column: span 2; }
.number-keypad button:hover { border-color:var(--brand); color:var(--brand); }
.number-note { color:var(--muted); font-size:12px; line-height:1.5; margin-top:10px; }

/* Shared */
.game-overlay { position: fixed; inset: 0; background: rgba(9, 25, 18, .55); display:flex; align-items:center; justify-content:center; z-index:9999; padding:20px; }
.game-overlay-card { background:#fff; border-radius:16px; padding:24px; max-width:380px; text-align:center; }
.game-overlay-card h2 { margin:0 0 8px; }
.game-overlay-card p { color:var(--muted); }
.game-mode-copy { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
@media (max-width: 640px) {
  .game-shell { padding: 12px; border-radius: 14px; }
  .g2048-board { gap:5px; padding:5px; }
  .sudoku-pad { grid-template-columns: repeat(5,1fr); }
  .number-keypad { grid-template-columns: repeat(4,1fr); }
}

/* Hub + copy */
.game-hub-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin:26px 0 34px; }
.game-hub-card { display:flex; flex-direction:column; padding:22px; border:1px solid var(--border); border-radius:16px; background:#fff; color:var(--ink); text-decoration:none; transition:.16s var(--ease); }
.game-hub-card:hover { border-color:var(--brand); transform:translateY(-2px); box-shadow:var(--shadow-sm); }
.game-hub-tag { color:var(--brand-dark); font-size:10px; font-weight:800; letter-spacing:.1em; text-transform:uppercase; }
.game-hub-card h2 { margin:8px 0 8px; font-size:24px; }
.game-hub-card p { color:var(--muted); font-size:14px; line-height:1.6; margin:0 0 18px; }
.game-hub-link { margin-top:auto; color:var(--brand-dark); font-size:12px; font-weight:800; }
.game-copy { max-width:760px; margin:30px 0 10px; }
.game-copy h2 { margin-top:26px; }
.game-copy p, .game-copy li { color:var(--muted); line-height:1.7; }
@media (max-width:800px) { .game-hub-grid { grid-template-columns:1fr; } }

.g2048-cell.v1 { background:#eef8f1; }
.g2048-cell.v2 { background:#d9ecdf; }

/* Trap the Cat */
.trap-wrap { max-width: 660px; margin: 0 auto; }
.trap-board { display: block; width: 100%; height: auto; overflow: visible; }
.trap-cell { fill: #e7f2eb; stroke: #fff; stroke-width: 2; cursor: pointer; transition: fill .12s; }
.trap-cell.edge { fill: #d6eadf; }
.trap-cell:hover { fill: #c2e2cf; }
.trap-cell.blocked { fill: #31443b; cursor: default; }
.trap-cell.blocked:hover { fill: #31443b; }
.trap-cell.cat-cell { fill: #f7e9c6; cursor: default; }
.trap-cat-icon { pointer-events: none; }
.trap-legend { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.trap-mouse { width: 28px; height: 28px; flex: 0 0 auto; }
@media (max-width: 800px) { .game-hub-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .game-hub-grid { grid-template-columns: 1fr; } }

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

.game-cats { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 18px; }
.game-cats a { border:1px solid var(--border); background:#fff; color:var(--ink); border-radius:999px; padding:6px 12px; font-size:12px; font-weight:700; }
.game-cats a:hover { border-color:var(--brand); color:var(--brand); }

/* Nonogram */
.nonogram-wrap { max-width: 640px; margin: 0 auto; overflow-x: auto; }
.nonogram-board { display: grid; gap: 2px; align-items: stretch; min-width: 360px; }
.nono-corner { background: #eef5f0; border-radius: 6px; }
.nono-col-clue, .nono-row-clue { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 11px; font-weight: 700; white-space: pre-line; text-align: center; line-height: 1.2; background: #f6faf7; border-radius: 5px; padding: 2px; }
.nono-col-clue { min-height: 54px; }
.nono-row-clue { min-height: 34px; }
.nono-cell { aspect-ratio: 1; min-width: 30px; border: 1px solid var(--border); border-radius: 3px; background: #fff; cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center; color: var(--brand-dark); font-size: 18px; font-weight: 800; }
.nono-cell:hover { background: #eef8f2; }
.nono-cell.filled { background: var(--brand); border-color: var(--brand); }
.nono-cell.x { color: #8a9891; }
.nono-cell.wrong { background: #f6d5d1; border-color: #c0392b; }

/* Minesweeper */
.mine-board { --n: 9; display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 2px; max-width: 560px; margin: 0 auto; background: #dfeae3; padding: 4px; border-radius: 10px; }
.mine-cell { aspect-ratio: 1; border: 0; border-radius: 3px; background: #cfe1d5; color: var(--navy); font-weight: 800; font-size: clamp(10px, 2.3vw, 18px); cursor: pointer; padding: 0; }
.mine-cell:hover { background: #b9d7c4; }
.mine-cell.open { background: #f3f8f4; cursor: default; }
.mine-cell.mine { background: #f6d5d1; color: #a3261b; }
.mine-cell.mine-hidden { background: #31443b; color: #fff; }
.mine-cell.flag { color: #9b5c00; }
.mine-cell.n1 { color: #1769aa; } .mine-cell.n2 { color: #1b7a4b; } .mine-cell.n3 { color: #b23b2e; }
.mine-cell.n4 { color: #5b3b9b; } .mine-cell.n5 { color: #8a3b1e; } .mine-cell.n6 { color: #1b7f8a; }
.mine-cell.n7 { color: #2a2a2a; } .mine-cell.n8 { color: #646970; }

/* Lights Out */
.lights-board { --n: 5; display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 8px; max-width: 440px; margin: 0 auto; }
.light-cell { aspect-ratio: 1; border-radius: 10px; border: 1px solid #c8d8cd; background: #eef5f0; color: transparent; font-size: clamp(16px, 4vw, 30px); cursor: pointer; }
.light-cell.on { background: #f4b84a; border-color: #d99c2b; color: #6b4a0a; box-shadow: inset 0 0 0 4px rgba(255,255,255,.2); }
.light-cell:hover { border-color: var(--brand); }

/* Sliding puzzle */
.slide-board { --n: 4; display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 5px; max-width: 460px; margin: 0 auto; background: #dfeae3; padding: 5px; border-radius: 10px; }
.slide-cell { aspect-ratio: 1; border: 0; border-radius: 6px; background: #fff; color: var(--navy); font-size: clamp(16px, 4vw, 30px); font-weight: 800; cursor: pointer; }
.slide-cell:hover { background: #eaf5ee; }
.slide-cell.blank { background: transparent; cursor: default; }

.game-guide-link { margin-top: 28px; padding: 18px 20px; border: 1px solid var(--border); border-radius: 12px; background: #f6faf7; }
.game-guide-link h2 { margin: 4px 0 6px; font-size: 20px; }
.game-guide-link p { color: var(--muted); }

/* Make 24 */
.make24-wrap { max-width: 560px; margin: 0 auto; text-align: center; }
.make24-target { display: flex; align-items: baseline; justify-content: center; gap: 10px; color: var(--muted); font-weight: 700; }
.make24-target strong { font-size: 54px; color: var(--navy); line-height: 1; }
.make24-cards { display: flex; justify-content: center; gap: 10px; margin: 18px 0; }
.make24-card { width: 76px; height: 92px; border: 2px solid var(--brand); border-radius: 10px; background: #fff; color: var(--navy); font-size: 28px; font-weight: 800; cursor: pointer; }
.make24-card:hover { background: #eef8f2; }
.make24-card.used { opacity: .3; cursor: default; }
.make24-expr { min-height: 44px; padding: 10px; border: 1px dashed #a9c7b8; border-radius: 8px; font-size: 20px; font-weight: 700; color: var(--navy); overflow-wrap: anywhere; }
.make24-ops { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; margin-top: 10px; }
.make24-ops button { min-height: 42px; border: 1px solid var(--border); border-radius: 7px; background: #fff; font-size: 18px; font-weight: 700; cursor: pointer; }
.make24-ops button:hover { border-color: var(--brand); color: var(--brand); }
.make24-actions { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }

/* Light Up */
.lightup-board { --n: 6; display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 3px; max-width: 540px; margin: 0 auto; background: #dfeae3; padding: 4px; border-radius: 8px; }
.lightup-cell { aspect-ratio: 1; border: 0; border-radius: 2px; background: #f7fbf8; color: var(--navy); font-weight: 800; font-size: clamp(12px, 2.5vw, 20px); cursor: pointer; }
.lightup-cell:hover { background: #e4f2e9; }
.lightup-cell.wall { background: var(--navy); color: #fff; cursor: default; }
.lightup-cell.lamp { background: #f4b84a; color: #6b4a0a; }
.lightup-cell.mark { color: #8a9891; }

/* Hashi */
.hashi-wrap { max-width: 620px; margin: 0 auto; }
.hashi-board { position: relative; width: 100%; aspect-ratio: 1; background: #f3f8f4; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.hashi-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hashi-line { stroke: var(--brand); stroke-width: .055; stroke-linecap: round; }
.hashi-island { position: absolute; width: 10%; aspect-ratio: 1; transform: translate(-50%, -50%); border: 2px solid var(--brand); border-radius: 50%; background: #fff; color: var(--navy); font-weight: 800; font-size: clamp(11px, 2.4vw, 18px); cursor: pointer; padding: 0; }
.hashi-island:hover, .hashi-island.selected { background: var(--brand); color: #fff; }

/* Kakuro */
.kakuro-board { --n: 6; display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 2px; max-width: 560px; margin: 0 auto; background: #dfeae3; padding: 4px; border-radius: 6px; }
.kakuro-cell { position: relative; aspect-ratio: 1; border: 0; background: #fff; color: var(--navy); font-size: clamp(14px, 3vw, 22px); font-weight: 800; cursor: pointer; padding: 0; }
.kakuro-cell:hover { background: #eef8f2; }
.kakuro-cell.selected { background: #dff2e7; box-shadow: inset 0 0 0 2px var(--brand); }
.kakuro-cell.wall { background: var(--navy); cursor: default; }
.kakuro-clue { position: absolute; color: #fff; font-size: 9px; font-weight: 700; line-height: 1; }
.kakuro-clue.across { left: 3px; bottom: 2px; }
.kakuro-clue.down { right: 3px; top: 2px; }
.kakuro-pad { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; max-width: 420px; margin: 12px auto 0; }
.kakuro-pad button { min-height: 38px; border: 1px solid var(--border); border-radius: 7px; background: #fff; font-size: 16px; font-weight: 700; cursor: pointer; }
.kakuro-pad button:hover { border-color: var(--brand); color: var(--brand); }

/* Tents */
.tents-board { display:grid; gap:3px; max-width:520px; margin:0 auto; align-items:stretch; }
.tents-clue { display:flex; align-items:center; justify-content:center; color:var(--muted); font-size:12px; font-weight:800; background:#f4faf6; border-radius:4px; }
.tents-cell { aspect-ratio:1; border:1px solid var(--border); background:#fff; color:var(--brand-dark); font-size:clamp(16px,3.5vw,25px); font-weight:800; cursor:pointer; border-radius:3px; padding:0; }
.tents-cell:hover { background:#eef8f2; }
.tents-cell.tree { background:#e1f0e7; color:var(--brand-dark); cursor:default; }
.tents-cell.tent { background:var(--brand); color:#fff; }
.tents-cell.grass { color:#8a9891; }

/* Futoshiki */
.futo-board { --n:5; display:grid; grid-template-columns:repeat(var(--n),1fr); gap:3px; max-width:480px; margin:0 auto; background:#dfeae3; padding:4px; border-radius:8px; }
.futo-cell { position:relative; aspect-ratio:1; border:0; background:#fff; color:var(--navy); font-size:clamp(16px,3.5vw,24px); font-weight:800; cursor:pointer; border-radius:3px; padding:0; }
.futo-cell:hover { background:#eef8f2; }
.futo-cell.given { background:#f1f8f3; color:var(--brand-dark); cursor:default; }
.futo-cell.selected { background:#dff2e7; box-shadow:inset 0 0 0 2px var(--brand); }
.futo-sign { position:absolute; color:var(--brand); font-size:14px; font-weight:800; line-height:1; }
.futo-sign.right { right:-8px; top:50%; transform:translateY(-50%); z-index:2; }
.futo-sign.bottom { bottom:-8px; left:50%; transform:translateX(-50%); z-index:2; }
.futo-pad { display:grid; grid-template-columns:repeat(6,1fr); gap:5px; max-width:360px; margin:12px auto 0; }
.futo-pad button { min-height:38px; border:1px solid var(--border); border-radius:7px; background:#fff; font-size:16px; font-weight:700; cursor:pointer; }

/* Sokoban */
.soko-board { display:grid; grid-template-columns:repeat(var(--cols),1fr); gap:2px; max-width:560px; margin:0 auto; background:#dfeae3; padding:4px; border-radius:8px; }
.soko-cell { aspect-ratio:1; display:flex; align-items:center; justify-content:center; border-radius:2px; background:#f7fbf8; color:var(--navy); font-size:clamp(12px,3vw,23px); font-weight:800; }
.soko-cell.wall { background:var(--navy); }
.soko-cell.target { background:#f7e9c6; }
.soko-cell.box { background:#d99c2b; color:#3b2a08; }
.soko-cell.player { background:#dff2e7; color:var(--brand-dark); }
.soko-controls { display:grid; grid-template-columns:repeat(4,1fr); gap:6px; max-width:300px; margin:12px auto 0; }
.soko-controls button { min-height:42px; font-size:18px; }

/* Word search */
.word-board { --n:10; display:grid; grid-template-columns:repeat(var(--n),1fr); gap:2px; max-width:560px; margin:0 auto; background:#dfeae3; padding:4px; border-radius:8px; }
.word-cell { aspect-ratio:1; border:0; background:#fff; color:var(--navy); font-size:clamp(10px,2.4vw,18px); font-weight:700; cursor:pointer; border-radius:2px; padding:0; }
.word-cell:hover { background:#eef8f2; }
.word-cell.selected { background:var(--brand); color:#fff; }
.word-cell.found { background:#cfe8d8; color:var(--brand-dark); }
.word-list { display:flex; flex-wrap:wrap; gap:8px 14px; max-width:560px; margin:12px auto 0; justify-content:center; color:var(--muted); font-size:12px; font-weight:700; }
.word-list .found { color:#8a9891; text-decoration:line-through; }

/* Cryptogram */
.crypto-text { display:flex; flex-wrap:wrap; align-items:center; max-width:760px; margin:0 auto; line-height:1.9; }
.crypto-letter { width:28px; height:34px; border:0; border-bottom:2px solid var(--border); background:transparent; color:var(--navy); font-size:18px; font-weight:800; cursor:pointer; margin:1px; padding:0; }
.crypto-letter:hover { background:#eef8f2; }
.crypto-letter.selected { border-bottom-color:var(--gold); background:#fdf6e6; }
.crypto-letter.given { color:var(--brand-dark); }
.crypto-letter.solved { border-bottom-color:var(--brand); }
.crypto-punct { display:inline-block; min-width:8px; color:var(--muted); font-size:16px; }
.crypto-pad { display:grid; grid-template-columns:repeat(9,1fr); gap:4px; max-width:520px; margin:14px auto 0; }
.crypto-pad button { min-height:34px; border:1px solid var(--border); border-radius:5px; background:#fff; font-weight:700; cursor:pointer; }

/* Game list cards: text left, image right */
.game-page .game-hero { max-width: 880px; }
.game-count { margin: 8px 0 0; color: var(--muted-2); font-size: 12px; font-weight: 700; }
.game-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; max-width: 1080px; margin: 22px auto 8px; }
.game-list-card { display: grid; grid-template-columns: minmax(0, 1fr) 205px; gap: 18px; align-items: stretch; min-height: 178px; padding: 18px; border: 1px solid var(--border); border-radius: 16px; background: #fff; color: var(--ink); text-decoration: none; transition: .16s var(--ease); }
.game-list-card:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.game-list-body { display: flex; flex-direction: column; min-width: 0; }
.game-list-kicker { color: var(--brand-dark); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.game-list-card h2 { margin: 7px 0 7px; font-size: 22px; line-height: 1.15; color: var(--navy); }
.game-list-card p { margin: 0 0 14px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.game-list-link { margin-top: auto; color: var(--brand-dark); font-size: 12px; font-weight: 800; }
.game-list-media { overflow: hidden; border-radius: 11px; background: var(--navy); aspect-ratio: 16 / 10; }
.game-list-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.game-cats a { display: inline-flex; align-items: center; gap: 6px; }
.game-cats a span { color: var(--muted-2); font-size: 10px; }
.game-cats a.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.game-cats a.is-active span { color: #d9efe3; }
.game-back { max-width: 1080px; margin: 22px auto 0; font-size: 13px; }
@media (max-width: 980px) { .game-list { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .game-list-card { grid-template-columns: 1fr; gap: 12px; min-height: 0; }
  .game-list-media { order: -1; aspect-ratio: 16 / 8; }
  .game-list-card h2 { font-size: 20px; }
}

/* Keep card artwork inside its grid column */
.game-list-card { overflow: hidden; }
.game-list-media { min-width: 0; width: 100%; height: 100%; aspect-ratio: auto; }
.game-list-media img { min-width: 0; }
@media (max-width: 600px) {
  .game-list-media { height: 180px; }
}

@media (max-width: 600px) {
  .game-list-media { height: auto; aspect-ratio: 640 / 520; }
}

/* Daily picks */
.daily-picks { max-width:1080px; margin:24px auto 6px; padding:22px; border:1px solid var(--border); border-radius:18px; background:linear-gradient(135deg,#fffdf8,#f1f8f4); }
.daily-picks-head { max-width:680px; }
.daily-picks-head .eyebrow { margin-bottom:6px; }
.daily-picks-head h2 { margin:0 0 6px; font-size:26px; color:var(--navy); }
.daily-picks-head p { margin:0 0 16px; color:var(--muted); font-size:14px; }
.daily-picks-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.daily-pick-card { display:grid; grid-template-columns:minmax(0,1fr) 82px; gap:8px; align-items:center; min-height:82px; padding:9px; border:1px solid var(--border); border-radius:11px; background:#fff; color:var(--ink); text-decoration:none; }
.daily-pick-card:hover { border-color:var(--brand); }
.daily-pick-copy { display:flex; flex-direction:column; gap:3px; min-width:0; }
.daily-pick-copy strong { color:var(--navy); font-size:13px; }
.daily-pick-copy small { color:var(--brand-dark); font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.05em; }
.daily-pick-card img { width:82px; height:64px; object-fit:cover; border-radius:7px; background:var(--navy); }
@media (max-width:900px) { .daily-picks-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:560px) { .daily-picks { padding:16px; } .daily-picks-grid { grid-template-columns:1fr; } .daily-pick-card { grid-template-columns:1fr 92px; } }

/* Daily streak / share bar */
.game-daily-bar { display:flex; flex-wrap:wrap; align-items:center; gap:8px 16px; max-width:760px; margin:16px auto 0; padding:10px 12px; border:1px solid var(--border); border-radius:10px; background:#fbfdfb; color:var(--muted); font-size:11px; }
.game-daily-bar strong { color:var(--navy); }
.game-daily-streak { color:var(--brand-dark); font-weight:800; }
.game-daily-state { padding-left:12px; border-left:1px solid var(--border); }
.game-daily-total { padding-left:12px; border-left:1px solid var(--border); }
.game-share-btn { margin-left:auto; min-height:30px; padding:4px 9px; font-size:10.5px; }
.daily-pick-card { position:relative; }
.daily-pick-card.is-done { border-color:var(--brand); background:#f4fbf7; }
.daily-done { position:absolute; top:6px; right:8px; color:var(--brand-dark); font-size:9px; font-weight:800; }
/* 2048 obstacle */
.g2048-blocked { background:#233c32 !important; box-shadow:inset 0 0 0 2px #0a271f; }
@media (max-width:600px) { .game-daily-bar { font-size:10px; } .game-share-btn { margin-left:0; } }

/* Sudoku Thermo / Arrow */
.sudoku-cell { position: relative; }
.thermo-cell { background:#fff8ea; }
.thermo-mark { position:absolute; left:2px; bottom:1px; color:#d98b1b; font-size:10px; font-weight:900; }
.arrow-circle { background:#fff2e8; }
.arrow-mark { position:absolute; right:2px; bottom:1px; color:#c05621; font-size:10px; font-weight:900; }
.arrow-cell { background:#fffaf5; }
.sudoku-constraints { display:flex; flex-wrap:wrap; gap:6px 14px; max-width:560px; margin:10px auto 0; color:var(--muted); font-size:10px; line-height:1.5; }
.sudoku-constraints span { padding:3px 6px; border:1px solid var(--border); border-radius:5px; background:#fff; }

/* Nonogram Color */
.nono-cell.color1.filled { background:#2b7a78; border-color:#1d5e5c; }
.nono-cell.color2.filled { background:#d98b1b; border-color:#b06d10; }
.nono-col-clue .clue-c1, .nono-row-clue .clue-c1 { color:#2b7a78; }
.nono-col-clue .clue-c2, .nono-row-clue .clue-c2 { color:#b06d10; }
.nono-col-clue, .nono-row-clue { white-space:pre; }

/* Game hub discovery */
.game-hub-tools { max-width:1180px; margin:20px 0 16px; display:flex; flex-wrap:wrap; align-items:center; gap:10px 16px; }
.game-hub-search { flex:1 1 240px; max-width:360px; }
.game-hub-search input { width:100%; padding:9px 11px; border:1px solid var(--border); border-radius:9px; font:inherit; font-size:13px; background:#fff; }
.game-hub-filters { display:flex; flex-wrap:wrap; gap:6px; }
.game-filter { padding:6px 10px; border:1px solid var(--border); border-radius:999px; background:#fff; color:var(--ink); font:inherit; font-size:11px; font-weight:700; cursor:pointer; }
.game-filter:hover, .game-filter.is-active { border-color:var(--brand); background:#f2f8f4; color:var(--brand-dark); }
.game-hub-count { margin:0 0 0 auto; color:var(--muted); font-size:11px; }
.game-hub-item { position:relative; }
.game-fav { position:absolute; z-index:3; top:10px; right:10px; width:30px; height:30px; border:1px solid rgba(255,255,255,.7); border-radius:50%; background:rgba(15,42,67,.72); color:#fff; font-size:17px; line-height:1; cursor:pointer; }
.game-fav:hover, .game-fav[aria-pressed="true"] { background:#f4b84a; color:#1b2e24; border-color:#f4b84a; }
.game-hub-item.is-hidden { display:none; }
.game-hub-empty { max-width:1180px; padding:20px 0; color:var(--muted); font-size:13px; }
@media (max-width:640px) { .game-hub-count { margin-left:0; width:100%; } }
.game-list.is-empty::after { content:"No games match this filter."; display:block; padding:24px 0; color:var(--muted); font-size:13px; }
