:root {
  --bg: #0a0e13;
  --panel: #10161e;
  --panel-2: #151d27;
  --panel-3: #1b2531;
  --line: #222e3b;
  --line-2: #2c3a4a;
  --text: #e6edf3;
  --muted: #8a99aa;
  --faint: #74828f;
  --accent: #2fd3a6;
  --accent-ink: #052a20;
  --accent-soft: rgba(47, 211, 166, 0.12);
  --blue: #5b9cff;
  --warn: #f2b443;
  --danger: #ef6b6b;
  --gold: #e9c46a;
  --radius: 10px;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --topbar-h: 64px;
  --sidebar-w: 380px;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--accent); }
svg { flex: none; }
[hidden] { display: none !important; }

/* ---------- Top bar ---------- */
.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 20px;
  background: linear-gradient(180deg, #0e141b, #0b1016);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 1000;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 32px; height: 32px; color: var(--accent); }
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: 0.01em; white-space: nowrap; }
.brand-name span { color: var(--accent); font-weight: 600; }
.brand-sub { font-size: 11px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }

.kpis { display: flex; gap: 4px; margin: 0 0 0 auto; }
.kpi {
  padding: 6px 14px;
  border-left: 1px solid var(--line);
  min-width: 92px;
}
.kpi:first-child { border-left: 0; }
.kpi dt { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.kpi dd { margin: 0; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }

.topbar-actions { display: flex; align-items: center; gap: 12px; }
.sync {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--muted); white-space: nowrap;
}
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 3px rgba(242,180,67,.15); }
.sync.ok .sync-dot { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sync.fail .sync-dot { background: var(--faint); box-shadow: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px;
  border-radius: 8px; border: 1px solid var(--line-2);
  background: var(--panel-2); font-weight: 500; font-size: 13px;
  text-decoration: none; color: var(--text); white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--panel-3); border-color: #3a4b5e; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn-primary:hover { background: #4be0b6; border-color: #4be0b6; }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; }
.lbl-short { display: none; }
.help-ico { display: none; }
.btn.is-on { border-color: var(--gold); color: var(--gold); }

/* ---------- Layout ---------- */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: calc(100% - var(--topbar-h));
}

/* ---------- Sidebar ---------- */
.sidebar {
  display: flex; flex-direction: column; min-height: 0;
  background: var(--panel);
  border-right: 1px solid var(--line);
}
.sidebar-head { padding: 14px 16px 10px; border-bottom: 1px solid var(--line); display: grid; gap: 12px; }

