/* Games: shares site.css tokens. Kept small and calm, so the data is the star. */
.g-wrap { max-width: 560px; }
.g-meta { color: var(--muted); font-size: .9rem; margin: -.5rem 0 1.5rem; }
.g-progress { display: flex; gap: 6px; margin: 0 0 1.25rem; }
.g-progress span { flex: 1; height: 4px; background: var(--rule); border-radius: 2px; }
.g-progress span.done { background: var(--accent); }
.g-card { background: var(--panel); border: 1px solid var(--rule); border-radius: 10px; padding: 1.25rem 1.25rem 1.1rem; margin-bottom: 1rem; }
.g-q { font-family: var(--serif); font-size: 1.35rem; line-height: 1.3; margin: 0 0 .35rem; }
.g-sub { color: var(--muted); font-size: .9rem; margin: 0 0 1rem; }
.g-row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.g-input { font: inherit; font-size: 1.15rem; padding: .55rem .7rem; border: 1px solid var(--rule); border-radius: 8px; background: var(--bg); color: var(--ink); width: 9.5rem; }
.g-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.g-btn { font: inherit; font-weight: 600; padding: .6rem 1rem; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; text-decoration: none; display: inline-block; }
.g-btn:hover { background: var(--accent-ink); }
.g-btn[disabled] { opacity: .45; cursor: default; }
.g-btn-ghost { background: transparent; color: var(--accent); }
.g-btn-ghost:hover { background: var(--soft); }
.g-choice { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.g-choice button { font: inherit; text-align: left; padding: .9rem; border-radius: 8px; border: 1px solid var(--rule); background: var(--bg); color: var(--ink); cursor: pointer; min-height: 4.2rem; }
.g-choice button:hover { border-color: var(--accent); }
.g-choice button.right { border-color: #2f7d4f; background: #e9f4ec; }
.g-choice button.wrong { border-color: var(--bad); background: #f7e7e7; }
.g-choice small { display: block; color: var(--muted); margin-top: .3rem; font-size: .85rem; }
.g-reveal { margin-top: 1rem; padding-top: .9rem; border-top: 1px dashed var(--rule); }
.g-reveal .g-ans { font-size: 1.15rem; margin: 0 0 .25rem; }
.g-reveal .g-fact { color: var(--muted); margin: 0 0 .25rem; }
.g-src { color: var(--muted); font-size: .78rem; margin: .4rem 0 0; }
.g-pts { font-weight: 700; color: var(--accent); }
.g-end { text-align: center; }
.g-score { font-size: 1.4rem; margin: .5rem 0 0; }
.g-score strong { font-size: 3rem; font-family: var(--serif); }
.g-grid { font-size: 1.6rem; letter-spacing: .15em; margin: .4rem 0; }
.g-stats { color: var(--muted); }
.g-actions { display: flex; gap: 1rem; justify-content: center; align-items: center; flex-wrap: wrap; margin: 1rem 0; }
.g-next { color: var(--muted); font-size: .9rem; }
.g-cta { text-align: left; margin-top: 2rem; padding: 1.25rem; border-radius: 10px; background: var(--soft); }
.g-cta-kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; color: var(--muted); margin: 0 0 .25rem; }
.g-cta h3 { margin: 0 0 .3rem; font-family: var(--serif); }
.g-cta-links { margin: .8rem 0 0; display: flex; gap: .5rem; flex-wrap: wrap; }
.g-slider { width: 100%; accent-color: var(--accent); }
.g-bet { font-size: 1.4rem; font-weight: 700; font-family: var(--serif); }
.g-draw { width: 100%; height: auto; touch-action: none; user-select: none; background: var(--panel); border: 1px solid var(--rule); border-radius: 10px; }
.g-hint { color: var(--muted); font-size: .9rem; margin: .5rem 0 0; }
.g-games { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.g-games a { display: block; padding: 1rem 1.1rem; border: 1px solid var(--rule); border-radius: 10px; background: var(--panel); color: var(--ink); text-decoration: none; }
.g-games a:hover { border-color: var(--accent); }
.g-games h2 { font-size: 1.15rem; margin: 0 0 .2rem; }
.g-games p { margin: 0; color: var(--muted); }
.g-games .g-tag { float: right; font-size: .75rem; color: var(--muted); }
@media (max-width: 520px) { .g-choice { grid-template-columns: 1fr; } .g-q { font-size: 1.2rem; } }
.g-h { font-size: 1.05rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 1.5rem 0 .8rem; }
.g-invite { margin: 1.4rem auto 1rem; padding: 1.1rem 1.2rem; border: 1px solid var(--accent); border-radius: 10px; background: var(--panel); max-width: 420px; }
.g-invite-title { font-family: var(--serif); font-size: 1.2rem; margin: 0 0 .25rem; }
.g-invite-sub { color: var(--muted); margin: 0 0 .9rem; font-size: .95rem; }
/* Play hub: tiles, four to a row on a laptop, two on a phone. */
.g-grid4 { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
/* Exactly four tiles (the Christmas page): a row of four, or two by two. Never three and one. */
.g-grid4.g-four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 800px) { .g-grid4.g-four { grid-template-columns: 1fr 1fr; } }
.g-tile { position: relative; background: var(--panel); border: 1px solid var(--rule); border-radius: 12px; transition: border-color .15s, transform .15s, box-shadow .15s; }
.g-tile:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.06); }
.g-tile-link { display: flex; flex-direction: column; min-height: 220px; padding: 1.1rem 1rem 1rem; color: var(--ink); text-decoration: none; }
.g-tile-icon { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 14px; background: var(--soft); color: var(--accent); margin-bottom: .8rem; }
.g-tile-icon img { width: 56px; height: 56px; border-radius: 14px; display: block; }
.g-glyph { font-size: 34px; line-height: 1; font-family: "Segoe UI Symbol", "DejaVu Sans", "Apple Symbols", serif; }
.g-tile .g-tag { float: none; position: absolute; top: 1.2rem; right: 2.8rem; font-size: .72rem; letter-spacing: .04em; color: var(--muted); }
.g-tile h2 { font-size: 1.1rem; margin: 0 0 .25rem; }
.g-tile p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.4; }
.g-info { position: absolute; z-index: 2; top: .85rem; right: .75rem; width: 30px; height: 30px; padding: 0; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.g-info:hover, .g-info[aria-expanded="true"] { color: var(--accent); background: var(--soft); }
/* How to play sits over the tile, so opening it never reflows the grid. */
.g-how { position: absolute; inset: 0; z-index: 1; padding: 2.9rem 1rem 1rem; background: var(--soft); border-radius: 12px; overflow: auto; }
.g-how::before { content: "How to play"; position: absolute; top: 1.05rem; left: 1rem; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.g-how p { margin: 0; font-size: .86rem; line-height: 1.45; color: var(--ink); }
.g-rules { margin: -.6rem 0 1.2rem; }
.g-rules summary { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; color: var(--accent); font-size: .92rem; list-style: none; }
.g-rules summary::-webkit-details-marker { display: none; }
.g-rules p { margin: .6rem 0 0; padding: .8rem 1rem; background: var(--soft); border-radius: 8px; font-size: .95rem; line-height: 1.5; }
@media (max-width: 460px) { .g-grid4 { grid-template-columns: 1fr 1fr; gap: 10px; } .g-tile .g-tag { display: none; } .g-tile-link { padding: .9rem .8rem; min-height: 200px; } .g-how { padding: 2.6rem .8rem .8rem; } .g-how p { font-size: .82rem; } .g-tile h2 { font-size: 1rem; } }
/* Compact top for Play, games and chess lessons: get to the game without scrolling. */
.page--compact { padding-top: 20px; }
.page--compact .back-link { margin-bottom: 10px; }
.page--compact h1 { font-size: 30px; margin: 0 0 6px; }
.g-intro { color: var(--muted); font-size: 15px; line-height: 1.45; margin: 0 0 18px; }
.page--compact .g-meta { margin: 0 0 10px; }
.page--compact .g-rules { margin: 0 0 14px; }
@media (max-width: 520px) { .page--compact h1 { font-size: 26px; } }
.g-curve { margin: 1rem auto .4rem; max-width: 340px; }
.g-curve svg { width: 100%; height: auto; display: block; }
.g-curve figcaption { margin-top: .2rem; }
.g-curve figcaption strong { display: block; font-size: 1.05rem; }
.g-curve figcaption span { display: block; color: var(--muted); font-size: .78rem; line-height: 1.4; }
/* Shared bits for the newer games. */
.g-big { font-family: var(--serif); font-size: 2.4rem; font-weight: 700; line-height: 1.1; margin: 0 0 .5rem; }
.g-choice-2 button { text-align: center; font-size: 1.3rem; font-weight: 700; }
.g-choice-2 button small { font-weight: 400; }
.g-run { margin: 0 0 .8rem; color: var(--muted); }
.g-run strong { font-family: var(--serif); font-size: 1.6rem; color: var(--accent); margin-left: .2rem; }
/* Daily Six: big sum, a typed answer, an on-screen number pad. */
.g-sum { text-align: center; }
.g-clock { margin: 0; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; font-size: .9rem; }
.g-sumq { font-family: var(--serif); font-size: 2.3rem; margin: .2rem 0 .4rem; white-space: nowrap; }
.g-typed { font-size: 2rem; font-weight: 700; min-height: 2.6rem; margin: 0 auto .8rem; max-width: 11rem; border-bottom: 2px solid var(--rule); font-variant-numeric: tabular-nums; }
.g-typed.right { color: #2f7d4f; border-color: #2f7d4f; }
.g-typed.wrong { color: var(--bad); border-color: var(--bad); }
.g-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; max-width: 300px; margin: 0 auto; }
.g-keypad button { font: inherit; font-size: 1.4rem; font-weight: 600; padding: .7rem 0; border-radius: 8px; border: 1px solid var(--rule); background: var(--bg); color: var(--ink); cursor: pointer; touch-action: manipulation; }
.g-keypad button:hover { border-color: var(--accent); }
.g-keypad button.ok { background: var(--accent); border-color: var(--accent); color: #fff; }
.g-keypad button[disabled] { opacity: .5; cursor: default; }
.g-sum .g-reveal { text-align: left; }
/* Order it: tap to number the list. */
.g-order { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.g-order button { font: inherit; width: 100%; display: flex; align-items: center; gap: .75rem; text-align: left; padding: .75rem .8rem; border-radius: 8px; border: 1px solid var(--rule); background: var(--bg); color: var(--ink); cursor: pointer; }
.g-order button:hover { border-color: var(--accent); }
.g-order button.on { border-color: var(--accent); }
.g-order button.right { border-color: #2f7d4f; background: #e9f4ec; }
.g-order button.wrong { border-color: var(--bad); background: #f7e7e7; }
.g-ord-n { flex: none; width: 1.9rem; height: 1.9rem; border-radius: 50%; border: 2px dashed var(--rule); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.g-order button.on .g-ord-n { border: 0; background: var(--accent); color: #fff; }
.g-ord-t small { display: block; color: var(--muted); font-size: .85rem; margin-top: .15rem; }
/* Name the decade: a small bar per decade. */
.g-bars { display: flex; align-items: flex-end; gap: 6px; height: 88px; margin: .4rem 0 .6rem; }
.g-bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.g-bar span { display: block; width: 100%; max-width: 34px; background: var(--rule); border-radius: 3px 3px 0 0; }
.g-bar.on span { background: var(--accent); }
.g-bar b { font-size: .72rem; font-weight: 600; color: var(--muted); margin-top: 4px; }
.g-bar.on b { color: var(--accent); }
@media (max-width: 520px) { .g-choice-2 { grid-template-columns: 1fr 1fr; } .g-big { font-size: 2rem; } .g-sumq { font-size: 2rem; } }
@media (max-width: 520px) { .g-choice-4 { grid-template-columns: 1fr 1fr; } .g-choice-4 button { padding: .75rem .7rem; } }
.g-progress span.miss { background: var(--bad); }
.g-clock.low { color: var(--bad); font-weight: 700; }
.g-typed small { font-size: .6em; color: var(--muted); }
/* Section labels on the Play page */
.page--compact .g-h { margin: 1.6rem 0 .2rem; font-size: .95rem; }
.page--compact .g-h:first-of-type { margin-top: .6rem; }
.g-hline { color: var(--muted); font-size: .88rem; margin: 0 0 .7rem; }
/* iPad and laptop: use the full page width. Game cards stay a readable width;
   the results screen splits into two columns (score on the left, share + apps on the right). */
@media (min-width: 760px) {
  .g-wrap { max-width: none; }
  .g-wrap .g-card, .g-wrap .g-progress, .g-wrap .g-start { max-width: 620px; }
  .g-end { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; text-align: center; }
  .g-end-main { padding-top: .5rem; }
  .g-end-side .g-invite { margin-top: 0; }
  .g-end-side .g-cta { margin-top: 1rem; }
}
/* Make 24 */
.m24-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: .4rem 0 1rem; }
.m24-card { font: inherit; font-family: var(--serif); font-size: 1.9rem; aspect-ratio: 1; border-radius: 12px; border: 2px solid var(--rule); background: var(--bg); color: var(--ink); cursor: pointer; }
.m24-card.on { border-color: var(--accent); background: #e8eff7; }
.m24-ops { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.m24-op { font: inherit; font-size: 1.6rem; padding: .5rem 0; border-radius: 10px; border: 1px solid var(--rule); background: var(--panel); color: var(--accent); cursor: pointer; }
.m24-op.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.m24-msg { min-height: 2.6em; margin: .9rem 0 .6rem; color: var(--muted); }
.m24-msg.ok { color: #2f7d4f; } .m24-msg.bad { color: var(--bad); }
.m24 button:disabled { opacity: .5; cursor: default; }
/* Number hunt */
.hunt-range { font-size: 1.05rem; margin: .3rem 0 .1rem; }
.hunt-left { color: var(--muted); font-size: .9rem; margin: 0; }
.hunt-msg { min-height: 1.4em; font-weight: 600; margin: .2rem 0 .6rem; }
.hunt-log { display: flex; flex-wrap: wrap; gap: 6px; margin: .8rem 0 0; }
.hunt-log span { font-size: .85rem; padding: .15rem .5rem; border-radius: 6px; background: var(--soft); }
.hunt-log span.hit { background: #e9f4ec; }
.m24-card.win { border-color: #2f7d4f; background: #e9f4ec; color: #2f7d4f; }
