/* Раздел «Карты» — вид района «Ночной район» (TZ-MAPS.md §6, композиция
   зафиксирована владельцем 12.09.2026). Язык — базовый язык сайта: чёрный
   кабинет, уголь, бронзовая линия, одно золото, Yeseva/Golos; сама карта —
   в игровых цветах, притушенных до сумерек, горят только алмазные крыши. */

.night-body { overflow: hidden; height: 100dvh; }
.night { position: fixed; inset: 0; z-index: 60; background: var(--clan-black); color: var(--clan-sand); }
/* Пока открыт район, каталог под ним не рисуется (размытие листа и наведение не нужны). */
.night-body .wall { visibility: hidden; }
.night-scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; cursor: grab; }
.night-scene.is-hover { cursor: pointer; }
.night-scene:active { cursor: grabbing; }
.night-labels { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
/* Виньетка: край экрана уходит в кабинет, центр — район. */
.night::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 95% at 50% 48%, transparent 58%, color-mix(in srgb, var(--clan-black) 80%, transparent) 100%); }
.night > * { z-index: 1; }
.night::after { z-index: 0; }
.night-scene, .night-labels { z-index: 0; }

/* ── Верхняя строка: район как в игре ── */
.night-top { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: flex-start; gap: 18px; padding: 16px 20px 0; pointer-events: none;
  background: linear-gradient(180deg, color-mix(in srgb, var(--clan-black) 78%, transparent), transparent); }
.night-top > * { pointer-events: auto; }
.night-back { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 7px;
  background: color-mix(in srgb, var(--clan-black) 70%, transparent); backdrop-filter: blur(8px); color: var(--clan-sand); font-size: 13px; text-decoration: none; }
.night-back svg { width: 16px; height: 16px; }
.night-back:hover { border-color: var(--clan-gold); }
.night-coords { margin: -6px 0 0; font: 400 clamp(40px, 6vw, 72px) "Yeseva One", Georgia, serif; line-height: 1; color: color-mix(in srgb, var(--clan-sand) 94%, white);
  text-shadow: 0 2px 18px color-mix(in srgb, var(--clan-black) 70%, transparent); white-space: nowrap; }
