
/* Layout: iOS-style app shell. Translucent nav + tab bars float over one scroll view.
   Home is a two-column dashboard on wide screens (one column on phones); Play is a focused
   full-screen mode without the tab bar; Map is an edge-to-edge canvas under the bars. */
:root {
  --bg: #F2F2F7;
  --surface: #FFFFFF;
  --surface-2: #F7F7FA;
  --fill: rgba(120, 120, 128, 0.12);
  --fill-2: rgba(120, 120, 128, 0.20);
  --label: #000000;
  --label-2: rgba(60, 60, 67, 0.64);
  --label-3: rgba(60, 60, 67, 0.34);
  --sep: rgba(60, 60, 67, 0.16);
  --tint: #1E7F3A;
  --tint-fill: #1E7F3A;
  --tint-soft: rgba(30, 127, 58, 0.12);
  --tint-bar: #34C759;
  --green: #248A3D;
  --green-mark: #34C759;
  --green-soft: rgba(52, 199, 89, 0.16);
  --red: #D70015;
  --red-soft: rgba(255, 59, 48, 0.14);
  --orange: #C93400;
  --orange-mark: #FF9500;
  --orange-soft: rgba(255, 149, 0, 0.16);
  --bar: rgba(249, 249, 251, 0.74);
  --bar-edge: rgba(0, 0, 0, 0.10);
  --scrim: rgba(0, 0, 0, 0.30);
  --sheet: rgba(255, 255, 255, 0.94);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.16), 0 4px 14px rgba(0, 0, 0, 0.06);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.05);
  --pin: #FFFFFF;
  --pin-fg: #000000;
  --thumb: #FFFFFF;
  --logo-a: #6BE291;
  --logo-b: #1E9E4A;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-round: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  --ease-sheet: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 52px;
  --tab-h: 58px;
  --tab-space: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px));
  --radius: 14px;
  --card-r: 20px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --surface: #1C1C1E; --surface-2: #2C2C2E;
    --fill: rgba(118, 118, 128, 0.24); --fill-2: rgba(118, 118, 128, 0.36);
    --label: #FFFFFF; --label-2: rgba(235, 235, 245, 0.64); --label-3: rgba(235, 235, 245, 0.32);
    --sep: rgba(84, 84, 88, 0.55);
    --tint: #30D158; --tint-fill: #248A3D; --tint-soft: rgba(48, 209, 88, 0.20); --tint-bar: #30D158;
    --green: #30D158; --green-mark: #30D158; --green-soft: rgba(48, 209, 88, 0.20);
    --red: #FF6961; --red-soft: rgba(255, 69, 58, 0.20);
    --orange: #FFB340; --orange-mark: #FF9F0A; --orange-soft: rgba(255, 159, 10, 0.20);
    --bar: rgba(22, 22, 24, 0.72); --bar-edge: rgba(255, 255, 255, 0.10);
    --scrim: rgba(0, 0, 0, 0.55); --sheet: rgba(36, 36, 38, 0.95);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55), 0 4px 14px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --pin: #2C2C2E; --pin-fg: #FFFFFF; --thumb: #636366;
    --logo-a: #6BE291; --logo-b: #1E9E4A;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --surface: #1C1C1E; --surface-2: #2C2C2E;
  --fill: rgba(118, 118, 128, 0.24); --fill-2: rgba(118, 118, 128, 0.36);
  --label: #FFFFFF; --label-2: rgba(235, 235, 245, 0.64); --label-3: rgba(235, 235, 245, 0.32);
  --sep: rgba(84, 84, 88, 0.55);
  --tint: #30D158; --tint-fill: #248A3D; --tint-soft: rgba(48, 209, 88, 0.20); --tint-bar: #30D158;
  --green: #30D158; --green-mark: #30D158; --green-soft: rgba(48, 209, 88, 0.20);
  --red: #FF6961; --red-soft: rgba(255, 69, 58, 0.20);
  --orange: #FFB340; --orange-mark: #FF9F0A; --orange-soft: rgba(255, 159, 10, 0.20);
  --bar: rgba(22, 22, 24, 0.72); --bar-edge: rgba(255, 255, 255, 0.10);
  --scrim: rgba(0, 0, 0, 0.55); --sheet: rgba(36, 36, 38, 0.95);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55), 0 4px 14px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --pin: #2C2C2E; --pin-fg: #FFFFFF; --thumb: #636366;
  --logo-a: #6BE291; --logo-b: #1E9E4A;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--label);
  font: 400 17px/1.4 var(--font); letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overflow: hidden;
}
button, input { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--tint); text-decoration: none; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--tint); outline-offset: 2px; border-radius: 8px; }
.num { font-variant-numeric: tabular-nums; }
.icon { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
html.theme-anim body, html.theme-anim body *, html.theme-anim body *::before, html.theme-anim body *::after {
  transition: background-color 320ms ease, color 320ms ease, border-color 320ms ease, fill 320ms ease, stroke 320ms ease !important;
}

/* ---------- App shell ---------- */
#app { position: relative; height: 100%; }
#scroller {
  position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  padding-top: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
  padding-bottom: calc(var(--tab-space) + 28px);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
body.mode-play #scroller { padding-bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
.material { background: var(--bar); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); }
@media (prefers-reduced-transparency: reduce) { .material { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; } }

.topbar {
  position: fixed; z-index: 20; top: 0; left: 0; right: 0;
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  border-bottom: 0.5px solid transparent; transition: border-color 200ms ease;
}
.topbar.edge { border-bottom-color: var(--bar-edge); }
.topbar-inner { height: var(--nav-h); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; max-width: 1200px; margin: 0 auto; }
.topbar-title { text-align: center; line-height: 1.15; min-width: 0; display: flex; align-items: center; gap: 8px; justify-content: center; }
.topbar-title > div { min-width: 0; }
.topbar-title b { display: block; font-weight: 600; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-title small { display: block; font-size: 12px; color: var(--label-2); }
.topbar-title .mini-logo { width: 22px; height: 22px; }
.topbar-left { justify-self: start; }
.topbar-right { justify-self: end; display: flex; align-items: center; gap: 10px; }
.barbtn { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 4px; color: var(--tint); font-size: 17px; border-radius: 10px; transition: opacity 120ms ease; }
.barbtn:active { opacity: 0.4; transition: none; }
.barbtn .icon { width: 20px; height: 20px; stroke-width: 2.4; margin-left: -6px; }

.tabbar {
  position: fixed; z-index: 20; left: 0; right: 0; bottom: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  border-top: 0.5px solid var(--bar-edge); transition: transform 380ms var(--ease-sheet);
}
body.mode-play .tabbar { transform: translateY(110%); }
.tabbar-inner { height: var(--tab-h); display: flex; justify-content: center; gap: 8px; max-width: 560px; margin: 0 auto; }
.tab { flex: 1; max-width: 150px; text-decoration: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10.5px; font-weight: 500; letter-spacing: 0.01em; color: var(--label-2); border-radius: 12px; transition: transform 100ms ease-out; }
.tab .icon { width: 26px; height: 26px; }
.tab[aria-current="page"] { color: var(--tint); }
@media (min-width: 760px) { .tabbar { display: none; } :root { --tab-space: env(safe-area-inset-bottom, 0px); } }
.tab:active { transform: scale(0.94); transition: none; }

/* Theme switch */
.theme-switch { position: relative; width: 58px; height: 32px; border-radius: 16px; flex: none; background: var(--fill-2); transition: background-color 260ms ease; }
.theme-switch[aria-checked="true"] { background: var(--tint-fill); }
.theme-switch .ts-thumb {
  position: absolute; top: 2px; left: 2px; width: 28px; height: 28px; border-radius: 50%;
  background: #FFFFFF; color: #FF9F0A; display: grid; place-items: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(0, 0, 0, 0.16);
  transition: transform 380ms var(--ease-sheet), width 160ms ease, color 260ms ease;
}
.theme-switch[aria-checked="true"] .ts-thumb { transform: translateX(26px); color: #1E9E4A; }
.theme-switch:active .ts-thumb { width: 33px; }
.theme-switch[aria-checked="true"]:active .ts-thumb { transform: translateX(21px); }
.theme-switch .icon { width: 17px; height: 17px; stroke-width: 2; }
.theme-switch .ts-moon { display: none; }
.theme-switch[aria-checked="true"] .ts-moon { display: block; }
.theme-switch[aria-checked="true"] .ts-sun { display: none; }

/* ---------- Shared components ---------- */
.card { background: var(--surface); border-radius: var(--card-r); padding: 18px 18px 16px; min-width: 0; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { margin: 0; font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
.card-head p { margin: 2px 0 0; color: var(--label-2); font-size: 14px; }
.card-head button, .link-btn { color: var(--tint); font-size: 15px; white-space: nowrap; }
.group-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 0 16px 7px; font-size: 13px; color: var(--label-2); text-transform: uppercase; letter-spacing: 0.04em; }
.group-head button { color: var(--tint); font-size: 13px; text-transform: none; letter-spacing: 0; }
.group { margin: 0 0 22px; }
.group-foot { padding: 7px 16px 0; font-size: 13px; color: var(--label-2); line-height: 1.4; }
.list { background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.list.inset { background: var(--surface-2); }
.row { position: relative; display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 10px 16px; width: 100%; text-align: left; }
.row + .row::before { content: ""; position: absolute; top: 0; right: 0; left: 58px; border-top: 0.5px solid var(--sep); }
.list.plain .row + .row::before { left: 16px; }
button.row { transition: background-color 160ms ease; }
button.row:active { background: var(--fill); transition: none; }
.row-label { flex: 1; min-width: 0; }
.row-label small { display: block; color: var(--label-2); font-size: 13px; }
.row-value { color: var(--label-2); text-align: right; font-variant-numeric: tabular-nums; }
.row .chev { width: 16px; height: 16px; color: var(--label-3); stroke-width: 2.2; }
.row-icon-tile { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--tint-soft); color: var(--tint); }
.row-icon-tile .icon { width: 19px; height: 19px; }
.row.dim .row-label { color: var(--label-3); }
.check { width: 20px; height: 20px; color: var(--tint); stroke-width: 2.4; visibility: hidden; }
.row[aria-checked="true"] .check { visibility: visible; }

.segmented { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--fill); border-radius: 10px; padding: 2px; isolation: isolate; }
.segmented-thumb {
  position: absolute; z-index: -1; top: 2px; bottom: 2px; left: 2px;
  width: calc((100% - 4px) / var(--n, 3)); transform: translateX(calc(100% * var(--i, 0)));
  background: var(--thumb); border-radius: 8px; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
  transition: transform 340ms var(--ease-sheet);
}
.segmented button { min-height: 32px; font-size: 14px; font-weight: 500; border-radius: 8px; }
.segmented button[aria-pressed="true"] { font-weight: 600; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px; border-radius: 14px; font-size: 17px; font-weight: 600; transition: transform 120ms var(--ease-out), opacity 120ms ease, background-color 160ms ease; }
.btn:active { transform: scale(0.97); transition: none; }
.btn-primary { background: var(--tint-fill); color: #fff; }
.btn-primary:disabled { background: var(--fill-2); color: var(--label-3); transform: none; cursor: default; }
.btn-tinted { background: var(--tint-soft); color: var(--tint); }
.btn-block { width: 100%; }
.btn-destructive { background: var(--red); color: #fff; }
.btn .icon { width: 20px; height: 20px; stroke-width: 2.2; }

.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--fill); color: var(--label-2); white-space: nowrap; }
.chip.sale { background: var(--tint-soft); color: var(--tint); }
.chip.rent { background: var(--orange-soft); color: var(--orange); }
.chip.retry { background: var(--fill); color: var(--label); }
.chip.ok { background: var(--green-soft); color: var(--green); }
.chip.miss { background: var(--red-soft); color: var(--red); }
.chip.time { background: var(--orange-soft); color: var(--orange); }
.chip .icon { width: 13px; height: 13px; stroke-width: 2.6; }

.empty-state { text-align: center; padding: 22px 12px 10px; color: var(--label-2); font-size: 15px; }
.empty-state .icon { width: 36px; height: 36px; color: var(--label-3); margin-bottom: 6px; }
.empty-state b { display: block; color: var(--label); font-size: 16px; font-weight: 600; margin-bottom: 2px; }

/* ---------- Logo ---------- */
.logo { display: block; flex: none; }
.logo-lg { width: 84px; height: 84px; filter: drop-shadow(0 8px 18px rgba(30, 158, 74, 0.28)); }

.tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.tile { background: var(--surface); border-radius: 16px; padding: 14px 14px 12px; min-width: 0; }
.tile span { display: block; font-size: 13px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile b { display: block; margin-top: 4px; font-family: var(--font-round); font-size: 28px; font-weight: 700; line-height: 1.05; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tile small { display: block; margin-top: 2px; font-size: 12px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 420px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tile b { font-size: 24px; } }

.cols { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.col { display: grid; gap: 16px; min-width: 0; }
@media (min-width: 900px) { .cols { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }

.insight { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.insight-badge { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--tint-soft); color: var(--tint); }
.insight-badge .icon { width: 24px; height: 24px; stroke-width: 2; }
.insight b { display: block; font-size: 17px; font-weight: 600; letter-spacing: -0.015em; }
.insight p { margin: 2px 0 0; color: var(--label-2); font-size: 14px; }

/* Charts: single hue, rounded data ends anchored to the baseline, recessive axes */
.histo { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; align-items: end; height: 150px; padding: 0 2px; border-bottom: 1px solid var(--sep); position: relative; }
.histo-col { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; cursor: default; }
.histo-col::after { content: ""; position: absolute; inset: 0 -3px; }
.histo-bar { width: 100%; max-width: 44px; border-radius: 4px 4px 0 0; background: var(--tint-bar); min-height: 0; transition: height 600ms var(--ease-out); }
.histo-col.zone .histo-bar { background: var(--green-mark); }
.histo-col .histo-n { font-size: 12px; font-weight: 600; color: var(--label); margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.histo-x { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; padding: 6px 2px 0; font-size: 11px; color: var(--label-2); text-align: center; font-variant-numeric: tabular-nums; }
.histo-x span:nth-child(4) { color: var(--green); font-weight: 600; }
.histo-legend { display: flex; justify-content: space-between; font-size: 12px; color: var(--label-2); margin-top: 8px; }

.hbars { display: grid; gap: 12px; }
.hbar { display: grid; grid-template-columns: minmax(0, 8.5em) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 15px; }
.hbar-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-track { height: 10px; border-radius: 5px; background: var(--fill); position: relative; overflow: hidden; }
.hbar-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 4px 4px 0; background: var(--tint-bar); transition: width 600ms var(--ease-out); }
.hbar-val { font-variant-numeric: tabular-nums; text-align: right; min-width: 7.5em; font-size: 14px; }
.hbar-val small { color: var(--label-2); font-size: 12px; }
.hbar.empty .hbar-name, .hbar.empty .hbar-val { color: var(--label-3); }

.trend { display: flex; align-items: flex-end; gap: 5px; height: 64px; border-bottom: 1px solid var(--sep); margin: 4px 0 14px; }
.trend-col { flex: 1; height: 100%; display: flex; align-items: flex-end; max-width: 28px; position: relative; }
.trend-col::after { content: ""; position: absolute; inset: 0 -2px; }
.trend-bar { width: 100%; border-radius: 4px 4px 0 0; background: var(--tint-bar); min-height: 2px; }
.trend-col.last .trend-bar { background: var(--tint-fill); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.split > div { background: var(--surface-2); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.split h3 { margin: 0 0 6px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.split dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; font-size: 14px; }
.split dt { color: var(--label-2); }
.split dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
:root[data-theme="dark"] .split > div { background: var(--surface-2); }

.game-row .row-label b { font-weight: 600; font-size: 16px; }
.score-pill { min-width: 52px; text-align: center; padding: 4px 8px; border-radius: 99px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; background: var(--fill); }

.rules .row { align-items: flex-start; }
.rules .row-label { font-size: 15px; }
.reset-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 16px; }
.reset-confirm p { margin: 0; flex: 1 1 220px; font-size: 14px; color: var(--label-2); }
.reset-confirm .btn { min-height: 36px; padding: 0 14px; font-size: 15px; border-radius: 10px; }

/* Tooltip */
.tip { position: fixed; z-index: 70; pointer-events: none; padding: 6px 10px; border-radius: 10px; font-size: 13px; line-height: 1.35; background: var(--surface); color: var(--label); box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(4px); transition: opacity 120ms ease, transform 120ms ease; max-width: 240px; }
.tip.on { opacity: 1; transform: none; }
.tip b { font-weight: 600; }

/* ---------- History ---------- */
.guess-row { min-height: 72px; }
.thumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; background: var(--fill); display: grid; place-items: center; color: var(--label-3); overflow: hidden; }
.thumb .icon { width: 26px; height: 26px; }
.guess-row .row-label b { display: block; font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guess-row .row-label small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.guess-row .row + .row::before { left: 84px; }
.list .guess-row + .guess-row::before { left: 84px; }
.history-note { font-size: 13px; color: var(--label-2); text-align: center; margin: 4px 16px 0; }

/* ---------- Play ---------- */
.play { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 8px; }
.play > * { min-width: 0; }
@media (min-width: 920px) {
  .play { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 28px; align-items: start; }
  .play-media { position: sticky; top: 8px; }
}
.carousel { position: relative; border-radius: 18px; overflow: hidden; background: var(--fill); aspect-ratio: 4 / 3; max-width: 100%; }
.track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; height: 100%; scroll-snap-align: center; position: relative; }
/* Whole photo, never cropped, on a blurred fill of itself (portals mix 3:2, 2:1 and portrait shots) */
.slide { overflow: hidden; background: var(--fill); }
.slide .bg { position: absolute; inset: -24px; width: calc(100% + 48px); max-width: none; height: calc(100% + 48px); object-fit: cover; filter: blur(22px) saturate(1.2); opacity: 0.85; pointer-events: none; }
.slide .fg { position: relative; width: 100%; height: 100%; object-fit: contain; display: block; cursor: zoom-in; }
.slide.broken { display: none; }
.no-photo { height: 100%; display: grid; place-items: center; color: var(--label-3); }
.no-photo .icon { width: 56px; height: 56px; }
.car-btn { position: absolute; top: 50%; width: 38px; height: 38px; margin-top: -19px; border-radius: 50%; display: grid; place-items: center; color: var(--label); box-shadow: var(--shadow-sm); opacity: 0; transition: opacity 200ms ease, transform 120ms ease; }
.car-btn .icon { width: 18px; height: 18px; stroke-width: 2.2; }
.car-btn.prev { left: 12px; } .car-btn.next { right: 12px; }
.carousel:hover .car-btn, .car-btn:focus-visible { opacity: 1; }
.car-btn:active { transform: scale(0.92); }
@media (hover: none) { .car-btn { display: none; } }
.dots { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; gap: 6px; padding: 6px 9px; border-radius: 99px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--label-3); transition: background-color 200ms ease, transform 200ms ease; }
.dot.on { background: var(--label); transform: scale(1.15); }
.photo-count { position: absolute; right: 12px; top: 12px; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }

.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: var(--label-2); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.home-title { font-family: var(--font-display); font-size: 28px; line-height: 1.12; font-weight: 700; letter-spacing: -0.02em; margin: 8px 0 6px; text-wrap: balance; }
.home-loc { display: flex; gap: 6px; align-items: flex-start; color: var(--label-2); font-size: 15px; margin-bottom: 14px; }
.home-loc .icon { width: 18px; height: 18px; margin-top: 1px; color: var(--label-2); }

/* Location map while guessing */
.loc-card { position: relative; height: 230px; border-radius: 16px; overflow: hidden; background: var(--fill); margin-bottom: 14px; isolation: isolate; }
.loc-card #play-map { position: absolute; inset: 0; background: var(--fill); }
.loc-btn { position: absolute; z-index: 500; top: 10px; right: 10px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--label); box-shadow: var(--shadow-sm); transition: transform 120ms ease; }
.loc-btn:active { transform: scale(0.92); }
.loc-btn .icon { width: 18px; height: 18px; stroke-width: 2.1; }
.loc-btn .i-collapse { display: none; }
.loc-card.expanded .loc-btn .i-collapse { display: block; }
.loc-card.expanded .loc-btn .i-expand { display: none; }
.loc-label { position: absolute; z-index: 500; left: 10px; top: 10px; padding: 5px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; box-shadow: var(--shadow-sm); pointer-events: none; max-width: calc(100% - 70px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loc-card.expanded {
  position: fixed; z-index: 14; margin: 0; border-radius: 0; height: auto;
  top: calc(var(--nav-h) + env(safe-area-inset-top, 0px)); left: 0; right: 0; bottom: 0;
}
@media (min-width: 920px) {
  .loc-card.expanded { top: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 12px); left: max(16px, calc((100vw - 1200px) / 2)); right: auto; bottom: 16px; width: min(calc(58vw - 24px), 690px); border-radius: 18px; box-shadow: var(--shadow-lg); }
}
.here-dot { position: absolute; left: -11px; top: -11px; width: 22px; height: 22px; border-radius: 50%; background: var(--tint-fill); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); }
.here-dot::after { content: ""; position: absolute; inset: -12px; border-radius: 50%; background: var(--tint-fill); opacity: 0.22; animation: halo 2.4s ease-out infinite; }
@keyframes halo { 0% { transform: scale(0.4); opacity: 0.35; } 100% { transform: scale(1.4); opacity: 0; } }
.here { background: none; border: 0; }

.facts .row { min-height: 44px; }
.facts .row-label { font-size: 16px; }
.facts .row-value { color: var(--label); font-weight: 500; }
.epc { display: inline-grid; place-items: center; min-width: 30px; height: 24px; padding: 0 8px; border-radius: 6px; font-weight: 700; font-size: 14px; }

.guess { margin-top: 20px; padding: 16px; border-radius: 18px; background: var(--surface); }
.guess-label { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--label-2); margin-bottom: 8px; }
.guess-field { display: flex; align-items: center; gap: 6px; min-width: 0; background: var(--fill); border-radius: 12px; padding: 0 14px; min-height: 54px; transition: box-shadow 160ms ease; }
.guess-field:focus-within { box-shadow: 0 0 0 2px var(--tint); }
.guess-field .cur { font-size: 24px; font-weight: 600; color: var(--label-2); }
.guess-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-family: var(--font-display); font-size: 26px; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; padding: 8px 0; }
.guess-field input::placeholder { color: var(--label-3); font-weight: 500; }
.guess-field .per { color: var(--label-2); font-size: 15px; white-space: nowrap; }
.guess-row-f { display: flex; gap: 10px; align-items: stretch; }
.guess-row-f .guess-field { flex: 1; }
.guess-row-f .btn { min-height: 54px; padding: 0 26px; flex: none; }
.guess-hint { font-size: 13px; color: var(--label-2); margin-top: 8px; min-height: 18px; font-variant-numeric: tabular-nums; }
@media (max-width: 919px) {
  .guess {
    position: fixed; z-index: 15; left: 0; right: 0; bottom: 0; margin: 0; border-radius: 20px 20px 0 0;
    padding: 14px max(16px, env(safe-area-inset-left, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-right, 0px));
    background: var(--bar); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
    border-top: 0.5px solid var(--bar-edge);
  }
  .guess-inner { max-width: 640px; margin: 0 auto; }
}

.timer { position: relative; width: 40px; height: 40px; color: var(--label); }
.timer svg { width: 40px; height: 40px; transform: rotate(-90deg); }
.timer circle { fill: none; stroke-width: 3.2; }
.timer .track-c { stroke: var(--fill-2); }
.timer .prog { stroke: currentColor; stroke-linecap: round; }
.timer b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-round); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.timer.warn { color: var(--orange-mark); }
.timer.crit { color: var(--red); }
.timer.crit b { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.12); } }

