/* ────────────────────────────────────────────
   名古屋パーキング — Premium Night UI
   ──────────────────────────────────────────── */

:root {
  --bg:         #08090f;
  --bg-card:    #0d1020;
  --glass:      rgba(255,255,255,.04);
  --glass-2:    rgba(255,255,255,.07);
  --glass-hover:rgba(255,255,255,.065);
  --border:     rgba(255,255,255,.08);
  --border-hi:  rgba(255,255,255,.15);

  --cyan:       #22d3ee;
  --cyan-dim:   rgba(34,211,238,.12);
  --cyan-glow:  rgba(34,211,238,.28);
  --blue:       #3b82f6;
  --blue-dim:   rgba(59,130,246,.12);

  --tx-1:  #f1f5f9;
  --tx-2:  #94a3b8;
  --tx-3:  #475569;

  --c-amber:    #fbbf24;
  --c-amber-d:  #d97706;
  --c-red:      #f87171;
  --c-red-dim:  rgba(248,113,113,.12);
  --c-green:    #34d399;
  --c-green-dim:rgba(52,211,153,.10);

  --shadow:     0 2px 12px rgba(0,0,0,.7), 0 0 0 1px var(--border);
  --shadow-lg:  0 8px 40px rgba(0,0,0,.8), 0 0 0 1px var(--border);

  --r-lg:  20px;
  --r-md:  14px;
  --r-sm:  10px;

  /* Legacy vars — referenced by existing CSS selectors below */
  --ink:    #f1f5f9;
  --ink-2:  #cbd5e1;
  --ink-3:  #94a3b8;
  --ink-4:  #475569;
  --surface: #08090f;
  --white:   #0d1020;
  --blue-9:  #0f172a;
  --blue-8:  #1e3a8a;
  --blue-5:  #3b82f6;
  --blue-4:  #60a5fa;
  --blue-3:  #93c5fd;
  --blue-1:  rgba(34,211,238,.12);
  --green:   #34d399;
  --amber:   #fbbf24;
  --red:     #f87171;
  --radius:  20px;

  /* Legacy semantic vars — used by app.js-generated HTML */
  --color-primary:      #22d3ee;
  --color-primary-dark: #0891b2;
  --color-text:         #f1f5f9;
  --color-text-sub:     #94a3b8;
  --color-bg:           #08090f;
  --color-card:         #0d1020;
  --color-border:       rgba(255,255,255,.08);
  --color-accent:       #f87171;
  --color-cost-bg:      rgba(251,191,36,.08);
  --color-cost-text:    #f59e0b;
  --color-area-bg:      rgba(34,211,238,.12);
  --color-area-text:    #22d3ee;
}

/* ── Reset ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
input, select, button { font-family: inherit; }
button { cursor: pointer; border: none; background: none; }

/* ── Base ────────────────────────────────────── */
body {
  font-family: 'Inter', -apple-system, 'Hiragino Sans', sans-serif;
  background: var(--bg);
  color: var(--tx-1);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* ── Header ──────────────────────────────────── */
.header {
  background:
    radial-gradient(ellipse 80% 100% at 50% -30%, rgba(34,211,238,.07) 0%, transparent 65%),
    radial-gradient(ellipse 60% 80% at 0% 120%,   rgba(59,130,246,.10) 0%, transparent 55%),
    linear-gradient(180deg, #05060d 0%, #090b16 60%, #0c0f1c 100%);
  color: #fff;
  padding: 52px 20px 26px;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 10;
  overflow: hidden;
}

.header::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--cyan) 50%, transparent 100%);
  opacity: .25;
}

.header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.header__brand {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--cyan);
  opacity: .6;
  margin-bottom: 0;
}
.header__brand-link { color: inherit; text-decoration: none; }

.header__title {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: 1;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #ffffff 25%, #a5f3fc 75%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header__subtitle {
  font-size: 11px;
  font-weight: 500;
  color: var(--tx-2);
  opacity: .75;
}

/* ── Menu Button ────────────────────────────── */
.menu-btn {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 10px;
  flex-shrink: 0;
  transition: border-color .2s, background .2s;
}
.menu-btn span {
  display: block;
  width: 20px; height: 2px;
  background: rgba(255,255,255,.6);
  border-radius: 2px;
}
.menu-btn:active {
  background: var(--glass-2);
  border-color: var(--border-hi);
}

/* ── Main ────────────────────────────────────── */
.main {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px 14px;
}

