/* EverythingRealtorNeeds — «премиум»: глубокий петроль и латунь, стеклянные карточки, объёмные рисунки.
   Две темы: тёмная («ночной город», по умолчанию) и светлая («дневной»), html[data-theme]. Цвета — только
   через переменные ниже; ветки и новые разделы берут их же. */
:root, [data-theme="dark"] {
  --bg: #0B1F24;
  --bg-deep: #071519;
  --text: #F3EEE4;
  --hint: rgba(243, 238, 228, 0.62);
  --faint: rgba(243, 238, 228, 0.4);
  --ink: #0F2A30;
  --ink-2: #17424B;
  --brass: #E0B054;
  --brass-hi: #F4D893;
  --brass-lo: #9E7431;
  --brass-text: #F4D893;
  --sea: #7CD3C6;
  --danger: #F08C80;
  --accent: #E0B054;
  --accent-text: #1A1408;
  --card: rgba(12, 37, 43, 0.62);
  --card-solid: #102D33;
  --glass: linear-gradient(160deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.02) 60%);
  --line: rgba(255, 255, 255, 0.08);
  --line-brass: rgba(224, 176, 84, 0.24);
  --field: rgba(7, 21, 25, 0.55);
  --pr-back: #020809;
  --pr-scrim: rgba(4, 14, 17, 0.84);
  --pr-veil: rgba(4, 14, 17, 0);
  --shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.6);
  --hero: radial-gradient(80% 70% at 85% 0%, rgba(224, 176, 84, 0.16), transparent 62%),
          linear-gradient(165deg, #12343B, #0C252B 70%);
  --page: radial-gradient(120% 60% at 100% -10%, rgba(124, 211, 198, 0.1), transparent 60%),
          radial-gradient(90% 50% at -20% 30%, rgba(224, 176, 84, 0.07), transparent 60%),
          linear-gradient(180deg, #0B1F24, #071519);
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #EAE6DD;
  --bg-deep: #E2DCCF;
  --text: #0F2A30;
  --hint: rgba(15, 42, 48, 0.62);
  --faint: rgba(15, 42, 48, 0.42);
  --brass-text: #A2731F;
  --sea: #1F8A7E;
  --danger: #C2493A;
  --accent: #E0B054;
  --accent-text: #1A1408;
  --card: rgba(250, 248, 243, 0.74);
  --card-solid: #F7F5F0;
  --glass: linear-gradient(160deg, rgba(250, 248, 243, 0.82), rgba(250, 248, 243, 0.52) 60%);
  --line: rgba(15, 42, 48, 0.09);
  --line-brass: rgba(176, 127, 42, 0.3);
  --field: #F7F5F0;
  --pr-back: #D9D3C6;
  --pr-scrim: rgba(247, 245, 240, 0.9);
  --pr-veil: rgba(247, 245, 240, 0);
  --shadow: 0 12px 26px -16px rgba(15, 42, 48, 0.35);
  --hero: radial-gradient(80% 80% at 90% 0%, rgba(244, 216, 147, 0.55), transparent 60%),
          linear-gradient(170deg, #F2ECDF, #DAE6E2 75%);
  --page: radial-gradient(120% 60% at 100% -10%, rgba(124, 211, 198, 0.16), transparent 60%),
          radial-gradient(90% 50% at -20% 30%, rgba(224, 176, 84, 0.12), transparent 60%),
          linear-gradient(180deg, #ECE8E0, #E2DCD0);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg-deep); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
main { padding: 12px 16px 28px; max-width: 640px; margin: 0 auto; }
h2 { font-size: 20px; margin: 0; }

/* ---------- Шапка: знак, переключатель кабинетов, тема ---------- */
.top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.brand-logo { width: 34px; height: 34px; flex: none; filter: drop-shadow(0 4px 10px rgba(224, 176, 84, 0.25)); }
.brand-name {
  font-size: 11px;
  line-height: 1.15;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
}
.brand-name b { display: block; color: var(--brass-text); letter-spacing: 0.16em; }
.brand.has-cabinet .brand-name { display: none; }
.cabinet {
  margin-left: auto;
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--line);
}
.cabinet[hidden] { display: none; }
.cab {
  appearance: none;
  border: 0;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--hint);
  background: transparent;
  cursor: pointer;
}
.cab.is-on {
  color: #1A1408;
  background: linear-gradient(180deg, var(--brass-hi), var(--brass) 55%, #C8963F);
  box-shadow: 0 2px 8px rgba(224, 176, 84, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.theme-btn {
  appearance: none;
  flex: none;
  margin-left: 6px;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--glass) no-repeat;
  cursor: pointer;
  position: relative;
}
.cabinet[hidden] + .theme-btn { margin-left: auto; }
.theme-btn::before {
  content: "";
  position: absolute;
  inset: 8px;
  background: url("icon-sun.svg") center / contain no-repeat;
}
[data-theme="light"] .theme-btn::before { background-image: url("icon-moon.svg"); }

/* ---------- Приветствие и город ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  padding: 20px 18px 0;
  background: var(--hero);
  border: 1px solid var(--line-brass);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
.date {
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass-text);
  font-weight: 600;
  margin: 0 0 8px;
}
.date:empty { display: none; }
.hello { margin: 0; font-size: 27px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
.today { margin: 6px 0 10px; color: var(--hint); font-size: 15.5px; }
.today:empty { display: none; }
.skyline { display: block; width: calc(100% + 36px); margin: 6px -18px 0; height: 64px; object-fit: cover; object-position: bottom; }
.skyline-day { display: none; }
[data-theme="light"] .skyline-day { display: block; }
[data-theme="light"] .skyline-night { display: none; }

/* ---------- Плитки разделов ---------- */
.label { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 2px 10px; }
.label h2 { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.label span { font-size: 12px; color: var(--faint); }
.label h2:empty { display: none; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile, .strip {
  appearance: none;
  font: inherit;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  background: var(--glass), var(--card);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--shadow);
  transition: transform 0.12s ease;
  animation: rise 0.35s ease both;
}
.tile {
  --glow: rgba(224, 176, 84, 0.16);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "art" "text";
  align-items: start;
  row-gap: 12px;
  min-width: 0;
  min-height: 150px;
  padding: 14px 14px 16px;
  border-radius: 22px;
}
.tile:nth-child(even) { --glow: rgba(124, 211, 198, 0.16); }
.tile::before {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  left: -34px;
  top: -44px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow), transparent 65%);
  pointer-events: none;
}
.tile-art { grid-area: art; position: relative; width: 74px; height: 74px; display: block; pointer-events: none; transition: transform 0.25s ease; }
.tile:active { transform: scale(0.98); }
.tile:active .tile-art { transform: scale(1.06) rotate(-3deg); }
.tile .chip { grid-area: art; }
.tile-text { grid-area: text; position: relative; align-self: end; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.tile-title { font-size: 16px; font-weight: 650; line-height: 1.2; letter-spacing: -0.015em; overflow-wrap: anywhere; }
/* Точка слева от названия плитки: латунь и бирюза через одну. */
.tile .tile-title { position: relative; padding-left: 14px; }
.tile .tile-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 8px var(--brass);
}
.tile:nth-child(even) .tile-title::before { background: var(--sea); box-shadow: 0 0 8px var(--sea); }
/* Строка ветки под названием: одна строка, длинная обрезается многоточием, плитка не растёт. */
.tile-sum {
  display: block;
  position: relative;
  padding-left: 12px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--hint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tile-sum::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 8px var(--brass);
}
.tile:nth-child(even) .tile-sum::before { background: var(--sea); box-shadow: 0 0 8px var(--sea); }
/* Нечётная последняя плитка («Мой ремонт») — на две клетки: название слева, рисунок справа. */
.tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
.tile:last-child:nth-child(odd) {
  grid-template-areas: "text art";
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 0;
  padding: 16px;
  --glow: rgba(124, 211, 198, 0.14);
}
.tile:last-child:nth-child(odd)::before { left: auto; right: -30px; top: -30px; }
.tile:last-child:nth-child(odd) .tile-art { width: 104px; height: 104px; align-self: center; }
.tile:last-child:nth-child(odd) .tile-text { align-self: center; }
.tile:last-child:nth-child(odd) .tile-title { font-size: 19px; }
.sum-part { white-space: nowrap; }
.tile:nth-child(2) { animation-delay: 0.04s; }
.tile:nth-child(3) { animation-delay: 0.08s; }
.tile:nth-child(4) { animation-delay: 0.12s; }
.tile:nth-child(5) { animation-delay: 0.14s; }
.tile:nth-child(6) { animation-delay: 0.16s; }
.tile:focus-visible, .strip:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

/* Простой значок (раздел без рисунка). */
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--ink-2), var(--ink));
  border: 1px solid var(--line-brass);
  flex: none;
}
.chip img { width: 28px; height: 28px; }