/* ---------- Sheets ---------- */
.scrim { position: fixed; inset: 0; z-index: 40; background: var(--scrim); opacity: 0; pointer-events: none; transition: opacity 320ms ease; }
.scrim.on { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; z-index: 41; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto;
  background: var(--sheet); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  border-radius: 24px 24px 0 0; box-shadow: var(--shadow-lg);
  padding: 8px max(20px, env(safe-area-inset-left, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-right, 0px));
  transform: translateY(105%); visibility: hidden; transition: transform 520ms var(--ease-sheet), visibility 0s linear 520ms;
  max-height: 92vh; overflow-y: auto; overscroll-behavior: contain;
}
.sheet.on { transform: translateY(0); visibility: visible; transition: transform 520ms var(--ease-sheet), visibility 0s; }
@media (min-width: 700px) { .sheet { bottom: 24px; border-radius: 24px; } .sheet:not(.on) { transform: translateY(calc(100% + 40px)); } }
.grabber { width: 36px; height: 5px; border-radius: 3px; background: var(--fill-2); margin: 0 auto 14px; }
.sheet-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.sheet-title h2 { margin: 0; font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.sheet .group-head { padding-left: 4px; padding-right: 4px; }
.sheet .list { background: var(--surface); }
.verdict { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.verdict-badge { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.verdict-badge .icon { width: 26px; height: 26px; stroke-width: 2.6; }
.verdict.ok .verdict-badge { background: var(--green-soft); color: var(--green); }
.verdict.miss .verdict-badge { background: var(--red-soft); color: var(--red); }
.verdict.time .verdict-badge { background: var(--orange-soft); color: var(--orange); }
.verdict.info .verdict-badge { background: var(--tint-soft); color: var(--tint); }
.verdict h2 { margin: 0; font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.verdict p { margin: 2px 0 0; color: var(--label-2); font-size: 15px; }
.verdict.pop .verdict-badge { animation: pop 520ms var(--ease-out); }
@keyframes pop { 0% { transform: scale(0.4); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
.prices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.price-box { background: var(--fill); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.price-box span { display: block; font-size: 13px; color: var(--label-2); }
.price-box b { display: block; font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -0.015em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.price-box.actual b { font-size: 24px; }
.scale { margin: 6px 4px 22px; }
.scale-track { position: relative; height: 8px; border-radius: 4px; background: var(--fill-2); }
.scale-zone { position: absolute; top: -3px; bottom: -3px; left: 40%; width: 20%; border-radius: 6px; background: var(--green-soft); border: 1.5px solid var(--green-mark); }
.scale-mid { position: absolute; left: 50%; top: -6px; bottom: -6px; width: 2px; margin-left: -1px; background: var(--label); border-radius: 1px; }
.scale-dot { position: absolute; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--tint-fill); border: 3px solid var(--surface); box-shadow: var(--shadow-sm); transition: left 700ms var(--ease-out); }
.scale-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--label-2); margin-top: 10px; font-variant-numeric: tabular-nums; }
.scale-labels span:nth-child(2) { color: var(--label); font-weight: 600; }
.sheet-note { font-size: 14px; color: var(--label-2); margin: -6px 0 18px; display: flex; gap: 8px; align-items: flex-start; }
.sheet-note .icon { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.sheet-actions { display: grid; gap: 10px; }
.kbd { font-size: 12px; color: var(--label-3); text-align: center; margin-top: 10px; }
@media (hover: none) { .kbd { display: none; } }
.sum-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 6px 0 20px; }
.detail-photo { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 16px; background: var(--fill); display: block; margin-bottom: 14px; }
.detail-loc { color: var(--label-2); font-size: 15px; margin: -10px 0 16px; }
.detail-tries { margin: -6px 0 18px; }

/* ---------- Map tab ---------- */
.map-empty { position: absolute; z-index: 500; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(320px, calc(100% - 32px)); border-radius: 20px; padding: 22px 20px; text-align: center; box-shadow: var(--shadow-lg); }
.map-empty h2 { margin: 0 0 6px; font-size: 19px; font-weight: 600; letter-spacing: -0.015em; }
.map-empty p { margin: 0; color: var(--label-2); font-size: 15px; }
.leaflet-container { font: inherit; background: var(--bg); }
.leaflet-control-zoom { border: 0 !important; box-shadow: var(--shadow-sm) !important; border-radius: 12px !important; overflow: hidden; }
.leaflet-control-zoom a { width: 38px !important; height: 38px !important; line-height: 38px !important; background: var(--bar) !important; color: var(--label) !important; border-color: var(--sep) !important; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.leaflet-control-attribution { background: var(--bar) !important; color: var(--label-2) !important; font-size: 10px; border-radius: 6px 0 0 0; }
.leaflet-control-attribution a { color: var(--label-2) !important; }
.pin { background: none; border: 0; }
.pin-label { position: absolute; left: 0; top: 0; transform: translate(-50%, calc(-100% - 7px)); padding: 4px 9px; border-radius: 99px; white-space: nowrap; background: var(--pin); color: var(--pin-fg); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22), 0 0 0 0.5px rgba(0, 0, 0, 0.08); transition: transform 160ms var(--ease-out); }
.pin-label::after { content: ""; position: absolute; left: 50%; bottom: -5px; margin-left: -5px; border: 5px solid transparent; border-bottom: 0; border-top-color: var(--pin); }
.pin-label.rent { color: var(--orange); }
.pin-label.sale { color: var(--tint); }
.pin-dot { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--tint-fill); border: 2px solid var(--pin); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }
.pin-dot.rent { background: var(--orange-mark); }
.leaflet-marker-icon:hover .pin-label { transform: translate(-50%, calc(-100% - 9px)) scale(1.06); }
.leaflet-popup-content-wrapper { background: var(--surface); color: var(--label); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 0; overflow: hidden; }
.leaflet-popup-content { margin: 0; width: 260px !important; }
.leaflet-popup-tip { background: var(--surface); }
.leaflet-container a.leaflet-popup-close-button { color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); top: 6px; right: 6px; font-size: 22px; }
.pop img { width: 100%; height: 150px; object-fit: cover; display: block; background: var(--fill); }
.pop-body { padding: 12px 14px 14px; font-size: 14px; }
.pop-body .eyebrow { font-size: 12px; }
.pop-title { font-weight: 600; font-size: 16px; margin: 4px 0 2px; letter-spacing: -0.01em; }
.pop-price { font-family: var(--font-display); font-weight: 700; font-size: 20px; font-variant-numeric: tabular-nums; letter-spacing: -0.015em; }
.pop-sub { color: var(--label-2); font-size: 13px; margin: 2px 0 10px; font-variant-numeric: tabular-nums; }
.pop-body a { font-weight: 600; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0.94); display: grid; place-items: center; opacity: 0; pointer-events: none; transition: opacity 240ms ease; }
.lightbox.on { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: 94vw; max-height: 86vh; object-fit: contain; border-radius: 6px; transform: scale(0.96); transition: transform 360ms var(--ease-sheet); }
.lightbox.on img { transform: scale(1); }
.lb-btn { position: absolute; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, 0.14); }
.lb-btn .icon { width: 20px; height: 20px; stroke-width: 2.2; }
.lb-btn:active { transform: scale(0.92); }
.lb-close { top: calc(16px + env(safe-area-inset-top, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); }
.lb-prev { left: max(16px, env(safe-area-inset-left, 0px)); top: 50%; margin-top: -22px; }
.lb-next { right: max(16px, env(safe-area-inset-right, 0px)); top: 50%; margin-top: -22px; }
.lb-count { position: absolute; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); left: 0; right: 0; text-align: center; color: rgba(255, 255, 255, 0.7); font-size: 14px; font-variant-numeric: tabular-nums; }

.view-enter { animation: rise 420ms var(--ease-out) backwards; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .sheet, .sheet.on { transition: opacity 200ms ease, visibility 0s; transform: none; opacity: 0; }
  .sheet.on { opacity: 1; }
}
@media (prefers-contrast: more) { .material { background: var(--surface); } .list, .guess, .sheet, .card { border: 1px solid var(--label-3); } }

/* ====================== Web app additions ====================== */
/* Loading */
.loading { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 90; transition: opacity 300ms ease; }
.loading.done { opacity: 0; pointer-events: none; }
.loading-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--label-2); font-size: 15px; text-align: center; padding: 0 24px; }
.loading .logo { width: 64px; height: 64px; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--fill-2); border-top-color: var(--tint); animation: spin 800ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Auth */
.auth { min-height: 100%; display: grid; place-items: center; padding-block: 28px; }
.auth-card { width: min(420px, 100%); background: var(--surface); border-radius: 26px; padding: 28px 22px 22px; box-shadow: var(--shadow-sm); }
.auth-brand { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; margin-bottom: 20px; }
.auth-brand .logo { width: 72px; height: 72px; filter: drop-shadow(0 8px 18px rgba(30, 158, 74, 0.28)); }
.auth-brand h1 { margin: 0; font-family: var(--font-display); font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.auth-brand p { margin: 0; color: var(--label-2); font-size: 15px; max-width: 34ch; }
.auth h2 { margin: 0 0 4px; font-family: var(--font-display); font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.auth .sub { margin: 0; color: var(--label-2); font-size: 14px; }
.field-list { background: var(--fill); border-radius: 14px; overflow: hidden; margin: 14px 0 12px; }
.field { display: block; position: relative; }
.field + .field { border-top: 0.5px solid var(--sep); }
.field span { position: absolute; left: 14px; top: 8px; font-size: 12px; color: var(--label-2); pointer-events: none; }
.field input { width: 100%; border: 0; outline: 0; background: transparent; padding: 27px 14px 9px; font-size: 17px; }
.field input:focus { background: var(--fill); }
.auth-msg { font-size: 14px; line-height: 1.4; border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; }
.auth-msg.err { background: var(--red-soft); color: var(--red); }
.auth-msg.ok { background: var(--green-soft); color: var(--green); }
.auth-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; font-size: 15px; }
.auth-links button { color: var(--tint); }
.auth-foot { text-align: center; font-size: 12px; color: var(--label-2); margin-top: 18px; }
.auth .segmented { margin-bottom: 18px; }

/* Avatar */
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px; flex: none; background: var(--av, #007AFF); letter-spacing: 0; text-transform: uppercase; }
.avatar.lg { width: 56px; height: 56px; font-size: 22px; }
.avatar.sm { width: 24px; height: 24px; font-size: 11px; }
/* Daily card */
.daily { display: grid; gap: 16px 28px; grid-template-columns: minmax(0, 1fr); background: var(--surface); border-radius: 24px; padding: 20px 22px; }
@media (min-width: 900px) { .daily { grid-template-columns: minmax(0, 1.25fr) minmax(280px, 1fr); align-items: center; padding: 24px 28px; } }
.daily h2 { margin: 0 0 4px; font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; text-wrap: balance; }
.daily p { margin: 0; color: var(--label-2); font-size: 15px; }
.daily-homes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.dh { height: 58px; border-radius: 12px; background: var(--fill); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--label-3); }
.dh.done { background: var(--tint-soft); color: var(--tint); }
.dh.great { background: var(--green-soft); color: var(--green); }
.dh.zero { background: var(--red-soft); color: var(--red); }
.dh.next { box-shadow: inset 0 0 0 2px var(--tint); color: var(--label); }
.daily-side { display: grid; gap: 12px; align-content: start; }
.daily-side .btn { min-height: 54px; font-size: 18px; }
/* Leaderboard */
.board-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 0 16px 7px; font-size: 13px; color: var(--label-2); text-transform: uppercase; letter-spacing: 0.04em; }
.rank-row { min-height: 68px; }
.list .rank-row + .rank-row::before { left: 98px; }
.rank-n { width: 22px; text-align: center; font-family: var(--font-round); font-weight: 800; font-size: 17px; color: var(--label-2); font-variant-numeric: tabular-nums; flex: none; }
.rank-row.first .rank-n { color: var(--orange-mark); }
.rank-row .row-label b { display: block; font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-main { text-align: right; flex: none; }
.rank-main b { display: block; font-family: var(--font-round); font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.rank-main small { color: var(--label-2); font-size: 12px; }
.home-pips { display: flex; gap: 4px; margin-top: 6px; }
.pip { width: 22px; height: 6px; border-radius: 3px; background: var(--fill-2); }
.pip.on { background: var(--tint-bar); }
.pip.great { background: var(--green-mark); }
.pip.zero { background: var(--red); opacity: 0.55; }
.you-tag { font-size: 11px; font-weight: 700; color: var(--tint); background: var(--tint-soft); padding: 1px 7px; border-radius: 99px; margin-left: 6px; vertical-align: 2px; }
.board-note { font-size: 13px; color: var(--label-2); text-align: center; margin: 12px 16px 0; line-height: 1.45; }
.winner-card { display: flex; gap: 12px; align-items: center; background: var(--surface); border-radius: 16px; padding: 12px 16px; margin-bottom: 16px; font-size: 15px; }
.winner-card .icon { color: var(--orange-mark); width: 26px; height: 26px; flex: none; }
.winner-card b { font-weight: 600; }
.board-loading { display: grid; place-items: center; padding: 40px 0; }

/* Points breakdown */
.breakdown { background: var(--fill); border-radius: 14px; padding: 2px 14px; margin-bottom: 18px; }
.breakdown div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 15px; font-variant-numeric: tabular-nums; }
.breakdown div + div { border-top: 0.5px solid var(--sep); }
.breakdown span:first-child { color: var(--label-2); }
.breakdown .total { font-weight: 700; font-size: 17px; }
.breakdown .total span:first-child { color: var(--label); }
.sum-list { margin-bottom: 18px; }
.sum-list .row { min-height: 52px; }
.sum-list .row-value { color: var(--label); font-weight: 600; }

/* Profile */
.profile-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.profile-head b { display: block; font-size: 20px; font-weight: 700; letter-spacing: -0.015em; }
.profile-head small { color: var(--label-2); font-size: 14px; overflow-wrap: anywhere; }
.swatches { display: flex; gap: 12px; flex-wrap: wrap; padding: 14px 16px; }
.swatch { width: 34px; height: 34px; border-radius: 50%; background: var(--sw); transition: box-shadow 160ms ease; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--sw); }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(var(--tab-space) + 14px); transform: translate(-50%, 20px); z-index: 75; background: var(--label); color: var(--bg); padding: 10px 16px; border-radius: 99px; font-size: 14px; font-weight: 600; opacity: 0; transition: opacity 200ms ease, transform 300ms var(--ease-sheet); pointer-events: none; max-width: calc(100% - 32px); text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
body.mode-play .toast { bottom: calc(160px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 920px) { body.mode-play .toast { bottom: 24px; } }
.btn.busy { opacity: 0.6; pointer-events: none; }
.chip.is-daily { background: var(--tint-soft); color: var(--tint); }

.rank-row[role="button"] { cursor: pointer; transition: background-color 160ms ease; }
.rank-row[role="button"]:active { background: var(--fill); }

/* ====================== Pages & navigation (v2) ====================== */
/* Top bar: brand left, section nav centred (desktop), account right. Phones use the bottom tab bar. */
.topbar-center { justify-self: center; min-width: 0; display: flex; justify-content: center; }
.brand { display: inline-flex; align-items: center; gap: 9px; min-height: 40px; color: var(--label); font-size: 17px; font-weight: 700; letter-spacing: -0.02em; border-radius: 10px; }
.brand .mini-logo { width: 28px; height: 28px; filter: drop-shadow(0 2px 5px rgba(30, 158, 74, 0.25)); }
.brand:active { opacity: 0.6; }
.topnav { display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--fill); }
.topnav a { padding: 6px 14px; border-radius: 9px; font-size: 15px; font-weight: 500; color: var(--label); white-space: nowrap; transition: background-color 160ms ease; }
.topnav a[aria-current="page"] { background: var(--thumb); font-weight: 600; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.10), 0 0 0 0.5px rgba(0, 0, 0, 0.04); }
@media (hover: hover) { .topnav a:not([aria-current="page"]):hover { background: var(--fill); } }
@media (max-width: 759px) { .topnav { display: none; } }
.acct-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 3px 10px 3px 3px; border-radius: 99px; background: var(--fill); font-size: 15px; font-weight: 600; max-width: 220px; transition: background-color 160ms ease; }
.acct-btn .avatar { width: 34px; height: 34px; font-size: 13px; }
.acct-btn .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.acct-btn .chev-d { width: 16px; height: 16px; stroke-width: 2.4; color: var(--label-2); transition: transform 220ms var(--ease-out); }
.acct-btn[aria-expanded="true"] { background: var(--fill-2); }
.acct-btn[aria-expanded="true"] .chev-d { transform: rotate(180deg); }
.acct-btn:active { opacity: 0.7; }
@media (max-width: 759px) { .acct-btn .name { display: none; } .acct-btn { gap: 2px; padding-right: 6px; } }
.login-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 99px; background: var(--tint-fill); color: #fff; font-size: 15px; font-weight: 600; white-space: nowrap; transition: transform 120ms var(--ease-out); }
.login-btn .icon { width: 18px; height: 18px; stroke-width: 2.2; }
.login-btn:active { transform: scale(0.96); }

