:root {
  --bg: #03080d;
  --bg-2: #07121a;
  --ink: #e5f6f9;
  --ink-soft: #b2c8ce;
  --muted: #6f8992;
  --faint: #445b63;
  --cyan: #65e9ff;
  --cyan-soft: #9ff4ff;
  --teal: #2dc7cf;
  --amber: #ffbc69;
  --magenta: #b38cff;
  --line: rgba(126, 227, 243, 0.14);
  --line-strong: rgba(126, 227, 243, 0.28);
  --glass: rgba(5, 16, 22, 0.76);
  --glass-deep: rgba(3, 11, 16, 0.91);
  --display: "Bahnschrift", "DIN Alternate", "Segoe UI Variable Display", "Microsoft YaHei", sans-serif;
  --sans: "Segoe UI Variable Text", "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  --mono: "Cascadia Code", "SFMono-Regular", "Consolas", monospace;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  user-select: none;
}

button {
  color: inherit;
  font: inherit;
}

button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible {
  outline: 1px solid var(--cyan);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

#app {
  position: fixed;
  inset: 0;
  isolation: isolate;
  background:
    radial-gradient(120% 80% at 70% -15%, rgba(24, 86, 100, 0.18), transparent 55%),
    radial-gradient(75% 60% at 15% 100%, rgba(14, 61, 74, 0.16), transparent 60%),
    #03080d;
}

#scene-container {
  position: absolute;
  inset: 0;
  z-index: 0;
}

#scene-container canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  cursor: grab;
}

#scene-container canvas:active {
  cursor: grabbing;
}

.ambient-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(1, 6, 9, 0.8) 0%, transparent 16%, transparent 72%, rgba(1, 6, 9, 0.7) 100%),
    radial-gradient(150% 95% at 50% 48%, transparent 45%, rgba(1, 6, 10, 0.5) 100%);
}

.ambient-grain {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.85'/%3E%3C/svg%3E");
}

.scanlines {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: screen;
  background: repeating-linear-gradient(
    180deg,
    transparent 0,
    transparent 3px,
    rgba(127, 236, 255, 0.14) 4px,
    transparent 5px
  );
}

/* ---------------- Top bar ---------------- */

.topbar {
  position: absolute;
  z-index: 30;
  top: 0;
  left: 0;
  right: 0;
  min-height: 104px;
  padding: calc(22px + env(safe-area-inset-top)) 26px 28px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(2, 7, 11, 0.92) 0%, rgba(2, 7, 11, 0.55) 55%, transparent 100%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  pointer-events: auto;
}

.brand-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  color: var(--cyan);
  filter: drop-shadow(0 0 12px rgba(101, 233, 255, 0.35));
  animation: markBreathe 5s ease-in-out infinite;
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.brand-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 5px;
  color: #75aab5;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  white-space: nowrap;
}

.eyebrow span {
  color: var(--cyan);
}

