:root {
  color-scheme: dark;
  --bg: #0b0c0e;
  --panel: #121417;
  --border: #23262b;
  --text: #e8eaed;
  --muted: #8b919a;
  --accent: #f5b842;
  --up: #4ade80;
  --down: #f87171;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

a { color: var(--text); }

.turbo-progress-bar { background-color: var(--accent); }

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

.wordmark {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.wordmark-tick { color: var(--accent); }

.masthead-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cycle-ring {
  width: 16px;
  height: 16px;
  transform: rotate(-90deg);
}

.cycle-ring-track {
  fill: none;
  stroke: var(--border);
  stroke-width: 2.5;
}

.cycle-countdown {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.cycle-ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 50.27;
  stroke-dashoffset: 50.27;
}

.masthead-right {
  display: flex;
  align-items: center;
  gap: 16px;
}




.ping-toggle,
.signout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  min-width: 32px;
  padding: 0 10px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}
.signout svg { display: block; }
.ping-toggle { gap: 6px; }
.signout:hover { color: var(--text); border-color: var(--muted); }
.week-left { gap: 6px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; white-space: nowrap; }
.week-last { color: var(--accent); border-color: var(--accent); }

.changelog-link {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 7px;
}
.changelog-link:hover { color: var(--accent); border-color: var(--accent); }

.changelog-link.fresh {
  border-color: var(--accent);
  background-image: linear-gradient(100deg, var(--accent) 42%, #ffe9c2 50%, var(--accent) 58%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: changelog-shimmer 2.4s linear infinite;
}

@keyframes changelog-shimmer {
  from { background-position: 110% 0; }
  to { background-position: -110% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .changelog-link.fresh {
    animation: none;
    background-image: none;
    color: var(--accent);
  }
}




.up   { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--muted); }

.leave-desk-arrow {
  width: 0.8em;
  height: 0.8em;
  margin-right: 5px;
  flex-shrink: 0;
  vertical-align: middle;
}


.live-dot,
.wire-down-dot,
.ping-dot,
.notice-dot {
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  background: currentColor;
  vertical-align: middle;
}

.live-dot { animation: live-pulse 3s ease-in-out infinite; }

.panel:nth-child(2) .live-dot { animation-duration: 3.4s; animation-delay: -1.3s; }
.panel:nth-child(3) .live-dot { animation-duration: 2.8s; animation-delay: -2.1s; }

@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none; }
}


.wire {
  list-style: none;
  margin: 0;
  padding: 10px 14px 14px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

@media (min-width: 1101px) {
  [data-controller~="cycle"] {
    height: 100dvh;
    display: flex;
    flex-direction: column;
  }

  .wire { flex: 1; min-height: 0; }
}

@media (max-width: 1100px) {
  .wire { max-height: 45vh; }
}

.wire li { padding: 7px 0; border-top: 1px solid var(--border); }

.wire li.wire-axios {
  border-left: 2px solid rgba(245, 184, 66, 0.55);
  padding-left: 8px;
  position: relative;
}
.wire li.wire-axios:not(.wire-new):hover::after {
  content: "?? Cites Barak Ravid / Axios ??";
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 6;
  padding: 3px 8px;
  background: var(--panel);
  border: 1px solid rgba(245, 184, 66, 0.55);
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.5px;
  color: var(--accent);
  pointer-events: none;
  white-space: nowrap;
}
.wire li:first-child { border-top: 0; }

.wire a {
  text-decoration: none;
  display: block;
  padding: 2px 0;
}
.wire a:hover { color: var(--accent); }

.wire-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  margin-top: 2px;
}
.wire-when { min-width: 0; }

.wire-updated { color: var(--accent); }

.wire-x { font-family: var(--mono); }

.wire-qt {
  display: block;
  margin-top: 4px;
  padding-left: 8px;
  border-left: 2px solid var(--border);
  color: var(--muted);
  font-style: italic;
  font-size: 13px;
}

.wire-qt-reveal { animation: qt-reveal 0.9s ease both; }
@keyframes qt-reveal {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .wire-qt-reveal { animation: none; }
}

.wire-media {
  background: none;
  border: 1px solid var(--muted);
  border-radius: 4px;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 9px;
  padding: 3px 6px;
}

.wire-media:hover { border-color: var(--accent); color: var(--accent); }

