:root {
  color-scheme: light;
  --bg: #f3f5f9;
  --panel: #ffffff;
  --line: #d8deea;
  --text: #1c2433;
  --muted: #5f6b82;
  --primary: #2355d4;
  --primary-strong: #1b42aa;
  --good: #2e9f4d;
  --mid: #f59e0b;
  --bad: #de3c3c;
  --shadow: 0 14px 34px rgba(22, 34, 58, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  font-family: "SUIT", "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.shell {
  display: grid;
  grid-template-columns: 360px 1fr;
  width: 100%;
  height: 100dvh;
  max-height: 100dvh;
}

.side-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: contain;
  border-right: 1px solid var(--line);
  background: var(--panel);
}

.brand {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line);
}

.brand-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.admin-link {
  color: var(--primary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.admin-link:hover {
  color: var(--primary-strong);
}

.controls {
  display: grid;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.field {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.field input,
.field select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--text);
  background: #fff;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(39, 99, 255, 0.15);
}

.control-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn {
  height: 44px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.btn.primary {
  background: var(--primary);
  color: #fff;
}

.btn.primary:hover {
  background: var(--primary-strong);
  box-shadow: 0 4px 14px rgba(35, 85, 212, 0.28);
}

.btn.ghost {
  background: #eef3ff;
  color: var(--primary);
}

.btn.ghost:hover {
  background: #dce8ff;
}

.status-wrap {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}

.status-text {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.summary-text {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
}

.station-list-wrap {
  min-height: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.section-title {
  padding: 14px 18px 10px;
  font-size: 14px;
  font-weight: 800;
}

.station-list {
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding: 0 14px 14px;
  display: grid;
  gap: 10px;
}

.station-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #fff;
  cursor: pointer;
}

.station-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(39, 99, 255, 0.12);
}

.station-name {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
}

.station-address {
  margin-top: 5px;
  font-size: 12px;
  color: var(--muted);
}

.station-brand {
  margin-top: 4px;
  font-size: 12px;
  color: #3f527a;
  font-weight: 600;
}

.station-meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  background: #eef1f8;
  color: #3c4760;
}

.meta-chip.good {
  color: #0d6c32;
  background: rgba(46, 159, 77, 0.16);
}

.meta-chip.mid {
  color: #915f00;
  background: rgba(245, 158, 11, 0.2);
}

.meta-chip.bad {
  color: #9f1d1d;
  background: rgba(222, 60, 60, 0.18);
}

.meta-chip.crowd {
  color: #2450b2;
  background: rgba(39, 99, 255, 0.14);
}

.station-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.action-btn {
  min-height: 38px;
  border: none;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  min-width: 96px;
}

.station-actions .action-btn {
  flex: 1 1 calc(33.33% - 6px);
}

.action-btn.route {
  background: #2355d4;
  color: #fff;
}

.action-btn.cafe {
  background: #eef3ff;
  color: #1f6bff;
}

.action-btn.review {
  background: #f4ecff;
  color: #6b3ad3;
}

.empty-card {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 24px 14px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.map-panel {
  position: relative;
  min-width: 0;
  overflow: hidden;
}

.map-view {
  width: 100%;
  height: 100%;
}

.floating-stack {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 30;
  width: min(380px, calc(100vw - 28px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.floating-card {
  position: relative;
  width: 100%;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  max-height: min(46vh, 430px);
}

.station-detail {
  max-height: min(42vh, 390px);
}

.cafe-panel {
  max-height: min(52vh, 460px);
}

.panel-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 800;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.panel-body {
  padding: 12px 14px;
  display: grid;
  gap: 8px;
  overflow: auto;
}

.station-quick-actions {
  position: sticky;
  top: -1px;
  z-index: 2;
  margin: -12px -14px 4px;
  padding: 10px 14px 8px;
  display: flex;
  gap: 8px;
  background: linear-gradient(180deg, #ffffff 82%, rgba(255, 255, 255, 0.72) 100%);
  border-bottom: 1px solid #ecf1fb;
}

.station-quick-actions .action-btn {
  flex: 1;
}

.floating-card.collapsed .panel-body {
  display: none;
}

.panel-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-toggle-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  min-height: 34px;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.panel-toggle-btn:hover {
  background: #f5f8ff;
  color: var(--primary);
}

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

.panel-row .label {
  color: var(--muted);
}

.panel-row .value {
  color: var(--text);
  text-align: right;
  font-weight: 600;
  max-width: 70%;
  word-break: break-word;
}

.cafe-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  display: grid;
  gap: 4px;
}

.cafe-item.clickable {
  cursor: pointer;
}

.cafe-item.clickable:hover {
  border-color: #b7c7f0;
  background: #f7f9ff;
}

.cafe-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.mini-btn {
  border: none;
  border-radius: 7px;
  min-height: 36px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  background: #eef3ff;
  color: #1f6bff;
}

.mini-btn.review {
  background: #f4ecff;
  color: #6b3ad3;
}

.cafe-actions .mini-btn {
  flex: 1 1 calc(50% - 4px);
  min-width: 110px;
  text-align: center;
}

.cafe-title {
  font-size: 14px;
  font-weight: 800;
}

.cafe-sub {
  font-size: 12px;
  color: var(--muted);
}

.cafe-link {
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.cafe-link:hover {
  color: var(--primary-strong);
}

.map-error {
  position: absolute;
  inset: 24px;
  z-index: 40;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #f4c6c6;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 24px;
}

.map-error h3 {
  margin: 0 0 8px;
  color: #a52727;
}

.map-error p {
  margin: 0;
  color: #5b3030;
}

.hidden {
  display: none !important;
}

.review-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
}

.review-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 27, 45, 0.45);
}

.review-modal-panel {
  position: relative;
  margin: min(6vh, 60px) auto 0;
  width: min(900px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.review-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.review-modal-head h3 {
  margin: 0;
  font-size: 18px;
}

.modal-close-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 8px;
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.review-modal-context {
  padding: 8px 14px;
  font-size: 13px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.review-modal-body {
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 12px;
  min-height: 0;
}

.review-list-wrap,
.review-form-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  min-height: 0;
}

.review-list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
}

.review-list {
  display: grid;
  gap: 8px;
  max-height: min(56vh, 520px);
  overflow: auto;
}

.review-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  display: grid;
  gap: 6px;
}

.review-meta {
  font-size: 12px;
  color: var(--muted);
}

.review-text {
  font-size: 13px;
  color: var(--text);
  line-height: 1.45;
  white-space: pre-wrap;
}

.review-image {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.review-form-wrap > strong {
  display: block;
  font-size: 14px;
  margin-bottom: 8px;
}

.review-form {
  display: grid;
  gap: 8px;
}

.review-form label {
  display: grid;
  gap: 6px;
}

.review-form span {
  font-size: 12px;
  color: var(--muted);
}

.review-form textarea,
.review-form input,
.review-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
}

.review-form-actions {
  margin-top: 2px;
}

.review-form-status {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
}


/* =============================================
   Sheet header & button icon — global defaults
   ============================================= */

.sheet-header { display: none; }

.btn-icon-svg {
  display: none;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  pointer-events: none;
}


/* =============================================
   Charger chips — type & availability
   ============================================= */

.station-charger-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.charger-chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
}

.charger-chip.rapid {
  background: rgba(35, 85, 212, 0.1);
  color: #1a3faa;
}

.charger-chip.slow {
  background: rgba(80, 90, 140, 0.1);
  color: #44507a;
}

.charger-chip.avail {
  background: #eef1f8;
  color: #3c4760;
}

.charger-chip.avail.good {
  background: rgba(46, 159, 77, 0.14);
  color: #0d6c32;
}

.charger-chip.avail.bad {
  background: rgba(222, 60, 60, 0.14);
  color: #9f1d1d;
}


/* =============================================
   Brand filter bar
   ============================================= */

.brand-filter-bar {
  display: flex;
  gap: 6px;
  padding: 8px 14px;
  overflow-x: auto;
  overflow-y: hidden;
  flex-shrink: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border-bottom: 1px solid var(--line);
}

.brand-filter-bar:empty { display: none; padding: 0; border: none; }
.brand-filter-bar::-webkit-scrollbar { display: none; }

.brand-chip {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  flex-shrink: 0;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease, transform 120ms ease;
}

.brand-chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.brand-chip:hover:not(.active) {
  background: #f0f4ff;
  border-color: #b7c8f4;
  color: var(--text);
}

.brand-chip:active { transform: scale(0.96); }

.brand-chip.upcoming-trigger {
  background: rgba(245, 158, 11, 0.08);
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.35);
}

.brand-chip.upcoming-trigger:hover {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.55);
}

/* =============================================
   Upcoming brands section
   ============================================= */

.upcoming-brands-section {
  margin-top: 14px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 251, 240, 0.7);
}