.brand h1 {
  margin: 0;
  color: #e9f9fc;
  font-family: var(--display);
  font-size: clamp(19px, 1.48vw, 26px);
  font-weight: 450;
  line-height: 1.08;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.brand h1 span {
  color: transparent;
  background: linear-gradient(104deg, #ffffff 4%, #bbf7ff 45%, #6bdff4 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.brand-sub {
  margin: 6px 0 0;
  color: #627c84;
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.2;
  letter-spacing: 0.1em;
}

.brand-sub b {
  margin: 0 5px;
  color: #3f5a62;
  font-weight: 400;
}

.head-status {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  justify-content: flex-end;
  pointer-events: auto;
  padding-top: 3px;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 31px;
  padding: 0 11px;
  border: 1px solid rgba(101, 233, 255, 0.19);
  background: rgba(8, 28, 35, 0.56);
  color: #bcecf4;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.11em;
  white-space: nowrap;
  transition: border-color .3s, background .3s;
}

.status-pill em {
  padding-left: 8px;
  border-left: 1px solid rgba(101, 233, 255, 0.16);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0.04em;
}

.status-pill.paused {
  border-color: rgba(255, 188, 105, 0.3);
  background: rgba(40, 29, 15, 0.4);
}

.status-pill.paused .pulse-dot {
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
  animation: none;
}

.pulse-dot {
  position: relative;
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: #5ff8c8;
  box-shadow: 0 0 8px rgba(95, 248, 200, 0.9);
  animation: dotPulse 2s ease-out infinite;
}

.head-metric {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  height: 31px;
  min-width: 72px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.head-metric-label {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.head-metric strong {
  color: #c9ecf2;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.head-metric small {
  margin-left: 1px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 400;
}

.sim-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 31px;
  padding: 0 10px;
  border: 1px solid rgba(255, 188, 105, 0.31);
  background: rgba(44, 31, 16, 0.35);
  color: #ffd49a;
  font-size: 9px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.sim-badge svg {
  width: 12px;
  height: 12px;
}

/* ---------------- Side navigation ---------------- */

.side-nav {
  position: absolute;
  z-index: 25;
  left: 24px;
  top: 118px;
  width: 220px;
  padding: 14px 12px 12px;
  border: 1px solid rgba(126, 227, 243, 0.12);
  background:
    linear-gradient(155deg, rgba(9, 25, 33, 0.82) 0%, rgba(4, 13, 19, 0.7) 100%);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(207, 250, 255, 0.04);
  backdrop-filter: blur(18px) saturate(115%);
  transition: transform .5s var(--ease), opacity .35s;
}

.side-nav::before,
.side-nav::after,
.detail-panel::before,
.help-card::before {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  pointer-events: none;
  border-color: rgba(101, 233, 255, 0.62);
  border-style: solid;
}

.side-nav::before {
  top: -1px;
  left: -1px;
  border-width: 1px 0 0 1px;
}

.side-nav::after {
  right: -1px;
  bottom: -1px;
  border-width: 0 1px 1px 0;
}

.nav-heading {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 1px 5px 11px;
  color: #5b7c85;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.13em;
  border-bottom: 1px solid rgba(126, 227, 243, 0.09);
}

.nav-heading span:last-child {
  color: #45616a;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0 10px;
}

.nav-item {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 10px;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 37px;
  padding: 6px 7px;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background .25s, border-color .25s, color .25s;
}

.nav-item:hover {
  background: rgba(109, 226, 244, 0.055);
  border-color: rgba(109, 226, 244, 0.1);
}

.nav-item.is-active {
  border-color: rgba(101, 233, 255, 0.19);
  background: linear-gradient(90deg, rgba(55, 176, 193, 0.16), rgba(55, 176, 193, 0.025));
}

.nav-item.is-active::before {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: -1px;
  width: 1px;
  background: var(--cyan);
  box-shadow: 0 0 9px var(--cyan);
}

.nav-num {
  color: #4f7079;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  transition: color .25s;
}

.nav-label {
  overflow: hidden;
  color: #90aab2;
  font-size: 11px;
  line-height: 1.3;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: color .25s;
}

.nav-state {
  width: 5px;
  height: 5px;
  justify-self: end;
  border-radius: 50%;
  background: #324850;
  transition: background .3s, box-shadow .3s;
}

.nav-item.is-active .nav-num {
  color: var(--cyan);
}

.nav-item.is-active .nav-label {
  color: #e5fbff;
}

.nav-item.is-active .nav-state {
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(101, 233, 255, .85);
  animation: dotPulse 1.8s ease-out infinite;
}

.nav-item.is-done .nav-state {
  background: #58d9a7;
  box-shadow: 0 0 5px rgba(88, 217, 167, .4);
}

.nav-item.is-selected:not(.is-active) {
  border-color: rgba(101, 233, 255, 0.12);
  background: rgba(101, 233, 255, 0.04);
}

.nav-item.is-selected .nav-label {
  color: #d6f6fa;
}

.nav-footer {
  padding: 10px 5px 1px;
  border-top: 1px solid rgba(126, 227, 243, 0.09);
}

.nav-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #587078;
  font-size: 9px;
  letter-spacing: .04em;
}

.nav-footer-row strong {
  color: #b7e9ef;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
}

.nav-footer-sub {
  margin-top: 7px;
  color: #47616a;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: .05em;
}

.nav-progress {
  height: 2px;
  overflow: hidden;
  margin: 9px 0 0;
  background: rgba(126, 227, 243, 0.08);
}

.nav-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #2c9aab, var(--cyan));
  box-shadow: 0 0 7px rgba(101, 233, 255, .55);
  transition: width .3s linear;
}

.mobile-nav-toggle {
  display: none;
  position: absolute;
  z-index: 35;
  top: 92px;
  left: 16px;
  width: 38px;
  height: 34px;
  padding: 9px;
  border: 1px solid var(--line-strong);
  background: rgba(4, 15, 21, .82);
  cursor: pointer;
}

.mobile-nav-toggle span {
  display: block;
  height: 1px;
  margin: 4px 0;
  background: var(--cyan-soft);
}

/* ---------------- 3D labels ---------------- */

.station-tags {
  position: absolute;
  z-index: 14;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.station-tag {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 9px 0 7px;
  border: 1px solid rgba(124, 221, 236, 0.2);
  background: rgba(3, 13, 18, 0.73);
  box-shadow: 0 7px 22px rgba(0, 0, 0, .3), inset 0 0 18px rgba(59, 185, 203, .03);
  backdrop-filter: blur(8px);
  color: #9dc3cb;
  font-size: 9.5px;
  letter-spacing: .02em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
  transform: translate(-50%, -100%);
  transition: color .25s, border-color .25s, background .25s, opacity .25s, box-shadow .25s;
}

.station-tag::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  width: 1px;
  height: 9px;
  background: linear-gradient(180deg, rgba(123, 227, 243, .45), transparent);
}

.station-tag:hover,
.station-tag.is-selected {
  color: #effdff;
  border-color: rgba(101, 233, 255, .52);
  background: rgba(6, 23, 30, .9);
  box-shadow: 0 0 0 1px rgba(101, 233, 255, .06), 0 10px 30px rgba(0, 0, 0, .42);
}

.station-tag.is-active {
  color: #f0feff;
  border-color: rgba(101, 233, 255, .55);
  background: linear-gradient(90deg, rgba(11, 43, 52, .94), rgba(5, 20, 27, .9));
  box-shadow: 0 0 22px rgba(55, 196, 218, .14);
}

.station-tag .tag-num {
  color: #557e86;
  font-family: var(--mono);
  font-size: 7.5px;
}

.station-tag.is-active .tag-num {
  color: var(--cyan);
}

.station-tag .tag-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #46636b;
}

.station-tag.is-active .tag-dot {
  background: var(--cyan);
  box-shadow: 0 0 7px var(--cyan);
  animation: dotPulse 1.7s ease-out infinite;
}

.station-tag.is-done .tag-dot {
  background: #62d9af;
}

.station-tag.is-occluded {
  opacity: .28;
}

.station-tag.is-hidden {
  opacity: 0;
  pointer-events: none;
}

/* ---------------- Detail panel ---------------- */

.detail-panel {
  position: absolute;
  z-index: 32;
  top: 106px;
  right: 24px;
  bottom: 110px;
  width: 342px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(126, 227, 243, 0.15);
  background:
    linear-gradient(165deg, rgba(8, 22, 29, 0.93), rgba(3, 11, 16, 0.87) 60%);
  box-shadow: 0 35px 90px rgba(0, 0, 0, .36), inset 0 1px 0 rgba(210, 252, 255, .04);
  backdrop-filter: blur(22px) saturate(120%);
  transition: transform .48s var(--ease), opacity .35s ease;
}

.detail-panel::before {
  top: -1px;
  right: -1px;
  border-width: 1px 1px 0 0;
}

.detail-panel::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(101, 233, 255, .5), transparent);
  pointer-events: none;
}

