:root {
  /* === NIGHT INSTRUMENT — deep blue-graphite surfaces === */
  --ink: #090c13;
  --bg-main: #0a0e16;
  --bg-panel: rgba(18, 24, 36, 0.74);
  --bg-card: rgba(24, 31, 46, 0.66);
  --panel-2: #141a28;
  --border: rgba(150, 172, 214, 0.12);
  --hair: rgba(160, 180, 220, 0.16);

  /* === brand + status: fuel-gauge language === */
  --green: #33e6a0;          /* «есть» / brand / go */
  --green-soft: rgba(51, 230, 160, 0.15);
  --green-border: rgba(51, 230, 160, 0.5);
  --amber: #ffb24d;          /* warm «live» accent — лампа на трассе */
  --amber-soft: rgba(255, 178, 77, 0.16);
  --red: #ff5b6b;            /* «нет» / stop */
  --red-soft: rgba(255, 91, 107, 0.16);
  --yellow: #ffc24d;
  --orange: #ff8a3d;
  --blue: #5b8cff;
  --gray: #8a96ad;

  --text-main: #f5f7fc;
  --text-muted: #9aa6bd;
  --text-dim: #687490;

  /* === elevation + motion === */
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 12px 30px rgba(0, 0, 0, 0.4);
  --glow-green: 0 0 0 1px rgba(51, 230, 160, 0.25), 0 16px 40px rgba(51, 230, 160, 0.18);
  --blur: 16px;
  --ease: 0.22s cubic-bezier(0.22, 0.8, 0.3, 1);

  /* === radius (precise instrument) === */
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 11px;

  /* === spacing === */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 20px;
  --s6: 24px;

  /* === LAYOUT TOKENS (single source of truth for desktop widths) === */
  --gutter: 16px;
  --panel-w: 372px;
  --right-reserve: 84px;
  --rail-x: calc(var(--gutter) + var(--panel-w) + var(--gutter));
  --rail-w: calc(100vw - var(--rail-x) - var(--gutter));
  --rail-w-inset: calc(100vw - var(--rail-x) - var(--right-reserve) - var(--gutter));
  --tap: 44px;
}

body.theme-day {
  --bg-main: #eef5f1;
  --bg-panel: rgba(248, 252, 250, 0.9);
  --bg-card: rgba(255, 255, 255, 0.92);
  --border: rgba(6, 46, 34, 0.12);
  --text-main: #06221a;
  --text-muted: #4f6c62;
  --shadow: 0 20px 56px rgba(11, 40, 30, 0.16);
  --shadow-sm: 0 8px 24px rgba(11, 40, 30, 0.12);
}

body.theme-night {
  --bg-main: #020605;
  --bg-panel: rgba(4, 10, 9, 0.9);
  --bg-card: rgba(8, 16, 14, 0.9);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body,
.app-shell,
#map {
  width: 100%;
  max-width: 100vw;
  height: 100%;
  margin: 0;
  overflow-x: hidden;
}

html {
  overflow: hidden;
}

body {
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(91, 140, 255, 0.1), transparent 55%),
    radial-gradient(90% 60% at 86% 4%, rgba(255, 178, 77, 0.08), transparent 50%),
    radial-gradient(100% 70% at 10% 100%, rgba(51, 230, 160, 0.07), transparent 55%),
    linear-gradient(180deg, #0c1019 0%, #090c13 60%, #0a0e16 100%),
    var(--bg-main);
  color: var(--text-main);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "cv11", "ss01", "tnum";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Numbers (distances, prices, counts) line up cleanly */
.search input,
.nearest-card,
.station-meta span,
.map-badge,
.status-legend,
#counter,
#mobileCounter,
.fuel-tabs button {
  font-variant-numeric: tabular-nums;
}

button,
input,
a {
  font: inherit;
}

button,
a {
  border: 0;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Visible keyboard focus for accessibility */
:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-radius: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

button,
.nearest-card,
.saved-card,
.alternative-card,
.desktop-panel,
.station-sheet,
.profile-sheet,
.install-sheet,
.search-panel,
.quick-panel,
.choice-panel,
.tabbar,
.search {
  transition:
    transform var(--ease),
    opacity var(--ease),
    border-color var(--ease),
    background var(--ease),
    box-shadow var(--ease);
}

.app-shell {
  position: relative;
  opacity: 1;
  transform: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.app-shell.is-loading {
  opacity: 0;
  transform: translateY(8px);
}

#map {
  position: relative;
  z-index: 1;
  background: #08100f;
}

.radar-pass {
  position: fixed;
  z-index: 2;
  inset: -18%;
  pointer-events: none;
  opacity: 0;
  background:
    linear-gradient(100deg, transparent 38%, rgba(35, 233, 129, 0.16) 48%, rgba(35, 233, 129, 0.02) 57%, transparent 68%),
    radial-gradient(circle at 50% 50%, rgba(35, 233, 129, 0.08), transparent 42%);
  mix-blend-mode: screen;
  transform: translate3d(-28%, 0, 0) rotate(-8deg);
  will-change: transform, opacity;
}

.radar-pass.is-active {
  animation: radar-pass 1.85s ease-out both;
}

/* Basemaps are now real dark/clean styles — only a subtle brand grade, no hue-mangling */
.leaflet-tile {
  filter: saturate(1.06) contrast(1.04) brightness(0.96);
}

body.theme-day .leaflet-tile {
  filter: saturate(1.02) contrast(1.02);
}

body.theme-night .leaflet-tile {
  filter: saturate(1.05) contrast(1.08) brightness(0.8);
}

.leaflet-container::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 350;
  pointer-events: none;
  box-shadow: inset 0 0 180px rgba(0, 0, 0, 0.55);
}

body.theme-day .leaflet-container::after {
  box-shadow: inset 0 0 150px rgba(18, 40, 32, 0.16);
}

.leaflet-control-attribution {
  display: none;
}

.leaflet-control-zoom {
  border: 0 !important;
  display: grid;
  gap: 6px;
}

.leaflet-control-zoom a {
  width: 44px !important;
  height: 44px !important;
  line-height: 44px !important;
  border: 1px solid var(--border) !important;
  border-radius: 14px !important;
  background: var(--bg-card) !important;
  color: var(--text-main) !important;
  font-size: 20px !important;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(var(--blur));
}

.leaflet-control-zoom a:hover {
  border-color: var(--green-border) !important;
  color: var(--green) !important;
}

.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  background:
    radial-gradient(circle at center, rgba(24, 242, 139, 0.14), transparent 34%),
    #050b0a;
  color: var(--text-main);
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader strong {
  font-size: clamp(28px, 7vw, 48px);
  line-height: 1;
}

.preloader p {
  margin: 0;
  color: var(--text-muted);
  font-weight: 700;
}

.radar-loader {
  position: relative;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(24, 242, 139, 0.34);
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle, transparent 0 28px, rgba(24, 242, 139, 0.14) 29px 30px),
    radial-gradient(circle, rgba(24, 242, 139, 0.18), transparent 66%);
  box-shadow:
    0 0 60px rgba(24, 242, 139, 0.26),
    inset 0 0 40px rgba(24, 242, 139, 0.12);
  overflow: hidden;
}

