/* ================================================================
   НЕБО РАДАР — тактическое ночное небо: глубокий индиго,
   ледяная лазурь, тлеющий эмбер тревоги, живые HUD-анимации.
   ================================================================ */

:root {
  --bg0: #04060d;
  --bg1: rgba(10, 16, 30, .74);
  --bg1-solid: #0a101e;
  --line: rgba(109, 185, 255, .15);
  --line-hot: rgba(109, 185, 255, .36);
  --ink: #e6ecf7;
  --dim: #6c7c99;
  --accent: #6db9ff;
  --accent-soft: rgba(109, 185, 255, .13);
  --ember: #ff5c38;
  --ember-glow: rgba(255, 92, 56, .48);
  --amber: #ffb454;
  --cyan: #56e0e0;
  --mint: #3ddc97;
  --disp: "Unbounded", sans-serif;
  --mono: "IBM Plex Mono", monospace;
  --body: "Manrope", sans-serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg0);
  color: var(--ink);
  font-family: var(--body);
  overflow: hidden;
}

body { cursor: none; }
@media (hover: none), (max-width: 860px) { body { cursor: auto; } #cursorDot, #cursorRing { display: none; } }

button { font-family: inherit; }

/* ================= custom cursor ================= */
#cursorDot, #cursorRing {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 98;
  border-radius: 50%; transform: translate(-50%, -50%);
}
#cursorDot { width: 5px; height: 5px; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
#cursorRing {
  width: 30px; height: 30px;
  border: 1px solid rgba(109, 185, 255, .52);
  transition: width .18s var(--ease-out), height .18s var(--ease-out), border-color .18s;
}
body.cursor-hot #cursorRing { width: 44px; height: 44px; border-color: var(--ember); box-shadow: 0 0 18px rgba(255, 92, 56, .25); }

/* ================= grain + atmosphere ================= */
.grain {
  position: fixed; inset: -50%; z-index: 60; pointer-events: none; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift 1.1s steps(4) infinite;
}
@keyframes grainShift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 1.5%); }
  50% { transform: translate(1.5%, -2%); }
  75% { transform: translate(-1%, -1%); }
  100% { transform: translate(0, 0); }
}
.atmos {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(60% 45% at 85% -5%, rgba(109, 185, 255, .09), transparent 70%),
    radial-gradient(50% 40% at 0% 105%, rgba(255, 92, 56, .06), transparent 70%);
}

/* ================= BOOT ================= */
#boot {
  position: fixed; inset: 0; z-index: 90;
  background: radial-gradient(circle at center, #0a1428 0%, var(--bg0) 70%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px;
  transition: opacity .75s var(--ease-out), visibility .75s, transform .75s var(--ease-out);
}
#boot.done { opacity: 0; visibility: hidden; pointer-events: none; transform: scale(1.03); }
.boot-stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 12% 22%, #fff9 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 12%, #fff7 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 45% 68%, #fff5 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 55%, #fff8 50%, transparent 51%),
    radial-gradient(1px 1px at 25% 82%, #fff6 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 62% 33%, #fff7 50%, transparent 51%);
  animation: starTwinkle 2.2s ease-in-out infinite alternate;
}
@keyframes starTwinkle { from { opacity: .45; } to { opacity: 1; } }

.boot-radar {
  position: relative;
  opacity: 0; transform: scale(.8);
  animation: letterIn .65s var(--ease-out) forwards;
}
.br-ring { fill: none; stroke: rgba(109, 185, 255, .28); stroke-width: 1; }
.br-axis { stroke: rgba(109, 185, 255, .14); stroke-width: 1; }
.br-sweep {
  fill: rgba(109, 185, 255, .26);
  transform-origin: 60px 60px;
  animation: radarSpin 2.2s linear infinite;
}
.br-core { fill: var(--ember); filter: drop-shadow(0 0 8px var(--ember)); }
@keyframes radarSpin { to { transform: rotate(360deg); } }