.wire-replay {
  background: none;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--accent);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  min-height: 24px;
  margin-left: auto;
}
.wire-replay:hover { border-color: var(--accent); }
.wire-replay:disabled { opacity: 0.4; cursor: default; border-color: var(--border); }
.wire-copy {
  margin-left: auto;
  background: none;
  border: 0;
  color: var(--accent);
  opacity: 0;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  padding: 0;
  transition: opacity 0.15s ease;
}
.wire li:hover .wire-copy { opacity: 1; }
.wire-copy.copied { opacity: 1; }

@media (hover: none) {
  .wire-copy { opacity: 0.45; color: var(--muted); }
}


.wire-empty { color: var(--muted); }

.wire li.wire-new {
  position: relative;
  padding: 7px 8px;
  margin: 0 -8px;
  border-radius: 6px;
  border-top-color: transparent;
}

.wire li.wire-new::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 6px;
  pointer-events: none;
  --sup-top: 0.4;
  --sup-bottom: 0.4;
  --halo-top: 0.22;
  --halo-bottom: 0.22;
  box-shadow:
    0 0 0 1px rgba(245, 184, 66, 1),
    0 0 8px rgba(245, 184, 66, 0.4),
    0 0 22px rgba(245, 184, 66, 0.22),
    0 -4px 8px -2px rgba(245, 184, 66, var(--sup-top)),
    0 4px 8px -2px rgba(245, 184, 66, var(--sup-bottom)),
    -4px 0 8px -2px rgba(245, 184, 66, 0.4),
    4px 0 8px -2px rgba(245, 184, 66, 0.4),
    0 -8px 22px -5px rgba(245, 184, 66, var(--halo-top)),
    0 8px 22px -5px rgba(245, 184, 66, var(--halo-bottom)),
    -8px 0 22px -5px rgba(245, 184, 66, 0.22),
    8px 0 22px -5px rgba(245, 184, 66, 0.22);
}

.wire li.wire-new:has(+ li.wire-new)::after { --sup-bottom: 0; --halo-bottom: 0; }
.wire li.wire-new + li.wire-new::after { --sup-top: 0; --halo-top: 0; }

.wire li.wire-new.wire-new-fading::after {
  animation: wire-new-fade var(--glow-fade, 60s) linear var(--glow-delay, 0ms) forwards;
}

.wire li.wire-new.wire-new-stale::after {
  --sup-top: 0.2;
  --sup-bottom: 0.2;
  --halo-top: 0.11;
  --halo-bottom: 0.11;
  box-shadow:
    0 0 0 1px rgba(245, 184, 66, 0.5),
    0 0 8px rgba(245, 184, 66, 0.2),
    0 0 22px rgba(245, 184, 66, 0.11),
    0 -4px 8px -2px rgba(245, 184, 66, var(--sup-top)),
    0 4px 8px -2px rgba(245, 184, 66, var(--sup-bottom)),
    -4px 0 8px -2px rgba(245, 184, 66, 0.2),
    4px 0 8px -2px rgba(245, 184, 66, 0.2),
    0 -8px 22px -5px rgba(245, 184, 66, var(--halo-top)),
    0 8px 22px -5px rgba(245, 184, 66, var(--halo-bottom)),
    -8px 0 22px -5px rgba(245, 184, 66, 0.11),
    8px 0 22px -5px rgba(245, 184, 66, 0.11);
  animation: wire-new-fade var(--glow-fade, 60s) linear var(--glow-delay, 0ms) forwards;
}

.guest .wire li.wire-new { padding: 7px 0; margin: 0; border-radius: 0; border-top-color: var(--border); }
.guest .wire li.wire-new::after { display: none; }
.guest .wire li.wire-new + li { border-top-color: var(--border); }
.guest .wire li.wire-new.wire-axios { border-left: 2px solid rgba(245, 184, 66, 0.55); padding-left: 8px; }

.wire li.wire-new.wire-axios { border-left: 0; }

.wire li.wire-new + li { border-top-color: transparent; }