/* ── Search Bar ──────────────────────────────── */
.search-container {
  position: relative;
  margin-bottom: 10px;
}

.search-bar-wrap {
  display: flex;
  align-items: center;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0 16px;
  gap: 10px;
  transition: border-color .2s, box-shadow .2s;
}
.search-bar-wrap:focus-within {
  border-color: rgba(34,211,238,.45);
  box-shadow: 0 0 0 3px rgba(34,211,238,.08);
}

.search-bar-icon { color: var(--tx-3); flex-shrink: 0; }

.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--tx-1);
  font-size: 14px;
  font-weight: 500;
  padding: 13px 0;
  min-width: 0;
  -webkit-appearance: none;
}
.search-input::placeholder { color: var(--tx-3); }
.search-input::-webkit-search-cancel-button { -webkit-appearance: none; }

.search-clear-btn {
  display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  background: var(--glass-2);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--tx-3);
  flex-shrink: 0;
  transition: all .15s;
}
.search-clear-btn:active { transform: scale(.9); }

/* Facility Badge */
.search-facility-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--cyan);
  background: var(--cyan-dim);
  border: 1px solid rgba(34,211,238,.22);
  border-radius: 100px;
  padding: 5px 14px;
  margin-bottom: 10px;
  width: fit-content;
  max-width: 100%;
}
.sfb-sub { color: var(--tx-3); font-weight: 500; }

/* Search Dropdown */
.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: #0d1020;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r-md);
  box-shadow: 0 8px 40px rgba(0,0,0,.85);
  z-index: 50;
  overflow: hidden;
  max-height: 360px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.search-section-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--tx-3);
  padding: 10px 14px 4px;
}

.search-suggestion {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,.04);
  cursor: pointer;
  transition: background .15s;
}
.search-suggestion:last-child { border-bottom: none; }
.search-suggestion:active,
.search-suggestion:hover { background: rgba(34,211,238,.08); }

.suggestion-icon { font-size: 15px; flex-shrink: 0; }
.suggestion-text {
  flex: 1;
  font-size: 13px;
  font-weight: 700;
  color: var(--tx-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.suggestion-sub {
  font-size: 11px;
  color: var(--tx-3);
  font-weight: 500;
  flex-shrink: 0;
}

.search-no-result {
  padding: 18px 14px;
  font-size: 13px;
  color: var(--tx-3);
  font-weight: 500;
  text-align: center;
}

/* ── Filter Bar ──────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.filter-bar-left {
  display: flex;
  gap: 8px;
  align-items: center;
}

.filter-toggle-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--tx-2);
  cursor: pointer;
  transition: all .2s;
}
.filter-toggle-btn:active { background: var(--glass-hover); }
.filter-toggle-btn.is-open {
  color: var(--cyan);
  border-color: rgba(34,211,238,.3);
  box-shadow: 0 0 14px rgba(34,211,238,.12);
}

.filter-badge {
  background: var(--cyan);
  color: #06090f;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 100px;
  min-width: 20px;
  text-align: center;
}

.filter-arrow {
  color: var(--tx-3);
  transition: transform .3s ease;
  flex-shrink: 0;
}
.filter-toggle-btn.is-open .filter-arrow { transform: rotate(180deg); }

.filter-result-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--tx-3);
}

.my-parking-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--tx-2);
  cursor: pointer;
  transition: all .2s;
}
.my-parking-btn:active { background: var(--glass-hover); }
.my-parking-btn.is-active {
  background: var(--c-red-dim);
  border-color: rgba(248,113,113,.3);
  color: var(--c-red);
  box-shadow: 0 0 14px rgba(248,113,113,.12);
}
.my-parking-btn.is-active svg { fill: var(--c-red); stroke: var(--c-red); }

/* ── Controls ────────────────────────────────── */
.controls {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 0 16px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin-bottom: 0;
  transition: max-height .35s ease, opacity .25s ease, padding .35s ease, margin-bottom .35s ease;
}
.controls.is-open {
  max-height: 700px;
  opacity: 1;
  padding: 16px;
  margin-bottom: 14px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.control-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--tx-3);
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.control-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0;
  text-transform: none;
}

.control-hint {
  font-size: 10px;
  color: var(--tx-3);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

/* ── Chips ───────────────────────────────────── */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.area-zone-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 6px;
}
.zone-lbl {
  font-size: 10px;
  font-weight: 700;
  color: var(--tx-3);
  letter-spacing: .08em;
  text-transform: uppercase;
  padding-left: 2px;
}

.chip {
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255,255,255,.04);
  color: var(--tx-3);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 100px;
  cursor: pointer;
  white-space: nowrap;
  transition: all .18s;
}
.chip:active { transform: scale(.96); }
.chip.is-active {
  background: var(--cyan-dim);
  color: var(--cyan);
  border-color: rgba(34,211,238,.3);
  box-shadow: 0 0 10px rgba(34,211,238,.14);
}