.boot-word {
  display: flex; gap: .04em;
  font-family: var(--disp); font-weight: 900;
  font-size: clamp(50px, 11vw, 116px);
  color: var(--ink); letter-spacing: .02em; line-height: 1;
}
.boot-word span {
  opacity: 0; filter: blur(14px); transform: translateY(28px) scale(1.1);
  animation: letterIn .65s var(--ease-out) forwards;
}
.boot-word span:nth-child(1) { animation-delay: .05s; }
.boot-word span:nth-child(2) { animation-delay: .15s; }
.boot-word span:nth-child(3) { animation-delay: .25s; }
.boot-word span:nth-child(4) { animation-delay: .35s; color: var(--accent); text-shadow: 0 0 42px rgba(109,185,255,.55); }
@keyframes letterIn {
  to { opacity: 1; filter: blur(0); transform: none; }
}
.boot-tag {
  font-family: var(--mono); font-size: 11px; letter-spacing: .4em;
  color: var(--dim); text-transform: uppercase;
  opacity: 0; animation: letterIn .55s ease .55s forwards;
}
.boot-line {
  width: min(300px, 60vw); height: 2px; border-radius: 2px;
  background: rgba(109, 185, 255, .15);
  overflow: hidden;
  opacity: 0; animation: letterIn .45s ease .45s forwards;
}
.boot-line-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  box-shadow: 0 0 14px var(--accent);
  transition: width .28s var(--ease-out);
}

/* ================= карта ================= */
#mapWrap { position: fixed; inset: 0; }
#map { position: absolute; inset: 0; background: var(--bg0); }
#radarSweep {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 3; opacity: .75;
  transition: opacity .4s var(--ease-out);
}
#radarSweep.sweep-off { opacity: 0; }
.maplibregl-ctrl-attrib {
  font-size: 9px !important; background: transparent !important;
  color: #33415c !important;
}
.maplibregl-ctrl-attrib a { color: #41537a !important; }
.map-vignette {
  position: absolute; inset: 0; pointer-events: none; z-index: 4;
  background: radial-gradient(ellipse at center, transparent 58%, rgba(2, 4, 8, .55) 100%);
}

/* шоквейв-слой и прицел */
#shockLayer { position: absolute; inset: 0; pointer-events: none; z-index: 8; overflow: hidden; }
.shock {
  position: absolute; border-radius: 50%;
  border: 2px solid var(--ember);
  transform: translate(-50%, -50%);
  animation: shockwave 2.4s var(--ease-out) forwards;
}
.shock.shock-2 {
  border-width: 1px; border-color: var(--cyan);
  animation-delay: .18s; animation-duration: 2.1s;
}
@keyframes shockwave {
  0% { width: 8px; height: 8px; opacity: .92; box-shadow: 0 0 32px var(--ember-glow); }
  100% { width: 460px; height: 460px; opacity: 0; box-shadow: none; }
}

#lockReticle {
  position: absolute; width: 64px; height: 64px; pointer-events: none; z-index: 9;
  transform: translate(-50%, -50%);
  border: 1.5px solid var(--cyan); border-radius: 50%;
  box-shadow: 0 0 24px rgba(86, 224, 224, .45), inset 0 0 12px rgba(86, 224, 224, .2);
  animation: lockPulse 1.4s var(--ease-out) forwards;
}
#lockReticle::before, #lockReticle::after {
  content: ""; position: absolute; background: var(--cyan);
}
#lockReticle::before { left: 50%; top: -8px; bottom: -8px; width: 1px; transform: translateX(-50%); }
#lockReticle::after { top: 50%; left: -8px; right: -8px; height: 1px; transform: translateY(-50%); }
#lockReticle.hidden { display: none; }
@keyframes lockPulse {
  0% { transform: translate(-50%, -50%) scale(2.1) rotate(45deg); opacity: 0; }
  25% { opacity: 1; }
  75% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: .95; }
  100% { transform: translate(-50%, -50%) scale(.82); opacity: 0; }
}

