:root {
  /* ══════════════════════════════════════════════════════════════
     ДИЗАЙН-СИСТЕМА · v1 (Вечер 1 — фундамент токенов)
     Источник истины. Старые имена ниже — алиасы, чтобы не сломать код.
     ══════════════════════════════════════════════════════════════ */

  /* ── ПОВЕРХНОСТИ (нейтрали) ────────────────────────────────── */
  --bg:       #0c0c10;   /* уровень 0 — фон */
  --surface:  #1a1a22;   /* уровень 1 — поверхность (контраст к фону усилен) */
  --surface2: #24242e;   /* вторичная заливка / pressed */
  --surface3: #2e2e3a;   /* глубокий pressed */
  --border:   rgba(255,255,255,0.07);
  --border2:  rgba(255,255,255,0.12);

  /* ── ТЕКСТ (3 уровня) ──────────────────────────────────────── */
  --text:  #f0ede8;
  --text2: #8b8ba0;
  /* v63: было #5a5a72 — 2.92:1 на фоне, ниже порога даже для крупного текста.
     Третий уровень остаётся тихим, но читаемым (4.8:1). */
  --text3: #7c7c95;
  /* Цвет текста НА акцентной заливке. В тёмной теме акцент светлый → текст тёмный. */
  --on-accent: #0c0c10;

  /* ── ЦВЕТА · 3 роли (единственный источник) ───────────────── */
  --accent:   #7c9cbf;   /* ДЕЙСТВИЕ · холодный, десатурированный */
  --positive: #6fae8f;   /* в рамках бюджета / готово (приглушённый) */
  --alert:    #c16a60;   /* над бюджетом / удаление (приглушённый) */

  /* legacy-алиасы → роли (существующий код продолжает работать) */
  --amber: var(--accent);
  --green: var(--positive);
  --red:   var(--alert);
  --amber-dim:  rgba(124,156,191,0.12);
  --green-dim:  rgba(111,174,143,0.12);
  --red-dim:    rgba(193,106,96,0.14);

  /* --type-* убраны: тип различаем иконкой, не цветом → нейтраль */
  --blue:   var(--accent);  --blue-dim:   rgba(124,156,191,0.12);
  --purple: var(--text2);   --purple-dim: rgba(255,255,255,0.06);
  --type-transport: var(--border2);
  --type-food:      var(--border2);
  --type-place:     var(--border2);
  --type-hotel:     var(--border2);
  --type-warning:   var(--border2);

  /* ── ТИПОГРАФИКА · 5 ступеней ──────────────────────────────── */
  --fs-hero:    32px;   /* Hero    — крупные числа, заголовки экранов */
  --fs-title:   22px;   /* Title   — заголовки карточек/модалок */
  --fs-body:    15px;   /* Body    — основной текст, кнопки */
  --fs-section: 13px;   /* Section — лейблы, мета */
  --fs-caption: 12px;   /* Caption — самое мелкое */
  --font-display: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* ── ОТСТУПЫ · сетка 4px ───────────────────────────────────── */
  --s1: 4px;  --s2: 8px;  --s3: 12px;  --s4: 16px;  --s5: 24px;  --s6: 32px;

  /* ── РАДИУСЫ · 3 ───────────────────────────────────────────── */
  --r-sm: 10px;
  --r-md: 16px;
  --r:    16px;
  --r-lg: 22px;

  /* ── ТЕНЬ · 1 (определена; применяется в Вечер 2) ──────────── */
  --shadow: 0 4px 16px rgba(0,0,0,0.35);
}

/* ══════════════════════════════════════════════════════════════
   СВЕТЛАЯ ТЕМА (Релиз 3) — только адаптация токенов, не новый дизайн.
   JS ставит data-theme="light"/"dark" (system резолвится в один из них).
   Фон тёплый off-white, НЕ чистый #fff. Акцент глубже для читаемости на солнце.
   ══════════════════════════════════════════════════════════════ */
[data-theme="light"] {
  --bg:       #edece8;
  --surface:  #fbfaf7;
  --surface2: #eae8e4;
  --surface3: #dfddd8;
  --border:   rgba(0,0,0,0.09);
  --border2:  rgba(0,0,0,0.15);

  --text:  #2b2a28;
  --text2: #65636c;
  /* v63: было #97949c — 2.53:1. Приложение живёт на улице под солнцем;
     «спокойная» палитра не должна означать нечитаемую. */
  --text3: #66636e;

  /* v63: акцент углублён #4f7396 → #3f5f80. Главная кнопка была тёмным текстом
     на среднем синем — 3.93:1, ниже AA. Теперь белый текст на глубоком синем
     (6.65:1), а сам акцент как текст на фоне даёт 5.62:1. */
  --accent:   #3f5f80;
  --on-accent: #ffffff;
  --positive: #3f8f6a;
  --alert:    #b0473d;

  --amber-dim:  rgba(79,115,150,0.12);
  --green-dim:  rgba(63,143,106,0.12);
  --red-dim:    rgba(176,71,61,0.12);
  --blue-dim:   rgba(79,115,150,0.12);
  --purple-dim: rgba(0,0,0,0.05);

  --shadow: 0 1px 2px rgba(47,40,32,0.05), 0 5px 18px rgba(47,40,32,0.05);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: none; height: 100%; height: -webkit-fill-available; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  display: flex; flex-direction: column;
  height: 100vh;
  height: -webkit-fill-available;
  height: var(--app-height, 100vh);   /* реальная высота из JS — фикс iOS-вьюпорта */
  overflow: hidden;                   /* скроллится только #app-scroll */
  -webkit-font-smoothing: antialiased;
}
#app-scroll {
  flex: 1 1 auto;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

/* HEADER */
header {
  position: sticky; top: 0; z-index: 200;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: calc(18px + env(safe-area-inset-top)) 20px 16px;
  display: flex; justify-content: space-between; align-items: center;
}
header h1 {
  font-family: var(--font-display);
  font-size: var(--fs-title); font-weight: 700; letter-spacing: -0.3px;
  color: var(--text);
}
.header-actions { display: flex; gap: var(--s2); align-items: center; }

/* BUTTONS */
.btn {
  font-family: var(--font-body);
  font-size: var(--fs-section); font-weight: 600;
  border: 1px solid var(--border2);
  background: var(--surface2);
  color: var(--text);
  padding: var(--s2) var(--s4); border-radius: var(--r-lg);
  cursor: pointer; user-select: none;
  transition: transform .12s, background .15s, opacity .15s;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.btn:active { transform: scale(0.95); }
.btn.active { background: var(--amber); color: #000; border-color: var(--amber); font-weight: 700; }
.btn-primary {
  display: block; width: 100%;
  font-family: var(--font-body);
  font-size: var(--fs-body); font-weight: 700;
  background: var(--amber);
  color: var(--on-accent, #0c0c10);
  border: none;
  padding: var(--s4);
  border-radius: var(--r);
  cursor: pointer; text-align: center;
  transition: transform .12s, filter .15s;
  margin-top: var(--s3);
  -webkit-tap-highlight-color: transparent;
}
.btn-primary:active { transform: scale(0.98); filter: brightness(0.9); }
.btn-ghost {
  display: block; width: 100%;
  font-family: var(--font-body);
  font-size: var(--fs-body); font-weight: 500;
  background: var(--surface2);
  color: var(--text2);
  border: 1px solid var(--border);
  padding: var(--s4);
  border-radius: var(--r);
  cursor: pointer; text-align: center;
  transition: background .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn-ghost:active { background: var(--surface3); }
.btn-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text2);
  font-size: var(--fs-body);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s;
  flex-shrink: 0;
}
.btn-icon:active { background: var(--surface3); }
.btn-icon.active { background: var(--amber); color: #000; border-color: var(--amber); }

/* SCREENS */
.screen { display: none; padding: var(--s5); }
.screen.active { display: block; }
.screen.anim-forward  { animation: screenForward  .2s cubic-bezier(.22,1,.36,1) both; }
.screen.anim-back     { animation: screenBack     .18s cubic-bezier(.22,1,.36,1) both; }
.screen.anim-fade     { animation: screenFade     .16s ease both; }
@keyframes screenForward { from { opacity:0; transform:translateX(8px); } to { opacity:1; transform:translateX(0); } }
@keyframes screenBack    { from { opacity:0; transform:translateX(-6px); } to { opacity:1; transform:translateX(0); } }
@keyframes screenFade    { from { opacity:0; } to { opacity:1; } }

/* SECTION LABEL */
.section-label {
  font-family: var(--font-display);
  font-size: var(--fs-caption); font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text3);
  margin: var(--s6) 0 var(--s4);
}
.section-label:first-child { margin-top: 0; }

/* BACK */
.back-btn {
  display: inline-flex; align-items: center; gap: var(--s2);
  color: var(--blue); font-size: var(--fs-body); font-weight: 600;
  cursor: pointer; margin-bottom: var(--s5);
  -webkit-tap-highlight-color: transparent;
  transition: opacity .15s;
}
.back-btn:active { opacity: .5; }
.back-btn::before { content: '←'; font-size: var(--fs-body); }

/* CARDS */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r); box-shadow: var(--shadow);
  padding: var(--s4);
  margin-bottom: var(--s3);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .15s, transform .15s, box-shadow .15s;
  position: relative; overflow: hidden;
}
.card:active { transform: scale(0.99); border-color: var(--border2); }
/* card::before убран — 2.5% оверлей визуально незаметен */
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s3); margin-bottom: var(--s2); }
.card-title { font-family: var(--font-display); font-size: var(--fs-body); font-weight: 700; letter-spacing: -0.2px; line-height: 1.3; }
.card-sub { font-size: var(--fs-caption); color: var(--text2); font-weight: 500; display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; }
.trip-cover-strip { height: 3px; background: var(--amber); margin: -18px -18px var(--s4); border-radius: var(--r) var(--r) 0 0; }
.trip-card-cover { height: 116px; margin: -18px -18px var(--s4); overflow: hidden; border-radius: var(--r) var(--r) 0 0; background: var(--surface2); }
.trip-card-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.trip-card-cover.archived img { filter: saturate(.7); opacity: .82; }

/* BADGE */
.badge {
  font-size: var(--fs-caption); font-weight: 700; letter-spacing: 0.4px;
  padding: var(--s1) var(--s2); border-radius: var(--r-sm);
  background: var(--amber-dim); color: var(--amber);
  white-space: nowrap;
}
.badge.green { background: var(--green-dim); color: var(--green); }
.badge.blue  { background: var(--blue-dim);  color: var(--blue); }
.badge.red   { background: var(--red-dim);   color: var(--red); }
.badge.purple{ background: var(--purple-dim); color: var(--purple); }

/* FINANCE DASH */
.fin-dash {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow);
  padding: var(--s5);
  margin-bottom: var(--s5);
  position: relative; overflow: hidden;
}
.fin-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--s4); margin-bottom: var(--s4); }
.fin-cell .fl { font-size: var(--fs-caption); color: var(--text3); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 700; margin-bottom: var(--s1); }
.fin-cell .fv { font-family: var(--font-display); font-size: var(--fs-title); font-weight: 700; letter-spacing: -0.5px; }
.fin-main { cursor: pointer; text-align: center; -webkit-tap-highlight-color: transparent; }
.fin-main .fl { font-size: var(--fs-caption); color: var(--text3); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 700; margin-bottom: var(--s2); }
.fv-big { font-family: var(--font-display); font-size: var(--fs-hero); font-weight: 700; letter-spacing: -1px; color: var(--green); margin-bottom: var(--s3); }
.fin-expand-hint { font-size: var(--fs-caption); color: var(--text3); font-weight: 600; margin-top: var(--s1); }
.fin-dash.open .fin-expand-hint { display: none; }
.fin-divider { height: 1px; background: var(--border); margin: var(--s4) 0; }
/* burn-chip виден только когда fin-dash раскрыт */
.fin-dash:not(.open) .burn-chip { display: none; }
.fin-dash.open .burn-chip { display: block; }
.burn-chip { background: var(--green-dim); border: 1px solid rgba(52,201,122,0.2); border-radius: var(--r-sm); padding: var(--s3) var(--s4); font-size: var(--fs-section); font-weight: 700; color: var(--green); text-align: center; margin-bottom: 0; }

/* Wallet row в дашборде */
.wallet-row {
  display: flex; justify-content: space-between;
  font-size: var(--fs-caption); padding: var(--s2) 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
  cursor: pointer;
  transition: background 0.1s;
}
.wallet-row:active { background: var(--surface3); }
.wallet-row:last-child { border-bottom: none; }
.wallet-row .wn { color: var(--text2); }
.wallet-row .wv { font-weight: 700; font-family: var(--font-display); }
.wallet-indicator { width: 8px; height: 8px; border-radius: 50%; margin-right: var(--s2); display: inline-block; }
.wallet-indicator.green  { background: var(--green); }
.wallet-indicator.yellow { background: var(--amber); }
.wallet-indicator.red    { background: var(--red); }

/* Сводка по категориям */
.categories-summary {
  display: flex;
  gap: var(--s3);
  flex-wrap: wrap;
  justify-content: space-between;
  background: var(--surface2);
  border-radius: var(--r-sm);
  padding: var(--s3);
  margin-top: var(--s3);
}
.category-chip {
  font-size: var(--fs-caption);
  font-weight: 600;
  padding: var(--s1) var(--s3);
  border-radius: var(--r-lg);
  background: var(--surface3);
  color: var(--text2);
}
.category-chip span { font-weight: 700; margin-left: var(--s2); }

/* LIVE WIDGET */
.live-widget { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: var(--s5); margin-bottom: var(--s5); position: relative; overflow: hidden; }
.live-pulse { display: inline-flex; align-items: center; gap: var(--s2); background: rgba(124,156,191,0.15); border: 1px solid rgba(124,156,191,0.25); color: var(--blue); font-size: var(--fs-caption); font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; padding: var(--s1) var(--s3); border-radius: var(--r-lg); margin-bottom: var(--s3); }
.live-pulse::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.live-title { font-family: var(--font-display); font-size: var(--fs-title); font-weight: 700; letter-spacing: -0.5px; line-height: 1.2; margin-bottom: var(--s1); }
.live-sub { font-size: var(--fs-section); color: var(--text2); margin-bottom: var(--s4); }
.timer { font-size: var(--fs-title); font-weight: 600; font-family: var(--font-display); margin-bottom: var(--s3); color: var(--text2); }
.live-action { width: 100%; background: var(--surface2); color: var(--text); border: 1px solid var(--border2); border-radius: var(--r-sm); padding: var(--s3); font-size: var(--fs-body); font-weight: 600; cursor: pointer; transition: background .15s; }
.live-action:active { background: var(--surface3); }

/* TIMELINE */
.timeline { position: relative; padding-left: var(--s6); margin: var(--s4) 0; }
.timeline::before { content: ''; position: absolute; left: 9px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(to bottom, var(--border2), transparent); border-radius: var(--r-sm); }
.t-node { position: relative; margin-bottom: var(--s4); }
.t-node:last-child { margin-bottom: 0; }
.t-dot { position: absolute; left: -30px; top: 16px; width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--bg); background: var(--text3); transition: all .2s; z-index: 2; }
/* type-цвета точек убраны (Релиз 1) — точка нейтральная (.t-dot base = --text3) */
.t-card {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: var(--s3) 0;
  cursor: pointer;
  transition: background .15s;
  position: relative;
}
.t-card:active { background: var(--surface); }
.t-time { font-size: var(--fs-caption); font-weight: 700; color: var(--text3); letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: var(--s2); }
.t-name { font-size: var(--fs-body); font-weight: 700; letter-spacing: -0.2px; line-height: 1.35; margin-bottom: 0; }
.t-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s2); }
/* t-budget скрыт — бюджет смотрим внутри активности */
.t-budget { display: none; }
.t-done { opacity: 0.4; }
.t-done .t-time { text-decoration: line-through; }
.check-btn { font-size: var(--fs-caption); font-weight: 700; padding: var(--s2) var(--s3); min-height: 32px; border-radius: var(--r-sm); border: 1px solid var(--border2); background: var(--surface2); color: var(--text2); cursor: pointer; transition: background .15s; white-space: nowrap; }
.check-btn:active { background: var(--surface3); }
.t-done .check-btn { border-color: rgba(52,201,122,.3); background: var(--green-dim); color: var(--green); }
/* type-цвет левого края убран (Релиз 1) — единый нейтральный край */
.node-transport .t-card,
.node-food .t-card,
.node-place .t-card,
.node-hotel .t-card,
.node-warning .t-card { border-left: none; }

/* DAY CARDS (обновлены для отображения бюджета) */
.day-card { background: transparent; border: none; border-bottom: 1px solid var(--border); border-radius: 0; padding: var(--s4) var(--s1); margin-bottom: 0; cursor: pointer; display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; transition: background .15s; }
.day-card .admin-ctrl { width: 100%; justify-content: flex-end; margin-top: var(--s1); }
.day-card:active { background: var(--surface); }
.day-num { font-family: var(--font-display); font-size: var(--fs-hero); font-weight: 700; color: var(--text); letter-spacing: -1px; min-width: 40px; text-align: center; }
.day-info { flex: 1; }
.day-date { font-size: var(--fs-body); font-weight: 600; margin-bottom: var(--s1); }
.day-meta { font-size: var(--fs-caption); color: var(--text2); }
.day-emoji { font-size: var(--fs-title); }

/* EMOTION (для модалки) */
.emotion-bar { display: flex; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s5); }
.e-btn { font-size: var(--fs-title); line-height: 1; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: var(--r-sm); border: 2px solid transparent; background: var(--surface2); cursor: pointer; transition: border-color .15s, transform .1s; }
.e-btn.selected { border-color: var(--amber); transform: scale(1.12); }
.e-btn:active { transform: scale(0.95); }

/* ACTIVITY VIEW */
.act-view-header { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s5); margin-bottom: var(--s4); position: relative; overflow: hidden; }
.act-type-bar { height: 3px; border-radius: var(--r-sm); position: absolute; top: 0; left: 0; right: 0; }
.act-view-title { font-family: var(--font-display); font-size: var(--fs-title); font-weight: 700; letter-spacing: -0.5px; line-height: 1.2; margin-bottom: var(--s2); margin-top: var(--s3); }
.act-view-time { font-size: var(--fs-section); color: var(--text2); font-weight: 500; }
.act-instruction-box { background: var(--surface2); border-radius: var(--r-sm); padding: var(--s4); font-size: var(--fs-body); line-height: 1.7; color: var(--text2); white-space: pre-wrap; margin-top: var(--s4); }

/* PHOTO GALLERY */
.photo-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: var(--s2); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: var(--s3); margin-bottom: var(--s4); }
.gallery-thumb { aspect-ratio: 1 / 1; border-radius: var(--r-sm); overflow: hidden; background: var(--surface2); cursor: zoom-in; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.2s; }
.gallery-thumb img:hover { transform: scale(1.05); }

/* BUDGET CARDS */
.budget-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin-bottom: var(--s4); }
.budget-cell { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--r); padding: var(--s4); }
.budget-cell .bl { font-size: var(--fs-caption); color: var(--text3); text-transform: uppercase; font-weight: 700; letter-spacing: 0.6px; margin-bottom: var(--s2); }
.budget-cell .bv { font-family: var(--font-display); font-size: var(--fs-title); font-weight: 700; }
.budget-cell .bs { font-size: var(--fs-caption); color: var(--text3); margin-top: var(--s1); }

/* PERSONAL VEKHI */
.vekhi-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: var(--s4); margin-bottom: var(--s4); }
.vekhi-block h4 { font-family: var(--font-display); font-size: var(--fs-caption); font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: 1px; margin-bottom: var(--s4); }

/* FORMS */
.form-label { font-size: var(--fs-caption); font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: 0.7px; display: block; margin-bottom: var(--s2); margin-top: var(--s4); }
.form-label:first-child { margin-top: 0; }
.form-input, .form-select, .form-textarea { width: 100%; padding: var(--s3) var(--s4); background: var(--surface2); border: 1px solid var(--border); color: var(--text); border-radius: var(--r-sm); font-size: var(--fs-body); font-family: var(--font-body); transition: border-color .15s; appearance: none; }
.form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: var(--amber); }
.form-textarea { resize: none; line-height: 1.6; }
.form-row { display: flex; gap: var(--s3); }
.form-row > div { flex: 1; }
.wallet-section { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--r); padding: var(--s4); margin-top: var(--s4); }
.wallet-section-label { font-size: var(--fs-caption); font-weight: 700; color: var(--amber); letter-spacing: 0.8px; text-transform: uppercase; margin-bottom: var(--s3); }

/* MODALS */
.modal { display: none; position: fixed; inset: 0; z-index: 500; background: rgba(0,0,0,0.7); backdrop-filter: blur(10px); justify-content: flex-end; align-items: center; flex-direction: column; }
.modal.open { display: flex; animation: fadeDim .2s ease; }
@keyframes fadeDim { from{opacity:0} to{opacity:1} }
.modal-sheet { background: var(--surface); border-radius: var(--r-lg) var(--r-lg) 0 0; border-top: 1px solid var(--border); padding: var(--s5) var(--s5) calc(var(--s6) + env(safe-area-inset-bottom)); width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; animation: sheetUp .24s cubic-bezier(.22,1,.36,1); }
@keyframes sheetUp { from{transform:translateY(100%)} to{transform:translateY(0)} }
.modal-handle { width: 36px; height: 4px; background: var(--surface3); border-radius: var(--r-sm); margin: -8px auto var(--s5); }
.modal-title { font-family: var(--font-display); font-size: var(--fs-title); font-weight: 700; letter-spacing: -0.3px; margin-bottom: var(--s5); }

/* STATS MODAL */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--s3); margin-bottom: var(--s5); }
.stats-cell { background: var(--surface2); border-radius: var(--r-sm); padding: var(--s4); text-align: center; }
.stats-cell .sv { font-family: var(--font-display); font-size: var(--fs-hero); font-weight: 700; color: var(--amber); letter-spacing: -1px; }
.stats-cell .sl { font-size: var(--fs-caption); color: var(--text3); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 700; margin-top: var(--s1); }

/* PROGRESS */
.progress-wrap { background: var(--surface2); border-radius: var(--r-sm); height: 6px; overflow: hidden; margin-top: var(--s2); }
.progress-fill { height: 100%; border-radius: var(--r-sm); background: var(--amber); transition: width .6s cubic-bezier(.16,1,.3,1); }

/* ARCHIVE TOGGLE */
.archive-toggle { display: flex; justify-content: space-between; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: var(--s4) var(--s4); margin-top: var(--s5); cursor: pointer; }
.archive-toggle span { font-size: var(--fs-body); font-weight: 600; }
.archive-arrow { color: var(--text3); font-size: var(--fs-caption); transition: transform .2s; }
.archive-arrow.open { transform: rotate(90deg); }

/* EXPORT CHECKBOX */
.export-item { display: flex; align-items: center; gap: var(--s3); background: var(--surface2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: var(--s3) var(--s4); margin-bottom: var(--s3); cursor: pointer; }
.export-item input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--amber); cursor: pointer; flex-shrink: 0; }
.export-item .ei-name { font-size: var(--fs-body); font-weight: 600; }
.export-item .ei-sub { font-size: var(--fs-caption); color: var(--text2); margin-top: var(--s1); }

