/* ExtraSchicht-Planer — mobile-first, dark "Nacht der Industriekultur" theme */
:root {
  --bg: #15110d;
  --bg-2: #1f1812;
  --surface: #271e16;
  --surface-2: #322619;
  --line: #3d3022;
  --text: #f4ece2;
  --muted: #b6a890;
  --muted-2: #a08f78;     /* raised for WCAG AA on body text */
  --accent: #ff7a1a;      /* ExtraSchicht orange */
  --accent-2: #ffb300;    /* amber/glow */
  --accent-ink: #2a1500;
  --danger: #ff5a3c;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 8px 30px rgba(0,0,0,.45);
  --header-h: 56px;
  --nav-h: 60px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  /* motion system */
  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --dur-1: .14s;
  --dur-2: .22s;
  --dur-3: .3s;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* author display rules must not defeat the hidden attribute */

/* Keyboard focus ring (best practice) */
:where(a, button, select, input, .tl, .chip, [tabindex]):focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
  border-radius: 8px;
}
/* shared keyframes */
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes slide-down { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes reveal { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes star-pop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes bump { 0% { transform: scale(1); } 50% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes pin-drop { from { opacity: 0; transform: translateY(-8px) scale(.7); } to { opacity: 1; transform: none; } }
@keyframes pin-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,122,26,.6), 0 1px 4px rgba(0,0,0,.55); }
  70%  { box-shadow: 0 0 0 9px rgba(255,122,26,0), 0 1px 4px rgba(0,0,0,.55); }
  100% { box-shadow: 0 0 0 0 rgba(255,122,26,0), 0 1px 4px rgba(0,0,0,.55); }
}
@keyframes spin { to { transform: rotate(360deg); } }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
  overflow: hidden;             /* views scroll internally */
  display: flex;
  flex-direction: column;
  /* use the DYNAMIC viewport height so the bottom nav stays visible above
     the mobile browser's URL bar / safe area (fallbacks first) */
  height: 100vh;
  height: 100dvh;
}