/* ================= бренд ================= */
#brandBlock {
  position: absolute; top: 20px; left: 24px; z-index: 20;
  user-select: none;
}
.brand-word {
  font-family: var(--disp); font-weight: 900; font-size: 32px;
  letter-spacing: .03em; line-height: .95;
  color: var(--ink);
  text-shadow: 0 2px 30px rgba(4, 6, 13, .85);
}
.brand-row { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.brand-sub {
  font-family: var(--disp); font-weight: 400; font-size: 13px;
  letter-spacing: .58em; color: var(--accent);
}
.live-pill {
  display: flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 9px; letter-spacing: .18em;
  color: var(--ember);
  border: 1px solid rgba(255, 92, 56, .35); border-radius: 20px;
  padding: 2px 9px;
  background: rgba(4, 6, 13, .6);
}
.live-pill i {
  width: 5px; height: 5px; border-radius: 50%; background: var(--ember);
  box-shadow: 0 0 8px var(--ember);
  animation: livePulse 1.3s ease infinite;
}
@keyframes livePulse { 50% { opacity: .25; } }
.live-pill.off { color: var(--dim); border-color: rgba(93, 107, 133, .3); }
.live-pill.off i { background: var(--dim); box-shadow: none; animation: none; }
.brand-clock {
  margin-top: 6px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

/* ================= верхняя навигация ================= */
#topNav {
  position: absolute; top: 20px; left: 50%; transform: translateX(-50%); z-index: 20;
  display: flex; align-items: center; gap: 4px;
  background: var(--bg1); backdrop-filter: blur(16px);
  border: 1px solid var(--line); border-radius: 99px;
  padding: 5px 8px;
  box-shadow: 0 8px 32px rgba(2, 4, 8, .45);
}
.tn-link {
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; text-decoration: none;
  color: var(--dim); padding: 6px 12px; border-radius: 99px;
  display: inline-flex; align-items: center; gap: 5px;
  transition: all .2s var(--ease-out);
}
.tn-link:hover { color: var(--ink); background: rgba(109, 185, 255, .1); }
.tn-link b {
  font-size: 9px; color: var(--accent);
  background: rgba(109, 185, 255, .14);
  padding: 1px 6px; border-radius: 99px;
  display: none;
}
.tn-link b.has { display: inline-block; }
.tn-tg {
  color: #04060d; background: linear-gradient(135deg, var(--accent), var(--cyan));
  font-weight: 600;
}
.tn-tg:hover { filter: brightness(1.12); color: #04060d; }
.tn-tg.hidden { display: none; }

/* ================= счётчики ================= */
#counters {
  position: absolute; top: 20px; right: 24px; z-index: 20;
  display: flex; align-items: center; gap: 15px;
  background: var(--bg1); backdrop-filter: blur(16px);
  border: 1px solid var(--line); border-radius: 16px;
  padding: 11px 18px;
  box-shadow: 0 8px 32px rgba(2, 4, 8, .42);
}
.cnt { display: flex; align-items: center; gap: 9px; }
.cnt b {
  font-family: var(--disp); font-weight: 800; font-size: 24px;
  font-variant-numeric: tabular-nums; line-height: 1;
  display: inline-block; min-width: 1.2em; text-align: right;
}
.cnt span {
  font-family: var(--mono); font-size: 8px; letter-spacing: .14em;
  color: var(--dim); text-transform: uppercase; line-height: 1.45;
}
.cnt-danger b { color: var(--ember); text-shadow: 0 0 18px var(--ember-glow); }
.cnt-att b { color: var(--amber); }
.cnt-day b { color: var(--accent); }
.cnt-sep { width: 1px; height: 24px; background: var(--line); }
.cnt b.tick { animation: digitTick .5s var(--spring); }
@keyframes digitTick {
  0% { transform: translateY(-40%) scale(1.15); opacity: .4; filter: blur(2px); }
  100% { transform: none; opacity: 1; filter: none; }
}

/* ================= лента / табы ================= */
#feedPanel {
  position: absolute; left: 24px; top: 140px; bottom: 108px; z-index: 20;
  width: 332px;
  display: flex; flex-direction: column;
  background: var(--bg1); backdrop-filter: blur(18px);
  border: 1px solid var(--line); border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 14px 44px rgba(2, 4, 8, .5);
}
.feed-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.feed-tabs { display: flex; gap: 4px; }
.ftab {
  font-family: var(--mono); font-size: 9.5px; font-weight: 600; letter-spacing: .12em;
  color: var(--dim); background: none; border: 1px solid transparent;
  border-radius: 8px; padding: 5px 8px; cursor: pointer;
  transition: all .2s var(--ease-out);
}
.ftab:hover { color: var(--ink); }
.ftab.on {
  color: var(--accent); border-color: rgba(109, 185, 255, .3);
  background: var(--accent-soft);
}
.feed-hint { font-family: var(--mono); font-size: 9px; letter-spacing: .1em; color: var(--dim); margin-left: auto; }
.feed-hint.replay { color: var(--amber); }
.feed-close {
  display: none; background: none; border: none; color: var(--dim);
  font-size: 20px; line-height: 1; padding: 2px 6px; cursor: pointer;
}
.feed-close:hover { color: var(--ink); }

