/* Сайт по дизайну «Карты» (karty-handoff, раздел «Веб»): токены — tokens.css, плотность desktop.
   Карта на весь экран, слева стеклянная панель 400 px (1024–1279 — 360), справа кнопки карты,
   уже 768 px — раскладка телефона: лист снизу. */

[hidden] { display: none !important; }
* { box-sizing: border-box; }

:root {
  --panel-w: 400px;
  --gap: 16px;
  --btn-h: 44px;      /* Button, Segmented — desktop */
  --ibtn: 40px;       /* IconButton */
  --chip-h: 32px;
  --search-h: 44px;
}
@media (max-width: 1279px) { :root { --panel-w: 360px; } }

html, body, #map { margin: 0; height: 100%; }
body {
  font: 400 15px/1.35 var(--font-sans); color: var(--ink); background: var(--map-bg);
  -webkit-font-smoothing: antialiased; overflow: hidden;
}
button { font: inherit; color: inherit; }
.ic { display: block; flex: none; }
[data-icon] { display: inline-flex; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Стекло ---------- */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(var(--blur-glass)) saturate(1.6);
  backdrop-filter: blur(var(--blur-glass)) saturate(1.6);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-glass);
}

/* ---------- Панель ---------- */
#panel {
  position: absolute; top: var(--gap); left: var(--gap); z-index: 3;
  width: var(--panel-w); max-height: calc(100% - 2 * var(--gap));
  display: flex; flex-direction: column;
  border-radius: var(--radius-xl); overflow: hidden;
  transition: transform .25s ease, opacity .2s;
}
body.collapsed #panel { transform: translateX(calc(-100% - 2 * var(--gap))); opacity: 0; pointer-events: none; }

.panel-top { padding: var(--gap) var(--gap) 0; flex: none; }
#panel-body { overflow-y: auto; padding: 0 var(--gap) var(--gap); overscroll-behavior: contain; }
#panel-body > :first-child { margin-top: 12px; }

.collapse {
  position: absolute; z-index: 3; top: calc(var(--gap) + 10px); left: calc(var(--gap) + var(--panel-w) + 8px);
  width: 28px; height: 44px; border-radius: 10px; display: grid; place-items: center;
  color: var(--ink-2); cursor: pointer; padding: 0; transition: left .25s ease;
}
.collapse:hover { color: var(--ink); }
body.collapsed .collapse { left: var(--gap); }
body.collapsed .collapse .ic { transform: rotate(180deg); }

/* Поиск */
.search {
  display: flex; align-items: center; gap: 10px; height: var(--search-h); padding: 0 8px 0 14px;
  background: var(--surface); border-radius: var(--radius-pill); box-shadow: var(--shadow-surface);
  cursor: text;
}
.search:focus-within { box-shadow: 0 0 0 2px var(--accent); }
.search-icon { color: var(--ink-2); }
#search-input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink);
  font: 400 15px var(--font-sans); padding: 0;
}
#search-input::placeholder { color: var(--ink-3); }
#search-input::-webkit-search-cancel-button { display: none; }
.kbd {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
  border: 1px solid var(--hairline); border-radius: 6px; background: var(--surface);
  font: 500 12px var(--font-sans); color: var(--ink-2);
}
.search:focus-within .kbd { display: none; }
.search-clear {
  width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--ink-2);
  display: grid; place-items: center; cursor: pointer; padding: 0;
}

/* Рубрики плиткой, по 4 в ряд */
.cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 4px; padding: 6px 0 4px; }
.cat {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 2px;
  border: 0; background: none; border-radius: var(--radius-md); cursor: pointer; min-width: 0;
}
.cat:hover { background: var(--state-hover); }
.cat-icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; }
.cat-name { font-size: 13px; font-weight: 500; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tone-food { background: var(--poi-food-soft); color: var(--poi-food-ink); }
.tone-health { background: var(--success-soft); color: var(--success-ink); }
.tone-accent { background: var(--accent-soft); color: var(--accent-ink); }
.tone-fuel { background: var(--accent-soft); color: var(--poi-fuel); }

/* Заголовки секций */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 18px 0 4px; }
.section-title { margin: 0; font-size: 15px; font-weight: 600; }
.section-label { margin: 16px 0 4px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.link { border: 0; background: none; padding: 0; cursor: pointer; color: var(--accent-ink); font-size: 14px; font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; }

/* Строки списков (результаты, недавние, в здании) */
.row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 10px;
  margin: 0 -10px; width: calc(100% + 20px);
  border: 0; background: none; border-radius: var(--radius-md); text-align: left; cursor: pointer; color: var(--ink);
}
.row:hover, .row.active { background: var(--state-hover); }
.row-icon {
  width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--surface-2); color: var(--ink-2);
}
.row-body { flex: 1; min-width: 0; }
.row-title { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.row-meta { font-size: 13px; color: var(--ink-2); white-space: nowrap; flex: none; }

.empty { padding: 20px 2px; color: var(--ink-2); font-size: 14px; }
.empty-state { text-align: center; padding: 28px 12px 16px; }
.empty-state .empty-icon { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); }
.empty-state h4 { margin: 0 0 4px; font-size: 17px; }
.empty-state p { margin: 0; font-size: 14px; color: var(--ink-2); }

/* Загрузка: серые полоски */
.skeleton { display: flex; gap: 12px; align-items: center; padding: 10px 0; }
.skeleton i { display: block; border-radius: 8px; background: var(--surface-2); animation: pulse 1.2s infinite ease-in-out; }
@keyframes pulse { 50% { opacity: .45; } }

/* ---------- Карточка ---------- */
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0 10px; }
.back {
  display: inline-flex; align-items: center; gap: 2px; border: 0; background: none; padding: 4px 0;
  color: var(--accent-ink); font-size: 15px; font-weight: 600; cursor: pointer; min-width: 0;
}
.back span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.close {
  width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--ink-2);
  display: grid; place-items: center; cursor: pointer; padding: 0; flex: none;
}
.close:hover { color: var(--ink); }
.card-name { font: 700 24px/1.15 var(--font-display); letter-spacing: -.01em; margin: 0 0 4px; }
.card-cat { color: var(--ink-2); font-size: 15px; margin-bottom: 4px; }
.card-status { font-size: 15px; color: var(--ink-2); margin-bottom: 4px; }
.card-status b { color: var(--success-ink); font-weight: 600; }
.card-actions { display: flex; gap: 8px; margin: 14px 0 6px; align-items: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--btn-h); padding: 0 20px; border: 0; border-radius: var(--radius-pill);
  font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn-primary { flex: 1; background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-accent); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-secondary { background: var(--surface-2); color: var(--ink); }
.btn-secondary:hover { background: var(--state-hover); box-shadow: inset 0 0 0 100px var(--state-hover); }
.btn:disabled { opacity: .5; cursor: default; }

