@import url("/property/css/shared/00-design-tokens.css");

/* Watchdog Games and the learning pages (/games, /games/*, /glossary).

   Part 1 is shared page chrome (top bar, cards, buttons, footer) used by the
   hub and the glossary. Part 2 is the game app: an app bar, a splash screen
   per game, boards, a keypad and result sheets. Colors come only from the
   Watchdog tokens: navy ink, gold (Sold!), teal (Town Shapes), and green /
   gold / slate as the result system. Flat fills and thin rules, no gradients. */

/* ===================== Part 1: shared chrome ===================== */
.wg {
  --wg-ink: var(--wd-navy-950);
  --wg-muted: var(--text-muted);
  --wg-line: #d6dce5;
  --wg-soft: #eef1f5;
  --wg-win: var(--wd-green-600);
  --wg-close: var(--wd-gold-500);
  --wg-miss: #5d6877;
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--wg-ink);
  font-family: var(--font-ui);
  font-size: var(--type-md);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.wg *, .wg *::before, .wg *::after { box-sizing: border-box; }
.wg a { color: var(--wd-navy-700); }
.wg :focus-visible { outline: 3px solid var(--wd-navy-700); outline-offset: 2px; border-radius: 6px; }
.wg-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wg-skip { position: absolute; left: -9999px; }
.wg-skip:focus { left: var(--space-4); top: var(--space-4); z-index: 90; padding: var(--space-2) var(--space-3); background: var(--surface); }

.wg-bar { position: sticky; top: 0; z-index: 40; background: var(--surface); border-bottom: 1px solid var(--wg-line); }
.wg-bar-in { max-width: var(--container-reading); margin: 0 auto; padding: 0 var(--space-4); min-height: 60px; display: flex; align-items: center; gap: var(--space-4); }
.wg-brand { font-weight: 800; font-size: var(--type-lg); color: var(--wg-ink) !important; text-decoration: none; letter-spacing: -0.01em; }
.wg-nav { margin-left: auto; display: flex; gap: var(--space-1); flex-wrap: wrap; }
.wg-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-3); border-radius: var(--radius-sm); color: var(--wg-ink); font-weight: 700; font-size: var(--type-sm); text-decoration: none; }
.wg-nav a[aria-current="page"] { background: var(--info-bg); }
.wg-nav a:hover { background: var(--wg-soft); }

.wg-main { max-width: var(--container-reading); margin: 0 auto; padding: var(--space-6) var(--space-4) var(--space-8); }
.wg-narrow { max-width: 680px; margin: 0 auto; }
.wg-kicker { margin: 0; font-size: var(--type-xs); font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--wd-teal-600); }
.wg h1 { margin: var(--space-2) 0 var(--space-3); font-family: var(--font-display); font-weight: 700; font-size: clamp(2.25rem, 7vw, 3.5rem); line-height: 1.04; letter-spacing: -0.02em; }
.wg h2 { margin: 0 0 var(--space-3); font-size: var(--type-xl); line-height: 1.2; }
.wg h3 { margin: 0 0 var(--space-2); font-size: var(--type-lg); }
.wg-lede { margin: 0 0 var(--space-6); max-width: 640px; color: var(--wg-muted); font-size: var(--type-lg); }
.wg-card { background: var(--surface); border: 1px solid var(--wg-line); border-radius: var(--radius-lg); padding: var(--space-5); }
.wg-card + .wg-card { margin-top: var(--space-4); }
.wg-note { color: var(--wg-muted); font-size: var(--type-sm); }
.wg-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }

.wg-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 48px; padding: 0 var(--space-5); border: 2px solid var(--wg-ink); border-radius: 999px; background: var(--wg-ink); color: #fff !important; font: inherit; font-weight: 800; font-size: var(--type-md); text-decoration: none; cursor: pointer; }
.wg-btn:hover { background: #1b3263; border-color: #1b3263; }
.wg-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.wg-btn-quiet { background: transparent; color: var(--wg-ink) !important; }
.wg-btn-quiet:hover { background: var(--wg-soft); border-color: var(--wg-ink); }

.wg-foot { border-top: 1px solid var(--wg-line); background: var(--surface); }
.wg-foot-in { max-width: var(--container-reading); margin: 0 auto; padding: var(--space-5) var(--space-4); display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-5); font-size: var(--type-sm); color: var(--wg-muted); }
.wg-foot a { color: var(--wg-muted); }