/* CONFIG PANEL */
.config-panel { display: none; background: var(--amber-dim); border: 1px dashed var(--border2); border-radius: var(--r); padding: var(--s4); margin-bottom: var(--s5); }
body.edit-mode .config-panel { display: block; }
body.edit-mode .admin-ctrl { display: flex !important; }
body.edit-mode .btn-add { display: block !important; }
.admin-ctrl { display: none !important; gap: var(--s2); justify-content: flex-end; margin-top: var(--s3); }
.t-card.show-ctrl .admin-ctrl,
.card.show-ctrl .admin-ctrl,
.day-card.show-ctrl .admin-ctrl { display: flex !important; animation: ctrlFadeIn .15s ease; }
@keyframes ctrlFadeIn { from { opacity: 0; } to { opacity: 1; } }
/* btn-add теперь всегда видна (Релиз 2: глобальный edit-mode убран, правка — через long-press) */
.btn-del { font-size: var(--fs-caption); font-weight: 700; padding: var(--s2) var(--s3); border-radius: var(--r-sm); background: var(--red-dim); color: var(--red); border: 1px solid rgba(255,95,87,.2); cursor: pointer; }
.btn-edit { font-size: var(--fs-caption); font-weight: 700; padding: var(--s2) var(--s3); border-radius: var(--r-sm); background: var(--surface3); color: var(--text2); border: 1px solid var(--border); cursor: pointer; }

/* RATING */
.rating-opt { display: flex; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s2); }
.r-star { font-size: var(--fs-section); font-weight: 600; padding: var(--s2) var(--s3); border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface2); color: var(--text2); cursor: pointer; }
.r-star.sel { background: var(--amber-dim); border-color: var(--amber); color: var(--amber); }

/* PHOTO PREVIEW GRID */
.photo-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: var(--s2); margin-bottom: var(--s4); }
.preview-thumb { position: relative; aspect-ratio: 1 / 1; border-radius: var(--r-sm); overflow: hidden; background: var(--surface2); border: 1px solid var(--border); }
.preview-thumb img { width: 100%; height: 100%; object-fit: cover; }
.preview-thumb .remove-photo { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); color: white; font-weight: bold; font-size: var(--fs-body); line-height: 1; text-align: center; cursor: pointer; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,0.3); transition: background 0.1s; }
.preview-thumb .remove-photo:active { background: var(--red); transform: scale(0.9); }

/* JOURNEY HEADER */
.journey-hero { margin: -20px -20px var(--s5); padding: var(--s6) var(--s5) var(--s5); background: transparent; border-bottom: 1px solid var(--border); }
.journey-hero h2 { font-family: var(--font-display); font-size: var(--fs-hero); font-weight: 700; letter-spacing: -1px; margin-bottom: var(--s3); line-height: 1.15; }

/* SCROLLBAR */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: var(--r-sm); }

/* MISC */
.divider { height: 1px; background: var(--border); margin: var(--s5) 0; }
.empty-state { min-height: 46vh; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; text-align: center; padding: 9vh var(--s5) var(--s5); color: var(--text3); font-size: var(--fs-body); text-wrap: balance; }
.empty-state .e-icon { font-size: var(--fs-hero); margin-bottom: var(--s3); }
.inline-cfg { display: flex; gap: var(--s3); margin-top: var(--s4); }
.inline-cfg .btn { flex: 1; text-align: center; font-size: var(--fs-caption); padding: var(--s3); border-radius: var(--r-sm); }
.cfg-row { display: flex; align-items: center; justify-content: space-between; padding: var(--s3) 0; border-bottom: 1px solid var(--border); font-size: var(--fs-body); }
.cfg-row:last-child { border-bottom: none; }
.file-input-wrap { position: relative; background: var(--surface2); border: 1px dashed var(--border2); border-radius: var(--r-sm); padding: var(--s4); text-align: center; color: var(--text3); font-size: var(--fs-section); cursor: pointer; margin-bottom: var(--s4); }
.file-input-wrap input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }

/* wallet config row */
.wallet-config-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  align-items: center;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: var(--s3);
  margin-bottom: var(--s3);
}
.wallet-config-row input, .wallet-config-row select {
  flex: 1 0 120px;
  padding: var(--s2) var(--s2);
  background: var(--surface3);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--r-sm);
  font-size: var(--fs-section);
}
.wallet-config-row .wallet-enabled {
  width: auto;
  flex: 0;
}
.wallet-config-row button {
  background: none;
  border: none;
  font-size: var(--fs-body);
  cursor: pointer;
  color: var(--red);
}

/* Дополнительно для кнопки эмоции */
#day-emotion-btn {
  font-size: var(--fs-title) !important;
  padding: var(--s1) var(--s3) !important;
  line-height: 1 !important;
}

#modal-emotion-picker {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  justify-content: center;
  margin-bottom: var(--s5);
}

/* Стили для глобального поиска */
.search-result-group {
  margin-bottom: var(--s4);
}
.search-result-group-title {
  font-size: var(--fs-caption);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text3);
  margin-bottom: var(--s2);
}
.search-result-item {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: var(--s3) var(--s3);
  margin-bottom: var(--s2);
  cursor: pointer;
  transition: background 0.1s;
}
.search-result-item:active { background: var(--surface3); }
.search-result-title {
  font-weight: 700;
  font-size: var(--fs-body);
}
.search-result-sub {
  font-size: var(--fs-caption);
  color: var(--text2);
  margin-top: var(--s1);
}
.highlight {
  background-color: var(--amber-dim);
  color: var(--amber);
  border-radius: var(--r-sm);
  padding: 0 var(--s1);
}

/* Стили для drag-and-drop (SortableJS) */
.sortable-drag {
  opacity: 0.5;
  background: var(--surface3);
}
.timeline-container.sortable-ghost {
  opacity: 0.4;
  background: var(--surface2);
}
.section-label-inline {
  font-size: var(--fs-caption);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--amber);
  margin: var(--s4) 0 var(--s2);
}
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: var(--s2);
  margin-top: var(--s2);
}
/* ═══════════════════════════════════════════════════════════════
   РЕЛИЗ 1.1 — «СЕЙЧАС»
   ═══════════════════════════════════════════════════════════════ */

/* ── NOW MODE: полноэкранный блок «Сейчас» ─────────────────── */
#now-mode {
  margin-bottom: var(--s1);
}
.now-header {
  margin-bottom: var(--s4);
}
.now-label {
  font-size: var(--fs-caption); font-weight: 700; letter-spacing: 1.5px;
  color: var(--text3); text-transform: uppercase; margin-bottom: var(--s1);
}
.now-trip-name {
  font-size: var(--fs-section); color: var(--text2); font-weight: 500;
}

/* Карточка следующей активности */
.now-next-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow);
  padding: var(--s5) var(--s4) var(--s4);
  margin-bottom: var(--s3);
  cursor: pointer;
  position: relative; overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .15s, transform .1s;
}
.now-next-card:active { transform: scale(0.99); border-color: var(--border2); }

/* Цвет карточки по типу активности */
/* type-фоны now-карточки убраны (Релиз 1) — единый нейтральный фон */

.now-next-type {
  font-size: var(--fs-caption); font-weight: 700; letter-spacing: 0.8px;
  text-transform: uppercase; color: var(--text3);
  margin-bottom: var(--s2);
}

.now-next-title {
  font-family: var(--font-display);
  font-size: var(--fs-title); font-weight: 700; letter-spacing: -0.5px;
  line-height: 1.2; margin-bottom: var(--s3);
}
.now-countdown {
  font-family: var(--font-display);
  font-size: var(--fs-title); font-weight: 600;
  color: var(--text2); letter-spacing: -0.3px; margin-bottom: var(--s1);
  line-height: 1.2;
  transition: color .4s ease;
}
/* «Скоро» — без мигания, без красного, без срочности */
.now-countdown.urgent {
  color: var(--text);
}
.now-countdown.overdue {
  color: var(--accent);
  font-weight: 700;
}
.now-next-sub {
  font-size: var(--fs-caption); color: var(--text3); margin-top: var(--s1);
}

/* Кнопки действий */
.now-actions {
  display: flex; gap: var(--s3); margin-bottom: var(--s3);
}
.now-btn-primary {
  flex: 1;
  background: var(--amber); color: #0c0c10;
  border: none; border-radius: var(--r); padding: var(--s4) var(--s5);
  font-size: var(--fs-body); font-weight: 700; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: filter .15s, transform .1s;
}
.now-btn-primary:active { filter: brightness(0.88); transform: scale(0.98); }
.now-btn-expense {
  flex: 0 0 54px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--r); padding: var(--s4);
  font-size: var(--fs-body); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s;
}
.now-btn-expense:active { background: var(--surface2); }

/* Бюджет дня */
.now-budget-bar {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: var(--s4) var(--s4); margin-bottom: var(--s3);
}
.now-budget-label {
  font-size: var(--fs-caption); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.6px; color: var(--text3); margin-bottom: var(--s1);
}
.now-budget-amounts {
  display: flex; align-items: baseline; gap: 0;
}
.now-budget-spent {
  font-family: var(--font-display); font-size: var(--fs-title); font-weight: 700;
  color: var(--amber); letter-spacing: -0.8px;
}
.now-budget-cur  { font-size: var(--fs-body); color: var(--text2); font-weight: 500; margin-left: var(--s1); }
.now-budget-of   { font-size: var(--fs-section); color: var(--text3); margin-left: var(--s1); }

/* Кнопка «Весь день» */
.now-see-day {
  display: block; width: 100%;
  background: transparent; color: var(--text3);
  border: 1px solid var(--border); border-radius: var(--r); padding: var(--s3);
  font-size: var(--fs-section); font-weight: 600; cursor: pointer; text-align: center;
  -webkit-tap-highlight-color: transparent; transition: border-color .15s;
}
.now-see-day:active { border-color: var(--border2); }
.now-divider {
  height: 1px; background: var(--border); margin: var(--s5) 0;
}

/* ── МЕНЮ ДНЯ ─────────────────────────────────────────────── */
.day-menu-item {
  display: block; width: 100%;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: var(--s4) var(--s4);
  font-size: var(--fs-body); font-weight: 600; color: var(--text);
  text-align: left; cursor: pointer; margin-bottom: var(--s3);
  -webkit-tap-highlight-color: transparent; transition: background .15s;
}
.day-menu-item:active { background: var(--surface3); }

/* ── ЭКРАН АКТИВНОСТИ: новый hero ──────────────────────────── */
.av-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow);
  margin-bottom: var(--s3);
  overflow: hidden;
  position: relative;
}
.av-type-stripe {
  height: 3px; width: 100%;
}
.av-hero-body { padding: var(--s4) var(--s4) var(--s4); }
.av-meta-row {
  display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s2);
}
.av-time {
  font-size: var(--fs-caption); font-weight: 700; color: var(--text3); letter-spacing: 0.4px;
}
.av-title {
  font-family: var(--font-display);
  font-size: var(--fs-hero); font-weight: 700; letter-spacing: -0.6px; line-height: 1.18;
}

/* Контекстная кнопка главного действия */
.av-primary-btn {
  display: flex; align-items: center; gap: var(--s3);
  width: 100%; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r);
  padding: var(--s4) var(--s4); cursor: pointer; text-align: left;
  margin-bottom: var(--s3);
  -webkit-tap-highlight-color: transparent;
  transition: border-color .15s, background .15s;
}
.av-primary-btn:active { background: var(--surface2); border-color: var(--amber); }
.av-primary-icon { font-size: var(--fs-title); flex-shrink: 0; }
.av-primary-text {
  flex: 1; font-size: var(--fs-body); font-weight: 600; line-height: 1.4; color: var(--text);
}
.av-primary-label {
  font-size: var(--fs-caption); font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: 0.6px; display: block; margin-bottom: var(--s1);
}
.av-primary-chevron { color: var(--text3); font-size: var(--fs-title); margin-left: auto; }

/* Карточка транспортного маршрута */
.av-route-card {
  background: var(--surface);
  border: 1px solid rgba(124,156,191,0.3);
  border-radius: var(--r-lg);
  padding: var(--s4); margin-bottom: var(--s3);
  position: relative; overflow: hidden;
}
.av-route-tag {
  font-size: var(--fs-caption); font-weight: 700; color: var(--type-transport);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: var(--s2);
}
.av-route-title {
  font-family: var(--font-display); font-size: var(--fs-body); font-weight: 700;
  letter-spacing: -0.4px; margin-bottom: var(--s4);
}
.av-route-btn {
  width: 100%; background: var(--type-transport); color: var(--text);
  border: none; border-radius: var(--r-sm); padding: var(--s3);
  font-size: var(--fs-body); font-weight: 700; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: filter .15s;
}
.av-route-btn:active { filter: brightness(0.85); }

/* Компактная строка бюджета */
.av-budget-row {
  display: flex; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: var(--s3) var(--s4); margin-bottom: var(--s3); gap: 0;
}
.av-budget-cell { flex: 1; }
.av-budget-label {
  font-size: var(--fs-caption); font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: var(--s1);
}
.av-budget-val {
  font-family: var(--font-display); font-size: var(--fs-title); font-weight: 700; letter-spacing: -0.4px;
}
.av-budget-val.amber { color: var(--amber); }
.av-budget-input {
  font-family: var(--font-display); font-size: var(--fs-title); font-weight: 700;
  width: 100%; background: transparent; border: none; padding: 0; outline: none;
}
.av-budget-input.green { color: var(--green); }
.av-budget-rub { font-size: var(--fs-caption); color: var(--text3); margin-top: var(--s1); }
.av-budget-rub.green { color: var(--green); opacity: 0.7; }
.av-budget-divider {
  width: 1px; height: 36px; background: var(--border); margin: 0 var(--s3); flex-shrink: 0;
}
.av-save-btn {
  flex-shrink: 0; width: 36px; height: 36px;
  background: var(--green-dim); color: var(--green);
  border: 1px solid rgba(52,201,122,.3); border-radius: 50%;
  font-size: var(--fs-body); font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  margin-left: var(--s3);
  -webkit-tap-highlight-color: transparent; transition: background .15s;
}
.av-save-btn:active { background: rgba(52,201,122,.22); }

/* Аккордеоны */
.av-accordions { display: flex; flex-direction: column; gap: var(--s2); }
.av-acc-block {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden;
}
.av-acc-toggle {
  width: 100%; background: transparent; border: none;
  padding: var(--s3) var(--s4); text-align: left; cursor: pointer;
  font-size: var(--fs-section); font-weight: 700; color: var(--text2);
  display: flex; justify-content: space-between; align-items: center;
  -webkit-tap-highlight-color: transparent;
}
.av-acc-toggle:active { background: var(--surface2); }
.av-acc-arrow { font-size: var(--fs-section); color: var(--text3); transition: transform .2s; }
.av-acc-arrow.open { transform: rotate(180deg); }
.av-acc-body { padding: 0 var(--s4) var(--s4); }
.av-acc-text {
  font-size: var(--fs-body); line-height: 1.7; color: var(--text2); white-space: pre-wrap;
}

/* Горизонтальная карусель скриншотов маршрута */
.av-transport-carousel {
  display: flex; gap: var(--s2); overflow-x: auto;
  padding-bottom: var(--s1); -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.av-transport-carousel::-webkit-scrollbar { display: none; }
.av-transport-carousel .gallery-thumb { flex: 0 0 120px; height: 90px; }

/* Тег маршрута на карточке таймлайна */
.t-route-tag {
  display: inline-flex; align-items: center;
  font-size: var(--fs-caption); font-weight: 700; color: var(--type-transport);
  background: rgba(124,156,191,0.10); border-radius: var(--r-sm);
  padding: var(--s1) var(--s2); margin-bottom: var(--s1); letter-spacing: 0.4px;
}

/* ═══════════════════════════════════════════════════════════════
   РЕЛИЗ 1.2 — «АРХИВ С ДУШОЙ»
   ═══════════════════════════════════════════════════════════════ */

/* ── ИТОГОВЫЙ ЭКРАН: герой ──────────────────────────────────── */
.sum-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s5) var(--s5);
  margin-bottom: var(--s5);
  text-align: center;
}
.sum-trip-name {
  font-family: var(--font-display);
  font-size: var(--fs-title); font-weight: 700; letter-spacing: -.6px;
  margin-bottom: var(--s2); line-height: 1.2;
}
.sum-dates {
  font-size: var(--fs-section); color: var(--text2); margin-bottom: var(--s5);
}
.sum-stats-row {
  display: flex; justify-content: center; gap: var(--s6);
}
.sum-stat-val {
  font-family: var(--font-display);
  font-size: var(--fs-hero); font-weight: 700; color: var(--amber); letter-spacing: -.8px;
}
.sum-stat-label {
  font-size: var(--fs-caption); font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: .7px; margin-top: var(--s1);
}

/* ── СЕКЦИИ ─────────────────────────────────────────────────── */
.sum-section-title {
  font-size: var(--fs-caption); font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: 1.2px;
  margin: var(--s5) 0 var(--s3);
}

/* ── ЛЕНТА ЭМОЦИЙ ───────────────────────────────────────────── */
.sum-emotion-strip {
  display: flex; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s1);
}
.sum-emotion-chip {
  display: flex; flex-direction: column; align-items: center; gap: var(--s1);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: var(--s2) var(--s1); min-width: 36px;
  font-size: var(--fs-title); cursor: default;
}
.sum-emotion-chip.sum-emotion-sm { font-size: var(--fs-body); min-width: 32px; padding: var(--s1) var(--s1); }
.sum-emotion-num {
  font-size: var(--fs-caption); color: var(--text3); font-weight: 700;
}

/* ── МАРШРУТ ────────────────────────────────────────────────── */
.sum-route { position: relative; padding-left: var(--s5); }
.sum-route-stop {
  position: relative; display: grid;
  grid-template-columns: 0 1fr;
  grid-template-rows: auto auto;
  gap: 0 var(--s4);
  margin-bottom: var(--s4);
  padding-left: var(--s5);
}
.sum-route-dot {
  position: absolute; left: 0; top: 5px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--amber); border: 2px solid var(--bg);
  z-index: 1;
}
.sum-route-line {
  position: absolute; left: 4px; top: 15px;
  width: 2px; height: calc(100% + 14px);
  background: var(--border); z-index: 0;
}
.sum-route-info {}
.sum-route-name { font-size: var(--fs-body); font-weight: 700; }
.sum-route-dates { font-size: var(--fs-caption); color: var(--text2); margin-top: var(--s1); }

/* ── ЛУЧШИЕ МОМЕНТЫ ─────────────────────────────────────────── */
.sum-highlight-card {
  display: flex; align-items: flex-start; gap: var(--s3);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: var(--s3) var(--s4); margin-bottom: var(--s2);
}
.sum-highlight-icon { font-size: var(--fs-title); flex-shrink: 0; }
.sum-highlight-title { font-size: var(--fs-body); font-weight: 700; margin-bottom: var(--s1); }
.sum-highlight-stars { font-size: var(--fs-caption); }

/* ── СОВЕТЫ СЕБЕ ─────────────────────────────────────────────── */
.sum-note-item {
  background: var(--surface2);
  border-left: 3px solid var(--amber);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: var(--s3) var(--s3);
  font-size: var(--fs-body); line-height: 1.6; color: var(--text2);
  margin-bottom: var(--s2);
}

/* ── КНОПКИ ИТОГОВ ──────────────────────────────────────────── */
.sum-archive-btn {
  display: block; width: 100%;
  background: var(--amber); color: #0c0c10;
  border: none; border-radius: var(--r); padding: var(--s4);
  font-size: var(--fs-body); font-weight: 700; cursor: pointer;
  margin-bottom: var(--s3);
  -webkit-tap-highlight-color: transparent;
  transition: filter .15s;
}
.sum-archive-btn:active { filter: brightness(.88); }
.sum-back-link {
  display: block; width: 100%; background: transparent;
  border: 1px solid var(--border); border-radius: var(--r);
  color: var(--text2); padding: var(--s3); font-size: var(--fs-body);
  font-weight: 600; cursor: pointer; text-align: center;
  -webkit-tap-highlight-color: transparent;
}
.sum-back-link:active { background: var(--surface2); }

/* Hint для пустых секций */
.sum-empty-hint {
  font-size: var(--fs-section); color: var(--text3);
  font-style: italic; padding: var(--s1) 0;
}

/* Архивные карточки поездок */
.card-archived { opacity: .8; }
.card-archived:active { opacity: .9; }

/* ── СТАТИСТИКА: новые стили ─────────────────────────────────── */
.stats-empty-hint {
  font-size: var(--fs-body); color: var(--text3); padding: var(--s4) 0;
}
.stats-block-title {
  font-size: var(--fs-caption); font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: var(--s3);
}
.stats-richcard {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--r); padding: var(--s4) var(--s4); margin-bottom: var(--s3);
}
.stats-row-item {
  font-size: var(--fs-section); color: var(--text2); line-height: 1.6;
  padding: var(--s1) 0; border-bottom: 1px solid var(--border);
}
.stats-row-item:last-child { border-bottom: none; }
.stats-emotion-strip {
  display: flex; gap: var(--s1); flex-wrap: wrap;
  margin-bottom: var(--s4); padding-bottom: var(--s1);
}

/* ═══════════════════════════════════════════════════════════════
   РЕЛИЗ 2.0 — «ПОЛИРОВКА»
   ═══════════════════════════════════════════════════════════════ */

/* ── ЭКРАННЫЕ ПЕРЕХОДЫ (направленные) ───────────────────────── */
/* Старый screenIn заменён на anim-forward / anim-back / anim-fade */
.screen.anim-forward { animation: screenForward .3s cubic-bezier(.16,1,.3,1) both; }
.screen.anim-back    { animation: screenBack   .28s cubic-bezier(.16,1,.3,1) both; }
.screen.anim-fade    { animation: screenFade   .22s ease both; }
@keyframes screenForward { from { opacity:0; transform:translateX(28px); } to { opacity:1; transform:translateX(0); } }
@keyframes screenBack    { from { opacity:0; transform:translateX(-20px); } to { opacity:1; transform:translateX(0); } }
@keyframes screenFade    { from { opacity:0; } to { opacity:1; } }

/* Плавный переход карточки «Сейчас» при смене активности */
#now-next-card  { transition: border-color .3s, background .3s; }
#now-next-title { transition: opacity .2s; }
#now-budget-bar { transition: opacity .25s; }

/* Таймер: спокойный, без мигания и без красного */
.now-countdown.overdue { color: var(--accent) !important; }

/* Чек-марк в таймлайне: анимация при отметке «Готово» */
.t-done .t-card {
  transition: opacity .25s, background .25s;
}
.t-node .check-btn {
  transition: background .15s, color .15s, transform .1s;
}
.t-node .check-btn:active { transform: scale(0.92); }

/* Карточки поездок: hover-поднятие */
.card { transition: border-color .15s, transform .15s, box-shadow .15s; }
.card:active {
  transform: scale(0.99);
}

/* ── МОДАЛКА АКТИВНОСТИ: кнопка «+ Детали» ──────────────────── */
.act-details-toggle {
  display: flex; align-items: center; gap: var(--s2);
  width: 100%; background: transparent;
  border: 1px dashed var(--border2);
  border-radius: var(--r-sm);
  padding: var(--s3) var(--s4);
  margin: var(--s4) 0 0;
  font-size: var(--fs-section); font-weight: 600;
  color: var(--text3);
  cursor: pointer; text-align: left;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .18s, color .18s, background .15s;
}
.act-details-toggle:active { background: var(--surface2); }
.act-details-toggle.open {
  border-color: var(--amber);
  border-style: solid;
  color: var(--amber);
  background: var(--amber-dim);
}