.ibtn {
  width: var(--ibtn); height: var(--ibtn); border-radius: 50%; border: 0; flex: none;
  display: grid; place-items: center; cursor: pointer; padding: 0; color: var(--ink); text-decoration: none;
  background: var(--surface-2);
}
.ibtn:hover { box-shadow: inset 0 0 0 100px var(--state-hover); }
.btn-primary + .ibtn, .ibtn + .ibtn { margin-left: 0; }

.info { margin-top: 6px; }
.info-row { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--hairline); }
.info-row:first-child { border-top: 0; }
.info-row > .ic { color: var(--ink-2); margin-top: 1px; }
.info-body { flex: 1; min-width: 0; font-size: 15px; overflow-wrap: anywhere; }
.info-body small { display: block; font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.info-body a { color: var(--accent-ink); text-decoration: none; }
.info-row .link { flex: none; align-self: center; }

/* Сегменты (виды транспорта, направления) */
.seg { display: flex; padding: 3px; border-radius: var(--radius-pill); background: var(--surface-2); margin: 10px 0 12px; gap: 2px; }
.seg-item {
  flex: 1; min-width: 0; height: calc(var(--btn-h) - 6px); border: 0; border-radius: var(--radius-pill); background: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 8px;
  font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.seg-item:hover { color: var(--ink); }
.seg-item.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-surface); }

