:root {
  --ink: #1f1b16;
  --ink-soft: #6b5f4f;
  --paper: #fbf7ee;
  --paper-deep: #f1e9d6;
  --line: #e4d8bf;
  --sea: #1c3445;
  --sea-2: #24445a;
  --gold: #e8b923;
  --gold-deep: #b98a0c;
  --open: #2e7d4f;
  --closed: #a8452f;
  --radius: 18px;
  --dock-h: 64px;
  --shadow: 0 18px 40px -12px rgba(28, 52, 69, 0.45), 0 2px 6px rgba(28, 52, 69, 0.18);
  --display: 'Fraunces', Georgia, serif;
  --body: 'Instrument Sans', system-ui, sans-serif;
  --foil: conic-gradient(from 210deg, #f3d36b, #e48f6a, #9a7fd1, #6fc3c9, #f3d36b);
  --card: #ffffff;
}

/* ---------- Design options (see map-style.js) ---------- */
:root[data-theme="night"] {
  --ink: #eef1f6; --ink-soft: #9aa5b8; --paper: #151a23; --paper-deep: #1d2330; --line: #2b3242; --card: #1b212c;
  --sea: #f3c74a; --sea-2: #ffd766; --gold: #f3c74a; --gold-deep: #d9a72a; --open: #4fc28a; --closed: #f07a63;
  --shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.7), 0 2px 6px rgba(0, 0, 0, 0.5);
}
:root[data-theme="night"] .primary-btn { color: #151a23; }
:root[data-theme="night"] body { background: #0b1018; }
:root[data-theme="fresh"] {
  --ink: #1b1d22; --ink-soft: #686c75; --paper: #ffffff; --paper-deep: #f2f3f5; --line: #e4e6ea; --card: #ffffff;
  --sea: #e8473a; --sea-2: #d63a2e; --gold: #ffc531; --gold-deep: #d99a00; --open: #1f9d5b; --closed: #d23f31;
  --display: 'Instrument Sans', system-ui, sans-serif;
  --shadow: 0 12px 32px -12px rgba(30, 40, 60, 0.28), 0 2px 6px rgba(30, 40, 60, 0.1);
}
:root[data-theme="fresh"] body { background: #a9d8f2; }
:root[data-theme="fresh"] .shop-name, :root[data-theme="fresh"] .panel-title { letter-spacing: -0.03em; }
:root[data-theme="spellbook"] {
  --ink: #241f16; --ink-soft: #6a5d43; --paper: #f7f2e3; --paper-deep: #ece4cc; --line: #ddd0ad; --card: #fffaf0;
  --sea: #294538; --sea-2: #34594a; --gold: #c9973a; --gold-deep: #9a6f22; --open: #2f6f45; --closed: #9c3d26;
}
:root[data-theme="spellbook"] body { background: #294538; }
:root[data-theme="holo"] {
  --ink: #2b2643; --ink-soft: #6e6890; --paper: #fcfbff; --paper-deep: #f1edfb; --line: #e4ddf2; --card: #ffffff;
  --sea: #6c4bd4; --sea-2: #5a3bbf; --gold: #c08af2; --gold-deep: #9b63d6; --open: #2f9a6c; --closed: #c94a5b;
  --foil: conic-gradient(from 210deg, #f7c6e6, #c9b3ff, #a7d8ff, #b8f3df, #f7c6e6);
}
:root[data-theme="holo"] body { background: #c9dcf7; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--sea);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
a { color: inherit; }
#map { position: fixed; inset: 0; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ---------- Brand ---------- */
.brand {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  left: 14px;
  z-index: 4;
}
.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px 9px 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
  text-decoration: none;
}
.brand-mark {
  width: 22px;
  height: 30px;
  border-radius: 4px;
  background: var(--foil);
  border: 2px solid var(--ink);
  transform: rotate(-8deg);
  flex: none;
}
.brand-name { display: block; font-family: var(--display); font-weight: 700; font-size: 19px; line-height: 1; letter-spacing: -0.01em; }
.brand-sub { display: block; margin-top: 3px; font-size: 12px; color: var(--ink-soft); }

/* ---------- Filters ---------- */
.filters {
  position: fixed;
  z-index: 2;
  top: calc(max(14px, env(safe-area-inset-top)) + 60px);
  left: 0;
  right: 0;
  display: flex;
  gap: 6px;
  padding: 0 14px 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
.chip-toggle {
  --chip: var(--open);
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 13px 0 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 2px 8px rgba(28, 52, 69, 0.25);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.chip-toggle .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--open); }
.chip-toggle .mini-card { width: 8px; height: 11px; border-radius: 2px; background: var(--chip); transform: rotate(-8deg); }
.chip-toggle.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip-toggle.on .mini-card { box-shadow: 0 0 0 1.5px var(--paper); }
.chip-toggle:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

@media (min-width: 768px) {
  .filters { top: max(18px, env(safe-area-inset-top)); left: 280px; right: 70px; flex-wrap: wrap; overflow: visible; }
}

/* ---------- Dock ---------- */
.dock {
  position: fixed;
  z-index: 6;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--dock-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  background: var(--paper);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px -12px rgba(28, 52, 69, 0.35);
}
.dock a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.dock svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dock a.on { color: var(--ink); }
.dock a.on svg { stroke: var(--ink); stroke-width: 2.2; }
.dock a[data-nav="passport"].on svg { stroke: var(--gold-deep); }
@media (min-width: 768px) {
  .dock {
    left: 50%;
    right: auto;
    bottom: 18px;
    transform: translateX(-50%);
    height: 60px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: var(--shadow);
  }
  .dock a { flex: none; flex-direction: row; gap: 7px; padding: 0 16px; font-size: 14px; border-radius: 999px; margin: 8px 0; }
  .dock a.on { background: var(--paper-deep); }
}

/* ---------- Pins ---------- */
.pin {
  --accent: var(--gold);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  min-width: 36px;
  min-height: 44px;
}
.pin.is-hidden { display: none; }
.pin-card {
  position: relative;
  width: 22px;
  height: 30px;
  border-radius: 4px;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 9px var(--accent), 0 4px 8px rgba(20, 30, 40, 0.35);
  transform: rotate(-8deg);
  transition: transform 220ms cubic-bezier(.3, 1.5, .5, 1), box-shadow 220ms;
  overflow: hidden;
}
.pin-foil {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.75) 45%, transparent 60%);
  transform: translateX(-120%);
}
.pin-stem { width: 2px; height: 8px; background: var(--ink); border-radius: 0 0 2px 2px; }
.pin:hover .pin-card, .pin:focus-visible .pin-card { transform: rotate(0deg) translateY(-3px) scale(1.12); }
.pin:hover .pin-foil { animation: foil 700ms ease-out; }
.pin:focus-visible { outline: none; }
.pin:focus-visible .pin-card { outline: 3px solid var(--gold); outline-offset: 2px; }
.pin.is-featured { z-index: 2; }
.pin.is-featured .pin-card {
  width: 26px;
  height: 35px;
  border-color: var(--gold-deep);
  background: var(--foil);
  box-shadow: inset 0 0 0 2px #fff8, inset 0 0 0 9px var(--accent), 0 0 0 3px rgba(232, 185, 35, 0.4), 0 6px 12px rgba(20, 30, 40, 0.4);
}
.pin.is-featured .pin-foil { animation: foil 2.6s ease-in-out infinite; }
.pin.is-active { z-index: 5; }
.pin.is-active .pin-card {
  transform: rotate(0deg) translateY(-6px) scale(1.45);
  box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 9px var(--accent), 0 0 0 4px rgba(232, 185, 35, 0.45), 0 10px 18px rgba(20, 30, 40, 0.45);
}
.pin.is-active .pin-foil { animation: foil 900ms ease-out 120ms; }
.pin.is-active .pin-stem { height: 14px; }
@keyframes foil { to { transform: translateX(120%); } }

/* ---------- Sheet & panel ---------- */
.sheet, .panel {
  position: fixed;
  z-index: 5;
  background: var(--paper);
  box-shadow: var(--shadow);
  overflow-y: auto;
  overscroll-behavior: contain;
  transition: transform 260ms cubic-bezier(.2, .8, .2, 1), opacity 200ms;
}
.sheet[hidden], .panel[hidden] { display: none; }

.sheet {
  left: 0;
  right: 0;
  bottom: calc(var(--dock-h) + env(safe-area-inset-bottom));
  max-height: 60vh;
  max-height: 60dvh;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 10px 20px 28px;
  transform: translateY(110%);
}
.sheet.is-open { transform: translateY(0); }
.sheet-grip { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 12px; }

.panel {
  z-index: 7;
  inset: 0 0 calc(var(--dock-h) + env(safe-area-inset-bottom)) 0;
  padding: calc(max(16px, env(safe-area-inset-top)) + 8px) 20px 40px;
}
@media (max-width: 767px) { .panel { z-index: 5; } }

@media (min-width: 768px) {
  .sheet, .panel {
    top: 88px;
    left: 16px;
    right: auto;
    bottom: 96px;
    width: 400px;
    max-height: none;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    padding: 22px 24px 28px;
  }
  .sheet { bottom: auto; max-height: calc(100vh - 184px); transform: translateX(-24px); opacity: 0; }
  .sheet.is-open { transform: none; opacity: 1; }
  .sheet-grip { display: none; }
  .panel { width: 440px; }
}

.sheet-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--paper-deep);
  cursor: pointer;
  z-index: 1;
}
.panel .sheet-close { position: sticky; float: right; top: 0; margin: -4px -6px 0 8px; }
.sheet-close:hover { background: var(--line); }
.sheet-close:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- Shop card ---------- */
.card-band {
  height: 6px;
  width: 64px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 40%, #fff));
  margin-bottom: 12px;
}
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.tag-row:empty { display: none; }
.tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  vertical-align: middle;
}
.tag-featured { background: var(--foil); color: var(--ink); border: 1px solid var(--gold-deep); }
.tag-pro { background: var(--ink); color: var(--paper); }
.tag-verified { background: #dcefe2; color: #1f5e39; }
.tag-sample { background: #fbe8c6; color: #7a4a10; }
.shop-name { margin: 0 44px 6px 0; font-family: var(--display); font-weight: 700; font-size: 26px; line-height: 1.1; letter-spacing: -0.015em; }
.shop-desc { margin: 8px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink-soft); }
.status { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 14px; font-weight: 600; }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status.is-open { color: var(--open); }
.status.is-open .dot { box-shadow: 0 0 0 4px rgba(46, 125, 79, 0.18); }
.status.is-closed { color: var(--closed); }

.action-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.stamp-btn {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 12px;
  border: 2px solid var(--ink);
  background: var(--foil);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}
.stamp-btn::before { content: ''; width: 18px; height: 18px; border-radius: 50%; border: 2px dashed var(--ink); }
.stamp-btn.done { background: var(--paper-deep); border-color: var(--line); color: var(--open); cursor: default; }
.stamp-btn.done::before { display: none; }
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
}
.ghost-btn.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ghost-btn.wide { width: 100%; margin-top: 8px; }
.text-btn { border: 0; background: none; padding: 6px 0; color: var(--ink-soft); font-size: 13px; text-decoration: underline; cursor: pointer; }
.text-btn.danger, .danger { color: var(--closed); }
.micro { margin: 8px 0 0; font-size: 12.5px; color: var(--ink-soft); }
.muted { color: var(--ink-soft); font-size: 14px; margin: 0; }
.reward {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px dashed var(--gold-deep);
  background: #fdf3d4;
  font-size: 14px;
}
.reward b { display: block; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 3px; }

