/* Fermented & Spirituous: interface in the approved round 2 "Sidebar" style (Apple Maps like), light by
   default with a dark appearance. The world (scene tokens below) does not change with the appearance. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/InterVariable.woff2') format('woff2');
}
@font-face {
  font-family: 'Big Shoulders Display';
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
  src: url('fonts/BigShouldersDisplay-latin.woff2') format('woff2');
}

/* ---- World tokens: read by the 3D scene (ground, trees, signs, shells, seat dots). Not themed. ---- */
:root {
  --bluestone: #3b4148;
  --bluestone-joint: #2b3036;
  --paint-fresh: #f2efe6;
  --ink-dim: #a9b0b8;
  --sun: #ffb54a;
  --shade: #4a5a78;
  /* Map lettering (street, park and suburb names, pub labels): dark ink on a soft light halo. The pub
     labels' ink, halo, weight and glow are set from the map style (mapstyle.js applyLabelTokens); these
     are the 'current' style's values, for before it runs. */
  --map-ink: #1f2522;
  --map-ink-dim: #3d4541;
  --map-park: #2c5a3e;
  --map-halo: rgba(255, 255, 255, 0.88);
  --map-ink-lost: #5a3a35;
  --map-ink-hot: #1f4a3a;
  --map-halo-px: 1.75px;
  --map-label-weight: 650;
  --map-label-weight-lost: 550;
  --map-label-glow: 0 0 6px rgba(255, 255, 255, 0.55);
  /* The ghost pub walk on the map (crawlmap.js dashed, numbered): a strong violet on a light halo. */
  --walk: #5b2fc4;
  --walk-halo: #ffffff;
  --walk-ink: #ffffff;
}

/* ---- Interface tokens: light ---------------------------------------------------------------------- */
:root {
  --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-sign: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  --fs: 13px;
  --r1: 14px; --r2: 10px; --r3: 7px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 14px; --s5: 20px; --s6: 28px;
  --edge-gap: 12px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --t: 240ms;

  --mat: rgba(249, 249, 247, 0.74);
  --mat-solid: #f6f6f4;
  --mat2: rgba(255, 255, 255, 0.55);
  --ink: #1a1e1c;
  --ink2: #58615c;
  --ink3: #616964;   /* 4.5:1 or more for small text on the material, the trivia card and kbd fills (measured 02/12/2026) */
  --sep: rgba(26, 30, 28, 0.1);
  --fill: rgba(26, 30, 28, 0.06);
  --fill2: rgba(26, 30, 28, 0.1);
  --sel: #ffffff;
  --tint: #1f4a3a;
  --tint-ink: #ffffff;
  --living: #1f4a3a;
  --living-bg: rgba(31, 74, 58, 0.12);
  --lost: #7a2c25;
  --lost-bg: rgba(122, 44, 37, 0.1);
  --amber: #d8962a;
  --amber-ink: #7d520b;
  --amber-bg: rgba(216, 150, 42, 0.17);
  --slate: #4f6274;
  --slate-bg: rgba(93, 114, 134, 0.13);
  --strip-shade: #dde3e8;
  --strip-night: #5a6878;
  --shadow: 0 0 0 0.5px rgba(20, 25, 22, 0.1), 0 2px 6px rgba(20, 25, 22, 0.07), 0 12px 32px rgba(20, 25, 22, 0.13);
  --edge: inset 0 0 0 0.5px rgba(255, 255, 255, 0.7);
  --ridge: rgba(26, 30, 28, 0.13);
  --ridge2: rgba(26, 30, 28, 0.3);
  --knob: #ffffff;
  --focus: #1f4a3a;
  --img-outline: oklch(0 0 0 / 0.1);
  color-scheme: light;
}
/* Dark: the system asks for it (Auto), or the owner chose Dark. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --mat: rgba(34, 37, 36, 0.72); --mat-solid: #262928; --mat2: rgba(255, 255, 255, 0.06);
    --ink: #f1f3f0; --ink2: #a8afaa; --ink3: #a0a8a3;
    --sep: rgba(255, 255, 255, 0.1); --fill: rgba(255, 255, 255, 0.08); --fill2: rgba(255, 255, 255, 0.14); --sel: #545a57;
    --tint: #7cc3a0; --tint-ink: #0e2119; --living: #7cc3a0; --living-bg: rgba(124, 195, 160, 0.16);
    --lost: #e08a7e; --lost-bg: rgba(224, 138, 126, 0.14);
    --amber: #e8a94a; --amber-ink: #f2c071; --amber-bg: rgba(232, 169, 74, 0.18);
    --slate: #9db3c8; --slate-bg: rgba(157, 179, 200, 0.14); --strip-shade: #3a4148; --strip-night: #1d2228;
    --shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.25), 0 14px 36px rgba(0, 0, 0, 0.45);
    --edge: inset 0 0 0 0.5px rgba(255, 255, 255, 0.09);
    --ridge: rgba(255, 255, 255, 0.13); --ridge2: rgba(255, 255, 255, 0.32); --knob: #f1f3f0; --focus: #7cc3a0;
    --img-outline: oklch(1 0 0 / 0.1);
    --walk: #6a3df0; --walk-halo: #f4f0ff; --walk-ink: #ffffff; /* the map keeps its own colours in dark: a strong dash, light halo */
    color-scheme: dark;
  }
}
/* Light theme after dark (owner, 02/12/2026): only the map goes dark. The glass keeps its light surface,
   near opaque, so the night map cannot grey it (data-mapnight is set by main.js while the map is in its
   night palette). No blend: the dark theme is the way to a dark panel. */
:root[data-look="light"][data-mapnight] {
  --mat: rgba(247, 246, 243, 0.96);
  --mat2: rgba(255, 255, 255, 0.7);
}
/* Dark theme over the 3D view's daytime map (the sky and light follow the real time): the glass stays dark,
   near opaque, rather than greying over the light map (data-mapday, set by main.js). */
