/* "Stout" colours: near-black like a pint, creamy white like its head, green only for the cheapest price */
:root {
  color-scheme: dark;
  --bg: #0c0a08;          /* page */
  --header: #080706;      /* top bar */
  --card: #17130f;        /* cards and panels */
  --card-2: #231c15;      /* buttons on cards */
  --field: #100d0a;       /* text boxes */
  --text: #f4ece0;
  --muted: #a89a8a;
  --border: #30271e;
  --cream: #efdcb6;       /* main colour: buttons, prices (the head on a pint) */
  --cream-text: #1b140c;  /* text on cream */
  --cream-soft: #241d14;
  --cream-light: #f7ead0;
  --stout: #2a1a0e;       /* the dark part of the pint in the logo */
  --good: #3ccf7a;        /* cheapest price only */
  --good-soft: #0f3020;
  --good-light: #9fe6bd;
  --you: #4a9bff;         /* the blue "you are here" dot */
  /* Map price colours, from really good value to expensive */
  --band-1: #15803d;      /* dark green */
  --band-2: #6ee08f;      /* light green */
  --band-3: #f5b400;      /* amber */
  --band-4: #ff8f7d;      /* light red */
  --band-5: #c62828;      /* dark red */
  --heavy: #f2c14e;       /* gold, for the 🥊 Heavyweight */
  --soup: #c9b79c;        /* pale, for the 🍲 Soup */
  --warn: #ff7b6b;
  --lift: #3a3026;        /* the selected part of a switch */
  --line: #241d16;        /* thin lines between rows */
  --price-font: "Barlow Condensed", "Arial Narrow", sans-serif;
  --serif-display: "Playfair Display", Georgia, serif;   /* the Log a price title and price */
  --serif-text: "Cormorant Garamond", Georgia, serif;    /* the Log a price chips, labels and hints */
  /* One set of spacing, corner and text sizes, used everywhere */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --r-sm: 8px; --r: 12px; --r-lg: 16px; --pill: 999px;
  --t-xs: 12px; --t-sm: 14px; --t-md: 16px; --t-lg: 20px; --t-xl: 28px; --t-2xl: 40px;
}

