/* Globe Game — quiz games (/flag-quiz, /world-capitals-quiz, /guess-the-country, /games). Owner: Quizzy.
   Self-contained: uses the light-theme values of css/style.css as fallbacks so it works inside the SEO page shell. */
.quiz {
  --q-bg: var(--panel, #fff);
  --q-ink: var(--ink, var(--text, #14223b));
  --q-muted: var(--muted, #52627d);
  --q-accent: var(--accent, #1a6fd6);
  --q-border: rgba(24, 56, 110, .14);
  --q-ok: #0b7f56;
  --q-ok-bg: #e3f6ee;
  --q-bad: #c0263e;
  --q-bad-bg: #fde8ec;
  --q-field: #fff;
  --q-hover: rgba(26, 111, 214, .07);
  --q-shadow: 0 12px 32px rgba(28, 64, 120, .12), 0 2px 6px rgba(28, 64, 120, .06);
  margin: 8px 0 28px;
  scroll-margin-top: 12px;
  color: var(--q-ink);
  font-size: 16px;
  line-height: 1.45;
  overflow-wrap: normal;
}
.quiz *, .quiz *::before, .quiz *::after { box-sizing: border-box; }
.quiz [hidden] { display: none !important; }
.quiz-loading { padding: 48px 16px; text-align: center; color: var(--q-muted); background: var(--q-bg); border: 1px solid var(--q-border); border-radius: 24px; }

/* banner (challenge) */
.quiz-banner { background: #fff6e0; border: 1px solid #f3d48b; color: #5a4100; border-radius: 12px; padding: 10px 14px; margin: 0 0 10px; font-size: 15px; }

/* settings */
.quiz-settings { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.quiz-field { display: flex; flex-direction: column; flex: 1 1 130px; min-width: 0; }
.quiz-field-label { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--q-muted); margin: 0 0 2px 4px; }
.quiz-field select {
  min-height: 44px; width: 100%; padding: 0 30px 0 12px; font: inherit; font-size: 15px; color: var(--q-ink);
  background: var(--q-field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2352627d' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--q-border); border-radius: 10px; appearance: none; -webkit-appearance: none; cursor: pointer;
}
.quiz-field select:focus-visible { outline: 3px solid rgba(26, 111, 214, .35); outline-offset: 1px; }

/* card */
.quiz-card { background: var(--q-bg); border: 1px solid var(--q-border); border-radius: 24px; /* = home .panel (Lumen) */ box-shadow: var(--q-shadow); padding: 14px 16px 16px; }
.quiz-hud { display: flex; align-items: center; gap: 14px; font-size: 15px; font-weight: 700; color: var(--q-muted); font-variant-numeric: tabular-nums; }
.quiz-progress { color: var(--q-ink); }
.quiz-score { color: var(--q-ok); }
.quiz-streak { color: #c2410c; }
.quiz-time { margin-left: auto; font-weight: 600; }
.quiz-bar { height: 6px; background: rgba(24, 56, 110, .08); border-radius: 99px; overflow: hidden; margin: 8px 0 6px; }
.quiz-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #1a6fd6, #0b7f56); border-radius: 99px; transition: width .3s ease; }
.quiz-ask { margin: 8px 0 10px; font-weight: 700; font-size: 17px; text-align: center; }

/* prompt */
.quiz-prompt { display: flex; align-items: center; justify-content: center; min-height: 150px; margin: 0 0 12px; }
.quiz-flag { display: block; width: auto; height: auto; max-width: min(100%, 320px); max-height: 200px; border-radius: 6px; background: #fff;
  box-shadow: 0 0 0 1px rgba(10, 25, 50, .14), 0 8px 22px rgba(28, 64, 120, .16); }
.quiz-flag-emoji { font-size: 120px; line-height: 1; }
.quiz-shape { width: min(100%, 260px); height: auto; aspect-ratio: 1; overflow: hidden; }
.quiz-shape path { fill: #2a7d5a; stroke: #1b5a40; stroke-width: 1.4; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.quiz-word { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 10px 0; }
.quiz-word-icon { font-size: 54px; line-height: 1; }
.quiz-word-text { font-size: clamp(26px, 6vw, 38px); font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }

/* choices */
.quiz-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quiz-choice {
  display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 8px 12px; text-align: left;
  font: inherit; font-weight: 700; font-size: 16px; color: var(--q-ink); background: var(--q-field);
  border: 2px solid var(--q-border); border-radius: 12px; cursor: pointer; transition: background .15s, border-color .15s, transform .08s;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.quiz-choice:hover:not(:disabled) { background: var(--q-hover); border-color: rgba(26, 111, 214, .4); }
.quiz-choice:active:not(:disabled) { transform: scale(.98); }
.quiz-choice:focus-visible { outline: 3px solid rgba(26, 111, 214, .35); outline-offset: 1px; }
.quiz-choice:disabled { cursor: default; opacity: .7; }
.quiz-choice.correct { opacity: 1; background: var(--q-ok-bg); border-color: var(--q-ok); color: #064e35; }
.quiz-choice.wrong { opacity: 1; background: var(--q-bad-bg); border-color: var(--q-bad); color: #7a1426; }
.quiz-key { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; font-size: 13px; color: var(--q-muted); background: rgba(24, 56, 110, .07); }
.quiz-choice-text { min-width: 0; overflow-wrap: anywhere; }

/* type-in */
.quiz-type { display: flex; flex-direction: column; gap: 8px; }
.quiz-type-row { display: flex; gap: 8px; }
.quiz-input {
  flex: 1; min-width: 0; min-height: 50px; padding: 0 14px; font: inherit; font-size: 17px; color: var(--q-ink);
  background: var(--q-field); border: 2px solid var(--q-border); border-radius: 12px;
}
.quiz-input:focus { outline: none; border-color: var(--q-accent); box-shadow: 0 0 0 3px rgba(26, 111, 214, .18); }
.quiz-sugg { display: flex; flex-wrap: wrap; gap: 6px; }
.quiz-sugg:empty { display: none; }
.quiz-sugg-item, .quiz-chip {
  min-height: 44px; padding: 0 14px; font: inherit; font-size: 15px; font-weight: 600; color: var(--q-accent);
  background: var(--q-hover); border: 1px solid rgba(26, 111, 214, .25); border-radius: 99px; cursor: pointer;
}
.quiz-sugg-item.active, .quiz-sugg-item:hover, .quiz-chip:hover { background: rgba(26, 111, 214, .16); }
.quiz-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.quiz-chips:empty { display: none; }
.quiz-chips-msg { width: 100%; font-size: 14px; color: var(--q-muted); }
.quiz-skip { align-self: flex-start; }

/* buttons */
.quiz-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 18px;
  font: inherit; font-weight: 700; font-size: 15px; color: var(--q-accent); background: #fff;
  border: 1px solid rgba(26, 111, 214, .35); border-radius: 12px; cursor: pointer; text-decoration: none; touch-action: manipulation; /* 12px = home .btn (Lumen) */
}
.quiz-btn:hover:not(:disabled) { background: var(--q-hover); }
.quiz-btn.primary { color: #fff; background: linear-gradient(135deg, #1a6fd6, #1559c9); border-color: transparent; box-shadow: 0 6px 18px rgba(26, 111, 214, .28); }
.quiz-btn.primary:hover:not(:disabled) { background: linear-gradient(135deg, #1863c2, #124cae); }
.quiz-btn:disabled { opacity: .5; cursor: default; }
.quiz-btn:focus-visible { outline: 3px solid rgba(26, 111, 214, .35); outline-offset: 2px; }
.quiz-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 12px; }
.quiz-next { order: 2; min-width: 150px; }
.quiz-restart { order: 1; color: var(--q-muted); border-color: var(--q-border); }

/* feedback */
.quiz-feedback { min-height: 0; margin: 10px 0 0; border-radius: 12px; font-size: 16px; }
.quiz-feedback:empty { display: none; }
.quiz-feedback.ok { padding: 10px 14px; background: var(--q-ok-bg); color: #064e35; }
.quiz-feedback.bad { padding: 10px 14px; background: var(--q-bad-bg); color: #7a1426; }
.quiz-fact { display: block; font-size: 14px; opacity: .85; margin-top: 2px; }
.quiz-locator { margin: 10px auto 0; max-width: 420px; }
.quiz-locator svg { display: block; width: 100%; height: auto; background: #eaf4ff; border-radius: 10px; border: 1px solid var(--q-border); }
.loc-land { fill: #cdd8e6; stroke: #fff; stroke-width: .3; }
.loc-hit { fill: #e2553a; stroke: #9b2a14; stroke-width: .5; }
.loc-ring { fill: none; stroke: #e2553a; stroke-width: 1.5; }

/* result dialog */
.quiz-result {
  width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 24px;
  background: var(--q-bg); color: var(--q-ink); box-shadow: 0 24px 60px rgba(20, 40, 80, .35); overflow: auto;
}
.quiz-result::backdrop { background: rgba(20, 40, 80, .4); }
.quiz-result-inner { position: relative; padding: 20px 20px 18px; text-align: center; }
.quiz-close { position: absolute; top: 6px; right: 6px; width: 44px; height: 44px; font-size: 28px; line-height: 1; color: var(--q-muted); background: none; border: 0; border-radius: 50%; cursor: pointer; }
.quiz-close:hover { background: var(--q-hover); }
.quiz-result-kicker { margin: 4px 0 0; font-weight: 700; color: var(--q-muted); }
.quiz-result-score { margin: 2px 0; font-size: 56px; line-height: 1.05; font-weight: 900; color: var(--q-accent); font-variant-numeric: tabular-nums; }
.quiz-result-verdict { margin: 0 0 6px; font-size: 18px; font-weight: 700; }
.quiz-result-vs { margin: 4px 0 8px; font-weight: 700; color: #8a5a00; }
.quiz-result-best { margin: 6px 0; font-weight: 700; color: var(--q-ok); }
.quiz-result-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; list-style: none; padding: 0; margin: 12px 0; }
.quiz-result-stats li { display: flex; flex-direction: column; padding: 8px 4px; background: rgba(24, 56, 110, .05); border-radius: 10px; }
.quiz-result-stats b { font-size: 20px; font-variant-numeric: tabular-nums; }
.quiz-result-stats span { font-size: 12px; color: var(--q-muted); }
.quiz-share-text { margin: 10px 0; padding: 10px 12px; text-align: left; white-space: pre-wrap; font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; background: rgba(24, 56, 110, .05); border-radius: 10px; user-select: all; -webkit-user-select: all; }
.quiz-result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 10px 0; }
.quiz-result-actions .quiz-btn { flex: 1 1 150px; }
.quiz-channels { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 4px 0 8px; }
.quiz-channel { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 14px; font-size: 14px; font-weight: 700; text-decoration: none; color: var(--q-ink); background: rgba(24, 56, 110, .06); border-radius: 99px; }
.quiz-channel:hover { background: rgba(24, 56, 110, .12); }
.quiz-review { text-align: left; margin: 10px 0; padding: 8px 12px; background: rgba(24, 56, 110, .04); border-radius: 12px; border: 0; }
.quiz-review summary { min-height: 44px; display: flex; align-items: center; font-weight: 700; cursor: pointer; }
.quiz-review ul { list-style: none; padding: 0; margin: 4px 0; display: grid; gap: 6px; }
.quiz-review li { display: flex; align-items: center; gap: 10px; }
.quiz-review-flag { border-radius: 3px; box-shadow: 0 0 0 1px rgba(10, 25, 50, .15); background: #fff; }
.quiz-more-title { margin: 14px 0 6px; font-weight: 800; }
.quiz-more { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.quiz-more-card { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 44px; padding: 10px 12px; text-align: left; text-decoration: none; color: var(--q-ink); background: rgba(24, 56, 110, .05); border-radius: 12px; }
.quiz-more-card b { color: var(--q-accent); }
.quiz-more-card span:last-child { font-size: 13px; color: var(--q-muted); }
.quiz-more-ico { font-size: 22px; }
.quiz-copy-ta { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; }

/* toast */
.quiz-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 12px;
  background: #14223b; color: #fff; font-weight: 600; font-size: 15px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; }
.quiz-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* game hub + "More games" grid (used on /games and the game pages) */
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 16px 0; }
.game-card { display: flex; flex-direction: column; gap: 4px; padding: 16px; min-height: 44px; text-decoration: none; color: var(--ink, #14223b);
  background: var(--panel, #fff); border: 1px solid rgba(24, 56, 110, .12); border-radius: 24px; box-shadow: 0 2px 6px rgba(28, 64, 120, .06); transition: transform .12s, box-shadow .12s; }
.game-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(28, 64, 120, .12); }
.game-card .game-ico { font-size: 34px; line-height: 1; }
.game-card b { font-size: 18px; color: var(--link, #1559c9); }
.game-card span:last-child { font-size: 15px; color: var(--muted, #52627d); line-height: 1.5; }
.game-card .badge { align-self: flex-start; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #fff; background: #c2410c; border-radius: 99px; padding: 2px 8px; }

@media (max-width: 560px) {
  .quiz-card { padding: 12px 12px 14px; border-radius: 20px; } /* = home .panel on phones (Lumen) */
  .quiz-settings { gap: 6px; }
  .quiz-field { flex: 1 1 calc(50% - 6px); }
  .quiz-choices { grid-template-columns: 1fr; gap: 8px; }
  .quiz-prompt { min-height: 120px; }
  .quiz-flag { max-height: 170px; }
  .quiz-shape { width: min(100%, 220px); }
  .quiz-result-score { font-size: 48px; }
  .quiz-result-stats { grid-template-columns: repeat(2, 1fr); }
  .quiz-hud { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .quiz *, .quiz *::before, .quiz *::after { transition: none !important; }
}

/* ---------- Geordle (/geordle) ---------- */
.geo-tabs { display: flex; gap: 6px; margin: 0 0 10px; padding: 4px; background: rgba(24, 56, 110, .06); border-radius: 14px; }
.geo-tab { flex: 1; min-height: 44px; font: inherit; font-weight: 800; font-size: 15px; color: var(--q-muted); background: none; border: 0; border-radius: 10px; cursor: pointer; }
.geo-tab[aria-pressed="true"] { color: #fff; background: #1a6fd6; box-shadow: 0 2px 6px rgba(26, 111, 214, .25); } /* matches home .seg active (Lumen) */
.geo-tab:not([aria-pressed="true"]):hover { color: var(--q-ink); background: var(--q-hover); }
.geo-label { margin-left: auto; font-weight: 600; }
.geo-board { margin: 10px 0 6px; }
.geo-head, .geo-tiles { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.geo-head span { font-size: 10px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; color: var(--q-muted); text-align: center; line-height: 1.15; overflow-wrap: anywhere; }
.geo-rows { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 8px; }
.geo-name { font-weight: 800; font-size: 15px; margin: 0 0 3px 2px; }
.geo-tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 52px; padding: 4px 2px; border-radius: 8px;
  text-align: center; font-weight: 800; font-size: 13px; line-height: 1.1; color: #3b4a63; background: #e6ebf2; font-variant-numeric: tabular-nums; }
.geo-tile.hit { color: #fff; background: #1d7a50; } /* 5.3:1 with white */
.geo-tile.near { color: #4a3600; background: #f2c94c; }
.geo-tile-k { display: none; }
.geo-tile-v { overflow-wrap: normal; word-break: keep-all; letter-spacing: -.01em; }
.geo-head-short { display: none; }
.geo-arrow { font-size: 15px; line-height: 1; margin-top: 2px; }
.geo-compass { display: inline-block; }
.geo-row.enter .geo-tile { animation: geo-flip .45s ease both; }
.geo-row.enter .geo-tile:nth-child(2) { animation-delay: .06s; } .geo-row.enter .geo-tile:nth-child(3) { animation-delay: .12s; }
.geo-row.enter .geo-tile:nth-child(4) { animation-delay: .18s; } .geo-row.enter .geo-tile:nth-child(5) { animation-delay: .24s; }
.geo-row.enter .geo-tile:nth-child(6) { animation-delay: .30s; } .geo-row.enter .geo-tile:nth-child(7) { animation-delay: .36s; }
@keyframes geo-flip { from { transform: rotateX(90deg); opacity: .2; } to { transform: none; opacity: 1; } }
.geo-empty { margin: 10px 0; color: var(--q-muted); text-align: center; }
.geo-form { margin-top: 10px; }
.geo-giveup { color: var(--q-muted); border-color: var(--q-border); }
.geo-legend { margin: 12px 0 0; padding: 4px 14px; background: var(--q-bg); border: 1px solid var(--q-border); border-radius: 12px; font-size: 15px; }
.geo-legend summary { min-height: 44px; display: flex; align-items: center; font-weight: 700; cursor: pointer; }
.geo-legend ul { margin: 0 0 10px; padding-left: 18px; }
.geo-answer { margin: 4px 0 8px; }
.geo-next { margin: 6px 0; font-weight: 700; color: var(--q-muted); font-variant-numeric: tabular-nums; }
.geo-dist { display: grid; gap: 3px; margin: 10px 0; text-align: left; }
.geo-dist-row { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; }
.geo-dist-row > span:first-child { width: 14px; text-align: right; }
.geo-dist-bar { display: block; min-width: 22px; padding: 1px 6px; text-align: right; color: #fff; background: #8a9ab3; border-radius: 4px; }
.geo-dist-row.mine .geo-dist-bar { background: #2f9e6b; }
@media (max-width: 560px) {
  .geo-tile { min-height: 50px; font-size: clamp(9.5px, 2.75vw, 12px); border-radius: 7px; padding: 4px 1px; }
  .geo-head span { font-size: 9.5px; }
  .geo-head-long { display: none; }
  .geo-head-short { display: inline; }
  .geo-head, .geo-tiles { gap: 3px; }
}
@media (prefers-reduced-motion: reduce) { .geo-row.enter .geo-tile { animation: none; } }
.quiz-word-sub { font-size: 14px; font-weight: 600; color: var(--q-muted); }

/* US states & capitals quiz */
.quiz-us { display: flex; flex-direction: column; align-items: center; width: 100%; gap: 4px; }
.quiz-us .quiz-word { padding: 0 0 4px; }
.quiz-usmap { display: block; width: 100%; max-width: 560px; height: auto; }
.quiz-usmap .us-land { fill: #d5deea; stroke: #fff; stroke-width: 1; stroke-linejoin: round; }
.quiz-usmap .us-hit { fill: #e2553a; stroke: #9b2a14; stroke-width: 1.2; stroke-linejoin: round; }
.quiz-usmap .us-ring { fill: none; stroke: #e2553a; stroke-width: 2.5; }
.quiz-usmap .us-cap { fill: #14223b; stroke: #fff; stroke-width: 2; }

/* ---------- globe games (/world-map-quiz, /countries-of-the-world-quiz) ---------- */
.quiz-find { font-size: 18px; }
.quiz-find-label { color: var(--q-muted); font-weight: 600; }
.quiz-find-name { font-size: 22px; color: var(--q-ink); }
.quiz-globe-wrap { position: relative; width: 100%; aspect-ratio: 4 / 3; max-height: min(68vh, 560px); min-height: 300px; margin: 0 auto;
  border-radius: 16px; overflow: hidden; background: radial-gradient(circle at 50% 45%, #f3f9ff 0%, #e4f1fc 70%, #d7eafa 100%); }
.quiz-globe { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: pointer; }
.quiz-globe:focus-visible { outline: 3px solid rgba(26, 111, 214, .45); outline-offset: -3px; }
.quiz-zoombar { position: absolute; right: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 6px; }
.quiz-zoom { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--q-border); background: rgba(255, 255, 255, .92); color: var(--q-ink);
  font: inherit; font-size: 22px; font-weight: 700; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(28, 64, 120, .14); }
.quiz-zoom:hover { background: #fff; }
.quiz-zoom:focus-visible { outline: 3px solid rgba(26, 111, 214, .35); outline-offset: 1px; }
.quiz-feedback.hint { padding: 10px 14px; background: #fff6e0; color: #5a4100; }
.quiz-result-played { margin: 4px 0 0; text-align: center; color: var(--q-muted); font-size: 14px; }
@media (max-width: 560px) {
  .quiz-globe-wrap { aspect-ratio: 1 / 1; min-height: 0; }
  .quiz-find-name { font-size: 20px; }
}

/* countries of the world quiz */
.cq-hud { flex-wrap: wrap; }
.cq-count { color: var(--q-ink); font-size: 17px; }
.cq-clock { margin-left: auto; font-size: 17px; color: var(--q-ink); }
.cq-clock.low { color: var(--q-bad); }
.cq-giveup { min-height: 44px; padding: 0 14px; font-size: 14px; }
.cq-giveup[data-confirm] { border-color: var(--q-bad); color: var(--q-bad); }
.cq-form { display: flex; gap: 8px; margin: 10px 0 0; }
.cq-input { flex: 1 1 auto; min-width: 0; min-height: 52px; padding: 0 16px; font: inherit; font-size: 18px; color: var(--q-ink);
  background: var(--q-field); border: 2px solid var(--q-border); border-radius: 12px; }
.cq-input:focus { outline: none; border-color: var(--q-accent); box-shadow: 0 0 0 3px rgba(26, 111, 214, .18); }
.cq-input:disabled { background: #f3f5f9; }
.cq-enter { flex: 0 0 auto; min-height: 52px; }
.cq-msg { margin-top: 8px; }
.cq-conts { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 10px 0; padding: 0; }
.cq-cont { display: inline-flex; gap: 6px; align-items: baseline; padding: 5px 10px; border-radius: 99px; background: rgba(24, 56, 110, .06);
  font-size: 14px; color: var(--q-muted); font-variant-numeric: tabular-nums; }
.cq-cont b { color: var(--q-ink); }
.cq-cont.done { background: var(--q-ok-bg); color: var(--q-ok); }
.cq-cont.done b { color: var(--q-ok); }
.cq-start-wrap { display: flex; justify-content: center; margin: 0 0 10px; }
.cq-lists { margin: 12px 0 0; }
.cq-lists > summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.cq-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 4px 16px; }
.cq-col h3 { font-size: 14px; margin: 8px 0 4px; color: var(--q-muted); }
.cq-col ul { list-style: none; margin: 0; padding: 0; font-size: 14px; line-height: 1.5; }
.cq-col li.found { color: var(--q-ok); }
.cq-col li.missing { color: var(--q-bad); }
.cq-missed { margin: 6px 0; font-size: 14px; text-align: left; }
@media (max-width: 560px) {
  .cq-cols { grid-template-columns: 1fr 1fr; }
}

/* US states game (hot/cold) */
.usg-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin: 0 0 10px; }
.usg-top .geo-tabs { flex: 1 1 260px; margin: 0; }
.usg-region { flex: 0 1 220px; }
.usg-count { color: var(--q-ink); font-size: 17px; }
.usg-best { margin-left: auto; color: #c2410c; }
.usg-choices { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 0; }
.usg-choices-q { width: 100%; font-weight: 700; font-size: 14px; color: var(--q-muted); }
.quiz-feedback.hot { padding: 10px 14px; background: #fde8ec; color: #7a1426; font-weight: 600; }
.usg-mapwrap { position: relative; margin: 12px 0 0; }
.usg-map { max-width: none; margin: 0 auto; }
.usg-map .usg-state { stroke: #fff; stroke-width: 1; stroke-linejoin: round; cursor: pointer; }
/* guessed states are painted with the SVG fill attribute, so no CSS fill rule may match them */
.usg-map .usg-state:not(.guessed) { fill: #e6edf5; transition: fill .2s; }
.usg-map .usg-state:not(.guessed):hover { fill: #d2deec; }
.usg-map .usg-state.target { stroke: #14223b; stroke-width: 2; }
.usg-map .usg-lbl { font: 700 10px/1 system-ui, sans-serif; fill: #14223b; text-anchor: middle; pointer-events: none; paint-order: stroke; stroke: rgba(255, 255, 255, .85); stroke-width: 2.5px; }
.usg-legend { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 6px 0 0; font-size: 12px; color: var(--q-muted); }
.usg-legend i { display: block; width: 140px; height: 8px; border-radius: 99px; background: linear-gradient(90deg, rgb(240,232,214), rgb(246,210,122), rgb(242,155,75), rgb(226,85,58), rgb(179,32,44)); }
.usg-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.usg-list li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--q-border); border-radius: 12px; font-size: 15px; }
.usg-list li.target { background: var(--q-ok-bg); border-color: transparent; }
.usg-list .usg-km { margin-left: auto; color: var(--q-muted); font-variant-numeric: tabular-nums; }
.usg-list .usg-dir { min-width: 48px; text-align: right; font-weight: 700; color: var(--q-ink); }

/* region preset pages: long country lists */
.quiz-list-cols { columns: 3 150px; column-gap: 24px; padding-left: 1.2em; }
.quiz-list-cols li { break-inside: avoid; margin: 0 0 4px; }

/* flag memory game */
.fm-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0 0; }
.fm-grid[data-n="24"] { grid-template-columns: repeat(6, 1fr); }
.fm-grid[data-n="36"] { grid-template-columns: repeat(6, 1fr); }
.fm-cell { position: relative; aspect-ratio: 4 / 3; min-height: 48px; min-width: 44px; padding: 0; border: 0; border-radius: 10px; cursor: pointer;
  background: none; perspective: 600px; font: inherit; touch-action: manipulation; }
.fm-back, .fm-face { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border-radius: 10px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .25s ease; }
.fm-back { background: linear-gradient(135deg, #1a6fd6, #0b7f56); color: #fff; font-size: 22px; box-shadow: 0 2px 6px rgba(28, 64, 120, .18); }
.fm-face { background: #fff; border: 1px solid var(--q-border); transform: rotateY(180deg); overflow: hidden; padding: 4px; }
.fm-cell.up .fm-back { transform: rotateY(180deg); }
.fm-cell.up .fm-face { transform: rotateY(0deg); }
.fm-cell:focus-visible { outline: 3px solid rgba(26, 111, 214, .45); outline-offset: 2px; }
.fm-cell.matched { cursor: default; }
.fm-cell.matched .fm-face { border-color: var(--q-ok); box-shadow: 0 0 0 2px var(--q-ok) inset; background: var(--q-ok-bg); }
.fm-flag { display: block; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 3px; box-shadow: 0 0 0 1px rgba(10, 25, 50, .12); }
.fm-name { font-size: 13px; font-weight: 700; line-height: 1.15; text-align: center; color: var(--q-ink); overflow-wrap: anywhere; }
.fm-side .quiz-globe-wrap { aspect-ratio: 16 / 9; max-height: 280px; min-height: 0; margin-top: 12px; }
@media (max-width: 560px) {
  .fm-grid { gap: 6px; }
  .fm-grid[data-n="36"] { gap: 4px; }
  .fm-name { font-size: 11px; }
  .fm-back { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { .fm-back, .fm-face { transition: none; } }

/* Reserve the mounted height while the countries quiz loads, so the text below does not jump (CLS).
   Mounted height = fixed parts (HUD, input, counters, buttons) + the globe, whose size follows the width. */
.quiz[data-game="countries"] > .quiz-loading { min-height: calc(min((100vw - 69px) * .75, 68vh, 560px) + 450px); }
@media (max-width: 560px) {
  .quiz[data-game="countries"] > .quiz-loading { min-height: calc(min(100vw - 62px, 68vh, 560px) + 519px); }
}
/* Game pages: the top "Play …" button links to #play, which starts right below it; on phones it only pushes the game down. */
@media (max-width: 720px) {
  main > h1 + p:has(> a.cta[href="#play"]) { display: none; }
}
/* /games hub on phones: the dailies row and game cards come first, so the top button is redundant there too. */
@media (max-width: 720px) {
  main:has(> [data-dailies]) > h1 + p:has(> a.cta) { display: none; }
}
/* Reserve each game's mounted height while it loads (CLS). Measured on the built pages at 360–1280px wide;
   the content below the game should not move when the game replaces the loading box. Re-measure if a game's layout changes. */
.quiz[data-quiz="flag"] > .quiz-loading { min-height: 572px; }
.quiz[data-quiz="capitals"] > .quiz-loading,
.quiz[data-quiz="city"] > .quiz-loading { min-height: 522px; }
.quiz[data-quiz="shape"] > .quiz-loading { min-height: 632px; }
.quiz[data-quiz="states"] > .quiz-loading { min-height: 797px; }
.quiz[data-game="geordle"] > .quiz-loading { min-height: 316px; }
.quiz[data-game="usgame"] > .quiz-loading { min-height: calc(min(100vw - 36px, 784px) * .67 + 260px); }
.quiz[data-game="worldmap"] > .quiz-loading { min-height: calc(min((100vw - 36px) * .75, 68vh, 560px) + 236px); }
.quiz[data-game="flagmemory"] > .quiz-loading { min-height: calc(min(100vw - 36px, 784px) * .5 + 521px); }
@media (max-width: 560px) {
  .quiz[data-quiz="flag"] > .quiz-loading { min-height: 732px; }
  .quiz[data-quiz="capitals"] > .quiz-loading { min-height: 749px; }
  .quiz[data-quiz="city"] > .quiz-loading { min-height: 691px; }
  .quiz[data-quiz="shape"] > .quiz-loading { min-height: 779px; }
  .quiz[data-quiz="states"] > .quiz-loading { min-height: calc((100vw - 36px) * .667 + 579px); }
  .quiz[data-game="geordle"] > .quiz-loading { min-height: 335px; }
  .quiz[data-game="usgame"] > .quiz-loading { min-height: 512px; }
  .quiz[data-game="worldmap"] > .quiz-loading { min-height: 648px; }
  .quiz[data-game="flagmemory"] > .quiz-loading { min-height: calc((100vw - 36px) * .57 + 512px); }
}
/* Flag quiz: flags differ in shape; a fixed prompt height keeps the answers from jumping as each flag loads. */
.quiz[data-quiz="flag"] .quiz-prompt { min-height: 200px; }
@media (max-width: 560px) { .quiz[data-quiz="flag"] .quiz-prompt { min-height: 170px; } }
/* /games: reserve the dailies row (js/dailies.js, Viral) before it renders (CLS). */
main > [data-dailies]:empty { min-height: 93px; }
@media (max-width: 560px) { main > [data-dailies]:empty { min-height: 193px; } }