:root[data-look="dark"][data-mapday] {
  --mat: rgba(34, 37, 36, 0.95);
}
:root[data-theme="dark"] {
  --mat: rgba(34, 37, 36, 0.72); --mat-solid: #262928; --mat2: rgba(255, 255, 255, 0.06);
  --ink: #f1f3f0; --ink2: #a8afaa; --ink3: #a0a8a3;
  --sep: rgba(255, 255, 255, 0.1); --fill: rgba(255, 255, 255, 0.08); --fill2: rgba(255, 255, 255, 0.14); --sel: #545a57;
  --tint: #7cc3a0; --tint-ink: #0e2119; --living: #7cc3a0; --living-bg: rgba(124, 195, 160, 0.16);
  --lost: #e08a7e; --lost-bg: rgba(224, 138, 126, 0.14);
  --amber: #e8a94a; --amber-ink: #f2c071; --amber-bg: rgba(232, 169, 74, 0.18);
  --slate: #9db3c8; --slate-bg: rgba(157, 179, 200, 0.14); --strip-shade: #3a4148; --strip-night: #1d2228;
  --shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.25), 0 14px 36px rgba(0, 0, 0, 0.45);
  --edge: inset 0 0 0 0.5px rgba(255, 255, 255, 0.09);
  --ridge: rgba(255, 255, 255, 0.13); --ridge2: rgba(255, 255, 255, 0.32); --knob: #f1f3f0; --focus: #7cc3a0;
  --img-outline: oklch(1 0 0 / 0.1);
  --walk: #6a3df0; --walk-halo: #f4f0ff; --walk-ink: #ffffff; /* the map keeps its own colours in dark: a strong dash, light halo */
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #3b4148;
  color: var(--ink);
  font: var(--fs)/1.38 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11' 1; /* Inter: single-storey a off, tidy figures */
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.tn { font-variant-numeric: tabular-nums; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.grow { flex: 1; }
[hidden] { display: none !important; }
.ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
/* iOS: the dynamic viewport, so the canvas follows the URL bar instead of sitting oversized behind it. */
@supports (height: 100dvh) { #scene { height: 100dvh; } }
/* ?perf readout (perfhud.js): small, out of the way, readable on a phone. */
.perf-hud { position: fixed; z-index: 5; top: calc(env(safe-area-inset-top, 0px) + 8px); left: 50%; transform: translateX(-50%); padding: 6px 9px; border-radius: 8px; background: rgba(12, 14, 16, 0.78); color: #e9f2ea; font: 11px/1.4 ui-monospace, Menlo, monospace; white-space: pre; pointer-events: none; }
/* Phones: below the Credits at the top left, which must stay readable. */
@media (max-width: 600px) { .perf-hud { top: calc(env(safe-area-inset-top, 0px) + 76px); font-size: 10px; } }
.pop-quality small { font-weight: 450; color: var(--ink2); }
.pop-quality.is-top { margin: 0 0 4px; padding-top: 4px; box-shadow: 0 0.5px 0 var(--sep); }
#overlay { position: fixed; inset: 0; pointer-events: none; }
#overlay > * { pointer-events: auto; }

/* ---- Material ------------------------------------------------------------------------------------- */
.glass {
  background: var(--mat);
  -webkit-backdrop-filter: blur(24px) saturate(1.7);
  backdrop-filter: blur(24px) saturate(1.7);
  border-radius: var(--r1);
  box-shadow: var(--shadow), var(--edge);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .glass { background: var(--mat-solid); } }
@media (prefers-reduced-transparency: reduce) { .glass { background: var(--mat-solid); -webkit-backdrop-filter: none; backdrop-filter: none; } }

/* ---- Small parts ---------------------------------------------------------------------------------- */
.tag {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
  font-size: 11px; font-weight: 550; line-height: 16px; border-radius: 999px; padding: 1px 8px;
  background: var(--fill); color: var(--ink2); white-space: nowrap;
}
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag.sun { background: var(--amber-bg); color: var(--amber-ink); }
.tag.shade { background: var(--slate-bg); color: var(--slate); }
.tag.living { background: var(--living-bg); color: var(--living); }
.tag.lost { background: var(--lost-bg); color: var(--lost); }
.tag.warn { background: transparent; box-shadow: inset 0 0 0 1px var(--fill2); color: var(--ink2); }
.tag.wx { background: var(--slate-bg); color: var(--slate); margin-left: 6px; vertical-align: 1px; }
.fine { color: var(--ink3); font-size: 11px; line-height: 1.38; margin: 0; }
.sub { color: var(--ink3); font-size: 12px; }
.pill {
  border: 0; border-radius: 999px; padding: 4px 11px; background: var(--fill); color: var(--ink);
  font-weight: 600; font-size: 12px; white-space: nowrap;
}
.pill:hover { background: var(--fill2); }
.xbtn {
  width: 28px; height: 28px; border-radius: 50%; border: 0; padding: 0;
  background: var(--fill); display: grid; place-items: center; color: var(--ink2);
}
.xbtn .ic { width: 12px; height: 12px; stroke-width: 2.2; }
.xbtn:hover { background: var(--fill2); color: var(--ink); }
.seg { display: inline-flex; background: var(--fill); border-radius: calc(var(--r3) + 2px); padding: 2px; font-size: 12px; font-weight: 550; flex: none; }
.seg button { border: 0; background: transparent; padding: 3px 11px; border-radius: var(--r3); color: var(--ink2); }
.seg button[aria-pressed="true"], .seg button[aria-checked="true"] { background: var(--sel); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.14), 0 0 0 0.5px rgba(0, 0, 0, 0.04); }
.sw {
  width: 36px; height: 22px; border-radius: 999px; background: var(--fill2); position: relative; flex: none;
  border: 0; padding: 0; transition: background var(--t) var(--ease);
}
.sw::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: left var(--t) var(--ease);
}
.sw[aria-checked="true"] { background: var(--tint); }
.sw[aria-checked="true"]::after { left: 16px; }
kbd { font: 500 11px var(--font-ui); color: var(--ink3); background: var(--fill); border-radius: 5px; padding: 1px 5px; }
.hrow { display: flex; align-items: center; gap: 8px; }
.sechead { font-size: 15px; font-weight: 650; margin: 20px 0 8px; letter-spacing: -0.01em; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.sechead small { font-weight: 450; color: var(--ink3); font-size: 11.5px; }

/* ---- Sidebar (desktop) ---------------------------------------------------------------------------- */
.sb {
  position: fixed; left: var(--edge-gap); top: var(--edge-gap); bottom: var(--edge-gap);
  width: min(372px, calc(100vw - 24px)); z-index: 6; pointer-events: none;
}
.sb-sheet { display: flex; flex-direction: column; gap: var(--s2); height: 100%; }
.sb-sheet > * { pointer-events: auto; }
.sb-grab { display: none; }
.sb-search { flex: none; position: relative; border-radius: var(--r1); }
.sb-card { flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.sb-body { flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--fill2) transparent; }
.sb[data-mode="pub"] .sb-card, .sb[data-mode="pub"] .sb-body { flex: 1 1 auto; }
.sb-home { padding: var(--s4); }
.sb-pub { padding: 10px; }
.sb-view.is-entering, .sb-place.is-entering { animation: view-in var(--t) var(--ease); }
@keyframes view-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .sb-view.is-entering, .sb-place.is-entering { animation: view-fade var(--t) linear; }
  @keyframes view-fade { from { opacity: 0; } to { opacity: 1; } }
}

/* ---- The three places (places.js): a segmented control at the top of the card -------------------- */
.sb-tabs {
  flex: none; display: flex; margin: var(--s3) var(--s3) 0; padding: 2px; border-radius: calc(var(--r2) - 1px);
  background: var(--fill);
}
.sb-tab {
  flex: 1 1 0; min-width: 0; height: 32px; border: 0; border-radius: calc(var(--r2) - 3px); background: transparent; position: relative;
  font: 590 13px var(--font-ui); letter-spacing: -0.005em; color: var(--ink2); cursor: pointer;
  transition: background var(--t) var(--ease), color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
/* Invisible hit areas: the full 44 px of height (6 px out above and below; nothing else sits there). */
.sb-tab::after { content: ''; position: absolute; inset: -6px 0; }
.sb-tab:hover { color: var(--ink); }
.sb-tab[aria-selected="true"] { background: var(--sel); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(0, 0, 0, 0.04); }
.sb-tab:focus-visible { outline-offset: -2px; }
/* On an open pub the tabs still say where Back goes, a little quieter. */
.sb[data-mode="pub"] .sb-tab[aria-selected="true"] { background: transparent; box-shadow: inset 0 0 0 1px var(--fill2); }
@media (prefers-reduced-motion: reduce) { .sb-tab { transition: none; } }
.sb-empty p { margin: 2px 0 10px; color: var(--ink2); font-size: 13.5px; line-height: 1.45; }
.sb-empty .pill { position: relative; min-height: 36px; padding: 6px 14px; font-weight: 600; color: var(--tint); }
.sb-empty .pill::after { content: ''; position: absolute; inset: -4px 0; } /* a 44 px hit area */

/* Then: how to time travel, year shortcuts and the lost pubs. */
.then-lead { margin: 2px 0 var(--s3); color: var(--ink2); font-size: 13.5px; line-height: 1.45; text-wrap: pretty; }
.then-years { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.then-year {
  min-height: 44px; border: 0; border-radius: var(--r2); background: var(--fill); color: var(--ink);
  font: 620 14px var(--font-ui); cursor: pointer; transition: background var(--t) var(--ease), color var(--t) var(--ease);
}
.then-year:hover { background: var(--fill2); }
.then-year[aria-pressed="true"] { background: var(--tint); color: var(--tint-ink); }
.then-lost { list-style: none; margin: 0 -8px; padding: 0; }
.then-pub {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 48px; padding: 6px 8px; border: 0; border-radius: var(--r2);
  background: transparent; text-align: left; color: var(--ink); cursor: pointer;
}
.then-lost li + li .then-pub { box-shadow: 0 -0.5px 0 var(--sep); border-top-left-radius: 0; border-top-right-radius: 0; }
.then-pub:hover { background: var(--fill); }
.then-pub-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.then-pub-t b { font-weight: 600; font-size: 14px; letter-spacing: -0.005em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.then-pub-t small { color: var(--ink3); font-size: 12px; }
.then-pub .ic { width: 16px; height: 16px; flex: none; color: var(--ink3); }
@media (prefers-reduced-motion: reduce) { .then-year { transition: none; } }

/* ---- Welcome card (welcome.js): top of the place view; two doors in and a quiet way out ------------- */
.welcome { padding: 2px 0 4px; }
.welcome:not([hidden]) ~ .sb-place { margin-top: var(--s5); padding-top: var(--s4); box-shadow: 0 -0.5px 0 var(--sep); }
/* On Me the passport leads: the welcome stays on Then and Tonight, so the book is never pushed below the fold. */
.sb[data-place="me"] .welcome { display: none; }
.sb[data-place="me"] .welcome:not([hidden]) ~ .sb-place { margin-top: 0; padding-top: 0; box-shadow: none; }
.welcome-h { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.welcome-h:focus { outline: none; } /* focus lands here on open for screen readers; the heading is not a control */
.welcome-pitch { margin: 6px 0 var(--s4); color: var(--ink2); font-size: 14px; line-height: 1.45; text-wrap: pretty; }
.welcome-doors { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.welcome-door {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 14px;
  min-height: 84px; padding: 12px; border: 0; border-radius: var(--r1); text-align: left; cursor: pointer;
  font: 600 14.5px/1.25 var(--font-ui); letter-spacing: -0.01em; color: var(--ink); background: var(--fill);
  transition: background var(--t) var(--ease), transform 120ms var(--ease);
}
.welcome-door:hover { background: var(--fill2); }
.welcome-door:active { transform: scale(0.96); }
.welcome-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; }
.welcome-ic .ic { width: 20px; height: 20px; }
.welcome-door.is-then .welcome-ic { background: var(--lost-bg); color: var(--lost); }
.welcome-door.is-tonight .welcome-ic { background: var(--amber-bg); color: var(--amber-ink); }
.welcome-quiet {
  display: block; width: 100%; min-height: 44px; margin-top: var(--s1); border: 0; background: transparent; border-radius: var(--r2);
  font: 550 13.5px var(--font-ui); color: var(--tint); cursor: pointer;
}
.welcome-quiet:hover { background: var(--fill); }
@media (prefers-reduced-motion: reduce) { .welcome-door { transition: none; } .welcome-door:active { transform: none; } }
/* The map key (legend.js), behind "Map key" on the welcome card: each mark drawn with the map's own
   tokens and classes on a small tile of the map's ground. */
.welcome-keybtn {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 44px; border: 0; background: transparent;
  border-radius: var(--r2); font: 500 13px var(--font-ui); color: var(--ink2); cursor: pointer;
}
.welcome-keybtn .ic { width: 15px; height: 15px; }
.welcome-keybtn:hover { background: var(--fill); color: var(--ink); }
.welcome-key .welcome-pitch { margin-bottom: var(--s3); }
.lg { list-style: none; margin: 0; padding: 0; }
.lg-r { display: grid; grid-template-columns: 112px 1fr; gap: var(--s3); align-items: center; padding: 8px 0; box-shadow: 0 -0.5px 0 var(--sep); }
.lg-r:first-child { box-shadow: none; }
.lg-sw { position: relative; width: 112px; height: 40px; border-radius: var(--r3); overflow: hidden; background: var(--map-ground); box-shadow: inset 0 0 0 0.5px var(--sep); }
.lg-sw.is-strip { background: var(--fill); }
.lg-t { min-width: 0; }
.lg-t b { display: block; font-weight: 600; font-size: 13.5px; color: var(--ink); }
.lg-t small { display: block; margin-top: 1px; font-size: 12.5px; line-height: 1.4; color: var(--ink2); text-wrap: pretty; }
.lg-bldg { position: absolute; left: 8px; top: 9px; width: 28px; height: 22px; border-radius: 2px; }
.lg-night { position: absolute; inset: 0; }
.lg-dab { position: absolute; }
.lg-sw .pub-label { left: 40px; top: 12px; visibility: visible; will-change: auto; }
.lg-mid { position: absolute; inset: 0; display: grid; place-items: center; }
.lg-walk, .lg-era { position: absolute; left: 8px; top: 0; }
.lg-sw .route-num { visibility: visible; will-change: auto; }


/* ---- Search --------------------------------------------------------------------------------------- */
.search-field { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; color: var(--ink3); cursor: text; }
.search-input {
  flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; outline: none;
  font-size: 14px; color: var(--ink); -webkit-appearance: none; appearance: none;
}
.search-input::placeholder { color: var(--ink3); opacity: 1; }
.search-input::-webkit-search-cancel-button { -webkit-appearance: none; }
.sb-search:focus-within { box-shadow: var(--shadow), var(--edge), 0 0 0 2px var(--focus); }
.search-field:focus-within kbd { visibility: hidden; }
/* The shortcut hint is for a keyboard: hidden on touch-first devices and on narrow (phone) screens. */
@media (hover: none) and (pointer: coarse), (max-width: 699.98px) { .search-kbd { display: none; } }
.search-results { list-style: none; margin: 0; padding: 4px 6px 6px; border-top: 0.5px solid var(--sep); max-height: min(52vh, 420px); overflow-y: auto; }
.search-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: var(--r3); cursor: pointer; }
.search-row[aria-selected="true"] { background: var(--fill); }
.search-row:hover { background: var(--fill); }
.search-ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); color: var(--ink2); flex: none; }
.search-row.k-pub .search-ic { background: var(--living-bg); color: var(--living); }
.search-row.k-pub.is-lost .search-ic { background: var(--lost-bg); color: var(--lost); }
.search-row.k-park .search-ic { color: var(--living); }
.search-t { display: flex; flex-direction: column; min-width: 0; }
.search-t b { font-weight: 560; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-t small { color: var(--ink3); font-size: 11.5px; }
/* On the highlighted row's fill the quiet line needs more ink to keep 4.5:1 (both themes). */
.search-row[aria-selected="true"] .search-t small { color: color-mix(in srgb, var(--ink) 78%, transparent); }
.search-none { padding: 10px 8px; color: var(--ink3); }

/* ---- Best now ------------------------------------------------------------------------------------- */
.best-sun { color: var(--amber-ink); display: grid; }
.best-sun .ic { width: 18px; height: 18px; }
.best-title { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }
.best-scrub { margin: 12px 0 2px; }
.best-range { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 20px; margin: 0; background: transparent; cursor: ew-resize; }
.best-range::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: var(--track, var(--fill2)); }
.best-range::-moz-range-track { height: 6px; border-radius: 999px; background: var(--track, var(--fill2)); }
.best-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%;
  background: var(--knob); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 0 0.5px rgba(0, 0, 0, 0.1);
}
.best-range::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: var(--knob); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); }
.best-range:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 999px; }
.best-ticks { position: relative; height: 13px; font-size: 10px; color: var(--ink3); margin: 2px 9px 0; }
.best-ticks span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.best-lead { margin: 10px 0 0; color: var(--ink); }
.best-wx { margin: 6px 0 0; color: var(--ink2); }
.best-wx .wx-t { color: var(--ink); }
.best-wx a { color: inherit; text-decoration: underline; text-decoration-color: var(--fill2); text-underline-offset: 2px; }
.best-list { list-style: none; margin: 8px 0 0; padding: 0; }
.bn { padding: 11px 0; box-shadow: 0 -0.5px 0 var(--sep); }
.best-pick { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 0; border-radius: var(--r3); }
.best-pick:hover b { color: var(--tint); }
.best-pick > span { display: flex; }
.bn .nm { align-items: center; gap: 8px; }
.bn .nm b { font-weight: 620; font-size: 14px; }
.bn .nm small { color: var(--ink3); font-size: 11.5px; white-space: nowrap; }
.bn .nm small.is-closed { color: var(--lost); }
.bn .ln { margin-top: 4px; color: var(--ink2); align-items: center; gap: 6px; flex-wrap: wrap; }
.bn .ln strong { color: var(--ink); font-weight: 600; }
.seats { gap: 2px; margin: 8px 0 4px; }
.seats i { height: 5px; flex: 1; max-width: 12px; border-radius: 2px; background: var(--fill2); }
.seats i.s { background: var(--amber); }
.row2 { display: flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--ink3); font-size: 11.5px; }
.best-note { margin-top: 6px; }
.best-on .sechead { margin-top: 16px; }
.best-on-list { list-style: none; margin: 0; padding: 0; }
.wo { display: grid; grid-template-columns: 72px 1fr; gap: 2px 10px; padding: 8px 0; box-shadow: 0 -0.5px 0 var(--sep); align-items: start; }
.wo .when { font-weight: 600; font-size: 12px; font-variant-numeric: tabular-nums; }
.wo.is-now .when { color: var(--amber-ink); }
.wo .what b { font-weight: 560; display: block; }
.wo .what b .tag { margin-left: 4px; vertical-align: 1px; }
.wo .what > span { color: var(--ink3); font-size: 11.5px; }
.wo-none { padding: 6px 0; }
.best-ended { padding-top: 6px; box-shadow: 0 -0.5px 0 var(--sep); }
.best-foot { margin-top: 12px; }
.best-list-h { margin-top: 14px; }
.best-night { margin: 4px 0 0; }
.bn.is-closed .best-pick { opacity: 0.6; }
.bn-more { padding: 10px 0 0; box-shadow: 0 -0.5px 0 var(--sep); }
.bn-more summary { cursor: pointer; color: var(--tint); font-weight: 560; font-size: 13px; }
.bn-more .best-list { margin-top: 4px; }