/* ===================== Hub (/games) ===================== */
.gh { background: var(--bg); }
.gh-hero { background: var(--wd-navy-950); color: #fff; padding: var(--space-7) var(--space-4) calc(var(--space-8) + var(--space-5)); }
.gh-hero-in { max-width: calc(var(--container-reading) - 2 * var(--space-4)); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: var(--space-6); align-items: center; }
.gh-hero .gh-date { margin: 0 0 var(--space-3); font-size: var(--type-sm); font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--wd-gold-500); }
.gh-hero h1 { margin: 0 0 var(--space-4); color: #fff; font-size: clamp(2.75rem, 8vw, 4.75rem); font-weight: 800; letter-spacing: -0.03em; line-height: 0.98; }
.gh-hero-copy p:last-child { margin: 0; max-width: 520px; color: rgba(255, 255, 255, 0.82); font-size: var(--type-lg); }
.gh-today { padding: var(--space-5); border-radius: 22px; background: var(--surface); color: var(--wg-ink); }
.gh-today h2 { margin: 0 0 var(--space-3); font-size: var(--type-xs); font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--wg-muted); }
.gh-ring { position: relative; width: 132px; height: 132px; margin: 0 auto var(--space-4); }
.gh-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gh-ring circle { fill: none; stroke-width: 12; }
.gh-ring-track { stroke: var(--wg-soft); }
.gh-ring-fill { stroke: var(--wd-gold-500); stroke-linecap: round; transition: stroke-dashoffset 900ms ease; }
.gh-ring p { position: absolute; inset: 0; display: grid; place-content: center; margin: 0; text-align: center; }
.gh-ring b { font-size: 2.5rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.gh-ring span { font-size: var(--type-xs); font-weight: 800; color: var(--wg-muted); }
.gh-today-stats { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); margin: 0 0 var(--space-4); text-align: center; }
.gh-today-stats div { padding: var(--space-2); border-radius: 12px; background: var(--wg-soft); display: flex; flex-direction: column-reverse; }
.gh-today-stats dt { font-size: var(--type-xs); font-weight: 700; color: var(--wg-muted); }
.gh-today-stats dd { margin: 0; font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.gh-start { width: 100%; }

.gh-wrap { position: relative; max-width: var(--container-reading); margin: calc(-1 * var(--space-8)) auto 0; padding: 0 var(--space-4) var(--space-8); }
.gh-feature { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); overflow: hidden; margin-bottom: var(--space-5); background: var(--surface); border: 1px solid var(--wg-line); border-radius: 24px; color: var(--wg-ink) !important; text-decoration: none; }
.gh-feature-art { position: relative; min-height: 260px; background: var(--wd-navy-700); }
.gh-feature-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.gh-feature-body { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-6); }
.gh-feature-body h2 { margin: 0; font-family: var(--font-display); font-size: clamp(2rem, 5vw, 2.75rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; }
.gh-feature-body p { margin: 0; color: var(--wg-muted); font-size: var(--type-lg); }
.gh-badge { align-self: flex-start; padding: 2px var(--space-3); border-radius: 999px; background: var(--wd-gold-500); color: var(--wd-navy-950); font-size: var(--type-xs); font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.gh-feature:hover .gh-feature-art svg, .gh-tile:hover .gh-art svg { transform: translateY(-3px); }
.gh-feature-art svg, .gh-art svg { transition: transform 220ms ease; }

.gh-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space-4); }
.gh-tile { position: relative; grid-column: span 2; display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--wg-line); border-radius: 20px; color: var(--wg-ink) !important; text-decoration: none; }
.gh-tile:nth-child(n+4) { grid-column: span 3; flex-direction: row; }
.gh-tile:nth-child(n+4) .gh-art { width: 40%; height: auto; min-height: 168px; }
.gh-art { display: grid; place-items: center; height: 150px; flex: none; }
.gh-art svg { width: 88px; height: 88px; }
.gh-tile[data-game-card="sold"] .gh-art { background: var(--wd-gold-500); }
.gh-tile[data-game-card="town-shapes"] .gh-art { background: var(--wd-teal-600); }
.gh-tile[data-game-card="blocks"] .gh-art { background: var(--wd-navy-950); }
.gh-tile[data-game-card="lineup"] .gh-art { background: var(--wd-green-600); }
.gh-tile[data-game-card="fair-or-unfair"] .gh-art { background: var(--wd-red-600); }
.gh-body { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-4) var(--space-5) var(--space-5); flex: 1; min-width: 0; }
.gh-body h2 { margin: 0; font-family: var(--font-display); font-size: 1.625rem; font-weight: 800; letter-spacing: -0.02em; }
.gh-body p { margin: 0; color: var(--wg-muted); }
.gh-foot { margin-top: auto; padding-top: var(--space-4); display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.gh-status { font-size: var(--type-sm); font-weight: 700; color: var(--wg-muted); }
.gh-play { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-5); border-radius: 999px; background: var(--wg-ink); color: #fff; font-weight: 800; font-size: var(--type-sm); }
.is-done .gh-play { background: transparent; color: var(--wg-ink); box-shadow: inset 0 0 0 2px var(--wg-ink); }
.is-done .gh-status { color: var(--wd-green-600); }
.gh-tile.is-done::after, .gh-feature.is-done::after { content: ""; position: absolute; top: var(--space-3); left: var(--space-3); width: 28px; height: 28px; border-radius: 50%; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 6L9 17l-5-5' fill='none' stroke='%231e8a4a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; }
.gh-feature { position: relative; }

.gh-board { margin-top: var(--space-6); padding: var(--space-5); background: var(--surface); border: 1px solid var(--wg-line); border-radius: 20px; }
.gh-board-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-3); }
.gh-board-head h2 { margin: var(--space-1) 0 0; font-family: var(--font-display); font-size: 1.75rem; font-weight: 800; }
.gh-board-join { margin: var(--space-3) 0 0; color: var(--wg-muted); font-size: var(--type-sm); }
.gh-board-join a { font-weight: 800; }
.gh-more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); margin: var(--space-6) 0 0; }
.gh-more .wg-card { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); border-radius: 20px; }
.gh-more .wg-card + .wg-card { margin-top: 0; }
.gh-more .wg-card p { margin: 0 0 var(--space-3); color: var(--wg-muted); }
.gh-small { margin: var(--space-5) auto 0; text-align: center; }