.tab-pane {
  display: none; flex: 1; overflow-y: auto; padding: 10px 12px 20px;
  scrollbar-width: thin; scrollbar-color: rgba(109, 185, 255, .25) transparent;
  mask-image: linear-gradient(to bottom, #000 93%, transparent);
}
.tab-pane.on { display: block; }
.tab-pane::-webkit-scrollbar { width: 3px; }
.tab-pane::-webkit-scrollbar-thumb { background: rgba(109, 185, 255, .25); border-radius: 2px; }

.ev {
  position: relative; cursor: pointer;
  padding: 10px 12px 10px 14px; margin-bottom: 7px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .026);
  border: 1px solid transparent;
  transition: transform .2s var(--ease-out), background .2s, border-color .2s;
  animation: evIn .45s var(--ease-out);
}
.ev:hover { background: rgba(109, 185, 255, .07); border-color: rgba(109, 185, 255, .18); transform: translateX(3px); }
@keyframes evIn {
  from { opacity: 0; transform: translateX(-16px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.ev::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2.5px;
  border-radius: 2px; background: var(--dim); opacity: .5;
}
.ev-danger::before { background: var(--ember); opacity: 1; box-shadow: 0 0 10px var(--ember-glow); }
.ev-danger { background: rgba(255, 92, 56, .07); }
.ev-attention::before { background: var(--amber); opacity: 1; }
.ev-attention { background: rgba(255, 180, 84, .055); }
.ev-sighting::before, .ev-movement::before { background: var(--cyan); opacity: .9; }
.ev-clear::before { background: var(--mint); opacity: .85; }
.ev-intercept::before { background: var(--accent); opacity: 1; }

.ev-top { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.ev-kind {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--dim);
}
.ev-danger .ev-kind { color: var(--ember); }
.ev-attention .ev-kind { color: var(--amber); }
.ev-clear .ev-kind { color: var(--mint); }
.ev-time {
  margin-left: auto; font-family: var(--mono); font-size: 10px;
  color: var(--dim); font-variant-numeric: tabular-nums;
}
.ev-title { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.38; }
.ev-sub { font-size: 11px; color: var(--dim); margin-top: 3px; line-height: 1.48; }
.ev-fresh { animation: evIn .45s var(--ease-out), freshFlash 1.8s ease .1s; }
@keyframes freshFlash {
  0%, 100% { box-shadow: none; }
  25% { box-shadow: 0 0 0 1px var(--ember-glow), 0 0 24px rgba(255, 92, 56, .22); }
}

/* новости и регионы в сайдбаре */
.np-card {
  display: block; text-decoration: none; color: inherit;
  padding: 10px 12px; margin-bottom: 8px; border-radius: 10px;
  background: rgba(255, 255, 255, .028); border: 1px solid rgba(109, 185, 255, .1);
  transition: transform .2s var(--ease-out), border-color .2s, background .2s;
}
.np-card:hover { transform: translateX(3px); border-color: var(--line-hot); background: rgba(109, 185, 255, .07); }
.np-meta { display: flex; gap: 6px; align-items: center; font-family: var(--mono); font-size: 9px; color: var(--dim); margin-bottom: 4px; }
.np-brk { color: var(--ember); font-weight: 600; }
.np-title { font-size: 12.5px; font-weight: 600; color: var(--ink); line-height: 1.38; }
.np-all {
  display: block; text-align: center; margin-top: 8px; padding: 8px;
  border-radius: 10px; border: 1px solid var(--line);
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em;
  color: var(--accent); text-decoration: none;
}
.np-all:hover { background: var(--accent-soft); }

.rg-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 10px; margin-bottom: 6px; border-radius: 10px; cursor: pointer;
  background: rgba(255, 255, 255, .025); border: 1px solid transparent;
  transition: all .2s var(--ease-out);
}
.rg-row:hover { background: rgba(109, 185, 255, .08); border-color: var(--line); transform: translateX(2px); }
.rg-name { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.rg-badge {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .12em;
  padding: 2px 7px; border-radius: 99px; text-transform: uppercase;
}
.rg-l3 { color: var(--ember); background: rgba(255, 92, 56, .14); border: 1px solid rgba(255, 92, 56, .35); }
.rg-l2 { color: var(--amber); background: rgba(255, 180, 84, .14); border: 1px solid rgba(255, 180, 84, .35); }
.rg-l1 { color: var(--cyan); background: rgba(86, 224, 224, .12); border: 1px solid rgba(86, 224, 224, .3); }
.rg-star { color: var(--amber); margin-right: 4px; font-size: 11px; }

/* ================= док ================= */
#dock {
  position: absolute; bottom: 42px; left: 50%; transform: translateX(-50%);
  z-index: 20;
  display: flex; align-items: center; gap: 10px;
  background: var(--bg1); backdrop-filter: blur(18px);
  border: 1px solid var(--line); border-radius: 40px;
  padding: 7px 12px;
  box-shadow: 0 12px 44px rgba(2, 4, 8, .55);
}
.dock-group { display: flex; gap: 4px; align-items: center; }
.dock-sep { width: 1px; height: 20px; background: var(--line); }
.chip {
  font-family: var(--mono); font-size: 10px; letter-spacing: .07em;
  background: none; border: 1px solid transparent; border-radius: 20px;
  color: var(--dim); padding: 6px 10px; cursor: pointer;
  transition: all .2s var(--ease-out);
  text-transform: uppercase; white-space: nowrap;
}
.chip:hover { color: var(--ink); transform: translateY(-1px); }
.chip.on {
  color: var(--accent); border-color: rgba(109, 185, 255, .34);
  background: var(--accent-soft);
}
.dock-btn {
  width: 32px; height: 32px; border-radius: 50%;
  background: none; border: 1px solid transparent; color: var(--dim);
  font-size: 14px; cursor: pointer; transition: all .2s var(--spring);
  display: flex; align-items: center; justify-content: center;
}
.dock-btn:hover { color: var(--ink); background: rgba(255, 255, 255, .07); transform: scale(1.1); }
.dock-btn.on {
  color: var(--accent); background: var(--accent-soft);
  border-color: rgba(109, 185, 255, .32);
  box-shadow: 0 0 16px rgba(109, 185, 255, .2);
}

/* ================= тикер ================= */
#ticker {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 18;
  height: 30px; overflow: hidden;
  background: rgba(4, 6, 13, .85); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  display: flex; align-items: center;
}
.ticker-inner {
  display: flex; gap: 48px; white-space: nowrap;
  font-family: var(--mono); font-size: 10px; letter-spacing: .06em;
  color: var(--dim);
  animation: tickerScroll 60s linear infinite;
  padding-left: 20px;
  will-change: transform;
}
#ticker:hover .ticker-inner { animation-play-state: paused; }
@keyframes tickerScroll { to { transform: translateX(-50%); } }
.ticker-inner .tk-danger { color: var(--ember); }
.ticker-inner .tk-attention { color: var(--amber); }
.ticker-inner .tk-clear { color: var(--mint); }
.ticker-inner b { color: var(--ink); font-weight: 500; margin-right: 6px; }