/* ---- Passport ------------------------------------------------------------------------------------- */
.pp { position: relative; }
.pp-scroll { outline: none; }
.pp p { margin: 0; }
.photo { position: relative; border-radius: var(--r2); overflow: hidden; background: #222; }
.pp-photo-head { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.pp-photo-head img { display: block; width: 100%; height: 190px; object-fit: cover; object-position: center 30%; }
.photo::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0, 0, 0, 0.28), transparent 26%, transparent 50%, rgba(0, 0, 0, 0.6)); }
.photo .cr { position: absolute; left: 10px; right: 10px; bottom: 8px; color: rgba(255, 255, 255, 0.92); font-size: 10px; line-height: 1.3; z-index: 1; pointer-events: none; }
.pp-navbtns { display: flex; justify-content: space-between; align-items: center; padding: 0 0 6px; }
.pp-navbtns.on-photo { position: absolute; left: 10px; right: 10px; top: 10px; z-index: 2; padding: 0; }
.pp-back {
  display: inline-flex; align-items: center; gap: 2px; border: 0; border-radius: 999px; padding: 4px 10px 4px 5px;
  background: var(--fill); color: var(--tint); font-weight: 600; font-size: 12px;
}
.pp-back .ic { width: 14px; height: 14px; stroke-width: 2; }
.on-photo .pp-back, .on-photo .xbtn {
  background: rgba(0, 0, 0, 0.38); color: #fff; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.on-photo .pp-back:hover, .on-photo .xbtn:hover { background: rgba(0, 0, 0, 0.55); }
.pp-headtext { padding: 12px 4px 0; }
.pname {
  font-family: var(--font-sign); font-weight: 800; font-size: 40px; line-height: 0.95; letter-spacing: 0.015em;
  text-transform: uppercase; margin: 0; outline: none; color: var(--ink);
}
.pname:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 3px; }
.pmeta { display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; margin-top: 8px !important; color: var(--ink2); }
.pp-aka { margin-top: 4px !important; color: var(--ink3); font-size: 12px; }
.pp-dim { color: var(--ink3); }
.ptoday { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px !important; padding: 9px 11px; border-radius: var(--r2); background: var(--amber-bg); color: var(--ink); }
.ptoday .ic { color: var(--amber-ink); margin-top: 1px; }
.ptoday.is-lost { background: var(--fill); }
.ptoday.is-lost .ic { color: var(--ink2); }
.acts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.act {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 4px 8px; border-radius: var(--r2);
  border: 0; background: var(--fill); color: var(--tint); font-weight: 600; font-size: 12px; position: relative; text-align: center;
  transition: transform 120ms var(--ease), background var(--t) var(--ease);
}
.act:hover:not(:disabled):not([aria-disabled="true"]) { background: var(--fill2); }
.act:active:not(:disabled) { transform: scale(0.96); }
.act.pri { background: var(--tint); color: var(--tint-ink); }
.act.pri:hover { background: var(--tint) !important; filter: brightness(1.08); }
.act:disabled, .act[aria-disabled="true"] { color: var(--ink3); cursor: default; }
.act .ic { stroke-width: 2; } /* beside 600-weight labels */
.act .soon {
  position: absolute; top: -7px; right: -3px; font-size: 9px; font-weight: 650; line-height: 14px;
  background: var(--mat-solid); color: var(--ink2); box-shadow: 0 0 0 1px var(--fill2); padding: 0 6px; border-radius: 999px;
}
.pp-body { padding: 0 4px 6px; }
.pp-sec { scroll-margin-top: 8px; }
.pp-h { outline: none; }
.pp-count { font-weight: 450; color: var(--ink3); font-size: 11.5px; }
.pp-note { margin-top: 3px !important; font-size: 11.5px; line-height: 1.4; color: var(--ink3); }
.pp-tag, .pp-flag { display: inline-block; padding: 0 6px; margin-right: 3px; border-radius: 999px; font-size: 10px; line-height: 15px; font-weight: 600; vertical-align: 1px; }
.pp-tag { box-shadow: inset 0 0 0 1px var(--fill2); color: var(--ink2); }
.pp-flag { background: var(--amber-bg); color: var(--amber-ink); }
.pp-refs { white-space: nowrap; font-size: 10.5px; color: var(--ink3); }
.pp-refs a { color: var(--ink3); text-decoration: none; padding: 0 1px; }
.pp-refs a:hover { color: var(--tint); text-decoration: underline; }
.pp a { color: var(--tint); text-underline-offset: 2px; }
.pp-foot { margin-top: 8px !important; font-size: 11px; line-height: 1.38; color: var(--ink3); }
/* Story first: the hook, the story's paragraphs, then and now, nearby, and the folded method. */
.pp-hook { margin: 22px 0 6px; }
.pp-hook > p:first-child { font-size: 17px; line-height: 1.45; font-weight: 500; letter-spacing: -0.012em; color: var(--ink); text-wrap: pretty; }
.pp-body > .pp-sec + .pp-sec { margin-top: 30px; }
.pp-body > .pp-hook + .pp-sec { margin-top: 26px; }
.pp-body > .pp-sec > .sechead:first-child { margin-top: 0; margin-bottom: 12px; }
.pp-sps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.pp-sp-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 15px; line-height: 1.3; }
.pp-sp-when { font-weight: 600; color: var(--ink2); }
.pp-sp-head b { font-weight: 650; color: var(--ink); letter-spacing: -0.008em; }
.pp-sp-text { margin-top: 4px !important; font-size: 15px; line-height: 1.5; color: var(--ink); text-wrap: pretty; }
.pp-txs { display: grid; grid-template-columns: 1fr; gap: 8px; } /* stacked at every width */
.pp-tx { padding: 12px 14px 13px; border-radius: var(--r2); background: var(--fill); }
.pp-tx-k { font-size: 13px; font-weight: 650; color: var(--ink2); margin-bottom: 4px !important; }
.pp-tx > p:not(.pp-tx-k):not(.pp-note) { font-size: 14.5px; line-height: 1.45; color: var(--ink); text-wrap: pretty; }
.pp-tx-photo { display: block; width: 100%; padding: 0; margin-bottom: 10px; border: 0; border-radius: var(--r3); overflow: hidden; background: #222; cursor: zoom-in; }
.pp-tx-photo img { display: block; width: 100%; height: 110px; object-fit: cover; }
.pp-nears { margin-top: -4px; }
.pp-near .ic:first-child { width: 18px; height: 18px; color: var(--ink2); }
.pp-near.is-static { cursor: default; }
.pp-near.is-static:hover { background: transparent; }
.pp-how { margin-top: 30px; }
.pp-how > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 0 14px;
  border-radius: var(--r2); background: var(--fill); color: var(--ink2); font-weight: 600; font-size: 13.5px; cursor: pointer;
  list-style: none; -webkit-user-select: none; user-select: none;
}
.pp-how > summary::-webkit-details-marker { display: none; }
.pp-how > summary:hover { background: var(--fill2); color: var(--ink); }
.pp-how > summary .ic { width: 16px; height: 16px; flex: none; transition: transform var(--t) var(--ease); }
.pp-how[open] > summary .ic { transform: rotate(90deg); }
.pp-how-body { padding: 2px 2px 0; }
/* The local story card (storyui.js): same container and Back as the passport; its pubs come first. */
.then-stories { margin-top: 4px; }
.then-story .ic:first-child { width: 18px; height: 18px; color: var(--ink2); }
/* Story titles and the story's pub names wrap rather than cut off at phone width. */
.then-story .then-pub-t b, .sc-pub .then-pub-t b { white-space: normal; overflow: visible; text-overflow: clip; text-wrap: pretty; }
/* The Stories list in periods (storyui.js storyEras), and each row's teaser: the story's own first sentence,
   clamped to two lines. */