@keyframes wire-new-fade {
  to { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .wire li.wire-new.wire-new-fading::after { animation: none; opacity: 0; }
  .wire li.wire-new.wire-new-stale::after { animation: none; }
}


@media (max-width: 640px) {
  .wire-media, .wire-copy { min-height: 30px; min-width: 40px; }
}


.wire li.wire-lockbox { position: relative; flex-shrink: 0; padding: 0; min-height: 150px; max-height: 260px; overflow: hidden; border-bottom: 1px solid var(--border); }
.wire-locked { list-style: none; margin: 0; padding: 0; filter: blur(6px); opacity: 0.7; pointer-events: none; user-select: none; }
.wire-locked li { padding: 7px 0; border-top: 1px solid var(--border); }
.wire-locked li:first-child { border-top: 0; }
.wire-locked-title { display: block; }
.wire-lockask {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  text-align: center;
  background: linear-gradient(rgba(11, 12, 14, 0.55), rgba(11, 12, 14, 0.85));
}
.wire-lockcard-count {
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.wire-lockcard-count::before { content: "\25AE  "; color: var(--accent); }
.wire-lockask-link { text-decoration: none; cursor: pointer; }
.wire-lockask-link:hover .wire-lockcard-count,
.wire-lockask-link:focus-visible .wire-lockcard-count { color: var(--accent); }
.wire-lockask-link:focus-visible { outline: 1px solid var(--accent); outline-offset: 1px; }
.wire-lockask-note { color: var(--muted); font-size: 12px; margin-top: -4px; }
.wire-lockask .guest-bar-cta { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; padding: 8px 22px; }


.ping-toggle .ping-dot { color: var(--accent); }
.ping-toggle.off .ping-dot { color: var(--muted); }
.ping-toggle.off .ping-dot {
  background: transparent;
  box-shadow: inset 0 0 0 1px currentColor;
}
.ping-toggle:hover { border-color: var(--muted); color: var(--text); }
.ping-toggle.pinging .ping-dot { animation: ping-blink 0.3s ease 3; }
@keyframes ping-blink {
  50% { opacity: 0.15; }
}
.ping-toggle.nudge { border-color: var(--accent); color: var(--text); animation: ping-nudge 0.7s ease-out 3; }
@keyframes ping-nudge {
  35% { transform: scale(1.14); }
}
@media (prefers-reduced-motion: reduce) {
  .ping-toggle.nudge { animation: none; }
}
@media (max-width: 640px) {
  .ping-toggle { min-height: 40px; min-width: 40px; }
}


.wire-tr { position: relative; display: block; }
.wire-tr-orig { transition: opacity 0.45s ease; }
@media (hover: hover) {
  .wire-tr-en {
    position: absolute;
    top: -2px;
    left: -4px;
    right: -4px;
    padding: 2px 4px;
    z-index: 5;
    background: var(--panel);
    color: var(--accent);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.45s ease, visibility 0s linear 0.45s;
    direction: ltr;
    unicode-bidi: isolate;
  }
  .wire li:hover .wire-tr-en { opacity: 1; visibility: visible; transition: opacity 0.45s ease; }
  .wire li:hover .wire-tr-orig { opacity: 0.08; }
}
@media (hover: none) {
  .wire-tr-en {
    display: block;
    color: var(--muted);
    direction: ltr;
    unicode-bidi: isolate;
  }
}
.wire-tr-en .wire-tag { color: var(--muted); }

@media (max-width: 640px) {
  .cycle-word, .changelog-link { display: none; }
  .desk-link { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; }
  .masthead { gap: 3px; padding: 5px 6px; }
  .masthead-left { gap: 6px; }
  .masthead-right { gap: 8px; }
  .wordmark { font-size: 11px; letter-spacing: 0.04em; white-space: nowrap; }
  .ping-toggle, .support, .signout {
    min-height: 40px;
    min-width: 40px;
    padding: 0 8px;
    font-size: 10px;
    letter-spacing: 0.06em;
    white-space: nowrap;
  }
  .signout { padding: 0 5px; }
}

@media (max-width: 640px) {
  .wire li.wire-lockbox { display: none; }
  .wire { max-height: none; overflow: visible; }
}

.civ { display: flex; flex-direction: column; height: 100vh; }
.civ .masthead-left { min-width: 0; flex: 1; }
.civ .masthead-right { flex-shrink: 0; }
.wordmark-link { color: inherit; text-decoration: none; }
.civ-crumb {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.civ-scheme { display: inline-flex; align-items: center; }
.civ-scheme-glyph { width: 14px; height: 14px; display: block; }
.civ-scheme-glyph[hidden] { display: none; }
.civ-crumb .civ-scheme { vertical-align: middle; margin-right: 6px; }

.civ-desk {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  flex: 1;
  min-height: 0;
}
.civ-map { position: relative; min-height: 0; background: var(--bg); }

.civ-desk { position: relative; }
.civ-behind {
  position: absolute;
  top: 10px;
  right: 370px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--down);
  border-radius: 3px;
  background: color-mix(in srgb, var(--bg) 88%, var(--down));
  color: var(--down);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-decoration: none;
}
.civ-behind:hover { background: var(--down); color: var(--bg); }
.civ-behind[hidden] { display: none; }
.civ-schemes {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: color-mix(in srgb, var(--bg) 88%, var(--panel));
  overflow: hidden;
}
.civ-schemes button {
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-right: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  cursor: pointer;
}
.civ-schemes button:last-child { border-right: 0; }
.civ-schemes button:hover { color: var(--text); }
.civ-schemes button.on { background: var(--text); color: var(--bg); }
.civ-embed .civ-schemes { display: none; }
@media (max-width: 800px) { .civ-schemes button { min-height: 44px; padding: 0 12px; } }
.civ-behind .live-dot { animation: none; color: inherit; }
.civ-embed .civ-behind { display: none; }
.civ-traffic {
  position: absolute;
  top: 10px;
  right: 370px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--bg);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  white-space: nowrap;
  z-index: 4;
  cursor: help;
}
.civ-traffic::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 260px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--bg);
  color: var(--text);
  font-size: 11px;
  letter-spacing: 0.02em;
  line-height: 1.4;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s;
}
.civ-traffic:hover::after, .civ-traffic:focus-visible::after { opacity: 1; visibility: visible; }
.civ-traffic.empty { color: var(--accent); border-color: var(--accent); }
.civ-traffic + .civ-behind { top: 44px; }
.civ-embed .civ-traffic { right: 10px; }
@media (max-width: 800px) { .civ-traffic { right: 10px; } }