.radar-loader::before,
.radar-loader::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 50%;
  height: 1px;
  background: rgba(24, 242, 139, 0.24);
  transform-origin: left center;
}

.radar-loader::after {
  transform: rotate(90deg);
}

.radar-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(24, 242, 139, 0.7), rgba(24, 242, 139, 0.16) 42deg, transparent 72deg);
  animation: radar-spin 1.7s linear infinite;
}

.radar-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 18px rgba(24, 242, 139, 0.8);
  animation: radar-blink 1.6s ease-in-out infinite;
}

.dot-a {
  top: 48px;
  left: 104px;
}

.dot-b {
  top: 108px;
  left: 58px;
  animation-delay: 0.25s;
}

.dot-c {
  top: 126px;
  left: 128px;
  animation-delay: 0.55s;
}

@keyframes radar-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes radar-blink {
  50% {
    opacity: 0.35;
    transform: scale(0.72);
  }
}

.desktop-panel,
.station-sheet,
.profile-sheet,
.install-sheet,
.quick-panel,
.choice-panel,
.tabbar,
.suggest,
.map-badge,
.status-legend,
.trust-rail {
  border: 1px solid var(--border);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.025)),
    var(--bg-panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(var(--blur)) saturate(1.15);
}

.desktop-panel {
  position: fixed;
  z-index: 710;
  top: 16px;
  left: 16px;
  bottom: 16px;
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  gap: 12px;
  width: min(var(--panel-w), calc(100vw - var(--gutter) * 2));
  padding: 14px;
  border-radius: var(--radius-lg);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brand-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 12px;
  align-items: center;
}

.brand,
.mobile-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand strong,
.mobile-brand strong {
  display: block;
  color: var(--text-main);
  font-size: 21px;
  line-height: 1.05;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.brand-orbit {
  position: relative;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(24, 242, 139, 0.44);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(24, 242, 139, 0.22), transparent 68%);
  box-shadow: 0 0 32px rgba(24, 242, 139, 0.24);
}

.brand-orbit::before,
.brand-orbit::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(24, 242, 139, 0.28);
  border-radius: 50%;
}

.brand-orbit::after {
  inset: 17px;
}

.brand-orbit span {
  position: absolute;
  left: 20px;
  top: 8px;
  width: 7px;
  height: 18px;
  border-radius: 10px 10px 18px 18px;
  background: var(--green);
  box-shadow: 0 0 18px rgba(24, 242, 139, 0.9);
  transform: rotate(-25deg);
}

.icon-button {
  min-width: 48px;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 22px;
  font-weight: 900;
}

.icon-button:hover,
.quick-panel button:hover,
.nearest-card:hover,
.more-button:hover,
.tabbar button:hover {
  border-color: rgba(24, 242, 139, 0.42);
  box-shadow: 0 0 24px rgba(24, 242, 139, 0.12);
}

.search {
  position: relative;
  min-width: 0;
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.search input {
  width: 100%;
  height: 52px;
  border: 0;
  outline: 0;
  padding: 0 48px 0 16px;
  border-radius: inherit;
  background: transparent;
  color: var(--text-main);
  font-weight: 900;
}

.search input::placeholder {
  color: rgba(244, 255, 249, 0.46);
}

#searchClear {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-main);
  font-size: 22px;
}

.filter-card,
.nearest-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.035);
}

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

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.section-title b,
.section-title small {
  display: block;
}

.section-title b {
  color: var(--text-main);
  font-size: 13px;
  line-height: 1.15;
  text-transform: none;
}

.section-title small {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: none;
}

.section-title strong,
.section-title button {
  color: var(--green);
  font-size: 12px;
  text-transform: none;
}

.section-title button {
  display: grid;
  place-items: center;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 50%;
  background: var(--green-soft);
  font-size: 16px;
}

.fuel-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.fuel-tabs button,
.status-strip button,
.report-row button,
.route-row a,
.profile-actions button,
.save-button,
.more-button,
.filter-pill,
.tabbar button,
.choice-panel button,
.alternative-card button,
.saved-card button {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  font-weight: 900;
}

