/* ==========================================================================
   بنزين بغداد — design tokens + layout
   One radius system (12px surfaces, pill for chips), one neutral accent (ink),
   colour reserved exclusively for fuel status. No gradients, no glass.
   ========================================================================== */

:root {
  --bg:        #ffffff;
  --bg-sub:    #f3f4f6;
  --bg-raise:  #ffffff;
  --line:      #e2e5ea;
  --line-soft: #eef0f3;
  --text:      #15171c;
  --text-dim:  #666e7a;
  --ink:       #15171c;   /* primary action */
  --on-ink:    #ffffff;

  --ok:   #087f5b;
  --mid:  #a86400;
  --high: #c2410c;
  --jam:  #c0392b;
  --off:  #6b7480;

  --ok-bg:   #e6f4ef;
  --mid-bg:  #fbf1de;
  --high-bg: #fbeade;
  --jam-bg:  #fbe9e7;
  --off-bg:  #eef0f2;

  --r:    12px;
  --r-sm: 8px;
  --pill: 999px;
  --shadow: 0 2px 8px rgba(15, 20, 30, .07);

  --topbar: 54px;
  --bottombar: 74px;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg:        #101216;
  --bg-sub:    #181b21;
  --bg-raise:  #181b21;
  --line:      #262a32;
  --line-soft: #1f232a;
  --text:      #f0f2f5;
  --text-dim:  #98a0ac;
  --ink:       #f0f2f5;
  --on-ink:    #101216;

  --ok:   #3ddc97;
  --mid:  #f0c04a;
  --high: #ff9455;
  --jam:  #ff6b5e;
  --off:  #8b95a2;

  --ok-bg:   #12291f;
  --mid-bg:  #2c2412;
  --high-bg: #2e1e13;
  --jam-bg:  #301a18;
  --off-bg:  #21262d;

  --shadow: 0 2px 10px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans Arabic", "Noto Sans Arabic", system-ui, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; }

.ms {
  font-family: "Material Symbols Rounded";
  font-weight: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  font-feature-settings: "liga";
  -webkit-font-feature-settings: "liga";
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  vertical-align: middle;
  user-select: none;
}
.ms.fill { font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24; }
.ms.sm { font-size: 17px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── Top bar ─────────────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: relative;
  z-index: 500;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.brand-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  flex-shrink: 0;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transition: transform .15s ease;
}
.brand-logo-img:hover { transform: scale(1.05); }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand h1 { font-size: 16.5px; font-weight: 700; margin: 0; white-space: nowrap; line-height: 1.2; }
.brand .sub { font-size: 11.5px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }

.jz-badge {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: var(--pill);
  padding: 4px 9px 4px 7px; font-size: 11px; font-weight: 600;
  color: var(--text-dim); white-space: nowrap;
}
.jz-badge b { color: var(--text); font-weight: 700; }
.jz-mark {
  width: 16px; height: 16px; border-radius: 5px; background: var(--ink); color: var(--on-ink);
  font-size: 10px; font-weight: 700; display: grid; place-items: center; line-height: 1;
}

/* ── Creator Attribution & Instagram Link (Bespoke / Anti-slop) ─────── */
.top-creator-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 6px;
  border-radius: var(--pill);
  border: 1px solid var(--line);
  background: var(--bg);
  text-decoration: none;
  color: var(--text);
  transition: all .2s ease;
}
.top-creator-pill:hover {
  border-color: #e1306c;
  box-shadow: 0 2px 8px rgba(225, 48, 108, 0.18);
  transform: translateY(-1px);
}
.ig-story-ring {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  padding: 1.5px;
  background: linear-gradient(45deg, #f09433, #dc2743, #bc1888);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ig-avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg);
  color: var(--text);
  font-weight: 800;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.creator-info {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-align: right;
}
.creator-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
}
.creator-handle {
  font-size: 10px;
  color: #e1306c;
  font-weight: 600;
}
.creator-arrow {
  color: var(--text-dim);
  font-size: 13px;
  display: flex;
  align-items: center;
}
.top-creator-pill:hover .creator-arrow {
  color: #e1306c;
}

/* Community announcement strip (Clean, unobtrusive, native feel) */
.community-strip {
  margin: 8px 14px 4px;
  padding: 9px 12px;
  border-radius: var(--r);
  background: var(--bg-sub);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.cs-content {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.cs-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: color-mix(in srgb, #e1306c 12%, var(--bg));
  color: #e1306c;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.cs-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.cs-text span {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cs-text small {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cs-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--pill);
  color: var(--text);
  text-decoration: none;
  font-size: 11.5px;
  font-weight: 700;
  flex-shrink: 0;
  transition: all .15s ease;
}
.cs-action:hover {
  background: #e1306c;
  color: #ffffff !important;
  border-color: #e1306c;
  box-shadow: 0 2px 8px rgba(225, 48, 108, 0.25);
}
.cs-action .ms {
  font-size: 13px;
}

@media (max-width: 480px) {
  .community-strip {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .cs-action {
    justify-content: center;
  }
}

/* Footer link */
.foot-creator {
  margin-bottom: 12px;
}
.foot-ig-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 12px;
  padding: 5px 12px;
  border-radius: var(--pill);
  border: 1px solid var(--line);
  background: var(--bg);
  transition: all .15s ease;
}
.foot-ig-link:hover {
  color: #e1306c;
  border-color: #e1306c;
}

.icon-btn {
  width: 40px; height: 40px; flex: 0 0 40px;
  border-radius: var(--r-sm); display: grid; place-items: center;
  color: var(--text-dim);
}
.icon-btn:active { background: var(--bg-sub); }

/* ── Shell ───────────────────────────────────────────────────────────── */
.shell {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - var(--topbar));
}

/* ── Map ─────────────────────────────────────────────────────────────── */
.mapwrap {
  order: 1;
  position: relative;
  flex: 0 0 38dvh;
  min-height: 200px;
  background: var(--bg-sub);
  border-bottom: 1px solid var(--line);
}
#map { position: absolute; inset: 0; z-index: 1; }

.map-overlay {
  position: absolute; z-index: 400; top: 10px; right: 10px; left: 10px;
  display: flex; gap: 8px; pointer-events: none;
}
.map-overlay > * { pointer-events: auto; }

.searchbox {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: var(--bg-raise); border: 1px solid var(--line);
  border-radius: var(--r); padding: 0 12px; height: 44px;
  box-shadow: var(--shadow);
}
.searchbox .ms { color: var(--text-dim); }
.searchbox input {
  flex: 1; border: none; outline: none; background: none;
  font-size: 15px; font-weight: 500; min-width: 0;
}
.searchbox input::placeholder { color: var(--text-dim); font-weight: 400; }
.searchbox .clear { display: none; color: var(--text-dim); }
.searchbox.has-value .clear { display: block; }

.map-fab {
  width: 44px; height: 44px; border-radius: var(--r);
  background: var(--bg-raise); border: 1px solid var(--line);
  box-shadow: var(--shadow); display: grid; place-items: center; color: var(--text);
}
.map-fab:active { background: var(--bg-sub); }
.map-fab[data-active="1"] { color: var(--on-ink); background: var(--ink); border-color: var(--ink); }

/* map pins — teardrop station marker with icon */
.custom-pin-wrap {
  background: transparent !important;
  border: none !important;
}
.pin {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 30px;
  height: 36px;
  cursor: pointer;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.35));
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.2s ease;
  user-select: none;
}
.pin:hover {
  transform: translateY(-3px) scale(1.15);
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.45));
  z-index: 1000 !important;
}
.pin.selected {
  transform: translateY(-5px) scale(1.3);
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.6));
  z-index: 9999 !important;
}
.pin .pin-body {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-sizing: border-box;
  background: #64748b;
  transition: box-shadow 0.2s ease;
}
.pin .pin-icon {
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pin .pin-arrow {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #64748b;
  margin-top: -1px;
}

/* Status Colors */
.pin-ok .pin-body { background: #12a06f; }
.pin-ok .pin-arrow { border-top-color: #12a06f; }

.pin-mid .pin-body { background: #d19100; }
.pin-mid .pin-arrow { border-top-color: #d19100; }

.pin-high .pin-body { background: #e2600f; }
.pin-high .pin-arrow { border-top-color: #e2600f; }

.pin-jam .pin-body { background: #d0402f; }
.pin-jam .pin-arrow { border-top-color: #d0402f; }

.pin-off .pin-body { background: #767f8b; }
.pin-off .pin-arrow { border-top-color: #767f8b; }

.pin-none .pin-body { background: #475569; }
.pin-none .pin-arrow { border-top-color: #475569; }
.pin-none .pin-icon { opacity: 0.88; }

.pin.selected .pin-body {
  box-shadow: 0 0 0 3.5px rgba(255, 255, 255, 0.6);
}

.leaflet-container { font-family: inherit; background: var(--bg-sub); }
.leaflet-popup-content-wrapper {
  border-radius: var(--r); background: var(--bg-raise); color: var(--text);
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.leaflet-popup-tip { background: var(--bg-raise); border: 1px solid var(--line); }
.leaflet-popup-content { margin: 12px 14px; font-size: 14px; direction: rtl; text-align: right; }
.leaflet-popup-close-button { display: none; }
.leaflet-control-attribution {
  background: var(--bg-raise) !important; color: var(--text-dim) !important;
  font-size: 10px !important; border-radius: 6px 0 0 0;
}
.leaflet-control-attribution a { color: var(--text-dim) !important; }
.map-night .leaflet-tile-pane {
  filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88) saturate(.7);
}

.leaflet-bar a {
  background: var(--bg-raise) !important; color: var(--text) !important;
  border-color: var(--line) !important;
}

.popup-title { font-weight: 700; font-size: 15px; margin-bottom: 2px; }
.popup-sub { color: var(--text-dim); font-size: 12px; margin-bottom: 8px; }
.popup-actions { display: flex; gap: 6px; margin-top: 10px; }
.popup-actions a, .popup-actions button {
  flex: 1; text-align: center; border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 7px 6px; font-size: 13px; font-weight: 600; text-decoration: none; color: var(--text);
}

/* ── List sheet ──────────────────────────────────────────────────────── */
.sheet {
  order: 2;
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--bottombar) + env(safe-area-inset-bottom, 0px));
}

.chips {
  position: sticky; top: 0; z-index: 300;
  display: flex; gap: 7px; overflow-x: auto; padding: 10px 14px;
  background: var(--bg); border-bottom: 1px solid var(--line-soft);
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; border: 1px solid var(--line); border-radius: var(--pill);
  padding: 8px 13px; font-size: 13.5px; font-weight: 600; color: var(--text-dim);
  background: var(--bg); white-space: nowrap; min-height: 36px;
}
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }

.listhead {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 12px 14px 8px;
}
.listhead .count { font-size: 13px; color: var(--text-dim); }
.sortwrap { display: flex; align-items: center; gap: 4px; color: var(--text-dim); }
.sortwrap select {
  border: none; background: none; font-size: 13px; font-weight: 600; color: var(--text);
  padding: 6px 2px; outline: none;
}

.list { display: flex; flex-direction: column; }

/* ── Station row ─────────────────────────────────────────────────────── */
.station {
  display: block; width: 100%; text-align: right;
  padding: 14px; border-top: 1px solid var(--line-soft); background: var(--bg);
}
.station:first-child { border-top: 1px solid var(--line); }
.station.active { background: var(--bg-sub); }

.st-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.st-name { font-size: 16px; font-weight: 700; line-height: 1.3; }
.st-area { font-size: 12.5px; color: var(--text-dim); margin-top: 1px; }

.wait {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center;
  border-radius: var(--r-sm); padding: 6px 9px; min-width: 92px;
  font-size: 12.5px; font-weight: 700; line-height: 1.25;
}
.wait small { font-weight: 500; font-size: 11px; opacity: .85; }
.w-ok   { background: var(--ok-bg);   color: var(--ok); }
.w-mid  { background: var(--mid-bg);  color: var(--mid); }
.w-high { background: var(--high-bg); color: var(--high); }
.w-jam  { background: var(--jam-bg);  color: var(--jam); }
.w-off  { background: var(--off-bg);  color: var(--off); }

.w-none { background: var(--bg-sub); color: var(--text-dim); border: 1px dashed var(--line); }


.tag {
  display: inline-block; vertical-align: middle; font-size: 11px; font-weight: 700;
  color: var(--text-dim); border: 1px solid var(--line); border-radius: 6px;
  padding: 1px 6px; margin-inline-start: 4px;
}

.more {
  width: 100%; padding: 15px; border-top: 1px solid var(--line-soft);
  font-size: 14px; font-weight: 700; color: var(--text); background: var(--bg-sub);
}
.more:active { background: var(--line-soft); }

.demo-note {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 11px 14px; font-size: 12.5px; line-height: 1.5;
  color: var(--text-dim); background: var(--bg-sub);
  border-top: 1px solid var(--line);
}
.demo-note .ms { color: var(--text-dim); flex: 0 0 auto; }

.fuels { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.fuel {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 5px 9px; font-size: 13px; font-weight: 600;
}
.fuel.yes { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); color: var(--ok); background: var(--ok-bg); }
.fuel.no  { color: var(--text-dim); }
.fuel .ms { font-size: 15px; }

.st-note {
  margin-top: 10px; font-size: 14px; line-height: 1.55;
  border-right: 2px solid var(--line); padding-right: 10px; color: var(--text);
}
.st-note .by { color: var(--text-dim); font-size: 12px; }

.st-meta {
  margin-top: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--text-dim);
}
.st-meta .stale { color: var(--mid); font-weight: 600; }
.st-meta .conflict { color: var(--jam); font-weight: 600; }

.badge-verified {
  display: inline-flex; align-items: center; gap: 3px;
  background: var(--ok-bg); color: var(--ok);
  font-size: 11px; font-weight: 700;
  border-radius: var(--pill); padding: 1px 7px;
  margin-inline-start: 6px; vertical-align: middle;
  border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent);
}
.badge-verified .ms { font-size: 14px; }

.tag-meta {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600;
  border-radius: 4px; padding: 2px 6px;
}
.tag-meta .ms { font-size: 14px; }
.tag-meta.verified { background: var(--ok-bg); color: var(--ok); }
.tag-meta.pending  { background: var(--bg-sub); color: var(--text-dim); border: 1px dashed var(--line); }
.tag-meta.stale    { background: var(--mid-bg); color: var(--mid); }
.tag-meta.expired  { background: var(--off-bg); color: var(--off); }
.tag-meta.conflict { background: var(--jam-bg); color: var(--jam); }

.station.is-conflict {
  border-right: 3px solid var(--jam);
}
.w-conflict { background: var(--jam-bg); color: var(--jam); border: 1px solid var(--jam); }
.pin-conflict .pin-body { background: #c0392b; }
.pin-conflict .pin-arrow { border-top-color: #c0392b; }

.st-actions { display: flex; gap: 8px; margin-top: 12px; }
.st-actions > * {
  flex: 1; min-height: 40px; border: 1px solid var(--line); border-radius: var(--r-sm);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 13.5px; font-weight: 600; text-decoration: none; color: var(--text);
  background: var(--bg);
}
.st-actions > *:active { background: var(--bg-sub); }
.st-actions .voted-up { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.st-actions .voted-down { color: var(--jam); border-color: color-mix(in srgb, var(--jam) 45%, var(--line)); }

/* ── Empty / loading ─────────────────────────────────────────────────── */
.empty { padding: 48px 24px; text-align: center; color: var(--text-dim); }
.empty .ms { font-size: 34px; display: block; margin-bottom: 8px; }
.empty b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }

.skeleton { padding: 14px; border-top: 1px solid var(--line-soft); }
.sk-line { height: 12px; border-radius: 6px; background: var(--bg-sub); margin-bottom: 8px; }
.sk-line.w60 { width: 60%; } .sk-line.w35 { width: 35%; } .sk-line.w80 { width: 80%; }
@media (prefers-reduced-motion: no-preference) {
  .sk-line { animation: sk 1.3s ease-in-out infinite; }
  @keyframes sk { 50% { opacity: .45; } }
}

/* ── Bottom bar ──────────────────────────────────────────────────────── */
.bottombar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 600;
  background: var(--bg); border-top: 1px solid var(--line);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
}
.btn-primary {
  width: 100%; min-height: 50px; border-radius: var(--r);
  background: var(--ink); color: var(--on-ink);
  font-size: 16px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: .5; }

/* ── Modal ───────────────────────────────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 900; display: none; }
.modal[open] { display: block; }
.modal .scrim { position: absolute; inset: 0; background: rgba(10, 12, 16, .55); }
.modal .panel {
  position: absolute; inset-inline: 0; bottom: 0; top: 24px;
  background: var(--bg); border-radius: 18px 18px 0 0;
  display: flex; flex-direction: column; overflow: hidden;
}
@media (prefers-reduced-motion: no-preference) {
  .modal[open] .panel { animation: up .2s cubic-bezier(.2, .9, .3, 1); }
  @keyframes up { from { transform: translateY(20px); opacity: .6; } }
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.modal-head h2 { margin: 0; font-size: 17px; font-weight: 700; }
.modal-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--text-dim); }
.modal-body { flex: 1; overflow-y: auto; padding: 16px; }
.modal-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }

.field { margin-bottom: 20px; }
.field > label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.field .hint { font-size: 12.5px; color: var(--text-dim); font-weight: 400; }

.input, select.input, textarea.input {
  width: 100%; min-height: 46px; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--bg-sub); outline: none; font-size: 15px; font-weight: 500;
}
textarea.input { resize: none; line-height: 1.55; }
.input:focus { border-color: var(--ink); background: var(--bg); }
.input::placeholder { color: var(--text-dim); font-weight: 400; }
.input.bad { border-color: var(--jam); }

.opts { display: grid; gap: 8px; }
.opts.two { grid-template-columns: 1fr 1fr; }
.opt {
  min-height: 46px; text-align: right; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--bg-sub); font-size: 14.5px; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.opt[aria-pressed="true"] { border-color: var(--ink); background: var(--bg); box-shadow: inset 0 0 0 1px var(--ink); }
.opt .dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }

.err {
  display: none; margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--jam);
  align-items: center; gap: 6px;
}
.err[data-show="1"] { display: flex; }
.counter { float: left; font-size: 12px; color: var(--text-dim); margin-top: 6px; }

.notice {
  font-size: 12.5px; line-height: 1.6; color: var(--text-dim);
  background: var(--bg-sub); border-radius: var(--r-sm); padding: 12px;
}

/* ── Toast ───────────────────────────────────────────────────────────── */
.toast {
  position: fixed; z-index: 1000; inset-inline: 14px; bottom: calc(var(--bottombar) + 12px);
  background: var(--ink); color: var(--on-ink);
  border-radius: var(--r); padding: 13px 14px; font-size: 14px; font-weight: 600;
  display: none; align-items: center; gap: 9px; box-shadow: var(--shadow);
}
.toast[data-show="1"] { display: flex; }
.toast[data-kind="err"] { background: var(--jam); color: #fff; }
.toast[data-kind="warn"] { background: var(--mid); color: #fff; }

/* ── Footer ──────────────────────────────────────────────────────────── */
.foot {
  padding: 22px 16px 26px; border-top: 1px solid var(--line-soft);
  text-align: center; color: var(--text-dim); font-size: 12.5px; line-height: 1.7;
}
.foot .jz-badge { margin-bottom: 10px; }
.foot .mode { display: inline-block; margin-top: 6px; font-size: 11.5px; }

/* ── Desktop ─────────────────────────────────────────────────────────── */
@media (max-width: 560px) {
  .brand .sub { display: none; }
}

@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 440px 1fr; }
  .sheet { order: 1; border-inline-start: 1px solid var(--line); height: 100%; }
  .mapwrap { order: 2; flex: none; height: 100%; border-bottom: none; }
  .bottombar { inset-inline: auto; inset-inline-start: auto; width: 440px; right: 0; }
  .toast { inset-inline: auto; right: 14px; width: 412px; }
}