.upcoming-brands-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 14px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.upcoming-brands-header:hover { background: rgba(245, 158, 11, 0.06); }

.upcoming-brands-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}

.upcoming-brands-sub {
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
  transition: color 150ms;
}

.upcoming-brands-list {
  display: none;
  padding: 0 10px 10px;
  flex-direction: column;
  gap: 7px;
}

.upcoming-brands-section.is-open .upcoming-brands-list {
  display: flex;
}

.upcoming-brand-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  padding-right: 96px;
  background: #fff;
  position: relative;
}

.upcoming-brand-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}

.upcoming-brand-desc {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.4;
}

.upcoming-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 800;
  background: rgba(245, 158, 11, 0.16);
  color: #92400e;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

@media (max-width: 1024px) {
  .shell {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) minmax(300px, 46dvh);
  }

  .side-panel {
    order: 2;
    border-right: none;
    border-top: 1px solid var(--line);
    max-height: none;
    min-height: 0;
    height: 100%;
  }

  .map-panel {
    order: 1;
    min-height: 0;
  }

  .floating-stack {
    top: auto;
    bottom: 12px;
    left: 12px;
    right: 12px;
    width: auto;
    max-height: 64vh;
  }

  .review-modal-body {
    grid-template-columns: 1fr;
  }

  .station-list {
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 600px) {
  .shell {
    grid-template-rows: minmax(0, 1fr) minmax(320px, 49dvh);
  }

  .brand {
    padding: 14px;
  }

  .controls {
    padding: 12px 14px;
  }

  .status-wrap {
    padding: 10px 14px;
  }

  .section-title {
    padding: 12px 14px 8px;
  }

  .station-list {
    padding: 0 10px 10px;
  }

  .station-actions {
    flex-wrap: wrap;
  }

  .action-btn {
    flex: 1 1 100%;
    min-height: 42px;
  }

  .station-quick-actions {
    position: static;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 10px 7px;
    margin: -12px -10px 4px;
  }

  .station-quick-actions .action-btn {
    flex: 1 1 calc(50% - 4px);
    min-width: 120px;
  }

  .panel-body {
    padding: 12px 10px;
  }

  .panel-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .panel-row .value {
    text-align: left;
    max-width: 100%;
  }

  .map-panel {
    min-height: 0;
  }

  .floating-stack {
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    max-height: 62vh;
  }

  .floating-card {
    max-height: min(60vh, 520px);
  }

  .station-detail {
    max-height: min(48vh, 420px);
  }

  .cafe-panel {
    max-height: min(52vh, 460px);
  }

  .cafe-actions .mini-btn {
    flex: 1 1 100%;
    min-width: 0;
  }
}