/* ---------- Полосы: журнал, траты на ИИ ---------- */
.journal-slot:empty { display: none; }
.journal-slot { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.strip {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 18px;
  animation-delay: 0.16s;
}
.strip + .strip { animation-delay: 0.2s; }
.strip .tile-art { width: 44px; height: 44px; flex: none; }
.strip .chip { width: 44px; height: 44px; border-radius: 13px; }
.strip .tile-text { flex: 1; align-self: center; gap: 2px; }
.strip .tile-title { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip .tile-sum { padding-left: 0; font-size: 12.5px; }
.strip .tile-sum::before { display: none; }
.strip-arrow { position: relative; flex: none; width: 20px; height: 20px; }
.strip-arrow::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--faint);
  border-right: 2px solid var(--faint);
  transform: rotate(45deg);
}

/* Только сдвиг, без прозрачности: если анимация не запустится, плитки всё равно видны. */
@keyframes rise { from { transform: translateY(8px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .tile, .strip, .card { animation: none; transition: none; }
}
@media (max-width: 340px) {
  .tiles { gap: 10px; }
  .tile { min-height: 150px; padding: 12px; }
  .tile-art { width: 62px; height: 62px; }
  .hello { font-size: 23px; }
}
#note, .empty { color: var(--hint); }
.empty { text-align: center; padding: 28px 12px; }

/* ---------- Экран раздела ---------- */
.bar { display: flex; align-items: center; gap: 12px; margin: 4px 0 16px; }
.bar h2 { font-size: 26px; font-weight: 750; letter-spacing: -0.02em; line-height: 1.15; overflow-wrap: anywhere; }
.back {
  appearance: none;
  position: relative;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--glass), var(--card);
  cursor: pointer;
}
.back::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 15px;
  width: 10px;
  height: 10px;
  border-left: 2.2px solid var(--brass);
  border-bottom: 2.2px solid var(--brass);
  transform: rotate(45deg);
}
.back:active { transform: scale(0.96); }
.notice {
  background: var(--glass), var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brass);
  border-radius: 14px;
  padding: 10px 12px;
  margin: 0 0 12px;
}
.cards { display: flex; flex-direction: column; gap: 12px; }
.card {
  position: relative;
  overflow: hidden;
  background: var(--glass), var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px 16px 16px 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--shadow);
  animation: rise 0.3s ease both;
}
.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--brass-hi), var(--brass-lo));
}
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
.card-title { font-size: 17.5px; font-weight: 700; line-height: 1.25; margin: 0; overflow-wrap: anywhere; letter-spacing: -0.01em; }
.badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--sea);
  background: rgba(124, 211, 198, 0.12);
  border: 1px solid rgba(124, 211, 198, 0.3);
  white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.line { margin: 6px 0 0; color: var(--hint); font-size: 15px; overflow-wrap: anywhere; }