.detail-panel.is-closed {
  opacity: 0;
  transform: translateX(calc(100% + 38px));
  pointer-events: none;
}

#detailContent {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.detail-scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
  min-height: 0;
  padding: 20px 20px 22px;
  scrollbar-width: thin;
  scrollbar-color: rgba(103, 211, 228, .22) transparent;
}

.detail-scroll::-webkit-scrollbar {
  width: 4px;
}

.detail-scroll::-webkit-scrollbar-thumb {
  background: rgba(103, 211, 228, .22);
}

.detail-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.detail-overline {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: #5e8a93;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: .14em;
  line-height: 1.3;
}

.detail-overline .live-mark {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #74dbc8;
}

.detail-overline .live-mark::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
}

.detail-close {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid rgba(126, 227, 243, .16);
  background: transparent;
  color: #7799a0;
  font-size: 16px;
  line-height: 20px;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}

.detail-close:hover {
  border-color: var(--line-strong);
  background: rgba(101, 233, 255, .06);
  color: #d9f9fd;
}

.detail-title-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.detail-index {
  padding-top: 3px;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .02em;
}

.detail-title {
  margin: 0;
  color: #effcff;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 450;
  line-height: 1.18;
  letter-spacing: .065em;
}

.detail-en {
  margin: 6px 0 0;
  color: #61828a;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: .11em;
  line-height: 1.4;
}

.detail-tagline {
  margin: 14px 0 0;
  color: #b0cbd1;
  font-size: 11px;
  line-height: 1.7;
}

