/* СПЕКТР — оформление в духе iOS 26 (Liquid Glass):
   полупрозрачные стеклянные поверхности с блюром и насыщением, крупные
   скругления, системная типографика SF, светлая и тёмная темы,
   плавающий капсульный таб-бар. Спектральный градиент — только у бренда. */

:root {
  color-scheme: light dark;
  --tint: #0a84ff;
  --red: #ff453a;
  --green: #30d158;
  --orange: #ff9f0a;
  --r-lg: 26px;
  --r-md: 16px;
  --r-sm: 12px;
  --spectrum: linear-gradient(90deg,#ff453a,#ff9f0a,#30d158,#0a84ff,#bf5af2);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --bg: #f2f2f7;
  --bg-grad: radial-gradient(1200px 600px at 80% -10%, rgba(10,132,255,.10), transparent 60%),
             radial-gradient(900px 500px at -10% 110%, rgba(191,90,242,.08), transparent 60%);
  --text: #000;
  --text2: rgba(60,60,67,.6);
  --sep: rgba(60,60,67,.14);
  --glass: rgba(255,255,255,.62);
  --glass-strong: rgba(255,255,255,.78);
  --fill: rgba(120,120,128,.12);
  --fill2: rgba(120,120,128,.2);
  --shadow: 0 8px 32px rgba(0,0,0,.10);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000;
    --bg-grad: radial-gradient(1200px 600px at 80% -10%, rgba(10,132,255,.14), transparent 60%),
               radial-gradient(900px 500px at -10% 110%, rgba(191,90,242,.10), transparent 60%);
    --text: #fff;
    --text2: rgba(235,235,245,.6);
    --sep: rgba(84,84,88,.5);
    --glass: rgba(28,28,30,.58);
    --glass-strong: rgba(28,28,30,.8);
    --fill: rgba(120,120,128,.24);
    --fill2: rgba(120,120,128,.36);
    --shadow: 0 8px 32px rgba(0,0,0,.5);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg-grad), var(--bg);
  color: var(--text);
  font: 16px/1.45 var(--font);
  overscroll-behavior: none;
  touch-action: pan-x pan-y;              /* без pinch-zoom */
  -webkit-user-select: none; user-select: none;
  -webkit-text-size-adjust: 100%;
}
input, textarea { -webkit-user-select: text; user-select: text; }
a { color: var(--tint); text-decoration: none; }
h1 { font-size: 30px; font-weight: 800; letter-spacing: .2px; margin: 0; }
h3 { font-size: 17px; font-weight: 650; margin: 0 0 12px; }
.mono { font-family: var(--mono); font-size: 13px; }
.muted { color: var(--text2); }
.small { font-size: 13px; }
.bad { color: var(--red); }
.ta-r { text-align: right; }

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(28px) saturate(1.8);
  backdrop-filter: blur(28px) saturate(1.8);
  border: 0.5px solid var(--sep);
}

/* ---------- шапка и таб-бар ---------- */
.topbar {
  --top-h: 58px;
  display: none; position: sticky; top: 0; z-index: 30;
  align-items: center; gap: 26px;
  padding: calc(10px + env(safe-area-inset-top)) 22px 10px;
  border-width: 0 0 .5px;
}
body.auth .topbar { display: flex; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 19px; letter-spacing: 2px; }
.brand-logo { width: 26px; height: 26px; color: var(--text); }
.topbar .nav { display: flex; gap: 4px; margin-left: auto; }
.topbar .nav a { color: var(--text2); padding: 7px 14px; border-radius: 20px; font-weight: 550; font-size: 15px; }
.topbar .nav a.active { color: var(--text); background: var(--fill); }

.tabbar {
  display: none; position: fixed; z-index: 30;
  left: 50%; transform: translateX(-50%);
  bottom: calc(10px + env(safe-area-inset-bottom));
  border-radius: 32px; padding: 6px 10px;
  box-shadow: var(--shadow);
  gap: 4px;
}

.tabbar a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--text2); padding: 6px 14px; border-radius: 22px;
  font-size: 10.5px; font-weight: 600; min-width: 62px;
}
.tabbar a svg { width: 24px; height: 24px; fill: currentColor; }
.tabbar a.active { color: var(--tint); background: var(--fill); }