.night-coords small { font-size: .42em; color: var(--clan-sand); margin-left: .12em; }
.night-status { margin-left: auto; text-align: right; font-size: 12px; line-height: 1.45; color: var(--muted); max-width: 46vw; text-shadow: 0 1px 8px color-mix(in srgb, var(--clan-black) 80%, transparent); }
.night-status b, .night-status span { display: block; }
.night-status b { color: var(--clan-sand); font-weight: 600; font-size: 13px; }
.night-status .is-full { color: var(--clan-gold); }
.night-status .is-check { color: color-mix(in srgb, #d88b82 80%, var(--clan-sand)); }
.night-status .is-sample { color: var(--clan-gold); }

/* ── Подсказка жестов: одна строка, уходит сама ── */
.night-hint { position: absolute; left: 50%; bottom: 152px; transform: translateX(-50%); padding: 8px 14px; border-radius: 7px;
  background: color-mix(in srgb, var(--clan-black) 72%, transparent); border: 1px solid var(--line); font-size: 12px; color: var(--clan-sand); white-space: nowrap;
  transition: opacity .6s; }
.night-hint.is-gone { opacity: 0; pointer-events: none; }

/* ── Нижняя полоса: список · шкала огней · камера ── */
.night-bottom { position: absolute; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr auto 1fr; grid-template-areas: "list dial cam"; align-items: end; gap: 12px; padding: 0 16px 16px;
  background: linear-gradient(0deg, color-mix(in srgb, var(--clan-black) 82%, transparent), transparent); pointer-events: none; }
.night-bottom > * { pointer-events: auto; min-width: 0; }
.night-list-btn { grid-area: list; }
.night-dial { grid-area: dial; }
.night-cam { grid-area: cam; display: flex; justify-content: flex-end; gap: 6px; }
.night-cam button, .night-list-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 7px;
  background: color-mix(in srgb, var(--clan-charcoal) 86%, transparent); backdrop-filter: blur(8px); color: var(--clan-sand); font: 400 13px "Golos Text", "Segoe UI", Arial, sans-serif; }
.night-cam button svg { width: 18px; height: 18px; }
.night-cam button:hover, .night-list-btn:hover { border-color: var(--clan-gold); }
.night-cam button[aria-pressed="true"] { border-color: var(--clan-gold); color: var(--clan-gold); }
.night-list-btn { justify-self: start; }
.night-list-btn b { font-weight: 600; color: var(--clan-gold); }
.night-list-btn svg { width: 18px; height: 18px; flex: none; }

/* Шкала огней — она же легенда. */
.night-dial { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.night-lamps { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  background: color-mix(in srgb, var(--clan-charcoal) 88%, transparent); backdrop-filter: blur(10px); box-shadow: inset 0 1px color-mix(in srgb, var(--clan-sand) 8%, transparent); }
.lamp { --c: #fff; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 84px; padding: 8px 10px 7px; border: 0; border-right: 1px solid var(--line);
  background: transparent; color: var(--clan-sand); cursor: pointer; transition: background .2s; }
.lamp:last-of-type { border-right: 0; }
.lamp i { width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: 0 0 12px var(--c), 0 0 2px var(--c); transition: opacity .25s, box-shadow .25s; }
.lamp b { font: 400 26px "Yeseva One", Georgia, serif; line-height: 1; color: var(--c); text-shadow: 0 0 14px color-mix(in srgb, var(--c) 45%, transparent); font-variant-numeric: tabular-nums; }
.lamp span { font-size: 11px; color: var(--clan-sand); white-space: nowrap; }
.lamp.is-off i { opacity: .28; box-shadow: none; }
.lamp.is-off b { color: var(--muted); text-shadow: none; }
.lamp.is-off span { color: var(--muted); }
.dial-title { font-size: 11.5px; color: var(--clan-sand); letter-spacing: .04em; text-shadow: 0 1px 8px color-mix(in srgb, var(--clan-black) 90%, transparent), 0 0 2px color-mix(in srgb, var(--clan-black) 90%, transparent); }
.lamp:hover { background: color-mix(in srgb, var(--clan-gold) 8%, transparent); }
.lamp:focus-visible { outline: 2px solid var(--clan-gold); outline-offset: -2px; }
.dial-note { font-size: 11.5px; color: var(--muted); letter-spacing: .04em; text-align: center; max-width: min(92vw, 520px); }
.dial-note b { color: var(--clan-sand); font-weight: 600; }

/* ── Карточка здания: над крышей на десктопе, лист снизу на телефоне ── */
.night-card { position: absolute; width: 268px; padding: 14px 14px 12px; border: 1px solid color-mix(in srgb, var(--clan-gold) 55%, var(--line)); border-radius: 8px;
  background: color-mix(in srgb, var(--clan-black) 84%, transparent); backdrop-filter: blur(12px); box-shadow: var(--shadow), inset 0 1px color-mix(in srgb, var(--clan-sand) 8%, transparent);
  transform: translate(-50%, calc(-100% - 18px)); transition: opacity .18s; }
.night-card::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 12px; height: 12px; transform: translateX(-50%) rotate(45deg);
  background: color-mix(in srgb, var(--clan-black) 84%, transparent); border-right: 1px solid color-mix(in srgb, var(--clan-gold) 55%, var(--line)); border-bottom: 1px solid color-mix(in srgb, var(--clan-gold) 55%, var(--line)); }
.night-card.is-below { transform: translate(-50%, 18px); }
.night-card.is-below::after { bottom: auto; top: -7px; transform: translateX(-50%) rotate(225deg); }
.card-head { display: flex; align-items: flex-start; gap: 12px; }
.card-digit { --c: var(--clan-sand); font: 400 46px "Yeseva One", Georgia, serif; line-height: .9; color: var(--c); text-shadow: 0 0 22px color-mix(in srgb, var(--c) 45%, transparent); min-width: 34px; }
.card-digit.is-none { color: var(--muted); text-shadow: none; font-size: 30px; line-height: 1.3; }
.card-what { font-size: 12.5px; color: var(--muted); line-height: 1.4; padding-top: 5px; }
.card-what b { display: block; font-size: 15px; color: color-mix(in srgb, var(--clan-sand) 94%, white); font-weight: 600; margin-bottom: 2px; }
.card-close { margin-left: auto; flex: none; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--muted); display: grid; place-items: center; }
.card-close svg, .night-list header button svg { width: 16px; height: 16px; }
.card-close:hover { color: var(--clan-sand); background: color-mix(in srgb, var(--clan-sand) 10%, transparent); }
.card-meta { margin: 10px 0 0; padding: 10px 0 0; border-top: 1px solid var(--line); font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.card-meta b { color: var(--clan-sand); font-weight: 600; }
.card-meta .is-invest { color: var(--clan-gold); }
.card-note { margin: 8px 0 0; padding: 8px 10px; border-radius: 6px; background: color-mix(in srgb, var(--clan-gold) 9%, transparent); font-size: 12.5px; line-height: 1.45; color: var(--clan-sand); }
.card-actions { display: flex; gap: 6px; margin-top: 10px; }
.card-actions button { flex: 1; min-height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--clan-sand); font-size: 12.5px; }
.card-actions button:hover { border-color: var(--clan-gold); }

/* ── Список алмазных зданий ── */
.night-list { position: absolute; right: 16px; top: 96px; bottom: 100px; width: 300px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 8px;
  background: color-mix(in srgb, var(--clan-black) 84%, transparent); backdrop-filter: blur(12px); box-shadow: var(--shadow); overflow: hidden; }
.night-list header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.night-list header button { border: 0; background: transparent; color: var(--muted); width: 30px; height: 30px; padding: 0; border-radius: 6px; display: grid; place-items: center; }
.night-list header button:hover { color: var(--clan-sand); }
.night-rows { overflow: auto; scrollbar-width: thin; scrollbar-color: var(--clan-bronze) transparent; }
.night-row { --c: var(--clan-sand); display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: center; width: 100%; padding: 8px 14px; border: 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 50%, transparent);
  background: transparent; color: var(--clan-sand); text-align: left; font: 400 13px "Golos Text", "Segoe UI", Arial, sans-serif; cursor: pointer; }
.night-row:hover, .night-row.is-active { background: color-mix(in srgb, var(--clan-gold) 9%, transparent); }
.night-row b { font: 400 26px "Yeseva One", Georgia, serif; color: var(--c); text-shadow: 0 0 14px color-mix(in srgb, var(--c) 40%, transparent); text-align: center; }
.night-row span { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.night-row .is-invest { color: var(--clan-gold); }
.night-list .empty { padding: 20px 14px; color: var(--muted); font-size: 13px; }

/* ── Без WebGL ── */
.night-nogl { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--muted); font-size: 14px; }
.night-nogl b { display: block; color: var(--clan-sand); font: 400 22px "Yeseva One", Georgia, serif; margin-bottom: 6px; }