.tabs { display: flex; gap: 4px; background: var(--bg); padding: 4px; border-radius: 9px; border: 1px solid var(--line); }
.tab {
  flex: 1; height: 32px; border: 0; border-radius: 6px; background: transparent;
  color: var(--muted); font-weight: 500; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.tab.is-active { background: var(--panel-3); color: var(--text); }
.tab-count {
  min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px;
  background: var(--line-2); color: var(--text); font-size: 11px; line-height: 18px;
}
.tab-count.has { background: var(--gold); color: #2a2208; }

.search {
  display: flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 12px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  color: var(--muted);
}
.search:focus-within { border-color: var(--accent); }
.search svg { width: 16px; height: 16px; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: inherit; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 10px; border-radius: 99px;
  border: 1px solid var(--line); background: transparent;
  color: var(--muted); font-size: 12.5px; white-space: nowrap;
}
.chip span { font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.chip:hover { border-color: var(--line-2); color: var(--text); }
.chip.is-active { background: var(--accent-soft); border-color: rgba(47,211,166,.45); color: var(--accent); }
.chip.is-active span { color: var(--accent); }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.check input { accent-color: var(--accent); }

.list-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 16px 6px; font-size: 11.5px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.08em;
}
.list { list-style: none; margin: 0; padding: 0 10px 12px; overflow-y: auto; flex: 1; min-height: 0; }
.list::-webkit-scrollbar { width: 8px; }
.list::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 4px; }

.card {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start;
  padding: 12px; margin-bottom: 6px;
  border: 1px solid transparent; border-radius: var(--radius);
  cursor: pointer; transition: background .12s, border-color .12s;
}
.card:hover { background: var(--panel-2); }
.card.is-selected { background: var(--panel-2); border-color: var(--line-2); box-shadow: inset 3px 0 0 var(--accent); }
.card-icon {
  width: 34px; height: 34px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.card-icon svg { width: 16px; height: 16px; }
.card-icon.soon { background: rgba(242,180,67,.12); color: var(--warn); }
.card-icon.off { background: rgba(239,107,107,.12); color: var(--danger); }
.card-title { font-weight: 600; font-size: 13.5px; line-height: 1.3; }
.card-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.tag {
  font-size: 11px; padding: 1px 7px; border-radius: 4px;
  background: var(--panel-3); color: var(--muted); border: 1px solid var(--line);
  white-space: nowrap;
}
.tag.power { color: var(--accent); border-color: rgba(47,211,166,.3); background: transparent; font-family: var(--mono); }
.tag.soon { color: var(--warn); border-color: rgba(242,180,67,.35); background: transparent; }
.tag.off { color: var(--danger); border-color: rgba(239,107,107,.35); background: transparent; }
.tag.approx { border-style: dashed; }
.tag.live { color: var(--blue); border-color: rgba(91,156,255,.35); background: transparent; }

.pin-btn {
  width: 32px; height: 32px; border-radius: 8px;
  display: grid; place-items: center;
  background: transparent; border: 1px solid var(--line); color: var(--faint);
}
.pin-btn:hover { color: var(--text); border-color: var(--line-2); }
.pin-btn svg { width: 15px; height: 15px; }
.pin-btn.is-on { color: var(--gold); border-color: rgba(233,196,106,.45); background: rgba(233,196,106,.08); }

.empty { padding: 36px 20px; text-align: center; color: var(--muted); }
.empty b { color: var(--text); display: block; margin-bottom: 6px; font-size: 14px; }

.sidebar-foot { padding: 12px 16px 14px; border-top: 1px solid var(--line); background: var(--panel); }
.foot-hint { margin: 8px 0 0; font-size: 11.5px; color: var(--faint); text-align: center; }

/* ---------- Map ---------- */
.map-wrap { position: relative; min-width: 0; min-height: 0; }
#map { position: absolute; inset: 0; background: #0d1218; }

.leaflet-container { font-family: var(--font); background: #0d1218; }
.tiles-dark { filter: invert(1) hue-rotate(185deg) brightness(0.68) contrast(0.95) saturate(0.25); }
.leaflet-control-zoom a {
  background: var(--panel) !important; color: var(--text) !important;
  border-color: var(--line) !important;
}
.leaflet-control-zoom a:hover { background: var(--panel-3) !important; }
.leaflet-bar { border: 1px solid var(--line) !important; box-shadow: var(--shadow) !important; }
.leaflet-control-attribution {
  background: rgba(10,14,19,.8) !important; color: var(--faint) !important; font-size: 10.5px;
}
.leaflet-control-attribution a { color: var(--muted) !important; }

.map-tools {
  position: absolute; top: 14px; left: 60px; z-index: 500;
  display: flex; gap: 6px; flex-wrap: wrap;
}
.tool {
  height: 34px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px;
  background: rgba(16,22,30,.92); backdrop-filter: blur(6px);
  border: 1px solid var(--line); border-radius: 8px;
  font-size: 12.5px; font-weight: 500; color: var(--text);
  box-shadow: var(--shadow);
}
.tool:hover { border-color: var(--line-2); background: var(--panel-3); }
.tool svg { width: 14px; height: 14px; color: var(--accent); }

.legend {
  position: absolute; left: 14px; bottom: 24px; z-index: 500;
  display: flex; gap: 14px; flex-wrap: wrap;
  padding: 8px 12px; border-radius: 8px;
  background: rgba(16,22,30,.92); border: 1px solid var(--line);
  font-size: 11.5px; color: var(--muted);
}
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.lg-ok { background: var(--accent); }
.lg-soon { background: var(--warn); }
.lg-off { background: var(--danger); }
.lg-approx { border: 1.5px dashed var(--muted); }

/* Markers — solid, glowing pins so every station stands out on the dimmed basemap */
.ev-marker { background: none; border: 0; display: grid; place-items: center; }
.pins-sm .ev-pin { width: 22px; height: 22px; border-width: 2px; }
.pins-sm .ev-pin svg { width: 11px; height: 11px; }
.pins-sm .ev-pin.pinned::after { width: 9px; height: 9px; top: -3px; right: -3px; }
.pins-md .ev-pin { width: 28px; height: 28px; }
.pins-md .ev-pin svg { width: 14px; height: 14px; }
.ev-pin {
  --c: var(--accent);
  --ink: var(--accent-ink);
  position: relative;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--c); color: var(--ink);
  border: 2.5px solid #0b1016;
  box-shadow: 0 0 0 2px var(--c), 0 0 18px 4px color-mix(in srgb, var(--c) 55%, transparent), 0 6px 14px rgba(0,0,0,.55);
  transition: transform .15s ease, box-shadow .15s ease;
}
.ev-pin svg { width: 17px; height: 17px; position: relative; z-index: 1; }
.ev-pin.soon { --c: var(--warn); --ink: #2a1d02; }
.ev-pin.off { --c: var(--danger); --ink: #2a0707; }
.ev-pin.approx { border-style: dashed; border-color: #0b1016; }

.ev-pulse {
  position: absolute; inset: -2px; border-radius: 50%;
  border: 2px solid var(--c); opacity: 0;
  animation: ev-pulse 2.4s ease-out infinite;
  pointer-events: none;
}
@keyframes ev-pulse {
  0% { transform: scale(1); opacity: .7; }
  100% { transform: scale(2.3); opacity: 0; }
}
.ev-pin.soon .ev-pulse, .ev-pin.off .ev-pulse { animation-duration: 3.2s; }

.ev-pin.pinned::after {
  content: ""; position: absolute; top: -4px; right: -4px; z-index: 2;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--gold); border: 2px solid #0b1016;
}
.ev-pin.hovered { transform: scale(1.18); }
.ev-pin.selected {
  transform: scale(1.32);
  border-color: #fff;
  box-shadow: 0 0 0 3px var(--c), 0 0 28px 8px color-mix(in srgb, var(--c) 65%, transparent), 0 8px 18px rgba(0,0,0,.6);
}
@media (prefers-reduced-motion: reduce) {
  .ev-pulse { animation: none; }
  .ev-pin { transition: none; }
}

/* Station name labels — shown from street level (zoom 14+) */
.leaflet-tooltip.ev-label {
  display: none;
  background: rgba(11,16,22,.92); color: var(--text);
  border: 1px solid var(--line-2); border-left: 3px solid var(--accent);
  border-radius: 6px; padding: 3px 8px;
  font: 600 11.5px/1.3 var(--font); white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,.45);
}
.leaflet-tooltip.ev-label::before { display: none; }
.leaflet-tooltip.ev-label.soon { border-left-color: var(--warn); }
.leaflet-tooltip.ev-label.off { border-left-color: var(--danger); }
.show-labels .leaflet-tooltip.ev-label { display: block; }

.me-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--blue); border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(91,156,255,.25); }

/* ---------- Detail panel ---------- */
.detail {
  position: absolute; top: 14px; right: 14px; z-index: 600;
  width: 360px; max-height: calc(100% - 28px); overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow);
  animation: slide-in .18s ease-out;
}
@keyframes slide-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
.detail-head { padding: 18px 18px 14px; border-bottom: 1px solid var(--line); position: relative; }
.detail-x {
  position: absolute; top: 12px; right: 12px; width: 30px; height: 30px;
  border-radius: 8px; border: 1px solid var(--line); background: transparent;
  color: var(--muted); font-size: 18px; line-height: 1;
}
.detail-x:hover { color: var(--text); border-color: var(--line-2); }
.eyebrow { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.detail h2 { margin: 6px 40px 8px 0; font-size: 18px; line-height: 1.25; }
.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 99px;
  background: var(--accent-soft); color: var(--accent);
}
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pill.soon { background: rgba(242,180,67,.12); color: var(--warn); }
.status-pill.off { background: rgba(239,107,107,.12); color: var(--danger); }