@media (max-width: 760px) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }

  .shell {
    display: block;
    position: relative;
    height: 100dvh;
    max-height: none;
  }

  .map-panel {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100dvh;
  }

  .map-view {
    width: 100%;
    height: 100dvh;
  }

  .side-panel {
    position: fixed;
    inset: 0;
    z-index: 45;
    display: block;
    border: 0;
    overflow: visible;
    background: transparent;
    pointer-events: none;
  }

  /* Desktop-only elements hidden on mobile */
  .brand {
    display: none !important;
  }

  .status-wrap {
    display: none !important;
  }

  .section-title {
    display: none;
  }

  /* ====================================
     TOP SEARCH BAR — single compact row
     ==================================== */
  .controls {
    pointer-events: auto;
    position: absolute;
    top: calc(12px + env(safe-area-inset-top, 0px));
    left: 12px;
    right: 12px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 0 8px 0 14px;
    height: 52px;
    border: 1px solid rgba(216, 222, 234, 0.88);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(22, 34, 58, 0.14);
    z-index: 51;
  }

  /* ⚡ brand mark inside search bar */
  .controls::before {
    content: '⚡';
    font-size: 18px;
    line-height: 1;
    flex: 0 0 auto;
    color: #f59e0b;
    margin-right: 2px;
  }

  /* Search input fills remaining space */
  .field {
    flex: 1;
    min-width: 0;
    gap: 0;
  }

  .field span {
    display: none;
  }

  .field input,
  .field select {
    width: 100%;
    height: 38px;
    border-radius: 8px;
    border: 1px solid rgba(216, 222, 234, 0.6);
    padding: 0 10px;
    font-size: 14px;
    background: #f6f7fa;
    color: var(--text);
  }

  .field input:focus,
  .field select:focus {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(35, 85, 212, 0.1);
    outline: none;
  }

  /* Control buttons: icon-only squares */
  .control-buttons {
    display: flex;
    flex-direction: row;
    gap: 6px;
    grid-template-columns: none;
  }

  .btn {
    width: 40px;
    height: 38px;
    padding: 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .btn-icon-svg {
    display: block;
  }

  .btn-label {
    display: none;
  }

  /* ====================================
     BOTTOM SHEET — 3-state slide-up panel
     height-based (no transform) — fixes iOS touch event hit-test bug
     ==================================== */
  .station-list-wrap {
    pointer-events: auto;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    /* Default height = peeked (220px); JS sets this dynamically */
    height: 220px;
    max-height: min(60dvh, 520px);
    border-radius: 18px 18px 0 0;
    background: #fff;
    box-shadow: 0 -6px 28px rgba(22, 34, 58, 0.15);
    border-top: 1px solid rgba(216, 222, 234, 0.8);
    /* height transition: touch area always matches visual area */
    transition: height 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    z-index: 44;
  }

  /* ====================================
     SHEET HEADER
     ==================================== */
  .sheet-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex: 0 0 auto;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    border-radius: 18px 18px 0 0;
  }

  .sheet-handle {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: #c8d3e4;
    margin: 10px auto 0;
    flex: 0 0 auto;
  }

  .sheet-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px 10px;
  }

  .sheet-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
    flex: 0 0 auto;
  }

  .sheet-count {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    background: rgba(35, 85, 212, 0.09);
    padding: 2px 7px;
    border-radius: 6px;
    flex: 0 0 auto;
    min-width: 0;
  }

  .sheet-status-text {
    flex: 1;
    min-width: 0;
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
  }

  /* Station list scroll area */
  .station-list {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 4px 12px calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .station-card {
    border-radius: 10px;
    padding: 12px;
  }

  .station-name {
    font-size: 14px;
  }

  .station-address,
  .station-brand {
    font-size: 12px;
  }

  .station-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
  }

  .station-actions .action-btn,
  .action-btn {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    border-radius: 8px;
  }

  /* ====================================
     FLOATING DETAIL CARDS
     ==================================== */
  .floating-stack {
    top: auto;
    left: 12px;
    right: 12px;
    bottom: calc(var(--floating-bottom, 232px) + env(safe-area-inset-bottom, 0px));
    width: auto;
    max-height: 32dvh;
    z-index: 46;
  }

  .floating-card,
  .station-detail,
  .cafe-panel {
    max-height: 32dvh;
    border-radius: 10px;
  }

  .station-detail {
    max-height: 28dvh;
  }

  .panel-head {
    min-height: 48px;
    padding: 10px 12px;
  }

  .panel-toggle-btn {
    min-height: 32px;
    border-radius: 8px;
  }

  .panel-body {
    padding: 12px 10px;
  }

  .panel-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .panel-row .value {
    text-align: left;
    max-width: 100%;
  }

  .station-quick-actions {
    position: static;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 10px 7px;
    margin: -12px -10px 4px;
  }

  .station-quick-actions .action-btn {
    flex: 1 1 calc(50% - 4px);
    min-width: 90px;
  }

  .cafe-actions .mini-btn {
    flex: 1 1 100%;
    min-width: 0;
  }

  /* Review modal: full screen on mobile */
  .review-modal-panel {
    margin: 0;
    width: 100%;
    min-height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }

  .review-modal-body {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  /* ====================================
     Cafe sheet styles (mobile)
     ==================================== */
  .sheet-back-row {
    padding: 4px 0 6px;
  }

  .sheet-back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(35, 85, 212, 0.18);
    background: rgba(35, 85, 212, 0.06);
    color: var(--primary);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: background 150ms ease;
  }

  .sheet-back-btn:active {
    background: rgba(35, 85, 212, 0.14);
  }

  .cafe-crowd-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0 8px;
    font-size: 12px;
  }

  .cafe-crowd-label {
    color: var(--muted);
    font-size: 11px;
  }

  .cafe-sheet-card {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
    background: #fff;
    margin-bottom: 8px;
    transition: box-shadow 180ms ease, border-color 180ms ease;
  }

  .cafe-sheet-card:active {
    box-shadow: 0 4px 14px rgba(22, 34, 58, 0.1);
    border-color: #f59e0b;
  }

  .cafe-sheet-name {
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
  }

  .cafe-sheet-sub {
    font-size: 12px;
    color: var(--muted);
    margin-top: 3px;
    line-height: 1.4;
  }

  .cafe-sheet-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
  }

  .cafe-sheet-actions .mini-btn,
  .cafe-sheet-actions a.mini-btn {
    flex: 1 1 0;
    min-width: 0;
    text-decoration: none;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }



  /* Brand filter — mobile */
  .brand-filter-bar {
    padding: 7px 12px;
  }

  .brand-chip {
    height: 26px;
    font-size: 11px;
    padding: 0 9px;
  }

  /* Upcoming brands — mobile */
  .upcoming-brands-section {
    margin: 8px 0 4px;
  }

  .upcoming-brand-card {
    padding-right: 88px;
  }


}


