/*
 * «Мой гараж», направление A — интерфейс в цвет твоей машины: фон — глубокий оттенок её цвета
 * (--bg и --accent ставит app.js), данные — на полупрозрачных карточках поверх этого оттенка,
 * стекло — только для слоя управления. Главная цифра — крупная и тонкая, как температура в «Погоде».
 */
:root {
  --bg: #131416;
  --card: rgba(255, 255, 255, 0.06);
  --inset: rgba(255, 255, 255, 0.06);
  --label: #ffffff;
  --label2: rgba(255, 255, 255, 0.62);
  --sep: rgba(255, 255, 255, 0.08);
  --fill: rgba(255, 255, 255, 0.1);
  --skel: rgba(255, 255, 255, 0.08);
  --field: rgba(255, 255, 255, 0.08);
  --accent: #f2f2f2;
  --on-accent: #111214;
  --accent-bg: rgba(255, 255, 255, 0.1);
  --accent-text: #ffffff;
  --green: #7ce0a0;
  --green-bg: rgba(124, 224, 160, 0.14);
  --orange: #ffb35c;
  --orange-bg: rgba(255, 179, 92, 0.14);
  --red: #ff6961;
  --neutral-bg: rgba(255, 255, 255, 0.1);
  --chart-area: rgba(255, 255, 255, 0.06);
  --chart-line: rgba(255, 255, 255, 0.85);
  --ring-gap: #202023;
  --thumb: #636366;
  --grabber: rgba(235, 235, 245, 0.3);
  --sheet-fill: rgba(28, 28, 30, 0.82);
  --sheet-rim: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 0 0 0.5px rgba(255, 255, 255, 0.08), 0 -2px 32px rgba(0, 0, 0, 0.45);
  --sheet-solid: rgba(28, 28, 30, 0.97);
  --action-fill: rgba(44, 44, 48, 0.86);
  --action-solid: #2c2c2e;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", Roboto, "Segoe UI", system-ui, sans-serif;
  --spring-snappy: linear(0, 0.157 4.8%, 0.533 11.3%, 0.832 18.7%, 0.951 23.6%, 1.027 29%, 1.06 34.9%, 1.064 40.6%, 1.035 51.7%, 1.006 66.9%, 0.998 81.4%, 1);
  --spring-smooth: cubic-bezier(0.32, 0.72, 0, 1);
  --scene-h: 470px;
  /* нижняя безопасная зона: системная или та, что сообщает Telegram (Bot API 8+) */
  --safe-b: max(env(safe-area-inset-bottom), var(--tg-safe-area-inset-bottom, 0px));
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #efeff1;
  --card: #ffffff;
  --inset: rgba(20, 16, 17, 0.04);
  --label: #141011;
  --label2: rgba(20, 16, 17, 0.62);
  --sep: rgba(20, 16, 17, 0.08);
  --fill: rgba(20, 16, 17, 0.06);
  --skel: rgba(20, 16, 17, 0.07);
  --field: #ffffff;
  --accent: #1c1d20;
  --on-accent: #ffffff;
  --accent-bg: rgba(20, 16, 17, 0.06);
  --accent-text: #141011;
  --green: #1f7a36;
  --green-bg: rgba(52, 199, 89, 0.14);
  --orange: #b24a00;
  --orange-bg: rgba(255, 149, 0, 0.15);
  --red: #c4141f;
  --neutral-bg: rgba(20, 16, 17, 0.06);
  --chart-area: rgba(20, 16, 17, 0.04);
  --chart-line: rgba(20, 16, 17, 0.8);
  --ring-gap: #f4f4f7;
  --thumb: #ffffff;
  --grabber: rgba(60, 60, 67, 0.3);
  --sheet-fill: rgba(246, 246, 249, 0.86);
  --sheet-rim: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 0 0 0.5px rgba(0, 0, 0, 0.06), 0 -2px 32px rgba(0, 0, 0, 0.18);
  --sheet-solid: rgba(246, 246, 249, 0.98);
  --action-fill: rgba(249, 249, 251, 0.88);
  --action-solid: #f2f2f7;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  background: var(--bg);
  transition: background-color 600ms var(--spring-smooth);
  color: var(--label);
  font: 17px/22px var(--font);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
.num { font-variant-numeric: tabular-nums; }
.ico { flex: none; display: block; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- стекло */

.glass {
  --glass-fill: rgba(30, 30, 34, 0.34);
  color: #ffffff;
  background: var(--glass-fill);
  -webkit-backdrop-filter: blur(24px) saturate(170%) brightness(1.12);
  backdrop-filter: blur(24px) saturate(170%) brightness(1.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26), inset 0 0 0 0.5px rgba(255, 255, 255, 0.16), 0 8px 28px rgba(0, 0, 0, 0.36);
}
.glass .sub2 { color: rgba(255, 255, 255, 0.8); }
.glass[data-tone="light"] {
  --glass-fill: rgba(255, 255, 255, 0.46);
  color: #0a0a0b;
  -webkit-backdrop-filter: blur(24px) saturate(180%) brightness(0.97);
  backdrop-filter: blur(24px) saturate(180%) brightness(0.97);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), inset 0 0 0 0.5px rgba(255, 255, 255, 0.55), 0 8px 28px rgba(16, 24, 40, 0.16);
}
.glass[data-tone="light"] .sub2 { color: rgba(10, 10, 12, 0.72); }
.sheet-mat {
  background: var(--sheet-fill);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  backdrop-filter: blur(40px) saturate(180%);
  box-shadow: var(--sheet-rim);
}
.action-mat {
  background: var(--action-fill);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
}

/* 1 · браузер без backdrop-filter, 2 · слабый Android (.lowfx ставит JS) — плотная заливка, та же форма */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgba(36, 36, 40, 0.9); }
  .glass[data-tone="light"] { background: rgba(246, 246, 248, 0.92); }
  .sheet-mat { background: var(--sheet-solid); }
  .action-mat { background: var(--action-solid); }
}
.lowfx .glass, .lowfx .sheet-mat, .lowfx .action-mat { -webkit-backdrop-filter: none; backdrop-filter: none; }
.lowfx .glass { background: rgba(36, 36, 40, 0.9); }
.lowfx .glass[data-tone="light"] { background: rgba(246, 246, 248, 0.92); }
.lowfx .sheet-mat { background: var(--sheet-solid); }
.lowfx .action-mat { background: var(--action-solid); }
/* 3 · «Уменьшить прозрачность» */
@media (prefers-reduced-transparency: reduce) {
  .glass, .sheet-mat, .action-mat { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .glass { background: #2c2c2e; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 6px 20px rgba(0, 0, 0, 0.4); }
  .glass[data-tone="light"] { background: #f2f2f7; box-shadow: inset 0 0 0 1px rgba(60, 60, 67, 0.2), 0 6px 20px rgba(0, 0, 0, 0.12); }
  .sheet-mat { background: var(--sheet-solid); }
  .action-mat { background: var(--action-solid); }
}
/* 4 · «Повысить контраст» */
@media (prefers-contrast: more) {
  .glass { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55); }
  .glass[data-tone="light"] { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.45); }
}

/* ---------------------------------------------------------------- кнопки */

button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; letter-spacing: inherit; }
button, .press { transition: transform 350ms var(--spring-snappy), filter 120ms; }
button:active { transform: scale(0.96); filter: brightness(1.06); transition: transform 90ms cubic-bezier(0.3, 0, 0.5, 1); }
.row-btn:active { transform: scale(0.98); }
button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 16px; border-radius: 22px; font-size: 15px; line-height: 20px; font-weight: 600;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-tint { background: var(--accent-bg); color: var(--accent-text); }
.btn-fill { background: var(--fill); color: var(--label); }
.btn-lg { width: 100%; height: 52px; border-radius: 26px; font-size: 17px; line-height: 22px; }
.btn-xl { width: 100%; height: 56px; border-radius: 28px; font-size: 17px; line-height: 22px; }
.btn-round { width: 44px; height: 44px; padding: 0; border-radius: 22px; background: var(--fill); color: var(--label); display: inline-flex; align-items: center; justify-content: center; flex: none; }

