:root {
  color-scheme: dark;
  --bg: #0b0d0b;
  --panel: #111611;
  --ink: #eaffdc;
  --muted: #91a08d;
  --line: rgba(234, 255, 220, 0.18);
  --green: #79ff5a;
  --red: #ff304f;
  --amber: #ffbf2e;
  --blue: #43c7ff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at 18% 14%, rgba(121, 255, 90, 0.14), transparent 24rem),
    radial-gradient(circle at 88% 0%, rgba(255, 48, 79, 0.11), transparent 22rem),
    #050705;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.watch {
  width: min(1220px, calc(100% - 28px));
  margin: 0 auto;
  padding: 14px 0 38px;
}

.ticker {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  padding: 0 16px;
  background: rgba(17, 22, 17, 0.9);
}

.ticker div {
  display: flex;
  gap: 14px;
  align-items: baseline;
}

.ticker strong {
  color: var(--green);
  letter-spacing: 0;
}

.ticker span {
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 0.82rem;
}

.ticker button {
  min-height: 36px;
  border: 1px solid rgba(234, 255, 220, 0.28);
  color: var(--ink);
  cursor: pointer;
  background: rgba(234, 255, 220, 0.04);
  padding: 0 12px;
}

.ops-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1.15fr) minmax(320px, 0.85fr);
  gap: 14px;
  margin-top: 14px;
}

.map-panel,
.briefing,
.feed article,
.report-card,
.camera-wall {
  border: 1px solid var(--line);
  background: rgba(17, 22, 17, 0.9);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

.map-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  font-family: "Courier New", monospace;
  color: var(--muted);
}

.map-head strong {
  color: var(--red);
}

.city-map {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(121, 255, 90, 0.1) 1px, transparent 1px),
    linear-gradient(rgba(121, 255, 90, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 50% 50%, rgba(121, 255, 90, 0.1), transparent 32rem),
    #071007;
  background-size: 46px 46px, 46px 46px, auto, auto;
}

.street {
  position: absolute;
  display: block;
  background: rgba(234, 255, 220, 0.11);
}

.h1 { left: 4%; right: 4%; top: 24%; height: 22px; transform: rotate(-7deg); }
.h2 { left: -8%; right: -8%; top: 55%; height: 28px; transform: rotate(8deg); }
.h3 { left: 8%; right: 8%; top: 79%; height: 18px; transform: rotate(-2deg); }
.v1 { top: 0; bottom: 0; left: 18%; width: 24px; transform: rotate(12deg); }
.v2 { top: -8%; bottom: -8%; left: 49%; width: 30px; transform: rotate(-5deg); }
.v3 { top: 0; bottom: 0; right: 17%; width: 22px; transform: rotate(7deg); }

.pin {
  position: absolute;
  display: grid;
  min-width: 44px;
  height: 44px;
  place-items: center;
  border: 2px solid var(--green);
  border-radius: 50%;
  color: var(--bg);
  cursor: default;
  font-weight: 900;
  background: var(--green);
  box-shadow: 0 0 0 12px rgba(121, 255, 90, 0.13), 0 0 34px rgba(121, 255, 90, 0.32);
}

.pin.hot {
  border-color: var(--red);
  background: var(--red);
  box-shadow: 0 0 0 14px rgba(255, 48, 79, 0.14), 0 0 38px rgba(255, 48, 79, 0.42);
}

.p1 { left: 22%; top: 21%; }
.p2 { right: 20%; top: 35%; }
.p3 { left: 45%; bottom: 22%; }
.p4 { right: 26%; bottom: 34%; border-radius: 999px; padding: 0 12px; }

.sweep {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(121, 255, 90, 0.24);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.sweep::after {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 50%;
  height: 2px;
  content: "";
  transform-origin: left center;
  background: var(--green);
  animation: sweep 5s linear infinite;
}

@keyframes sweep {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: "Courier New", monospace;
}

.legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  background: var(--green);
}

.legend i.hot {
  background: var(--red);
}

.briefing {
  display: flex;
  min-height: 720px;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 4vw, 46px);
  background:
    linear-gradient(135deg, rgba(255, 48, 79, 0.12), transparent 35%),
    rgba(17, 22, 17, 0.92);
}

.stamp {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 18px;
  padding: 7px 9px;
  color: #050705;
  font-family: "Courier New", monospace;
  font-weight: 900;
  background: var(--amber);
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(3rem, 6vw, 6.6rem);
  line-height: 0.88;
  letter-spacing: 0;
}

.briefing p:not(.stamp) {
  color: #cdddc9;
  font-size: 1.12rem;
  line-height: 1.54;
}

.briefing a {
  display: inline-flex;
  width: fit-content;
  min-height: 44px;
  align-items: center;
  margin-top: 22px;
  border: 1px solid var(--green);
  color: #050705;
  font-weight: 900;
  background: var(--green);
  padding: 0 16px;
}

.feed {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.feed article {
  min-height: 180px;
  padding: 18px;
}

.feed span {
  color: var(--red);
  font-family: "Courier New", monospace;
  font-weight: 900;
}

.feed h2 {
  margin: 26px 0 8px;
  font-size: 1.5rem;
}

.feed p {
  margin: 0;
  color: var(--muted);
  line-height: 1.46;
}

.report {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(360px, 1.05fr);
  gap: 14px;
  margin-top: 14px;
}

.camera-wall {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-height: 390px;
  padding: 8px;
}

.camera-wall div {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(67, 199, 255, 0.15), transparent 45%),
    #080d08;
}

.camera-wall span {
  position: absolute;
  left: 16%;
  top: 22%;
  width: 68%;
  height: 42%;
  border: 8px solid rgba(234, 255, 220, 0.75);
  border-radius: 22px;
}

.camera-wall b {
  position: absolute;
  right: 18%;
  top: 21%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--red);
}

.report-card {
  padding: clamp(20px, 3vw, 34px);
}

.report-card h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 0.96;
}

form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-weight: 900;
}

input:not([type]) {
  min-height: 46px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(234, 255, 220, 0.04);
  padding: 0 12px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--red);
}

form button {
  min-height: 46px;
  border: 0;
  color: #050705;
  cursor: pointer;
  font-weight: 900;
  background: var(--green);
}

.output {
  min-height: 120px;
  margin-top: 18px;
  border: 1px solid var(--line);
  padding: 16px;
  background: rgba(234, 255, 220, 0.04);
}

.output p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.admin-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.admin-shell {
  width: min(680px, calc(100% - 32px));
}

.admin-panel {
  border: 1px solid var(--line);
  padding: 30px;
  background: rgba(17, 22, 17, 0.92);
}

.admin-form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

#admin-ca {
  min-height: 46px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(234, 255, 220, 0.04);
  padding: 0 12px;
}

.button {
  min-height: 46px;
  border: 0;
  color: #050705;
  cursor: pointer;
  font-weight: 900;
  background: var(--green);
}

.button.full {
  width: 100%;
}

.admin-status {
  min-height: 24px;
  margin: 18px 0 0;
  color: var(--green);
  font-family: "Courier New", monospace;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .ops-grid,
  .feed,
  .report {
    grid-template-columns: 1fr;
  }

  .briefing {
    min-height: auto;
  }
}

@media (max-width: 520px) {
  .watch {
    width: min(100% - 16px, 480px);
    padding-top: 8px;
  }

  .ticker,
  .ticker div {
    align-items: flex-start;
    flex-direction: column;
  }

  .ticker button {
    width: 100%;
  }

  .city-map {
    min-height: 420px;
  }

  .camera-wall {
    grid-template-columns: 1fr;
  }
}