.then-era { margin: 14px 0 2px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em; color: var(--ink3); }
.then-stories > .sechead + .then-era { margin-top: 4px; }
.then-story { align-items: flex-start; padding-top: 9px; padding-bottom: 9px; }
.then-story > .ic { margin-top: 1px; }
.then-story .then-pub-t { gap: 2px; }
.then-story-tease {
  font-size: 12.5px; line-height: 1.38; color: var(--ink2); display: -webkit-box; -webkit-box-orient: vertical;
  -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; text-wrap: pretty;
}
.then-story .then-pub-t small { margin-top: 1px; }
/* This week in Fitzroy (weekcard.js): one On this day entry and the week's trivia question in one card. */
.then-week { margin-top: 10px; }
.then-week[hidden] { display: none; }
.tw-card { border-radius: var(--r1); background: var(--fill); overflow: hidden; }
.tw-part { padding: 12px 14px 11px; }
.tw-part + .tw-part { box-shadow: inset 0 0.5px 0 var(--sep); }
.tw-kicker { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 0 0 5px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--ink3); }
.tw-kicker .tn { font-weight: 500; text-transform: none; letter-spacing: 0; }
.tw-title, .tw-q { margin: 0 0 3px; font-size: 14.5px; font-weight: 600; line-height: 1.32; letter-spacing: -0.01em; text-wrap: pretty; }
.tw-text { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--ink); text-wrap: pretty; }
.tw-text.is-clamped { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.tw-ctx { color: var(--ink2); margin-top: 6px; }
.tw-more { padding: 3px 0 2px; margin-top: 1px; }
.tw-inf { margin: 5px 0 0; }
.tw-unsure { margin: 4px 0 0; font-size: 12px; color: var(--ink2); }
.tw-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; margin-top: 7px; font-size: 12px; color: var(--ink3); }
.tw-open {
  display: inline-flex; align-items: center; gap: 3px; min-height: 30px; margin-left: -4px; padding: 0 4px; border: 0; border-radius: var(--r3);
  background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--tint); cursor: pointer; text-align: left;
}
.tw-open .ic { width: 14px; height: 14px; }
.tw-open:hover { background: var(--fill); }
.tw-open:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.tw-src a { color: var(--ink3); text-decoration-color: var(--fill2); text-underline-offset: 2px; }
.tw-src a:hover { color: var(--tint); text-decoration-color: currentColor; }
.tw-src a:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-radius: 2px; }
.tw-trivia .fun-opts { margin: 8px 0 2px; }
.tw-trivia .fun-opt { background: var(--mat-solid, #fff); }
.tw-result { margin: 6px 0 0; font-size: 13.5px; font-weight: 600; }
.tw-result:focus { outline: none; }
.tw-result.is-right { color: var(--living); }
/* A right answer: a tick pressed in like a stamp, and the tally of right answers. */
.tw-win { display: flex; align-items: center; gap: 9px; margin: 8px 0 2px; padding: 8px 10px; border-radius: var(--r2); background: var(--living-bg); }
.tw-win .tw-result { margin: 0; display: grid; gap: 1px; }
.tw-tally { font-size: 12px; font-weight: 500; color: var(--ink2); }
.tw-tick { flex: none; width: 30px; height: 30px; fill: var(--living); stroke: none; transform: rotate(-8deg); }
.tw-tick path { fill: none; stroke: var(--tint-ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.tw-win.is-fresh .tw-tick { animation: tw-tick-in 520ms cubic-bezier(0.3, 0.1, 0.3, 1) both; }
@keyframes tw-tick-in { 0% { opacity: 0; transform: scale(1.8) rotate(-24deg); } 55% { opacity: 1; transform: scale(0.9) rotate(-6deg); } 100% { opacity: 1; transform: scale(1) rotate(-8deg); } }
@media (prefers-reduced-motion: reduce) { .tw-win.is-fresh .tw-tick { animation: pb-fade 300ms ease-out both; } }
.tw-result.is-wrong { color: var(--lost); }
/* The ghost pub walk card (places.js createWalkCard): suburb toggle, summary, numbered stops, Show / Hide. */
.then-walk { margin-top: 4px; }
.then-walk-sum { margin: 10px 0 2px; color: var(--ink2); font-size: 13px; }
.then-walk-n {
  flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--fill2); color: var(--ink2); font-size: 12px; font-weight: 650;
}
.then-walk-stops .then-pub-t b { white-space: normal; overflow: visible; text-overflow: clip; text-wrap: pretty; }
.then-walk-act { margin-top: 8px; }
.then-walk .pp-foot { margin: 0; }
/* The walk's stop numbers on the map (crawlmap.js): a disc on each stop. */
.route-nums { position: absolute; inset: 0; pointer-events: none !important; overflow: hidden; }
.route-num {
  /* Centred on the stop, over its dab: the stop's name fits on any side of it (crawlmap.js BADGE). */
  position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%;
  background: var(--walk); color: var(--walk-ink); font: 700 11px/1 var(--font-ui); box-shadow: 0 0 0 1.5px var(--walk-halo), 0 1px 3px rgba(0, 0, 0, 0.3);
  will-change: transform; visibility: hidden; pointer-events: none;
}
.route-nums.is-crawl .route-num { background: #e0861a; color: #fff; box-shadow: 0 0 0 1.5px #fff, 0 1px 3px rgba(0, 0, 0, 0.3); }
.sc-head { padding: 10px 4px 0; }
.sc-kicker { display: flex; align-items: center; gap: 5px; color: var(--ink2); font-size: 12px; font-weight: 600; }
.sc-kicker .ic { width: 14px; height: 14px; }
.sc-title { margin: 6px 0 0; font-size: 23px; line-height: 1.18; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); outline: none; text-wrap: balance; }
.sc-title:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 3px; }
.sc-meta { margin-top: 6px !important; color: var(--ink2); font-size: 13.5px; line-height: 1.4; }
.sc-show { display: inline-flex; align-items: center; gap: 5px; margin-top: 12px; min-height: 32px; padding: 6px 13px 6px 10px; color: var(--tint); position: relative; }
.sc-show::after { content: ''; position: absolute; inset: -6px 0; } /* a 44 px hit area */
.sc-show .ic { width: 15px; height: 15px; stroke-width: 2; }
.sc-pubs { margin: 18px 0 0; padding: 0 4px; }
.sc-k { margin: 0 0 6px; font-size: 13px; font-weight: 650; color: var(--ink2); }
.sc-pubs ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
/* Pubs linked to a story that its text does not name: a quiet subheading, plainer rows. */
.sc-near { margin: 14px 0 6px; font-size: 12px; font-weight: 600; color: var(--ink2); }
.sc-near + ul .sc-pub { background: var(--fill); }
.sc-pub {
  width: 100%; min-height: 52px; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 0; border-radius: var(--r2);
  background: var(--living-bg, var(--fill)); color: var(--ink); text-align: left; cursor: pointer; transition: background var(--t) var(--ease);
}
.sc-pub:hover { background: var(--fill2); }
.sc-pub .ic { width: 17px; height: 17px; flex: none; color: var(--tint); }
.sc-pub .ic:last-child { width: 16px; height: 16px; color: var(--ink3); }
.sc-pub .then-pub-t b { font-size: 15px; }
.sc-pub .then-pub-t small { color: var(--ink2); font-size: 12px; }
.sc-text { padding: 20px 4px 0; display: grid; gap: 12px; }
.sc-text p { font-size: 15px; line-height: 1.55; color: var(--ink); text-wrap: pretty; }
.sc-src { margin: 26px 4px 6px; }
.sc-src > .sechead:first-child { margin-top: 0; }
@media (prefers-reduced-motion: reduce) { .sc-pub { transition: none; } }
@media (prefers-reduced-motion: reduce) { .pp-how > summary .ic { transition: none; } }
.pp-rows { list-style: none; margin: 0; padding: 0; }
.pp-row { display: grid; grid-template-columns: 82px 1fr; gap: 10px; padding: 5px 0; }
.pp-date { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); font-size: 12px; line-height: 18px; }
.pp-row > div > p { color: var(--ink2); }
.pp-k-name > div > p:first-child, .pp-k-licence > div > p:first-child { color: var(--ink); font-weight: 550; }
.pp-row.is-gap > div > p:first-child { font-style: italic; color: var(--ink3); }
.pp-row.is-gap b { font-weight: 500; }
.pp-lifeline { margin: 0 0 8px; }
.pp-lifeline svg { display: block; width: 100%; height: auto; }
.pp-ll-label, .pp-ll-axis { font: 600 10px var(--font-ui); fill: var(--ink3); }
.pp-ll-lic { fill: var(--living); }
.pp.is-lost .pp-ll-lic { fill: var(--lost); }
.pp-ll-lic.is-uncertain { fill: var(--ink3); }
.pp-ll-who { fill: var(--ink2); opacity: 0.7; }
.pp-ll-who.alt { opacity: 0.4; }
.pp-ll-gap { fill: url(#pp-hatch); stroke: var(--fill2); stroke-width: 0.5; }
.pp-ll-hatch { fill: var(--ink3); }
.pp-ll-ev { fill: var(--amber); }
.pp-key { display: inline-block; width: 12px; height: 6px; margin: 0 4px 0 8px; vertical-align: 1px; border-radius: 2px; }
.pp-key:first-child { margin-left: 0; }
.pp-key.lic { background: var(--living); }
.pp-key.who { background: var(--ink2); opacity: 0.7; }
.pp-key.gap { background: repeating-linear-gradient(135deg, var(--ink3) 0 1.5px, transparent 1.5px 4px); }
.pp-key.ev { width: 6px; border-radius: 3px; background: var(--amber); }
.pp-photos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pp-photos .pp-photo { display: block; width: 100%; padding: 0; border: 0; border-radius: var(--r3); overflow: hidden; background: #222; cursor: zoom-in; }
.pp-photos img { display: block; width: 100%; height: 110px; object-fit: cover; }
.pp-cap { margin-top: 4px !important; font-size: 11px; color: var(--ink3); }
.pp-lightbox { max-width: min(1100px, 94vw); max-height: 94vh; padding: 0; border: 0; border-radius: var(--r1); background: var(--mat-solid); color: var(--ink); box-shadow: var(--shadow); }
.pp-lightbox::backdrop { background: rgba(10, 14, 12, 0.72); }
.pp-lightbox figure { margin: 0; }
.pp-lightbox img { display: block; max-width: 100%; max-height: 74vh; margin: 0 auto; }
.pp-lightbox figcaption { padding: 12px 16px 4px; font-size: 13px; }
.pp-lightbox figcaption p { margin: 0 0 4px; }
.pp-lightbox a { color: var(--tint); }
.pp-lb-close { margin: 4px 16px 14px; border: 0; border-radius: 999px; padding: 5px 14px; background: var(--fill); font-weight: 600; }
.pp-day { color: var(--ink); font-weight: 600; }
.pp-h4 { margin: 14px 0 6px; font-size: 13px; font-weight: 620; color: var(--ink); }
.pp-hours, .pp-specials, .pp-menus, .pp-areas, .pp-conflicts, .pp-gaps, .pp-sources { list-style: none; margin: 0; padding: 0; }
.pp-hours li { display: grid; grid-template-columns: 96px 1fr; gap: 8px; padding: 2px 0; color: var(--ink); }
.pp-hours li > span:first-child { color: var(--ink3); }
.pp-hours li.is-today > span:first-child { color: var(--ink); font-weight: 600; }
.pp-open { font-weight: 600; font-size: 12px; color: var(--living); margin-left: 6px; }
.pp-open.is-closed { color: var(--lost); }
.pp-specials li { padding: 8px 0; box-shadow: 0 -0.5px 0 var(--sep); color: var(--ink); }
.pp-specials li p:first-child b { font-weight: 560; }
.pp-seen { font-size: 11px; color: var(--ink3); margin-top: 2px !important; }
.pp-roof { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 11.5px; }
.pp-roof-btn { border: 0; border-radius: 999px; padding: 3px 10px; background: var(--fill); font-weight: 600; font-size: 12px; white-space: nowrap; }
.pp-roof-btn[aria-pressed="true"] { background: var(--amber-bg); color: var(--amber-ink); }
.pp-strip svg { display: block; width: 100%; height: auto; }
.pp-st-label { font: 500 11.5px var(--font-ui); fill: var(--ink); }
.pp-st-tick { font: 500 10px var(--font-ui); fill: var(--ink3); }
.pp-st-now { stroke: var(--ink); stroke-width: 1.5; }
.pp-areas li { padding: 3px 0; color: var(--ink); font-size: 12px; }
.pp-areas details summary { cursor: pointer; font-size: 11px; color: var(--ink3); }
.pp-menus li { padding: 3px 0; color: var(--ink); }
.pp-menus .pp-dim { display: block; font-size: 12px; }
.pp-plan-btn { margin-top: 10px; border: 0; border-radius: var(--r2); padding: 7px 12px; background: var(--fill); color: var(--tint); font-weight: 600; }
.pp-plan-btn:hover { background: var(--fill2); }
#pp-building p + p { margin-top: 6px; }
#pp-building p b { font-weight: 600; }
.pp-conflict { padding: 8px 0; box-shadow: 0 -0.5px 0 var(--sep); color: var(--ink); }
.pp-gap { padding: 7px 0; box-shadow: 0 -0.5px 0 var(--sep); color: var(--ink); }
.pp-gaps-intro { margin: 0 0 4px; }
.pp-cf-field { font-size: 11px; font-weight: 600; color: var(--amber-ink); }
.pp-cf-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 6px; margin-top: 6px; }
.pp-cf-src { padding: 6px 8px; border-radius: var(--r3); background: var(--mat2); box-shadow: inset 0 0 0 0.5px var(--sep); font-size: 12px; }
.pp-cf-src .pp-dim { display: block; font-size: 11px; }
.pp-cf-n { display: inline-block; min-width: 14px; margin-right: 4px; font-weight: 700; color: var(--ink3); }
.pp-sources li { display: grid; grid-template-columns: 22px 1fr; padding: 7px 0; box-shadow: 0 -0.5px 0 var(--sep); color: var(--ink); font-size: 12px; }
.pp-sources li::before { content: attr(value); grid-row: span 3; color: var(--ink3); font-weight: 600; }
.pp-sources li > * { grid-column: 2; }
.pp-sources a { color: var(--ink); font-weight: 560; text-decoration: none; }
.pp-sources a:hover { color: var(--tint); text-decoration: underline; }
.pp-sources .pp-dim, .pp-sources .pp-note { display: block; font-size: 11.5px; }

/* ---- Map controls --------------------------------------------------------------------------------- */
.ctls { position: fixed; right: var(--edge-gap); top: var(--edge-gap); z-index: 6; display: flex; flex-direction: column; gap: var(--s2); align-items: flex-end; pointer-events: none; }
.ctls > * { pointer-events: auto; }
.ctl { display: flex; flex-direction: column; border-radius: var(--r2); }
/* Rounded hover fills at the group's ends (the group no longer clips, so the hit areas below can reach out). */
.ctl button:first-child { border-radius: var(--r2) var(--r2) 0 0; }
.ctl button:last-child { border-radius: 0 0 var(--r2) var(--r2); }
.ctl button:only-child { border-radius: var(--r2); }
/* Invisible hit areas: 2 px wider each side (44 px), and 4 px out into the 8 px gap at a group's top and
   bottom (the two groups' areas meet in the middle of the gap). Buttons stacked inside a group keep their
   40 px share of the height, so no area overlaps a neighbour. */
.ctl button::after { content: ''; position: absolute; inset: 0 -2px; }
.ctl button:first-child::after { top: -4px; }
.ctl button:last-child::after { bottom: -4px; }
.ctl button { width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: transparent; color: var(--ink2); font-weight: 650; font-size: 12.5px; position: relative; }
.ctl button + button { box-shadow: 0 -0.5px 0 var(--sep); }
.ctl button:hover { color: var(--ink); background: var(--fill); }
.ctl button:focus-visible { outline-offset: -3px; border-radius: var(--r2); }
.ctl .ctl-3d[aria-pressed="true"], .ctl .ctl-layers.on { color: var(--tint); }
.ctl .ctl-about span { font-size: 16px; font-weight: 650; line-height: 1; }
.compass { width: 22px; height: 22px; }
.compass-needle { transform-origin: 12px 12px; transform-box: view-box; transition: transform 120ms linear; }
.compass-n { fill: var(--lost); }
.compass-s { fill: var(--ink3); }
.pop {
  position: absolute; right: 52px; top: 0; width: 290px; padding: 8px; border-radius: var(--r1);
  /* Stop above the Credits pill at the bottom right and scroll, so every row can be reached. */
  max-height: calc(100dvh - 2 * var(--edge-gap) - 44px); overflow-y: auto; overscroll-behavior: contain;
}
.pop-h { margin: 4px 8px 6px; font-size: 13.5px; font-weight: 600; }
.pop-r { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r3); }
.pop-r + .pop-r { box-shadow: 0 -0.5px 0 var(--sep); }
.pop-r .t { flex: 1; min-width: 0; }
.pop-r .t b { display: block; font-weight: 550; }
.pop-r .t b kbd { margin-left: 4px; vertical-align: 1px; }
.pop-r .t small { color: var(--ink3); font-size: 11.5px; }
.pop-r.dis b { color: var(--ink3); }
.pop-ic { width: 30px; height: 30px; border-radius: var(--r3); display: grid; place-items: center; background: var(--fill); color: var(--ink2); flex: none; }
.pop-theme { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 8px 4px; margin-top: 4px; box-shadow: 0 -0.5px 0 var(--sep); font-weight: 550; }

/* ---- Credits (bottom right) ----------------------------------------------------------------------- */
.credits { position: fixed; right: var(--edge-gap); bottom: var(--edge-gap); z-index: 5; display: flex; flex-direction: column-reverse; align-items: flex-end; gap: 6px; }
.credits-button {
  border: 0; border-radius: 999px; padding: 3px 9px; font-size: 10.5px; font-weight: 600; color: var(--ink2);
  background: var(--mat); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: var(--edge), 0 1px 3px rgba(0, 0, 0, 0.12);
}
.credits-button:hover, .credits-button[aria-expanded="true"] { color: var(--ink); }
.credits-panel {
  max-width: 360px; max-height: 60vh; overflow-y: auto; padding: 10px 12px; border-radius: var(--r1);
  background: var(--mat); -webkit-backdrop-filter: blur(24px) saturate(1.7); backdrop-filter: blur(24px) saturate(1.7);
  box-shadow: var(--shadow), var(--edge); font-size: 12px; color: var(--ink2);
}
.credits-panel p { margin: 0 0 8px; }
.credits-panel b { display: block; color: var(--ink); font-weight: 600; }
.credits-panel a { color: var(--ink2); text-decoration: underline; text-decoration-color: var(--fill2); }
.credits-panel a:hover { color: var(--tint); }
.credits-panel .credits-note { margin: 4px 0 0; font-size: 11px; color: var(--ink3); }

/* ---- Year scrubber -------------------------------------------------------------------------------- */
.scrub {
  position: fixed; bottom: 14px; z-index: 5; padding: 12px 16px 9px; width: 760px; max-width: calc(100vw - 24px);
  transition: left var(--t) var(--ease), width var(--t) var(--ease), bottom var(--t) var(--ease), opacity var(--t) var(--ease);
  user-select: none; -webkit-user-select: none;
}
.scrub-top { display: flex; align-items: center; gap: 12px; }
.scrub-year { font-size: 30px; font-weight: 650; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; border: 0; padding: 0; background: none; color: inherit; font-family: inherit; cursor: default; }
/* What the strip is for, in plain text until the year is first changed. */
.scrub-label { font-size: 12px; font-weight: 600; color: var(--tint); white-space: nowrap; }
.scrub-label[hidden] { display: none; }
/* A short live line (the six o'clock countdown); it takes the hint's place while it shows. */
/* Desktop: it keeps its full width (the map line beside it gives way); the phone's pill has the strip's width. */
.scrub-note { font-size: 12px; font-weight: 600; color: var(--ink); white-space: nowrap; flex: none; }
.scrub-note[hidden], .scrub.has-note .scrub-label { display: none; }
.scrub-cap { font-size: 12px; color: var(--ink2); line-height: 1.3; display: flex; flex-direction: column; min-width: 0; }
.scrub-cap b { color: var(--ink); font-weight: 600; }
.scrub-cap span, .scrub-cap b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scrub-listbtn { display: inline-flex; align-items: center; gap: 5px; border: 0; border-radius: 999px; padding: 6px 10px; background: var(--fill); color: var(--ink2); font-weight: 600; font-size: 12px; }
.scrub-listbtn[aria-pressed="true"] { background: var(--living-bg); color: var(--tint); }
.nowpill { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; padding: 6px 13px; font-weight: 600; font-size: 13px; background: var(--fill); color: var(--ink); }
.nowpill:hover { background: var(--fill2); }
.nowpill.on { background: var(--tint); color: var(--tint-ink); }
.nowpill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.9; }
.scrub-ridge { position: relative; margin-top: 6px; }
.ridge { display: block; width: 100%; overflow: visible; cursor: ew-resize; touch-action: none; border-radius: 6px; }
.ridge:focus { outline: none; }
.ridge:focus-visible .ridge-knob { stroke: var(--focus); stroke-width: 2.5; }
.ridge-all { fill: var(--ridge); }
.ridge-past { fill: var(--ridge2); }
.ridge-present { fill: var(--fill); }
.ridge-base { stroke: var(--sep); }
.ridge-ticks text { font: 500 10px var(--font-ui); fill: var(--ink3); }
.ridge-ticks .ridge-now { fill: var(--ink2); font-weight: 600; }
/* The era ticks' own layer over the strip (scrubber.js): only the ticks take the pointer. */
.ridge-eras { position: absolute; left: 0; top: 0; width: 100%; overflow: visible; pointer-events: none; }
.ridge-eras[hidden] { display: none; }
.ridge-eras .era-tick { pointer-events: auto; }
.ridge-era.is-static { pointer-events: none; }
.ridge-era.is-static .era-mark { stroke: var(--ink); stroke-width: 1.75; }
.ridge-era .era-hit { fill: transparent; cursor: pointer; }
.ridge-era .era-mark { stroke: var(--ink2); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.ridge-era .era-tick { outline: none; }
.ridge-era .era-tick:hover .era-mark, .ridge-era .era-tick:focus-visible .era-mark { stroke: var(--ink); stroke-width: 3; }
.ridge-era .era-tick:focus-visible .era-hit { stroke: var(--ink); stroke-width: 2; rx: 2; } /* ink, not the tint: it sits over both the grey ridge and the glass */
.ridge-life.is-living { fill: var(--living); }
.ridge-life.is-lost { fill: var(--lost); }
.ridge-play { stroke: var(--ink); stroke-width: 1.2; }
.ridge-hover { stroke: var(--ink3); stroke-width: 1; stroke-dasharray: 2 2; }
.ridge-knob { fill: var(--knob); stroke: rgba(0, 0, 0, 0.14); stroke-width: 0.5; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35)); }
.scrub-tip {
  position: absolute; left: 0; bottom: calc(100% + 6px); padding: 6px 10px; border-radius: var(--r2); max-width: 340px;
  background: var(--mat-solid); box-shadow: var(--shadow); font-size: 12px; color: var(--ink2); pointer-events: none;
  opacity: 0; transition: opacity 120ms linear; white-space: normal;
}
.scrub-tip.on { opacity: 1; }
.scrub-tip.is-era { white-space: normal; }
.scrub-tip.is-era span { margin-top: 2px; color: var(--ink2); }
.scrub-tip b { color: var(--ink); font-weight: 650; margin-right: 4px; }
.scrub-tip span { display: block; color: var(--ink); }
.scrub-foot { display: flex; justify-content: space-between; gap: 10px; font-size: 10.5px; color: var(--ink3); margin-top: 3px; }
.scrub-foot b { font-weight: 600; color: var(--ink2); }
.scrub-sel { color: var(--ink2); }
.scrub-count { color: var(--ink2); }
.scrub-list { margin-top: 8px; border-top: 0.5px solid var(--sep); padding-top: 6px; }
.scrub-list-head { font-size: 11.5px; color: var(--ink3); margin-bottom: 4px; }
.scrub-rows { list-style: none; margin: 0; padding: 0 10px 0 8px; max-height: 168px; overflow-y: auto; scrollbar-width: thin; }
.srow { position: relative; display: block; width: 100%; height: 22px; border: 0; background: none; padding: 0; text-align: left; border-radius: 5px; }
.srow:hover, .srow.is-hot { background: var(--fill); }
.srow-track { position: absolute; left: 0; right: 0; top: 10px; height: 2px; }
.srow-track i { position: absolute; top: 0; height: 2px; border-radius: 1px; background: var(--ink3); }
.srow.is-living .srow-track i { background: var(--living); }
.srow.is-lost .srow-track i { background: var(--lost); opacity: 0.8; }
.srow.is-sel .srow-track i { height: 4px; top: -1px; }
.srow-name {
  position: absolute; top: 3px; padding: 0 5px; font-size: 11.5px; font-weight: 550; line-height: 16px; white-space: nowrap;
  background: var(--mat-solid); border-radius: 4px; color: var(--ink);
}
.srow.is-lost .srow-name { color: var(--ink2); }
.srow.is-sel .srow-name { color: var(--tint); font-weight: 650; }