/* ── View Tabs ───────────────────────────────── */
.view-tabs {
  display: flex;
  gap: 4px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 4px;
  margin-bottom: 14px;
}

.view-tab {
  flex: 1;
  padding: 11px;
  font-size: 13px;
  font-weight: 700;
  background: transparent;
  color: var(--tx-3);
  border: none;
  border-radius: calc(var(--r-lg) - 4px);
  cursor: pointer;
  transition: all .2s;
}
.view-tab:active { transform: scale(.97); }
.view-tab.is-active {
  background: linear-gradient(135deg, rgba(34,211,238,.18), rgba(59,130,246,.18));
  color: var(--cyan);
  border: 1px solid rgba(34,211,238,.25);
  box-shadow: 0 0 18px rgba(34,211,238,.14);
}

/* ── Parking List ────────────────────────────── */
.parking-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Card ────────────────────────────────────── */
.card {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
  overflow: hidden;
  transition: border-color .2s;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 15%; right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent);
  pointer-events: none;
}
.card:active { border-color: var(--border-hi); }

.card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.card__name {
  font-size: 15px;
  font-weight: 800;
  flex: 1;
  line-height: 1.35;
  letter-spacing: -.02em;
  color: var(--tx-1);
}

.card__header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.card__area {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 800;
  background: var(--cyan-dim);
  color: var(--cyan);
  padding: 3px 10px;
  border-radius: 100px;
  white-space: nowrap;
  letter-spacing: .02em;
  border: 1px solid rgba(34,211,238,.2);
}

.card__fav {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--tx-3);
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  transition: color .15s, transform .1s;
}
.card__fav:active { transform: scale(1.3); }
.card__fav.is-fav { color: var(--c-red); }

.card__address {
  font-size: 11px;
  font-weight: 500;
  color: var(--tx-3);
  margin-bottom: 6px;
}

.card__hours {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: var(--cyan);
  background: var(--cyan-dim);
  padding: 2px 9px;
  border-radius: 100px;
  margin-bottom: 12px;
  border: 1px solid rgba(34,211,238,.15);
}

.card__dist {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: var(--c-green);
  background: var(--c-green-dim);
  padding: 2px 9px;
  border-radius: 100px;
  margin-bottom: 8px;
  border: 1px solid rgba(52,211,153,.2);
}

/* ── Cost Banner ─────────────────────────────── */
.card__cost {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, rgba(251,191,36,.08), rgba(245,158,11,.05));
  border: 1px solid rgba(251,191,36,.2);
  padding: 12px 16px;
  border-radius: var(--r-md);
  margin-bottom: 12px;
}

.card__cost-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card__cost-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--c-amber-d);
}

.card__cost-badge {
  font-size: 9px;
  font-weight: 800;
  background: rgba(251,191,36,.15);
  color: var(--c-amber);
  padding: 2px 7px;
  border-radius: 100px;
  letter-spacing: .04em;
  border: 1px solid rgba(251,191,36,.3);
}

.card__cost-value {
  font-size: 26px;
  font-weight: 900;
  color: var(--c-amber);
  letter-spacing: -.04em;
}

/* ── Rate Rows ───────────────────────────────── */
.card__rates {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,.03);
  border-radius: var(--r-sm);
  border: 1px solid rgba(255,255,255,.05);
}

.rate-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 12px;
}

.rate-row__label {
  color: var(--tx-3);
  font-weight: 600;
  white-space: nowrap;
}

.rate-row__value {
  font-weight: 700;
  color: var(--tx-2);
  text-align: right;
  word-break: break-word;
}

.rate-row__value .max {
  color: var(--c-red);
  font-weight: 700;
}

.card__note {
  font-size: 11px;
  color: var(--tx-3);
  margin-bottom: 12px;
  line-height: 1.6;
  font-weight: 500;
}