/* Секция деталей — плавное появление */
#act-details-section {
  animation: detailsSlideIn .22s cubic-bezier(.16,1,.3,1);
}
@keyframes detailsSlideIn {
  from { opacity:0; transform:translateY(-6px); }
  to   { opacity:1; transform:translateY(0); }
}
#act-details-section .section-label-inline {
  margin-top: var(--s4);
}

/* ── АККОРДЕОНЫ ЭКРАНА АКТИВНОСТИ (av-) ─────────────────────── */
.av-acc-block {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden;
}
.av-acc-toggle {
  width: 100%; background: transparent; border: none;
  padding: var(--s3) var(--s4); text-align: left; cursor: pointer;
  font-size: var(--fs-section); font-weight: 700; color: var(--text2);
  display: flex; justify-content: space-between; align-items: center;
  -webkit-tap-highlight-color: transparent;
  transition: background .12s;
}
.av-acc-toggle:active { background: var(--surface2); }
.av-acc-arrow {
  font-size: var(--fs-section); color: var(--text3);
  display: inline-block;
  transition: transform .22s cubic-bezier(.16,1,.3,1);
}
.av-acc-arrow.open { transform: rotate(180deg); }

/* Тело аккордеона — плавное открытие через animation */
.av-acc-body {
  padding: 0 var(--s4) var(--s4);
  animation: accBodyIn .2s cubic-bezier(.16,1,.3,1);
}
@keyframes accBodyIn {
  from { opacity:0; transform:translateY(-4px); }
  to   { opacity:1; transform:translateY(0); }
}
.av-acc-text {
  font-size: var(--fs-body); line-height: 1.75; color: var(--text2); white-space: pre-wrap;
}

/* Горизонтальная карусель скриншотов маршрута */
.av-transport-carousel {
  display: flex; gap: var(--s2); overflow-x: auto;
  padding-bottom: var(--s2);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.av-transport-carousel::-webkit-scrollbar { display: none; }
.av-transport-carousel .gallery-thumb {
  flex: 0 0 130px; height: 98px; border-radius: var(--r-sm);
}

/* Маршрутная карточка транспорта */
.av-route-card {
  background: var(--surface);
  border: 1px solid rgba(124,156,191,0.28);
  border-radius: var(--r-lg);
  padding: var(--s4); margin-bottom: var(--s3);
  position: relative; overflow: hidden;
}
.av-route-tag {
  font-size: var(--fs-caption); font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--type-transport); margin-bottom: var(--s2);
}
.av-route-title {
  font-family: var(--font-display); font-size: var(--fs-body); font-weight: 700;
  letter-spacing: -0.4px; margin-bottom: var(--s4);
}
.av-route-btn {
  width: 100%; background: var(--type-transport); color: var(--text);
  border: none; border-radius: var(--r-sm); padding: var(--s3);
  font-size: var(--fs-body); font-weight: 700; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: filter .15s;
}
.av-route-btn:active { filter: brightness(.85); }

/* Контекстная кнопка главного действия (адрес/билет/инструкция) */
.av-primary-btn {
  display: flex; align-items: center; gap: var(--s3);
  width: 100%; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r);
  padding: var(--s4) var(--s4); cursor: pointer;
  margin-bottom: var(--s3);
  -webkit-tap-highlight-color: transparent;
  transition: border-color .15s, background .15s;
}
.av-primary-btn:active { background: var(--surface2); border-color: var(--amber); }
.av-primary-icon   { font-size: var(--fs-title); flex-shrink: 0; }
.av-primary-text   { flex:1; font-size:var(--fs-body); font-weight:600; line-height:1.4; color:var(--text); }
.av-primary-label  { font-size:var(--fs-caption); font-weight:700; color:var(--text3); text-transform:uppercase; letter-spacing:.6px; display:block; margin-bottom:var(--s1); }
.av-primary-chevron { color:var(--text3); font-size:var(--fs-title); margin-left:auto; }

/* Компактный бюджет-ряд */
.av-budget-row {
  display: flex; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: var(--s3) var(--s4); margin-bottom: var(--s3);
}
.av-budget-cell  { flex: 1; }
.av-budget-label { font-size:var(--fs-caption); font-weight:700; color:var(--text3); text-transform:uppercase; letter-spacing:.6px; margin-bottom:var(--s1); }
.av-budget-val   { font-family:var(--font-display); font-size:var(--fs-title); font-weight:700; letter-spacing:-0.4px; }
.av-budget-val.amber { color: var(--amber); }
.av-budget-input {
  font-family:var(--font-display); font-size:var(--fs-title); font-weight:700;
  width:100%; background:transparent; border:none; padding:0; outline:none;
  color: var(--green);
}
.av-budget-rub   { font-size:var(--fs-caption); color:var(--text3); margin-top:var(--s1); }
.av-budget-rub.green { color:var(--green); opacity:.7; }
.av-budget-divider { width:1px; height:36px; background:var(--border); margin:0 var(--s3); flex-shrink:0; }
.av-save-btn {
  flex-shrink:0; width:36px; height:36px;
  background:var(--green-dim); color:var(--green);
  border:1px solid rgba(52,201,122,.3); border-radius:50%;
  font-size:var(--fs-body); font-weight:700; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  margin-left:var(--s3);
  -webkit-tap-highlight-color:transparent;
  transition:background .15s, transform .1s;
}
.av-save-btn:active { background:rgba(52,201,122,.22); transform:scale(.93); }

/* Hero активности */
.av-hero {
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--r-lg); margin-bottom:var(--s3); overflow:hidden;
}
.av-type-stripe { height:3px; width:100%; }
.av-hero-body   { padding:var(--s4) var(--s4) var(--s4); }
.av-meta-row    { display:flex; align-items:center; gap:var(--s2); margin-bottom:var(--s2); }
.av-time        { font-size:var(--fs-caption); font-weight:700; color:var(--text3); letter-spacing:.4px; }
.av-title       { font-family:var(--font-display); font-size:var(--fs-hero); font-weight:700; letter-spacing:-0.6px; line-height:1.18; }
.av-accordions  { display:flex; flex-direction:column; gap:var(--s2); }

/* Тег маршрута на карточке таймлайна */
.t-route-tag {
  display: inline-flex; align-items: center;
  font-size: var(--fs-caption); font-weight: 700; color: var(--type-transport);
  background: rgba(124,156,191,0.10); border-radius: var(--r-sm);
  padding: var(--s1) var(--s2); margin-bottom: var(--s1); letter-spacing: 0.4px;
}

/* ═══════════════════════════════════════════════════════════════
   ЭТАП 3 — ЭКРАН АКТИВНОСТИ
   ═══════════════════════════════════════════════════════════════ */

/* ── #1+#2: sticky done + расход-кнопка ────────────────────── */

/* Sticky bar снизу */
.av-sticky-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  background: var(--bg);
  border-top: 1px solid var(--border);
  z-index: 80;
  /* Показываем только на экране активности */
  display: none;
}
#screen-activity-view.active .av-sticky-bar { display: block; }

.av-done-btn {
  width: 100%;
  background: var(--amber);
  color: var(--on-accent, #0c0c10);
  border: none;
  border-radius: var(--r);
  padding: var(--s4);
  font-size: var(--fs-body);
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: filter .15s, transform .1s;
}
.av-done-btn:active { filter: brightness(.88); transform: scale(.99); }

/* Выполненное состояние */
.av-done-btn.done {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(52,201,122,.3);
}

/* ── #2: новый av-budget-row без инпута ────────────────────── */
/* Переопределяем только изменившиеся части */
.av-budget-row {
  display: flex; align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: var(--s4) var(--s4);
  margin-bottom: var(--s3);
}
.av-budget-cell { flex: 1; }
.av-budget-label {
  font-size: var(--fs-caption); font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: .6px; margin-bottom: var(--s1);
}
.av-budget-val {
  font-family: var(--font-display);
  font-size: var(--fs-title); font-weight: 700; letter-spacing: -.4px;
}
.av-budget-val.amber { color: var(--amber); }
.av-budget-val.green { color: var(--green); }
.av-budget-divider {
  width: 1px; height: 36px; background: var(--border);
  margin: 0 var(--s4); flex-shrink: 0;
}
/* Кнопка записи расхода */
.av-record-btn {
  flex-shrink: 0;
  background: var(--amber); color: #0c0c10;
  border: none; border-radius: var(--r-sm);
  padding: var(--s3) var(--s4);
  font-size: var(--fs-section); font-weight: 700;
  cursor: pointer; white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: filter .15s, transform .1s;
  margin-left: var(--s3);
}
.av-record-btn:active { filter: brightness(.88); transform: scale(.97); }

/* ── #4: убираем ≈ N ₽ — нет `.av-budget-rub` в новом html ── */
.av-budget-rub { display: none; }

/* ── #5: фото — горизонтальная карусель ─────────────────────── */
.av-photo-carousel {
  display: flex;
  gap: var(--s2);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: var(--s1);
  margin-bottom: var(--s3);
}
.av-photo-carousel::-webkit-scrollbar { display: none; }
.av-photo-carousel .gallery-thumb {
  flex: 0 0 120px;
  height: 90px;
  border-radius: var(--r-sm);
  overflow: hidden;
  cursor: pointer;
  background: var(--surface2);
  border: 1px solid var(--border);
}
.av-photo-carousel .gallery-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
}

/* ── #6: av-title 28px уже задан, line-height подбираем ──────── */
.av-hero-body { padding: var(--s4) var(--s4) var(--s5); }
.av-title {
  font-family: var(--font-display);
  font-size: var(--fs-hero); font-weight: 700;
  letter-spacing: -.7px; line-height: 1.15;
}

/* ── #7: hero улучшения ──────────────────────────────────────── */
.av-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: var(--s3);
  overflow: hidden;
}
.av-type-stripe { height: 4px; width: 100%; }
.av-meta-row {
  display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s2);
}
.av-time {
  font-size: var(--fs-caption); font-weight: 700; color: var(--text3); letter-spacing: .4px;
}

/* ── #8: аккордеон sublabel ─────────────────────────────────── */
.av-acc-sublabel {
  font-size: var(--fs-caption); font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: .6px; margin-bottom: var(--s2);
}

/* ── #9: текущая активность — особое состояние hero ─────────── */
.av-hero.av-current {
  border-color: var(--amber);
}
.av-hero.av-current .av-type-stripe {
  background: var(--amber) !important;
}
/* Метка «СЕЙЧАС» */
.av-now-badge {
  display: inline-block;
  background: var(--amber);
  color: var(--on-accent, #0c0c10);
  font-size: var(--fs-caption); font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: var(--s1) var(--s2);
  border-radius: var(--r-sm);
  margin-left: var(--s2);
  vertical-align: middle;
}

/* ── #10: модалка записи расхода — большой инпут ────────────── */
.rec-exp-plan-hint {
  font-size: var(--fs-section); color: var(--text3);
  background: var(--surface2);
  border-radius: var(--r-sm);
  padding: var(--s3) var(--s4);
  margin-bottom: var(--s4);
  border-left: 3px solid var(--amber);
}
.rec-exp-amount-big {
  font-family: var(--font-display) !important;
  font-size: var(--fs-hero) !important;
  font-weight: 700 !important;
  letter-spacing: -1px !important;
  text-align: center !important;
  height: 80px !important;
  color: var(--amber) !important;
}

/* ── аккордеон: анимация body ───────────────────────────────── */
.av-acc-body {
  padding: 0 var(--s4) var(--s4);
  animation: accBodyIn .18s cubic-bezier(.16,1,.3,1);
}
@keyframes accBodyIn {
  from { opacity:0; transform:translateY(-4px); }
  to   { opacity:1; transform:translateY(0); }
}
.av-acc-text {
  font-size: var(--fs-body); line-height: 1.75; color: var(--text2); white-space: pre-wrap;
}
.av-acc-toggle {
  width: 100%; background: transparent; border: none;
  padding: var(--s4) var(--s4); text-align: left; cursor: pointer;
  font-size: var(--fs-body); font-weight: 600; color: var(--text2);
  display: flex; justify-content: space-between; align-items: center;
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
  transition: background .12s;
}
.av-acc-toggle:active { background: var(--surface2); }
.av-acc-arrow {
  font-size: var(--fs-section); color: var(--text3);
  display: inline-block;
  transition: transform .2s cubic-bezier(.16,1,.3,1);
}
.av-acc-arrow.open { transform: rotate(180deg); }
.av-acc-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}

/* rating: делаем крупнее — это оценка, не checkbox */
.rating-opt { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s1); }
.r-star {
  font-size: var(--fs-caption); font-weight: 600;
  padding: var(--s2) var(--s3); border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text2);
  cursor: pointer;
  min-height: 36px;
  -webkit-tap-highlight-color: transparent;
  transition: background .12s, border-color .12s, color .12s;
}
.r-star.sel {
  background: var(--amber-dim);
  border-color: var(--amber);
  color: var(--amber);
}

/* ═══════════════════════════════════════════════════════════════
   ЭТАП 4 — УРОВЕНЬ EDITOR'S CHOICE
   ═══════════════════════════════════════════════════════════════ */

/* ── #1: Строгий line-height (типографическая дисциплина) ──── */
/* Display: 1.15 - 1.2 — для очень крупного шрифта */
.av-title,
.journey-hero h2,
.fv-big,
.sum-trip-name,
.now-next-title { line-height: 1.18; }

/* Body: 1.5 — для основного текста */
.av-acc-text,
.empty-state,
.sum-note-item,
.modal-sheet { line-height: 1.5; }

/* Caption: 1.35 — для мелких подписей */
.t-name,
.card-title,
.av-primary-text { line-height: 1.35; }

/* ── #2: Skeleton screens ──────────────────────────────────── */
@keyframes skelShimmer {
  0%   { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}
.skeleton-node {
  position: relative;
  margin-bottom: var(--s4);
  padding-left: var(--s6);
}
.skeleton-dot {
  position: absolute;
  left: 0; top: 16px;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 3px solid var(--bg);
  background: var(--surface3);
  animation: skelShimmer 1.4s ease-in-out infinite;
  background-image: linear-gradient(90deg, var(--surface2) 0%, var(--surface3) 50%, var(--surface2) 100%);
  background-size: 200px 100%;
  background-repeat: no-repeat;
}
.skeleton-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: var(--s4) var(--s4);
}
.skeleton-card-full {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: var(--s4);
  margin-bottom: var(--s3);
}
.skeleton-line {
  height: 14px;
  border-radius: var(--r-sm);
  background: var(--surface2);
  background-image: linear-gradient(90deg, var(--surface2) 0%, var(--surface3) 50%, var(--surface2) 100%);
  background-size: 200px 100%;
  background-repeat: no-repeat;
  animation: skelShimmer 1.4s ease-in-out infinite;
  margin-bottom: var(--s2);
}
.skeleton-line:last-child { margin-bottom: 0; }
.skeleton-line.short  { width: 40%; height: 10px; }
.skeleton-line.medium { width: 65%; }

/* Релиз 1 (Часть 8): блок .now-night удалён — «Сейчас» больше не зависит от
   времени суток и не вводит старую янтарную/коралловую палитру. */

/* ── #4: smooth transitions для динамических состояний ──── */
.av-hero { transition: border-color .3s, box-shadow .3s; }
.av-done-btn { transition: background .3s, color .3s, filter .15s, transform .1s; }
.now-next-card { transition: background .3s, border-color .3s, filter .3s; }

/* ═══════════════════════════════════════════════════════════════
   РЕЛИЗ 2 — НИЖНЯЯ НАВИГАЦИЯ
   ═══════════════════════════════════════════════════════════════ */

/* ── Таб-бар ───────────────────────────────────────────────── */
.tabbar {
  position: relative; flex: 0 0 auto; z-index: 300;
  display: flex;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 6px 8px max(6px, calc(env(safe-area-inset-bottom) - 10px));
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; cursor: pointer;
  color: var(--text3); padding: 0 var(--s1);
  -webkit-tap-highlight-color: transparent;
  transition: color .15s, transform .1s;
}
.tab-item .tab-ic { width: 22px; height: 22px; display: block; }
.tab-item .tab-label { font-size: var(--fs-caption); font-weight: 600; letter-spacing: .2px; }
.tab-item.active { color: var(--amber); }
.tab-item:not(.active):active { transform: scale(.92); }
/* Таб-бар скрыт на вложенных экранах (деталь = full-screen push) */
body.detail-view .tabbar { display: none; }

/* ── Сегментированный фильтр (Поездки: Активные / Архив) ────── */
.seg {
  display: flex; gap: var(--s1); background: var(--surface2);
  border: 1px solid var(--border); border-radius: var(--r-sm); padding: var(--s1);
  margin-bottom: var(--s4);
}
.seg-item {
  flex: 1; text-align: center; padding: var(--s2); border-radius: var(--r-sm);
  background: none; border: none; cursor: pointer;
  color: var(--text2); font-size: var(--fs-section); font-weight: 600;
  -webkit-tap-highlight-color: transparent; transition: background .15s, color .15s;
}
.seg-item.active { background: var(--surface3); color: var(--text); }

/* ── Экран «Ещё»: строки-пункты ────────────────────────────── */
.more-row {
  display: flex; align-items: center; gap: var(--s3); width: 100%;
  background: transparent; border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0; padding: var(--s4) var(--s1); margin-bottom: 0;
  font-size: var(--fs-body); font-weight: 600; color: var(--text); text-align: left;
  cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .15s;
}
.more-row:active { background: var(--surface); }
.more-row-ic { font-size: var(--fs-body); width: 22px; text-align: center; flex-shrink: 0; }
.more-row-arr { margin-left: auto; color: var(--text3); font-size: var(--fs-body); font-weight: 400; }

/* ── Экран «Сегодня»: пустое состояние ─────────────────────── */
.today-empty { min-height: 48vh; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; text-align: center; padding: 9vh var(--s5) var(--s5); }
.today-empty-icon { font-size: var(--fs-hero); margin-bottom: var(--s3); opacity: .75; }
.today-empty-title { font-family: var(--font-display); font-size: var(--fs-title); font-weight: 700; letter-spacing: -.3px; margin-bottom: var(--s2); }
.today-empty-sub { font-size: var(--fs-body); color: var(--text2); line-height: 1.55; max-width: 300px; margin: 0 auto; text-wrap: balance; }

/* ── Закреплённый день на «Сегодня» ────────────────────────── */
.pinned-label { margin: var(--s5) 0 var(--s3); }
.pinned-title { font-family: var(--font-display); font-size: var(--fs-caption); font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text3); }

/* ═══════════════════════════════════════════════════════════════
   РЕЛИЗ 3 — ЭКРАН АКТИВНОСТИ: всегда-видимые блоки + open-кнопка
   ═══════════════════════════════════════════════════════════════ */

/* Большая кнопка «Открыть билет / маршрут» — мгновенный полноэкран */
.av-open-btn {
  display: flex; align-items: center; gap: var(--s4); width: 100%;
  background: var(--amber); color: #0c0c10; border: none;
  border-radius: var(--r); padding: var(--s4) var(--s4); margin-bottom: var(--s3);
  cursor: pointer; text-align: left;
  -webkit-tap-highlight-color: transparent; transition: filter .15s, transform .1s;
}
.av-open-btn:active { filter: brightness(.9); transform: scale(.99); }
.av-open-ic   { font-size: var(--fs-title); flex-shrink: 0; }
.av-open-body { display: flex; flex-direction: column; }
.av-open-tx   { font-size: var(--fs-body); font-weight: 700; letter-spacing: -.2px; }
.av-open-sub  { font-size: var(--fs-caption); font-weight: 600; opacity: .62; margin-top: var(--s1); }
.av-open-chev { margin-left: auto; font-size: var(--fs-body); opacity: .7; }

/* Всегда-видимый блок (Как добраться / Билеты / Адрес) */
.av-block {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: var(--s4) var(--s4); margin-bottom: var(--s3);
}
.av-block-label {
  font-size: var(--fs-caption); font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: .6px; margin-bottom: var(--s3);
}
.av-block-text {
  font-size: var(--fs-body); line-height: 1.6; color: var(--text2); white-space: pre-wrap;
}
.av-block-text:empty { display: none; }
/* галереи внутри блока — без второй «карточки» */
.av-block .photo-gallery { margin: 0; padding: 0; background: none; border: none; }
.av-block .av-transport-carousel { margin: 0; }

/* Полноэкранный просмотр фото/билета (в приложении, не новое окно) */
.photo-zoom-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: none; flex-direction: column;
  background: rgba(0,0,0,.94);
  opacity: 0; transition: opacity .2s;
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.photo-zoom-overlay.open { opacity: 1; }
/* верхняя панель: счётчик + закрыть */
.pz-bar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
  pointer-events: none;
}
.pz-counter {
  pointer-events: none;
  color: #fff; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums;
  background: rgba(0,0,0,.45); border-radius: 20px; padding: 5px 12px;
}
.pz-close {
  pointer-events: auto;
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: rgba(0,0,0,.45); color: #fff; font-size: 18px; line-height: 1; cursor: pointer;
}
/* трек слайдов — горизонтальная карусель на transform (ручной свайп) */
.pz-viewport {
  flex: 1; width: 100%; height: 100%; overflow: hidden;
  touch-action: none;   /* жесты обрабатываем сами → свайп работает поверх фото */
}
.pz-track {
  display: flex; width: 100%; height: 100%;
  will-change: transform;
}
.pz-slide {
  flex: 0 0 100%; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 16px; overflow: hidden;
}
.pz-slide img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  border-radius: var(--r-sm);
  user-select: none; -webkit-user-drag: none; pointer-events: auto;
  transition: transform .2s;
}
.pz-slide img.zoomed { cursor: grab; }
/* стрелки (десктоп/планшет) */
.pz-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: rgba(0,0,0,.4); color: #fff; font-size: 26px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.pz-prev { left: 10px; } .pz-next { right: 10px; }
@media (hover: none) and (pointer: coarse) { .pz-nav { display: none; } }

/* ═══════════════════════════════════════════════════════════════
   РЕЛИЗ 4 — ЛИНЕЙНЫЕ ИКОНКИ (вместо эмодзи в управлении)
   ═══════════════════════════════════════════════════════════════ */