.civ-home {
  position: absolute;
  top: 10px;
  left: 12px;
  z-index: 1;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.civ-home:hover { color: var(--accent); border-color: var(--accent); }
.civ-embed .civ-home { display: none; }
@media (max-width: 800px) { .civ-home { width: 44px; height: 40px; } }
.civ-zoom {
  position: absolute;
  top: 10px;
  left: 50px;
  z-index: 1;
  height: 32px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  font: 11px/1 var(--mono, ui-monospace, monospace);
  letter-spacing: 0.06em;
  display: inline-flex;
  align-items: center;
  pointer-events: none;
}
.civ-embed .civ-zoom { display: none; }
@media (max-width: 800px) { .civ-zoom { left: 62px; height: 40px; } }
.civ-legend {
  margin: 0;
  padding: 10px 14px 14px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  pointer-events: none;
}
.civ-legend div { display: flex; align-items: center; gap: 8px; }
.civ-legend dt, .civ-legend dd { margin: 0; }
.civ-legend svg { display: block; width: 16px; height: 16px; overflow: visible; fill: var(--bg); stroke: var(--muted); stroke-width: 1.6; stroke-linejoin: round; }
.civ-legend .open { fill: none; }
.civ-legend .hit { fill: var(--accent); stroke: var(--accent); }
.civ-legend .hit.dim { opacity: 0.45; }
.civ-legend .breathe { animation: live-pulse 2s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .civ-legend .breathe { animation: none; } }
.civ-legend .day { fill: var(--text); stroke: var(--text); }
.civ-legend .blockade { fill: none; stroke: var(--text); stroke-dasharray: 3 2; }
.civ-legend .zone { fill: var(--down); fill-opacity: 0.18; stroke: var(--down); stroke-dasharray: 3 2; }
.civ-legend .outbreak { fill: #a3141f; fill-opacity: 0.55; stroke: none; filter: blur(0.6px); }
.civ-legend .outbreak-core { fill: #5a0008; stroke: none; filter: blur(0.5px); }
.civ-legend .arc { fill: none; stroke: var(--accent); stroke-dasharray: 3 2; }
.civ-legend .aa { fill: none; stroke: var(--text); }
.civ-legend .beacon { fill: var(--down); filter: blur(1.5px); animation: beacon 2s linear infinite; }
@keyframes beacon { 0%, 50%, 100% { opacity: 0.15; } 12%, 37% { opacity: 0.8; } 25% { opacity: 0.15; } }
.civ-legend .launch { fill: none; stroke: var(--text); stroke-width: 1.6; animation: live-pulse 1.6s ease-in-out infinite; }
.civ-legend .aa.ring { animation: live-pulse 2s ease-in-out infinite; }
.civ-legend .plane { fill: var(--muted); stroke: none; }
.civ-legend .outage { fill: var(--muted); stroke: var(--muted); }
.civ-legend .outage path { fill: none; }
.civ-legend .tanker { fill: var(--accent); stroke: var(--accent); }
.civ-legend .ship { fill: var(--muted); stroke: var(--muted); }
.civ-legend .heat { fill: var(--down); stroke: none; opacity: 0.7; filter: blur(2px); }
.civ-legend .aircraft { fill: var(--accent); stroke: var(--accent); }
.civ-legend .traffic { fill: none; stroke: var(--muted); }
.civ-legend .civ-legend-note { grid-column: 1 / -1; display: block; max-width: 190px; padding-top: 2px; }
.civ-legend .civ-legend-note p { margin: 0; text-transform: none; letter-spacing: 0.04em; line-height: 1.45; opacity: 0.75; }
.civ-legend-hit dd { color: var(--text); }
.civ-map .maplibregl-ctrl-attrib { background: transparent; color: var(--muted); font-size: 10px; }
.civ-media {
  position: absolute;
  right: 372px;
  bottom: 36px;
  z-index: 3;
  width: min(420px, 45%);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.civ-media video, .civ-media img { display: block; width: 100%; max-height: 60vh; object-fit: contain; background: #000; }
.civ-media-close {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 32px;
  min-height: 32px;
  background: rgba(11, 12, 14, 0.8);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.civ-media-close:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 800px) { .civ-media { width: calc(100% - 24px); left: 12px; right: 12px; bottom: 56px; } }
.civ-corner iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: #000; }
.civ-corner[hidden] { display: none; }
.civ-eta .maplibregl-popup-content {
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: 3px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  padding: 5px 8px;
  pointer-events: none;
  white-space: nowrap;
}
.civ-eta .maplibregl-popup-tip { display: none; }
.civ-map .maplibregl-ctrl-attrib a { color: var(--muted); }
.civ-map .maplibregl-ctrl-attrib-button { filter: invert(1); }

.smoke {
  position: relative;
  width: 40px;
  height: 60px;
  pointer-events: none;
  --drift: 52px;
}
.smoke.thin { opacity: 0.6; --drift: 32px; }
.smoke.hidden { display: none; }
.smoke.faint { opacity: 0.2; --drift: 16px; }
.smoke i {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--smoke, 200, 204, 210), 0.55) 0%, rgba(var(--smoke, 200, 204, 210), 0.18) 45%, transparent 70%);
  filter: blur(2px);
  opacity: 0;
  transform-origin: 50% 100%;
  animation: smoke-rise 5.2s ease-out infinite;
  animation-delay: calc(var(--i) * -1.3s);
}
.smoke i:nth-child(2) { width: 18px; height: 18px; margin-left: -9px; }
.smoke i:nth-child(3) { width: 12px; height: 12px; margin-left: -6px; }
.boom { position: relative; width: 60px; height: 60px; pointer-events: none; transform: scale(var(--size, 1)); }
.boom b {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff6d5 0%, var(--accent) 35%, rgba(251, 146, 60, 0.6) 60%, rgba(251, 146, 60, 0) 72%);
  animation: boom-flash 1.1s ease-out forwards;
}
.boom i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3px;
  height: 3px;
  margin: -1.5px 0 0 -1.5px;
  border-radius: 50%;
  background: var(--accent);
  animation: boom-spark 1s ease-out forwards;
  --a: calc(var(--i) * 60deg);
}
.boom i:nth-child(2) { --i: 0; } .boom i:nth-child(3) { --i: 1; } .boom i:nth-child(4) { --i: 2; }
.boom i:nth-child(5) { --i: 3; } .boom i:nth-child(6) { --i: 4; } .boom i:nth-child(7) { --i: 5; }
@keyframes boom-flash {
  0%   { opacity: 0; transform: scale(0.1); }
  10%  { opacity: 1; transform: scale(0.6); }
  100% { opacity: 0; transform: scale(1.6); }
}
@keyframes boom-spark {
  0%   { opacity: 1; transform: rotate(var(--a)) translateY(0); }
  100% { opacity: 0; transform: rotate(var(--a)) translateY(-26px); }
}
@keyframes smoke-rise {
  0%   { opacity: 0; transform: translate(0, 0) scale(0.5); }
  12%  { opacity: 0.9; }
  100% { opacity: 0; transform: rotate(var(--wind)) translateY(calc(-1 * var(--drift))) rotate(calc(-1 * var(--wind))) translateY(-46px) scale(2.4); }
}
@media (prefers-reduced-motion: reduce) {
  .smoke i { animation: none; opacity: 0.35; transform: translateY(-16px) scale(1.6); }
}