.fuel-tabs button.active,
.tabbar button.active {
  border-color: rgba(24, 242, 139, 0.38);
  background: rgba(24, 242, 139, 0.1);
  color: var(--green);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

#installBtn {
  border-color: rgba(24, 242, 139, 0.42);
  background:
    radial-gradient(circle at 20% 10%, rgba(24, 242, 139, 0.24), transparent 46%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(24, 242, 139, 0.08));
  color: var(--text-main);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.status-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.status-strip::-webkit-scrollbar {
  display: none;
}

.status-strip button {
  flex: 0 0 auto;
  padding: 0 14px;
}

.status.active {
  border-color: rgba(24, 242, 139, 0.64);
  background: var(--green-soft);
  color: var(--green);
}

.nearest-list,
.saved-list,
.alternatives {
  display: grid;
  gap: 10px;
}

.nearest-list {
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.nearest-card {
  position: relative;
  display: grid;
  grid-template-columns: 78px 46px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 76px;
  padding: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  text-align: left;
}

.nearest-card > span {
  min-width: 0;
  overflow: hidden;
}

.nearest-card.status-ok {
  border-color: rgba(35, 233, 129, 0.24);
}

.nearest-card.status-low {
  border-color: rgba(255, 210, 46, 0.24);
}

.nearest-card.status-queue {
  border-color: rgba(255, 122, 26, 0.26);
}

.nearest-card.status-out,
.nearest-card.status-limit {
  border-color: rgba(255, 77, 94, 0.28);
}

.card-status {
  display: grid;
  gap: 6px;
  align-content: center;
}

.card-status small {
  margin: 0;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
}

.station-logo {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.76) 34%, rgba(255, 255, 255, 0.08) 35%),
    linear-gradient(145deg, color-mix(in srgb, var(--brand-color, var(--green)) 86%, #ffffff 14%), rgba(255, 255, 255, 0.08));
  color: #06100d;
  font-weight: 1000;
  letter-spacing: -0.05em;
  box-shadow:
    0 10px 26px color-mix(in srgb, var(--brand-color, var(--green)) 30%, transparent),
    inset 0 0 18px rgba(255, 255, 255, 0.2);
}

.station-logo i {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--brand-color, var(--green));
  font-size: 12px;
  font-style: normal;
  line-height: 1;
}

.station-logo img {
  display: block;
  max-width: 34px;
  max-height: 28px;
  object-fit: contain;
}

.station-logo.has-logo {
  background:
    radial-gradient(circle at 26% 18%, rgba(255, 255, 255, 0.95), transparent 34%),
    rgba(255, 255, 255, 0.92);
}

.station-logo.has-logo img {
  filter: drop-shadow(0 4px 7px rgba(0, 0, 0, 0.22));
}

.brand-lukoil i,
.brand-magistral i {
  background: #ffffff;
  color: #e42520;
}

.brand-shell i {
  background: #fff4a8;
  color: #d41414;
}

.brand-teboil {
  background: linear-gradient(145deg, #ffffff, #dbeafe);
  color: #1d4ed8;
}

.brand-teboil i,
.brand-alliance i,
.brand-surgut i,
.brand-novatek i {
  background: #eef6ff;
  color: var(--brand-color);
}

.brand-taif,
.brand-topLine,
.brand-neftika {
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.9), transparent 34%),
    linear-gradient(145deg, color-mix(in srgb, var(--brand-color) 88%, #ffffff 12%), #062d1d);
  color: #ffffff;
}

.brand-taif i,
.brand-topLine i,
.brand-neftika i {
  background: rgba(255, 255, 255, 0.92);
  color: var(--brand-color);
}

.brand-opti i,
.brand-pods i {
  background: #101820;
  color: #ffd22e;
}

.brand-irbis i,
.brand-oktan i {
  background: #fff7ed;
  color: #ea580c;
}

.brand-nnk i,
.brand-trassa i,
.brand-magistral i {
  background: #ffffff;
  color: #dc2626;
}

.brand-rusoil i,
.brand-gazOil i,
.brand-sibneft i {
  background: #e0f2fe;
  color: #0284c7;
}

.brand-eka i,
.brand-ltk i {
  background: #ecfdf5;
  color: #16a34a;
}

.brand-baltneft i {
  background: #ccfbf1;
  color: #0f766e;
}

.brand-independent i {
  width: 34px;
  background: rgba(255, 255, 255, 0.84);
  color: #475569;
  font-size: 10px;
  letter-spacing: -0.08em;
}

.brand-unknown {
  background:
    radial-gradient(circle at 30% 22%, rgba(35, 233, 129, 0.36), transparent 40%),
    rgba(35, 233, 129, 0.1);
  color: var(--green);
}

.sheet-logo {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 58px;
  height: 58px;
  border-radius: 20px;
}

.nearest-card strong {
  display: block;
  overflow: hidden;
  color: var(--text-main);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nearest-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 18% 20%, rgba(35, 233, 129, 0.08), transparent 36%);
  pointer-events: none;
}

.nearest-card small {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nearest-card em {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: rgba(244, 247, 251, 0.38);
  font-size: 11px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  color: #03100b;
  font-size: 11px;
  font-weight: 1000;
  white-space: nowrap;
}

.fuel-code {
  display: block;
  margin-bottom: 6px;
  color: var(--green);
  font-size: 12px;
  font-weight: 1000;
  text-align: right;
}

.favorite-mini {
  position: absolute;
  right: 10px;
  bottom: 8px;
  color: rgba(244, 255, 249, 0.42);
  font-size: 14px;
}

.favorite-mini.saved {
  color: var(--green);
  text-shadow: 0 0 16px rgba(24, 242, 139, 0.5);
}

.more-button {
  width: 100%;
  background: var(--green-soft);
  color: var(--green);
}

.state-box {
  padding: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.035);
}

.state-box strong {
  display: block;
  margin-bottom: 5px;
  color: var(--text-main);
}

.mobile-header,
.mobile-tools,
.mobile-top-search,
.mobile-filter-bar,
.search-mobile {
  display: none;
}

.suggest {
  position: static;
  display: grid;
  gap: 8px;
  width: 100%;
  max-height: min(44vh, 420px);
  overflow: auto;
  border-radius: var(--radius-md);
}

.suggest button {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-main);
  text-align: left;
}

.suggest button:hover {
  background: var(--green-soft);
}

.suggest small {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
}

.suggest strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-logo {
  width: 42px;
  height: 42px;
}

.city-result {
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 1000;
}

.suggest-empty {
  padding: 16px;
  color: var(--text-muted);
}

.suggest-empty strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text-main);
}

.search-panel {
  position: fixed;
  z-index: 785;
  top: 86px;
  left: var(--rail-x);
  display: grid;
  gap: 14px;
  width: min(540px, var(--rail-w));
  padding: 18px;
  border-radius: var(--radius-lg);
  animation: sheet-in 0.24s ease both;
}

.search-modal-form {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.07);
}