/* ---------- Header ---------- */
.app-header {
  height: calc(var(--header-h) + var(--safe-t));
  padding-top: var(--safe-t);
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-left: 14px;
  padding-right: 10px;
  background: linear-gradient(180deg, #1c150f, #15110d);
  border-bottom: 1px solid var(--line);
  z-index: 1000;
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark {
  width: 30px; height: 30px; flex: none; border-radius: 8px;
  background: radial-gradient(circle at 35% 25%, var(--accent-2), var(--accent) 60%, #c4490a);
  box-shadow: 0 0 16px rgba(255,122,26,.55), inset 0 0 6px rgba(0,0,0,.3);
}
.brand-text { min-width: 0; }
.brand-text h1 {
  margin: 0; font-size: 18px; font-weight: 800; letter-spacing: .2px; line-height: 1;
  white-space: nowrap;
}
.brand-text h1 span { color: var(--accent); font-weight: 700; }
.brand-text p {
  margin: 3px 0 0; font-size: 11.5px; color: var(--muted); line-height: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.icon-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; flex: none;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: 12px;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.icon-btn:active { transform: scale(.95); }
.filter-dot {
  position: absolute; top: 7px; right: 7px; width: 9px; height: 9px;
  background: var(--accent); border-radius: 50%; box-shadow: 0 0 0 2px var(--surface);
}

/* ---------- Filters ---------- */
.filters {
  flex: none;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  padding: 12px 14px 14px;
  display: flex; flex-direction: column; gap: 11px;
  max-height: 70vh; max-height: 70dvh; overflow-y: auto;
  z-index: 1100;
}
.filters:not([hidden]) { animation: slide-down var(--dur-2) var(--ease); }
.filter-row { display: flex; gap: 10px; }
.filter-row.two > * { flex: 1; min-width: 0; }
#search {
  width: 100%; padding: 12px 14px; font-size: 15px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
}
#search::placeholder { color: var(--muted-2); }
.select { display: flex; flex-direction: column; gap: 5px; font-size: 11.5px; color: var(--muted); }
.select select {
  appearance: none; -webkit-appearance: none;
  padding: 11px 30px 11px 12px; font-size: 14.5px;
  background: var(--surface) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23b6a890' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>") no-repeat right 10px center;
  color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  font-size: 12.5px; padding: 7px 12px; border-radius: 999px;
  display: inline-flex; align-items: center; min-height: 38px;
  background: var(--surface); color: var(--muted);
  border: 1px solid var(--line); cursor: pointer; -webkit-tap-highlight-color: transparent;
  white-space: nowrap; transition: background var(--dur-1), color var(--dur-1), border-color var(--dur-1), transform var(--dur-1);
}
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"] {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: var(--accent-ink); border-color: transparent; font-weight: 700;
}
.filter-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; }
.result-count { font-size: 12.5px; color: var(--muted); }
.link-btn {
  background: none; border: none; color: var(--accent); font-size: 13px; cursor: pointer; padding: 6px 2px;
}

/* ---------- Content / views ---------- */
.content { position: relative; flex: 1 1 auto; min-height: 0; }
.view { position: absolute; inset: 0; }
.view[hidden] { display: none; }
/* gentle fade/slide when a view becomes visible (mobile switch + initial load) */
#view-map:not([hidden]), #view-list:not([hidden]) { animation: view-in var(--dur-2) var(--ease); }
.view-map #map, #map { position: absolute; inset: 0; background: #0e0b08; }

/* Leaflet dark tweaks */
.leaflet-container { font-family: inherit; background: #0e0b08; }
.leaflet-control-attribution {
  background: rgba(21,17,13,.78) !important; color: var(--muted-2) !important;
  font-size: 10px !important;
}
.leaflet-control-attribution a { color: var(--muted) !important; }
.leaflet-bar a {
  background: var(--surface); color: var(--text);
  border-bottom-color: var(--line);
}
.leaflet-bar a:hover { background: var(--surface-2); }
.leaflet-control-layers {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px;
}
.leaflet-control-layers-expanded { padding: 8px 10px; }

/* Custom venue marker */
/* marker icon box centers its dot so any size stays on the geo point */
.es-marker { display: flex; align-items: center; justify-content: center; overflow: visible; }
/* fine dot marker — size grows with zoom (see .z-* on the map container) */
.es-pin {
  position: relative;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.55);
  animation: pin-drop var(--dur-2) var(--ease);
  transition: width var(--dur-2) var(--ease), height var(--dur-2) var(--ease), transform var(--dur-1) var(--ease);
}
/* zoom-dependent sizing: closer = bigger & easier to hit */
.z-mid  .es-pin { width: 18px; height: 18px; }
.z-near .es-pin { width: 26px; height: 26px; border-width: 3px; }
@media (hover: hover) { .leaflet-marker-icon:hover .es-pin { transform: scale(1.25); } }
/* currently selected venue marker pulses */
.es-pin.selected { animation: pin-pulse 1.6s var(--ease-out) infinite; }

/* cluster bubble (themed) */
.es-cluster {
  display: grid; place-items: center; width: 100%; height: 100%;
  border-radius: 50%; color: var(--accent-ink); font-weight: 800; font-size: 13px;
  background: radial-gradient(circle at 35% 30%, var(--accent-2), var(--accent) 70%);
  border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.5), 0 0 14px rgba(255,122,26,.45);
}
.es-cluster-medium { font-size: 14px; }
.es-cluster-large  { font-size: 15px; }
.leaflet-cluster-anim .leaflet-marker-icon { transition: transform var(--dur-3) var(--ease), opacity var(--dur-3); }
/* venue with at least one planned program → gold dot + small corner star */
.es-pin.planned {
  background: var(--accent-2);
  box-shadow: 0 0 0 2px rgba(255,179,0,.5), 0 1px 4px rgba(0,0,0,.6);
}
.es-pin.planned::after {
  content: '★'; position: absolute; top: -10px; right: -8px;
  font-size: 12px; line-height: 1; color: var(--accent-2);
  text-shadow: 0 1px 2px rgba(0,0,0,.85);
}
/* numbered stop in "Mein Plan" route */
.plan-pin {
  width: 24px; height: 24px; display: grid; place-items: center;
  border-radius: 50%; background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: var(--accent-ink); font-weight: 800; font-size: 12.5px;
  border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.55);
}
.es-pin b { transform: rotate(-45deg); font-size: 11px; font-weight: 800; color: var(--accent-ink); }
.es-pin.dim { filter: grayscale(.7) brightness(.7); opacity: .55; }
/* When a shuttle line is selected, the (already isolated) stops glow in the line colour */
.line-mode .es-pin { background: var(--line-color); box-shadow: 0 3px 10px rgba(0,0,0,.5), 0 0 14px var(--line-color); }
.leaflet-popup-content-wrapper {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: 12px;
}
.leaflet-popup-tip { background: var(--surface); border: 1px solid var(--line); }
.leaflet-popup-content { margin: 10px 12px; font-size: 13px; }
.popup-title { font-weight: 700; margin-bottom: 2px; }
.popup-sub { color: var(--muted); font-size: 12px; }
.popup-link { color: var(--accent); font-size: 12px; display: inline-block; margin-top: 6px; cursor: pointer; }