/* ── Район скрыт: идут работы по заполнению карты ──
   Тёмное превью района лежит на всём экране; по нему медленно идёт фонарь —
   дома в его круге проступают золотом и снова гаснут (та же картинка, тонированная
   в золото и открытая радиальной маской, которую водит анимация). Одна золотая
   сцена, без спиннеров; с reduced-motion фонарь стоит в центре. */
.night.is-work::after { display: none; }
.night-status .is-work { color: var(--clan-sand); }
.night-work { position: absolute; inset: 0; overflow: hidden; display: grid; place-items: center; padding: 96px 24px 120px; }
/* Виньетка прячет край плиты превью и держит контраст шапки в углах. */
.night-work::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(ellipse 78% 78% at 50% 50%, transparent 55%, var(--clan-black) 100%); }
.work-pic, .work-lamp, .work-glow { position: absolute; inset: 0; pointer-events: none; background-position: center; background-size: cover; background-repeat: no-repeat; transform: scale(1.2); }
.work-pic { opacity: .5; filter: saturate(.55) brightness(.7); }
.work-pic-none { background: radial-gradient(70% 70% at 50% 50%, color-mix(in srgb, var(--clan-charcoal) 70%, var(--clan-black)), var(--clan-black)); opacity: 1; filter: none; }
/* Свет фонаря: маска и золотое пятно движутся одной дорогой. Слой вдвое
   больше кадра, поэтому центр пятна стоит на (100 − p)% от позиции p%;
   орбита обходит текст в середине и не задевает шапку. */