/* Account menu */
.menu {
  position: fixed; z-index: 45; width: 264px; max-width: calc(100vw - 16px); padding: 6px; border-radius: 18px;
  background: var(--sheet); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  box-shadow: var(--shadow-lg), 0 0 0 0.5px var(--sep);
  transform-origin: top right; opacity: 0; transform: scale(0.9) translateY(-6px);
  transition: opacity 140ms ease, transform 260ms var(--ease-out);
}
.menu.on { opacity: 1; transform: none; }
.menu-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 12px; margin-bottom: 4px; border-bottom: 0.5px solid var(--sep); }
.menu-head > div { min-width: 0; }
.menu-head b { display: block; font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-head small { display: block; font-size: 13px; color: var(--label-2); overflow-wrap: anywhere; }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 0 12px; border-radius: 11px; color: var(--label); font-size: 16px; text-align: left; }
.menu-item .icon { width: 21px; height: 21px; color: var(--label-2); }
.menu-item:hover, .menu-item:focus-visible { background: var(--fill); outline: none; }
.menu-item:active { background: var(--fill-2); }
.menu-item.danger, .menu-item.danger .icon { color: var(--red); }
.menu-sep { height: 0.5px; background: var(--sep); margin: 4px 8px; }

/* Shared page layout */
.page { max-width: 1080px; margin: 0 auto; padding-top: 10px; display: grid; gap: 16px; }
.page.narrow { max-width: 720px; }
.page > * { min-width: 0; }
.large-title { font-family: var(--font-display); font-size: 34px; line-height: 1.08; font-weight: 700; letter-spacing: -0.025em; margin: 0; text-wrap: balance; }
.page-head { display: grid; gap: 4px; }
.page-lead { margin: 0; color: var(--label-2); font-size: 16px; text-wrap: pretty; }
.back-link { display: inline-flex; align-items: center; gap: 2px; width: fit-content; min-height: 32px; margin-left: -6px; color: var(--tint); font-size: 16px; }
.back-link .icon { width: 20px; height: 20px; stroke-width: 2.4; }
.section-title { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin: 8px 0 12px; }
.board-section, .history, .map-card { scroll-margin-top: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 12px); }
.board-section .segmented, .history .segmented { margin-bottom: 14px; max-width: 440px; }
.link-btn.small { font-size: 14px; }
.link-btn.danger { color: var(--red); }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important; }
@media (max-width: 520px) { .large-title { font-size: 30px; } }