.ic {
  width: 1.15em; height: 1.15em;
  display: inline-block; vertical-align: -0.18em; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.ic-fill { fill: currentColor; stroke: none; }
/* иконка типа в строке таймлайна — небольшой отступ от текста */
.t-name .ic, .now-next-type .ic, .sum-highlight-icon .ic { margin-right: var(--s1); }
.more-row-ic .ic { width: 20px; height: 20px; }

/* Релиз 4 — отступы/размеры иконок в новых контекстах */
.day-menu-item .ic,
.badge .ic,
.burn-chip .ic,
.pinned-title .ic { margin-right: var(--s2); }
.now-btn-expense .ic { width: 20px; height: 20px; }
.section-label-inline .ic { margin-right: var(--s2); }

/* ════════════════════════════════════════════════════════════════════════
   НЕДЕЛЯ 1 — ХАБ «ДНИ», ЭКРАН «БЮДЖЕТ», INBOX, ТРАТЫ-ЧИПЫ, КОНТЕКСТ ТРАТЫ
   ════════════════════════════════════════════════════════════════════════ */

/* ── Шапки хабов (Дни / Бюджет) ── */
.hub-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s3); margin: -4px 0 var(--s5);
}
.hub-trip {
  position: relative; padding-left: 14px;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  display: flex; flex-direction: column; gap: 1px; min-width: 0;
}
.hub-trip::before {
  content: ''; position: absolute; left: 0; top: 4px; bottom: 4px;
  width: 4px; border-radius: 3px; background: var(--hub-accent, var(--accent)); transition: background .4s ease;
}
.hub-eyebrow {
  font-size: 10px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--text3);
}
.hub-trip-name {
  font-family: var(--font-display); font-size: var(--fs-title); font-weight: 700;
  letter-spacing: -0.4px; line-height: 1.15; color: var(--text);
  /* v52 (аудит): не обрезаем название в одну строку — даём до двух строк */
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  white-space: normal; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
  word-break: break-word;
}
.hub-trip-name::after { content: '›'; color: var(--text3); font-weight: 400; font-size: 18px; }
.hub-trip:active { opacity: .6; }
.hub-switch {
  flex: 0 0 auto; background: var(--surface2); border: 1px solid var(--border);
  color: var(--text2); font-size: var(--fs-caption); font-weight: 700;
  padding: var(--s2) var(--s3); border-radius: var(--r-sm); cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: background .15s;
}
.hub-switch:active { background: var(--surface3); }
.hub-title {
  font-family: var(--font-display); font-size: var(--fs-title); font-weight: 700;
  letter-spacing: -0.4px; margin-bottom: var(--s4);
}

/* ── Дни: группа-город ── */
.days-city-group { margin-bottom: var(--s5); }
.days-city-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s3); padding: 0 var(--s1) var(--s2);
  border-bottom: 1px solid var(--border); margin-bottom: var(--s2);
}
.days-city-name { font-size: var(--fs-section); font-weight: 700; color: var(--text); display: inline-flex; align-items: center; gap: 5px; }
.days-city-ic { display: inline-flex; color: var(--accent); }
.days-city-ic .ic { width: 15px; height: 15px; }
.days-city-dates { font-size: var(--fs-caption); color: var(--text3); font-weight: 600; }
.days-city-empty { font-size: var(--fs-caption); color: var(--text3); padding: var(--s3) var(--s1); }

/* ── Дни: строка дня ── */
/* ─── Дни: карточка-день (превью поездки, не статусы БД) ─── */
#days-overview-content .day-card {
  position: relative; display: block; background: transparent;
  border: none; border-bottom: none; border-radius: 14px; padding: 0; margin: 0;
  cursor: pointer; transition: background .18s ease;
}
#days-overview-content .day-card + .day-card { margin-top: 6px; }   /* воздух вместо разделителей */
#days-overview-content .day-card.is-today,
#days-overview-content .day-card.day-row-pinned { background: var(--amber-dim); }
#days-overview-content .day-row {
  display: block; padding: 13px 46px 13px 14px; border: none; border-radius: 14px;
  -webkit-tap-highlight-color: transparent;
}
#days-overview-content .day-row:active { background: rgba(255,255,255,.03); }

/* заголовок: дата (главное) + День N / сегодня (вторичное) */
.dr-head { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.dr-date { font-size: 17px; font-weight: 700; letter-spacing: -.3px; color: var(--text); line-height: 1.1; }
.dr-dayn { font-size: var(--fs-caption); color: var(--text3); font-weight: 600; }
.dr-today { font-size: var(--fs-caption); font-weight: 700; color: var(--accent); }

/* содержимое дня: превью активностей */
.dr-acts { display: flex; flex-direction: column; gap: 5px; margin-top: 9px; }
.dr-act { display: flex; align-items: center; gap: 9px; min-width: 0; }
.dr-act-ic { flex: 0 0 auto; display: inline-flex; }
.dr-act-ic .ic { width: 15px; height: 15px; }
.dr-act-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-body); color: var(--text); }
.dr-ic-transport { color: var(--type-transport); }
.dr-ic-food { color: var(--type-food); }
.dr-ic-place { color: var(--type-place); }
.dr-ic-hotel { color: var(--type-hotel); }
.dr-ic-warning { color: var(--type-warning); }
.dr-more { font-size: var(--fs-caption); color: var(--text3); font-weight: 600; margin-top: 3px; padding-left: 24px; }
.dr-empty { margin-top: 9px; font-size: var(--fs-body); color: var(--text3); }

/* подвал: документы и траты — тихо, без подписей */
.dr-foot { display: flex; align-items: center; gap: 14px; margin-top: 11px; }
.dr-foot-i { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-caption); color: var(--text2); font-weight: 600; }
.dr-foot-i .ic { width: 13px; height: 13px; opacity: .85; }

/* кнопка «сделать сегодняшним» — компактная, верх-право */
.dr-pin {
  position: absolute; top: 10px; right: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface2); border: 1px solid var(--border); color: var(--text2);
  border-radius: 9px; padding: 6px; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background .15s, color .15s, border-color .15s, transform .1s;
}
.dr-pin .ic { width: 15px; height: 15px; }
.dr-pin:active { background: var(--amber-dim); color: var(--amber); border-color: transparent; transform: scale(.93); }

/* стрелка — только индикатор перехода, не кнопка */
.dr-go { position: absolute; right: 14px; bottom: 12px; color: var(--text3); opacity: .4; font-size: 17px; line-height: 1; pointer-events: none; }

/* ── Inbox-баннер ── */
.inbox-banner {
  display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap;
  background: var(--surface2); border: 1px solid var(--border2);
  border-radius: var(--r-sm); padding: var(--s3) var(--s4);
  font-size: var(--fs-section); font-weight: 600; color: var(--text2);
  margin-bottom: var(--s4); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.inbox-banner:active { background: var(--surface3); }
.inbox-banner .ic { width: 16px; height: 16px; }
.inbox-banner-act { margin-left: auto; color: var(--accent); font-weight: 700; }

/* ── Бюджет: герой ── */
.bud-hero {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); box-shadow: var(--shadow);
  padding: var(--s5) var(--s4); margin-bottom: var(--s4); text-align: center;
}
/* Релиз 1: ссылка-подсказка из «Поездки» в «Бюджет» (поездка = оболочка, деньги = в Бюджете) */
.manage-budget-link {
  width: 100%; display: flex; align-items: center; gap: var(--s3);
  background: none; border: none;
  border-radius: var(--r-sm); padding: 12px 2px; margin-bottom: var(--s4);
  color: var(--text2); font-size: var(--fs-body); font-weight: 600;
  cursor: pointer; text-align: left;
}
.manage-budget-link .more-row-arr { margin-left: auto; color: var(--text3); }
.manage-budget-link:active { background: var(--surface2); }
.bud-hero-label {
  font-size: var(--fs-caption); color: var(--text3); text-transform: uppercase;
  letter-spacing: 0.7px; font-weight: 700; margin-bottom: var(--s3);
}
.bud-hero-val {
  font-family: var(--font-display); font-size: var(--fs-hero); font-weight: 700;
  letter-spacing: -1px; line-height: 1; margin-bottom: var(--s3);
}
.bud-hero-sub { font-size: var(--fs-caption); color: var(--text2); font-weight: 600; }

/* Релиз 1: перенос burn-rate и «Запланировано» из удалённого fin-dash в hero Бюджета */
.bud-hero-stats { margin-top: var(--s4); display: flex; flex-direction: column; gap: var(--s3); }
.bud-hero-stats .burn-chip { margin-bottom: 0; }
.bud-hero-substat { display: flex; gap: var(--s2); }
.bud-substat {
  flex: 1; display: flex; flex-direction: column; gap: 2px;
  background: var(--surface2); border-radius: var(--r-sm);
  padding: var(--s3); text-align: center;
}
.bud-substat span { font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; }
.bud-substat b { font-size: var(--fs-section); font-weight: 700; }

/* Релиз 3: чип переключения валюты остатка + нижний лист выбора */
.bud-cur-chip {
  border: 1px solid var(--border2); background: var(--surface2); color: var(--text2);
  border-radius: 20px; padding: 2px 10px; font-size: 11px; font-weight: 700; cursor: pointer;
  margin-left: 6px; vertical-align: middle;
}
.sheet-overlay {
  position: fixed; inset: 0; z-index: 1200; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0,0,0,.5); opacity: 0; transition: opacity .18s;
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.sheet-overlay.open { opacity: 1; }
.sheet {
  width: 100%; max-width: 480px; background: var(--surface);
  border-radius: var(--r-lg) var(--r-lg) 0 0; padding: var(--s4);
  padding-bottom: calc(var(--s4) + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 30px rgba(0,0,0,.4); transform: translateY(12px); transition: transform .18s;
}
.sheet-overlay.open .sheet { transform: translateY(0); }
.sheet-title { font-size: var(--fs-section); color: var(--text3); text-transform: uppercase; letter-spacing: .6px; font-weight: 700; margin-bottom: var(--s3); }
.sheet-opt {
  width: 100%; text-align: left; background: var(--surface2); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--r-sm); padding: var(--s4);
  font-size: var(--fs-body); font-weight: 600; cursor: pointer; margin-bottom: var(--s2);
}
.sheet-opt:active { background: var(--surface3); }
.sheet-cancel { background: transparent; color: var(--text2); text-align: center; border-color: transparent; margin-top: var(--s2); }

/* Релиз 3: сегментированный переключатель темы */
.theme-seg {
  display: flex; gap: 4px; background: var(--surface2);
  border: 1px solid var(--border); border-radius: var(--r-sm); padding: 4px;
}
.theme-seg button {
  flex: 1; border: 0; background: transparent; color: var(--text2);
  border-radius: 8px; padding: 9px 0; font-size: var(--fs-section); font-weight: 700; cursor: pointer;
}
.theme-seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* «Мои документы» */
.docs-hint { font-size: var(--fs-section); color: var(--text3); margin-bottom: var(--s4); }
.docs-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2);
  margin: var(--s4) 0; max-height: 50vh; overflow-y: auto;
}
.docs-cell { position: relative; aspect-ratio: 3/4; border-radius: var(--r-sm); overflow: hidden; background: var(--surface2); }
.docs-cell img { width: 100%; height: 100%; object-fit: cover; cursor: pointer; display: block; }
.docs-del {
  position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%;
  border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 13px; cursor: pointer; line-height: 1;
}
.docs-empty { grid-column: 1 / -1; text-align: center; color: var(--text3); font-size: var(--fs-body); padding: var(--s6) 0; }

/* Релиз 2: «Последние расходы» + история из реестра транзакций */
.bud-recent-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: var(--s3) var(--s4); margin-bottom: var(--s4);
}
.bud-recent-head {
  font-size: var(--fs-caption); color: var(--text3); text-transform: uppercase;
  letter-spacing: 0.7px; font-weight: 700; padding: var(--s2) 0;
}
.exp-row {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s3) 0; border-top: 1px solid var(--border);
}
.exp-emoji { font-size: 18px; width: 26px; text-align: center; flex-shrink: 0; }
.exp-main { flex: 1; min-width: 0; }
.exp-title { font-size: var(--fs-body); font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exp-meta { font-size: var(--fs-caption); color: var(--text3); margin-top: 1px; }
.exp-amount { font-size: var(--fs-body); font-weight: 700; color: var(--red); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.exp-more { margin-top: var(--s3); }

/* ── Бюджет: «сегодня» ── */
.bud-today {
  display: flex; flex-direction: column; gap: 2px;
  background: var(--amber-dim); border: 1px solid transparent;
  border-radius: var(--r-sm); padding: var(--s3) var(--s4);
  margin-bottom: var(--s4); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.bud-today:active { opacity: .85; }
.bud-today-label { font-size: var(--fs-caption); font-weight: 700; color: var(--amber); display: flex; align-items: center; gap: 5px; }
.bud-today-label .ic { width: 13px; height: 13px; }
.bud-today-val { font-size: var(--fs-section); color: var(--text); font-weight: 600; }

/* ── Бюджет: аккордеоны ── */
.bud-acc { border-bottom: 1px solid var(--border); }
.bud-acc-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  background: none; border: none; cursor: pointer; color: var(--text);
  font-size: var(--fs-body); font-weight: 700; letter-spacing: -0.2px;
  padding: var(--s4) var(--s1); -webkit-tap-highlight-color: transparent;
}
.bud-acc-arr { color: var(--text3); font-size: 13px; transition: transform .2s; }
.bud-acc-body { padding: 0 var(--s1) var(--s4); }
.bud-line {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s3); padding: var(--s3) 0; font-size: var(--fs-section);
  color: var(--text2); border-top: 1px solid var(--border);
}
.bud-line:first-child { border-top: none; }
.bud-line span:last-child { color: var(--text); font-weight: 700; font-family: var(--font-display); }
.bud-line-empty { color: var(--text3); justify-content: center; }

/* ── Бюджет: столбики по дням ── */
.bud-bars { display: flex; align-items: flex-end; gap: 4px; height: 90px; padding-top: var(--s2); overflow-x: auto; }
.bud-bar-col { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 16px; height: 100%; justify-content: flex-end; }
.bud-bar { width: 14px; background: var(--surface3); border-radius: 3px 3px 0 0; transition: height .3s; }
.bud-bar-lab { font-size: 9px; color: var(--text3); font-weight: 700; }

/* ── Цель быстрой траты (Город · День N) ── */
.qe-target {
  display: flex; align-items: center; gap: 6px;
  background: var(--amber-dim); color: var(--amber);
  font-size: var(--fs-caption); font-weight: 700;
  padding: var(--s2) var(--s3); border-radius: var(--r-sm);
  margin-bottom: var(--s4);
}
.qe-target .ic { width: 14px; height: 14px; }
.qe-target-inbox { background: var(--surface2); color: var(--text2); }

/* ── Трата как лёгкая строка-чип в таймлайне ── */
.t-dot-exp { background: var(--border2); width: 12px; height: 12px; left: -26px; top: 14px; }
.t-expense-node { margin-bottom: var(--s2); }
.t-expense-card {
  display: flex; align-items: center; gap: var(--s2);
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: var(--s2) var(--s3);
  cursor: pointer; -webkit-tap-highlight-color: transparent; position: relative;
}
.t-expense-card:active { background: var(--surface3); }
.t-exp-time { font-size: 11px; color: var(--text3); font-weight: 700; min-width: 38px; }
.t-exp-title { flex: 1; min-width: 0; font-size: var(--fs-section); color: var(--text2); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-exp-title .ic { width: 14px; height: 14px; vertical-align: -2px; }
.t-exp-amount { font-size: var(--fs-section); color: var(--text); font-weight: 700; font-family: var(--font-display); white-space: nowrap; }

/* ── Активная поездка в списке ── */
.card-current-trip { border-color: var(--amber); }
.trip-active-tag {
  font-size: 10px; font-weight: 700; color: var(--amber);
  background: var(--amber-dim); padding: 2px 7px; border-radius: 999px;
  margin-left: 6px; vertical-align: middle; letter-spacing: .3px;
}

/* ════ RC-полировка: иерархия и контекст (Части 2,3,6) ════ */
/* Пилюля состояния бюджета «В рамках плана / Выше бюджета» */
.bud-hero-state {
  display: inline-block; margin-left: 8px; vertical-align: middle;
  font-size: 10px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase;
  padding: 3px 9px; border-radius: 20px; line-height: 1.4;
}
.bud-hero-state.ok   { background: var(--green-dim); color: var(--green); }
.bud-hero-state.over { background: var(--red-dim);   color: var(--red); }

/* Часть 3 — усиление главного числа, ослабление вторичного текста */
.bud-hero-val { font-size: calc(var(--fs-hero) * 1.08); letter-spacing: -1.2px; }
.bud-hero-sub { color: var(--text3); opacity: .95; }
.bud-hero-label { margin-bottom: var(--s2); }

/* Контекст «Сегодня» — город · День N из M читается крупнее/спокойнее */
.pinned-title { color: var(--text2); letter-spacing: .8px; }

/* Часть 6 — меньше визуального шума: мягче разделители списков бюджета */
.bud-line { border-top-color: var(--border); }
.bud-line + .bud-line { border-top-width: 1px; }
/* Подзаголовок внутри «Настройки» (Часть 5) */
.settings-sublabel { font-size: var(--fs-caption); color: var(--text3); font-weight: 700; letter-spacing: .3px; margin: var(--s4) 0 var(--s2) var(--s2); }

/* ════ ПЕРВЫЙ ЗАПУСК: старт-экран · шаблоны · демо-плашка · подсказки ════ */
.onboarding {
  position: fixed; inset: 0; z-index: 400; display: none;
  align-items: center; justify-content: center; padding: 24px;
  background: var(--bg); opacity: 0; transition: opacity .22s ease;
}
.onboarding.open { opacity: 1; }
.onboarding-card { max-width: 420px; width: 100%; text-align: center; }
.onboarding-logo {
  width: 64px; height: 64px; margin: 0 auto 22px; border-radius: 20px;
  background: var(--surface2); display: flex; align-items: center; justify-content: center; color: var(--accent);
}
.onboarding-logo .ic { width: 32px; height: 32px; }
.onboarding-title { font-family: var(--font-display); font-size: 28px; font-weight: 800; letter-spacing: -0.5px; margin: 0 0 12px; color: var(--text); }
.onboarding-sub { font-size: 15px; line-height: 1.55; color: var(--text2); margin: 0 0 28px; }
.onboarding-btn { width: 100%; margin-bottom: 12px; }
.onboarding-skip { background: none; border: 0; color: var(--text3); font-size: 14px; font-weight: 600; padding: 10px; cursor: pointer; margin-top: 2px; }

/* ── Онбординг: 3 экрана-сценария ── */
.ob-card { display: flex; flex-direction: column; }
.ob-viewport { overflow: hidden; width: 100%; }
.ob-track { display: flex; transition: transform .32s cubic-bezier(.4,0,.2,1); }
.ob-slide { flex: 0 0 100%; min-width: 100%; padding: 8px 4px 0; box-sizing: border-box; }
.ob-art {
  width: 100%; max-width: 300px; margin: 0 auto 28px; padding: 22px 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
}
.ob-art svg { width: 100%; height: auto; display: block; }
.ob-title { font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: -0.5px; line-height: 1.2; margin: 0 0 12px; color: var(--text); }
.ob-desc { font-size: 15px; line-height: 1.55; color: var(--text2); margin: 0 auto 8px; max-width: 320px; }
.ob-dots { display: flex; justify-content: center; gap: 7px; margin: 22px 0 18px; }
.ob-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border2); transition: all .2s; }
.ob-dot.active { background: var(--accent); width: 20px; border-radius: 4px; }
.ob-cta { width: 100%; font-weight: 700; margin-bottom: 8px; }

/* ── Карточки выбора сценария (лист + пустые экраны) ── */
.start-cards { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 10px; text-align: left; }
.start-card {
  width: 100%; display: flex; align-items: center; gap: 14px;
  background: var(--surface2); border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 15px 16px; cursor: pointer; text-align: left; transition: background .14s, border-color .14s;
}
.start-card:active { background: var(--surface); }
.start-card:first-child { border-color: var(--accent); }
.start-card-ic {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 11px;
  background: var(--surface); display: flex; align-items: center; justify-content: center; color: var(--accent);
}
.start-card-ic .ic { width: 20px; height: 20px; }
.start-card-tx { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.start-card-t { font-size: 15px; font-weight: 700; color: var(--text); }
.start-card-s { font-size: 13px; line-height: 1.4; color: var(--text3); }
.start-card-arr { flex: 0 0 auto; color: var(--text3); font-size: 18px; }

/* ── ИИ-онбординг (скопировать промт → загрузить ответ) ── */
.ai-onb { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 12px; }
.ai-onb-lead { font-size: 15px; line-height: 1.55; color: var(--text2); margin-bottom: 14px; text-align: center; }
.ai-onb-btn { width: 100%; }
.ai-onb-copy { font-weight: 700; }
.ai-onb-step2 {
  background: var(--surface2); border: 1px solid var(--border2); border-radius: var(--r-sm);
  padding: 14px 16px; text-align: left; margin: 2px 0;
}
.ai-onb-step2-t { font-family: var(--font-display); font-size: var(--fs-body); font-weight: 700; color: var(--text); margin-bottom: 4px; }
.ai-onb-step2-s { font-size: var(--fs-section); line-height: 1.5; color: var(--text2); }
.ai-onb-import-hot { border-color: var(--accent) !important; color: var(--accent) !important; }
/* В оверлее первого запуска кнопки наследуют полную ширину */
.onboarding-card .ai-onb .btn-primary,
.onboarding-card .ai-onb .btn-ghost { width: 100%; }

.tpl-sub { font-size: 13px; color: var(--text3); margin-bottom: 16px; line-height: 1.45; }
.tpl-row {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--surface2); border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 15px 16px; margin-bottom: 10px; font-size: 15px; font-weight: 600; color: var(--text);
  cursor: pointer; text-align: left;
}
.tpl-row:active { background: var(--surface); }
.tpl-row .tpl-arr { color: var(--text3); font-size: 18px; }
.tpl-blank { font-weight: 500; color: var(--text2); }