.sim-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 3px 5px;
  border: 1px solid rgba(255, 188, 105, .24);
  color: #d9ad74;
  font-family: var(--mono);
  font-size: 6.5px;
  letter-spacing: .08em;
  white-space: nowrap;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 9px 10px;
  border: 1px solid rgba(126, 227, 243, .1);
  background: rgba(19, 51, 59, .28);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .05em;
  color: #8eaeb5;
}

.status-line .status-text {
  color: #bdeff4;
}

.status-line .status-time {
  margin-left: auto;
  color: #58747c;
}

.status-line .mini-spinner {
  width: 9px;
  height: 9px;
  border: 1px solid rgba(101, 233, 255, .22);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 1.1s linear infinite;
}

.stage-progress {
  margin-top: 13px;
}

.stage-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #6c8d95;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: .09em;
}

.stage-progress-head b {
  color: #b7f0f5;
  font-size: 9px;
  font-weight: 400;
}

.thin-bar {
  height: 2px;
  margin-top: 7px;
  overflow: hidden;
  background: rgba(118, 227, 243, .1);
}

.thin-bar i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, rgba(53, 204, 217, .45), var(--cyan));
  box-shadow: 0 0 6px rgba(101, 233, 255, .45);
  transition: width .3s linear;
}

.detail-description {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(126, 227, 243, .09);
  color: #78969d;
  font-size: 10.5px;
  line-height: 1.78;
}

.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 9px;
  color: #5a7a83;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: .13em;
}

.section-label span:last-child {
  color: #3f5961;
  font-size: 6.5px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: rgba(126, 227, 243, .08);
}

.metric-tile {
  min-height: 59px;
  padding: 9px 10px 8px;
  background: rgba(5, 17, 23, .86);
}

.metric-label {
  overflow: hidden;
  color: #65848c;
  font-size: 8.5px;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.metric-value {
  margin-top: 5px;
  color: #dcf7fa;
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.02em;
}

.metric-value small {
  margin-left: 2px;
  color: #6b969e;
  font-family: var(--sans);
  font-size: 7px;
  letter-spacing: 0;
}

.metric-flash {
  animation: dataFlash .55s ease;
}

.process-list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 1px 0;
}

.process-step {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 3px 0;
  color: #547078;
  font-size: 9.5px;
  letter-spacing: .02em;
}

.process-step::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 19px;
  bottom: -11px;
  left: 5px;
  width: 1px;
  background: rgba(117, 225, 240, .1);
}

.process-step:last-child::before {
  display: none;
}

.step-node {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 11px;
  height: 11px;
  border: 1px solid #38545c;
  border-radius: 50%;
  background: #061117;
  color: #3b5961;
  font-family: var(--mono);
  font-size: 6px;
}

.process-step.is-done {
  color: #8eb6bc;
}

.process-step.is-done .step-node {
  border-color: rgba(93, 224, 173, .5);
  color: #69d9af;
}

.process-step.is-current {
  color: #e0fbff;
}

.process-step.is-current .step-node {
  border-color: var(--cyan);
  color: #041015;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(101, 233, 255, .55);
}

.step-time {
  color: #405b62;
  font-family: var(--mono);
  font-size: 7px;
}

.process-step.is-current .step-time {
  color: #7cdce8;
}

.param-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.param-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  min-height: 28px;
  padding: 6px 0;
  border-bottom: 1px dotted rgba(126, 227, 243, .1);
  font-size: 9.5px;
}

.param-row:last-child {
  border-bottom: 0;
}

.param-row span {
  color: #617e86;
}

.param-row b {
  color: #b4d5da;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 400;
  text-align: right;
}

.detail-callout {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding: 10px;
  border-left: 1px solid rgba(255, 188, 105, .4);
  background: linear-gradient(90deg, rgba(68, 47, 22, .2), transparent);
  color: #967e61;
  font-size: 8px;
  line-height: 1.6;
}

.detail-callout b {
  display: block;
  margin-bottom: 2px;
  color: #c9a678;
  font-family: var(--mono);
  font-size: 6.5px;
  font-weight: 500;
  letter-spacing: .1em;
}

.detail-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(126, 227, 243, .09);
  color: #456169;
  font-family: var(--mono);
  font-size: 6.5px;
  letter-spacing: .07em;
}

.detail-footer button {
  padding: 5px 8px;
  border: 1px solid rgba(126, 227, 243, .15);
  background: transparent;
  color: #7b9ba2;
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: .03em;
  cursor: pointer;
  transition: all .2s;
}

.detail-footer button:hover {
  border-color: rgba(101, 233, 255, .35);
  color: var(--cyan-soft);
}