/* Small uppercase labels, like the headings on a printed drinks menu */
.label, .board-title, .field-label {
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Line icons inside buttons (same style as the tab bar) */
svg.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--cream); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* One slim line at the top: the name, and where it covers */
header.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 640px;
  margin: 0 auto;
  padding: calc(var(--s3) + env(safe-area-inset-top)) var(--s4) 0;
}
h1 { display: flex; align-items: center; gap: var(--s2); margin: 0; font: 600 var(--t-xl)/1 var(--price-font); letter-spacing: 0.02em; }
header .where { font-size: var(--t-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* A little pint glass drawn in CSS: creamy head on top, stout below */
.logo {
  width: 15px;
  height: 22px;
  background: linear-gradient(to bottom, var(--cream) 0 24%, var(--stout) 24%);
  clip-path: polygon(0 0, 100% 0, 86% 100%, 14% 100%);
  flex: none;
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: var(--s4);
}

.hidden { display: none !important; }
/* Parts of Explore that are switched off while you're on another tab */
.off { display: none !important; }

/* ----- Buttons and inputs ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 var(--s4);
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--card-2);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 150ms ease-out, transform 150ms ease-out;
}
.btn:hover { border-color: var(--cream); }
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--cream); border-color: var(--cream); color: var(--cream-text); }
.btn.small { min-height: 36px; padding: 0 var(--s3); font-size: var(--t-sm); }
.btn.small .ico { width: 16px; height: 16px; }
.btn.ghost { background: none; border-color: transparent; color: var(--muted); font-weight: 500; }
.btn.ghost:hover { color: var(--text); border-color: var(--border); }
.btn.wide { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: default; }

/* ----- Search bar and filters at the top of List and Map ----- */
.finder { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
.searchbar {
  display: flex;
  align-items: center;
  gap: var(--s2);
  height: 48px;
  padding: 0 var(--s1) 0 var(--s3);
  border: 1px solid var(--border);
  border-radius: var(--pill);
  background: var(--card);
}
.searchbar:focus-within { border-color: var(--cream); }
.searchbar > .ico { width: 20px; height: 20px; color: var(--muted); }
.searchbar input { flex: 1; height: 100%; padding: 0; border: none; border-radius: 0; background: none; font-size: var(--t-md); }
.searchbar input:focus { outline: none; }
.searchbar input::-webkit-search-cancel-button { filter: invert(0.6); }
.locate {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 var(--s3);
  border: none;
  border-radius: var(--pill);
  background: var(--card-2);
  color: var(--cream-light);
  font: inherit;
  font-size: var(--t-sm);
  font-weight: 600;
  cursor: pointer;
}
.locate svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.locate:disabled { opacity: 0.6; cursor: wait; }

.filters { display: flex; align-items: center; gap: var(--s2); }
.pill-select {
  -webkit-appearance: none;
  appearance: none;
  height: 40px;
  padding: 0 30px 0 var(--s3);
  border: 1px solid var(--border);
  border-radius: var(--pill);
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a89a8a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 12px;
  color: var(--text);
  font-size: var(--t-sm);
  font-weight: 600;
  text-overflow: ellipsis;
}
#drink { flex: 1; min-width: 0; }
#radius, #maxprice { flex: 1 1 0; min-width: 0; }

/* A two- or three-way switch, like iOS: the selected part is raised, not lit up */
.seg-ctl { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: var(--pill); background: var(--card); }
.seg-ctl button {
  flex: 1;
  min-height: 32px;
  padding: 0 var(--s3);
  border: none;
  border-radius: var(--pill);
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 150ms ease-out, color 150ms ease-out;
}
.seg-ctl button.active { background: var(--lift); color: var(--text); }
#serves { flex: none; }

/* "130 pubs near Cork city centre · 6 priced" with the sort switch beside it */
/* Map | List switch, then Nearest | Cheapest (list) or the Heatmap button (map) */
.list-head { display: flex; align-items: center; gap: var(--s2); margin: var(--s4) 0 var(--s2); }
.list-head .mode, .list-head .sort { flex: none; }
.list-head .sort { margin-left: auto; }
.list-head .sort button { min-height: 26px; padding: 0 10px; font-size: var(--t-xs); }
.list-head .mode button { min-height: 30px; padding: 0 14px; }
#status { margin-bottom: var(--s2); }
.layer-btn {
  margin-left: auto;
  height: 32px;
  padding: 0 12px 0 28px;
  border: 1px solid var(--border);
  border-radius: var(--pill);
  /* a small heat-coloured dot as the icon */
  background: var(--card) radial-gradient(circle at 14px 50%, #e0433a 0 3px, #ee8a36 4px 5px, #3a6fd8 6px 7px, transparent 8px);
  color: var(--muted);
  font: inherit;
  font-size: var(--t-xs);
  font-weight: 600;
  cursor: pointer;
}
.layer-btn.on { border-color: var(--cream); background-color: var(--cream-soft); color: var(--cream-light); }

input, select, textarea {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--field);
  color: var(--text);
  font: inherit;
  min-width: 0;
}
input::placeholder, textarea::placeholder { color: #75685a; }
textarea { resize: vertical; line-height: 1.35; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--cream); outline-offset: -1px; }

.panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);   /* lets the drink picker shrink on small phones */
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
}

.search { display: flex; gap: var(--s2); }
.search input { flex: 1; }

/* Pint / Bottle buttons in the Log a price form */
.serves { display: flex; gap: var(--s1); }
.serves .chip { padding: 9px 12px; font-weight: 600; }

.chip {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
/* A picked chip gets a cream outline, not a cream fill: solid cream is kept for the main button on a screen */
.chip.active { background: var(--cream-soft); border-color: var(--cream); color: var(--cream-light); }

/* "Bar" / "Nightclub" tags */
.tag {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border: 1px solid #45392b;
  border-radius: 999px;
  background: #221b14;
  color: #d8c9b4;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.warn-note { display: block; margin-top: 4px; color: var(--warn); font-size: 13px; }

/* ----- Tab bar at the bottom (iPhone style: frosted glass, line icons, small labels) ----- */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 920;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  /* On wide screens the tabs stay in the middle, lined up with the page */
  padding: 6px max(4px, calc((100% - 640px) / 2)) calc(4px + env(safe-area-inset-bottom));
  border-top: 0.5px solid rgba(255, 255, 255, 0.14);
  background: rgba(18, 15, 12, 0.78);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
  padding: 3px 0 2px;
  border: none;
  background: none;
  color: #8e8b86;          /* soft grey, like iOS's unselected tabs */
  font: 500 10.5px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  letter-spacing: 0.1px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tab svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tab svg .dot { fill: currentColor; stroke: none; }
.tab.active { color: var(--cream); }
.tab.active svg { stroke-width: 2; }
.tab:active svg { transform: scale(0.92); }

/* ----- Map ----- */
.map-wrap { position: relative; margin-bottom: 14px; }
#map {
  height: 62vh;
  min-height: 320px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--header);
  z-index: 0;
}
.recenter {
  position: absolute;
  right: 12px;
  bottom: 24px;
  z-index: 500;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--card);
  color: var(--you);
  font-size: 24px;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

/* Price bubbles on the map */
.pin {
  display: inline-block;
  transform: translate(-50%, -50%);
  padding: 1px 8px;
  border: 2px solid var(--cream);
  border-radius: 999px;
  background: var(--bg);
  color: var(--cream-light);
  font: 500 16px/1.2 var(--price-font);
  letter-spacing: 0.3px;
  white-space: nowrap;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}
.pin.empty { width: 12px; height: 12px; padding: 0; border-color: #6b5d4d; background: var(--card-2); }
.pin.stale { border-color: #6b5d4d; color: var(--muted); }
/* Price colours: compared with the usual Cork price for that drink (priceBand in app.js) */
.pin.b1, .legend .b1 { background: var(--band-1); border-color: var(--band-1); color: #fff; }
.pin.b2, .legend .b2 { background: var(--band-2); border-color: var(--band-2); color: #0b2414; }
.pin.b3, .legend .b3 { background: var(--band-3); border-color: var(--band-3); color: #2a1a00; }
.pin.b4, .legend .b4 { background: var(--band-4); border-color: var(--band-4); color: #2e0b06; }
.pin.b5, .legend .b5 { background: var(--band-5); border-color: var(--band-5); color: #fff; }
/* The cheapest of all gets a white ring */
.pin.best { border-color: #fff; box-shadow: 0 0 0 2px var(--band-1), 0 1px 8px rgba(0, 0, 0, 0.7); }

.legend {
  position: absolute;
  left: 10px;
  bottom: 24px;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(23, 19, 15, 0.92);
  color: var(--muted);
  font-size: 12px;
}
.legend span { margin: 0 3px; }
.legend i { width: 14px; height: 10px; border-radius: 3px; }
/* The heatmap scale: the same colours as HEAT_GRADIENT in app.js */
.legend .heat-bar { width: 70px; background: linear-gradient(90deg, #3a6fd8, #35b5a8, #e8c547, #ee8a36, #e0433a); }
.band-note { font-size: 13px; color: var(--muted); }
.band-note i { display: inline-block; width: 10px; height: 10px; margin-right: 5px; border-radius: 50%; vertical-align: -1px; }
.band-note .b1 { background: var(--band-1); } .band-note .b2 { background: var(--band-2); } .band-note .b3 { background: var(--band-3); }
.band-note .b4 { background: var(--band-4); } .band-note .b5 { background: var(--band-5); }

/* The map is OpenFreeMap's dark style, which is too dim on our near-black page, so it's brightened (only the map picture, not the pins).
   The backup OpenStreetMap map (phones without WebGL) is turned dark instead. */
.leaflet-gl-layer { filter: brightness(2.2) contrast(1.05); }
.osm-tiles { filter: invert(1) hue-rotate(180deg) brightness(0.85) contrast(0.9) saturate(0.4); }

/* Map popups in the dark style */
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--card); color: var(--text); box-shadow: 0 3px 14px rgba(0, 0, 0, 0.6); }
.leaflet-popup-content { font: 14px/1.4 system-ui, sans-serif; }
.leaflet-popup-content b { font-size: 15px; }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); }
.leaflet-container .leaflet-control-attribution { background: rgba(8, 7, 6, 0.8); color: var(--muted); }
.leaflet-container .leaflet-control-attribution a { color: var(--cream-light); }
.leaflet-bar a { background: var(--card); color: var(--text); border-bottom-color: var(--border); }
.leaflet-bar a:hover { background: var(--card-2); color: var(--cream); }
.popup-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.leaflet-container .popup-actions .btn { padding: 6px 10px; font-size: 13px; color: var(--text); text-decoration: none; }
.leaflet-container .popup-actions .btn.primary { color: var(--cream-text); }   /* dark text on the cream button, like everywhere else */

.status { margin: 0; min-width: 0; font-size: var(--t-xs); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.status.error { font-size: var(--t-sm); font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--warn); }
.status.off { display: none; }
.search-extra { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0 0 var(--s3); }

/* ----- "Cheapest nearby": the one thing on the screen that matters most (green = best value) ----- */
.best { margin-top: var(--s4); }
.best.off { display: none; }

/* ----- Latest prices: the newest prices logged, with the day and time ----- */
.latest { margin-top: var(--s4); }
.latest .label { margin: 0 0 var(--s2); }
.latest-row {
  display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: 56px;
  padding: var(--s2) var(--s4); border: none; border-top: 1px solid var(--line);
  background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.latest-list li:first-child .latest-row { border-top: none; }
.latest-row:hover { background: var(--card-2); }
.latest-info { flex: 1; min-width: 0; }
.latest-info b { display: block; font-size: 16px; font-weight: 600; }
.latest-info .sw { margin-right: 6px; }
.latest-info .meta { display: block; font-size: 14px; }
.latest-price { font-family: var(--price-font); font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
#btn-latest { min-height: 44px; margin-top: var(--s1); }
.no-price { flex: none; color: var(--muted); font-size: 14px; }

/* ----- The pub page: full screen, above the tab bar, under the Log a price sheet ----- */
.pub-page { position: fixed; inset: 0; z-index: 930; overflow-y: auto; overscroll-behavior: contain; background: var(--bg); }
body.page-open { overflow: hidden; }
.pg-inner {
  max-width: 640px; margin: 0 auto;
  padding: calc(var(--s2) + env(safe-area-inset-top)) var(--s4) calc(var(--s6) + env(safe-area-inset-bottom));
}
.pg-top { display: flex; align-items: center; justify-content: space-between; }
.pg-back { min-height: 44px; padding: 0 var(--s3) 0 0; border: none; background: none; color: var(--cream); font-family: inherit; font-size: 16px; font-weight: 600; cursor: pointer; }
.pg-save { min-width: 44px; min-height: 44px; border: none; background: none; color: var(--cream); font-size: 24px; cursor: pointer; }
.pg-save.on { color: var(--band-3); }
.pg-name { margin: var(--s1) 0; font: 700 38px/1 var(--price-font); letter-spacing: 0.01em; }
.pg-meta { margin: 0; color: var(--muted); font-size: 16px; }
.pub-page .verified { margin: var(--s2) 0 0; font-size: 14px; }
.pg-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--s3); }
.pg-tag { padding: 4px 10px; border: 1px solid var(--border); border-radius: var(--pill); color: var(--muted); font-size: 14px; }
.pub-page .label { margin: 0 0 var(--s2); }
.pg-section { margin-top: var(--s5); }

/* The big card: one drink's latest price */
.pg-hero {
  margin-top: var(--s4); padding: var(--s4); border: 1px solid var(--border); border-radius: 20px;
  background: radial-gradient(120% 90% at 0% 0%, #2a2118 0%, var(--card) 60%);
}
.pg-chips { display: flex; gap: 6px; overflow-x: auto; margin: 0 calc(-1 * var(--s4)) var(--s3); padding: 0 var(--s4); scrollbar-width: none; }
.pg-chips::-webkit-scrollbar { display: none; }
.pg-chips .chip { flex: none; min-height: 44px; }
.pg-chips .sw { margin-right: 6px; }
.pg-price-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s3); }
.pg-big { font: 600 72px/0.95 var(--price-font); color: var(--cream); font-variant-numeric: tabular-nums; }
.pg-big.down, .pg-move.down { color: var(--good); }
.pg-big.up, .pg-move.up { color: var(--band-4); }
.pg-move { font-weight: 700; }
.pg-vs { display: inline-block; margin-top: var(--s2); padding: 3px 10px; border-radius: var(--pill); font-size: 14px; font-weight: 600; }
.pg-vs.down { background: var(--good-soft); color: var(--good-light); }
.pg-vs.up { background: #3a1712; color: var(--band-4); }
.pg-vs.same { background: var(--card-2); color: var(--muted); }
.pg-who { margin: var(--s3) 0 0; color: var(--muted); }
.pg-who b { color: var(--text); }
/* An unconfirmed big change, waiting under the shown price */
.pg-pending { margin-top: var(--s3); padding: var(--s3); border: 1px dashed var(--band-3); border-radius: 12px; }
.pg-pending p { margin: 0 0 var(--s2); color: var(--text); font-size: 16px; }
.pg-pending small { color: var(--muted); font-size: 14px; }
.pg-pending .btn { width: 100%; min-height: 44px; }
.pg-hero .deal { margin-top: var(--s2); font-size: 15px; }
.pg-hero .source { display: block; margin-top: var(--s2); color: var(--muted); font-size: 14px; }
.pg-two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); margin-top: var(--s4); }
.pg-two.one { grid-template-columns: 1fr; }
.pg-two .btn { min-height: 48px; font-weight: 700; }
.pg-small { display: flex; flex-wrap: wrap; gap: 0 var(--s3); margin-top: var(--s2); }
.pg-small .link-btn { min-height: 44px; color: var(--muted); font-size: 14px; }

/* The price board, like the chalkboard behind the bar */
.pg-board { margin: 0; padding: 4px var(--s4); list-style: none; border: 1px solid #2c3630; border-radius: var(--r-lg); background: #1d241f; }
.pg-board li { padding: 2px 0 6px; border-top: 1px dashed #2c3630; }
.pg-board li:first-child { border-top: none; }
.pg-board button {
  display: flex; align-items: center; gap: var(--s2); width: 100%; min-height: 44px; padding: 0;
  border: none; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.pg-board .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-board .fill { flex: 1; min-width: 12px; border-bottom: 2px dotted #4a564e; transform: translateY(5px); }
.pg-board .p { flex: none; font: 600 24px/1 var(--price-font); color: var(--cream); font-variant-numeric: tabular-nums; }
.pg-board small { display: block; padding-left: 14px; color: var(--muted); font-size: 13px; }
.pub-page .band { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; vertical-align: 1px; background: var(--muted); }
.pub-page .band.b1 { background: var(--band-1); }
.pub-page .band.b2 { background: var(--band-2); }
.pub-page .band.b3 { background: var(--band-3); }
.pub-page .band.b4 { background: var(--band-4); }
.pub-page .band.b5 { background: var(--band-5); }
.pg-key { margin: var(--s2) 0 0; color: var(--muted); font-size: 14px; }

/* How the price has moved: pint glasses, fuller = dearer */
.pg-pints-card { padding: var(--s3); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--card); }
.pg-pints-sum { margin: 0 0 var(--s3); }
.pg-pints-sum.down { color: var(--good); }
.pg-pints-sum.up { color: var(--band-4); }
.pg-pints-sum.same { color: var(--muted); }
.pg-pints { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 6px; align-items: end; }
.pint { display: flex; flex-direction: column; align-items: center; min-width: 0; text-align: center; }
.pint .p { font: 600 22px/1 var(--price-font); font-variant-numeric: tabular-nums; }
.pint.now .p { color: var(--good); }
.pint svg { width: 46px; height: 82px; margin: 6px 0; }
.pint .stout { fill: #140d08; }
.pint .head { fill: var(--cream); }
.pint .glass { fill: none; stroke: var(--muted); stroke-width: 2; }
.pint.now .glass { stroke: var(--good); }
.pint .d { font-size: 14px; font-weight: 600; }
.pint .w { max-width: 100%; overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }

/* Local legend: most prices logged here (never anything about drinking) */
.pg-legend { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border: 1px solid #5a4a2a; border-radius: var(--r-lg); background: #1f1810; }
.pg-medal { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #c9a227; color: #1b140c; font-weight: 800; }
.pg-legend p { margin: 0; }
.pg-legend small { color: var(--muted); font-size: 14px; }

/* Find it */
.pg-map {
  height: 170px; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--card); cursor: pointer;
}
.pg-map .leaflet-gl-layer { filter: brightness(2.2) contrast(1.05); }   /* the same lift as the main map */
.pg-map .leaflet-control-attribution { font-size: 10px; line-height: 1.3; }
.pg-pin {
  display: block; width: 22px; height: 22px; margin: -11px 0 0 -11px;
  border: 4px solid var(--cream); border-radius: 50%; background: var(--bg); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}
.pg-address { display: flex; align-items: flex-start; gap: var(--s2); margin: var(--s3) 0 0; font-size: 16px; }
.pg-address .ico { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--cream); }
.pg-links { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); }
/* All posts */
.pg-posts li { border-top: 1px solid var(--line); }
.pg-posts li:first-child { border-top: none; }
.pg-info { flex: 1; min-width: 0; }
.pg-info b { display: block; font-size: 16px; font-weight: 600; }
.pg-info .sw { margin-right: 6px; }
.pg-info .meta { display: block; font-size: 14px; white-space: normal; }
.pg-info .deal { margin-top: 2px; }
.pg-price { flex: none; font: 600 20px/1 var(--price-font); font-variant-numeric: tabular-nums; }
.pub-page .btn.small { min-height: 44px; }
.pg-posts { margin-top: var(--s1); }
.pg-posts li { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s4); }
.pg-toggle { min-height: 44px; margin-top: var(--s3); }
.pg-more { margin-top: var(--s2); }
.best-btn {
  display: block;
  width: 100%;
  padding: var(--s4);
  border: 1px solid #1f5a39;
  border-radius: var(--r-lg);
  background: var(--good-soft);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.best-btn:hover { border-color: var(--good); }
.best .label { color: var(--good-light); }
.best-row { display: flex; align-items: center; gap: var(--s4); margin-top: var(--s1); }
.best-row b { font: 500 var(--t-2xl)/1 var(--price-font); color: var(--good); font-variant-numeric: tabular-nums; }
.best-where { display: grid; min-width: 0; color: var(--good-light); font-size: 13px; }
.best-where strong { overflow: hidden; color: var(--text); font-size: var(--t-md); text-overflow: ellipsis; white-space: nowrap; }
.best-deal { display: block; margin-top: var(--s2); color: var(--cream-light); font-size: var(--t-sm); }

/* ----- Pub rows: one surface with thin lines between rows, the price big on the right ----- */
.list { list-style: none; margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--card); }
.list:empty { display: none; }
.pub { padding: var(--s3) var(--s4); border-top: 1px solid var(--line); transition: background 150ms ease-out; }
.pub:first-child { border-top: none; }
.pub.open { background: #1c1712; }
.pub-row { display: flex; align-items: center; gap: var(--s3); min-height: 44px; cursor: pointer; }
.pub-row:focus-visible { outline-offset: 4px; border-radius: var(--r-sm); }
.pub-info { flex: 1; min-width: 0; }
.pub h3 { margin: 0; overflow: hidden; font-size: var(--t-md); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.meta { overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }

.pp { flex: none; text-align: right; }
.pp b { display: block; font: 500 30px/1 var(--price-font); color: var(--cream); font-variant-numeric: tabular-nums; }
.pp small { color: var(--muted); font-size: 11px; }
/* Older prices fade so you can tell they might have changed */
.pp.aging b { opacity: 0.7; }
.pp.old b, .pp.doubtful b { color: var(--muted); }

.add-price {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 4px;
  min-height: 34px;
  padding: 0 var(--s3);
  border: 1px dashed #4a3e30;
  border-radius: var(--pill);
  background: none;
  color: var(--cream-light);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.add-price .ico { width: 14px; height: 14px; }
.add-price:hover { border-style: solid; border-color: var(--cream); }

.pub-notes { display: grid; gap: 2px; margin-top: var(--s1); }
.deal { display: block; color: var(--cream-light); font-size: 13px; }
.deal::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--band-3); vertical-align: 1px; }
.why { color: var(--muted); font-size: 13px; }   /* the pub's reasons, e.g. "Live music · Hotel bar" */
.age-note { color: #c9a257; font-size: var(--t-xs); }
.age-note.old { color: var(--warn); }
.pub .source { display: block; margin-top: var(--s2); color: var(--muted); font-size: 13px; }
.pub .source a { color: var(--cream-light); }
.also { margin-top: var(--s2); color: var(--muted); font-size: 13px; }
.also b { color: var(--text); font-weight: 600; }

.actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); }


/* ----- Leaderboard ----- */
.nick-label { font-weight: 600; }
.how { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.board-title { margin: var(--s5) 0 var(--s2); }
/* League rows: one surface with thin lines between them, like the pub list */
.board-list { list-style: none; margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--card); }
.board-list li + li { border-top: 1px solid var(--line); }
.board-list li {
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-height: 52px;
  padding: var(--s2) var(--s4);
}
.board-list li.me { background: var(--cream-soft); }
.board-list .rank { width: 28px; text-align: center; font-weight: 700; color: var(--muted); }
.board-list .who { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-list .pts { font: 500 20px/1 var(--price-font); color: var(--cream); }
.board-list .empty { justify-content: center; color: var(--muted); }

/* "Show 10 more" under the list */
.more { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 12px; }
.more #btn-all { background: none; color: var(--muted); font-weight: 500; }

/* ----- Trending ----- */
.hot .board-title:first-child { margin-top: 4px; }
.hot .how { margin-top: 12px; }
/* Trending rows sit on one surface with thin lines between them, like the pub list */
.hot-list { list-style: none; margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--card); }
.hot-list li + li { border-top: 1px solid var(--line); }
.hot-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: var(--s3) var(--s4);
  border: none;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.hot-row:hover { background: #1c1712; }
.hot-row .hp { min-width: 64px; font: 500 26px/1 var(--price-font); color: var(--cream); }
.hot-row.first .hp { color: var(--good); }
.hot-row .what { flex: 1; min-width: 0; }
.hot-row .what small { display: block; color: var(--muted); font-size: 13px; }
.hot-row .deal { display: block; color: var(--cream-light); font-size: 14px; }
.hot-list .empty { padding: var(--s3) var(--s4); color: var(--muted); font-size: 14px; }

/* ----- Night out planner ----- */
.night-total {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
}
.night-total small { display: block; color: var(--muted); font-size: 13px; }
.night-total .label, .track-card .label { display: block; margin-bottom: var(--s1); }
.night-total b { font: 500 40px/1.1 var(--price-font); color: var(--cream); letter-spacing: 0.5px; }
.night-total .est { color: var(--muted); font-size: 13px; }
.subtabs { margin: var(--s3) 0; }
.subtabs button { min-height: 44px; }   /* thumb-sized (Profile and Night out sub-tabs) */

.stops { list-style: none; margin: 0 0 var(--s3); padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
.stop { padding: 12px 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); }
.stop-top { display: flex; align-items: center; gap: 8px; }
.stop-top h3 { flex: 1; min-width: 0; margin: 0; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stop-num {
  display: inline-grid; place-items: center; width: 24px; height: 24px; flex: none;
  border-radius: 50%; background: var(--cream); color: var(--cream-text); font-size: 13px; font-weight: 700;
}
.icon-btn {
  width: 32px; height: 32px; flex: none; padding: 0;
  border: 1px solid var(--border); border-radius: 10px; background: var(--card-2); color: var(--text);
  font: inherit; font-size: 14px; cursor: pointer;
}
.icon-btn:disabled { opacity: 0.35; cursor: default; }
.walk { margin: 2px 0 0 32px; color: var(--muted); font-size: 13px; }

.item { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.item select { width: 100%; padding: 8px 10px; }
.item-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper .qty { min-width: 22px; text-align: center; font-weight: 700; }
.item-cost { flex: 1; text-align: right; color: var(--muted); font-size: 13px; }
.item-cost b { color: var(--cream); font: 500 22px/1 var(--price-font); margin-left: 4px; }
.item-cost .estimate { color: #c9a257; }
.add-item { margin-top: 10px; padding: 0; border: none; background: none; color: var(--cream-light); font: inherit; font-size: 14px; cursor: pointer; }

.night-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.night-actions a { text-decoration: none; }
.night-actions .clear-night { background: none; color: var(--muted); font-weight: 500; }
.night .empty { padding: 14px; border: 1px dashed var(--border); border-radius: 12px; color: var(--muted); font-size: 14px; list-style: none; }

.tips { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tip { padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); }
.tip p { margin: 0; }
.tip small { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }
.tip .save { color: var(--good); font-weight: 700; }
.tip .btn { margin-top: 8px; }

/* ----- Crawl: a route map, one big total, a row of setting buttons, then the stops as a tram line ----- */
.crawl-shared { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s3); padding: var(--s3) var(--s4); border: 1px solid var(--cream); border-radius: var(--r-lg); background: var(--cream-soft); }
.crawl-shared p { flex: 1; margin: 0; font-size: var(--t-sm); }
.crawl-shared .btn { flex: none; min-height: 44px; }

/* Build my own + ready-made crawls: one row of small cards that scrolls sideways */
.crawl-ready { display: flex; gap: var(--s2); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: var(--s1); margin-bottom: var(--s4); scrollbar-width: none; }
.crawl-ready::-webkit-scrollbar { display: none; }
.rc-card {
  flex: none; display: grid; gap: 2px; min-width: 138px; min-height: 56px; padding: var(--s2) var(--s3); scroll-snap-align: start;
  border: 1px solid var(--border); border-radius: var(--r); background: var(--card); color: var(--text); text-align: left; font: inherit; cursor: pointer;
}
.rc-card b { font-size: var(--t-sm); font-weight: 600; white-space: nowrap; }
.rc-card small { color: var(--muted); font-size: 13px; white-space: nowrap; }
.rc-card:hover { border-color: var(--cream); }
.rc-card.active { border-color: var(--cream); background: var(--cream-soft); }
.rc-card.active b { color: var(--cream-light); }

/* The crawl's name, in the same serif as the Log a price title */
.crawl-title { margin-bottom: var(--s3); }
.crawl-title h2 { margin: 0; font: italic 500 var(--t-xl)/1.15 var(--serif-display); color: var(--text); }
.crawl-title p { margin: var(--s1) 0 0; color: var(--muted); font-size: var(--t-sm); }

/* The map: a still picture of the route */
.crawl-map { height: 220px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--card); }
.crawl-map .leaflet-gl-layer { filter: brightness(2.2) contrast(1.05); }   /* the same lift as the main map */
.crawl-map .leaflet-control-attribution { font-size: 10px; line-height: 1.3; }
.crawl-pin {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--cream); color: var(--cream-text); border: 2px solid var(--bg);
  font: 600 16px/1 var(--price-font); box-shadow: 0 1px 6px rgba(0, 0, 0, 0.6); cursor: pointer;
}

/* The big number */
.crawl-total { padding: var(--s4) 2px var(--s3); }
.ct-main { display: flex; align-items: center; gap: var(--s3); }
.ct-price { font: 500 var(--t-2xl)/1 var(--price-font); color: var(--cream); font-variant-numeric: tabular-nums; letter-spacing: 0.5px; }
.ct-what { color: var(--muted); font-size: var(--t-sm); line-height: 1.3; }
.ct-meta { margin: var(--s1) 0 0; color: var(--text); font-size: var(--t-md); }
.ct-note { margin: var(--s1) 0 0; color: var(--muted); font-size: 13px; }

/* Setting buttons: one row, each opens the "Change your crawl" panel */
.crawl-chips { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s5); }
.crawl-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 44px; padding: 0 var(--s4);
  border: 1px solid var(--border); border-radius: var(--pill); background: var(--card); color: var(--text);
  font: inherit; font-size: var(--t-sm); font-weight: 600; cursor: pointer;
}
.crawl-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crawl-chip:hover { border-color: var(--cream); }
.crawl-chip .ico { color: var(--cream); }

/* The stops as a tram line: a thin line down the left joins the numbered dots */
.crawl-line { position: relative; list-style: none; margin: 0; padding: 0; }
/* line pieces: from each dot down to the next stop (none after the last stop) */
.cl-stop:not(:last-child)::before, .cl-walk::before { content: ""; position: absolute; left: 15px; top: 16px; bottom: 0; width: 2px; background: var(--border); }
.cl-walk::before { top: 0; }
.cl-stop { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: var(--s3); }
.cl-dot {
  position: relative; z-index: 1; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--cream); color: var(--cream-text); border: 3px solid var(--bg); font: 600 17px/1 var(--price-font);
}
.cl-body { min-width: 0; padding-bottom: var(--s2); }
.cl-top { display: flex; align-items: baseline; gap: var(--s3); min-height: 32px; }
.crawl .cl-name {
  flex: 1; min-width: 0; padding: 0; border: none; background: none; color: var(--text); text-align: left;
  font: 600 var(--t-lg)/1.25 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.crawl .cl-name:hover { color: var(--cream-light); }
.cl-price { flex: none; font: 500 var(--t-xl)/1 var(--price-font); color: var(--text); font-variant-numeric: tabular-nums; }
.cl-price.under { color: var(--good); }
.cl-price.est { color: var(--muted); }
.cl-meta { margin: 2px 0 0; color: var(--muted); font-size: var(--t-sm); }
.cl-meta .under { color: var(--good); font-weight: 600; }
.cl-meta .over { color: var(--band-4); font-weight: 600; }
.cl-walk { position: relative; margin: 0; padding: var(--s1) 0 var(--s4) 44px; color: var(--muted); font-size: 13px; }

/* The price check at each stop */
.cl-check { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-top: var(--s3); }
.cl-check span { margin-right: auto; font-size: 15px; }
.cl-btn {
  min-height: 44px; padding: 0 var(--s4); border: 1px solid var(--border); border-radius: var(--pill);
  background: var(--card-2); color: var(--text); font: inherit; font-size: var(--t-sm); font-weight: 600; cursor: pointer;
}
.cl-btn small { margin-left: 2px; color: var(--good); font-weight: 700; }
.cl-btn:hover { border-color: var(--cream); }
.cl-btn.primary { background: var(--cream); border-color: var(--cream); color: var(--cream-text); }
.cl-btn.primary small { color: var(--cream-text); }
.cl-when { margin: var(--s1) 0 0; color: var(--muted); font-size: 13px; }
.cl-done { margin: var(--s3) 0 0; color: var(--good); font-size: var(--t-sm); font-weight: 600; }

/* Send to the group, and the two small links under it */
.crawl-actions { margin-top: var(--s5); }
.crawl-send { display: flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 52px; font-size: var(--t-md); }
.crawl-links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s1) var(--s4); margin-top: var(--s2); }
.crawl-links .link-btn { min-height: 44px; display: inline-flex; align-items: center; color: var(--muted); font-size: var(--t-sm); }

/* The "Change your crawl" panel */
.crawl-sheet { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s2); }
.crawl-sheet .field-label { margin-top: var(--s3); }
#crawl-start-wrap, #crawl-order-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s2); }
.crawl-sheet input, .crawl-sheet select { min-height: 48px; }
.crawl-steps { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.crawl-steps .stepper { gap: var(--s3); margin-top: var(--s2); }
.crawl-steps .qty { min-width: 24px; font: 500 var(--t-xl)/1 var(--price-font); text-align: center; }
.icon-btn.big { width: 44px; height: 44px; border-radius: var(--pill); font-size: 20px; }
.crawl-order button { flex: 1; min-height: 44px; }
.crawl-sheet .btn.primary { margin-top: var(--s4); min-height: 52px; }

/* ----- Tracker and Profile sub-tabs ----- */
.board .subtabs { margin-top: 0; }
/* ----- Friends league ----- */
.league-me { padding: 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); margin-bottom: 10px; }
.league-me b { font: 500 34px/1 var(--price-font); color: var(--cream); margin-right: 4px; }
.league-me small b { font: inherit; font-weight: 700; color: var(--cream-light); margin: 0; }   /* "Heavyweight" / "Soup" in the small text stay small */
.league-me small { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; }
.league-me .crown { display: block; margin-bottom: 6px; font: 600 24px/1.1 var(--price-font); color: var(--heavy); }
.league-me .crown.soup { color: var(--soup); }
.league-me .how { margin-top: 6px; }
/* A coloured edge marks the Heavyweight (gold) and Soup (pale) */
.board-list li.heavy { box-shadow: inset 3px 0 var(--heavy); }
.board-list li.soup { box-shadow: inset 3px 0 #5a4d3e; }
.board-list li .icon-btn { width: 28px; height: 28px; font-size: 12px; color: var(--muted); }
.title { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 12px; font-weight: 700; vertical-align: 1px; }
.title.heavy { background: var(--heavy); color: #2a1a00; }
.title.soup { background: #3a3128; color: var(--soup); }
.league-setup { margin-top: var(--s5); }
/* Bring a mate: one quiet row under the league, with the one cream button */
.invite { display: flex; align-items: center; gap: var(--s3); margin-top: var(--s3); padding: var(--s3) var(--s4);
          border: 1px dashed var(--border); border-radius: var(--r-lg); }
.invite-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.invite-text b { color: var(--cream); font-size: var(--t-sm); font-weight: 600; }
.invite-text small { color: var(--muted); font-size: 13px; }
.league-rules { margin-top: var(--s2); }
#friend-input::placeholder { text-transform: none; letter-spacing: 0; }
#friend-input { text-transform: uppercase; letter-spacing: 1px; }
/* ☆ Saved pubs */
.pub h3 .star { margin-right: 5px; color: var(--cream); font-size: 0.85em; }
.btn.on { border-color: var(--cream); background: var(--cream-soft); color: var(--cream-light); }
#saved-list .empty { padding: var(--s4); color: var(--muted); font-size: 14px; list-style: none; }
.code-row { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.code-row .code { flex: 1; font: 600 26px/1 var(--price-font); letter-spacing: 3px; color: var(--cream); }

/* ----- Tonight / Year (private tracker) ----- */
.private-note { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.track-card { padding: 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); margin-bottom: 10px; }
.track-card small { display: block; color: var(--muted); font-size: 13px; }
.track-card small a { color: var(--cream-light); }
.track-recent { list-style: none; margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--card); }
.track-recent li { display: flex; align-items: center; gap: var(--s3); min-height: 52px; padding: var(--s2) var(--s4); font-size: var(--t-sm); }
.track-recent li + li { border-top: 1px solid var(--line); }
.track-recent li span { flex: 1; min-width: 0; }
.track-recent li small { display: block; color: var(--muted); font-size: 12px; }
.track-recent .empty { color: var(--muted); }
.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--cream); }

/* The 4 Friends sub-tabs fit in one row on a phone */

/* ----- Year ----- */

/* ----- Bills ----- */
.group-chips { margin-bottom: 10px; }
.intro-title { display: block; margin-bottom: 4px; font-size: 16px; }
#bill-setup { display: grid; gap: 10px; margin-bottom: 10px; }
#bill-setup.hidden { display: none; }
.bill-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bill-head h3 { margin: 0; font: 600 26px/1.1 var(--price-font); }
.small-code { font-size: 16px; letter-spacing: 2px; color: var(--cream); }
.bill-summary { margin-top: 8px; font-size: 15px; }
.bill-summary b { font: 500 26px/1 var(--price-font); color: var(--cream); }
#bill-who { margin-top: 10px; border-color: var(--cream); }
.debts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.debt { padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); }
.debt p { margin: 0; }
.debt .owe { font: 500 24px/1 var(--price-font); color: var(--cream); margin-left: 4px; }
.debt small { color: var(--muted); }
.debt-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.debts .empty { padding: 12px 14px; border: 1px dashed var(--border); border-radius: 12px; color: var(--muted); font-size: 14px; }
.small-price span { font-size: 26px; }
.small-price input { font-size: 30px; }
.round-helper { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 12px; }
.round-helper summary { color: var(--cream-light); font-weight: 600; font-size: 14px; cursor: pointer; }
.round-helper[open] { display: grid; }
.round-helper .log-row input { width: 64px; flex: none; padding: 8px; }
.round-helper .log-row select { min-width: 0; }
.round-helper > * + * { margin-top: 8px; }
.add-person { margin-top: 8px; }
#bill-paid { padding: 10px; }

/* ----- Quick "Log a price" ----- */
.fab {
  position: fixed;
  right: 16px;
  bottom: calc(76px + env(safe-area-inset-bottom));   /* just above the tab bar */
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 48px;
  padding: 0 20px 0 16px;
  border: none;
  border-radius: 999px;
  background: var(--cream);
  color: var(--cream-text);
  font: inherit;
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
  cursor: pointer;
}
body { padding-bottom: calc(140px + env(safe-area-inset-bottom)); }   /* room so the tab bar and button never cover the end of the page */

.sheet-wrap {
  position: fixed;
  inset: 0;
  z-index: 950;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
}
.sheet {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  width: 100%;
  max-width: 640px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 20px 20px 0 0;
  background: var(--card);
}
.sheet-top { display: flex; align-items: center; justify-content: space-between; }
.sheet-top h2 { margin: 0; font: 600 26px/1.1 var(--price-font); }
.field-label { margin-top: var(--s2); }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chips-row .chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chips-row .chip.done { opacity: 0.5; }
.log-row { display: flex; gap: 8px; align-items: center; }
.log-row select { flex: 1; }
.log-row select:not(.pill-select) { padding: 8px 10px; }
.price-input { display: flex; align-items: center; gap: 6px; padding: 0 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--field); }
.price-input:focus-within { outline: 2px solid var(--cream); outline-offset: -1px; }
.price-input span { font: 500 34px/1 var(--price-font); color: var(--muted); }
.price-input input { flex: 1; padding: 8px 0; border: none; outline: none; background: none; font: 500 40px/1.1 var(--price-font); color: var(--cream); }
.log-hint { min-height: 18px; color: var(--muted); font-size: 13px; }
.photo-btn { display: flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 48px; padding: var(--s2) var(--s3); border: 1px dashed var(--border); border-radius: 12px; color: var(--cream-light); font-weight: 600; text-align: center; cursor: pointer; }
.photo-btn small { color: var(--muted); font-weight: 400; }
.photo-preview { display: flex; align-items: center; gap: 10px; }
.photo-preview img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; }

.photo-view {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.9);
  cursor: zoom-out;
}
.photo-view img { max-width: 100%; max-height: 100%; border-radius: 12px; }
/* "Report this photo", at the bottom of the full-screen photo */
.btn.photo-report { position: absolute; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); min-height: 44px; cursor: pointer; }