main { max-width: 1420px; margin: 0 auto; padding: 18px 20px calc(96px + env(safe-area-inset-bottom)); }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.bar-right { display: flex; gap: 8px; }

/* ---------- контролы ---------- */
input, select, textarea {
  width: 100%; background: var(--fill); color: var(--text);
  border: none; border-radius: var(--r-sm); padding: 11px 13px;
  font: inherit; font-size: 16px; appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--text2) 50%), linear-gradient(135deg, var(--text2) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%;
  background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--tint); outline-offset: 0; }
label { display: block; margin-bottom: 12px; font-size: 13px; color: var(--text2); font-weight: 550; }
label input, label select, label textarea { margin-top: 6px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--fill); color: var(--tint);
  border: none; border-radius: 20px; padding: 9px 16px;
  cursor: pointer; font: inherit; font-size: 15px; font-weight: 600;
  transition: transform .12s ease, opacity .12s;
}
.btn:active { transform: scale(.96); opacity: .8; }
.btn.primary { background: var(--tint); color: #fff; }
.btn.danger { color: var(--red); }
.btn.ghost { background: none; }
.btn.small { padding: 5px 12px; font-size: 13.5px; }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn:focus-visible, .seg button:focus-visible, a:focus-visible { outline: 2px solid var(--tint); outline-offset: 2px; }

/* переключатель как в iOS */
.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch i {
  position: absolute; inset: 0; border-radius: 20px; background: var(--fill2);
  transition: background .2s; pointer-events: none;
}
.switch i::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px;
  border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25);
  transition: transform .2s;
}
.switch input:checked + i { background: var(--green); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: .5px solid var(--sep); }
.switch-row:last-child { border-bottom: none; }
.switch-row .lbl { font-size: 16px; color: var(--text); font-weight: 450; }
.switch-row .sub { font-size: 13px; color: var(--text2); }

/* сегментированный контрол */
.seg { display: inline-flex; background: var(--fill); border-radius: 12px; padding: 2px; gap: 2px; }
.seg button {
  border: none; background: none; color: var(--text2); font: inherit; font-size: 13.5px;
  font-weight: 600; padding: 6px 14px; border-radius: 10px; cursor: pointer;
}
.seg button.on { background: var(--glass-strong); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.12); }

.check { display: flex; gap: 10px; align-items: center; color: var(--text); font-weight: 450; cursor: pointer; }
.check input { -webkit-appearance: none; appearance: none; flex: none; margin: 0;
  width: 24px; height: 24px; border-radius: 7px; background: var(--fill);
  border: 1.5px solid var(--fill2); position: relative; cursor: pointer;
  transition: background .15s, border-color .15s; }
.check input:checked { background: var(--tint); border-color: var(--tint); }
.check input:checked::after { content: ""; position: absolute; left: 8px; top: 4px;
  width: 5px; height: 10px; border: solid #fff; border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg); }
.check input:focus-visible { outline: 2px solid var(--tint); outline-offset: 2px; }
.form .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.row-between { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 10px; }
.row-gap { display: flex; gap: 10px; align-items: center; margin: 12px 0; flex-wrap: wrap; }

/* ---------- карточки, таблицы ---------- */
.card {
  background: var(--glass);
  -webkit-backdrop-filter: blur(28px) saturate(1.8);
  backdrop-filter: blur(28px) saturate(1.8);
  border: .5px solid var(--sep);
  border-radius: var(--r-lg); padding: 18px; margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.tbl-wrap { overflow-x: auto; margin: 0 -4px; }
.tbl { width: 100%; border-collapse: collapse; min-width: 480px; }
.tbl th { text-align: left; color: var(--text2); font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: .5px; padding: 6px 10px; }
.tbl td { padding: 11px 10px; border-top: .5px solid var(--sep); vertical-align: middle; font-size: 15px; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 20px; background: var(--fill); font-size: 12.5px; font-weight: 600; }
.chip-red { color: var(--red); background: color-mix(in srgb, var(--red) 15%, transparent); }
.chip-green { color: var(--green); background: color-mix(in srgb, var(--green) 15%, transparent); }
.chip-blue { color: var(--tint); background: color-mix(in srgb, var(--tint) 14%, transparent); }
.empty { color: var(--text2); text-align: center; padding: 52px 12px; }
#toasts { position: fixed; top: calc(14px + env(safe-area-inset-top)); left: 50%;
  transform: translateX(-50%); z-index: 100; width: min(400px, 92vw); }
.toast {
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  border: .5px solid var(--sep); border-radius: 18px; padding: 12px 18px;
  margin-bottom: 8px; box-shadow: var(--shadow); font-weight: 550; font-size: 14.5px;
  animation: drop .3s cubic-bezier(.2,.9,.3,1.2);
}
.toast.bad { color: var(--red); }
@keyframes drop { from { opacity: 0; transform: translateY(-14px) scale(.96); } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } .btn:active { transform: none; } }
.pro-hint { color: var(--orange); font-size: 13.5px; font-weight: 550; }