.panel-restore {
  position: absolute;
  z-index: 26;
  right: 24px;
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(126, 227, 243, .2);
  background: rgba(4, 15, 21, .78);
  color: #9cc4cb;
  font-size: 9px;
  letter-spacing: .06em;
  cursor: pointer;
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(7px);
  transition: opacity .3s, transform .3s, color .2s, border-color .2s;
}

.panel-restore.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.panel-restore:hover {
  border-color: rgba(101, 233, 255, .4);
  color: var(--cyan-soft);
}

.panel-restore svg {
  width: 14px;
  height: 14px;
}

/* ---------------- Overview panel ---------------- */

.overview-hero {
  position: relative;
  margin-top: 15px;
  padding: 13px 13px 12px;
  border: 1px solid rgba(101, 233, 255, .15);
  background:
    radial-gradient(130% 160% at 95% 0%, rgba(59, 194, 211, .12), transparent 55%),
    linear-gradient(135deg, rgba(13, 36, 43, .7), rgba(4, 15, 21, .5));
}

.overview-hero::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 10px;
  width: 28px;
  height: 28px;
  border-top: 1px solid rgba(101, 233, 255, .35);
  border-right: 1px solid rgba(101, 233, 255, .35);
}

.overview-kicker {
  color: #5c8c95;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: .13em;
}

.overview-stage {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 8px;
}

.overview-stage b {
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -.04em;
}

.overview-stage span {
  color: #ddf8fb;
  font-size: 13px;
  letter-spacing: .04em;
}

.overview-meta {
  margin-top: 10px;
  color: #6d8a92;
  font-size: 9px;
  line-height: 1.5;
}

.overview-meta b {
  color: #aacfd5;
  font-family: var(--mono);
  font-weight: 400;
}

.timeline-strip {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 3px;
  margin-top: 13px;
}

.timeline-strip i {
  display: block;
  height: 2px;
  background: rgba(115, 221, 237, .13);
}

.timeline-strip i.is-done {
  background: rgba(85, 204, 175, .5);
}

.timeline-strip i.is-active {
  background: var(--cyan);
  box-shadow: 0 0 7px rgba(101, 233, 255, .55);
}

.overview-flow {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 13px;
  padding: 8px 0;
  border-top: 1px solid rgba(126, 227, 243, .09);
  border-bottom: 1px solid rgba(126, 227, 243, .09);
  overflow: hidden;
}

.overview-flow span {
  color: #617f87;
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: .03em;
  white-space: nowrap;
}

.overview-flow i {
  flex: 1;
  min-width: 4px;
  height: 1px;
  background: rgba(101, 233, 255, .18);
}

.overview-heading {
  margin: 16px 0 8px;
  color: #c3e4e8;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 450;
  letter-spacing: .09em;
}

.overview-list {
  display: flex;
  flex-direction: column;
}

.overview-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 27px;
  border-bottom: 1px dotted rgba(126, 227, 243, .09);
  color: #66838b;
  font-size: 9px;
}

.overview-line b {
  color: #a9cbd0;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 400;
}

.overview-line .good {
  color: #70dbb7;
}

.overview-tip {
  display: flex;
  gap: 8px;
  margin-top: 15px;
  padding: 10px;
  border: 1px solid rgba(126, 227, 243, .1);
  background: rgba(15, 40, 47, .24);
  color: #6f8d94;
  font-size: 8.5px;
  line-height: 1.7;
}

.overview-tip .tip-icon {
  flex: 0 0 auto;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.2;
}

/* ---------------- Scene labels / bottom ---------------- */

.scene-chips {
  position: absolute;
  z-index: 20;
  left: 25px;
  bottom: 63px;
  display: flex;
  align-items: center;
  gap: 13px;
  color: #527079;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: .05em;
  pointer-events: none;
}

.scene-chips span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.chip-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.chip-dot.cyan {
  color: var(--cyan);
  box-shadow: 0 0 5px var(--cyan);
}

.chip-dot.amber {
  color: var(--amber);
  box-shadow: 0 0 5px var(--amber);
}

.interaction-hint {
  position: absolute;
  z-index: 20;
  left: 25px;
  bottom: 27px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6a858d;
  font-size: 8.5px;
  letter-spacing: .025em;
  pointer-events: none;
}

.mouse-icon {
  position: relative;
  width: 12px;
  height: 17px;
  border: 1px solid #64858d;
  border-radius: 7px;
}

.mouse-icon i {
  position: absolute;
  top: 3px;
  left: 4.5px;
  width: 1px;
  height: 4px;
  background: var(--cyan);
  animation: mouseScroll 1.9s ease-in-out infinite;
}