.block { padding-top: 18px; margin-top: 18px; border-top: 1px dashed var(--line); }
.block h3 { margin: 0 0 10px; font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.chips li {
  --chip: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px 6px 9px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--chip) 12%, var(--paper));
  border: 1px solid color-mix(in srgb, var(--chip) 35%, transparent);
  font-size: 13px;
  font-weight: 500;
}
.chips li::before { content: ''; width: 8px; height: 11px; border-radius: 2px; background: var(--chip); transform: rotate(-8deg); }
.dot-game { display: inline-block; width: 7px; height: 10px; border-radius: 2px; background: var(--chip); transform: rotate(-8deg); margin-right: 7px; vertical-align: 0; }

.event-list { list-style: none; margin: 0; padding: 0; }
.event-list li { display: grid; grid-template-columns: 96px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--paper-deep); font-size: 14px; }
.event-list li:last-child { border-bottom: 0; }
.event-when { color: var(--ink-soft); font-size: 13px; font-variant-numeric: tabular-nums; }
.event-when b { display: block; color: var(--ink); font-weight: 600; }
.event-what em { font-style: normal; color: var(--ink-soft); }
.event-what small { color: var(--ink-soft); }
.day-head { margin: 14px 0 2px; font-family: var(--display); font-size: 17px; }

