:root {
  --bg: #071018;
  --panel: rgba(13, 27, 38, 0.92);
  --panel-strong: #102332;
  --line: rgba(127, 170, 190, 0.2);
  --line-strong: rgba(109, 223, 193, 0.38);
  --text: #edf6f4;
  --muted: #8ca4ad;
  --green: #6ddfc1;
  --green-dim: #173f3a;
  --gold: #e7bd68;
  --gold-dim: #3e3420;
  --red: #ff7a79;
  --red-dim: #47252a;
  --yellow: #e7bd68;
  --orange: #ee9655;
  --blue: #72b7db;
  --radius: 14px;
  --shadow: 0 20px 55px rgba(0, 0, 0, 0.32);
  font-family: Inter, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 0%, rgba(35, 115, 115, 0.2), transparent 34rem),
    radial-gradient(circle at 88% 12%, rgba(103, 86, 40, 0.13), transparent 28rem),
    linear-gradient(145deg, #050b11 0%, var(--bg) 48%, #09151c 100%);
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(109, 223, 193, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(109, 223, 193, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 86%);
}

.scanline {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  opacity: 0.025;
  background: repeating-linear-gradient(to bottom, transparent 0 3px, #fff 4px);
}

.shell {
  position: relative;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 42px 0 30px;
}

.command-header,
.section-heading,
.storage-topline,
.storage-note,
.mission-header,
.progress-header,
.mission-footer,
.gate-row,
.grave-top,
.verdict-reference,
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.command-header { margin-bottom: 24px; }

.eyebrow,
.section-kicker {
  margin: 0 0 7px;
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(2rem, 5vw, 3.7rem); letter-spacing: -0.05em; }
h2 { margin-bottom: 0; font-size: 1.45rem; }
h3 { margin: 4px 0 0; font-size: 1.3rem; }
.subtitle { margin: 0; color: var(--muted); }

.header-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: var(--green);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(13, 35, 36, 0.72);
  font-size: 0.84rem;
  white-space: nowrap;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 14px var(--green);
}

.precedence-banner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 24px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(7, 17, 25, 0.75);
  font-size: 0.79rem;
}