/* ================= таймлайн ================= */
#timeline {
  position: absolute; bottom: 100px; left: 50%; transform: translateX(-50%);
  z-index: 22; width: min(720px, 92vw);
  background: var(--bg1); backdrop-filter: blur(16px);
  border: 1px solid var(--line); border-radius: 16px;
  padding: 10px 14px 12px;
  transition: opacity .35s var(--ease-out), transform .35s var(--ease-out);
}
#timeline.hidden { opacity: 0; transform: translateX(-50%) translateY(20px); pointer-events: none; }
.tl-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.tl-play {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent-soft); border: 1px solid rgba(109, 185, 255, .3);
  color: var(--accent); font-size: 10px; cursor: pointer;
}
.tl-label { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; color: var(--dim); font-variant-numeric: tabular-nums; }
.tl-close {
  margin-left: auto; background: none; border: none;
  color: var(--dim); font-family: var(--mono); font-size: 10px; letter-spacing: .1em;
  cursor: pointer;
}
.tl-close:hover { color: var(--ember); }
.tl-track { position: relative; height: 44px; cursor: pointer; }
#tlCanvas { width: 100%; height: 100%; display: block; }
.tl-playhead {
  position: absolute; top: -4px; bottom: -4px; width: 2px;
  background: var(--accent); box-shadow: 0 0 10px var(--accent);
  pointer-events: none; left: 100%;
}