/* Home */
.landing {
  max-width: 560px; margin: 0 auto; text-align: center;
  min-height: calc(100dvh - var(--nav-h) - env(safe-area-inset-top, 0px) - var(--tab-space) - 48px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px 0 8px;
}
.logo-xl { width: 96px; height: 96px; margin-bottom: 18px; filter: drop-shadow(0 10px 24px rgba(30, 158, 74, 0.30)); }
.landing h1 { margin: 0; font-family: var(--font-display); font-size: 46px; line-height: 1.02; font-weight: 800; letter-spacing: -0.035em; }
.landing .lead { margin: 12px 0 30px; color: var(--label-2); font-size: 19px; line-height: 1.38; text-wrap: balance; }
.cta {
  width: 100%; max-width: 430px; display: flex; align-items: center; gap: 14px; padding: 16px 18px 16px 16px; border-radius: 24px;
  background: linear-gradient(180deg, #2A9A4C, #166C33); color: #fff; text-align: left;
  box-shadow: 0 14px 30px rgba(22, 120, 52, 0.30), 0 2px 6px rgba(22, 120, 52, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform 140ms var(--ease-out), box-shadow 220ms ease;
}
.cta:active { transform: scale(0.97); transition: none; }
@media (hover: hover) { .cta:hover { box-shadow: 0 18px 38px rgba(22, 120, 52, 0.36), 0 2px 6px rgba(22, 120, 52, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.18); } }
.cta-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; flex: none; background: rgba(255, 255, 255, 0.2); }
.cta-icon .icon { width: 29px; height: 29px; stroke-width: 2; }
.cta-text { flex: 1; min-width: 0; }
.cta-text b { display: block; font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.cta-text small { display: block; margin-top: 2px; font-size: 15px; opacity: 0.88; }
.cta-chev { width: 22px; height: 22px; stroke-width: 2.4; opacity: 0.85; }
.cta-status { min-height: 20px; margin: 12px 0 0; color: var(--label-2); font-size: 14px; font-variant-numeric: tabular-nums; }
.steps { list-style: none; margin: 34px 0 0; padding: 0; width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.steps li { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 14px 10px 13px; border-radius: 18px; background: var(--surface); color: var(--label-2); font-size: 13px; line-height: 1.35; }
.steps b { color: var(--label); font-size: 15px; font-weight: 600; }
.step-icon { width: 38px; height: 38px; margin-bottom: 5px; border-radius: 11px; display: grid; place-items: center; background: var(--tint-soft); color: var(--tint); }
.step-icon .icon { width: 21px; height: 21px; }
.home-foot { padding: 16px 0 0; text-align: center; }
.home-foot .credit { margin: 0; color: var(--label-2); font-size: 13px; }
.home-foot .credit b { color: var(--label); font-weight: 600; }
@media (max-width: 420px) {
  .landing h1 { font-size: 38px; } .logo-xl { width: 80px; height: 80px; margin-bottom: 14px; }
  .landing .lead { font-size: 17px; margin-bottom: 24px; } .cta-text b { font-size: 22px; }
  .steps { gap: 8px; margin-top: 28px; } .steps li { padding: 12px 6px; font-size: 12px; }
}

/* How to play */
.doc .page-lead { font-size: 17px; }
.doc-sec { background: var(--surface); border-radius: var(--card-r); padding: 18px 20px 20px; }
.doc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.doc-head h2 { margin: 0; font-family: var(--font-display); font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.doc-sec ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 16px; line-height: 1.45; }
.doc-sec li::marker { color: var(--label-3); }
.doc-sec li b { font-weight: 600; }
.doc-sec p { margin: 0 0 12px; font-size: 16px; }
.doc-sec code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 14px; padding: 1px 6px; border-radius: 6px; background: var(--fill); }
.points-table { margin-bottom: 12px; }
.points-table div > span:first-child { color: var(--label); }
.points-table small { display: block; color: var(--label-2); font-size: 13px; }
.points-table div > span:last-child { white-space: nowrap; font-weight: 600; }
.examples { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.examples div { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 14px; }
.examples div > b { font-weight: 600; }
.examples span { color: var(--label-2); font-variant-numeric: tabular-nums; }
.examples span b { color: var(--label); }
@media (max-width: 600px) { .examples { grid-template-columns: minmax(0, 1fr); } }
.doc-cta { display: flex; justify-content: center; padding: 6px 0 4px; }

/* Game modes */
.mode-icon { width: 62px; height: 62px; border-radius: 18px; flex: none; display: grid; place-items: center; color: #fff; background: linear-gradient(180deg, #6BE291, #1E9E4A); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2); }
.mode-icon .icon { width: 32px; height: 32px; stroke-width: 1.9; }

/* Daily Challenge page */
.dh small { font-size: 10px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.75; }
.facts-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; text-align: center; color: var(--label-2); font-size: 12px; }
.facts-strip span { padding: 8px 4px; border-radius: 12px; background: var(--surface-2); }
.facts-strip b { display: block; color: var(--label); font-family: var(--font-round); font-size: 17px; font-weight: 700; }
.daily-side .link-btn { justify-self: center; }

/* Infinite page */
.inf-start { display: grid; gap: 12px; padding: 18px; border-radius: 24px; background: var(--surface); }
.btn-xl { min-height: 58px; font-size: 19px; border-radius: 16px; }
.inf-start .pool-note { margin: 0; text-align: center; color: var(--label-2); font-size: 14px; }
.tiles.tiles-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.inf-start .tile { background: var(--surface-2); }
.tile-link { display: flex; flex-direction: column; justify-content: space-between; gap: 8px; color: var(--tint); transition: background-color 160ms ease; }
.tile-link span { color: var(--tint) !important; font-weight: 600; white-space: normal !important; }
.tile-link .icon { width: 20px; height: 20px; stroke-width: 2.3; align-self: flex-end; }
.tile-link:active { background: var(--fill) !important; }
@media (max-width: 600px) { .tiles.tiles-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
#inf-settings .group:first-of-type { margin-bottom: 16px; }
#inf-settings .group-head { padding-left: 4px; padding-right: 4px; }
#endless-board .rank-row { min-height: 60px; }

/* Stats page */
.stats-head { display: flex; align-items: center; gap: 16px; padding-top: 4px; }
.stats-head > div { min-width: 0; }
.avatar { position: relative; overflow: hidden; }
.avatar .av-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar.md { width: 40px; height: 40px; font-size: 16px; }
.avatar.xl { width: 76px; height: 76px; font-size: 29px; }
.map-card .card-head { flex-wrap: wrap; align-items: center; row-gap: 10px; }
.map-card .segmented { width: 220px; }
.map-wrap { position: relative; height: 440px; border-radius: 16px; overflow: hidden; background: var(--fill); isolation: isolate; }
#map { position: absolute; inset: 0; background: var(--fill); }
.map-wrap .loc-btn .i-collapse { display: none; }
.map-wrap.expanded .loc-btn .i-collapse { display: block; }
.map-wrap.expanded .loc-btn .i-expand { display: none; }
.map-wrap.expanded { position: fixed; z-index: 14; top: calc(var(--nav-h) + env(safe-area-inset-top, 0px)); left: 0; right: 0; bottom: var(--tab-space); height: auto; border-radius: 0; }
body.map-big #scroller { overflow: hidden; }
@media (max-width: 600px) { .map-wrap { height: 340px; margin: 0 -6px; } .map-card .segmented { width: 100%; } .avatar.xl { width: 64px; height: 64px; font-size: 25px; } }

/* Settings */
.settings .group { margin: 0; }
.settings .group > .btn { margin-top: 10px; }
.settings .group-foot { min-height: 0; }
.settings .group-foot:empty { display: none; }
.group-foot.ok { color: var(--green); }
.group-foot.err { color: var(--red); }
.photo-row { display: flex; align-items: center; gap: 16px; padding: 16px; }
.photo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 15px; border-radius: 11px; }
.btn-sm .icon { width: 18px; height: 18px; }
label.btn { cursor: pointer; }
.settings .list > .field { border-top: 0.5px solid var(--sep); }
.settings .field input:focus { background: var(--fill); }
.swatch-row { border-top: 0.5px solid var(--sep); padding: 10px 0 0; }
.swatch-label { display: block; padding: 0 14px; font-size: 12px; color: var(--label-2); }
.swatch-row .swatches { padding: 10px 14px 14px; gap: 14px; }
.swatch { width: 36px; height: 36px; }
.field-list.flat { margin: 0; background: var(--surface); }
.field.static b { display: block; padding: 27px 14px 10px; font-size: 17px; font-weight: 500; overflow-wrap: anywhere; }
.danger-btn { background: var(--red-soft); color: var(--red); }
.settings .theme-switch { margin-left: auto; }

/* Waiting for data */
.wait { max-width: 520px; margin: 40px auto 0; }
.wait-spin { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 60px 0; color: var(--label-2); font-size: 15px; }
.wait-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 16px; }
.wait-actions .btn { min-height: 44px; font-size: 16px; }

/* Log in page sits under the bars now */
.auth { min-height: calc(100dvh - var(--nav-h) - env(safe-area-inset-top, 0px) - var(--tab-space) - 48px); padding-block: 16px; }
.auth-brand h1 { font-size: 28px; }

/* Phones */
@media (max-width: 759px) {
  .topbar-inner { grid-template-columns: auto 1fr auto; }
  .topbar-center { justify-self: stretch; }
  body.mode-play .topbar-inner { grid-template-columns: 1fr auto 1fr; }
  body.mode-play .topbar-center { justify-self: center; }
  .card { padding: 16px 16px 14px; }
  .daily { padding: 18px; }
  .board-section .segmented, .history .segmented { max-width: none; }
}
@media (hover: none) { .menu-item:hover { background: none; } }
.page > .large-title:first-child { margin-top: 14px; }
.stats-head { margin-top: 8px; }
.card-head .segmented button { color: var(--label); font-size: 14px; white-space: nowrap; }
@media (max-width: 420px) { .swatch { width: 32px; height: 32px; } .swatch-row .swatches { gap: 9px; } }

/* ====================== v3: friends, likes, languages, new play screen ====================== */
select { font: inherit; color: inherit; letter-spacing: inherit; }

/* Background: soft colour washes, a faint pattern of little houses and a Flemish skyline along the bottom */
:root { --skyline: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 150' preserveAspectRatio='none'%3E%3Cpath d='M0.0 150.0 L0.0 80.0 L7.3 80.0 L7.3 70.0 L14.7 70.0 L14.7 60.0 L22.0 60.0 L22.0 50.0 L29.3 50.0 L29.3 40.0 L36.7 40.0 L36.7 50.0 L44.0 50.0 L44.0 60.0 L51.3 60.0 L51.3 70.0 L58.7 70.0 L58.7 80.0 L66.0 80.0 L66.0 94.0 L66.0 88.0 L93.0 56.0 L120.0 88.0 L120.0 110.0 L120.0 56.0 L127.3 56.0 L127.3 47.0 L134.7 47.0 L134.7 38.0 L142.0 38.0 L142.0 29.0 L149.3 29.0 L149.3 20.0 L156.7 20.0 L156.7 29.0 L164.0 29.0 L164.0 38.0 L171.3 38.0 L171.3 47.0 L178.7 47.0 L178.7 56.0 L186.0 56.0 L186.0 94.0 L186.0 96.0 L228.0 96.0 L228.0 84.0 L234.0 84.0 L234.0 96.0 L246.0 96.0 L246.0 110.0 L246.0 64.0 L282.0 40.0 L318.0 64.0 L318.0 110.0 L318.0 56.0 L324.0 56.0 L324.0 46.0 L330.0 46.0 L330.0 36.0 L336.0 36.0 L336.0 26.0 L342.0 26.0 L342.0 16.0 L348.0 16.0 L348.0 26.0 L354.0 26.0 L354.0 36.0 L360.0 36.0 L360.0 46.0 L366.0 46.0 L366.0 56.0 L372.0 56.0 L372.0 110.0 L372.0 68.0 L380.0 68.0 L395.0 -8.0 L410.0 68.0 L418.0 68.0 L418.0 110.0 L418.0 56.0 L448.0 32.0 L478.0 56.0 L478.0 94.0 L478.0 64.0 L486.7 64.0 L486.7 55.0 L495.3 55.0 L495.3 46.0 L504.0 46.0 L504.0 37.0 L512.7 37.0 L512.7 28.0 L521.3 28.0 L521.3 37.0 L530.0 37.0 L530.0 46.0 L538.7 46.0 L538.7 55.0 L547.3 55.0 L547.3 64.0 L556.0 64.0 L556.0 110.0 L556.0 64.0 L593.8 64.0 L593.8 52.0 L599.2 52.0 L599.2 64.0 L610.0 64.0 L610.0 110.0 L610.0 64.0 L617.3 64.0 L617.3 55.0 L624.7 55.0 L624.7 46.0 L632.0 46.0 L632.0 37.0 L639.3 37.0 L639.3 28.0 L646.7 28.0 L646.7 37.0 L654.0 37.0 L654.0 46.0 L661.3 46.0 L661.3 55.0 L668.7 55.0 L668.7 64.0 L676.0 64.0 L676.0 94.0 L676.0 56.0 L703.0 28.0 L730.0 56.0 L730.0 94.0 L730.0 88.0 L736.7 88.0 L736.7 77.0 L743.3 77.0 L743.3 66.0 L750.0 66.0 L750.0 55.0 L756.7 55.0 L756.7 44.0 L763.3 44.0 L763.3 55.0 L770.0 55.0 L770.0 66.0 L776.7 66.0 L776.7 77.0 L783.3 77.0 L783.3 88.0 L790.0 88.0 L790.0 94.0 L790.0 72.0 L820.0 48.0 L850.0 72.0 L850.0 94.0 L850.0 64.0 L887.8 64.0 L887.8 52.0 L893.2 52.0 L893.2 64.0 L904.0 64.0 L904.0 110.0 L904.0 80.0 L912.7 80.0 L912.7 70.0 L921.3 70.0 L921.3 60.0 L930.0 60.0 L930.0 50.0 L938.7 50.0 L938.7 40.0 L947.3 40.0 L947.3 50.0 L956.0 50.0 L956.0 60.0 L964.7 60.0 L964.7 70.0 L973.3 70.0 L973.3 80.0 L982.0 80.0 L982.0 94.0 L982.0 64.0 L990.7 64.0 L990.7 54.0 L999.3 54.0 L999.3 44.0 L1008.0 44.0 L1008.0 34.0 L1016.7 34.0 L1016.7 24.0 L1025.3 24.0 L1025.3 34.0 L1034.0 34.0 L1034.0 44.0 L1042.7 44.0 L1042.7 54.0 L1051.3 54.0 L1051.3 64.0 L1060.0 64.0 L1060.0 102.0 L1060.0 64.0 L1099.0 36.0 L1138.0 64.0 L1138.0 102.0 L1138.0 80.0 L1144.7 80.0 L1144.7 69.0 L1151.3 69.0 L1151.3 58.0 L1158.0 58.0 L1158.0 47.0 L1164.7 47.0 L1164.7 36.0 L1171.3 36.0 L1171.3 47.0 L1178.0 47.0 L1178.0 58.0 L1184.7 58.0 L1184.7 69.0 L1191.3 69.0 L1191.3 80.0 L1198.0 80.0 L1198.0 110.0 L1198.0 64.0 L1199.4 64.0 L1199.4 52.0 L1199.6 52.0 L1199.6 64.0 L1200.0 64.0 L1200.0 150.0Z' fill='rgb(30,158,74)'/%3E%3C/svg%3E"); --pattern-w: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cg fill='none' stroke='rgba(255,255,255,0.13)' stroke-width='1.6' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M22 52 V38 L34 28 L46 38 V52 Z M31 52 V45 H37 V52'/%3E%3Cpath d='M112 40 V30 h4 v-4 h4 v-4 h4 v-4 h4 v4 h4 v4 h4 v4 h4 V40 Z'/%3E%3Cpath d='M70 132 V118 L84 107 L98 118 V132 Z M78 118 h4 v4 h-4 Z M87 118 h4 v4 h-4 Z'/%3E%3Cpath d='M146 128 l10 -10 h12 v12 l-10 10 Z'/%3E%3Ccircle cx='162' cy='122' r='1.6'/%3E%3Cpath d='M8 150 l8 -8 h9 v9 l-8 8 Z'/%3E%3C/g%3E%3C/svg%3E"); --wash-a: rgba(52, 199, 89, 0.16); --wash-b: rgba(175, 82, 222, 0.12); --wash-c: rgba(255, 149, 0, 0.10); --sky-o: 0.075; --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cg fill='none' stroke='rgba(10,99,232,0.075)' stroke-width='1.6' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M22 52 V38 L34 28 L46 38 V52 Z M31 52 V45 H37 V52'/%3E%3Cpath d='M112 40 V30 h4 v-4 h4 v-4 h4 v-4 h4 v4 h4 v4 h4 v4 h4 V40 Z'/%3E%3Cpath d='M70 132 V118 L84 107 L98 118 V132 Z M78 118 h4 v4 h-4 Z M87 118 h4 v4 h-4 Z'/%3E%3Cpath d='M146 128 l10 -10 h12 v12 l-10 10 Z'/%3E%3Ccircle cx='162' cy='122' r='1.6'/%3E%3Cpath d='M8 150 l8 -8 h9 v9 l-8 8 Z'/%3E%3C/g%3E%3C/svg%3E"); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --wash-a: rgba(48, 209, 88, 0.13); --wash-b: rgba(175, 82, 222, 0.14); --wash-c: rgba(255, 159, 10, 0.07); --sky-o: 0.16; --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cg fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='1.6' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M22 52 V38 L34 28 L46 38 V52 Z M31 52 V45 H37 V52'/%3E%3Cpath d='M112 40 V30 h4 v-4 h4 v-4 h4 v-4 h4 v4 h4 v4 h4 v4 h4 V40 Z'/%3E%3Cpath d='M70 132 V118 L84 107 L98 118 V132 Z M78 118 h4 v4 h-4 Z M87 118 h4 v4 h-4 Z'/%3E%3Cpath d='M146 128 l10 -10 h12 v12 l-10 10 Z'/%3E%3Ccircle cx='162' cy='122' r='1.6'/%3E%3Cpath d='M8 150 l8 -8 h9 v9 l-8 8 Z'/%3E%3C/g%3E%3C/svg%3E"); } }
:root[data-theme="dark"] { --wash-a: rgba(48, 209, 88, 0.13); --wash-b: rgba(175, 82, 222, 0.14); --wash-c: rgba(255, 159, 10, 0.07); --sky-o: 0.16; --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cg fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='1.6' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M22 52 V38 L34 28 L46 38 V52 Z M31 52 V45 H37 V52'/%3E%3Cpath d='M112 40 V30 h4 v-4 h4 v-4 h4 v-4 h4 v4 h4 v4 h4 v4 h4 V40 Z'/%3E%3Cpath d='M70 132 V118 L84 107 L98 118 V132 Z M78 118 h4 v4 h-4 Z M87 118 h4 v4 h-4 Z'/%3E%3Cpath d='M146 128 l10 -10 h12 v12 l-10 10 Z'/%3E%3Ccircle cx='162' cy='122' r='1.6'/%3E%3Cpath d='M8 150 l8 -8 h9 v9 l-8 8 Z'/%3E%3C/g%3E%3C/svg%3E"); }
body::before, body::after { content: ""; position: fixed; z-index: -1; pointer-events: none; }
body::before {
  inset: 0;
  background:
    radial-gradient(70vmax 55vmax at -5% -10%, var(--wash-a), transparent 62%),
    radial-gradient(55vmax 45vmax at 105% 0%, var(--wash-b), transparent 60%),
    radial-gradient(70vmax 45vmax at 85% 110%, var(--wash-c), transparent 60%),
    var(--pattern) 0 0 / 180px 180px;
}
body::after {
  left: 0; right: 0; bottom: 0; height: 150px; opacity: var(--sky-o);
  background: var(--skyline) repeat-x left bottom / 1200px 150px;
  transition: opacity 300ms ease;
}
body.mode-play::after { opacity: 0; }
@media (max-width: 759px) { body::after { height: 110px; background-size: 880px 110px; bottom: var(--tab-space); } body.mode-play::after, body.mode-auth::after { opacity: 0; } }
.landing .logo-xl { animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6px); } }

/* Language pill */
.lang-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 99px; background: var(--fill); color: var(--label); font-size: 14px; font-weight: 600; transition: background-color 160ms ease, transform 120ms ease; }
.lang-pill .icon { width: 17px; height: 17px; color: var(--label-2); }
.lang-pill.sm { min-height: 34px; padding: 0 10px; font-size: 13px; gap: 4px; }
.lang-pill:active { transform: scale(0.95); }
@media (hover: hover) { .lang-pill:hover { background: var(--fill-2); } }
.lang-foot { display: flex; justify-content: center; padding: 10px 0 2px; }
.topbar-right { gap: 8px; }

/* Account menu: language row and friend-request badge */
.menu-lang { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 6px 0 12px; font-size: 16px; }
.menu-lang > .icon { width: 21px; height: 21px; color: var(--label-2); }
.menu-lang > span { flex: 1; }
.segmented.mini { width: 100px; flex: none; }
.segmented.mini button { min-height: 28px; font-size: 13px; }
.badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.acct-btn { position: relative; }
.acct-btn.has-badge::after { content: ""; position: absolute; top: 1px; left: 29px; width: 11px; height: 11px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--bg); }
.avatar.xs { width: 26px; height: 26px; font-size: 11px; }