.demo-banner {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 78px; z-index: 95;
  display: flex; align-items: center; gap: 10px; max-width: 94%;
  background: var(--accent); color: #fff; font-size: 12.5px; font-weight: 600;
  padding: 8px 8px 8px 16px; border-radius: 24px; box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
/* v69 · Кнопки не переносятся: в китайском и японском «自分の旅を作る»
   разваливалось по одному иероглифу в столбик. Сжимается подпись слева,
   действия остаются целыми. */
.demo-banner > span { flex: 0 1 auto; min-width: 7em; }
.demo-banner button { flex: 0 0 auto; white-space: nowrap; }
/* Узкие экраны: подпись переносится на две строки, но не в столбик по букве */
@media (max-width: 400px) {
  .demo-banner { gap: 8px; padding-left: 12px; }
  .demo-banner .demo-cta { padding: 8px 12px; }
}
.demo-banner button { background: rgba(255,255,255,0.22); border: 0; color: #fff; font-weight: 700; font-size: 12px; padding: 5px 12px; border-radius: 20px; cursor: pointer; }
body.detail-view .demo-banner { bottom: 20px; }

/* v73 · Демо-панель участвует в потоке активного экрана и больше не
   перекрывает карту или первую карточку поездки. */
.screen > .demo-banner{
  position:sticky; top:8px; left:auto; bottom:auto; transform:none;
  width:max-content; margin:0 auto 14px; z-index:45;
}
body.detail-view .screen > .demo-banner{ bottom:auto; }

.hint-bar {
  position: fixed; left: 50%; top: 14px; transform: translateX(-50%) translateY(-12px); z-index: 120;
  display: flex; align-items: center; gap: 10px; max-width: 90%;
  background: var(--text); color: var(--bg); font-size: 13px; font-weight: 600;
  padding: 8px 8px 8px 15px; border-radius: 22px; box-shadow: 0 6px 20px rgba(0,0,0,0.28);
  opacity: 0; transition: opacity .25s ease, transform .25s ease;
}
.hint-bar.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.hint-bar button { background: rgba(127,127,127,0.3); border: 0; color: inherit; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; cursor: pointer; line-height: 1; }

/* Бейдж режима бюджета дня (авто / изменено вручную) — P1.1 */
.limit-tag { display:inline-block; font-size:10px; font-weight:700; letter-spacing:.3px; padding:2px 7px; border-radius:12px; vertical-align:middle; }
.limit-tag.manual { background: var(--amber-dim, rgba(180,140,60,.18)); color: var(--amber, #b48c3c); }
.limit-tag.auto   { background: var(--surface2); color: var(--text3); }

/* P1.6 — кликабельные подстаты бюджета + плановые суммы */
.bud-substat-link { background:none; border:0; padding:0; margin:0; font:inherit; color:inherit; cursor:pointer; display:flex; flex-direction:column; align-items:flex-start; gap:2px; text-align:left; flex:1; }
.bud-substat-link:active { opacity:.6; }
.bud-substat-link > span { color:var(--text3); font-size:var(--fs-caption); }
.exp-amount-plan { color: var(--amber); }

/* P2.7 — группировка настроения по городам в итогах */
.sum-mood-city { margin-bottom: 14px; }
.sum-mood-city-name { font-size: 13px; font-weight: 700; color: var(--text2); margin-bottom: 6px; }

/* ════ P8 — защита от переполнения длинными названиями/валютами ════ */
.hub-trip-name, .sum-dates, .day-row-date, .t-title, .pinned-title {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; max-width: 100%;
}
.sum-trip-name { overflow-wrap: anywhere; }
.day-row-body, .exp-main, .t-card, .day-card, .hub-trip { min-width: 0; }
.bud-line { gap: 10px; }
.bud-line > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1 1 auto; }
.bud-line > span:last-child { white-space: nowrap; flex: 0 0 auto; }
.exp-title, .exp-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exp-amount { flex: 0 0 auto; white-space: nowrap; }
.wallet-config-row { flex-wrap: wrap; }
.wallet-config-row input, .wallet-config-row select { min-width: 0; }
.bud-cur-chip { white-space: nowrap; max-width: 70%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.card-trip-title, .trip-card-title, .sum-route-name, .sum-mood-city-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bud-today-val { overflow: hidden; text-overflow: ellipsis; }

/* ════ SVG-пикер типа/категории (вместо нативного select) ════ */
.type-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--s2, 8px); }
.type-pick-btn {
  flex: 1 1 calc(20% - 8px); min-width: 64px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 6px; border-radius: var(--r-sm, 10px);
  background: var(--surface2); border: 1px solid var(--border); color: var(--text2);
  font-size: 11px; font-weight: 600; cursor: pointer; transition: border-color .15s, background .15s, color .15s;
}
.type-pick-btn .ic { width: 20px; height: 20px; }
.type-pick-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.type-pick-btn:active { transform: scale(.97); }
.type-pick-btn.active { border-color: var(--accent); color: var(--text); background: var(--accent-dim, var(--surface2)); box-shadow: inset 0 0 0 1px var(--accent); }

/* Часть 2 — кнопка «Построить маршрут» в блоке адреса */
.av-route-btn {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 10px;
  background: var(--surface2); border: 1px solid var(--border); color: var(--accent);
  font-size: 13px; font-weight: 700; padding: 8px 14px; border-radius: 20px; cursor: pointer;
}
.av-route-btn .ic { width: 16px; height: 16px; }
.av-route-btn:active { transform: scale(.97); }
#act-view-address-text .ic { width: 15px; height: 15px; vertical-align: -2px; color: var(--text3); margin-right: 2px; }

/* Часть 4 — усилить главные состояния (текущий шаг читается быстрее) */
.now-next-title { font-weight: 800; letter-spacing: -0.3px; }
.now-btn-primary { font-weight: 700; }

/* Активность — тумблер «Детали» (сворачивает второстепенные блоки) */
.av-details-toggle { width: 100%; margin: 4px 0 12px; }
#av-details-wrap { margin-bottom: 4px; }
#av-details-wrap .av-block:last-child, #av-details-wrap .av-photo-carousel:last-child { margin-bottom: 0; }
.av-details-toggle .av-acc-arrow { transition: transform .18s ease; }

/* ════ Бюджет → кнопка перехода в Статистику (последняя секция) ════ */
.bud-stats-link {
  display: flex; align-items: center; gap: 10px; width: 100%;
  margin-top: 4px; padding: 16px; border-radius: var(--r-md, 14px);
  background: var(--surface2); border: 1px solid var(--border); color: var(--text);
  font-size: 15px; font-weight: 700; cursor: pointer;
}
.bud-stats-link .ic { width: 18px; height: 18px; color: var(--text2); }
.bud-stats-link .bud-stats-arr { margin-left: auto; color: var(--text3); font-weight: 700; }
.bud-stats-link:active { transform: scale(.99); }

/* ════ Экран статистики ════ */
.stats-screen-title { display: block; margin: 2px 0 14px; font-size: 13px; }
.stats-total { padding: 14px 16px; }
.stats-total-row { display: flex; justify-content: space-between; align-items: baseline; padding: 7px 0; font-size: 14px; }
.stats-total-row + .stats-total-row { border-top: 1px solid var(--border); }
.stats-total-row span { color: var(--text2); }
.stats-total-row b { font-size: 16px; }
#budget-stats-content .stats-block-title { margin: 18px 2px 8px; font-size: 13px; font-weight: 700; color: var(--text2); }
.stats-city-group + .stats-city-group { margin-top: 10px; }
.stats-city-name { font-size: 13px; font-weight: 700; color: var(--text); margin: 4px 0 2px; }

/* ════════════════════════════════════════════════════════════════
   ВИЗУАЛЬНОЕ ОБЛЕГЧЕНИЕ · воздух, 3 уровня важности, меньше линий
   (функции/навигация/сценарии не меняются — только вес и ритм)
   ════════════════════════════════════════════════════════════════ */

/* Правило 4 — тень мягче (единый токен → все карточки легче) */
:root { --shadow: 0 2px 10px rgba(0,0,0,0.22); }

/* Правило 1 — вторичные блоки перестают быть карточками → обычные секции */
.stats-richcard, .bud-recent-card, .vekhi-block {
  background: transparent; border: none; box-shadow: none;
  border-radius: 0; padding-left: 0; padding-right: 0;
}
.bud-recent-card { padding-top: 0; margin-bottom: var(--s5); }
/* «Общий итог» на экране статистики — единственный лёгкий card (ключевой блок) */
.stats-total { background: var(--surface); border-radius: var(--r); padding: var(--s4); }

/* Правило 3 (Уровень 3 — служебное: статистика слабее, не тяжёлая карточка) */
.bud-stats-link {
  background: transparent; border: none; border-radius: 0;
  padding: var(--s4) var(--s1); margin-top: var(--s4);
  color: var(--text2); font-weight: 600;
}
.bud-stats-link .ic { opacity: .7; }
.bud-stats-link .bud-stats-arr { color: var(--text3); }

/* Правило 3 + 7 — служебные чипы/иконки/счётчики тише, акцент на результате */
.bud-cur-chip { color: var(--text3); border-color: var(--border); background: transparent; font-weight: 600; }
.exp-emoji, .bud-line .ic, .more-row-ic .ic { opacity: .78; }
.bud-today-label .ic { opacity: .7; }

/* Правило 2 + 6 — вертикальный ритм и паузы после крупных блоков */
.bud-hero { margin-bottom: var(--s5); }
.now-next-card { margin-bottom: var(--s4); }
.now-actions { margin-bottom: var(--s5); }
.bud-today { margin-top: var(--s4); margin-bottom: var(--s5); }

/* Правило 2 — заголовок ↔ контент: больше воздуха перед секциями статистики */
#budget-stats-content .stats-block-title { margin-top: var(--s5); margin-bottom: var(--s3); }
#budget-stats-content > .stats-block-title:first-of-type,
#budget-stats-content .stats-total + .stats-block-title { margin-top: var(--s4); }

/* Правило 2 — между секциями-аккордеонами бюджета больше расстояния */
.bud-acc-head { padding-top: var(--s4); padding-bottom: var(--s4); }

/* Правило 4 — без двойных линий */
.bud-line:first-child { border-top: none; }

/* Часть 1 — воздух между заголовком и контентом в группе «Сегодня» */
#main-day-timeline-title { margin-bottom: var(--s3); }

/* ════ Часть 1 — форма кошелька: чёткая иерархия (имя → валюта · баланс → курс) ════ */
.wallet-config-row { display: block; }
.wcfg-head { display: flex; align-items: center; gap: var(--s2); }
.wcfg-head .wallet-enabled { flex: 0 0 auto; width: auto; }
.wcfg-head .wallet-name { flex: 1 1 auto; min-width: 0; font-weight: 600; }
.wcfg-head .wallet-delete { flex: 0 0 auto; }
.wcfg-money { display: flex; gap: var(--s2); margin-top: var(--s2); }
.wcfg-money .wallet-currency { flex: 0 0 30%; max-width: 112px; min-width: 0; }
.wcfg-money .wallet-balance { flex: 1 1 auto; min-width: 0; }
.wcfg-rate { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s2); }
.wcfg-rate-label { flex: 0 0 auto; font-size: var(--fs-caption); color: var(--text3); white-space: nowrap; }
.wcfg-rate .wallet-rate { flex: 1 1 auto; min-width: 0; }

/* ════ Экран «Дни» — обзор поездки: показатели наполненности + состояние дня ════ */
.day-row-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.day-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 3px; min-height: 0; }
.day-ind { display: inline-flex; align-items: center; gap: 4px; color: var(--text2); font-size: var(--fs-caption); font-weight: 600; white-space: nowrap; }
.day-ind .ic { width: 13px; height: 13px; opacity: .75; }
/* состояние — спокойная подпись с точкой, без тревожных цветов */
.day-state { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-caption); font-weight: 700; color: var(--text3); white-space: nowrap; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.day-state-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text3); flex: 0 0 auto; }
.day-state-ready { color: var(--positive); }
.day-state-ready .day-state-dot { background: var(--positive); }
/* деликатное различие состояний по времени */
.day-card.is-past { opacity: .72; }
.day-row.is-today .day-row-num { color: var(--accent); }

/* ════ Офлайн-индикатор (спокойное состояние, только без сети) ════ */
.offline-bar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(82px + env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: center; gap: 8px;
  max-width: calc(100vw - 32px); text-align: center;
  background: var(--surface); border: 1px solid var(--border); color: var(--text2);
  padding: 9px 16px; border-radius: 20px;
  font-size: var(--fs-caption); font-weight: 600; line-height: 1.3;
  box-shadow: var(--shadow); z-index: 9998;
}
.offline-bar[hidden] { display: none; }
.offline-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text3); flex: 0 0 auto; }