.search-modal-form input {
  width: 100%;
  height: 54px;
  border: 0;
  outline: 0;
  padding: 0 54px 0 16px;
  border-radius: inherit;
  background: transparent;
  color: var(--text-main);
  font-weight: 1000;
}

.search-modal-form button {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 1000;
}

.search-panel h2 {
  margin: 0;
  color: var(--text-main);
  font-size: clamp(24px, 4vw, 36px);
  letter-spacing: -0.05em;
}

.search-panel-grid {
  display: grid;
  gap: 14px;
}

.search-panel-grid strong {
  display: block;
  margin-bottom: 10px;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
}

.quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-chips button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-main);
  font-weight: 900;
}

.quick-chips button:hover {
  border-color: var(--green-border);
  color: var(--green);
  background: var(--green-soft);
}

.quick-panel {
  position: fixed;
  z-index: 730;
  top: 16px;
  right: 16px;
  display: grid;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.quick-panel button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  min-height: 52px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03)),
    var(--bg-panel);
  color: var(--text-main);
  font-size: 0;
  font-weight: 900;
  box-shadow: var(--shadow);
  backdrop-filter: blur(var(--blur));
}

.quick-panel .control-toggle {
  display: none;
}

.quick-panel span {
  color: var(--green);
  font-size: 20px;
}

.choice-panel {
  position: fixed;
  z-index: 780;
  top: 164px;
  right: 16px;
  display: grid;
  gap: 8px;
  width: 260px;
  padding: 12px;
  border-radius: var(--radius-md);
}

.choice-panel h2 {
  margin: 0 0 4px;
  color: var(--text-main);
  font-size: 15px;
}

.choice-panel button.active {
  border-color: rgba(24, 242, 139, 0.58);
  color: var(--green);
  background: var(--green-soft);
}

.trust-rail {
  position: fixed;
  z-index: 704;
  top: 92px;
  right: var(--right-reserve);
  display: grid;
  gap: 14px;
  width: min(330px, var(--rail-w-inset));
  padding: 18px;
  border-radius: 26px;
}

.trust-rail h2 {
  margin: 0;
  color: var(--text-main);
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.trust-rail p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.trust-rail span {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px 10px;
  align-items: center;
}

.trust-rail i {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(35, 233, 129, 0.44);
  border-radius: 14px;
  background: rgba(35, 233, 129, 0.12);
  color: var(--green);
  font-style: normal;
  font-weight: 1000;
  box-shadow: 0 0 24px rgba(35, 233, 129, 0.12);
}

.trust-rail b {
  color: var(--text-main);
  font-size: 13px;
}

.trust-rail small {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.3;
}

.map-badge {
  position: fixed;
  z-index: 705;
  top: 16px;
  left: var(--rail-x);
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 16px;
  color: var(--text-muted);
  font-size: 13px;
}

.map-badge strong {
  color: var(--green);
}

.status-legend {
  position: fixed;
  z-index: 706;
  left: 50%;
  bottom: 92px;
  display: none;
  gap: 8px;
  align-items: center;
  max-width: var(--rail-w-inset);
  min-height: 42px;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 900;
  transform: translateX(-50%);
}

.status-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.status-legend i {
  display: block;
  width: 10px;
  height: 10px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: var(--legend-color);
  box-shadow: 0 0 16px color-mix(in srgb, var(--legend-color) 70%, transparent);
}

.status-legend .ok {
  --legend-color: var(--green);
}

.status-legend .low {
  --legend-color: var(--yellow);
}

.status-legend .queue {
  --legend-color: var(--orange);
}

.status-legend .out {
  --legend-color: var(--red);
}

.status-legend .unknown {
  --legend-color: var(--gray);
}

.station-sheet,
.profile-sheet,
.install-sheet {
  position: fixed;
  z-index: 790;
  right: 16px;
  bottom: 16px;
  display: grid;
  gap: 12px;
  width: min(430px, calc(100vw - var(--gutter) * 2));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 18px;
  border-radius: var(--radius-lg);
  animation: sheet-in 0.24s ease both;
}

.sheet-handle {
  display: none;
  touch-action: none;
  cursor: ns-resize;
}

.sheet-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  font-size: 24px;
}

.sheet-kicker {
  max-width: calc(100% - 44px);
  margin: 0;
  color: var(--green);
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
}

.station-sheet h1,
.profile-sheet h1,
.install-sheet h1 {
  max-width: calc(100% - 44px);
  margin: 0;
  color: var(--text-main);
  font-size: clamp(27px, 6vw, 38px);
  line-height: 1.04;
  overflow-wrap: anywhere;
}

.station-sheet p,
.profile-sheet p,
.install-sheet p {
  margin: 0;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.station-sheet .sheet-kicker,
.station-sheet h1,
.station-sheet > p:not(.sheet-kicker) {
  padding-left: 72px;
}

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

.station-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 900;
}

.route-row,
.profile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.profile-actions #shareRadarBtn {
  grid-column: 1 / -1;
}

.safety-card {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid rgba(35, 233, 129, 0.2);
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 8% 20%, rgba(35, 233, 129, 0.14), transparent 34%),
    rgba(255, 255, 255, 0.045);
}

.safety-card strong {
  color: var(--text-main);
}

.safety-card small {
  color: var(--text-muted);
  line-height: 1.45;
}

.install-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.install-actions button {
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-main);
  font-weight: 1000;
}

.install-actions button:first-child {
  border-color: rgba(24, 242, 139, 0.54);
  background: var(--green);
  color: #03100b;
}

.route-row a {
  display: grid;
  place-items: center;
}

.route-row a:first-child,
.save-button.saved {
  border-color: rgba(24, 242, 139, 0.54);
  background: var(--green);
  color: #03100b;
}

.save-button {
  width: 100%;
}

.report-block {
  display: grid;
  gap: var(--s2);
  padding: var(--s3);
  border: 1px solid var(--green-border);
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 10% 0%, rgba(37, 232, 138, 0.1), transparent 50%),
    rgba(255, 255, 255, 0.03);
}

.report-label {
  margin: 0;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 800;
}

.report-hint {
  margin: -2px 0 2px;
  color: var(--text-muted);
  font-size: 12px;
}