/* ---------------------------------------------------------------- сцена */

#stage {
  position: relative;
  height: var(--scene-h);
  background: var(--bg);
  transition: background-color 600ms var(--spring-smooth);
}
#scene { position: absolute; left: 0; top: 0; width: 100%; height: var(--scene-h); display: block; touch-action: pan-y; }
/* Гараж на фоне: сверху — подложка под цифру (лампы на потолке не мешают читать),
   снизу — пол плавно переходит в страницу */
#stage::before, #stage::after { content: ""; position: absolute; left: 0; right: 0; pointer-events: none; z-index: 1; }
#stage::before { top: 0; height: 230px; background: linear-gradient(180deg, var(--bg) 18%, transparent); }
#stage::after { bottom: 0; height: 90px; background: linear-gradient(0deg, var(--bg), transparent); }
body.wizard #stage::before { height: 110px; }
.overlay-top, .car-plate { z-index: 2; }

.overlay-top { position: absolute; top: 10px; left: 24px; right: 12px; pointer-events: none; }
.overlay-top button { pointer-events: auto; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.top-row .date { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--label2); }
.edit-round { width: 44px; height: 44px; border-radius: 22px; display: flex; align-items: center; justify-content: center; }
.glass.edit-round[data-tone] { color: var(--label); }

.hero { margin-top: -2px; padding-right: 12px; }
.hero-k { font-size: 15px; line-height: 20px; color: var(--label2); }
.hero .price { display: flex; align-items: baseline; flex-wrap: wrap; }
.hero .price .int { font-size: 84px; line-height: 90px; font-weight: 200; letter-spacing: -0.05em; }
.hero .price .frac { font-size: 34px; line-height: 40px; font-weight: 300; letter-spacing: -0.02em; }
.hero .price .cur { margin-left: 8px; font-size: 20px; font-weight: 500; color: var(--label2); }
.hero-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 2px; font-size: 15px; line-height: 20px; }
.cap-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px 3px 7px;
  border-radius: 999px; background: var(--fill); font-size: 13px; line-height: 18px; font-weight: 600;
}

.build-pill {
  position: absolute; left: 50%; bottom: 68px; transform: translateX(-50%); z-index: 2;
  display: inline-flex; align-items: center; gap: 8px; max-width: calc(100% - 32px);
  padding: 8px 14px; border-radius: 18px; font-size: 13px; line-height: 18px; font-weight: 600;
}
.glass.build-pill[data-tone] { color: var(--label); }
.spin { width: 14px; height: 14px; flex: none; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.car-plate { position: absolute; left: 16px; right: 16px; bottom: 18px; text-align: center; pointer-events: none; }
.car-plate .name { display: inline-flex; align-items: center; gap: 8px; font-size: 17px; line-height: 22px; font-weight: 600; }
.car-plate .specs { font-size: 13px; line-height: 18px; color: var(--label2); }
.pill-demo { padding: 2px 8px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 12px; line-height: 16px; font-weight: 600; }

/* ---------------------------------------------------------------- гараж */

#garage {
  position: relative;
  padding: 4px 12px calc(120px + var(--safe-b));
  display: flex; flex-direction: column; gap: 10px;
}
h2 { margin: 0; font-size: 20px; line-height: 25px; font-weight: 700; }
.foot { font-size: 13px; line-height: 18px; color: var(--label2); }

.card { background: var(--card); border-radius: 30px; }
.card-pad { padding: 18px 20px 14px; }

.tile { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex: none; }
.tile-sm { width: 40px; height: 40px; border-radius: 12px; }