/* =============================================
   Brand — add EV accent to Relcharg wordmark
   ============================================= */

.brand-title {
  background: linear-gradient(135deg, #1a4fd6 0%, #2763ff 60%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
}

.brand-title::before {
  content: '⚡ ';
  -webkit-text-fill-color: #f59e0b;
  font-size: 0.85em;
}

/* =============================================
   Station card — hover lift + border highlight
   ============================================= */

.station-card {
  transition: box-shadow 200ms ease, border-color 200ms ease, transform 200ms ease;
}

.station-card:hover {
  box-shadow: 0 8px 24px rgba(22, 34, 58, 0.12);
  border-color: #b7c9f4;
  transform: translateY(-1px);
}

.station-card.active {
  box-shadow: 0 0 0 3px rgba(39, 99, 255, 0.12);
}

/* =============================================
   Action buttons — missing hover states
   ============================================= */

.action-btn {
  transition: background 160ms ease, transform 120ms ease, box-shadow 160ms ease;
}

.action-btn:active {
  transform: scale(0.97);
}

.action-btn.route:hover {
  background: #0050e0;
  box-shadow: 0 6px 18px rgba(31, 107, 255, 0.35);
}

.action-btn.cafe:hover {
  background: #d8e9ff;
  color: #1246cb;
}

.action-btn.review:hover {
  background: #ead8ff;
  color: #5a28b8;
}

.mini-btn {
  transition: background 160ms ease, transform 120ms ease;
}

.mini-btn:active {
  transform: scale(0.97);
}

.mini-btn:hover {
  background: #d8e9ff;
}

.mini-btn.review:hover {
  background: #e9d5ff;
}

/* =============================================
   Floating card — slide-in from right
   ============================================= */

@keyframes card-slide-in {
  from {
    opacity: 0;
    transform: translateX(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.floating-card:not(.hidden) {
  animation: card-slide-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* =============================================
   Search/locate buttons — press feedback
   ============================================= */

.btn {
  transition: background 150ms ease, transform 120ms ease, box-shadow 150ms ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn.primary:hover {
  box-shadow: 0 6px 18px rgba(39, 99, 255, 0.3);
}

/* =============================================
   Status text — subtle shimmer when loading
   ============================================= */

@keyframes shimmer {
  0%   { opacity: 1; }
  50%  { opacity: 0.5; }
  100% { opacity: 1; }
}

.status-text.loading {
  animation: shimmer 1.4s ease-in-out infinite;
}

/* =============================================
   Meta chips — tiny transition on hover
   ============================================= */

.meta-chip {
  transition: opacity 150ms ease;
}

/* =============================================
   Cafe item — already has hover, improve it
   ============================================= */

.cafe-item.clickable {
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.cafe-item.clickable:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(22, 34, 58, 0.08);
}

/* =============================================
   Panel toggle button — better feedback
   ============================================= */

.panel-toggle-btn {
  transition: background 150ms ease, color 150ms ease;
}

/* =============================================
   Scrollbar styling (webkit)
   ============================================= */

.station-list::-webkit-scrollbar,
.review-list::-webkit-scrollbar,
.panel-body::-webkit-scrollbar {
  width: 4px;
}

.station-list::-webkit-scrollbar-track,
.review-list::-webkit-scrollbar-track,
.panel-body::-webkit-scrollbar-track {
  background: transparent;
}

.station-list::-webkit-scrollbar-thumb,
.review-list::-webkit-scrollbar-thumb,
.panel-body::-webkit-scrollbar-thumb {
  background: #c8d3e8;
  border-radius: 99px;
}