/* попапы */
.maplibregl-popup-content {
  background: var(--bg1-solid) !important; color: var(--ink) !important;
  font-family: var(--body) !important; font-size: 12px !important;
  border: 1px solid var(--line); border-radius: 12px !important;
  box-shadow: 0 14px 44px rgba(2, 4, 8, .7) !important;
}
.maplibregl-popup-tip { border-top-color: var(--bg1-solid) !important; }
.maplibregl-popup-close-button { color: var(--accent) !important; }
.pp-title { font-family: var(--mono); color: var(--accent); font-size: 9px; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 5px; }
.pp-raw { color: var(--dim); line-height: 1.55; white-space: pre-wrap; font-size: 11px; }
.pp-time { color: var(--cyan); margin-top: 6px; font-family: var(--mono); font-size: 10px; }

/* ================= панель региона ================= */
#regionPanel {
  position: absolute; top: 140px; right: 24px; z-index: 24;
  width: 310px; max-height: calc(100% - 250px);
  display: flex; flex-direction: column;
  background: var(--bg1); backdrop-filter: blur(18px);
  border: 1px solid var(--line); border-radius: 18px;
  padding: 16px;
  box-shadow: 0 14px 44px rgba(2, 4, 8, .55);
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
  animation: rpIn .35s var(--ease-out);
}
@keyframes rpIn {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: none; }
}
#regionPanel.hidden { opacity: 0; transform: translateX(24px); pointer-events: none; animation: none; }
.rp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.rp-head-btns { display: flex; align-items: center; gap: 2px; }
.rp-name { font-family: var(--disp); font-weight: 800; font-size: 15px; line-height: 1.25; }
.rp-status { margin-top: 6px; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; }
.rpst-danger { color: var(--ember); }
.rpst-att { color: var(--amber); }
.rpst-calm { color: var(--mint); }
.rp-star {
  background: none; border: none; color: var(--dim); font-size: 18px;
  cursor: pointer; line-height: 1; padding: 2px 6px; transition: transform .2s var(--spring), color .2s;
}
.rp-star:hover { color: var(--amber); transform: scale(1.15); }
.rp-star.on { color: var(--amber); text-shadow: 0 0 12px rgba(255, 180, 84, .55); }
.rp-close {
  background: none; border: none; color: var(--dim); font-size: 20px;
  cursor: pointer; line-height: 1; padding: 2px 6px;
}
.rp-close:hover { color: var(--ink); }
.rp-threats { margin: 12px 0; display: flex; flex-direction: column; gap: 6px; }
.rp-threat {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12px; color: var(--ink);
  background: rgba(255, 92, 56, .08); border-radius: 8px; padding: 7px 10px;
}
.rp-threat b { font-family: var(--mono); font-size: 10px; color: var(--ember); font-weight: 500; }
.rp-threat.att { background: rgba(255, 180, 84, .08); }
.rp-sub {
  font-family: var(--mono); font-size: 9px; letter-spacing: .2em; color: var(--dim);
  text-transform: uppercase; margin: 6px 0 8px;
}
.rp-events { overflow-y: auto; flex: 1; min-height: 60px; scrollbar-width: thin; }
.rp-ev {
  display: flex; gap: 8px; padding: 6px 2px;
  border-bottom: 1px solid rgba(109, 185, 255, .07);
  font-size: 11px; color: var(--dim); line-height: 1.45;
}
.rp-ev time { font-family: var(--mono); font-size: 10px; color: var(--accent); flex: none; }
.rp-ev.k-danger span { color: #ffb9ad; }
.rp-actions { display: flex; gap: 8px; margin-top: 12px; }
.rp-link {
  flex: 1; display: block; text-align: center;
  font-family: var(--mono); font-size: 10px; letter-spacing: .09em;
  color: var(--accent); text-decoration: none;
  border: 1px solid rgba(109, 185, 255, .28); border-radius: 10px;
  padding: 9px 10px; transition: background .2s;
}
.rp-link:hover { background: var(--accent-soft); }
.rp-share {
  width: 38px; border-radius: 10px; border: 1px solid rgba(109, 185, 255, .28);
  background: none; color: var(--accent); cursor: pointer; font-size: 15px;
  transition: background .2s;
}
.rp-share:hover { background: var(--accent-soft); }

/* ================= модалки (поиск и аналитика) ================= */
.modal {
  position: fixed; inset: 0; z-index: 45;
  background: rgba(2, 4, 10, .65); backdrop-filter: blur(8px);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 12vh;
  transition: opacity .25s var(--ease-out);
}
.modal.hidden { opacity: 0; pointer-events: none; }
.modal-card {
  width: min(560px, 92vw);
  background: rgba(10, 16, 30, .94);
  border: 1px solid var(--line-hot); border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .7);
  overflow: hidden;
  animation: modalIn .28s var(--ease-out);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(-16px) scale(.97); }
  to { opacity: 1; transform: none; }
}
.search-top {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.search-ico { color: var(--accent); font-size: 18px; }
#searchInput {
  flex: 1; background: none; border: none; outline: none;
  color: var(--ink); font-family: var(--body); font-size: 14px;
}
.search-top kbd {
  font-family: var(--mono); font-size: 9px; color: var(--dim);
  border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px;
}
.search-results { max-height: 54vh; overflow-y: auto; padding: 8px; }
.sr-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border-radius: 10px; cursor: pointer;
  transition: background .15s;
}
.sr-item:hover, .sr-item.act { background: rgba(109, 185, 255, .12); }
.sr-title { font-size: 13px; font-weight: 600; color: var(--ink); }
.sr-sub { font-family: var(--mono); font-size: 10px; color: var(--dim); }