.bottom-dock {
  position: absolute;
  z-index: 24;
  left: 50%;
  bottom: 23px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 20px;
  width: min(710px, calc(100vw - 620px));
  min-width: 480px;
  padding: 11px 14px;
  border: 1px solid rgba(126, 227, 243, .13);
  background: linear-gradient(160deg, rgba(7, 21, 28, .88), rgba(3, 12, 17, .8));
  box-shadow: 0 22px 60px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(218, 252, 255, .035);
  backdrop-filter: blur(18px);
}

.dock-progress {
  flex: 1 1 auto;
  min-width: 130px;
}

.dock-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #54757d;
  font-family: var(--mono);
  font-size: 6.5px;
  letter-spacing: .11em;
}

.dock-kicker b {
  margin-left: auto;
  color: #7ddde9;
  font-size: 7px;
  font-weight: 400;
}

.dock-stage {
  margin-top: 5px;
  overflow: hidden;
  color: #c4e6eb;
  font-size: 9.5px;
  letter-spacing: .03em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dock-bar {
  height: 2px;
  margin-top: 7px;
  background: rgba(126, 227, 243, .1);
}

.dock-bar i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #2d9ead, var(--cyan));
  box-shadow: 0 0 6px rgba(101, 233, 255, .5);
}

.dock-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.dock-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 29px;
  padding: 0 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #758f96;
  font-size: 8px;
  letter-spacing: .03em;
  white-space: nowrap;
  cursor: pointer;
  transition: color .2s, background .2s, border-color .2s;
}

.dock-btn svg {
  width: 13px;
  height: 13px;
}

.dock-btn:hover {
  border-color: rgba(101, 233, 255, .16);
  background: rgba(101, 233, 255, .05);
  color: #d3f6fa;
}

.dock-btn.is-on {
  border-color: rgba(101, 233, 255, .2);
  background: rgba(101, 233, 255, .08);
  color: var(--cyan);
}

.dock-btn.icon-only {
  width: 28px;
  padding: 0;
  justify-content: center;
}

.dock-clock {
  flex: 0 0 auto;
  padding-left: 14px;
  border-left: 1px solid var(--line);
  text-align: right;
}

.dock-clock span {
  display: block;
  color: #b9e8ed;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .05em;
}

.dock-clock small {
  display: block;
  margin-top: 3px;
  color: #4e6d74;
  font-family: var(--mono);
  font-size: 5.8px;
  letter-spacing: .09em;
}

.sim-disclaimer {
  position: absolute;
  z-index: 20;
  right: 25px;
  bottom: 25px;
  width: 285px;
  padding-left: 9px;
  border-left: 1px solid rgba(255, 188, 105, .3);
  color: #596f72;
  font-size: 7.5px;
  line-height: 1.6;
  letter-spacing: .02em;
  pointer-events: none;
}

.disclaimer-mark {
  display: inline-block;
  margin-right: 4px;
  color: #b58c59;
  font-family: var(--mono);
  font-size: 6.5px;
  letter-spacing: .09em;
}

.tooltip {
  position: absolute;
  z-index: 45;
  max-width: 190px;
  padding: 6px 8px;
  border: 1px solid rgba(101, 233, 255, .24);
  background: rgba(3, 13, 18, .94);
  color: #c9eff4;
  font-size: 8px;
  line-height: 1.4;
  pointer-events: none;
  opacity: 0;
  transform: translate(12px, -120%);
  transition: opacity .12s;
}

.tooltip.is-visible {
  opacity: 1;
}

/* ---------------- Help card ---------------- */

.help-card {
  position: absolute;
  z-index: 60;
  top: 50%;
  left: 50%;
  width: min(440px, calc(100vw - 36px));
  padding: 18px;
  border: 1px solid rgba(126, 227, 243, .2);
  background: rgba(4, 15, 21, .96);
  box-shadow: 0 40px 100px rgba(0, 0, 0, .5);
  backdrop-filter: blur(24px);
  transform: translate(-50%, -50%);
  animation: fadePop .25s var(--ease);
}

.help-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: #81a4ac;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: .12em;
}

.help-head button {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #8caab1;
  font-size: 17px;
  cursor: pointer;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.help-grid div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(126, 227, 243, .07);
  background: rgba(17, 45, 53, .2);
}

.help-grid kbd {
  color: #bdeaf0;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 400;
}

.help-grid span {
  color: #65838a;
  font-size: 8px;
}

.help-card p {
  margin: 14px 0 0;
  color: #526d74;
  font-size: 7.5px;
  line-height: 1.6;
}