/* ---------- Timetable list ---------- */
.view-list { display: flex; flex-direction: column; background: var(--bg); }
.list-toolbar {
  flex: none; padding: 10px 14px; border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.segmented {
  position: relative;
  display: inline-flex; background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px; max-width: 100%;
}
/* gliding active-indicator pill */
.seg-pill {
  position: absolute; top: 3px; bottom: 3px; left: 0; width: 0;
  border-radius: 999px; background: var(--accent); z-index: 0;
  transition: transform var(--dur-2) var(--ease), width var(--dur-2) var(--ease);
}
.seg {
  position: relative; z-index: 1;
  border: none; background: none; color: var(--muted); white-space: nowrap;
  font-size: 12.5px; font-weight: 600; padding: 7px 12px; min-height: 38px;
  border-radius: 999px; cursor: pointer;
  display: inline-flex; align-items: center;
  transition: color var(--dur-1);
}
.seg.active { color: var(--accent-ink); }
.list-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 10px 12px calc(var(--nav-h) + var(--safe-b) + 16px); }
.list-body.enter { animation: view-in var(--dur-2) var(--ease); }

.venue-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); margin-bottom: 10px; overflow: hidden;
  transition: border-color var(--dur-1), box-shadow var(--dur-1);
}
.venue-card.selected { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.venue-card > summary {
  list-style: none; cursor: pointer; padding: 13px 14px;
  display: flex; align-items: center; gap: 12px;
}
.venue-card > summary::-webkit-details-marker { display: none; }
.vc-main { min-width: 0; flex: 1; }
.vc-name { font-weight: 700; font-size: 15px; line-height: 1.2; }
.vc-meta { color: var(--muted); font-size: 12px; margin-top: 3px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.vc-count {
  flex: none; font-size: 11px; font-weight: 700; color: var(--accent-2);
  background: rgba(255,179,0,.12); border: 1px solid rgba(255,179,0,.25);
  padding: 3px 9px; border-radius: 999px;
}
.vc-chevron { flex: none; color: var(--muted-2); transition: transform .18s; }
.venue-card[open] .vc-chevron { transform: rotate(180deg); }
.vc-programs { border-top: 1px solid var(--line); padding: 4px 0; }
.venue-card[open] .vc-programs { animation: reveal var(--dur-3) var(--ease); }

.prog {
  display: grid; grid-template-columns: 76px 1fr 40px; gap: 10px; align-items: start;
  padding: 9px 14px; border-bottom: 1px solid rgba(61,48,34,.5);
}
.prog:last-child { border-bottom: none; }
.prog-time { font-size: 12px; font-weight: 700; color: var(--accent-2); line-height: 1.35; }
.prog-title { font-size: 13.5px; line-height: 1.35; }
.prog-loc { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.prog-desc { font-size: 12px; color: var(--muted-2); margin-top: 3px; line-height: 1.4; }

/* Chronological view */
.hour-group { margin-bottom: 14px; }
.hour-head {
  position: sticky; top: 0; z-index: 1;
  background: var(--bg); padding: 6px 4px; margin-bottom: 4px;
  font-size: 13px; font-weight: 800; color: var(--accent);
  border-bottom: 1px solid var(--line);
}
.tl {
  display: grid; grid-template-columns: 60px 1fr 40px; gap: 10px; align-items: start;
  padding: 9px 6px; border-bottom: 1px solid rgba(61,48,34,.45); cursor: pointer;
  transition: background var(--dur-1);
}
.tl.selected { background: rgba(255,122,26,.07); box-shadow: inset 3px 0 0 var(--accent); }
.tl-time { font-size: 12px; font-weight: 700; color: var(--accent-2); }
.tl-title { font-size: 13.5px; line-height: 1.3; }
.tl-venue { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* Star toggle (mark a program point) — ≥40px touch target */
.prog-star {
  align-self: center; justify-self: end; width: 40px; height: 40px; padding: 0;
  display: inline-grid; place-items: center; cursor: pointer;
  background: none; border: none; color: var(--muted-2); -webkit-tap-highlight-color: transparent;
  border-radius: 10px; transition: color var(--dur-1), background var(--dur-1);
}
.prog-star:active { transform: scale(.88); }
@media (hover: hover) { .prog-star:hover { background: rgba(255,255,255,.05); color: var(--muted); } }
.prog-star svg { transition: transform var(--dur-1); }
.prog-star svg path { fill: none; transition: fill var(--dur-1); }
.prog-star.on { color: var(--accent-2); }
.prog-star.on svg path { fill: currentColor; }
.prog-star.pop svg { animation: star-pop var(--dur-2) var(--ease); }

/* "Mein Plan" toolbar + conflicts */
.plan-toolbar {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between;
  gap: 8px; flex-wrap: wrap; padding: 10px 8px 12px; margin-bottom: 6px;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.plan-count { font-size: 13px; font-weight: 700; color: var(--text); }
.plan-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.btn.sm { padding: 8px 11px; font-size: 12.5px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.tl.plan-row.conflict { background: rgba(255,90,60,.07); border-left: 3px solid var(--danger); padding-left: 9px; }
.conflict-badge { font-size: 11px; font-weight: 700; color: var(--danger); margin-top: 3px; }
.flex-badge { font-size: 11px; color: var(--muted-2); margin-top: 3px; }

.empty { text-align: center; color: var(--muted); padding: 50px 24px; font-size: 14px; }

/* category tags */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 11px; padding: 3px 9px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
}
.tag.line { color: var(--accent-2); border-color: rgba(255,179,0,.3); background: rgba(255,179,0,.08); font-weight: 700; }
.tag.on { color: var(--accent-ink); background: linear-gradient(180deg, var(--accent-2), var(--accent)); border-color: transparent; font-weight: 700; }
.sh-hint { font-size: 12px; color: var(--muted-2); background: var(--surface); border: 1px dashed var(--line); border-radius: 8px; padding: 8px 10px; margin: 6px 0 2px; }

/* ---------- Bottom sheet ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 1800; backdrop-filter: blur(1px);
}
.sheet-backdrop[hidden] { display: none; }
.sheet-backdrop:not([hidden]) { animation: fade-in var(--dur-2) ease; }
.sheet-backdrop.closing { animation: fade-out var(--dur-2) ease forwards; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1900;
  background: var(--bg-2); border-top: 1px solid var(--line);
  border-radius: 18px 18px 0 0; box-shadow: var(--shadow);
  max-height: 88vh; max-height: 88dvh; display: flex; flex-direction: column;
  padding-bottom: var(--safe-b);
  animation: sheet-up .22s ease;
}
.sheet[hidden] { display: none; }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes sheet-down { from { transform: translateY(0); } to { transform: translateY(100%); } }
.sheet.closing { animation: sheet-down var(--dur-2) var(--ease) forwards; }
.sheet-grip {
  width: 40px; height: 4px; border-radius: 4px; background: var(--line);
  margin: 9px auto 4px;
}
.sheet-close { position: absolute; top: 10px; right: 12px; width: 38px; height: 38px; }
.sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 6px 18px 22px; }

.sh-name { font-size: 20px; font-weight: 800; line-height: 1.15; margin: 6px 44px 4px 0; }
.sh-meta { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.sh-section-title { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted-2); margin: 16px 0 8px; }
.sh-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 4px; }
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; padding: 9px 14px; border-radius: 10px;
  text-decoration: none; cursor: pointer; border: 1px solid var(--line);
  background: var(--surface); color: var(--text);
  transition: transform var(--dur-1) var(--ease), background var(--dur-1), border-color var(--dur-1);
}
.btn:active { transform: scale(.97); }
@media (hover: hover) {
  .btn:hover { transform: translateY(-1px); border-color: #5a4730; }
  .venue-card:hover { border-color: #5a4730; }
  .tl:hover { background: rgba(255,255,255,.03); }
}
.btn.primary { background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: var(--accent-ink); border-color: transparent; }
.sh-prog .prog { border-color: rgba(61,48,34,.55); padding-left: 0; padding-right: 0; }

/* ---------- Bottom nav ---------- */
.bottom-nav {
  flex: none; height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: flex; background: linear-gradient(0deg, #18120d, #1c150f);
  border-top: 1px solid var(--line); z-index: 1000;
}
.nav-btn {
  position: relative;
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; background: none; border: none; color: var(--muted-2);
  font-size: 11px; font-weight: 600; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.nav-btn.active { color: var(--accent); }
.nav-btn:active { transform: scale(.95); }
.nav-badge {
  position: absolute; top: 6px; left: 50%; margin-left: 6px;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 800;
  display: grid; place-items: center; line-height: 1;
}
.nav-badge.bump, .seg-badge.bump, .vc-count.bump { animation: bump var(--dur-2) var(--ease); }
.seg-badge {
  display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px;
  margin-left: 5px; border-radius: 8px; background: var(--accent); color: var(--accent-ink);
  font-size: 10px; font-weight: 800;
}
.seg.active .seg-badge { background: var(--accent-ink); color: var(--accent-2); }

/* Toast */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--nav-h) + var(--safe-b) + 16px); z-index: 3000;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 16px; font-size: 13px; box-shadow: var(--shadow);
  max-width: 88vw; text-align: center;
  opacity: 0; transition: opacity .25s ease; pointer-events: none;
}
.toast.show { opacity: 1; }

/* Info content */
.info-sheet .sheet-body p { color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.info-sheet .sheet-body a { color: var(--accent); }
.info-stats { display: flex; gap: 10px; margin: 14px 0; flex-wrap: wrap; }
.stat {
  flex: 1; min-width: 80px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px; text-align: center;
}
.stat b { display: block; font-size: 22px; color: var(--accent-2); }
.stat span { font-size: 11px; color: var(--muted); }

/* ---------- Desktop / tablet (md and up) ---------- */
@media (min-width: 768px) {
  body { overflow: hidden; }
  .app-header { padding-left: 22px; padding-right: 18px; }
  .brand-text h1 { font-size: 20px; }
  .filters {
    position: absolute; top: calc(var(--header-h) + var(--safe-t)); left: 0;
    width: min(380px, 46vw);
    max-height: none; height: auto; border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line); border-radius: 0 0 14px 0; z-index: 1100;
  }
  .content { display: flex; }
  /* Side list on the LEFT, map fills the rest */
  .view { position: relative; inset: auto; }
  .view-list {
    flex: 0 0 clamp(300px, 32%, 420px); border-right: 1px solid var(--line);
    height: 100%; order: 0;
  }
  .view-map { flex: 1 1 auto; height: 100%; order: 1; }
  .view-map, .view-list { display: flex !important; }
  body[data-view] .view[hidden] { display: flex !important; }
  .bottom-nav { display: none; }
  .list-body { padding-bottom: 20px; }
  .toast { bottom: 24px; }

  /* Venue sheet = full-height panel sliding in from the RIGHT */
  #sheet {
    left: auto; right: 0; bottom: 0;
    top: calc(var(--header-h) + var(--safe-t));
    width: clamp(340px, 33%, 470px); height: auto; max-height: none;
    border-radius: 0; border-top: none; border-left: 1px solid var(--line);
    box-shadow: -12px 0 36px rgba(0,0,0,.5);
    animation: sheet-slide-right .24s cubic-bezier(.22,.61,.36,1);
  }
  @keyframes sheet-slide-right { from { transform: translateX(100%); } to { transform: translateX(0); } }
  @keyframes sheet-slide-out-right { from { transform: translateX(0); } to { transform: translateX(100%); } }
  #sheet.closing { animation: sheet-slide-out-right var(--dur-2) var(--ease) forwards; }
  .sheet .sheet-grip { display: none; }   /* drag handle is a mobile affordance */

  /* Backdrop stays interactive-transparent so the map/list remain usable */
  #sheet-backdrop { background: transparent; backdrop-filter: none; pointer-events: none; }

  /* Info stays a centered modal */
  .info-sheet {
    left: 50%; right: auto; top: 50%; bottom: auto;
    transform: translate(-50%, -50%);
    width: min(560px, 92vw); height: auto; max-height: 80vh;
    border-radius: 16px; border: 1px solid var(--line);
    animation: info-pop .2s ease;
  }
  @keyframes info-pop {
    from { opacity: 0; transform: translate(-50%, calc(-50% + 12px)); }
    to   { opacity: 1; transform: translate(-50%, -50%); }
  }
  #info-backdrop { background: rgba(0,0,0,.5); pointer-events: auto; }
}

/* ---------- Loading overlay ---------- */
.loading {
  position: fixed; inset: 0; z-index: 5000;
  display: grid; place-items: center; background: var(--bg);
  transition: opacity var(--dur-3) ease;
}
.loading.done { opacity: 0; pointer-events: none; }
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}

/* Respect reduced-motion: near-instant, keep end states & functionality */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