/* ---- Map labels and the pub tooltip --------------------------------------------------------------- */
.pub-labels { position: absolute; inset: 0; pointer-events: none !important; overflow: hidden; }
.pub-label {
  position: absolute; left: 0; top: 0; font-family: var(--font-ui); font-weight: var(--map-label-weight); font-size: 13px; line-height: 16px;
  letter-spacing: -0.005em; white-space: nowrap; color: var(--map-ink);
  /* The stroke is centred on the outline and the fill covers its inner half: the halo shows haloPx wide. */
  -webkit-text-stroke: calc(var(--map-halo-px) * 2) var(--map-halo); paint-order: stroke fill;
  text-shadow: var(--map-label-glow);
  pointer-events: none !important; will-change: transform, opacity; visibility: hidden;
}
@supports not (paint-order: stroke fill) {
  .pub-label {
    -webkit-text-stroke: 0;
    /* The halo's own colour (a past year's paper tone included), not a fixed white. */
    text-shadow: 1px 1px 0 var(--map-halo), -1px -1px 0 var(--map-halo), 1px -1px 0 var(--map-halo), -1px 1px 0 var(--map-halo),
      2px 0 0 var(--map-halo), -2px 0 0 var(--map-halo), 0 2px 0 var(--map-halo), 0 -2px 0 var(--map-halo);
  }
}
.pub-label.is-lost { color: var(--map-ink-lost); font-weight: var(--map-label-weight-lost); font-style: italic; }
.pub-label.is-hot { color: var(--map-ink-hot); }
/* Zoomed out (pubui.js overview): the short names, a size down, so more dots carry a name. */
.pub-labels.is-overview .pub-label { font-size: 11.5px; line-height: 14px; letter-spacing: 0; }
.pub-tip {
  position: fixed; z-index: 20; left: 0; top: 0; padding: 7px 11px 8px; border-radius: var(--r2);
  background: var(--mat); -webkit-backdrop-filter: blur(24px) saturate(1.7); backdrop-filter: blur(24px) saturate(1.7);
  box-shadow: var(--shadow), var(--edge); font-size: 12px; line-height: 1.4; color: var(--ink2); white-space: nowrap;
  pointer-events: none !important; visibility: hidden;
}
.pub-tip b { display: block; font-size: 13.5px; font-weight: 620; color: var(--ink); }
/* Local stories on the map (Then only): a small round book mark, quieter than the pub names, which win any
   overlap (storyui.js places them after the names). The title shows at street zoom, or on the open story. */
/* The marks show in Then only, over the plans, which stay paper-coloured in any look: they keep the light,
   paper treatment whatever the look, as the pub names do there (halosync.js). Defined once, not per look. */
.story-marks {
  position: absolute; inset: 0; pointer-events: none !important; overflow: hidden;
  --story-disc: #f6f6f4; --story-icon: #58615c; --story-ink: #505357;
  --map-halo: rgba(226, 219, 202, 0.85); --map-halo-px: 1.25px;
}
.story-mark {
  position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 3px; padding: 0; border: 0; background: none;
  color: var(--story-ink); font: 500 11px/18px var(--font-ui); letter-spacing: -0.005em; white-space: nowrap; cursor: pointer;
  pointer-events: auto; will-change: transform; visibility: hidden;
}
.story-mark::before { content: ''; position: absolute; left: -14px; top: -14px; width: 44px; height: 44px; } /* a 44 px hit area */
/* Quieter than a pub's name: small, a soft fill, the icon in the secondary ink (storyui.js ICON_PX). */
.story-mark-i {
  width: 16px; height: 16px; flex: none; display: grid; place-items: center; border-radius: 50%;
  background: var(--story-disc); color: var(--story-icon); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18), 0 0 0 0.5px rgba(0, 0, 0, 0.12);
}
.story-mark-i .ic { width: 10px; height: 10px; stroke-width: 2; }
.story-mark-t {
  display: none; -webkit-text-stroke: calc(var(--map-halo-px) * 2) var(--map-halo); paint-order: stroke fill;
}
.story-mark.has-title .story-mark-t { display: block; }
.story-mark:hover .story-mark-i, .story-mark.is-active .story-mark-i { background: var(--tint); color: var(--tint-ink); }
.story-mark.is-active { z-index: 1; }
.story-mark:focus-visible { outline: none; }
/* On the map, which can be light or dark under either theme: a two-tone ring, the focus colour outside a band of
   the theme's solid material, so one of the two always stands out from the map round it. */
.story-mark:focus-visible .story-mark-i { outline: 2px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 2px var(--mat-solid); }

/* The one-off hint to turn the view at today. */
.map-note {
  position: fixed; left: 50%; top: var(--edge-gap); transform: translateX(-50%); padding: 5px 12px; border-radius: 999px;
  font-size: 12px; color: var(--ink2); background: var(--mat); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: var(--edge), 0 1px 3px rgba(0, 0, 0, 0.12); pointer-events: none !important; transition: opacity 300ms var(--ease); z-index: 4;
}
.is-faded { opacity: 0; pointer-events: none !important; }

/* ---- Phone: the sidebar becomes a bottom sheet; the scrubber goes compact by the thumb --------------- */
@media (max-width: 699.98px) {
  :root { --edge-gap: 10px; }
  .sb { left: 0; right: 0; top: auto; bottom: 0; width: auto; height: 0; z-index: 7; }
  .sb-sheet {
    position: absolute; left: 0; right: 0; bottom: 0; gap: 0; height: 80vh;
    background: var(--mat); -webkit-backdrop-filter: blur(24px) saturate(1.7); backdrop-filter: blur(24px) saturate(1.7);
    border-radius: 16px 16px 0 0; box-shadow: var(--shadow), var(--edge); pointer-events: auto;
    padding-bottom: env(safe-area-inset-bottom, 0px); will-change: transform; touch-action: none;
  }
  .sb-sheet.is-anim { transition: transform 320ms cubic-bezier(0.32, 0.72, 0, 1); }
  .sb-grab { display: block; flex: none; width: 100%; height: 20px; border: 0; background: transparent; padding: 7px 0 0; touch-action: none; }
  .sb-grab span { display: block; width: 36px; height: 5px; border-radius: 3px; background: var(--fill2); margin: 0 auto; }
  .sb-search, .sb-card { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: 0; }
  .sb-search { margin: 2px 12px 8px; background: var(--fill); border-radius: var(--r2); }
  .sb-search:focus-within { box-shadow: 0 0 0 2px var(--focus); }
  .sb-card { flex: 1 1 auto; touch-action: pan-y; }
  .sb-body { flex: 1 1 auto; touch-action: pan-y; padding-bottom: calc(var(--sheet-hidden, 0px) + env(safe-area-inset-bottom, 0px) + 16px); }
  .sb-tabs { margin: 0 12px; }
  .sb-home { padding: 12px 16px 16px; }
  .sb-pub { padding: 10px 12px 16px; }
  .search-results { max-height: 40vh; }
  .pname { font-size: 34px; }
  .pp-photo-head img { height: 160px; }
  .ctls { top: calc(env(safe-area-inset-top, 0px) + 10px); }
  .ctl button { width: 40px; height: 40px; }
  .ctl-zoom { display: none; }
  /* Stop above the bottom sheet (its height is --sheet-h) and scroll, so every row can be reached. */
  .pop {
    right: 50px; width: min(290px, calc(100vw - 72px));
    max-height: calc(100dvh - var(--sheet-h, 84px) - env(safe-area-inset-top, 0px) - 24px);
    overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  }
  .pop-quality { flex-wrap: wrap; }
  .pop-quality .seg { width: 100%; display: flex; }
  .pop-quality .seg button { flex: 1; min-width: 0; padding-left: 4px; padding-right: 4px; }
  .scrub {
    left: 10px !important; right: 10px; width: auto !important; max-width: none; padding: 8px 10px 8px 12px; border-radius: 16px;
    bottom: calc(var(--sheet-h, 84px) + 8px);
  }
  .scrub.is-compact .scrub-top { gap: 8px; }
  .scrub.is-compact { display: flex; align-items: center; gap: 10px; }
  .scrub.is-compact .scrub-top { display: contents; }
  .scrub.is-compact .scrub-year { font-size: 18px; order: 0; }
  .scrub.is-compact .scrub-ridge { order: 1; flex: 1; margin: 0; min-width: 0; }
  .scrub.is-compact .nowpill { order: 2; padding: 5px 10px; font-size: 12px; }
  .scrub.is-compact .scrub-cap, .scrub.is-compact .grow, .scrub.is-compact .scrub-listbtn, .scrub.is-compact .scrub-foot, .scrub.is-compact .scrub-list { display: none !important; }
  .scrub.is-hidden { opacity: 0; pointer-events: none; }
  /* The label rides just above the compact strip, over the map, so it adds no height. */
  .scrub.is-compact .scrub-label, .scrub.is-compact .scrub-note {
    position: absolute; left: 10px; bottom: calc(100% + 6px); max-width: calc(100% - 20px); padding: 4px 10px; border-radius: 999px;
    background: var(--mat); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    box-shadow: var(--edge), 0 1px 3px rgba(0, 0, 0, 0.12); pointer-events: none;
  }
  /* Never over sheet content: no hint or note while the strip is docked in a full sheet or a pub is open. */
  .scrub.is-compact .scrub-note { white-space: normal; }
  .scrub.is-docked .scrub-label, .scrub.is-docked .scrub-note, .scrub.is-pub .scrub-label { display: none; }
  /* Full sheet: the strip docks at the bottom of the sheet, in a band of its own below the scroll body, so no
     line of content ever runs under it (--dock-h is the strip's height, set by main.js layoutUi). */
  .scrub.is-docked { z-index: 8; bottom: calc(env(safe-area-inset-bottom, 0px) + 8px); box-shadow: var(--shadow), var(--edge); }
  .scrub.is-docked .scrub-year {
    cursor: pointer; min-height: 44px; margin: -7px 0; padding: 0 8px; border-radius: 10px; background: var(--fill);
  }
  .scrub.is-docked .scrub-year:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
  .sb[data-detent="full"] .sb-sheet { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + var(--dock-h, 46px) + 16px); }
  .sb[data-detent="full"] .sb-body { padding-bottom: 16px; }
  .credits { bottom: auto; top: calc(env(safe-area-inset-top, 0px) + 10px); right: auto; left: var(--edge-gap); flex-direction: column; align-items: flex-start; }
  .map-note { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .scrub, .sw, .sw::after, .compass-needle, .act { transition: none !important; }
}