/* ── Map Link ────────────────────────────────── */
.card__map-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, rgba(34,211,238,.14), rgba(59,130,246,.14));
  color: var(--cyan);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--r-md);
  letter-spacing: .04em;
  border: 1px solid rgba(34,211,238,.25);
  box-shadow: 0 0 16px rgba(34,211,238,.07);
  transition: all .2s;
}
.card__map-link:active {
  transform: scale(.98);
  background: linear-gradient(135deg, rgba(34,211,238,.2), rgba(59,130,246,.2));
}
.card__map-link::before { content: "📍"; margin-right: 6px; }

/* ── Empty ───────────────────────────────────── */
.empty-msg {
  text-align: center;
  padding: 40px 20px;
  color: var(--tx-3);
  font-size: 14px;
  font-weight: 500;
}

/* ── Footer ──────────────────────────────────── */
.footer {
  text-align: center;
  font-size: 11px;
  color: var(--tx-3);
  font-weight: 500;
  padding: 24px 16px 40px;
  line-height: 1.8;
  border-top: 1px solid rgba(255,255,255,.04);
  margin-top: 8px;
}

/* ── Map View ────────────────────────────────── */
#map-view {
  height: 62vh;
  min-height: 360px;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

/* ── Leaflet Popup ───────────────────────────── */
.leaflet-popup-content-wrapper {
  border-radius: 16px !important;
  box-shadow: 0 8px 40px rgba(0,0,0,.8) !important;
  padding: 0 !important;
  background: #0d1020 !important;
  border: 1px solid rgba(255,255,255,.1) !important;
}
.leaflet-popup-content { margin: 0 !important; width: auto !important; }
.leaflet-popup-tip-container { margin-top: -1px; }
.leaflet-popup-tip { background: #0d1020 !important; }

.popup-card {
  font-family: 'Inter', -apple-system, 'Hiragino Sans', sans-serif;
  line-height: 1.5;
  min-width: 220px;
  max-width: 260px;
  padding: 16px 16px 12px;
  background: #0d1020;
  border-radius: 16px;
}
.popup-name {
  font-size: 14px;
  font-weight: 800;
  color: #f1f5f9;
  margin-bottom: 5px;
  line-height: 1.3;
  letter-spacing: -.02em;
}
.popup-area {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 100px;
  margin-bottom: 6px;
  background: rgba(34,211,238,.12);
  color: #22d3ee;
  border: 1px solid rgba(34,211,238,.2);
}
.popup-meta {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 3px;
  font-weight: 500;
}
.popup-rate {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 2px;
  word-break: break-all;
  font-weight: 600;
}
.popup-max {
  font-size: 12px;
  color: var(--color-cost-text);
  font-weight: 700;
  margin-bottom: 8px;
}
.popup-cost {
  background: rgba(251,191,36,.08);
  border: 1px solid rgba(251,191,36,.2);
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 13px;
  color: #fbbf24;
  margin-bottom: 8px;
  font-weight: 600;
}
.popup-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  background: rgba(251,191,36,.15);
  color: #fbbf24;
  padding: 1px 6px;
  border-radius: 100px;
  margin-left: 4px;
  vertical-align: middle;
  border: 1px solid rgba(251,191,36,.3);
}
.popup-map-link {
  display: block;
  text-align: center;
  padding: 9px;
  background: linear-gradient(135deg, rgba(34,211,238,.14), rgba(59,130,246,.14));
  color: #22d3ee;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  border-radius: 10px;
  letter-spacing: .04em;
  border: 1px solid rgba(34,211,238,.25);
}

/* ── Map Legend ──────────────────────────────── */
.map-legend {
  background: rgba(8,9,15,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 7px 10px;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,.6);
  border: 1px solid rgba(255,255,255,.08);
  font-size: 11px;
  font-family: 'Inter', -apple-system, sans-serif;
  font-weight: 700;
  max-width: 180px;
  color: #94a3b8;
}
.legend-toggle {
  background: none;
  border: none;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  color: #94a3b8;
  padding: 0;
  width: 100%;
  text-align: left;
  font-family: inherit;
}
.legend-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px 8px;
  margin-top: 6px;
}
.legend-item { display: flex; align-items: center; gap: 5px; }
.legend-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  display: inline-block;
  border: 2px solid rgba(255,255,255,.08);
  box-shadow: 0 0 0 1px rgba(0,0,0,.4);
  flex-shrink: 0;
}

/* ── Facility Pin ────────────────────────────── */
.facility-pin {
  width: 36px; height: 36px;
  background: rgba(34,211,238,.9);
  border: 2px solid #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  box-shadow: 0 0 0 3px rgba(34,211,238,.4), 0 4px 16px rgba(0,0,0,.6);
}