/* совет: глагол крупно, сумма справа, график потолка за 2 недели */
.adv { --adv: var(--label2); }
.adv-wait { --adv: var(--green); }
.adv-fill { --adv: var(--orange); }
.adv-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.eyebrow { display: flex; align-items: center; gap: 6px; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--adv); }
.advice-title { margin-top: 2px; font-size: 22px; line-height: 27px; font-weight: 600; }
.advice-body { margin: 8px 0 0; font-size: 15px; line-height: 20px; color: var(--label2); }
.adv-sum { flex: none; text-align: right; }
.adv-sum .v { font-size: 24px; line-height: 29px; font-weight: 300; color: var(--adv); }
.adv-sum .k { font-size: 12px; line-height: 16px; color: var(--label2); }
.chart { display: block; width: 100%; height: 96px; margin-top: 12px; overflow: visible; }
.c-area { fill: var(--chart-area); }
.c-line { fill: none; stroke: var(--chart-line); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.c-next { fill: none; stroke: var(--adv); stroke-width: 2; stroke-dasharray: 1 5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.c-halo { fill: var(--bg); }
:root[data-theme="light"] .c-halo { fill: #ffffff; }
.c-today { fill: var(--label); }
.c-tomorrow { fill: var(--adv); }
.axis { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 12px; line-height: 16px; color: var(--label2); }
.axis .adv-c { color: var(--adv); font-weight: 600; }

.metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.metric { background: var(--card); border-radius: 24px; padding: 14px 16px; display: flex; flex-direction: column; justify-content: space-between; gap: 4px; }
.metric .k { font-size: 13px; line-height: 18px; color: var(--label2); }
.metric .v b { font-size: 28px; line-height: 34px; font-weight: 300; letter-spacing: -0.02em; }
.metric .v span { font-size: 13px; color: var(--label2); }

.list-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 14px 8px 2px; }
.list-head .place { font-size: 13px; line-height: 18px; color: var(--label2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list { overflow: hidden; padding: 4px 0; }
.station { display: flex; align-items: center; gap: 14px; padding: 12px 12px 12px 18px; position: relative; }
.station + .station::before { content: ""; position: absolute; top: 0; left: 70px; right: 0; height: 0.5px; background: var(--sep); }
.station .dist { width: 38px; flex: none; text-align: center; }
.station .dist b { display: block; font-size: 17px; line-height: 20px; font-weight: 300; }
.station .dist span { display: block; font-size: 11px; line-height: 13px; color: var(--label2); }
.station .info { flex: 1; min-width: 0; }
.station .nm { font-size: 17px; line-height: 22px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.station .addr { font-size: 13px; line-height: 18px; color: var(--label2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.station .tot { flex: none; text-align: right; }
.station .tot b { display: block; font-size: 17px; line-height: 22px; font-weight: 500; }
.station .tot span { display: block; font-size: 12px; line-height: 16px; color: var(--label2); }
.station .tot .best { color: var(--green); }
.go-round { width: 44px; height: 44px; flex: none; border-radius: 22px; display: flex; align-items: center; justify-content: center; background: var(--fill); color: var(--label); }
.quiet { height: 44px; margin-top: 8px; color: var(--label2); font-size: 15px; }

.empty { padding: 24px 20px 20px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.empty .circle { width: 56px; height: 56px; border-radius: 28px; background: var(--accent-bg); color: var(--accent-text); display: flex; align-items: center; justify-content: center; }
.empty .t { font-size: 17px; line-height: 22px; font-weight: 600; }
.empty p { margin: 0; font-size: 15px; line-height: 20px; color: var(--label2); }

.note-card { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.note-card .row { display: flex; gap: 12px; align-items: flex-start; }
.note-card .t { font-size: 17px; line-height: 22px; font-weight: 600; }
.note-card .d { font-size: 15px; line-height: 20px; color: var(--label2); }

.danger { display: block; width: 100%; height: 52px; color: var(--red); font-size: 17px; }
.fine { margin: 0 12px; text-align: center; font-size: 12px; line-height: 16px; color: var(--label2); }

.skel { background: var(--skel); border-radius: 7px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.55; } }

/* сжатый заголовок и плавающая панель */
.compact-bar {
  position: fixed; top: 0; left: 0; right: 0; height: 52px; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; line-height: 22px; font-weight: 600;
  opacity: 0; transform: translateY(-8px); pointer-events: none;
  transition: opacity 200ms, transform 500ms var(--spring-smooth);
}
.compact-bar.on { opacity: 1; transform: none; }
.dock {
  position: fixed; left: 16px; right: 16px; bottom: calc(16px + var(--safe-b)); z-index: 20;
  display: flex; gap: 8px; align-items: center; padding: 8px; border-radius: 32px;
}
.dock .btn-primary { flex: 1; height: 48px; border-radius: 24px; font-size: 17px; }
.dock .side { width: 48px; height: 48px; border-radius: 24px; display: flex; align-items: center; justify-content: center; background: var(--fill); color: var(--label); }

/* action sheet */
.scrim {
  position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, 0.4);
  display: flex; flex-direction: column; justify-content: flex-end; gap: 8px;
  padding: 0 8px calc(12px + var(--safe-b));
  animation: fade 200ms ease both;
}
.scrim > * { animation: rise 500ms var(--spring-smooth) both; }
.action { border-radius: 18px; overflow: hidden; text-align: center; }
.action .msg { padding: 14px 16px 13px; font-size: 13px; line-height: 18px; color: var(--label2); }
.action .msg b { display: block; font-weight: 600; }
.action .go { display: block; width: 100%; height: 56px; color: var(--red); font-size: 20px; border-top: 0.5px solid var(--sep); }
.cancel { display: block; width: 100%; height: 56px; border-radius: 18px; color: var(--accent-text); font-size: 20px; font-weight: 600; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }

/* ---------------------------------------------------------------- мастер */

html.wizard-open { overflow: hidden; }
body.wizard { position: fixed; inset: 0; width: 100%; overflow: hidden; }
body.wizard #layer {
  position: fixed; left: 0; right: 0; top: var(--wizard-top, 0px);
  height: var(--wizard-height, 100dvh); z-index: 10; pointer-events: none;
}
body.wizard #layer > * { pointer-events: auto; }
body.wizard #stage { position: fixed; inset: 0; height: auto; }
/* в мастере сцена — только то, что видно над листом: на низком экране машина не прячется под ним */
body.wizard #scene { height: max(150px, min(calc(var(--wizard-scene-height, 100dvh) - 448px - var(--safe-b)), calc(var(--scene-h) - 87px))); top: 44px; }
body.wizard #garage, body.wizard .dock, body.wizard .compact-bar { display: none; }

.live-pill {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 5;
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 8px; border-radius: 18px;
  font-size: 13px; line-height: 18px; font-weight: 600; white-space: nowrap; pointer-events: none;
}
.dot { width: 20px; height: 20px; border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(127, 127, 127, 0.45); flex: none; }

.wiz {
  position: absolute; left: 8px; right: 8px; bottom: calc(8px + var(--safe-b)); z-index: 10;
  /* Высота — от окна, а не от сцены: на низком экране лист не меньше 440 px, а сцена уходит за него */
  height: calc(100% - var(--scene-h) + 79px);
  min-height: min(440px, calc(100% - 16px - var(--safe-b)));
  max-height: calc(100% - 16px - var(--safe-b));
  border-radius: 36px; display: flex; flex-direction: column; overflow: hidden;
  /* Не анимируем геометрию: высоту уже меняет клавиатура iOS. */
}
/* Открыта клавиатура: Telegram сжимает окно — лист занимает всё, что видно, поле в фокусе по центру */
body.kb .wiz { height: calc(100% - 16px); min-height: 0; bottom: 8px; animation: none; }
body.kb .live-pill, body.kb .wiz .grab { display: none; }
body.kb .wiz { background: var(--sheet-solid); -webkit-backdrop-filter: none; backdrop-filter: none; }
.keyboard-bar { display: none; flex: none; padding: 0 12px; border-bottom: 0.5px solid var(--sep); }
body.kb .keyboard-bar { display: flex; justify-content: flex-end; }
.keyboard-dismiss { min-height: 44px; padding: 0 8px; color: var(--accent-text); font: inherit; font-size: 15px; font-weight: 600; }
body.kb .wiz-foot { padding-top: 6px; padding-bottom: 8px; }
.wiz .grab { position: absolute; top: 6px; left: 50%; width: 36px; height: 5px; margin-left: -18px; border-radius: 3px; background: var(--grabber); }
.wiz-head { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 0; }
.wiz-head .spacer { width: 44px; height: 44px; }
.dots { display: flex; gap: 6px; align-items: center; }
.dots span { height: 8px; width: 8px; border-radius: 4px; background: var(--fill); transition: width 350ms var(--spring-snappy), background 200ms; }
.dots span.on { background: var(--accent); }
.dots span.cur { width: 22px; }
.wiz-body { flex: 1; min-height: 0; overscroll-behavior-y: contain; overflow-y: auto; padding: 6px 20px 12px; }
.wiz-body h3 { margin: 0 0 16px; font-size: 28px; line-height: 34px; font-weight: 700; }
.wiz-foot { flex: none; padding: 10px 20px 20px; }
.step-in { animation: step 500ms var(--spring-smooth) both; }
@keyframes step { from { opacity: 0; transform: translateX(24px); } }

.upload-btn { margin-top: 10px; }
.picked .btn { width: 44px; padding: 0; flex: none; }
.private { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 8px; font-size: 13px; line-height: 18px; color: var(--label2); }
.group-label { margin: 20px 0 10px; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--label2); }
.swatches { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); row-gap: 10px; justify-items: center; }
.sw { width: 44px; height: 44px; border-radius: 22px; box-shadow: inset 0 0 0 1px rgba(127, 127, 127, 0.4); }
.sw.on { box-shadow: inset 0 0 0 1px rgba(127, 127, 127, 0.4), 0 0 0 3px var(--ring-gap), 0 0 0 5.5px var(--accent); }
.sw-custom { display: flex; align-items: center; justify-content: center; background: var(--fill); color: var(--label); box-shadow: none; position: relative; overflow: hidden; }
.sw-custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.color-name { margin-top: 14px; text-align: center; font-size: 15px; line-height: 20px; font-weight: 600; }

.photo { position: relative; height: 140px; border-radius: 22px; overflow: hidden; background: var(--inset); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo .tag { position: absolute; left: 10px; bottom: 10px; padding: 3px 9px; border-radius: 999px; background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 12px; line-height: 16px; font-weight: 600; }
.picked { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.picked .sw { flex: none; }
.picked .n { flex: 1; min-width: 0; font-weight: 600; }
.near { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

.bodies { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.body-opt {
  position: relative; height: 76px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border-radius: 20px; background: var(--field); color: var(--label); font-size: 15px; line-height: 20px; font-weight: 600;
}
.body-opt.on { background: var(--accent-bg); color: var(--accent-text); box-shadow: inset 0 0 0 2px var(--accent); }
.body-opt .badge { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 11px; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; }

.group { border-radius: 20px; background: var(--field); overflow: hidden; }
.group label { display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 16px; position: relative; }
.group label + label::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 0.5px; background: var(--sep); }
.group .lb { width: 72px; flex: none; }
.group .lb.grow { flex: 1; width: auto; }
.group input { flex: 1; min-width: 0; height: 44px; border: 0; background: transparent; color: var(--label); font: inherit; text-align: right; outline: none; }
.group input.short { flex: none; width: 70px; }
.group .unit { width: 92px; color: var(--label2); }
.chips { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips button { flex: none; height: 36px; margin: 4px 0; padding: 0 14px; border-radius: 18px; background: var(--fill); color: var(--label); font-size: 15px; font-weight: 600; }
.chips button.on { background: var(--accent-bg); color: var(--accent-text); }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 3px; height: 44px; border-radius: 22px; background: var(--fill); }
.seg button { border-radius: 19px; font-size: 15px; font-weight: 500; color: var(--label); }
.seg button.on { background: var(--thumb); font-weight: 600; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18); }
.hint { margin: 8px 16px 0; font-size: 13px; line-height: 18px; color: var(--label2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 150ms !important; transition-duration: 150ms !important; }
  button:active { transform: none; }
  @keyframes rise { from { opacity: 0; } }
  @keyframes step { from { opacity: 0; } }
}

/* дополнительные ракурсы для 3D */
.views-hint { margin: -4px 0 10px; }
.views { display: flex; gap: 10px; flex-wrap: wrap; }
.view { position: relative; width: 72px; height: 72px; border-radius: 16px; overflow: hidden; background: var(--fill); flex: none; }
.view img { width: 100%; height: 100%; object-fit: cover; display: block; }
.view-x {
  position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.6); color: #fff;
}
/* зона нажатия крестика — 44 px, хоть сам он маленький */
.view-x::after { content: ""; position: absolute; inset: -10px; }
.view-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--label2); font-size: 12px; font-weight: 600; box-shadow: inset 0 0 0 1.5px var(--sep); }

/* ================================================================ гараж 2: журнал, уровень, прогноз, документы, карта */

:root {
  --gold: #f5b301; --gold-bg: rgba(245, 179, 1, 0.16);
  --silver: #c9ced6; --silver-bg: rgba(201, 206, 214, 0.16);
  --bronze: #d08a4a; --bronze-bg: rgba(208, 138, 74, 0.16);
  --rate-red: #ff6961; --rate-red-bg: rgba(255, 105, 97, 0.16);
}
:root[data-theme="light"] {
  --gold: #b07d00; --gold-bg: rgba(245, 179, 1, 0.18);
  --silver: #6b7280; --silver-bg: rgba(107, 114, 128, 0.14);
  --bronze: #9a5a1f; --bronze-bg: rgba(208, 138, 74, 0.18);
  --rate-red: #c4141f; --rate-red-bg: rgba(255, 59, 48, 0.12);
}

.link-btn { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 4px; color: var(--accent-text); font-size: 15px; font-weight: 600; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 12px 0 18px; }
.card-head h2 { font-size: 17px; line-height: 22px; }
.h-sm { font-size: 17px; line-height: 22px; }
.row2 { display: flex; gap: 8px; }
.row2 > .btn { flex: 1; }
.row2 > .btn-fill:not(.danger-t):only-of-type { flex: none; }
.hint-card { margin: 4px 18px 14px; }
.danger-t { color: var(--red); }
.ell { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-btn { display: flex; width: 100%; text-align: left; align-items: center; }
.more { justify-content: space-between; gap: 8px; min-height: 48px; padding: 0 18px; color: var(--accent-text); font-size: 15px; font-weight: 600; border-top: 0.5px solid var(--sep); }
.eyebrow-g { color: var(--green); }

/* плашка под машиной — кнопка списка машин */
.car-plate .name-btn { pointer-events: auto; min-height: 44px; padding: 0 10px; border-radius: 22px; }
.car-plate .name-btn .ico { opacity: 0.6; }
.cars-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--fill); font-size: 12px; line-height: 20px; font-weight: 700; }

.dock .btn-primary { min-width: 0; }
.dock .side-fill { background: var(--accent); color: var(--on-accent); }

/* ---------------------------------------------------------------- уровень топлива */
.level { --lv: var(--accent-text); }
.level.is-low { --lv: var(--orange); }
.level .eyebrow { color: var(--lv); }
.lv-top { display: flex; justify-content: space-between; align-items: center; margin: -10px -4px -4px 0; }
.lv-row { display: flex; align-items: center; gap: 16px; margin: 6px 0 14px; }
.gauge { position: relative; width: 112px; height: 112px; flex: none; }
.gauge svg { display: block; }
.g-track, .g-val { fill: none; stroke-width: 10; stroke-linecap: round; }
.g-track { stroke: var(--fill); }
.g-val { stroke: var(--accent); transition: stroke-dasharray 700ms var(--spring-smooth); }
.gauge.low .g-val { stroke: var(--orange); }
.g-in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.g-in b { font-size: 28px; line-height: 32px; font-weight: 300; letter-spacing: -0.02em; }
.g-in span { font-size: 11px; line-height: 13px; color: var(--label2); letter-spacing: 0.08em; }
.lv-data { min-width: 0; }
.lv-l b { font-size: 34px; line-height: 40px; font-weight: 300; letter-spacing: -0.03em; }
.lv-l span { color: var(--label2); font-size: 17px; }
.lv-km { font-size: 17px; line-height: 22px; font-weight: 600; }
.lv-d { font-size: 15px; line-height: 20px; color: var(--lv); font-weight: 600; }
.lv-src { margin-top: 2px; font-size: 12px; line-height: 16px; color: var(--label2); }
.level-empty .row2 { width: 100%; margin-top: 4px; }
.level-empty .row2 .btn-fill { flex: none; width: 52px; height: 52px; border-radius: 26px; padding: 0; }

/* ---------------------------------------------------------------- прогноз */
.fc .fc-title { font-size: 19px; line-height: 24px; }
.info-btn { width: 44px; height: 44px; margin: -10px -12px 0 0; flex: none; display: flex; align-items: center; justify-content: center; color: var(--label2); }
.fc-chart { height: 110px; }
.fc-band { fill: var(--adv); opacity: 0.16; }
.fc-now { stroke: var(--sep); stroke-width: 1; stroke-dasharray: 2 3; vector-effect: non-scaling-stroke; }
.fc-days { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.fc-d { padding: 8px 4px; border-radius: 14px; background: var(--inset); text-align: center; }
.fc-d .wd { font-size: 12px; line-height: 16px; color: var(--label2); font-weight: 600; white-space: nowrap; }
.fc-d .pr { font-size: 15px; line-height: 20px; font-weight: 600; }
.fc-d .dl { display: flex; align-items: center; justify-content: center; gap: 2px; font-size: 12px; line-height: 16px; font-weight: 600; }
.fc-d .pb { font-size: 11px; line-height: 14px; color: var(--label2); }
.fc-d.down .dl { color: var(--green); }
.fc-d.up .dl { color: var(--orange); }
.fc-d.flat .dl { color: var(--label2); }
.fc-info { padding: 10px 12px; border-radius: 14px; background: var(--inset); }

/* ---------------------------------------------------------------- экономия */
.sav-v b { font-size: 48px; line-height: 54px; font-weight: 200; letter-spacing: -0.04em; }
.sav-v span { font-size: 17px; color: var(--label2); font-weight: 500; }
.sav-since { font-size: 13px; line-height: 18px; color: var(--label2); }
.share-btn { flex: none; height: 40px; padding: 0 14px; font-size: 15px; }
.bars { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; height: 108px; margin-top: 14px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; }
.bar i { display: block; width: 100%; max-width: 44px; border-radius: 8px; background: var(--green); opacity: 0.35; transition: height 700ms var(--spring-smooth); }
.bar.on i { opacity: 1; }
.bar .bv { font-size: 12px; line-height: 14px; color: var(--label2); }
.bar.on .bv { color: var(--label); font-weight: 600; }
.bar .bn { font-size: 12px; line-height: 14px; color: var(--label2); }
.sav-split { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 0.5px solid var(--sep); }
.sav-split b { display: block; font-size: 15px; line-height: 20px; font-weight: 600; }
.sav-split span { display: block; font-size: 12px; line-height: 16px; color: var(--label2); }

/* ---------------------------------------------------------------- документы */
.doc { gap: 12px; padding: 10px 14px 10px 14px; min-height: 60px; position: relative; }
.doc + .doc::before { content: ""; position: absolute; top: 0; left: 66px; right: 0; height: 0.5px; background: var(--sep); }
.doc .info { flex: 1; min-width: 0; }
.doc .nm { font-size: 17px; line-height: 22px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc .addr { font-size: 13px; line-height: 18px; color: var(--label2); }
.doc-ic { background: var(--fill); color: var(--label); }
.doc-ic.st-soon { background: var(--orange-bg); color: var(--orange); }
.doc-ic.st-urgent, .doc-ic.st-overdue { background: var(--rate-red-bg); color: var(--red); }
.doc-chip { flex: none; padding: 4px 10px; border-radius: 999px; background: var(--fill); font-size: 13px; line-height: 18px; font-weight: 600; white-space: nowrap; }
.doc-chip.st-ok { color: var(--label2); }
.doc-chip.st-soon { background: var(--orange-bg); color: var(--orange); }
.doc-chip.st-urgent, .doc-chip.st-overdue { background: var(--rate-red-bg); color: var(--red); }
.kinds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.kind { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px; border-radius: 16px; background: var(--field); font-size: 15px; line-height: 18px; font-weight: 600; text-align: left; }
.kind.on { background: var(--accent-bg); box-shadow: inset 0 0 0 2px var(--accent); color: var(--accent-text); }

/* ---------------------------------------------------------------- журнал */
.journal { padding-bottom: 0; }
.jr { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; position: relative; }
.jr + .jr::before { content: ""; position: absolute; top: 0; left: 64px; right: 0; height: 0.5px; background: var(--sep); }
.jr-date { width: 36px; flex: none; text-align: center; }
.jr-date b { display: block; font-size: 20px; line-height: 22px; font-weight: 300; }
.jr-date span { display: block; font-size: 11px; line-height: 13px; color: var(--label2); text-transform: uppercase; }
.jr-info { flex: 1; min-width: 0; }
.jr-info .nm { font-size: 15px; line-height: 20px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jr-info .addr { font-size: 12px; line-height: 16px; color: var(--label2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jr-sum { flex: none; text-align: right; }
.jr-sum b { display: block; font-size: 15px; line-height: 20px; font-weight: 600; }
.jr-sum span { display: block; font-size: 12px; line-height: 16px; color: var(--label2); }
.jr-sum .best { color: var(--green); font-weight: 600; }
.jr-del { width: 40px; height: 40px; color: var(--label2); }
.cons { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 8px 12px 6px; padding: 12px 14px; border-radius: 18px; background: var(--inset); }
.cons .k { font-size: 15px; line-height: 20px; font-weight: 600; }
.cons .d { font-size: 12px; line-height: 16px; color: var(--label2); }
.cons-v { text-align: right; }
.cons-v b { font-size: 26px; line-height: 30px; font-weight: 300; }
.cons-v span { font-size: 13px; color: var(--label2); }
.cons-diff { font-size: 12px; line-height: 16px; font-weight: 600; }
.cons-diff.up { color: var(--orange); }
.cons-diff.down { color: var(--green); }

/* ---------------------------------------------------------------- нижний лист */
html.sheet-open { overflow: hidden; }
.sh-scrim {
  position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.42);
  display: flex; flex-direction: column; justify-content: flex-end;
  animation: fade 200ms ease both;
}
.sh-scrim.out { animation: fade 200ms ease reverse both; }
.sh {
  position: relative; margin: 0 8px calc(8px + var(--safe-b)); max-height: calc(100dvh - 24px - var(--safe-b));
  border-radius: 34px; display: flex; flex-direction: column; overflow: hidden;
  animation: rise 500ms var(--spring-smooth) both;
}
.sh-tall { height: calc(100dvh - 56px - var(--safe-b)); }
/* затемнение анимируется по прозрачности и становится границей размытия — лист с данными делаем плотным */
.sh.sheet-mat { background: #1c1c1e; -webkit-backdrop-filter: none; backdrop-filter: none; }
:root[data-theme="light"] .sh.sheet-mat { background: #f4f4f7; }
.sh .grab { position: absolute; top: 6px; left: 50%; width: 36px; height: 5px; margin-left: -18px; border-radius: 3px; background: var(--grabber); z-index: 1; }
/* за полоску удобно хвататься: зона нажатия шире самой полоски */
.drag-handle { touch-action: none; cursor: grab; }
.grab.drag-handle::after { content: ""; position: absolute; left: -40px; right: -40px; top: -8px; bottom: -14px; }
.sh-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 12px 4px 22px; }
.sh-head h3 { margin: 0; font-size: 22px; line-height: 28px; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-x { flex: none; }
.sh-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; padding: 4px 16px 16px; }
.sh-foot { flex: none; padding: 10px 16px 16px; border-top: 0.5px solid var(--sep); display: flex; flex-direction: column; gap: 8px; }
.sh .group-label:first-child { margin-top: 8px; }
.sh .card { background: var(--field); }
:root:not([data-theme="light"]) .sh .card { background: rgba(255, 255, 255, 0.06); }

.chips-wrap { flex-wrap: wrap; overflow: visible; }
.chips button { display: inline-flex; align-items: center; gap: 6px; }
.chip-sub { font-size: 13px; font-weight: 500; color: var(--label2); }
.chips button.on .chip-sub { color: inherit; opacity: 0.8; }
.seg2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.unit-s { width: auto !important; min-width: 28px; }
.group .lb.grow + input { text-align: right; }
.fill-sum { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 0 12px; margin: 14px 4px 0; }
.fill-sum .k { font-size: 15px; color: var(--label2); }
.fill-sum .v { text-align: right; font-size: 28px; line-height: 34px; font-weight: 300; letter-spacing: -0.02em; }
.fill-sum .s { grid-column: 1 / -1; text-align: right; font-size: 13px; line-height: 18px; color: var(--green); font-weight: 600; }
.date-in { display: block; width: 100%; height: 48px; margin-top: 8px; padding: 0 16px; border: 0; border-radius: 16px; background: var(--field); color: var(--label); font: inherit; }
.lv-big { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 4px 0 8px; }
.lv-big-l { font-size: 28px; line-height: 34px; font-weight: 300; }
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; --p: 50%; }
.range::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--accent) var(--p), var(--fill) var(--p)); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -10px; border-radius: 14px; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); }
.range::-moz-range-track { height: 8px; border-radius: 4px; background: var(--fill); }
.range::-moz-range-progress { height: 8px; border-radius: 4px; background: var(--accent); }
.range::-moz-range-thumb { width: 28px; height: 28px; border: 0; border-radius: 14px; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); }
.range-ends { display: flex; justify-content: space-between; padding: 0 6px; font-size: 12px; color: var(--label2); }

.cars .car-row { gap: 14px; padding: 12px 14px; min-height: 64px; position: relative; }
.cars .car-row + .car-row::before { content: ""; position: absolute; top: 0; left: 58px; right: 0; height: 0.5px; background: var(--sep); }
.cars .info { flex: 1; min-width: 0; }
.cars .nm { font-size: 17px; line-height: 22px; font-weight: 600; }
.cars .addr { font-size: 13px; line-height: 18px; color: var(--label2); }
.dot-l { width: 30px; height: 30px; border-radius: 15px; }
.badge-on { width: 24px; height: 24px; border-radius: 12px; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; flex: none; }

.toast {
  position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); z-index: 70; transform: translateX(-50%);
  max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 20px; background: rgba(28, 28, 30, 0.92); color: #fff;
  font-size: 15px; line-height: 20px; font-weight: 600; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  animation: rise 400ms var(--spring-smooth) both; transition: opacity 300ms;
}
.toast.out { opacity: 0; }