/* ---------- Маршрут ---------- */
.route-points { display: flex; align-items: center; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-surface); }
.route-rows { flex: 1; min-width: 0; }
.route-point {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px;
  border: 0; background: none; font-size: 15px; color: var(--ink); text-align: left; cursor: pointer;
}
.route-point:first-child { border-radius: var(--radius-lg) 0 0 0; }
.route-point:last-child { border-radius: 0 0 0 var(--radius-lg); }
.route-point:hover, .route-point.editing { background: var(--state-hover); }
.route-point + .route-point { border-top: 1px solid var(--hairline); }
.route-point .label { color: var(--ink-2); width: 52px; flex: none; font-size: 13px; }
.route-point .value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swap {
  flex: none; width: 36px; height: 36px; margin: 0 8px; border: 0; border-radius: 50%;
  background: var(--surface-2); cursor: pointer; color: var(--ink); display: grid; place-items: center; padding: 0;
}
.swap:hover { box-shadow: inset 0 0 0 100px var(--state-hover); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot-from { background: var(--surface); box-shadow: inset 0 0 0 3px var(--accent); }
.dot-to { background: var(--danger); }
.route-editor { margin-top: 8px; background: var(--surface); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-surface); }
.route-input {
  width: 100%; border: 0; border-bottom: 1px solid var(--hairline); outline: 0; padding: 12px 14px;
  font: 15px var(--font-sans); background: transparent; color: var(--ink);
}
.suggest-item {
  display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 10px 14px;
  border: 0; background: none; text-align: left; cursor: pointer; color: var(--ink);
}
.suggest-item + .suggest-item { border-top: 1px solid var(--hairline); }
.suggest-item:hover { background: var(--state-hover); }
.suggest-title { font-size: 15px; }
.suggest-sub { font-size: 13px; color: var(--ink-2); }
.suggest-empty, .suggest-notice { padding: 10px 14px; font-size: 13px; color: var(--ink-2); }
.suggest-notice { background: var(--warning-soft); color: var(--warning-ink); }
.route-hint { font-size: 13px; color: var(--ink-2); margin: 8px 2px 12px; }
.route-summary {
  display: flex; align-items: baseline; gap: 10px; padding: 14px 16px; margin: 4px 0 8px;
  border-radius: var(--radius-lg); background: var(--surface); box-shadow: inset 0 0 0 2px var(--accent);
}
.route-time { font: 700 24px var(--font-display); }
.route-dist { color: var(--ink-2); font-size: 15px; }
.steps { list-style: none; margin: 0; padding: 0; }
.step { padding: 10px 0; border-top: 1px solid var(--hairline); font-size: 14px; }
.step-main, .step-alert { display: flex; justify-content: space-between; gap: 10px; }
.step-alert { font-size: 13px; padding: 7px 10px; border-radius: var(--radius-sm); border-top: 0; margin: 2px 0; background: var(--warning-soft); color: var(--warning-ink); }
.step-alert.camera { background: var(--accent-soft); color: var(--accent-ink); }
.step-alert.limit { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.lanes { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.lane-row { display: inline-flex; background: #2c313b; border-radius: 6px; padding: 2px; gap: 2px; }
.lane { min-width: 22px; padding: 1px 3px; text-align: center; color: #8a8f99; font-size: 15px; line-height: 20px; border-radius: 4px; }
.lane.active { background: var(--accent); color: #fff; }
.lane-hint { font-size: 12px; color: var(--ink-2); }
.step-dist { color: var(--ink-2); white-space: nowrap; }

/* ---------- Общественный транспорт ---------- */
.route-badge {
  display: inline-grid; place-items: center; min-width: 30px; height: 26px; padding: 0 7px; border-radius: 8px; flex: none;
  color: #fff; font-weight: 700; font-size: 14px;
}
.route-badge.big { font-size: 18px; height: 32px; padding: 0 10px; }
.bus-route-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.timeline { list-style: none; margin: 0; padding: 4px 0 0; }
.timeline li { position: relative; padding: 8px 0 8px 28px; font-size: 14px; cursor: pointer; border-radius: 8px; }
.timeline li:hover { background: var(--state-hover); }
.timeline li::before { content: ''; position: absolute; left: 7px; top: 0; bottom: 0; width: 4px; background: var(--route-color); }
.timeline li:first-child::before { top: 50%; }
.timeline li:last-child::before { bottom: 50%; }
.timeline li::after {
  content: ''; position: absolute; left: 2px; top: 50%; width: 8px; height: 8px; margin-top: -7px;
  border: 3px solid var(--route-color); border-radius: 50%; background: var(--surface);
}

/* ---------- Кнопки карты справа ---------- */
.map-ctrls {
  position: absolute; right: var(--gap); top: 50%; transform: translateY(-50%); z-index: 2;
  display: flex; flex-direction: column; gap: 12px; align-items: center;
}
.ctrl-group { display: flex; flex-direction: column; border-radius: var(--radius-pill); overflow: hidden; }
.ctrl-group .mbtn { border-radius: 0; box-shadow: none; border: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.mbtn {
  position: relative; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  cursor: pointer; padding: 0; color: var(--ink); font-size: 13px; font-weight: 700;
}
.mbtn:hover { box-shadow: var(--shadow-glass), inset 0 0 0 100px var(--state-hover); }
.ctrl-group .mbtn:hover { box-shadow: inset 0 0 0 100px var(--state-hover); }
.mbtn.accent { color: var(--accent); }
.mbtn .compass { transition: transform .1s linear; }

/* Тултип с клавишей: через 500 мс, слева от кнопки */
[data-tip]::after {
  content: attr(data-tip); position: absolute; right: calc(100% + 10px); top: 50%; transform: translateY(-50%);
  white-space: nowrap; padding: 6px 10px; border-radius: 10px; background: #1b1d21; color: #fff;
  font: 500 13px var(--font-sans); pointer-events: none; opacity: 0; transition: opacity .15s;
}
[data-tip]:hover::after { opacity: 1; transition-delay: .5s; }
.ctrl-group { overflow: visible; }

/* Справа сверху: погода/время, язык */
.top-right { position: absolute; right: var(--gap); top: var(--gap); z-index: 2; display: flex; gap: 8px; align-items: center; }
.pill { height: 40px; padding: 0 14px; border-radius: var(--radius-pill); display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.lang { display: inline-flex; padding: 3px; gap: 2px; height: 40px; border-radius: var(--radius-pill); }
.lang button { border: 0; background: none; border-radius: var(--radius-pill); padding: 0 10px; font-size: 13px; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.lang button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-surface); }

/* Значок погоды и времени из sky.js — в правый верхний ряд */
.sky-chip {
  position: static; height: 40px; padding: 0 14px; border-radius: var(--radius-pill);
  display: inline-flex; align-items: center; white-space: pre;
  background: var(--glass); border: 1px solid var(--glass-border); box-shadow: var(--shadow-glass);
  -webkit-backdrop-filter: blur(var(--blur-glass)); backdrop-filter: blur(var(--blur-glass));
  color: var(--ink); font: 600 14px var(--font-sans); pointer-events: none;
}

/* Масштаб и подписи — справа снизу стеклом */
.maplibregl-ctrl-bottom-right { right: var(--gap); bottom: var(--gap); }
.maplibregl-ctrl-bottom-right .maplibregl-ctrl { margin: 0 0 0 8px; }
.maplibregl-ctrl-scale {
  background: var(--glass); border: 0; border-bottom: 2px solid var(--ink-2); color: var(--ink);
  font: 500 12px var(--font-sans); border-radius: 6px 6px 0 0; padding: 2px 6px;
}
.maplibregl-ctrl.maplibregl-ctrl-attrib { background: var(--glass); border-radius: var(--radius-pill); font: 12px var(--font-sans); }
.maplibregl-ctrl-attrib a { color: var(--ink-2); }

/* Всплывашка */
.maplibregl-popup-content { border-radius: var(--radius-md); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-glass); padding: 12px 14px; }
.maplibregl-popup-tip { border-top-color: var(--surface) !important; border-bottom-color: var(--surface) !important; }
.popup h3 { margin: 0 0 4px; font-size: 15px; }
.popup p { margin: 2px 0; font-size: 13px; color: var(--ink-2); }

/* Меню по правой кнопке на карте */
.ctx-menu {
  position: absolute; z-index: 10; min-width: 220px; padding: 6px; border-radius: var(--radius-md);
  background: var(--surface); box-shadow: var(--shadow-glass);
}
.ctx-menu button {
  display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 12px;
  border-radius: 10px; font-size: 14px; cursor: pointer; color: var(--ink);
}
.ctx-menu button:hover { background: var(--state-hover); }

/* Сообщение внизу по центру */
.toast {
  position: absolute; left: 50%; bottom: 32px; transform: translateX(-50%); z-index: 20;
  max-width: min(520px, calc(100% - 32px)); padding: 12px 16px; border-radius: var(--radius-md);
  background: #1b1d21; color: #fff; font-size: 14px; box-shadow: var(--shadow-glass);
}

/* ---------- Уже 768 px — раскладка телефона: лист снизу ---------- */
@media (max-width: 767px) {
  :root { --btn-h: 56px; --ibtn: 48px; --search-h: 52px; }
  body { font-size: 17px; }
  #panel {
    top: auto; bottom: 0; left: 0; right: 0; width: auto; max-height: 62%;
    border-radius: var(--radius-sheet) var(--radius-sheet) 0 0; border-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  #panel::before { content: ''; display: block; width: 36px; height: 5px; border-radius: 3px; background: var(--ink-3); opacity: .4; margin: 8px auto 0; }
  .panel-top { padding-top: 8px; }
  .kbd, .collapse { display: none; }
  .map-ctrls { top: 80px; transform: none; }
  .ctrl-zoom { display: none !important; }
  .top-right { left: var(--gap); justify-content: flex-end; }
  .maplibregl-ctrl-bottom-right { display: none; }
  [data-tip]::after { display: none; }
}

/* ---------- Метки для объяснений (?pins) ---------- */
.pin-mark {
  width: 26px; height: 26px; border-radius: 50%; background: #d32f2f; color: #fff;
  border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .4);
  font: 700 14px/22px system-ui, sans-serif; text-align: center; cursor: pointer;
}
.pin-bar {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 5;
  background: #fff; border-radius: 8px; box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
  padding: 6px 10px; font: 13px system-ui, sans-serif;
}
.pin-bar button { margin-left: 8px; }

/* Небо над горизонтом в наклонном виде (fe/web/sky.js задаёт цвета по времени и погоде) */
#map { background: linear-gradient(to bottom, var(--sky-top, #5c8fdb) 0%, var(--sky-bottom, #c7ddf5) 45%); }
.sky-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }

/* Я на карте: точка accent 18 px, белая обводка 3 px, ореол 12% */
.me-dot {
  width: 18px; height: 18px; border-radius: 50%; background: var(--accent);
  border: 3px solid #fff; box-shadow: 0 0 0 14px color-mix(in srgb, var(--accent) 12%, transparent), 0 1px 3px #0003;
}

/* Цвет рубрики у круга в строке — поверх серого круга */
.row-icon.tone-food { background: var(--poi-food-soft); color: var(--poi-food-ink); }
.row-icon.tone-health { background: var(--success-soft); color: var(--success-ink); }
.row-icon.tone-accent { background: var(--accent-soft); color: var(--accent-ink); }
.row-icon.tone-fuel { background: var(--accent-soft); color: var(--poi-fuel); }
.search:has(#search-input:not(:placeholder-shown)) .kbd { display: none; }

/* ---------- Аккаунт: кнопки, меню профиля, окно входа, «Мои места» ---------- */
.account-btns { display: flex; gap: 8px; align-items: center; }
.top-right .mbtn { width: 44px; height: 44px; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; border: 3px solid #fff; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); font: 700 18px var(--font-display); cursor: pointer; padding: 0;
  box-shadow: var(--shadow-accent);
}
.avatar.big { width: 52px; height: 52px; font-size: 22px; border: 0; box-shadow: none; cursor: default; flex: none; }

.menu {
  position: absolute; z-index: 30; top: 72px; right: var(--gap); width: 330px; padding: 14px;
  border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-glass);
}
.menu-head { display: flex; gap: 12px; align-items: center; width: calc(100% + 8px); margin: -2px -4px 4px; padding: 6px 8px; border: 0; border-radius: 14px; background: none; color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
@media (hover: hover) { .menu-head:hover { background: var(--state-hover); } }
.menu-name { display: inline-flex; align-items: center; gap: 6px; font: 600 16px/20px var(--font-display); }
.menu-name .ic { color: var(--ink-2); flex: none; }
.menu-value { margin-left: auto; color: var(--ink-2); font-size: 14px; }
.menu-sub { font-size: 13px; color: var(--ink-2); }
.menu-sep { height: 1px; background: var(--hairline); margin: 6px 0; }
.menu-label { font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 10px 4px 2px; }
.menu .seg { margin: 4px 0 6px; }
.menu-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 6px; border: 0; background: none;
  border-radius: 10px; cursor: pointer; font-size: 15px; color: var(--ink); text-align: left;
}
.menu-item:hover { background: var(--state-hover); }
.menu-item .ic { color: var(--ink-2); }
.menu-item.danger, .link.danger { color: var(--danger); }

.scrim { position: fixed; inset: 0; z-index: 40; background: var(--scrim); display: grid; place-items: center; padding: 16px; }
.dialog {
  width: min(560px, 100%); max-height: calc(100% - 32px); overflow-y: auto;
  padding: 22px 24px 24px; border-radius: var(--radius-xl); background: var(--surface); box-shadow: var(--shadow-glass);
}
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.dialog-title { margin: 0; font: 600 19px var(--font-display); }
.dialog-title.small { font-size: 17px; }
.dialog-note { margin: 12px 0 0; font-size: 14px; color: var(--ink-2); }
.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.qr-row { display: flex; gap: 22px; align-items: center; }
.qr-box {
  width: 184px; height: 184px; flex: none; padding: 16px; border-radius: var(--radius-lg);
  background: #fff; border: 1px solid var(--hairline); display: grid; place-items: center;
}
.qr-box svg { width: 100%; height: 100%; }
.qr-wait { width: 100%; height: 100%; border-radius: 8px; background: #eef0f2; animation: pulse 1.2s infinite ease-in-out; }
.qr-steps { margin: 0; padding-left: 22px; font-size: 15px; line-height: 2; }
.or { display: flex; align-items: center; gap: 12px; color: var(--ink-2); font-size: 14px; margin: 18px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--hairline); }
.phone-form { display: flex; gap: 8px; margin-top: 4px; }
.field {
  flex: 1; min-width: 0; height: var(--btn-h); padding: 0 14px; border-radius: 14px; border: 1px solid var(--hairline);
  background: var(--surface); color: var(--ink); font: 400 16px var(--font-sans); outline: 0;
}
.field:focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
/* Код входа (Веб 3.3, 3.4): 4 клетки поверх одного поля — подстановка кода и вставка работают как обычно */
.code-cells { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0 4px; }
.code-cell { height: 56px; border-radius: var(--radius-md); background: var(--surface-2); display: grid; place-items: center; font: 600 24px var(--font-display); }
.code-cell.active { box-shadow: inset 0 0 0 2px var(--accent); background: var(--surface); }
.code-input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; border: 0; font-size: 16px; caret-color: transparent; }
.code-cells + .form-error + .btn, .code-cells + .btn { margin-top: 14px; }
.signin-note { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; margin-top: 12px; font-size: 13px; line-height: 17px; color: var(--ink-2); }
.signin-note > span:first-child { flex: 1 1 0; min-width: 0; }
.signin-note > .link { flex: none; align-self: flex-start; }
.signin-note.center { justify-content: center; margin-top: 14px; }
.signin-note.center > span:first-child { flex: none; }
.signin-note .link { font-size: 13px; font-weight: 600; }
.dialog .back { margin-right: auto; }
.form-error { margin-top: 10px; font-size: 14px; color: var(--danger); }
.muted { color: var(--ink-2); font-size: 14px; }
.btn.small { height: 36px; padding: 0 12px; font-size: 13px; }
.btn.wide { width: 100%; margin-top: 12px; }
.ibtn.on { color: var(--accent); background: var(--accent-soft); }
.ibtn.on .ic { fill: currentColor; }

.popover {
  position: fixed; z-index: 35; width: 340px; padding: 16px 18px 18px; border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--shadow-glass);
}
.check-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; cursor: pointer; }
.check { width: 22px; height: 22px; accent-color: var(--accent); flex: none; cursor: pointer; }
.hw-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