.work-lamp, .work-glow { --lamp: radial-gradient(circle, #000 0%, rgba(0, 0, 0, .55) 6%, rgba(0, 0, 0, .12) 11%, transparent 16%); }
.work-lamp { filter: brightness(1.7) sepia(.85) saturate(1.5) contrast(1.05);
  -webkit-mask-image: var(--lamp); mask-image: var(--lamp); -webkit-mask-size: 200% 200%; mask-size: 200% 200%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: 30% 30%; mask-position: 30% 30%; }
.work-glow { background-image: radial-gradient(circle, color-mix(in srgb, var(--clan-gold) 24%, transparent) 0%, color-mix(in srgb, var(--clan-gold) 9%, transparent) 7%, transparent 16%);
  background-size: 200% 200%; background-position: 30% 30%; mix-blend-mode: screen; }
@media (prefers-reduced-motion: no-preference) {
  .work-lamp { animation: work-lantern-mask 32s ease-in-out infinite; }
  .work-glow { animation: work-lantern 32s ease-in-out infinite; }
  @keyframes work-lantern { 0% { background-position: 78% 62%; } 30% { background-position: 22% 62%; } 55% { background-position: 22% 24%; } 80% { background-position: 78% 24%; } 100% { background-position: 78% 62%; } }
  @keyframes work-lantern-mask {
    0% { -webkit-mask-position: 78% 62%; mask-position: 78% 62%; }
    30% { -webkit-mask-position: 22% 62%; mask-position: 22% 62%; }
    55% { -webkit-mask-position: 22% 24%; mask-position: 22% 24%; }
    80% { -webkit-mask-position: 78% 24%; mask-position: 78% 24%; }
    100% { -webkit-mask-position: 78% 62%; mask-position: 78% 62%; }
  }
}
/* Текст сидит в тёмном сердце кадра: за ним фонарь не ходит. */
.work-text { position: relative; z-index: 2; max-width: 560px; padding: 40px 24px; text-align: center; color: var(--clan-sand);
  background: radial-gradient(ellipse 70% 62% at 50% 50%, color-mix(in srgb, var(--clan-black) 88%, transparent) 40%, transparent 100%); }
.work-text h2 { margin: 0 0 14px; font: 400 clamp(36px, 5.2vw, 64px) "Yeseva One", Georgia, serif; line-height: 1; color: var(--clan-gold);
  text-shadow: 0 0 40px color-mix(in srgb, var(--clan-gold) 18%, transparent); text-wrap: balance; }
.work-text p { margin: 0 auto; max-width: 440px; font-size: 15px; line-height: 1.6; color: var(--clan-sand); text-wrap: pretty; }
.work-count { margin-top: 18px; font-size: 13.5px; color: var(--clan-sand); }
.work-count b { font: 400 30px "Yeseva One", Georgia, serif; color: color-mix(in srgb, var(--clan-sand) 94%, white); font-variant-numeric: tabular-nums; margin: 0 2px; }
.work-back { margin-top: 26px; min-height: 42px; padding: 0 16px; }
.work-back span { display: inline; }
@media (max-width: 700px) {
  .night-work { padding: 120px 16px 160px; }
  .work-text { padding: 24px 8px; }
  .work-text p { font-size: 14px; }
  .night-work .work-back span { display: inline; }
}

/* ── Телефон ── */
@media (max-width: 700px) {
  .night-top { padding: 12px 12px 0; gap: 10px; }
  .night-back span { display: none; }
  .night-back { padding: 0 10px; }
  .night-status { font-size: 11px; }
  .night-status b { font-size: 12px; }
  .night-top { flex-wrap: wrap; align-items: flex-start; row-gap: 4px; }
  .night-coords { font-size: 36px; margin-top: 0; }
  .night-status { flex-basis: 100%; max-width: none; margin-left: 50px; text-align: left; font-size: 10.5px; line-height: 1.4; }
  .night-status b { font-size: 11.5px; }
  .night-bottom { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "dial dial" "list cam"; justify-items: stretch; padding: 0 10px 12px; gap: 8px; }
  .dial-note { white-space: normal; }
  .night-dial { justify-self: center; }
  .night-cam { justify-self: end; }
  .night-cam button span, .night-list-btn span { display: none; }
  .night-list-btn { justify-self: start; }
  .lamp { min-width: 66px; padding: 7px 6px 6px; }
  .lamp b { font-size: 22px; }
  .lamp span { font-size: 10px; }
  .dial-note { font-size: 10.5px; }
  .night-hint { bottom: 178px; font-size: 11.5px; white-space: normal; text-align: center; max-width: 90vw; }
  .night-card, .night-card.is-below { left: 10px !important; right: 10px; top: auto !important; bottom: 158px; width: auto; transform: none; padding: 12px 12px 10px; }
  .card-digit { font-size: 40px; }
  .night-card::after { display: none; }
  .night-list { left: 10px; right: 10px; top: auto; bottom: 138px; width: auto; max-height: 48vh; }
}
@media (prefers-reduced-motion: reduce) {
  .night-hint, .night-card, .lamp i { transition: none; }
}

/* ═══ Каталог районов — «Стена огней» (композиция зафиксирована владельцем 12.09.2026) ═══
   Страница — сплошная тёмная стена ночных превью районов; координаты Yeseva
   поверх каждого, огни 1·2·3·4 внизу — легенда и фильтр (районы без таких
   домов гаснут, но не прячутся). Клик по превью — район на весь экран. */

.maps-body { background: var(--clan-black); scrollbar-width: thin; scrollbar-color: var(--clan-bronze) transparent; }
.maps-page.page-shell { display: block; width: 100%; max-width: none; margin: 0; padding: 0; }
.wall { padding-bottom: 48px; }

/* ── Шапка: одна строка заголовка, справа поиск и фильтры ── */
.wall-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, 1fr); gap: 14px 40px; align-items: end; padding: clamp(26px, 4vh, 48px) 24px 22px; }
.wall-head-row { display: contents; }
.wall-head .page-heading { display: block; grid-column: 1 / -1; margin: 0; }
.wall-title, .page-heading h1.wall-title, html.tg-mode .page-heading h1.wall-title { margin: 0; font: 400 clamp(44px, 6.4vw, 108px) "Yeseva One", Georgia, serif; line-height: .94; text-transform: uppercase; color: color-mix(in srgb, var(--clan-sand) 94%, white); white-space: nowrap; }
.wall-lead { margin: 0; max-width: 560px; font-size: 14.5px; line-height: 1.55; color: var(--clan-sand); }
.wall-sample { display: block; margin-top: 4px; color: var(--clan-gold); font-size: 12.5px; }
.wall-notice { display: block; margin-top: 6px; color: var(--clan-gold); font-size: 12.5px; }
.wall-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.wall-tools .control { min-height: 42px; }
.wall-tools select.control { width: auto; max-width: 220px; }
.wall-toggles { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.wall-toggles button { min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: var(--clan-sand); font: 400 12.5px "Golos Text", "Segoe UI", Arial, sans-serif; cursor: pointer; }
.wall-toggles button:hover { border-color: var(--clan-gold); }
.wall-toggles button[aria-pressed="true"] { border-color: var(--clan-gold); color: var(--clan-gold); background: color-mix(in srgb, var(--clan-gold) 9%, transparent); }
.wall-toggles button:focus-visible, .night-back:focus-visible { outline: 2px solid var(--clan-gold); outline-offset: 2px; }
.wall-count { grid-column: 1 / -1; font-size: 12px; letter-spacing: .04em; color: var(--muted); }
.wall-count b { color: var(--clan-sand); font-weight: 600; }

/* ── Стена: превью встык, полосы городов между группами ── */
.wall-grid { border-top: 1px solid var(--line); }
/* Каждый город — своя сетка: плитки не перебегают через полосы заголовков. */
.wall-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); grid-auto-flow: dense; gap: 0; }
.wall-continent { font: 400 11px "Golos Text", "Segoe UI", Arial, sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--clan-gold); margin-right: 6px; }
.wall-city { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding: 22px 24px 10px; min-width: 0; }
.wall-city h2, .wall-city h3 { margin: 0; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; font: 400 30px "Yeseva One", Georgia, serif; color: color-mix(in srgb, var(--clan-sand) 94%, white); }
.wall-city h2 svg, .wall-city h3 svg { width: 26px; height: 17px; flex: none; border-radius: 2px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--clan-black) 60%, transparent); }
.wall-city h2 small, .wall-city h3 small { font: 400 12px "Golos Text", "Segoe UI", Arial, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-left: 4px; }
.wall-city-n { margin-left: auto; font-size: 12px; color: var(--muted); }
.wall-city.is-many h2 + h2::before { content: "·"; color: var(--muted); margin-right: 4px; }

.tile { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--clan-black); color: var(--clan-sand); text-decoration: none; outline: 0;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--clan-black) 70%, transparent); isolation: isolate; }
.tile.is-big { grid-column: span 2; grid-row: span 2; }
.tile.span-2 { grid-column: span 2; aspect-ratio: 8 / 3; }
.tile-pic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2, .7, .2, 1), filter .35s, opacity .35s; }
.tile.is-shot .tile-pic { filter: brightness(.55) saturate(.7); }
.tile.is-shot:hover .tile-pic { filter: brightness(.7) saturate(.8); }
.tile-none { background: radial-gradient(80% 80% at 50% 50%, color-mix(in srgb, var(--clan-charcoal) 70%, var(--clan-black)), var(--clan-black)); }
.tile::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, color-mix(in srgb, var(--clan-black) 62%, transparent) 0%, transparent 34%, transparent 58%, color-mix(in srgb, var(--clan-black) 84%, transparent) 100%); }
.tile::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; box-shadow: inset 0 0 0 1px transparent; transition: box-shadow .2s; }
.tile:hover .tile-pic, .tile:focus-visible .tile-pic { transform: scale(1.045); filter: brightness(1.14); }
.tile:hover::after, .tile:focus-visible::after { box-shadow: inset 0 0 0 1px var(--clan-gold), inset 0 0 40px color-mix(in srgb, var(--clan-gold) 12%, transparent); }
.tile.is-dim .tile-pic { opacity: .32; filter: saturate(.4); }
.tile.is-dim .tile-coords { color: var(--muted); text-shadow: none; }
.tile.is-dim .tile-lamps i b { color: var(--muted); text-shadow: none; }
/* Район скрыт («идут работы»): превью серое с одним тёплым пятном фонаря —
   не путать с плиткой, погашенной лампой (та бесцветная и без света). */
