/* Point Nine on the web: the app's home screen, list and map on one screen.
   Every colour, gradient and shadow is a recipe from frontend/src/theme.ts
   (materials, glassTones), so the page and the app are made of the same stuff.
   The page never scrolls: the list scrolls inside its column, and the map pans. */

:root {
  --pearl: #efede7;
  --pearl-hi: #faf9f6;
  --pearl-lo: #e6e3db;
  --seam: #d5d1c7;
  --graphite: #232427;
  --graphite-lo: #18191b;
  --on-graphite: #f4f2ec;
  --smoke: #55565a;
  --ash: #67665f;
  --pump: #c4460c;
  --ink: #18191b;
  --backlight: #ffc94f;
  --backlight-ink: #3a2500;
  --neg-ink: #f2efe6;
  --below: #2e7d46;
  --above: #b8322a;
  --stale: #975a00;

  --float: 0 2px 4px rgba(35, 36, 39, 0.12), 0 14px 30px rgba(35, 36, 39, 0.2);
  --casing: inset 0 1px 0 #fff, 0 0 0 1px rgba(35, 36, 39, 0.08), 0 1px 2px rgba(35, 36, 39, 0.1),
    0 8px 22px rgba(35, 36, 39, 0.07);
  --casing-face: linear-gradient(180deg, #faf9f6 0%, #f4f2ee 100%);

  --sans: 'Chivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Chivo Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --side: clamp(380px, 34vw, 460px);

  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  background: var(--pearl);
  color: var(--graphite);
  font: 500 14px/1.43 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
p,
dl,
dd {
  margin: 0;
}
button {
  font: inherit;
  color: inherit;
  margin: 0;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
}
button:disabled {
  cursor: default;
}
a {
  color: inherit;
  text-decoration: none;
}
img,
svg {
  display: block;
}
[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--pump);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.icon {
  flex: none;
}
.ico {
  display: inline-flex;
}

/* ---------------------------------------------------------------- Layout --- */
/* Phone: the header over one body, the list or the map, with the floating
   List/Map rocker. Wide: the list under the header at the left, the map beside. */

.app {
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas: 'head' 'body';
  position: relative;
}

.head {
  grid-area: head;
  position: relative;
  z-index: 3;
  padding-top: max(12px, env(safe-area-inset-top));
  background: linear-gradient(180deg, #f3f1ec 0%, #efede7 100%);
  min-width: 0;
}
.list {
  grid-area: body;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px 8px 112px;
  min-height: 0;
}
.map-wrap {
  grid-area: body;
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: #efede7;
}
.map {
  position: absolute;
  inset: 0;
  /* Its own stacking context: the pins' z-order stays under the map's controls. */
  z-index: 0;
}

.app[data-view='list'] .map-wrap {
  visibility: hidden;
}
.app[data-view='map'] .list {
  display: none;
}
.app[data-view='map'] .sort-row {
  display: none;
}

@media (min-width: 900px) {
  .app {
    grid-template-columns: var(--side) minmax(0, 1fr);
    grid-template-areas: 'head map' 'list map';
  }
  .head {
    box-shadow: inset -1px 0 0 rgba(35, 36, 39, 0.1);
  }
  .list {
    grid-area: list;
    padding-bottom: 16px;
    box-shadow: inset -1px 0 0 rgba(35, 36, 39, 0.1);
  }
  .map-wrap {
    grid-area: map;
    box-shadow: inset 1px 0 0 rgba(35, 36, 39, 0.1);
  }
  .app[data-view] .list {
    display: block;
  }
  .app[data-view] .map-wrap {
    visibility: visible;
  }
  .app[data-view] .sort-row {
    display: flex;
  }
  .toggle {
    display: none !important;
  }
}

/* ---------------------------------------------------------------- Glass ---- */
/* Paper glass: gradient, the 3 px pixel grid, a sheen, a sunk rim. */

.glass {
  position: relative;
  color: var(--ink);
  background-color: #fff;
  background-image: radial-gradient(circle at 1.5px 1.5px, rgba(24, 25, 27, 0.07) 0.95px, transparent 1.15px),
    linear-gradient(180deg, #f1f0ec 0%, #fff 22%, #fbfaf7 100%);
  background-size: 3px 3px, 100% 100%;
  box-shadow: inset 0 2px 4px rgba(35, 36, 39, 0.16), inset 0 0 0 1px rgba(35, 36, 39, 0.14);
}
.glass::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0) 40%);
}
.glass.off {
  background-color: #e8e7e2;
  background-image: radial-gradient(circle at 1.5px 1.5px, rgba(24, 25, 27, 0.07) 0.95px, transparent 1.15px),
    linear-gradient(180deg, #e2e1dc 0%, #eae9e4 22%, #e7e6e1 100%);
}
.glass.backlit {
  color: var(--backlight-ink);
  background-color: var(--backlight);
  background-image: radial-gradient(circle at 1.5px 1.5px, rgba(110, 60, 0, 0.18) 0.95px, transparent 1.15px),
    radial-gradient(120% 140% at 50% 30%, #ffe08e 0%, #ffc94f 55%, #f2b232 100%);
  box-shadow: inset 0 2px 4px rgba(110, 60, 0, 0.28), inset 0 0 0 1px rgba(110, 60, 0, 0.22),
    0 0 16px rgba(255, 186, 50, 0.45);
}
.glass.backlit::after {
  opacity: 0.55;
}
.glass.neg {
  color: var(--neg-ink);
  background-color: #1e1f22;
  background-image: radial-gradient(circle at 1.5px 1.5px, rgba(242, 239, 230, 0.09) 0.95px, transparent 1.15px),
    linear-gradient(180deg, #151618 0%, #222327 100%);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(0, 0, 0, 0.5);
}
.glass.neg::after {
  opacity: 0.18;
}

/* The readout: lit segments over their ghosts, in the glass's ink. */
.readout {
  fill: currentColor;
  flex: none;
}
.readout .ghost {
  fill-opacity: 0.07;
}
.neg .readout .ghost {
  fill-opacity: 0.08;
}
.backlit .readout .ghost {
  fill-opacity: 0.11;
}
.off .readout .lit {
  fill-opacity: 0;
}

/* Annunciators: small engraved capitals printed on the glass. */
.annun {
  font: 600 9.5px/1 var(--mono);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  opacity: 0.82;
  white-space: nowrap;
}
.off .annun {
  opacity: 0.35;
}
.annun-alert {
  opacity: 1;
  padding: 3px 5px;
  border-radius: 4px;
  color: #fff;
  background: var(--above);
}

/* The loading sweep: one band of light crossing every off glass and placeholder
   together, as the app's shared sweep clock does. */
.sweeping {
  overflow: hidden;
}
.sweeping::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(100deg, transparent 0 42%, rgba(255, 255, 255, 0.7) 50%, transparent 58% 100%) fixed;
  background-size: 200vw 100%;
  animation: sweep 1.8s linear infinite;
}
@keyframes sweep {
  from {
    background-position: 100vw 0;
  }
  to {
    background-position: -100vw 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sweeping::before {
    animation: none;
    background: rgba(255, 255, 255, 0.25);
  }
}

/* Placeholder bars: sunk, with the sweep. */
.bar {
  position: relative;
  display: block;
  height: 12px;
  border-radius: 6px;
  background: var(--pearl-lo);
  box-shadow: inset 0 1px 2px rgba(35, 36, 39, 0.18), 0 1px 0 rgba(255, 255, 255, 0.95);
}
.bar + .bar {
  margin-top: 8px;
}

/* ---------------------------------------------------------------- Keys ----- */

.key {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  font: 700 15px/1 var(--sans);
  white-space: nowrap;
  user-select: none;
  color: var(--graphite);
  background: linear-gradient(180deg, #fff 0%, #f2f0eb 55%, #e3e0d8 100%);
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(35, 36, 39, 0.15), 0 1px 0 rgba(35, 36, 39, 0.16),
    0 2px 5px rgba(35, 36, 39, 0.1);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
}
.key:active {
  transform: translateY(1px);
  background: linear-gradient(180deg, #dedbd3 0%, #eae8e2 100%);
  box-shadow: inset 0 2px 3px rgba(35, 36, 39, 0.24), 0 0 0 1px rgba(35, 36, 39, 0.17), 0 1px 0 rgba(255, 255, 255, 0.9);
}
.key-graphite {
  color: var(--on-graphite);
  background: linear-gradient(180deg, #4a4c52 0%, #2c2d31 50%, #1e1f22 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 0 0 1px #111214, 0 1px 0 rgba(0, 0, 0, 0.2),
    0 2px 6px rgba(0, 0, 0, 0.18);
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.6);
}
.key-graphite:active {
  background: linear-gradient(180deg, #17181a 0%, #28292d 100%);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6), 0 0 0 1px #111214, 0 1px 0 rgba(255, 255, 255, 0.75);
}
.key-pump {
  color: #fff;
  background: linear-gradient(180deg, #d0561b 0%, #be440c 50%, #a93a08 100%);
  box-shadow: inset 0 1px 0 rgba(255, 215, 185, 0.45), 0 0 0 1px #86300a, 0 1px 0 rgba(0, 0, 0, 0.18),
    0 2px 7px rgba(170, 58, 8, 0.28);
  text-shadow: 0 -1px 0 rgba(90, 25, 0, 0.5);
}
.key-pump:active {
  background: linear-gradient(180deg, #963305 0%, #b2410d 100%);
  box-shadow: inset 0 2px 4px rgba(60, 15, 0, 0.5), 0 0 0 1px #86300a, 0 1px 0 rgba(255, 255, 255, 0.75);
}
.key-lg {
  height: 52px;
  border-radius: 14px;
  font-size: 16px;
}
.key-round {
  width: 44px;
  padding: 0;
  border-radius: 50%;
}
.key-round.key-sm {
  width: 32px;
  height: 32px;
}
.key-nav {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 12px;
}

/* The store keys sit where the app's Regions and Settings keys do. */
.stores {
  display: flex;
  gap: 8px;
  flex: none;
}
.store {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  height: 44px;
  padding: 0 13px;
  font-size: 14px;
}
.store small {
  font: 600 9px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}
.store[aria-disabled='true'] {
  cursor: default;
}

/* ---------------------------------------------------------------- Chips ---- */

.chip-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 46px;
  padding: 4px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.chip-row::-webkit-scrollbar {
  display: none;
}

.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  height: 36px;
  padding: 0 13px;
  border-radius: 10px;
  font: 700 13px/1 var(--sans);
  white-space: nowrap;
  color: var(--graphite);
  background: linear-gradient(180deg, #fff 0%, #efede8 100%);
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(35, 36, 39, 0.14), 0 1px 0 rgba(35, 36, 39, 0.14),
    0 1px 3px rgba(35, 36, 39, 0.08);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
}
.chip:active {
  transform: translateY(1px);
  background: linear-gradient(180deg, #e0ddd5 0%, #eceae4 100%);
  box-shadow: inset 0 2px 3px rgba(35, 36, 39, 0.22), 0 0 0 1px rgba(35, 36, 39, 0.16), 0 1px 0 #fff;
}
.chip.on {
  transform: translateY(1px);
  color: var(--on-graphite);
  background: linear-gradient(180deg, #17181a 0%, #2d2e32 100%);
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.55), 0 0 0 1px #111214, 0 1px 0 rgba(255, 255, 255, 0.9);
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.6);
}
.chip-end {
  margin-left: auto;
}
.chip-label {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pip {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
}
.pip-u {
  background: radial-gradient(circle at 35% 30%, #8fe3a8 0%, #2f9150 65%, #1f6a38 100%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.28);
}
.pip-d {
  background: radial-gradient(circle at 35% 30%, #6a6c71 0%, #17181a 65%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 1px 0 rgba(255, 255, 255, 0.7);
}
.on .pip-u {
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 0 8px rgba(80, 210, 120, 0.85);
}
.on .pip-d {
  box-shadow: 0 0 0 1.5px #f4f2ec;
}

/* ---------------------------------------------------------------- Header --- */

.title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
}
.lockup {
  flex: 1;
  min-width: 0;
  font: 800 40px/1.05 var(--sans);
  letter-spacing: -0.035em;
  color: var(--graphite);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}
.loc {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 16px 10px;
  font-size: 12px;
  color: var(--ash);
  white-space: nowrap;
  overflow: hidden;
}
.loc span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* The freshness strip: the list's prices, and the refresh key. */
.fresh {
  display: flex;
  align-items: center;
  gap: 8px;
  width: calc(100% - 32px);
  height: 32px;
  margin: 0 16px 10px;
  padding: 0 12px;
  border-radius: 9px;
  text-align: left;
}
.fresh:active {
  transform: translateY(1px);
}
.fresh-clock {
  margin-left: auto;
}
.fresh-stale {
  font: 800 10.5px/1.1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fresh .annun-alert {
  margin-left: 4px;
}

/* Nearest / Cheapest with the "within distance" slider beside them. */
.sort-row .chips {
  display: flex;
  gap: 6px;
  flex: none;
}
.slider {
  --fill: 0%;
  flex: 1;
  min-width: 70px;
  display: flex;
  align-items: center;
  height: 36px;
  padding-left: 8px;
}
.slider input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 36px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
.slider input::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(180deg, #45474c 0%, #1e1f22 100%) 0 0 / var(--fill) 100% no-repeat, #d6d3cb;
  box-shadow: inset 0 1px 2px rgba(35, 36, 39, 0.38), 0 1px 0 #fff;
}
.slider input::-moz-range-track {
  height: 8px;
  border-radius: 4px;
  background: #d6d3cb;
  box-shadow: inset 0 1px 2px rgba(35, 36, 39, 0.38), 0 1px 0 #fff;
}
.slider input::-moz-range-progress {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(180deg, #45474c 0%, #1e1f22 100%);
}
.slider input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -8px;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle, #d5d3cc 0 3px, transparent 4px),
    radial-gradient(circle at 50% 32%, #fff 0%, #e7e5df 58%, #c8c6bf 100%);
  box-shadow: 0 0 0 1px rgba(35, 36, 39, 0.28), 0 2px 4px rgba(35, 36, 39, 0.28), inset 0 1px 0 #fff;
}
.slider input::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle, #d5d3cc 0 3px, transparent 4px),
    radial-gradient(circle at 50% 32%, #fff 0%, #e7e5df 58%, #c8c6bf 100%);
  box-shadow: 0 0 0 1px rgba(35, 36, 39, 0.28), 0 2px 4px rgba(35, 36, 39, 0.28), inset 0 1px 0 #fff;
}
.slider.disabled input {
  cursor: default;
}
.slider.disabled input::-webkit-slider-runnable-track {
  background: #e0ddd6;
  box-shadow: inset 0 1px 1px rgba(35, 36, 39, 0.16), 0 1px 0 #fff;
}
.slider.disabled input::-moz-range-track,
.slider.disabled input::-moz-range-progress {
  background: #e0ddd6;
}
.slider.disabled input::-webkit-slider-thumb {
  background: #edebe6;
  box-shadow: 0 0 0 1px rgba(35, 36, 39, 0.14);
}
.slider.disabled input::-moz-range-thumb {
  background: #edebe6;
  box-shadow: 0 0 0 1px rgba(35, 36, 39, 0.14);
}
.dist {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 54px;
  height: 30px;
  margin-left: 4px;
  border-radius: 8px;
}

.seam {
  height: 2px;
  margin-top: 4px;
  background: linear-gradient(180deg, rgba(35, 36, 39, 0.13) 0 1px, rgba(255, 255, 255, 0.95) 1px 2px);
}

/* ---------------------------------------------------------------- Cards ---- */

.list.pending .card .window,
.list.pending .card .mini-window {
  filter: grayscale(1) contrast(0.6) brightness(1.05);
}
.list.pending .card .readout .lit {
  fill-opacity: 0.12;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 8px;
  padding: 16px;
  border-radius: 22px;
  background: var(--casing-face);
  box-shadow: var(--casing);
}
.card.sel {
  box-shadow: inset 0 1px 0 #fff, 0 0 0 2px #232427, 0 1px 2px rgba(35, 36, 39, 0.1), 0 8px 22px rgba(35, 36, 39, 0.1);
}
.card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.card-names {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.card-title {
  font: 800 21px/26px var(--sans);
  letter-spacing: -0.015em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-sub {
  color: var(--smoke);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-head .key-round {
  align-self: flex-start;
}

.tile {
  display: grid;
  place-items: center;
  flex: none;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(35, 36, 39, 0.12), inset 0 -2px 0 rgba(35, 36, 39, 0.05), 0 1px 2px rgba(35, 36, 39, 0.08);
}
.tile-lg {
  width: 56px;
  height: 56px;
  border-radius: 13px;
}
.tile-sm {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}
.tile img {
  width: 78%;
  height: 78%;
  object-fit: contain;
}
.tile-sm img {
  width: 84%;
  height: 84%;
}
.tile-letter {
  color: var(--on-graphite);
  font: 800 20px/1 var(--sans);
  background: radial-gradient(circle at 50% 28%, #55575d 0%, #232427 70%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.3);
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.6);
}
.tile-sm.tile-letter {
  font-size: 13px;
}
.tile-bundle {
  color: var(--graphite);
}
.tile-empty {
  background: var(--pearl-lo);
  box-shadow: inset 0 1px 2px rgba(35, 36, 39, 0.18), 0 1px 0 rgba(255, 255, 255, 0.95);
}

.bezel {
  padding: 5px;
  border-radius: 16px;
  background: linear-gradient(180deg, #45474c 0%, #2c2d31 45%, #1e1f22 100%);
  box-shadow: 0 0 0 1px #111214, inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 1px 2px rgba(35, 36, 39, 0.18);
}
.window {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 14px 12px;
  border-radius: 11px;
}
.annun-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font: 800 10.5px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.window.off .annun-row {
  opacity: 0.3;
}
.window .readout {
  max-width: 100%;
  height: auto;
}

.cues {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.cues:empty {
  display: none;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  color: #fff;
  font: 700 12px/1 var(--sans);
  letter-spacing: 0.01em;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.6);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0) 55%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.18), 0 1px 1px rgba(0, 0, 0, 0.12);
}
.badge-good {
  background-color: var(--below);
}
.badge-ok {
  background-color: var(--graphite);
}
.badge-bad {
  background-color: var(--above);
}
.arrow {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
}
.arrow.down {
  border-top: 6px solid #fff;
}
.arrow.up {
  border-bottom: 6px solid #fff;
}
.well {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  font: 500 12.5px/1 var(--mono);
  color: var(--smoke);
  background: var(--pearl-lo);
  box-shadow: inset 0 1px 2px rgba(35, 36, 39, 0.18), 0 1px 0 rgba(255, 255, 255, 0.95);
  white-space: nowrap;
}
.well.alert {
  color: var(--above);
}

.card-keys {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 8px;
}
.card-keys .key {
  width: 100%;
}

/* The card's information face. */
.mini-window {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border-radius: 9px;
}
.info {
  display: flex;
}
.info-col {
  flex: 1;
  min-width: 0;
}
.info-col.hours {
  flex: none;
}
.info-seam {
  width: 2px;
  margin: 0 12px;
  background: linear-gradient(90deg, rgba(35, 36, 39, 0.13) 0 1px, rgba(255, 255, 255, 0.95) 1px 2px);
}
.caption {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 20px;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--ash);
}
.addr {
  line-height: 20px;
}
.addr.muted {
  font-size: 13px;
  color: var(--ash);
}
.copy {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  color: var(--smoke);
}
.copy:hover {
  background: var(--pearl-lo);
}
.hours dl {
  display: grid;
  grid-template-columns: auto auto;
  column-gap: 10px;
  line-height: 20px;
}
.hours dd {
  font: 500 12.5px/20px var(--mono);
  white-space: nowrap;
}

/* Empty and failed lists. */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 48px 24px;
  text-align: center;
}
.empty-icon {
  color: var(--ash);
}
.empty-title {
  font: 800 17px/1.3 var(--sans);
}
.empty-sub {
  color: var(--ash);
}
.empty .key {
  margin-top: 6px;
}

/* ---------------------------------------------------------------- Map ------ */

.map-keys {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.map-keys .key {
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(35, 36, 39, 0.15), var(--float);
}
.app[data-view='map'] .map-keys {
  top: auto;
  bottom: 96px;
}
@media (min-width: 900px) {
  .app[data-view] .map-keys {
    top: 12px;
    bottom: auto;
  }
}

.notice {
  position: absolute;
  top: 12px;
  left: 50%;
  z-index: 2;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 72%;
  height: 36px;
  padding: 0 14px;
  border-radius: 12px;
  font: 700 12px/1 var(--sans);
  box-shadow: inset 0 2px 4px rgba(35, 36, 39, 0.16), inset 0 0 0 1px rgba(35, 36, 39, 0.14), var(--float);
}
.notice.alert {
  color: var(--stale);
  cursor: pointer;
}
.notice.off .annun {
  opacity: 0.7;
}

/* The selected station bar: floats at the top of the map. */
.sel-bar {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 68px;
  z-index: 3;
  max-width: 520px;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 6px 0 7px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff 0%, #ecebe4 100%);
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(35, 36, 39, 0.1), var(--float);
}
/* On a phone the map keys sit at the bottom, so the bar spans the top and is centred. */
@media (max-width: 899px) {
  .sel-bar {
    right: 12px;
    margin: 0 auto;
  }
}
.sel-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sel-text b {
  font: 700 15px/1.2 var(--sans);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sel-text small {
  font-size: 12px;
  color: var(--ash);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sel-text .bar {
  height: 10px;
}
.sel-text .bar + .bar {
  margin-top: 3px;
}
.sel-glass {
  display: flex;
  align-items: center;
  height: 38px;
  padding: 0 8px;
  border-radius: 8px;
}

/* The pins: a graphite bezel around glass with the pins' 2 px pixel grid, and a
   tail to the station. Geometry is MARKER_LAYOUT's (map/markerLayout.ts). */
.pin {
  --tail: 8px;
  display: block;
  position: relative;
  width: 68px;
  height: calc(28px + var(--tail));
  padding: 0 0 var(--tail);
  cursor: pointer;
}
.pin.below {
  padding: var(--tail) 0 0;
}
.pin.pin-group {
  width: 126px;
}
.pin::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 28px;
  margin-left: -8px;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: var(--tail) solid var(--graphite);
}
.pin.below::after {
  top: 0;
  border-top: 0;
  border-bottom: var(--tail) solid var(--graphite);
}
.pill {
  display: flex;
  align-items: center;
  height: 28px;
  border-radius: 8px;
}
.pin-chip .pill {
  padding: 2px;
  background: var(--graphite);
}
.pin-group .pill {
  border: 2px solid var(--graphite);
  background: linear-gradient(180deg, #fff 0%, #e9e7e1 100%);
}
.pin-group.lit .pill {
  background: radial-gradient(120% 160% at 50% 30%, #ffe08e 0%, #ffc94f 60%, #f2b232 100%);
}
.pin-glass {
  display: grid;
  place-items: center;
  height: 24px;
  border-radius: 6px;
  color: var(--ink);
  background: radial-gradient(circle at 1px 1px, rgba(24, 25, 27, 0.07) 0.6px, transparent 0.8px) 0 0 / 2px 2px,
    linear-gradient(180deg, #f1f0ec 0%, #fff 22%, #fbfaf7 100%);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}
.pin-chip .pin-glass {
  flex: 1;
}
.pin-group .pin-glass {
  width: 64px;
}
.pin-glass.backlit {
  color: var(--backlight-ink);
  background: radial-gradient(circle at 1px 1px, rgba(110, 60, 0, 0.18) 0.6px, transparent 0.8px) 0 0 / 2px 2px,
    radial-gradient(120% 140% at 50% 30%, #ffe08e 0%, #ffc94f 55%, #f2b232 100%);
  box-shadow: inset 0 1px 2px rgba(110, 60, 0, 0.4);
}
.pin-glass.neg {
  color: var(--neg-ink);
  background: radial-gradient(circle at 1px 1px, rgba(242, 239, 230, 0.09) 0.6px, transparent 0.8px) 0 0 / 2px 2px,
    linear-gradient(180deg, #151618 0%, #222327 100%);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6);
}
.pin-count {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding-right: 4px;
  font: 800 13px/16px var(--mono);
  color: var(--graphite);
}
.pin-group.lit .pin-count {
  color: var(--backlight-ink);
}
.pin-dot {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  cursor: pointer;
}
.pin-dot i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--pearl-hi);
  border: 2px solid var(--graphite);
}
.pin-dot.sel i {
  background: var(--graphite);
  box-shadow: inset 0 0 0 2.5px var(--pearl-hi);
}
.you {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--graphite);
  border: 3px solid #fff;
  box-shadow: 0 0 0 6px rgba(35, 36, 39, 0.16), 0 1px 3px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

/* MapLibre's own chrome, quietened to the page. */
.maplibregl-ctrl-attrib {
  font: 500 11px/1.4 var(--sans);
}
.maplibregl-ctrl-bottom-right {
  z-index: 1;
}
.app[data-view='map'] .maplibregl-ctrl-bottom-right {
  bottom: 84px;
}
@media (min-width: 900px) {
  .app[data-view] .maplibregl-ctrl-bottom-right {
    bottom: 0;
  }
}

/* The group picker (components/StationPicker.tsx): a sheet over the map. */
.picker {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 4;
  max-width: 520px;
  max-height: min(60%, 520px);
  display: flex;
  flex-direction: column;
  border-radius: 21px;
  background: var(--casing-face);
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(35, 36, 39, 0.1), var(--float);
}
.app[data-view='map'] .picker {
  bottom: 88px;
}
@media (min-width: 900px) {
  .app[data-view] .picker {
    bottom: 12px;
  }
}
.picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 8px 16px;
}
.picker-head h2 {
  font: 800 20px/1.2 var(--sans);
}
.picker-rows {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 8px 8px;
}
.picker-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 8px;
  border-radius: 12px;
  text-align: left;
}
.picker-row:hover {
  background: rgba(35, 36, 39, 0.05);
}
.picker-row.lit {
  box-shadow: inset 0 0 0 2px #f2b232;
  background: rgba(255, 201, 79, 0.12);
}
.picker-glass {
  display: flex;
  align-items: center;
  height: 34px;
  padding: 0 8px;
  border-radius: 8px;
}

/* ---------------------------------------------------------------- Toggle --- */
/* The List / Map rocker, floating at the foot of a phone's screen. */

.toggle {
  position: absolute;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 5;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 16px;
  background: linear-gradient(180deg, #d5d2ca 0%, #e9e7e1 100%);
  box-shadow: inset 0 2px 3px rgba(35, 36, 39, 0.22), inset 0 0 0 1px rgba(35, 36, 39, 0.08), 0 0 0 5px #f5f4f0,
    0 0 0 6px rgba(35, 36, 39, 0.1), var(--float);
}
.toggle button {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 96px;
  height: 40px;
  border-radius: 12px;
  font: 700 14px/1 var(--sans);
  color: var(--smoke);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
  transition: color 160ms ease;
}
.toggle button[aria-checked='true'] {
  color: var(--on-graphite);
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.6);
}
.toggle-puck {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 96px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(180deg, #4a4c52 0%, #2c2d31 50%, #1e1f22 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 0 0 1px #111214, 0 2px 4px rgba(0, 0, 0, 0.25);
  transition: transform 220ms cubic-bezier(0.3, 0.7, 0.3, 1);
}
.app[data-view='map'] .toggle-puck {
  transform: translateX(100px);
}
@media (prefers-reduced-motion: reduce) {
  .toggle-puck,
  .toggle button {
    transition: none;
  }
}

/* ---------------------------------------------------------------- Brand sheet */
/* Hangs below the filter row, as the app's does. */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: rgba(35, 36, 39, 0.35);
}
.sheet {
  position: fixed;
  z-index: 11;
  max-height: calc(100dvh - 24px);
  display: flex;
  flex-direction: column;
  border-radius: 21px;
  background: var(--pearl);
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(35, 36, 39, 0.08), var(--float);
  overflow: hidden;
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 12px 10px 16px;
}
.sheet-head h2 {
  font: 800 20px/1.2 var(--sans);
}
.rocker {
  display: flex;
  gap: 4px;
  margin: 0 16px 12px;
  padding: 4px;
  border-radius: 16px;
  background: linear-gradient(180deg, #d5d2ca 0%, #e9e7e1 100%);
  box-shadow: inset 0 2px 3px rgba(35, 36, 39, 0.22), inset 0 0 0 1px rgba(35, 36, 39, 0.08), 0 1px 0 #fff;
}
.seg {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  border-radius: 12px;
  font: 700 14px/1 var(--sans);
  color: var(--smoke);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
}
.seg.on {
  color: var(--on-graphite);
  background: linear-gradient(180deg, #4a4c52 0%, #2c2d31 50%, #1e1f22 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 0 0 1px #111214, 0 2px 4px rgba(0, 0, 0, 0.25);
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.6);
}
.led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
  background: radial-gradient(circle at 35% 30%, #a3a199 0%, #6f6d66 70%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(255, 255, 255, 0.6);
}
.led-g.lit {
  background: radial-gradient(circle at 35% 30%, #b6f5c6 0%, #36b25d 60%, #1f6a38 100%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 0 8px rgba(80, 210, 120, 0.9);
}
.led-r.lit {
  background: radial-gradient(circle at 35% 30%, #ffc2b8 0%, #e0473a 60%, #8e2018 100%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 0 8px rgba(240, 80, 60, 0.9);
}
.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  padding: 2px 16px 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.brand-key {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 7px 12px 7px 7px;
  border-radius: 12px;
  text-align: left;
  font: 700 14px/1.2 var(--sans);
  background: linear-gradient(180deg, #fff 0%, #f2f0eb 55%, #e3e0d8 100%);
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(35, 36, 39, 0.15), 0 1px 0 rgba(35, 36, 39, 0.16),
    0 2px 5px rgba(35, 36, 39, 0.1);
}
.brand-key > span:nth-child(2) {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.brand-key:active {
  transform: translateY(1px);
}
.brand-key.included {
  background: linear-gradient(180deg, #d9e9db 0%, #e7f0e7 100%);
  box-shadow: inset 0 2px 3px rgba(20, 80, 40, 0.22), 0 0 0 1.5px rgba(46, 125, 70, 0.6), 0 1px 0 #fff;
}
.brand-key.excluded {
  background: linear-gradient(180deg, #f0d8d4 0%, #f6e6e3 100%);
  box-shadow: inset 0 2px 3px rgba(120, 30, 20, 0.2), 0 0 0 1.5px rgba(184, 50, 42, 0.55), 0 1px 0 #fff;
}
.sheet-empty {
  grid-column: 1 / -1;
  padding: 12px 4px;
  color: var(--ash);
}
.sheet-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(35, 36, 39, 0.1);
  box-shadow: inset 0 1px 0 #fff;
}
.sheet-foot span {
  font-size: 13px;
  color: var(--smoke);
}

/* ---------------------------------------------------------------- Narrow --- */

/* A phone's title row: the store keys lose their small print, and the wordmark
   shrinks to the room they leave (fitTitle, as the app's adjustsFontSizeToFit). */
@media (max-width: 599px) {
  .store {
    padding: 0 12px;
  }
  .store small {
    display: none;
  }
}
@media (max-width: 380px) {
  .store {
    padding: 0 10px;
    font-size: 13px;
  }
  .chip {
    padding: 0 11px;
  }
}
@media (max-height: 700px) and (max-width: 899px) {
  .loc {
    padding-bottom: 6px;
  }
  .fresh {
    margin-bottom: 6px;
  }
}

.noscript {
  position: fixed;
  inset: auto 16px 16px;
  padding: 12px 16px;
  border-radius: 12px;
  color: var(--on-graphite);
  background: var(--graphite);
}