/* ════ Карусель дней (лента в шапке экрана дня) ════ */
.day-strip { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; margin: -4px 0 6px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.day-strip::-webkit-scrollbar { display: none; }
.day-chip { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 42px; padding: 5px 8px; border-radius: 9px; border: 1px solid transparent; background: var(--surface2); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .15s; }
.day-chip-n { font-size: 13px; font-weight: 700; color: var(--text2); line-height: 1; letter-spacing: -.3px; }
.day-chip-d { font-size: 9px; color: var(--text3); font-weight: 600; }
.day-chip.active { background: var(--accent); border-color: transparent; }
.day-chip.active .day-chip-n, .day-chip.active .day-chip-d { color: #fff; }
.day-chip.active .day-chip-n { color: #fff; }

/* Метка версии (низ экрана «Ещё») — для проверки, какая сборка реально залита */
.app-version-tag { text-align: center; color: var(--text3); font-size: 11px; letter-spacing: .3px; padding: 20px 0 6px; opacity: .65; }

/* Пустой «Сегодня»: понятный сценарий из шагов */
.te-steps { display: flex; flex-direction: column; gap: 11px; margin: 6px auto 0; text-align: left; width: max-content; max-width: 100%; }
.te-step { display: flex; align-items: center; gap: 11px; font-size: var(--fs-body); color: var(--text2); }
.te-step-n { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: var(--surface2); color: var(--text); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

/* ════ ПОДГОТОВКА ПОЕЗДКИ ДЛЯ ГЕНЕРАЦИИ (структурированный сбор данных) ════ */
.tp-subtitle { font-size: var(--fs-section); line-height: 1.5; color: var(--text2); margin: -12px 0 18px; }
.tp-section-label {
  font-family: var(--font-display); font-size: var(--fs-body); font-weight: 700; color: var(--text);
  letter-spacing: -0.2px; margin: 26px 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.tp-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* v70.1 · min-width нужен КАЖДОЙ ячейке, не только вложенным div.
   Поля type="date" имеют собственную минимальную ширину и на 390px вылезали
   за правый край: вторая дата была обрезана. */
.tp-grid2 > * { min-width: 0; }
.tp-grid2 input[type="date"] { width: 100%; }

/* Чипы интересов / стиля */
.tp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.tp-chip {
  font-size: var(--fs-section); font-weight: 600; color: var(--text2);
  background: var(--surface2); border: 1px solid var(--border); border-radius: 999px;
  padding: 8px 14px; cursor: pointer; transition: all .14s; white-space: nowrap;
}
.tp-chip:active { transform: scale(0.97); }
.tp-chip.active { color: var(--bg); background: var(--accent); border-color: var(--accent); }
.tp-chip-style { flex: 1 1 0; text-align: center; min-width: 90px; }

/* Повторяемые карточки (проживание / перелёт) */
.tp-card {
  position: relative; background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--r); padding: 16px 16px 18px; margin-bottom: 12px;
}
.tp-card .form-label:first-of-type { margin-top: 0; }
/* v70.5 · Кнопка удаления перекрывала первое поле карточки: она
   абсолютная, а поле занимало всю ширину — иконка корзины ложилась поверх
   текста «Отель, апартаменты…». Тап по правому краю поля попадал в удаление.
   Освобождаем место справа у первой строки карточки (см. .tp-stay-card). */
.tp-card-remove {
  position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; z-index: 2;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; color: var(--text3); cursor: pointer; border-radius: 8px;
}
.tp-card-remove:active { background: var(--surface3); color: var(--alert); }
.tp-card-remove .ic { width: 18px; height: 18px; }
.tp-checks { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; }
.tp-check { display: flex; align-items: center; gap: 8px; font-size: var(--fs-body); color: var(--text); cursor: pointer; }
.tp-check input { width: 20px; height: 20px; accent-color: var(--accent); }

.tp-add-btn {
  width: 100%; background: transparent; border: 1px dashed var(--border2); color: var(--text2);
  border-radius: var(--r-sm); padding: 13px; font-size: var(--fs-body); font-weight: 600;
  cursor: pointer; transition: all .14s;
}
.tp-add-btn:active { background: var(--surface2); color: var(--text); }

/* v70.1 · Подвал закреплён физически, а не через sticky.
   Лист — колонка: тело прокручивается, подвал остаётся на месте. Это
   надёжнее sticky в WKWebView и исключает прежний дефект, когда контент
   рисовался под панелью кнопок. */
.tp-sheet {
  display: flex; flex-direction: column;
  overflow: hidden;                 /* скроллит тело, не сам лист */
  padding-bottom: 0;
}
.tp-scroll {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding-bottom: 8px;
}
.tp-sticky-bar {
  flex: 0 0 auto; z-index: 2;
  margin: 0 calc(-1 * var(--s5));
  padding: 12px var(--s5) calc(12px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 6px;
}
/* Второстепенные действия — в одну строку: подвал занимал четверть экрана
   на 844px, а прокручиваемого места и так немного. */
.tp-sticky-row { display: flex; gap: 8px; align-items: center; }
.tp-sticky-row > * { flex: 1 1 0; margin: 0; min-height: 44px; }
.tp-close-btn { margin: 0; }
.tp-generate-btn { width: 100%; margin-top: 0; font-weight: 700; }

/* ── Новая модель подготовки: валюты · кошельки · города · места ── */
.tp-hint { margin-top: 6px; }
.tp-rate-row { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.tp-rate-unit { font-size: var(--fs-body); font-weight: 700; color: var(--text); white-space: nowrap; }
.tp-rate-eq { color: var(--text3); font-weight: 700; }
.tp-rate-input { flex: 1 1 auto; min-width: 0; margin: 0; }
.tp-rate-home { font-size: var(--fs-body); font-weight: 700; color: var(--text); white-space: nowrap; }

/* Город — крупная карточка, внутри вложенные подкарточки */
.tp-city-card { background: var(--surface); border-color: var(--border2); }
.tp-sub-label {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-size: var(--fs-section); font-weight: 700; color: var(--text2);
  text-transform: uppercase; letter-spacing: 0.4px; margin: 20px 0 10px;
}
.tp-sub-label .ic { width: 16px; height: 16px; color: var(--accent); }
.tp-sub-card { background: var(--surface2); border-color: var(--border); padding: 14px 14px 16px; }
.tp-subadd-btn {
  width: 100%; background: transparent; border: 1px dashed var(--border2); color: var(--text2);
  border-radius: var(--r-sm); padding: 10px; font-size: var(--fs-section); font-weight: 600;
  cursor: pointer; transition: all .14s; margin-bottom: 4px;
}
.tp-subadd-btn:active { background: var(--surface2); color: var(--text); }

/* Список «Места к посещению» */
.tp-places-hint { font-size: var(--fs-section); color: var(--text3); margin: 0 0 8px; line-height: 1.4; }
.tp-place-item {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface2); border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 9px 10px 9px 13px; margin-bottom: 6px;
}
.tp-place-txt { flex: 1 1 auto; min-width: 0; font-size: var(--fs-body); color: var(--text); word-break: break-word; }
.tp-place-ctrls { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.tp-place-btn {
  width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; color: var(--text3); cursor: pointer; border-radius: 7px;
  font-size: 15px; font-weight: 700;
}
.tp-place-btn:active { background: var(--surface3); color: var(--text); }
.tp-place-btn.tp-place-del:active { color: var(--alert); }
.tp-place-btn .ic { width: 16px; height: 16px; }
.tp-place-add { display: flex; gap: 8px; margin-top: 4px; margin-bottom: 4px; }
.tp-place-input { flex: 1 1 auto; min-width: 0; margin: 0; }
.tp-place-add-btn {
  flex: 0 0 auto; width: 46px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--bg); border: 0; border-radius: var(--r-sm); cursor: pointer;
}
.tp-place-add-btn .ic { width: 20px; height: 20px; }
.tp-place-add-btn:active { transform: scale(0.97); }

/* Разделитель «или» + поле вставки ответа */
.tp-or { display: flex; align-items: center; gap: 12px; margin: 14px 0; color: var(--text3); font-size: var(--fs-section); }
.tp-or::before, .tp-or::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--border); }
.tp-paste-area { font-family: var(--font-mono, ui-monospace, monospace); font-size: 12px; line-height: 1.5; }

/* ════════ ФИНАЛЬНАЯ ПОЛИРОВКА (v25) ════════ */

/* Блок 3 — микроскорость: лёгкое ощущение нажатия, без bounce/прыжков */
.btn-primary, .btn-ghost, .start-card, .more-row, .tpl-row, .card,
.start-card, .ob-cta, .tp-add-btn, .tp-subadd-btn { transition: transform .12s ease, background-color .14s ease, border-color .14s ease, opacity .14s ease; }
.btn-primary:active, .btn-ghost:active, .ob-cta:active { transform: scale(.985); }
.start-card:active, .more-row:active, .tpl-row:active, .card:active { transform: scale(.99); }
@media (prefers-reduced-motion: reduce) {
  .screen.anim-forward, .screen.anim-back, .screen.anim-fade { animation: none !important; }
  .ob-track { transition: none !important; }
}

/* Блок 2 — сворачивание заполненных блоков в подготовке поездки */
.tp-card-head2 {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  margin: -2px 0 12px; padding-right: 34px; min-height: 24px;
}
.tp-card-head2 .tp-card-ic { flex: 0 0 auto; width: 16px; height: 16px; color: var(--accent); }
.tp-card-head2 .tp-card-name { font-family: var(--font-display); font-size: var(--fs-section); font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: .4px; white-space: nowrap; }
.tp-card-sum { flex: 1 1 auto; min-width: 0; font-size: var(--fs-section); color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: none; }
.tp-card-chev { flex: 0 0 auto; margin-left: auto; color: var(--text3); transition: transform .18s ease; font-size: 13px; line-height: 1; }
.tp-card-body { overflow: hidden; }
.tp-card.is-collapsed .tp-card-body { display: none; }
.tp-card.is-collapsed .tp-card-sum { display: block; }
.tp-card.is-collapsed .tp-card-chev { transform: rotate(-90deg); }
.tp-card.is-collapsed .tp-card-head2 { margin-bottom: 0; }

/* Блок 4/5/6 — спокойные информационные экраны (О приложении / Приватность / Помощь) */
.info-app-name { font-family: var(--font-display); font-size: var(--fs-title); font-weight: 800; letter-spacing: -.4px; color: var(--text); margin: 4px 0 2px; }
.info-version { font-size: var(--fs-section); color: var(--text3); margin-bottom: 16px; }
.info-desc { font-size: 15px; line-height: 1.6; color: var(--text2); margin-bottom: 22px; }
.info-block { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 16px; margin-bottom: 20px; }
.info-dev-name { font-size: 15px; font-weight: 700; color: var(--text); }
.info-dev-role { font-size: 13px; color: var(--text3); margin: 2px 0 12px; }
.info-dev-note { font-size: 14px; line-height: 1.55; color: var(--text2); font-style: italic; }
.info-actions { display: flex; flex-direction: column; gap: 10px; }
.info-list { display: flex; flex-direction: column; gap: 14px; margin: 6px 0 18px; }
.info-li { display: flex; gap: 12px; align-items: flex-start; }
.info-li .info-li-ic { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px; background: var(--surface2); display: flex; align-items: center; justify-content: center; color: var(--accent); }
.info-li .info-li-ic .ic { width: 16px; height: 16px; }
.info-li-tx { flex: 1 1 auto; font-size: 14px; line-height: 1.5; color: var(--text2); padding-top: 4px; }

/* Помощь по генерации — пронумерованные шаги */
.help-steps { counter-reset: hs; display: flex; flex-direction: column; gap: 2px; margin: 4px 0 16px; }
.help-step { display: flex; gap: 14px; align-items: flex-start; padding: 9px 0; }
.help-step-n {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--bg);
  font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.help-step-tx { flex: 1 1 auto; font-size: 15px; line-height: 1.4; color: var(--text); padding-top: 2px; }
.help-note {
  display: flex; gap: 10px; align-items: flex-start; background: var(--surface2);
  border: 1px solid var(--border); border-radius: var(--r-sm); padding: 13px 14px; margin-bottom: 6px;
}
.help-note .ic { flex: 0 0 auto; width: 18px; height: 18px; color: var(--accent); margin-top: 1px; }
.help-note-tx { font-size: 13px; line-height: 1.5; color: var(--text2); }

/* «?» в шапке листа подготовки */
.tp-help-btn {
  position: absolute; top: 14px; right: 16px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface2); border: 1px solid var(--border); color: var(--text2);
  font-size: 15px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center;
  z-index: 3;
}
.tp-help-btn:active { background: var(--surface3); }
.tp-sheet { position: relative; }

/* ════════ ИСПРАВЛЕНИЯ (v26) ════════ */

/* Таб-бар не должен перекрывать кнопки модалок (модалка trip-modal живёт внутри #app-scroll) */
body.modal-open .tabbar { display: none; }

/* Лист, открытый поверх другого листа (помощь «?», политика из «О приложении») */
.modal.modal-top { z-index: 650; }

/* Пустые экраны Дни/Бюджет: иконка → текст → подпись → действия одной группой, без «сползания» */
.trip-empty {
  max-width: 420px; margin: 0 auto; padding-top: 8vh;
  display: flex; flex-direction: column; align-items: stretch; text-align: center;
}
.trip-empty .e-icon { color: var(--text3); margin-bottom: var(--s3); }
.trip-empty .e-icon .ic { width: 30px; height: 30px; }
.trip-empty .trip-empty-text { color: var(--text3); font-size: var(--fs-body); line-height: 1.5; margin: 0 auto 16px; max-width: 320px; text-wrap: balance; }
.trip-empty .ai-onb-lead { margin-bottom: 14px; }
.trip-empty .start-cards { width: 100%; }

/* ══════════════════════════════════════════════════════════════════════════
   v27 · POLISH — ощущение законченного продукта (типографика, воздух,
   единые пустые состояния, тихие микроанимации, «жизнь внутри поездки»).
   Только переопределения. Без новых функций, без сети, офлайн не ломается.
   ══════════════════════════════════════════════════════════════════════════ */

/* 1 ── ТИПОГРАФИЧЕСКАЯ ИЕРАРХИЯ ─────────────────────────────────────────────
   Заголовки чуть крупнее и плотнее, вторичный текст легче, межстрочный
   комфортнее. Высоту экранов не растим (играем весом, трекингом, цветом). */
.now-trip-name{ font-size:15px; font-weight:600; letter-spacing:.2px; color:var(--text2); }
.now-next-title{ font-size:21px; font-weight:800; letter-spacing:-.5px; line-height:1.16; }
.pin-title{ letter-spacing:-.4px; }
.card-title,.t-name{ letter-spacing:-.3px; }
/* вторичный текст — тоньше и спокойнее */
.card-sub,.now-next-sub,.now-budget-of,.dr-foot-i,.t-time{ font-weight:500; }
.t-time{ letter-spacing:.4px; }
/* служебные капс-лейблы — тише: меньше трекинг, ниже контраст, меньше отступ */
.section-label{ font-weight:600; letter-spacing:.5px; color:var(--text3); margin:var(--s5) 0 var(--s3); }
.section-label:first-child{ margin-top:0; }
.fin-main .fl,.fin-cell .fl{ letter-spacing:.4px; font-weight:600; }

/* 2 ── ВОЗДУХ БЕЗ РОСТА ВЫСОТЫ ──────────────────────────────────────────────
   Ужать верхний отступ экрана, дать боковой воздух. */
.screen{ padding:var(--s4) var(--s5) var(--s6); }

/* 3 ── ЕДИНЫЕ ПУСТЫЕ СОСТОЯНИЯ ──────────────────────────────────────────────
   Контент выше, меньше пустоты, CTA близко к описанию, одинаковая структура. */
.empty-state,.trip-empty{
  min-height:auto; padding:4vh 0 var(--s5); max-width:440px; margin:0 auto;
  display:flex; flex-direction:column; align-items:stretch; text-align:center;
}
.empty-state .e-icon,.trip-empty .e-icon{ color:var(--text3); margin-bottom:var(--s3); }
.empty-state .e-icon .ic,.trip-empty .e-icon .ic{ width:28px; height:28px; }
.trip-empty-text{
  font-size:18px; font-weight:700; color:var(--text); letter-spacing:-.3px;
  line-height:1.3; margin:0 auto var(--s2); max-width:300px; text-wrap:balance;
}
.ai-onb-lead{ font-size:14px; color:var(--text2); line-height:1.5; margin:0 auto var(--s4); max-width:300px; }
.start-cards{ margin:0; gap:var(--s2); }
.start-card{ border-radius:var(--r); padding:var(--s4); }
.start-card-s{ line-height:1.4; }

/* 4 ── ПРИМЕРЫ ПОЕЗДОК (демо, только когда поездок нет) ──────────────────── */
.ex-trips{ margin:var(--s4) auto 0; max-width:440px; width:100%; text-align:left; }
.ex-trips-h{ font-size:12px; font-weight:600; letter-spacing:.5px; text-transform:uppercase;
  color:var(--text3); margin:0 0 var(--s2); padding-left:var(--s1); }
.ex-row{ display:flex; align-items:center; gap:var(--s3); width:100%;
  background:var(--surface); border:1px solid var(--border); border-radius:var(--r);
  padding:var(--s3) var(--s4); margin-bottom:var(--s2); cursor:pointer;
  transition:transform .12s ease, border-color .16s ease; }
.ex-row:active{ transform:scale(.99); border-color:var(--border2); }
.ex-flag{ font-size:22px; line-height:1; flex:0 0 auto; }
.ex-tx{ flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:1px; }
.ex-t{ font-size:15px; font-weight:700; color:var(--text); letter-spacing:-.2px; }
.ex-s{ font-size:12.5px; color:var(--text3); font-weight:500; margin-top:1px; }
.ex-go{ flex:0 0 auto; color:var(--text3); font-size:13px; font-weight:700; }
.ex-beijing{align-items:stretch;}
.ex-photo{width:70px;min-height:74px;flex:0 0 70px;border-radius:12px;background:linear-gradient(145deg,rgba(124,156,191,.18),rgba(124,156,191,.04)),url('./demo/gugong_roof.jpg') center/cover no-repeat;}
.ex-beijing .ex-s{line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.ex-meta{font-size:11px;color:var(--accent);font-weight:700;margin-top:4px;}
.ex-beijing .ex-go{align-self:center;max-width:92px;text-align:right;line-height:1.25;color:var(--accent);}

/* 5 ── КАРТОЧКА-РЕЗУЛЬТАТ ПОЕЗДКИ («Дни», вверху) ───────────────────────────
   Усиливает ощущение результата: название, длительность, города, активности,
   примерный бюджет, открыть. Не перегружена. */
.trip-summary{
  background:var(--surface); border:1px solid var(--border); border-radius:var(--r-lg);
  box-shadow:var(--shadow); padding:var(--s5) var(--s5) var(--s4); margin-bottom:var(--s5);
  cursor:pointer; transition:transform .12s ease, border-color .16s ease;
}
.trip-summary:active{ transform:scale(.995); border-color:var(--border2); }
.trip-summary-name{ font-size:23px; font-weight:800; letter-spacing:-.6px; line-height:1.12; color:var(--text); }
.trip-summary-meta{ font-size:13px; color:var(--text2); font-weight:500; margin-top:var(--s2); }
/* Обзорная карточка: равные колонки, которые могут ужиматься (min-width:0),
   и переносятся в 2 ряда на узких экранах — иначе бюджет вылезал за край (v55.1) */
.trip-summary-stats{ display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:var(--s4) var(--s3); margin-top:var(--s4); }
.tss{ display:flex; flex-direction:column; gap:1px; min-width:0; }
.tss-v{ font-size:18px; font-weight:800; letter-spacing:-.4px; color:var(--text); font-variant-numeric:tabular-nums; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tss-l{ font-size:11px; font-weight:600; letter-spacing:.4px; text-transform:uppercase; color:var(--text3); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
@media (max-width:400px){
  .trip-summary-stats{ grid-template-columns:repeat(2, minmax(0,1fr)); }
}
.trip-summary-cities{ display:flex; flex-wrap:wrap; gap:6px; margin-top:var(--s4); }
.tsc{ font-size:12.5px; font-weight:600; color:var(--text2); background:var(--surface2);
  border-radius:999px; padding:5px 11px; }
.trip-summary-open{ display:flex; align-items:center; justify-content:center; gap:6px;
  margin-top:var(--s4); padding-top:var(--s3); border-top:1px solid var(--border);
  font-size:14px; font-weight:700; color:var(--accent); }

/* 6 ── «ЖИВУ ВНУТРИ ПОЕЗДКИ» — мягче формы на Сегодня/Дни ──────────────────── */
.now-next-card{ border-radius:var(--r-lg); padding:var(--s5); }
.t-card{ border-radius:var(--r); }

/* 7 ── ТИХИЕ МИКРОАНИМАЦИИ (180–250ms, без bounce, офлайн-safe) ─────────────── */
@keyframes v27Rise{ from{opacity:0; transform:translateY(6px)} to{opacity:1; transform:translateY(0)} }
.fv-big{ animation:v27Rise .22s ease both; }            /* появление бюджета */
.now-next-card{ animation:v27Rise .2s ease both; }       /* «сейчас» */
.trip-summary{ animation:v27Rise .22s ease both; }       /* появление готовой поездки */
@media (prefers-reduced-motion: reduce){
  .fv-big,.now-next-card,.trip-summary,
  .screen.anim-forward,.screen.anim-back,.screen.anim-fade,.modal-sheet{ animation:none !important; }
}

/* v27 · фикс обрезки длинного названия; v52 — клэмп в 2 строки задан в базовом правиле */
.hub-trip{ flex:1 1 auto; }
.hub-trip-name{ display:-webkit-box; }

/* ══════════════════════════════════════════════════════════════════════════
   v28 · ФИНАЛЬНАЯ ПОЛИРОВКА перед релизом — спокойно, дорого, воздух, читаемо.
   Только размер/вес/интервал/иерархия/контраст. Без редизайна, без структуры.
   Заголовки чуть легче · вторичный текст спокойнее · цифры выразительнее ·
   карточки свободнее · меньше полужирного · меньше шума.
   ══════════════════════════════════════════════════════════════════════════ */

/* 1 ── ЗАГОЛОВКИ ЛЕГЧЕ (меньше «всё одинаково важно», меньше bold) ─────────── */
.now-next-title{ font-weight:700; letter-spacing:-.4px; }
.hub-trip-name{ font-weight:600; letter-spacing:-.3px; }
.hub-title{ font-weight:600; }
.card-title{ font-weight:600; letter-spacing:-.2px; }
.t-name{ font-weight:600; letter-spacing:-.2px; }
.dr-date{ font-weight:600; }
.sheet-title,.modal-title,.av-title{ font-weight:700; letter-spacing:-.3px; }

/* 2 ── ВТОРИЧНЫЙ ТЕКСТ СПОКОЙНЕЕ + капс-лейблы тише ───────────────────────── */
.section-label{ font-weight:500; letter-spacing:.4px; color:var(--text3); }
.fin-main .fl,.fin-cell .fl,.t-time,.now-budget-label,.now-label,.hub-eyebrow{ font-weight:600; }
.card-sub,.now-next-sub,.now-budget-of,.dr-foot-i,.dr-dayn{ font-weight:500; color:var(--text3); }
.dr-act-t{ font-weight:500; }
/* читаемость: чуть больше межстрочного на смысловых поверхностях */
.now-next-sub,.ai-onb-lead,.trip-empty-text,.card-sub{ line-height:1.5; }

/* 3 ── ЦИФРЫ ВЫРАЗИТЕЛЬНЕЕ (фокус — на числах, текст вокруг спокоен) ───────── */
.fv-big,.now-countdown,.now-budget-spent,.tss-v,.bud-val{
  font-variant-numeric:tabular-nums; letter-spacing:-.6px;
}
.fv-big{ font-weight:800; }
.now-budget-spent{ font-weight:800; }
.tss-v{ font-weight:800; }

/* 4 ── МЕНЬШЕ ШУМА: повторяющиеся тогглы статуса калибруем тише (ghost) ─────── */
.check-btn{ font-weight:600; background:transparent; border-color:var(--border);
  color:var(--text3); min-height:30px; }
.check-btn:active{ background:var(--surface2); }
.t-done .check-btn{ background:transparent; border-color:rgba(111,174,143,.35); color:var(--positive); }

/* 5 ── КАРТОЧКИ СВОБОДНЕЕ (воздух, без роста плотности информации) ─────────── */
.t-card{ padding:var(--s4); }
.card{ padding:var(--s5); }
.t-node{ margin-bottom:var(--s4); }
.now-next-card{ padding:var(--s5) var(--s5) calc(var(--s5) + 2px); }
.now-budget-bar{ padding-top:var(--s2); }

/* 6 ── ЕДИНЫЙ ВЕРТИКАЛЬНЫЙ РИТМ ПУСТЫХ СОСТОЯНИЙ (контент выше, CTA ближе) ──── */
.empty-state,.trip-empty{ padding:3vh 0 var(--s5); }
.trip-empty-text{ margin-bottom:6px; }
.ai-onb-lead{ margin-bottom:var(--s3); }
.ex-trips{ margin-top:var(--s3); }

/* 7 ── ЖИВУ ВНУТРИ ПОЕЗДКИ: мягче формы, спокойнее границы ─────────────────── */
.day-card{ border-bottom-color:var(--border); }
.now-see-day,.now-btn-expense{ font-weight:600; }
.trip-summary{ padding:var(--s5); }
.trip-summary-open{ font-weight:600; }

/* v28 · карточка-результат без дублей: спокойный eyebrow вместо повтора названия */
.trip-summary-eyebrow{ font-size:11px; font-weight:600; letter-spacing:1px; text-transform:uppercase;
  color:var(--text3); margin-bottom:var(--s3); }
.trip-summary-stats{ margin-top:0; }

/* ══════════════════════════════════════════════════════════════════════════
   v29 · ФИНАЛ-2 — зрелый продукт: легче шапка, единые радиусы, живые (но не
   плоские) карточки через слои/ритм, мягче границы, отточенные микроощущения.
   Без редизайна, без стекла/блюра/градиентов/сильных теней. Цвет не трогаю.
   ══════════════════════════════════════════════════════════════════════════ */

/* мягче границы + добавляем лёгкую тень-слой (не сильную) */
:root{
  --border:  rgba(255,255,255,0.055);
  --border2: rgba(255,255,255,0.10);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.22);
}
[data-theme="light"]{
  --border:  rgba(0,0,0,0.065);
  --border2: rgba(0,0,0,0.11);
  --shadow:    0 6px 22px rgba(0,0,0,0.06);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
}

/* 1 ── ЛЕГЧЕ ШАПКА (ниже, легче вес; safe-area и тап-зоны не трогаем) ──────── */
header{ padding: calc(12px + env(safe-area-inset-top)) 20px 11px; }
header h1{ font-size:20px; font-weight:600; letter-spacing:-.2px; }

/* 2 ── ЕДИНЫЕ РАДИУСЫ (3 ступени: sm/r/lg; мелкие пилюли не трогаем) ───────── */
.now-btn-primary,.btn-primary,.now-see-day,.now-btn-expense,
.field,input[type="text"],input[type="number"],input[type="date"],textarea,select{ border-radius:var(--r); }
.btn,.hub-switch,.check-btn,.day-chip,.daychip,.tsc{ border-radius:var(--r-sm); }
.now-budget-bar{ border-radius:var(--r); }

/* 3 ── ЖИВЫЕ КАРТОЧКИ через слои поверхностей + ритм (без сильных теней) ───── */
.t-card,.card{ box-shadow:var(--shadow-sm); }
.now-next-card{ box-shadow:var(--shadow); }
/* вложенный слой внутри «Сегодня» — глубина через поверхность, не тень */
.now-budget-bar{ background:var(--surface2); padding:var(--s4); box-shadow:none; border:1px solid var(--border); }
/* чуть больше вертикального ритма на ключевых экранах */
.now-actions{ margin-top:var(--s4); }
.now-see-day{ margin-top:var(--s3); }
.trip-summary{ box-shadow:var(--shadow); }

/* 4 ── МЯГЧЕ РАЗДЕЛИТЕЛИ (тоньше присутствие, читаемость сохраняем) ────────── */
.now-divider,.fin-divider,.divider{ opacity:.8; }

/* 5 ── ОТТОЧЕННЫЕ МИКРООЩУЩЕНИЯ (180–220ms, ease-out, без bounce) ──────────── */
.now-next-card,.t-card,.card,.start-card,.ex-row,.trip-summary,.day-card,
.now-btn-primary,.btn-primary,.check-btn,.hub-switch{
  transition: transform .18s ease-out, background-color .18s ease-out,
              border-color .18s ease-out, box-shadow .2s ease-out;
}
.now-next-card:active,.t-card:active,.card:active,.start-card:active,
.ex-row:active,.trip-summary:active{ transform: translateY(1px) scale(.995); }
@media (prefers-reduced-motion: reduce){
  .now-next-card,.t-card,.card,.start-card,.ex-row,.trip-summary,.day-card{ transition:none; }
}

/* ══════════════════════════════════════════════════════════════════════════
   v30 · ПОСЛЕДНЯЯ КАЛИБРОВКА — спокойнее · дороже · чище · легче · зрелее.
   Глубина через слои поверхностей/ритм/контраст, НЕ через тени. Один язык
   радиусов. Меньше SemiBold. Без стекла/блюра/градиентов/больших теней.
   Цвет, генерацию, импорт, валюты, кошельки, AI, офлайн, маршруты — не трогаю.
   ══════════════════════════════════════════════════════════════════════════ */

/* A ── КАРТЫ БЕЗ ТЕНЕЙ: глубину держат поверхность (светлее фона) + границы ── */
.card,.fin-dash,.av-hero,.now-next-card,.live-widget,.act-view-header,
.bud-hero,.trip-summary,.t-card{ box-shadow:none; }

/* B ── ЕДИНЫЙ ЯЗЫК РАДИУСОВ: карты = --r(16) · шиты = --r-lg(22) · контролы = --r-sm(10) */
.fin-dash,.av-hero,.now-next-card,.live-widget,.act-view-header,
.trip-summary,.card,.t-card,.bud-hero{ border-radius:var(--r); }
/* шиты/модалки остаются крупными — отдельный, читаемый уровень */
.modal-sheet{ border-radius:var(--r-lg) var(--r-lg) 0 0; }

/* C ── ТИПОГРАФИКА: меньше SemiBold/Bold (вторичное легче, числа не трогаю) ── */
/* uppercase-подписи: 700 → 500 */
.fin-main .fl,.fin-cell .fl,.t-time,.live-pulse,.bud-hero-label,.hub-eyebrow,
.now-budget-label,.now-label,.tss-l,.trip-summary-eyebrow,.section-label,
.ex-trips-h,.day-eyebrow,.av-eyebrow{ font-weight:500; }
/* заголовки: 700 → 600 (спокойная иерархия, числа остаются сильными) */
.card-title,.t-name,.live-title,.av-title,.act-view-title,.dr-date,
.sheet-title,.modal-title{ font-weight:600; }
/* вторичные кнопки/тогглы спокойнее */
.check-btn,.btn,.hub-switch{ font-weight:600; }

/* D ── «ДОРОЖЕ» ЧЕРЕЗ РИТМ · ОТСТУПЫ · КОНТРАСТ · ПЛОТНОСТЬ (без эффектов) ──── */
.now-next-card{ padding:var(--s5); }
.card,.fin-dash,.av-hero,.live-widget,.act-view-header{ padding:var(--s5); }
.t-card{ padding:var(--s4); }
.trip-summary{ padding:var(--s5); }
/* контраст заголовок↔мета: заголовок плотнее, мета спокойнее */
.t-name,.card-title,.live-title{ color:var(--text); }
.card-sub,.now-next-sub,.dr-dayn,.dr-foot-i,.t-time{ color:var(--text3); }
/* вложенные слои = глубина вместо тени */
.now-budget-bar{ background:var(--surface2); border:1px solid var(--border); }

/* E ── HEADER: собраннее, легче, тоньше разделитель (safe-area и тап не трогаю) */
header{ padding:calc(11px + env(safe-area-inset-top)) 20px 10px; }
header h1{ font-weight:600; letter-spacing:-.3px; }

/* F ── без стерильности: тёплая поверхность остаётся, в белизну не уходим ───── */
/* (ничего не выбеляем — опираемся на тёплый surface/surface2 и мягкие границы) */

/* ── Пакет поездки: экран экспорта + бейдж файлов ── */
.pkg-trip{ font-size:18px; font-weight:600; letter-spacing:-.3px; color:var(--text); margin-bottom:var(--s3); }
.pkg-row{ display:flex; align-items:center; gap:var(--s3); padding:11px 0; border-bottom:1px solid var(--border); }
.pkg-row:last-of-type{ border-bottom:none; }
.pkg-ic{ color:var(--text3); display:inline-flex; }
.pkg-ic .ic{ width:18px; height:18px; }
.pkg-l{ flex:1; font-size:15px; color:var(--text); }
.pkg-v{ font-variant-numeric:tabular-nums; font-weight:600; color:var(--text2); }
.pkg-size{ display:flex; justify-content:space-between; align-items:center; margin-top:var(--s3);
  padding-top:var(--s3); border-top:1px solid var(--border2); font-size:14px; color:var(--text2); }
.pkg-size b{ font-size:16px; color:var(--text); font-variant-numeric:tabular-nums; }
.ts-files{ font-size:11px; font-weight:500; color:var(--text3); }
.ts-files.on{ color:var(--positive); display:inline-flex; align-items:center; gap:4px; }
.ts-files .ic{ width:12px; height:12px; }

/* ── Контекстная подсказка «следующий шаг» ── */
.coach-card{ position:relative; background:var(--surface); border:1px solid var(--border2); border-radius:var(--r); padding:var(--s5); margin-bottom:var(--s4); }
.coach-eyebrow{ font-size:11px; font-weight:600; letter-spacing:.6px; text-transform:uppercase; color:var(--accent); margin-bottom:4px; }
.coach-text{ font-size:16px; font-weight:600; color:var(--text); letter-spacing:-.2px; margin-bottom:var(--s3); line-height:1.3; }
.coach-btn{ background:var(--accent); color:#fff; border:none; border-radius:var(--r-sm); padding:9px 16px; font-size:14px; font-weight:600; cursor:pointer; }
.coach-btn:active{ transform:scale(.98); }
.coach-x{ position:absolute; top:8px; right:10px; color:var(--text3); font-size:13px; cursor:pointer; padding:6px; line-height:1; }

/* ── AI «как это работает» в модалке подготовки ── */
/* v76 · Конкретный маршрут из трёх действий: что копировать и куда вставлять. */
.tp-how{ display:flex; flex-direction:column; gap:0; background:var(--surface2);
  border:1px solid var(--border); border-radius:var(--r); padding:4px 14px;
  margin:var(--s3) 0 var(--s4); }
.tp-how-step{ display:grid; grid-template-columns:24px minmax(0,1fr); gap:10px;
  align-items:start; padding:12px 0; color:var(--text2); }
.tp-how-step + .tp-how-step{ border-top:1px solid var(--border); }
.tp-how-n{ width:24px; height:24px; border-radius:50%; margin-top:1px;
  background:var(--accent); color:var(--on-accent,#fff); font-size:12px; font-weight:700;
  display:inline-flex; align-items:center; justify-content:center; }
.tp-how-copy{ min-width:0; display:flex; flex-direction:column; gap:3px;
  font-size:12.5px; line-height:1.42; }
.tp-how-copy strong{ color:var(--text); font-size:13.5px; font-weight:650; line-height:1.3; }
.tp-how-fail{ font-size:13px; color:var(--text2); margin-top:10px; line-height:1.45; }

/* ══════════════════════════════════════════════════════════════════════════
   v35 · P3 (мягкое объяснение автодня) + P6 (спокойнее плотные формы)
   ══════════════════════════════════════════════════════════════════════════ */

/* P3 — тихая подпись под «Сейчас · Город · День N» */
.now-context-note{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:4px 0 12px; padding-left:2px; }
.ncn-t{ font-size:12.5px; color:var(--text3); line-height:1.4; }
.ncn-btn{ background:transparent; border:1px solid var(--border2); color:var(--accent); border-radius:var(--r-sm); padding:5px 11px; font-size:12px; font-weight:600; cursor:pointer; transition:transform .15s ease-out; }
.ncn-btn:active{ transform:scale(.97); }

/* P6 — ритм/группировка/воздух в плотных формах (поля не убираем) */
.tp-sheet .tp-section-label{ margin-top:26px; margin-bottom:10px; padding-top:18px; border-top:1px solid var(--border); }
.tp-sheet .tp-section-label:first-of-type{ border-top:none; padding-top:2px; margin-top:14px; }
.tp-sheet .form-label{ margin-top:12px; margin-bottom:6px; font-weight:500; color:var(--text2); }
.tp-sheet .form-input, .tp-sheet .form-textarea, .tp-sheet select.form-input{ margin-bottom:6px; }
.tp-subtitle{ line-height:1.5; }
/* модалка активности — ритм между блоками */
#activity-modal .section-label-inline{ margin-top:18px; margin-bottom:8px; font-weight:500; }
#activity-modal .section-label-inline:first-of-type{ margin-top:4px; }

/* ── P7 · метаданные маршрута (экспорт) ── */
.pkg-meta{ margin-top:var(--s4); padding-top:var(--s4); border-top:1px solid var(--border); }
.pkg-meta-h{ font-size:12px; font-weight:500; letter-spacing:.5px; text-transform:uppercase; color:var(--text3); margin-bottom:var(--s3); }
.pkg-opt{ text-transform:none; letter-spacing:0; color:var(--text3); font-weight:400; }
.pkg-cover-row{ display:flex; align-items:center; gap:12px; margin-bottom:var(--s2); }
.pkg-cover-thumb{ width:64px; height:64px; border-radius:var(--r-sm); overflow:hidden; background:var(--surface2); border:1px solid var(--border); display:flex; align-items:center; justify-content:center; flex:0 0 auto; }
.pkg-cover-thumb img{ width:100%; height:100%; object-fit:contain; background:var(--surface2); }
.pkg-cover-ph{ color:var(--text3); display:inline-flex; }
.pkg-cover-ph .ic{ width:22px; height:22px; }
.pkg-cover-btn{ font-size:14px; }
.pkg-meta-l{ display:block; font-size:12px; font-weight:500; color:var(--text2); margin:10px 0 6px; }
.pkg-desc-hint{ font-size:12px; color:var(--text3); line-height:1.4; margin-top:6px; }

/* ── P7 · предпросмотр импортируемого маршрута ── */
.pkg-imp-sheet{ overflow:hidden; }
.pkg-imp-cover{ width:calc(100% + 2*var(--s5)); margin:calc(-1*var(--s5)) calc(-1*var(--s5)) var(--s4); height:160px; overflow:hidden; background:var(--surface2); }
.pkg-imp-cover img{ width:100%; height:100%; object-fit:contain; background:var(--surface2); display:block; }
.pkg-imp-title{ font-size:20px; font-weight:600; letter-spacing:-.3px; color:var(--text); margin-bottom:6px; }
.pkg-imp-days{ font-size:15px; font-weight:500; color:var(--text3); }
.pkg-imp-author{ font-size:13px; color:var(--text2); margin-bottom:8px; }
.pkg-imp-desc{ font-size:14px; color:var(--text2); line-height:1.5; margin-bottom:12px; }
.pkg-imp-cities{ display:flex; flex-wrap:wrap; gap:6px; margin-bottom:14px; }
.pkg-imp-city{ font-size:12px; background:var(--surface2); color:var(--text2); border:1px solid var(--border); border-radius:var(--r-sm); padding:4px 10px; }
.pkg-imp-stats{ display:flex; gap:20px; padding-top:12px; border-top:1px solid var(--border); }
.pkg-imp-stats > div{ display:flex; flex-direction:column; gap:2px; }
.pkg-imp-stats span{ font-size:11px; text-transform:uppercase; letter-spacing:.4px; color:var(--text3); }
.pkg-imp-stats b{ font-size:16px; font-weight:600; color:var(--text); font-variant-numeric:tabular-nums; }

/* ── v39 · QA-фиксы по скриншотам ── */
/* «Закрыть» больше не прилипает к последней карточке в нижних листах */
#start-sheet .modal-sheet > .btn-ghost:last-child,
#import-sheet-modal .modal-sheet > .btn-ghost:last-child { margin-top: 14px; }
/* Подготовка через ИИ: последнее поле не перекрывается липкой панелью «Собрать промт» */
.tp-bottom-spacer { height: 84px; }
.tp-sticky-bar { box-shadow: 0 -10px 18px -10px rgba(40,34,28,.14); }

/* v40 · день без активностей — явный следующий шаг (не тупик) */
.empty-state .es-text { margin: 8px 0 0; }
.empty-state .es-cta { margin-top: 16px; min-width: 220px; }

/* P7 · «Примеры маршрутов» в разделе «Ещё» — заголовок уже есть в шапке модалки */
#examples-modal .ex-trips-h { display: none; }
#examples-modal .ex-trips { margin-top: 0; }

/* ── BLOCK 5 · структура поездки как МАРШРУТ (город └ день), не админка ───── */
.city-block { background: none; box-shadow: none; border-radius: 0; padding: 0; margin-bottom: 30px; }
.city-block:last-of-type { margin-bottom: 12px; }
.city-head { display: flex; align-items: flex-start; gap: 6px; }
.city-head-main { flex: 1; display: flex; flex-direction: column; gap: 3px; align-items: flex-start;
  background: none; border: none; text-align: left; padding: 2px 0; cursor: pointer; color: var(--text); }
.city-name { font-size: 18px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.city-dates { font-size: 12.5px; color: var(--text2); }

/* дни — ветка маршрута: тонкая направляющая с узлами, без линий-разделителей */
.city-days { position: relative; margin: 12px 0 0; padding: 0 0 0 20px; display: flex; flex-direction: column; }
.city-days::before { content: ''; position: absolute; left: 6px; top: 10px; bottom: 28px;
  width: 2px; background: var(--surface3); border-radius: 2px; }
.tv-day { position: relative; display: flex; align-items: center; gap: 9px; padding: 10px 2px; cursor: pointer; border-radius: var(--r-sm); }
.tv-day:active { background: var(--surface2); }
.tv-day::before { content: ''; position: absolute; left: -17px; top: 50%; transform: translateY(-50%);
  width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--accent); box-sizing: border-box; }
.tv-day-num { font-weight: 600; font-size: 15px; color: var(--text); min-width: 56px; }
.tv-day-date { flex: 1; font-size: 13px; color: var(--text2); }

/* добавить день — лёгкий узел «+», не форма */
.add-day-row { position: relative; align-self: flex-start; margin-top: 2px; background: none; border: none;
  text-align: left; padding: 9px 2px; font-size: 13.5px; font-weight: 600; color: var(--text2); cursor: pointer; }
.add-day-row::before { content: '+'; position: absolute; left: -20px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; line-height: 12px; text-align: center; font-size: 12px; color: var(--text2);
  background: var(--bg); border: 1.5px dashed var(--surface3); border-radius: 50%; box-sizing: border-box; }
.add-day-row:active { color: var(--text); }

/* действия — вторичные, не конкурируют со структурой */
.row-menu-btn { flex: none; width: 28px; min-width: 28px; align-self: flex-start; background: none; border: none;
  font-size: 18px; line-height: 1; color: var(--text2); opacity: 0.4; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 4px 0; }
.row-menu-btn:active { opacity: 0.9; }

/* action-sheet ⋯ */
#row-menu-sheet .rm-title { font-size: 13px; font-weight: 600; color: var(--text2); letter-spacing: .04em;
  text-transform: uppercase; margin: 2px 0 10px; }
.rm-item { display: block; width: 100%; text-align: left; background: var(--surface2); border: none;
  border-radius: var(--r-sm); padding: 15px 16px; font-size: 16px; font-weight: 600; color: var(--text);
  margin-bottom: 8px; cursor: pointer; }
.rm-item:active { background: var(--surface3); }
.rm-item.rm-danger { color: var(--alert); }

/* P1 · секционная подпись «Поездка» над названием (только экран структуры) */
#screen-trip-view .hero-eyebrow { margin: 0 0 6px; color: var(--text2); }

/* Курс поездки — полноценная настройка с очевидной зоной нажатия. */
#trip-exchange-badge.trip-rate-control {
  width: 100%; min-height: 56px; margin-top: 12px; padding: 10px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid var(--border2); border-radius: var(--r-sm);
  background: var(--surface2); color: var(--text); text-align: left; cursor: pointer;
  font-family: var(--font-body);
}
#trip-exchange-badge.trip-rate-control:active { background: var(--surface3); }
.trip-rate-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.trip-rate-label { color: var(--text2); font-size: var(--fs-caption); font-weight: 600; }
.trip-rate-value { display: flex; align-items: center; gap: 6px; color: var(--text); font-size: var(--fs-body); font-weight: 700; }
.trip-rate-value .ic { flex: 0 0 auto; color: var(--accent); }
.trip-rate-arrow { flex: 0 0 auto; color: var(--text3); font-size: 26px; line-height: 1; }

/* ══════════════════════════════════════════════════════════════════════════
   v52 · Правки по аудиту: баннер бэкапа, пустой бюджет, свёрнутые кошельки,
   подписи обзорной карточки
   ══════════════════════════════════════════════════════════════════════════ */

/* P0: баннер напоминания о резервной копии */
.backup-banner {
  background: var(--surface); border: 1px solid var(--border2);
  border-left: 3px solid var(--amber);
  border-radius: var(--r-md); padding: var(--s4); margin-bottom: var(--s4);
}
.backup-banner-t { display:flex; align-items:center; gap:8px; font-weight:700; font-size:var(--fs-body); color:var(--text); }
.backup-banner-t .ic { width:16px; height:16px; color:var(--amber); }
.backup-banner-s { font-size:var(--fs-caption); color:var(--text2); margin-top:4px; line-height:1.45; }
.backup-banner-row { display:flex; gap:8px; margin-top:var(--s3); }
.backup-banner-btn { flex:1 1 auto; margin:0 !important; padding:10px 12px; font-size:var(--fs-caption); }

/* P1: пустое состояние бюджета — приглашение вместо нулей */
.bud-empty {
  background: var(--surface); border: 1px dashed var(--border2);
  border-radius: var(--r-lg); padding: var(--s6) var(--s4); text-align: center;
  margin-bottom: var(--s4);
}
.bud-empty .e-icon { margin-bottom: var(--s2); }
.bud-empty-t { font-family: var(--font-display); font-weight:700; font-size:var(--fs-section); color:var(--text); }
.bud-empty-s { font-size:var(--fs-caption); color:var(--text2); margin:6px auto 0; max-width:300px; line-height:1.5; }
.bud-empty .btn-primary { max-width:260px; margin:var(--s4) auto 0; }

/* P1: кошельки в форме поездки — свёрнуты по умолчанию */
.wallet-section details > summary {
  list-style:none; cursor:pointer; -webkit-tap-highlight-color:transparent;
  display:flex; align-items:center; justify-content:space-between;
}
.wallet-section details > summary::-webkit-details-marker { display:none; }
.wallet-section details > summary .ws-arrow { color:var(--text3); transition:transform .18s; font-size:15px; }
.wallet-section details[open] > summary .ws-arrow { transform: rotate(90deg); }
.wallet-section .ws-optional { font-size:11px; font-weight:600; color:var(--text3); margin-left:6px; text-transform:none; letter-spacing:0; }

/* P1: подписи под числами обзорной карточки */
.trip-summary-stats .tss { flex-direction:column; }
.trip-summary-stats .tss-l { display:inline-flex; align-items:center; gap:4px; font-size:10px; font-weight:700; letter-spacing:.4px; text-transform:uppercase; color:var(--text3); }
.trip-summary-stats .tss-l .ic { width:11px; height:11px; }

/* v52.1 · PDF-документы: чипы в превью, галерее и хабе документов */
.pdf-chip {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:4px; width:100%; height:100%; min-height:64px;
  background:var(--surface2); border:1px solid var(--border2); border-radius:10px;
  padding:8px 6px; cursor:pointer; overflow:hidden;
}
.pdf-chip-badge {
  font-size:10px; font-weight:800; letter-spacing:.6px; color:#fff;
  background:var(--red); border-radius:5px; padding:2px 7px;
}
.pdf-chip-name {
  font-size:10px; font-weight:600; color:var(--text2); max-width:100%;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.preview-thumb-pdf { background:transparent; }
.gallery-thumb-pdf { display:flex; }
.gallery-thumb-pdf .pdf-chip { min-height:0; }
.docs-cell-pdf { display:flex; align-items:stretch; cursor:pointer; position:relative; }

/* ══════════════════════════════════════════════════════════════════════════
   v53 · Chronicle Share этап 1 — экран публикации маршрута
   ══════════════════════════════════════════════════════════════════════════ */
.rs-sheet { max-height: 92vh; overflow-y: auto; }
.rs-modes { display:flex; flex-direction:column; gap:8px; margin-bottom:var(--s4); }
.rs-mode { border:1px solid var(--border2); border-radius:var(--r-md); padding:12px 14px; background:var(--surface2); }
.rs-mode.active { border-color:var(--blue); background:var(--surface); box-shadow:0 0 0 1px var(--blue) inset; }
.rs-mode.disabled { opacity:.55; }
.rs-mode-t { font-weight:700; font-size:var(--fs-body); color:var(--text); display:flex; align-items:center; gap:8px; }
.rs-mode-s { font-size:var(--fs-caption); color:var(--text2); margin-top:2px; }
.rs-soon { font-size:10px; font-weight:800; letter-spacing:.5px; text-transform:uppercase; color:var(--text3); background:var(--surface2); border:1px solid var(--border2); border-radius:6px; padding:2px 7px; }

.rs-switch { display:flex; align-items:center; gap:10px; padding:10px 2px; font-size:var(--fs-body); color:var(--text); cursor:pointer; }
.rs-warn { font-size:11px; color:var(--amber); margin:-4px 0 4px 30px; line-height:1.4; }

.rs-preview-label { font-size:11px; font-weight:800; letter-spacing:.6px; text-transform:uppercase; color:var(--text3); margin:var(--s4) 0 2px; }
.rs-edit-hint { font-size:11px; color:var(--text3); margin-bottom:8px; line-height:1.4; }
.rs-preview { border:1px dashed var(--border2); border-radius:var(--r-md); background:var(--bg); padding:var(--s4); margin-bottom:var(--s4); max-height:340px; overflow-y:auto; }
.rs-empty { text-align:center; color:var(--text3); font-size:var(--fs-caption); padding:var(--s4); }

.rs-hero { border-bottom:1px solid var(--border2); padding-bottom:var(--s3); margin-bottom:var(--s3); }
.rs-hero-title { font-family:var(--font-display); font-weight:700; font-size:var(--fs-section); color:var(--text); line-height:1.2; }
.rs-hero-author { font-size:var(--fs-caption); color:var(--blue); margin-top:2px; font-weight:600; }
.rs-hero-stats { font-size:var(--fs-caption); color:var(--text2); margin-top:4px; }
.rs-hero-desc { font-size:var(--fs-caption); color:var(--text2); margin-top:6px; line-height:1.5; }

.rs-city-name { display:flex; align-items:center; gap:6px; font-weight:700; color:var(--text); margin:var(--s3) 0 4px; }
.rs-city-name .ic { width:14px; height:14px; color:var(--blue); }
.rs-day-n { font-size:11px; font-weight:800; letter-spacing:.5px; text-transform:uppercase; color:var(--text3); margin:8px 0 4px; }
.rs-act { display:flex; gap:8px; padding:5px 0; }
.rs-act-time { font-size:11px; font-weight:700; color:var(--text3); min-width:38px; padding-top:2px; }
.rs-act-title { font-size:var(--fs-caption); font-weight:600; color:var(--text); }
.rs-act-bud { color:var(--blue); font-weight:700; }
.rs-act-addr { font-size:11px; color:var(--text3); margin-top:1px; }
.rs-act-note { font-size:11px; color:var(--text2); margin-top:3px; line-height:1.45; background:var(--surface2); border-radius:8px; padding:6px 8px; }
.rs-act-tips { border-left:2px solid var(--blue); }
.rs-editable { cursor:pointer; }
.rs-editable:active { opacity:.7; }
.rs-act-empty { font-size:11px; color:var(--text3); font-style:italic; }

.rs-link-soon { font-size:11px; color:var(--text3); text-align:center; margin:6px 0 2px; }

/* v54 · этап 2 — экран «Ссылка готова» */
.rs-link-box {
  font-family: ui-monospace, monospace; font-size:11px; color:var(--text2);
  background:var(--surface2); border:1px solid var(--border2); border-radius:var(--r-md);
  padding:10px 12px; max-height:110px; overflow:hidden; word-break:break-all;
  position:relative; margin-bottom:10px;
}
.rs-link-box::after { content:''; position:absolute; left:0; right:0; bottom:0; height:34px;
  background:linear-gradient(transparent, var(--surface2)); }
.rs-link-note { font-size:11px; color:var(--text2); line-height:1.45; margin-bottom:6px; }
.rs-link-warn { color:var(--amber); }

/* v55 · этап 3 — экран импорта маршрута + md-подмножество (Ф-4) */
.ri-head { border-bottom:1px solid var(--border2); padding-bottom:var(--s3); margin-bottom:var(--s3); }
.ri-season { display:inline-block; font-size:11px; font-weight:700; color:var(--amber);
  background:color-mix(in srgb, var(--amber) 12%, transparent); border-radius:8px; padding:3px 9px; margin-top:6px; }

.md-h { font-weight:800; font-size:1.05em; margin:8px 0 3px; color:var(--text); }
.md-list { margin:4px 0 6px 18px; }
.md-list li { margin:2px 0; }
.md-hr { border:none; border-top:1px solid var(--border2); margin:8px 0; }
.av-acc-text a { color:var(--blue); }

/* v56 · этап 4 — путеводитель: обложка, фото-пикер, Мои публикации */
.rs-section-div{ height:1px; background:var(--border2); margin:var(--s4) 0; }
.rs-cover-box{ margin-bottom:8px; }
.rs-cover-empty{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px;
  height:120px; border:1px dashed var(--border2); border-radius:var(--r-md); background:var(--surface2);
  color:var(--text3); font-size:13px; cursor:pointer; }
.rs-cover-empty .ic{ width:24px; height:24px; }
.rs-cover-box{ position:relative; }
/* P1: обложка целиком, без кропа — размытая копия фоном */
.rs-cover-wrap{ position:relative; height:180px; border-radius:var(--r-md); overflow:hidden; background:var(--surface2); }
.rs-cover-blur{ position:absolute; inset:-8%; background-size:cover; background-position:center; filter:blur(18px); transform:scale(1.1); opacity:.8; }
.rs-cover-img{ position:relative; z-index:1; width:100%; height:180px; object-fit:contain; display:block; }
.rs-cover-del{ position:absolute; top:8px; right:8px; width:28px; height:28px; border:none; border-radius:50%;
  background:rgba(0,0,0,.55); color:#fff; font-size:15px; cursor:pointer; }
.rs-photo-count{ font-size:12px; font-weight:700; color:var(--text3); }
.rs-photo-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:6px; margin-bottom:14px; max-height:340px; overflow-y:auto; }
.rs-pcell{ position:relative; aspect-ratio:1; border-radius:10px; overflow:hidden; cursor:pointer; border:2px solid transparent; }
.rs-pcell.on{ border-color:var(--blue); }
.rs-pcell img{ width:100%; height:100%; object-fit:cover; }
.rs-pcheck{ position:absolute; top:4px; right:4px; width:20px; height:20px; border-radius:50%; background:var(--blue);
  color:#fff; font-size:12px; display:flex; align-items:center; justify-content:center; opacity:0; }
.rs-pcell.on .rs-pcheck{ opacity:1; }
.rs-pday{ position:absolute; bottom:0; left:0; right:0; font-size:9px; font-weight:700; color:#fff;
  background:linear-gradient(transparent, rgba(0,0,0,.6)); padding:6px 4px 3px; text-align:center; }

.rs-rights span{font-size:13px;line-height:1.45;}
.rs-rights-attn{animation:rightsAttn .5s ease 2;}
@keyframes rightsAttn{50%{transform:translateX(4px)}}
.mypub-st{display:inline-flex;align-items:center;padding:2px 9px;border-radius:99px;font-size:11px;font-weight:800;letter-spacing:.05em;margin-right:8px;}
.mypub-st.st-pending{background:#B98A2F22;color:#B98A2F;}
.mypub-st.st-approved{background:#4E9B6E22;color:#4E9B6E;}
.mypub-st.st-rejected{background:#B0503C22;color:#B0503C;}
.mypub-item{ border:1px solid var(--border2); border-radius:var(--r-md); padding:12px 14px; margin-bottom:10px; background:var(--surface2); }
.mypub-title{ font-weight:700; color:var(--text); }
.mypub-url{ font-family:ui-monospace,monospace; font-size:11px; color:var(--text3); word-break:break-all; margin:4px 0; }
.mypub-meta{ font-size:12px; color:var(--text2); display:flex; align-items:center; gap:4px; }
.mypub-meta .ic{ width:13px; height:13px; }
.mypub-actions{ display:flex; gap:6px; margin-top:8px; }
.mypub-actions .btn-ghost{ flex:1; padding:8px; font-size:12px; margin:0; }
.mypub-del{ color:var(--red)!important; }

/* v56 · Ф-1 — выбор импорта фото */
.ri-radio{ display:flex; align-items:center; gap:10px; padding:9px 2px; font-size:var(--fs-body); color:var(--text); cursor:pointer; }

/* ══════════════════════════════════════════════════════════════════════════
   v58 · полировка Chronicle Share (P1-P7)
   ══════════════════════════════════════════════════════════════════════════ */
/* P6: двухстрочные пункты «Ещё» с пояснениями */
.more-row-2l .more-row-txt{ display:flex; flex-direction:column; gap:1px; min-width:0; flex:1; text-align:left; }
.more-row-2l .more-row-txt small{ font-size:11px; font-weight:500; color:var(--text3); line-height:1.35; white-space:normal; }
.more-row-2l{ align-items:center; }

/* P3: подпись под тумблером фото */
.rs-photos-hint{ font-size:11px; font-weight:700; color:var(--blue); margin:-4px 0 2px 30px; }

/* P2: мягкая подсказка про необязательную обложку */
.rs-cover-opt{ font-size:11px; color:var(--text3); margin:-2px 0 8px; line-height:1.4; }

/* ═══ v63 · Резервная копия ключей публикаций ═══════════════════════════════
   Владение публикацией живёт в secret'е одного устройства. Блок объясняет
   риск прямо в интерфейсе, а не в справке. */
.mypub-keys{ margin-top:16px; padding:14px; border:1px dashed var(--border2);
  border-radius:var(--r-md); background:var(--surface2); }
.mypub-keys-t{ font-weight:700; font-size:14px; color:var(--text); margin-bottom:4px; }
.mypub-keys-s{ font-size:12.5px; line-height:1.5; color:var(--text2); margin-bottom:10px; }
.mypub-keys-row{ display:flex; gap:8px; }
.mypub-keys-row .btn-ghost{ flex:1; margin:0; min-height:44px; }
.mypub-rec{ font-size:11px; font-weight:700; letter-spacing:.04em; text-transform:uppercase;
  color:var(--accent); }

/* ═══ v63 · Минимальный размер интерактивной цели ═══════════════════════════
   Замер v62: «Готово» 84×33, «Удалить» 73×24 — ниже порога 44×44. Растим
   область касания псевдоэлементом, чтобы не менять визуальные размеры
   и не ломать вёрстку соседей. */
.mypub-actions .btn-ghost,
.act-done-chip,
.timeline-item .done-btn,
.demo-badge button,
.chip-btn {
  position: relative;
}
.mypub-actions .btn-ghost::after,
.act-done-chip::after,
.timeline-item .done-btn::after,
.demo-badge button::after,
.chip-btn::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  transform: translateY(-50%);
  min-height: 44px;
  height: 100%;
}

/* ═══ v65 · Действия над чужим контентом (App Store Guideline 1.2) ══════════
   Тихие, но всегда доступные: жалоба не должна быть спрятана, но и не должна
   конкурировать с основным действием. */
.ugc-actions{ display:flex; flex-direction:column; gap:2px; margin-top:14px;
  padding-top:12px; border-top:1px solid var(--border2); }
.ugc-link{ background:none; border:none; padding:12px 0; min-height:44px;
  font-size:13px; color:var(--text2); text-align:center; cursor:pointer; }
.ugc-link:active{ color:var(--text); }
.rep-sub{ font-size:13px; line-height:1.55; color:var(--text2); margin-bottom:12px; }
.rep-target{ font-size:13px; font-weight:700; color:var(--text);
  background:var(--surface2); border-radius:var(--r-sm); padding:10px 12px; margin-bottom:12px; }
.rep-target:empty{ display:none; }
.ugc-contact{ margin-top:16px; padding:14px; border:1px dashed var(--border2);
  border-radius:var(--r-md); background:var(--surface2); text-align:left; }
.ugc-contact-t{ font-weight:700; font-size:14px; color:var(--text); margin-bottom:4px; }
.ugc-contact-s{ font-size:12.5px; line-height:1.55; color:var(--text2); margin-bottom:10px; }
.ugc-contact .btn-ghost{ margin:0; min-height:44px; width:100%; }
.hid-row{ display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:10px; padding:8px 0;
  border-bottom:1px solid var(--border2); }
.hid-name{ min-width:0; font-size:14px; font-weight:600; line-height:1.35; color:var(--text); overflow-wrap:anywhere; }
.hid-btn{ width:auto; max-width:46vw; margin:0; min-height:44px; padding:8px 12px; font-size:12px; white-space:normal; }

/* ═══ v65 · НАТИВНОЕ ПОВЕДЕНИЕ (App Store Guideline 4.2) ════════════════════
   Задача — чтобы приложение не читалось как сайт в рамке. Больше всего веб
   выдают три вещи: выделение текста по долгому тапу, «резинка» при
   перетягивании и зум двойным тапом. Убираем их, но НЕ трогаем поля ввода —
   там выделение обязано работать. */
html, body {
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;          /* долгий тап не зовёт меню ссылки */
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;            /* нет «резинки» за краем документа */
  touch-action: manipulation;           /* нет зума двойным тапом */
}
input, textarea, select, [contenteditable="true"],
.info-desc, .rep-target, .lead, .impression {
  -webkit-user-select: text; user-select: text;
  -webkit-touch-callout: default;
}
/* Внутренние области скроллятся инерционно, но не тянут за собой страницу */
.screen, .modal-sheet, .info-list { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }

/* ═══ v65 · iPad и широкие экраны ═══════════════════════════════════════════
   Было: контент растягивался на все 1024px — увеличенный телефон, ровно то,
   за что снимают по 4.2 («iPad-версия — это просто масштабированный iPhone»).
   Колонка ограничивается и центрируется, таб-бар тоже: приложение начинает
   выглядеть спроектированным под планшет, а не растянутым. */
@media (min-width: 820px) {
  .screen { max-width: 720px; margin-left: auto; margin-right: auto; }
  .app-header, .tabbar > * { max-width: 720px; }
  .app-header { margin-left: auto; margin-right: auto; }
  .tabbar { justify-content: center; }
  .tab-item { flex: 0 0 180px; }
  .modal-sheet { max-width: 640px; border-radius: var(--r-lg); margin-bottom: 5vh; }
  /* лист-модалка на планшете центрируется, а не липнет к низу */
  .modal { align-items: center; }
}
@media (min-width: 1100px) {
  .screen { max-width: 780px; }
  .app-header, .tabbar > * { max-width: 780px; }
}

/* v67 · ссылка на правила публикации рядом с подтверждениями */
.rs-inline-link{ display:block; width:100%; background:none; border:none; margin:2px 0 8px;
  padding:12px 0; min-height:44px; font-size:13px; color:var(--accent); text-align:left;
  text-decoration:underline; cursor:pointer; }

/* v69 · Полоса демо: главное действие — начать свою поездку */
.demo-banner .demo-cta{ background:var(--accent); color:var(--on-accent,#fff);
  border:none; border-radius:999px; padding:8px 14px; min-height:44px;
  font-size:13px; font-weight:700; cursor:pointer; }
.demo-banner .demo-del{ background:none; border:none; color:rgba(255,255,255,.75);
  padding:8px 10px; min-height:44px; font-size:12px; cursor:pointer; }

/* v70 · Ручное создание в ИИ-планировщике: доступно, но не конкурирует
   с основной кнопкой. Текстовая ссылка, а не вторая крупная кнопка. */
.tp-manual-link{ display:block; width:100%; background:none; border:none;
  margin:4px 0 2px; padding:12px 0; min-height:44px;
  font-size:13px; color:var(--text2); text-decoration:underline; cursor:pointer; }
.tp-manual-link:active{ color:var(--text); }

/* v70 · Блок необязательных уточнений в ИИ-планировщике.
   Свёрнут по умолчанию: обязательными остались только страна, города, даты
   и число путешественников — всё остальное улучшает маршрут, но не должно
   стоять между человеком и первым результатом. */
/* v70.5 · Блок уточнений: единый внутренний контейнер вместо margin у каждого.
   БЫЛО: .tp-optional > *:not(summary) { margin-left:16px; margin-right:16px }
   при том что input/select/textarea/кнопки имеют width:100%. Ширина 100%
   считается от родителя и НЕ включает горизонтальные margin, поэтому поля
   становились на 32px шире доступной области и уезжали вправо, а отступы
   выглядели неодинаковыми. Теперь отступ один — padding контейнера. */
.tp-optional{ position:relative; margin:14px 0 8px;
  border:1px solid var(--border2); border-radius:var(--r-md);
  background:var(--surface2); overflow:hidden; }
.tp-optional-head{ display:flex; flex-direction:column; gap:2px;
  padding:14px 44px 14px 16px;   /* справа место под стрелку, чтобы не наезжала */
  min-height:44px; cursor:pointer; list-style:none; }
.tp-optional-head::-webkit-details-marker{ display:none; }
.tp-optional-head::after{ content:'▾'; position:absolute; right:16px; top:18px;
  color:var(--text3); pointer-events:none; }
.tp-optional[open] .tp-optional-head::after{ content:'▴'; }
.tp-optional-head > span:first-child{ font-weight:700; font-size:14px; color:var(--text);
  overflow-wrap:anywhere; }   /* длинные переводы не ломают summary */
.tp-optional-sub{ font-size:12.5px; color:var(--text2); overflow-wrap:anywhere; }

.tp-optional-body{ padding:0 16px 14px; width:100%; min-width:0; }
.tp-optional-body > *{ max-width:100%; }
.tp-optional-body input, .tp-optional-body select,
.tp-optional-body textarea, .tp-optional-body .tp-add-btn{ width:100%; }
/* Очень узкие экраны: пары «дата + время» в одну колонку. Основные даты
   поездки живут вне этого блока и остаются в две колонки. */
@media (max-width: 350px){
  .tp-optional-body .tp-grid2{ grid-template-columns:1fr; }
}

/* v70.2 · Подписи подразделов и карточки проживания в блоке уточнений */
.tp-sub-label{ font-size:12px; font-weight:700; letter-spacing:.06em;
  text-transform:uppercase; color:var(--text3); margin:16px 0 8px; }
.tp-stay-card{ position:relative; }
.tp-stay-card .tp-card-body > *{ margin-bottom:8px; }
.tp-stay-card .tp-card-body > *:last-child{ margin-bottom:0; }
.tp-check{ display:flex; align-items:center; gap:10px; min-height:44px;
  font-size:14px; color:var(--text); cursor:pointer; }
.tp-check input{ width:20px; height:20px; }

/* v70.3 · Переключатель режима бюджета и подсветка поля с ошибкой */
.tp-seg{ display:flex; gap:6px; margin:6px 0 4px; }
.tp-seg-btn{ flex:1 1 0; min-height:44px; padding:10px 8px; border-radius:var(--r-md);
  border:1px solid var(--border2); background:var(--surface2); color:var(--text2);
  font-size:13px; font-weight:600; cursor:pointer; }
.tp-seg-btn.active{ background:var(--accent); color:var(--on-accent,#fff); border-color:var(--accent); }
.tp-field-error{ outline:2px solid var(--danger,#b3453a); outline-offset:2px; }

/* v70.5 · Сумма и валюта в одной строке: валюта всегда на виду */
.tp-money-row{ display:flex; gap:8px; align-items:stretch; }
.tp-money-row #tp-budget{ flex:1 1 auto; min-width:0; }
.tp-cur-select{ flex:0 0 auto; width:auto; min-width:92px; padding-right:8px; }


/* v70.5 · Первая строка карточки проживания не заезжает под кнопку удаления.
   padding-right недостаточно: поле остаётся физически под кнопкой (z-index 2),
   и тап по его правому краю попадает в удаление вместо фокуса. Сокращаем
   саму ширину поля. */
.tp-stay-card .tp-card-body > *:first-child{ width: calc(100% - 48px); }

/* v76 · Полоска нижнего окна: видимая линия 40×4, но зона захвата высотой 44 —
   в четыре пикселя палец не попадает. Линию рисуем через ::before. */
.modal-handle{
  position: relative; width: 100%; height: 44px; margin: -8px 0 0;
  background: none; cursor: grab; touch-action: none;
  display: flex; align-items: center; justify-content: center;
}
.modal-handle:active{ cursor: grabbing; }
.modal-handle::before{
  content: ''; display: block; width: 40px; height: 4px; border-radius: 2px;
  background: var(--border2, rgba(0,0,0,.18));
}

/* ═══ v71 · Карта путешествий ══════════════════════════════════════════════ */
.wm-card{ background:var(--surface); border:1px solid var(--border);
  border-radius:var(--r-lg); overflow:hidden; margin-bottom:var(--s5); }

/* Карта занимает всю доступную ширину и заметную высоту: в прошлой версии
   она была полоской в 141px и читалась как иллюстрация, а не как содержимое.
   touch-action:none — иначе браузер перехватывает жест и панорамирование
   превращается в прокрутку страницы. */
.wm-wrap{ position:relative; background:var(--surface2); touch-action:none;
  min-height:260px; display:flex; align-items:center; }
/* v72.1 · Карта заполняет блок целиком.
   При автоприближении на одну страну SVG сохранял пропорции 1000×394 и
   оставлял серые поля почти в треть высоты — выглядело как незагруженная
   картинка. preserveAspectRatio="slice" обрезает лишнее по краям вместо
   того, чтобы вписывать с полями. */
.wm-wrap svg{ position:absolute; inset:0; width:100%; height:100%; display:block; }

.wm-neutral{ fill:var(--wm-unvisited,#D8D3C7); stroke:var(--surface2); stroke-width:.4; }

.wm-zoom{ position:absolute; right:10px; bottom:10px; display:flex;
  flex-direction:row; gap:6px; z-index:2; }
.wm-zoom button{ width:44px; height:44px; border-radius:12px;
  border:1px solid var(--border); background:var(--surface);
  color:var(--text); font-size:18px; font-weight:700; cursor:pointer; }
.wm-zoom button:active{ background:var(--surface3); }

.wm-stats{ display:flex; gap:1px; background:var(--border); }
.wm-st{ flex:1; background:var(--surface); padding:12px 8px; text-align:center; }
.wm-st b{ display:block; font-size:24px; font-weight:800; color:var(--text); }
.wm-st span{ font-size:11px; letter-spacing:.06em; text-transform:uppercase;
  color:var(--text3); }

.wm-pick{ width:calc(100% - 24px); margin:12px; min-height:44px; }
.wm-chips{ display:flex; flex-wrap:wrap; gap:6px; padding:0 12px 12px; }
.wm-chip{ font-size:12px; padding:5px 10px; border-radius:999px;
  background:var(--surface2); color:var(--text2); }
.wm-story-btn{ width:calc(100% - 24px); margin:0 12px 12px; display:flex;
  align-items:center; justify-content:center; gap:8px; }

.map-story-sheet{ max-height:calc(100dvh - 24px); overflow-y:auto; }
.story-preview-wrap{ width:min(64vw,260px); aspect-ratio:9/16; margin:14px auto;
  border-radius:18px; overflow:hidden; box-shadow:0 14px 36px rgba(0,0,0,.24);
  background:#f7f3ea; }
.story-preview-wrap canvas{ width:100%; height:100%; display:block; }

/* Пять вкладок вместо четырёх: подписи длиннее, места меньше */
.tabbar .tab-label{ font-size:10.5px; }
@media (max-width:360px){ .tabbar .tab-label{ font-size:9.5px; } }

/* v71 · Пустая карта объясняет, что с ней делать */
.wm-empty{ margin:12px 12px 0; padding:12px 14px;
  background:var(--surface2); border:1px solid var(--border2);
  border-radius:var(--r-md); }
.wm-empty-t{ font-weight:700; font-size:14px; color:var(--text); }
.wm-empty-s{ font-size:12.5px; color:var(--text2); margin-top:2px; }

/* Existing trip stops that can be placed manually. */
.wm-suggest{ display:flex; flex-wrap:wrap; gap:8px; padding:12px 12px 0; }
.wm-suggest:empty{ display:none; }
.wm-sug{ min-height:44px; padding:8px 14px; border-radius:999px;
  border:1px dashed var(--accent); background:none; color:var(--accent);
  font-size:13px; font-weight:600; cursor:pointer; }
.wm-sug:active{ background:var(--surface2); }

.wm-chip{ border:0; font-family:inherit; cursor:pointer; }
.wm-chip:active{ background:var(--surface3); }

/* ═══ v72.1 · Раздел «Поездки»: карта крупнее, итоги, страны под шторкой ═══ */
/* Карта была 260px — на 844 это треть от того, что она заслуживает.
   Привязываем к высоте экрана, но с потолком, чтобы на iPad не разъезжалась. */
.wm-wrap{ min-height:min(46vh, 420px); }

.wm-chips-wrap{ border-top:1px solid var(--border2); }
.wm-chips-head{ display:flex; align-items:center; gap:8px; padding:12px 16px;
  min-height:44px; cursor:pointer; list-style:none;
  font-size:13.5px; font-weight:600; color:var(--text2); }
.wm-chips-head::-webkit-details-marker{ display:none; }
.wm-chips-head::after{ content:'▾'; margin-left:auto; color:var(--text3); }
.wm-chips-wrap[open] .wm-chips-head::after{ content:'▴'; }
.wm-chips-n{ font-weight:800; color:var(--text); }

.wm-totals{ display:grid; grid-template-columns:repeat(3,1fr); gap:8px;
  margin-bottom:var(--s5); }
@media (max-width:340px){ .wm-totals{ grid-template-columns:repeat(2,1fr); } }
.wm-total{ background:var(--surface); border:1px solid var(--border);
  border-radius:var(--r-md); padding:12px 8px; text-align:center; }
.wm-total b{ display:block; font-size:20px; font-weight:800; color:var(--text); }
.wm-total span{ font-size:11px; color:var(--text3); }

/* ═══ v74 · Нативная оболочка, нейтральная карта и единый журнал поездок ═══ */
html,body,#app-scroll{ background:var(--bg); }

/* В нативном приложении глобальное имя бренда повторяло название под иконкой
   и съедало вертикальное место на каждой вкладке. В PWA/браузере шапка
   остаётся — там она всё ещё выполняет роль заголовка сайта. */
html.is-native header{ display:none; }
html.is-native,html.is-native body{ width:100%; height:100%; min-height:100%; overflow:hidden; }
html.is-native body{ height:100dvh; min-height:100dvh; }
html.is-native #app-scroll{ padding-top:calc(env(safe-area-inset-top) + 10px); }

/* Safe area — часть самой панели, а не белый «хвост» под ней. */
.tabbar{
  background:var(--bg);
  padding:6px 8px max(6px,calc(env(safe-area-inset-bottom) - 10px));
  box-shadow:0 -6px 22px rgba(0,0,0,.07);
}
.tab-item{ min-height:44px; justify-content:center; border-radius:0; }
.tab-item.active{ background:transparent; }

.journey-head{ padding:2px 2px 16px; }
.journey-title-row{ display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.journey-kicker{ font-size:11px; font-weight:800; letter-spacing:.14em;
  text-transform:uppercase; color:var(--accent); margin-bottom:7px; }
.journey-title{ font-family:var(--font-display); font-size:28px; line-height:1.08;
  font-weight:760; letter-spacing:-.7px; color:var(--text); }
.journey-lead{ margin-top:8px; font-size:14px; line-height:1.45; color:var(--text2); }
.journey-section-title{ margin:0 0 12px; font-family:var(--font-display);
  font-size:17px; font-weight:720; letter-spacing:-.2px; color:var(--text); }

.journey-actions{ position:relative; flex:0 0 auto; }
.journey-actions>summary{ list-style:none; width:40px; height:40px; border-radius:12px;
  display:flex; align-items:center; justify-content:center; cursor:pointer;
  color:var(--text2); font-size:18px; letter-spacing:2px; background:var(--surface2);
  border:1px solid var(--border); -webkit-tap-highlight-color:transparent; }
.journey-actions>summary::-webkit-details-marker{ display:none; }
.journey-actions-menu{ position:absolute; z-index:40; top:46px; right:0; width:220px;
  padding:6px; border-radius:14px; background:var(--surface); border:1px solid var(--border2);
  box-shadow:var(--shadow); }
.journey-actions-menu button{ width:100%; min-height:44px; display:flex; align-items:center; gap:10px;
  padding:10px 12px; border:0; border-radius:10px; background:transparent; color:var(--text);
  font:600 14px var(--font-body); text-align:left; }
.journey-actions-menu button:active{ background:var(--surface2); }

.journey-atlas{ border-radius:var(--r); box-shadow:none; }
.wm-wrap{ background:linear-gradient(155deg,var(--surface2),var(--surface3)); }
#screen-world .wm-wrap{ min-height:clamp(270px,36vh,330px); }
.wm-land{ fill:var(--wm-unvisited,#d8d3c7); stroke:none; pointer-events:none; }
.wm-marker{ cursor:pointer; outline:none; }
.wm-marker-hit{ fill:transparent; stroke:none; pointer-events:all; }
.wm-marker-halo{ fill:var(--surface); stroke:var(--accent); stroke-width:1.8;
  vector-effect:non-scaling-stroke; }
.wm-marker-core{ fill:var(--accent); stroke:none; }
.wm-marker:focus .wm-marker-halo{ stroke-width:3; }
.wm-cluster{ cursor:pointer; outline:none; }
.wm-cluster .wm-marker-halo{ fill:var(--accent); stroke:var(--surface); }
.wm-cluster-label{ fill:#fff; font-weight:800; text-anchor:middle;
  dominant-baseline:middle; pointer-events:none; }
.wm-draft{ fill:var(--accent); stroke:var(--surface); stroke-width:2;
  vector-effect:non-scaling-stroke; pointer-events:none; }
.wm-add-instruction{ margin:0; padding:10px 14px; text-align:center;
  color:var(--accent); background:var(--accent-dim,rgba(79,115,150,.12));
  font-size:13px; font-weight:700; }
.wm-wrap.wm-adding{ box-shadow:inset 0 0 0 2px var(--accent); }
.wm-suggest-title{ width:100%; color:var(--text2); font-size:12px; font-weight:700; }
.wm-legacy{ margin:0 12px 12px; padding:12px; border-radius:var(--r-md);
  border:1px solid var(--border); background:var(--surface2); }
.wm-legacy>b,.wm-legacy>span{ display:block; }
.wm-legacy>span{ margin:4px 0 10px; color:var(--text2); font-size:12px; line-height:1.4; }
.wm-legacy-later{ width:auto; min-height:40px; margin:8px 0 0; }
.map-place-trips{ max-height:190px; overflow:auto; margin:6px 0 14px;
  border:1px solid var(--border); border-radius:var(--r-md); }
.map-trip-check{ min-height:44px; padding:10px 12px; display:flex; align-items:center;
  gap:10px; border-bottom:1px solid var(--border2); color:var(--text); }
.map-trip-check:last-child{ border-bottom:0; }
.map-trip-check input{ width:20px; height:20px; accent-color:var(--accent); }
.map-place-delete{ color:var(--danger,#b7473d); }
.map-place-list,.map-linked-list{ margin:10px 0 14px; }
.map-place-date{ color:var(--text2); font-size:13px; margin-bottom:8px; }
.wm-chip{ display:inline-flex; align-items:center; gap:7px; }
.wm-chip-dot{ width:7px; height:7px; border-radius:50%; background:var(--accent); flex:0 0 auto; }
.wm-disclaimer{ margin:0; padding:2px 14px 15px; font-size:10.5px; line-height:1.45;
  color:var(--text3); }
.journey-overview,.journey-trips-block{ margin-top:20px; padding:16px;
  background:var(--surface); border:1px solid var(--border); border-radius:var(--r); }
.wm-totals{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0;
  overflow:visible; padding:0; margin:0; border-top:1px solid var(--border); }
.wm-total{ min-width:0; min-height:62px; display:flex;
  flex-direction:column; justify-content:center; text-align:left; padding:12px 10px;
  background:transparent; border:0; border-right:1px solid var(--border);
  border-bottom:1px solid var(--border); border-radius:0; }
.wm-total:nth-child(3n){ border-right:0; }
.wm-total:nth-last-child(-n+3){ border-bottom:0; }
.wm-total b{ font-size:19px; }
.wm-total span{ font-size:10px; }

/* Поездки используют те же карточки, радиусы и отступы, что остальные
   разделы приложения — без отдельной декоративной оси и чужого таймлайна. */
.journey-log{ padding:0; margin:0; }
.journey-log::before{ content:none; }
#screen-world .journey-log .card{ overflow:hidden; border-radius:var(--r-sm); padding:14px;
  margin-bottom:10px; box-shadow:none; background:var(--surface2); }
#screen-world .journey-log .card::after{ content:none; }
#screen-world .journey-log .trip-cover-strip{ height:3px; }
#screen-world .journey-log .card-title{ font-size:16px; }
#screen-world .journey-log .card-sub{ margin-top:7px; }
#screen-world .journey-log .admin-ctrl{ margin-top:12px; }
#screen-world .journey-trips-block .seg{ margin-bottom:12px; }
#screen-world .journey-trips-block .btn-add{ margin-top:12px; }

@media (max-width:360px){
  .journey-title{ font-size:25px; }
  .wm-wrap{ min-height:330px; }
  .journey-overview,.journey-trips-block{ padding:14px; }
}