.tile.is-work .tile-pic { opacity: .5; filter: saturate(0) brightness(.9); }
.tile.is-work::before { background: radial-gradient(circle at 38% 58%, color-mix(in srgb, var(--clan-gold) 16%, transparent) 0%, color-mix(in srgb, var(--clan-gold) 6%, transparent) 14%, transparent 30%),
  linear-gradient(180deg, color-mix(in srgb, var(--clan-black) 62%, transparent), color-mix(in srgb, var(--clan-black) 34%, transparent) 40%, color-mix(in srgb, var(--clan-black) 58%, transparent) 72%, color-mix(in srgb, var(--clan-black) 84%, transparent)); }
.tile.is-work .tile-coords { color: var(--clan-sand); text-shadow: none; }
.tile.is-work .tile-lamps { visibility: hidden; }
.tile.is-work:hover .tile-pic, .tile.is-work:focus-visible .tile-pic { filter: saturate(0) brightness(1.05); }
.tile-coords { position: absolute; left: 18px; top: 12px; z-index: 2; font: 400 56px "Yeseva One", Georgia, serif; line-height: 1; color: color-mix(in srgb, var(--clan-sand) 94%, white); font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 20px color-mix(in srgb, var(--clan-black) 85%, transparent), 0 0 2px color-mix(in srgb, var(--clan-black) 80%, transparent); }
.tile-coords small { display: block; margin-top: 4px; font: 400 11.5px "Golos Text", "Segoe UI", Arial, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--clan-sand); }
.tile-coords mark, .tile-state mark { background: color-mix(in srgb, var(--clan-gold) 34%, transparent); color: inherit; }
.tile.is-big .tile-coords { left: 24px; top: 18px; font-size: 96px; }
.tile.is-big .tile-coords small { font-size: 13px; margin-top: 8px; }
.tile-foot { position: absolute; left: 18px; right: 18px; bottom: 14px; z-index: 2; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; min-width: 0; }
.tile-lamps { display: flex; gap: 8px; flex: none; align-items: flex-end; }
.wall.off-1 .tile-lamps i[data-d="1"] b, .wall.off-2 .tile-lamps i[data-d="2"] b, .wall.off-3 .tile-lamps i[data-d="3"] b, .wall.off-4 .tile-lamps i[data-d="4"] b { color: color-mix(in srgb, var(--clan-sand) 34%, transparent); text-shadow: none; }
.tile-lamps i { --c: #fff; display: inline-flex; flex-direction: column; align-items: center; min-width: 20px; font-style: normal; }
.tile-lamps i b { font: 400 24px "Yeseva One", Georgia, serif; line-height: 1; color: var(--c); text-shadow: 0 0 12px color-mix(in srgb, var(--c) 45%, transparent), 0 1px 6px color-mix(in srgb, var(--clan-black) 80%, transparent); font-variant-numeric: tabular-nums; }
.tile-lamps i span { font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.tile-lamps i.is-zero b { color: color-mix(in srgb, var(--clan-sand) 34%, transparent); text-shadow: none; }
.tile-lamps i.is-invest b { color: var(--clan-gold); font: 600 15px "Golos Text", "Segoe UI", Arial, sans-serif; line-height: 1; padding-bottom: 3px; }
.tile-lamps i.is-invest.is-zero b { color: color-mix(in srgb, var(--clan-sand) 34%, transparent); }
.tile-state { text-align: right; min-width: 0; flex: 1 1 auto; overflow: hidden; font-size: 11.5px; line-height: 1.4; color: var(--muted); }
.tile-state b { display: block; font-weight: 600; color: var(--clan-sand); text-wrap: balance; text-shadow: 0 1px 8px color-mix(in srgb, var(--clan-black) 80%, transparent); }
.tile-state b.is-full { color: var(--clan-gold); }
.tile-state b.is-check { color: color-mix(in srgb, #d88b82 80%, var(--clan-sand)); }
.tile-state b.is-work { color: var(--clan-sand); }
.tile-state span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile.is-big .tile-lamps i b { font-size: 34px; }
.tile.is-big .tile-foot { left: 24px; right: 24px; bottom: 20px; }
.wall-empty { grid-column: 1 / -1; padding: 60px 24px; color: var(--muted); font-size: 14px; }
.wall-empty b { display: block; color: var(--clan-sand); font: 400 24px "Yeseva One", Georgia, serif; margin-bottom: 6px; }

/* Шкала огней внизу экрана — та же, что на карте района. */
.wall-dial { position: fixed; left: 50%; bottom: 16px; z-index: 40; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.wall-dial > * { pointer-events: auto; }
.wall-dial { transition: opacity .3s; }
.wall-dial.is-away { opacity: 0; pointer-events: none; }
.wall-dial .dial-title, .wall-dial .dial-note { padding: 4px 10px; border-radius: 6px; background: color-mix(in srgb, var(--clan-black) 76%, transparent); backdrop-filter: blur(8px); }
.wall-dial .lamp span { font-size: 10.5px; }

/* ── Скриншотный район ── */
.shots-body { position: absolute; inset: 0; overflow: auto; padding: 120px 20px 40px; box-sizing: border-box; }
.shots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; width: min(1180px, 100%); margin: 0 auto; }
.shots-grid button { padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--clan-charcoal); cursor: pointer; aspect-ratio: 4 / 3; }
.shots-grid button:hover { border-color: var(--clan-gold); }
.shots-grid img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.shots-note { width: min(1180px, 100%); margin: 0 auto 16px; padding: 12px 14px; border-radius: 6px; background: color-mix(in srgb, var(--clan-gold) 9%, transparent); font-size: 13.5px; line-height: 1.5; color: var(--clan-sand); }
.shots-empty { width: min(1180px, 100%); margin: 0 auto; color: var(--muted); }
.shot-full { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; background: color-mix(in srgb, var(--clan-black) 92%, transparent); }
.shot-full img { max-width: 100%; max-height: 92vh; border: 1px solid var(--clan-bronze); box-shadow: var(--shadow); }
.shot-full button { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 7px; background: color-mix(in srgb, var(--clan-charcoal) 86%, transparent); color: var(--clan-sand); display: grid; place-items: center; }
.shot-full button svg { width: 18px; height: 18px; }

/* ── Запасной вид без WebGL: превью и список ── */
.night-flat { position: absolute; inset: 0; overflow: auto; padding: 120px 20px 40px; box-sizing: border-box; }
.night-flat-inner { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); gap: 18px; width: min(1180px, 100%); margin: 0 auto; }
.night-flat img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--clan-black); }
.night-flat .night-list { position: static; width: auto; max-height: 70vh; }
.night-flat p { margin: 0 0 12px; color: var(--muted); font-size: 13px; }

