/* ORBIT H01 — deep-night orbital lab. Manrope-driven, restrained. */
:root {
  --navy-0: #060b14;
  --navy-1: #0a1526;
  --navy-2: #10233f;
  --ink: #dfe7f2;
  --ink-dim: #8fa3bd;
  --cyan: #62d8e6;
  --gold: #d8a95c;
  --line: rgba(140, 170, 205, .22);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: "Manrope", "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", "Noto Sans CJK SC", sans-serif;
  background: var(--navy-0);
  color: var(--ink);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
/* canvas region is assigned by app.js layout(): position/size come from the
   free viewport area that the text panel, legend and dock do not occupy. */
#stage { position: fixed; left: 0; top: 0; display: block; touch-action: none; cursor: grab; }
#stage:active { cursor: grabbing; }

/* orbit ticks: precise corner scale marks */
.orbit-tick {
  position: fixed; width: 120px; height: 120px; pointer-events: none; opacity: .5;
  background:
    linear-gradient(var(--line), var(--line)) top left/36px 1px no-repeat,
    linear-gradient(var(--line), var(--line)) top left/1px 36px no-repeat;
}
.top-left { top: 20px; left: 22px; }
.top-right { top: 20px; right: 22px; transform: scaleX(-1); }

/* left typography column */
.panel {
  position: fixed; left: clamp(22px, 5vw, 72px); top: 50%;
  transform: translateY(-50%);
  width: min(400px, 38vw);
  z-index: 2; pointer-events: none;
}
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 4.2rem; }
.brand-mark {
  width: 14px; height: 14px; border-radius: 50%;
  border: 1px solid var(--cyan);
  box-shadow: inset 0 0 0 3px rgba(98,216,230,.12);
}
.brand-name { letter-spacing: .42em; font-weight: 600; font-size: 13px; color: var(--ink-dim); }
.brand-sub { color: var(--gold); font-weight: 400; }

.title { font-size: clamp(34px, 4.2vw, 54px); font-weight: 300; letter-spacing: .04em; line-height: 1.12; }
.title::after {
  content: ""; display: block; margin-top: 1.1rem; width: 56px; height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}
.model { margin-top: .9rem; font-size: 12px; letter-spacing: .34em; color: var(--ink-dim); }
.lede {
  margin-top: 1.8rem; font-size: 14.5px; line-height: 1.85; color: var(--ink-dim);
  max-width: 34em; font-weight: 300;
}
.specs { margin-top: 2.4rem; display: grid; gap: 1.05rem; }
.spec { border-left: 1px solid var(--line); padding-left: 14px; }
.spec dt { font-size: 12px; letter-spacing: .22em; color: var(--cyan); font-weight: 500; }
.spec dd { margin-top: .3rem; font-size: 13.5px; color: var(--ink); font-weight: 300; line-height: 1.5; }
.foot { margin-top: 2.6rem; font-size: 11.5px; letter-spacing: .18em; color: #5c7089; }

/* legend (visible when exploded) */
.legend {
  position: fixed; right: clamp(20px, 4vw, 64px); top: 50%;
  transform: translateY(-50%) translateX(12px); opacity: 0;
  z-index: 2; pointer-events: none;
  transition: opacity .55s ease, transform .55s ease;
  background: rgba(8, 15, 28, .58);
  border: 1px solid var(--line);
  backdrop-filter: blur(6px);
  padding: 18px 22px 16px; border-radius: 2px;
  max-width: 250px;
}
.legend.show { opacity: 1; transform: translateY(-50%); }
.legend[hidden] { display: none; }
.legend-h { font-size: 11px; letter-spacing: .3em; color: var(--gold); font-weight: 500; margin-bottom: 12px; }
.legend-list { list-style: none; display: grid; gap: 8px; }
.legend-list li { display: flex; gap: 10px; align-items: baseline; font-size: 12.5px; color: var(--ink-dim); }
.legend-list li i {
  font-style: normal; color: var(--cyan); font-variant-numeric: tabular-nums; letter-spacing: .1em;
}
.legend-list li em { font-style: normal; color: #51677f; font-size: 11px; }

/* floating instrument dock */
.dock {
  position: fixed; left: 50%; bottom: clamp(18px, 4.5vh, 42px);
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px;
  z-index: 3;
  background: rgba(9, 17, 30, .72);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  padding: 8px 10px; border-radius: 3px;
}
.dock-btn {
  appearance: none; border: 1px solid transparent; background: none;
  color: var(--ink-dim); font: inherit; font-size: 12.5px; letter-spacing: .14em;
  padding: 9px 16px; cursor: pointer; border-radius: 2px;
  transition: color .25s, border-color .25s, background-color .25s;
  display: inline-flex; align-items: center; gap: 9px;
}
.dock-btn:hover { color: var(--ink); }
.dock-btn:focus-visible { outline: 1px solid var(--cyan); outline-offset: 2px; }
.dock-btn.primary {
  color: var(--ink); border-color: rgba(98,216,230,.45); background: rgba(98,216,230,.07);
}
.dock-btn.primary[aria-pressed="true"] {
  background: rgba(98,216,230,.16); border-color: var(--cyan);
}
.dock-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--ink-dim);
  box-shadow: 0 0 0 3px rgba(98,216,230,.1);
}
.dock-btn.primary[aria-pressed="true"] .dock-dot { background: var(--cyan); }
.dock-sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.dock-btn.lang { padding: 9px 13px; letter-spacing: .05em; }
.dock-btn.lang[aria-pressed="true"] { color: var(--cyan); }

.status {
  position: fixed; right: 26px; bottom: 24px; z-index: 2;
  font-size: 11px; letter-spacing: .26em; color: #4d6077; pointer-events: none;
}

/* A fixed legend slot below the model keeps both page states identical. */
.legend { right: auto; max-width: none; max-height: 112px; overflow-y: auto;
  padding: 12px 16px; pointer-events: auto; transform: translateY(8px); }
.legend.show { transform: none; }
.legend-h { margin-bottom: 8px; }
.legend-list { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.legend-list li { font-size: 11px; }

@media (max-width: 860px) {
  .panel { top: auto; bottom: 120px; transform: none; width: calc(100% - 44px); left: 22px; pointer-events: none; }
  .brand { margin-bottom: 1.6rem; }
  .lede { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; }
  .specs { display: none; }
  .foot { display: none; }
  .title { font-size: 30px; }
  .legend { right: auto; max-width: none; max-height: 96px; padding: 8px 12px; transform: translateY(8px); }
  .legend-list { gap: 4px 12px; }
  .legend-list li { font-size: 10px; }
  .legend-list li i { display: none; }
  .legend.show { transform: none; }
  .orbit-tick { width: 70px; height: 70px; opacity: .3; }
  .status { display: none; }
  .dock { bottom: 20px; width: max-content; max-width: calc(100vw - 32px); flex-wrap: wrap; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .legend { transition: none; }
}