/* ---------------- Loading ---------------- */

.loading-screen {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(60% 60% at 50% 43%, rgba(18, 68, 80, .2), transparent 70%),
    #02070b;
  transition: opacity .8s ease, visibility .8s ease;
}

.loading-screen.is-done {
  opacity: 0;
  visibility: hidden;
}

.loading-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .28;
  background-image:
    linear-gradient(rgba(82, 179, 196, .12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(82, 179, 196, .12) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 50% 45%, black, transparent 68%);
}

.loader-inner {
  position: relative;
  width: min(390px, calc(100vw - 48px));
  text-align: center;
}

.loader-orbit {
  position: relative;
  width: 104px;
  height: 104px;
  margin: 0 auto 26px;
  color: var(--cyan);
}

.loader-orbit > svg {
  position: absolute;
  top: 27px;
  left: 27px;
  width: 50px;
  height: 50px;
  filter: drop-shadow(0 0 10px rgba(101, 233, 255, .4));
}

.loader-orbit > span {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(101, 233, 255, .2);
  border-radius: 50%;
  animation: loaderSpin 6s linear infinite;
}

.loader-orbit > span:nth-child(1) {
  border-top-color: var(--cyan);
  animation-duration: 3.5s;
}

.loader-orbit > span:nth-child(2) {
  inset: 12px;
  border-color: rgba(101, 233, 255, .09);
  border-bottom-color: rgba(101, 233, 255, .6);
  animation-duration: 2.3s;
  animation-direction: reverse;
}

.loader-orbit > span:nth-child(3) {
  inset: 24px;
  border-color: transparent;
  border-left-color: rgba(255, 188, 105, .5);
  animation-duration: 4.2s;
}

.loader-eyebrow {
  margin: 0 0 8px;
  color: #5d8f98;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: .17em;
}

.loader-inner h2 {
  margin: 0;
  color: #e0f8fb;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: .09em;
}

.loader-sub {
  margin: 8px 0 25px;
  color: #57737a;
  font-size: 9px;
  letter-spacing: .04em;
}

.loader-bar {
  height: 2px;
  overflow: hidden;
  background: rgba(101, 233, 255, .1);
}

.loader-bar i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #287e8c, var(--cyan), #d1fbff);
  box-shadow: 0 0 12px rgba(101, 233, 255, .55);
  transition: width .35s ease;
}

.loader-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
  color: #4e6970;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: .04em;
}

.loader-status b {
  color: #82cfda;
  font-weight: 400;
}

/* ---------------- Motion ---------------- */

@keyframes markBreathe {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(101, 233, 255, .24)); }
  50% { filter: drop-shadow(0 0 18px rgba(101, 233, 255, .5)); }
}