/* ---------- вход ---------- */
.login-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.login-card { width: 360px; border-radius: 30px; padding: 32px 28px; text-align: center; }
.login-card .brand { justify-content: center; font-size: 26px; margin-bottom: 4px; }
.login-card .brand-logo { width: 44px; height: 44px; }
.login-card .spectrum-line { height: 3px; border-radius: 2px; background: var(--spectrum); margin: 14px 0 20px; }
.login-card label { text-align: left; }
.login-card .btn { width: 100%; margin-top: 6px; padding: 13px; border-radius: 14px; font-size: 16px; }

/* ---------- сетка камер ---------- */
.group-title { color: var(--text2); font-weight: 700; font-size: 13px;
  text-transform: uppercase; letter-spacing: 1px; margin: 22px 4px 10px; }
.cam-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.cam-tile { cursor: pointer; border-radius: var(--r-lg); overflow: hidden;
  border: .5px solid var(--sep); background: #000; box-shadow: var(--shadow);
  transition: transform .15s ease; position: relative; aspect-ratio: 16/9; }
.cam-tile:active { transform: scale(.98); }
.cam-tile video, .cam-tile img.cam-snap { position: absolute; inset: 0; width: 100%;
  height: 100%; object-fit: contain; background: #000; display: block; }
.cam-tile video.v-hidden { visibility: hidden; }
.cam-overlay {
  position: absolute; inset: auto 0 0 0; display: flex; justify-content: space-between; align-items: center;
  padding: 8px 14px; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.65));
}
.cam-name { font-weight: 650; font-size: 14.5px; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.cam-badges { display: flex; gap: 6px; align-items: center; }
.rec-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red);
  box-shadow: 0 0 6px var(--red); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .4; } }
.node-chip { font-size: 10px; background: rgba(255,255,255,.2); border-radius: 8px; padding: 1px 7px; font-weight: 700; }
.cam-hint { position: absolute; top: 10px; left: 14px; font-size: 11px; font-family: var(--mono); color: rgba(255,255,255,.85); }

