/* Дизайн-система RedSky (тёмная база): canvas «RedSky Redesign» → «Дизайн-система» */
:root {
  --bg: #0D1120;
  --bg-2: #1E2438;        /* surface-2: поля, вторичные кнопки */
  --card: #161B2C;        /* surface: карточки, листы */
  --line: #2A3150;
  --text: #F1F2F8;
  --text-2: #C9CEE0;
  --muted: #A3AAC4;
  --accent: #FF7A45;
  --accent-2: #FF8A5B;    /* ссылки */
  --info: #7FC8FF;        /* камера */
  --danger: #FF6B6B;
  /* шкала баллов: цвет всегда вместе с числом, ступени различаются и по яркости */
  --r3: #FF7A45;          /* 80-100 отлично - ехать */
  --r2: #F2B13C;          /* 60-79 будет */
  --r1: #8E96BA;          /* 40-59 возможно */
  --r0: #59617F;          /* 0-39 маловероятно (полоски) */
  --on-score: #1A0E08;    /* текст на бейдже 60+ */
  --radius: 16px;         /* карточка; чип 999, кнопка 10-12, hero 20, лист 22 */
  --w-low: #8E96BA;
  --w-cloud: #5C6AA0;
  --w-rain: #4AA3FF;
  --tabbar: 72px;
  --r0-bg: #1E2438;       /* фон бейджа «маловероятно» - единственный цвет шкалы, что меняется с темой */
  --hero-line: #3A2A2A;
  --cam-text: #B9A8FF;    /* подписи камеры */
  --sun-mark: #FFD27A;    /* солнце в кадре в «По часам» */
  --night-col: rgba(0, 0, 0, 0.28); /* тёмные часы в «По часам» */
  --go: #7BD389; --careful: #F2B13C; --stop: #FF6B6B; /* подсказки «Для съёмки»: можно, осторожно, нет */
  color-scheme: dark;
}