/* ---------------------------------------------------------------- логотипы сетей и оценки */
.logo { display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 50%; font-weight: 800; letter-spacing: -0.02em; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.25); }
.logo-sm { width: 38px; height: 38px; font-size: 13px; }
.logo-md { width: 44px; height: 44px; font-size: 15px; }
.logo-lg { width: 60px; height: 60px; font-size: 20px; }
.star { width: 1em; height: 1em; flex: none; fill: currentColor; }
.rate { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px 2px 5px; border-radius: 999px; font-weight: 700; white-space: nowrap; }
.rate-sm { font-size: 12px; line-height: 16px; }
.rate-md { font-size: 13px; line-height: 18px; }
.rate-gold { background: var(--gold-bg); color: var(--gold); }
.rate-silver { background: var(--silver-bg); color: var(--silver); }
.rate-bronze { background: var(--bronze-bg); color: var(--bronze); }
.rate-red { background: var(--rate-red-bg); color: var(--rate-red); }
.rate-new { background: var(--fill); color: var(--label2); }
.station .nm { display: flex; align-items: center; gap: 6px; }
.station .nm-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.station-tap { cursor: pointer; }
.station-tap:active { background: var(--fill); }
.station .logo-sm { margin-left: -4px; }
.stars { display: inline-flex; gap: 2px; font-size: 18px; color: var(--gold); }
.stars.sm { font-size: 13px; }
.stars .empty { fill: none; stroke: currentColor; stroke-width: 1.6; opacity: 0.45; }
.stars .half { opacity: 0.6; }
.stars.tier-silver { color: var(--silver); }
.stars.tier-bronze { color: var(--bronze); }
.stars.tier-red { color: var(--rate-red); }
.stars.tier-new, .stars.tier-none { color: var(--label2); }