/* ?bench report panel (bench.js): readable on a phone, above everything. */
.bench-panel { position: fixed; z-index: 50; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top, 0px) + 10px); width: min(560px, calc(100vw - 24px)); box-sizing: border-box; padding: 12px 14px; border-radius: 14px; background: rgba(16, 18, 20, 0.9); color: #eef3ee; font: 13px/1.4 var(--font-ui, system-ui); display: grid; gap: 8px; }
.bench-panel pre { margin: 0; white-space: pre-wrap; font: 11.5px/1.45 ui-monospace, Menlo, monospace; max-height: 50vh; overflow: auto; }
.bench-row { display: flex; flex-wrap: wrap; gap: 8px; }
.bench-row button { border: 0; border-radius: 999px; padding: 9px 14px; font: 600 13px var(--font-ui, system-ui); background: #e9efe9; color: #15201a; }
.bench-row button:first-child { background: #6cc191; color: #0c1a12; }

/* Pub passport, Phase 5: building facts, heritage, footy, then-and-now */
.pp-facts { margin: 0; display: grid; gap: 0; }
.pp-fact { display: grid; grid-template-columns: 7.5em 1fr; gap: 10px; padding: 6px 0; box-shadow: 0 -0.5px 0 var(--sep); }
.pp-fact dt { font-weight: 600; color: var(--ink); }
.pp-fact dt .pp-dim { display: block; font-weight: 400; }
.pp-fact dd { margin: 0; color: var(--ink); }
.pp-heritage, .pp-footys { list-style: none; margin: 0; padding: 0; }
.pp-heritage li { padding: 4px 0; }
.pp-footy { padding: 8px 0; box-shadow: 0 -0.5px 0 var(--sep); color: var(--ink); }
.pp-footy p { margin: 0 0 3px; }
.pp-tn { margin: 0 0 12px; }
.pp-tn-frame { position: relative; overflow: hidden; border-radius: var(--r3); aspect-ratio: 4 / 3; background: var(--sep); }
.pp-tn-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pp-tn-then { clip-path: inset(0 calc(100% - var(--split)) 0 0); }
.pp-tn-frame::after { content: ''; position: absolute; top: 0; bottom: 0; left: var(--split); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 4px rgba(0,0,0,.45); pointer-events: none; }
.pp-tn-range { width: 100%; margin: 6px 0 0; accent-color: var(--living); }
@media (max-width: 380px) { .pp-fact { grid-template-columns: 1fr; gap: 2px; } }
.pp-families, .pp-members { list-style: none; margin: 0; padding: 0; }
.pp-family { padding: 8px 0; box-shadow: 0 -0.5px 0 var(--sep); color: var(--ink); }
.pp-family > p { margin: 0 0 4px; }
.pp-members li { padding: 2px 0 2px 12px; border-left: 2px solid var(--sep); }

/* Your passport (Phase 6) */
.mp-stamp { margin: 0 0 8px; }
.mp-btn { font: inherit; font-weight: 600; padding: 7px 14px; border: 0; border-radius: var(--r2); background: var(--tint); color: var(--tint-ink); cursor: pointer; }
.mp-btn:focus-visible, .mp-link:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.mp-link { font: inherit; font-size: 12px; padding: 2px 0; border: 0; background: none; color: var(--ink2); text-decoration: underline; cursor: pointer; }
.mp-form { display: grid; gap: 8px; margin: 8px 0; padding: 10px; border-radius: var(--r2); background: var(--fill); }
.mp-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--ink); }
.mp-col { flex-direction: column; align-items: stretch; }
.mp-form input, .mp-form select, .mp-form textarea { font: inherit; color: var(--ink); background: var(--mat-solid, #fff); border: 1px solid var(--sep); border-radius: var(--r3); padding: 5px 7px; }
.mp-actions { display: flex; gap: 14px; align-items: center; }
.mp-visits { list-style: none; margin: 8px 0 0; padding: 0; }
.mp-visit { padding: 8px 0; box-shadow: 0 -0.5px 0 var(--sep); color: var(--ink); }
.mp-visit p { margin: 0 0 3px; }
.mp-stars { color: var(--amber); letter-spacing: 1px; }
.mp-off { color: var(--fill2); }
.sb-back { font: inherit; padding: 2px 0; margin: 4px 0; border: 0; background: none; color: var(--ink2); cursor: pointer; }
.mp-crawl { margin: 12px 0; padding: 10px 12px; border-radius: var(--r2); background: var(--fill); color: var(--ink); }
.mp-crawl .sechead { margin-top: 2px; }
.mp-crawl-form { display: grid; gap: 6px; margin-bottom: 8px; }
.mp-crawl-form input, .mp-crawl-form select { font: inherit; color: var(--ink); background: var(--mat-solid, #fff); border: 1px solid var(--sep); border-radius: var(--r3); padding: 4px 6px; }
.mp-crawl-stops { list-style: none; margin: 6px 0; padding: 0; }
.mp-crawl-stops li { display: grid; grid-template-columns: 18px 5.6em 1fr; gap: 8px; padding: 5px 0; box-shadow: 0 -0.5px 0 var(--sep); }
.mp-crawl-stops .pp-dim { display: block; font-size: 12px; }
.mp-when { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.mp-num { width: 18px; height: 18px; margin-top: 1px; display: grid; place-items: center; border-radius: 50%; background: #e0861a; color: #fff; font: 700 11px/1 var(--font-ui); }
.mp-stopname { font-size: 14px; color: var(--ink); text-decoration: none; font-weight: 600; }

/* Today engine (Phase 7) in Best now */
.td-rows { list-style: none; margin: 0; padding: 0; }
.td-pub { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; width: 100%; text-align: left; font: inherit; color: var(--ink); background: none; border: 0; padding: 7px 0; box-shadow: 0 -0.5px 0 var(--sep); cursor: pointer; }
.td-pub:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.td-name { font-weight: 600; }
.td-state { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: var(--fill); color: var(--ink2); align-self: center; }
.td-state.is-open { background: var(--living-bg); color: var(--living); }
.td-state.is-shut { background: var(--lost-bg); color: var(--lost); }
.td-why { grid-column: 1 / -1; font-size: 12px; color: var(--ink2); }
.td-score { display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; margin: 0 0 6px; color: var(--ink); }
.td-score b { font-size: 26px; line-height: 1; }
.td-score > span:not(.td-why) { color: var(--ink3); margin-right: 8px; }
.td-week { list-style: none; margin: 0 0 4px; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.td-week li { display: flex; flex-direction: column; align-items: center; padding: 4px 0; border-radius: var(--r3); background: var(--fill); font-size: 11px; color: var(--ink2); }
.td-week li:first-child { background: var(--living-bg); }
.td-week b { font-size: 13px; color: var(--ink); }
.td-clock { position: relative; height: 34px; margin: 4px 0 2px; border-radius: var(--r3); background: var(--fill); overflow: hidden; }
.td-hh { position: absolute; height: 10px; border-radius: 5px; background: var(--amber); opacity: 0.55; }
.td-hh.is-now { opacity: 1; }
.td-now { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--ink); }
.td-clockticks { display: flex; justify-content: space-between; font-size: 10px; color: var(--ink3); margin-bottom: 4px; }
.td-hhs { list-style: none; margin: 0; padding: 0; font-size: 12.5px; color: var(--ink); }
.td-hhs li { padding: 3px 0; }
.td-on { color: var(--amber-ink, var(--ink)); font-weight: 600; }
.td-wrow { display: grid; grid-template-columns: 7.5em 1fr; gap: 8px; align-items: end; margin: 4px 0; }
.td-wname { font-size: 12px; color: var(--ink); font-weight: 600; }
.td-wroof { display: flex; width: max-content; margin-top: 4px; font-size: 11px; }
.td-wroof button { padding: 2px 8px; }
.td-bars { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; height: 46px; }
.td-bars li { position: relative; display: flex; align-items: flex-end; justify-content: center; }
.td-bar-sky { position: absolute; bottom: 12px; left: 15%; right: 15%; border: 1px solid var(--amber); border-radius: 2px; max-height: calc(100% - 12px); }
.td-bar { position: absolute; bottom: 12px; left: 15%; right: 15%; background: var(--amber); border-radius: 2px; max-height: calc(100% - 12px); }
.td-day { font-size: 9.5px; color: var(--ink3); }

/* Silly features (Phase 8) */
.fun { padding: 0 0 8px; }
.fun > .sechead { margin-bottom: 2px; }
.fun-row { border-bottom: 0.5px solid var(--sep); }
.fun-row summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 4px 0; cursor: pointer; border-radius: var(--r3); }
.fun-row summary::-webkit-details-marker { display: none; }
.fun-row summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.fun-row-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fun-row-t b { font-weight: 600; font-size: 14px; letter-spacing: -0.005em; }
.fun-row-t small { color: var(--ink3); font-size: 12px; }
.fun-row summary .ic { width: 16px; height: 16px; flex: none; color: var(--ink3); transition: transform 150ms var(--ease); }
.fun-row[open] summary .ic { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { .fun-row summary .ic { transition: none; } }
.fun-body { padding: 2px 0 12px; color: var(--ink); }
.fun-body p { margin: 0 0 6px; }
/* Source links in the games: the panel's quiet ink with a soft underline, never the browser's blue or purple. */
.fun a, .fun a:visited { color: var(--ink2); text-decoration: underline; text-decoration-color: var(--ink3); text-decoration-color: color-mix(in srgb, var(--ink2) 40%, transparent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
.fun a:hover { color: var(--tint); text-decoration-color: currentColor; }
.fun a:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-radius: 2px; }
.fun-span, .fun-q-n { font-size: 12px; }
.fun-opts { display: grid; gap: 6px; margin: 6px 0; }
.fun-opt { font: inherit; text-align: left; min-height: 44px; padding: 7px 10px; border-radius: var(--r3); border: 1px solid var(--sep); background: var(--mat-solid, #fff); color: var(--ink); cursor: pointer; }
.fun-opt.is-right { border-color: var(--living); background: var(--living-bg); }
.fun-opt.is-wrong { border-color: var(--lost); background: var(--lost-bg); }
.fun-facts, .fun-lb, .fun-myst { margin: 4px 0 8px; padding-left: 18px; font-size: 13px; }
.fun-facts li, .fun-lb li, .fun-myst li { margin: 4px 0; }
.fun-swill { font-size: 15px; }
.fun-swill:focus { outline: none; }

/* ---- Interface polish (01/12/2026, make-interfaces-feel-better) ----------------------------------- */
/* Headings balance their lines; running text avoids one-word last lines. */
.welcome-h, .sechead, .best-title, .pname, .pop-h, .pp-h4 { text-wrap: balance; }
.sb-empty p, .best-lead, .bn .ln, .kmc p, .pp-row > div > p, .pp-note, .pp-foot, .fun-body p, .td-why, .credits-panel p, .then-pub-t small { text-wrap: pretty; }
/* Numbers that change in place keep their width. */
.best-when, .scrub-sel, .td-score b, .td-week b, .pp-count, .best-ticks, .td-clockticks, .then-year { font-variant-numeric: tabular-nums; }
/* Photos: a faint edge so light and dark pictures sit on the material alike. */
.pp-photo-head img, .pp-photos img, .pp-tn-frame { outline: 1px solid var(--img-outline); outline-offset: -1px; }
/* The pub photo is concentric with the card round it (card radius less its 10 px padding). */
.pp-photo-head.photo { border-radius: calc(var(--r1) - 10px); }
/* Press feedback on the main buttons (not the map controls, pressed many times in a row). */
.then-year, .nowpill, .pill, .mp-btn, .scrub-listbtn { transition-property: background, color, transform; transition-duration: var(--t), var(--t), 120ms; transition-timing-function: var(--ease); }
.then-year:active, .nowpill:active, .pill:active, .mp-btn:active, .scrub-listbtn:active { transform: scale(0.96); }
@media (prefers-reduced-motion: reduce) {
  .then-year, .nowpill, .pill, .mp-btn, .scrub-listbtn, .welcome-door, .act { transition: none; }
  .then-year:active, .nowpill:active, .pill:active, .mp-btn:active, .scrub-listbtn:active { transform: none; }
}
/* Touch: small buttons reach a 44 px hit area through an invisible extension (vertical only where buttons
   sit side by side, so no two areas overlap). */
@media (pointer: coarse) {
  .xbtn, .pp-back, .pill, .nowpill, .scrub-listbtn, .pp-roof-btn, .seg button, .credits-button, .mp-btn { position: relative; }
  .xbtn::after { content: ''; position: absolute; inset: -8px; }
  .pp-back::after, .pill::after, .pp-roof-btn::after, .seg button::after, .credits-button::after { content: ''; position: absolute; inset: -12px 0; }
  .nowpill::after, .scrub-listbtn::after, .mp-btn::after { content: ''; position: absolute; inset: -7px 0; }
}

/* Check-in (checkin.js): the stamp line lands with a short press; the message and rating picker sit under the button. */
.mp-stamp.is-got { color: var(--ink); font-size: 15px; margin-bottom: 10px; }
.mp-stamp .mp-label { display: inline-block; padding: 1px 9px; margin-right: 4px; border-radius: 999px; background: var(--tint); color: var(--tint-ink); font-weight: 650; font-size: 13px; }
.mp-stamp .mp-when2 { color: var(--ink2); }
.mp-stamp.is-fresh { animation: mp-stamp-in 520ms cubic-bezier(.2, .9, .3, 1.2) both; transform-origin: left center; }
@keyframes mp-stamp-in { from { opacity: 0; transform: scale(1.35) rotate(-2deg); } 60% { opacity: 1; transform: scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .mp-stamp.is-fresh { animation: none; } }
.mp-live:empty { display: none; }
.mp-msg { margin: 10px 0 8px; padding: 8px 10px; border-radius: var(--r2); background: var(--fill); color: var(--ink); }
.mp-msg.is-warn { box-shadow: inset 3px 0 0 var(--amber); }
.mp-msg.is-ok { box-shadow: inset 3px 0 0 var(--living); }
.mp-nudge, .mp-badge { margin: 6px 0 0; font-size: 12px; }
.mp-btn:disabled, .mp-btn[aria-disabled="true"] { opacity: .55; cursor: default; }
/* Once stamped on this visit, Check in gives way to a quiet line; "Also stamp" is then the one primary action. */
.mp-done { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px 0 10px; border-radius: var(--r2); background: var(--living-bg); color: var(--living); font-weight: 600; }
.mp-done .ic { width: 16px; height: 16px; stroke-width: 2; }
.mp-done:focus { outline: none; }
.mp-actions .mp-link[data-act="editrecent"] { align-self: center; }
/* The compact Check in in the pub header (checkin.js barHtml): always there; a green strip once a reading had the pub in reach. */
.mp-here { margin: 10px 0 2px; }
.mp-here-row { display: flex; align-items: center; gap: 10px; }
.mp-here.is-here { padding: 8px 8px 8px 12px; border-radius: var(--r1); background: var(--living-bg); }
.mp-here.is-here .mp-here-row { justify-content: space-between; }
.mp-here-t { display: flex; align-items: center; gap: 6px; margin: 0; font-weight: 650; color: var(--living); }
.mp-here-t .ic { width: 17px; height: 17px; stroke-width: 2; }
.mp-here-btn { padding: 7px 14px; }
.mp-here-also { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.mp-here .mp-here-msg { margin: 8px 0 0; }
.mp-actions { flex-wrap: wrap; }
.mp-stars-pick { display: grid; gap: 4px; }
.mp-pick-label { font-size: 12px; color: var(--ink2); }
.mp-pick { display: flex; gap: 2px; }
.mp-star { font: inherit; font-size: 28px; line-height: 1; width: 40px; height: 40px; padding: 0; border: 0; background: none; color: var(--ink3); opacity: 0.32; cursor: pointer; }
.mp-star.is-on { opacity: 1; color: var(--amber); }
.mp-star:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 8px; }

/* ---- Me: the passport book (passportbook.js) --------------------------------------------------------
   The one crafted object in the interface: a cloth-bound booklet with paper pages and inked stamps. Its
   colours are the object's own (paper stays paper in dark, a little dimmer). --pw is set from the width. */
.pb {
  --pw: 340px; --ph: calc(var(--pw) * 1.3);
  --paper: #f7f3e8; --paper-2: #e9e2d0; --paper-edge: #d8cfb9;
  --print: #2b453b; --pencil: #655e4f; --cloth: #1e3b30;
  --book-ease: cubic-bezier(0.32, 0.08, 0.18, 1);
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pb { --paper: #e6dfcd; --paper-2: #d4ccb6; --paper-edge: #bfb59c; }
}
:root[data-theme="dark"] .pb { --paper: #e6dfcd; --paper-2: #d4ccb6; --paper-edge: #bfb59c; }

.pb-stage {
  position: relative; height: calc(var(--ph) * 0.5 + 34px);
  perspective: 1500px; perspective-origin: 50% 10%;
  overflow: hidden; transition: height 700ms var(--book-ease);
}
.pb:not([data-state="closed"]) .pb-stage { height: calc(var(--ph) + 12px); }
.pb-book {
  position: absolute; top: 4px; left: 50%; width: var(--pw); height: var(--ph); margin-left: calc(var(--pw) / -2);
  transform-style: preserve-3d; transform-origin: 50% 0;
  transform: translateY(10px) scale(0.5) rotateX(16deg) rotateZ(-4deg);
  transition: transform 700ms var(--book-ease);
}
@media (hover: hover) { .pb[data-state="closed"] .pb-stage:hover .pb-book { transform: translateY(7px) scale(0.51) rotateX(12deg) rotateZ(-3deg); } }
.pb:not([data-state="closed"]) .pb-book { transform: none; }

/* Paper: a faint security print of rings and waves. */
.pb-paper, .pb-cover-back, .pb-block {
  background-color: var(--paper);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='28'%3E%3Cpath d='M0 14c12-12 36-12 48 0s36 12 48 0M0 21c12-12 36-12 48 0s36 12 48 0' fill='none' stroke='%232b453b' stroke-opacity='.06' stroke-width='.8'/%3E%3C/svg%3E"),
    repeating-radial-gradient(circle at 50% 48%, rgba(43, 69, 59, 0.03) 0 1px, transparent 1px 8px);
}
.pb-block {
  position: absolute; inset: 0; border-radius: 3px 11px 11px 3px; background-color: var(--paper-2);
  transform: translateZ(-1px);
  box-shadow: 1px 1px 0 var(--paper-edge), 2px 2px 0 var(--paper-2), 3px 3px 0 var(--paper-edge), 0 24px 40px -18px rgba(20, 16, 8, 0.55);
}
.pb-pages { position: absolute; inset: 0; transform-style: preserve-3d; touch-action: pan-y; }
.pb-page { position: absolute; inset: 0; transform-origin: 0 50%; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.pb-paper {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  padding: calc(var(--pw) * 0.055) calc(var(--pw) * 0.05) calc(var(--pw) * 0.04);
  border-radius: 3px 11px 11px 3px; color: var(--print); font-family: var(--font-ui);
  box-shadow: inset 16px 0 18px -14px rgba(70, 50, 20, 0.3), inset 0 0 0 0.5px rgba(70, 50, 20, 0.12);
}
.pb-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding-bottom: 7px; margin-bottom: 10px; border-bottom: 1px solid rgba(43, 69, 59, 0.16); font-size: calc(var(--pw) * 0.042); font-weight: 650; letter-spacing: -0.005em; }
.pb-head-s { font-weight: 500; font-size: calc(var(--pw) * 0.034); color: var(--pencil); }
.pb-folio { margin-top: 6px; align-self: flex-end; font-size: 10.5px; color: var(--pencil); font-variant-numeric: tabular-nums; }

/* Turning: the page lifts from its edge and swings over the spine; a shadow passes over the page below. */
.pb-page.is-turn-out { z-index: 2; animation: pb-turn-out 560ms cubic-bezier(0.45, 0.05, 0.3, 1) forwards; }
.pb-page.is-turn-in { z-index: 2; animation: pb-turn-out 560ms cubic-bezier(0.45, 0.05, 0.3, 1) reverse both; }
@keyframes pb-turn-out { from { transform: translateZ(1px) rotateY(0deg); } to { transform: translateZ(1px) rotateY(-180deg); } }
.pb-page.is-turn-out .pb-paper::after, .pb-page.is-turn-in .pb-paper::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.16), rgba(255, 255, 255, 0.28) 70%, rgba(0, 0, 0, 0.1));
  animation: pb-sheen 560ms ease-in-out both;
}
.pb-page.is-turn-in .pb-paper::after { animation-direction: reverse; }
@keyframes pb-sheen { from { opacity: 0; } 60% { opacity: 1; } to { opacity: 1; } }
.pb-shade { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; border-radius: 3px 11px 11px 3px; background: linear-gradient(90deg, rgba(30, 20, 5, 0.32), rgba(30, 20, 5, 0) 55%); transform: translateZ(0.5px); }
.pb-shade.is-on { animation: pb-shade 560ms ease-out; }
@keyframes pb-shade { 0% { opacity: 0; } 45% { opacity: 1; } 100% { opacity: 0; } }
.pb-page.is-fade-in { z-index: 2; animation: pb-fade 220ms ease-out both; }
@keyframes pb-fade { from { opacity: 0; } to { opacity: 1; } }

/* The cover: deep green cloth, the name and a clock at six blind-embossed. */
.pb-cover {
  position: absolute; inset: 0; padding: 0; border: 0; background: none; color: inherit; cursor: pointer;
  border-radius: 4px 12px 12px 4px; transform-style: preserve-3d; transform-origin: 0 50%;
  transform: translateZ(2px); transition: transform 760ms cubic-bezier(0.4, 0.05, 0.2, 1) 60ms;
}
.pb-cover:focus-visible { outline: 3px solid var(--focus); outline-offset: 5px; }
.pb-cover-front, .pb-cover-back { position: absolute; inset: 0; border-radius: inherit; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.pb-cover-front {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(var(--pw) * 0.045);
  padding-bottom: calc(var(--pw) * 0.08);
  color: rgba(5, 18, 13, 0.42);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E"),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.09) 0 1px, transparent 1px 3px),
    radial-gradient(130% 95% at 30% 20%, #27493c, var(--cloth) 55%, #142a21);
  box-shadow:
    inset 12px 0 10px -9px rgba(0, 0, 0, 0.5), inset 14px 0 0 -12px rgba(255, 255, 255, 0.07),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04), inset 0 0 50px rgba(0, 0, 0, 0.28),
    0 1px 1px rgba(0, 0, 0, 0.3), 0 26px 44px -16px rgba(10, 20, 14, 0.6);
}
.pb-clock { width: calc(var(--pw) * 0.22); height: auto; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.12)) drop-shadow(0 -1px 0 rgba(0, 0, 0, 0.4)); }
.pb-cover-title, .pb-cover-sub { text-transform: uppercase; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.12), 0 -1px 0 rgba(0, 0, 0, 0.42); }
.pb-cover-title { font: 800 calc(var(--pw) * 0.13)/0.9 var(--font-sign); letter-spacing: 0.07em; margin-left: 0.07em; }
.pb-cover-sub { font: 650 calc(var(--pw) * 0.034)/1 var(--font-ui); letter-spacing: 0.5em; margin-left: 0.5em; }
.pb-cover-back { transform: rotateY(180deg); background-color: var(--paper-2); }
.pb:not([data-state="closed"]) .pb-cover { transform: translateZ(2px) rotateY(-180deg); pointer-events: none; }
.pb[data-state="shown"] .pb-cover { visibility: hidden; transition: none; }
.pb-hint { margin: 0 0 4px; text-align: center; font-size: 12px; color: var(--ink3); }
.pb:not([data-state="closed"]) .pb-hint { display: none; }

/* Stamps: two across, three down. An empty slot is a pencil name in a dotted outline. */
.pb-grid { list-style: none; margin: 0; padding: 0; flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, minmax(0, 1fr)); gap: calc(var(--pw) * 0.025) calc(var(--pw) * 0.035); }
.pb-slot { display: grid; min-width: 0; min-height: 0; }
.pb-stamp, .pb-badge {
  position: relative; display: grid; place-items: center; min-width: 0; min-height: 0; padding: 0; margin: 0;
  font: inherit; color: inherit; background: none; border: 0; border-radius: 12px; cursor: pointer;
}
.pb-stamp:focus-visible, .pb-badge:focus-visible { outline: 2px solid var(--print); outline-offset: -2px; }
.pb-stamp:active .pb-ink, .pb-badge:active .pb-seal { scale: 0.96; }
.pb-ink {
  display: block; width: min(90%, calc(var(--pw) * 0.38)); aspect-ratio: 320 / 224;
  background: var(--ink);
  -webkit-mask: var(--mask) center / 100% 100% no-repeat; mask: var(--mask) center / 100% 100% no-repeat;
  transform: translate(var(--dx, 0px), var(--dy, 0px)) rotate(var(--rot, 0deg));
  mix-blend-mode: multiply; opacity: 0; transition: opacity 200ms ease-out, scale 120ms ease-out;
}
.pb-ink.is-in { opacity: 0.9; }
.pb-stamp.is-held .pb-ink { opacity: 0; transition: none; }
.pb-stamp.is-lifted .pb-ink { opacity: 0.25; }
.pb-stamp.is-empty::before {
  content: ''; position: absolute; inset: 14% 9%; border: 1.5px dotted rgba(90, 80, 55, 0.28); border-radius: 10px;
}
.pb-k-ghost .pb-stamp.is-empty::before { border-radius: 50%; }
.pb-test { position: absolute; right: 6%; bottom: 4%; font-size: 10.5px; font-style: italic; color: var(--pencil); }
.pb-pencil { position: relative; padding: 0 14%; font-size: calc(var(--pw) * 0.036); font-weight: 500; line-height: 1.25; color: var(--pencil); text-align: center; text-wrap: balance; }
/* Hover only where there is a pointer that hovers: on a touch screen the last tap would leave its slot darker. */
@media (hover: hover) { .pb-stamp.is-empty:hover .pb-pencil { color: var(--print); } }

/* Stamping: it drops at 1.4x, presses with a short squash, the page dips, and the ink comes up. */
.pb-stamp.is-landing .pb-ink { animation: pb-land 760ms linear both; }
@keyframes pb-land {
  0% { opacity: 0; transform: translate(var(--dx), calc(var(--dy) - 54px)) rotate(calc(var(--rot) - 7deg)) scale(1.4); animation-timing-function: cubic-bezier(0.5, 0, 0.9, 0.5); }
  8% { opacity: 0.35; animation-timing-function: cubic-bezier(0.5, 0, 0.9, 0.5); }
  36% { opacity: 0.6; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(1.02); animation-timing-function: ease-out; }
  46% { opacity: 0.6; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(1.05, 0.93); }
  62% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(0.99, 1.01); }
  100% { opacity: 0.9; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(1); }
}
.pb-stamp.is-landing::before {
  content: ''; position: absolute; left: 20%; right: 20%; top: 30%; bottom: 30%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(40, 30, 10, 0.16), transparent); animation: pb-land-shadow 760ms ease-out both; translate: 0 6%;
}
@keyframes pb-land-shadow { 0% { opacity: 0; transform: scale(1.7); } 30% { opacity: 1; transform: scale(0.95); } 42%, 100% { opacity: 0; transform: scale(1.05); } }
.pb-paper.is-dip { animation: pb-dip 760ms ease-out; }
@keyframes pb-dip { 0%, 32% { transform: none; } 46% { transform: translateY(3px) scale(0.996); } 72%, 100% { transform: none; } }

/* Badges: a seal each, inked when earned, a pencil outline until then. */
.pb-badges .pb-badge { align-content: center; gap: 3px; text-align: center; }
.pb-seal { width: calc(var(--pw) * 0.19); height: auto; overflow: visible; transition: scale 120ms ease-out; }
.pb-seal-edge { fill: none; stroke: var(--pencil); stroke-width: 1.2; stroke-dasharray: 2 2.5; }
.pb-seal-ring { fill: none; stroke: var(--pencil); stroke-width: 1; }
.pb-seal text { font: 800 15px var(--font-sign); fill: var(--pencil); letter-spacing: 0.02em; }
.pb-seal .pb-clock, .pb-seal g path, .pb-seal g circle { stroke: var(--pencil); }
.pb-glyph-fill path { fill: var(--pencil); stroke: none; }
.pb-glyph-fill .pb-cut { fill: var(--paper); stroke: none; }
.pb-badge.is-earned .pb-seal { mix-blend-mode: multiply; transform: rotate(-6deg); }
.pb-badge.is-earned .pb-seal-edge { fill: var(--ink); stroke: none; }
.pb-badge.is-earned .pb-seal-ring { stroke: var(--paper); stroke-width: 1.4; }
.pb-badge.is-earned .pb-seal text { fill: var(--paper); }
.pb-badge.is-earned .pb-seal g path, .pb-badge.is-earned .pb-seal g circle { stroke: var(--paper); }
.pb-badge.is-earned .pb-glyph-fill path { fill: var(--paper); }
.pb-badge.is-earned .pb-glyph-fill .pb-cut { fill: var(--ink); }
.pb-bt { font-size: calc(var(--pw) * 0.036); font-weight: 650; line-height: 1.2; text-wrap: balance; }
.pb-bp { font-size: calc(var(--pw) * 0.031); color: var(--pencil); font-variant-numeric: tabular-nums; }

/* When you went: the stamp lifts into a card on the page. */
.pb-card {
  position: absolute; left: 10px; right: 10px; top: 50%; translate: 0 -50%; max-height: calc(100% - 20px); z-index: 5; display: flex; flex-direction: column; overflow: hidden;
  border-radius: 12px; background: #fffdf7; color: #24302b;
  box-shadow: 0 0 0 0.5px rgba(70, 50, 20, 0.14), 0 2px 6px rgba(40, 30, 10, 0.12), 0 22px 44px -12px rgba(40, 30, 10, 0.45);
  opacity: 0; transform: scale(0.35); transition: transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 160ms ease-out;
}
.pb-card.is-up { opacity: 1; transform: none; }
.pb-card.is-going { opacity: 0; transform: scale(0.97) translateY(4px); transition-duration: 160ms; }
.pb-card-in { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px 18px 16px; display: flex; flex-direction: column; }
.pb-close { position: absolute; top: 6px; right: 6px; z-index: 1; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(36, 48, 43, 0.07); color: #24302b; cursor: pointer; }
.pb-close .ic { width: 16px; height: 16px; }
.pb-close:focus-visible, .pb-map:focus-visible { outline: 2px solid #1f4a3a; outline-offset: 2px; }
.pb-card-art { display: grid; place-items: center; margin: 2px 0 10px; }
.pb-card-art .pb-ink { width: 52%; opacity: 0.9; }
.pb-card-art .pb-seal { width: 64px; }
.pb-card-h { margin: 0 0 8px; font: 650 17px/1.25 var(--font-ui); letter-spacing: -0.01em; text-align: center; text-wrap: balance; }
.pb-card-h:focus { outline: none; }
.pb-card-line { margin: 0 0 10px; font-size: 13.5px; line-height: 1.45; color: #4b554f; text-align: center; text-wrap: pretty; }
.pb-card-line:empty { display: none; }
.pb-card-sub { margin: 0; font-size: 12.5px; color: #6b736d; text-align: center; font-variant-numeric: tabular-nums; }
.pb-visits { list-style: none; margin: 0 0 12px; padding: 0; }
.pb-visits li { padding: 8px 0; border-top: 1px dashed rgba(43, 69, 59, 0.2); }
.pb-visits p { margin: 0; }
.pb-v-when { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pb-v-note { margin-top: 2px !important; font-size: 13px; color: #4b554f; text-wrap: pretty; }
.pb-v-test { font-size: 11px; font-weight: 500; color: #8a8473; }
.pb-stars { color: #c8891f; letter-spacing: 1px; font-weight: 400; }
.pb-off { color: rgba(36, 48, 43, 0.15); }
.pb-map {
  margin-top: auto; align-self: center; display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: #1f4a3a; color: #fff;
  font: 600 13px var(--font-ui); cursor: pointer; transition: transform 120ms ease-out;
}
.pb-map:active { transform: scale(0.96); }
.pb-map .ic { width: 15px; height: 15px; stroke-width: 2; }

/* Page turner and where you are. */
.pb-nav { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 6px; margin: 4px 0 2px; }
.pb-nav[hidden] { display: none; }
.pb-where { margin: 0; text-align: center; font-size: 12.5px; color: var(--ink2); font-variant-numeric: tabular-nums; text-wrap: balance; }
.pb-turn { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--fill); color: var(--ink); cursor: pointer; transition: background var(--t), transform 120ms ease-out, opacity var(--t); }
.pb-turn .ic { width: 18px; height: 18px; stroke-width: 2; }
@media (hover: hover) { .pb-turn:hover:not(:disabled) { background: var(--fill2); } }
.pb-turn:active:not(:disabled) { transform: scale(0.96); }
.pb-turn:disabled { opacity: 0.35; cursor: default; }
.pb-turn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .pb-stage, .pb-book { transition: none; }
  .pb-cover { transition: opacity 280ms ease-out; }
  .pb:not([data-state="closed"]) .pb-cover { transform: translateZ(2px); opacity: 0; }
  .pb[data-state="closed"] .pb-stage:hover .pb-book { transform: translateY(10px) scale(0.5) rotateX(16deg) rotateZ(-4deg); }
  .pb-stamp.is-landing .pb-ink { animation: pb-fade-ink 400ms ease-out both; }
  .pb-stamp.is-landing::before, .pb-paper.is-dip { animation: none; }
  .pb-card, .pb-card.is-going { transform: none; transition: opacity 160ms ease-out; }
}
@keyframes pb-fade-ink { from { opacity: 0; } to { opacity: 0.9; } }

/* ---- The stamp moment (stampmoment.js): a small passport pops up over the map after any stamp, opens on
   the pub's page and the stamp lands; then See your passport or Add a rating or note. Centred on every
   screen, whatever the sheet's height. */
.sm { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: max(12px, env(safe-area-inset-top, 0px)) 16px max(12px, env(safe-area-inset-bottom, 0px)); overflow-y: auto; overscroll-behavior: contain; }
.sm-scrim { position: fixed; inset: 0; background: rgba(14, 20, 17, 0.5); opacity: 0; transition: opacity 220ms ease-out; }
.sm-panel {
  --smw: min(352px, calc(100vw - 32px), calc((100dvh - 300px) / 1.3 + 32px));
  position: relative; width: var(--smw); box-sizing: border-box; padding: 16px 16px 14px; border-radius: 24px;
  background: var(--mat-solid); color: var(--ink); box-shadow: var(--shadow);
  opacity: 0; transform: translateY(10px) scale(0.97); transition: opacity 220ms ease-out, transform 320ms cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
.sm.is-up .sm-scrim { opacity: 1; }
.sm.is-up .sm-panel { opacity: 1; transform: none; }
.sm.is-going .sm-scrim, .sm.is-going .sm-panel { opacity: 0; transition-duration: 180ms; }
.sm.is-going .sm-panel { transform: translateY(6px); }
.sm-x { position: absolute; top: -10px; right: -10px; z-index: 2; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--mat-solid); color: var(--ink); box-shadow: var(--shadow); cursor: pointer; }
.sm-x .ic { width: 16px; height: 16px; }
.sm-x::after { content: ''; position: absolute; inset: -4px; }
.sm-x:focus-visible, .sm-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* The book: already at its open size (no stage growth), resting smaller and tilted while shut. */
.sm-book { margin: 2px 0 0; }
.sm .pb-stage { height: calc(var(--ph) + 10px); perspective: 1300px; overflow: visible; }
.sm .pb-book { top: 2px; transform: translateY(6%) scale(0.8) rotateX(14deg) rotateZ(-4deg); }
.sm .pb:not([data-state="closed"]) .pb-book { transform: none; }
.pb-still .pb-hint, .pb-still .pb-nav { display: none !important; }
.me .pb, #pp-mine { scroll-margin-top: 12px; }
.pb-still .pb-stamp, .pb-still .pb-badge { cursor: default; }
.sm-words { margin: 12px 2px 0; text-align: center; }
.sm-kicker { margin: 0 0 2px; font-size: 11.5px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--living); }
.sm-kicker .tn { margin-left: 4px; color: var(--ink3); font-weight: 600; }
.sm-test { margin-left: 4px; font-weight: 500; letter-spacing: 0; text-transform: none; font-style: italic; color: var(--ink3); }
.sm-h { margin: 0; font-size: 21px; font-weight: 700; line-height: 1.2; letter-spacing: -0.015em; text-wrap: balance; }
.sm-sub { margin: 4px 0 0; font-size: 13px; line-height: 1.4; color: var(--ink2); text-wrap: pretty; }
.sm-sub .tn { font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }
/* A badge earned with the stamp: its seal presses in once the stamp has landed. */
.sm-badges { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.sm-badge { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; border-radius: 16px; background: var(--amber-bg); text-align: left; }
.sm-seal { --paper: #f7f3e8; --pencil: #8a8473; flex: none; display: grid; place-items: center; width: 52px; height: 52px; opacity: 0; transform: scale(1.5) rotate(-18deg); }
.sm-seal .pb-seal { width: 52px; }
.sm.is-landed .sm-seal { animation: sm-seal 520ms cubic-bezier(0.3, 0.1, 0.3, 1) both; animation-delay: calc(var(--k, 0) * 160ms); }
@keyframes sm-seal { 0% { opacity: 0; transform: scale(1.5) rotate(-18deg); } 60% { opacity: 1; transform: scale(0.94) rotate(-4deg); } 100% { opacity: 1; transform: scale(1) rotate(-6deg); } }
.sm-bt { display: grid; gap: 1px; min-width: 0; }
.sm-bk { font-size: 11px; font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase; color: var(--amber-ink); }
.sm-bt b { font-size: 15px; font-weight: 650; }
.sm-bl { font-size: 12.5px; line-height: 1.35; color: var(--ink2); text-wrap: pretty; }
.sm-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.sm-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 46px; padding: 8px 10px; border: 0; border-radius: 14px; background: var(--fill); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; line-height: 1.2; text-align: center; cursor: pointer; transition: transform 120ms ease-out, background var(--t); }
.sm-btn.is-pri { background: var(--tint); color: var(--tint-ink); }
.sm-btn .ic { width: 17px; height: 17px; stroke-width: 2; flex: none; }
.sm-btn:active { transform: scale(0.96); }
@media (prefers-reduced-motion: reduce) {
  .sm-panel, .sm.is-going .sm-panel { transform: none; transition: opacity 180ms ease-out; }
  .sm .pb-book { transform: none; }
  .sm.is-landed .sm-seal { animation: pb-fade 300ms ease-out both; transform: rotate(-6deg); }
  .sm-btn:active { transform: none; }
}

/* Below the book: the counts, badges earned, Check in, the storage line, your visits and trivia. */
.me-counts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 8px; }
.me-count { margin: 0; padding: 10px 12px 11px; border-radius: var(--r2); background: var(--fill); display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--ink2); }
.me-n { font: 700 24px/1 var(--font-ui); color: var(--ink); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.me-earned { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; padding: 0; }
.me-chip { padding: 4px 10px; border-radius: 999px; background: var(--amber-bg); color: var(--amber-ink); font-size: 12px; font-weight: 600; }
.me-check { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; }
.me-checkin { display: inline-flex; align-items: center; gap: 7px; padding: 10px 18px; font-size: 14px; }
.me-checkin .ic { width: 17px; height: 17px; stroke-width: 2; }
.me-checkin[aria-disabled="true"] { opacity: 0.6; }
.me-checkin.is-quiet { background: var(--fill); color: var(--ink); }
.me-intro { margin: 10px 0 0; color: var(--ink2); text-wrap: pretty; }
.me-note { margin: 8px 0 0; font-size: 12px; color: var(--ink3); text-wrap: pretty; }
.me-note.is-warn { color: var(--amber-ink); }
.me-visits { list-style: none; margin: 0; padding: 0; }
.me-visit { width: 100%; display: grid; gap: 2px; padding: 9px 0; text-align: left; font: inherit; color: inherit; background: none; border: 0; box-shadow: 0 -0.5px 0 var(--sep); cursor: pointer; }
.me-visit:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.me-v-name { font-weight: 600; }
.me-v-name small { font-weight: 450; font-size: 11.5px; color: var(--ink3); }
.me-v-when { font-size: 12px; color: var(--ink2); font-variant-numeric: tabular-nums; }
.me-v-note { font-size: 12.5px; color: var(--ink2); text-wrap: pretty; }
.me-trivia { display: flex; gap: 20px; }
.me-trivia p { margin: 0; font-size: 12.5px; color: var(--ink2); }
.me-n2 { margin-right: 3px; font-size: 18px; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---- Accessibility pass (02/12/2026) ---------------------------------------------------------------------- */
/* Skip links: off screen until focused, then a small glass pill at the top left, above everything. */
.skip a {
  position: fixed; z-index: 60; left: var(--edge-gap); top: var(--edge-gap); padding: 10px 14px; border-radius: 999px;
  background: var(--mat-solid); color: var(--ink); font: 600 14px var(--font-ui); text-decoration: none; box-shadow: var(--shadow);
  translate: 0 calc(-100% - 40px);
}
.skip a:focus-visible { translate: none; outline: 2px solid var(--focus); outline-offset: 2px; }
/* The skip links' targets take focus only on the way to their first control. */
#map-controls:focus, #scrubber:focus { outline: none; }
/* Reduced motion: the few press and hover scales that had no still version (the book's buttons, its seals and
   ink on hover). Colour and the focus ring still answer the press. */
@media (prefers-reduced-motion: reduce) {
  .pb-map, .pb-turn, .pb-seal, .pb-ink { transition: none; }
  .pb-map:active, .pb-turn:active:not(:disabled) { transform: none; }
  .pb-stamp:active .pb-ink, .pb-badge:active .pb-seal { scale: none; }
}
/* Touch targets on the phone: 44 px for the primary controls, at least 24 for dense ones. Invisible hit areas
   where the drawn control should stay small (owner: overlays on the phone small and out of the map's way). */
@media (max-width: 699.98px) {
  .sb-grab { position: relative; }
  .sb-grab::before { content: ''; position: absolute; left: 0; right: 0; top: -16px; bottom: -8px; } /* 20 + 24 = 44; stops in the gap above the search */
  .search-field { height: 44px; }
  .scrub.is-compact .scrub-year { position: relative; }
  .scrub.is-compact .scrub-year::before { content: ''; position: absolute; inset: -13px -6px; }
  .best-range { height: 28px; margin: -4px 0; } /* a 28 px tall slider in the same room */
  .sw::before { content: ''; position: absolute; inset: -11px -4px; } /* 44 by 44 (the knob is ::after) */
  .seg button { min-height: 26px; }
  .scrub.is-compact .nowpill::after { inset: -9px 0; } /* 27 + 18 = 45 */
  .best-pick { min-height: 24px; } /* a one-line row (a pub with no seat data) */
}