.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); }
.spec { background: var(--panel); padding: 12px 18px; }
.spec dt { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.spec dd { margin: 3px 0 0; font-weight: 500; font-size: 13.5px; }
.spec.wide { grid-column: 1 / -1; }
.mono { font-family: var(--mono); font-size: 12.5px; }

.detail-body { padding: 14px 18px; display: grid; gap: 10px; }
.note { margin: 0; color: var(--muted); font-size: 13px; }
.approx-warn {
  margin: 0; font-size: 12.5px; color: var(--warn);
  padding: 8px 10px; border-radius: 8px; border: 1px dashed rgba(242,180,67,.4);
  background: rgba(242,180,67,.06);
}
.source { font-size: 12px; color: var(--faint); }
.source a { color: var(--muted); }

.detail-actions { padding: 0 18px 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.detail-actions .btn-primary { grid-column: 1 / -1; height: 42px; font-size: 14px; }
.detail-actions .btn-wide { grid-column: 1 / -1; }

/* ---------- Modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(4,7,10,.72); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 16px;
}
.modal-card {
  width: min(720px, 100%); max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 26px 28px; position: relative; box-shadow: var(--shadow);
}
.modal-card h2 { margin: 0 0 18px; font-size: 20px; }
.modal-x {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px;
  border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 20px;
}
.steps { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.steps section { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.steps h3 { margin: 0 0 10px; font-size: 14px; display: flex; align-items: center; gap: 10px; }
.step-n {
  width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700;
}
.steps ol { margin: 0; padding-left: 18px; color: var(--muted); display: grid; gap: 6px; font-size: 13px; }
.steps b { color: var(--text); font-weight: 600; }
.modal-note { margin: 16px 0 0; font-size: 12.5px; color: var(--faint); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 3000;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--panel-3); border: 1px solid var(--line-2); color: var(--text);
  padding: 10px 16px; border-radius: 10px; font-size: 13px; box-shadow: var(--shadow);
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .kpi:nth-child(4) { display: none; }
}
@media (max-width: 980px) {
  .kpis { display: none; }
  .topbar-actions { margin-left: auto; }
  :root { --sidebar-w: 330px; }
}
@media (max-width: 760px) {
  :root { --topbar-h: 56px; }
  body { overflow: auto; }
  .topbar { padding: 0 16px; gap: 12px; }
  .brand-sub, .sync #sync-text { display: none; }
  .brand-name { font-size: 15px; }
  #btn-help { padding: 0 10px; font-size: 12px; height: 32px; }
  .topbar-actions { gap: 8px; }
  .topbar-actions .btn { padding: 0 10px; font-size: 12px; height: 32px; }
  .lbl-long { display: none; }
  .lbl-short { display: inline; }
  .layout { display: flex; flex-direction: column-reverse; height: auto; }
  .map-wrap { height: 58vh; flex: none; }
  .sidebar { border-right: 0; border-top: 1px solid var(--line); }
  .list { overflow: visible; }
  .map-tools { left: 56px; right: 10px; top: 10px; }
  .tool { height: 32px; padding: 0 10px; font-size: 12px; }
  .legend { display: none; }
  .detail {
    position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: auto;
    max-height: 62vh; border-radius: 16px 16px 0 0; z-index: 1500;
    animation: sheet-in .2s ease-out;
  }
  @keyframes sheet-in { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
  .steps { grid-template-columns: 1fr; }
  .modal-card { padding: 22px 18px; }
}

@media (max-width: 480px) {
  .topbar { gap: 8px; }
  .brand { gap: 8px; }
  .brand-mark { width: 26px; height: 26px; }
  .brand-name { font-size: 14px; }
  .sync { display: none; }
  #btn-help { width: 32px; padding: 0; }
  #btn-help .lbl-short { display: none; }
  #btn-help .help-ico { display: block; }
}

/* =====================================================================
   Polish pass: language switch, focus, sort, welcome, photos, hours
   ===================================================================== */

/* Keyboard focus: visible everywhere, never on mouse click */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.card:focus-visible { outline-offset: -2px; }
.btn, .tool, .chip, .tab, .pin-btn { transition: background .15s, border-color .15s, color .15s, transform .08s; }
.btn:active, .tool:active, .chip:active, .pin-btn:active { transform: scale(.97); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; }
.btn-sm svg { width: 14px; height: 14px; color: var(--accent); }

/* Language switch */
.lang {
  display: inline-flex; padding: 3px; gap: 2px; border-radius: 8px;
  background: var(--bg); border: 1px solid var(--line);
}
.lang button {
  height: 28px; min-width: 36px; padding: 0 8px; border: 0; border-radius: 6px;
  background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .03em;
}
.lang button:hover { color: var(--text); }
.lang button.is-active { background: var(--panel-3); color: var(--accent); }

/* Sort */
.sort { display: inline-flex; align-items: center; gap: 6px; text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--muted); }
.sort select {
  height: 28px; padding: 0 26px 0 8px; border-radius: 6px;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m7 10 5 5 5-5' fill='none' stroke='%238a99aa' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 6px center / 14px;
  border: 1px solid var(--line); color: var(--text); font: inherit; font-size: 12px; appearance: none; cursor: pointer;
}
.sort select:hover { border-color: var(--line-2); }

/* Cards: photo thumb + hours line */
.card-body { min-width: 0; }
.card-title { overflow-wrap: anywhere; }
.card-thumb { width: 46px; height: 46px; border-radius: 9px; overflow: hidden; background: var(--panel-3); border: 1px solid var(--line); }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-hours { display: flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 12px; font-weight: 500; }
.card-hours svg { width: 12px; height: 12px; }
.card-hours.open { color: var(--accent); }
.card-hours.closed { color: var(--warn); }
.empty .btn { margin-top: 14px; }

/* Welcome card */
.welcome {
  position: absolute; left: 14px; top: 62px; z-index: 550;
  width: 360px; max-width: calc(100% - 28px);
  padding: 20px 20px 18px; border-radius: 14px;
  background: linear-gradient(160deg, rgba(23,33,44,.97), rgba(13,19,26,.97));
  border: 1px solid var(--line-2); box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  animation: slide-in .25s ease-out;
}
.welcome h2 { margin: 6px 30px 8px 0; font-size: 21px; line-height: 1.2; letter-spacing: -0.01em; }
.welcome p { margin: 0 0 14px; color: var(--muted); font-size: 13.5px; }
.welcome-x {
  position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 18px; line-height: 1;
}
.welcome-x:hover { color: var(--text); border-color: var(--line-2); }
.welcome-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 16px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.welcome-stats div { padding: 10px 12px; border-left: 1px solid var(--line); background: rgba(10,14,19,.4); }
.welcome-stats div:first-child { border-left: 0; }
.welcome-stats dd { margin: 0; font-size: 19px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.welcome-stats dt { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.welcome-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.welcome-actions .btn-primary { flex: 1 1 auto; }
.welcome-own { display: inline-block; margin-top: 12px; font-size: 12.5px; color: var(--muted); text-decoration: none; }
.welcome-own:hover { color: var(--accent); }

/* Detail: photo gallery */
.gallery { position: relative; aspect-ratio: 16 / 10; background: var(--panel-3); border-radius: 14px 14px 0 0; overflow: hidden; }
.gallery-img { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.gallery-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 50%; border: 0;
  background: rgba(10,14,19,.75); color: #fff; font-size: 22px; line-height: 1;
}
.gallery-nav:hover { background: rgba(10,14,19,.95); }
.gallery-nav.prev { left: 10px; }
.gallery-nav.next { right: 10px; }
.gallery-count {
  position: absolute; right: 10px; bottom: 10px; padding: 2px 8px; border-radius: 99px;
  background: rgba(10,14,19,.75); color: #fff; font-size: 11.5px; font-family: var(--mono);
}
.gallery + .detail-head .detail-x { background: var(--panel); }
.img-loading { background: linear-gradient(100deg, var(--panel-2) 30%, var(--panel-3) 50%, var(--panel-2) 70%); background-size: 300% 100%; animation: shimmer 1.4s linear infinite; }
.img-loading img { opacity: 0; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* Detail: no-photo call to action */
.photo-empty {
  display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center;
  padding: 12px 14px; border-radius: 10px; text-decoration: none;
  border: 1px dashed var(--line-2); background: var(--bg); color: var(--muted); font-size: 12.5px;
  transition: border-color .15s, background .15s;
}
.photo-empty:hover { border-color: rgba(47,211,166,.55); background: rgba(47,211,166,.04); }
.photo-empty svg { width: 26px; height: 26px; color: var(--faint); grid-row: span 2; }
.photo-empty b { display: block; color: var(--text); font-size: 13px; margin-bottom: 1px; }
.photo-empty-cta { grid-column: 2; color: var(--accent); font-weight: 600; }

/* Detail: hours */
.hours-badge { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.hours-badge svg { width: 14px; height: 14px; }
.hours-badge.open { color: var(--accent); }
.hours-badge.closed { color: var(--warn); }
.hours-badge.unknown { color: var(--muted); font-weight: 500; }
.hours-week { margin-top: 8px; font-size: 12.5px; }
.hours-week summary { cursor: pointer; color: var(--muted); }
.hours-week summary:hover { color: var(--text); }
.hours-week table { margin-top: 6px; border-collapse: collapse; width: 100%; }
.hours-week th, .hours-week td { padding: 4px 0; text-align: left; font-weight: 400; color: var(--muted); }
.hours-week td { text-align: right; font-family: var(--mono); font-size: 12px; }
.hours-week tr.is-today th, .hours-week tr.is-today td { color: var(--text); font-weight: 600; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 2500;
  display: grid; grid-template-columns: 64px 1fr 64px; align-items: center;
  background: rgba(4,7,10,.94);
}
.lb-figure { margin: 0; display: grid; justify-items: center; gap: 12px; min-width: 0; }
.lb-figure img { max-width: 100%; max-height: calc(100vh - 120px); border-radius: 8px; box-shadow: var(--shadow); }
.lb-figure figcaption { color: var(--muted); font-size: 13px; text-align: center; }
.lb-nav, .lb-x {
  border: 1px solid var(--line-2); background: rgba(16,22,30,.85); color: var(--text);
  width: 44px; height: 44px; border-radius: 50%; font-size: 26px; line-height: 1; justify-self: center;
}
.lb-nav:hover, .lb-x:hover { background: var(--panel-3); }
.lb-x { position: absolute; top: 16px; right: 16px; font-size: 22px; }

@media (prefers-reduced-motion: reduce) {
  .welcome, .detail, .toast { animation: none; transition: none; }
  .img-loading { animation: none; }
  .btn:active, .tool:active, .chip:active, .pin-btn:active { transform: none; }
}

@media (max-width: 760px) {
  .welcome {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; max-width: none;
    border-radius: 16px 16px 0 0; z-index: 1400; padding: 20px 16px 22px;
  }
  .lang button { min-width: 32px; padding: 0 6px; }
  .lightbox { grid-template-columns: 44px 1fr 44px; }
  .lb-nav { width: 36px; height: 36px; font-size: 22px; }
}
@media (max-width: 480px) {
  .brand-name span { display: none; }
}

/* Header density: keep KPI labels on one line and shed secondary items progressively */
.kpi { min-width: 0; }
.kpi dt { white-space: nowrap; }
.kpis { flex: 0 1 auto; min-width: 0; }
@media (max-width: 1440px) and (min-width: 481px) {
  #btn-help .lbl-long { display: none; }
  #btn-help .lbl-short { display: inline; }
}
@media (max-width: 1280px) {
  .sync #sync-text { display: none; }
  .kpi { padding: 6px 10px; }
}