/* Report a note or photo: thumb-sized choices */
.report-sheet .chip, .report-sheet .seg-ctl button { min-height: 44px; }
.report-sheet .how a { color: var(--cream-light); }

/* ----- Log a price lettering: elegant serifs, in the app's own Stout colours ----- */
.sheet { font-family: var(--serif-text); font-size: 18px; font-variant-numeric: lining-nums; }
.sheet-top h2 { font: italic 500 32px/1 var(--serif-display); letter-spacing: 0; }
.sheet .field-label { font-family: var(--serif-text); font-size: 13px; font-weight: 600; letter-spacing: 0.2em; color: var(--cream); }
.sheet .chip, .sheet .seg-ctl button, .sheet .pill-select, .sheet input:not(#log-price), .sheet textarea { font-family: var(--serif-text); font-size: 17px; font-weight: 600; }
.sheet input::placeholder, .sheet textarea::placeholder { font-style: italic; }
.sheet .field-label small { letter-spacing: 0.05em; text-transform: none; color: var(--muted); font-weight: 500; }
.owner-pub { margin: 0; color: var(--muted); }
#owner-send { font-family: var(--serif-text); font-size: 15px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.price-input span, .price-input input { font-family: var(--serif-display); font-weight: 500; font-variant-numeric: lining-nums tabular-nums; }
.price-input span { font-size: 34px; }
.price-input input { font-size: 40px; line-height: 1.15; }
.price-input input::placeholder { font-style: italic; }
.sheet .log-hint, .sheet .how, .sheet .check, .photo-btn small { font-family: var(--serif-text); font-size: 15px; }
.photo-btn { font-family: var(--serif-text); font-size: 19px; }
#log-save { font-family: var(--serif-text); font-size: 15px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }

/* ----- Pop-up thank-you message ----- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(142px + env(safe-area-inset-bottom));   /* above the tab bar and the "Log a price" button */
  transform: translateX(-50%);
  z-index: 1000;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 12px 16px;
  border: 1px solid var(--cream);
  border-radius: 12px;
  background: var(--card-2);
  color: var(--text);
  font-size: 15px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

footer {
  max-width: 640px;
  margin: 0 auto;
  padding: var(--s2) var(--s4) var(--s4);
  color: #75685a;
  font-size: var(--t-xs);
  line-height: 1.6;
}
footer a { color: var(--muted); }

/* ----- Ticker: a stock-market tape across the top of Explore ----- */
.ticker {
  position: sticky;
  top: 0;
  z-index: 800;                 /* above the map, below the sheets and tab bar */
  margin-top: var(--s3);
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: #050403;
  font: 500 15px/34px var(--price-font);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
/* Two copies of the items side by side; sliding left by one copy loops it without a jump */
.ticker-track { display: inline-flex; animation: tape var(--dur, 40s) linear infinite; }
.ticker:hover .ticker-track, .ticker:focus-within .ticker-track, .ticker:active .ticker-track { animation-play-state: paused; }
@keyframes tape { to { transform: translateX(-50%); } }
.tk-set { display: inline-flex; }
.tk {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 0 14px;
  border: none;
  border-right: 1px solid var(--line);
  background: none;
  color: var(--muted);
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}
.tk b { color: var(--text); font-weight: 600; }
.tk .tp { color: var(--cream); font-variant-numeric: tabular-nums; }
.tk .lbl { color: var(--cream); }
.tk .when { color: var(--cream-light); }
.tk.down .chg { color: var(--good); }       /* cheaper */
.tk.up .chg { color: var(--warn); }         /* dearer */
.tk.cheap .tp { color: var(--good); }
.tk.info { cursor: default; }
.tk:hover b { text-decoration: underline; }
.tk.info:hover b { text-decoration: none; }
/* No moving tape for people who turn animations off: they can swipe it instead */
@media (prefers-reduced-motion: reduce) {
  .ticker { overflow-x: auto; }
  .ticker-track { animation: none; }
  .ticker-track .tk-set + .tk-set { display: none; }
}

/* An event from the ticker */
.event-when { margin: var(--s2) 0 0; color: var(--cream-light); }
.event-desc { margin: var(--s2) 0 0; color: var(--muted); }
.event-desc:empty { display: none; }

/* ----- Tracker: your price log, brand by brand ----- */
#track-form .log-row select { flex: 1; min-width: 0; }
.brands .brand + .brand { border-top: 1px solid var(--line); }
.brand-row {
  display: flex;
  align-items: center;
  gap: var(--s3);
  width: 100%;
  padding: var(--s3) var(--s4);
  border: none;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.brand-info { flex: 1; min-width: 0; display: grid; gap: 2px; }
.brand-info small { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-row .pp { display: grid; justify-items: end; gap: 2px; }
.brand-row .pp b { font: 500 26px/1 var(--price-font); color: var(--cream); }
.vs { font-size: 12px; white-space: nowrap; color: var(--muted); }
.vs.down { color: var(--good); }
.vs.up { color: var(--warn); }
.brand.open { padding-bottom: var(--s3); }
.brand.open .track-recent { margin: 0 var(--s3); }
.serve-line small { margin-top: 2px; }
.serve-line .vs { margin-left: 4px; }
.history-label { margin: var(--s3) var(--s4) var(--s2); }
#track-brands .empty { padding: var(--s4); color: var(--muted); font-size: 14px; list-style: none; }

/* ----- Brand colours (brands.js): a two-colour dot, a picked chip filled in the brand's colour, a colour edge on Tracker rows ----- */
.sw {
  display: inline-block;
  flex: none;
  width: 0.62em;
  height: 0.62em;
  margin-right: 0.35em;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bp) 0 50%, var(--bs) 50% 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);   /* so black (Guinness) still shows on the dark page */
  vertical-align: 0.06em;
}
.pin .sw { width: 9px; height: 9px; margin-right: 4px; vertical-align: 1px; }
.brand-chip { display: inline-flex; align-items: center; }
.brand-chip.active { background: var(--bp); border-color: var(--bs); color: var(--bt); }
.brand-chip.active .sw { box-shadow: 0 0 0 1px var(--bt); }
.brands .brand { box-shadow: inset 3px 0 var(--bp), inset 4px 0 var(--bs); }
.also .sw { width: 0.55em; height: 0.55em; }
.pp .sw { width: 11px; height: 11px; margin-right: 6px; vertical-align: 0.45em; }
.ticker .sw { width: 10px; height: 10px; vertical-align: 0; }

/* ----- Emoji pop when a price is saved ----- */
.burst { position: fixed; inset: 0; z-index: 2000; pointer-events: none; overflow: hidden; }
.burst span { position: absolute; font-size: 26px; line-height: 1; will-change: transform, opacity; }

/* ----- Quote of the day: a card that slides up above the tab bar ----- */
.quote {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(66px + env(safe-area-inset-bottom));   /* just above the tab bar */
  z-index: 890;                                         /* under the Log a price button and sheets */
  max-width: 608px;
  margin: 0 auto;
  margin-inline: max(16px, calc((100% - 608px) / 2));
  padding: var(--s3) var(--s4) var(--s3);
  border: 1px solid var(--border);
  border-radius: var(--r-lg) var(--r-lg) var(--r) var(--r);
  background: var(--card);
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.5);
  transform: translateY(calc(100% + 90px));
  transition: transform 320ms cubic-bezier(.2, .8, .3, 1);
}
body.quote-up .quote { transform: none; }
/* Lift the Log a price button above the card while it's showing */
.fab { transition: bottom 320ms cubic-bezier(.2, .8, .3, 1); }
body.quote-up .fab { bottom: calc(76px + var(--quote-h, 0px) + 6px + env(safe-area-inset-bottom)); }
.quote-top { display: flex; align-items: center; justify-content: space-between; }
.quote-top .icon-btn { width: 28px; height: 28px; font-size: 12px; color: var(--muted); }
.quote blockquote { margin: var(--s1) 0 0; font: italic 500 19px/1.3 var(--serif-display); color: var(--cream-light); }
.quote-by { margin: var(--s2) 0 0; color: var(--muted); font-size: 13px; }
.quote-by a { color: var(--cream-light); }
.quote-note { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.quote-note:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .quote, .fab { transition: none; } }

/* ----- Verified pub owners ----- */
.verified { display: inline-block; color: var(--good-light); font-size: 12px; font-weight: 700; letter-spacing: 0.02em; }
.pub-notes .verified { margin-right: 6px; }
.account-row {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  width: 100%; margin-bottom: var(--s3); padding: var(--s3) var(--s4);
  border: 1px dashed var(--border); border-radius: var(--r-lg); background: none;
  color: var(--text); font: inherit; font-size: var(--t-sm); text-align: left; cursor: pointer;
}
.account-row small { margin-left: 6px; color: var(--muted); font-size: 12px; }
.account-row b { color: var(--muted); font-size: 20px; line-height: 1; }
.owner-sheet { max-height: 88vh; overflow-y: auto; }
/* Plain text for the owner forms (the serif lettering is kept for Log a price) */
.owner-sheet p, .owner-sheet .track-recent, .owner-sheet .board-title { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.owner-sheet p { margin: var(--s2) 0; font-size: 15px; }
.owner-form { display: grid; gap: var(--s2); margin-top: var(--s3); }
.owner-sheet .owner-form input:not(#req-price), .owner-sheet .owner-form select, .owner-sheet .owner-form textarea, .owner-sheet .chip {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 16px; font-weight: 400;
}
.owner-account { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin-top: var(--s2);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 13px; color: var(--muted); }
.owner-account b { color: var(--text); font-weight: 600; word-break: break-all; }
.owner-tabs { margin-top: var(--s4); }
.owner-tabs button:disabled { opacity: 0.4; cursor: not-allowed; }
.status-chip { display: inline-block; margin-top: 2px; padding: 1px 8px; border-radius: var(--pill); background: var(--card-2); color: var(--muted); font-size: 12px; font-weight: 700; }
.status-chip.approved, .status-chip.published { background: var(--good-soft); color: var(--good-light); }
.status-chip.rejected, .status-chip.hidden, .status-chip.flagged { background: #3a1712; color: var(--warn); }
.admin-reason { display: block; margin-top: 2px; color: var(--cream-light); }
.offers-off { opacity: 0.6; }
.offers-off p { color: var(--muted); }

/* ----- The stats question (same spot as the quote card) and its Profile row ----- */
.consent-text { margin: var(--s2) 0 var(--s3); color: var(--muted); font-size: 14px; }
.consent-text a, .owner-form a { color: var(--cream-light); }
.consent-actions { display: flex; justify-content: flex-end; gap: var(--s2); }
.stats-row b { font-size: 13px; color: var(--cream-light); }
.stats-row small { display: block; margin: 2px 0 0; }

/* ----- Pub suggestions under the search bar ----- */
.searchbar { position: relative; }
.suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 850;                /* above the map and ticker, below the sheets */
  margin: 0;
  padding: 4px 0;
  list-style: none;
  max-height: 60vh;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--card);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}
.suggest button {
  display: grid;
  gap: 1px;
  width: 100%;
  padding: 10px var(--s4);
  border: none;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.suggest li + li button { border-top: 1px solid var(--line); }
.suggest button:hover, .suggest button:focus-visible { background: var(--card-2); }
.suggest b { font-weight: 600; }
.suggest small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest .area { display: flex; align-items: center; gap: 8px; color: var(--cream-light); font-size: 14px; }

/* ----- My prices (Profile → Saved): every price you've logged, for planning ----- */
.title-note { margin-left: 6px; color: var(--muted); font-size: 11px; font-weight: 500; letter-spacing: 0; text-transform: none; }
#saved .board-title:first-child { margin-top: 0; }
.my-prices li { display: flex; align-items: center; gap: var(--s2); padding: 6px var(--s3) 6px 0; }
.my-prices li + li { border-top: 1px solid var(--line); }
.my-row {
  flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: var(--s2);
  padding: 6px 0 6px var(--s4); border: none; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.my-what { min-width: 0; display: grid; }
.my-what small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.my-price { display: grid; justify-items: end; }
.my-price b { font: 500 24px/1 var(--price-font); color: var(--cream); }
.my-price small { font-size: 12px; }
.my-price .down { color: var(--good); }
.my-price .up { color: var(--warn); }
.my-prices .btn.small { flex: none; padding: 6px 10px; }
.my-prices .icon-btn { flex: none; width: 28px; height: 28px; font-size: 12px; color: var(--muted); }
.my-prices .empty, .my-prices .more-row { justify-content: center; padding: var(--s4); color: var(--muted); font-size: 14px; }

/* ----- iPhone and Android fixes ----- */
/* iPhones zoom the whole page when you tap a box with text smaller than 16px, so every box and menu uses 16px */
input, select, textarea, .pill-select { font-size: 16px; }
.pill-select { font-size: 16px; }
/* On an iPhone home-screen app the ticker sticks just below the clock and notch, not under them */
.ticker { top: env(safe-area-inset-top, 0px); }
/* Footer links big enough to tap */
footer a, footer .link-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }
/* The Save button in Log a price stays in view at the bottom of the form, even on small phones with the keyboard open */
#log-save { position: sticky; bottom: 0; z-index: 2; box-shadow: 0 -10px 16px var(--card); }

/* ----- Contact us ----- */
.link-btn { padding: 6px 2px; border: none; background: none; color: var(--cream-light); font: inherit; text-decoration: underline; cursor: pointer; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
#contact-hint:empty { display: none; }
#contact-note a { color: var(--cream-light); }

/* ----- Split the round (Night out) ----- */
.split { gap: var(--s2); }
.split-items { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.split-items li { display: flex; align-items: center; gap: var(--s2); }
.split-items select { flex: 1; min-width: 0; padding: 8px 10px; }
.split-items .qty { display: flex; align-items: center; gap: 6px; }
.split-items .qty b { min-width: 1.4em; text-align: center; }
.split-items .icon-btn { width: 32px; height: 32px; }
.split-each { min-width: 4.2em; text-align: right; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.split-people { display: flex; align-items: center; justify-content: center; gap: var(--s2); color: var(--muted); }
.split-people b { min-width: 1.6em; text-align: center; font: 500 26px/1 var(--price-font); color: var(--cream); }
.split-people .icon-btn { width: 36px; height: 36px; }
.split-result { margin-top: var(--s3); }
#split-share { margin-top: var(--s3); }

/* ===== Designs picked from 21st.dev (18 Oct 2026), rebuilt in the Stout colours ===== */

/* 1. Ticker like a finance ticker: a colour dot for the brand, the drink in bold, the pub, the price, and a coloured change */
.ticker { font: 500 14px/38px system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; letter-spacing: 0; text-transform: none; }
.tk { align-items: center; gap: 7px; padding: 0 16px; }
.tk .sw { width: 16px; height: 16px; margin: 0; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.4); }
.tk b { font-weight: 600; }
.tk .pub { color: var(--muted); font-weight: 400; }
.tk .tp { font: 600 15px/1 var(--price-font); letter-spacing: 0.02em; }
.tk .chg { font-weight: 600; font-size: 13px; }
.tk .lbl { padding: 1px 7px; border-radius: var(--pill); background: var(--cream-soft); color: var(--cream-light); font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }

/* 4. Tab bar: a floating rounded bar with icons only, and a highlight that slides to the open tab */
.tabbar {
  left: 50%;
  right: auto;
  bottom: calc(10px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  grid-template-columns: repeat(4, 64px);
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--pill);
  background: rgba(23, 19, 15, 0.92);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  --tab-i: 0;
}
.tab-pill {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 64px;
  height: calc(100% - 12px);
  border-radius: var(--pill);
  background: var(--lift);
  transform: translateX(calc(var(--tab-i) * 100%));
  transition: transform 260ms cubic-bezier(.2, .8, .3, 1);
}
.tab { position: relative; z-index: 1; height: 44px; justify-content: center; padding: 0; }
.tab svg { width: 24px; height: 24px; }
/* The tab names are read out by screen readers, but not shown */
.tab span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .tab-pill { transition: none; } }
/* The Log a price button and the quote card sit just above the floating bar */
.fab { bottom: calc(76px + env(safe-area-inset-bottom)); }
.quote { bottom: calc(70px + env(safe-area-inset-bottom)); }

/* 6. League as a leaderboard table: medals for the top 3, initials, points and movement */
.board-list li { display: grid; grid-template-columns: 32px minmax(0, 1fr) 48px 44px 28px; gap: var(--s2); }
.board-list li.lb-head { min-height: 34px; padding-top: var(--s2); padding-bottom: var(--s2); color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.board-list li.lb-head span:nth-child(3), .board-list li.lb-head span:nth-child(4) { text-align: right; }
.board-list .rank { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: 13px; }
.board-list .medal { color: #1b140c; }
.board-list .m1 { background: #e2b54a; }
.board-list .m2 { background: #b9bcc2; }
.board-list .m3 { background: #c8875a; }
.board-list .who { display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.board-list .avatar { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--card-2); color: var(--cream-light); font-size: 12px; font-weight: 700; }
.board-list .who-text { display: grid; min-width: 0; }
.board-list .who-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.board-list .who-text small { color: var(--muted); font-size: 12px; }
.board-list .who-text .title { justify-self: start; margin: 2px 0 0; }
.board-list .pts { text-align: right; }
.board-list .move { text-align: right; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.board-list .move.up { color: var(--good); }
.board-list .move.down { color: var(--warn); }

/* 8. Cheapest nearby as a stat card: a dark card, the price counting up in green, and a trend tag */
.best-btn.stat { background: var(--card); border-color: var(--border); }
.best-btn.stat:hover { border-color: var(--good); }
.best-btn.stat .best-row { align-items: baseline; gap: var(--s3); }
.best-btn.stat .count { font-size: 48px; font-variant-numeric: tabular-nums; }
.best-btn.stat .trend { padding: 2px 9px; border-radius: var(--pill); background: var(--good-soft); font-size: 12.5px; font-weight: 600; }
.best-btn.stat .trend.up { background: #3a1712; }
.best-btn.stat .trend.same { background: var(--card-2); }
.best-btn.stat .best-where { margin-top: var(--s2); color: var(--muted); }
.best-btn.stat .best-where strong .sw { width: 11px; height: 11px; margin-right: 6px; vertical-align: 0; }