/* Heart */
.like-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--label-2); background: var(--fill); transition: transform 140ms var(--ease-out), color 160ms ease, background-color 160ms ease; }
.like-btn .icon { width: 22px; height: 22px; stroke-width: 2; }
.like-btn[aria-pressed="true"] { color: #FF2D55; background: rgba(255, 45, 85, 0.12); }
.like-btn[aria-pressed="true"] .icon { fill: currentColor; animation: heartpop 420ms var(--ease-out); }
.like-btn:active { transform: scale(0.88); transition: none; }
@keyframes heartpop { 0% { transform: scale(0.6); } 55% { transform: scale(1.22); } 100% { transform: scale(1); } }
.like-btn.on-photo { position: absolute; z-index: 2; top: 10px; right: 10px; color: #fff; background: rgba(0, 0, 0, 0.32); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.like-btn.on-photo[aria-pressed="true"] { color: #FF2D55; background: rgba(255, 255, 255, 0.92); }
.sheet-like { margin-left: auto; align-self: flex-start; }
.heart-mark { color: #FF2D55; display: grid; place-items: center; }
.heart-mark .icon { width: 16px; height: 16px; fill: currentColor; }
.verdict > div:not(.verdict-badge) { min-width: 0; }

/* ---------- Play screen ---------- */
.timebar { position: fixed; z-index: 21; left: 0; right: 0; top: calc(var(--nav-h) + env(safe-area-inset-top, 0px)); height: 3px; background: var(--fill); display: none; }
body.mode-play .timebar { display: block; }
.timebar span { display: block; height: 100%; background: var(--tint-fill); transform-origin: left center; transform: scaleX(1); }
.timebar.warn span { background: var(--orange-mark); }
.timebar.crit span { background: var(--red); }
.play { padding-top: 12px; gap: 16px; }
.play-media { position: static; }
.carousel { border-radius: 22px; box-shadow: var(--shadow-sm); }
.play-side { display: grid; gap: 14px; align-content: start; }
.play-head { background: var(--surface); border-radius: 22px; padding: 16px 18px 18px; }
.play-head .home-title { font-size: 26px; margin: 8px 0 4px; }
.play-head .home-loc { margin-bottom: 14px; font-size: 15px; }
.key-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.key-facts > div { display: grid; gap: 1px; align-content: start; padding: 10px 10px 9px; border-radius: 14px; background: var(--surface-2); min-width: 0; }
.key-facts .icon { width: 20px; height: 20px; color: var(--tint); margin-bottom: 3px; }
.key-facts b { font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.key-facts b .epc { height: 22px; font-size: 13px; }
.key-facts span { font-size: 12px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.key-facts:empty { display: none; }
.key-facts.compact { margin: 0 0 16px; }
.key-facts.compact > div { background: var(--fill); }
@media (max-width: 380px) { .key-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mini-h { margin: 0 0 10px; font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: -0.015em; }
.play-details { display: grid; gap: 16px; align-content: start; }
.play-details .card { padding: 16px; }
.play-details .loc-card { margin: 0; height: 260px; }
.facts-card .list { background: transparent; margin: 0 -16px -6px; }
.facts .row-label.muted { color: var(--label-2); }

/* The ring timer */
.ring { --ring: 104px; position: relative; width: var(--ring); height: var(--ring); flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--tint); }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3.2; }
.ring .track-c { stroke: var(--fill-2); }
.ring .prog { stroke: currentColor; stroke-linecap: round; }
.ring b { position: relative; font-family: var(--font-round); font-size: calc(var(--ring) * 0.36); line-height: 1; font-weight: 800; color: var(--label); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.ring small { position: relative; margin-top: 3px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--label-2); }
.ring.warn { color: var(--orange-mark); }
.ring.crit { color: var(--red); }
.ring.crit b { color: var(--red); animation: pulse 1s ease-in-out infinite; }
.ring.sm { --ring: 46px; }
.ring.sm b { font-size: 15px; }

/* The guess card */
.guess { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; padding: 18px; border-radius: 22px; background: var(--surface); box-shadow: 0 0 0 2px var(--tint-soft), var(--shadow-sm); }
.guess-body { min-width: 0; }
.guess-label { font-size: 15px; font-weight: 600; color: var(--label); margin-bottom: 9px; }
.guess-row-f .btn { padding: 0 22px; }
.guess-hint .kbd-hint { color: var(--label-3); }
@media (hover: none) { .guess-hint .kbd-hint { visibility: hidden; } }
@media (min-width: 920px) {
  .play { grid-template-columns: minmax(0, 7fr) minmax(360px, 5fr); grid-template-areas: "media side" "details side"; gap: 20px 24px; align-items: start; }
  .play-media { grid-area: media; }
  .play-side { grid-area: side; position: sticky; top: 14px; }
  .play-details { grid-area: details; }
  .play-head .home-title { font-size: 28px; }
}
@media (min-width: 1180px) { .play-details { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .play-details .loc-card { height: 100%; min-height: 300px; } .where-card { display: flex; flex-direction: column; } .where-card .loc-card { flex: 1; } }
@media (max-width: 919px) {
  .guess {
    grid-template-columns: auto minmax(0, 1fr); gap: 12px; border-radius: 22px 22px 0 0; box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.10);
    padding: 12px max(14px, env(safe-area-inset-left, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-right, 0px));
  }
  .guess .ring { --ring: 64px; }
  .guess .ring b { font-size: 23px; }
  .guess .ring small { font-size: 9px; margin-top: 1px; }
  .guess-label { font-size: 13px; color: var(--label-2); font-weight: 500; margin-bottom: 6px; }
  .guess-field { min-height: 50px; padding: 0 12px; }
  .guess-field .cur { font-size: 21px; }
  .guess-field input { font-size: 23px; }
  .guess-row-f { gap: 8px; }
  .guess-row-f .btn { min-height: 50px; padding: 0 18px; }
  .guess-hint { margin-top: 5px; font-size: 12px; min-height: 16px; }
  body.mode-play #scroller { padding-bottom: calc(158px + env(safe-area-inset-bottom, 0px)); }
  .carousel { margin: 0 -6px; border-radius: 20px; }
}
@media (max-width: 919px) and (min-width: 600px) { .guess { max-width: 640px; margin: 0 auto; border-radius: 22px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); padding-bottom: 12px; box-shadow: var(--shadow-lg); } }
body.mode-play .topbar-right .like-btn { width: 38px; height: 38px; }

/* Result and detail sheets */
.verdict h3 { margin: 0; font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
#r-note.good { color: var(--green); }
.detail-media { position: relative; margin-bottom: 14px; min-height: 52px; }
.detail-media .detail-photo { margin-bottom: 0; cursor: zoom-in; }
.photo-more { position: absolute; right: 10px; bottom: 10px; padding: 5px 11px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--label); box-shadow: var(--shadow-sm); }
.detail-tries { flex-direction: column; gap: 6px; }
.detail-tries > div { display: flex; gap: 8px; align-items: flex-start; }
#d-actual.muted { color: var(--label-3); font-size: 17px; font-weight: 600; }
.group-score { text-transform: none; letter-spacing: 0; }

/* ---------- How to play ---------- */
.demo { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); padding: 12px; border-radius: 20px; background: var(--bg); margin-bottom: 14px; }
@media (min-width: 640px) { .demo { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.demo-media { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--fill); }
.demo-photo { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.demo-count { position: absolute; right: 10px; top: 10px; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.demo-info { position: relative; display: grid; gap: 4px; align-content: start; padding: 14px; border-radius: 16px; background: var(--surface); }
.demo-title { font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.demo-loc { font-size: 13px; color: var(--label-2); margin-bottom: 8px; }
.demo-kf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.demo-kf > div { padding: 8px 9px 7px; }
.demo-kf b { font-size: 15px; }
.demo-guess { position: relative; display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px; border-radius: 14px; background: var(--surface); box-shadow: 0 0 0 2px var(--tint-soft); }
.demo-field { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 10px; border-radius: 10px; background: var(--fill); font-family: var(--font-display); font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; }
.demo-field .cur { color: var(--label-2); }
.demo-typed::after { content: ""; display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -3px; background: var(--tint-fill); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.demo-btn { min-height: 40px; padding: 0 14px; font-size: 15px; border-radius: 10px; pointer-events: none; }
.demo-num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--orange-mark); color: #fff; font-size: 13px; font-weight: 800; font-family: var(--font-round); box-shadow: 0 0 0 3px var(--surface); flex: none; }
.demo .demo-num { position: absolute; z-index: 2; }
.demo-num.n1 { left: 10px; top: 10px; }
.demo-num.n2 { right: 10px; top: 10px; }
.demo-num.n3 { left: 66px; top: -9px; }
.demo-num.n4 { left: 2px; top: -9px; }
.demo-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) { .demo-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.demo-legend li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 10px; align-items: start; font-size: 14px; color: var(--label-2); line-height: 1.4; }
.demo-legend .demo-num { grid-row: span 2; margin-top: 1px; box-shadow: none; }
.demo-legend b { color: var(--label); font-size: 15px; font-weight: 600; }
.doc-sec ul.icon-list { list-style: none; padding: 0; gap: 11px; }
.icon-list li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start; }
.icon-list .icon { width: 21px; height: 21px; color: var(--tint); margin-top: 1px; }
.icon-list .icon.heart { color: #FF2D55; }
.demo-result { padding: 16px; border-radius: 20px; background: var(--bg); margin-top: 4px; }
.demo-result .breakdown { margin-bottom: 0; }
.demo-result .prices { margin-bottom: 14px; }
.demo-result .scale { margin-bottom: 18px; }
.demo-days { margin: 0 0 16px; }
.demo-board { background: var(--surface-2); margin-bottom: 14px; }
.chart-card { margin: 4px 0 12px; padding: 14px 16px 12px; border-radius: 16px; background: var(--surface-2); }
.chart-title { display: block; font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.pchart { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 6px; height: 170px; align-items: end; border-bottom: 1px solid var(--sep); margin-bottom: 24px; }
.pc-col { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.pc-bar { width: 100%; max-width: 38px; border-radius: 5px 5px 0 0; background: var(--tint-bar); }
.pc-col.zone .pc-bar { background: var(--green-mark); }
.pc-n { font-size: 11px; font-weight: 600; color: var(--label-2); margin-bottom: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pc-x { position: absolute; top: 100%; margin-top: 6px; font-size: 11px; color: var(--label-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.chart-x { display: block; text-align: center; font-size: 12px; color: var(--label-2); }
@media (max-width: 420px) { .pc-n { font-size: 9.5px; } .pchart { gap: 4px; } }
.examples div > span:first-child { color: var(--label); font-weight: 600; }
.demo-map {
  position: relative; height: 190px; border-radius: 16px; overflow: hidden; margin-bottom: 14px;
  background:
    radial-gradient(90px 60px at 30% 70%, rgba(52, 199, 89, 0.18), transparent 70%),
    linear-gradient(115deg, transparent 46%, rgba(10, 132, 255, 0.16) 46%, rgba(10, 132, 255, 0.16) 50%, transparent 50%),
    repeating-linear-gradient(0deg, transparent 0 34px, var(--sep) 34px 36px),
    repeating-linear-gradient(90deg, transparent 0 46px, var(--sep) 46px 48px),
    var(--surface-2);
}
.dm-pin { position: absolute; width: 0; height: 0; }
.dm-pin::after { content: ""; position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--tint-fill); border: 2px solid var(--pin); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }
.dm-pin .pin-label { font-style: normal; }
.dm-cap { position: absolute; left: 10px; bottom: 10px; padding: 5px 11px; border-radius: 99px; font-size: 12px; font-weight: 600; box-shadow: var(--shadow-sm); }

/* ---------- Liked homes ---------- */
.title-count { font-size: 0.6em; color: var(--label-3); font-weight: 700; vertical-align: 0.15em; margin-left: 4px; font-variant-numeric: tabular-nums; }
.who-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 4px; }
.who-chips::-webkit-scrollbar { display: none; }
.who-chip { display: inline-flex; align-items: center; gap: 7px; flex: none; min-height: 38px; padding: 3px 12px 3px 4px; border-radius: 99px; background: var(--surface); color: var(--label); font-size: 15px; font-weight: 600; box-shadow: var(--shadow-sm); transition: background-color 160ms ease, color 160ms ease, transform 120ms ease; }
.who-chip small { min-width: 22px; padding: 1px 7px; border-radius: 99px; background: var(--fill); color: var(--label-2); font-size: 12px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.who-chip[aria-pressed="true"] { background: var(--tint-fill); color: #fff; }
.who-chip[aria-pressed="true"] small { background: rgba(255, 255, 255, 0.24); color: #fff; }
.who-chip:active { transform: scale(0.96); }
.who-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); }
.who-ic .icon { width: 17px; height: 17px; }
.who-chip[aria-pressed="true"] .who-ic { background: rgba(255, 255, 255, 0.24); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.search-field { flex: 1 1 240px; display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 12px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-sm); }
.search-field .icon { width: 18px; height: 18px; color: var(--label-2); }
.search-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 16px; }
.search-field:focus-within { box-shadow: 0 0 0 2px var(--tint); }
.filters .segmented { flex: 0 1 300px; }
.select { position: relative; display: inline-flex; flex: 0 0 auto; }
.select select { appearance: none; -webkit-appearance: none; min-height: 42px; padding: 0 34px 0 12px; border: 0; border-radius: 12px; background: var(--surface); color: var(--label); font-size: 15px; box-shadow: var(--shadow-sm); cursor: pointer; max-width: 100%; }
.select::after { content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; border-right: 2px solid var(--label-2); border-bottom: 2px solid var(--label-2); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
@media (max-width: 600px) { .filters .segmented { flex: 1 1 100%; } .select { flex: 1 1 calc(50% - 5px); } .select select { width: 100%; } }
.filter-note { margin: -4px 0 0; font-size: 13px; color: var(--label-2); }
.liked-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.liked-grid > .liked-empty, .liked-grid > .board-loading { grid-column: 1 / -1; }
.liked-empty p { margin: 10px 0 0; }
.home-card { background: var(--surface); border-radius: 20px; overflow: hidden; cursor: pointer; box-shadow: var(--shadow-sm); transition: transform 180ms var(--ease-out), box-shadow 180ms ease; min-width: 0; }
@media (hover: hover) { .home-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); } }
.home-card:active { transform: scale(0.985); }
.hc-media { position: relative; aspect-ratio: 4 / 3; background: var(--fill); }
.hc-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.hc-ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--label-3); }
.hc-ph .icon { width: 44px; height: 44px; }
.hc-chip { position: absolute; left: 10px; bottom: 10px; box-shadow: var(--shadow-sm); }
.hc-chip.sale { background: var(--surface); }
.hc-chip.rent { background: var(--surface); }
.hc-body { display: grid; gap: 2px; padding: 12px 14px 14px; min-width: 0; }
.hc-title { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-loc, .hc-facts { font-size: 13px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-price { margin-top: 6px; font-family: var(--font-display); font-size: 21px; font-weight: 700; letter-spacing: -0.015em; font-variant-numeric: tabular-nums; }
.hc-price.muted { font-size: 15px; font-weight: 600; color: var(--label-3); }
.hc-by { display: flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 12px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-by .icon { width: 13px; height: 13px; color: #FF2D55; fill: currentColor; }

/* ---------- Friends ---------- */
.page-lead.with-icon { display: flex; gap: 8px; align-items: flex-start; }
.page-lead.with-icon .icon { width: 20px; height: 20px; margin-top: 2px; color: var(--green); }
.code-card { position: relative; overflow: hidden; display: grid; gap: 6px; justify-items: center; text-align: center; padding: 22px 20px 20px; border-radius: 24px; color: #fff; background: linear-gradient(160deg, #3D9BFF, #0A5FE0 70%, #5B3FE0); box-shadow: 0 14px 30px rgba(0, 100, 240, 0.25); }
.code-card::before { content: ""; position: absolute; inset: 0; background: var(--pattern-w) 0 0 / 180px 180px; opacity: 0.9; pointer-events: none; }
.code-card > * { position: relative; }
.code-label { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.85; }
.code-value { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 36px; font-weight: 700; letter-spacing: 0.12em; line-height: 1.15; user-select: all; }
.code-card p { margin: 0; max-width: 42ch; font-size: 14px; opacity: 0.9; text-wrap: pretty; }
.code-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 14px; margin-top: 10px; }
.code-card .btn-primary { background: #fff; color: #0A5FE0; }
.code-card .btn-tinted { background: rgba(255, 255, 255, 0.2); color: #fff; }
.code-card .link-btn { color: rgba(255, 255, 255, 0.92); font-size: 14px; font-weight: 600; }
.code-card .link-btn.danger { color: #fff; background: rgba(255, 59, 48, 0.9); padding: 4px 10px; border-radius: 99px; }
.add-row { display: flex; gap: 10px; }
.code-input { flex: 1; min-width: 0; min-height: 50px; padding: 0 14px; border: 0; outline: 0; border-radius: 14px; background: var(--surface); font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 20px; letter-spacing: 0.1em; text-transform: uppercase; box-shadow: var(--shadow-sm); }
.code-input::placeholder { letter-spacing: 0; text-transform: none; font-family: var(--font); font-size: 16px; color: var(--label-3); }
.code-input:focus { box-shadow: 0 0 0 2px var(--tint); }
.add-row .btn { min-height: 50px; padding: 0 18px; flex: none; }
#fr-add-form .group-foot:empty { display: none; }
.friend-row { min-height: 64px; }
.list .friend-row + .friend-row::before { left: 60px; }
.friend-row .row-label b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-actions { display: flex; gap: 6px; flex: none; }
.btn-xs { min-height: 32px; padding: 0 12px; font-size: 14px; border-radius: 10px; gap: 5px; }
.btn-xs .icon { width: 16px; height: 16px; }
.btn.armed, .danger-btn.armed { background: var(--red); color: #fff; }
.friends-hint { display: flex; justify-content: center; align-items: center; gap: 6px; flex-wrap: wrap; }
.friends-hint .icon { width: 16px; height: 16px; flex: none; }
@media (max-width: 480px) { .hide-sm { display: none; } }
#view-friends .group { margin: 0; }

/* ---------- Settings additions ---------- */
.toggle { position: relative; width: 51px; height: 31px; border-radius: 16px; flex: none; background: var(--fill-2); transition: background-color 220ms ease; margin-left: auto; }
.toggle[aria-checked="true"] { background: var(--green-mark); }
.toggle-thumb { position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(0, 0, 0, 0.16); transition: transform 320ms var(--ease-sheet); }
.toggle[aria-checked="true"] .toggle-thumb { transform: translateX(20px); }
.settings .remind-row { margin-top: 14px; }
.remind-row .row { align-items: center; }
.remind-row .row-label small { margin-top: 1px; }
#s-remind, #s-theme { margin-left: auto; display: flex; }
.reset-line { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; padding: 12px 4px 0; font-size: 14px; color: var(--label-2); }
.reset-line .link-btn { font-size: 14px; font-weight: 600; }
.reset-line .link-btn.busy { opacity: 0.5; pointer-events: none; }
.danger-stack { display: grid; gap: 10px; }
.settings .segmented button { min-height: 38px; font-size: 15px; }

.doc-h { margin: 0 0 14px; font-family: var(--font-display); font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.demo-media { aspect-ratio: auto; min-height: 220px; }
@media (max-width: 639px) { .demo-media { aspect-ratio: 16 / 10; min-height: 0; } }
.carousel, .slide, .loc-card, .loc-card #play-map, .map-wrap, #map, .hc-media, .detail-photo { background-color: var(--surface-2); }
@media (max-width: 519px) {
  .play-head .key-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .play-head .key-facts > div { grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: center; padding: 9px 10px; }
  .play-head .key-facts .icon { grid-row: span 2; margin: 0; }
}
.page > .page-head:first-child { margin-top: 14px; }
#fr-lists { display: grid; gap: 18px; }
#fr-lists:empty { display: none; }
/* Soft buttons and segmented controls stay opaque, so the background pattern never shows through them */
:root { --seg-solid: #E3E3E8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --seg-solid: #2A2A2D; } }
:root[data-theme="dark"] { --seg-solid: #2A2A2D; }
.btn-tinted { background: color-mix(in srgb, var(--tint) 13%, var(--surface)); }
.danger-btn { background: color-mix(in srgb, var(--red) 13%, var(--surface)); }
.page > .segmented, .board-section .segmented, .history .segmented, .filters .segmented, .settings .segmented, .auth .segmented { background: var(--seg-solid); }
.card .segmented, .list .segmented { background: var(--fill); }
.code-card .btn-tinted { background: rgba(255, 255, 255, 0.2); }
@media (min-width: 920px) { body.mode-play .toast { bottom: auto; top: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 14px); transform: translate(-50%, -12px); } body.mode-play .toast.on { transform: translate(-50%, 0); } }

/* ====================== v4: map beside the guess, the same details for every home, region picker ====================== */
/* Play: the map sits under the guess card and fills the side column */
.play-side .where-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.play-side .loc-card { margin: 0; height: 300px; border-radius: 22px; }
.play-side .loc-card.expanded { border-radius: 0; }
@media (min-width: 920px) {
  .play-side .loc-card { height: 340px; }
}
@media (min-width: 920px) and (min-height: 760px) {
  .play-side { height: calc(100dvh - var(--nav-h) - env(safe-area-inset-top, 0px) - 34px); grid-template-rows: auto auto minmax(260px, 1fr); }
  .play-side .where-card { min-height: 260px; }
  .play-side .loc-card { height: auto; flex: 1; min-height: 260px; }
}
@media (min-width: 920px) and (min-height: 760px) { .play-side .loc-card.expanded { height: auto; } }
@media (max-width: 919px) { .play-side .loc-card { height: 280px; } }
.play-details { grid-template-columns: minmax(0, 1fr) !important; }
.play-details .facts-card { padding: 16px 16px 8px; }

/* The fixed list of details */
.facts-grid { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 22px; }
@media (min-width: 560px) { .play-details .facts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .play-details .fact-row:nth-child(2) { border-top: 0; } }
.fact-row { display: flex; align-items: center; gap: 11px; min-height: 46px; border-top: 0.5px solid var(--sep); min-width: 0; }
.fact-row:first-child { border-top: 0; }
.fact-label { flex: 1; min-width: 0; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fact-val { flex: none; max-width: 55%; text-align: right; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fact-row.unknown .fact-val { color: var(--label-3); font-weight: 500; }
.fact-row.na .fact-val { color: var(--label-3); font-weight: 500; }
.fact-row.na .row-icon-tile, .fact-row.unknown .row-icon-tile { background: var(--fill); color: var(--label-3); }
.key-facts > div.missing b { color: var(--label-3); }
.key-facts > div.missing .icon { color: var(--label-3); }

/* Infinite: quick picks and the province/region tree */
.preset-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.preset-chip { min-height: 34px; padding: 0 14px; border-radius: 99px; background: var(--surface-2); color: var(--label); font-size: 14px; font-weight: 600; transition: background-color 160ms ease, color 160ms ease, transform 120ms ease; }
.preset-chip[aria-pressed="true"] { background: var(--tint-fill); color: #fff; }
.preset-chip:active { transform: scale(0.96); }
.tree-group + .tree-group { margin-top: 16px; }
.area-tree .list { overflow: visible; }
.tree-area + .tree-area { border-top: 0.5px solid var(--sep); }
.area-row { padding: 0 8px 0 4px; gap: 2px; min-height: 54px; }
.tree-box-btn { width: 42px; height: 42px; display: grid; place-items: center; flex: none; border-radius: 10px; }
.tree-box { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--label-3); display: grid; place-items: center; color: #fff; flex: none; transition: background-color 140ms ease, border-color 140ms ease; }
.tree-box .icon { width: 15px; height: 15px; stroke-width: 3; visibility: hidden; }
[aria-checked="true"] > .tree-box, [aria-checked="mixed"] > .tree-box { background: var(--tint-fill); border-color: var(--tint-fill); }
[aria-checked="true"] > .tree-box .icon, [aria-checked="mixed"] > .tree-box .icon { visibility: visible; }
.tree-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 6px 4px; text-align: left; border-radius: 10px; }
.tree-name .row-label { font-size: 16px; font-weight: 600; }
.tree-name .row-label small { font-weight: 400; }
.tree-name .row-value { font-size: 14px; }
.tree-chev { width: 16px; height: 16px; color: var(--label-3); stroke-width: 2.4; flex: none; transition: transform 220ms var(--ease-out); }
.tree-name[aria-expanded="true"] .tree-chev { transform: rotate(180deg); }
.tree-regions { padding: 0 6px 8px 40px; }
.region-row { min-height: 44px; padding: 6px 8px; gap: 10px; border-radius: 10px; }
.region-row .tree-box { width: 20px; height: 20px; border-radius: 6px; }
.region-row .row-label { font-size: 15px; }
.region-row .row-value { font-size: 13px; }
.list .region-row + .region-row::before { left: 38px; }
.tree-area.dim .tree-name .row-label, .region-row.dim .row-label { color: var(--label-3); }
@media (hover: hover) { .tree-name:hover, .region-row:hover { background: var(--fill); } }

/* Daily: today's regions and what the challenge draws from */
.daily-regions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; }
.daily-regions:empty { display: none; }
.dr-label { font-size: 12px; color: var(--label-2); text-transform: uppercase; letter-spacing: 0.04em; margin-right: 2px; }
.region-chip { display: inline-flex; align-items: baseline; gap: 5px; padding: 4px 10px; border-radius: 99px; background: var(--tint-soft); color: var(--tint); font-size: 13px; }
.region-chip b { font-weight: 600; }
.region-chip small { font-size: 12px; opacity: 0.85; }
.region-chip.nl { background: var(--orange-soft); color: var(--orange); }
.daily-draws { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 13px; color: var(--label-2); line-height: 1.4; }
.daily-draws .icon { width: 16px; height: 16px; flex: none; margin-top: 1px; }

/* How to play: the round drawn in the game's own layout */
@media (min-width: 640px) { .demo { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.demo-left, .demo-right { display: grid; gap: 10px; align-content: start; min-width: 0; }
.demo-media { aspect-ratio: 4 / 3; min-height: 0; }
.demo-card { position: relative; background: var(--surface); border-radius: 16px; padding: 12px 14px; }
.demo-info { padding: 14px; }
.demo-guess { margin-top: 0; }
.demo .facts-grid { grid-template-columns: minmax(0, 1fr); }
.demo .fact-row { min-height: 34px; gap: 9px; }
.demo .fact-label, .demo .fact-val { font-size: 13px; }
.demo .row-icon-tile { width: 24px; height: 24px; border-radius: 7px; }
.demo .row-icon-tile .icon { width: 15px; height: 15px; }
.demo-details .mini-h { display: block; margin-bottom: 4px; }
.demo-where { padding: 0; overflow: hidden; }
.dw-map {
  position: relative; height: 170px;
  background:
    radial-gradient(70px 50px at 30% 70%, rgba(52, 199, 89, 0.18), transparent 70%),
    linear-gradient(115deg, transparent 46%, rgba(10, 132, 255, 0.16) 46%, rgba(10, 132, 255, 0.16) 50%, transparent 50%),
    repeating-linear-gradient(0deg, transparent 0 30px, var(--sep) 30px 32px),
    repeating-linear-gradient(90deg, transparent 0 42px, var(--sep) 42px 44px),
    var(--surface-2);
}
.dw-here { position: absolute; left: 50%; top: 56%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; background: var(--tint-fill); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); }
.dw-here::after { content: ""; position: absolute; inset: -12px; border-radius: 50%; background: var(--tint-fill); opacity: 0.22; animation: halo 2.4s ease-out infinite; }
.dw-map .loc-btn { width: 32px; height: 32px; top: 8px; right: 8px; }
.dw-map .loc-label { top: 8px; left: 8px; }
.demo-num.n5 { left: 10px; bottom: 10px; }
.demo-num.n6 { right: 10px; top: 10px; }
.fact-val { white-space: normal; max-width: 62%; line-height: 1.25; overflow-wrap: anywhere; }
.fact-row { padding: 6px 0; }
/* On phones the demo follows the game's phone order: photos, facts, guess, map, details */
@media (max-width: 639px) {
  .demo-left, .demo-right { display: contents; }
  .demo-media { order: 1; } .demo-info { order: 2; } .demo-guess { order: 3; } .demo-where { order: 4; } .demo-details { order: 5; }
}

/* ---------- v5: Higher or Lower ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
body.mode-hl .timebar { display: none; }
.tiles.tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tiles.tiles-3 .tile { display: flex; flex-direction: column; justify-content: space-between; }
.tiles.tiles-3 .tile span { white-space: normal; line-height: 1.25; }
@media (max-width: 420px) { .tiles.tiles-3 .tile { padding: 12px 10px 10px; } .tiles.tiles-3 .tile b { font-size: 22px; } }

/* Setup page */
.hl-start { align-content: start; }
.hl-start .group { margin: 0 0 6px; }
.hl-start .group-head { padding-left: 2px; padding-right: 2px; }
.hl-start .segmented { width: 100%; }
.hl-mk-note { margin: 8px 2px 0; font-size: 13px; color: var(--label-2); line-height: 1.4; }
.hl-start .btn-xl { margin-top: 6px; }

/* Play: two homes side by side, the question in between (wide) or docked at the bottom (narrow) */
#view-hlplay.view-enter { animation-name: fadein; }
@keyframes fadein { from { opacity: 0; } }
.hl-play { max-width: 1240px; margin: 0 auto; padding-top: 12px; display: grid; gap: 16px; }
.hl-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.hl-card { background: var(--surface); border-radius: 22px; overflow: hidden; min-width: 0; box-shadow: var(--shadow-sm); }
.hl-media { aspect-ratio: 4 / 3; border-radius: 0; box-shadow: none; margin: 0 !important; }
.hl-media .photo-count { top: auto; bottom: 10px; right: 10px; }
.hl-tag { display: inline-grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 8px; background: var(--tint-fill); color: #fff; font-family: var(--font-round); font-size: 13px; font-weight: 800; line-height: 1; }
.hl-tag.b { background: var(--orange-mark); }
.hl-tag.on-photo { position: absolute; z-index: 2; left: 10px; top: 10px; width: 32px; height: 32px; border-radius: 10px; font-size: 16px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28); }
.hl-body { padding: 14px 16px 16px; min-width: 0; }
.hl-price-box { border-radius: 16px; padding: 10px 14px 11px; background: var(--fill); margin-bottom: 12px; min-width: 0; transition: background-color 240ms ease; }
.hl-price-box > span { display: block; font-size: 13px; color: var(--label-2); }
.hl-price { display: block; font-family: var(--font-round); font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hl-price-box.q { background: var(--orange-soft); }
.hl-price.unknown { color: var(--orange); }
.hl-price.ok { color: var(--green); }
.hl-price.miss { color: var(--red); }
.hl-price.ok, .hl-price.miss { transform-origin: left center; animation: hlprice 460ms var(--ease-out); }
@keyframes hlprice { 0% { transform: scale(1); } 45% { transform: scale(1.07); } 100% { transform: scale(1); } }
.hl-body .eyebrow { font-size: 12px; }
.hl-body .home-title { font-size: 22px; margin: 4px 0 4px; }
.hl-body .home-loc { font-size: 14px; margin-bottom: 12px; }
.hl-body .home-loc .icon { width: 16px; height: 16px; }
.hl-in-a { animation: hlInA 460ms var(--ease-out) both; }
.hl-in-b { animation: hlInB 460ms var(--ease-out) 60ms both; }
@keyframes hlInA { from { opacity: 0.4; transform: translateX(28%) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes hlInB { from { opacity: 0; transform: translateX(36px); } to { opacity: 1; transform: none; } }

.hl-vs { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--label); color: var(--surface); font-family: var(--font-round); font-weight: 800; font-size: 17px; letter-spacing: 0.02em; transition: background-color 200ms ease; }
.hl-vs.ok { background: var(--green-mark); color: #fff; animation: pop 460ms var(--ease-out); }
.hl-vs.miss { background: var(--red); color: #fff; animation: pop 460ms var(--ease-out); }
.hl-vs .icon { width: 28px; height: 28px; stroke-width: 2.8; }
.hl-q { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.35; text-wrap: balance; font-variant-numeric: tabular-nums; }
.hl-vs.ok + .hl-q b { color: var(--green); }
.hl-vs.miss + .hl-q b { color: var(--red); }
.hl-btn { min-height: 56px; width: 100%; font-size: 18px; border-radius: 16px; background: var(--tint-fill); color: #fff; }
.hl-btn .icon { width: 22px; height: 22px; stroke-width: 2.6; }
.hl-btn:disabled { opacity: 0.32; cursor: default; transform: none; }
.hl-btn.chosen:disabled { opacity: 1; }
.hl-mid.done .hl-btn.chosen { box-shadow: 0 0 0 3px var(--tint-soft); }
.hl-mid.ok .hl-btn.chosen { background: var(--green-mark); box-shadow: 0 0 0 3px var(--green-soft); }
.hl-mid.miss .hl-btn.chosen { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.hl-keys { margin: 0; }
@media (min-width: 1000px) {
  .hl-pair { grid-template-columns: minmax(0, 1fr) 210px minmax(0, 1fr); gap: 18px; }
  .hl-mid { position: sticky; top: 18px; margin-top: 70px; display: grid; justify-items: center; gap: 12px; padding: 22px 16px 18px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-sm); text-align: center; }
  .hl-btns { display: grid; gap: 10px; width: 100%; }
}
@media (max-width: 999px) {
  .hl-mid {
    position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 10px; align-items: center;
    padding: 12px max(14px, env(safe-area-inset-left, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-right, 0px));
    background: var(--surface); border-radius: 22px 22px 0 0; box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.12);
  }
  .hl-mid .hl-vs, .hl-keys { display: none; }
  .hl-mid .hl-q { grid-column: 1 / -1; text-align: center; font-size: 14px; min-height: 19px; }
  .hl-btns { display: contents; }
  .hl-btn { min-height: 52px; font-size: 17px; }
  body.mode-hl #scroller { padding-bottom: calc(142px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 999px) and (min-width: 600px) { .hl-mid { max-width: 560px; margin: 0 auto; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); padding-bottom: 12px; border-radius: 22px; box-shadow: var(--shadow-lg); } }
@media (max-width: 639px) {
  .hl-play { padding-top: 8px; gap: 12px; }
  .hl-pair { gap: 8px; }
  .hl-card { border-radius: 18px; }
  .hl-media { aspect-ratio: 1 / 1; }
  .hl-media .car-btn { display: none; }
  .hl-media .photo-count { bottom: 6px; right: 6px; padding: 2px 7px; font-size: 11px; }
  .hl-tag.on-photo { left: 7px; top: 7px; width: 26px; height: 26px; border-radius: 8px; font-size: 13px; }
  .hl-media .like-btn.on-photo { top: 6px; right: 6px; width: 34px; height: 34px; }
  .hl-media .like-btn.on-photo .icon { width: 19px; height: 19px; }
  .hl-body { padding: 9px 9px 11px; }
  .hl-price-box { padding: 6px 9px 7px; border-radius: 12px; margin-bottom: 8px; }
  .hl-price-box > span { font-size: 11px; }
  .hl-price { font-size: 19px; }
  .hl-body .eyebrow { font-size: 11px; }
  .hl-body .home-title { font-size: 15px; line-height: 1.2; margin: 2px 0 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .hl-body .home-loc { font-size: 12px; gap: 3px; margin-bottom: 8px; line-height: 1.3; }
  .hl-body .home-loc .icon { width: 13px; height: 13px; margin-top: 1px; }
  .hl-body .key-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
  .hl-body .key-facts > div { padding: 6px 7px 6px; border-radius: 10px; }
  .hl-body .key-facts .icon { width: 15px; height: 15px; margin-bottom: 1px; }
  .hl-body .key-facts b { font-size: 14px; }
  .hl-body .key-facts b .epc { height: 19px; font-size: 11px; }
  .hl-body .key-facts span { font-size: 10.5px; }
}

/* All details, side by side */
.hl-compare { padding: 16px 16px 8px; }
.hl-table { display: grid; }
.hl-tr { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: center; padding: 9px 0; border-top: 0.5px solid var(--sep); font-size: 15px; }
.hl-th { border-top: 0; padding: 0 0 6px; }
.hl-tl { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hl-tl > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.hl-td { font-weight: 600; overflow-wrap: anywhere; line-height: 1.3; }
.hl-td.unknown, .hl-td.na { color: var(--label-3); font-weight: 500; }
@media (max-width: 639px) {
  .hl-compare { padding: 14px 12px 6px; }
  .hl-tr { gap: 8px; font-size: 13px; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr); }
  .hl-tl { gap: 7px; }
  .hl-tl .row-icon-tile { width: 24px; height: 24px; border-radius: 7px; }
  .hl-tl .row-icon-tile .icon { width: 15px; height: 15px; }
}
@media (max-width: 380px) { .hl-tl .row-icon-tile { display: none; } }

/* Map with both homes */
.hl-map-card { padding: 16px; }
.hl-map { height: 300px; border-radius: 14px; overflow: hidden; background: var(--fill); }
@media (max-width: 639px) { .hl-map { height: 240px; } .hl-map-card { padding: 14px 12px; } }
.hl-foot { display: flex; gap: 6px; align-items: center; margin: 10px 2px 0; font-size: 13px; color: var(--label-2); }
.hl-foot .icon { width: 16px; height: 16px; }
.hl-pin-in { position: absolute; left: 0; top: 0; transform: translate(-50%, calc(-100% - 8px)); display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 99px; background: var(--pin); color: var(--pin-fg); font-size: 13px; font-weight: 700; white-space: nowrap; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28); font-variant-numeric: tabular-nums; }
.hl-pin-in::after { content: ""; position: absolute; left: 50%; bottom: -4px; width: 10px; height: 10px; margin-left: -5px; background: var(--pin); transform: rotate(45deg); border-radius: 2px; z-index: -1; }
.hl-pin-in b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--tint-fill); color: #fff; font-family: var(--font-round); font-size: 12px; font-weight: 800; }
.hl-pin-in.b b { background: var(--orange-mark); }

/* Streak in the top bar */
.hl-streak { display: inline-flex; align-items: center; gap: 3px; min-height: 34px; padding: 0 12px 0 9px; border-radius: 99px; background: var(--orange-soft); color: var(--orange); font-family: var(--font-round); font-size: 17px; font-weight: 800; }
.hl-streak .icon { width: 19px; height: 19px; stroke-width: 2.2; }
.hl-streak.bump { animation: pop 520ms var(--ease-out); }

/* End of a run */
#hlo-homes:empty { display: none; }
#hlo-homes .row { gap: 10px; color: var(--label); }
.price-box.best b { color: var(--green); }

/* How to play: a small Higher or Lower picture */
.demo-hl { display: grid; gap: 14px; margin: 4px 0 18px; }
.dhl-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: center; }
.dhl-card { display: grid; gap: 1px; padding: 10px 10px 12px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm); min-width: 0; }
.dhl-photo { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; border-radius: 12px; margin-bottom: 8px; color: rgba(255, 255, 255, 0.92); background: linear-gradient(160deg, #a8efbf, #34C759); }
.dhl-photo.b { background: linear-gradient(160deg, #ffd29a, #FF9F0A); }
.dhl-photo > .icon { width: 40px; height: 40px; }
.dhl-photo .hl-tag { position: absolute; left: 8px; top: 8px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); }
.dhl-label { font-size: 12px; color: var(--label-2); }
.dhl-price { font-family: var(--font-round); font-size: 22px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.dhl-price.q { color: var(--orange); }
.dhl-card small { font-size: 13px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dhl-mid { display: grid; gap: 8px; justify-items: center; }
.dhl-mid .hl-vs { width: 44px; height: 44px; font-size: 14px; }
.dhl-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 92px; padding: 8px 12px; border-radius: 12px; background: var(--tint-fill); color: #fff; font-size: 14px; font-weight: 600; }
.dhl-btn .icon { width: 16px; height: 16px; stroke-width: 2.6; }
.dhl-chain { display: grid; gap: 6px; justify-items: center; text-align: center; }
.dhl-links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; color: var(--label-3); }
.dhl-links > .icon { width: 16px; height: 16px; stroke-width: 2.4; }
.dhl-link { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--fill); }
.dhl-link i { font-style: normal; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--surface); color: var(--label); font-family: var(--font-round); font-weight: 800; font-size: 13px; }
.dhl-link.now i:first-child { background: var(--tint-fill); color: #fff; }
.dhl-link.now i:last-child { background: var(--orange-mark); color: #fff; }
.dhl-more { color: var(--label-3); font-weight: 700; }
.dhl-chain small { color: var(--label-2); font-size: 13px; }
@media (max-width: 480px) {
  .dhl-pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .dhl-mid { grid-column: 1 / -1; grid-row: 2; grid-auto-flow: column; align-items: center; }
  .dhl-price { font-size: 19px; }
  .dhl-more { display: none; }
  .dhl-links { gap: 4px; }
}

/* ---------- v6: How to play in tabs, safety notes ---------- */
.rules-tabs {
  position: sticky; z-index: 6; top: 8px;   /* the scroller's padding already keeps it below the top bar */
  display: flex; gap: 2px; padding: 4px; border-radius: 16px; overflow-x: auto; scrollbar-width: none;
  background: var(--bar); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 0 0 0.5px var(--sep), var(--shadow-sm);
}
.rules-tabs::-webkit-scrollbar { display: none; }
.rules-tab { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 12px; color: var(--label-2); font-size: 14px; font-weight: 600; white-space: nowrap; transition: background-color 160ms ease, color 160ms ease; }
.rules-tab .icon { width: 18px; height: 18px; stroke-width: 2; }
.rules-tab .rt-short { display: none; }
.rules-tab[aria-selected="true"] { background: var(--surface); color: var(--label); box-shadow: var(--shadow-sm); }
.rules-tab[aria-selected="true"] .icon { color: var(--tint); }
.rules-tab[data-rt="inf"][aria-selected="true"] .icon { color: #7342E6; }
.rules-tab[data-rt="hl"][aria-selected="true"] .icon { color: #0A63E8; }
.rules-tab[data-rt="friends"][aria-selected="true"] .icon { color: var(--green); }
@media (hover: hover) { .rules-tab:not([aria-selected="true"]):hover { background: var(--fill); } }
@media (max-width: 640px) {
  .rules-tabs { gap: 0; padding: 3px; }
  .rules-tab { flex: 1 1 0; min-width: 0; flex-direction: column; gap: 2px; min-height: 50px; padding: 5px 2px; font-size: 11px; border-radius: 11px; }
  .rules-tab .rt-long { display: none; }
  .rules-tab .rt-short { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .rules-tab .icon { width: 20px; height: 20px; }
}
.rules-panel { display: grid; gap: 16px; }
.rules-panel .doc-sec { scroll-margin-top: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 82px); }
.doc-note { margin: -6px 0 14px !important; color: var(--label-2); font-size: 14px !important; }

/* a mode's header: icon, name, one line and three numbers */
.rules-hero { display: grid; gap: 14px; padding: 18px 20px 20px; border-radius: var(--card-r); background: var(--surface); }
.rh-top { display: flex; align-items: center; gap: 14px; }
.rules-hero .mode-icon { width: 54px; height: 54px; border-radius: 16px; }
.rules-hero .mode-icon .icon { width: 29px; height: 29px; }
.rules-hero.infinite .mode-icon, .glance-row.infinite .mode-icon { background: linear-gradient(180deg, #B48BFF, #7342E6); }
.rules-hero.hl .mode-icon, .glance-row.hl .mode-icon { background: linear-gradient(180deg, #5AB0FF, #0A63E8); }
.rules-hero h2 { margin: 0; font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.rules-hero p { margin: 2px 0 0; color: var(--label-2); font-size: 15px; line-height: 1.4; }

/* three ways to play */
.glance { display: grid; gap: 8px; }
.glance-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border-radius: 16px; background: var(--surface-2); color: var(--label); text-align: left; transition: transform 120ms var(--ease-out); }
.glance-row:active { transform: scale(0.98); }
.glance-row .mode-icon { width: 44px; height: 44px; border-radius: 13px; }
.glance-row .mode-icon .icon { width: 24px; height: 24px; }
.gl-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.gl-text b { font-size: 16px; font-weight: 700; }
.gl-text span { font-size: 14px; color: var(--label-2); line-height: 1.35; }
.glance-row > .icon { width: 18px; height: 18px; color: var(--label-3); stroke-width: 2.4; }

/* bottom of each tab: play this mode, then the next tab */
.rules-foot { display: grid; gap: 10px; }
.rules-next { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 13px 18px; border-radius: 18px; background: var(--surface); color: var(--label); text-align: left; }
.rules-next small { display: block; font-size: 12px; color: var(--label-2); text-transform: uppercase; letter-spacing: 0.05em; }
.rules-next b { font-size: 17px; font-weight: 700; }
.rules-next .icon { width: 20px; height: 20px; color: var(--tint); stroke-width: 2.4; }
@media (hover: hover) { .rules-next:hover, .glance-row:hover { background: var(--fill); } }

/* your data is safe */
.row-icon-tile.safe { background: var(--orange-soft); color: var(--orange); }
.safe-table { display: grid; margin: 4px 0 16px; border-radius: 14px; background: var(--surface-2); overflow: hidden; }
.st-row { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); gap: 12px; padding: 11px 14px; font-size: 15px; }
.st-row + .st-row { border-top: 0.5px solid var(--sep); }
.st-head { padding-top: 9px; padding-bottom: 7px; font-size: 12px; color: var(--label-2); text-transform: uppercase; letter-spacing: 0.04em; }
.st-row b { font-weight: 600; }
.st-row small { display: block; margin-top: 2px; font-size: 13px; color: var(--label-2); line-height: 1.4; }
.st-who.you, .st-who.nobody { color: var(--green); }
.st-who.friends { color: var(--tint); }
@media (max-width: 480px) { .st-row { grid-template-columns: minmax(0, 1fr); gap: 2px; } .st-head { display: none; } }
.safe-note { display: flex; gap: 10px; align-items: flex-start; width: min(420px, 100%); margin: 14px auto 0; padding: 12px 14px; border-radius: 16px; background: var(--green-soft); color: var(--label); font-size: 13px; line-height: 1.45; }
.safe-note .icon { width: 20px; height: 20px; flex: none; color: var(--green); margin-top: 1px; }
.safe-note a { color: var(--tint); font-weight: 600; white-space: nowrap; }
.safe-foot { display: flex; gap: 6px; align-items: flex-start; }
.safe-foot .icon { width: 15px; height: 15px; flex: none; margin-top: 1px; color: var(--green); }
.head-link { justify-self: start; margin-top: 2px; }
.auth-hint { margin: -2px 2px 12px; font-size: 13px; line-height: 1.45; color: var(--label-2); }
.field.static b.muted { color: var(--label-3); font-weight: 500; }
.src-note { margin: 12px 0 0; font-size: 12px; line-height: 1.4; color: var(--label-3); }
.legal-line { margin: 6px auto 0; max-width: 440px; text-align: center; font-size: 12px; line-height: 1.45; color: var(--label-3); }
.legal-line a { color: var(--label-2); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- v7: Settings with categories, sharing liked homes ---------- */
.settings-page { max-width: 980px; }
.set-layout { display: grid; gap: 16px; align-items: start; }
.set-nav { display: grid; gap: 2px; padding: 6px; border-radius: var(--card-r); background: var(--surface); }
.set-nav-item { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 10px; border-radius: 14px; color: var(--label); transition: background-color 160ms ease; }
.set-nav-item .row-icon-tile { color: #fff; background: #007AFF; }
.set-nav-item.c-notify .row-icon-tile { background: #FF3B30; }
.set-nav-item.c-appearance .row-icon-tile { background: #5856D6; }
.set-nav-item.c-privacy .row-icon-tile { background: #FF9500; }
.set-nav-item.c-account .row-icon-tile { background: #636366; }
.sn-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.sn-text b { font-size: 16px; font-weight: 600; }
.sn-text small { font-size: 13px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-nav-item .chev { width: 16px; height: 16px; color: var(--label-3); stroke-width: 2.4; }
.set-nav-item[aria-current="page"] { background: var(--tint-soft); }
.set-nav-item[aria-current="page"] .sn-text b { color: var(--tint); }
@media (hover: hover) { .set-nav-item:not([aria-current="page"]):hover { background: var(--fill); } }
.set-panel { display: grid; gap: 18px; min-width: 0; }
.set-panel-h { margin: 0; font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.set-back { display: none; justify-self: start; }
@media (min-width: 800px) {
  .set-layout { grid-template-columns: 270px minmax(0, 1fr); gap: 28px; }
  .set-nav { position: sticky; top: 12px; }
  .set-nav-item .chev { display: none; }
}
@media (max-width: 799px) {
  #view-settings.in-cat .set-nav, #view-settings.in-cat .large-title { display: none; }
  #view-settings:not(.in-cat) .set-panels { display: none; }
  .set-back { display: inline-flex; margin-top: 6px; }
  .set-panel-h { font-size: 30px; }
}
.row-link { color: var(--label); }
.row-link .chev { width: 16px; height: 16px; color: var(--label-3); stroke-width: 2.4; }

/* who sees my liked homes */
.share-list .row { gap: 12px; }
.share-list .toggle { margin-left: auto; flex: none; }
.share-list .row-label small { margin-top: 1px; }
.share-empty { padding: 18px 14px 16px; }
.share-empty a { color: var(--tint); font-weight: 600; }
.share-lead { padding-top: 0; padding-bottom: 10px; line-height: 1.45; }
#share-sheet .share-list { margin-bottom: 18px; }
.liked-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.liked-top .who-chips { flex: 1; min-width: 0; margin: 0; padding-left: 0; padding-right: 0; }
.share-btn { flex: none; }
@media (max-width: 600px) { .liked-top { flex-direction: column; align-items: stretch; } .liked-top .who-chips { margin: 0 -16px; padding: 2px 16px 4px; } .share-btn { align-self: flex-start; } }
.share-hint { margin: 8px 0 0; color: var(--label-2); }

/* dark mode in the account menu */
.menu-theme #menu-theme { flex: none; display: flex; }
.menu-theme .theme-switch { margin-left: auto; }

/* ---------- v8: Pricy, About ---------- */
.set-nav-item.c-about .row-icon-tile { background: none; padding: 0; overflow: hidden; }
.about-tile svg { width: 30px; height: 30px; display: block; }
.about-hero { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--card-r); background: var(--surface); }
.about-hero .logo { width: 64px; height: 64px; flex: none; filter: drop-shadow(0 6px 14px rgba(30, 158, 74, 0.28)); }
.about-hero b { display: block; font-family: var(--font-display); font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.about-hero span { color: var(--label-2); font-size: 15px; }
.about-card p { margin: 0; font-size: 16px; line-height: 1.5; }
.about-card p + p { margin-top: 10px; color: var(--label-2); font-size: 15px; }
.about-list .row-label > span { font-weight: 600; }
.row-icon-tile.coffee { background: #FFDD00; color: #3A2A00; }
button.row { font: inherit; color: var(--label); background: none; cursor: pointer; }
.about-credits { line-height: 1.5; }

/* ---------- v9: Game modes as tiles, a street on the home page ---------- */
.modes-page { max-width: 980px; }
.mode-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 760px) { .mode-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
.mode-tile {
  position: relative; isolation: isolate; overflow: hidden; aspect-ratio: 1; display: flex; flex-direction: column;
  padding: 18px 18px 18px; border-radius: 28px; color: #fff; text-decoration: none;
  box-shadow: 0 10px 26px var(--mt-glow, rgba(0, 0, 0, 0.12)), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: transform 180ms var(--ease-out), box-shadow 240ms ease;
}
.mode-tile.m-daily { --mt-glow: rgba(22, 120, 52, 0.28); background: linear-gradient(165deg, #5CD58A 0%, #24A150 46%, #136631 100%); }
.mode-tile.m-inf { --mt-glow: rgba(91, 47, 201, 0.28); background: linear-gradient(165deg, #B996FF 0%, #7B4BF0 48%, #4B22B3 100%); }
.mode-tile.m-hl { --mt-glow: rgba(10, 79, 196, 0.28); background: linear-gradient(165deg, #74BDFF 0%, #2380F2 48%, #0A4CBF 100%); }
.mode-tile::before { content: ""; position: absolute; z-index: -1; inset: 0; background: radial-gradient(120% 70% at 50% 0%, rgba(255, 255, 255, 0.22), transparent 60%); pointer-events: none; }
a.mode-tile:active { transform: scale(0.97); transition: none; }
@media (hover: hover) {
  a.mode-tile:hover { transform: translateY(-3px); box-shadow: 0 18px 38px var(--mt-glow), inset 0 1px 0 rgba(255, 255, 255, 0.22); }
  a.mode-tile:hover .mt-art svg { transform: scale(1.05) rotate(-2deg); }
}
.mt-art { position: relative; flex: 1 1 0; min-height: 0; margin: 4px 0 10px; }
.mt-art svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transition: transform 420ms var(--ease-out); }
a.mode-tile .mt-art svg { filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.16)); }
.mt-art text { font-family: var(--font-display); text-anchor: middle; }
.mt-dow { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; fill: #1E9E4A; }
.mt-day { font-size: 50px; font-weight: 300; letter-spacing: -0.03em; fill: #1C1C1E; }
.mt-price { font-size: 10px; font-weight: 700; fill: #0A3E8C; }
.mt-q { font-size: 17px; font-weight: 800; fill: #0A63E8; }
.mt-text { display: grid; gap: 3px; min-width: 0; }
.mt-text b { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; }
.mt-text span { font-size: 14px; line-height: 1.35; opacity: 0.92; text-wrap: pretty; }
.mt-status { margin-top: 10px; align-self: flex-start; max-width: 100%; padding: 5px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.2); font-size: 12.5px; font-weight: 600; line-height: 1.3; font-variant-numeric: tabular-nums; }
.mt-status:empty { display: none; }
.mt-go { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.22); }
.mt-go .icon { width: 17px; height: 17px; stroke-width: 2.6; }
/* coming soon */
.mode-tile.soon { color: var(--label); background: var(--surface); box-shadow: none; outline: 1.5px dashed var(--sep); outline-offset: -1.5px; }
.mode-tile.soon::before { display: none; }
.mode-tile.soon .mt-text span { color: var(--label-2); opacity: 1; }
.mt-soon { position: absolute; z-index: 1; top: 14px; right: 14px; display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 99px; background: var(--tint-soft); color: var(--tint); font-size: 12px; font-weight: 600; }
.soon .s1 { fill: var(--fill); } .soon .s2 { fill: var(--fill-2); } .soon .s3 { fill: var(--surface); stroke: var(--sep); stroke-width: 1.5; }
.soon .s4 { fill: var(--label-3); } .soon .sh { fill: var(--surface); }
.soon .sl { fill: none; stroke: var(--sep); stroke-width: 1.5; } .soon .sl.dash { stroke: var(--label-3); stroke-dasharray: 3 4; stroke-linecap: round; }
.mt-vs { font-size: 10px; font-weight: 800; fill: var(--label-2); }
.mt-n { font-size: 13px; font-weight: 700; fill: var(--label-3); }
@media (max-width: 759px) {
  .mode-tile { padding: 14px; border-radius: 24px; }
  .mt-text b { font-size: 17px; } .mt-text span { font-size: 12.5px; }
  .mt-status { font-size: 11.5px; padding: 4px 8px; margin-top: 8px; }
  .mt-go { top: 10px; right: 10px; width: 28px; height: 28px; } .mt-go .icon { width: 15px; height: 15px; }
  .mt-soon { top: 10px; right: 10px; font-size: 11px; padding: 3px 8px; }
  .mt-art { margin: 18px 0 8px; }
}

/* Home: a street of homes passing by (drawn in app.js) */
:root {
  --st-f0: #EBA88E; --st-f1: #F2D7A3; --st-f2: #A7DCB8; --st-f3: #E8D9C5; --st-f4: #B5C8DC; --st-f5: #52B374; --st-f6: #D8B6A0;
  --st-rf: #6E5D57; --st-w: #F7FAFD; --st-wl: #FFF3D1; --st-d: #5A6F7C; --st-gd: rgba(60, 60, 67, 0.10);
  --st-tc: #63BE83; --st-tc2: #3F9E60; --st-tk: #8E735F; --st-tg: #FFFFFF; --st-tx: #1E7F3A; --st-tl: rgba(60, 60, 67, 0.30); --st-sil: rgba(30, 127, 58, 0.09);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --st-f0: #6E4234; --st-f1: #6E5D3E; --st-f2: #2C6345; --st-f3: #514A43; --st-f4: #3A4B5E; --st-f5: #1D6739; --st-f6: #5F4A3C;
  --st-rf: #2A2422; --st-w: rgba(255, 255, 255, 0.08); --st-wl: #FFCB63; --st-d: #1B2227; --st-gd: rgba(255, 255, 255, 0.07);
  --st-tc: #2C7448; --st-tc2: #205737; --st-tk: #4A3B31; --st-tg: #2C2C2E; --st-tx: #30D158; --st-tl: rgba(235, 235, 245, 0.28); --st-sil: rgba(48, 209, 88, 0.08);
} }
:root[data-theme="dark"] {
  --st-f0: #6E4234; --st-f1: #6E5D3E; --st-f2: #2C6345; --st-f3: #514A43; --st-f4: #3A4B5E; --st-f5: #1D6739; --st-f6: #5F4A3C;
  --st-rf: #2A2422; --st-w: rgba(255, 255, 255, 0.08); --st-wl: #FFCB63; --st-d: #1B2227; --st-gd: rgba(255, 255, 255, 0.07);
  --st-tc: #2C7448; --st-tc2: #205737; --st-tk: #4A3B31; --st-tg: #2C2C2E; --st-tx: #30D158; --st-tl: rgba(235, 235, 245, 0.28); --st-sil: rgba(48, 209, 88, 0.08);
}
.street { --street-h: 150px; position: relative; height: var(--street-h); overflow: hidden; pointer-events: none;
  margin: 0 calc(-1 * max(16px, env(safe-area-inset-right, 0px))) 0 calc(-1 * max(16px, env(safe-area-inset-left, 0px))); }
body.v-home::after { opacity: 0; }
.st-layer { position: absolute; left: 0; bottom: 0; transform-origin: left bottom; }
.st-back { transform: scale(1.18); }
.st-track { display: flex; width: max-content; will-change: transform; animation: st-roll var(--st-dur, 60s) linear infinite; }
.st-track svg { flex: none; display: block; }
@keyframes st-roll { to { transform: translateX(calc(-1 * var(--st-len))); } }
.street .f0 { fill: var(--st-f0); } .street .f1 { fill: var(--st-f1); } .street .f2 { fill: var(--st-f2); } .street .f3 { fill: var(--st-f3); }
.street .f4 { fill: var(--st-f4); } .street .f5 { fill: var(--st-f5); } .street .f6 { fill: var(--st-f6); }
.street .rf { fill: var(--st-rf); } .street .w { fill: var(--st-w); } .street .wl { fill: var(--st-wl); } .street .d { fill: var(--st-d); } .street .gd { fill: var(--st-gd); }
.street .tc { fill: var(--st-tc); } .street .tc2 { fill: var(--st-tc2); } .street .tk { fill: var(--st-tk); }
.street .tg { fill: var(--st-tg); stroke: var(--st-tl); stroke-width: 0.75; } .street .tl { stroke: var(--st-tl); stroke-width: 1.2; fill: none; }
.street .tx { fill: var(--st-tx); font-family: var(--font-round); font-size: 10.5px; font-weight: 700; text-anchor: middle; }
.street .st-back * { fill: var(--st-sil); stroke: none; }
.street .tag { transform-box: fill-box; animation: st-bob 3.2s ease-in-out infinite; }
@keyframes st-bob { 50% { transform: translateY(-4px); } }
/* the landing and the street fill the first screen; the credit and copyright line sit under the street */
#view-home .landing { padding-bottom: 12px; min-height: calc(100dvh - var(--nav-h) - env(safe-area-inset-top, 0px) - var(--tab-space) - 150px - 12px); }
@media (max-width: 759px) {
  .street { --street-h: 112px; }
  .st-front { transform: scale(0.74); } .st-back { transform: scale(0.88); }
  #view-home .landing { min-height: calc(100dvh - var(--nav-h) - env(safe-area-inset-top, 0px) - var(--tab-space) - 112px - 8px); }
}
@media (max-height: 760px) and (min-width: 760px) {
  .street { --street-h: 120px; } .st-front { transform: scale(0.8); } .st-back { transform: scale(0.95); }
  #view-home .landing { min-height: calc(100dvh - var(--nav-h) - env(safe-area-inset-top, 0px) - 120px - 12px); padding-top: 8px; }
  #view-home .logo-xl { width: 76px; height: 76px; margin-bottom: 12px; } #view-home .landing .lead { margin: 10px 0 22px; } #view-home .steps { margin-top: 24px; }
}
@media (max-width: 499px) { .mode-tile:not(.soon) .mt-text span { display: none; } .mt-art { margin-top: 14px; } }
@media (prefers-reduced-motion: reduce) { .st-track, .street .tag { animation: none; } }

/* ---------- v10: Price Match and Price Ladder ---------- */
.mode-tile.m-match { --mt-glow: rgba(214, 98, 20, 0.28); background: linear-gradient(165deg, #FFC46B 0%, #F5892E 48%, #C9531A 100%); }
.mode-tile.m-ladder { --mt-glow: rgba(196, 30, 94, 0.28); background: linear-gradient(165deg, #FF9EC4 0%, #EC4C8A 48%, #B51B5B 100%); }
.mt-tag { font-size: 12px; font-weight: 800; fill: #C9531A; }
.mt-rank { font-size: 14px; font-weight: 800; fill: #B51B5B; }
.rules-hero.match .mode-icon, .glance-row.match .mode-icon { background: linear-gradient(180deg, #FFC46B, #E8721F); }
.rules-hero.ladder .mode-icon, .glance-row.ladder .mode-icon { background: linear-gradient(180deg, #FF9EC4, #D8336F); }
.rules-tab[data-rt="match"][aria-selected="true"] .icon { color: #E8721F; }
.rules-tab[data-rt="ladder"][aria-selected="true"] .icon { color: #D8336F; }

.pz-play, .demo-pz.match { --mode-c: #D9600F; --mode-soft: rgba(245, 137, 46, 0.16); }
.pz-play.ladder, .demo-pz.ladder { --mode-c: #CC2766; --mode-soft: rgba(236, 76, 138, 0.15); }
:root[data-theme="dark"] .pz-play, :root[data-theme="dark"] .demo-pz.match { --mode-c: #FFA352; --mode-soft: rgba(255, 163, 82, 0.20); }
:root[data-theme="dark"] .pz-play.ladder, :root[data-theme="dark"] .demo-pz.ladder { --mode-c: #FF73A8; --mode-soft: rgba(255, 115, 168, 0.20); }
#view-pzplay.view-enter { animation-name: fadein; }
.pz-play { max-width: 1240px; margin: 0 auto; padding-top: 10px; display: grid; gap: 14px; }
.pz-play.ladder { max-width: 780px; }
.pz-in .pm-grid, .pz-in .pl-wrap { animation: pzIn 420ms var(--ease-out) both; }
@keyframes pzIn { from { opacity: 0; transform: translateY(14px); } }
.pz-head { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; }
.pz-dots { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex: none; }
.pz-dots li { min-width: 32px; height: 26px; padding: 0 7px; border-radius: 99px; display: grid; place-items: center; background: var(--fill); color: var(--label-3); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pz-dots li.now { background: var(--surface); color: var(--mode-c); box-shadow: inset 0 0 0 2px var(--mode-c); }
.pz-dots li.done { background: var(--mode-soft); color: var(--mode-c); }
.pz-dots li.perfect { background: var(--mode-c); color: #fff; }
.pz-dots li .icon { width: 14px; height: 14px; stroke-width: 3; }
.pz-hint { margin: 0; flex: 1; min-width: 220px; color: var(--label-2); font-size: 15px; line-height: 1.35; text-wrap: pretty; }
.pz-score { background: var(--mode-soft, var(--orange-soft)); }
body.mode-pz .pz-score { background: var(--fill); color: var(--label); }
body.mode-pz .timebar { display: none; }

/* price chips */
.pz-tray { position: sticky; top: 8px; z-index: 6; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 8px; border-radius: 20px; background: var(--bar); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); box-shadow: var(--shadow-sm); border: 0.5px solid var(--bar-edge); transition: box-shadow 160ms ease; }
.pz-tray.drop-over, .pz-tray.has-sel { box-shadow: 0 0 0 2.5px var(--mode-c), var(--shadow-sm); }
.pz-chip { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 0; min-height: 48px; padding: 0 10px; border-radius: 14px; background: var(--surface); color: var(--label); border: 1.5px solid var(--mode-soft); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); font-family: var(--font-round); font-size: 18px; font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: transform 140ms var(--ease-out), box-shadow 160ms ease, background-color 160ms ease, color 160ms ease; }
.pz-chip .num { font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
.pz-chip .icon { width: 17px; height: 17px; stroke-width: 2.8; flex: none; }
@media (hover: hover) { button.pz-chip:hover { border-color: var(--mode-c); } }
.pz-chip.sel { background: var(--mode-c); color: #fff; border-color: transparent; transform: translateY(-2px); box-shadow: 0 8px 20px var(--mode-soft), 0 0 0 3px var(--mode-soft); }
.pz-chip.ghost { background: transparent; box-shadow: none; border: 1.5px dashed var(--sep); color: var(--label-3); cursor: default; }
.pz-chip.dragging { opacity: 0.3; }
.pz-chip.landed { animation: pzLand 380ms var(--ease-out); }
@keyframes pzLand { 0% { transform: scale(0.85); } 60% { transform: scale(1.05); } 100% { transform: none; } }
.pz-ghost { position: fixed; left: 0; top: 0; z-index: 300; pointer-events: none; margin: 0; background: var(--mode-c, #E06A12); color: #fff; border-color: transparent; box-shadow: 0 16px 34px rgba(0, 0, 0, 0.25); rotate: -3deg; }
.pz-chip.ok { background: var(--green-soft); color: var(--green); border-color: transparent; box-shadow: none; cursor: default; }
.pz-chip.miss { background: var(--red-soft); color: var(--red); border-color: transparent; box-shadow: none; cursor: default; }
.pz-chip.miss .num { text-decoration: line-through; text-decoration-thickness: 2px; }

/* Price Match cards */
.pm-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
@media (max-width: 999px) { .pm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.pm-card { background: var(--surface); border-radius: 22px; overflow: hidden; min-width: 0; box-shadow: var(--shadow-sm); transition: box-shadow 180ms ease, transform 180ms var(--ease-out); }
.pm-card .hl-media { aspect-ratio: 4 / 3; }
.pm-card.target { cursor: pointer; box-shadow: 0 0 0 2px var(--mode-soft), var(--shadow-sm); }
.pm-card.drop-over { box-shadow: 0 0 0 3px var(--mode-c), var(--shadow-sm); transform: translateY(-2px); }
@media (hover: hover) { .pm-card.target:hover { box-shadow: 0 0 0 3px var(--mode-c), var(--shadow-sm); } }
.pm-card.ok { box-shadow: 0 0 0 2.5px var(--green-mark), var(--shadow-sm); }
.pm-card.miss { box-shadow: 0 0 0 2.5px var(--red), var(--shadow-sm); }
.pm-body { padding: 12px 14px 14px; display: grid; gap: 6px; min-width: 0; }
.pm-title { margin: 0; font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pm-loc { display: flex; gap: 4px; align-items: flex-start; color: var(--label-2); font-size: 13px; line-height: 1.3; min-width: 0; }
.pm-loc span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-loc .icon { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.pz-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--label); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pz-facts > span { display: inline-flex; align-items: center; gap: 4px; }
.pz-facts .icon { width: 15px; height: 15px; color: var(--label-2); }
.pz-facts .epc { height: 18px; min-width: 24px; padding: 0 5px; font-size: 11px; border-radius: 5px; }
.pz-more { justify-self: start; font-size: 13px; }
.pm-slot { margin-top: 4px; min-height: 48px; display: grid; gap: 4px; }
.pm-slot .pz-chip { width: 100%; }
.pm-drop { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 48px; padding: 0 8px; border-radius: 14px; border: 1.5px dashed var(--sep); color: var(--label-3); font-size: 14px; font-weight: 600; transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease; }
.pm-drop .icon { width: 16px; height: 16px; flex: none; }
.pm-card.target .pm-drop, .pm-card.drop-over .pm-drop, .pm-drop.on { border-color: var(--mode-c); color: var(--mode-c); background: var(--mode-soft); }
.pm-real { font-size: 13px; color: var(--label-2); text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }

/* the Check / Next bar */
.pz-foot { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; padding: 4px 0; }
.pz-go { min-width: 260px; }
.pz-res { display: flex; align-items: baseline; gap: 10px; animation: pop 420ms var(--ease-out); }
.pz-res b { font-family: var(--font-round); font-size: 30px; font-weight: 800; color: var(--mode-c); }
.pz-res.perfect b { color: var(--green); }
.pz-res.zero b { color: var(--label-3); }
.pz-res span { font-size: 15px; font-weight: 600; color: var(--label-2); }
.pz-play .src-note { text-align: center; }
@media (max-width: 759px) {
  .pz-foot { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; flex-wrap: nowrap; justify-content: space-between; gap: 12px; padding: 12px max(14px, env(safe-area-inset-left, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-right, 0px)); background: var(--surface); border-radius: 22px 22px 0 0; box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.12); }
  .pz-go { min-width: 0; flex: 1; min-height: 52px; }
  .pz-res { flex-direction: column; align-items: flex-start; gap: 0; flex: none; max-width: 46%; }
  .pz-res b { font-size: 24px; line-height: 1.1; }
  .pz-res span { font-size: 12px; line-height: 1.25; }
  body.mode-pz #scroller { padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 639px) {
  .pz-play { padding-top: 6px; gap: 10px; }
  .pz-head { gap: 6px 10px; }
  .pz-hint { flex-basis: 100%; min-width: 0; font-size: 13px; }
  .pz-dots { gap: 5px; }
  .pz-dots li { min-width: 28px; height: 24px; font-size: 11px; padding: 0 5px; }
  .pz-tray { gap: 6px; padding: 6px; border-radius: 16px; }
  .pz-chip { min-height: 42px; padding: 0 5px; border-radius: 12px; font-size: 15px; }
  .pm-card { border-radius: 18px; }
  .pm-card .hl-media { aspect-ratio: 4 / 3; }
  .pm-body { padding: 8px 9px 10px; gap: 4px; }
  .pm-title { font-size: 14px; }
  .pm-loc { font-size: 11.5px; }
  .pm-loc .icon { width: 12px; height: 12px; }
  .pz-facts { font-size: 12px; gap: 2px 8px; }
  .pz-facts .icon { width: 13px; height: 13px; }
  .pz-more { font-size: 12px; }
  .pm-slot { min-height: 42px; margin-top: 2px; }
  .pm-drop { min-height: 42px; font-size: 12px; padding: 0 4px; }
  .pm-real { font-size: 11.5px; }
}

/* Price Ladder rows */
.pl-wrap { display: grid; gap: 8px; }
.pl-end { display: flex; align-items: center; gap: 6px; padding: 0 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mode-c); }
.pl-end.bottom { color: var(--label-2); }
.pl-end .icon { width: 16px; height: 16px; stroke-width: 2.6; }
.pl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pl-row { position: relative; display: grid; grid-template-columns: 34px 132px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px 10px 10px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-sm); transition: box-shadow 180ms ease; }
.pl-row.dragging { z-index: 5; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2), 0 0 0 2px var(--mode-c); }
.pl-row.ok { box-shadow: 0 0 0 2.5px var(--green-mark), var(--shadow-sm); }
.pl-row.miss { box-shadow: 0 0 0 1.5px var(--sep), var(--shadow-sm); }
.pl-rank { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--mode-soft); color: var(--mode-c); font-family: var(--font-round); font-weight: 800; font-size: 17px; }
.pl-row.ok .pl-rank { background: var(--green-soft); color: var(--green); }
.pl-thumb { position: relative; width: 132px; aspect-ratio: 4 / 3; padding: 0; border-radius: 14px; overflow: hidden; background: var(--fill); cursor: zoom-in; }
.pl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pl-thumb .no-photo .icon { width: 30px; height: 30px; }
.pl-n { position: absolute; right: 5px; bottom: 5px; display: inline-flex; align-items: center; gap: 3px; padding: 2px 6px; border-radius: 99px; font-size: 11px; font-weight: 700; color: var(--label); }
.pl-n .icon { width: 12px; height: 12px; }
.pl-body { display: grid; gap: 3px; min-width: 0; justify-items: start; }
.pl-title { max-width: 100%; font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pl-loc { max-width: 100%; font-size: 13px; color: var(--label-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-tail { display: flex; align-items: center; gap: 6px; }
.pl-moves { display: grid; gap: 4px; }
.pl-mv { width: 38px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--fill); color: var(--label); transition: background-color 140ms ease; }
.pl-mv:disabled { opacity: 0.28; cursor: default; }
@media (hover: hover) { .pl-mv:not(:disabled):hover { background: var(--fill-2); } }
.pl-mv .icon { width: 17px; height: 17px; stroke-width: 2.6; }
.pl-grip { width: 34px; height: 68px; display: grid; place-items: center; border-radius: 10px; color: var(--label-3); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.pl-grip:active { cursor: grabbing; background: var(--fill); }
.pl-grip .icon { width: 22px; height: 22px; }
.pl-price { font-family: var(--font-round); font-size: 20px; font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; }
.pl-mark { padding: 4px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pl-mark.ok { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border-radius: 50%; color: var(--green); background: var(--green-soft); }
.pl-mark.ok .icon { width: 15px; height: 15px; stroke-width: 3; }
.pl-mark.miss { color: var(--label-2); background: var(--fill); }
@media (max-width: 639px) {
  .pl-list { gap: 8px; }
  .pl-row { grid-template-columns: 24px 82px minmax(0, 1fr) auto; gap: 8px; padding: 8px 6px 8px 7px; border-radius: 16px; }
  .pl-rank { width: 24px; height: 24px; border-radius: 8px; font-size: 13px; }
  .pl-thumb { width: 82px; border-radius: 11px; }
  .pl-n { right: 3px; bottom: 3px; padding: 1px 5px; font-size: 10px; }
  .pl-title { font-size: 14px; }
  .pl-loc { font-size: 11.5px; }
  .pl-body .pz-facts { font-size: 11.5px; gap: 1px 7px; }
  .pl-body .pz-facts .icon { width: 12px; height: 12px; }
  .pl-body .pz-more { font-size: 11.5px; }
  .pl-mv { width: 34px; height: 28px; }
  .pl-grip { width: 24px; height: 60px; }
  .pl-row.ok .pl-tail, .pl-row.miss .pl-tail { flex-direction: column; align-items: flex-end; gap: 3px; }
  .pl-price { font-size: 15px; }
  .pl-mark { font-size: 11px; padding: 2px 7px; }
  .pl-mark.ok { width: 22px; height: 22px; }
}

/* a closer look and the end of a game */
.pk-media .carousel { border-radius: 18px; margin-bottom: 12px; }
.pk-price-box { margin: 14px 0 6px; }
#pk-price.muted { color: var(--label-3); font-size: 15px; font-weight: 600; }
.pk-details { margin-top: 6px; }
.pzo-rounds .row { gap: 10px; }
.pzo-n { width: 26px; height: 26px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--fill); font-size: 13px; font-weight: 700; }

/* demos on How to play */
.demo-pz { margin: 4px 0 14px; padding: 12px; border-radius: 18px; background: var(--surface-2); display: grid; gap: 10px; }
.dpz-tray { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.demo-pz .pz-chip { min-height: 38px; font-size: 14px; cursor: default; padding: 0 4px; }
.dpz-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 520px) { .dpz-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dpz-card { display: grid; gap: 5px; padding: 6px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); min-width: 0; }
.dpz-card b { font-size: 12px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dpz-photo { aspect-ratio: 4 / 3; border-radius: 10px; background: var(--fill); display: grid; place-items: center; color: var(--label-3); }
.dpz-photo .icon { width: 22px; height: 22px; }
.dpz-card .pm-drop { min-height: 38px; font-size: 11px; }
.dpz-ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.dpz-ladder li { display: grid; grid-template-columns: 28px 52px minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 6px 8px 6px 6px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); }
.dpz-ladder li.ok { box-shadow: 0 0 0 2px var(--green-mark); }
.dpz-ladder .pl-rank { width: 28px; height: 28px; font-size: 14px; border-radius: 9px; }
.dpz-ladder li.ok .pl-rank { background: var(--green-soft); color: var(--green); }
.dpz-ladder .dpz-photo { width: 52px; }
.dpz-t { min-width: 0; }
.dpz-t b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dpz-ladder .pl-price { font-size: 15px; }
.dpz-ladder .pl-mark.ok { width: 24px; height: 24px; }
