/* Softline · Мониторинг событий — мир «щит диспетчера» (ISA-101).
   Нормальное состояние серое и тихое; цвет — только отклонение, выбор и действие. */
:root {
  --ground: #1d2024;
  --panel: #272b30;
  --panel-2: #2e3339;
  --inset: #202328;
  --line: #3a4047;
  --line-2: #4a5159;
  --text: #dde1e5;
  --text-2: #aab1b8;
  --text-3: #858d95;
  --select: #5d8fd6;
  --select-2: #3e5f8f;
  --select-bg: rgba(93, 143, 214, .14);
  --p1: #e0443f;
  --p2: #d9a13a;
  --p3: #cdbf4c;
  --p4: #5fb0c6;
  --p1-bg: rgba(224, 68, 63, .16);
  --p2-bg: rgba(217, 161, 58, .15);
  --p3-bg: rgba(205, 191, 76, .13);
  --p4-bg: rgba(95, 176, 198, .13);
  --chart-other: #7a848e;
  --ok: #8fb99a;
  --radius: 4px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --shadow: 0 8px 24px rgba(0, 0, 0, .35), 0 1px 2px rgba(0, 0, 0, .3);
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--text);
  font: 14px/1.45 var(--font); font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--select-2); color: #fff; }
* { scrollbar-color: var(--line-2) transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 2px solid var(--ground); }
a { color: var(--select); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--select); outline-offset: 2px; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.005em; }
h1 { font-size: 20px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon.sm { width: 15px; height: 15px; }

/* ---------------------------------------------------------------- controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 32px; padding: 0 12px;
  border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--panel-2); color: var(--text);
  cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: #363c43; border-color: #58606a; }
.btn:active { background: #2b3036; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--select); border-color: var(--select); color: #fff; font-weight: 600; }
.btn.primary:hover { background: #6d9ce0; border-color: #6d9ce0; }
.btn.danger { border-color: rgba(224, 68, 63, .6); color: #f2a19e; background: transparent; }
.btn.danger:hover { background: var(--p1-bg); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--panel-2); color: var(--text); }
.btn.sm { height: 26px; padding: 0 9px; font-size: 13px; }
.btn.icon-only { width: 32px; padding: 0; }
.btn.sm.icon-only { width: 26px; }
.btn[aria-busy="true"] { color: transparent; position: relative; }
.btn[aria-busy="true"]::after {
  content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.field { display: grid; gap: 5px; }
.field > span { font-size: 12.5px; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--text-3); }
.input, .select, .textarea {
  height: 32px; padding: 0 10px; width: 100%; background: var(--inset); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s, background .15s;
}
.textarea { height: auto; min-height: 72px; padding: 8px 10px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-2); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--select); background: #1b1e22; }
.input[aria-invalid="true"] { border-color: var(--p1); }
.select { appearance: none; padding-right: 28px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23aab1b8' stroke-width='1.6'%3E%3Cpath d='m2.5 4.5 3.5 3.5 3.5-3.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }
.checkbox { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.checkbox input { accent-color: var(--select); width: 15px; height: 15px; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch i { width: 34px; height: 20px; border-radius: 20px; background: var(--line-2); position: relative; transition: background .2s; flex: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #cfd4d9; transition: transform .2s var(--ease); }
.switch input:checked + i { background: var(--select); }
.switch input:checked + i::after { transform: translateX(14px); background: #fff; }
.switch input:focus-visible + i { outline: 2px solid var(--select); outline-offset: 2px; }
.switch input:disabled + i { opacity: .45; }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.seg button { border: 0; background: transparent; color: var(--text-2); height: 30px; padding: 0 11px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button:hover { color: var(--text); background: var(--panel-2); }
.seg button[aria-pressed="true"] { background: var(--select-bg); color: var(--text); box-shadow: inset 0 -2px 0 var(--select); }

/* ---------------------------------------------------------------- priority & status */
.prio {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 3px; flex: none;
  font: 700 12px/1 var(--font); color: #111;
}
.prio.p1 { background: var(--p1); }
.prio.p2 { background: var(--p2); clip-path: polygon(50% 0, 100% 100%, 0 100%); padding-top: 6px; }
.prio.p3 { background: var(--p3); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.prio.p4 { background: var(--p4); border-radius: 50%; }
.prio.off { background: var(--line-2); color: var(--text-2); }

@keyframes flash { 50% { opacity: .28; } }


.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); flex: none; }
.status.new::before { background: transparent; border: 2px solid currentColor; }
.status.new { color: #f0f2f4; font-weight: 600; }
.status.acknowledged::before { background: var(--select); }
.status.escalated::before { background: var(--p2); border-radius: 1px; transform: rotate(45deg); }
.status.closed { color: var(--text-2); }
.status.false_alarm { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--text-3); }
.status.false_alarm::before { background: transparent; border: 1px dashed var(--text-3); }