/* ── Location Dot ────────────────────────────── */
.user-location-dot {
  width: 16px; height: 16px;
  background: var(--cyan);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--cyan), 0 0 14px var(--cyan-glow);
  position: relative;
}
.user-location-dot::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 36px; height: 36px;
  background: rgba(34,211,238,.22);
  border-radius: 50%;
  transform: translate(-50%,-50%) scale(.5);
  animation: loc-pulse 2s ease-out infinite;
}
@keyframes loc-pulse {
  0%   { transform: translate(-50%,-50%) scale(.5); opacity: 1; }
  100% { transform: translate(-50%,-50%) scale(2);  opacity: 0; }
}

/* ── Locate Button ───────────────────────────── */
.locate-btn {
  width: 34px; height: 34px;
  background: rgba(8,9,15,.9);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  cursor: pointer;
  font-size: 17px;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.5);
  transition: all .15s;
}
.locate-btn:hover  { background: rgba(20,25,40,.95); border-color: rgba(34,211,238,.3); }
.locate-btn:active { background: rgba(34,211,238,.1); }
.locate-btn:disabled { opacity: .6; cursor: default; }

/* ── Drawer ──────────────────────────────────── */
.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.drawer-overlay.open { opacity: 1; pointer-events: all; }

.drawer {
  position: fixed;
  top: 0; right: 0;
  width: 88%; max-width: 380px;
  height: 100%;
  background: #09090f;
  border-left: 1px solid rgba(255,255,255,.08);
  z-index: 201;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 60px rgba(0,0,0,.9);
}
.drawer.open { transform: translateX(0); }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
  background: #09090f;
  position: sticky;
  top: 0;
  z-index: 1;
}
.drawer-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--tx-1);
  letter-spacing: -.02em;
}
.drawer-close {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--tx-2);
  transition: all .2s;
}
.drawer-close svg { width: 16px; height: 16px; }
.drawer-close:active {
  background: var(--glass-2);
  border-color: var(--border-hi);
}