/* карточка станции */
.st-hero { display: flex; gap: 14px; align-items: center; padding: 6px 4px 12px; }
.st-hero-t { min-width: 0; }
.st-hero .addr { font-size: 15px; line-height: 20px; color: var(--label2); }
.st-tags { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.tag-24, .tag-c { padding: 2px 8px; border-radius: 999px; background: var(--fill); font-size: 12px; line-height: 16px; font-weight: 600; }
.tag-24 { background: var(--green-bg); color: var(--green); }
.st-rating { display: flex; align-items: center; gap: 14px; padding: 12px 16px; margin-bottom: 10px; border-radius: 20px; background: var(--inset); }
.st-r-v { font-size: 44px; line-height: 48px; font-weight: 200; letter-spacing: -0.03em; }
.st-rating .addr { font-size: 13px; color: var(--label2); margin-top: 2px; }
.st-prices .station { padding: 12px 16px; }
.st-prices .station.mine { background: var(--accent-bg); }
.st-prices .nm { font-size: 15px; }
.rate-box { padding: 14px; }
.star-pick { display: flex; justify-content: center; gap: 6px; }
.sp { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; color: var(--label2); font-size: 34px; }
.sp .star { fill: none; stroke: currentColor; stroke-width: 1.4; }
.sp.on { color: var(--gold); }
.sp.on .star { fill: currentColor; }
.review-in { display: block; width: 100%; margin-top: 10px; padding: 12px 14px; border: 0; border-radius: 16px; background: var(--fill); color: var(--label); font: inherit; font-size: 15px; resize: none; }
.rate-foot { display: flex; justify-content: flex-end; margin-top: 10px; }
.rv { padding: 12px 16px; position: relative; }
.rv + .rv::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 0.5px; background: var(--sep); }
.rv-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rv-top .addr { font-size: 12px; color: var(--label2); }
.rv-t { margin-top: 4px; font-size: 15px; line-height: 20px; }