.report-matrix {
  display: grid;
  gap: var(--s2);
}

.rep-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: var(--s3);
  align-items: center;
}

.rep-fuel {
  display: grid;
  place-items: center;
  min-height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 1000;
}

.rep-states {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.rep-states button {
  min-height: 46px;
  padding: 0 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 800;
}

.rep-states button:active {
  transform: scale(0.95);
}

.rep-states button.ok.active {
  border-color: transparent;
  background: var(--green);
  color: #06140f;
}
.rep-states button.low.active {
  border-color: transparent;
  background: var(--yellow);
  color: #06140f;
}
.rep-states button.queue.active {
  border-color: transparent;
  background: var(--orange);
  color: #fff;
}
.rep-states button.limit.active,
.rep-states button.out.active {
  border-color: transparent;
  background: var(--red);
  color: #fff;
}

.report-submit {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--green-border);
  border-radius: 16px;
  background: var(--green);
  color: #06140f;
  font-weight: 900;
  font-size: 15px;
}

.report-submit:disabled {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim, var(--text-muted));
  cursor: not-allowed;
}

.report-row .ok,
.status-chip.ok {
  background: var(--green);
}

.report-row .low,
.status-chip.low {
  background: var(--yellow);
}

.report-row .queue,
.status-chip.queue {
  background: var(--orange);
}

.report-row .limit,
.report-row .out,
.status-chip.limit,
.status-chip.out {
  background: var(--red);
}

.status-chip.unknown {
  background: var(--gray);
  color: #06100d;
}

.alternative-card,
.saved-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.045);
}

.next-card {
  display: grid;
  gap: var(--s3);
  padding: var(--s4);
  border: 1px solid var(--green-border);
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 0% 0%, rgba(37, 232, 138, 0.14), transparent 52%),
    rgba(255, 255, 255, 0.03);
  animation: sheet-in 0.24s ease both;
}

.next-card.empty {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.next-card.empty strong { display: block; color: var(--text-main); }
.next-card.empty small { display: block; margin-top: 4px; color: var(--text-muted); }

.next-kicker {
  color: var(--green);
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.next-head {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: var(--s3);
  align-items: center;
}

.next-head strong { display: block; font-size: 16px; }
.next-head small { display: block; margin-top: 3px; color: var(--text-muted); font-size: 13px; }

.next-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s2);
}

.next-route {
  display: grid;
  place-items: center;
  min-height: 50px;
  padding: 0 20px;
  border-radius: 14px;
  background: var(--green);
  color: #06140f;
  font-weight: 900;
}

.next-route.alt {
  min-width: 64px;
  padding: 0 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
}

.next-open {
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-weight: 800;
  font-size: 13px;
}

.saved-station-card {
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
}

.saved-station-card button {
  grid-column: 1 / -1;
}

.empty-saved {
  min-height: 160px;
  align-content: center;
  background:
    radial-gradient(circle at 86% 16%, rgba(35, 233, 129, 0.16), transparent 38%),
    rgba(255, 255, 255, 0.045);
}

.alternative-card strong,
.saved-card strong {
  color: var(--text-main);
}

.alternative-card small,
.saved-card small {
  color: var(--text-muted);
}

.alternative-card button,
.saved-card button {
  min-height: 38px;
}

.tabbar {
  position: fixed;
  z-index: 735;
  right: 16px;
  bottom: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
  gap: 8px;
  width: 382px;
  padding: 8px;
  border-radius: var(--radius-md);
}

.fuel-marker {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 50% 50% 50% 12px;
  color: #ffffff;
  background: var(--marker-color, var(--gray));
  box-shadow:
    0 0 0 7px color-mix(in srgb, var(--marker-color, var(--gray)) 18%, transparent),
    0 0 30px color-mix(in srgb, var(--marker-color, var(--gray)) 46%, transparent),
    0 18px 34px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  transform: rotate(-45deg);
  animation: marker-pop 0.36s cubic-bezier(0.2, 1.35, 0.3, 1) both;
  will-change: transform;
}

.fuel-marker svg {
  position: relative;
  z-index: 2;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.28));
  transform: rotate(45deg);
}

.fuel-marker::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 28%, rgba(255, 255, 255, 0.62), transparent 28%),
    rgba(255, 255, 255, 0.1);
}

.fuel-marker::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: var(--marker-color, var(--gray));
  opacity: 0.18;
  filter: blur(10px);
}

.fuel-marker:hover {
  transform: rotate(-45deg) scale(1.14);
}

.fuel-marker.active {
  z-index: 3;
  transform: rotate(-45deg) scale(1.28);
  box-shadow:
    0 0 0 10px color-mix(in srgb, var(--marker-color, var(--green)) 22%, transparent),
    0 0 42px color-mix(in srgb, var(--marker-color, var(--green)) 68%, transparent),
    0 20px 42px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.fuel-marker.active::before {
  animation: marker-ripple 1.45s ease-out infinite;
}

.fuel-marker.ok {
  --marker-color: var(--green);
}

.fuel-marker.low {
  --marker-color: var(--yellow);
}

.fuel-marker.queue {
  --marker-color: var(--orange);
}

.fuel-marker.limit,
.fuel-marker.out {
  --marker-color: var(--red);
}

.fuel-marker.unknown {
  --marker-color: var(--gray);
}

.fuel-marker.user {
  --marker-color: var(--blue);
}

@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@keyframes marker-pop {
  from {
    opacity: 0;
    transform: rotate(-45deg) scale(0.42);
  }
  to {
    opacity: 1;
    transform: rotate(-45deg) scale(1);
  }
}

@keyframes marker-ripple {
  from {
    opacity: 0.42;
    transform: scale(0.82);
  }
  to {
    opacity: 0;
    transform: scale(2.45);
  }
}

@keyframes radar-pass {
  0% {
    opacity: 0;
    transform: translate3d(-38%, 0, 0) rotate(-10deg);
  }
  16% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(38%, 0, 0) rotate(7deg);
  }
}

@media (max-width: 1024px) {
  /* One change cascades to the panel, badge, search rail and legend. */
  :root {
    --panel-w: 340px;
  }

  .trust-rail {
    display: none;
  }
}

