/* Shared styles for the /games/* mini games. Uses the site tokens from blog.css (--panel, --line, --accent…). */

.gm-page { padding-top: 32px; }
.gm-page .crumbs { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.gm-page .crumbs a { color: var(--muted); }
.gm-head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.gm-head .ico { flex: none; width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; color: color-mix(in srgb, var(--accent-c, var(--accent)) 62%, #f4f4f5);
    background: color-mix(in srgb, var(--accent-c, #93c5fd) 14%, var(--panel)); border: 1px solid color-mix(in srgb, var(--accent-c, #93c5fd) 40%, transparent); }
.gm-head .ico img { width: 34px; height: 24px; border-radius: 4px; object-fit: cover; }
.gm-head .ico .ic { width: 28px; height: 28px; }
.gm-head .txt { flex: 1; min-width: 0; }
.gm-head h1 { font: 800 clamp(26px, 4vw, 38px)/1.1 var(--display); letter-spacing: -0.02em; margin: 0; }
.gm-head p { margin: 4px 0 0; color: var(--muted); }
.gm-head-actions { flex: none; display: flex; gap: 8px; }
.gm-link-btn { display: inline-flex; align-items: center; gap: 7px; padding: 10px 16px; border-radius: 12px; font-weight: 700; font-size: 14px; color: #ffffff; text-decoration: none;
    background: color-mix(in srgb, var(--accent-c, #93c5fd) 22%, transparent); border: 1px solid color-mix(in srgb, var(--accent-c, #93c5fd) 55%, transparent); transition: background .15s, transform .15s; }
.gm-link-btn:hover { text-decoration: none; transform: translateY(-1px); background: color-mix(in srgb, var(--accent-c, #93c5fd) 32%, transparent); }
.gm-link-btn.ghost { background: transparent; border-color: var(--line); color: #bcbcc4; }
.gm-link-btn .ic { width: 17px; height: 17px; }
@media (max-width: 760px) {
    .gm-head { flex-wrap: wrap; }
    .gm-head-actions { width: 100%; }
    .gm-head-actions .gm-link-btn { flex: 1; justify-content: center; }
}

/* The game card: the centre of the page, wide, with a soft glow in the game's colour behind it. */
.gm-stage-wrap { position: relative; padding: 6px 0 10px; }
.gm-stage-wrap::before { content: ""; position: absolute; inset: -40px 0 -20px; z-index: -1; pointer-events: none;
    background: radial-gradient(50% 55% at 50% 45%, color-mix(in srgb, var(--accent-c, #38bdf8) 16%, transparent), transparent 75%); }
.gm-panel { position: relative; max-width: 780px; margin: 0 auto; border-radius: 26px; padding: 24px; background: linear-gradient(180deg, #18181b, #19191c);
    border: 1px solid color-mix(in srgb, var(--accent-c, #52525b) 30%, var(--line)); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.055) inset, 0 0 0 6px rgba(0, 0, 0, 0.017); }
@media (max-width: 560px) { .gm-panel { padding: 14px; border-radius: 20px; } }
.gm-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; font-size: 13px; color: var(--muted); }
.gm-bar b { color: var(--text); font: 800 15px var(--display); }
.gm-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(244, 244, 245, 0.05); border: 1px solid var(--line); font-weight: 600; color: #bcbcc4; }
.gm-pill.practice { color: #93c5fd; border-color: rgba(59, 130, 246,.35); background: rgba(59, 130, 246,.1); }
.gm-loading { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 90px 0; text-align: center; color: var(--muted); }
.gm-loading .spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(244, 244, 245, 0.1); border-top-color: var(--accent-c, var(--accent)); animation: gm-spin .8s linear infinite; }
@keyframes gm-spin { to { transform: rotate(360deg); } }

/* Outline stage */
.gm-stage { position: relative; display: grid; place-items: center; height: clamp(180px, 36vh, 320px); border-radius: 18px; overflow: hidden;
    background: radial-gradient(80% 90% at 50% 40%, color-mix(in srgb, var(--accent-c, #38bdf8) 14%, transparent), transparent 70%), linear-gradient(180deg, #19191c, #1f1f23); border: 1px solid var(--line); }
.gm-stage::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(244, 244, 245, 0.07) 1px, transparent 1px); background-size: 18px 18px; pointer-events: none; }
.gm-stage svg { width: 78%; height: 86%; filter: drop-shadow(0 14px 28px rgba(244, 244, 245, 0.165)); }
.gm-stage path { fill: color-mix(in srgb, var(--gm-accent, #38bdf8) 32%, #19191c); stroke: var(--gm-accent, #38bdf8); stroke-width: .7; stroke-linejoin: round; vector-effect: non-scaling-stroke; transition: fill .5s; }
.gm-stage.won path { fill: color-mix(in srgb, #22c55e 45%, #19191c); stroke: #4ade80; }
.gm-stage .gm-tag { position: absolute; left: 12px; bottom: 10px; z-index: 1; font-size: 12px; color: var(--muted); }

/* Guess rows */
.gm-rows { display: grid; gap: 6px; margin: 14px 0; padding: 0; list-style: none; }
.gm-rows li { display: grid; grid-template-columns: 1fr auto auto auto; gap: 6px; height: 40px; }
.gm-rows li.empty { display: block; border-radius: 10px; border: 1px dashed rgba(244, 244, 245, 0.08); background: rgba(244, 244, 245, 0.015); }
.gm-rows li > span { display: flex; align-items: center; padding: 0 12px; border-radius: 10px; background: rgba(244, 244, 245, 0.05); border: 1px solid var(--line); font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: gm-in .35s ease-out both; }
.gm-rows li > span:nth-child(2) { justify-content: flex-end; min-width: 92px; }
.gm-rows li > span:nth-child(3) { justify-content: center; padding: 0 9px; }
.gm-rows li > span:nth-child(4) { justify-content: center; min-width: 58px; }
.gm-rows li.hit > span { background: rgba(34,197,94,.16); border-color: rgba(74,222,128,.45); color: #adc9b8; }
@keyframes gm-in { from { opacity: 0; transform: translateY(4px); } }

/* Search box */
.gm-search { display: flex; gap: 8px; }
.gm-search-field { position: relative; flex: 1; }
.gm-search input { width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid rgba(59, 130, 246,.55); background: #19191c; color: var(--text); font: 500 16px var(--sans); outline: none; }
.gm-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.09); }
.gm-search input:disabled { opacity: .5; }
.gm-suggest { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 20; margin: 0; padding: 6px; list-style: none; border-radius: 12px; background: #18181b; border: 1px solid var(--line); box-shadow: none; max-height: 290px; overflow-y: auto; }
/* Shape game: the box sits right under the outline, so suggestions open downwards over the guess rows. */
.gm-stage + .gm-input { margin-top: 12px; }
.gm-input.drop-down .gm-suggest { top: calc(100% + 6px); bottom: auto; }
.gm-stage + .gm-result { margin-top: 12px; }
.gm-rows:empty { display: none; }
.gm-suggest li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 11px; border-radius: 8px; cursor: pointer; font-weight: 600; }
.gm-suggest li span { color: var(--muted); font-weight: 500; font-size: 13px; }
.gm-suggest li.on, .gm-suggest li:hover { background: rgba(59, 130, 246,.16); }
.gm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 48px; padding: 0 20px; border: 0; border-radius: 12px; background: var(--accent-strong); color: #ffffff; font: 700 16px var(--sans); cursor: pointer; transition: filter .15s, transform .15s; }
.gm-btn:hover { filter: brightness(1.08); }
.gm-btn:active { transform: scale(.98); }
.gm-btn:disabled { opacity: .5; cursor: default; }
.gm-btn.ghost { background: transparent; border: 1px solid rgba(244, 244, 245, 0.18); color: var(--text); }
.gm-btn.small { height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }

/* Result + bonus */
.gm-result { margin-top: 16px; padding: 18px; border-radius: 18px; text-align: center; border: 1px solid var(--line); background: rgba(244, 244, 245, 0.03); animation: gm-in .4s ease-out both; }
.gm-result.won { border-color: rgba(74,222,128,.4); background: linear-gradient(180deg, rgba(34,197,94,.12), rgba(34,197,94,.03)); }
.gm-result.lost { border-color: rgba(248,113,113,.35); background: linear-gradient(180deg, rgba(239,68,68,.1), rgba(239,68,68,.02)); }
.gm-result h2 { margin: 0 0 4px; font: 800 22px var(--display); color: #f4f4f5; }
.gm-result p { margin: 0 0 12px; color: #bcbcc4; }
.gm-result .row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.gm-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 14px 0; }
.gm-stats div { padding: 8px 4px; border-radius: 10px; background: rgba(244, 244, 245, 0.04); }
.gm-stats b { display: block; font: 800 20px var(--display); color: #f4f4f5; }
.gm-stats span { font-size: 11.5px; color: var(--muted); }
.gm-bonus { margin-top: 14px; padding: 16px; border-radius: 16px; border: 1px solid rgba(59, 130, 246,.3); background: rgba(59, 130, 246,.06); }
.gm-result .gm-bonus { margin: 0 0 12px; }
.gm-bonus h3 { margin: 0 0 10px; font: 700 16px var(--display); }
.gm-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gm-choices button { min-height: 44px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: rgba(244, 244, 245, 0.04); color: var(--text); font: 600 14.5px var(--sans); cursor: pointer; }
.gm-choices button:hover:not(:disabled) { border-color: rgba(59, 130, 246, 0.25); }
.gm-choices button.right { background: rgba(34,197,94,.18); border-color: rgba(74,222,128,.55); }
.gm-choices button.wrong { background: rgba(239,68,68,.16); border-color: rgba(248,113,113,.5); }
.gm-choices button:disabled { cursor: default; }
.gm-next { margin-top: 10px; font-size: 13px; color: var(--muted); }
/* Endless play: the big "next" button that starts the next round, and the streak / best pills. */
.gm-result .gm-go { min-width: 200px; justify-content: center; padding: 12px 22px; font-size: 16px; }
.gm-bar .gm-of { margin-left: 1px; font-size: .8em; font-weight: 600; color: var(--muted); }
.gm-pills { display: flex; gap: 6px; }
.gm-streak.on { color: #fdba74; border-color: rgba(249, 115, 22, .4); background: rgba(249, 115, 22, .1); }
.gm-streak.on .ic { color: #fb923c; }

.gm-toast { position: fixed; left: 50%; bottom: 28px; z-index: 100; transform: translate(-50%, 20px); opacity: 0; padding: 10px 16px; border-radius: 12px; background: #2a2a2f; color: #f4f4f5; font-weight: 600; box-shadow: none; transition: opacity .2s, transform .2s; pointer-events: none; }
.gm-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Confirm dialog (common.js ask()), in place of the browser's confirm() */
.gm-dialog-back { position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; padding: 20px; padding-bottom: max(20px, env(safe-area-inset-bottom)); background: rgba(5, 5, 7, .66); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: gm-fade .16s ease-out both; }
.gm-dialog-back.out { opacity: 0; transition: opacity .16s; }
.gm-dialog { width: 100%; max-width: 380px; padding: 24px 22px 20px; border-radius: 20px; text-align: center; background: linear-gradient(180deg, #1f1f24, #17171a); border: 1px solid rgba(244, 244, 245, .1); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8); animation: gm-pop .2s cubic-bezier(.2, .9, .3, 1.2) both; }
.gm-dialog-ic { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-bottom: 12px; border-radius: 14px; background: rgba(248, 113, 113, .14); border: 1px solid rgba(248, 113, 113, .32); color: #fca5a5; }
.gm-dialog-ic .ic { width: 24px; height: 24px; }
.gm-dialog h2 { margin: 0 0 6px; font: 700 20px/1.25 var(--display); color: var(--text); }
.gm-dialog p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.gm-dialog-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.gm-dialog-acts .gm-btn { height: 46px; padding: 0 12px; font-size: 15px; }
@keyframes gm-fade { from { opacity: 0; } }
@keyframes gm-pop { from { opacity: 0; transform: translateY(8px) scale(.96); } }
@media (max-width: 360px) { .gm-dialog-acts { grid-template-columns: 1fr; } .gm-dialog-acts .gm-btn[data-v="1"] { order: -1; } }
.gm-shake { animation: gm-shake .35s; }
@keyframes gm-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* How to play (server-rendered) */
.gm-about { margin: 44px 0 0; }
.gm-about h2 { font: 800 24px/1.25 var(--display); margin: 34px 0 12px; color: #f4f4f5; }
.gm-about .steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.gm-about .step { padding: 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.gm-about .step b { display: grid; place-items: center; width: 28px; height: 28px; margin-bottom: 8px; border-radius: 50%; background: var(--accent-strong); color: #ffffff; font-size: 14px; }
.gm-about .step p { margin: 0; color: #bcbcc4; font-size: 14.5px; }
.gm-about details { margin-bottom: 8px; padding: 4px 16px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.gm-about summary { cursor: pointer; padding: 11px 0; font-weight: 700; }
.gm-about details p { margin: 0 0 12px; color: #bcbcc4; }
.gm-about .credits { margin-top: 26px; font-size: 13px; color: var(--muted); }

@media (max-width: 560px) {
    .gm-panel { padding: 14px; border-radius: 20px; }
    .gm-head .ico { width: 50px; height: 50px; font-size: 25px; }
    .gm-rows li { grid-template-columns: 1fr auto auto auto; height: 38px; }
    .gm-rows li > span { padding: 0 9px; font-size: 13.5px; }
    .gm-rows li > span:nth-child(2) { min-width: 74px; }
    .gm-choices { grid-template-columns: 1fr; }
}

/* Timeline */
.tl-progress { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; margin-bottom: 14px; }
.tl-progress i { height: 6px; border-radius: 6px; background: rgba(244, 244, 245, 0.08); }
.tl-progress i.now { background: rgba(59, 130, 246,.6); }
.tl-progress i.ok { background: #22c55e; }
.tl-progress i.no { background: #ef4444; }
.tl-card { position: relative; padding: 18px 18px 16px; border-radius: 18px; text-align: center; border: 1px solid rgba(59, 130, 246, 0.225); background: #18181b; box-shadow: none; animation: gm-in .35s ease-out both; }
.tl-card .tl-label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.tl-card p { margin: 0; font: 700 clamp(17px, 2.6vw, 20px)/1.35 var(--display); color: #f4f4f5; }
.tl-line { position: relative; margin: 16px 0 0; padding: 0 0 0 4px; list-style: none; }
.tl-line::before { content: ""; position: absolute; left: 44px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(180deg, transparent, rgba(244, 244, 245, 0.14) 6%, rgba(244, 244, 245, 0.14) 94%, transparent); }
.tl-ev { position: relative; display: grid; grid-template-columns: 82px 1fr 26px; align-items: center; gap: 10px; padding: 10px 12px 10px 0; margin: 4px 0; border-radius: 14px; background: rgba(244, 244, 245, 0.03); border: 1px solid var(--line); }
.tl-ev .tl-year { justify-self: center; z-index: 1; min-width: 64px; padding: 5px 8px; border-radius: 10px; text-align: center; font: 800 15px var(--display); color: #f4f4f5; background: #2a2a2f; border: 1px solid rgba(244, 244, 245, 0.14); }
.tl-ev p { margin: 0; font-weight: 600; font-size: 14.5px; line-height: 1.35; color: var(--text); }
.tl-ev small { display: block; margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.tl-ev .tl-mark { font-weight: 800; text-align: center; }
.tl-ev.ok { border-color: rgba(74,222,128,.35); background: rgba(34,197,94,.07); }
.tl-ev.ok .tl-year { color: #ffffff; background: #166534; border-color: #22c55e; }
.tl-ev.ok .tl-mark { color: #16a34a; }
.tl-ev.no { border-color: rgba(248,113,113,.35); background: rgba(239,68,68,.07); }
.tl-ev.no .tl-year { color: #ffffff; background: #7f1d1d; border-color: #ef4444; }
.tl-ev.no .tl-mark { color: #f3b3b3; }
.tl-ev.fresh { animation: tl-pop .6s ease-out; }
@keyframes tl-pop { 0% { transform: scale(.96); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.25); } 60% { transform: scale(1.01); box-shadow: 0 0 0 8px rgba(59, 130, 246, 0); } }
.tl-slot-wrap { list-style: none; }
.tl-slot { display: flex; align-items: center; width: 100%; height: 34px; margin: 2px 0; padding: 0 0 0 26px; border: 0; background: none; cursor: pointer; color: var(--muted); font: 600 13px var(--sans); }
.tl-slot span { position: relative; display: flex; align-items: center; gap: 8px; width: 100%; height: 100%; padding: 0 14px; border-radius: 10px; border: 1px dashed rgba(59, 130, 246,.35); transition: background .15s, color .15s, border-color .15s; }
.tl-slot span::before { content: "+"; display: grid; place-items: center; width: 22px; height: 22px; margin-left: -4px; border-radius: 50%; background: #19191c; border: 1px solid rgba(59, 130, 246,.5); color: var(--accent); font-weight: 800; }
.tl-slot:hover span, .tl-slot:focus-visible span { background: rgba(59, 130, 246,.12); color: #f4f4f5; border-color: var(--accent); }
@media (max-width: 560px) {
    .tl-line::before { left: 36px; }
    .tl-ev { grid-template-columns: 70px 1fr 20px; gap: 8px; }
    .tl-ev .tl-year { min-width: 56px; font-size: 14px; }
    .tl-slot { padding-left: 18px; }
}

/* Border Hop */
.rt-goal { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.rt-end { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 12px; background: rgba(59, 130, 246,.14); border: 1px solid rgba(59, 130, 246,.5); font: 800 17px var(--display); color: #f4f4f5; }
.rt-end img, .rt-guesses img, .rt-route img { width: 22px; height: 16px; border-radius: 3px; object-fit: cover; flex: none; }
.rt-dots { display: inline-flex; gap: 5px; }
.rt-dots i { width: 9px; height: 9px; border-radius: 50%; border: 2px dashed rgba(59, 130, 246,.7); }
.rt-sub { margin: 10px 0 12px; text-align: center; font-size: 14px; color: var(--muted); }
.rt-sub b { color: var(--text); }
.rt-map { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #1f1f23; }
.rt-map svg { display: block; width: 100%; height: auto; }
.rt-map path { stroke-width: .25; stroke-linejoin: round; transition: fill .4s; }
.rt-map path.end { stroke-width: .45; }
.rt-map path.guess { stroke-width: .35; }
.rt-labels text { font: 800 3.1px var(--sans); fill: #f4f4f5; text-anchor: middle; paint-order: stroke; stroke: rgba(14, 14, 16, 0.92); stroke-width: .9px; pointer-events: none; }
.rt-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin: 10px 0 4px; font-size: 12px; color: var(--muted); }
.rt-legend i { display: inline-block; width: 10px; height: 10px; margin-right: 5px; border-radius: 3px; vertical-align: -1px; }
.rt-guesses { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; padding: 0; list-style: none; }
.rt-guesses li { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px; font-weight: 700; font-size: 14px; background: color-mix(in srgb, var(--c) 16%, transparent); border: 1px solid color-mix(in srgb, var(--c) 60%, transparent); animation: gm-in .3s ease-out both; }
.rt-hint { margin-top: 8px; width: 100%; }
.rt-route { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.rt-route span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(244, 244, 245, 0.06); font-weight: 700; }
.rt-route b { color: var(--muted); }

/* Country Grid */
.gd-grid { display: grid; grid-template-columns: minmax(78px, .9fr) repeat(3, 1fr); grid-auto-rows: minmax(92px, auto); gap: 6px; }
.gd-grid > .gd-corner { display: grid; place-items: center; font: 800 18px var(--display); color: var(--accent); }
.gd-head { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px; text-align: center; font-size: 12.5px; font-weight: 700; line-height: 1.25; color: #bcbcc4; border-radius: 12px; background: rgba(244, 244, 245, 0.035); }

.gd-grid > .gd-head.col { min-height: 78px; }
.gd-cell { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 6px; border-radius: 14px; border: 1px solid var(--line); background: rgba(244, 244, 245, 0.04); color: var(--text); font: 600 13px var(--sans); text-align: center; }
button.gd-cell { cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
button.gd-cell span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px dashed rgba(59, 130, 246,.6); color: var(--accent); font: 800 18px var(--display); }
button.gd-cell:hover { border-color: rgba(59, 130, 246, 0.25); }
button.gd-cell.on { border-color: var(--accent); background: rgba(59, 130, 246, 0.06); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.09); transform: scale(1.02); }
.gd-cell.done { border-color: rgba(74,222,128,.5); background: rgba(34,197,94,.12); animation: gm-in .35s ease-out both; }
.gd-cell.done img { width: 42px; height: 30px; border-radius: 4px; object-fit: cover; box-shadow: none; }
.gd-cell.done b { font-size: 12.5px; line-height: 1.2; }
.gd-cell.missed { border-style: dashed; background: rgba(239,68,68,.05); }
.gd-cell.missed small { font-size: 11.5px; line-height: 1.35; color: var(--muted); }
.gd-ask { margin-top: 14px; }
.gd-tip { margin: 0 0 10px; text-align: center; color: var(--muted); font-size: 14px; }
.gd-ask .gd-giveup { display: flex; margin: 12px auto 0; height: 34px; font-size: 13px; color: var(--muted); border-color: rgba(244, 244, 245, 0.1); }
.gd-q { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 0 0 10px; font-size: 14px; }
.gd-q span { padding: 5px 11px; border-radius: 999px; background: rgba(59, 130, 246,.12); border: 1px solid rgba(59, 130, 246,.35); font-weight: 700; }
.gd-q b { color: var(--muted); }
@media (max-width: 560px) {
    .gd-grid { grid-template-columns: 66px repeat(3, 1fr); grid-auto-rows: minmax(84px, auto); gap: 5px; }
    .gd-head { font-size: 11px; padding: 4px; }

    .gd-cell.done img { width: 34px; height: 24px; }
    .gd-cell.done b, .gd-cell.missed small { font-size: 11px; }
}
.gd-cell.missed em { font-style: normal; color: #a1a1aa; }

/* Icons (icons.svg sprite) */
.ic { width: 1.15em; height: 1.15em; flex: none; display: inline-block; vertical-align: -0.2em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic.fill { fill: currentColor; }
.ic.dir { width: 18px; height: 18px; color: #60a5fa; transition: transform .4s; }
.gm-pill .ic { width: 15px; height: 15px; }
/* Lives: full hearts in red, lost ones as a grey outline (the site's .ic.heart is blue, so set fill too). */
.gm-pill .ic.heart { color: #f43f5e; fill: #f43f5e; }
.gm-pill .ic.heart.lost { color: #52525b; fill: none; }
.gm-btn .ic { width: 17px; height: 17px; }
.gm-head .ico .ic { width: 30px; height: 30px; color: var(--accent); stroke-width: 1.8; }
.gm-bonus h3 .ic { color: #dec8a8; margin-right: 4px; }
.gm-rows li.hit .ic { color: #16a34a; }
.gd-head .ic { width: 22px; height: 22px; color: var(--accent); stroke-width: 1.8; }
.gd-q span { display: inline-flex; align-items: center; gap: 6px; }
.gd-q .ic { width: 15px; height: 15px; color: var(--accent); }
.tl-ev small .ic { width: 13px; height: 13px; margin-right: 3px; color: var(--accent); vertical-align: -2px; }
.tl-ev .tl-mark .ic { width: 20px; height: 20px; stroke-width: 2.6; }
.rt-guesses .ic.hint { width: 15px; height: 15px; color: #dec8a8; }
.rt-hint .ic { color: #dec8a8; }
.gm-result .gm-btn .ic { margin-right: 2px; }
@media (max-width: 560px) { .gd-head .ic { width: 18px; height: 18px; } }
.gm-about a .ic { color: var(--accent); }

/* Emoji Country (Emovi-style) */
.em-puzzle { padding: 18px 14px 20px; border-radius: 18px; text-align: center; border: 1px solid var(--line);
    background: radial-gradient(80% 90% at 50% 30%, rgba(250,204,21,.10), transparent 70%), linear-gradient(180deg, #19191c, #1f1f23); }
.em-puzzle p { margin: 0 0 10px; font: 700 17px var(--display); color: #f4f4f5; }
.em-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; font-size: clamp(38px, 10vw, 54px); line-height: 1.15; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.em-row span { animation: gm-in .35s ease-out both; }
.em-row span:nth-child(2) { animation-delay: .06s; } .em-row span:nth-child(3) { animation-delay: .12s; }
.em-row span:nth-child(4) { animation-delay: .18s; } .em-row span:nth-child(5) { animation-delay: .24s; }
.em-tries { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.em-tries li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; font-weight: 600; font-size: 14px; border: 1px solid; }
.em-tries li.miss { background: rgba(239,68,68,.12); border-color: rgba(248,113,113,.45); color: #dbafaf; }
.em-tries li.hit { background: rgba(34,197,94,.16); border-color: rgba(74,222,128,.5); color: #adc9b8; }
.em-tries li img { width: 20px; height: 14px; border-radius: 2px; object-fit: cover; }
.em-tries li .ic { width: 14px; height: 14px; }
.em-input { margin-top: 12px; }
.em-input .gm-search > .gm-btn { display: none; } /* our own Guess button sits below */
.em-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; margin-top: 10px; }
.em-actions .em-giveup { background: #ef4444; }
.em-actions .em-giveup.sure { background: #b91c1c; }
.em-actions .em-guess { background: #2563eb; }
.em-hints { margin: 14px 0 0; display: grid; gap: 8px; }
.em-hints div { display: flex; flex-wrap: wrap; gap: 4px 12px; animation: gm-in .35s ease-out both; }
.em-hints dt { font-weight: 800; color: #f4f4f5; }
.em-hints dd { margin: 0; color: #d4d4d8; }
.em-reveal { margin-top: 14px; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: rgba(244, 244, 245, 0.03); }
.em-answer { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 10px; font: 800 24px var(--display); color: #f4f4f5; }
.em-answer img { width: 38px; height: 27px; border-radius: 4px; object-fit: cover; box-shadow: none; }
.em-reveal ol { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.em-reveal li { display: flex; align-items: center; gap: 12px; padding: 6px 10px; border-radius: 10px; background: rgba(244, 244, 245, 0.04); font-weight: 600; font-size: 14.5px; color: #d4d4d8; }
.em-reveal li span { flex: none; width: 34px; text-align: center; font-size: 26px; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.em-reveal + .gm-result { margin-top: 12px; }

/* Capital Quiz */
.cq-card { margin-top: 12px; padding: 18px; border-radius: 18px; border: 1px solid var(--line);
    background: radial-gradient(80% 90% at 50% 20%, rgba(245,158,11,.10), transparent 70%), linear-gradient(180deg, #19191c, #1f1f23); animation: gm-in .3s ease-out both; }
.cq-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #e5c3a9; }
.cq-card h2 { margin: 8px 0 16px; font: 700 clamp(20px, 4.6vw, 25px)/1.3 var(--display); color: #f4f4f5; }
.cq-card h2 b { color: #d9bcab; }
.cq-card h2 img { width: 30px; height: 21px; margin: 0 8px 0 4px; border-radius: 3px; object-fit: cover; vertical-align: -2px; }
.cq-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cq-opt { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(244, 244, 245, 0.05); color: var(--text); font: 600 15px var(--sans); text-align: left; cursor: pointer; transition: border-color .2s, background .2s, color .2s, opacity .2s; }
.cq-opt:hover:not(:disabled) { border-color: rgba(245,158,11, 0.3); background: rgba(245,158,11,.08); }
.cq-opt img { flex: none; width: 26px; height: 18px; border-radius: 3px; object-fit: cover; }
.cq-opt.right { background: rgba(34,197,94,.18); border-color: rgba(74,222,128,.6); color: #adc9b8; }
.cq-opt.wrong { background: rgba(239,68,68,.16); border-color: rgba(248,113,113,.55); color: #dbafaf; }
.cq-opt.dim { opacity: .45; }
.cq-opt:disabled { cursor: default; }
.cq-verdict { animation: gm-in .25s ease-out both; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.cq-verdict p { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: #d4d4d8; }
.cq-verdict.ok p .ic { color: #16a34a; }
.cq-verdict.no p .ic { color: #f3b3b3; }
.cq-review { display: grid; gap: 5px; margin: 0 0 6px; padding: 0; list-style: none; text-align: left; }
.cq-review li { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 9px; background: rgba(244, 244, 245, 0.04); font-size: 14px; color: #bcbcc4; }
.cq-review li img { width: 20px; height: 14px; border-radius: 2px; object-fit: cover; }
.cq-review li.ok .ic { color: #16a34a; }
.cq-review li.no .ic { color: #f3b3b3; }
.cq-review .ic { width: 15px; height: 15px; flex: none; }
@media (max-width: 560px) { .cq-opts { grid-template-columns: 1fr; } .cq-opt { min-height: 48px; } }

/* Higher or Lower */
.hl-q { margin: 6px 0 14px; text-align: center; font: 700 clamp(18px, 2.4vw, 22px)/1.3 var(--display); color: #f4f4f5; }
.hl-round { margin: 14px 0 0; text-align: center; font-size: 13px; font-weight: 600; color: var(--muted); }
.hl-mystery { font-size: 40px; line-height: 1; color: #71717a; }
.hl-btn { height: auto; min-height: 56px; padding-block: 8px; line-height: 1.15; }
.hl-btn > span { display: flex; flex-direction: column; align-items: flex-start; }
.hl-btn small { font: 600 12px var(--sans); opacity: .85; }
@media (max-width: 420px) { .hl-btn { padding-inline: 10px; gap: 6px; font-size: 15px; } .hl-btn small { font-size: 11px; } }
.hl-q b { color: #abced8; }
.hl-pair { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 10px; }
.hl-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 230px; padding: 18px 12px; border-radius: 18px; text-align: center; border: 1px solid var(--line);
    background: linear-gradient(180deg, #18181b, #1f1f23); animation: gm-in .35s ease-out both; transition: border-color .3s, background .3s; }
.hl-flag img { display: block; width: 110px; height: 76px; border-radius: 8px; object-fit: cover; box-shadow: none; outline: 1px solid rgba(244, 244, 245, 0.15); }
.hl-card h3 { margin: 12px 0 2px; font: 800 20px/1.2 var(--display); color: #f4f4f5; }
.hl-value { margin: 4px 0 0; font: 800 26px var(--display); color: #abced8; font-variant-numeric: tabular-nums; }
.hl-card small { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hl-ask { margin: 6px 0 0; color: #bcbcc4; font-size: 15px; }
.hl-card.ok { border-color: rgba(74,222,128,.6); background: linear-gradient(180deg, rgba(34,197,94,.18), #1f1f23); }
.hl-card.no { border-color: rgba(248,113,113,.6); background: linear-gradient(180deg, rgba(239,68,68,.18), #1f1f23); }
.hl-card.no .hl-value { color: #e6b0b0; }
.hl-card.ok .hl-value { color: #add3bb; }
.hl-vs { align-self: center; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #19191c; border: 1px solid var(--line); font: 800 13px var(--display); color: #abced8; }
.hl-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.hl-btn.up { background: #16a34a; }
.hl-btn.down { background: #dc2626; }
.hl-btn:disabled { opacity: .55; cursor: default; }
.hl-why { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: rgba(244, 244, 245, 0.04); line-height: 1.8; color: #d4d4d8; }
.hl-why img { width: 20px; height: 14px; margin-right: 6px; border-radius: 2px; object-fit: cover; vertical-align: -1px; }
.hl-actions + *, .hl-pair + .gm-result { margin-top: 14px; }
@media (max-width: 560px) {
    .hl-pair { grid-template-columns: 1fr; }
    .hl-card { min-height: 0; padding: 14px 12px; }
    .hl-flag img { width: 84px; height: 58px; }
    .hl-vs { justify-self: center; margin: -18px 0; z-index: 1; width: 38px; height: 38px; }
}
.hl-round .hl-topic { display: inline-flex; align-items: center; gap: 5px; margin-right: 6px; padding: 3px 9px; border-radius: 999px; background: rgba(34,211,238,.12); border: 1px solid rgba(34,211,238,.35); font: 700 12px var(--sans); letter-spacing: .04em; text-transform: uppercase; color: #abced8; vertical-align: 2px; }
.hl-q.ok { color: #add3bb; } .hl-q.no { color: #e6b0b0; }
.hl-q .ic { width: 18px; height: 18px; vertical-align: -3px; }
.hl-review em { font-style: normal; color: var(--muted); margin: 0 4px; }
.hl-review li span img { margin: 0 4px 0 0; vertical-align: -2px; }


/* Under the game: about + link to the guide */
.gm-intro { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: center; padding: 22px; border-radius: 20px; border: 1px solid var(--line);
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent-c, #38bdf8) 7%, var(--panel)), var(--panel)); }
.gm-intro h2 { margin: 0 0 8px !important; }
.gm-intro p { margin: 0 0 12px; color: #bcbcc4; line-height: 1.6; }
.gm-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; padding: 0; list-style: none; }
.gm-facts li { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: #bcbcc4; }
.gm-facts li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-c, var(--accent)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-c, #93c5fd) 20%, transparent); }
.gm-guide-cta { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 16px; color: var(--text); text-decoration: none;
    background: rgba(244, 244, 245, 0.04); border: 1px solid color-mix(in srgb, var(--accent-c, #93c5fd) 45%, transparent); transition: transform .2s, background .2s; }
.gm-guide-cta:hover { text-decoration: none; transform: translateY(-2px); background: color-mix(in srgb, var(--accent-c, #93c5fd) 12%, transparent); }
.gm-guide-cta .ico { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: color-mix(in srgb, var(--accent-c, var(--accent)) 62%, #f4f4f5); background: color-mix(in srgb, var(--accent-c, #93c5fd) 18%, transparent); }
.gm-guide-cta .ico .ic { width: 22px; height: 22px; }
.gm-guide-cta b { display: block; font: 700 16px/1.25 var(--display); color: #f4f4f5; }
.gm-guide-cta small { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.gm-guide-cta .go { margin-left: auto; font-size: 20px; color: color-mix(in srgb, var(--accent-c, var(--accent)) 62%, #f4f4f5); }
.gm-foot-links { margin-top: 28px; color: var(--muted); }
.gm-page .credits { margin-top: 26px; font-size: 13px; color: var(--muted); }
@media (max-width: 760px) { .gm-intro { grid-template-columns: 1fr; } }

/* How-to-play pages (/games/{slug}/how-to-play) */
.gg-page { }
.gg-hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 26px; align-items: center; padding: 28px; border-radius: 26px; border: 1px solid var(--line);
    background: radial-gradient(60% 90% at 85% 40%, color-mix(in srgb, var(--accent-c, #38bdf8) 20%, transparent), transparent 70%), linear-gradient(180deg, #18181b, #19191c); }
.gg-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: color-mix(in srgb, var(--accent-c, var(--accent)) 62%, #f4f4f5); }
.gg-hero h1 { font: 800 clamp(28px, 4.4vw, 42px)/1.1 var(--display); letter-spacing: -0.02em; margin: 8px 0 10px; }
.gg-hero p { margin: 0 0 18px; color: #bcbcc4; font-size: 16.5px; line-height: 1.6; }
.gg-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.gg-hero-art { position: relative; display: grid; place-items: center; height: 220px; border-radius: 20px; overflow: hidden; text-decoration: none;
    background: radial-gradient(70% 90% at 50% 30%, color-mix(in srgb, var(--accent-c, #38bdf8) 26%, transparent), transparent 70%), #19191c; border: 1px solid var(--line); transition: transform .25s; }
.gg-hero-art:hover { transform: scale(1.02); text-decoration: none; }
/* The preview art is drawn for a wide box: on narrow phones shrink it to fit instead of cutting it off. */
.gg-hero-art { container-type: inline-size; }
@container (max-width: 380px) { .gg-hero-art > * { zoom: .82; } }
@container (max-width: 300px) { .gg-hero-art > * { zoom: .68; } }
.gg-section { margin-top: 40px; }
.gg-section h2 { font: 800 25px/1.25 var(--display); margin: 0 0 14px; color: #f4f4f5; }
.gg-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.gg-steps li { position: relative; padding: 18px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.gg-steps b { display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 10px; border-radius: 50%; font: 800 15px var(--display); color: #0b0b0f; background: var(--accent-c, var(--accent)); } /* dark number: every game colour is light */
.gg-steps p { margin: 0; color: #d4d4d8; line-height: 1.55; }
.gg-tips { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.gg-tips li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: rgba(244, 244, 245, 0.03); border: 1px solid var(--line); color: #d4d4d8; line-height: 1.55; }
.gg-tips li .ic { flex: none; margin-top: 3px; color: color-mix(in srgb, var(--accent-c, var(--accent)) 62%, #f4f4f5); fill: currentColor; }
.gg-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 40px; padding: 26px 28px; border-radius: 22px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent-c, #93c5fd) 12%, #18181b), #18181b); border: 1px solid color-mix(in srgb, var(--accent-c, #93c5fd) 40%, transparent); }
.gg-cta h2 { margin: 0 0 4px; font: 800 26px var(--display); color: #f4f4f5; }
.gg-cta p { margin: 0; color: #bcbcc4; }

@media (max-width: 760px) {
    .gg-hero { grid-template-columns: 1fr; padding: 20px; }
    .gg-hero-art { height: 170px; order: -1; }
}

/* ---------- Focus on the game ----------
   The page is one centred column the width of the game; the header is slim and quiet, the game card
   glows, and the content below is calmer and further away, so the eye lands on the game first. */
.gm-page:not(.gg-page) > .crumbs,
.gm-page:not(.gg-page) > .gm-head { max-width: 820px; margin-left: auto; margin-right: auto; }
.gm-page:not(.gg-page) > .crumbs { margin-bottom: 10px; font-size: 13px; }
.gm-page:not(.gg-page) > .gm-head { gap: 12px; margin-bottom: 14px; }
.gm-page:not(.gg-page) > .gm-head .ico { width: 40px; height: 40px; border-radius: 12px; font-size: 20px; }
.gm-page:not(.gg-page) > .gm-head .ico img { width: 26px; height: 18px; }
.gm-page:not(.gg-page) > .gm-head .ico .ic { width: 21px; height: 21px; }
.gm-page:not(.gg-page) > .gm-head h1 { font-size: clamp(20px, 2.6vw, 25px); line-height: 1.2; }
.gm-page:not(.gg-page) > .gm-head p { margin-top: 2px; font-size: 14px; }
.gm-page:not(.gg-page) .gm-link-btn { padding: 7px 12px; font-size: 13px; border-radius: 10px; background: transparent; border-color: var(--line); color: #bcbcc4; }
.gm-page:not(.gg-page) .gm-link-btn:hover { color: #f4f4f5; border-color: color-mix(in srgb, var(--accent-c, #93c5fd) 28%, transparent); background: rgba(244, 244, 245, 0.04); }
.gm-page:not(.gg-page) .gm-link-btn .ic { width: 15px; height: 15px; }

/* No glow: a plain card with a neutral border and a soft shadow. */
.gm-stage-wrap::before { content: none; }
.gm-panel { max-width: 820px; border-color: var(--line); box-shadow: none; }

/* Below the game: quieter. */
.gm-page:not(.gg-page) .gm-about { margin-top: 84px; }
.gm-page:not(.gg-page) .gm-intro { background: rgba(244, 244, 245, 0.02); border-color: rgba(244, 244, 245, 0.06); padding: 20px; }
.gm-page:not(.gg-page) .gm-intro h2,
.gm-page:not(.gg-page) .games-links h2 { font-size: 19px !important; color: #d4d4d8; }
.gm-page:not(.gg-page) .gm-intro p { color: #a1a1aa; font-size: 14.5px; }
.gm-page:not(.gg-page) .gm-guide-cta { border-color: var(--line); }
@media (max-width: 760px) {
    .gm-page:not(.gg-page) .gm-about { margin-top: 56px; }
}

/* ---------- Game page: only the game, centred in the space under the site header ---------- */
.gm-solo { padding-top: 0; min-height: calc(100vh - 65px); min-height: calc(100svh - 65px); display: flex; align-items: center; justify-content: center; padding-block: 28px 40px; }
.gm-solo-inner { width: 100%; max-width: 820px; margin: 0 auto; }
/* The title column can shrink (minmax 0), so a long name like "Guess the Département" wraps instead of spilling off screen. */
.gm-solo-bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-bottom: 14px; }
.gm-solo-bar h1 { display: flex; align-items: center; justify-content: center; gap: 10px; min-width: 0; margin: 0; overflow-wrap: anywhere; font: 800 clamp(19px, 2.4vw, 23px)/1.2 var(--display); color: #f4f4f5; text-align: center; }
.gm-solo-bar h1 .ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; font-size: 17px; color: color-mix(in srgb, var(--accent-c, var(--accent)) 62%, #f4f4f5);
    background: color-mix(in srgb, var(--accent-c, #93c5fd) 14%, transparent); border: 1px solid color-mix(in srgb, var(--accent-c, #93c5fd) 35%, transparent); }
.gm-solo-bar h1 .ico img { width: 22px; height: 15px; border-radius: 2px; object-fit: cover; }
.gm-solo-bar h1 .ico .ic { width: 18px; height: 18px; }
.gm-solo-link { justify-self: start; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px; border: 1px solid var(--line); color: #bcbcc4; font-size: 13.5px; font-weight: 600; text-decoration: none; transition: color .15s, border-color .15s, background .15s; }
.gm-solo-link.right { justify-self: end; }
.gm-solo-link:hover { color: #f4f4f5; text-decoration: none; background: rgba(244, 244, 245, 0.04); border-color: rgba(244, 244, 245, 0.1); }
.gm-solo-link .ic { width: 15px; height: 15px; }
.gm-solo .gm-panel { max-width: none; }
@media (max-width: 560px) {
    .gm-solo { min-height: 0; display: block; padding-block: 14px 28px; }
    .gm-solo-bar { gap: 8px; margin-bottom: 10px; }
    .gm-solo-link { padding: 7px 9px; }
    .gm-solo-link span { display: none; } /* icon/arrow only on phones */
    .gm-solo-bar h1 .ico { display: none; }
}

/* Big screens: size each game by its shape. Short, wide games (Higher or Lower, Capital Quiz, Emoji)
   get a wider card and everything inside scaled up with zoom; tall games (outlines, map, grid,
   timeline) keep a comfortable width so they still fit on the screen. */
@media (min-width: 900px) {
    .gm-solo-inner { max-width: 860px; }
    .gm-solo[data-engine="shape-game"] .gm-stage { height: clamp(200px, 32vh, 300px); }
    .gm-solo[data-engine="route"] .rt-map svg { height: clamp(280px, 50vh, 470px); }
}
@media (min-width: 1200px) {
    .gm-solo-bar { margin-bottom: 18px; }
    .gm-solo-bar h1 { font-size: 26px; }
    .gm-solo-bar h1 .ico { width: 38px; height: 38px; font-size: 19px; }
    .gm-solo-link { font-size: 14px; padding: 8px 13px; }
}
@media (min-width: 1600px) {
    .gm-solo-inner { max-width: 920px; }
}

/* .wrap (blog.css, loaded after this file) resets padding to 0 20px, which glued the bar to the
   site navbar. .wrap.gm-solo wins over it and gives the game room above and below. */
.wrap.gm-solo { padding: 36px 20px 48px; }
.wrap.gm-solo .gm-solo-bar { padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid rgba(244, 244, 245, 0.06); }
@media (max-width: 560px) {
    .wrap.gm-solo { padding: 18px 14px 32px; }
    .wrap.gm-solo .gm-solo-bar { padding-bottom: 10px; margin-bottom: 12px; }
}
.wrap.gm-page:not(.gm-solo) { padding-top: 32px; padding-bottom: 24px; }

/* The bar sits in the same place on every game: just under the navbar (no vertical centring,
   which pushed short games like Capital Quiz far down the screen). The card then stretches down to
   the bottom of the screen, like Map Quiz, so the text below the game only shows once you scroll. */
.wrap.gm-solo { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start;
    min-height: calc(100vh - 65px); min-height: calc(100svh - 65px); padding-top: 28px; padding-bottom: 24px; }
.wrap.gm-solo .gm-solo-inner { flex: 1; display: flex; flex-direction: column; }
.wrap.gm-solo .gm-panel { flex: 1; width: 100%; display: flex; flex-direction: column; }
/* Short games (Capital Quiz, Higher or Lower…) don't leave a blank card bottom: the bar stays on top and
   the rest is centred in the space below it. Tall games fill the card and just scroll as before. */
.wrap.gm-solo #game { flex: 1; display: flex; flex-direction: column; }
.wrap.gm-solo #game > :nth-child(2) { margin-top: auto; }
.wrap.gm-solo #game > :last-child { margin-bottom: auto; }
/* Short games (Capital Quiz, Higher or Lower, Emoji Country): a compact card, not stretched, sitting in
   the middle of the screen with room above and below, so the text under the game starts below the fold. */
/* The title bar and the side rails stay at the top; only the game card is centred in the space below. */
.wrap.gm-solo:is([data-engine="capital"], [data-engine="higher-lower"], [data-engine="emoji"]) { padding-bottom: 40px; }
.wrap.gm-solo:is([data-engine="capital"], [data-engine="higher-lower"], [data-engine="emoji"]) .gm-panel { flex: none; display: block; margin-block: auto; }
.wrap.gm-solo:is([data-engine="capital"], [data-engine="higher-lower"], [data-engine="emoji"]) #game { display: block; }
.wrap.gm-solo:is([data-engine="capital"], [data-engine="higher-lower"], [data-engine="emoji"]) .gm-solo-inner { max-width: 760px; }
@media (min-width: 1200px) {
    .wrap.gm-solo:is([data-engine="capital"], [data-engine="higher-lower"], [data-engine="emoji"]) .gm-solo-inner { max-width: 800px; }
}
/* Phones: no forced screen height (the card already fills the width), just a little air. */
@media (max-width: 560px) {
    .wrap.gm-solo:is([data-engine="capital"], [data-engine="higher-lower"], [data-engine="emoji"]) { min-height: 0; padding-block: 16px 28px; }
    .wrap.gm-solo:is([data-engine="capital"], [data-engine="higher-lower"], [data-engine="emoji"]) .gm-panel { margin-block: 0; }
}
@media (max-width: 560px) { .wrap.gm-solo { padding-top: 16px; padding-bottom: 16px; } }

/* ---------- Map Quiz (map-quiz.js) ---------- */
.mq-page .gm-solo-inner { max-width: 1080px; }
.mq-panel { max-width: none; padding: 14px; }
.mq { --sea: #242e3e; --land: #2a2a2f; --ctry: #22a06b; --ctry-hover: #34c785; --edge: #526782;
      --s1: #f8faff; --s2: #facc15; --s3: #fb923c; --s4: #ef4444; }
.mq-bar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 9px 12px; margin-bottom: 10px; border-radius: 14px; background: rgba(244, 244, 245, 0.05); border: 1px solid var(--line); }
.mq-count { display: inline-flex; align-items: center; gap: 8px; font: 700 14px var(--mono, ui-monospace, monospace); color: #bcbcc4; }
.mq-count .mq-n { font: 800 14px var(--display); color: #f4f4f5; }
.mq-count .mq-pct { padding: 2px 8px; border-radius: 999px; background: rgba(52,211,153,.12); color: #a7d0c4; }
.mq-ask { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; text-align: center; font-size: 15px; color: #bcbcc4; }
.mq-ask b { padding: 3px 10px; border-radius: 8px; background: #19191c; color: #f4f4f5; font: 800 16px var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mq-askflag { width: 30px; height: 20px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.275); }
.mq-side { display: inline-flex; align-items: center; gap: 6px; }
.mq-time { font: 700 14px var(--mono, ui-monospace, monospace); color: #f4f4f5; padding: 3px 8px; border-radius: 8px; border: 1px solid var(--line); }
.mq-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: transparent; color: #bcbcc4; cursor: pointer; }
.mq-icon:hover:not(:disabled) { color: #f4f4f5; background: rgba(244, 244, 245, 0.06); }
.mq-icon:disabled { opacity: .35; cursor: default; }
.mq-icon .ic { width: 16px; height: 16px; }
.mq-skip .ic { transform: rotate(90deg); }
@media (max-width: 640px) {
    .mq-bar { grid-template-columns: auto auto; grid-template-areas: "count side" "ask ask"; }
    .mq-count { grid-area: count; } .mq-side { grid-area: side; justify-self: end; } .mq-ask { grid-area: ask; }
    .mq-panel { padding: 8px; border-radius: 18px; }
}

.mq-stage { position: relative; overflow: clip; } /* clip, not hidden: the result card stays sticky */
/* The play area fills the screen down to the bottom edge; the text below the game starts after it. */
/* Header, title row and the quiz bar sit above the map: what's left of the screen, so nothing needs a scroll. */
.mq-map-wrap { position: relative; height: clamp(340px, calc(100svh - 270px), 900px); border-radius: 14px; overflow: hidden; background: var(--sea); }
@media (max-width: 640px) { .mq-map-wrap { height: min(calc(100svh - 320px), 140vw); min-height: 300px; } }
.mq-map { display: block; width: 100%; height: 100%; touch-action: none; cursor: pointer; user-select: none; -webkit-user-select: none; }
.mq-map.dragging { cursor: grabbing; }
.mq-map path, .mq-map circle { vector-effect: non-scaling-stroke; stroke: var(--edge); stroke-width: .8; stroke-linejoin: round; }
.mq-sea { fill: var(--sea); stroke: none !important; }
.mq-land { fill: var(--land); pointer-events: none; }
.mq-own { fill: var(--ctry); pointer-events: none; }
.mq-c { fill: var(--ctry); transition: fill .15s; }
.mq-dot { fill: var(--ctry); stroke: #334a66 !important; stroke-width: 1.4 !important; transition: fill .15s; }
.mq-dot.cap { fill: #f4f4f5; stroke: #0e0e10 !important; }
@media (hover: hover) {
    .mq-c:not([class*="st"]):hover, .mq-dot:not([class*="st"]):hover { fill: var(--ctry-hover); }
    .mq-dot.cap:not([class*="st"]):hover { fill: #34d399; }
}
.mq-map .st1 { fill: var(--s1); } .mq-map .st2 { fill: var(--s2); } .mq-map .st3 { fill: var(--s3); } .mq-map .st4 { fill: var(--s4); }
.mq-map .flash { fill: var(--s4) !important; animation: mq-flash .65s ease-out; }
.mq-map .reveal { animation: mq-reveal .5s ease-in-out 3; stroke: #18181b !important; stroke-width: 2.5 !important; }
@keyframes mq-flash { from { opacity: .4; } }
@keyframes mq-reveal { 50% { fill-opacity: .35; } }

.mq-zoom { position: absolute; right: 10px; top: 10px; display: grid; gap: 6px; }
.mq-zoom button { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid rgba(244, 244, 245, 0.18); background: rgba(24, 24, 27, 0.78); color: #f4f4f5; font: 700 20px/1 var(--sans); cursor: pointer; backdrop-filter: blur(4px); }
.mq-zoom button:hover { background: rgba(24, 24, 27, 0.95); }
.mq-zoom .ic { width: 16px; height: 16px; }

.mq-tip { position: absolute; z-index: 5; pointer-events: none; padding: 5px 10px; border-radius: 8px; background: #19191c; color: #f4f4f5; font: 600 13px var(--sans); white-space: nowrap; box-shadow: none; }
.mq-tip[hidden] { display: none; }
.mq-tip b { font-weight: 800; }

/* The card sits near the top of the play area (sticky), so it is in view even when the area is taller than the screen. */
.mq-overlay { position: absolute; inset: 0; z-index: 6; display: grid; place-items: start center; padding: 16px; border-radius: 14px; background: rgba(244, 244, 245, 0.33); backdrop-filter: blur(3px); }
.mq-overlay[hidden] { display: none; }
.mq-card { position: sticky; top: 84px; margin-top: min(6vh, 60px); width: min(460px, 100%); padding: 26px 22px; border-radius: 20px; text-align: center; background: linear-gradient(180deg, #18181b, #19191c); border: 1px solid rgba(244, 244, 245, 0.12); box-shadow: none; animation: gm-in .25s ease-out both; }
.mq-card h2 { margin: 0 0 6px; font: 800 24px/1.2 var(--display); color: #f4f4f5; }
.mq-card p { margin: 0; color: #bcbcc4; }
.mq-go { margin: 18px 0 12px; height: 52px; padding: 0 34px; font-size: 18px; background: #047857; } /* deep green so the white label is easy to read */
.mq-hint { font-size: 13px; color: var(--muted) !important; }
.mq-kicker { font: 700 12px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: #a7d0c4 !important; }
.mq-big { margin: 6px 0 2px; font: 800 64px/1 var(--display); color: #f4f4f5; }
.mq-sub { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.mq-sub .ic { width: 15px; height: 15px; }
.mq-new { color: #dec8a8; }
.mq-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin: 16px 0 18px; font-size: 13px; color: #bcbcc4; }
.mq-chips span { display: inline-flex; align-items: center; gap: 6px; }
.mq-chips i { width: 12px; height: 12px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.275); }
.mq-chips .c1 { background: #f4f4f5; } .mq-chips .c2 { background: #facc15; } .mq-chips .c3 { background: #fb923c; } .mq-chips .c4 { background: #ef4444; }
.mq-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.mq-actions .gm-btn { height: 44px; font-size: 14.5px; padding: 0 18px; text-decoration: none; }
.mq-actions.small { margin-top: 12px; gap: 4px 18px; }
.mq-primary { background: #10b981; }
.mq-link { display: inline-flex; align-items: center; gap: 6px; padding: 4px 2px; border: 0; background: none; color: #bcbcc4; font: 600 13.5px var(--sans); cursor: pointer; }
.mq-link:hover { color: #f4f4f5; text-decoration: underline; }
.mq-link .ic { width: 15px; height: 15px; }
.mq-end { width: min(500px, 100%); padding: 24px 24px 20px; }
.mq-ring { position: relative; width: 132px; height: 132px; margin: 8px auto 4px; }
.mq-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.mq-ring circle { fill: none; stroke-width: 10; }
.mq-ring .track { stroke: rgba(244, 244, 245, 0.08); }
.mq-ring .fill { stroke: #34d399; stroke-linecap: round; animation: mq-ring 1s .15s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes mq-ring { to { stroke-dashoffset: var(--to); } }
.mq-ring > div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.mq-ring b { font: 800 34px/1 var(--display); color: #f4f4f5; }
.mq-ring span { margin-top: 3px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mq-rating { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 8px 0 14px !important; font-size: 22px !important; }
.mq-rating .mq-new { padding: 3px 9px; border-radius: 999px; background: rgba(250,204,21,.15); border: 1px solid rgba(250,204,21,.4); font: 700 12px var(--sans); }
.mq-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mq-stats div { padding: 10px 6px; border-radius: 12px; background: rgba(244, 244, 245, 0.04); border: 1px solid rgba(244, 244, 245, 0.08); }
.mq-stats b { display: block; font: 800 18px var(--display); color: #f4f4f5; }
.mq-stats span { font-size: 11.5px; color: var(--muted); }
.mq-mix { display: flex; gap: 2px; height: 8px; margin: 16px 0 0; border-radius: 99px; overflow: hidden; }
.mq-mix i.c1 { background: #f4f4f5; } .mq-mix i.c2 { background: #facc15; } .mq-mix i.c3 { background: #fb923c; } .mq-mix i.c4 { background: #ef4444; }
.mq-end .mq-chips { margin: 10px 0 18px; }
/* Phones: a tighter result card, so it needs as little extra room below the map as possible. */
@media (max-width: 640px) {
    .mq-overlay { padding: 10px; }
    .mq-card { top: 72px; margin-top: 8px; }
    .mq-end { padding: 18px 16px 16px; }
    .mq-end .mq-ring { width: 104px; height: 104px; margin-top: 4px; }
    .mq-end .mq-ring b { font-size: 28px; }
    .mq-end .mq-chips { margin: 8px 0 14px; gap: 4px 12px; font-size: 12.5px; }
    .mq-end .mq-actions .gm-btn { flex: 1 1 100%; }
}
.mq-ask .mq-link { color: #a7d0c4; }

/* Flags grid */
.mq-flags { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 18px 16px; min-height: clamp(340px, calc(100svh - 270px), 900px); padding: 22px; border-radius: 14px; background: rgba(244, 244, 245, 0.035); align-content: start; }
@media (max-width: 520px) { .mq-flags { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 12px 10px; padding: 12px; } }
.mq-flag { position: relative; padding: 0; border: 0; border-radius: 6px; background: none; cursor: pointer; transition: transform .15s, opacity .2s; }
.mq-flag img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 6px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.132); }
@media (hover: hover) { .mq-flag:not([class*="st"]):hover { transform: translateY(-3px) scale(1.04); } }
.mq-flag[class*="st"] { cursor: default; }
/* Done flags step back (grey and dim) inside a thick ring in their result colour, with a badge,
   so the ones still to find stand out. */
.mq-flag[class*="st"] img { filter: grayscale(.75) brightness(.5); box-shadow: none; }
.mq-flag[class*="st"]::after { content: ""; position: absolute; inset: -5px; border-radius: 10px; border: 3px solid var(--st); box-shadow: 0 0 0 4px color-mix(in srgb, var(--st) 22%, transparent), inset 0 0 18px color-mix(in srgb, var(--st) 35%, transparent); }
.mq-flag[class*="st"]::before { content: "✓"; position: absolute; z-index: 1; top: -11px; right: -11px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--st); color: #f4f4f5; font: 900 13px/1 var(--sans); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.165); }
.mq-flag.st1 { --st: #3a3a40; } .mq-flag.st2 { --st: var(--s2); } .mq-flag.st3 { --st: var(--s3); } .mq-flag.st4 { --st: var(--s4); }
.mq-flag.st4::before { content: "✕"; color: #f4f4f5; }
.mq-flag:not([class*="st"]) img { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.198); }
.mq-flag.flash { animation: gm-shake .35s; }
.mq-flag.flash img { box-shadow: 0 0 0 3px var(--s4); }
.mq-flag.reveal { animation: mq-pop .5s ease-in-out 3; }
@keyframes mq-pop { 50% { transform: scale(1.12); } }

/* Text under the game */
.mq-about { max-width: 860px; margin: 34px auto 0; color: #bcbcc4; line-height: 1.7; }
.mq-about h2 { font: 800 clamp(21px, 3vw, 26px)/1.25 var(--display); color: #f4f4f5; margin: 0 0 10px; }
.mq-about h3 { font: 800 18px var(--display); color: #f4f4f5; margin: 26px 0 10px; }
.mq-places { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; font-size: 14.5px; }
.mq-places li { display: flex; align-items: center; gap: 8px; }
.mq-places img { width: 20px; height: 14px; border-radius: 2px; object-fit: cover; flex: none; }
.mq-related { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 14px; }
@media (max-width: 760px) { .mq-related { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .mq-related { grid-template-columns: 1fr; } }
.mq-related a { display: flex; flex-direction: column; border-radius: 16px; border: 1px solid var(--line); background: #18181b; color: #d4d4d8; text-decoration: none; overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.044); transition: transform .2s, border-color .2s, box-shadow .2s; }
.mq-related a:hover { transform: translateY(-3px); border-color: rgba(52,211,153, 0.275); box-shadow: 0 6px 13px -8px rgba(5,150,105, 0.225); text-decoration: none; }
/* A real height (not aspect-ratio + max-height): iOS Safari can't resolve the map's height:100% against those
   and drew it at the SVG's own small size, leaving an empty strip right and below. */
.mq-related .art { position: relative; display: block; flex: none; height: 140px; overflow: hidden; background: linear-gradient(180deg, #2a323d, #1f1f23); border-bottom: 1px solid var(--line); }
@media (max-width: 760px) { .mq-related .art { height: clamp(112px, 30vw, 150px); } }
@media (max-width: 420px) { .mq-related .art { height: clamp(150px, 48vw, 200px); } }
.mq-related .art .mq-thumb { position: absolute; top: 0; left: 0; display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center; transition: transform .35s; }
.mq-related a:hover .mq-thumb { transform: scale(1.05); }
.mq-related .mode { position: absolute; z-index: 1; top: 8px; left: 8px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 7px; border-radius: 999px;
    background: rgba(24, 24, 27, 0.92); border: 1px solid rgba(52,211,153,.35); color: #a7d0c4; font-size: 11.5px; font-weight: 700; }
.mq-related .mode .ic { width: 13px; height: 13px; color: #059669; }
.mq-related .txt { display: flex; align-items: center; gap: 8px; padding: 11px 14px 12px; }
.mq-related .txt b { display: block; font: 700 14.5px/1.3 var(--display); color: #f4f4f5; }
.mq-related .txt small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.mq-related .go { margin-left: auto; color: #059669; font-size: 16px; transition: transform .2s; }
.mq-related a:hover .go { transform: translateX(3px); }
.mq-about .mq-sub { margin: -4px 0 12px; font-size: 14.5px; }
.mq-about .faq { margin-top: 4px; }

/* ---------- Game page backdrop: the space beside the card ---------- */
/* A full-width band behind the game: two slow-drifting glows in the game's colour and a faint dot grid,
   so the card sits in a scene instead of floating in empty black on wide screens. */
/* clip, not hidden: a hidden box is still a scroll container, so the end-of-game scrollIntoView scrolled
   the hero itself and its top stayed cut off with no way to scroll back. */
.gm-hero { position: relative; isolation: isolate; overflow: hidden; overflow: clip; }
.gm-hero::before { content: ""; position: absolute; inset: -10% -5%; z-index: -2; pointer-events: none;
    background:
        radial-gradient(34% 48% at 14% 38%, color-mix(in srgb, var(--accent-c, #3b82f6) 17%, transparent), transparent 72%),
        radial-gradient(34% 48% at 86% 62%, color-mix(in srgb, var(--accent-c, #3b82f6) 13%, transparent), transparent 72%),
        radial-gradient(40% 30% at 50% 0%, color-mix(in srgb, var(--accent-c, #3b82f6) 9%, transparent), transparent 80%);
    animation: gm-drift 22s ease-in-out infinite alternate; }
.gm-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background-image: radial-gradient(rgba(244, 244, 245, 0.075) 1px, transparent 1.4px); background-size: 24px 24px;
    -webkit-mask-image: radial-gradient(75% 85% at 50% 45%, transparent 30%, #000 70%, transparent 100%);
            mask-image: radial-gradient(75% 85% at 50% 45%, transparent 30%, #000 70%, transparent 100%); }
@keyframes gm-drift { to { transform: translate3d(2%, -3%, 0) scale(1.06); } }

/* The card: a lit top edge and a soft coloured shadow, and it rises in when the page opens. */
.gm-hero .gm-panel { background: linear-gradient(180deg, color-mix(in srgb, var(--accent-c, #52525b) 5%, #1a1a1d), #18181b 40%);
    box-shadow: 0 1px 0 color-mix(in srgb, var(--accent-c, #fff) 22%, transparent) inset, 0 30px 70px -30px color-mix(in srgb, var(--accent-c, #000) 45%, transparent), 0 12px 30px -12px rgba(0, 0, 0, 0.6);
    animation: gm-rise .5s cubic-bezier(.2, .8, .2, 1) both; }
.gm-hero .gm-panel::before { content: ""; position: absolute; top: -1px; left: 12%; right: 12%; height: 1px; pointer-events: none;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent-c, #fff) 85%, #fff), transparent); }
@keyframes gm-rise { from { opacity: 0; transform: translateY(10px); } }

/* Side rails: facts on the left, the first steps on the right. Only where there is room for them. */
.gm-solo-inner { position: relative; }
.gm-rail { display: none; }
@media (min-width: 1340px) {
    .gm-rail { display: block; position: absolute; top: 76px; width: 200px; animation: gm-rail-in .6s .15s cubic-bezier(.2, .8, .2, 1) both; }
    .gm-rail.left { right: calc(100% + 36px); }
    .gm-rail.right { left: calc(100% + 36px); --from: 12px; }
}
@media (min-width: 1500px) { .gm-rail { width: 230px; } .gm-rail.left { right: calc(100% + 52px); } .gm-rail.right { left: calc(100% + 52px); } }
@keyframes gm-rail-in { from { opacity: 0; transform: translateX(var(--from, -12px)); } }
.gm-rail-h { margin: 0 0 12px; font: 700 11px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: color-mix(in srgb, var(--accent-c, #93c5fd) 55%, #a1a1aa); }
.gm-rail ul, .gm-rail ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.gm-rail li { display: flex; align-items: flex-start; gap: 10px; padding: 11px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.45; color: #d4d4d8;
    background: rgba(24, 24, 27, 0.72); border: 1px solid rgba(244, 244, 245, 0.07); backdrop-filter: blur(6px);
    animation: gm-in .5s calc(.25s + var(--i, 0) * .08s) ease-out both; transition: border-color .2s, transform .2s; }
.gm-rail li:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent-c, #93c5fd) 35%, transparent); }
.gm-rail .dot, .gm-rail .n { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; margin-top: -2px;
    background: color-mix(in srgb, var(--accent-c, #93c5fd) 16%, transparent); color: color-mix(in srgb, var(--accent-c, #93c5fd) 65%, #f4f4f5); }
.gm-rail .dot .ic { width: 14px; height: 14px; }
.gm-rail .n { font: 800 13px var(--display); }
.gm-rail-more { display: inline-block; margin-top: 12px; font-size: 13px; font-weight: 600; color: color-mix(in srgb, var(--accent-c, #93c5fd) 60%, #f4f4f5); }
@media (prefers-reduced-motion: reduce) {
    .gm-hero::before, .gm-hero .gm-panel, .gm-rail, .gm-rail li { animation: none; }
}

/* ---------- Small phones ---------- */
@media (max-width: 420px) {
    /* "Capitals #23 · Fri, Oct 23" stays on one line; the date gives way first. */
    .gm-bar { gap: 8px; font-size: 12px; }
    .gm-bar > span:first-child { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
    .gm-bar > span:last-child, .gm-bar > .gm-pill { flex: none; }
    .gm-bar b { font-size: 14px; }
    .gm-pill { padding: 3px 8px; gap: 4px; font-size: 12px; }
    .em-actions { grid-template-columns: auto 1fr; }
    .em-actions .gm-btn { padding: 0 14px; font-size: 15px; white-space: nowrap; }
    .gm-hero::after { display: none; }
}
/* Comfortable tap targets on touch screens. */
@media (pointer: coarse) {
    .gm-btn.small { min-height: 40px; }
}

/* ---------- Country Connections ---------- */
.cn-modes { display: flex; gap: 4px; margin-bottom: 14px; padding: 4px; border-radius: 14px; background: rgba(244, 244, 245, 0.04); border: 1px solid var(--line); }
.cn-modes button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: 700 14px var(--sans); cursor: pointer; transition: background .15s, color .15s; }
.cn-modes button:hover { color: var(--text); }
.cn-modes button.on { color: #f4f4f5; background: color-mix(in srgb, var(--accent-c) 20%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-c) 45%, transparent); }
.cn-modes .ic { width: 16px; height: 16px; }
.cn-modes .ic:last-child:not(:first-child) { color: #4ade80; }
.cn-lives { gap: 3px; }
.cn-board { display: grid; gap: 8px; }
.cn-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
/* Tile height follows the screen height, so all four rows and the buttons fit without scrolling. */
.cn-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; height: clamp(64px, calc((100svh - 450px) / 4), 124px); padding: 8px; border-radius: 12px;
    border: 1px solid rgba(244, 244, 245, 0.1); background: rgba(244, 244, 245, 0.06); color: var(--text); cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
    transition: transform .12s, background .15s, border-color .15s; }
.cn-tile:hover { border-color: rgba(244, 244, 245, 0.28); }
.cn-tile.on { transform: scale(.95); border-color: var(--accent-c); background: color-mix(in srgb, var(--accent-c) 24%, #1f1f23); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-c) 30%, transparent); }
.cn-tile img { max-width: 84%; max-height: 66%; border-radius: 4px; outline: 1px solid rgba(244, 244, 245, 0.12); pointer-events: none; }
.cn-tile svg { width: 82%; height: 82%; pointer-events: none; }
.cn-tile svg path, .cn-items svg path { fill: color-mix(in srgb, var(--accent-c) 32%, #2a2a2f); stroke: color-mix(in srgb, var(--accent-c) 75%, #f4f4f5); stroke-width: 1.2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.cn-tile b { font: 800 14px/1.2 var(--display); text-align: center; overflow-wrap: anywhere; hyphens: auto; }
.cn-tile small { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.cn-row { padding: 10px 12px; border-radius: 12px; text-align: center; background: color-mix(in srgb, var(--cn) 20%, #19191c); border: 1px solid color-mix(in srgb, var(--cn) 55%, transparent); }
.cn-row.new { animation: cn-pop .45s ease-out both; }
.cn-row.missed { border-style: dashed; background: color-mix(in srgb, var(--cn) 8%, #19191c); }
.cn-row > b { display: block; font: 800 15px/1.3 var(--display); letter-spacing: .03em; text-transform: uppercase; color: #f4f4f5; }
.cn-row > small { display: block; margin-top: 2px; font-size: 12px; color: #bcbcc4; }
.cn-items { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin-top: 7px; font-size: 13px; color: #d4d4d8; }
.cn-items span { display: inline-flex; align-items: center; gap: 6px; }
.cn-items img { width: 21px; height: 15px; border-radius: 2px; object-fit: cover; }
.cn-items svg { width: 18px; height: 18px; }
.c-yellow { --cn: #facc15; } .c-green { --cn: #4ade80; } .c-blue { --cn: #60a5fa; } .c-purple { --cn: #c084fc; }
.cn-hints { display: grid; gap: 6px; margin-top: 10px; }
.cn-hints p { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 0; padding: 8px 12px; border-radius: 10px; font-size: 13.5px; color: #fde68a; background: rgba(250, 204, 21, 0.08); border: 1px solid rgba(250, 204, 21, 0.25); }
.cn-hints .ic { width: 15px; height: 15px; }
.cn-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.cn-controls [data-act="submit"] { min-width: 120px; }
.cn-out { margin-top: 14px; padding: 16px; border-radius: 16px; text-align: center; border: 1px solid rgba(248, 113, 113, 0.35); background: rgba(239, 68, 68, 0.08); animation: gm-in .3s ease-out both; }
.cn-out h2 { margin: 0 0 4px; font: 800 20px var(--display); color: #f4f4f5; }
.cn-out p { margin: 0 0 12px; color: #bcbcc4; }
.cn-out .row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
@keyframes cn-pop { 0% { opacity: 0; transform: scale(.94); } 60% { opacity: 1; transform: scale(1.02); } }
@media (max-width: 560px) {
    .cn-grid { gap: 5px; }
    .cn-tile { height: clamp(58px, calc((100svh - 400px) / 4), 92px); padding: 4px; border-radius: 10px; }
    .cn-tile b { font-size: 11.5px; }
    .cn-tile small { font-size: 8.5px; letter-spacing: .04em; }
    .cn-modes button { font-size: 13px; }
    .cn-controls .gm-btn.small { padding: 0 11px; }
    .cn-row > b { font-size: 13.5px; }
    .cn-items { font-size: 12px; gap: 3px 10px; }
}

/* Map Quiz page: study notes under the game (tips, facts, how to learn). */
.mq-tips { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mq-tips li { position: relative; padding: 12px 14px 12px 40px; border-radius: 12px; border: 1px solid var(--line); background: rgba(244, 244, 245, 0.025); font-size: 15px; line-height: 1.6; }
.mq-tips li::before { content: ''; position: absolute; left: 15px; top: 19px; width: 10px; height: 10px; border-radius: 3px; background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.15); }
.mq-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 700px) { .mq-facts { grid-template-columns: 1fr; } }
.mq-facts p { margin: 0; padding: 14px 15px; border-radius: 14px; border: 1px solid rgba(52, 211, 153, 0.18); background: linear-gradient(180deg, rgba(52, 211, 153, 0.07), rgba(52, 211, 153, 0.015)); font-size: 14.5px; line-height: 1.55; color: #d4d4d8; }
.mq-learn { list-style: none; margin: 0; padding: 0; counter-reset: l; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 600px) { .mq-learn { grid-template-columns: 1fr; } }
.mq-learn li { counter-increment: l; display: flex; gap: 11px; align-items: flex-start; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line); font-size: 14.5px; line-height: 1.55; }
.mq-learn li::before { content: counter(l); flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #34d399; color: #04261a; font: 800 13px var(--display); }

/* Sound on/off, at the end of every game's top bar (sound.js soundToggle). */
.gm-sound { cursor: pointer; font: inherit; padding: 4px 8px; }
.gm-sound:hover { color: #f4f4f5; background: rgba(244, 244, 245, 0.09); }
.gm-sound[aria-pressed="false"] { color: #8e8e96; }
.gm-sound .ic { width: 15px; height: 15px; }