.stats-card { padding: 16px 18px; }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--disp); font-size: 12px; letter-spacing: .16em;
  padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.sm-sub {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--dim); margin: 14px 0 8px;
}
.sm-spark {
  display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px;
  align-items: end; height: 64px; padding: 6px; border-radius: 10px;
  background: rgba(255, 255, 255, .025); border: 1px solid var(--line);
}
.sm-bar {
  background: linear-gradient(to top, var(--accent), var(--ember));
  border-radius: 3px 3px 0 0; min-height: 2px;
  transition: height .4s var(--ease-out);
}
.sm-bars { display: flex; flex-direction: column; gap: 7px; }
.sm-row { display: grid; grid-template-columns: 160px 1fr 34px; gap: 8px; align-items: center; font-size: 12px; }
.sm-track { height: 6px; border-radius: 99px; background: rgba(109, 185, 255, .1); overflow: hidden; }
.sm-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--ember)); border-radius: 99px; }
.sm-foot { display: flex; gap: 8px; margin-top: 16px; }

/* ================= тосты ================= */
#toastStack {
  position: absolute; top: 86px; left: 50%; transform: translateX(-50%);
  z-index: 50; display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  background: rgba(10, 16, 30, .92); backdrop-filter: blur(14px);
  border: 1px solid var(--line-hot); border-radius: 12px;
  padding: 9px 16px; font-family: var(--mono); font-size: 11px; color: var(--ink);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .55);
  animation: toastIn .3s var(--spring);
}
.toast-danger { border-color: rgba(255, 92, 56, .6); color: #ffd4cb; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-12px) scale(.95); }
  to { opacity: 1; transform: none; }
}