.civ-log {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 360px;
  z-index: 2;
  border-left: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 62%, transparent);
  backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.civ-map .maplibregl-ctrl-bottom-right { right: 360px; }
.civ-log-head {
  margin: 0;
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.civ-wire { flex: 1; max-height: none; overflow-y: auto; padding: 10px 14px 14px; }
.civ-place { color: var(--accent); }
.civ-top {
  float: right;
  margin: -6px -8px -6px 0;
  width: 32px;
  height: 28px;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: none;
  color: var(--accent);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.civ-top:hover { border-color: var(--accent); }
.civ-embed .civ-top { display: none; }
.civ-lock {
  float: right;
  margin: -6px 6px -6px 0;
  width: 32px;
  height: 28px;
  padding: 0;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: none;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.civ-lock svg { display: block; }
.civ-lock .lock-closed { display: none; }
.civ-lock:hover { border-color: var(--accent); }
.civ-lock[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
.civ-lock[aria-pressed="true"] .lock-open { display: none; }
.civ-lock[aria-pressed="true"] .lock-closed { display: block; }
.civ-embed .civ-lock { display: none; }
.civ-wire li.pointed { background: color-mix(in srgb, var(--accent) 12%, transparent); box-shadow: inset 2px 0 0 var(--accent); margin: 0 -14px; padding-left: 14px; padding-right: 14px; }

@media (max-width: 800px) {
  .civ-desk { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) 40vh; }
  .civ-log { position: static; width: auto; background: var(--bg); backdrop-filter: none; }
  .civ-map .maplibregl-ctrl-bottom-right { right: 0; }
  .civ-behind { right: 10px; }
  .civ-top { width: 44px; height: 36px; margin: -10px -8px -10px 0; }
  .civ-lock { width: 44px; height: 36px; margin: -10px 6px -10px 0; }
  .civ-crumb { display: none; }
  .civ-log { border-left: 0; border-top: 1px solid var(--border); }
  .civ-stats-panel:not([hidden]) { width: 100%; z-index: 5; backdrop-filter: none; border-right: none; }
  .civ-desk .civ-stats-chip { min-height: 44px; }
}

.civ-embed { height: 100%; min-height: 100vh; }
.civ-embed .civ-desk { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.civ-embed .maplibregl-ctrl-bottom-right { right: 0; }
.civ-embed .civ-log { display: none; }
.civ-embed .civ-stats-panel { display: none; }

.civ-stats-panel {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 260px;
  z-index: 2;
  border-right: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 62%, transparent);
  backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.civ-stats-panel[hidden] { display: none; }
@media (min-width: 801px) {
  .civ-stats-panel:not([hidden]) ~ .civ-map .civ-home { left: 272px; }
  .civ-stats-panel:not([hidden]) ~ .civ-map .civ-zoom { left: 310px; }
}
.civ-desk .civ-stats-chip { top: 48px; left: 12px; }
@media (max-width: 800px) { .civ-desk .civ-stats-chip { top: 56px; } }
.civ-stats-head {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 6px 10px 0;
  gap: 4px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.civ-stat-tab {
  appearance: none;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  padding: 6px 8px;
  font: inherit;
  letter-spacing: inherit;
  color: var(--muted);
  cursor: pointer;
}
.civ-stat-tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.civ-stat-tab:hover { color: var(--text); }
@media (max-width: 800px) { .civ-stat-tab { min-height: 44px; padding-top: 0; padding-bottom: 0; } }
.civ-stats-close {
  margin-left: auto;
  width: 32px;
  height: 28px;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: none;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.civ-stats-close:hover { border-color: var(--accent); }
.civ-stats-pane {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.civ-stats-pane[hidden] { display: none; }
.civ-stat-tile {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.civ-stat-tile:last-child { border-bottom: none; }
.civ-stat-label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 2px;
}
.civ-stat-source {
  color: inherit;
  text-decoration: none;
}
.civ-stat-source:hover,
.civ-stat-source:focus-visible {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.civ-stat-value {
  display: block;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: bold;
  color: var(--text);
  line-height: 1.3;
}
.civ-stat-unit {
  font-size: 10px;
  color: var(--muted);
  font-weight: normal;
}
.civ-stat-change {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  margin-top: 2px;
}
.civ-stat-change.down { color: var(--down); }
.civ-stat-age {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  margin-top: 1px;
}
.civ-stat-empty {
  padding: 14px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.civ-stats-chip {
  display: none;
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  min-height: 32px;
  padding: 2px 8px;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  cursor: pointer;
}
.civ-stats-panel[hidden] + .civ-stats-chip { display: block; }
.civ-stats-chip:hover { border-color: var(--accent); color: var(--accent); }