.actions { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.action {
  appearance: none;
  border: 0;
  border-radius: 14px;
  min-height: 46px;
  padding: 10px 16px;
  background: linear-gradient(180deg, var(--brass-hi), var(--brass) 55%, #C8963F);
  color: var(--accent-text);
  box-shadow: 0 6px 16px -8px rgba(224, 176, 84, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.action:active { transform: scale(0.98); }
.action:disabled { opacity: 0.5; }
.action.secondary {
  background: var(--glass), var(--card);
  color: var(--text);
  box-shadow: none;
  border: 1px solid var(--line-brass);
}
.action.secondary:active { background: rgba(224, 176, 84, 0.14); }
.card.muted { background: transparent; border: 1px dashed var(--line-brass); box-shadow: none; }
.card.muted::before { background: var(--danger); opacity: 0.7; }
.card.muted .card-title, .card.muted .line { color: var(--faint); }
.card.muted .badge { color: var(--danger); background: rgba(240, 140, 128, 0.12); border-color: rgba(240, 140, 128, 0.32); }
.card.expandable { cursor: pointer; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; margin: 8px 0 4px; }
.col { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid var(--line-brass); border-radius: 12px; background: var(--field); min-width: 0; }
.col-label { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--hint); }
.col-value { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.card-more { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.more-arrow {
  display: block;
  width: 9px;
  height: 9px;
  margin: 8px auto -4px;
  border-right: 2px solid var(--faint);
  border-bottom: 2px solid var(--faint);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.card.expanded .more-arrow { transform: rotate(-135deg); margin-top: 12px; }
.star {
  flex: none;
  margin: -4px -6px 0 0;
  padding: 2px 6px;
  border: 0;
  background: none;
  font-size: 22px;
  line-height: 1;
  color: var(--faint);
  cursor: pointer;
}
.star.on { color: var(--accent); }
.card-image { margin-top: 10px; display: flex; justify-content: center; }
.card-image img { width: 100%; max-width: 260px; border-radius: 16px; display: block; }
.card-image.small img { max-width: 140px; border-radius: 12px; }
.card-video { margin-top: 10px; }
.card-video-frame { display: flex; justify-content: center; }
.card-video-frame.compact img, .card-video-frame.compact video { max-height: 34vh; }
.card-video-frame img, .card-video-frame video {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 62vh;
  aspect-ratio: 9 / 16;
  border-radius: 14px;
  background: var(--bg-deep);
  box-shadow: var(--shadow);
}
.star:disabled { opacity: 0.5; }
.card.editing, .card.focus { box-shadow: inset 0 0 0 1.5px var(--brass), var(--shadow); }
.card, .group { scroll-margin-top: 14px; }

/* Форма карточки и «+ Новый». */
.form { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field-label { font-size: 11.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.input {
  appearance: none;
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--field);
  color: var(--text);
  font: inherit;
}
.input::placeholder { color: var(--faint); }
/* Без увеличения (владелец, 21.11.2026: «убери Zoom… зумиться неприятно»): двойной тап не увеличивает,
   а поле с текстом мельче 16px iPhone сам приближает при нажатии — поэтому поля не мельче 16px. */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
input, textarea, select, .input, .assist-input { font-size: max(16px, 1em); }
textarea.input { resize: vertical; min-height: 80px; }
select.input { appearance: auto; }
.input:focus { outline: 2px solid var(--brass); outline-offset: -1px; border-color: var(--brass); }
.form-error { margin: 0; color: var(--danger); font-size: 15px; }
.form-actions { flex-direction: row; }
.form-actions .action { flex: 1; }

/* Панель раздела: поиск, вкладки или выбор, «+ Новый». */
.toolbar { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.toolbar-search:empty, .toolbar-filters:empty, .toolbar-create:empty { display: none; }
.toolbar-filters { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.toolbar-create { display: flex; flex-direction: column; gap: 10px; }
.search { margin: 0; }
.search-input {
  -webkit-appearance: none;
  padding-left: 44px;
  background: url("icon-search.svg") 14px center / 20px no-repeat, var(--field);
}
.search-input::-webkit-search-decoration { -webkit-appearance: none; }
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 16px;
  background: var(--glass), var(--card);
  border: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar { display: none; }
/* `style: "wrap"` — плашки в несколько строк, всё видно сразу (темы «Сценариев»). */
.tabs.wrap { flex-wrap: wrap; overflow-x: visible; }
.tabs.wrap .tab { flex: 1 1 auto; }
.filter-step { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.filter-label { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); font-weight: 600; margin: 4px 2px 0; }
.tab {
  appearance: none;
  flex: 1 0 auto;
  border: 1px solid transparent;
  border-radius: 12px;
  min-height: 40px;
  padding: 8px 14px;
  background: transparent;
  color: var(--hint);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.tab:active { opacity: 0.8; }
.tab:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.tab.active {
  color: var(--text);
  background: rgba(224, 176, 84, 0.14);
  border-color: var(--brass);
}
.create { width: 100%; }
.create-card { padding-top: 4px; }
.create-card .form { margin-top: 12px; }

/* Разделитель дня между карточками. */
.group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 4px -2px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass);
}
.group::after { content: ""; flex: 1; height: 1px; background: var(--line-brass); }
.group:first-child { margin-top: 0; }

/* Кнопки связи: значок над подписью, звонок — латунный. */
.links { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.links + .links { margin-top: 8px; }
.link-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 58px;
  padding: 8px 6px;
  border-radius: 14px;
  color: var(--text);
  background: var(--glass), var(--card);
  border: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.link-btn::before { content: ""; width: 22px; height: 22px; background: url("icon-web.svg") center / contain no-repeat; }
.link-btn.link-call::before { background-image: url("icon-call.svg"); }
.link-btn.link-telegram::before { background-image: url("icon-telegram.svg"); }
.link-btn.link-viber::before { background-image: url("icon-viber.svg"); }
.link-btn:active { background: rgba(224, 176, 84, 0.14); }
.link-btn.link-call {
  color: var(--accent-text);
  border: 0;
  background: linear-gradient(180deg, var(--brass-hi), var(--brass) 55%, #C8963F);
  box-shadow: 0 6px 16px -8px rgba(224, 176, 84, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.link-btn.link-call:active { opacity: 0.85; }
.link-btn:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.card.muted .link-btn.link-call { background: var(--glass), var(--card); color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.card.muted .link-btn.link-call::before { opacity: 0.55; }

/* Подсказка внизу экрана (номер скопирован): 4 секунды. */
#toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  max-width: 560px;
  margin: 0 auto;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--ink);
  color: #F3EEE4;
  border: 1px solid var(--line-brass);
  border-left: 4px solid var(--brass);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  font-size: 15px;
  z-index: 10;
  animation: rise 0.25s ease both;
}
.copy-buffer { position: fixed; top: 0; left: -9999px; width: 1px; height: 1px; opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  #toast { animation: none; }
}
[data-theme="light"] .group { color: var(--brass-text); }

/* Кабинет владельца */
/* Разделы «Люди», «Площадки», «Сервис», «Журнал изменений» целиком собраны из общих классов (.card, .action,
   .tab, .input, .group, .badge) и рисунков art-people / art-platforms / art-service / art-owner_audit.svg,
   поэтому обеих тем (тёмной и светлой) им хватает; здесь цвета — только через var(--…) из начала файла. */
.tile[data-section="people"], .tile[data-section="platforms"],
.tile[data-section="service"], .tile[data-section="owner_audit"] { border-color: var(--line-brass); }

/* Тревога на карточке (`alert`, например ДОМ.РИА давно не забирала фид): рамка, полоса и плашка в цвете
   внимания, текст обычной яркости — в отличие от `muted` (выключено), которая бледная и пунктирная. */
.card.alert { border: 1px solid var(--danger); box-shadow: inset 0 0 0 1px var(--danger), var(--shadow); }
.card.alert::before { background: var(--danger); opacity: 1; }
.card.alert .badge { color: var(--danger); background: rgba(240, 140, 128, 0.14); border-color: var(--danger); }

/* Суфлёр (prompter.js): камера на весь экран, текст сверху — сразу под объективом, управление снизу.
   Подложки текста и кнопок — --pr-scrim (тёмная или светлая по теме), текст — var(--text). */
html.prompter-open, html.prompter-open body { overflow: hidden; }
.prompter-start { flex: 1; }
.prompter {
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow: hidden;
  background: var(--pr-back);
  color: var(--text);
}
.prompter-cam, .prompter-played {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--pr-back);
}
.prompter-cam.mirror { transform: scaleX(-1); }
.prompter-script {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
  height: 38vh;
  padding: calc(env(safe-area-inset-top, 0px) + 16px) 22px 0;
  overflow: hidden;
  background: linear-gradient(180deg, var(--pr-scrim) 0%, var(--pr-scrim) 72%, var(--pr-veil) 100%);
  -webkit-mask-image: linear-gradient(180deg, var(--text) 78%, transparent);  /* маске важна только непрозрачность */
  mask-image: linear-gradient(180deg, var(--text) 78%, transparent);
}
.prompter-lines { transform: translateY(var(--y, 0px)); will-change: transform; padding-bottom: 30vh; }
.prompter-line {
  margin: 0 0 0.4em;
  font-size: 26px;
  line-height: 1.3;
  font-weight: 650;
  text-align: center;
  letter-spacing: 0.005em;
}
.prompter-rec {
  position: absolute;
  top: calc(38vh + 6px);
  left: 16px;
  z-index: 3;
  margin: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--pr-scrim);
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.prompter-count {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  font-size: 128px;
  font-weight: 800;
  color: var(--brass-hi);
  text-shadow: 0 6px 30px var(--pr-back);
  pointer-events: none;
  animation: rise 0.25s ease both;
}
.prompter-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px 16px calc(env(safe-area-inset-bottom, 0px) + 14px);
  background: linear-gradient(0deg, var(--pr-scrim) 0%, var(--pr-scrim) 70%, var(--pr-veil) 100%);
}
.prompter-row { display: flex; gap: 8px; max-width: 640px; width: 100%; margin: 0 auto; }
.prompter-row .action { flex: 1; min-height: 48px; padding: 8px 6px; font-size: 14px; }
.prompter-rec-btn.is-recording { background: var(--danger); color: var(--accent-text); box-shadow: none; }
.prompter-speed {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
  font-size: 14px;
  color: var(--hint);
}
.prompter-speed-text { flex: none; min-width: 92px; font-variant-numeric: tabular-nums; }
.prompter-range { flex: 1; accent-color: var(--brass); }
.prompter-status { margin: 0; min-height: 1.3em; font-size: 14px; text-align: center; color: var(--hint); }
.prompter-status:empty { min-height: 0; }
.prompter-review {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  background: var(--pr-back);
}
.prompter-review .prompter-played { position: static; flex: 1; min-height: 0; height: auto; object-fit: contain; }
.prompter-review .prompter-bar { position: static; padding-top: 14px; background: var(--pr-scrim); }
.prompter-fallback {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  background: var(--page);
  text-align: center;
}
.prompter-fallback-title { margin: 0; font-size: 20px; }
.prompter-fallback-text { margin: 0; color: var(--hint); }
.prompter-pick { position: relative; display: flex; align-items: center; justify-content: center; }
.prompter-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
/* Суфлёр «только голос» (ролик с аватаром): камеры нет — текст почти на весь экран, плеер звука по центру. */
.prompter-audio .prompter-script { height: 68vh; }
.prompter-audio .prompter-rec { top: calc(68vh + 6px); }
.prompter-audio .prompter-review { justify-content: center; }
.prompter-audio .prompter-review .prompter-played {
  flex: none;
  width: calc(100% - 32px);
  height: 54px;
  margin: auto 16px;
  background: transparent;
}
@media (prefers-reduced-motion: reduce) {
  .prompter-count { animation: none; }
}

/* Мой ремонт (repair.js): панель открытого объекта — дом с подсвеченной квартирой, «Всего на ремонт», поле
   загрузки чеков и голосовых, «Только что распознано» и две колонки «Работы» / «Материалы». Только классы rep-*,
   цвета — только переменные из начала файла; анимация — CSS, без скриптов. */
.card.rep-dash { padding: 12px; }
.card.rep-dash::before { display: none; }
.rep-scene {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line-brass);
  background: var(--hero);
}
.rep-house { display: block; width: 100%; height: auto; max-height: 230px; }
.rep-moon { fill: var(--brass-hi); opacity: 0.8; animation: rep-float 7s ease-in-out infinite; }
.rep-hill { fill: var(--ink-2); opacity: 0.55; }
.rep-ground { stroke: var(--line-brass); stroke-width: 2; fill: none; }
.rep-body { transform-box: fill-box; transform-origin: 50% 100%; animation: rep-grow 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.rep-wall { fill: var(--card-solid); stroke: var(--line-brass); stroke-width: 1.5; }
.rep-roof { fill: var(--ink-2); stroke: var(--brass-lo); stroke-width: 1; }
.rep-floor { animation: rep-rise 0.5s ease both; }
.rep-floor-0 { animation-delay: 0.15s; }
.rep-floor-1 { animation-delay: 0.25s; }
.rep-floor-2 { animation-delay: 0.35s; }
.rep-floor-3 { animation-delay: 0.45s; }
.rep-floor-4 { animation-delay: 0.55s; }
.rep-floor-5 { animation-delay: 0.65s; }
.rep-win { fill: var(--ink); stroke: var(--line); stroke-width: 1; }
.rep-win-on { fill: var(--brass-lo); opacity: 0.6; animation: rep-flicker 6s ease-in-out infinite; }
.rep-d1 { animation-delay: 1.2s; }
.rep-d2 { animation-delay: 2.4s; }
.rep-d3 { animation-delay: 3.6s; }
.rep-door { fill: var(--brass-lo); }
.rep-flat { fill: var(--brass-hi); stroke: var(--sea); stroke-width: 2.5; animation: rep-flat 2.4s ease-in-out infinite; }
.rep-flat-glow { fill: var(--brass); opacity: 0.2; animation: rep-glow 2.4s ease-in-out infinite; }
.rep-pin { transform-box: fill-box; transform-origin: 50% 100%; animation: rep-bounce 1.8s ease-in-out 0.9s infinite both; }
.rep-pin-shape { fill: var(--sea); stroke: var(--card-solid); stroke-width: 1.5; }
.rep-pin-dot { fill: var(--card-solid); }
.rep-crane-mast, .rep-crane-jib { fill: none; stroke: var(--brass-lo); stroke-width: 2; stroke-linecap: round; }
.rep-cable { stroke: var(--hint); stroke-width: 1; }
.rep-bucket { fill: var(--brass); }
.rep-hook { transform-origin: 222px 40px; animation: rep-swing 3.4s ease-in-out infinite; }
.rep-total { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0 12px 14px; text-align: center; }
.rep-total-label { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--hint); }
.rep-total-value {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--brass-text);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  animation: rep-pop 0.6s ease 0.5s both;
}
.rep-drop {
  margin-top: 12px;
  padding: 14px;
  border: 1.5px dashed var(--line-brass);
  border-radius: 18px;
  background: var(--field);
  text-align: center;
  transition: border-color 0.2s ease;
}
.rep-drop.is-over { border-color: var(--brass); }
.rep-drop .rep-drop-btn { width: 100%; }
.rep-drop.is-busy .rep-drop-btn { animation: rep-breathe 1.4s ease-in-out infinite; }
.rep-drop-hint { margin: 8px 0 0; font-size: 13px; color: var(--hint); }
.rep-progress { display: block; width: 100%; height: 6px; margin-top: 10px; accent-color: var(--brass); }
.rep-drop-status { margin: 6px 0 0; font-size: 13px; color: var(--text); overflow-wrap: anywhere; }
.rep-drop-status:empty { margin: 0; }
.rep-recent { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line-brass); border-radius: 16px; background: var(--field); }
.rep-recent-title { margin: 0 0 2px; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brass-text); }
.rep-recent-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); animation: rep-in 0.4s ease both; }
.rep-recent-title + .rep-recent-row { border-top: 0; }
.rep-recent-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rep-recent-line { font-size: 14px; overflow-wrap: anywhere; }
.rep-recent-src { font-size: 12px; color: var(--hint); overflow-wrap: anywhere; }
.rep-undo {
  flex: none;
  appearance: none;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid var(--danger);
  border-radius: 12px;
  background: transparent;
  color: var(--danger);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
}
.rep-undo:disabled { opacity: 0.5; }
.rep-miss { margin: 6px 0 0; font-size: 13px; color: var(--danger); overflow-wrap: anywhere; }
.rep-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.rep-col {
  position: relative;
  overflow: hidden;
  min-width: 0;
  padding: 12px 10px 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--field);
  animation: rep-in 0.5s ease 0.3s both;
}
.rep-col::before { content: ""; position: absolute; left: 10px; right: 10px; top: 0; height: 3px; border-radius: 0 0 3px 3px; }
.rep-col-work::before { background: var(--sea); }
.rep-col-material::before { background: var(--brass); }
.rep-col-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.rep-col-title { font-size: 14px; font-weight: 700; }
.rep-col-count { font-size: 11px; color: var(--hint); white-space: nowrap; }
.rep-col-total { display: block; margin: 4px 0 8px; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.rep-col-work .rep-col-total { color: var(--sea); }
.rep-col-material .rep-col-total { color: var(--brass-text); }
.rep-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rep-item { padding: 7px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); animation: rep-in 0.4s ease both; }
.rep-item-top { display: flex; flex-direction: column; gap: 1px; }
.rep-item-title {
  min-width: 0;
  font-size: 13px;
  line-height: 1.3;
  overflow: hidden;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.rep-item-amount { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rep-item-meta { display: block; margin-top: 2px; font-size: 11px; color: var(--hint); overflow-wrap: anywhere; }
.rep-item-empty { border-style: dashed; background: transparent; color: var(--faint); font-size: 12px; text-align: center; }
@keyframes rep-grow { from { transform: scaleY(0.2); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }
@keyframes rep-rise { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rep-flicker { 0%, 100% { opacity: 0.6; } 46% { opacity: 0.6; } 50% { opacity: 0.15; } 56% { opacity: 0.6; } }
@keyframes rep-flat { 0%, 100% { opacity: 0.8; } 50% { opacity: 1; } }
@keyframes rep-glow { 0%, 100% { opacity: 0.12; } 50% { opacity: 0.5; } }
@keyframes rep-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes rep-swing { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
@keyframes rep-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
@keyframes rep-pop { from { transform: scale(0.9); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rep-in { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rep-breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
@media (max-width: 340px) { .rep-cols { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  .rep-dash *, .rep-dash { animation: none !important; transition: none !important; }
}