/* ---------- единый плеер (live + архив): одно окно без прокруток ---------- */
body.player-open { overflow: hidden; }
body.player-open main { padding-bottom: 0; max-width: none; }
body.player-open .tabbar { display: none !important; }
.player-page {
  display: flex; flex-direction: column; gap: 10px;
  height: calc(100dvh - var(--top-h, 58px) - 28px);
}
@media (max-width: 760px) { .player-page { height: calc(100dvh - 24px); } }
.player-head { display: flex; align-items: center; gap: 12px; flex: none; }
.player-head .back { font-size: 17px; font-weight: 650; }
.player-stage { position: relative; flex: 1; min-height: 0; border-radius: var(--r-lg);
  overflow: hidden; background: #000; box-shadow: var(--shadow); }
.player-stage video { position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; display: block; background: #000; }
.player-stage video.v-hidden { visibility: hidden; }
.stage-hint { position: absolute; top: 12px; left: 16px; font-family: var(--mono);
  font-size: 11px; color: rgba(255,255,255,.85); pointer-events: none; }
.stage-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.stage-flash.on { animation: flash .25s; }
@keyframes flash { 0% { opacity: .7; } 100% { opacity: 0; } }

/* панель управления */
.player-ctl { flex: none; display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 8px 12px; border-radius: var(--r-md); }
.cbtn { border: none; background: none; color: var(--text); cursor: pointer;
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  transition: background .12s; flex: none; }
.cbtn:hover { background: var(--fill); }
.cbtn.on { background: var(--fill); color: var(--tint); }
.cbtn svg { width: 22px; height: 22px; fill: currentColor; }
.cbtn:disabled { opacity: .35; pointer-events: none; }
.live-pill { display: inline-flex; align-items: center; gap: 7px; border: none;
  border-radius: 20px; padding: 8px 16px; font: inherit; font-size: 13px;
  font-weight: 800; letter-spacing: .5px; cursor: pointer;
  background: var(--fill); color: var(--text2); flex: none; }
.live-pill.on { background: color-mix(in srgb, var(--red) 16%, transparent); color: var(--red); }
.live-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.player-time { font-family: var(--mono); font-size: 14px; font-weight: 650; margin: 0 6px; }
.speed-seg { display: none; }
.speed-seg.show { display: inline-flex; }
.ctl-spacer { flex: 1; }

/* шкала */
.timeline-wrap { flex: none; border-radius: var(--r-md); padding: 8px 14px 6px; }
.tl-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; font-size: 13px; }
.tl-head b { font-size: 13.5px; text-transform: capitalize; }
.tl-head .mono { margin-left: auto; font-size: 12.5px; }
.timeline-canvas { width: 100%; height: 64px; display: block; touch-action: none;
  cursor: crosshair; border-radius: 8px; }
.tl-legend { display: flex; gap: 14px; margin-top: 6px; font-size: 12px; color: var(--text2); align-items: center; }
.tl-zoom { margin-left: auto; display: flex; gap: 2px; align-items: center; }
.tl-zoom .cbtn { width: 30px; height: 26px; font-size: 16px; font-weight: 700; }
.tl-zoom .btn.small { padding: 3px 10px; }
.tl-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px;
  margin-right: 5px; vertical-align: -1px; }

/* всплывающие панели над контролами */
.pop { position: absolute; bottom: calc(100% + 10px); left: 0; z-index: 40;
  border-radius: var(--r-md); padding: 14px; box-shadow: var(--shadow);
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(40px) saturate(1.8); backdrop-filter: blur(40px) saturate(1.8);
  border: .5px solid var(--sep); }
.ctl-anchor { position: relative; }