/* ── Mini App: полоса управления над нижней навигацией ── */
html.tg-mode .night-bottom { padding-bottom: calc(16px + 72px + var(--tg-safe-area-inset-bottom, env(safe-area-inset-bottom, 0px))); }
html.tg-mode .night-hint { bottom: calc(152px + 72px); }
/* В открытом районе своя верхняя строка — шапка приложения не нужна. */
html.tg-mode body.night-body #tg-appbar { display: none; }
html.tg-mode .night-list { bottom: calc(100px + 72px); }
html.tg-mode .wall-dial { bottom: calc(12px + 72px + var(--tg-safe-area-inset-bottom, env(safe-area-inset-bottom, 0px))); }
html.tg-mode .wall { padding-bottom: 100px; }
html.tg-mode .wall-head { padding-top: calc(52px + var(--tg-content-safe-area-inset-top, 0px)); }
html.tg-mode .night-top { padding-top: calc(12px + var(--tg-content-safe-area-inset-top, 0px)); }
@media (max-width: 700px) {
  html.tg-mode .night-hint { bottom: calc(178px + 72px + 56px); }
  html.tg-mode .night-card, html.tg-mode .night-card.is-below { bottom: calc(158px + 72px); }
  html.tg-mode .night-list { bottom: calc(138px + 72px); }
}