@keyframes dotPulse {
  0% { box-shadow: 0 0 0 0 rgba(101, 233, 255, .32); }
  70% { box-shadow: 0 0 0 5px rgba(101, 233, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(101, 233, 255, 0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes loaderSpin {
  to { transform: rotate(360deg); }
}

@keyframes mouseScroll {
  0% { transform: translateY(0); opacity: 0; }
  30% { opacity: 1; }
  70% { opacity: .8; }
  100% { transform: translateY(5px); opacity: 0; }
}

@keyframes dataFlash {
  0% { color: var(--cyan); text-shadow: 0 0 8px rgba(101, 233, 255, .6); }
  100% { color: inherit; text-shadow: none; }
}

@keyframes fadePop {
  from { opacity: 0; transform: translate(-50%, -47%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.overview-hero,
.detail-title-row,
.status-line,
.stage-progress,
.detail-description,
.metric-grid,
.process-list,
.param-list {
  animation: fadeSlide .38s var(--ease) both;
}

.detail-title-row { animation-delay: .025s; }
.status-line { animation-delay: .05s; }
.stage-progress { animation-delay: .07s; }
.detail-description { animation-delay: .09s; }
.metric-grid { animation-delay: .11s; }
.process-list { animation-delay: .13s; }
.param-list { animation-delay: .15s; }

/* ---------------- Responsive ---------------- */

@media (max-width: 1280px) {
  .topbar {
    padding: 20px 22px 26px;
  }

  .side-nav {
    left: 20px;
    width: 204px;
  }

  .detail-panel {
    right: 20px;
    width: 318px;
  }

  .bottom-dock {
    width: min(620px, calc(100vw - 560px));
    gap: 12px;
  }

  .dock-btn span {
    display: none;
  }

  .dock-btn {
    width: 29px;
    padding: 0;
    justify-content: center;
  }

  .sim-disclaimer {
    right: 20px;
    width: 255px;
  }

  .interaction-hint {
    left: 21px;
  }

  .scene-chips {
    left: 21px;
  }
}

@media (max-width: 1080px) {
  .head-metric:nth-of-type(2) {
    display: none;
  }

  .side-nav {
    width: 198px;
  }

  .detail-panel {
    width: 306px;
  }

  .sim-disclaimer {
    display: none;
  }

  .station-tag {
    font-size: 8.5px;
    height: 25px;
  }
}

@media (max-width: 900px) {
  .topbar {
    min-height: 83px;
    padding: calc(14px + env(safe-area-inset-top)) 16px 20px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .brand h1 {
    font-size: 18px;
  }

  .eyebrow {
    margin-bottom: 4px;
    font-size: 6.5px;
    letter-spacing: .12em;
  }

  .brand-sub {
    display: none;
  }

  .head-status {
    gap: 6px;
    padding-top: 0;
  }

  .status-pill {
    height: 27px;
    padding: 0 8px;
    font-size: 6.5px;
  }

  .status-pill em {
    display: none;
  }

  .sim-badge {
    height: 27px;
    padding: 0 7px;
    font-size: 7.5px;
  }

  .desktop-only {
    display: none !important;
  }

  .mobile-nav-toggle {
    display: block;
  }

  .side-nav {
    z-index: 40;
    top: 88px;
    left: 14px;
    width: 215px;
    max-height: calc(100dvh - 170px);
    overflow-y: auto;
    transform: translateX(calc(-100% - 24px));
    opacity: 0;
    pointer-events: none;
  }

  .side-nav.is-open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }

  .detail-panel {
    top: auto;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    width: auto;
    height: min(55dvh, 490px);
    z-index: 42;
  }

  .detail-panel.is-closed {
    transform: translateY(calc(100% + 24px));
  }

  .bottom-dock {
    left: 12px;
    right: 12px;
    bottom: calc(14px + env(safe-area-inset-bottom));
    width: auto;
    min-width: 0;
    transform: none;
    justify-content: center;
    padding: 8px 10px;
  }

  .dock-progress,
  .dock-clock {
    display: none;
  }

  .dock-controls {
    justify-content: center;
    width: 100%;
  }

  .dock-btn {
    flex: 1;
    max-width: 150px;
    height: 32px;
  }

  .dock-btn span {
    display: inline;
    font-size: 8px;
  }

  .interaction-hint,
  .scene-chips {
    display: none;
  }

  .panel-restore {
    right: 14px;
    bottom: 65px;
  }

  .station-tags {
    z-index: 11;
  }

  .station-tag {
    height: 23px;
    padding: 0 7px 0 6px;
    font-size: 8px;
  }

  .station-tag::after {
    height: 6px;
  }

  .help-grid {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .help-grid div {
    flex-direction: row;
    justify-content: space-between;
    padding: 7px 8px;
  }

  .loader-inner h2 {
    font-size: 16px;
  }
}

@media (max-width: 620px) {
  .topbar {
    align-items: flex-start;
    gap: 10px;
  }

  .brand {
    gap: 9px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  .brand h1 {
    font-size: 15px;
    letter-spacing: .04em;
  }

  .eyebrow {
    font-size: 5.8px;
    letter-spacing: .08em;
    white-space: normal;
  }

  .head-status {
    flex-direction: column;
    align-items: flex-end;
  }

  .status-pill {
    display: none;
  }

  .sim-badge {
    height: 24px;
    font-size: 7px;
  }

  .sim-badge svg {
    width: 10px;
    height: 10px;
  }

  .mobile-nav-toggle {
    top: 79px;
  }

  .side-nav {
    top: 76px;
    max-height: calc(100dvh - 155px);
  }

  .station-tags {
    display: none;
  }

  .detail-panel {
    height: min(57dvh, 470px);
  }

  .detail-scroll {
    padding: 16px 15px 18px;
  }

  .detail-title {
    font-size: 18px;
  }

  .detail-en {
    font-size: 6.5px;
  }

  .metric-value {
    font-size: 15px;
  }

  .dock-btn span {
    display: none;
  }

  .dock-btn {
    flex: 0 0 42px;
    height: 30px;
  }

  .bottom-dock {
    gap: 0;
  }

  .panel-restore {
    bottom: 57px;
  }

  .help-card {
    max-height: calc(100dvh - 36px);
    overflow-y: auto;
  }

  .loading-screen {
    padding: 20px;
  }
}

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