.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 3px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text-2); font-size: 12px; white-space: nowrap; }
.tag.demo { border-color: rgba(217, 161, 58, .45); color: #e6c282; background: rgba(217, 161, 58, .08); }

/* ---------------------------------------------------------------- shell */
.app { display: grid; grid-template-columns: 216px 1fr; grid-template-rows: 52px 1fr; height: 100vh; }
.app.rail-collapsed { grid-template-columns: 60px 1fr; }
.rail { grid-row: 1 / 3; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.brand { height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.wordmark { font-weight: 700; font-size: 16px; letter-spacing: .01em; color: #f4f6f8; }
.wordmark b { color: var(--select); font-weight: 700; }
.brand small { color: var(--text-3); font-size: 11.5px; line-height: 1.15; }
.nav { padding: 10px 8px; display: grid; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 10px; border-radius: var(--radius);
  color: var(--text-2); text-decoration: none; position: relative;
}
.nav a:hover { background: var(--panel-2); color: var(--text); }
.nav a[aria-current="page"] { background: var(--select-bg); color: #fff; }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: -8px; top: 9px; bottom: 9px; width: 2px; background: var(--select); border-radius: 2px; }
.nav .count { margin-left: auto; min-width: 20px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--p1); color: #fff; font-size: 11.5px; font-weight: 700; display: grid; place-items: center; }
.rail-foot { margin-top: auto; padding: 10px 8px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.app.rail-collapsed .nav span, .app.rail-collapsed .brand small, .app.rail-collapsed .wordmark, .app.rail-collapsed .rail-foot .label, .app.rail-collapsed .nav .count { display: none; }
.app.rail-collapsed .brand { justify-content: center; padding: 0; }

.topbar { display: flex; align-items: center; gap: 16px; padding: 0 16px; border-bottom: 1px solid var(--line); background: var(--panel); min-width: 0; }
.topbar h1 { font-size: 16px; white-space: nowrap; }
.crumbs { display: flex; gap: 8px; align-items: center; color: var(--text-3); font-size: 13px; white-space: nowrap; }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--text); }

.alarm-banner { display: flex; align-items: stretch; height: 34px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-left: auto; }
.alarm-banner button { display: flex; align-items: center; gap: 8px; padding: 0 11px; border: 0; background: transparent; cursor: pointer; color: var(--text-2); }
.alarm-banner button + button { border-left: 1px solid var(--line); }
.alarm-banner button:hover { background: var(--panel-2); color: var(--text); }
.alarm-banner b { font-size: 15px; color: var(--text); min-width: 1ch; }
.alarm-banner .zero { opacity: .55; }
.alarm-banner .zero .prio { background: var(--line-2); }
.shift { display: grid; line-height: 1.15; text-align: right; }
.shift b { font-size: 14px; font-weight: 600; }
.shift span { font-size: 11.5px; color: var(--text-3); }
.user-btn { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; cursor: pointer; padding: 4px 6px; border-radius: var(--radius); }
.user-btn:hover { background: var(--panel-2); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: #3b4250; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #cdd6e3; }
.user-btn .who { display: grid; text-align: left; line-height: 1.15; }
.user-btn .who small { color: var(--text-3); font-size: 11.5px; }
.menu { position: fixed; min-width: 220px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 6px; box-shadow: var(--shadow); padding: 6px; z-index: 50; }
.menu button, .menu a { display: flex; width: 100%; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border: 0; background: transparent; color: var(--text); border-radius: 4px; cursor: pointer; text-decoration: none; }
.menu button:hover, .menu a:hover { background: var(--select-bg); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.menu .meta { padding: 6px 10px 8px; color: var(--text-3); font-size: 12px; }

.main { min-width: 0; min-height: 0; overflow: auto; position: relative; }
.page { padding: 18px 20px 28px; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; min-width: 0; }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line); min-height: 46px; }
.panel-head h2 { font-size: 14px; }
.panel-head .actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.panel-body { padding: 14px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.filters .input, .filters .select { width: auto; min-width: 140px; }
.filters .grow { flex: 1; min-width: 200px; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding: 0 14px; overflow-x: auto; }
.tabs button { border: 0; background: transparent; color: var(--text-2); height: 42px; padding: 0 12px; cursor: pointer; position: relative; white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: #fff; }
.tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--select); }

/* ---------------------------------------------------------------- tables */
.table-wrap { overflow: auto; }
table.data { width: 100%; border-collapse: collapse; }
.data th { position: sticky; top: 0; background: var(--panel); z-index: 1; text-align: left; font-weight: 500; font-size: 12.5px; color: var(--text-3); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data td { padding: 9px 12px; border-bottom: 1px solid #30353b; vertical-align: middle; }
.data tbody tr { transition: background .12s; }
.data tbody tr.clickable { cursor: pointer; }
.data tbody tr:hover { background: #2c3136; }
.data tbody tr[aria-selected="true"] { background: var(--select-bg); }
.data .num { text-align: right; }
.data .thumb { width: 64px; height: 40px; object-fit: cover; border-radius: 3px; background: #000; display: block; }
.cell-main { font-weight: 500; }
.cell-sub { font-size: 12.5px; color: var(--text-3); }
.pager { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); color: var(--text-2); font-size: 13px; }
.pager .actions { margin-left: auto; display: flex; gap: 6px; }

.empty { padding: 36px 20px; text-align: center; color: var(--text-2); display: grid; gap: 8px; justify-items: center; }
.empty .icon { width: 28px; height: 28px; color: var(--text-3); }
.empty b { color: var(--text); font-weight: 600; }
.skeleton { background: linear-gradient(90deg, #2b3035 0%, #33393f 50%, #2b3035 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 3px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------------------------------------------------------------- console */
.console { display: grid; grid-template-columns: 300px minmax(0, 1fr) 372px; height: calc(100vh - 52px); }
.console > * { min-height: 0; }
.site-col { border-right: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; }
.site-col .tabs { padding: 0 8px; }
.plan-box { padding: 10px; border-bottom: 1px solid var(--line); flex: none; }
.plan { width: 100%; display: block; background: var(--inset); border: 1px solid var(--line); border-radius: 4px; }
.plan .sh-building { fill: #2c3137; stroke: #59616a; stroke-width: 2; }
.plan .sh-room { fill: none; stroke: #4a525a; stroke-width: 1.5; }
.plan .sh-area { fill: rgba(255, 255, 255, .02); stroke: #4a525a; stroke-width: 1.5; stroke-dasharray: 8 6; }
.plan .sh-fence { fill: none; stroke: #7c858e; stroke-width: 3; stroke-dasharray: 2 7; stroke-linecap: round; }
.plan .sh-road { fill: none; stroke: #3a4046; stroke-width: 16; stroke-linecap: round; stroke-linejoin: round; }
.plan .sh-label { fill: #9aa2aa; font: 500 21px var(--font); }
.plan .sh-gate { fill: #4a5159; }
.plan .cam { cursor: pointer; }
.plan .cam .fov { fill: rgba(170, 177, 184, .10); }
.plan .cam .node { fill: #8f979f; stroke: #1c1f23; stroke-width: 3; }
.plan .cam text { fill: #d5d9dc; font: 700 30px var(--font); paint-order: stroke; stroke: #202328; stroke-width: 5px; }
.plan .cam:hover .node, .plan .cam.focus .node { fill: #fff; }
.plan .cam.focus .fov { fill: rgba(93, 143, 214, .22); }
.plan .cam.alarm-1 .node { fill: var(--p1); } .plan .cam.alarm-1 .fov { fill: rgba(224, 68, 63, .22); }
.plan .cam.alarm-2 .node { fill: var(--p2); } .plan .cam.alarm-2 .fov { fill: rgba(217, 161, 58, .2); }
.plan .cam.alarm-3 .node { fill: var(--p3); } .plan .cam.alarm-3 .fov { fill: rgba(205, 191, 76, .18); }

.cam-list { overflow: auto; padding: 6px; }
.cam-row { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 5px 8px; border-radius: 4px; cursor: pointer; }
.cam-row:hover { background: var(--panel-2); }
.cam-row[aria-current="true"] { background: var(--select-bg); }
.cam-row .code { font-size: 12px; color: var(--text-3); }
.cam-dot { width: 10px; height: 10px; border-radius: 50%; background: #6b737b; justify-self: center; }

.wall-col { display: flex; flex-direction: column; min-width: 0; }
.wall-toolbar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--panel); }
.wall { flex: 1; min-height: 0; display: grid; gap: 6px; padding: 6px; background: #15171a; overflow: hidden; }
.wall.l1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.wall.l4 { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); }
.wall.l9 { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); }
.wall.l16 { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(4, minmax(0, 1fr)); }
.tile { position: relative; background: #000; border-radius: 3px; overflow: hidden; outline: 1px solid #2c3136; min-height: 0; }

.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile-head { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: linear-gradient(rgba(10, 12, 14, .85), rgba(10, 12, 14, 0)); font-size: 12.5px; }
.tile-head b { font-weight: 600; white-space: nowrap; }
.tile-head .actions { margin-left: auto; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.tile:hover .tile-head .actions, .tile:focus-within .tile-head .actions { opacity: 1; }
.tile-head .btn { background: rgba(30, 33, 37, .85); border-color: rgba(255, 255, 255, .12); }
.tile.alarm-1 { outline: 2px solid var(--p1); }
.tile.alarm-2 { outline: 2px solid rgba(217, 161, 58, .8); }
.tile.alarm-3 { outline: 1px solid rgba(205, 191, 76, .6); }

@keyframes tile-flash { 50% { outline-color: transparent; } }
.tile-alarm { position: absolute; left: 8px; top: 34px; display: flex; gap: 8px; align-items: center; padding: 4px 10px 4px 5px; border-radius: 3px; background: rgba(18, 20, 23, .9); font-size: 12.5px; font-weight: 600; max-width: calc(100% - 16px); }
.tile-alarm span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile.selected { outline: 3px solid var(--select); outline-offset: -1px; }

.queue-col { border-left: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; min-width: 0; }
.queue { overflow: auto; flex: 1; }
.alarm {
  display: grid; grid-template-columns: 22px 88px 1fr; gap: 10px; padding: 10px 12px; border-bottom: 1px solid #31363c;
  cursor: pointer; position: relative;
}
.alarm:hover { background: #2c3136; }
.alarm[aria-current="true"] { background: var(--select-bg); }
.alarm img { width: 88px; height: 56px; object-fit: cover; border-radius: 3px; background: #000; }
.alarm .t1 { font-weight: 600; line-height: 1.25; }
.alarm .t2 { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.alarm .t3 { display: flex; align-items: center; gap: 8px; margin-top: 5px; font-size: 12.5px; }
.alarm .age { color: var(--text-3); margin-left: auto; }
.alarm.new .t1 { color: #fff; }

/* ---------------------------------------------------------------- event detail */
.detail { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.detail-body { overflow: auto; padding: 12px; display: grid; gap: 12px; align-content: start; }
.player { position: relative; background: #000; border-radius: 4px; overflow: hidden; }
.player video { width: 100%; display: block; aspect-ratio: 16 / 10; object-fit: contain; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: 13px; margin: 0; }
.facts dt { color: var(--text-3); }
.facts dd { margin: 0; }
.log { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.log li { display: grid; grid-template-columns: 14px 1fr; gap: 10px; padding-bottom: 12px; position: relative; font-size: 13px; }
.log li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); margin-top: 5px; }
.log li:not(:last-child)::after { content: ""; position: absolute; left: 4px; top: 16px; bottom: 0; width: 1px; background: var(--line); }
.log li.closed::before { background: var(--text-2); }
.log li.acknowledged::before { background: var(--select); }
.log li.escalated::before { background: var(--p2); }
.log li.created::before { background: var(--p1); }
.log time { color: var(--text-3); font-size: 12px; }
.action-bar { display: grid; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: #2a2e33; }
.action-bar .row { display: flex; gap: 8px; flex-wrap: wrap; }
.action-bar .row .btn { flex: 1; }

/* ---------------------------------------------------------------- forms & settings */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .wide { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 8px; align-items: center; padding-top: 4px; }
.form-actions .note { color: var(--text-3); font-size: 13px; }
.section { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.section:last-child { border-bottom: 0; }
.section > header p { margin: 4px 0 0; color: var(--text-3); font-size: 13px; }
.notice { display: flex; gap: 10px; padding: 10px 12px; border-radius: 4px; background: rgba(217, 161, 58, .08); border: 1px solid rgba(217, 161, 58, .35); color: #e8cf9c; font-size: 13px; }
.notice.info { background: var(--select-bg); border-color: rgba(93, 143, 214, .4); color: #c7d9f2; }
.notice.ok { background: rgba(143, 185, 154, .1); border-color: rgba(143, 185, 154, .4); color: #c7e0cd; }
.notice.error { background: var(--p1-bg); border-color: rgba(224, 68, 63, .5); color: #f4b3b0; }

.toggle-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.toggle-item { display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; background: var(--panel); }
.toggle-item .cell-sub { margin-top: 1px; }
.toggle-group-title { font-size: 12.5px; color: var(--text-3); margin: 14px 0 6px; }

.zone-editor { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.zone-canvas { position: relative; background: #000; border-radius: 4px; overflow: hidden; user-select: none; }
.zone-canvas img { display: block; width: 100%; }
.zone-canvas svg { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
.zone-canvas polygon { stroke-width: 2; vector-effect: non-scaling-stroke; }
.zone-canvas .vertex { fill: #fff; stroke: #111; stroke-width: 2; vector-effect: non-scaling-stroke; cursor: grab; }
.zone-list { display: grid; gap: 8px; }
.zone-item { border: 1px solid var(--line); border-radius: 4px; padding: 10px; display: grid; gap: 8px; background: var(--panel); }
.zone-item[aria-current="true"] { border-color: var(--select); }
.zone-item header { display: flex; gap: 8px; align-items: center; }
.swatch { width: 12px; height: 12px; border-radius: 2px; flex: none; }

.schedule { display: grid; grid-template-columns: 34px repeat(24, minmax(0, 1fr)); gap: 2px; user-select: none; }
.schedule .h { font-size: 11px; color: var(--text-3); text-align: center; }
.schedule .d { font-size: 12px; color: var(--text-2); display: flex; align-items: center; }
.schedule button { height: 26px; border: 0; border-radius: 2px; background: #33393f; cursor: pointer; padding: 0; }
.schedule button[aria-pressed="true"] { background: var(--select-2); }
.schedule button:hover { outline: 1px solid var(--select); }

/* ---------------------------------------------------------------- dashboard */
.dash { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.span-12 { grid-column: span 12; } .span-8 { grid-column: span 8; } .span-7 { grid-column: span 7; }
.span-6 { grid-column: span 6; } .span-5 { grid-column: span 5; } .span-4 { grid-column: span 4; }
.summary { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.summary > div { padding: 12px 16px; border-right: 1px solid var(--line); display: grid; gap: 3px; }
.summary > div:last-child { border-right: 0; }
.summary dt { font-size: 12.5px; color: var(--text-3); }
.summary dd { margin: 0; display: flex; align-items: baseline; gap: 8px; font-size: 22px; font-weight: 600; }
.summary dd small { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.chart { width: 100%; display: block; }
.chart .grid line { stroke: #353a40; }
.chart .axis text, .chart text.axis { fill: var(--text-3); font: 12px var(--font); }
.chart .lbl { fill: var(--text-2); font: 12.5px var(--font); }
.chart .val { fill: var(--text); font: 600 12.5px var(--font); }
.chart .hit { fill: transparent; cursor: pointer; }
.chart .hit:hover + .hover-mark, .chart .col:hover rect.mark { opacity: .85; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.tooltip { position: fixed; pointer-events: none; background: #111316; border: 1px solid var(--line-2); border-radius: 4px; padding: 8px 10px; font-size: 12.5px; z-index: 60; box-shadow: var(--shadow); min-width: 140px; }
.tooltip b { display: block; margin-bottom: 4px; }
.tooltip .r { display: flex; justify-content: space-between; gap: 16px; }

/* ---------------------------------------------------------------- login */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(380px, .75fr); }
.login-art { position: relative; overflow: hidden; background: #191c20; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; padding: 32px 40px; }
.login-art svg.bg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .6; }
.login-art > * { position: relative; }
.login-art h1 { font-size: 34px; line-height: 1.15; max-width: 16ch; letter-spacing: -.015em; }
.login-art p { color: var(--text-2); max-width: 52ch; font-size: 15px; }
.login-form { display: grid; align-content: center; padding: 40px; gap: 18px; max-width: 460px; width: 100%; justify-self: center; }
.login-form h2 { font-size: 22px; }
.demo-accounts { display: grid; gap: 6px; }
.demo-accounts button { display: grid; grid-template-columns: 1fr auto; text-align: left; gap: 2px 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); cursor: pointer; }
.demo-accounts button:hover { border-color: var(--select); background: var(--panel-2); }
.demo-accounts small { color: var(--text-3); grid-column: 1; }
.demo-accounts code { grid-row: 1 / 3; grid-column: 2; align-self: center; color: var(--text-2); font-family: var(--mono); font-size: 12.5px; }

/* ---------------------------------------------------------------- toast */
.toasts { position: fixed; right: 16px; top: 62px; display: grid; gap: 8px; z-index: 70; }
.toast { display: flex; gap: 10px; align-items: flex-start; min-width: 280px; max-width: 420px; padding: 11px 13px; border-radius: 5px; background: #111316; border: 1px solid var(--line-2); box-shadow: var(--shadow); animation: toast-in .25s var(--ease); }
.toast.error { border-color: rgba(224, 68, 63, .6); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1280px) {
  .console { grid-template-columns: 250px minmax(0, 1fr) 330px; }
  .summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .summary > div:nth-child(3n) { border-right: 0; }
  .summary > div:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 1080px) {
  .console { grid-template-columns: minmax(0, 1fr) 330px; }
  .site-col { display: none; }
  .span-8, .span-7, .span-6, .span-5, .span-4 { grid-column: span 12; }
  .zone-editor { grid-template-columns: 1fr; }
  .section { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 760px) {
  .app, .app.rail-collapsed { grid-template-columns: 1fr; grid-template-rows: 52px 1fr 58px; }
  .rail { grid-row: 3; grid-column: 1; flex-direction: row; border-right: 0; border-top: 1px solid var(--line); }
  .brand, .rail-foot { display: none; }
  .nav { grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; padding: 4px; }
  .nav a { flex-direction: column; height: 48px; gap: 2px; justify-content: center; font-size: 11px; padding: 0 2px; }
  .nav a[aria-current="page"]::after { left: 20%; right: 20%; top: auto; bottom: -4px; width: auto; height: 2px; }
  .nav .count { position: absolute; top: 2px; right: 10%; margin: 0; }
  .topbar { padding: 0 10px; gap: 10px; }
  .shift, .user-btn .who, .topbar .tag.demo { display: none; }
  .alarm-banner button { padding: 0 8px; }
  .console { grid-template-columns: 1fr; height: auto; }
  .queue-col { border-left: 0; border-top: 1px solid var(--line); max-height: none; }
  .wall.l9, .wall.l16, .wall.l4 { grid-template-columns: 1fr; }
  .page { padding: 14px 12px 24px; }
  .form-grid { grid-template-columns: 1fr; }
  .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .login { grid-template-columns: 1fr; }
  .login-art { min-height: 260px; padding: 24px; }
  .login-art h1 { font-size: 26px; }
  .login-form { padding: 24px 16px; }
  .data .hide-sm { display: none; }
}

/* ---------------------------------------------------------------- journal, charts, misc */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.status.ok::before { background: var(--ok); }
.events-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.events-layout.with-detail { grid-template-columns: minmax(0, 1fr) 420px; }
.detail-panel { position: sticky; top: 0; max-height: calc(100vh - 52px - 46px); display: flex; flex-direction: column; overflow: hidden; }
.events-table .table-wrap { max-height: calc(100vh - 52px - 46px - 110px); }
.hbar { display: grid; gap: 5px; color: inherit; text-decoration: none; border-radius: 3px; }
.hbar:hover .hbar-track div { background: var(--select); }
.hbar-track { height: 8px; background: #2c3136; border-radius: 4px; overflow: hidden; }
.hbar-track div { height: 100%; background: #8a929a; border-radius: 0 4px 4px 0; transition: background .15s; }
.chart rect[data-tip]:hover { stroke: #fff; stroke-width: 1; }
.chart .hit:hover { fill: rgba(255, 255, 255, .04); stroke: none; }

.section header h2 { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.page-head h1 { overflow-wrap: anywhere; }
@media (max-width: 1280px) { .events-layout.with-detail { grid-template-columns: minmax(0, 1fr) 360px; } }
@media (max-width: 1080px) {
  .events-layout.with-detail { grid-template-columns: 1fr; }
  .detail-panel { position: fixed; inset: 52px 0 0 0; max-height: none; z-index: 40; border-radius: 0; }
}
@media (max-width: 760px) {
  .hide-sm { display: none !important; }
  .detail-panel { inset: 52px 0 58px 0; }
  .events-table .table-wrap { max-height: none; }
  .filters .input, .filters .select { min-width: 0; flex: 1 1 140px; }
  .page-head .actions { margin-left: 0; }
  .topbar .crumbs { display: flex; }
  .topbar h1 { font-size: 14px; }
}

/* ---------------------------------------------------------------- site editor, modules, help */
.editor-page { display: flex; flex-direction: column; height: calc(100vh - 52px); }
.editor-bar { display: flex; align-items: center; gap: 12px; padding: 8px 16px; border-bottom: 1px solid var(--line); background: var(--panel); flex-wrap: wrap; }
.editor-bar .tools { flex-wrap: wrap; }
.editor-bar .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.editor-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
.se-canvas { min-height: 0; overflow: auto; padding: 16px; background: #181a1d; display: grid; place-items: center; }
.se-canvas .plan { width: 100%; max-height: 100%; touch-action: none; user-select: none; outline: none; background: var(--inset); }
.se-canvas .plan:focus-visible { outline: 2px solid var(--select); }
.se-canvas svg[data-tool="select"] { cursor: default; }
.se-canvas svg:not([data-tool="select"]) { cursor: crosshair; }
.se-canvas svg[data-tool="select"] .sh-building, .se-canvas svg[data-tool="select"] .sh-room, .se-canvas svg[data-tool="select"] .sh-area,
.se-canvas svg[data-tool="select"] .sh-gate, .se-canvas svg[data-tool="select"] .sh-free, .se-canvas svg[data-tool="select"] .cam { cursor: move; }
.se-canvas .sh-building, .se-canvas .sh-room, .se-canvas .sh-area, .se-canvas .sh-gate, .se-canvas .sh-free { pointer-events: all; }
.se-canvas svg:not([data-tool="select"]) [data-shape], .se-canvas svg:not([data-tool="select"]) .cam { pointer-events: none; }
.se-canvas .sh-fence, .se-canvas .sh-road { pointer-events: stroke; }
.se-canvas svg[data-tool="select"] .sh-fence, .se-canvas svg[data-tool="select"] .sh-road { cursor: move; }
.sh-free { fill: #c3c9cf; font: 500 34px var(--font); }
.se-draft { opacity: .7; pointer-events: none; }
.se-outline { fill: none; stroke: var(--select); stroke-width: 2; stroke-dasharray: 8 5; pointer-events: none; }
.se-handle { fill: #fff; stroke: var(--select); stroke-width: 3; }
.se-handle[data-vertex], .se-handle[data-rotate] { cursor: grab; }
.se-side { border-left: 1px solid var(--line); background: var(--panel); padding: 14px; display: grid; gap: 14px; align-content: start; overflow: auto; }
.se-side #se-props:empty, .se-side #se-cams:empty { display: none; }
.se-group { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.se-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.site-card { display: grid; color: inherit; text-decoration: none; overflow: hidden; transition: border-color .15s; }
.site-card:hover { border-color: var(--select); }
.site-card .plan { border: 0; border-radius: 0; border-bottom: 1px solid var(--line); }
.site-card-body { padding: 12px 14px; display: grid; gap: 3px; }
.plan-box { position: relative; }
.plan-edit { position: absolute; top: 16px; right: 16px; z-index: 1; background: rgba(30, 33, 37, .9); }
.zone-canvas polygon { cursor: move; }
.modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.module { display: grid; gap: 8px; align-content: start; padding: 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); }
.module.off { opacity: .6; }
.module header { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
.module h4 { margin: 0; font-size: 14px; font-weight: 600; }
.module p { margin: 0; font-size: 13px; }
.module footer { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); padding-top: 8px; border-top: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.help { display: grid; grid-template-columns: 220px minmax(0, 860px); gap: 32px; }
.help-toc { position: sticky; top: 18px; align-self: start; display: grid; gap: 2px; }
.help-toc a { color: var(--text-2); text-decoration: none; padding: 7px 10px; border-radius: 4px; border-left: 2px solid transparent; }
.help-toc a:hover { color: var(--text); background: var(--panel); }
.help-toc a[aria-current] { color: #fff; border-left-color: var(--select); background: var(--select-bg); }
.help-body { display: grid; gap: 40px; line-height: 1.6; }
.help-body section { display: grid; gap: 14px; }
.help-body h1 { font-size: 22px; } .help-body h2 { font-size: 19px; } .help-body h3 { font-size: 15px; margin-top: 6px; }
.help-body p { margin: 0; max-width: 72ch; }
.help-body .lead { font-size: 15px; color: var(--text-2); }
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; counter-reset: f; }
.flow li { counter-increment: f; position: relative; display: grid; gap: 3px; padding: 12px 14px 12px 44px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; font-size: 13px; line-height: 1.4; }
.flow li::before { content: counter(f); position: absolute; left: 12px; top: 12px; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; font-size: 12px; color: var(--text-2); }
.flow li span { color: var(--text-3); }
.steps { margin: 0; padding-left: 22px; display: grid; gap: 8px; max-width: 76ch; }
.steps li::marker { color: var(--text-3); font-weight: 600; }
.bullets { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 6px; color: var(--text-2); max-width: 80ch; }
.data.access td.num { text-align: center; } .data.access th.num { text-align: center; }
@media (max-width: 1080px) {
  .editor-body { grid-template-columns: 1fr; }
  .editor-page { height: auto; }
  .se-side { border-left: 0; border-top: 1px solid var(--line); }
  .help { grid-template-columns: 1fr; gap: 16px; }
  .help-toc { position: static; display: flex; flex-wrap: wrap; }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) { .flow { grid-template-columns: 1fr; } .modules { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- alarm flow */
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
kbd { font: 600 11px var(--mono); padding: 1px 5px; border-radius: 3px; border: 1px solid rgba(255, 255, 255, .35); margin-left: 8px; opacity: .8; }
.btn.big { height: 42px; font-size: 15px; width: 100%; }
.stepper { list-style: none; margin: 0; padding: 10px 14px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; border-bottom: 1px solid var(--line); }
.stepper li { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-3); }
.stepper li b, .stepper li .icon { width: 20px; height: 20px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; border: 1px solid var(--line-2); }
.stepper li.current { color: #fff; font-weight: 600; }
.stepper li.current b { background: var(--select); border-color: var(--select); color: #fff; }
.stepper li.done { color: var(--text-2); }
.stepper li.done .icon { padding: 3px; color: var(--ok); border-color: rgba(143, 185, 154, .5); }
.player { display: grid; gap: 6px; background: none; overflow: visible; }
.detail-body > * { min-height: min-content; }
.player video { border-radius: 4px; background: #000; }
.player-mode { justify-self: start; }
.log-box summary { cursor: pointer; color: var(--text-2); font-size: 13px; padding: 4px 0; }
.log-box[open] summary { margin-bottom: 8px; }
.choice-title { font-size: 12.5px; color: var(--text-3); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line-2); background: var(--panel); color: var(--text); border-radius: 14px; padding: 4px 10px; font-size: 12.5px; cursor: pointer; text-align: left; }
.chip:hover { border-color: var(--select); }
.chip[aria-pressed="true"] { background: var(--select-bg); border-color: var(--select); }
.false-box { display: grid; gap: 6px; }
.action-bar [aria-pressed="true"].btn { background: var(--select-bg); border-color: var(--select); }
.queue-group { position: sticky; top: 0; z-index: 1; padding: 8px 12px; font-size: 12.5px; color: var(--text-3); background: var(--panel); border-bottom: 1px solid var(--line); }
.queue-group b { color: var(--text); margin-left: 4px; }
.alarm.new { background: rgba(93, 143, 214, .07); }
.alarm.acknowledged, .alarm.escalated { opacity: .82; }
.wait { font-family: var(--mono); font-size: 12.5px; color: var(--text-2); }
.wait.overdue { color: #f2a19e; font-family: var(--font); font-weight: 600; }
.alarm.arrive { animation: arrive 1.1s ease-in-out 3; }
@keyframes arrive { 50% { background: rgba(93, 143, 214, .22); } }
.next-alarm { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 6px 12px; border-bottom: 1px solid var(--line); background: var(--panel-2); font-size: 13.5px; }
.next-alarm .btn { margin-left: auto; flex: none; }
@media (prefers-reduced-motion: reduce) { .alarm.arrive { animation: none; background: rgba(93, 143, 214, .16); } }

/* увеличенная камера поверх видеостены */
.zoom { position: fixed; inset: 52px 0 0 0; background: rgba(12, 14, 16, .82); display: grid; place-items: center; padding: 20px; z-index: 45; }
.zoom-frame { width: min(1400px, 100%); max-height: 100%; background: #000; border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; box-shadow: var(--shadow); display: grid; grid-template-rows: auto minmax(0, 1fr); }
.zoom-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--panel); border-bottom: 1px solid var(--line); }
.zoom-head .actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.zoom-frame video { width: 100%; height: 100%; max-height: calc(100vh - 160px); object-fit: contain; display: block; background: #000; }
.tile-alarm[data-alarm] { cursor: pointer; }
.tile-alarm[data-alarm]:hover { background: rgba(30, 34, 39, .96); outline: 1px solid var(--line-2); }
@media (max-width: 760px) { .zoom { inset: 52px 0 58px 0; padding: 8px; } }

.player-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.player-bar .seg button { padding: 0 9px; }
.player-bar .faint { margin-left: auto; font-size: 12px; }

/* ---------------------------------------------------------------- polish pass */
.dash > .panel { align-self: start; }
.data.events-grid { table-layout: fixed; width: 100%; }
.data.events-grid td { overflow: hidden; }
.data.events-grid td > div { min-width: 0; }
.data.events-grid .cell-main, .data.events-grid .cell-sub { overflow: hidden; text-overflow: ellipsis; }
.data.events-grid th:nth-child(1), .data.events-grid td:nth-child(1) { width: 44px; }
.data.events-grid th:nth-child(2), .data.events-grid td:nth-child(2) { width: 76px; }
.data.events-grid th:nth-child(3), .data.events-grid td:nth-child(3) { width: 112px; }
.data.events-grid th:nth-child(5), .data.events-grid td:nth-child(5) { width: 170px; }
.data.events-grid th:nth-child(6), .data.events-grid td:nth-child(6) { width: 112px; }
.data.events-grid th:nth-child(7), .data.events-grid td:nth-child(7) { width: 150px; }
/* с открытой карточкой места мало: ответственный и решение читаются в самой карточке */
.events-layout.with-detail .events-grid th:nth-child(7), .events-layout.with-detail .events-grid td:nth-child(7),
.events-layout.with-detail .events-grid th:nth-child(8), .events-layout.with-detail .events-grid td:nth-child(8) { display: none; }
.shift-strip { display: flex; gap: 14px; align-items: baseline; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--text-3); }
.shift-strip b { color: var(--text); font-weight: 600; }
@media (max-width: 760px) {
  .nav a span { font-size: 10.5px; }
  .nav a .full { display: none; }
  .alarm-banner button.zero { display: none; }
  .tile-alarm { font-size: 12px; }
}
@media (min-width: 761px) { .nav a .short { display: none; } }
/* плотные раскладки: подпись тревоги важнее времени и имени камеры */
.wall.l9 .tile-head .muted, .wall.l16 .tile-head .muted { display: none; }
.wall.l9 .tile-alarm .faint, .wall.l16 .tile-alarm .faint { display: none; }
.wall.l16 .tile-alarm { padding: 3px 7px 3px 4px; font-size: 11.5px; }
@media (max-width: 760px) {
  /* на телефоне стена не растягивается по высоте: кадры идут лентой с обычной пропорцией */
  .wall, .wall.l4, .wall.l9, .wall.l16 { grid-template-columns: 1fr; grid-template-rows: none; overflow: visible; }
  .wall .tile { aspect-ratio: 16 / 9; }
}

@media (min-width: 1100px) { .panel > .tabs { flex-wrap: wrap; row-gap: 0; } }