.drop { padding: 12px 14px; margin-bottom: 8px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.drop-title { margin: 0; font-weight: 600; font-size: 15px; }
.drop-body { margin: 4px 0 0; font-size: 14px; color: var(--ink-soft); line-height: 1.45; }
.drop-meta { margin: 6px 0 0; font-size: 12.5px; color: var(--ink-soft); }

.address { margin: 0 0 12px; font-size: 15px; line-height: 1.45; }
.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: var(--sea);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
}
.action-row .primary-btn { width: auto; flex: 1 1 auto; }
.primary-btn:hover { background: var(--sea-2); }
.primary-btn:disabled { opacity: 0.6; cursor: wait; }

.hours { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.hours th, .hours td { padding: 6px 0; text-align: left; font-weight: 400; }
.hours td { text-align: right; color: var(--ink-soft); }
.hours tr.is-today th, .hours tr.is-today td { font-weight: 600; color: var(--ink); }
.hours tr.is-today th::after { content: ' · today'; font-weight: 400; color: var(--ink-soft); font-size: 12px; }

.links { display: flex; flex-wrap: wrap; gap: 8px; }
.link-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--card); font-size: 14px; font-weight: 500; text-decoration: none;
}
.link-btn:hover { border-color: var(--ink-soft); }
.link-btn span { color: var(--ink-soft); }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; }
.sheet-foot a { font-weight: 600; }

/* ---------- Panels ---------- */
.eyebrow { margin: 4px 0 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
.panel-title { margin: 0 0 8px; font-family: var(--display); font-weight: 700; font-size: 30px; line-height: 1.08; letter-spacing: -0.02em; }
.lede { margin: 0 0 18px; font-size: 15.5px; line-height: 1.55; color: var(--ink-soft); }
.fine { font-size: 12.5px; color: var(--ink-soft); line-height: 1.45; }

.tabs { display: flex; gap: 4px; padding: 4px; margin: 14px 0 18px; border-radius: 12px; background: var(--paper-deep); }
.tabs.scroll { overflow-x: auto; scrollbar-width: none; }
.tab { flex: 1 0 auto; padding: 9px 12px; border: 0; border-radius: 9px; background: none; font-size: 14px; font-weight: 500; text-align: center; text-decoration: none; color: var(--ink-soft); cursor: pointer; }
.tab.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }

.form { display: grid; gap: 14px; }
.form[hidden] { display: none; }
.form.boxed { margin: 14px 0; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); }
.form h4 { margin: 0; font-family: var(--display); font-size: 18px; }
.field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.field > span { display: block; }
.field input, .field select, .field textarea, .shop-switch {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  font-size: 16px;
  font-weight: 400;
  color: var(--ink);
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid color-mix(in srgb, var(--gold) 60%, transparent); border-color: var(--gold-deep); }
.field input:disabled { background: var(--paper-deep); }
details.field summary { cursor: pointer; padding: 10px 0; color: var(--ink); }
details.field[open] summary { margin-bottom: 6px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.4; }
.check input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--sea); }
.check small { color: var(--ink-soft); }
.check.is-disabled { color: var(--ink-soft); }
.form-error { margin: 0; color: var(--closed); font-size: 14px; font-weight: 600; }
.form-error:empty { display: none; }

.check-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.check-chips label { position: relative; cursor: pointer; }
.check-chips input { position: absolute; opacity: 0; }
.check-chips span {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px 8px 10px;
  border-radius: 9px; border: 1px solid var(--line); background: var(--card); font-size: 13px; font-weight: 500; color: var(--ink);
}
.check-chips span::before { content: ''; width: 8px; height: 11px; border-radius: 2px; background: var(--chip); transform: rotate(-8deg); }
.check-chips input:checked + span { background: color-mix(in srgb, var(--chip) 18%, var(--paper)); border-color: var(--chip); box-shadow: inset 0 0 0 1px var(--chip); }
.check-chips input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 1px; }
.hours-grid { display: grid; gap: 6px; }
.hours-grid label { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); }
.hours-grid input { min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; font-size: 15px; }

.quick-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 22px; }
.quick-links a { padding: 8px 12px; border-radius: 9px; background: var(--paper-deep); font-size: 14px; font-weight: 500; text-decoration: none; }
.danger-zone { display: flex; justify-content: space-between; align-items: center; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }

/* Passport */
.progress { height: 10px; border-radius: 10px; background: var(--paper-deep); overflow: hidden; border: 1px solid var(--line); }
.progress span { display: block; height: 100%; background: var(--foil); border-radius: 10px; }
.stamp-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 14px 8px; }
.stamp-grid li { display: grid; justify-items: center; gap: 6px; text-align: center; }
.stamp-grid li > span { font-size: 11.5px; line-height: 1.25; color: var(--ink-soft); }
.stamp {
  --accent: var(--gold);
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px dashed var(--line);
  color: var(--line);
  font-family: var(--display);
  font-size: 20px;
  text-decoration: none;
}
.stamp.got {
  border: 3px double var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--paper));
  transform: rotate(-10deg);
  box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 5px color-mix(in srgb, var(--accent) 60%, transparent);
}
.stamp small { position: absolute; bottom: -2px; right: -4px; padding: 1px 6px; border-radius: 8px; background: var(--ink); color: var(--paper); font-family: var(--body); font-size: 10.5px; transform: rotate(10deg); }
.passport-demo { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 22px; }
.badges { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.badges li { display: grid; grid-template-columns: 34px 1fr; column-gap: 10px; align-items: center; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); opacity: 0.55; }
.badges li.earned { opacity: 1; border-color: var(--gold-deep); background: #fffaf0; }
.badges b { font-size: 13.5px; }
.badges small { grid-column: 2; font-size: 11.5px; color: var(--ink-soft); line-height: 1.3; }
.badge-icon { grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; background: var(--paper-deep); border: 2px dashed var(--line); }
.badges li.earned .badge-icon { background: var(--foil); border: 2px solid var(--ink); }
.leaders { margin: 0; padding-left: 22px; }
.leaders li { padding: 8px 0; border-bottom: 1px solid var(--paper-deep); }
.leaders li span { float: right; color: var(--ink-soft); font-size: 14px; }

.profile-head { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.avatar { flex: none; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 14px; background: var(--foil); border: 2px solid var(--ink); font-family: var(--display); font-weight: 700; font-size: 26px; transform: rotate(-5deg); }
.home-shop { font-size: 14px; margin: 12px 0 0; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 6px; }
.stat-row.four { grid-template-columns: repeat(2, 1fr); }
.stat-row div { padding: 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.stat-row b { display: block; font-family: var(--display); font-size: 24px; line-height: 1.1; }
.stat-row span { font-size: 12px; color: var(--ink-soft); }
.stat-row.locked b { filter: blur(6px); }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--paper-deep); font-size: 14px; }
.plain-list small { color: var(--ink-soft); }

/* Shops & plans */
.steps { margin: 0 0 22px; padding-left: 22px; line-height: 1.55; font-size: 15px; }
.steps li { margin-bottom: 6px; }
.plans { display: grid; gap: 10px; }
.plan { padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); }
.plan h3 { margin: 0; font-family: var(--display); font-size: 20px; }
.plan .price { margin: 4px 0 10px; font-family: var(--display); font-size: 28px; font-weight: 700; }
.plan .price small { font-family: var(--body); font-size: 13px; font-weight: 400; color: var(--ink-soft); }
.plan ul { margin: 0 0 12px; padding-left: 18px; font-size: 14px; line-height: 1.55; }
.plan.featured { border: 2px solid var(--gold-deep); background: linear-gradient(#fffaf0, #fffaf0) padding-box, var(--foil) border-box; border-color: transparent; }
.plan.current { box-shadow: 0 0 0 3px var(--sea); }
.plan-cta.current { display: inline-block; font-weight: 600; color: var(--sea); }
.upsell { margin: 10px 0; padding: 12px 14px; border-radius: 12px; background: #fdf3d4; border: 1px solid #f0d48a; font-size: 14px; color: #3a2c06; }
.upsell a { font-weight: 600; color: inherit; }
.shop-switch { margin-bottom: 8px; }

.poster {
  margin: 0 auto 6px;
  max-width: 300px;
  padding: 22px;
  border-radius: 18px;
  border: 3px solid var(--ink);
  background: var(--paper);
  text-align: center;
  box-shadow: inset 0 0 0 6px var(--paper), inset 0 0 0 8px var(--gold);
}
.poster-eyebrow { margin: 0; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
.poster-name { margin: 6px 0 14px; font-family: var(--display); font-weight: 700; font-size: 22px; line-height: 1.1; }
.qr { display: grid; place-items: center; min-height: 180px; }
.qr img, .qr canvas { border-radius: 6px; }
.poster-cta { margin: 14px 0 0; font-weight: 600; }
.poster-reward { margin: 8px 0 0; font-size: 13px; padding: 8px; border: 1px dashed var(--gold-deep); border-radius: 8px; }

.queue-item { padding: 14px; margin-bottom: 10px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.queue-item b { display: block; }
.queue-item small { display: block; margin-top: 3px; color: var(--ink-soft); }
.queue-item .action-row { margin-top: 10px; }
.queue-item .primary-btn, .queue-item .ghost-btn { min-height: 40px; font-size: 14px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  top: calc(max(14px, env(safe-area-inset-top)) + 4px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  line-height: 1.4;
  box-shadow: var(--shadow);
  animation: toast-in 280ms cubic-bezier(.3, 1.4, .5, 1);
}
.toast[hidden] { display: none; }
.toast-win { background: var(--sea); }
.toast-stamp { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--foil); border: 2px solid var(--paper); animation: stamp-in 500ms cubic-bezier(.3, 1.8, .5, 1); }
@keyframes toast-in { from { transform: translate(-50%, -16px); opacity: 0; } }
@keyframes stamp-in { from { transform: scale(2.2) rotate(-30deg); opacity: 0; } }

/* ---------- Map controls ---------- */
.maplibregl-ctrl-top-right { top: calc(max(14px, env(safe-area-inset-top)) + 108px); right: 4px; }
@media (min-width: 768px) { .maplibregl-ctrl-top-right { top: max(10px, env(safe-area-inset-top)); } }
.maplibregl-ctrl-bottom-left { bottom: calc(var(--dock-h) + env(safe-area-inset-bottom)); }
@media (min-width: 768px) { .maplibregl-ctrl-bottom-left { bottom: 0; } }
.maplibregl-ctrl-group { background: var(--paper) !important; border: 1px solid var(--line); border-radius: 14px !important; box-shadow: var(--shadow) !important; overflow: hidden; }
.maplibregl-ctrl-group button { width: 40px !important; height: 40px !important; }
.maplibregl-ctrl-group button + button { border-top: 1px solid var(--line) !important; }
.maplibregl-ctrl-attrib.maplibregl-compact { background: rgba(251, 247, 238, 0.85); }

/* ---------- Print: just the passport poster ---------- */
@media print {
  body.printing * { visibility: hidden; }
  body.printing #poster, body.printing #poster * { visibility: visible; }
  body.printing #poster { position: fixed; left: 50%; top: 40px; transform: translateX(-50%) scale(1.6); transform-origin: top center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- v2: search, personal filters ---------- */
.search { position: relative; flex: 0 0 auto; display: flex; align-items: center; min-width: 210px; }
.search svg { position: absolute; left: 12px; width: 17px; height: 17px; fill: none; stroke: var(--ink-soft); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.search input {
  width: 100%; min-height: 36px; padding: 0 12px 0 36px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--paper); box-shadow: 0 2px 8px rgba(28, 52, 69, 0.25); font-size: 14px;
}
.search input:focus { outline: 3px solid color-mix(in srgb, var(--gold) 60%, transparent); }
.search-results {
  position: fixed; z-index: 30; margin-top: 4px; width: min(340px, calc(100vw - 28px)); max-height: 50vh; overflow-y: auto;
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 6px;
  transform: translateY(42px);
}
.search-results[hidden] { display: none; }
.search-results button { display: flex; justify-content: space-between; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 9px; background: none; text-align: left; cursor: pointer; font-size: 14px; }
.search-results button:hover, .search-results button:focus { background: var(--paper-deep); }
.search-results small { color: var(--ink-soft); }
.search-results .muted { padding: 10px; }
.chip-edit svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.chip-edit { border-style: dashed; }
@media (max-width: 767px) { .search { min-width: 180px; } }

/* Shop card extras */
.chips li.feat { --chip: #1c3445; }
.icon-only { flex: none; width: 46px; padding: 0; }
.icon-only svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.confirm-box { margin-top: 14px; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--line); background: var(--card); font-size: 14px; }
.confirm-box p { margin: 0; }
.confirm-box .action-row { margin-top: 10px; }
.confirm-box .ghost-btn { min-height: 38px; font-size: 14px; }
.rsvp { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.rsvp-btn { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.rsvp-btn.on { background: var(--open); border-color: var(--open); color: #fff; }
.rsvp small { color: var(--ink-soft); }

/* Pricing toggles and forms */
.interval-toggle { display: inline-flex; gap: 4px; padding: 4px; margin: 6px 0 14px; border-radius: 12px; background: var(--paper-deep); }
.interval-toggle button { padding: 8px 14px; border: 0; border-radius: 9px; background: none; font-size: 14px; font-weight: 500; color: var(--ink-soft); cursor: pointer; }
.interval-toggle button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
.interval-toggle small { color: var(--open); font-weight: 600; }
.plan .price s { font-size: 18px; color: var(--ink-soft); font-weight: 400; }
.inline-form { grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; }
.inline-form select, .inline-form input { min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-size: 15px; min-width: 0; }
.inline-form .primary-btn { width: auto; }
.inline-form .form-error { grid-column: 1 / -1; }
.newsletter .inline-form { grid-template-columns: 1fr 1fr auto; }
@media (max-width: 420px) { .inline-form, .newsletter .inline-form { grid-template-columns: 1fr; } }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; min-height: 42px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-size: 13px; color: var(--ink-soft); }
.copy-row .ghost-btn { min-height: 42px; }
.quick-links a.ql-gold { background: var(--foil); border: 1px solid var(--gold-deep); }
.row-actions { display: flex; gap: 12px; flex: none; }
.dash-body h4 { margin: 18px 0 4px; font-family: var(--display); font-size: 17px; }
#mail-preview { width: 100%; height: 520px; margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }

/* CardTerra+ gold */
.progress.gold span { background: linear-gradient(90deg, #b98a0c, #f3d36b, #b98a0c); }
.stamp-grid.gold .stamp.got { border-color: var(--gold-deep); background: radial-gradient(circle at 30% 30%, #fff6d6, #f3d36b 70%); color: #6b4b00; }
.badges li.members:not(.earned) .badge-icon { border-color: var(--gold-deep); }
.avatar.gold { box-shadow: 0 0 0 3px var(--gold); }

/* ---------- Server-rendered pages ---------- */
body.doc { overflow: auto; background: var(--paper-deep); }
.doc-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; max-width: 980px; margin: 0 auto; padding: 16px; }
.doc-head .brand-link { box-shadow: none; }
.doc-head nav { display: flex; flex-wrap: wrap; gap: 4px; }
.doc-head nav a { padding: 8px 12px; border-radius: 9px; font-size: 14px; font-weight: 500; text-decoration: none; }
.doc-head nav a:hover { background: var(--paper); }
.doc-main { max-width: 980px; margin: 0 auto; padding: 28px 20px 40px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
@media (min-width: 768px) { .doc-main { padding: 40px 48px 48px; } }
.doc-main h1 { margin: 0 0 12px; font-family: var(--display); font-size: clamp(30px, 5vw, 44px); line-height: 1.05; letter-spacing: -0.02em; }
.doc-main h2 { margin: 30px 0 10px; font-family: var(--display); font-size: 24px; }
.doc-main p, .doc-main li { font-size: 16px; line-height: 1.6; }
.doc-main .eyebrow a { text-decoration: none; }
.primary-btn.inline { width: auto; }
.doc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.town-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.town-grid li { display: flex; justify-content: space-between; padding: 12px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.town-grid a { font-weight: 600; text-decoration: none; }
.town-grid span { color: var(--ink-soft); }
.doc-shops { list-style: none; padding: 0; display: grid; gap: 10px; }
.doc-shop { padding: 14px 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.doc-shop a { font-size: 17px; }
.doc-shop small { display: block; color: var(--ink-soft); font-size: 14px; margin-top: 2px; }
.doc-events { padding-left: 18px; }
.doc-events li { margin-bottom: 8px; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.doc-table th, .doc-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.doc-main .plans { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.doc-foot { max-width: 980px; margin: 0 auto; padding: 24px 20px 48px; font-size: 13px; color: var(--ink-soft); line-height: 1.6; }
.sheet .action-row { flex-wrap: nowrap; }
.sheet .action-row .stamp-btn { min-width: 0; padding: 0 12px; }
.sheet .action-row .ghost-btn { flex: none; padding: 0 14px; }
.sheet .action-row .ghost-btn.icon-only { padding: 0; }

.currency-switch { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 10px; }
.currency-switch button { padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); font-size: 12.5px; font-weight: 600; color: var(--ink-soft); cursor: pointer; }
.currency-switch button.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* Map key: partner shops in colour, free listings in grey */
.legend { position: fixed; z-index: 2; right: 12px; bottom: calc(var(--dock-h) + env(safe-area-inset-bottom) + 34px); display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--paper) 92%, transparent); border: 1px solid var(--line); box-shadow: 0 2px 8px rgba(28, 52, 69, 0.2); font-size: 11.5px; color: var(--ink-soft); }
.legend span { display: flex; align-items: center; gap: 7px; }
.key { display: inline-block; width: 9px; height: 12px; border-radius: 2px; border: 1.5px solid var(--ink); transform: rotate(-8deg); }
.key-featured { background: var(--foil); border-color: var(--gold-deep); }
.key-partner { background: #3d8f86; }
.key-free { background: #d8d2c6; border-color: #8f887b; }
@media (min-width: 768px) { .legend { bottom: 96px; } }
.listed-note { margin-top: 14px; }

:root[data-theme="night"] .maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: invert(1) brightness(1.4); }
:root[data-theme="night"] .maplibregl-ctrl-attrib.maplibregl-compact { background: rgba(21, 26, 35, 0.85); color: #9aa5b8; }
:root[data-theme="night"] .maplibregl-ctrl-attrib a { color: #c9cfdb; }

.welcome-list { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 12px; }
.welcome-list li { padding: 14px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.welcome-list b { display: block; font-family: var(--display); font-size: 17px; }
.welcome-list span { display: block; margin-top: 3px; font-size: 14px; color: var(--ink-soft); line-height: 1.45; }
.ghost-btn.small { min-height: 34px; padding: 0 12px; font-size: 13px; }
.start-shops li { align-items: center; }

.theme-toggle { font-size: 18px; line-height: 1; color: var(--ink); }

.game-links { font-size: 14px; line-height: 2; }
.game-links a, .game-links b { white-space: nowrap; }

/* Links & page tab */
.link-edit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 8px 10px; align-items: end; padding: 10px 0; border-bottom: 1px dashed var(--line, #e4d8bf); }
.link-edit .text-btn { justify-self: start; }
@media (max-width: 520px) { .link-edit { grid-template-columns: 1fr; } }
textarea.code { width: 100%; font: 12px/1.4 ui-monospace, Menlo, monospace; padding: 10px; border-radius: 10px; border: 1px solid var(--line, #e4d8bf); background: var(--paper, #fbf7ee); }

/* ---------- Pages inside the app ----------
   Server pages (towns, card shows, releases, the store finder, legal pages…) open in the app's own panel over the live map,
   so they share one look: the same type, cards, chips and buttons as everything else. */
@media (min-width: 768px) { .panel.page-panel { width: 500px; } }
.page h1 { margin: 0 0 8px; font-family: var(--display); font-weight: 700; font-size: 30px; line-height: 1.08; letter-spacing: -0.02em; }
.page h2 { margin: 22px 0 10px; padding-top: 18px; border-top: 1px dashed var(--line); font-family: var(--body); font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
.page p, .page li { font-size: 15px; line-height: 1.55; }
.page .eyebrow a { text-decoration: none; }
.page .eyebrow a:hover { color: var(--ink); }
.page a:not([class]) { text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 2px; }
.page .doc-actions { margin: 16px 0; }
.page .doc-actions .primary-btn, .page .doc-actions .ghost-btn { width: auto; flex: 1 1 auto; }
.page .doc-shops { gap: 8px; }
.page .doc-shop { padding: 12px 14px; }
.page .doc-shop a { font-size: 15.5px; text-decoration: none; }
.page .doc-shop a b { font-weight: 600; }
.page .doc-shop small { font-size: 13px; }
.page .doc-events { list-style: none; margin: 0; padding: 0; }
.page .doc-events li { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--paper-deep); font-size: 14px; }
.page .doc-events li:last-child { border-bottom: 0; }
.page .doc-events b { color: var(--ink); font-weight: 600; }
.page .doc-table { display: block; overflow-x: auto; font-size: 13.5px; white-space: nowrap; }
.page .doc-table th { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; }
.page .doc-table td:nth-child(2) { white-space: normal; min-width: 160px; }
.page .town-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.page .town-grid li { padding: 10px 12px; font-size: 14px; }
.page .plans { grid-template-columns: 1fr; }
.page .steps { padding-left: 20px; }
.page .steps li { margin-bottom: 6px; }
.page .hours { margin-bottom: 6px; }
.page code { font-size: 12px; word-break: break-all; }
.page form.doc-actions input { flex: 1 1 140px; min-height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); }
.link-stack { display: grid; gap: 8px; margin: 16px 0; }
.link-stack .link-btn { justify-content: space-between; min-height: 48px; font-size: 15px; }
.page-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 26px; padding-top: 18px; border-top: 1px dashed var(--line); }
.page-nav a { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 13px; font-weight: 500; text-decoration: none; }
.page-nav a:hover { border-color: var(--ink-soft); }
.page-foot { margin-top: 18px; font-size: 11.5px; line-height: 1.5; color: var(--ink-soft); }
.page-foot p { font-size: 11.5px; margin: 6px 0; }
.page-foot a { color: inherit; }
.page .game-tag { display: inline-flex; align-items: center; margin: 0 0 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.page .releases .doc-shop small a { text-decoration: underline; }
.page .releases .game-tag { display: flex; }
.page .releases .doc-shop small a { font-size: 13px; }
.quick-links.explore { gap: 6px; margin: 6px 0 4px; }
.quick-links.explore a { padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 13px; }
.quick-links.explore a:hover { border-color: var(--ink-soft); }

/* ======================================================================
   Home layout: one page that flows top to bottom.
   Map at the top (brand and map/card-show switch float on it), the filter bar sticks under it as you scroll,
   then the shops in view, what's on, card shows and new sets. Shop cards and panels open over the page.
   ====================================================================== */
body.home { overflow-x: hidden; overflow-y: auto; height: auto; min-height: 100%; background: var(--paper-deep); padding-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom) + 8px); }
html:has(body.home) { height: auto; }
.home .map-wrap { position: relative; height: 58vh; height: 58svh; min-height: 340px; background: var(--sea); }
.home #map { position: absolute; inset: 0; }
.home .brand { position: absolute; }
.home .legend { position: absolute; bottom: 30px; right: 10px; }
.mode-switch { position: absolute; z-index: 3; top: max(14px, env(safe-area-inset-top)); right: 14px; display: flex; padding: 4px; gap: 2px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); }
.mode-switch button { border: 0; background: none; padding: 7px 13px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink-soft); cursor: pointer; }
.mode-switch button.on { background: var(--ink); color: var(--paper); }
@media (max-width: 520px) { .mode-switch { top: auto; bottom: 30px; right: auto; left: 10px; } }

/* Filter bar: search, then "All shops", then everyday filters and games; sticks to the top once the map scrolls away. */
.home .filters { position: sticky; top: 0; left: auto; right: auto; z-index: 4; display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; padding: 10px 14px; overflow-x: auto; background: color-mix(in srgb, var(--paper-deep) 94%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
@media (min-width: 768px) { .home .filters { top: 0; left: auto; right: auto; padding: 12px 20px; flex-wrap: wrap; overflow: visible; } }
.home .filters .search { flex: 1 0 210px; max-width: 340px; }
.home .chip-toggle { box-shadow: none; }
.chip-toggle.chip-all.on { background: var(--sea); border-color: var(--sea); color: #fff; }
.filters .chip-sep { flex: none; width: 1px; height: 22px; background: var(--line); margin: 0 2px; }

/* Content under the map */
.home-feed { max-width: 1120px; margin: 0 auto; padding: 6px 16px 30px; }
.home-section { margin-top: 22px; }
.home-section > header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.home-section h2 { margin: 0; font-family: var(--display); font-size: 22px; letter-spacing: -0.01em; }
.home-section > header a, .home-section > header button { font-size: 14px; font-weight: 600; color: var(--sea); text-decoration: none; background: none; border: 0; cursor: pointer; padding: 0; }
.home-section .hint { margin: -4px 0 10px; font-size: 13px; color: var(--ink-soft); }
.result-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); list-style: none; margin: 0; padding: 0; }
.result { position: relative; display: block; width: 100%; text-align: left; padding: 14px 16px 13px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font: inherit; color: inherit; text-decoration: none; transition: border-color 150ms, transform 150ms; }
.result:hover { border-color: var(--ink-soft); transform: translateY(-1px); }
.result::before { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent, transparent); }
.result b { display: block; font-size: 15.5px; line-height: 1.25; }
.result .meta { display: block; margin-top: 3px; font-size: 13px; color: var(--ink-soft); }
.result .games { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.result .games i { width: 8px; height: 11px; border-radius: 2px; background: var(--chip); transform: rotate(-8deg); }
.result .status { margin: 6px 0 0; font-size: 12.5px; }
.result .tagline { margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--gold-deep); }
.event-strip { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.event-strip li a { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); text-decoration: none; }
.event-strip .when { text-align: center; font-size: 12px; color: var(--ink-soft); line-height: 1.2; }
.event-strip .when b { display: block; font-family: var(--display); font-size: 22px; color: var(--ink); }
.event-strip .what b { display: block; font-size: 14.5px; line-height: 1.25; }
.event-strip .what small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ink-soft); }
.cta-band { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 26px; }
.cta-band a { display: block; padding: 18px 18px 16px; border-radius: 16px; background: var(--sea); color: #fff; text-decoration: none; }
.cta-band a.alt { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.cta-band b { display: block; font-family: var(--display); font-size: 20px; }
.cta-band span { display: block; margin-top: 4px; font-size: 14px; opacity: .85; line-height: 1.4; }
.home-foot { margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-soft); line-height: 1.55; }
.home-foot nav { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 8px; font-size: 13px; }
.home-foot a { color: inherit; }
.empty-note { padding: 18px; border-radius: 14px; border: 1px dashed var(--line); color: var(--ink-soft); font-size: 14px; }

/* Panels on phones slide up over the lower part of the screen, so the map stays visible above. */
@media (max-width: 767px) {
  .panel { top: 22vh; top: 22svh; border-radius: var(--radius) var(--radius) 0 0; box-shadow: 0 -12px 40px -10px rgba(28, 52, 69, 0.45); padding-top: 20px; }
}
.home .maplibregl-ctrl-top-right { top: 64px; }
@media (max-width: 520px) { .home .maplibregl-ctrl-top-right { top: calc(max(14px, env(safe-area-inset-top)) + 58px); } }
.mode-shows .legend { display: none; }
.mode-shows .filters { display: none; }
fieldset.link-required { margin: 0; padding: 12px 14px 14px; border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 10px; }
fieldset.link-required legend { padding: 0 6px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.provenance { margin-top: 10px; }

/* Card show reviews */
.rating { color: var(--gold); letter-spacing: 1px; }
.star-pick { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.star-pick label { cursor: pointer; }
.star-pick input { position: absolute; opacity: 0; pointer-events: none; }
.star-pick span { display: inline-block; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; }
.star-pick input:checked + span { background: var(--gold); border-color: var(--gold); color: #1a1408; font-weight: 600; }
.star-pick input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.reviews li { padding: 8px 0; }
