:root {
  color-scheme: dark;
  --bg: #0b1218;
  --panel: #121b24;
  --panel-2: #182430;
  --line: rgba(232, 240, 247, 0.08);
  --text: #e8f0f7;
  --muted: #93a4b8;
  --cyan: #5ee7ff;
  --amber: #ffb020;
  --red: #ff5d6c;
  --green: #3ddc97;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
body { min-height: 100%; display: flex; flex-direction: column; }
button, input, select { font: inherit; color: inherit; }
h1, h2, p { margin: 0; }

.top, .status, .filters { display: flex; gap: 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.top { background: #0e1720; }
.brand { display: flex; gap: 10px; align-items: center; }
.brand strong { display: block; letter-spacing: 0.08em; font-size: 15px; }
.brand span, .clock, .muted { color: var(--muted); font-size: 12px; }
.mark {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--cyan); position: relative;
  box-shadow: inset 0 0 0 6px rgba(94, 231, 255, 0.15);
}
.mark::after {
  content: ""; position: absolute; inset: 11px; border-radius: 50%; background: var(--cyan);
}
.session-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.session-tools span, .clock { color: var(--muted); font-size: 12px; }
.session-tools button, .admin-head button, .admin-toggles button, .user-form button {
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
  cursor: pointer; font-size: 14px; color: var(--muted);
}
.session-tools button { padding: 6px 10px; }
.clock { font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
#gate {
  position: fixed; inset: 0; z-index: 4000; display: grid; place-items: center;
  background: rgba(11, 18, 24, 0.96);
}
body.ready #gate { display: none; }
.gate-card {
  width: min(380px, calc(100% - 32px)); display: grid; gap: 12px; justify-items: start;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px;
  box-shadow: var(--shadow);
}
.gate-card h1 { font-size: 22px; letter-spacing: 0.06em; }
.gate-card p { color: var(--muted); font-size: 14px; }
.gate-card label { display: grid; gap: 4px; width: 100%; color: var(--muted); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
.gate-card input, .user-form input:not([type="checkbox"]), .user-form select {
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
  text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--text);
}
.gate-card button { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; cursor: pointer; }
.login-error { color: var(--red); font-size: 13px; }
#admin {
  position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center;
  background: rgba(0, 0, 0, 0.45); padding: 16px;
}
#admin[hidden] { display: none; }
.admin-card {
  width: min(860px, 100%); max-height: calc(100% - 8px); overflow: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px;
  display: grid; gap: 18px; box-shadow: var(--shadow);
}
.admin-head, .admin-toggles, .user-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.admin-head { justify-content: space-between; }
.admin-card h2, .admin-card h3 { font-size: 16px; font-weight: 650; }
.admin-card section { display: grid; gap: 8px; }
.admin-toggles button[aria-pressed="true"], .session-tools button.active {
  background: var(--panel-2); border-color: rgba(232, 240, 247, 0.28); color: var(--text);
}
.admin-status { display: flex; flex-wrap: wrap; gap: 8px; }
.user-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.user-row button[data-user]:not([data-flag]) { background: transparent; border: 0; color: var(--red); cursor: pointer; font-size: 13px; }
.user-flags { display: flex; gap: 6px; flex-wrap: wrap; }
.user-flags button, .grant {
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px;
  color: var(--muted); font-size: 13px;
}
.grant { display: inline-flex; align-items: center; gap: 6px; text-transform: none; letter-spacing: 0; cursor: pointer; }
.user-flags button[aria-pressed="true"] { background: var(--panel-2); border-color: rgba(232, 240, 247, 0.28); color: var(--text); }

.status { flex-wrap: wrap; background: #101820; min-height: 42px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 999px; background: var(--panel-2); color: var(--muted); font-size: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot.ok { background: var(--green); }
.dot.warn { background: var(--amber); }
.dot.bad { background: var(--red); }

.filters { flex-wrap: wrap; align-items: flex-end; background: var(--panel); }
.filters label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
.filters label.grow { flex: 1 1 220px; }
.filters select, .filters input {
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-width: 120px;
}
.filters label.period select { min-width: 0; width: 8rem; }
.filters label.mode select { min-width: 0; width: 8.6rem; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--text); }
.filters label.mode[hidden] { display: none; }
.filters input { width: 100%; }
.filters .multi { position: relative; display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
.multi-button, .prio1 {
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
  min-width: 140px; text-align: left; cursor: pointer; text-transform: none; letter-spacing: 0; font-size: 14px;
}
.prio1 { width: 100%; min-width: 0; margin-bottom: 6px; color: var(--text); }
.prio1.active { background: var(--panel-2); border-color: rgba(232, 240, 247, 0.28); color: var(--text); }
.ships, .heli, .roads, .layer {
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
  min-width: 0; text-align: left; cursor: pointer; font-size: 14px; color: var(--muted);
}
.ships[hidden], .heli[hidden], .roads[hidden], .layer[hidden] { display: none; }
.ships.active, .heli.active, .roads.active, .layer.active {
  background: var(--panel-2); border-color: rgba(232, 240, 247, 0.28); color: var(--text);
}
.multi-panel {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 700; width: max(220px, 100%);
  max-height: 320px; display: flex; flex-direction: column; overflow: hidden;
  background: #182430; border: 1px solid var(--line);
  border-radius: 12px; padding: 8px; box-shadow: var(--shadow);
}
.multi-panel[hidden] { display: none; }
.multi-search {
  width: 100%; min-width: 0; margin-bottom: 6px; text-transform: none; letter-spacing: 0;
  font-size: 14px; color: var(--text);
}
.multi-list { overflow: auto; min-height: 0; }
.filters .multi-panel label.check {
  display: flex; flex-direction: row; align-items: center; gap: 8px;
  text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--text); padding: 6px 4px; cursor: pointer;
}
.filters .multi-panel label.check input { width: auto; min-width: 0; }
.filters .multi-panel label.check[hidden] { display: none; }

main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(340px, 460px) 1fr; }
.feed { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: #0d151d; }
#grip { flex: 0 0 auto; max-height: 46vh; overflow: auto; background: #4a1018; border-bottom: 3px solid #ff5d6c; }
.grip-label { margin: 0; padding: 8px 14px 0; color: #fff; font-size: 12px; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; }
.item.grip-item { background: #5c1722; border-color: transparent; border-left-color: #fff; }
.item.grip-item .lead, .grip-kicker { color: #fff; }
.grip-kicker { font-size: 20px; font-weight: 800; letter-spacing: 0.04em; }
.grip-banner { background: #5c1722; border-radius: 14px; padding: 14px; display: grid; gap: 6px; }
.grip-banner strong { font-size: 28px; letter-spacing: 0.03em; }
.grip-banner p { margin: 0; font-size: 15px; line-height: 1.45; }
.feed-head, .detail-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 8px; gap: 12px; }
.feed-head h1, .detail-head h2 { font-size: 16px; font-weight: 650; }
.feed-head p { margin: 2px 0 0; }
#list { overflow: auto; padding: 0 10px 16px; }
.item {
  width: 100%; text-align: left; border: 1px solid transparent; background: transparent; border-radius: 12px;
  padding: 10px 10px 10px 12px; margin-bottom: 6px; cursor: pointer; display: grid; gap: 4px;
  border-left: 3px solid transparent;
}
.item.hoog { border-left-color: var(--red); }
.item.spoed { border-left-color: var(--amber); }
.item.laag { border-left-color: var(--green); }
.item.test, .item.onbekend { border-left-color: var(--muted); }
.item.fresh { animation: flash 1.4s ease; }
@keyframes flash { from { background: rgba(94, 231, 255, 0.18); } to { background: transparent; } }
.item:hover, .item.active { background: var(--panel); border-color: var(--line); }
.item .row, .chips, .meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; margin-left: auto; }
.summary { font-size: 14px; line-height: 1.35; }
.place { color: var(--cyan); font-size: 12px; }
.badge { border-radius: 6px; padding: 2px 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; background: #243140; }
.badge.ambulance { background: rgba(240, 193, 74, 0.18); color: #ffd48a; }
.badge.brandweer { background: rgba(255, 107, 90, 0.18); color: #ffb3bb; }
.badge.politie { background: rgba(106, 167, 255, 0.18); color: #c5d9ff; }
.badge.knrm { background: rgba(61, 220, 151, 0.16); color: #b6f3d8; }
.badge.helikopter { background: rgba(94, 231, 255, 0.16); color: #b8f6ff; }
.badge.count { background: #fff; color: #121b24; letter-spacing: 0; }
.badge.overig { color: var(--muted); }
.item.multi { background: rgba(255, 255, 255, 0.03); }
.crew { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.badge.p1, .badge.a1 { background: rgba(255, 93, 108, 0.18); color: #ffb3bb; }
.badge.p2, .badge.a2 { background: rgba(255, 176, 32, 0.16); color: #ffd48a; }
.badge.b1, .badge.b2, .badge.b3, .badge.p3 { background: rgba(230, 195, 92, 0.14); color: #f3e2a8; }
.empty { color: var(--muted); padding: 24px 12px; }

.stage { position: relative; min-height: 320px; }
#map { position: absolute; inset: 0; background: #0b1218; }
.ship-legend {
  position: absolute; left: 12px; bottom: 12px; z-index: 450;
  display: flex; gap: 6px 10px; flex-wrap: wrap; max-width: 340px;
  background: rgba(18, 27, 36, 0.94); border: 1px solid var(--line); border-radius: 14px;
  padding: 8px 10px; font-size: 12px;
}
.ship-legend span { display: inline-flex; align-items: center; gap: 4px; }
.ship-legend b {
  font-weight: 400; font-size: 14px; line-height: 1;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}
.ship-legend b svg, .emoji-pin.heli svg { width: 16px; height: 16px; display: block; }
.emoji-pin.heli svg { width: 22px; height: 22px; }
.ship-legend b.swatch {
  width: 12px; height: 12px; border-radius: 2px; background: #111;
  box-shadow: inset 0 0 0 1px #f4f4f4;
}
.ship-legend .credit { flex-basis: 100%; color: var(--muted); font-size: 10px; }
.ship-legend a.credit { color: var(--muted); text-decoration: none; }
.ship-legend [hidden] { display: none; }
.ship-legend[hidden] { display: none; }
.incident-pin, .road-pin, .heli-pin, .ship-pin, .craft-pin { background: transparent; border: 0; }
.emoji-pin.ground, .emoji-pin.still { opacity: 0.7; }
.emoji-pin {
  position: relative; display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 8px;
  background: rgba(18, 27, 36, 0.94);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
.emoji-pin.course {
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.75));
}
.emoji-pin.course.linked {
  background: rgba(18, 27, 36, 0.94);
  filter: none;
}
.emoji-pin.course .face {
  display: grid; place-items: center;
  width: 100%; height: 100%;
  transform-origin: center center;
  will-change: transform;
}
.emoji-pin.course .face svg {
  width: 22px; height: 22px; display: block;
}
.emoji-pin.course.mini .face svg { width: 18px; height: 18px; }
.emoji-pin b {
  font-weight: 400; font-size: 15px; line-height: 1;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}
.emoji-pin.incident.on { width: 32px; height: 32px; border-radius: 10px; }
.emoji-pin.incident.on b { font-size: 19px; }
.bridge-pin {
  display: grid; place-items: center; width: 26px; height: 26px;
  color: #ffb020; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.7));
}
.bridge-pin.open { width: 30px; height: 30px; color: #ff5d6c; }
.bridge-pin.dicht { color: #3ddc97; }
.bridge-pin.wait { color: #ffb020; }
.bridge-pin svg { width: 100%; height: 100%; display: block; }
.ship-legend .bridge-pin { width: 18px; height: 18px; filter: none; }
.swatch.quake { width: 12px; height: 12px; border-radius: 50%; background: #ffb020; box-shadow: 0 0 0 2px rgba(255, 176, 32, 0.35); }
.swatch.slow { width: 12px; height: 12px; border-radius: 50%; background: #ff5d6c; box-shadow: inset 0 0 0 1px #ffb020; }
.leaflet-rain-pane,
.leaflet-rain-pane .leaflet-tile { filter: none !important; }
.emoji-pin.webcam {
  width: 26px; height: 26px; border-radius: 8px;
  background: #f4f7fb;
  box-shadow: 0 0 0 2px #5ee7ff, 0 2px 6px rgba(0, 0, 0, 0.45);
}
.emoji-pin.webcam b { font-size: 14px; }
.emoji-pin.airport {
  width: 28px; height: 28px; border-radius: 10px;
  background: #1b2a3a;
  box-shadow: 0 0 0 2px #9ecbff, 0 2px 6px rgba(0, 0, 0, 0.45);
}
.emoji-pin.station { opacity: 0.85; }
.water-pin, .weather-pin {
  display: grid; place-items: center; min-width: 40px; height: 28px; padding: 0 6px;
  border-radius: 999px; background: #083344; color: #e8fbff;
  box-shadow: 0 0 0 2px #2de2ff, 0 2px 8px rgba(0, 0, 0, 0.55);
  font-size: 12px; font-weight: 700; line-height: 1; letter-spacing: 0.01em;
}
.water-pin i, .weather-pin .wind { font-style: normal; opacity: 0.85; font-size: 10px; font-weight: 600; }
.water-marker { z-index: 450 !important; }
.water-chart { margin-top: 8px; min-height: 118px; }
.water-legend { margin: 4px 0 0; font-size: 11px; }
.water-svg { display: block; width: 280px; max-width: 72vw; height: auto; }
.water-plot { fill: #f3f7fa; }
.water-grid { stroke: #d5dee6; stroke-width: 1; }
.water-now { stroke: #8aa0b2; stroke-width: 1; stroke-dasharray: 3 3; }
.water-measured { fill: none; stroke: #0aa2c2; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.water-forecast { fill: none; stroke: #6ec8db; stroke-width: 2; stroke-dasharray: 5 4; stroke-linejoin: round; stroke-linecap: round; }
.water-dot { fill: #0aa2c2; }
.water-dot.forecast { fill: #6ec8db; }
.water-axis { fill: #5a6a7a; font-size: 9px; font-family: ui-sans-serif, system-ui, sans-serif; }
.weather-pin { grid-template-columns: auto auto; gap: 3px; }
.weather-pin .wind {
  width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-bottom: 8px solid #f4f7fb; transform-origin: 4px 6px;
}
.pop-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.leaflet-popup-content .muted { color: #5a6a7a; font-size: 12px; }
.leaflet-popup.craft-popup .leaflet-popup-content,
.leaflet-popup.webcam-popup .leaflet-popup-content { margin: 10px 12px 8px; }
.craft-pop { margin: 6px 0 0; display: grid; gap: 4px; }
.craft-pop div { display: grid; grid-template-columns: 78px 1fr; gap: 6px; align-items: baseline; }
.craft-pop dt { margin: 0; font-size: 11px; color: #5a6a7a; }
.craft-pop dd { margin: 0; font-size: 13px; color: #12202c; }
.pop-text { margin: 8px 0 0; font-size: 13px; line-height: 1.35; color: #12202c; }
.pop-link {
  display: inline-block; margin-top: 8px; padding: 0; border: 0; background: none;
  color: #2a6f97; font: inherit; font-size: 12px; cursor: pointer; text-decoration: underline;
}
.leaflet-popup-content .webcam-clip {
  position: relative; width: 340px; max-width: 72vw; height: 240px; margin-top: 6px;
  overflow: hidden; border-radius: 8px; background: #111;
}
.leaflet-popup-content .webcam-clip .webcam-frame {
  display: block; width: 100%; height: 100%; border: 0; background: #111;
}
.leaflet-popup-content .webcam-clip.page .webcam-frame {
  position: absolute; left: 0; top: 0; width: 100%; height: 920px;
  transform: translateY(-220px);
}
.leaflet-popup-content .webcam-still {
  display: block; width: 340px; max-width: 72vw; height: auto; margin: 6px 0; border-radius: 8px; background: #111;
}
.leaflet-popup-content .webcam-open { margin: 6px 0 0; font-size: 12px; }
.leaflet-popup-content .webcam-open a { color: #2a6f97; }
.leaflet-popup-content .webcam-miss {
  display: grid; gap: 10px; place-items: start; width: 340px; max-width: 72vw;
  margin-top: 6px; padding: 16px; border-radius: 8px; background: #18232e; color: #e8eef4;
}
.leaflet-popup-content .webcam-miss p { margin: 0; font-size: 13px; line-height: 1.4; }
.leaflet-popup-content .webcam-btn {
  display: inline-block; padding: 8px 12px; border-radius: 8px;
  background: #5ee7ff; color: #102029; text-decoration: none; font-size: 13px; font-weight: 600;
}
.emoji-pin.mini { width: 22px; height: 22px; border-radius: 7px; }
.emoji-pin.mini b { font-size: 13px; }
.leaflet-popup-content .camera-live {
  display: block; width: 320px; max-width: 68vw; height: auto; margin-top: 6px;
  background: #111; border-radius: 4px;
}
.leaflet-popup-content .camera-note { margin: 4px 0 0; }
.leaflet-popup-content .camera-credit { margin: 4px 0 0; font-size: 11px; opacity: 0.75; }
.drip-mark {
  display: block; width: 22px; height: 14px; border-radius: 2px;
  background: #101820; border: 2px solid #9eb6ff;
}
.drip-live { display: block; width: 100%; height: 100%; background: #000; border-radius: 2px; }
.msi-turn { display: flex; width: var(--msi, 24px); height: var(--msi, 24px); align-items: center; justify-content: center; }
.msi {
  display: flex; align-items: center; justify-content: center;
  width: var(--msi, 24px); height: var(--msi, 24px);
  border-radius: 1px; background: #070707; color: #f7f7f7;
  font-weight: 800; font-size: calc(var(--msi, 24px) * 0.46); line-height: 1;
  border: 1px solid #2c2c2c; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}
.msi.speed, .msi.blank, .msi.closed, .msi.open, .msi.merge, .msi.end { border-radius: 1px; }
.msi.closed { color: #ff2d2d; font-size: calc(var(--msi, 24px) * 0.62); }
.msi.open { color: #3ddc97; font-size: calc(var(--msi, 24px) * 0.7); }
.msi.merge { color: #ffe14a; font-size: calc(var(--msi, 24px) * 0.62); }
.msi.flash { animation: msi-flash 0.9s steps(2) infinite; }
@keyframes msi-flash { 50% { opacity: 0.25; } }
.heli-pin, .ship-pin { background: transparent; border: 0; }
.craft { display: block; width: 32px; height: 32px; }
.craft.heli { width: 36px; height: 36px; }
.craft-icon { display: block; width: 100%; height: 100%; transform-origin: center; overflow: visible; }
.craft.moving .craft-icon { filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.55)); }
.leaflet-container { background: #0b1218; font: inherit; }
.leaflet-tile { filter: invert(1) hue-rotate(180deg) brightness(0.82) contrast(0.92) saturate(0.55); }
.leaflet-bar a, .leaflet-bar a:hover {
  background: #182430; color: var(--text); border-bottom-color: var(--line);
}
#detail {
  position: absolute; top: 12px; right: 12px; bottom: 12px; width: min(480px, calc(100% - 24px));
  background: rgba(18, 27, 36, 0.96); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); overflow: auto; z-index: 500; backdrop-filter: blur(8px);
}
.detail-head { position: sticky; top: 0; background: rgba(18, 27, 36, 0.96); }
.close { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 6px; }
.detail-body { padding: 0 16px 18px; display: grid; gap: 12px; }
.block { display: grid; gap: 6px; }
.block h3 { margin: 0; font-size: 12px; color: var(--muted); font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; }
.msg { border-top: 1px solid var(--line); padding-top: 8px; }
.raw { font-family: ui-monospace, monospace; font-size: 11px; color: var(--muted); white-space: pre-wrap; }
.hit { font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.who-line { display: flex; gap: 10px; align-items: center; }
.thumbs { display: flex; align-items: center; flex: none; }
.thumb {
  width: 48px; height: 48px; flex: none; border-radius: 14px; position: relative;
  display: grid; place-items: center;
  background: linear-gradient(180deg, #243244, #182430);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.glyph {
  font-size: 28px; line-height: 1;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}
.thumbs.stack .thumb { width: 42px; height: 42px; border-radius: 13px; box-shadow: 0 0 0 2px #0d151d, inset 0 1px 0 rgba(255, 255, 255, 0.08); }
.thumbs.stack .glyph { font-size: 24px; }
.thumbs.stack .thumb + .thumb { margin-left: -14px; }
.thumbs.stack .thumb:nth-child(1) { z-index: 1; }
.thumbs.stack .thumb:nth-child(2) { z-index: 2; }
.thumbs.stack .thumb:nth-child(3) { z-index: 3; }
.thumbs.stack .thumb:nth-child(4) { z-index: 4; }
.more {
  position: relative; z-index: 5; margin-left: -8px; min-width: 28px; height: 28px; padding: 0 6px;
  border-radius: 999px; background: #fff; color: #121b24; font-size: 12px; font-weight: 750;
  display: grid; place-items: center; box-shadow: 0 0 0 2px #0d151d;
}
.thumb img, .art img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.types { font-size: 13px; font-weight: 750; line-height: 1.35; color: #fff; }
.what { color: var(--muted); font-size: 13px; line-height: 1.4; }
.rawline { color: var(--muted); font-size: 11px; font-family: ui-monospace, monospace; }
.sev { font-size: 12px; font-weight: 750; letter-spacing: 0.02em; }
.sev.hoog, .severity.hoog strong { color: #ffb3bb; }
.sev.spoed, .severity.spoed strong { color: #ffd48a; }
.sev.laag, .severity.laag strong { color: #b6f3d8; }
.sev.test, .sev.onbekend { color: var(--muted); }
.severity { border-radius: 14px; padding: 12px 14px; display: grid; gap: 4px; }
.severity.hoog { background: rgba(255, 93, 108, 0.16); }
.severity.spoed { background: rgba(255, 176, 32, 0.14); }
.severity.laag { background: rgba(61, 220, 151, 0.12); }
.severity.test, .severity.onbekend { background: var(--panel-2); }
.severity p, .note { margin: 0; color: var(--text); font-size: 14px; line-height: 1.45; }
.note { color: var(--muted); }
.units { display: grid; gap: 8px; }
.unit {
  display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center;
  background: var(--panel-2); border-radius: 14px; padding: 8px;
}
.art {
  width: 64px; height: 64px; border-radius: 18px; margin: 0;
  display: grid; place-items: center;
  background: linear-gradient(180deg, #243244, #182430);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.art .glyph { font-size: 38px; }
.unit strong { display: block; margin-bottom: 4px; }
.unit p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.tech { border-top: 1px solid var(--line); padding-top: 8px; }
.tech summary { cursor: pointer; font-size: 13px; }
.toast {
  position: fixed; left: 16px; bottom: 16px; z-index: 800; max-width: min(420px, calc(100% - 32px));
  background: #182430; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  box-shadow: var(--shadow);
}

@media (max-width: 900px) {
  main { grid-template-columns: 1fr; }
  .stage { height: 320px; min-height: 320px; }
  .feed { border-right: 0; border-bottom: 1px solid var(--line); max-height: 50vh; }
  #detail { top: auto; height: 70%; }
  .unit { grid-template-columns: 56px 1fr; }
  .art { width: 56px; height: 56px; }
  .art .glyph { font-size: 32px; }
}