/* календарь */
.cal { width: 292px; -webkit-user-select: none; user-select: none; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head b { font-size: 15px; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-grid .dow { text-align: center; font-size: 11px; color: var(--text2); padding: 4px 0; font-weight: 700; }
.cal-day { position: relative; border: none; background: none; color: var(--text);
  font: inherit; font-size: 14px; height: 36px; border-radius: 10px; cursor: pointer; }
.cal-day:hover { background: var(--fill); }
.cal-day.other { color: var(--text2); opacity: .4; }
.cal-day:disabled { opacity: .28; cursor: default; }
.cal-day:disabled:hover { background: none; }
.cal-day.sel { background: var(--tint); color: #fff; font-weight: 700; }
.cal-day.today { font-weight: 800; color: var(--tint); }
.cal-day.sel.today { color: #fff; }
.cal-day .rec { position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: var(--tint); }
.cal-day.sel .rec { background: #fff; }

/* ИИ-поиск */
.search-pop { width: min(560px, calc(100vw - 40px)); }
.search-row { display: flex; gap: 8px; }
.search-row input { flex: 1; }
.search-meta { display: flex; align-items: center; gap: 14px; margin: 10px 0 4px;
  font-size: 13px; color: var(--text2); flex-wrap: wrap; }
.search-res { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px; max-height: 42dvh; overflow: auto; margin-top: 8px; }
.sr-item { border: none; background: var(--fill); border-radius: 12px; overflow: hidden;
  cursor: pointer; text-align: left; padding: 0; color: var(--text); font: inherit; }
.sr-item img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.sr-item .sr-cap { padding: 6px 9px; font-size: 11.5px; }
.sr-item .sr-cap b { display: block; font-size: 12px; }

/* выбор интервала экспорта */
.export-bar { display: none; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; border-radius: var(--r-md); flex: none;
  background: color-mix(in srgb, var(--tint) 12%, transparent);
  border: .5px solid color-mix(in srgb, var(--tint) 35%, transparent); }
.export-bar.show { display: flex; }
.export-bar .mono { font-weight: 700; }

/* ---------- события / аналитика ---------- */
.ev-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  padding: 12px 14px; border-radius: var(--r-md); margin-bottom: 8px;
  background: var(--glass); border: .5px solid var(--sep); }
.hbar { display: grid; grid-template-columns: 150px 1fr 44px; gap: 10px; align-items: center; margin-bottom: 10px; }
.hbar-track { height: 10px; background: var(--fill); border-radius: 6px; overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 6px; background: var(--tint); }
.hbar-fill.warn { background: var(--orange); }

/* ---------- настройки ---------- */
.tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.tab { background: var(--fill); border: none; color: var(--text2); border-radius: 20px;
  padding: 8px 15px; cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 600; }
.tab.active { background: var(--tint); color: #fff; }
.cam-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.logbox { max-height: 420px; overflow: auto; background: var(--fill);
  border-radius: var(--r-sm); padding: 12px; font-size: 12px;
  white-space: pre-wrap; word-break: break-word; -webkit-user-select: text; user-select: text; }
.inline-in { width: auto; flex: 1; }
.inline-in.num { width: 86px; flex: none; }

/* ---------- модальные ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: end center;
  background: rgba(0,0,0,.4); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); padding: 0; }
.modal-box {
  width: min(600px, 100%); max-height: 92dvh; overflow: auto;
  border-radius: 26px 26px 0 0; padding: 18px 20px calc(20px + env(safe-area-inset-bottom));
  animation: sheet .3s cubic-bezier(.2,.9,.3,1);
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(40px) saturate(1.8); backdrop-filter: blur(40px) saturate(1.8);
  border: .5px solid var(--sep);
}
@keyframes sheet { from { transform: translateY(40px); opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .modal-box { animation: none; } }
.modal-box.wide { width: min(1020px, 100%); }
.modal-box video { width: 100%; border-radius: var(--r-md); background: #000; }
.modal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.modal-head b { font-size: 17px; }
.modal-head .btn { margin-left: auto; }
.grabber { width: 38px; height: 5px; border-radius: 3px; background: var(--fill2); margin: 0 auto 12px; }

/* ---------- desktop / mobile ---------- */
@media (min-width: 761px) {
  .modal { place-items: center; }
  .modal-box { border-radius: 26px; }
  .grabber { display: none; }
}
@media (max-width: 760px) {
  body.auth .tabbar { display: flex; }
  body.auth .topbar .nav { display: none; }
  h1 { font-size: 26px; }
  main { padding: 14px 14px calc(104px + env(safe-area-inset-bottom)); }
  .cam-grid { grid-template-columns: 1fr; }
  .form .grid2, .cam-checks { grid-template-columns: 1fr; }
  .hbar { grid-template-columns: 96px 1fr 38px; }
  .player-page video { border-radius: var(--r-md); }
}

/* миниатюра события с рамками объектов */
.ev-thumb { width: 128px; height: 72px; object-fit: cover; border-radius: 8px;
  cursor: zoom-in; flex: none; background: var(--fill); }
.ev-thumb:hover { outline: 2px solid var(--tint); }

/* лайтбокс просмотра кадра события */
.lightbox { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px; padding: 24px;
  background: rgba(0,0,0,.85); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  cursor: zoom-out; animation: lbin .15s ease; }
@keyframes lbin { from { opacity: 0; } to { opacity: 1; } }
.lightbox img { max-width: 94vw; max-height: 82vh; border-radius: 12px; box-shadow: var(--shadow); }
.lightbox .lb-cap { color: #fff; font-size: 14px; font-family: var(--mono); text-align: center; }

/* подсветка только что появившегося события */
.ev-new { animation: evnew 2s ease; }
@keyframes evnew { 0% { background: color-mix(in srgb, var(--tint) 22%, transparent); }
  100% { background: transparent; } }