/* светлая тема (на вебе - по умолчанию через «Авто»: следует за телефоном/браузером);
   data-theme="dark|light" на <html> - ручной выбор (настройка «Тема», фаза 6) */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]):not([data-night]) {
    --bg: #F4F1EC; --card: #FFFFFF; --bg-2: #F0ECE6; --line: #E3DED6;
    --text: #1C1F2B; --text-2: #3D4252; --muted: #62677A;
    --accent-2: #B4430F; --info: #1F6FB2; --r0-bg: #F0ECE6; --hero-line: #F1D9CC;
    --w-low: #7D879F; --w-cloud: #B3BACB; --w-rain: #2F86E0;
    --cam-text: #6A4FD8; --sun-mark: #C77700; --night-col: rgba(28, 31, 43, 0.07);
    --go: #2E7D32; --careful: #A86A00; --stop: #C0392B;
    color-scheme: light;
  }
}
:root[data-theme="light"]:not([data-night]) {
  --bg: #F4F1EC; --card: #FFFFFF; --bg-2: #F0ECE6; --line: #E3DED6;
  --text: #1C1F2B; --text-2: #3D4252; --muted: #62677A;
  --accent-2: #B4430F; --info: #1F6FB2; --r0-bg: #F0ECE6; --hero-line: #F1D9CC;
  --w-low: #7D879F; --w-cloud: #B3BACB; --w-rain: #2F86E0;
  --cam-text: #6A4FD8; --sun-mark: #C77700; --night-col: rgba(28, 31, 43, 0.07);
  --go: #2E7D32; --careful: #A86A00; --stop: #C0392B;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--accent-2); }

main, .topbar, .foot {
  max-width: 760px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.muted { color: var(--muted); }

button, input, select {
  font: inherit;
  color: inherit;
}

button {
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  padding: 8px 12px;
  cursor: pointer;
  min-height: 40px;
}
button:hover { border-color: var(--muted); }
button:disabled { opacity: 0.5; cursor: default; }
button.primary {
  background: var(--accent);   /* основная: сплошной акцент, тёмный текст (дизайн-система) */
  border: 0;
  color: var(--on-score);
  font-weight: 600;
}
button.ghost { background: transparent; }
button.danger { color: var(--danger); }
button.small { min-height: 32px; padding: 4px 10px; font-size: 0.9rem; }

input, select {
  width: 100%;
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  padding: 8px 12px;
}

select.small { width: auto; max-width: 12em; min-height: 32px; padding: 4px 8px; font-size: 0.9rem; }
input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; padding: 0; margin: 0; accent-color: var(--accent); }



.days { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.chip {
  min-height: 34px;
  min-width: 38px;
  padding: 4px 10px;
  border-radius: 999px;
}
.chip[aria-checked="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #1a1020;
  font-weight: 600;
}

.advanced { margin-top: 10px; }
.advanced summary { cursor: pointer; color: var(--muted); }
.advanced label { display: grid; gap: 6px; margin-top: 8px; font-size: 0.95rem; }

.map-info { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 12px; font-size: 0.9rem; }
.coords {
  min-height: 30px;
  padding: 2px 10px;
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
  background: transparent;
}
.location .coords, .location .camera-btn { margin-left: 0; }
.camera-view summary { color: var(--text); }
.lens { display: inline-flex; align-items: center; gap: 4px; }
.lens .chip { min-height: 28px; padding: 2px 8px; font-size: 0.85rem; }
.fav-pin {
  font-size: 15px;
  line-height: 22px;
  text-align: center;
  border-radius: 50%;
  color: #1a1020 !important;
  box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(0, 0, 0, 0.5);
}
.fav-pin:not(.r0):not(.r1):not(.r2):not(.r3) { background: #ffc94d; }
/* объект съёмки: 🎯 на карте (тянуть) и строка в карточке места */
.subject-handle { display: grid; place-items: center; font-size: 20px; cursor: grab; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .5)); }
.place-subject { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 12px; color: var(--text-2); }
.place-subject button { min-height: 0; padding: 2px 8px; }
.subject-sky { flex-basis: 100%; font-size: 11px; }
.place-note-wrap { flex-basis: 100%; }
.place-rating { display: flex; align-items: center; gap: 8px; }
.rating { display: inline-flex; gap: 0; }
.rating button { min-height: 0; padding: 0 1px; border: 0; background: transparent; color: var(--accent); font-size: 17px; line-height: 1; cursor: pointer; }
.rating[data-rating="0"] button { color: var(--muted); }
.rating button:hover { transform: scale(1.15); }
.place-note {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; width: 100%; min-height: 0;
  padding: 4px 6px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: inherit;
  font-size: 12px; text-align: left; white-space: pre-wrap; cursor: text;
}
.place-note:hover { border-color: var(--line); }
.place-note.empty { color: var(--muted); }
.place-note-edit { width: 100%; padding: 4px 6px; border: 1px solid var(--accent); border-radius: 6px; background: var(--card);
  color: inherit; font: inherit; font-size: 12px; resize: vertical; }
.camera-handle.ghost { opacity: 0.6; background: transparent; box-shadow: 0 0 0 2px #9B7BFF, 0 1px 4px rgba(0, 0, 0, 0.35); }
.camera-handle {
  font-size: 18px;
  line-height: 28px;
  text-align: center;
  border-radius: 50%;
  background: #9B7BFF;
  box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(0, 0, 0, 0.5);
  cursor: grab;
}

/* «Места»: canvas «Места» (телефон) и левая колонка «Web · Планировщик» */
.favs { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
#pane-places:has(#favs:not([hidden])) .pane-title { display: none; }
.fav-title { font-size: 0.85rem; }
.fav-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; }
.folder-picker { position: relative; min-width: 0; flex: 1 1 auto; display: flex; }
.folder-trigger {
  height: 44px; margin-left: -8px; padding: 0 10px 0 8px; border: 0; background: transparent; display: flex; align-items: center; gap: 6px;
  font-size: 22px; font-weight: 700; max-width: 100%;
}
.folder-trigger[aria-expanded="true"] { background: var(--bg-2); }
.folder-trigger .icon { transition: transform 0.15s; }
.folder-trigger[aria-expanded="true"] .icon { transform: rotate(180deg); }
.folder-count { font-size: 15px; font-weight: 500; color: var(--muted); }
.folder-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (min-width: 1024px) {
  /* колонка «Места» на компьютере - компактнее (canvas «Web · Планировщик») */
  .folder-trigger { font-size: 17px; height: 36px; }
  .fav-select-btn { min-height: 34px; padding: 0 12px; font-size: 13px; }
  .fav-header .icon-btn { width: 34px; height: 34px; }
  .fav-header { min-height: 36px; }
  .fav-row { padding: 10px 12px; }
}
.folder-menu {
  position: absolute; left: -8px; top: calc(100% + 6px); z-index: 20; width: 270px; padding: 6px; border-radius: 14px;
  background: var(--bg-2); border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28); display: flex; flex-direction: column;
}
.folder-option { min-height: 44px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; display: flex; align-items: center; gap: 8px; font-size: 15px; }
.folder-option[aria-selected="true"] { background: var(--line); }
.folder-eye { flex: none; width: 32px; min-height: 0; padding: 0; border: 0; border-radius: 8px; background: transparent;
  color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.folder-eye:hover { color: var(--text); background: var(--line); }
.folder-eye.off { color: var(--accent); }
.hidden-folder .folder-option, .hidden-folder .mgr-folder { opacity: 0.5; }
.option-check { width: 18px; display: flex; color: var(--accent-2); }
.option-name { flex: 1; text-align: left; }
.option-auto { color: var(--info); font-size: 13px; }
.menu-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.menu-link { min-height: 40px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; text-align: left; font-size: 14px; }
.menu-link.accent { color: var(--accent-2); }
.fav-header-actions { display: flex; gap: 8px; flex: none; }
.fav-select-btn { min-height: 44px; padding: 0 14px; background: var(--card); font-size: 14px; }
.fav-header .icon-btn { width: 44px; height: 44px; background: var(--card); }
.fav-header .icon-btn.plain { border: 0; background: transparent; font-size: 22px; }
.fav-selecting { display: flex; align-items: center; gap: 8px; }
.fav-folder-title { font-size: 20px; font-weight: 700; }
.fav-search {
  height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 14px; color: var(--muted);
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
}
.fav-search:focus-within { border-color: var(--accent); }
.fav-search input { flex: 1; min-width: 0; min-height: 0; height: 100%; padding: 0; border: 0; background: transparent; color: var(--text); outline: none; }
.fav-moments { display: flex; gap: 4px; }
/* моменты и «Только на карте» - значки одной строкой; день не сегодня - маленькая метка у значка */
.fav-filters { align-items: center; }
.fav-filters .icon-chip { min-width: 34px; min-height: 34px; padding: 0 7px; display: inline-flex; align-items: center; gap: 2px; }
.fav-filters .fav-onmap { margin-left: auto; }
.moment-tag { font-size: 10px; font-weight: 700; line-height: 1; }
.fav-moments .chip { flex: none; min-height: 34px; font-size: 13px; background: transparent; color: var(--text-2); }
.fav-moments .chip[aria-checked="true"] {
  border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-2); font-weight: 600;
}
.fav-rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.fav-more { text-align: center; }
.fav-filters { display: flex; gap: 6px; }
.fav-onmap[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.fav-offmap { font-size: 13px; }
@media (min-width: 1024px) { /* список мест - своя прокрутка: 50 строк не уводят блоки ниже за экран */
  #fav-items { max-height: min(60vh, 560px); overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
}
.fav-row {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px;
  background: var(--card); border: 1px solid transparent; text-align: left; -webkit-touch-callout: none; user-select: none;
}
.fav-row:hover { border-color: var(--line); }
.fav-row.selected, .fav-row.open { border-color: var(--accent); background: var(--bg-2); }
.row-rank { width: 18px; flex: none; font-size: 13px; color: var(--muted); text-align: center; }
.row-check { width: 22px; height: 22px; flex: none; border-radius: 6px; border: 2px solid var(--line); display: grid; place-items: center; color: var(--on-score); }
.row-check.on { background: var(--accent); border-color: var(--accent); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.row-name { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-rating { margin-left: 6px; color: var(--accent); font-size: 12px; font-weight: 600; }
.row-what { font-size: 13px; color: var(--text-2); }
.row-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.row-tags span { font-size: 11px; padding: 2px 7px; border-radius: 6px; background: var(--bg-2); color: var(--text-2); }
.fav-row.selected .row-tags span, .fav-row.open .row-tags span { background: var(--line); }
.fav-note { color: var(--muted); }
.fav-actions {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 8px; border-radius: 16px;
  background: var(--bg-2); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  position: sticky; bottom: 12px; z-index: 5;
}
.fav-actions[hidden] { display: none; }
.fav-action { min-height: 56px; border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12px; }
.fav-action.danger { color: var(--danger); }
.segmented.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.segmented button[aria-selected="true"] { background: var(--card); color: var(--text); font-weight: 600; }
button.small.on { border-color: var(--accent); }
.chip .score { font-weight: 700; }
.save-fav { display: flex; gap: 6px; align-items: center; margin-left: auto; }
.save-fav button { white-space: nowrap; }
.location .save-fav button, .location .fresh { margin-left: 0; }
.fav-list { border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin: 10px 0; display: grid; gap: 8px; }
.fav-list .list { margin: 0; }
.fav-list .list li { flex-wrap: wrap; }
.fav-list-head .push { margin-left: auto; }
.fav-name { min-width: 0; overflow-wrap: anywhere; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; }
.small-note { margin: 0; font-size: 0.85rem; }

/* статус («Считаю прогноз…», ошибки) - плашка поверх страницы под шапкой: появляется и пропадает, ничего не сдвигая */
.status {
  position: fixed; z-index: 1001; top: calc(72px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
  width: max-content; max-width: calc(100vw - 32px); margin: 0; padding: 8px 14px; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--muted);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); font-size: 14px; pointer-events: none;
}
.status.error { color: var(--danger); pointer-events: auto; cursor: pointer; }

.location {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin: 4px 2px 12px;
}
.location h2 { margin: 0; font-size: 1.2rem; }
.location .meta { color: var(--muted); font-size: 0.9rem; }
.location button { margin-left: auto; }

.day-list { display: grid; gap: 12px; }

.day-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  margin-bottom: 8px;
}
.day-head h3 { margin: 0; font-size: 1.05rem; }
.day-head h3::first-letter { text-transform: uppercase; }
.day-head .sun { color: var(--muted); font-size: 0.9rem; }
.badge {
  font-size: 0.8rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--line);
}

.slot { border-top: 1px solid var(--line); }
.slot > button {
  display: grid;
  grid-template-columns: 1.6em 4.8em 2.4em 1fr;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 8px 2px;
}
.slot .score { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.slot .bar {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: var(--bg-2);
  overflow: hidden;
}
.slot .bar > i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; }
.slot .top { grid-column: 3 / 5; font-size: 0.85rem; color: var(--muted); margin-top: -4px; }
.slot > button > span:nth-child(2) small { display: block; font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
.hours {
  display: flex;
  gap: 2px;
  padding: 0 2px 8px 2.2em;
  align-items: start;
  overflow-x: auto;
}
.hours-name {
  align-self: center;
  flex: 0 0 auto;
  width: 4.2em;
  font-size: 0.72rem;
  color: var(--muted);
}
.hour {
  flex: 1 0 1.7em;
  max-width: 2.6em;
  display: grid;
  justify-items: center;
  font-size: 0.72rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.hour .hbar {
  position: relative;
  width: 70%;
  height: 28px;
  border-radius: 3px;
  background: var(--bg-2);
  overflow: hidden;
}
.hour .hbar > i { position: absolute; inset: auto 0 0 0; }
.hour.best { color: var(--text); font-weight: 700; }
.hour.best .hbar { outline: 2px solid currentColor; outline-offset: 1px; }
.weather { min-width: 0; border-top: 1px solid var(--line); padding: 6px 2px 4px; }
.weather summary { cursor: pointer; padding: 4px 0; color: var(--muted); font-size: 0.9rem; }
.wgrid { display: flex; gap: 4px; min-width: 0; }
.wlabels, .wcol { display: grid; grid-template-rows: repeat(4, 18px) 16px 14px; row-gap: 3px; }
.wlabels { flex: 0 0 4.2em; font-size: 0.72rem; color: var(--muted); align-items: center; }
.wcols { display: flex; flex: 1 1 auto; min-width: 0; gap: 2px; overflow-x: auto; padding-bottom: 2px; }
.wcol {
  flex: 0 0 1.9em;
  justify-items: center;
  padding: 2px 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  font-size: 0.68rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.wcol.wnight { background: color-mix(in srgb, var(--bg-2) 70%, #0b1020 30%); }
.wcol.on { border-color: var(--text); color: var(--text); }
.glass {
  position: relative;
  width: 70%;
  height: 18px;
  border-radius: 3px;
  background: var(--bg-2);
  overflow: hidden;
}
.glass > i { position: absolute; inset: auto 0 0 0; }
.w-low { background: var(--w-low); }
.w-cloud { background: var(--w-cloud); }
.w-rain { background: var(--w-rain); }
.weather-detail { margin: 4px 0 0; font-size: 0.82rem; min-height: 1.2em; }
.slot .details { padding: 0 2px 10px 2.2em; font-size: 0.92rem; }
.slot .details h4 { margin: 8px 0 2px; font-size: 0.95rem; }
.slot .details ul { margin: 2px 0; padding-left: 1.1em; color: var(--muted); }

.r0 { background: var(--r0); color: var(--r0); }
.r1 { background: var(--r1); color: var(--r1); }
.r2 { background: var(--r2); color: var(--r2); }
.r3 { background: var(--r3); color: var(--r3); }
.score.r0, .score.r1, .score.r2, .score.r3, .pscore { background: none; }
.score.r0 { color: var(--muted); } /* полоска тусклая, число - читаемое (контраст 4.5:1) */

.hint { margin: 8px 0 0; font-weight: 500; }

.intro h1 { margin: 0 0 6px; font-size: 1.3rem; }
.intro p { margin: 6px 0; }

.foot { padding-top: 24px; padding-bottom: 32px; font-size: 0.85rem; }

dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  padding: 16px;
}
dialog::backdrop { background: rgba(5, 8, 18, 0.6); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; }
.dialog-head h2 { margin: 0; font-size: 1.15rem; }
.close { min-height: 32px; }

.tabs { display: flex; gap: 6px; margin: 12px 0; }
.stack { display: grid; gap: 10px; }
.stack label { display: grid; gap: 4px; font-size: 0.92rem; }
.stack label[hidden] { display: none; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.list { list-style: none; margin: 6px 0; padding: 0; display: grid; gap: 6px; }
.list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.code {
  font: 600 1.4rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.12em;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--bg-2);
  user-select: all;
}
.section { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
.section h3 { margin: 0 0 6px; font-size: 1rem; }
.notice { margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.form-error { color: var(--danger); min-height: 1.2em; margin: 0; font-size: 0.9rem; }

@media (max-width: 520px) {
  .days { margin-left: 0; width: 100%; }
  .slot > button { grid-template-columns: 1.6em 4.4em 2.2em 1fr; }
}

.review-pick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.review-pick label { color: var(--muted); }
.review-pick input { width: auto; min-height: 38px; }

.review { margin-top: 12px; }
.review h3 { margin: 0 0 4px; font-size: 1.05rem; }
.question {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.question .q-label { flex: 1; min-width: 10em; }
.question .q-actions { display: flex; gap: 6px; margin-left: auto; }
.question button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: #1a1020; }
.stats { margin: 6px 0; padding-left: 1.1em; }
.stats li { margin: 4px 0; }
.reviewing .days { opacity: 0.45; pointer-events: none; }

.ridge-icon { font-size: 13px; line-height: 16px; text-align: center; color: #F1F2F8; filter: drop-shadow(0 0 2px #000); }
.leaflet-tooltip.sun-label {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  font-size: 0.72rem;
  padding: 1px 6px;
  box-shadow: none;
}

.leaflet-tooltip.pin-tip-wrap { padding: 8px; max-width: 460px; white-space: normal; background: var(--card); color: var(--text);
  border: 1px solid var(--line); }
.leaflet-tooltip.pin-tip-wrap::before { display: none; } /* карточку сдвигаем к краю карты - стрелка указала бы мимо точки */
.pin-tip { display: flex; flex-direction: column; gap: 2px; font-size: 0.78rem; }
.pin-tip b { font-size: 0.85rem; overflow-wrap: anywhere; }
.pin-tip span { color: var(--muted); }
.pin-tip-cover { width: 440px; height: 280px; object-fit: cover; border-radius: 6px; background: var(--line); margin-bottom: 4px; }

.photos { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.photos img { width: 104px; height: 104px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

/* карточки - элементы сетки: без min-width:0 широкая погода по часам растягивает карточку */
.day-list > * { min-width: 0; }

.pending-error p { margin: 0 0 6px; font-size: 0.85rem; }
.pending-error button { margin: 4px 4px 0 0; }

.fetch-info { flex-basis: 100%; display: grid; gap: 1px; font-size: 0.8rem; padding: 6px 8px; border: 1px dashed var(--line); border-radius: 8px; }

/* ---------- раскладка: телефон - вкладки внизу, компьютер - три колонки ---------- */
h1, h2, h3 { letter-spacing: -0.01em; }
.pane-title { margin: 4px 2px 10px; font-size: 24px; font-weight: 700; }
.empty { margin: 4px 2px; }
button { border-radius: 12px; }
button.small, .chip { border-radius: 999px; }
.card { border-radius: var(--radius); background: var(--card); }
.status:empty { display: none; }

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--tabbar) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--bg);
  border-top: 1px solid var(--line);
  z-index: 1000;
}
.tabbar button {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  min-height: 44px;
}
.tabbar button[aria-current="page"] { color: var(--accent-2); font-weight: 600; }

@media (max-width: 1023px) {
  body { padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 8px); }
  .foot { display: none; }
  .pane { display: none; }
  body[data-tab="plan"] #pane-plan,
  body[data-tab="now"] #pane-now,
  body[data-tab="places"] #pane-places,
  body[data-tab="more"] #pane-more { display: block; }
  /* аккаунт - значок справа в шапке (и на карте); экран аккаунта - со стрелкой назад */
  .topbar #account-btn { margin-left: auto; }
  #pane-more .sub-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
  #pane-more .sub-head .pane-title { margin: 0; }
  /* «По часам» - своя вкладка: чипы дней (листаются вбок) и таблица дня */
  #pane-hours .pane-title { margin: 4px 0 0; font-size: 18px; }
  .hours-days { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .hours-days .chip { flex: none; }
}


.places-toggle, .places-toggle-label { display: none; } /* свернуть «Места» - только на компьютере */
@media (min-width: 1024px) {
  .tabbar, #pane-more { display: none; }
  main.layout, .topbar, .foot { max-width: 1600px; }
  main.layout {
    display: grid;
    /* «Места» - 300 px (ручка «свернуть» - внутри колонки); прогноз справа - не шире ~30%, компактный - 216 px */
    --places-w: 300px;
    --now-w: minmax(300px, 30%);
    grid-template-columns: var(--places-w) minmax(0, 1fr) var(--now-w);
    grid-template-areas: "places plan now" "hours hours hours";
    gap: 16px 12px;
    margin-top: 16px; /* под шапкой (статус - плашка поверх, своей строки в сетке у него нет) */
    align-items: start;
    transition: grid-template-columns 0.25s ease;
  }
  #pane-places { grid-area: places; }
  #pane-plan { grid-area: plan; }
  #pane-now { grid-area: now; }
  #pane-hours { grid-area: hours; }

  /* «Места» сворачиваются в полосу (data-places="folded" на <html>), карта забирает ширину;
     кнопка - круглая ручка на правом краю колонки, наполовину в зазоре перед картой */
  :root[data-places="folded"] main.layout { --places-w: 44px; }
  :root[data-now="compact"] main.layout { --now-w: 216px; }
  #pane-places { position: relative; }
  /* ширина - как в развёрнутой колонке: пока колонка растёт, список обрезается её краем, а не переносится */
  .places-body { min-width: 300px; }
  :root[data-places-moving] #pane-places { overflow: clip; }
  /* ручка - в правом верхнем углу колонки, над строкой папки (у неё справа место под ручку) */
  .places-toggle {
    position: absolute; top: 8px; right: 0; z-index: 3; width: 24px; height: 24px; min-height: 0; padding: 0;
    display: grid; place-items: center; border-radius: 50%; background: var(--card); color: var(--muted);
  }
  .places-body > .pane-title, .places-body .fav-header { padding-right: 30px; }
  .places-toggle:hover { color: var(--text); }
  .places-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .places-toggle svg { transition: transform 0.25s ease; }
  .places-toggle[aria-expanded="false"] svg { transform: scaleX(-1); }
  :root[data-places="folded"] #pane-places { display: grid; align-self: stretch; }
  :root[data-places="folded"] .places-body { display: none; }
  /* свёрнуто: вся полоса - кнопка «развернуть», подпись «Места» снизу вверх */
  :root[data-places="folded"] .places-toggle {
    position: static; width: auto; height: auto; min-height: 160px; padding: 14px 0; place-items: start center; align-content: start;
    gap: 12px; border-radius: 14px;
  }
  :root[data-places="folded"] .places-toggle-label {
    display: block; writing-mode: vertical-rl; transform: rotate(180deg); font-size: 13px; font-weight: 600; color: var(--text-2);
  }
}
@media (min-width: 1024px) and (prefers-reduced-motion: reduce) {
  main.layout, .places-toggle svg { transition: none; }
}

/* «Места» - отдельный раздел (вкладка или колонка): места списком, а не строкой */

/* ---------- «Сейчас» ---------- */
.location { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.location[hidden] { display: none; }
.now-head { flex-basis: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.now-title { display: grid; gap: 2px; min-width: 0; }
.now-title h2 { margin: 0; font-size: 17px; font-weight: 600; }
.icon-btn { width: 44px; height: 44px; min-height: 44px; padding: 0; font-size: 18px; border-radius: 12px; background: var(--card); flex: none; }

.hero { background: var(--card); border: 1px solid var(--hero-line); border-radius: 20px; padding: 16px; display: grid; gap: 12px; }
.hero-kicker { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-2); }
.hero-body { display: flex; align-items: center; gap: 16px; }
.hero-text { display: grid; gap: 4px; min-width: 0; }
.hero-title { font-size: 22px; font-weight: 700; line-height: 1.15; }
.hero-when { font-size: 14px; color: var(--text-2); }
.ring { width: 72px; height: 72px; flex: none; border-radius: 50%; border: 5px solid currentColor; display: flex; align-items: center;
  justify-content: center; font-size: 26px; font-weight: 700; background: none !important; }
.ring.r0 { color: var(--muted); } .ring.r1 { color: var(--r1); } .ring.r2 { color: var(--r2); } .ring.r3 { color: var(--r3); }
.ring { font-variant-numeric: tabular-nums; }
.hero-actions { display: flex; gap: 8px; }
.hero-actions .primary { flex: 1; }


.days-block { display: grid; gap: 10px; min-width: 0; }
.day-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(calc((100% - 12px) / var(--days, 3)), 1fr); gap: 4px;
  padding: 4px; background: var(--card); border-radius: 12px; overflow-x: auto; }
.day-tabs button { min-height: 36px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 14px; white-space: nowrap; }
.day-tabs button[aria-selected="true"] { background: var(--line); color: var(--text); font-weight: 600; }
.day-pager { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.day-pager::-webkit-scrollbar { display: none; }
.day-panel { flex: 0 0 100%; scroll-snap-align: start; display: grid; gap: 8px; align-content: start; min-width: 0; }
.day-sun { font-size: 12px; }
.day-dots { display: flex; justify-content: center; gap: 6px; }
.day-dots span { width: 6px; height: 6px; border-radius: 3px; background: var(--line); transition: width 0.2s; }
.day-dots span.on { width: 18px; background: var(--accent); }

.slot-wrap { display: grid; gap: 6px; }
.slot-row, .hourly-card { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px;
  background: var(--card); border: 0; color: var(--text); text-align: left; min-height: 44px; }
.slot-row.past { opacity: 0.55; }
.slot-row[aria-expanded="true"] { box-shadow: inset 0 0 0 1px var(--line); }
.slot-main { display: grid; gap: 2px; min-width: 0; flex: 1; }
.slot-line { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.slot-line > :first-child { margin-right: auto; }
.slot-name { font-size: 16px; font-weight: 600; }
.slot-what { font-size: 13px; color: var(--text-2); }
.mini-bars { display: flex; align-items: flex-end; gap: 3px; height: 22px; margin-top: 6px; }
.mini-bars i { width: 10px; border-radius: 2px; background: var(--r0); }
.badge-score { flex: none; min-width: 48px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700; background: var(--r0-bg); color: var(--muted); font-variant-numeric: tabular-nums; }
.badge-score.filled { color: var(--on-score); }
.badge-score.filled.r2 { background: var(--r2); } .badge-score.filled.r3 { background: var(--r3); }
.slot-details { background: var(--card); border-radius: 16px; padding: 4px 12px 10px; }
.slot-details .slot { border-top: 0; }
.hourly-wrap { display: grid; gap: 6px; }
.hourly-card { flex-direction: column; align-items: stretch; gap: 8px; }
.hourly-card .link { font-size: 13px; color: var(--accent-2); }
.hourly-preview { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); text-align: center; font-size: 12px; color: var(--text-2); }
.hourly-preview span { display: grid; gap: 2px; }
.hourly-preview b { color: var(--text); }
.hourly-body { background: var(--card); border-radius: 16px; padding: 8px 10px; min-width: 0; }
#days.day-list { display: flex; flex-direction: column; gap: 12px; } /* flex: якорь «Вчера» гасит свой зазор отступом */

.favs[hidden] { display: none; }

/* ---------- «План»: карта первой, лист места снизу (canvas «План съёмки») ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.plan-map { position: relative; height: calc(100vh - 380px); min-height: 360px; border-radius: var(--radius); overflow: hidden; }
.map { position: absolute; inset: 0; z-index: 0; background: var(--bg-2); } /* z-index - слои Leaflet не выходят поверх поиска */
.map-top { position: absolute; left: 12px; right: 12px; top: 12px; z-index: 3; display: flex; gap: 8px; } /* над легендой */
.map-search {
  flex: 1; min-width: 0; height: 48px; display: flex; align-items: center; gap: 10px; padding: 0 14px;
  background: color-mix(in srgb, var(--card) 94%, transparent); border: 1px solid var(--line); border-radius: 14px; color: var(--muted);
}
.map-search input { flex: 1; min-width: 0; min-height: 0; height: 100%; padding: 0; border: 0; background: transparent; color: var(--text); font-weight: 500; outline: none; }
.map-search:focus-within { border-color: var(--accent); }
.map-btn {
  flex: none; width: 48px; height: 48px; padding: 0; display: grid; place-items: center; border-radius: 14px;
  background: color-mix(in srgb, var(--card) 94%, transparent); color: var(--text);
}
.map-btn[aria-expanded="true"] { border-color: var(--accent); }
.map-btn.map-account { display: none; } /* аккаунт на карте - только на телефоне (у компьютера он в шапке) */
@media (max-width: 1023px) { .map-btn.map-account { display: grid; } }
.map-folder { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 3; max-width: calc(100% - 160px);
  display: flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--card);
  border: 1px solid var(--line); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); font-size: 13px; }
.map-folder[hidden] { display: none; }
.map-folder-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.map-folder-name > span:not(.icon):not(.muted) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.map-folder-clear { flex: none; width: 26px; height: 26px; min-height: 0; padding: 0; border: 0; border-radius: 50%; background: transparent;
  color: var(--muted); font-size: 18px; line-height: 1; }
.map-folder-clear:hover { background: var(--line); color: var(--text); }
.map-chips { position: absolute; left: 12px; right: 12px; top: 68px; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.map-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 999px; font-size: 11px; line-height: 1.3;
  background: color-mix(in srgb, var(--bg) 85%, transparent); color: var(--text-2);
}
.map-chip i { display: inline-block; width: 14px; }
.map-chip.credit { pointer-events: auto; color: var(--muted); text-decoration: none; }
.map-info {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  margin: 0; padding: 8px 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; font-size: 0.9rem;
}
.map-info[hidden] { display: none; }
.sky-icon { display: grid; place-items: center; }
.sky-icon svg { display: block; }
.sun-disc { display: block; width: 18px; height: 18px; border-radius: 50%; background: #FFB020; box-shadow: 0 0 0 2px #121829; }

.sheet {
  background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 8px 16px 14px;
  display: flex; flex-direction: column; gap: 12px; margin-top: 12px;
}
.sheet-handle { align-self: center; min-height: 20px; width: 64px; padding: 6px 0; border: 0; background: transparent; display: grid; place-items: center; }
.sheet-handle span { width: 36px; height: 4px; border-radius: 2px; background: var(--line); }
.plan-body { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.plan-body > p { margin: 0; }
.sheet.collapsed .plan-body > :not(.plan-head), .sheet.collapsed .plan-options { display: none; }
.plan-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.plan-head > .place-extras { flex-basis: 100%; margin-top: 0; } /* заметка, «Снимки рядом», фото - строкой под названием */
.plan-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.plan-title h2 { margin: 0; font-size: 17px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-meta { min-height: 24px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 12px; text-align: left; }
.plan-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; flex: none; }
.save-btn { width: 36px; min-height: 36px; padding: 0; border-radius: 10px; font-size: 16px; }
.folders-btn { min-height: 36px; padding: 0 12px; border-radius: 10px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; }
.icon { display: inline-flex; }
.folders-btn .icon svg { fill: none; stroke: var(--muted); }
.folders-btn.saved .icon svg { fill: var(--r2); stroke: var(--r2); }
.plan-days { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.plan-days .chip { flex: none; min-height: 32px; font-size: 13px; color: var(--text-2); background: transparent; }
.plan-days .chip[aria-selected="true"] {
  border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-2); font-weight: 600;
}
.plan-days .icon-chip { width: 40px; min-width: 40px; padding: 0; display: grid; place-items: center; }
.plan-days .icon-chip[aria-expanded="true"] { border-color: var(--accent); }
.plan-options { display: grid; gap: 10px; padding-top: 4px; border-top: 1px solid var(--line); }
.plan-options[hidden] { display: none; }
.plan-options .days, .plan-options .review-pick, .plan-options .advanced { margin: 0; }

.timeline { position: relative; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.stop {
  flex: none; min-width: 76px; height: 52px; padding: 0 10px; border-radius: 12px; border: 1px solid transparent; background: var(--bg-2);
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px;
}
.stop b { font-size: 15px; font-weight: 600; }
.stop span { font-size: 11px; color: var(--muted); white-space: nowrap; }
.stop[aria-checked="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tile { background: var(--bg-2); border: 1px solid transparent; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; justify-content: center; min-width: 0; text-align: left; }
.tile-sun { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.tile-moon { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.sun-dot { width: 12px; height: 12px; border-radius: 50%; background: #FFB020; flex: none; }
.moon-icon { display: inline-flex; flex: none; }
.camera-tile { border-color: color-mix(in srgb, #9B7BFF 45%, var(--line)); gap: 2px; min-height: 0; }
.camera-kicker { display: flex; justify-content: space-between; gap: 6px; font-size: 11px; color: var(--cam-text); }
.camera-state { font-size: 15px; font-weight: 600; color: var(--muted); }
.camera-state.in { color: var(--info); }
.metric { gap: 6px; }
.metric-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; font-size: 11px; }
.metric-score { font-size: 17px; }
.metric-score[data-r="r3"] { color: var(--r3); } .metric-score[data-r="r2"] { color: var(--r2); }
.metric-score[data-r="r1"] { color: var(--r1); } .metric-score[data-r="r0"] { color: var(--muted); }
.meter { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 2px; }
.meter i.r3 { background: var(--r3); } .meter i.r2 { background: var(--r2); } .meter i.r1 { background: var(--r1); } .meter i.r0 { background: var(--r0); }

/* лист поверх экрана: камера, папки */
.sheet-dialog {
  margin: auto auto 0; width: 100%; max-width: 480px; max-height: 92vh; padding: 0; border: 1px solid var(--line); border-bottom: 0;
  border-radius: 22px 22px 0 0; background: var(--card); color: var(--text); overflow: hidden;
}
.sheet-dialog::backdrop { background: rgba(5, 7, 15, 0.7); }
.sheet-inner { max-height: 92vh; overflow-y: auto; padding: 8px 16px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
.sheet-grip { align-self: center; width: 36px; height: 4px; border-radius: 2px; background: var(--line); }
.sheet-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.sheet-head h2 { margin: 0; font-size: 19px; font-weight: 700; }
.sheet-head .muted { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-actions { display: flex; gap: 8px; }
/* «Поделиться»: кнопка у места и список мест по ссылке */
.share-btn { display: inline-flex; align-items: center; justify-content: center; }
.plan-actions .share-btn { width: 36px; height: 36px; min-height: 36px; }
.plan-actions .merge-btn { position: relative; width: 36px; height: 36px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; }
.merge-btn .merge-count { position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: #1a1020; font-size: 11px; line-height: 16px; }
.share-places { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; max-height: 50vh; overflow: auto; }
.share-place { width: 100%; min-height: 52px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 8px 12px; border-radius: 12px; background: var(--card); text-align: left; }
.share-place.with-cover { flex-direction: row; align-items: center; gap: 10px; } /* обложка места слева от названия */
.share-place .share-text { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.sheet-actions button { min-height: 48px; }
.sheet-actions .primary { flex: 1; }
/* «Импорт точек»: куда положить места */
.import-to { display: grid; gap: 4px; margin-bottom: 12px; }
.import-to select { width: 100%; }
.dial { --dial-tick: #4A5378; align-self: center; width: 236px; height: 236px; touch-action: none; cursor: grab; border-radius: 50%; }
.dial svg { display: block; font-family: inherit; }
.dial:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.steps, .focals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.steps button { min-height: 44px; font-size: 15px; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.preset { min-height: 36px; padding: 0 12px; border-radius: 999px; background: transparent; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.preset i { width: 8px; height: 8px; border-radius: 50%; }
.preset[aria-pressed="true"] { border-color: #9B7BFF; background: color-mix(in srgb, #9B7BFF 18%, transparent); color: var(--text); }
.focal-wrap { display: grid; gap: 6px; }
.focal { min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.focal b { font-size: 15px; }
.focal span { font-size: 11px; opacity: 0.8; }
.focal[aria-checked="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-score); }
.verdict { padding: 10px 12px; border-radius: 12px; background: var(--bg-2); font-size: 13px; color: var(--text-2); }
.folder-list { display: grid; gap: 6px; }
.folder-row { min-height: 52px; display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 12px; text-align: left; width: 100%; }
.folder-row .check { width: 22px; height: 22px; flex: none; border-radius: 6px; border: 2px solid var(--line); display: grid; place-items: center; }
.folder-row[aria-checked="true"] .check { background: var(--accent); border-color: var(--accent); }
.folder-row[aria-checked="true"] .check::after { content: ""; width: 10px; height: 5px; border: solid var(--on-score); border-width: 0 0 3px 3px; transform: translateY(-1px) rotate(-45deg); }
.folder-row .check.plus { border-style: dashed; color: var(--muted); }
.folder-row.new { border: 1px dashed var(--line); background: transparent; cursor: text; }
.folder-row.new input { min-height: 0; padding: 4px 0; border: 0; background: transparent; }
.folder-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.field { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }

/* «Ещё» → оформление */
.settings-group { display: grid; gap: 8px; margin-top: 16px; }
.group-title { margin: 0 4px; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.group-card { background: var(--bg-2); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 12px; }
.segmented { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; background: var(--bg); border-radius: 12px; }
.segmented button { min-height: 36px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 14px; }
.segmented button[aria-checked="true"] { background: var(--card); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15); }
.switch-row { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.switch-row.first { border-top: 0; padding-top: 0; }
.switch-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.switch { width: 48px; height: 28px; min-height: 0; flex: none; padding: 3px; border: 0; border-radius: 14px; background: var(--line); display: flex; justify-content: flex-start; }
.switch span { width: 22px; height: 22px; border-radius: 50%; background: #FFFFFF; }
.switch[aria-checked="true"] { background: var(--accent); justify-content: flex-end; }
.about { font-size: 0.9rem; }

/* ночной красный режим: поверх темы (всегда на тёмной базе) - только красный #FF3B30 на чёрном, яркость не выше 30%.
   Фильтр на корне не ломает position: fixed (исключение для корневого элемента); окна в верхнем слое - отдельно */
:root[data-night] { --bg: #000000; --card: #0B0B0E; --bg-2: #141418; color-scheme: dark; filter: url(#night-red); }
:root[data-night] dialog { filter: url(#night-red); }

@media (max-width: 1023px) {
  /* панель выбора мест - над вкладками */
  .fav-actions { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 12px); }
  /* «План» на телефоне - на весь экран над вкладками, лист прикрывает низ карты */
  body[data-tab="plan"] .topbar { display: none; }
  body[data-tab="plan"] #pane-plan { position: fixed; left: 0; right: 0; top: 0; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); }
  body[data-tab="plan"] #status { top: calc(156px + env(safe-area-inset-top)); }
  #pane-plan .plan-map { position: absolute; inset: 0; height: auto; min-height: 0; border-radius: 0; }
  #pane-plan .map-top { top: calc(16px + env(safe-area-inset-top)); left: 16px; right: 16px; }
  #pane-plan .map-chips { top: calc(72px + env(safe-area-inset-top)); left: 16px; right: 16px; }
  #pane-plan .map-folder { top: calc(72px + env(safe-area-inset-top)); max-width: calc(100% - 32px); }
  #pane-plan .sheet {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; margin: 0; max-height: 56%; overflow-y: auto;
    border-width: 1px 0 0; border-radius: 22px 22px 0 0; overscroll-behavior: contain;
  }
  #pane-plan .map-info { bottom: auto; top: calc(110px + env(safe-area-inset-top)); left: 16px; right: 16px; }
}
/* меню под кнопкой (menuButton в app.js): тема в шапке, направления камеры */
.menu-wrap { position: relative; display: flex; }
.drop-menu {
  position: absolute; left: 0; top: calc(100% + 6px); z-index: 30; min-width: 170px; padding: 4px; border-radius: 12px;
  background: var(--bg-2); border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28); display: flex; flex-direction: column;
}
.drop-menu[hidden] { display: none; }
.drop-menu button {
  min-height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-2); white-space: nowrap;
}
.drop-menu button:hover { background: var(--line); }
.drop-menu button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.drop-menu [aria-checked="true"] { color: var(--text); font-weight: 600; }
.drop-menu .option-check { justify-content: flex-end; visibility: hidden; }
.drop-menu [aria-checked="true"] .option-check { visibility: visible; }
.drop-menu .dot { width: 8px; height: 8px; margin: 0 4px; border-radius: 50%; }

/* ---------- компьютер: «Web · Планировщик» ---------- */
.head-search, .head-days, .head-theme, .cam-bar, .map-moments, .pane-hours { display: none; }
@media (min-width: 1024px) {
  /* шапка - той же ширины, что колонки и подвал (на широком экране всё вместе по центру); одной строкой от 1024 px
     (iPad Pro): первым сжимается поиск, значки темы и аккаунта - своего размера. Все в ряду - одной высоты (stretch) */
  .topbar {
    flex-wrap: nowrap; align-items: stretch; justify-content: flex-start; gap: 10px; border-bottom: 1px solid var(--line);
    padding-top: 12px; padding-bottom: 10px;
  }
  .topbar > * { flex: none; }
  .brand { font-size: 16px; }
  .brand svg { width: 24px; height: 24px; }
  .head-search { display: flex; align-items: center; flex: 1 1 auto; min-width: 0; max-width: 360px; }
  .head-search .map-search { width: 100%; height: 36px; gap: 8px; padding: 0 4px 0 12px; background: var(--card); border-radius: 10px; }
  .head-search .map-search svg { flex: none; width: 16px; height: 16px; }
  .head-search .map-search input { font-size: 13px; }
  .head-search .map-btn { width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); }
  .head-days { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; }
  .head-days .chip {
    min-height: 30px; min-width: 0; padding: 0 9px; font-size: 12px; white-space: nowrap; background: transparent; color: var(--text-2);
    display: inline-flex; align-items: center; gap: 5px;
  }
  .head-days .chip.round { width: 30px; padding: 0; justify-content: center; }
  .head-days .chip .icon svg { width: 14px; height: 14px; }
  .head-days .chip[aria-pressed="true"] {
    border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-2); font-weight: 600;
  }
  /* тема и аккаунт - значки справа во всю высоту строки; тема - с меню */
  .head-theme { display: flex; margin-left: auto; }
  .head-theme .drop-menu { left: auto; right: 0; }
  .head-icon {
    width: 36px; height: 36px; min-height: 0; padding: 0; display: grid; place-items: center; border-radius: 10px;
    background: var(--bg-2); color: var(--text-2);
  }
  .head-icon:hover, .head-icon[aria-expanded="true"] { color: var(--text); }
  .head-icon[aria-expanded="true"] { border-color: var(--accent); }
  .head-icon:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  #account-btn.signed-in { color: var(--accent-2); }

  /* карта: поиск - в шапке, сверху справа только «Легенда»; лист телефона не нужен */
  #pane-plan .sheet { display: none; }
  #pane-plan .map-top { left: auto; }
  #pane-plan .plan-map { width: 100%; height: auto; aspect-ratio: 880 / 560; min-height: 400px; border: 1px solid var(--line); }
  .map-chips.panel {
    right: auto; max-width: 230px; flex-direction: column; flex-wrap: nowrap; gap: 2px; padding: 8px 10px; border-radius: 10px;
    background: color-mix(in srgb, var(--card) 94%, transparent); font-size: 11px; line-height: 1.35; color: var(--text-2); pointer-events: auto; top: 12px;
  }
  .map-chips.panel.closed { top: auto; bottom: 64px; left: auto; right: 12px; padding: 2px 8px; }
  .map-chips.panel b { color: var(--text); }
  .map-chips.panel b::first-letter { text-transform: uppercase; }
  .legend-row { display: flex; align-items: center; gap: 8px; }
  .legend-row > i, .legend-mark { width: 18px; flex: none; }
  .legend-mark { display: inline-flex; align-items: center; gap: 2px; font-size: 9px; color: var(--text); }
  .legend-mark i { width: 10px; }
  .legend-row .dot { width: 10px; height: 10px; margin: 0 4px; border-radius: 50%; background: var(--muted); }
  .legend-row .dot.ring { background: transparent; border: 2px solid var(--muted); }
  .legend-row .dot.fog-legend-dot { background: #E8ECF2; border: 2px solid #6B7A8F; } /* туман на станциях вокруг */
  .legend-star { width: 18px; color: var(--r2); text-align: center; }
  .map-chips.panel .credit { color: var(--muted); font-size: 11px; }

  /* полоса камеры - всегда одной строкой, фокусные - в том же ряду. Ширина - колонки карты (iPad: 1024 px - около
     350 px, 1194 - 470, 1366 - 590; колонка «Места» развёрнута - не больше 750), и чем она уже, тем больше прячется
     (подсказки и подписи для чтения экрана остаются): уже 800 px - «Камера», «мм», «Убрать» -> ✕; уже 680 (три направления)
     или 560 (два) - направления в меню (.cam-aim: точки цветов линий на карте); уже 440 - значок камеры, буквы румба
     («112°» без «В»), отступы меньше */
  .cam-bar {
    container: cam / inline-size; position: relative; z-index: 5; /* меню направлений - поверх карты */
    display: flex; flex-wrap: nowrap; align-items: stretch; gap: 5px; padding: 4px 5px; margin-bottom: 8px; border-radius: 12px;
    background: var(--card); border: 1px solid var(--line);
  }
  .cam-bar:empty { display: none; }
  .cam-bar > * { flex: none; }
  .cam-title { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; white-space: nowrap; }
  .cam-turn { display: flex; align-items: center; padding: 2px; border-radius: 8px; background: var(--bg-2); }
  .cam-turn button {
    min-height: 24px; min-width: 26px; padding: 0 4px; border: 0; border-radius: 6px; background: transparent; font-size: 11px; color: var(--text-2);
  }
  .cam-turn .cam-value { min-width: 62px; font-size: 14px; font-weight: 700; color: var(--cam-text); white-space: nowrap; }
  .cam-turn .cam-value.unset { font-size: 12px; font-weight: 500; color: var(--muted); }
  .cam-presets, .cam-focals { display: flex; align-items: stretch; gap: 3px; }
  .cam-focals { margin-left: auto; }
  .cam-bar .chip {
    min-height: 28px; min-width: 0; padding: 0 8px; font-size: 11px; white-space: nowrap; background: transparent;
    display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  }
  .cam-focals .chip { min-width: 28px; padding: 0 6px; }
  .cam-bar .chip i { width: 8px; height: 8px; border-radius: 50%; }
  .cam-focals .chip[aria-checked="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-score); }
  .cam-mm { align-self: center; font-size: 11px; }
  .cam-bar > button.small { min-height: 28px; padding: 0 9px; border-radius: 8px; font-size: 12px; }
  .cam-x, .cam-bar .menu-wrap { display: none; }
  .cam-aim { gap: 3px; padding: 0 5px; }
  .cam-subject-set { display: flex; gap: 2px; }
  .cam-subject[aria-pressed="true"] { border-color: var(--accent); }
  .cam-subject-x { padding: 0 6px; }
  .cam-aim[aria-expanded="true"] { border-color: var(--accent); }
  .cam-dots { display: flex; }
  .cam-dots i + i { margin-left: -2px; box-shadow: 0 0 0 1.5px var(--card); }
  .cam-caret { font-size: 9px; color: var(--muted); }
  @container cam (max-width: 799px) {
    .cam-word, .cam-mm, .cam-clear .cam-label { display: none; }
    .cam-x { display: inline; }
    .cam-bar > button.small { width: 28px; padding: 0; }
  }
  @container cam (max-width: 679px) {
    [data-presets="3"] .cam-presets { display: none; }
    [data-presets="3"] .menu-wrap { display: flex; }
  }
  @container cam (max-width: 559px) {
    .cam-presets { display: none; }
    .cam-bar .menu-wrap { display: flex; }
  }
  @container cam (max-width: 439px) {
    .cam-title, .cam-dir { display: none; }
    .cam-turn button { min-width: 21px; padding: 0 2px; }
    .cam-turn .cam-value { min-width: 36px; padding: 0 3px; font-size: 13px; }
    .cam-turn .cam-value.unset { font-size: 11px; }
    .cam-focals { gap: 2px; }
    .cam-focals .chip { min-width: 22px; padding: 0 2px; }
    .cam-aim { padding: 0 4px; }
    .cam-bar > button.small { width: 24px; }
  }

  .map-moments {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px; position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 2;
    padding: 6px; border-radius: 12px; background: color-mix(in srgb, var(--card) 94%, transparent); border: 1px solid var(--line);
  }
  .map-moments .moon-icon svg { width: 18px; height: 18px; }
  .map-moments[hidden] { display: none; }
  .map-moments .chip { min-height: 28px; padding: 2px 9px; font-size: 12px; background: var(--bg-2); border-color: transparent; }
  .map-moments .chip[aria-pressed="true"] { background: var(--accent); color: var(--on-score); font-weight: 600; }
  .map-moments .align { margin-left: auto; font-size: 13px; font-weight: 600; }
  .map-moments .align.in { color: var(--info); }
  .moon-note { display: flex; align-items: center; gap: 8px; padding-left: 10px; border-left: 1px solid var(--line); font-size: 12px; color: var(--text-2); }
  .moon-note > span:last-child { display: flex; flex-direction: column; line-height: 1.25; }
  .moon-note b { color: var(--text); font-size: 12px; }
  #pane-plan .map-info { bottom: auto; top: 64px; left: 12px; right: auto; }

  /* правая колонка */
  #pane-now .day-list { display: flex; flex-direction: column; gap: 10px; }
  #pane-now .day-list > .ask-yesterday { margin-top: -10px; }
  #pane-now .day-list > .ask-float { margin-bottom: -10px; }
  .place-card { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
  .place-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
  .place-card-head h2 { min-width: 0; margin: 0; font-size: 16px; font-weight: 700; }
  .place-card .plan-actions { flex-wrap: nowrap; }
  .place-card .icon-btn { width: 36px; height: 36px; min-height: 36px; font-size: 16px; }
  .place-card .folders-btn { font-size: 11px; }
  .place-card .save-btn { font-size: 14px; }
  .place-card .plan-meta { font-size: 10px; }
  .place-sun { font-size: 11px; color: var(--text-2); }
  .day-verdict { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; color: var(--on-score); }
  .day-verdict.r3 { background: var(--r3); } .day-verdict.r2 { background: var(--r2); }
  .day-verdict.r1, .day-verdict.r0 { background: var(--bg-2); color: var(--text); border: 1px solid var(--line); }
  .verdict-score { font-size: 28px; font-weight: 800; }
  .verdict-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 11px; }
  .verdict-text b { font-size: 14px; }
  .desk-slot { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); text-align: left; }
  .desk-slot .slot-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .desk-slot .slot-what { font-size: 11px; color: var(--text-2); }
  .desk-slot .slot-line > .muted { flex: none; }
  /* время суток и явления - по две в ряд (Утро | День, Вечер | Ночь, Туман | Красное небо): компактно;
     длинное «что будет» - многоточием, целиком - в подсказке */
  .desk-slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .desk-slots .desk-slot { height: 100%; padding: 10px; gap: 6px; }
  /* не хватает места - время уходит под название; и одно название не влезло - многоточие */
  .desk-slots .slot-line { flex-wrap: wrap; column-gap: 6px; }
  .desk-slots .slot-line > b { min-width: 0; }
  /* правая колонка - не шире ~30%: строки не переносятся, длинное - многоточием (полностью - в подсказке) */
  .place-card-head h2, .place-card .plan-meta, .place-sun, .verdict-text > *, .desk-slot .slot-line > *, .desk-slot .slot-what {
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .data-note { padding: 10px 14px; border-radius: 12px; background: var(--bg-2); font-size: 12px; color: var(--muted); }
  .data-note summary { cursor: pointer; color: var(--text-2); }


}

/* «Сейчас»: итог дня под вкладками дней */
.day-hint { margin: 0; padding: 8px 12px; border-radius: 10px; font-size: 13px; line-height: 1.35; background: var(--card); color: var(--muted); }
.day-hint.good { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent-2); }
@media (min-width: 1024px) {
  #pane-plan .leaflet-top.leaflet-right { margin-top: 60px; } /* под кнопкой «Легенда» */
}

/* «Ещё» по группам (заметки дизайна): заголовок капсом и карточка на группу */
#more-body.card { background: transparent; border: 0; padding: 0; }
#more-body > .settings-group:first-child, #account-body > .settings-group:first-child { margin-top: 0; }
.group-card .section { margin: 0; padding: 0; border: 0; }
.group-card .section > h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.group-card .section + .section { border-top: 1px solid var(--line); padding-top: 12px; }
.group-card .days { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.group-card details.advanced { margin: 0; }
.group-card details.advanced > summary { display: none; }
.profile-row { display: flex; align-items: center; gap: 12px; }
.profile-row .avatar { width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--line); display: grid; place-items: center; font-weight: 700; }
.profile-row .profile-email { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.group-card .about { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; }
.group-card > button.danger { align-self: flex-start; }
details.fetch-info > summary { cursor: pointer; }

/* состояния (canvas «Состояния»): баннер лимита/без сети, чип свежести, точка без погоды */
.stale-banner { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 14px;
  background: color-mix(in srgb, var(--r2) 14%, var(--card)); border: 1px solid color-mix(in srgb, var(--r2) 45%, var(--line)); }
.stale-icon { width: 18px; height: 18px; flex: none; margin-top: 1px; border-radius: 50%; border: 2px solid var(--r2); color: var(--r2);
  display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.stale-text { flex: 1; display: flex; flex-direction: column; gap: 4px; font-size: 13px; line-height: 1.35; color: var(--text-2); }
.stale-text b { font-size: 14px; color: var(--text); }
.stale-banner button { flex: none; min-height: 32px; border-color: color-mix(in srgb, var(--r2) 45%, var(--line)); background: transparent; color: var(--r2); }
.fresh-chip { align-self: flex-start; display: inline-flex; margin-top: 2px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600;
  background: color-mix(in srgb, var(--info) 16%, transparent); color: var(--info); }
.fresh-chip.old { background: var(--bg-2); color: var(--muted); }
.nw-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px; background: var(--card); }
.nw-head { display: flex; justify-content: space-between; gap: 8px; }
.nw-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.nw-tile { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--bg-2); font-size: 12px; }
.nw-tile b { font-size: 15px; }
.nw-bar { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.nw-bar i { flex: 1; height: 8px; border-radius: 4px; background: repeating-linear-gradient(90deg, var(--line) 0 12px, var(--bg-2) 12px 24px); }
.nw-card p { margin: 0; }

/* «По часам» (HourlyTable.dc.html): на компьютере - под колонками, на телефоне - отдельный экран «Сейчас» */
.pane-hours:not([hidden]) { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pane-hours[hidden] { display: none; }
.hours-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; }
.hours-title h2 { margin: 0; font-size: 15px; font-weight: 600; }
.hours-title .muted { font-size: 12px; }
.hours-table { display: flex; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px 0 10px 10px; overflow: hidden; }
.hours-labels { flex: none; width: 104px; display: flex; flex-direction: column; }
.hours-scroll { flex: 1; min-width: 0; overflow-x: auto; }
.hours-cols { display: flex; gap: 2px; padding-right: 10px; width: max-content; min-width: 100%; justify-content: space-between; }
.hours-label { height: 26px; display: flex; align-items: center; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.hours-labels > .hours-label:first-child, .hour-num { height: 30px; }
.hours-head { box-sizing: border-box; height: 22px; margin-top: 6px; padding-top: 10px; line-height: 12px; font-size: 10px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--info); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hour-col { flex: 1 0 36px; min-height: 0; padding: 0; border: 0; border-radius: 8px; display: flex; flex-direction: column; background: transparent; }
.hour-col.dark { background: var(--night-col); }
.hour-col.on { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.hour-num { display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 500; color: var(--text-2); }
.hour-col.on .hour-num { font-weight: 700; color: var(--on-score); background: var(--accent); border-radius: 6px; margin: 4px 3px; height: 22px; }
.hour-cell { height: 26px; display: flex; align-items: center; justify-content: center; }
.score-cell { width: 30px; height: 20px; border-radius: 5px; display: grid; place-items: center; font-size: 11px; font-weight: 600; color: var(--on-score); }
.score-cell.r3 { background: var(--r3); } .score-cell.r2 { background: var(--r2); } .score-cell.r1 { background: var(--r1); }
.score-cell.low { background: var(--r0-bg); color: var(--muted); }
.empty-cell { width: 28px; height: 3px; border-radius: 2px; background: var(--bg-2); }
.pct-cell { width: 30px; height: 20px; border-radius: 5px; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: var(--bg);
  background: rgb(163 170 196 / var(--a)); }
.pct-cell.rain { background: rgb(59 130 246 / var(--a)); }
.sun-mark { font-size: 14px; color: var(--text-2); }
.sun-mark.sun { color: var(--sun-mark); }
.sun-mark.muted { color: var(--muted); }
.temp { font-size: 12px; }
.hour-detail { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 16px; background: var(--bg-2); font-size: 14px; line-height: 1.45; }
.hour-detail-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.hour-detail-head b { font-size: 17px; }
.hour-detail .text-2 { color: var(--text-2); }
.hour-detail .muted { font-size: 13px; }

/* «Сейчас»: шапка дня (Now.dc.html) */
.day-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.day-date { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.day-date b { font-size: 15px; }
.day-date .muted { font-size: 12px; }
.day-panel-head .on-map { flex: none; min-height: 32px; font-size: 12px; border-radius: 9px; }
.slot-row.no-window .badge-score { color: var(--muted); }
button.hourly-card { width: 100%; text-align: left; }

/* экраны «Слот» (Slot.dc.html) и «По часам» на телефоне */
.sub-head { display: flex; align-items: center; gap: 8px; }
.sub-head .icon-btn.plain { width: 44px; height: 44px; border: 0; background: transparent; font-size: 28px; line-height: 1; }
.sub-title { display: flex; flex-direction: column; min-width: 0; }
.sub-title b { font-size: 17px; }
.sub-title .muted { font-size: 12px; }
.slot-hero { display: flex; align-items: center; gap: 14px; }
.slot-hero > div:last-child { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.slot-hero b { font-size: 18px; }
.ring.small { width: 60px; height: 60px; font-size: 22px; border-width: 4px; flex: none; }
.slot-table { background: var(--card); border-radius: 16px; padding: 12px 10px; display: flex; flex-direction: column; gap: 6px; }
.slot-grid { display: grid; grid-template-columns: 72px repeat(var(--cols), minmax(0, 1fr)); gap: 2px; align-items: end; }
.slot-grid > .muted, .slot-label { font-size: 11px; align-self: center; }
.slot-label { font-size: 12px; color: var(--text-2); }
.slot-hour { min-height: 32px; padding: 0; border-radius: 8px; font-size: 13px; background: transparent; color: var(--text-2); }
.slot-hour.on { background: var(--accent); border-color: var(--accent); color: var(--on-score); font-weight: 700; }
.slot-event { font-size: 10px; text-align: center; color: var(--r2); white-space: nowrap; overflow: visible; margin: 0 -6px; }
.slot-sep { height: 1px; background: var(--line); margin: 4px 0; }
.slot-cell { min-height: 40px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; padding: 2px 0; border-radius: 6px; font-size: 11px; color: var(--muted); }
.slot-cell.on { background: color-mix(in srgb, var(--text) 6%, transparent); font-weight: 700; }
.slot-cell i { width: 70%; border-radius: 3px; }
.slot-cell i.r3 { background: var(--r3); } .slot-cell i.r2 { background: var(--r2); } .slot-cell i.r1 { background: var(--r1); } .slot-cell i.r0 { background: var(--r0); }
.slot-cell i.none { background: var(--line); } .slot-cell i.wx { background: var(--w-cloud); }
.slot-table .small-note { margin: 4px 0 0; }
.wide-btn { width: 100%; min-height: 44px; font-weight: 500; }
.slot-hour-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px; background: var(--bg-2); }
.slot-hour-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; font-size: 12px; color: var(--muted); }
.slot-hour-stats span { display: flex; flex-direction: column; gap: 2px; }
.slot-hour-stats b { font-size: 16px; color: var(--text); }
.slot-why summary { cursor: pointer; color: var(--muted); font-size: 13px; }
/* плитки карточки часа: ветер, осадки, УФ, видимость - по две в ряд */
.hour-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hour-tile { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 8px 10px; border-radius: 12px; background: var(--card); }
.tile-k { font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.tile-v { display: flex; align-items: baseline; gap: 6px; min-width: 0; white-space: nowrap; }
.tile-v b { font-size: 18px; }
.tile-v .muted { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.tile-arrow { display: inline-block; font-size: 15px; }
.tile-note { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-note.warn { color: var(--accent-2); font-weight: 600; }
.shot-hints { display: flex; flex-direction: column; gap: 6px; }
.shot-hints ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.shot-hint { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 26px; padding: 3px 10px;
  border-radius: 999px; background: var(--card); color: var(--text-2); font-size: 12px; font-weight: 500; }
.shot-hint::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--go); }
.shot-hint.warn::before { background: var(--careful); }
.shot-hint.bad::before { background: var(--stop); }
@media (max-width: 1023px) {
  #days .hours-labels { width: 92px; }
  #days .hour-col { flex: 0 0 34px; }
}

/* «План»: лента времени с бегунком (Main.dc.html) */
.time-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.time-row .plan-days { flex: 1 1 auto; min-width: 0; }
.time-step { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.time-row .step { width: 32px; min-height: 32px; height: 32px; padding: 0; border-radius: 9px; background: var(--card); display: grid; place-items: center; font-size: 15px; }
.time-now { min-width: 64px; display: flex; flex-direction: column; align-items: center; line-height: 1.05; }
.time-now b { font-size: 22px; font-weight: 700; }
.time-now .near { min-height: 12px; font-size: 10px; font-weight: 500; color: var(--accent-2); }
.pos-btn { display: flex !important; gap: 3px; align-items: center; justify-content: center; width: auto !important; padding: 0 8px !important; }
.pos-btn i { width: 5px; height: 8px; border-radius: 3px; background: var(--line); }
.pos-btn i.on { height: 14px; background: var(--accent); }
.tband { position: relative; height: 56px; flex: none; overflow: hidden; border-radius: 12px; background: var(--card); border: 1px solid var(--line);
  touch-action: pan-y; cursor: grab; user-select: none; transition: height 0.25s ease; }
.tband.expanded { height: calc(54px + var(--rows, 8) * 22px + 6px); } /* строки + переключатели «ветер», «мм» */
.tband:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tband-track { position: absolute; top: 0; bottom: 0; transition: left 0.18s ease-out; }
.tband-zone { position: absolute; top: 0; height: 54px; }
.tband-zone.night { background: var(--night-col); }
.tband-zone.blue { background: rgba(110, 139, 255, 0.18); }
.tband-zone.gold { background: rgba(242, 177, 60, 0.18); }
.tband-tick { position: absolute; top: 42px; width: 1px; height: 8px; background: var(--line); }
.tband-tick.major { height: 14px; top: 40px; }
.tband-hour { position: absolute; top: 29px; transform: translateX(-50%); font-size: 10px; color: var(--muted); }
.tband-event { position: absolute; height: 14px; min-height: 0; padding: 0 4px; border: 0; border-radius: 0; background: transparent;
  display: flex; align-items: center; gap: 4px; font-size: 10px; white-space: nowrap; }
.tband-event i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.tband-event.dot-only { width: 14px; justify-content: center; }
.tband-event.dot-only i { box-shadow: 0 0 0 2px color-mix(in srgb, var(--text) 18%, transparent); }
.tband-row { position: absolute; left: 0; height: 20px; display: flex; gap: 1px; }
.tband-row i { flex: 0 0 calc(var(--pph, 44px) - 1px); height: 14px; margin-top: 3px; border-radius: 4px; }
.tband-row i.r3 { background: var(--r3); } .tband-row i.r2 { background: var(--r2); } .tband-row i.r1 { background: var(--r1); } .tband-row i.r0 { background: var(--r0); }
.tband-row i.moon { background: var(--line); }
.tband-labels { position: absolute; left: 0; top: 54px; bottom: 0; width: 92px; pointer-events: none;
  background: linear-gradient(90deg, var(--card) 70%, transparent); display: flex; flex-direction: column; }
.tband-labels span { height: 22px; display: flex; align-items: center; padding-left: 6px; font-size: 11px; color: var(--text-2); white-space: nowrap; }
.tband-needle { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--accent); pointer-events: none; }
.tband-phase { position: absolute; right: 8px; top: 4px; font-size: 11px; font-weight: 600; color: var(--accent-2); pointer-events: none;
  background: color-mix(in srgb, var(--card) 80%, transparent); padding: 0 4px; border-radius: 4px; }
.metric-score[data-r="plain"] { color: var(--text); }
.meter i.plain { background: var(--w-cloud); }
.plan-foot { margin: 0; }
.sun-note { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.desk-band { display: none; }

@media (max-width: 1023px) {
  /* панель: высота - одно из трёх положений, тянется за ручку и шапку */
  #pane-plan .sheet { max-height: none; height: 50%; transition: height 0.25s ease; }
  #pane-plan .sheet.dragging { transition: none; }
  #pane-plan .sheet.minimal { overflow: hidden; } /* свёрнута: только ручка и название места, карта - почти вся */
  #pane-plan .sheet-handle, #pane-plan .plan-head { touch-action: none; cursor: grab; }
}
@media (min-width: 1024px) {
  .desk-band:not(:empty) { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
  .desk-band .time-row { justify-content: flex-end; }
  .desk-band .time-step { margin-left: 0; }
  #pane-plan .map-moments { flex-wrap: nowrap; }
}

/* «Отправить пользователю» и присланная папка */
.invite-form { display: grid; gap: 10px; }
.invite-form label { display: grid; gap: 4px; }
.invite-offer { margin: 0 0 12px; }
/* свой CSS в профиле */
.custom-css-box { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.custom-css-box textarea { width: 100%; box-sizing: border-box; font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  resize: vertical; }
.custom-css-box button { justify-self: start; }
.alert-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.alert-row select { width: auto; min-width: 72px; font-weight: 600; }
.alert-row .form-error { flex-basis: 100%; }
.alert-row .form-error:empty { display: none; }
.prefetch-row { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.prefetch-row > button { align-self: flex-start; }

/* компьютер: лента под картой, управление - внутри неё; кнопка «Легенда» */
.layers-label { display: none; }
.tband-left, .tband-right { display: none; }
@media (min-width: 1024px) {
  #layers-btn { width: auto; height: 34px; padding: 0 12px; border-radius: 9px; font-size: 13px; }
  #layers-btn svg { display: none; }
  #layers-btn .layers-label { display: inline; }
  /* узкая карта: панели «Облаков» и «Слоёв» шире, «Легенда» - значком (app.js: placePanels) */
  .plan-map.tight #layers-btn { width: 34px; padding: 0; display: grid; place-items: center; }
  .plan-map.tight #layers-btn svg { display: block; }
  .plan-map.tight #layers-btn .layers-label { display: none; }
  .desk-band:not(:empty) { margin-top: 10px; }
  .desk-band .tband-phase { display: none; }
  .desk-band .tband-labels { width: 110px; }
  .tband-left, .tband-right { position: absolute; top: 4px; height: 46px; z-index: 2; display: flex; align-items: center; gap: 4px; padding: 0 6px;
    background: color-mix(in srgb, var(--card) 80%, transparent); border-radius: 10px; }
  .tband-left { left: 4px; }
  .tband-right { right: 4px; gap: 6px; font-size: 11px; max-width: 42%; }
  .tband-right .band-info .align { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .tband-right .band-info { min-width: 0; }
  .tband-left .step, .tband-right .step { width: 28px; min-height: 28px; height: 28px; padding: 0; border-radius: 8px; background: var(--bg-2); display: grid; place-items: center; font-size: 14px; }
  .tband-left { padding: 0 8px; cursor: ns-resize; }
  .tband-left .time-now { min-width: 0; align-items: flex-start; }
  .tband-left .time-now b { font-size: 15px; }
  .tband-left .time-now .near { font-size: 10px; }
  .band-phase { font-weight: 600; color: var(--accent-2); }
  .band-info { display: flex; align-items: center; gap: 8px; }
  .band-info .align { font-weight: 600; }
  .band-info .align.in { color: var(--info); }
  .band-info .moon-note { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; color: var(--text-2); cursor: help; }
}
.tband-needle::before { content: ""; position: absolute; left: -5px; top: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 7px solid var(--accent); }

/* «Карта без сети» → районы своей карты */
.areas { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.areas > button { align-self: flex-start; }
.area-list { display: flex; flex-direction: column; gap: 6px; }
.area-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
.leaflet-container .maplibregl-canvas { outline: none; }
/* уровень масштаба между «+» и «-» */
.leaflet-bar .zoom-level {
  display: block; width: 30px; padding: 2px 0; text-align: center; font-size: 11px; font-weight: 600; line-height: 14px;
  font-variant-numeric: tabular-nums; color: #444; background: #fff; /* как кнопки Leaflet в обеих темах */
  border-bottom: 1px solid #ccc; user-select: none;
}
/* телефон: та же цифра отдельной плашкой в углу карты */
.leaflet-right .zoom-chip.map-chip {
  display: inline-block; width: auto; margin-right: 8px; padding: 2px 7px; border: 0; border-radius: 999px;
  font-size: 11px; font-weight: 600; line-height: 16px; font-variant-numeric: tabular-nums; pointer-events: none;
}
.core-disc { display: block; width: 16px; height: 16px; border-radius: 50%; box-shadow: 0 0 0 2px #121829;
  background: radial-gradient(circle, #FFFFFF 0 18%, #8FB8FF 40%, rgba(143, 184, 255, 0.25) 75%); }
.map-chip.building, .legend-building { color: var(--r2); font-weight: 600; }
/* вход по коду: крупные цифры */
.code-input { font: 600 1.6rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.35em; text-align: center; }
/* соседний день на ленте: его имя в начале суток */
.tband-day { position: absolute; top: 40px; font-size: 10px; font-weight: 600; color: var(--accent-2); white-space: nowrap; pointer-events: none; }
/* «По часам»: начало суток - имя дня вместо 00 и черта между днями */
.hour-col.day-start { box-shadow: inset 2px 0 0 var(--line); }
.hour-col.day-start .hour-num { font-size: 10px; font-weight: 700; color: var(--accent-2); white-space: nowrap; }
.hour-col.day-start.on .hour-num { color: var(--on-score); }
/* чей фон на карте: OpenStreetMap (серый значок) или своя карта RedSky (оранжевый) */
.base-badge { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 8px 8px !important; padding: 3px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--bg-2) 88%, transparent); border: 1px solid var(--line); color: var(--text-2);
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em; pointer-events: auto; cursor: default; }
.base-badge i { width: 8px; height: 8px; border-radius: 50%; background: #7ebc6f; }
.base-badge.own i { background: var(--accent); }
/* «Рельеф района готовится» на компьютере - над «Картой RedSky» */
.building-badge { margin: 0 0 6px 8px !important; pointer-events: auto; }
.building-badge:empty { display: none; }
.building-badge .map-chip { display: inline-block; font-size: 11px; padding: 3px 9px; border: 1px solid var(--line); }
/* «Погода словами»: снег, град, гроза, ветер, УФ - фразами; опасное - красной чертой, заметное - оранжевой */
.weather-words { padding: 14px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); display: grid; gap: 8px; }
.weather-words h3 { margin: 0; font-size: 0.95rem; }
.weather-words ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.weather-words .ww { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0 6px 10px; border-left: 3px solid var(--line); font-size: 0.92rem; line-height: 1.35; }
.weather-words .ww.warn { border-left-color: var(--accent); }
.weather-words .ww.danger { border-left-color: var(--danger); }
.weather-words .ww-icon { flex: none; width: 1.3em; text-align: center; }
.weather-words p { margin: 0; }
/* правая колонка: Радуга - на всю ширину, «явлений нет» - приглушённо; легенда телефона - кнопка скрыть/показать */
.desk-slot.empty { opacity: 0.6; }
/* t° части суток под баллом: не шире бейджа и в нижнем отступе карточки - карточка не растёт */
.desk-slot .slot-side { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; margin-bottom: -10px; }
.desk-slot .slot-temp { margin: 0 -12px; font-size: 12px; line-height: 1.2; color: var(--muted); white-space: nowrap; }
.map-chips .map-chip { pointer-events: auto; cursor: pointer; }
.map-chip.legend-toggle { font-weight: 600; border: 1px solid var(--line); }
.rainbow-icon { display: inline-block; vertical-align: -1px; }
/* правая колонка на компьютере (не шире ~30% экрана): общие с телефоном блоки - тоже на 2 px мельче */
@media (min-width: 1024px) {
  #pane-now { font-size: 13px; container: now / inline-size; }
  #pane-now button.small { font-size: calc(0.9rem - 2px); }
  #pane-now .small-note { font-size: calc(0.85rem - 2px); }
  #pane-now .fresh-chip { font-size: 9px; }
  #pane-now .badge-score { min-width: 42px; height: 32px; font-size: 15px; }
  #pane-now .slot-temp { font-size: 10px; }
  #pane-now .slot-side { margin-bottom: -8px; } /* отступ карточки здесь 10 px: t° - в нём, но не на рамке */
  #pane-now .weather-words h3 { font-size: calc(0.95rem - 2px); }
  #pane-now .weather-words .ww { font-size: calc(0.92rem - 2px); }
  #pane-now .hour-detail { font-size: 12px; }
  #pane-now .hour-detail-head { flex-wrap: nowrap; font-size: 11px; }
  #pane-now .hour-detail-head b { flex: none; font-size: 15px; white-space: nowrap; }
  #pane-now .hour-detail-head > span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #pane-now .hour-detail .muted { font-size: 11px; }
  /* «Погода словами» в панели разбора часа: под едва заметной чертой */
  #pane-now .weather-words.inline { padding: 8px 0 0; border: 0; border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
    border-radius: 0; background: none; gap: 6px; }
  #pane-now .weather-words.inline .ww { font-size: 12px; padding: 2px 0 2px 8px; }
  #pane-now .stale-text { font-size: 11px; }
  #pane-now .stale-text b { font-size: 12px; }
  #pane-now .stale-icon { font-size: 9px; }
  #pane-now .nw-tile, #pane-now .nw-bar { font-size: 10px; }
  #pane-now .nw-tile b { font-size: 13px; }
  #pane-now .review h3 { font-size: calc(1.05rem - 2px); }
  #pane-now .intro h1 { font-size: calc(1.3rem - 2px); }
}
/* угол карты (app.js, clouds): сверху «Облака», под ними «Слои» - круглые кнопки столбиком. Панель кнопки - справа
   от неё, на её уровне; обе панели одной ширины (--pop-w). Под панель облаков место оставлено всегда (--clouds-pop-h):
   её открытие не сдвигает «Слои»; кнопка «Облака» - по середине своей панели. Ярусы облаков - сегменты в строку (у «Слоёв» -
   галочки по три в строку), ниже - ползунок непрозрачности с « %» у правого конца.
   Пометка («облака недоступны») - под кнопками и открытыми панелями (app.js: placePanels), легенда - ещё ниже */
.map-tools {
  --pop-w: min(300px, calc(100vw - 96px)); --clouds-pop-h: 58px;
  position: absolute; left: 12px; top: 12px; z-index: 4; display: flex; flex-direction: column; align-items: flex-start;
  pointer-events: none;
}
.map-tool { position: relative; display: flex; pointer-events: auto; }
/* «Облака» - высотой с их панель: кнопка по её середине, панель от верха; «Слои» - на 8 px ниже */
#clouds-tool { height: var(--clouds-pop-h); align-items: center; }
#map-layers { margin-top: 8px; }
.map-tool-btn {
  width: 40px; height: 40px; min-height: 0; padding: 0; display: grid; place-items: center; border-radius: 50%;
  background: color-mix(in srgb, var(--card) 94%, transparent); color: var(--text); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
.map-tool-btn[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--card)); color: var(--accent-2); }
.map-tool-btn[aria-expanded="true"] { border-color: var(--accent); }
.map-tool-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.map-pop {
  position: absolute; left: calc(100% + 8px); top: 0; box-sizing: border-box; width: var(--pop-w); display: flex;
  flex-direction: column; gap: 4px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); color: var(--text); font-size: 12px; line-height: 1.3; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}
.clouds-panel { height: var(--clouds-pop-h); justify-content: center; }
/* под ярусами: Play, его скорость (×1/×2/×4) и ползунок непрозрачности - на остальную ширину */
.clouds-row { display: flex; align-items: center; gap: 4px; min-width: 0; }
.clouds-row > .pop-opacity { flex: 1; min-width: 0; margin-left: 2px; }
.clouds-play, .clouds-speed {
  flex: none; min-height: 0; padding: 0; border: 1px solid var(--line); background: var(--bg-2); color: var(--text);
  display: grid; place-items: center; cursor: pointer;
}
.clouds-play { width: 22px; height: 22px; border-radius: 50%; }
.clouds-play .pause-icon, .clouds-play[aria-pressed="true"] .play-icon { display: none; }
.clouds-play[aria-pressed="true"] .pause-icon { display: block; }
.clouds-play[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--card)); color: var(--accent-2); }
.clouds-speed { height: 18px; padding: 0 3px; border-radius: 9px; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.clouds-play:focus-visible, .clouds-speed:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.map-pop[hidden], .clouds-note[hidden] { display: none; }
/* «Дата»: колёса число, месяц, год (выбранное - по центру, в полосе); ниже - восход, заход, луна, ядро */
#astro-tool { margin-top: 8px; }
#astro-btn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent-2); }
.date-wheels { max-width: 360px; }
.wheels { position: relative; display: grid; grid-template-columns: 1fr 1.3fr 1.3fr; gap: 6px; }
.wheels::before {
  content: ""; position: absolute; left: 0; right: 0; top: 64px; height: 32px; border-radius: 8px; pointer-events: none;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.wheel {
  height: 160px; overflow-y: auto; scroll-snap-type: y mandatory; padding: 64px 0; box-sizing: border-box;
  scrollbar-width: none; mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); outline: none;
}
.wheel::-webkit-scrollbar { display: none; }
.wheel:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); border-radius: 8px; }
.wheel-item { height: 32px; line-height: 32px; text-align: center; scroll-snap-align: center; cursor: pointer; font-size: 15px;
  font-variant-numeric: tabular-nums; color: var(--muted); }
.wheel-item[aria-selected="true"] { color: var(--text); font-weight: 700; }
.astro-info { display: grid; gap: 3px; max-width: 360px; font-size: 13px; }
.astro-row { display: flex; justify-content: space-between; gap: 8px; }
.astro-row b { font-weight: 600; white-space: nowrap; }
.astro-row span { text-align: right; font-variant-numeric: tabular-nums; }
/* ярусы облаков: все, низкие, средние, высокие - четыре сегмента на всю ширину панели, каждый - по своей подписи плюс
   поровну остатка («все» короче); выбранный - как нажатая кнопка угла карты; не влезла подпись - многоточие (полностью -
   в подсказке) */
.tier-switch {
  display: flex; gap: 2px; height: 20px; box-sizing: border-box;
  padding: 1px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-2);
}
.tier-switch button {
  flex: 1 1 auto; min-width: 0; min-height: 0; height: 16px; padding: 0 3px; border: 0; border-radius: 999px;
  background: transparent; color: var(--muted); font-size: 11px; line-height: 16px; cursor: pointer;
}
.tier-switch button span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tier-switch button[aria-checked="true"] { background: color-mix(in srgb, var(--accent) 16%, var(--card)); color: var(--accent-2); }
.tier-switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pop-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 6px; }
.pop-row .map-check { gap: 4px; }
.pop-row .map-check span { overflow: hidden; text-overflow: ellipsis; }
.pop-opacity { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.pop-opacity input[type="range"] { flex: 1; min-width: 0; min-height: 0; height: 18px; margin: 0; padding: 0; border: 0;
  background: transparent; accent-color: var(--accent); cursor: pointer; }
.pop-opacity-value { min-width: 4ch; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.clouds-note { position: absolute; left: 0; top: calc(100% + 8px); }
.map-check { display: flex; align-items: center; gap: 6px; min-height: 20px; white-space: nowrap; cursor: pointer; }
.map-check input[type="checkbox"] { width: 15px; height: 15px; }
.clouds-note {
  max-width: 220px; padding: 3px 8px; border-radius: 999px; font-size: 11px; line-height: 1.3; pointer-events: auto;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: color-mix(in srgb, var(--bg) 85%, transparent); color: var(--muted);
}
.clouds-note.bad { color: var(--r2); font-weight: 600; }
@media (max-width: 1023px) {
  #pane-plan .map-tools { left: 16px; top: calc(72px + env(safe-area-inset-top)); }
  /* легенда и подписи - под столбиком кнопок (72 + 40 + 58 + 8 + 8) */
  #pane-plan .plan-map :is(.map-chips, .map-credit) { top: calc(186px + env(safe-area-inset-top)); }
}
@media (min-width: 1024px) {
  /* легенда - под столбиком кнопок «Облака» и «Слои» (12 + 40 + 58 + 8 + 8) */
  .map-chips.panel:not(.closed) { top: 126px; max-height: calc(100% - 178px); }
}
/* компьютер: легенда - не ниже значка подложки внизу карты, дальше прокрутка */
.map-chips.panel { max-height: calc(100% - 52px); overflow-y: auto; }

/* чипы-переключатели в ряд (нажат - выбран): «Снимки рядом» - источник и радиус */
.layer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; flex-basis: 100%; }
.layer-label { font-size: 11px; color: var(--muted); margin-right: 2px; }
.layer-toggle { pointer-events: auto; cursor: pointer; border: 1px solid var(--line); font: inherit; font-size: 11px;
  min-height: 0; min-width: 0; height: auto; padding: 2px 8px; border-radius: 999px; line-height: 1.4; box-shadow: none; }
.layer-chip { background: var(--bg-2); color: var(--text-2); }
.layer-toggle[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.layer-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* карточка места: заметка, ссылка, свои фото */
.place-extras { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; min-width: 0; }
.place-note { margin: 0; font-size: 12px; color: var(--text-2); white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden; }
.place-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; }
.place-links a { color: var(--accent); text-decoration: none; }
.place-source { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.source-shot img { display: block; width: 56px; height: 40px; border-radius: 6px; object-fit: cover; background: var(--line); }
.photo-strip { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.photo-thumb { flex: none; width: 72px; height: 54px; min-height: 0; padding: 0; border: 1px solid var(--line); border-radius: 8px;
  overflow: hidden; background: var(--bg-2); cursor: zoom-in; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-thumb img.broken { visibility: hidden; }
.photo-add { flex: none; height: 54px; }
.photo-full { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto 10px; border-radius: 10px; }
.note-form { display: flex; flex-direction: column; gap: 8px; }
.note-form textarea { resize: vertical; font: inherit; }

/* «Снимки рядом»: сетка карточек с автором, лицензией, расстоянием */
.nearby-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 8px;
  max-height: 65vh; overflow-y: auto; }
.nearby-card { margin: 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.nearby-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: var(--bg-2); display: block; }
.nearby-card img.broken { visibility: hidden; }
.nearby-card figcaption { display: flex; flex-direction: column; gap: 2px; font-size: 11px; min-width: 0; }
.nearby-card figcaption b { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nearby-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nearby-actions a { color: var(--accent); text-decoration: none; }
.nearby-actions button { min-height: 0; padding: 2px 8px; font-size: 11px; }

/* значок карточки правой колонки - только в компактном виде */
.desk-slot .slot-ico { display: none; }
@media (min-width: 1024px) {
  /* «В избранное» в карточке места - звёздочкой: подпись и папки - в подсказке */
  .place-card .folders-btn .folders-label { display: none; }
  .place-card .folders-btn { min-width: 0; padding: 0 10px; }
  .now-toggle { font-size: 16px; }

  /* компактная колонка прогноза: место - название и значки, итог - балл и строка, карточки - значок, балл, t° */
  :root[data-now="compact"] #pane-now .place-card { padding: 10px; }
  :root[data-now="compact"] #pane-now .place-card-head { flex-direction: column; align-items: stretch; gap: 6px; }
  :root[data-now="compact"] #pane-now .place-card-head h2 { font-size: 14px; }
  :root[data-now="compact"] #pane-now .plan-actions { justify-content: space-between; }
  :root[data-now="compact"] #pane-now .plan-actions .icon-btn,
  :root[data-now="compact"] #pane-now .plan-actions .folders-btn { width: 32px; height: 32px; min-height: 0; padding: 0; }
  :root[data-now="compact"] #pane-now :is(.plan-meta, .place-sun, .place-extras, .small-note, .fresh-chip) { display: none; }
  :root[data-now="compact"] #pane-now .day-verdict { padding: 8px 10px; gap: 8px; }
  :root[data-now="compact"] #pane-now .verdict-score { font-size: 22px; }
  :root[data-now="compact"] #pane-now .verdict-text > :not(:first-child) { display: none; }
  :root[data-now="compact"] #pane-now .verdict-text b { font-size: 12px; }
  :root[data-now="compact"] #pane-now .desk-slots { gap: 6px; }
  :root[data-now="compact"] #pane-now .desk-slot { padding: 6px; gap: 4px; justify-content: space-between; }
  :root[data-now="compact"] #pane-now .desk-slot .slot-main { display: none; }
  :root[data-now="compact"] #pane-now .desk-slot .slot-ico { display: grid; place-items: center; color: var(--text-2); }
  :root[data-now="compact"] #pane-now .slot-side { margin-bottom: 0; }
  :root[data-now="compact"] #pane-now .slot-temp { margin: 0; }
  :root[data-now="compact"] #pane-now :is(#hour-detail-slot, .ask-panel, .ask-yesterday) { display: none; }
}

/* источник карты и облаков - строкой в углу карты, видна и без легенды (ODbL: © OpenStreetMap - на виду) */
.map-credit { position: absolute; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.map-credit:empty { display: none; }
.map-credit .map-chip { font-size: 10px; padding: 2px 8px; }
@media (max-width: 1023.98px) {
  /* телефон: под строкой поиска, а когда легенда включена - под ней (её высоту знает только раскладка) */
  #pane-plan .map-credit { top: calc(72px + env(safe-area-inset-top)); left: 16px; right: 16px; }
  #pane-plan .map-chips:not([hidden]) ~ .map-credit { display: none; }
  #pane-plan .map-chips:not([hidden]) { padding-bottom: 0; }
}
@media (min-width: 1024px) {
  .map-credit { right: 12px; bottom: 12px; justify-content: flex-end; max-width: 60%; }
}
#map-legend[hidden] { display: none; } /* легенда выключена: блока нет и у панели компьютера */

/* оценка красного неба 0..10 - ряд маленьких кнопок (переносится на узком экране) */
.rating-scale { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 3px; width: 100%; max-width: 420px; }
.rating-scale button { min-width: 0; min-height: 30px; padding: 0; font-variant-numeric: tabular-nums; }
.question .q-hint { font-size: 0.85em; }
.question .q-actions:has(.rating-scale) { flex: 1 1 100%; margin-left: 0; }
.rating-scale button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: #1a1020; }

/* «Как было?» - по нажатию на карточку прошедшего времени суток (компьютер: под карточками) или в разборе слота
   (телефон). Карточка, у которой можно отметить, - с карандашом в углу; открыта - обведена */
.ask-panel { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px solid var(--accent);
  border-radius: 14px; background: var(--card); }
.ask-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ask-head .icon-btn { width: 28px; height: 28px; min-height: 0; font-size: 18px; }
.ask-head + .question { border-top: 0; }
/* Временные панели не занимают места в раскладке - ни одна колонка и «По часам» не сдвигаются.
   «Вчера»: якорь нулевой высоты прилипает к низу видимой части колонки «Сейчас» (на телефоне - над вкладками),
   ряд - над ним, открытая отметка - над рядом. Отметка по карточке - якорь под карточками, панель - поверх ниже */
.ask-yesterday { position: sticky; bottom: 12px; z-index: 6; height: 0; margin-top: -12px; } /* минус зазор колонки */
.ask-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-wrap: nowrap; align-items: center; gap: 4px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--card);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18); }
.ask-bar > .ask-panel, .ask-float > .ask-panel { position: absolute; left: -1px; right: -1px; z-index: 6;
  max-height: min(60vh, 520px); overflow-y: auto; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22); }
.ask-bar > .ask-panel { bottom: calc(100% + 6px); }
.ask-bar .ask-hide { width: 26px; height: 26px; min-height: 0; margin-left: auto; font-size: 16px; color: var(--muted); }
.ask-float { position: relative; height: 0; margin-bottom: -12px; z-index: 6; }
.ask-float > .ask-panel { top: 0; left: 0; right: 0; }
@media (max-width: 1023px) {
  #pane-now .ask-yesterday { bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 8px); }
}
.ask-yesterday .chip.askable { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ask-yesterday .chip.asking { border-color: var(--accent); color: var(--accent); }
.desk-slot.askable { position: relative; }
.desk-slot.askable::after { content: "✎"; position: absolute; top: 3px; right: 6px; font-size: 11px; color: var(--muted); }
.desk-slot.asking { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

/* «По часам»: группа «Погода+» (WebConditions.dc.html) - числа в каждом часе, цвет - по силе */
.wx-num { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.wx-num.small { font-size: 11px; }
.wx-num.breeze { color: var(--info); }
.wx-num.fresh { color: var(--accent-2); }
.wx-num.strong { color: var(--stop); }
.wx-num.bold { font-weight: 700; }
.wx-num.warn { color: var(--accent-2); }
.wx-arrow { display: inline-block; font-size: 14px; color: var(--text-2); }
.wx-rain { width: 30px; height: 20px; border-radius: 5px; display: grid; place-items: center; font-size: 10px; font-weight: 600;
  color: var(--text); background: color-mix(in srgb, var(--w-rain) calc(var(--a) * 100%), transparent); }
.wx-rain.heavy { color: #FFFFFF; }
.wx-uv { width: 30px; height: 20px; border-radius: 5px; display: grid; place-items: center; font-size: 11px; font-weight: 600; color: #1C1F2B; }
.wx-uv.uv0 { background: #CFE8C9; } .wx-uv.uv1 { background: #F6DE8B; } .wx-uv.uv2 { background: #F5B26B; } .wx-uv.uv3 { background: #E9806E; }
.wx-dew { font-size: 11px; padding: 2px 3px; border-radius: 4px; color: var(--text-2); }
.wx-dew.near { background: color-mix(in srgb, var(--careful) 22%, transparent); color: var(--careful); font-weight: 700; }
.wx-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.wx-presets .chip { min-height: 24px; padding: 2px 10px; font-size: 12px; }
.wx-presets .chip[aria-checked="true"] { border-color: var(--accent); color: var(--accent-2); font-weight: 600; }

/* значок на карточке времени суток: порывы, сильный дождь, высокий УФ */
.slot-warn { flex: none; color: var(--careful); font-size: 12px; line-height: 1; cursor: help; }

/* подсказка при наведении (data-tip) */
.hover-tip { position: fixed; z-index: 1000; max-width: 260px; padding: 6px 9px; border-radius: 8px; pointer-events: none;
  background: var(--text); color: var(--bg); font-size: 12px; line-height: 1.35; white-space: pre-line; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25); }
.hover-tip[hidden] { display: none; }

/* «По часам» внизу: свернуть до заголовка; таблицу тянут мышью, как ленту */
.hours-fold { width: 28px; height: 28px; min-height: 0; font-size: 14px; align-self: center; }
#pane-hours[data-folded] > :not(.hours-title) { display: none; }
#pane-hours[data-folded] .wx-presets { display: none; }
@media (min-width: 1024px) {
  #pane-hours .hours-scroll { cursor: grab; }
  body.dragging-hours, body.dragging-hours #pane-hours .hours-scroll { cursor: grabbing; user-select: none; }
}

/* лента: необязательные строки «Ветер» (км/ч, цвет по силе) и «Осадки мм»; переключатели - под подписями */
.tband-row i.wind, .tband-row i.mm { display: grid; place-items: center; font-size: 10px; font-weight: 600; font-style: normal; color: var(--text-2); }
.tband-row i.wind.breeze { color: var(--info); } .tband-row i.wind.fresh { color: var(--accent-2); } .tband-row i.wind.strong { color: var(--stop); }
.tband-row i.mm { color: var(--text); background: color-mix(in srgb, var(--w-rain) calc(var(--a) * 100%), transparent); }
.tband-row i.mm.heavy { color: #FFFFFF; }
.tband-labels .tband-opt { gap: 4px; pointer-events: auto; }
.tband-opt .chip { min-height: 18px; height: 18px; padding: 0 6px; font-size: 10px; }
.tband-opt .chip[aria-pressed="true"] { border-color: var(--accent); color: var(--accent-2); font-weight: 600; }

/* версия прогноза неба V1/V2/V3 - в карточке места (телефон - над днями) */
.sky-versions { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.sky-versions .chip { min-height: 24px; padding: 2px 9px; font-size: 12px; font-weight: 600; }
.sky-versions .chip[aria-checked="true"] { border-color: var(--accent); background: var(--accent); color: var(--on-score); }
.sky-versions-line { font-size: 12px; margin: 2px 0 4px; }

/* легенда слоя «Красное небо»: версия, время, шкала баллов */
.redsky-legend { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.redsky-legend b { font-size: 11px; font-weight: 600; }
.redsky-scale { display: flex; gap: 8px; font-size: 11px; color: var(--text-2); }
.redsky-scale span { display: inline-flex; align-items: center; gap: 3px; }
.redsky-scale i { width: 12px; height: 10px; border-radius: 2px; }
.status:has(.status-undo) { pointer-events: auto; }
.status .status-undo { margin-left: 6px; }

/* ---------- менеджер мест и папок (компьютер, холст «Web · Places & folders manager») - окно поверх экрана ---------- */
dialog.manager { /* на весь экран: таблица мест широкая */
  width: calc(100vw - 16px); max-width: none; height: calc(100vh - 16px); max-height: none; padding: 0;
  border: 1px solid var(--line); border-radius: 16px; background: var(--bg); color: var(--text);
}
dialog.manager[open] { display: flex; flex-direction: column; }
.mgr-head { display: flex; align-items: baseline; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.mgr-head h2 { margin: 0; font-size: 20px; }
.mgr-head p { margin: 0; }
.mgr-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 280px minmax(0, 1fr); }
.mgr-side { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-right: 1px solid var(--line); overflow-y: auto; }
.mgr-folder {
  display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 10px; border: 0; border-radius: 10px;
  background: transparent; color: var(--text); text-align: left; font-size: 14px;
}
.mgr-folder:hover { background: var(--card); }
.mgr-folder[aria-current="true"] { background: var(--card); font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); }
.mgr-folder-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mgr-new { display: flex; align-items: center; gap: 8px; padding: 6px 10px; }
.mgr-new input { flex: 1; min-width: 0; }
.mgr-settings { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 12px; padding: 12px;
  border-radius: 12px; background: var(--card); }
.mgr-settings .danger { margin-top: 4px; }
.mgr-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 12px 20px; gap: 10px; }
.mgr-main-head { display: flex; align-items: center; gap: 10px; }
.mgr-main-head h3 { margin: 0; font-size: 18px; white-space: nowrap; }
.mgr-main-head select { min-width: 0; flex: 0 1 auto; }
.mgr-filter { flex: 0 1 240px; min-width: 120px; }
.mgr-source { max-width: 200px; }
.mgr-country { margin-left: auto; max-width: 170px; }
.mgr-import, .mgr-export { align-self: center; }
.mgr-rating { max-width: 150px; }
.undo-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 2000; display: flex; align-items: center; gap: 14px;
  padding: 10px 16px; border-radius: 12px; background: var(--text); color: var(--bg); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3); font-size: 14px;
}
.undo-toast .link { color: var(--accent); font-weight: 700; }
.mgr-folder[draggable="true"] { cursor: grab; }
.mgr-parent-row { display: flex; flex-direction: column; gap: 2px; }
.mgr-parent { max-width: 100%; }
.mgr-cols { position: relative; align-self: center; }
.mgr-cols summary { list-style: none; cursor: pointer; white-space: nowrap; }
.mgr-cols summary::-webkit-details-marker { display: none; }
.mgr-cols .drop-menu { position: fixed; z-index: 1000; display: flex; flex-direction: column; gap: 6px; width: 220px; padding: 10px; }
.mgr-filter { width: 240px; }
.mgr-filter[hidden] { display: none; }
.mgr-search-btn { align-self: center; width: 30px; height: 30px; }
.mgr-search-btn[aria-expanded="true"] { color: var(--accent); }
.mgr-bulk { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 40px; }
.mgr-bulk:empty { min-height: 0; }
.mgr-bulk .segmented { grid-template-columns: repeat(2, auto); }
.mgr-subtoggle { grid-template-columns: repeat(2, auto); align-self: center; }
.mgr-subtoggle button { padding: 4px 10px; font-size: 12px; white-space: nowrap; }
.mgr-folder-row, .folder-option-row { display: flex; align-items: stretch; }
.mgr-folder-row .mgr-folder, .folder-option-row .folder-option { flex: 1; min-width: 0; }
.fold-caret { flex: none; width: 22px; min-height: 0; padding: 0; border: 0; background: transparent; color: var(--muted);
  font-size: 12px; cursor: pointer; }
.fold-caret.empty { cursor: default; }
.folder-search { width: calc(100% - 16px); margin: 6px 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: inherit; font: inherit; font-size: 13px; }
.folder-none { margin: 4px 12px 8px; }
.folder-option.drop-target { outline: 2px dashed var(--accent); outline-offset: -2px; }
.mgr-coords { font-variant-numeric: tabular-nums; font-size: 12px; }
.fold-caret:hover { color: var(--text); }
.mgr-sel { font-weight: 600; }
.mgr-table-box { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; }
.mgr-grid { flex: 1; min-height: 240px; height: 100%; position: relative; }  /* AG Grid: прокрутка - своя */
.mgr-grid .mgr-none { position: absolute; top: 56px; left: 0; right: 0; margin: 0; text-align: center; pointer-events: none; }  /* пусто - в самой таблице */
.mgr-grid .ag-cell { display: flex; align-items: center; line-height: 1.3; }  /* AG: строка текста = высоте ряда */
.mgr-grid .mgr-place-cell { gap: 8px; min-width: 0; }
.mgr-grid .mgr-place-cell { align-items: center; }
.mgr-copy { flex: none; width: 26px; height: 26px; padding: 0; font-size: 14px; opacity: 0.75; }
.mgr-copy:hover { opacity: 1; }
.mgr-grid .mgr-place { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.mgr-grid .mgr-best .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mgr-grid .mgr-notes .mgr-note-text {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap;
  font-size: 12px; line-height: 1.35;
}
.mgr-grid .mgr-notes { cursor: text; }
.mgr-grid .mgr-chips { flex-wrap: wrap; gap: 2px 4px; max-height: 48px; overflow: hidden; }
.mgr-grid .mgr-chip { min-height: 20px; padding: 0 6px; font-size: 11px; }
.mgr-add .drop-menu { position: fixed; z-index: 1000; }  /* поверх таблицы: в ячейке меню обрезалось бы */
.mgr-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mgr-table th { position: sticky; top: 0; z-index: 1; background: var(--bg); color: var(--muted); font-weight: 500; text-align: left;
  padding: 8px; border-bottom: 1px solid var(--line); }
.mgr-table td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.mgr-table tr.on td { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.mgr-table th:first-child, .mgr-table td:first-child { width: 28px; }
.mgr-place { display: block; padding: 0; border: 0; background: none; color: var(--text); font-weight: 600; text-align: left; cursor: pointer; }
.mgr-place:hover { text-decoration: underline; }
.mgr-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.mgr-chip { display: inline-flex; align-items: center; gap: 2px; }
.chip-x { padding: 0 2px; border: 0; background: none; color: var(--muted); font-size: 15px; line-height: 1; cursor: pointer; }
.chip-x:hover { color: var(--danger); }
.mgr-add { position: relative; }
.mgr-add summary { list-style: none; cursor: pointer; width: 26px; height: 26px; display: grid; place-items: center;
  border: 1px dashed var(--line); border-radius: 50%; color: var(--muted); }
.mgr-add summary::-webkit-details-marker { display: none; }
.mgr-add .drop-menu { position: absolute; z-index: 3; top: 30px; left: 0; min-width: 180px; }
.mgr-best { display: inline-flex; align-items: center; gap: 8px; }
.mgr-src-cell { display: flex; align-items: center; gap: 8px; }
.mgr-country-cell { font-weight: 600; letter-spacing: 0.04em; white-space: nowrap; }
.mgr-region { max-width: 200px; }
.mgr-notes { min-width: 180px; width: 22%; }
.mgr-note {
  width: 100%; min-height: 28px; resize: none; padding: 4px 6px; border: 1px solid transparent; border-radius: 6px;
  background: transparent; color: inherit; font: inherit; font-size: 12px; line-height: 1.35;
}
.mgr-note:hover { border-color: var(--line); }
.mgr-note:focus { border-color: var(--accent); background: var(--card); outline: none; }
.mgr-src-cell a { color: var(--accent); text-decoration: none; }
.mgr-src-cell .source-shot img { width: 40px; height: 30px; }
.mgr-empty { padding: 24px 0; }
/* обложка места: в строке «Мест» - миниатюра той же высоты, что две строки текста; в карточке - первой и с рамкой */
.row-cover { width: 36px; height: 36px; flex: none; border-radius: 8px; object-fit: cover; background: var(--line); }
.row-cover.empty { display: inline-block; opacity: 0.5; }
.photo-thumb.cover { outline: 2px solid var(--accent); outline-offset: 1px; }
.mgr-place-cell { display: flex; align-items: center; gap: 10px; }
.mgr-cover { width: 40px; height: 40px; flex: none; border-radius: 8px; object-fit: cover; background: var(--line); }

/* ---------- «Обзор»: места съёмки рядом ---------- */
.places-mode { margin-bottom: 10px; }
.discover { display: flex; flex-direction: column; gap: 8px; }
.discover[hidden] { display: none; }
.discover-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.discover-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.discover-row > .muted { min-width: 92px; }
.spot-dot { width: 12px; height: 12px; flex: none; border-radius: 50%; background: #ED8936; opacity: 0.8; }
.spot-dot.vp { box-shadow: 0 0 0 2px #2B6CB0; }
.spot-panel { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.spot-facts { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 8px; }
.spot-facts p { margin: 0; }
.spot-hist { margin: 0; }
.spot-hist figcaption, .spot-compass figcaption { font-size: 12px; color: var(--muted); }
.spot-hist svg { width: 100%; max-width: 320px; height: auto; display: block; }
.spot-hist rect { fill: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.spot-hist rect.peak { fill: var(--accent); }
.spot-hist text, .spot-compass text { fill: var(--muted); font-size: 9px; }
.spot-compass { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; max-width: 160px; text-align: center; }
.spot-compass .ring { fill: none; stroke: var(--line); stroke-width: 1.5; }
.spot-compass .petal { fill: color-mix(in srgb, var(--accent) 35%, transparent); }
.spot-compass .wedge { fill: color-mix(in srgb, var(--accent) 55%, transparent); stroke: var(--accent); stroke-width: 1.5; }
.spot-shots { margin-top: 4px; }
/* менеджер: перетаскивание места на папку (просто - добавить, с Alt - переместить) */
.mgr-table tr[draggable="true"] { cursor: grab; }
.mgr-folder.drop-target { background: color-mix(in srgb, var(--accent) 16%, var(--card)); box-shadow: inset 0 0 0 2px var(--accent); }
.mgr-folder.drop-move { box-shadow: inset 0 0 0 2px var(--accent), inset 0 0 0 4px var(--card); }
.spot-sky { display: flex; align-items: center; gap: 10px; min-height: 36px; margin-bottom: 8px; }

/* менеджер: короткий ID папки (скопировать) и что не вошло при импорте */
.mgr-folder-id { flex: none; align-self: center; width: 24px; height: 24px; padding: 0; font: 600 12px/1 ui-monospace, monospace; color: var(--muted); opacity: 0.55; }
.mgr-folder-row:hover .mgr-folder-id, .mgr-folder-id:focus-visible { opacity: 1; }
.mgr-folder-code { display: flex; align-items: center; gap: 4px; }
.mgr-folder-code .mgr-folder-id { opacity: 1; }
.mgr-report { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin: 0 0 8px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-size: 13px; }
.mgr-report summary { cursor: pointer; font-weight: 600; }
.mgr-report ul { margin: 6px 0 0; padding-left: 18px; max-height: 160px; overflow: auto; }

/* аккаунт: API-токены для мостов */
.tokens-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.tokens-form input { flex: 1; min-width: 200px; }
.tokens-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.token-value { word-break: break-all; font-size: 13px; user-select: all; }

/* extra места: точки на карте (парковка, подъёмник...) и блок «Доп. данные» в карточке */
.extra-point { display: grid; place-items: center; border-radius: 6px; background: var(--card); color: var(--text);
  border: 2px solid #3B7DD8; font: 700 12px/1 system-ui, sans-serif; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35); }
.extra-point.kind-parking { background: #3B7DD8; color: #fff; }
.place-extra { margin: 6px 0; }
.place-extra summary { cursor: pointer; }
.extra-points { margin: 4px 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.extra-points .link { text-align: left; padding: 2px 0; min-height: 0; border: 0; background: none; color: var(--accent-2); font: inherit; font-size: 14px; }
.extra-fields { display: grid; grid-template-columns: max-content 1fr; gap: 2px 10px; margin: 4px 0 0; font-size: 13px; }
.extra-fields dt { color: var(--muted); }
.extra-fields dd { margin: 0; overflow-wrap: anywhere; }
.mgr-extra-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.walk-note { font-size: 13px; }
/* профиль высот пешего маршрута (карточка места): тот же синий, что маршрут на карте */
:root { --walk: #3B7DD8; }
.walk-profile { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 2px; }
.walk-profile-row { display: flex; align-items: center; gap: 6px; }
.walk-profile-plot { width: 240px; max-width: 100%; height: 48px; flex: 0 1 240px; cursor: crosshair; }
.walk-line { fill: none; stroke: var(--walk); stroke-width: 2; stroke-linejoin: round; }
.walk-area { fill: var(--walk); opacity: 0.16; stroke: none; }
.walk-cursor { stroke: var(--muted); stroke-width: 1; vector-effect: non-scaling-stroke; }
.walk-profile-end, .walk-profile-at { font-size: 12px; font-variant-numeric: tabular-nums; }
.walk-leave { display: block; margin-top: 2px; font-size: 13px; color: var(--text-2); }
/* «+ Парковка» и «Маршрут сюда» в карточке места */
.place-walk { display: flex; flex-direction: column; gap: 4px; margin: 4px 0; }
.place-walk .active { border-color: var(--accent); color: var(--accent); }
.walk-pick-hint { margin: 0; }
.walk-from { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font-size: 13px; }
.walk-from .walk-leave, .walk-from .walk-profile { flex-basis: 100%; }
.point-x { margin-left: 4px; }
/* парковки OSM рядом: список в карточке и значки-кандидаты на карте */
.parking-choices { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.parking-choices .link { padding: 2px 0; min-height: 0; border: 0; background: none; color: var(--accent-2); font: inherit; font-size: 13px; text-align: left; }
.extra-point.candidate { opacity: 0.75; border-style: dashed; cursor: pointer; }
/* кружок «N мест» на карте: соседние места одним значком (drawFavView) */
.leaflet-marker-icon.fav-cluster { /* у Leaflet display: block - число по центру только так */
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font: 600 12px/1 system-ui, sans-serif;
  color: #1a1020 !important;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85), 0 1px 4px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}
.fav-cluster:not(.r0):not(.r1):not(.r2):not(.r3) { background: #ffc94d; }
/* обложка места крупно - при наведении на неё в списке мест (initCoverPreview) */
.cover-preview {
  position: fixed;
  z-index: 3000;
  object-fit: contain;
  background: var(--card, #fff);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

/* компьютер: три колонки - высотой с колонку карты. Ряд сетки берёт высоту по карте (у «Мест» и прогноза высота 0 -
   они его не растягивают), сами колонки - до низа ряда (min-height 100%); длиннее - своя прокрутка: у «Мест» - только
   список под шапкой и фильтрами, у прогноза - вся колонка */
@media (min-width: 1024px) {
  #pane-places, #pane-now { height: 0; min-height: 100%; box-sizing: border-box; }
  #pane-now { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  #pane-places { display: flex; flex-direction: column; }
  .places-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }
  .places-body > .favs:not([hidden]), .places-body > .discover:not([hidden]) { flex: 1; min-height: 0; }
  #fav-items { max-height: none; flex: 1 1 0; min-height: 120px; }
}