/* ── Телефон и узкие экраны ── */
@media (max-width: 900px) {
  .wall-head { grid-template-columns: 1fr; gap: 14px; padding: 22px 16px 16px; }
  .wall-title, .page-heading h1.wall-title, html.tg-mode .page-heading h1.wall-title { font-size: clamp(40px, 11vw, 64px); white-space: normal; }
  .wall-lead { font-size: 14px; }
  .wall-tools { grid-template-columns: 1fr; }
  .wall-tools select.control { max-width: none; width: 100%; }
  .wall-tiles { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
  .wall-city { padding: 18px 16px 8px; }
  .wall-city h2 { font-size: 26px; }
  .tile-coords { left: 14px; top: 10px; font-size: 48px; }
  .tile.is-big .tile-coords { font-size: 64px; }
  .tile-foot { left: 14px; right: 14px; bottom: 12px; }

  .wall { padding-bottom: 48px; }
  .wall-dial .lamp { min-width: 66px; padding: 7px 6px 6px; }
  .wall-dial .dial-note { max-width: 92vw; }
  .shots-body, .night-flat { padding-top: 132px; }
  .night-flat-inner { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .wall-tiles { grid-template-columns: 1fr 1fr; }
  .tile.is-big { grid-column: 1 / -1; grid-row: auto; }
  .tile-coords { font-size: 40px; }
  .tile-lamps { gap: 6px; }
  .tile-lamps i { min-width: 18px; }
  .tile-lamps i b { font-size: 20px; }
  .wall-dial .dial-title { display: none; }
  .wall-dial .lamp span { display: none; }
  .wall-dial .lamp { min-width: 54px; padding: 6px 6px 5px; }
  .tile-foot { flex-wrap: wrap; row-gap: 4px; }
  .tile-state { flex: 1 0 100%; order: -1; text-align: left; }
  .tile-state span { display: none; }
  .tile-state b { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .tile-pic, .tile::after { transition: none; }
}

/* ═══ Админка «Карты» (maps-admin.html): список районов · сцена в режиме правки · поля района ═══ */
.maps-admin-body { overflow: hidden; }
.maps-admin { display: grid; grid-template-columns: 300px minmax(0, 1fr) 320px; height: calc(100vh - 70px); min-height: 520px; }
.ma-side { display: flex; flex-direction: column; gap: 10px; padding: 14px 12px 14px 16px; border-right: 1px solid var(--line); overflow: auto; scrollbar-width: thin; scrollbar-color: var(--clan-bronze) transparent; }
.ma-side-head h1 { margin: 0; font: 400 26px "Yeseva One", Georgia, serif; color: color-mix(in srgb, var(--clan-sand) 94%, white); }
.ma-side-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.ma-sample { padding: 10px 12px; border-radius: 6px; background: color-mix(in srgb, var(--clan-gold) 9%, transparent); font-size: 12.5px; line-height: 1.45; color: var(--clan-sand); }
.ma-sample b { color: var(--clan-gold); }
.ma-sample .button { display: flex; width: 100%; box-sizing: border-box; margin-top: 8px; min-height: 34px; }
.ma-fold { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--clan-charcoal); }
.ma-fold > summary h2 { font: 600 13px "Golos Text", "Segoe UI", Arial, sans-serif; color: var(--clan-sand); }
.ma-add { display: flex; flex-direction: column; gap: 8px; }
.ma-add-coords { display: flex; align-items: center; gap: 8px; }
.ma-add-coords span { font: 400 22px "Yeseva One", Georgia, serif; color: var(--muted); }
.ma-hint { margin: 0; font-size: 11.5px; line-height: 1.45; color: var(--muted); }
.ma-list { display: flex; flex-direction: column; }
.ma-city { margin: 12px 0 4px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--clan-gold); }
.ma-city span { color: var(--muted); letter-spacing: 0; margin-left: 6px; }
.ma-item { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; width: 100%; padding: 7px 10px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--clan-sand); text-align: left; font: 400 12.5px "Golos Text", "Segoe UI", Arial, sans-serif; cursor: pointer; }
.ma-item:hover { border-color: var(--line); }
.ma-item.is-on { border-color: var(--clan-gold); background: color-mix(in srgb, var(--clan-gold) 9%, transparent); }
.ma-item b { font: 400 22px "Yeseva One", Georgia, serif; color: color-mix(in srgb, var(--clan-sand) 94%, white); font-variant-numeric: tabular-nums; }
.ma-item.is-on b { color: var(--clan-gold); }
.ma-item span { color: var(--muted); }
.ma-item span.is-full { color: var(--clan-gold); }
.ma-item span.is-check { color: color-mix(in srgb, #d88b82 80%, var(--clan-sand)); }
.ma-item span.is-work { color: var(--clan-sand); }
.ma-item i { font-style: normal; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ma-reg-title { margin: 8px 0 6px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--clan-gold); }
.ma-reg-row { display: flex; align-items: center; gap: 6px; padding: 4px 0; font-size: 12.5px; }
.ma-reg-row > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ma-reg-clan { flex: 0 0 104px; min-height: 30px; padding: 4px 6px; font-size: 12px; }
.ma-mini { width: 28px; height: 28px; flex: none; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--clan-sand); cursor: pointer; }
.ma-mini:hover { border-color: var(--clan-gold); color: var(--clan-gold); }
.ma-mini:disabled { opacity: .3; cursor: default; }
.ma-reg-add { display: flex; gap: 6px; margin: 6px 0 4px; }
.ma-reg-add .control { min-height: 34px; padding: 6px 10px; font-size: 12.5px; }
.ma-reg-add select.control { flex: 0 0 110px; }
.ma-reg-add .button { min-height: 34px; padding: 0 12px; }

.ma-main { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--clan-black); }
.ma-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--clan-charcoal); }
.ma-brush { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px 3px 10px; border: 1px solid var(--line); border-radius: 7px; }
.ma-brush > span { font-size: 12px; color: var(--muted); margin-right: 4px; }
.ma-brush button { --c: var(--clan-sand); width: 34px; height: 32px; padding: 0; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--c); font: 400 18px "Yeseva One", Georgia, serif; cursor: pointer; }
.ma-brush button[data-brush="off"] { width: auto; padding: 0 10px; font: 400 12.5px "Golos Text", "Segoe UI", Arial, sans-serif; color: var(--clan-sand); }
.ma-brush button[data-brush="1"] { --c: #e9e6ff; } .ma-brush button[data-brush="2"] { --c: #f4d03f; } .ma-brush button[data-brush="3"] { --c: #4cd964; } .ma-brush button[data-brush="4"] { --c: #3d8bff; }
.ma-brush button:hover { border-color: var(--line); }
.ma-brush button[aria-pressed="true"] { border-color: var(--clan-gold); background: color-mix(in srgb, var(--clan-gold) 12%, transparent); }
.ma-toolbar .button { min-height: 38px; }
.ma-progress { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.ma-progress b { color: var(--clan-sand); font-weight: 600; }
.ma-progress i { font: 400 16px "Yeseva One", Georgia, serif; color: var(--c); font-variant-numeric: tabular-nums; }
.ma-map { position: relative; flex: 1; min-height: 0; }
.ma-map.is-brush .night-scene { cursor: crosshair; }
.maps-admin .night { position: absolute; inset: 0; z-index: 1; }
.maps-admin .night-back { display: none; }
.maps-admin .night-card, .maps-admin .night-card.is-below { left: 16px !important; right: auto; top: auto !important; bottom: 150px; width: 300px; transform: none; }
.maps-admin .night-card::after { display: none; }
.maps-admin .night-cam button span { display: none; }
.maps-admin .lamp { min-width: 72px; }
.maps-admin .night-status { max-width: 40vw; }
.maps-admin .night-hint { display: none; }
/* В админке счётчики огней стоят в панели инструментов — шкала снизу не нужна, сцена свободнее. */
.maps-admin .night-dial { display: none; }
.maps-admin .night-bottom { grid-template-columns: auto 1fr auto; }
.maps-admin .night-list { bottom: 150px; }
.maps-admin .night-rows { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 22px), transparent); }
.maps-admin-body .toast { right: auto; left: 50%; transform: translateX(-50%); top: 150px; bottom: auto; }
.maps-admin .dial-title { padding: 3px 10px; border-radius: 6px; background: color-mix(in srgb, var(--clan-black) 72%, transparent); }
.maps-admin .night-coords { font-size: clamp(30px, 3.4vw, 48px); }
.ma-empty, .ma-loading { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--muted); font-size: 14px; line-height: 1.5; }
.ma-empty b, .ma-loading b { display: block; color: var(--clan-sand); font: 400 24px "Yeseva One", Georgia, serif; margin-bottom: 6px; }
.ma-empty > div, .ma-loading > div { max-width: 420px; }
.ma-loading { z-index: 2; background: var(--clan-black); }