.precedence-banner strong { color: var(--text); }
.precedence-banner small { margin-left: auto; color: #6f8790; }
.precedence-label { color: var(--gold); font-weight: 800; }
.telemetry-times { display: grid; margin-left: auto; justify-items: end; gap: 3px; }
.telemetry-times small { margin-left: 0; }
.freshness { font-family: ui-monospace, monospace; font-weight: 800; }
.freshness.current { color: var(--green); }
.freshness.stale { color: var(--red); }

.dashboard-content { display: grid; gap: 24px; }

.god-view {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
  padding: 24px;
  border: 1px solid rgba(231, 189, 104, 0.42);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(62, 52, 32, 0.62), rgba(16, 35, 50, 0.96) 44%, rgba(7, 17, 24, 0.98));
  box-shadow: var(--shadow);
}
.god-view-topline { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.god-view-topline h2 { color: var(--gold); font-size: clamp(1.3rem, 3vw, 1.85rem); }
.god-view-mode { padding: 7px 10px; border: 1px solid rgba(109, 223, 193, 0.32); border-radius: 999px; color: var(--green); font-size: .72rem; white-space: nowrap; }
.god-strategic-freshness { display: flex; align-items: center; gap: 9px; color: var(--green); font-size: .77rem; }
.god-strategic-freshness span { color: var(--muted); }
.god-strategic-freshness.stale { padding: 10px 12px; border: 1px solid rgba(255, 122, 121, .38); border-radius: 8px; color: var(--red); background: var(--red-dim); }
.god-strategic-freshness.stale span { color: #f0c0c0; }
.god-strategic-freshness.warning { padding: 10px 12px; border: 1px solid rgba(244, 196, 72, .45); border-radius: 8px; color: #e5bb36; background: rgba(244, 196, 72, .08); }
.autonomy-status { margin: 14px 0; padding: 14px; border: 1px solid rgba(109, 223, 193, .28); border-radius: 10px; background: rgba(5, 15, 22, .48); }
.autonomy-status-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--green); font-size: .82rem; }
.autonomy-status-top span { color: var(--muted); }
.autonomy-status-grid { display: grid; grid-template-columns: 1.1fr 1fr 1.5fr; gap: 12px; margin-top: 12px; }
.autonomy-status-grid article { display: grid; gap: 5px; min-width: 0; }
.autonomy-status-grid span, .autonomy-status-grid small { color: var(--muted); font-size: .7rem; }
.autonomy-status-grid strong { font-size: .84rem; line-height: 1.4; }
.autonomy-status-grid ol { display: grid; gap: 4px; margin: 0; padding-left: 18px; }
.autonomy-status-grid li { display: flex; justify-content: space-between; gap: 8px; color: var(--text); font-size: .72rem; }
.autonomy-status-grid li small { white-space: nowrap; }
.frontline-life-inline { display: flex; align-items: center; gap: 7px; padding: 5px 9px; border: 1px solid rgba(109, 223, 193, .42); border-radius: 7px; color: var(--green); background: rgba(7, 40, 31, .45); font-size: .72rem; white-space: nowrap; }
.frontline-life-inline span { color: var(--muted); }
.frontline-life-inline.yellow { border-color: rgba(244, 196, 72, .58); color: #e5bb36; background: rgba(244, 196, 72, .10); }
.frontline-life-inline.red { border: 2px solid var(--red); color: #fff; background: rgba(205, 57, 57, .32); box-shadow: 0 0 18px rgba(255, 89, 89, .32); font-weight: 700; }
.frontline-life-inline.red span { color: #ffd2d2; }
.god-view-primary { display: grid; grid-template-columns: .85fr 1.35fr 1.2fr; gap: 12px; }
.god-main-card, .god-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(5, 15, 22, .53);
}
.god-main-card { display: grid; gap: 9px; min-height: 123px; }
.god-main-card > span, .god-card h3 { margin: 0; color: var(--muted); font-size: .73rem; font-weight: 800; letter-spacing: .08em; }
.god-main-card strong { color: var(--text); font-size: 1rem; line-height: 1.45; }
.chapter-card strong { color: var(--gold); font-size: 1.25rem; }
.next-card { border-color: rgba(255, 122, 121, .34); background: linear-gradient(135deg, rgba(71, 37, 42, .67), rgba(5, 15, 22, .54)); }
.next-card strong { color: #ffd1cf; }
.god-reasons { display: grid; gap: 5px; color: var(--muted); font-size: .76rem; }
.god-why-label { color: var(--green); font-weight: 800; }
.god-reasons ul, .do-not-build ul { display: grid; gap: 4px; margin: 0; padding-left: 18px; }
.god-view-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.god-card { min-height: 135px; }
.god-card h3 { margin-bottom: 13px; color: var(--text); }
.god-card p { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.55; }
.god-list { display: grid; gap: 8px; }
.god-list-row { display: flex; align-items: start; justify-content: space-between; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); }
.god-list-row:first-child { padding-top: 0; border-top: 0; }
.god-list-row div { display: grid; gap: 3px; }
.god-list-row strong { font-size: .84rem; }
.god-list-row span, .god-list-row small { color: var(--muted); font-size: .69rem; line-height: 1.4; }
.god-list-row small { max-width: 105px; color: var(--green); text-align: right; }
.blocker-card { border-color: rgba(255, 122, 121, .32); }
.blocker-card p { color: #e6b2b2; }
.do-not-build { border-color: rgba(231, 189, 104, .28); }
.do-not-build li { color: #d8c89f; font-size: .77rem; }

.war-room-hud {
  display: grid;
  gap: 13px;
  padding: 17px;
  border: 1px solid rgba(109, 223, 193, .46);
  border-radius: 12px;
  background: linear-gradient(115deg, rgba(8, 48, 42, .72), rgba(7, 21, 29, .86));
  box-shadow: inset 0 0 30px rgba(109, 223, 193, .04), 0 0 24px rgba(25, 115, 95, .08);
}
.war-room-command { display: grid; grid-template-columns: 1.4fr 1fr auto; align-items: center; gap: 16px; }
.war-room-command > div { display: grid; gap: 4px; }
.war-room-command span { color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .07em; }
.war-room-command strong { font-size: clamp(.96rem, 2vw, 1.25rem); }
.war-room-command > div:nth-child(2) strong { color: var(--green); }
.owner-beacon { min-width: 135px; padding: 9px 12px; border: 1px solid rgba(109, 223, 193, .38); border-radius: 9px; background: var(--green-dim); }
.owner-beacon strong { color: var(--green); font-size: .88rem; }
.owner-beacon code { color: var(--muted); font-size: .58rem; }
.owner-beacon.required { border: 2px solid var(--red); background: var(--red-dim); box-shadow: 0 0 20px rgba(255, 122, 121, .24); }
.owner-beacon.required strong { color: #ffd0ce; }
.frontline-health-lights { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }
.live-health-item { display: grid; gap: 3px; min-width: 0; padding: 8px 9px; border-left: 2px solid var(--green); background: rgba(5, 17, 23, .58); }
.live-health-item.warning { border-color: var(--yellow); }
.live-health-item span { color: var(--muted); font-size: .65rem; }
.live-health-item strong { overflow: hidden; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.live-health-item code { overflow: hidden; color: #68848a; font-size: .52rem; text-overflow: ellipsis; white-space: nowrap; }
.capture-metrics { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--line); }
.capture-metric { display: grid; gap: 3px; min-width: 0; padding: 9px 10px; background: rgba(5, 17, 23, .92); }
.capture-metric span { color: var(--muted); font-size: .62rem; }
.capture-metric strong { overflow-wrap: anywhere; font-size: .74rem; }
.capture-metric code { overflow: hidden; color: #6e8a92; font-size: .53rem; text-overflow: ellipsis; white-space: nowrap; }
.lifecycle-hud { display: flex; align-items: center; gap: 13px; }
.lifecycle-hud > strong { color: var(--muted); font-size: .68rem; white-space: nowrap; }
.lifecycle-hud ol { display: flex; flex: 1; margin: 0; padding: 0; list-style: none; }
.lifecycle-hud li { position: relative; flex: 1; padding: 7px 8px; color: #657b83; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: .68rem; text-align: center; white-space: nowrap; }
.lifecycle-hud li + li::before { position: absolute; left: -3px; content: '›'; color: #5e737a; }
.lifecycle-hud li.active { color: #06130f; border-color: var(--green); background: var(--green); font-weight: 900; box-shadow: 0 0 15px rgba(109, 223, 193, .22); }
.empire-health-row { display: flex; align-items: stretch; gap: 13px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; background: rgba(7, 17, 25, .82); }
.empire-health-row > strong { display: flex; align-items: center; color: var(--gold); font-size: .78rem; white-space: nowrap; }
#empire-health-items { display: grid; flex: 1; grid-template-columns: repeat(6, 1fr); gap: 9px; }
.empire-health-item { display: grid; min-width: 0; gap: 2px; padding-left: 8px; border-left: 2px solid var(--green); }
.empire-health-item.warning { border-color: var(--red); }
.empire-health-item small { color: var(--muted); font-size: .58rem; }
.empire-health-item strong { overflow: hidden; font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.empire-health-item code { overflow: hidden; color: #637c84; font-size: .48rem; text-overflow: ellipsis; white-space: nowrap; }

.critical-alert {
  margin-bottom: 18px;
  padding: 13px 16px;
  border: 1px solid rgba(255, 122, 121, .48);
  border-radius: 10px;
  color: #ffd0ce;
  background: var(--red-dim);
}
.imperial-logistics { margin-top: 24px; }
.imperial-logistics > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 17px;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: rgba(7, 17, 25, .75);
  list-style: none;
}
.imperial-logistics > summary::-webkit-details-marker { display: none; }
.imperial-logistics > summary strong { color: var(--green); font-size: .78rem; }
.imperial-logistics > summary small { margin-left: auto; color: var(--muted); }
.imperial-logistics[open] > summary { border-bottom-right-radius: 0; border-bottom-left-radius: 0; }
.imperial-logistics-content { padding-top: 24px; }
.panel {
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(16, 35, 50, 0.94), var(--panel));
  box-shadow: var(--shadow);
}

.panel::before {
  display: block;
  width: 55px;
  height: 2px;
  margin: -22px 0 20px;
  content: "";
  background: var(--green);
  box-shadow: 0 0 14px rgba(109, 223, 193, 0.7);
}

.section-heading { margin-bottom: 18px; }
.section-heading.compact { margin-bottom: 14px; }
.counter, .boss-tag {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.76rem;
}
.boss-tag { color: var(--gold); border-color: rgba(231, 189, 104, 0.3); }
.gate-heading-status { display: flex; align-items: center; gap: 8px; }

.base-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.watcher-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.watcher-message {
  display: flex;
  grid-column: 1 / -1;
  padding: 12px 14px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(5, 14, 21, 0.48);
}
.watcher-message.ready { color: var(--green); border-color: rgba(109, 223, 193, 0.32); }
.watcher-message.blocked { color: var(--red); border-color: rgba(255, 122, 121, 0.35); }
.watcher-message code { color: var(--muted); font-size: 0.63rem; }

.storage-resource,
.resource-item {
  min-height: 104px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(5, 15, 22, 0.48);
}

.storage-topline { font-size: 0.81rem; }
.storage-topline strong { color: var(--green); font-size: 1rem; }
.meter-track, .progress-track {
  height: 9px;
  margin: 18px 0 12px;
  overflow: hidden;
  border: 1px solid rgba(109, 223, 193, 0.2);
  border-radius: 999px;
  background: #071018;
}
.meter-fill, .progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #308b7b, var(--green));
  box-shadow: 0 0 18px rgba(109, 223, 193, 0.4);
}
.storage-resource.warn .meter-fill { background: linear-gradient(90deg, #9b7e3d, var(--yellow)); }
.storage-resource.blocked .meter-fill { background: linear-gradient(90deg, var(--orange), var(--red)); }
.storage-note { color: var(--muted); font-size: 0.72rem; }

.resource-item { display: flex; align-items: center; gap: 10px; }
.resource-icon {
  display: grid;
  flex: 0 0 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--green);
  font-family: ui-monospace, monospace;
  font-weight: 900;
  background: var(--green-dim);
}
.resource-icon.gold { color: var(--gold); border-color: rgba(231, 189, 104, 0.4); background: var(--gold-dim); }
.resource-icon.blocked { color: var(--red); border-color: rgba(255, 122, 121, 0.35); background: var(--red-dim); }
.resource-icon.neutral { color: var(--blue); background: rgba(27, 55, 70, 0.72); }
.resource-copy { display: grid; gap: 4px; min-width: 0; }
.resource-title { color: var(--muted); font-size: 0.7rem; }
.resource-copy strong { font-size: 0.83rem; }
.resource-copy code { overflow: hidden; color: #66818b; font-size: 0.6rem; text-overflow: ellipsis; }

.mission-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mission-card {
  position: relative;
  display: flex;
  min-height: 330px;
  padding: 20px;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(155deg, rgba(16, 35, 50, 0.96), rgba(7, 17, 24, 0.98));
  box-shadow: var(--shadow);
}
.mission-card::after {
  position: absolute;
  inset: 7px;
  pointer-events: none;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.025);
  border-radius: 9px;
}
.mission-card.complete { border-color: rgba(231, 189, 104, 0.32); }
.mission-card.blocked { border-color: rgba(255, 122, 121, 0.35); }
.mission-card.locked { opacity: 0.72; border-style: dashed; }
.mission-id { color: var(--muted); font-family: ui-monospace, monospace; font-size: 0.75rem; letter-spacing: 0.15em; }

.badge {
  display: inline-flex;
  max-width: 180px;
  padding: 6px 8px;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: rgba(12, 25, 34, 0.86);
  font-size: 0.68rem;
}
.badge code { color: inherit; opacity: 0.66; font-size: 0.56rem; }
.badge.pass { color: var(--green); border-color: rgba(109, 223, 193, 0.32); background: var(--green-dim); }
.badge.warn { color: var(--yellow); border-color: rgba(231, 189, 104, 0.35); background: var(--gold-dim); }
.badge.blocked { color: var(--red); border-color: rgba(255, 122, 121, 0.35); background: var(--red-dim); }
.badge.muted { color: #aebcc0; }
.badge.neutral { color: var(--blue); }

.mission-progress { margin: 28px 0 14px; }
.progress-header { color: var(--muted); font-size: 0.78rem; }
.progress-header strong { color: var(--text); }
.progress-track { height: 12px; margin-bottom: 7px; }
.progress-percent { color: var(--green); font-family: ui-monospace, monospace; font-size: 0.75rem; }

.blocker-callout {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(255, 122, 121, 0.28);
  border-radius: 9px;
  background: rgba(71, 37, 42, 0.58);
  font-size: 0.77rem;
}
.readiness-summary {
  display: grid;
  gap: 5px;
  margin: 4px 0 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(5, 14, 21, 0.48);
}
.readiness-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 0.7rem; }
.readiness-summary .detail-row { margin-top: 3px; grid-template-columns: 82px 1fr; }
.readiness-summary .detail-row code { text-align: right; }
.blocker-callout span:last-child { color: #cda8a8; }
.blocker-title { color: var(--red); font-size: 0.67rem; font-weight: 800; letter-spacing: 0.1em; }
.detail-row { display: grid; gap: 4px; margin-top: 16px; }
.detail-row span { color: var(--muted); font-size: 0.68rem; }
.detail-row code { overflow-wrap: anywhere; color: var(--text); font-size: 0.68rem; }
.mission-footer { margin-top: auto; padding-top: 16px; color: var(--muted); border-top: 1px solid var(--line); font-size: 0.72rem; }
.mission-footer code { color: #66818b; }
.lock-state { display: grid; margin: auto; place-items: center; color: var(--muted); }
.lock-glyph { color: var(--gold); font-size: 2.4rem; }

.two-column { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 24px; }
.gate-list { display: grid; gap: 8px; }
.gate-row { padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: rgba(5, 14, 21, 0.48); }
.gate-row.pass { border-left: 3px solid var(--green); }
.gate-row.blocked { border-left: 3px solid var(--red); }
.gate-row.overall { margin-top: 5px; background: rgba(10, 24, 32, 0.82); }
.gate-identity { display: flex; align-items: center; gap: 10px; }
.gate-glyph { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 6px; color: var(--green); background: var(--green-dim); }
.blocked .gate-glyph { color: var(--red); background: var(--red-dim); }
.gate-state { display: grid; justify-items: end; gap: 2px; font-size: 0.72rem; }
.gate-state code { max-width: 250px; overflow: hidden; color: var(--muted); font-size: 0.58rem; text-overflow: ellipsis; white-space: nowrap; }

.next-action { display: grid; gap: 13px; }
.action-alert { color: var(--red); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.12em; }
.action-code { color: var(--text); font-size: clamp(1.05rem, 2.4vw, 1.55rem); overflow-wrap: anywhere; }
.action-headline { color: var(--red); font-size: 0.9rem; line-height: 1.5; }
.action-route { display: flex; margin: 5px 0; padding: 0; list-style: none; counter-reset: route; }
.action-route li { position: relative; flex: 1; padding: 27px 5px 0; color: var(--muted); text-align: center; font-size: 0.67rem; counter-increment: route; }
.action-route li::before {
  position: absolute;
  top: 0;
  left: calc(50% - 10px);
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  content: counter(route);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--green);
  background: var(--panel-strong);
  z-index: 1;
}
.action-route li:not(:last-child)::after { position: absolute; top: 10px; left: 60%; width: 80%; height: 1px; content: ""; background: var(--line-strong); }
.action-note { margin: 0; color: var(--muted); font-size: 0.73rem; }

.archive-rune { color: var(--gold); font-size: 2rem; }
.graveyard { display: grid; gap: 12px; }
.grave-card { padding: 15px; border: 1px solid rgba(231, 189, 104, 0.22); border-radius: 10px; background: rgba(31, 29, 23, 0.36); }
.grave-top { justify-content: flex-start; }
.grave-top .badge { margin-left: auto; }
.grave-mark { color: var(--gold); font-family: serif; font-size: 1.5rem; }
.achievement-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 13px 0; }
.achievement { padding: 5px 8px; border: 1px solid rgba(231, 189, 104, 0.24); border-radius: 999px; color: var(--gold); background: var(--gold-dim); font-size: 0.66rem; }
.verdict-reference { color: var(--muted); font-size: 0.68rem; }
.verdict-reference code { color: #9aaeb4; overflow-wrap: anywhere; }

.fatal-error {
  display: flex;
  margin: 60px 0;
  padding: 24px;
  align-items: center;
  gap: 18px;
  border: 1px solid rgba(255, 122, 121, 0.45);
  border-radius: var(--radius);
  background: var(--red-dim);
}
.fatal-error h2 { margin-bottom: 7px; }
.fatal-error p { margin-bottom: 0; color: #d8b3b3; }
.error-icon { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid var(--red); border-radius: 50%; color: var(--red); font-size: 1.4rem; font-weight: 900; }
.hidden { display: none !important; }

.engine-health {
  display: flex;
  margin-bottom: 24px;
  padding: 13px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(10, 24, 32, 0.82);
}
.engine-health-copy { display: flex; align-items: center; gap: 11px; }
.engine-health-copy div { display: grid; gap: 3px; }
.engine-health-copy small { color: var(--muted); }
.engine-health-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 12px currentColor; }
.engine-health.online { color: var(--green); border-color: rgba(109, 223, 193, 0.34); background: var(--green-dim); }
.engine-health.stale { color: var(--yellow); border-color: rgba(231, 189, 104, 0.38); background: var(--gold-dim); }
.engine-health.offline { color: var(--red); border-color: rgba(255, 122, 121, 0.42); background: var(--red-dim); }
.engine-health.online .engine-health-dot { background: var(--green); }
.engine-health.stale .engine-health-dot { background: var(--yellow); }
.engine-health.offline .engine-health-dot { background: var(--red); }

.skeleton-block { min-height: 90px; border-radius: 10px; background: linear-gradient(90deg, rgba(255,255,255,.025), rgba(255,255,255,.055), rgba(255,255,255,.025)); background-size: 200% 100%; animation: pulse 1.4s infinite; }
@keyframes pulse { to { background-position: -200% 0; } }

footer { margin-top: 28px; padding-top: 18px; color: #607780; border-top: 1px solid var(--line); font-size: 0.68rem; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

@media (max-width: 980px) {
  .god-view-primary { grid-template-columns: 1fr; }
  .god-view-grid { grid-template-columns: repeat(2, 1fr); }
  .base-grid { grid-template-columns: repeat(2, 1fr); }
  .watcher-grid { grid-template-columns: repeat(2, 1fr); }
  .mission-grid { grid-template-columns: 1fr; }
  .mission-card { min-height: 280px; }
  .war-room-command { grid-template-columns: 1fr 1fr; }
  .owner-beacon { grid-column: 1 / -1; }
  .frontline-health-lights, .capture-metrics, #empire-health-items { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 720px) {
  .shell { width: min(100% - 24px, 1180px); padding-top: 24px; }
  .command-header { align-items: flex-start; flex-direction: column; }
  .engine-health { align-items: flex-start; flex-direction: column; }
  .telemetry-times { width: 100%; margin-left: 0; justify-items: start; }
  .two-column { grid-template-columns: 1fr; }
  .god-view { padding: 17px; }
  .god-view-topline { align-items: flex-start; flex-direction: column; }
  .god-view-grid { grid-template-columns: 1fr; }
  .base-grid { grid-template-columns: 1fr; }
  .watcher-grid { grid-template-columns: 1fr; }
  .watcher-message { grid-column: auto; align-items: flex-start; flex-direction: column; }
  .war-room-command, .frontline-health-lights, .capture-metrics, #empire-health-items { grid-template-columns: 1fr 1fr; }
  .lifecycle-hud, .empire-health-row { align-items: stretch; flex-direction: column; }
  .lifecycle-hud ol { display: grid; grid-template-columns: repeat(3, 1fr); }
  .panel { padding: 17px; }
  .panel::before { margin: -17px 0 15px; }
  .gate-state code { max-width: 150px; }
  footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