/* ================= embed mode ================= */
#embedBadge { display: none; }
body.embed-mode #boot,
body.embed-mode #topNav,
body.embed-mode #feedPanel,
body.embed-mode #feedToggle,
body.embed-mode #dock,
body.embed-mode #ticker { display: none !important; }
body.embed-mode #embedBadge {
  display: inline-flex; align-items: center;
  position: absolute; bottom: 12px; left: 12px; z-index: 30;
  padding: 6px 12px; border-radius: 99px;
  background: rgba(10, 16, 30, .88); border: 1px solid var(--line-hot);
  color: var(--accent); text-decoration: none;
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em;
}

/* ================= мобила ================= */
#feedToggle {
  display: none;
  position: absolute; bottom: 76px; left: 50%; transform: translateX(-50%);
  z-index: 26;
  font-family: var(--mono); font-size: 10px; letter-spacing: .24em;
  background: var(--bg1); color: var(--accent);
  border: 1px solid var(--line); border-radius: 30px;
  padding: 10px 22px; cursor: pointer; backdrop-filter: blur(14px);
}

@media (max-width: 1080px) {
  #topNav { display: none; }
}

@media (max-width: 860px) {
  #brandBlock { top: 12px; left: 14px; }
  .brand-word { font-size: 22px; }
  .brand-sub { font-size: 10px; letter-spacing: .42em; }
  .brand-clock { font-size: 10px; margin-top: 4px; }

  #counters {
    top: 84px; right: auto; left: 14px;
    padding: 7px 12px; gap: 10px; border-radius: 12px;
  }
  .cnt { gap: 6px; }
  .cnt b { font-size: 16px; min-width: auto; }
  .cnt span { font-size: 7px; }
  .cnt span br { display: none; }
  .cnt-sep { height: 16px; }

  #feedPanel {
    left: 0; right: 0; bottom: 0; top: auto; width: auto;
    height: 54vh; border-radius: 18px 18px 0 0;
    transform: translateY(calc(100% + 10px));
    transition: transform .35s var(--ease-out);
    z-index: 28;
  }
  #feedPanel.open { transform: none; }
  .feed-close { display: inline-flex; align-items: center; justify-content: center; }
  #feedToggle {
    display: block; top: 14px; right: 14px; bottom: auto; left: auto;
    transform: none; padding: 8px 14px;
  }

  #regionPanel {
    top: auto; bottom: 118px; right: 12px; left: 12px; width: auto;
    max-height: 46vh; z-index: 27;
  }

  #dock {
    bottom: 34px; max-width: 96vw; overflow-x: auto; padding: 5px 8px;
    scrollbar-width: none;
  }
  #dock::-webkit-scrollbar { display: none; }
  .chip { padding: 5px 8px; font-size: 9px; white-space: nowrap; }
  .dock-btn { width: 28px; height: 28px; font-size: 13px; }

  #timeline { bottom: 92px; width: 94vw; }
  #ticker { height: 26px; }
  .ticker-inner { font-size: 9px; gap: 30px; }
}

@media (max-width: 380px) {
  .cnt-day span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .grain, .boot-stars, .br-sweep, .live-pill i { animation: none !important; }
  .ticker-inner { animation-duration: 200s; }
}

#seoBlock { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