@media (max-width: 768px) {
  body.map-clean .station-sheet,
  body.map-clean .profile-sheet,
  body.map-clean .install-sheet,
  body.map-clean .search-panel {
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px);
  }

  .desktop-panel {
    display: contents;
  }

  .desktop-panel > .brand-card,
  .desktop-panel > .search-desktop,
  .desktop-panel > .filter-card {
    display: none;
  }

  .trust-rail {
    display: none;
  }

  .mobile-header {
    position: fixed;
    z-index: 730;
    top: max(10px, env(safe-area-inset-top));
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    align-items: center;
    gap: 8px;
  }

  .mobile-tools {
    position: fixed;
    z-index: 728;
    top: calc(max(10px, env(safe-area-inset-top)) + 58px);
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    display: grid;
    grid-template-columns: minmax(112px, 0.58fr) minmax(0, 1fr);
    gap: 8px;
  }

  .city-pill,
  .mobile-top-search {
    min-height: 46px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
      var(--bg-panel);
    color: var(--text-main);
    box-shadow: var(--shadow);
    backdrop-filter: blur(var(--blur));
  }

  .city-pill {
    padding: 0 12px;
    overflow: hidden;
    font-size: 13px;
    font-weight: 1000;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-top-search {
    position: relative;
    display: block;
  }

  .mobile-top-search input {
    width: 100%;
    height: 46px;
    border: 0;
    outline: 0;
    padding: 0 44px 0 14px;
    border-radius: inherit;
    background: transparent;
    color: var(--text-main);
    font-weight: 900;
  }

  .mobile-top-search input::placeholder {
    color: rgba(244, 247, 251, 0.46);
  }

  .mobile-top-search button {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    font-weight: 1000;
  }

  .mobile-brand {
    min-height: 48px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--bg-panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(var(--blur));
  }

  .mobile-brand .brand-orbit {
    width: 34px;
    height: 34px;
  }

  .mobile-brand .brand-orbit span {
    left: 14px;
    top: 6px;
    height: 13px;
  }

  .mobile-brand strong {
    overflow: hidden;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-filter-bar {
    position: fixed;
    z-index: 725;
    top: calc(max(10px, env(safe-area-inset-top)) + 112px);
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .mobile-filter-bar {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
  }

  body.filters-open .mobile-filter-bar {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .mobile-fuels,
  .filter-pill {
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--bg-panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(var(--blur));
  }

  .mobile-fuels button {
    min-height: 38px;
    padding-inline: 4px;
  }

  .filter-pill {
    min-width: 92px;
  }

  .search-desktop {
    display: none;
  }

  .search-mobile {
    display: block;
  }

  .quick-panel {
    top: calc(max(10px, env(safe-area-inset-top)) + 122px);
    right: max(10px, env(safe-area-inset-right));
    gap: 8px;
  }

  .quick-panel button {
    justify-content: flex-start;
    width: auto;
    min-width: 46px;
    height: 46px;
    min-height: 46px;
    padding: 0 13px;
    border-radius: 999px;
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(8px) scale(0.96);
  }

  .quick-panel:not(.is-open) button:not(.control-toggle) {
    display: none;
  }

  .quick-panel span {
    font-size: 18px;
    min-width: 20px;
  }

  .quick-panel .control-toggle {
    display: flex;
    justify-content: center;
    width: 46px;
    padding: 0;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    font-size: 0;
    justify-self: end;
  }

  .quick-panel.is-open button {
    display: flex;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .quick-panel.is-open .control-toggle {
    border-color: rgba(24, 242, 139, 0.48);
    background: var(--green-soft);
    color: var(--green);
  }

  body.show-control-hint .quick-panel::after {
    content: "Управление картой";
    position: absolute;
    top: 5px;
    right: calc(100% + 10px);
    width: max-content;
    max-width: 170px;
    padding: 9px 11px;
    border: 1px solid rgba(24, 242, 139, 0.26);
    border-radius: 14px;
    background: rgba(5, 13, 17, 0.82);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
    color: var(--text);
    font-size: 12px;
    line-height: 1.2;
    backdrop-filter: blur(16px);
  }

  .choice-panel {
    top: calc(max(10px, env(safe-area-inset-top)) + 122px);
    right: max(10px, env(safe-area-inset-right));
  }

  .map-badge {
    top: calc(max(10px, env(safe-area-inset-top)) + 122px);
    left: max(10px, env(safe-area-inset-left));
    max-width: calc(100vw - 86px);
  }

  .status-legend {
    display: none;
  }

  .status-legend::-webkit-scrollbar {
    display: none;
  }

  .status-legend i {
    width: 9px;
    height: 9px;
  }

  .nearest-panel {
    position: fixed;
    z-index: 750;
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    bottom: calc(max(82px, env(safe-area-inset-bottom) + 70px));
    display: grid;
    max-height: 80px;
    overflow: hidden;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 26px 26px 20px 20px;
    background: var(--bg-panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(var(--blur));
  }

  .nearest-panel.is-open {
    max-height: min(62dvh, 520px);
  }

  .nearest-panel::before {
    content: "";
    justify-self: center;
    width: 48px;
    height: 4px;
    margin-bottom: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
  }

  .nearest-panel:not(.is-open)::before {
    display: none;
  }

  .nearest-panel:not(.is-open) {
    align-content: center;
  }

  .nearest-panel:not(.is-open) .section-title {
    min-height: 56px;
  }

  .nearest-panel:not(.is-open) .search-mobile,
  .nearest-panel:not(.is-open) .state-box,
  .nearest-panel:not(.is-open) .nearest-list,
  .nearest-panel:not(.is-open) .more-button {
    display: none;
  }

  .nearest-list {
    max-height: 30vh;
  }

  .station-sheet,
  .profile-sheet,
  .install-sheet,
  .search-panel {
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    width: auto;
    border-radius: 30px 30px 22px 22px;
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }

  .station-sheet,
  .profile-sheet,
  .install-sheet {
    bottom: calc(max(88px, env(safe-area-inset-bottom) + 76px));
    top: auto;
    max-height: min(78dvh, 640px);
  }

  .station-sheet.sheet-full {
    top: calc(max(10px, env(safe-area-inset-top)) + 64px);
    bottom: calc(max(88px, env(safe-area-inset-bottom) + 76px));
    max-height: none;
  }

  .search-panel {
    top: calc(max(10px, env(safe-area-inset-top)) + 64px);
    bottom: calc(max(86px, env(safe-area-inset-bottom) + 76px));
    max-height: none;
    overflow: auto;
  }

  .sheet-handle {
    display: block;
    justify-self: center;
    width: 48px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
  }

  .tabbar {
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    width: auto;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 7px;
    border-radius: 24px;
  }

  .tabbar button {
    display: grid;
    place-items: center;
    gap: 2px;
    min-height: 52px;
    padding: 5px 3px;
    font-size: 11px;
    line-height: 1;
  }

  .tabbar button span {
    display: block;
    color: currentColor;
    font-size: 18px;
    line-height: 1;
  }

  .tabbar button.active {
    border-color: rgba(24, 242, 139, 0.36);
    background: rgba(24, 242, 139, 0.08);
    box-shadow: none;
  }

  .tabbar button b {
    font-size: 10px;
    line-height: 1;
  }

  #installBtn {
    letter-spacing: -0.02em;
  }

  .report-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .mobile-brand strong {
    font-size: 14px;
  }

  .brand-orbit {
    width: 38px;
    height: 38px;
  }

  .station-sheet h1,
  .profile-sheet h1 {
    font-size: 26px;
  }

  .route-row,
  .profile-actions {
    grid-template-columns: 1fr;
  }

  .nearest-card {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .nearest-card .card-status {
    grid-column: 1 / -1;
    grid-template-columns: auto 1fr;
    align-items: center;
  }

  .nearest-card > .station-logo {
    grid-column: 1;
  }

  .nearest-card > span:not(.station-logo):not(.card-status) {
    grid-column: 2;
    min-width: 0;
  }

  .mobile-tools {
    grid-template-columns: 108px minmax(0, 1fr);
  }

  .mobile-top-search input {
    font-size: 13px;
  }

  .station-sheet .sheet-kicker,
  .station-sheet h1,
  .station-sheet > p:not(.sheet-kicker) {
    padding-left: 64px;
  }

  .sheet-logo {
    width: 52px;
    height: 52px;
  }
}

@media (max-width: 360px) {
  .mobile-brand strong {
    max-width: 150px;
  }

  .tabbar button {
    padding: 0 3px;
    font-size: 11px;
  }

  .tabbar button b {
    font-size: 9px;
  }

  .city-pill {
    font-size: 12px;
  }
}

/* ============================================================
   Любой экран: ландшафт, автомагнитола, короткие экраны
   ============================================================ */
@media (max-height: 600px) and (orientation: landscape) {
  /* Мобильные нижние шторки (узкие экраны в ландшафте) */
  .station-sheet,
  .profile-sheet,
  .install-sheet,
  .search-panel {
    top: 8px;
    bottom: 8px;
    max-height: calc(100dvh - 16px);
    padding: 14px;
  }

  .station-sheet h1,
  .profile-sheet h1,
  .install-sheet h1 {
    font-size: 24px;
  }

  .nearest-panel.is-open {
    max-height: calc(100dvh - 80px);
  }

  /* Десктоп-раскладка на коротких экранах магнитолы */
  .desktop-panel {
    top: 8px;
    left: 8px;
    bottom: 8px;
    gap: 8px;
    padding: 10px;
  }

  .quick-panel {
    top: 8px;
    right: 8px;
  }

  .trust-rail {
    display: none;
  }
}

/* Очень короткие экраны (старые магнитолы ~480px высоты) */
@media (max-height: 480px) {
  .station-sheet,
  .profile-sheet,
  .install-sheet,
  .search-panel {
    border-radius: 16px;
  }

  .report-block {
    gap: 6px;
    padding: 10px;
  }

  .rep-row {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
  }

  .rep-states button,
  .report-submit {
    min-height: 40px;
  }
}

/* Планшеты в портрете — даём комфортную ширину панели и крупнее шрифт */
@media (min-width: 768px) and (max-width: 1180px) and (orientation: portrait) {
  :root {
    --panel-w: 380px;
  }
}

/* Широкие экраны / большие мониторы — не растягиваем контент бесконечно */
@media (min-width: 1600px) {
  .trust-rail {
    width: min(360px, var(--rail-w-inset));
  }
}

/* ============================================================
   v27 — «НОЧНОЙ ПРИБОРНЫЙ ЩИТОК» · премиальный редизайн-слой
   ============================================================ */

/* — Стекло панелей: глубже, тоньше кант, верхний блик — */
.desktop-panel,
.station-sheet,
.profile-sheet,
.install-sheet,
.quick-panel,
.choice-panel,
.tabbar,
.suggest,
.map-badge,
.status-legend,
.trust-rail,
.search-panel {
  border: 1px solid var(--hair);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 38%),
    var(--bg-panel);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(var(--blur)) saturate(1.2);
}

.desktop-panel {
  border-radius: var(--radius-lg);
}

/* — Бренд-марка: точный датчик с тёплым ядром — */
.brand-orbit {
  border-color: rgba(51, 230, 160, 0.5);
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 178, 77, 0.28), transparent 60%),
    radial-gradient(circle, rgba(51, 230, 160, 0.22), transparent 70%);
  box-shadow: 0 0 26px rgba(51, 230, 160, 0.22), inset 0 0 14px rgba(255, 178, 77, 0.12);
}
.brand-orbit span {
  background: linear-gradient(180deg, #b9ffe4, var(--green));
  box-shadow: 0 0 16px rgba(51, 230, 160, 0.9);
}
.brand strong,
.mobile-brand strong {
  letter-spacing: -0.02em;
}
.brand small {
  color: var(--text-dim);
  letter-spacing: 0.12em;
}

/* — Микро-лейблы секций: разрядка, точность — */
.section-title {
  letter-spacing: 0.1em;
  color: var(--text-dim);
}
.section-title strong,
#updatedAt,
.map-badge strong {
  color: var(--amber);
  text-shadow: 0 0 18px rgba(255, 178, 77, 0.35);
}

/* — Поиск: утопленное поле прибора — */
.search,
.search-modal-form,
.mobile-top-search,
.city-pill {
  border: 1px solid var(--hair);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(255, 255, 255, 0.02)),
    var(--bg-card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.search input::placeholder,
.search-modal-form input::placeholder,
.mobile-top-search input::placeholder {
  color: var(--text-dim);
}

/* — Сегменты топлива/статуса: тактильные кнопки прибора — */
.fuel-tabs button,
.status-strip button,
.profile-actions button,
.more-button,
.filter-pill,
.tabbar button {
  border: 1px solid var(--hair);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
    rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.fuel-tabs button.active {
  border-color: var(--green-border);
  background:
    linear-gradient(180deg, rgba(51, 230, 160, 0.22), rgba(51, 230, 160, 0.08));
  color: #04130d;
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(51, 230, 160, 0.3), 0 10px 24px rgba(51, 230, 160, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  text-shadow: 0 0 14px rgba(51, 230, 160, 0.5);
}
.status.active {
  border-color: var(--green-border);
  background: var(--green-soft);
  color: var(--green);
}

/* — Карточки «рядом»: тактильный ряд приборки — */
.nearest-card {
  border: 1px solid var(--hair);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
    var(--bg-card);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.nearest-card::before { display: none; }
.nearest-card.status-ok { border-color: rgba(51, 230, 160, 0.3); }
.nearest-card.status-out,
.nearest-card.status-limit { border-color: rgba(255, 91, 107, 0.3); }
.nearest-card strong { letter-spacing: -0.01em; font-size: 16px; }

/* — Статус-чипы: чистые пилюли с тонким кантом — */
.status-chip {
  min-height: 26px;
  padding: 0 11px;
  font-size: 11px;
  letter-spacing: 0.02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.status-chip.ok { background: linear-gradient(180deg, #5af0b6, var(--green)); color: #03130d; }
.status-chip.out, .status-chip.limit { background: linear-gradient(180deg, #ff7b88, var(--red)); color: #fff; }
.status-chip.unknown { background: #2a3242; color: var(--text-muted); box-shadow: inset 0 0 0 1px var(--hair); }

/* — Логотип станции: чуть холоднее подложка — */
.station-logo { border-radius: 14px; box-shadow: 0 8px 20px rgba(0,0,0,0.35), inset 0 0 16px rgba(255,255,255,0.12); }

/* — Шторка станции: герой-карточка — */
.station-sheet,
.profile-sheet,
.install-sheet {
  border-radius: var(--radius-lg);
}
.station-sheet h1,
.profile-sheet h1,
.install-sheet h1 { letter-spacing: -0.03em; }
.sheet-kicker { color: var(--amber); letter-spacing: 0.1em; }
.station-meta span {
  border: 1px solid var(--hair);
  background: rgba(255, 255, 255, 0.04);
}

/* — Маршрут / основная кнопка — */
.route-row a:first-child,
.save-button.saved,
.install-actions button:first-child,
.next-route {
  background: linear-gradient(180deg, #5af0b6, var(--green));
  color: #03130d;
  box-shadow: 0 12px 30px rgba(51, 230, 160, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* — Отметка: блок «приборная вставка» — */
.report-block {
  border-color: var(--green-border);
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(51, 230, 160, 0.12), transparent 55%),
    rgba(255, 255, 255, 0.025);
}
.rep-fuel {
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  letter-spacing: -0.01em;
}
.rep-states button { font-weight: 800; }
.rep-states button.ok.active {
  background: linear-gradient(180deg, #5af0b6, var(--green));
  color: #03130d;
  box-shadow: 0 8px 20px rgba(51, 230, 160, 0.26), inset 0 1px 0 rgba(255,255,255,0.3);
}
.rep-states button.out.active {
  background: linear-gradient(180deg, #ff7b88, var(--red));
  color: #fff;
  box-shadow: 0 8px 20px rgba(255, 91, 107, 0.26), inset 0 1px 0 rgba(255,255,255,0.22);
}
.report-submit {
  border-color: var(--green-border);
  background: linear-gradient(180deg, #5af0b6, var(--green));
  color: #03130d;
  box-shadow: 0 12px 30px rgba(51, 230, 160, 0.26), inset 0 1px 0 rgba(255,255,255,0.3);
  letter-spacing: -0.01em;
}
.report-submit:disabled {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--hair);
  color: var(--text-dim);
  box-shadow: none;
}

/* — Карточка «дальше с топливом» — */
.next-card { border-color: var(--green-border); }
.next-kicker { color: var(--amber); }

/* — Нижняя навигация — */
.tabbar button.active {
  border-color: var(--green-border);
  background: linear-gradient(180deg, rgba(51, 230, 160, 0.16), rgba(51, 230, 160, 0.05));
  color: var(--green);
}

/* — Маркеры на карте: премиальная капля — */
.fuel-marker {
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 0 0 6px color-mix(in srgb, var(--marker-color, var(--gray)) 16%, transparent),
    0 0 28px color-mix(in srgb, var(--marker-color, var(--gray)) 50%, transparent),
    0 16px 30px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* — Прелоадер: тёплое ядро датчика — */
.preloader {
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 178, 77, 0.1), transparent 30%),
    radial-gradient(circle at center, rgba(51, 230, 160, 0.12), transparent 36%),
    var(--ink);
}
.preloader strong { letter-spacing: -0.03em; }
.radar-sweep {
  background: conic-gradient(from 0deg, rgba(255, 178, 77, 0.7), rgba(51, 230, 160, 0.18) 46deg, transparent 78deg);
}
.radar-dot { background: var(--amber); box-shadow: 0 0 18px rgba(255, 178, 77, 0.9); }

/* — Кнопки-иконки и быстрые контролы — */
.icon-button,
.quick-panel button {
  border: 1px solid var(--hair);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)),
    var(--bg-panel);
}
.quick-panel span { color: var(--green); }