.drawer-body {
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

/* ── Guide Hero ──────────────────────────────── */
.guide-hero {
  background:
    radial-gradient(ellipse 100% 70% at 50% 0%, rgba(34,211,238,.09) 0%, transparent 70%),
    linear-gradient(180deg, #05060d 0%, #09090f 100%);
  padding: 32px 24px;
  text-align: center;
  border-bottom: 1px solid rgba(34,211,238,.07);
}
.guide-hero-icon { font-size: 48px; margin-bottom: 12px; }
.guide-hero-title {
  font-size: 20px;
  font-weight: 900;
  background: linear-gradient(135deg, #fff 30%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -.03em;
  margin-bottom: 8px;
}
.guide-hero-sub { font-size: 13px; color: var(--tx-2); line-height: 1.7; }

/* ── Guide Sections ──────────────────────────── */
.guide-section {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.guide-section-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--cyan);
  opacity: .8;
  margin-bottom: 16px;
}

.guide-step { display: flex; gap: 14px; align-items: flex-start; }
.gs-num {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, rgba(34,211,238,.18), rgba(59,130,246,.18));
  border: 1px solid rgba(34,211,238,.3);
  border-radius: 50%;
  font-size: 13px; font-weight: 800; color: var(--cyan);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(34,211,238,.18);
}
.gs-body { flex: 1; }
.gs-title { font-size: 14px; font-weight: 800; color: var(--tx-1); margin-bottom: 6px; letter-spacing: -.01em; }
.gs-desc { font-size: 12px; font-weight: 500; color: var(--tx-2); line-height: 1.7; }
.gs-connector {
  width: 2px; height: 20px;
  background: linear-gradient(to bottom, rgba(34,211,238,.4), transparent);
  margin: 4px 0 4px 13px;
  border-radius: 2px;
}

.guide-tips-list { display: flex; flex-direction: column; gap: 10px; }
.tip-item {
  display: flex; gap: 10px; align-items: flex-start;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-size: 12px; font-weight: 500;
  color: var(--tx-2); line-height: 1.6;
}
.tip-important {
  background: rgba(34,211,238,.06);
  border-color: rgba(34,211,238,.15);
  color: var(--tx-1);
}
.tip-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

.area-guide-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.area-guide-chip {
  background: var(--cyan-dim);
  color: var(--cyan);
  border: 1px solid rgba(34,211,238,.18);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 100px;
}

.guide-footer {
  padding: 24px 20px;
  text-align: center;
}
.guide-footer p { font-size: 11px; color: var(--tx-3); font-weight: 500; line-height: 1.8; }

/* ── Theme Toggle Button ─────────────────────── */
.header__bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-btn {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 10px;
  font-size: 16px;
  line-height: 1;
  transition: background .2s, border-color .2s;
  flex-shrink: 0;
}
.theme-btn:active {
  background: rgba(255,255,255,.18);
}

/* ═══════════════════════════════════════════════
   Light Theme Override
   ═══════════════════════════════════════════════ */

html[data-theme="light"] {
  --bg:          #f0f4f8;
  --bg-card:     #ffffff;
  --glass:       rgba(255,255,255,.85);
  --glass-2:     rgba(255,255,255,.95);
  --glass-hover: rgba(255,255,255,.95);
  --border:      rgba(8,16,31,.08);
  --border-hi:   rgba(8,16,31,.15);

  --cyan:      #0284c7;
  --cyan-dim:  rgba(2,132,199,.10);
  --cyan-glow: rgba(2,132,199,.15);

  --tx-1:  #08101f;
  --tx-2:  #3d4f6b;
  --tx-3:  #8a9ab5;

  --c-amber:     #d97706;
  --c-amber-d:   #b45309;
  --c-red:       #dc2626;
  --c-red-dim:   rgba(220,38,38,.08);
  --c-green:     #059669;
  --c-green-dim: rgba(5,150,105,.08);

  --shadow:    0 2px 8px rgba(8,16,31,.07), 0 0 0 1px var(--border);
  --shadow-lg: 0 8px 32px rgba(8,16,31,.12), 0 0 0 1px var(--border);

  /* Legacy */
  --ink:    #08101f;
  --ink-2:  #3d4f6b;
  --ink-3:  #8a9ab5;
  --ink-4:  #c4cfde;
  --surface: #f0f4f8;
  --white:   #ffffff;
  --blue-1:  rgba(2,132,199,.10);
  --green:   #059669;
  --amber:   #d97706;
  --red:     #dc2626;

  --color-cost-text:  #b45309;
  --color-cost-bg:    #fef3c7;
  --color-area-bg:    rgba(2,132,199,.10);
  --color-area-text:  #0284c7;
  --color-accent:     #dc2626;
}

html[data-theme="light"] body {
  background: var(--bg);
  color: var(--tx-1);
}

/* Cards */
html[data-theme="light"] .card {
  background: #ffffff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 2px 8px rgba(8,16,31,.06), 0 0 0 1px rgba(8,16,31,.07);
}
html[data-theme="light"] .card::before { opacity: 0; }

/* Filter / controls */
html[data-theme="light"] .controls {
  background: #ffffff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
html[data-theme="light"] .filter-toggle-btn,
html[data-theme="light"] .my-parking-btn {
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(8,16,31,.06), 0 0 0 1px rgba(8,16,31,.08);
}
html[data-theme="light"] .my-parking-btn.is-active {
  background: rgba(220,38,38,.08);
  box-shadow: none;
}

/* View tabs */
html[data-theme="light"] .view-tabs {
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(8,16,31,.06), 0 0 0 1px rgba(8,16,31,.08);
}
html[data-theme="light"] .view-tab.is-active {
  background: linear-gradient(135deg, rgba(2,132,199,.15), rgba(37,99,235,.15));
  border-color: rgba(2,132,199,.25);
  box-shadow: none;
}

/* Chips */
html[data-theme="light"] .chip {
  background: #f0f4f8;
  border-color: rgba(8,16,31,.10);
  color: #8a9ab5;
}
html[data-theme="light"] .chip.is-active {
  background: rgba(2,132,199,.10);
  color: #0284c7;
  border-color: rgba(2,132,199,.3);
  box-shadow: none;
}

/* Rate rows */
html[data-theme="light"] .card__rates {
  background: #f4f7fb;
  border-color: rgba(8,16,31,.06);
}

/* Cost banner */
html[data-theme="light"] .card__cost {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border-color: rgba(180,83,9,.15);
}
html[data-theme="light"] .card__cost-value { color: #b45309; }
html[data-theme="light"] .card__cost-label { color: #b45309; }
html[data-theme="light"] .card__cost-badge {
  background: rgba(180,83,9,.10);
  color: #b45309;
  border-color: rgba(180,83,9,.2);
}

/* Map link */
html[data-theme="light"] .card__map-link {
  background: linear-gradient(135deg, #0c1a45, #2563eb);
  color: #ffffff;
  border: none;
  box-shadow: 0 3px 12px rgba(37,99,235,.3);
}
html[data-theme="light"] .card__map-link:active {
  background: linear-gradient(135deg, #0c1a45, #1d4ed8);
}

/* Map */
html[data-theme="light"] #map-view {
  border-color: rgba(8,16,31,.1);
}
html[data-theme="light"] .map-legend {
  background: rgba(255,255,255,.96);
  border-color: rgba(8,16,31,.10);
  color: #3d4f6b;
  backdrop-filter: none;
}
html[data-theme="light"] .legend-toggle { color: #3d4f6b; }
html[data-theme="light"] .locate-btn {
  background: #ffffff;
  border-color: rgba(0,0,0,.2);
}
html[data-theme="light"] .locate-btn:hover {
  background: #f4f4f4;
  border-color: rgba(0,0,0,.3);
}

/* Leaflet popup */
html[data-theme="light"] .leaflet-popup-content-wrapper {
  background: #ffffff !important;
  border-color: rgba(8,16,31,.10) !important;
  box-shadow: 0 8px 32px rgba(8,16,31,.15) !important;
}
html[data-theme="light"] .leaflet-popup-tip { background: #ffffff !important; }
html[data-theme="light"] .popup-card { background: #ffffff; }
html[data-theme="light"] .popup-name  { color: #08101f; }
html[data-theme="light"] .popup-area  { background: rgba(2,132,199,.10); color: #0284c7; border-color: rgba(2,132,199,.2); }
html[data-theme="light"] .popup-meta  { color: #8a9ab5; }
html[data-theme="light"] .popup-rate  { color: #3d4f6b; }
html[data-theme="light"] .popup-max   { color: #b45309; }
html[data-theme="light"] .popup-cost  { background: #fef3c7; border-color: rgba(180,83,9,.15); color: #b45309; }
html[data-theme="light"] .popup-badge { background: rgba(180,83,9,.10); color: #b45309; border-color: rgba(180,83,9,.2); }
html[data-theme="light"] .popup-map-link { background: linear-gradient(135deg, #0c1a45, #2563eb); color: #ffffff; border: none; }

/* Drawer */
html[data-theme="light"] .drawer-overlay { background: rgba(0,0,0,.5); }
html[data-theme="light"] .drawer {
  background: #f4f7fb;
  border-left-color: rgba(8,16,31,.10);
  box-shadow: -8px 0 40px rgba(8,16,31,.15);
}
html[data-theme="light"] .drawer-head {
  background: #f4f7fb;
  border-bottom-color: rgba(8,16,31,.08);
}
html[data-theme="light"] .drawer-title { color: #08101f; }
html[data-theme="light"] .drawer-close {
  background: rgba(8,16,31,.06);
  border-color: rgba(8,16,31,.10);
  color: #3d4f6b;
}

/* Guide */
html[data-theme="light"] .guide-section { border-bottom-color: rgba(8,16,31,.07); }
html[data-theme="light"] .guide-section-title { color: #0284c7; opacity: 1; }
html[data-theme="light"] .gs-num {
  background: rgba(2,132,199,.12);
  border-color: rgba(2,132,199,.3);
  color: #0284c7;
  box-shadow: none;
}
html[data-theme="light"] .gs-connector { background: linear-gradient(to bottom, rgba(2,132,199,.4), transparent); }
html[data-theme="light"] .gs-title { color: #08101f; }
html[data-theme="light"] .gs-desc  { color: #3d4f6b; }
html[data-theme="light"] .tip-item {
  background: rgba(8,16,31,.04);
  border-color: rgba(8,16,31,.06);
  color: #3d4f6b;
}
html[data-theme="light"] .tip-important {
  background: rgba(2,132,199,.07);
  border-color: rgba(2,132,199,.18);
  color: #08101f;
}
html[data-theme="light"] .area-guide-chip {
  background: rgba(2,132,199,.08);
  border-color: rgba(2,132,199,.2);
  color: #0284c7;
}
html[data-theme="light"] .guide-footer p { color: #8a9ab5; }
html[data-theme="light"] .footer { border-top-color: rgba(8,16,31,.08); }

/* Search — light theme */
html[data-theme="light"] .search-bar-wrap {
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(8,16,31,.06), 0 0 0 1px rgba(8,16,31,.08);
}
html[data-theme="light"] .search-bar-wrap:focus-within {
  border-color: rgba(2,132,199,.5);
  box-shadow: 0 0 0 3px rgba(2,132,199,.08);
}
html[data-theme="light"] .search-dropdown {
  background: #ffffff;
  border-color: rgba(8,16,31,.10);
  box-shadow: 0 8px 32px rgba(8,16,31,.15);
}
html[data-theme="light"] .search-suggestion { border-bottom-color: rgba(8,16,31,.05); }
html[data-theme="light"] .search-suggestion:active,
html[data-theme="light"] .search-suggestion:hover { background: rgba(2,132,199,.07); }
html[data-theme="light"] .suggestion-text { color: #08101f; }
html[data-theme="light"] .search-facility-badge {
  background: rgba(2,132,199,.10);
  border-color: rgba(2,132,199,.25);
  color: #0284c7;
}

/* ── Tablet+ ─────────────────────────────────── */
@media (min-width: 600px) {
  .header__title { font-size: 32px; }
  .parking-list  { gap: 12px; }
  .card__name    { font-size: 16px; }
}

/* ── Card clickable hint ─────────────────────── */
.card--clickable { cursor: pointer; }
.card--clickable:active { transform: scale(.985); }

.card__detail-hint {
  margin-top: 10px;
  font-size: 11px;
  color: var(--tx-3);
  text-align: right;
  letter-spacing: .03em;
}

/* ── Detail Modal ────────────────────────────── */
#detail-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
}
#detail-modal.is-open { display: block; }

.detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(4px);
}

.detail-sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 90vh;
  overflow-y: auto;
  background: #0d1020;
  border-top: 1px solid rgba(34,211,238,.2);
  border-radius: 20px 20px 0 0;
  padding: 20px 18px 36px;
  box-shadow: 0 -8px 40px rgba(0,0,0,.7);
  animation: sheet-up .25s cubic-bezier(.32,1,.23,1);
}

@keyframes sheet-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.detail-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  color: var(--tx-2);
  font-size: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.detail-close:active { background: rgba(255,255,255,.14); }

.detail-header {
  margin-bottom: 16px;
  padding-right: 36px;
}
.detail-area {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--cyan);
  background: var(--cyan-dim);
  border: 1px solid rgba(34,211,238,.25);
  border-radius: 6px;
  padding: 2px 8px;
  margin-bottom: 6px;
  letter-spacing: .05em;
}
.detail-name {
  font-size: 17px;
  font-weight: 800;
  color: var(--tx-1);
  line-height: 1.35;
  margin: 0 0 4px;
}
.detail-address {
  font-size: 12px;
  color: var(--tx-3);
  margin: 0;
}

.detail-section {
  border-top: 1px solid var(--border);
  padding: 14px 0;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: 13px;
}
.detail-label {
  color: var(--tx-3);
  font-size: 12px;
  flex-shrink: 0;
  margin-right: 12px;
}
.detail-value {
  color: var(--tx-1);
  font-weight: 600;
  text-align: right;
}
.detail-pay { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.detail-note {
  font-size: 12px;
  color: var(--tx-3);
  margin: 6px 0 0;
  line-height: 1.6;
}

/* 支払いバッジ */
.pay-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: .03em;
}
.pay-cash   { background: rgba(52,211,153,.12); color: #34d399; border: 1px solid rgba(52,211,153,.3); }
.pay-credit { background: rgba(59,130,246,.12); color: #60a5fa; border: 1px solid rgba(59,130,246,.3); }
.pay-qr     { background: rgba(251,191,36,.12); color: #fbbf24; border: 1px solid rgba(251,191,36,.3); }
.pay-no     { background: rgba(248,113,113,.12); color: #f87171; border: 1px solid rgba(248,113,113,.3); }

/* 詳細アクションボタン */
.detail-actions {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.detail-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 13px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: .04em;
  transition: all .18s;
}
.detail-link--map {
  background: linear-gradient(135deg, rgba(34,211,238,.14), rgba(59,130,246,.14));
  color: var(--cyan);
  border: 1px solid rgba(34,211,238,.25);
}
.detail-link--map::before { content: "📍"; margin-right: 6px; }
.detail-link--sub {
  background: rgba(255,255,255,.04);
  color: var(--tx-2);
  border: 1px solid var(--border);
}
.detail-link--sub::before { content: "🔗"; margin-right: 6px; }
.detail-link:active { transform: scale(.98); }