/* ---------------------------------------------------------------- карта */
html.map-open, html.map-open body { overflow: hidden; }
.mapview { position: fixed; inset: 0; z-index: 45; background: var(--bg); animation: fade 200ms ease both; }
.mapview.out { animation: fade 200ms ease reverse both; }
.map-canvas { position: absolute; inset: 0; }
.map-top { position: absolute; top: calc(10px + var(--tg-content-safe-area-inset-top, 0px)); left: 12px; right: 12px; z-index: 500; display: flex; gap: 8px; align-items: center; }
.map-btn { width: 44px; height: 44px; flex: none; border-radius: 22px; display: flex; align-items: center; justify-content: center; }
.map-seg-wrap { flex: 1; min-width: 0; padding: 3px; border-radius: 24px; }
.map-seg { background: transparent; height: 38px; padding: 0; }
.map-seg button { font-size: 14px; color: inherit; }
.map-seg button.on { background: rgba(255, 255, 255, 0.9); color: #0a0a0b; }
.map-bottom { position: absolute; left: 12px; right: 12px; bottom: calc(12px + var(--safe-b)); z-index: 500; padding: 8px 12px; border-radius: 18px; }
.map-legend { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; line-height: 16px; font-weight: 600; }
.lg { display: inline-flex; align-items: center; gap: 4px; }
.lg-dot { display: inline-block; width: 10px; height: 10px; border-radius: 5px; box-shadow: 0 0 0 1.5px #fff; }
.mapview .leaflet-container { background: var(--bg); font: inherit; }
.mapview .leaflet-control-attribution { margin-bottom: calc(64px + var(--safe-b)) !important; background: rgba(255, 255, 255, 0.6); font-size: 10px; }
.mk-wrap { background: none; border: 0; }
.mk { position: relative; width: 64px; height: 74px; display: flex; flex-direction: column; align-items: center; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.35)); }
.mk-logo {
  width: 44px; height: 44px; margin-top: 4px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; letter-spacing: -0.02em; box-shadow: 0 0 0 3px #fff;
}
.tier-gold .mk-logo { box-shadow: 0 0 0 3px #ffd34d, 0 0 0 5px rgba(255, 211, 77, 0.35); }
.tier-silver .mk-logo { box-shadow: 0 0 0 3px #dfe3e8; }
.tier-bronze .mk-logo { box-shadow: 0 0 0 3px #e0a066; }
.tier-red .mk-logo { box-shadow: 0 0 0 3px #ff7a72; }
.mk-rate {
  position: absolute; top: 0; right: 0; display: inline-flex; align-items: center; gap: 2px; padding: 1px 5px 1px 4px; border-radius: 999px;
  font-size: 11px; line-height: 15px; font-weight: 800; background: #1c1c1e; color: #fff; box-shadow: 0 0 0 1.5px #fff;
}
.tier-gold .mk-rate { background: linear-gradient(180deg, #ffd84f, #f0a500); color: #3a2600; }
.tier-silver .mk-rate { background: linear-gradient(180deg, #f2f4f7, #b8bec7); color: #22252a; }
.tier-bronze .mk-rate { background: linear-gradient(180deg, #f1b47b, #c27632); color: #2d1606; }
.tier-red .mk-rate { background: #e5484d; color: #fff; }
.tier-new .mk-rate { background: #636366; color: #fff; }
.mk-rate .star { width: 10px; height: 10px; }
.mk-price {
  margin-top: 4px; padding: 1px 7px; border-radius: 9px; font-size: 12px; line-height: 17px; font-weight: 700;
  background: #fff; color: #111; box-shadow: inset 3px 0 0 var(--pc);
}
.mk-cheap .mk-price { background: #1f9d55; color: #fff; box-shadow: none; }
.mk-cheap { z-index: 2; }
.me-pin { background: none; border: 0; }
.me-dot { position: relative; width: 22px; height: 22px; }
.me-dot::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: rgba(10, 132, 255, 0.25); animation: me 2s ease-out infinite; }
.me-dot i { position: absolute; inset: 5px; border-radius: 50%; background: #0a84ff; box-shadow: 0 0 0 3px #fff, 0 2px 6px rgba(0, 0, 0, 0.35); }
@keyframes me { from { transform: scale(0.6); opacity: 1; } to { transform: scale(2.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .me-dot::before { animation: none; } }

/* ---------------------------------------------------------------- главная карточка и короткий список */
.main { display: flex; flex-direction: column; gap: 4px; padding-top: 10px; }
.tank-row {
  display: flex; align-items: center; gap: 10px; width: calc(100% + 16px); min-height: 44px; margin: 0 -8px 6px; padding: 0 8px;
  border-radius: 14px; color: var(--label2); font-size: 15px; line-height: 20px; font-weight: 600; text-align: left;
}
.tank-row:active { background: var(--fill); }
.tank-row .tr-t { flex: 1; min-width: 0; color: var(--label); }
.tank-ask .tr-t { color: var(--accent-text); }
.tbar { flex: none; width: 56px; height: 8px; border-radius: 4px; background: var(--fill); overflow: hidden; }
.tbar i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.tbar.low i { background: var(--orange); }
.main .advice-title { font-size: 26px; line-height: 31px; font-weight: 700; }
.main .advice-body { margin-top: 4px; }
.main-btns { display: flex; gap: 8px; margin-top: 14px; }
.main-btns .btn-lg { flex: 1; }
.main-more { height: 52px; border-radius: 26px; padding: 0 16px; flex: none; }
.adv-pending, .adv-gpl { --adv: var(--label2); }
.doc-alert { gap: 12px; padding: 12px 14px; background: var(--rate-red-bg); }
.doc-alert .info { flex: 1; min-width: 0; }
.doc-alert .nm { font-size: 17px; line-height: 22px; font-weight: 600; }
.doc-alert .addr { font-size: 13px; line-height: 18px; color: var(--label2); }
.rows { padding: 4px 0; }
.grow-row { gap: 12px; min-height: 64px; padding: 10px 14px; position: relative; color: var(--label); }
.grow-row + .grow-row::before { content: ""; position: absolute; top: 0; left: 66px; right: 0; height: 0.5px; background: var(--sep); }
.grow-row .info { flex: 1; min-width: 0; }
.grow-row .nm { font-size: 17px; line-height: 22px; font-weight: 600; }
.grow-row .addr { font-size: 13px; line-height: 18px; color: var(--label2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grow-row > .ico:last-child { color: var(--label2); }
.tone-g { background: var(--green-bg); color: var(--green); }
.tone-n { background: var(--fill); color: var(--label); }
.sh .metrics .metric { background: var(--field); }
:root:not([data-theme="light"]) .sh .metrics .metric { background: rgba(255, 255, 255, 0.06); }
.sh .adv { margin-bottom: 10px; }