.hw { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0 12px; }
.hw-card {
  display: flex; align-items: center; gap: 10px; padding: 12px; border: 0; border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--shadow-surface); cursor: pointer; text-align: left; color: var(--ink); min-width: 0;
}
.hw-card:hover { box-shadow: var(--shadow-surface), inset 0 0 0 100px var(--state-hover); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 0; border-radius: var(--radius-pill);
  background: var(--surface); box-shadow: var(--shadow-surface); font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer;
}
.chip:hover { box-shadow: var(--shadow-surface), inset 0 0 0 100px var(--state-hover); }
.chip.active { background: var(--ink); color: var(--surface); }
.chip-icon { width: 36px; padding: 0; justify-content: center; }
.hw-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.hw-chips:not(:empty) { margin: 2px 0 8px; }
.row { position: relative; }
.row-remove {
  width: 24px; height: 24px; border-radius: 50%; display: none; place-items: center; flex: none;
  background: var(--surface-2); color: var(--ink-2);
}
.row:hover .row-remove { display: grid; }
@media (max-width: 767px) {
  .menu { left: 8px; right: 8px; width: auto; }
  .qr-row, .or { display: none; }
  .popover { left: 8px !important; right: 8px; width: auto; }
}

/* ---------- Карточка: фото, оценка, статус, вкладки, отзывы ---------- */
.photos { display: grid; grid-template-columns: 2fr 1fr; gap: 6px; height: 180px; margin: 2px 0 14px; border-radius: var(--radius-lg); overflow: hidden; }
.photos.single { grid-template-columns: 1fr; }
.ph-big { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-col { display: grid; grid-template-rows: 1fr 1fr; gap: 6px; min-height: 0; }
.ph-small { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 0; }
.ph-more {
  border: 0; padding: 0; cursor: pointer; background: #3b3530 center / cover; color: #fff; font: 600 15px var(--font-sans);
  display: grid; place-items: center; position: relative;
}
.ph-more::before { content: ''; position: absolute; inset: 0; background: #0006; }
.ph-more span { position: relative; }
.card-rating { font-size: 15px; margin-bottom: 4px; }
.star { color: var(--ink-3); }
.star.on { color: #f2a93b; }
.st-open { color: var(--success-ink); font-weight: 600; }
.st-soon { color: var(--warning-ink); font-weight: 600; }
.st-closed { color: var(--danger); font-weight: 600; }
.card-tabs { margin: 14px 0 6px; }
/* Отзывы (Веб 2.12) */
.review { display: flex; flex-direction: column; gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--hairline); }
.review p { margin: 0; font-size: 15px; line-height: 21px; white-space: pre-wrap; overflow-wrap: anywhere; }
.review-head { display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: center; gap: 10px; }
.review-av { width: 36px; height: 36px; border-radius: 18px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.review-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 15px; line-height: 20px; }
.review-meta { display: flex; align-items: center; gap: 6px; font-size: 13px; line-height: 16px; color: var(--ink-2); }
.review-stars { display: inline-flex; gap: 1px; }
.review-stars .rs { display: flex; color: var(--hairline); }
.review-stars .rs.on { color: var(--warning); }
.review-stars .rs .ic { fill: currentColor; }
.review-actions { display: flex; }
.review-sum { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 20px; margin: 8px 0 16px; }
.review-sum-left { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.review-big { font: 700 44px/48px var(--font-display); letter-spacing: -0.02em; }
.review-bars { display: flex; flex-direction: column; gap: 5px; }
.review-bar { display: grid; grid-template-columns: 10px minmax(0, 1fr); align-items: center; gap: 8px; font-size: 12px; line-height: 14px; color: var(--ink-2); }
.review-track { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.review-fill { display: block; height: 100%; border-radius: 3px; background: var(--warning); }
.rate-box { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 10px 10px 14px; border-radius: var(--radius-lg); background: var(--surface-2); }
.rate-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 15px; line-height: 20px; }
.rate-stars { display: flex; }
.rate-star { width: 36px; height: 44px; padding: 0; border: 0; background: none; display: flex; align-items: center; justify-content: center; color: var(--ink-2); cursor: pointer; }
.rate-star.on { color: var(--warning); }
.rate-star.on .ic { fill: currentColor; }
.muted.small, .small { font-size: 13px; line-height: 17px; }
.link-btn { border: 0; background: none; padding: 8px 0 0; font: inherit; font-size: 14px; font-weight: 600; color: var(--accent-ink); cursor: pointer; }
.chips-row { display: flex; gap: 6px; overflow-x: auto; margin: 14px calc(-1 * var(--gap)) 0; padding: 2px var(--gap); scrollbar-width: none; }
.chip.sm { height: 32px; padding: 0 12px; font-size: 13px; flex: none; gap: 4px; }
.review-form { margin: 8px 0 4px; }
.field.area { display: block; width: 100%; height: 96px; padding: 10px 14px; resize: vertical; font-size: 15px; }
.ph-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin-top: 12px; border-radius: var(--radius-lg); overflow: hidden; }
.ph-cell { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--surface-2); border: 0; padding: 0; cursor: zoom-in; }
.ph-av { position: absolute; left: 6px; bottom: 6px; width: 20px; height: 20px; border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 11px; font-weight: 700; display: grid; place-items: center; box-shadow: var(--shadow-surface); }
/* Просмотр фото на всё окно (Веб 2.13) */
.ph-viewer { position: fixed; inset: 0; z-index: 50; background: rgba(10, 12, 16, .92); color: #fff; display: grid; place-items: center; }
.ph-viewer-head { position: absolute; top: 16px; left: 20px; right: 16px; display: flex; justify-content: space-between; align-items: flex-start; font-size: 15px; }
.ph-viewer-count { font-size: 13px; color: rgba(255,255,255,.7); }
.ph-viewer-img { max-width: calc(100% - 160px); max-height: calc(100% - 140px); border-radius: var(--radius-lg); object-fit: contain; }
.ph-viewer-btn { width: 40px; height: 40px; border-radius: 20px; border: 0; background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; cursor: pointer; }
.ph-viewer-btn:hover { background: rgba(255,255,255,.24); }
.ph-viewer-prev, .ph-viewer-next { position: absolute; top: 50%; transform: translateY(-50%); }
.ph-viewer-prev { left: 16px; }
.ph-viewer-next { right: 16px; }
.ph-viewer-cap { position: absolute; left: 0; right: 0; bottom: 20px; text-align: center; font-size: 13px; color: rgba(255,255,255,.75); }
@media (max-width: 767px) { .ph-viewer-img { max-width: 100%; border-radius: 0; } }
.ph-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-badge { position: absolute; left: 6px; top: 6px; padding: 2px 8px; border-radius: 8px; background: #000a; color: #fff; font-size: 11px; }
label.btn { cursor: pointer; }
.report-link { display: block; margin: 16px 0 4px; font-size: 14px; }
.report-types { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.mbtn.active { color: var(--on-accent); background: var(--accent); }

/* События на дороге */
.ev {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; display: grid; place-items: center; cursor: pointer;
  background: var(--danger); color: #fff; box-shadow: 0 1px 4px #0005; padding: 0;
}
.ev-roadwork, .ev-hazard { background: #f2a93b; color: #1b1d21; }
.ev-camera, .ev-police { background: #5b6cf7; }
.ev-vote { display: flex; gap: 6px; margin-top: 8px; }

/* Варианты маршрута */
.route-options { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 10px; }
/* Вариант маршрута (RouteOption): выбранный — подложка accent-soft и рамка accent */
.route-opt {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 12px;
  border: 1.5px solid transparent; border-radius: var(--radius-lg); background: transparent; cursor: pointer; color: var(--ink);
  font: inherit;
}
@media (hover: hover) { .route-opt:not(.active):hover { background-image: linear-gradient(var(--state-hover), var(--state-hover)); } }
.route-opt.active { background: var(--accent-soft); border-color: var(--accent); }
.route-opt-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.route-opt-time { font-size: 17px; line-height: 22px; font-weight: 600; }
.route-opt.active .route-opt-time { font-size: 20px; line-height: 24px; font-weight: 700; letter-spacing: -0.01em; }
.route-opt-dist { font-size: 15px; font-weight: 500; color: var(--ink-2); }
.route-opt-note { font-size: 13px; line-height: 16px; color: var(--ink-2); }
/* транспорт: прежняя карточка варианта */
.route-opt-top { display: flex; align-items: center; gap: 10px; }
.route-options .route-opt:has(.route-opt-top) { display: block; }

/* «Пошагово · прибытие в 14:26 · Все шаги ›» и до четырёх шагов (Веб 2.5) */
.steps-short { display: flex; flex-direction: column; }
.steps-short-head {
  display: flex; align-items: center; justify-content: space-between; min-height: 28px; padding: 0; border: 0; background: none;
  font: inherit; font-size: 13px; line-height: 16px; font-weight: 600; color: var(--ink-2); cursor: pointer; text-align: left;
}
.steps-short-more { display: inline-flex; align-items: center; gap: 2px; color: var(--accent-ink); }
.steps-short-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 36px; }
.steps-short-ic { display: flex; color: var(--ink-2); }
.steps-short-text { font-size: 14px; line-height: 18px; }
.steps-short-dist { font-size: 13px; line-height: 16px; color: var(--ink-2); }

/* Низ панели маршрута: «Отправить на телефон» и «…» */
.route-bottom {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; position: sticky; bottom: calc(-1 * var(--gap)); z-index: 1;
  margin: 8px calc(-1 * var(--gap)) calc(-1 * var(--gap)); padding: 12px var(--gap) var(--gap);
  background: var(--glass); -webkit-backdrop-filter: blur(var(--blur-glass)) saturate(1.6); backdrop-filter: blur(var(--blur-glass)) saturate(1.6);
}
.route-bottom:has(> :only-child) { grid-template-columns: 1fr; }
.btn.icon-only { width: 44px; padding: 0; justify-content: center; }
.btn-ghost { background: transparent; color: var(--ink); }
@media (hover: hover) { .btn-ghost:hover { background: var(--state-hover); } }

/* Пошаговый маршрут (Веб 2.6) */
.rsteps-title { font: 700 22px/28px var(--font-display); letter-spacing: -0.01em; margin-top: 4px; }
.rsteps-time { color: var(--success-ink); }
.rsteps-sub { font-size: 13px; line-height: 16px; color: var(--ink-2); margin-top: 4px; }
.rsteps-actions { display: flex; gap: 8px; margin: 12px 0 8px; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; gap: 6px; }
.rsteps { list-style: none; margin: 0; padding: 8px 0 0; border-top: 1px solid var(--hairline); display: flex; flex-direction: column; }
.rstep { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; padding: 8px; border-radius: 12px; cursor: pointer; }
@media (hover: hover) { .rstep:hover { background: var(--state-hover); } }
.rstep.active { background: var(--surface-2); }
.rstep-ic { width: 28px; height: 28px; border-radius: 14px; background: var(--surface-2); color: var(--ink-2); display: flex; align-items: center; justify-content: center; }
.rstep.active .rstep-ic { background: var(--accent); color: var(--on-accent); }
.rstep-title { font-size: 14px; line-height: 18px; font-weight: 600; }
.rstep-sub { font-size: 12px; line-height: 15px; color: var(--ink-2); margin-top: 2px; }
.rstep-side { text-align: right; }
.rstep-dist { font-size: 13px; line-height: 18px; font-weight: 600; }
.rstep-time { font-size: 12px; line-height: 15px; color: var(--ink-2); }
.step-callout {
  display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; background: var(--surface);
  box-shadow: var(--shadow-glass); font-size: 13px; line-height: 16px; white-space: nowrap; color: var(--ink);
}
.step-callout-ic { display: flex; color: var(--ink-2); }

/* Печать маршрута на A4 (Веб 2.7): на экране не видно, при печати — только она */
.print-route { display: none; }
@media print {
  @page { size: A4; margin: 14mm; }
  body > *:not(#print-route) { display: none !important; }
  #print-route { display: block; color: #1b1d21; font: 12px/1.4 var(--font-sans); }
  .pr-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
  .pr-brand { display: flex; align-items: center; gap: 8px; font-size: 14px; }
  .pr-logo { width: 22px; height: 22px; border-radius: 6px; background: #0a6cff; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pr-date { color: #5e636e; font-size: 11px; }
  .pr-title { font: 700 22px/28px var(--font-display); margin: 0 0 4px; }
  .pr-sub { color: #5e636e; margin-bottom: 12px; }
  .pr-map { display: block; width: 100%; max-height: 90mm; object-fit: cover; border-radius: 8px; border: 1px solid #e3e5e8; margin-bottom: 14px; }
  .pr-steps { width: 100%; border-collapse: collapse; }
  .pr-steps th { text-align: left; font-size: 10px; text-transform: uppercase; color: #5e636e; font-weight: 600; border-bottom: 1px solid #c9ccd1; padding: 4px 6px; }
  .pr-steps td { border-bottom: 1px solid #e3e5e8; padding: 7px 6px; vertical-align: top; }
  .pr-steps .num { text-align: right; white-space: nowrap; }
  .pr-steps .ic { width: 18px; color: #5e636e; }
  .pr-steps tr { break-inside: avoid; }
  .pr-muted { color: #5e636e; font-size: 11px; }
  .pr-qr { display: flex; gap: 14px; align-items: center; margin-top: 18px; padding-top: 14px; border-top: 1px solid #e3e5e8; break-inside: avoid; }
  .pr-qr-code { width: 26mm; height: 26mm; flex: none; }
  .pr-qr-code svg { width: 100%; height: 100%; }
}
.route-legs { display: inline-flex; gap: 4px; align-items: center; margin-left: auto; color: var(--ink-2); }
.transit-step { display: inline-flex; align-items: center; gap: 6px; }
.menu .seg-item { font-size: 13px; padding: 0 4px; }

#card .seg-item { padding: 0 6px; gap: 4px; }
.meta-actions { display: inline-flex; gap: 14px; }
.trips:not(:empty) { margin-bottom: 4px; }
.hw-chips .trips { flex-basis: 100%; }

/* Слои карты */
.layers-pop { width: 360px; }
.layer-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--hairline); cursor: pointer; }
.layer-row:first-of-type { border-top: 0; }
.layer-row .row-sub { white-space: normal; }
.map-types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 4px 0 8px; }
.map-type {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px 4px 6px; border: 0; border-radius: 14px;
  background: transparent; color: var(--ink); font: inherit; font-size: 13px; line-height: 16px; font-weight: 500; cursor: pointer;
}
.map-type:hover { background: var(--surface-2); }
.map-type.on { font-weight: 600; }
.map-type-pic { display: block; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--hairline); }
.map-type.on .map-type-pic { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.map-type-pic svg { display: block; border-radius: 10px; max-width: 100%; height: auto; }
.switch {
  appearance: none; -webkit-appearance: none; flex: none; width: 46px; height: 28px; border-radius: 14px; margin: 0;
  background: var(--surface-2); position: relative; cursor: pointer; transition: background .15s;
}
.switch::after {
  content: ''; position: absolute; left: 2px; top: 2px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px #0003; transition: transform .15s;
}
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(18px); }
.chip-meta { color: var(--ink-2); font-weight: 400; }

/* «Не видим, где вы» */
.state-card {
  position: absolute; z-index: 25; top: var(--gap); left: 50%; transform: translateX(-50%);
  width: min(620px, calc(100% - 2 * var(--gap))); display: flex; gap: 16px; padding: 18px 20px;
  border-radius: var(--radius-xl);
}
body:not(.collapsed) .state-card { left: calc(var(--panel-w) + 2 * var(--gap) + (100% - var(--panel-w) - 2 * var(--gap)) / 2); }
.state-icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.state-body h3 { margin: 4px 0 4px; font: 600 19px var(--font-display); }
.state-body p { margin: 0; font-size: 15px; color: var(--ink-2); }
.state-actions { display: flex; gap: 8px; margin-top: 14px; }
.state-actions .btn-primary { flex: 1; }
.mbtn.tip-show::after { opacity: 1; transition-delay: 0s; }

/* «Нет сети» */
.offline-bar {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; margin-bottom: 10px;
  border-radius: var(--radius-md); background: var(--surface-2); font-size: 14px; color: var(--ink-2);
}
.offline-bar b { color: var(--ink); }
.offline-bar .ic { color: var(--warning-ink); flex: none; }
.tiles-card {
  position: absolute; z-index: 25; right: calc(var(--gap) + 64px); bottom: 64px; width: 380px; padding: 18px 20px;
  border-radius: var(--radius-xl);
}
.tiles-card h3 { margin: 0 0 6px; font: 600 17px var(--font-display); }
.tiles-card p { margin: 0 0 12px; font-size: 15px; color: var(--ink-2); }

/* Варианты маршрута: «Быстрее», события */
/* Бейдж (Badge): «Быстрее», «Пробки», «Авария» */
.badge { display: inline-flex; align-items: center; flex: none; height: 26px; padding: 0 10px; border-radius: var(--radius-pill); font-size: 12px; line-height: 14px; font-weight: 600; white-space: nowrap; }
.badge.green { background: var(--success); color: var(--on-success); }
.badge.amber { background: var(--warning-soft); color: var(--warning-ink); }

/* 768–1023 px: панель свёрнута до поиска, пока двигают карту */
@media (min-width: 768px) and (max-width: 1023px) {
  #panel.compact #panel-body { display: none; }
  #panel.compact .panel-top { padding-bottom: var(--gap); }
}
@media (max-width: 767px) {
  .state-card, body:not(.collapsed) .state-card { left: 50%; top: 72px; }
  .tiles-card { left: 8px; right: 8px; width: auto; bottom: auto; top: 72px; }
}

/* Промежуточные точки и «Параметры маршрута» */
.dot-via { background: var(--surface); box-shadow: inset 0 0 0 3px var(--ink-2); }
.route-point .via-remove { margin-left: auto; display: grid; }
.route-chips { margin: 10px 0 2px; }
.route-chips .chip { height: 34px; padding: 0 12px; font-size: 13px; }
.chip.active-soft { background: var(--accent-soft); color: var(--accent-ink); box-shadow: none; }
.route-opts { width: 360px; }
.route-opts .section-label { margin-top: 12px; }
.time-field { display: block; width: 140px; margin-top: 8px; height: 40px; }

/* Карточка точки на карте (11.6) */
.card-coords { display: flex; gap: 12px; align-items: baseline; font-size: 14px; color: var(--ink-2); margin: 2px 0 4px; }
.card-actions .btn-secondary { flex: none; }

/* Настройки (13.5) */
.radio-list { margin: 2px 0 4px; }
.radio-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-top: 1px solid var(--hairline); cursor: pointer; font-size: 15px; }
.radio-row:first-child { border-top: 0; }
.radio { width: 22px; height: 22px; accent-color: var(--accent); margin: 0; cursor: pointer; }
.history-row .row-remove { display: grid; opacity: .7; }

/* Новый список (13.4) */
.dialog-small { width: min(460px, 100%); }
.icon-pick { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.ibtn.on-solid { background: var(--accent); color: var(--on-accent); }

/* «Отправить на телефон» */

.card-head .close { margin-left: auto; }
.dialog-actions .btn-primary { flex: none; }

/* Кнопка маршрута у поиска (11.1) */
.panel-top.with-route { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.panel-top.with-route .offline-bar { flex-basis: 100%; margin-bottom: 0; }
.panel-top.with-route .search { flex: 1; min-width: 0; }
.search-route { width: var(--search-h); height: var(--search-h); background: var(--surface); box-shadow: var(--shadow-surface); }

/* Загрузка поиска (11.4) */
.search-loading { display: flex; align-items: center; gap: 10px; padding: 10px 0 6px; font-size: 14px; color: var(--ink-2); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--surface-2); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { justify-content: space-between; padding: 12px 0; }
.skeleton-lines { flex: 1; display: grid; gap: 8px; }
.skeleton .sk-1 { height: 14px; width: 55%; }
.skeleton .sk-2 { height: 10px; width: 35%; }
.skeleton .sk-3 { height: 10px; width: 70%; }
.skeleton .sk-pic { width: 64px; height: 64px; border-radius: var(--radius-md); flex: none; }

/* Поделиться (12.3) */
.share-pop { width: 360px; }
.share-pop .phone-form { margin: 2px 0 8px; }

/* Время вариантов и номера маршрутов на карте (12.4, 12.5) */
.route-bubble {
  border: 0; cursor: pointer; padding: 6px 12px; border-radius: var(--radius-pill); white-space: nowrap;
  background: var(--surface); color: var(--ink); font: 700 14px var(--font-sans); box-shadow: var(--shadow-glass);
}
.route-bubble.active { background: var(--accent); color: var(--on-accent); }
.route-bubble.ref { color: #fff; padding: 3px 9px; border-radius: 8px; cursor: default; }

/* Режимы маршрута: значок над временем (12.4) */
#card .seg-item.mode-item { flex-direction: column; height: auto; padding: 6px 4px; gap: 2px; font-size: 13px; }

/* Поездка на транспорте (12.5) */
.route-arrive { margin-left: auto; color: var(--ink-2); font-size: 14px; }
.leg-chain { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.leg-walk { display: inline-flex; align-items: center; gap: 2px; color: var(--ink-2); font-size: 14px; }
.leg-sep { color: var(--ink-3); }
.tsteps { list-style: none; margin: 8px 0 0; padding: 0; }
.tstep { position: relative; display: flex; gap: 12px; padding: 8px 0 10px; }
.tstep-mark { width: 34px; flex: none; display: flex; justify-content: center; color: var(--ink-2); position: relative; }
.tstep-ride .tstep-mark::after, .tstep-walk:not(:last-child) .tstep-mark::after {
  content: ''; position: absolute; top: 28px; bottom: -14px; left: 50%; transform: translateX(-50%);
}
.tstep-ride .tstep-mark::after { width: 4px; background: var(--leg-color); }
.tstep-walk:not(:last-child) .tstep-mark::after { border-left: 3px dotted var(--ink-3); }
.tstep-dot { width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--leg-color); background: var(--surface); margin-top: 3px; }
.tstep-title { font-size: 15px; font-weight: 600; }
.transit-empty .empty-actions { display: grid; gap: 8px; margin-top: 16px; }

/* Нижняя строка (11.1) */
.map-footer { display: flex; gap: 14px; align-items: center; padding: 4px 12px; border-radius: var(--radius-pill); background: var(--glass); font-size: 13px; color: var(--ink-2); }
.map-footer .link { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.map-footer .sat-credit { font-size: 11px; }

/* Плашка с действием: «Адрес дома удалён · Вернуть» */
.toast-action { margin-left: 14px; border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: #8ab4ff; cursor: pointer; }

/* Поле с подписью, крестиком и счётчиком (Веб 3.9 «Имя») */
.field-label { display: block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; color: var(--ink-2); margin: 4px 0 6px; }
.field-wrap { position: relative; }
.field-wrap .field { width: 100%; padding-right: 40px; box-sizing: border-box; }
.field-clear { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 11px; border: 0; background: var(--ink-3); color: var(--surface); display: grid; place-items: center; cursor: pointer; padding: 0; }
.field-help { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 13px; line-height: 17px; color: var(--ink-2); }
.field-count { flex: none; }
.name-form .dialog-actions { margin-top: 18px; }
.name-form .dialog-actions .btn { flex: 1; }

/* «Мои адреса» (Веб 3.10) */
.addr { border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-surface); margin-top: 10px; overflow: hidden; }
.addr-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; background: none; cursor: pointer; color: var(--ink); text-align: left; font: inherit; }
.addr-row > .ic { color: var(--ink-2); margin-left: auto; flex: none; }
.addr-row .row-body { flex: 1; min-width: 0; }
.addr-editor { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.addr-sugg { display: flex; flex-direction: column; }
.addr-opt { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border: 0; background: none; border-radius: 10px; cursor: pointer; color: var(--ink); text-align: left; font: inherit; }
@media (hover: hover) { .addr-opt:hover { background: var(--state-hover); } }
.addr-opt > .ic { color: var(--ink-2); flex: none; }
.addr-opt.on > .ic:last-child { color: var(--accent); }
.addr-opt .row-body { flex: 1; min-width: 0; }
.addr-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.addr-del { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 0 0; }
.addr-note { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-lg); background: var(--surface-2); font-size: 14px; }
.addr-note .row-icon { flex: none; }
.hw-edit { display: inline-flex; align-items: center; gap: 6px; margin: -4px 0 10px; }
.settings-delete { display: block; margin: 18px 0 4px; }

/* «Условия и конфиденциальность» (Веб 3.8) */
.dialog.terms { width: min(640px, 100%); max-height: min(760px, calc(100vh - 32px)); display: flex; flex-direction: column; }
.terms-body { overflow-y: auto; margin-top: 8px; padding-right: 4px; }
.terms-body h3 { margin: 14px 0 4px; font: 600 15px/20px var(--font-display); }
.terms-body p { margin: 0; font-size: 14px; line-height: 20px; color: var(--ink-2); }

/* «Уменьшить прозрачность» в системе (Веб 1.9): стекло → сплошной surface с рамкой hairline */
@media (prefers-reduced-transparency: reduce) {
  .glass, .route-bottom { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; border-color: var(--hairline); }
}

/* Результаты поиска (Веб 1.3): фильтры, «18 мест · на карте отмечены все», строки мест с плиткой */
.results-filters { margin: 4px calc(-1 * var(--gap)) 6px; }
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 6px 0 2px; font-size: 13px; line-height: 16px; color: var(--ink-2); }
.results-sort { display: inline-flex; align-items: center; gap: 2px; border: 0; background: none; padding: 4px 0; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; }
.place-row { display: grid; grid-template-columns: minmax(0, 1fr) 64px; gap: 12px; align-items: center; width: calc(100% + 16px); margin: 0 -8px; padding: 10px 8px; border: 0; border-radius: 16px; background: none; color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
@media (hover: hover) { .place-row:hover { background: var(--state-hover); } }
.place-row-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.place-row-name { font-size: 16px; line-height: 20px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.place-row-meta { display: flex; align-items: center; gap: 4px; font-size: 13px; line-height: 16px; color: var(--ink-2); }
.place-row-meta b { color: var(--ink); }
.place-row-sub { font-size: 13px; line-height: 16px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.place-row-status { font-size: 13px; line-height: 16px; }
.place-row-tile { width: 64px; height: 64px; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.place-row-tile.tone-food { background: var(--poi-food-soft); color: var(--poi-food-ink); }
.place-row-tile.tone-health { background: var(--success-soft); color: var(--success-ink); }
.place-row-tile.tone-fuel { background: var(--accent-soft); color: var(--poi-fuel); }
.empty-state .btn { margin-top: 12px; }
.review-teaser { padding: 12px; border: 0; border-radius: 16px; background: var(--surface-2); margin-top: 12px; cursor: pointer; }
@media (hover: hover) { .review-teaser:hover { background-image: linear-gradient(var(--state-hover), var(--state-hover)); } }
.ph-clickable { cursor: pointer; }

/* ---------- Поворот и наклон (дизайн 1.10, 1.11) ---------- */
.ctrl-gap { height: 8px; }
.ctrl-rot { position: relative; }
.ctrl-rot[hidden] { display: none; }
.ctrl-rot .rot-step { height: 32px; color: var(--ink-2); }
.ctrl-rot .compass { transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
.mbtn.d3 { font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.rot-tip {
  position: absolute; right: calc(100% + 10px); top: 36px; width: 268px; box-sizing: border-box;
  display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 12px;
  background: var(--ink); color: var(--map-bg); font-size: 13px; line-height: 16px; box-shadow: 0 4px 14px #0a141e33;
  pointer-events: none; opacity: 0; transition: opacity .15s;
}
.ctrl-rot:has(.rot-compass:hover) .rot-tip { opacity: 1; transition-delay: .5s; }
.rot-keys { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; opacity: .86; }
.rot-keys span:nth-child(even) { display: flex; gap: 4px; }
.rot-mouse { opacity: .86; }
.rot-tip kbd, .rot-hint kbd {
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-width: 20px; height: 20px;
  padding: 0 5px; border-radius: 5px; background: var(--surface); color: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--hairline), 0 1px 0 var(--hairline); font: 600 11px/13px var(--font-sans);
}
.rot-tip kbd { background: transparent; color: var(--map-bg); box-shadow: inset 0 0 0 1px currentColor; opacity: .8; }
.rot-hint {
  position: absolute; z-index: 25; bottom: 60px; left: 50%; transform: translateX(-50%);
  width: min(560px, calc(100% - 2 * var(--gap))); box-sizing: border-box; padding: 20px; border-radius: var(--radius-xl);
  display: flex; flex-direction: column; gap: 16px; color: var(--ink);
}
body:not(.collapsed) .rot-hint { left: calc(var(--panel-w) + 2 * var(--gap) + (100% - var(--panel-w) - 2 * var(--gap)) / 2); }
.rot-hint-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.rot-hint-head h3 { margin: 0 0 4px; font: 600 17px/22px var(--font-sans); }
.rot-hint-head p { margin: 0; font-size: 14px; line-height: 18px; color: var(--ink-2); }
.rot-hint-head .close { width: 28px; height: 28px; }
.rot-hint-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.rot-hint-cell { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: var(--radius-md); background: var(--surface-2); }
.rot-hint-cell b { font-size: 14px; line-height: 18px; font-weight: 600; }
.rot-hint-cell p { margin: 0; font-size: 13px; line-height: 22px; color: var(--ink-2); }
.rot-hint-foot { display: flex; justify-content: flex-end; }
.rot-hint-foot .btn-primary { flex: none; }
@media (max-width: 767px) { .rot-tip, .rot-hint { display: none; } }