.ma-props { display: flex; flex-direction: column; gap: 14px; padding: 14px 16px; border-left: 1px solid var(--line); overflow: auto; scrollbar-width: thin; scrollbar-color: var(--clan-bronze) transparent; }
.ma-props-head b { font: 400 30px "Yeseva One", Georgia, serif; color: color-mix(in srgb, var(--clan-sand) 94%, white); }
.ma-props-head span { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
/* Доступ района в каталоге: два положения, включённое — золотом. */
.ma-seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.ma-seg button { min-height: 40px; padding: 0 10px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--clan-sand); font: 400 12.5px "Golos Text", "Segoe UI", Arial, sans-serif; line-height: 1.25; cursor: pointer; }
.ma-seg button:last-child { border-right: 0; }
.ma-seg button:hover { background: color-mix(in srgb, var(--clan-gold) 6%, transparent); }
.ma-seg button[aria-pressed="true"] { color: var(--clan-gold); background: color-mix(in srgb, var(--clan-gold) 12%, transparent); }
.ma-seg button:focus-visible { outline: 2px solid var(--clan-gold); outline-offset: -2px; }
.ma-check { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.ma-check input { accent-color: var(--clan-gold); width: 16px; height: 16px; }
.ma-field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.ma-field > span { letter-spacing: .1em; text-transform: uppercase; font-size: 11px; color: var(--clan-gold); }
.ma-field textarea.control { font-size: 13px; line-height: 1.45; resize: vertical; }
.ma-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ma-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--clan-charcoal); color: var(--clan-sand); font-size: 12.5px; }
.ma-chip i { font-style: normal; color: var(--muted); }
.ma-chip button { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; }
.ma-chip button:hover { color: var(--clan-sand); background: color-mix(in srgb, var(--clan-sand) 10%, transparent); }
.ma-shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.ma-shot { position: relative; aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--clan-black); }
.ma-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.ma-shot > div { position: absolute; right: 4px; bottom: 4px; display: flex; gap: 3px; }
.ma-shot .ma-mini { width: 24px; height: 24px; background: color-mix(in srgb, var(--clan-black) 75%, transparent); }
.ma-upload { justify-content: center; cursor: pointer; }
.ma-log { display: flex; flex-direction: column; gap: 4px; font-size: 12px; line-height: 1.4; color: var(--clan-sand); }
.ma-log > div { padding: 4px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 50%, transparent); }
.ma-log time { color: var(--muted); margin-right: 4px; }
.ma-log b { font-weight: 600; margin-right: 4px; }

/* Карточка здания в режиме правки. */
.card-edit { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.edit-values { display: flex; gap: 4px; }
.edit-values button { --c: var(--clan-sand); flex: 1; min-height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--c); font: 400 20px "Yeseva One", Georgia, serif; cursor: pointer; }
.edit-values button:hover { border-color: var(--clan-gold); }
.edit-values button.is-on { border-color: var(--clan-gold); background: color-mix(in srgb, var(--clan-gold) 12%, transparent); box-shadow: 0 0 12px color-mix(in srgb, var(--c) 30%, transparent); }
.edit-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.edit-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.edit-seg button { min-height: 28px; padding: 0 9px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--clan-sand); font: 400 12px "Golos Text", "Segoe UI", Arial, sans-serif; cursor: pointer; }
.edit-seg button:last-child { border-right: 0; }
.edit-seg button.is-on { color: var(--clan-gold); background: color-mix(in srgb, var(--clan-gold) 12%, transparent); }
.edit-note { width: 100%; box-sizing: border-box; min-height: 44px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--clan-charcoal); color: var(--clan-sand); font: 400 12.5px "Golos Text", "Segoe UI", Arial, sans-serif; resize: vertical; }
.edit-note:focus { outline: 0; border-color: var(--clan-gold); }
.edit-save { min-height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--clan-sand); font-size: 12px; cursor: pointer; }
.edit-save:hover { border-color: var(--clan-gold); }

@media (max-width: 1100px) {
  .maps-admin-body { overflow: auto; }
  .maps-admin { grid-template-columns: 1fr; height: auto; }
  .ma-side { border-right: 0; border-bottom: 1px solid var(--line); max-height: 40vh; }
  .ma-main { height: 70vh; }
  .ma-props { border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 480px) {
  .wall-tiles { grid-template-columns: 1fr; }
  .tile.span-2 { grid-column: auto; aspect-ratio: 4 / 3; }
  .tile-coords { font-size: 48px; }
  .tile-lamps i b { font-size: 24px; }
  .tile-state span { display: block; }
  .tile-state { flex: 1 1 auto; order: 0; text-align: right; }
  .tile-foot { flex-wrap: nowrap; }
}