/* ===================== Leaderboard ===================== */
.lb-main { max-width: 760px; }
.lb-me { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-5); padding: var(--space-4) var(--space-5); border-radius: 18px; background: var(--surface); border: 1px solid var(--wg-line); }
.lb-me-text { margin: 0; font-weight: 700; }
.lb-me .gm-board-join { flex-basis: 100%; }
.lb-controls { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); }
.lb-period { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--wg-soft); }
.lb-period button { min-height: 44px; padding: 0 var(--space-5); border: 0; border-radius: 999px; background: transparent; color: var(--wg-ink); font: inherit; font-weight: 800; cursor: pointer; }
.lb-period button[aria-pressed="true"] { background: var(--wg-ink); color: #fff; }
.lb-game { display: grid; gap: var(--space-1); font-size: var(--type-sm); font-weight: 800; }
.lb-game select { min-height: 44px; padding: 0 var(--space-3); border: 2px solid var(--wg-line); border-radius: 12px; background: #fff; color: var(--wg-ink); font: inherit; font-weight: 700; }
.lb-table-wrap { margin-bottom: var(--space-6); }
.lb-range { margin: 0 0 var(--space-2); color: var(--wg-muted); font-size: var(--type-sm); font-weight: 700; }
.lb-table { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lb-table li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; align-items: center; gap: var(--space-3); min-height: 52px; padding: 0 var(--space-4); border-radius: 14px; background: var(--surface); border: 1px solid var(--wg-line); }
.lb-table li.is-me { border: 2px solid var(--wg-ink); background: var(--info-bg); }
.lb-table li.lb-gap { display: block; min-height: 0; padding: 0; border: 0; background: none; text-align: center; color: var(--wg-muted); font-weight: 800; }
.lb-rank { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--wg-soft); font-weight: 800; font-size: var(--type-sm); font-variant-numeric: tabular-nums; }
.is-top-1 .lb-rank { background: var(--wd-gold-500); color: var(--wd-navy-950); }
.is-top-2 .lb-rank { background: var(--wd-navy-700); color: #fff; }
.is-top-3 .lb-rank { background: var(--wd-teal-600); color: #fff; }
.lb-name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-plays { color: var(--wg-muted); font-size: var(--type-sm); font-weight: 600; white-space: nowrap; }
.lb-points { font-size: var(--type-lg); font-variant-numeric: tabular-nums; min-width: 3ch; text-align: right; }
.lb-empty { margin: var(--space-3) 0 0; padding: var(--space-5); border: 2px dashed var(--wg-line); border-radius: 14px; text-align: center; color: var(--wg-muted); font-weight: 700; }
.lb-how ul { margin: 0 0 var(--space-3); padding-left: var(--space-5); }
.lb-how li { margin-bottom: var(--space-2); }

/* ===================== Part 2: the game app ===================== */
.gm { --gm-accent: var(--wd-navy-950); --gm-on-accent: #fff; background: var(--surface); }
.gm[data-game="sold"] { --gm-accent: var(--wd-gold-500); --gm-on-accent: var(--wd-navy-950); }
.gm[data-game="town-shapes"] { --gm-accent: var(--wd-teal-600); --gm-on-accent: #fff; }
.gm[data-game="pin-drop"] { --gm-accent: var(--wd-navy-700); --gm-on-accent: #fff; }
.gm[data-game="lineup"] { --gm-accent: var(--wd-green-600); --gm-on-accent: #fff; }
.gm[data-game="fair-or-unfair"] { --gm-accent: var(--wd-red-600); --gm-on-accent: #fff; }
.gm[data-game="blocks"] { --gm-accent: var(--wd-navy-950); --gm-on-accent: #fff; }

/* App bar */
.gm-bar { position: sticky; top: 0; z-index: 40; background: var(--surface); border-bottom: 1px solid var(--wg-line); }
.gm-bar-in { max-width: 640px; margin: 0 auto; padding: 0 var(--space-2); height: 60px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.gm-title { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.25rem, 5.4vw, 1.75rem); letter-spacing: -0.02em; line-height: 1; white-space: nowrap; }
.gm-bar-end { display: flex; justify-content: flex-end; gap: var(--space-1); }
.gm-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--wg-ink) !important; cursor: pointer; text-decoration: none; }
.gm-icon:hover { background: var(--wg-soft); }
.gm-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.gm-stage { max-width: 520px; margin: 0 auto; padding: var(--space-3) var(--space-4) var(--space-4); }
.gm-meta { margin: 0 0 var(--space-4); text-align: center; font-size: var(--type-xs); font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--wg-muted); }

/* Splash */
.gm-splash { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: var(--space-6) var(--space-4); background: var(--gm-accent); color: var(--gm-on-accent); text-align: center; overflow-y: auto; }
.gm-splash[hidden] { display: none; }
.gm-splash-in { display: flex; flex-direction: column; align-items: center; max-width: 420px; }
.gm-splash svg.gm-mark { width: 88px; height: 88px; margin-bottom: var(--space-4); }
.gm-splash .gm-splash-title { margin: 0 0 var(--space-3); font-family: var(--font-display); font-size: clamp(3rem, 14vw, 4.25rem); font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.gm-splash p { margin: 0 0 var(--space-6); font-size: 1.375rem; line-height: 1.35; font-weight: 500; }
.gm-splash-actions { display: flex; flex-direction: column; gap: var(--space-3); width: min(260px, 80vw); }
.gm-splash .wg-btn { width: 100%; min-height: 52px; font-size: var(--type-lg); }
.gm-splash .wg-btn-quiet { border-color: currentColor; color: inherit !important; }
.gm-splash .wg-btn-quiet:hover { background: rgba(255, 255, 255, 0.16); }
.gm-splash-date { margin: var(--space-6) 0 0 !important; font-size: var(--type-md) !important; font-weight: 800 !important; }
.gm-splash-no { margin: var(--space-1) 0 0 !important; font-size: var(--type-sm) !important; font-weight: 600 !important; opacity: 0.85; }

/* Sold! listing sheet */
.gm-listing { position: relative; margin-bottom: var(--space-4); padding: var(--space-4) var(--space-4) var(--space-4) calc(var(--space-4) + 6px); border: 2px solid var(--wg-ink); border-radius: 16px; }
.gm-listing::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; border-radius: 14px 0 0 14px; background: var(--gm-accent); }
.gm-listing-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-2); }
.gm-no { font-size: var(--type-xs); font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--wg-muted); text-align: right; }
.gm-stamp { display: inline-block; flex: none; padding: 2px var(--space-2); border: 2px solid var(--wg-ink); border-radius: 4px; font-size: var(--type-xs); font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; transform: rotate(-2deg); }
.gm-town { margin: 0; font-family: var(--font-display); font-size: clamp(1.5rem, 6vw, 1.875rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.01em; }
.gm-street { margin: 2px 0 var(--space-3); color: var(--wg-muted); font-weight: 600; }
.gm-specs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding-top: var(--space-3); border-top: 1px solid var(--wg-line); }
.gm-specs div { min-width: 0; padding: 0 var(--space-2); border-left: 1px solid var(--wg-line); }
.gm-specs div:first-child { padding-left: 0; border-left: 0; }
.gm-specs dt { font-size: var(--type-xs); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wg-muted); }
.gm-specs dd { margin: 2px 0 0; font-weight: 800; font-size: var(--type-md); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* Public record clues: four tiles inside the listing sheet */
.gm-record { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: var(--space-3) 0 0; }
.gm-record div { display: flex; flex-direction: column; justify-content: center; min-width: 0; min-height: 54px; padding: 6px 10px; border: 1.5px dashed var(--wg-line); border-radius: 10px; }
.gm-record dt { font-size: var(--type-xs); font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--wg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-record dd { margin: 2px 0 0; font-variant-numeric: tabular-nums; }
.gm-record b { font-size: var(--type-md); font-weight: 800; }
.gm-record b[hidden], .gm-lock[hidden] { display: none; }
.gm-lock { display: inline-flex; align-items: center; gap: 6px; color: #8a96a6; font-weight: 700; font-size: var(--type-xs); }
.gm-lock::before { content: ""; width: 8px; height: 8px; border: 2px solid currentColor; border-radius: 2px; }
.gm-record div.is-open { border-style: solid; border-color: var(--wg-ink); }
.gm-record div.is-new { background: #f6efd9; animation: gm-pulse 900ms ease 1; }

/* Price range meter */
.gm-range { margin-bottom: var(--space-3); }
.gm-range-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-2); margin-bottom: var(--space-2); font-size: var(--type-sm); font-weight: 700; color: var(--wg-muted); }
.gm-range-head b { color: var(--wg-ink); font-variant-numeric: tabular-nums; }
.gm-track { position: relative; height: 12px; border-radius: 6px; background: var(--wg-soft); }
.gm-window { position: absolute; top: 0; bottom: 0; left: 0; right: 0; border-radius: 6px; background: var(--gm-accent); transition: left 420ms ease, right 420ms ease; }
.gm-tick { position: absolute; top: -4px; width: 3px; height: 20px; margin-left: -1.5px; border-radius: 2px; background: var(--wg-ink); }
.gm-scale { display: flex; justify-content: space-between; margin-top: var(--space-1); font-size: var(--type-xs); font-weight: 700; color: var(--wg-muted); font-variant-numeric: tabular-nums; }

/* Clues */
.gm-clues { list-style: none; margin: 0 0 var(--space-4); padding: 0; display: grid; gap: var(--space-2); }
.gm-clue { display: grid; grid-template-columns: 28px 1fr; gap: var(--space-3); align-items: center; min-height: 48px; padding: var(--space-2) var(--space-3); border: 1.5px dashed var(--wg-line); border-radius: 12px; color: var(--wg-muted); font-size: var(--type-sm); }
.gm-clue-n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--wg-soft); color: var(--wg-muted); font-weight: 800; font-size: var(--type-xs); }
.gm-clue.is-open { border-style: solid; border-color: var(--wg-ink); color: var(--wg-ink); }
.gm-clue.is-open .gm-clue-n { background: var(--wg-ink); color: #fff; }
.gm-clue b { font-variant-numeric: tabular-nums; }
.gm-clue.is-new { animation: gm-pulse 900ms ease 1; }

/* Guess rows */
.gm-rows { list-style: none; margin: 0 0 var(--space-4); padding: 0; display: grid; gap: 6px; }
.gm-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: var(--space-2); min-height: 56px; padding: 0 var(--space-3); border: 2px dashed var(--wg-line); border-radius: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.gm-row-n { font-size: var(--type-xs); color: var(--wg-muted); }
.gm-row-v { font-size: 1.375rem; letter-spacing: 0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-row-r { display: inline-flex; align-items: center; gap: 4px; font-size: var(--type-md); }
.gm-row-r svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; transition: transform 300ms ease; }
.gm-row.is-active, .gm-row.is-next { border-style: solid; border-color: var(--wg-ink); }
.gm-row.is-active .gm-row-v::after { content: ""; display: inline-block; width: 2px; height: 1.1em; margin-left: 2px; vertical-align: -0.15em; background: var(--wg-ink); animation: gm-caret 1s steps(1) infinite; }
.gm-row.is-active .gm-row-v.is-placeholder { color: #9aa5b4; }
.gm-row.is-miss, .gm-row.is-close, .gm-row.is-win { border-style: solid; color: #fff; }
.gm-row.is-miss { background: var(--wg-miss); border-color: var(--wg-miss); }
.gm-row.is-close { background: var(--wg-close); border-color: var(--wg-close); color: var(--wd-navy-950); }
.gm-row.is-win { background: var(--wg-win); border-color: var(--wg-win); }
.gm-row.is-miss .gm-row-n, .gm-row.is-win .gm-row-n { color: rgba(255, 255, 255, 0.8); }
.gm-row.is-close .gm-row-n { color: rgba(14, 34, 72, 0.75); }
.gm-row.is-reveal { animation: gm-flip 520ms ease both; }
.gm-row.is-shake { animation: gm-shake 380ms ease 1; }
.gm-row.is-bounce { animation: gm-bounce 520ms ease both; }

/* Town Shapes rows: name, miles, arrow, closeness */
.gm-rows.is-towns .gm-row { grid-template-columns: 32px minmax(0, 1fr) auto auto; }
.gm-rows.is-towns .gm-row-v { font-size: var(--type-md); white-space: normal; line-height: 1.2; overflow: visible; }
.gm-row-v small { display: block; font-size: var(--type-xs); font-weight: 700; opacity: 0.8; }
.gm-row-pct { min-width: 3.25rem; text-align: right; font-size: var(--type-sm); }

/* Keypad (Sold!) and entry dock (Town Shapes) */
.gm-dock { position: sticky; bottom: 0; z-index: 30; background: var(--surface); padding: var(--space-2) 0 calc(var(--space-3) + env(safe-area-inset-bottom)); border-top: 1px solid var(--wg-line); }
.gm-dock[hidden] { display: none; }
.gm-keys { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; max-width: 520px; margin: 0 auto; padding: 0 var(--space-4); }
.gm-key { min-height: 50px; padding: 0; border: 0; border-radius: 10px; background: #e3e8ef; color: var(--wg-ink); font: inherit; font-size: 1.375rem; font-weight: 800; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; }
.gm-key:active { transform: scale(0.96); background: #d3dbe6; }
.gm-key svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.gm-key-enter { grid-column: 1 / -1; background: var(--wg-ink); color: #fff; font-size: var(--type-lg); letter-spacing: 0.02em; }
.gm-key-enter:active { background: #1b3263; }
.gm-key-small { font-size: var(--type-md); }

/* Town Shapes map + clue chips + entry */
.gm-map { position: relative; margin: 0 auto var(--space-4); aspect-ratio: 1 / 1; max-width: min(340px, 68vw); border: 2px solid var(--wg-ink); border-radius: 18px; overflow: hidden; background: #fff; }
.gm-map svg { display: block; width: 100%; height: 100%; }
.gm-map .gm-grid line { stroke: var(--wg-soft); stroke-width: 0.4; }
.gm-map .gm-outline { fill: var(--wg-ink); fill-rule: evenodd; transition: fill 500ms ease; }
.gm-map.is-done .gm-outline { fill: var(--gm-accent); }
.gm-compass { position: absolute; top: var(--space-3); right: var(--space-3); display: grid; place-items: center; width: 34px; height: 34px; border: 1.5px solid var(--wg-ink); border-radius: 50%; background: #fff; font-size: var(--type-xs); font-weight: 800; }
.gm-map-label { position: absolute; left: var(--space-2); bottom: var(--space-2); right: var(--space-2); margin: 0; padding: 6px var(--space-3); font-size: var(--type-sm); border-radius: 10px; background: var(--wg-ink); color: #fff; font-weight: 800; text-align: center; }
.gm-map-label[hidden] { display: none; }

.gm-chips { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 0 0 var(--space-4); padding: 0; list-style: none; }
.gm-chip { display: flex; flex-direction: column; justify-content: center; min-width: 0; min-height: 58px; padding: var(--space-2) 6px; border: 1.5px dashed var(--wg-line); border-radius: 12px; text-align: center; }
.gm-chip span { font-size: var(--type-xs); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--wg-muted); }
.gm-chip b { margin-top: 2px; font-size: var(--type-sm); line-height: 1.2; overflow-wrap: anywhere; color: #9aa5b4; }
.gm-chip.is-open { border-style: solid; border-color: var(--wg-ink); }
.gm-chip.is-open b { color: var(--wg-ink); }
.gm-chip.is-new { animation: gm-pulse 900ms ease 1; }

.gm-entry { display: flex; gap: var(--space-2); max-width: 520px; margin: 0 auto; padding: 0 var(--space-4); }
.gm-entry[hidden] { display: none; }
.gm-field { position: relative; flex: 1; min-width: 0; }
.gm-field input { width: 100%; min-height: 52px; padding: 0 var(--space-4); border: 2px solid var(--wg-ink); border-radius: 12px; background: #fff; color: var(--wg-ink); font: inherit; font-size: var(--type-lg); font-weight: 700; }
.gm-field input::placeholder { color: #9aa5b4; font-weight: 600; }
.gm-field input:focus { outline: 2px solid var(--wd-navy-700); outline-offset: 2px; }
.gm-entry .wg-btn { border-radius: 12px; min-height: 52px; }
.gm-suggest { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 35; margin: 0; padding: 4px; list-style: none; background: #fff; border: 2px solid var(--wg-ink); border-radius: 12px; max-height: 280px; overflow-y: auto; }
.gm-suggest[hidden] { display: none; }
.gm-suggest li { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-height: 44px; padding: 0 var(--space-3); border-radius: 8px; font-weight: 700; cursor: pointer; }
.gm-suggest li span { color: var(--wg-muted); font-size: var(--type-sm); font-weight: 600; }
.gm-suggest li[aria-selected="true"], .gm-suggest li:hover { background: var(--wg-soft); }

/* Finished banner under the board */
.gm-done { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-4); padding: var(--space-3) var(--space-4); border-radius: 14px; background: var(--wg-ink); color: #fff; }
.gm-done[hidden] { display: none; }
.gm-done p { margin: 0; font-weight: 700; }
.gm-done p b { display: block; font-family: var(--font-display); font-size: var(--type-xl); font-weight: 800; }
.gm-done button { flex: none; min-height: 44px; padding: 0 var(--space-4); border: 2px solid #fff; border-radius: 999px; background: transparent; color: #fff; font: inherit; font-weight: 800; cursor: pointer; }

/* Sheets (help, results) */
.gm-sheet { width: min(94vw, 460px); max-height: 92vh; margin: auto; padding: 0; border: 0; border-radius: 22px; color: var(--wg-ink); background: #fff; overflow: auto; }
.gm-sheet::backdrop { background: rgba(14, 34, 72, 0.55); }
.gm-sheet-in { position: relative; padding: var(--space-6) var(--space-5) var(--space-5); }
.gm-sheet .gm-close { position: absolute; top: var(--space-2); right: var(--space-2); }
.gm-sheet h2 { margin: 0 0 var(--space-2); font-family: var(--font-display); font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; }
.gm-sheet h3 { margin: var(--space-5) 0 var(--space-2); font-size: var(--type-xs); font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--wg-muted); }
.gm-sheet p { margin: 0 0 var(--space-3); }
.gm-sheet ul { margin: 0 0 var(--space-3); padding-left: var(--space-5); }
.gm-sheet li { margin-bottom: var(--space-1); }
.gm-sheet .gm-row { min-height: 48px; }
.gm-sheet .gm-row-v { font-size: var(--type-lg); }
.gm-example { display: grid; gap: 6px; margin: 0 0 var(--space-2); padding: 0; list-style: none; }
.gm-answer { margin: 0 0 var(--space-1) !important; font-family: var(--font-display); font-size: clamp(1.75rem, 8vw, 2.25rem); font-weight: 800; line-height: 1.1; }
.gm-answer-sub { color: var(--wg-muted); font-weight: 700; }
.gm-recap { display: flex; gap: 6px; margin: var(--space-3) 0 0; padding: 0; list-style: none; }
.gm-recap li { width: 34px; height: 34px; border-radius: 8px; border: 2px dashed var(--wg-line); }
.gm-recap li.is-miss { background: var(--wg-miss); border: 0; }
.gm-recap li.is-close { background: var(--wg-close); border: 0; }
.gm-recap li.is-win { background: var(--wg-win); border: 0; }
.gm-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2); margin: 0; text-align: center; }
.gm-stats div { display: flex; flex-direction: column-reverse; }
.gm-stats dd { margin: 0; font-size: 2rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.gm-stats dt { font-size: var(--type-xs); color: var(--wg-muted); font-weight: 700; }
.gm-dist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.gm-dist li { display: grid; grid-template-columns: 1rem 1fr; align-items: center; gap: var(--space-2); font-size: var(--type-sm); font-weight: 800; }
.gm-dist span { display: block; min-width: 1.75rem; padding: 2px var(--space-2); background: var(--wg-miss); color: #fff; border-radius: 4px; text-align: right; font-variant-numeric: tabular-nums; }
.gm-dist li.is-today span { background: var(--wg-win); }
.gm-sheet-actions { display: grid; gap: var(--space-2); margin-top: var(--space-5); }
.gm-sheet-actions .wg-btn { width: 100%; }
.gm-next { margin: var(--space-4) 0 0 !important; text-align: center; font-size: var(--type-sm); font-weight: 700; color: var(--wg-muted); }
.gm-next b { display: block; color: var(--wg-ink); font-size: 1.75rem; font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.gm-learn { margin-top: var(--space-5); padding-top: var(--space-4); border-top: 1px solid var(--wg-line); }
.gm-learn a { font-weight: 700; }

/* Archive + notes under the game */
.gm-extra { max-width: 520px; margin: 0 auto; padding: var(--space-5) var(--space-4) var(--space-7); border-top: 1px solid var(--wg-line); }
.gm-archive { display: flex; flex-wrap: wrap; align-items: end; gap: var(--space-2); margin-bottom: var(--space-3); }
.gm-archive label { display: grid; gap: var(--space-1); font-size: var(--type-sm); font-weight: 800; }
.gm-archive input { min-height: 44px; padding: 0 var(--space-3); border: 2px solid var(--wg-line); border-radius: 10px; font: inherit; }
.gm-archive .wg-btn { min-height: 44px; }

/* Toast */
.gm-toast { position: fixed; left: 50%; top: 76px; z-index: 95; transform: translateX(-50%); padding: var(--space-3) var(--space-4); border-radius: 10px; background: var(--wg-ink); color: #fff; font-weight: 800; font-size: var(--type-sm); white-space: nowrap; animation: gm-drop 200ms ease both; }
.gm-toast[hidden] { display: none; }

/* Leaderboard panel in the results sheet */
.gm-board { margin-top: var(--space-4); padding: var(--space-4); border-radius: 16px; background: var(--wg-soft); }
.gm-board[hidden] { display: none; }
.gm-board h3 { margin: 0 0 var(--space-2); }
.gm-board p { margin: 0 0 var(--space-3); }
.gm-board-line b { font-variant-numeric: tabular-nums; }
.gm-board-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.gm-board-actions .wg-btn { flex: 1 1 160px; }
.gm-board-join { display: flex; gap: var(--space-2); margin-bottom: var(--space-2); }
.gm-board-join input { flex: 1; min-width: 0; min-height: 48px; padding: 0 var(--space-3); border: 2px solid var(--wg-ink); border-radius: 12px; background: #fff; color: var(--wg-ink); font: inherit; font-weight: 700; }
.gm-board-msg { min-height: 1.4em; margin: 0 !important; color: var(--wd-red-600); font-size: var(--type-sm); font-weight: 700; }

/* ===================== Pin Drop ===================== */
.gm-app { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
.pd-stage { flex: 1; display: flex; flex-direction: column; width: 100%; max-width: 1080px; margin: 0 auto; padding: var(--space-3) var(--space-4) 0; }
.pd-case { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: var(--space-2) var(--space-4); margin-bottom: var(--space-3); }
.pd-case-top { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.pd-price { margin: 0; font-family: var(--font-display); font-size: clamp(1.75rem, 7vw, 2.5rem); font-weight: 800; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pd-price small { display: block; margin-top: 4px; font-family: var(--font-ui); font-size: var(--type-sm); font-weight: 700; letter-spacing: 0; color: var(--wg-muted); }
.pd-facts { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pd-facts li { display: flex; flex-direction: column; min-width: 0; padding: 6px 10px; border: 1.5px solid var(--wg-line); border-radius: 10px; }
.pd-facts span { font-size: var(--type-xs); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--wg-muted); }
.pd-facts b { font-size: var(--type-sm); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pd-map-wrap { position: relative; flex: 1; min-height: 340px; margin: 0 calc(-1 * var(--space-4)); border-top: 2px solid var(--wg-ink); border-bottom: 2px solid var(--wg-ink); }
.pd-map { position: absolute; inset: 0; background: #e9eef4; }
.pd-map:focus-visible { outline: 3px solid var(--wd-gold-500); outline-offset: -3px; }
.pd-layers { position: absolute; top: var(--space-3); right: var(--space-3); z-index: 500; display: inline-flex; padding: 3px; border-radius: 12px; background: #fff; box-shadow: 0 1px 4px rgba(14, 34, 72, 0.25); }
.pd-layers button { min-height: 40px; min-width: 44px; padding: 0 var(--space-3); border: 0; border-radius: 9px; background: transparent; color: var(--wg-ink); font: inherit; font-size: var(--type-sm); font-weight: 800; cursor: pointer; }
.pd-layers button.is-on { background: var(--wg-ink); color: #fff; }
.pd-hint { position: absolute; left: 50%; bottom: var(--space-3); z-index: 500; transform: translateX(-50%); max-width: calc(100% - 24px); margin: 0; padding: 8px var(--space-3); border-radius: 999px; background: rgba(14, 34, 72, 0.88); color: #fff; font-size: var(--type-sm); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.pd-hint[hidden] { display: none; }
.pd-result { position: absolute; left: var(--space-3); right: var(--space-3); bottom: var(--space-3); z-index: 600; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: 14px; background: var(--wg-ink); color: #fff; }
.pd-result[hidden] { display: none; }
.pd-result p { margin: 0; }
.pd-result b { display: block; font-family: var(--font-display); font-size: var(--type-xl); line-height: 1.1; }
.pd-result span { font-size: var(--type-sm); font-weight: 700; opacity: 0.85; }
.pd-result button { flex: none; min-height: 44px; padding: 0 var(--space-4); border: 2px solid #fff; border-radius: 999px; background: transparent; color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.pd-dock { position: sticky; bottom: 0; }
.pd-dock-in { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-2); max-width: 1080px; margin: 0 auto; padding: 0 var(--space-4); }
.pd-clues-btn { display: flex; flex-direction: column; justify-content: center; min-height: 52px; padding: 0 var(--space-4); border: 2px solid var(--wg-ink); border-radius: 12px; background: #fff; color: var(--wg-ink); font: inherit; cursor: pointer; text-align: left; }
.pd-clues-btn span { font-size: var(--type-xs); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wg-muted); }
.pd-clues-btn b { font-size: var(--type-md); }
.pd-guess { min-height: 52px; border-radius: 12px; background: var(--wd-navy-700); border-color: var(--wd-navy-700); }
.pd-guess:hover { background: var(--wd-navy-950); border-color: var(--wd-navy-950); }
.pd-max { max-width: 1080px; margin: 6px auto 0; padding: 0 var(--space-4); text-align: center; color: var(--wg-muted); font-size: var(--type-xs); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.pd-clue-list { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: grid; gap: 6px; }
.pd-clue-list li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: var(--space-2) var(--space-3); align-items: center; padding: var(--space-2) var(--space-3); border: 1.5px dashed var(--wg-line); border-radius: 12px; }
.pd-clue-list li.is-open { border-style: solid; border-color: var(--wg-ink); }
.pd-clue-list li.is-new { animation: gm-pulse 900ms ease 1; background: var(--info-bg); }
.pd-clue-list li div { display: flex; flex-direction: column; min-width: 0; }
.pd-clue-list li div > span { font-size: var(--type-xs); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--wg-muted); }
.pd-clue-list li b { font-weight: 800; }
.pd-clue-list li:not(.is-open) b { color: #8a96a6; }
.pd-clue-n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--wg-soft); font-size: var(--type-xs); font-weight: 800; }
.pd-clue-list li.is-open .pd-clue-n { background: var(--wg-ink); color: #fff; }
.pd-buy { grid-column: 2; justify-self: start; min-height: 44px; padding: 0 var(--space-4); border: 2px solid var(--wd-navy-700); border-radius: 999px; background: #fff; color: var(--wd-navy-700); font: inherit; font-size: var(--type-sm); font-weight: 800; cursor: pointer; }
.pd-buy.is-armed { background: var(--wd-navy-700); color: #fff; }
.pd-buy:disabled { border-color: var(--wg-line); color: #8a96a6; cursor: not-allowed; }
.pd-shape { display: block; width: 96px; height: 96px; margin-top: 4px; }
.pd-shape path { fill: var(--wg-ink); fill-rule: evenodd; }
.pd-pin svg { width: 32px; height: 44px; filter: drop-shadow(0 2px 2px rgba(14, 34, 72, 0.35)); }
.pd-pin path { fill: var(--wd-navy-700); stroke: #fff; stroke-width: 2; }
.pd-pin circle { fill: #fff; }
.pd-pin.is-answer path { fill: var(--wd-green-600); }
.pd-pin.is-drop { animation: pd-drop 320ms ease-out both; }
@keyframes pd-drop { from { transform: translateY(-18px); opacity: 0; } to { opacity: 1; } }
.gm-app .leaflet-container { font-family: var(--font-ui); }
.gm-app .leaflet-touch .leaflet-bar a { width: 44px; height: 44px; line-height: 44px; font-size: 1.375rem; }
.gm-app .leaflet-bar a { width: 40px; height: 40px; line-height: 40px; color: var(--wg-ink); }
.gm-app .leaflet-control-attribution { max-width: calc(100vw - 24px); padding: 2px 8px; font-size: var(--type-xs); line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: rgba(255, 255, 255, 0.88) !important; cursor: pointer; }
.gm-app .leaflet-control-attribution.is-open { white-space: normal; }
.pd-hint { bottom: 34px; }
.pd-result { bottom: 34px; }
.gm-app .leaflet-control-attribution a { color: var(--wd-navy-700); }

/* ===================== Lineup ===================== */
.lu-prompt { margin-bottom: var(--space-3); text-align: center; }
.lu-prompt .gm-no { text-align: center; }
.lu-ask { margin: var(--space-2) 0 0; color: var(--wg-muted); font-weight: 700; }
.lu-metric { margin: 2px 0 0 !important; font-family: var(--font-display); font-size: clamp(1.625rem, 7vw, 2.125rem) !important; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
.lu-unit { margin: 4px 0 0; color: var(--wg-muted); font-size: var(--type-sm); font-weight: 600; }
.lu-board { margin-bottom: var(--space-3); }
.lu-end { display: flex; align-items: center; gap: var(--space-2); margin: 0; color: var(--wg-muted); font-size: var(--type-xs); font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.lu-end::before, .lu-end::after { content: ""; flex: 1; height: 1px; background: var(--wg-line); }
.lu-list { list-style: none; margin: var(--space-2) 0; padding: 0; display: grid; gap: 8px; }
.lu-list.is-shake { animation: gm-shake 380ms ease 1; }
.lu-item { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto 28px; align-items: center; gap: var(--space-2); min-height: 60px; padding: 0 var(--space-2) 0 var(--space-3); border: 2px solid var(--wg-ink); border-radius: 14px; background: #fff; font-weight: 800; user-select: none; touch-action: manipulation; transition: background 200ms ease, border-color 200ms ease; }
.lu-item.is-dragging { z-index: 5; box-shadow: 0 8px 20px rgba(14, 34, 72, 0.22); cursor: grabbing; transition: none; }
.lu-rank { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--wg-soft); font-size: var(--type-sm); font-variant-numeric: tabular-nums; }
.lu-name { min-width: 0; line-height: 1.2; overflow-wrap: anywhere; }
.lu-value { font-variant-numeric: tabular-nums; white-space: nowrap; }
.lu-move { display: flex; gap: 2px; }
.lu-move button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 10px; background: var(--wg-soft); color: var(--wg-ink); cursor: pointer; }
.lu-move button:disabled { opacity: 0.3; cursor: default; }
.lu-move svg, .lu-grip svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.lu-grip { display: grid; place-items: center; height: 44px; color: #8a96a6; cursor: grab; touch-action: none; }
.lu-grip svg { stroke-width: 4; }
.lu-grip[hidden] { visibility: hidden; display: grid; }
.lu-item.is-right { background: var(--wg-win); border-color: var(--wg-win); color: #fff; }
.lu-item.is-near { background: var(--wg-close); border-color: var(--wg-close); color: var(--wd-navy-950); }
.lu-item.is-far, .lu-item.is-wrong { background: var(--wg-miss); border-color: var(--wg-miss); color: #fff; }
.lu-item.is-right .lu-rank, .lu-item.is-far .lu-rank, .lu-item.is-wrong .lu-rank { background: rgba(255, 255, 255, 0.22); }
.lu-item.is-near .lu-rank { background: rgba(14, 34, 72, 0.12); }
.lu-item.is-right .lu-move button, .lu-item.is-far .lu-move button, .lu-item.is-wrong .lu-move button { background: rgba(255, 255, 255, 0.18); color: #fff; }
.lu-item.is-near .lu-move button { background: rgba(14, 34, 72, 0.1); }
.lu-item.is-locked .lu-move { visibility: hidden; }
.lu-list.is-done .lu-move, .lu-list.is-done .lu-grip { display: none; }
.lu-list.is-done .lu-item { grid-template-columns: 28px minmax(0, 1fr) auto; padding-right: var(--space-4); }
.lu-item.is-reveal { animation: gm-flip 520ms ease both; }
.lu-tries { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-4); color: var(--wg-muted); font-size: var(--type-sm); font-weight: 800; }
.lu-tries ol { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.lu-tries li { display: flex; gap: 2px; padding: 4px; border: 1.5px dashed var(--wg-line); border-radius: 8px; min-width: 52px; min-height: 18px; }
.lu-tries li.is-used { border-style: solid; border-color: var(--wg-ink); }
.lu-tries li span { width: 8px; height: 8px; border-radius: 2px; }
.lu-check { width: 100%; min-height: 52px; border-radius: 12px; }
.lu-tries span.is-right { background: var(--wg-win); }
.lu-tries span.is-near { background: var(--wg-close); }
.lu-tries span.is-far { background: var(--wg-miss); }
.lu-final { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: grid; gap: 4px; counter-reset: lu; }
.lu-final li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: var(--space-2); align-items: center; padding: var(--space-2) var(--space-3); border-radius: 10px; background: var(--wg-soft); font-weight: 700; counter-increment: lu; }
.lu-final li::before { content: counter(lu); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--wg-ink); color: #fff; font-size: var(--type-xs); font-weight: 800; }
.lu-final b { font-variant-numeric: tabular-nums; }

/* ===================== Fair or Unfair ===================== */
.fu-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); }
.fu-progress { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.fu-dot { display: block; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer; position: relative; }
.fu-dot::after { content: ""; position: absolute; inset: 13px; border-radius: 50%; border: 2px solid var(--wg-line); background: #fff; }
.fu-dot:disabled { cursor: default; }
.fu-progress .is-current .fu-dot::after { border-color: var(--wg-ink); border-width: 3px; }
.fu-progress .is-right .fu-dot::after { background: var(--wg-win); border-color: var(--wg-win); }
.fu-progress .is-wrong .fu-dot::after { background: var(--wg-miss); border-color: var(--wg-miss); }
.fu-progress .is-current.is-right .fu-dot::after, .fu-progress .is-current.is-wrong .fu-dot::after { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--wg-ink); }
.fu-card.is-in { animation: gm-drop-card 320ms ease both; }
@keyframes gm-drop-card { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.fu-card.is-right { border-color: var(--wg-win); }
.fu-card.is-wrong { border-color: var(--wg-miss); }
.fu-money { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); margin: 0 0 var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--wg-line); }
.fu-money dt { font-size: var(--type-xs); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wg-muted); }
.fu-money dd { margin: 2px 0 0; font-family: var(--font-display); font-size: clamp(1.5rem, 6.5vw, 1.875rem); font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.fu-range { margin-bottom: var(--space-2); }
.fu-scale { position: relative; height: 16px; border-radius: 8px; background: var(--wg-soft); }
.fu-band { position: absolute; top: 0; bottom: 0; border-radius: 8px; background: rgba(30, 138, 74, 0.28); border: 2px solid var(--wg-win); }
.fu-avg { position: absolute; top: -3px; width: 2px; height: 22px; margin-left: -1px; background: var(--wg-win); }
.fu-mark { position: absolute; top: -7px; width: 30px; height: 30px; margin-left: -15px; border-radius: 50%; border: 3px solid #fff; background: var(--wg-ink); box-shadow: 0 1px 4px rgba(14, 34, 72, 0.35); transition: left 500ms ease; }
.fu-mark[hidden] { display: none; }
.fu-mark.is-over { background: var(--wd-red-600); }
.fu-mark.is-under { background: var(--wd-navy-700); }
.fu-mark.is-fair { background: var(--wg-win); }
.fu-scale-labels { display: flex; justify-content: space-between; margin-top: 6px; color: var(--wg-muted); font-size: var(--type-xs); font-weight: 700; font-variant-numeric: tabular-nums; }
.fu-rule { margin: var(--space-3) 0 0; font-size: var(--type-sm); color: var(--wg-muted); }
.fu-rule b { color: var(--wg-ink); font-variant-numeric: tabular-nums; }
.fu-verdict { margin-top: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: 12px; background: var(--wg-soft); }
.fu-verdict[hidden] { display: none; }
.fu-verdict p { margin: 0; font-size: var(--type-sm); }
.fu-verdict .fu-verdict-head { margin-bottom: 2px; font-size: var(--type-md); font-weight: 800; }
.fu-card.is-right .fu-verdict { background: #e3f3e9; }
.fu-card.is-wrong .fu-verdict { background: #eceff3; }
.fu-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 520px; margin: 0 auto; padding: 0 var(--space-4); }
.fu-choices[hidden] { display: none; }
.fu-choice { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 64px; padding: var(--space-2); border: 2px solid var(--wg-ink); border-radius: 14px; background: #fff; color: var(--wg-ink); font: inherit; cursor: pointer; touch-action: manipulation; }
.fu-choice b { font-size: var(--type-lg); font-weight: 800; }
.fu-choice span { font-size: var(--type-xs); font-weight: 700; color: var(--wg-muted); }
.fu-choice:active { transform: scale(0.97); }
.fu-choice[data-call="over"]:hover { background: #fbeceb; }
.fu-choice[data-call="fair"]:hover { background: #e3f3e9; }
.fu-choice[data-call="under"]:hover { background: var(--info-bg); }
.fu-next { width: 100%; min-height: 52px; border-radius: 12px; }

/* ===================== Blocks ===================== */
.bk-ask { margin: 0 0 var(--space-3); text-align: center; font-weight: 700; }
.bk-tier-1 { --bk: var(--wd-gold-500); --bk-ink: var(--wd-navy-950); }
.bk-tier-2 { --bk: var(--wd-teal-600); --bk-ink: #fff; }
.bk-tier-3 { --bk: var(--wd-navy-700); --bk-ink: #fff; }
.bk-tier-4 { --bk: var(--wd-navy-950); --bk-ink: #fff; }
.bk-solved { display: grid; gap: 8px; margin-bottom: 8px; }
.bk-solved:empty { display: none; }
.bk-group { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 72px; padding: var(--space-2) var(--space-3); border-radius: 12px; background: var(--bk); color: var(--bk-ink); text-align: center; }
.bk-group b { font-size: var(--type-md); font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.bk-group span { font-size: var(--type-sm); font-weight: 600; }
.bk-group.is-in { animation: gm-pulse 520ms ease 1; }
.bk-group.is-missed { opacity: 0.82; outline: 2px dashed var(--bk); outline-offset: 2px; }
.bk-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.bk-grid[hidden] { display: none; }
.bk-tile { display: grid; place-items: center; min-width: 0; min-height: 72px; padding: 4px; border: 0; border-radius: 12px; background: #e3e8ef; color: var(--wg-ink); font: inherit; font-size: var(--type-md); font-weight: 800; line-height: 1.15; text-align: center; overflow: hidden; overflow-wrap: normal; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; }
.bk-tile.is-long { font-size: var(--type-sm); }
.bk-tile.is-xlong { font-size: var(--type-xs); }
.bk-tile.is-tight { font-size: var(--type-xs); letter-spacing: -0.01em; }
.bk-tile.is-break { overflow-wrap: anywhere; hyphens: auto; }
.bk-tile[aria-pressed="true"] { background: var(--wd-navy-950); color: #fff; }
.bk-tile:active { transform: scale(0.96); }
.bk-tile:disabled { cursor: default; }
.bk-tile.is-hop { animation: bk-hop 420ms ease both; }
.bk-tile.is-shake { animation: gm-shake 380ms ease 1; }
@keyframes bk-hop { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(-7px); } }
.bk-lives { display: flex; align-items: center; justify-content: center; gap: var(--space-3); margin: var(--space-4) 0; color: var(--wg-muted); font-size: var(--type-sm); font-weight: 700; }
.bk-lives[hidden] { display: none; }
.bk-lives ol { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.bk-lives li { width: 14px; height: 14px; border-radius: 50%; background: var(--wd-navy-950); transition: transform 300ms ease, background 300ms ease; }
.bk-lives li.is-used { background: var(--wg-line); transform: scale(0.7); }
.bk-actions { display: flex; justify-content: center; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-4); }
.bk-actions[hidden] { display: none; }
.bk-actions .wg-btn { min-width: 0; padding: 0 var(--space-4); }
.bk-legend { list-style: none; margin: 0 0 var(--space-3); padding: 0; display: grid; gap: 4px; }
.bk-legend li { padding: 6px var(--space-3); border-radius: 8px; background: var(--bk); color: var(--bk-ink); font-weight: 800; font-size: var(--type-sm); }
.bk-recap { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: grid; gap: 4px; justify-content: start; }
.bk-recap li { display: flex; gap: 4px; }
.bk-recap span { width: 26px; height: 26px; border-radius: 6px; background: var(--bk); }
.bk-learn { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.bk-learn li { display: grid; gap: 2px; padding: var(--space-2) var(--space-3); border-left: 6px solid var(--bk); border-radius: 6px; background: var(--wg-soft); }
.bk-learn b { font-size: var(--type-sm); }
.bk-learn span { font-size: var(--type-sm); color: var(--wg-muted); }
.bk-learn a { font-size: var(--type-sm); font-weight: 800; }
.gm-dist.is-wide li { grid-template-columns: 3.5rem 1fr; }

@keyframes gm-flip { 0% { transform: perspective(600px) rotateX(90deg); } 60% { transform: perspective(600px) rotateX(-8deg); } 100% { transform: perspective(600px) rotateX(0); } }
@keyframes gm-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(4px); } }
@keyframes gm-bounce { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-10px); } 70% { transform: translateY(2px); } }
@keyframes gm-pulse { 0% { transform: scale(1); } 35% { transform: scale(1.03); } 100% { transform: scale(1); } }
@keyframes gm-caret { 50% { opacity: 0; } }
@keyframes gm-drop { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (max-width: 900px) {
  .gh-hero-in { grid-template-columns: 1fr; }
  .gh-today { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-2) var(--space-4); align-items: center; }
  .gh-today h2 { grid-column: 1 / -1; margin: 0; }
  .gh-ring { width: 112px; height: 112px; margin: 0; grid-row: span 2; }
  .gh-today-stats { margin: 0; }
  .gh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gh-tile, .gh-tile:nth-child(n+4) { grid-column: span 1; flex-direction: column; }
  .gh-tile:nth-child(n+4) .gh-art { width: auto; height: 150px; min-height: 0; }
  .gh-tile:last-child { grid-column: 1 / -1; flex-direction: row; }
  .gh-tile:last-child .gh-art { width: 40%; height: auto; min-height: 150px; }
}
@media (max-width: 768px) {
  .wg-main { padding-top: var(--space-5); }
  .gh-more { grid-template-columns: 1fr; }
  .gh-feature { grid-template-columns: 1fr; }
  .gh-feature-art { min-height: 190px; }
  .gh-feature-body { padding: var(--space-5); }
}
@media (max-width: 560px) {
  .gh-hero { padding: var(--space-6) var(--space-4) calc(var(--space-8) + var(--space-3)); }
  .gh-grid { grid-template-columns: 1fr; gap: var(--space-3); }
  .gh-tile, .gh-tile:nth-child(n+4), .gh-tile:last-child { grid-column: auto; flex-direction: row; border-radius: 18px; }
  .gh-art, .gh-tile:nth-child(n+4) .gh-art, .gh-tile:last-child .gh-art { width: 96px; height: auto; min-height: 0; }
  .gh-art svg { width: 60px; height: 60px; }
  .gh-body { padding: var(--space-3) var(--space-4); }
  .gh-body h2 { font-size: 1.375rem; }
  .gh-body p { font-size: var(--type-sm); }
  .gh-foot { padding-top: var(--space-2); }
  .gh-play { min-height: 44px; padding: 0 var(--space-4); }
  .gh-today { grid-template-columns: 1fr; text-align: center; }
  .gh-ring { margin: 0 auto; grid-row: auto; }
  .lb-table li { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .lb-plays { display: none; }
}
@media (max-width: 480px) {
  .wg-bar-in { gap: var(--space-2); padding: 0 var(--space-3); }
  .wg-nav a { padding: 0 var(--space-2); }
  .wg-main { padding-left: var(--space-3); padding-right: var(--space-3); }
  .wg-card { padding: var(--space-4); }
  .gm-stage { padding-left: var(--space-3); padding-right: var(--space-3); }
  .gm-keys, .gm-entry { padding: 0 var(--space-3); }
  .gm-specs div { padding: 0 6px; }
  .gm-specs dd { font-size: var(--type-sm); }
  .gm-listing { padding: var(--space-3) var(--space-3) var(--space-3) calc(var(--space-3) + 6px); }
  .gm-row { min-height: 50px; }
  .gm-chips { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .gm-chip { grid-column: span 2; }
  .gm-chip:nth-child(n+4) { grid-column: span 3; }
  .gm-row-v { font-size: 1.25rem; }
  .gm-stats dd { font-size: 1.5rem; }
  .pd-stage { padding: var(--space-2) var(--space-3) 0; }
  .pd-map-wrap { margin: 0 calc(-1 * var(--space-3)); }
  .pd-case { grid-template-columns: 1fr; }
  .pd-facts li { flex: 1; padding: 4px 8px; }
  .pd-dock-in { padding: 0 var(--space-3); }
  .lu-item { grid-template-columns: 26px minmax(0, 1fr) auto 24px; padding-left: var(--space-2); }
  .lu-item .lu-value:empty { display: none; }
  .lu-move button { width: 40px; height: 44px; }
  .bk-grid, .bk-solved { gap: 6px; }
  .bk-tile { min-height: 64px; font-size: var(--type-sm); border-radius: 10px; }
  .bk-tile.is-long, .bk-tile.is-xlong { font-size: var(--type-xs); }
.bk-tile.is-tight { font-size: var(--type-xs); letter-spacing: -0.01em; }
.bk-tile.is-break { overflow-wrap: anywhere; hyphens: auto; }
  .fu-choices { padding: 0 var(--space-3); gap: 6px; }
  .fu-top { flex-direction: column; gap: 0; }
  .fu-top .gm-no { text-align: center; }
}
@media (max-width: 360px) {
  .gm-bar-in { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .gm-title { font-size: 1.25rem; text-align: center; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-height: 700px) {
  .gm-key { min-height: 46px; }
  .gm-row { min-height: 50px; }
}
@media (prefers-reduced-motion: reduce) {
  .wg *, .wg *::before, .wg *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .wg-bar, .gm-bar, .gm-dock, .gm-splash, .wg-foot { display: none; }
}
