/* ==========================================================================
   VECTOR // POWERTRAIN — digital twin workbench
   All visual ornament is CSS or generated at runtime. No external assets.
   ========================================================================== */

:root {
  --bg: #03070d;
  --bg-deep: #010306;
  --panel: rgba(7, 17, 28, 0.76);
  --panel-deep: rgba(3, 9, 16, 0.88);
  --text: #eaf8ff;
  --text-soft: #c4d9e6;
  --muted: #728b9f;
  --muted-dim: #4c6171;
  --line: rgba(111, 195, 226, 0.16);
  --line-soft: rgba(119, 191, 219, 0.09);
  --line-bright: rgba(94, 228, 255, 0.48);
  --cyan: #55e6ff;
  --cyan-soft: #2ab9d4;
  --cyan-deep: #0b6578;
  --amber: #ff9c5b;
  --amber-soft: #d97436;
  --orange: #ff6c3c;
  --green: #69e9be;
  --accent: #55e6ff;
  --sans: "Bahnschrift", "DIN Alternate", "Segoe UI Variable Display", "Segoe UI", "Microsoft YaHei UI", sans-serif;
  --cn: "Microsoft YaHei UI", "Microsoft YaHei", "Yu Gothic UI", "PingFang SC", sans-serif;
  --mono: "Cascadia Code", "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --radius-cut: 17px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  color: var(--text);
  background:
    radial-gradient(ellipse at 54% 32%, rgba(18, 53, 76, 0.42), transparent 54%),
    radial-gradient(ellipse at 83% 7%, rgba(162, 74, 31, 0.09), transparent 34%),
    linear-gradient(180deg, #040a12 0%, var(--bg) 52%, #020407 100%);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(rgba(102, 184, 218, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(102, 184, 218, 0.022) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.9), transparent 76%);
}

button {
  padding: 0;
  color: inherit;
  border: 0;
  font: inherit;
}

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

::selection {
  color: #041016;
  background: var(--cyan);
}

#app {
  position: relative;
  width: 100%;
  height: 100%;
  isolation: isolate;
}

/* --------------------------------------------------------------------------
   Scene canvas and atmosphere
   -------------------------------------------------------------------------- */

.scene-shell {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  background: #03070d;
}

#engine-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
  outline: none;
}

#engine-canvas.is-dragging {
  cursor: grabbing;
}

#engine-canvas.is-over-part {
  cursor: pointer;
}

.scene-ambient,
.scene-vignette,
.scene-scanlines,
.scene-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.scene-ambient {
  background:
    radial-gradient(circle at 51% 43%, rgba(34, 151, 185, 0.11), transparent 31%),
    radial-gradient(ellipse at 77% 69%, rgba(255, 111, 45, 0.07), transparent 29%),
    radial-gradient(circle at 17% 23%, rgba(31, 88, 130, 0.14), transparent 37%);
  mix-blend-mode: screen;
}

.scene-vignette {
  background: radial-gradient(
    ellipse at 50% 44%,
    transparent 32%,
    rgba(1, 4, 8, 0.28) 68%,
    rgba(1, 3, 6, 0.9) 100%
  );
}

.scene-scanlines {
  background: repeating-linear-gradient(
    180deg,
    rgba(130, 218, 247, 0.024) 0,
    rgba(130, 218, 247, 0.024) 1px,
    transparent 1px,
    transparent 4px
  );
  mix-blend-mode: overlay;
  opacity: 0.38;
}

.scene-grain {
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 0.5px, transparent 0.7px);
  background-size: 3px 3px;
  mix-blend-mode: soft-light;
  opacity: 0.34;
}

.edge-frame {
  position: absolute;
  inset: 18px;
  pointer-events: none;
  opacity: 0.68;
}

.edge {
  position: absolute;
  width: 34px;
  height: 34px;
  border-color: rgba(115, 211, 239, 0.35);
  border-style: solid;
}

.edge-tl {
  top: 0;
  left: 0;
  border-width: 1px 0 0 1px;
}

.edge-tr {
  top: 0;
  right: 0;
  border-width: 1px 1px 0 0;
}

.edge-bl {
  bottom: 0;
  left: 0;
  border-width: 0 0 1px 1px;
}

.edge-br {
  right: 0;
  bottom: 0;
  border-width: 0 1px 1px 0;
}

/* --------------------------------------------------------------------------
   Top masthead
   -------------------------------------------------------------------------- */

.brandbar {
  position: fixed;
  top: 28px;
  left: 30px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 13px;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.brand-mark {
  position: relative;
  width: 43px;
  height: 43px;
  filter: drop-shadow(0 0 12px rgba(70, 219, 255, 0.26));
}

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

.mark-hex {
  fill: rgba(5, 20, 31, 0.62);
  stroke: rgba(93, 227, 255, 0.7);
  stroke-width: 0.8;
}

.mark-inner {
  fill: none;
  stroke: rgba(93, 227, 255, 0.22);
  stroke-width: 0.7;
}

.mark-blade {
  fill: none;
  stroke: var(--cyan);
  stroke-linecap: round;
  stroke-width: 0.85;
  opacity: 0.75;
}

.mark-core {
  fill: var(--amber);
  filter: drop-shadow(0 0 4px var(--amber));
}

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

.brand-name {
  color: #f2fbff;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.185em;
  line-height: 1;
  white-space: nowrap;
}

.brand-slash {
  margin: 0 8px;
  color: var(--amber);
  font-weight: 400;
  letter-spacing: 0;
}

.brand-sub {
  margin-top: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.24em;
  line-height: 1;
  white-space: nowrap;
}

.brand-sub span {
  color: var(--amber);
}

.assembly-status {
  position: fixed;
  top: 32px;
  left: 50%;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-top: 1px solid rgba(112, 201, 232, 0.2);
  border-bottom: 1px solid rgba(112, 201, 232, 0.08);
  background: linear-gradient(90deg, transparent, rgba(9, 23, 35, 0.7) 14%, rgba(9, 23, 35, 0.7) 86%, transparent);
  font-family: var(--mono);
  transform: translateX(-50%);
  pointer-events: none;
  transition: opacity 0.35s ease, border-color 0.4s ease;
}

.status-wing {
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(105, 215, 244, 0.45));
}

.status-wing:last-child {
  background: linear-gradient(90deg, rgba(105, 215, 244, 0.45), transparent);
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 9px var(--cyan);
  animation: breathe-dot 2.8s ease-in-out infinite;
}

.status-kicker {
  color: var(--muted-dim);
  font-size: 7px;
  letter-spacing: 0.2em;
}

#assembly-state {
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.status-cn {
  color: var(--muted);
  font-family: var(--cn);
  font-size: 9px;
  letter-spacing: 0.12em;
}

body.is-exploded .assembly-status {
  border-top-color: rgba(255, 159, 96, 0.28);
}

body.is-exploded .status-dot {
  background: var(--amber);
  box-shadow: 0 0 9px var(--amber);
  animation-name: breathe-dot-amber;
}

body.is-exploded #assembly-state {
  color: var(--amber);
}

.top-meta {
  position: fixed;
  top: 30px;
  right: 30px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 20px;
  pointer-events: none;
}

.meta-cell {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-left: 11px;
  border-left: 1px solid rgba(114, 196, 224, 0.17);
}

.meta-cell span {
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.18em;
}

.meta-cell b {
  color: #a6c7d8;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.meta-cell em {
  color: var(--muted-dim);
  font-style: normal;
}

.meta-online {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border: 1px solid rgba(107, 218, 180, 0.18);
  color: #83d8bc;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.15em;
}

.meta-online i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 7px var(--green);
}

/* --------------------------------------------------------------------------
   Shared panel language
   -------------------------------------------------------------------------- */

.panel {
  position: fixed;
  z-index: 25;
  top: 124px;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(13, 29, 44, 0.76) 0%, rgba(5, 13, 22, 0.82) 58%, rgba(4, 10, 17, 0.9) 100%);
  box-shadow:
    inset 0 1px 0 rgba(179, 235, 255, 0.055),
    inset 0 0 30px rgba(17, 85, 111, 0.035),
    0 28px 70px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(17px) saturate(125%);
  clip-path: polygon(
    0 0,
    calc(100% - var(--radius-cut)) 0,
    100% var(--radius-cut),
    100% 100%,
    var(--radius-cut) 100%,
    0 calc(100% - var(--radius-cut))
  );
}

.panel::before,
.panel::after {
  position: absolute;
  z-index: 2;
  width: 22px;
  height: 1px;
  content: "";
  pointer-events: none;
  background: linear-gradient(90deg, var(--cyan), transparent);
  opacity: 0.42;
}

.panel::before {
  top: 0;
  left: 18px;
}

.panel::after {
  right: 18px;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(85, 230, 255, 0.28));
}

.panel-left {
  left: 28px;
  display: flex;
  flex-direction: column;
  width: 284px;
  height: calc(100vh - 162px);
  min-height: 482px;
  max-height: 738px;
}

.panel-head {
  position: relative;
  flex: 0 0 auto;
  padding: 21px 20px 15px;
}

.panel-kicker {
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.18em;
  line-height: 1;
}

.panel-kicker span {
  color: var(--cyan-soft);
}

.panel-title {
  margin: 10px 0 0;
  color: #e4f5fd;
  font-family: var(--cn);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0.07em;
  line-height: 1.1;
}

.panel-count {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  margin-left: auto;
  padding-bottom: 1px;
}

.panel-count b {
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 25px;
  font-weight: 300;
  letter-spacing: -0.08em;
  line-height: 0.8;
  text-shadow: 0 0 16px rgba(85, 230, 255, 0.3);
}

.panel-count span {
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.12em;
}

.list-rule {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 20px 10px;
}

.list-rule span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(105, 194, 223, 0.2), transparent);
}

.list-rule i {
  width: 18px;
  height: 4px;
  border-top: 1px solid rgba(103, 222, 250, 0.34);
  border-bottom: 1px solid rgba(103, 222, 250, 0.12);
}

.part-list {
  position: relative;
  min-height: 0;
  padding: 0 9px 0 10px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-color: rgba(74, 163, 192, 0.36) transparent;
  scrollbar-width: thin;
}

.part-list::-webkit-scrollbar {
  width: 3px;
}

.part-list::-webkit-scrollbar-track {
  background: transparent;
}

.part-list::-webkit-scrollbar-thumb {
  background: rgba(74, 163, 192, 0.35);
}

.part-button {
  --part-accent: var(--cyan);
  position: relative;
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 45px;
  padding: 6px 10px 6px 9px;
  border: 1px solid transparent;
  border-left: 1px solid transparent;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    background 0.22s ease,
    border-color 0.22s ease,
    transform 0.22s ease;
}

.part-button::after {
  position: absolute;
  right: 9px;
  bottom: 0;
  left: 9px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, rgba(105, 190, 218, 0.08), rgba(105, 190, 218, 0.035) 68%, transparent);
}

.part-button:hover {
  border-color: rgba(110, 206, 235, 0.09);
  background: linear-gradient(90deg, rgba(34, 151, 181, 0.11), rgba(22, 90, 110, 0.025) 73%, transparent);
  transform: translateX(2px);
}

.part-button:hover .part-index {
  color: var(--part-accent);
}

.part-button.is-selected {
  border-color: rgba(95, 226, 255, 0.16);
  border-left-color: var(--cyan);
  background:
    linear-gradient(90deg, rgba(57, 207, 235, 0.14), rgba(22, 92, 112, 0.035) 72%, transparent);
  box-shadow: inset 0 0 23px rgba(31, 148, 174, 0.045);
}

.part-button.is-selected::after {
  background: linear-gradient(90deg, rgba(83, 229, 255, 0.72), rgba(44, 125, 148, 0.08) 70%, transparent);
}

.part-button.is-hovered:not(.is-selected) {
  background: linear-gradient(90deg, rgba(41, 165, 195, 0.08), transparent 80%);
}

.part-index {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #5e7889;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.part-index::after {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  content: "";
  background: var(--part-accent);
  box-shadow: 0 0 6px color-mix(in srgb, var(--part-accent) 70%, transparent);
  opacity: 0.7;
}

.is-selected .part-index {
  color: var(--cyan);
}

.part-name {
  display: block;
  overflow: hidden;
  color: #bcd4e0;
  font-family: var(--cn);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.035em;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.part-button:hover .part-name,
.part-button.is-selected .part-name {
  color: #f1fbff;
}

.part-meta {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: #4e6576;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.part-mass {
  color: #5d7586;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.part-mass em {
  margin-left: 2px;
  color: #496070;
  font-size: 6px;
  font-style: normal;
}

.part-button.is-selected .part-mass {
  color: var(--cyan);
}

.panel-foot {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin: 9px 10px 10px;
  padding: 12px 10px 10px;
  border-top: 1px solid rgba(98, 180, 209, 0.11);
}

.mass-total span {
  display: block;
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.16em;
}

.mass-total b {
  display: block;
  margin-top: 5px;
  color: #b9d7e5;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1;
}

.mass-total em {
  margin-left: 4px;
  color: var(--muted);
  font-size: 7px;
  font-style: normal;
  letter-spacing: 0.06em;
}

.foot-hint {
  color: #4e6575;
  font-family: var(--cn);
  font-size: 8px;
  letter-spacing: 0.05em;
  text-align: right;
}

.panel-cut {
  position: absolute;
  z-index: 2;
  height: 1px;
  pointer-events: none;
}

.panel-cut-top {
  top: 0;
  left: 52%;
  width: 24%;
  background: linear-gradient(90deg, transparent, rgba(84, 225, 255, 0.28), transparent);
}

.panel-cut-bottom {
  bottom: 0;
  left: 13%;
  width: 35%;
  background: linear-gradient(90deg, transparent, rgba(84, 225, 255, 0.12), transparent);
}

/* --------------------------------------------------------------------------
   Right detail panel
   -------------------------------------------------------------------------- */

.panel-right {
  --accent: var(--cyan);
  right: 28px;
  width: 326px;
  max-height: calc(100vh - 192px);
  overflow: auto;
  scrollbar-width: none;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.panel-right::-webkit-scrollbar {
  display: none;
}

.detail-accent {
  position: absolute;
  top: 0;
  right: 34px;
  left: 34px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 45%, transparent);
  opacity: 0.55;
}

.detail-head {
  display: flex;
  align-items: flex-start;
  padding-bottom: 8px;
}

.detail-head > div {
  min-width: 0;
}

.detail-name {
  margin: 10px 0 0;
  overflow: hidden;
  color: #f0fbff;
  font-family: var(--cn);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-button {
  display: grid;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(108, 192, 219, 0.16);
  background: rgba(8, 22, 33, 0.5);
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background 0.2s ease;
}

.icon-button svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: #7993a4;
  stroke-linecap: round;
  stroke-width: 1.3;
}

.icon-button:hover {
  border-color: rgba(86, 224, 255, 0.46);
  background: rgba(29, 107, 127, 0.15);
}

.icon-button:hover svg {
  stroke: var(--cyan);
}

.detail-close {
  margin-top: 2px;
  margin-left: auto;
}

.panel-right.is-overview .detail-close {
  opacity: 0.2;
  pointer-events: none;
}

.detail-en {
  padding: 0 20px;
  overflow: hidden;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  line-height: 1.3;
  opacity: 0.72;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-mass-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: end;
  margin-top: 17px;
  padding: 15px 20px 16px;
  border-top: 1px solid rgba(106, 186, 214, 0.1);
  border-bottom: 1px solid rgba(106, 186, 214, 0.1);
  background: linear-gradient(90deg, rgba(20, 62, 82, 0.12), transparent 75%);
}

.mass-readout > span {
  display: block;
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.16em;
}

.mass-readout > div {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 4px;
}

.mass-readout strong {
  color: var(--text);
  font-family: var(--mono);
  font-size: 36px;
  font-weight: 300;
  letter-spacing: -0.09em;
  line-height: 1;
}

.mass-readout em {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  font-style: normal;
  letter-spacing: 0.08em;
}

.mass-share {
  padding-bottom: 1px;
}

.share-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.12em;
}

.share-head b {
  color: var(--accent);
  font-size: 7px;
  font-weight: 500;
}

.share-track {
  height: 3px;
  margin-top: 8px;
  background: rgba(105, 182, 210, 0.12);
  overflow: hidden;
}

.share-track i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), rgba(81, 229, 255, 0.2));
  box-shadow: 0 0 9px color-mix(in srgb, var(--accent) 44%, transparent);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.share-note {
  margin-top: 8px;
  color: #4e6576;
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.detail-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 0 20px;
}

.spec-cell {
  min-width: 0;
  padding: 12px 10px 12px 0;
  border-bottom: 1px solid rgba(105, 184, 212, 0.08);
}

.spec-cell:nth-child(odd) {
  border-right: 1px solid rgba(105, 184, 212, 0.08);
}

.spec-cell:nth-child(even) {
  padding-left: 12px;
}

.spec-cell span {
  display: block;
  overflow: hidden;
  color: var(--muted-dim);
  font-family: var(--cn);
  font-size: 8px;
  letter-spacing: 0.06em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spec-cell b {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  color: #bed7e4;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspection-panel {
  position: relative;
  display: none;
  margin: 12px 20px 0;
  padding: 12px;
  border: 1px solid rgba(93, 221, 247, 0.16);
  background:
    linear-gradient(135deg, rgba(36, 134, 155, 0.1), rgba(7, 20, 30, 0.46) 70%);
  box-shadow: inset 0 0 28px rgba(37, 154, 180, 0.035);
}

body.is-focused .panel-right .inspection-panel {
  display: block;
}

.inspection-panel::before {
  position: absolute;
  top: -1px;
  left: 12px;
  width: 42px;
  height: 1px;
  content: "";
  background: var(--accent);
  box-shadow: 0 0 9px color-mix(in srgb, var(--accent) 60%, transparent);
  opacity: 0.75;
}

.panel-right.is-overview .inspection-panel {
  display: none;
}

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

.inspection-kicker {
  display: block;
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.16em;
  line-height: 1;
}

.inspection-head b {
  display: block;
  margin-top: 6px;
  color: #cce6ef;
  font-family: var(--cn);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1;
}

.inspection-exit {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  padding: 5px 6px;
  border: 1px solid rgba(100, 187, 213, 0.16);
  background: rgba(4, 14, 22, 0.4);
  color: #6e8d9c;
  font-family: var(--cn);
  font-size: 7px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.inspection-exit span {
  color: #455f6d;
  font-family: var(--mono);
  font-size: 5px;
}

.inspection-exit:hover {
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
  background: rgba(22, 85, 102, 0.18);
  color: #d6f4fb;
}

.inspection-view-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin-top: 10px;
}

.inspection-view-grid button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  height: 47px;
  padding: 4px 2px 5px;
  border: 1px solid rgba(103, 190, 215, 0.12);
  background: rgba(7, 20, 31, 0.48);
  color: #7091a0;
  cursor: pointer;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.inspection-view-grid svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 0.9;
  opacity: 0.76;
}

.inspection-view-grid button > span {
  font-family: var(--cn);
  font-size: 9px;
  letter-spacing: 0.06em;
  line-height: 1;
}

.inspection-view-grid button > small {
  color: #405966;
  font-family: var(--mono);
  font-size: 5px;
  letter-spacing: 0.06em;
  line-height: 1;
}

.inspection-view-grid button::after {
  position: absolute;
  right: 9px;
  bottom: 2px;
  left: 9px;
  height: 1px;
  content: "";
  background: transparent;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.inspection-view-grid button:hover {
  border-color: rgba(105, 220, 245, 0.28);
  background: rgba(20, 78, 94, 0.18);
  color: #c9edf5;
  transform: translateY(-1px);
}

.inspection-view-grid button.is-active {
  border-color: color-mix(in srgb, var(--accent) 46%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, rgba(7, 20, 31, 0.5));
  color: var(--accent);
}

.inspection-view-grid button.is-active small {
  color: color-mix(in srgb, var(--accent) 58%, #456574);
}

.inspection-view-grid button.is-active::after {
  background: var(--accent);
  box-shadow: 0 0 7px color-mix(in srgb, var(--accent) 60%, transparent);
}

.inspection-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  color: #506d7b;
  font-family: var(--cn);
  font-size: 7px;
  letter-spacing: 0.03em;
  line-height: 1.35;
}

.inspection-status i {
  flex: 0 0 auto;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  animation: breathe-dot 2.8s ease-in-out infinite;
}

.detail-explanation {
  margin: 12px 20px 14px;
  padding-top: 11px;
  border-top: 1px solid rgba(105, 185, 213, 0.1);
}

.explain-row {
  margin-bottom: 9px;
}

.explain-row > span,
.inspection-note > span {
  display: block;
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.14em;
  line-height: 1;
}

.explain-row p {
  margin: 5px 0 0;
  color: #9bb6c4;
  font-family: var(--cn);
  font-size: 10px;
  letter-spacing: 0.015em;
  line-height: 1.65;
}

.explain-row .detail-description {
  margin: 5px 0 0;
  color: #718b99;
  font-family: var(--cn);
  font-size: 10px;
  line-height: 1.75;
  letter-spacing: 0.015em;
}

.inspection-note {
  margin-top: 10px;
  padding: 9px 10px;
  border-left: 1px solid color-mix(in srgb, var(--accent) 48%, transparent);
  background: linear-gradient(90deg, rgba(34, 117, 139, 0.09), transparent);
}

.inspection-note > span {
  color: color-mix(in srgb, var(--accent) 65%, #597887);
}

.inspection-note p {
  margin: 6px 0 0;
  color: #8ca8b6;
  font-family: var(--cn);
  font-size: 9px;
  letter-spacing: 0.015em;
  line-height: 1.65;
}

body.is-focused .panel-right {
  border-color: color-mix(in srgb, var(--accent) 26%, rgba(111, 195, 226, 0.16));
  box-shadow:
    inset 0 1px 0 rgba(179, 235, 255, 0.055),
    inset 0 0 38px color-mix(in srgb, var(--accent) 4%, transparent),
    0 28px 70px rgba(0, 0, 0, 0.38);
}

.detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 20px;
  padding-top: 13px;
  border-top: 1px solid rgba(105, 185, 213, 0.1);
}

.focus-button {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 8px;
  height: 35px;
  padding: 0 10px;
  border: 1px solid rgba(83, 218, 245, 0.23);
  background: rgba(16, 64, 80, 0.17);
  color: #a8d8e6;
  font-family: var(--cn);
  font-size: 9px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.focus-button svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.15;
}

.focus-button span {
  flex: 1;
  text-align: left;
}

.focus-button kbd {
  padding: 2px 4px;
  border: 1px solid rgba(100, 188, 216, 0.2);
  color: #557284;
  font-family: var(--mono);
  font-size: 6px;
  font-weight: 400;
}

.focus-button:hover {
  border-color: rgba(92, 228, 255, 0.55);
  background: rgba(24, 108, 130, 0.23);
  color: #e8faff;
}

.focus-button:disabled {
  opacity: 0.34;
  cursor: default;
}

.detail-state {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #6c9f8f;
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.detail-state i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}

.detail-telemetry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 13px;
  padding: 9px 20px;
  border-top: 1px solid rgba(105, 185, 213, 0.08);
  color: #3e5667;
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.12em;
}

.detail-telemetry b {
  color: #58798b;
  font-weight: 400;
  letter-spacing: 0.06em;
}

body.is-exploded .detail-telemetry b {
  color: var(--amber-soft);
}

/* --------------------------------------------------------------------------
   Bottom toolbar
   -------------------------------------------------------------------------- */

.view-dock {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 31;
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 7px;
  border: 1px solid rgba(102, 195, 222, 0.17);
  background: linear-gradient(145deg, rgba(12, 27, 41, 0.9), rgba(4, 11, 19, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(172, 235, 255, 0.04),
    0 20px 52px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(18px) saturate(130%);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  transform: translateX(-50%);
  transition: opacity 0.4s ease;
}

.dock-divider {
  align-self: center;
  width: 1px;
  height: 29px;
  background: rgba(103, 188, 215, 0.14);
}

.explode-button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 168px;
  min-height: 48px;
  padding: 0 13px;
  overflow: hidden;
  background: linear-gradient(110deg, rgba(38, 209, 235, 0.95), rgba(38, 139, 173, 0.82));
  color: #021117;
  text-align: left;
  cursor: pointer;
  transition:
    background 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.2s ease;
}

.explode-button::before {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 42%;
  content: "";
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16));
  transform: skewX(-13deg) translateX(30%);
}

.explode-button:hover {
  background: linear-gradient(110deg, #76f3ff, rgba(46, 166, 196, 0.88));
  box-shadow: 0 0 24px rgba(76, 227, 255, 0.22);
}

.explode-button:active {
  transform: translateY(1px);
}

.explode-icon {
  display: grid;
  flex: 0 0 auto;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 1px solid rgba(3, 39, 49, 0.25);
  background: rgba(4, 44, 55, 0.14);
}

.explode-icon svg {
  width: 26px;
  height: 26px;
  overflow: visible;
  fill: none;
  stroke: #03232a;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1;
}

.ex-core {
  fill: rgba(4, 47, 58, 0.14);
}

.ex-ray {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
  transform-origin: 15px 15px;
}

.explode-button:hover .ex-ray {
  transform: scale(1.12);
}

body.is-exploded .explode-icon {
  border-color: rgba(65, 28, 8, 0.25);
  background: rgba(255, 185, 100, 0.16);
}

body.is-exploded .explode-icon svg {
  stroke: #2f1305;
}

body.is-exploded .explode-button {
  background: linear-gradient(110deg, #ffc17c, rgba(209, 108, 44, 0.9));
}

body.is-exploded .explode-button:hover {
  background: linear-gradient(110deg, #ffd2a0, rgba(230, 126, 57, 0.94));
  box-shadow: 0 0 24px rgba(255, 147, 75, 0.22);
}

body.is-exploded .ex-ray-1 {
  transform: scale(1.22);
  opacity: 0.55;
}

.explode-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.explode-copy strong {
  color: #041b22;
  font-family: var(--cn);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1;
}

.explode-copy small {
  color: rgba(3, 35, 43, 0.65);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.1em;
  line-height: 1;
}

body.is-exploded .explode-copy small {
  color: rgba(53, 20, 5, 0.65);
}

.view-presets {
  display: flex;
  gap: 2px;
  align-items: stretch;
}

.view-button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 45px;
  min-height: 48px;
  border: 1px solid transparent;
  background: transparent;
  color: #7591a2;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.view-button small {
  color: #3f5768;
  font-size: 5px;
  letter-spacing: 0.06em;
  line-height: 1;
}

.view-button::after {
  position: absolute;
  right: 10px;
  bottom: 4px;
  left: 10px;
  height: 1px;
  content: "";
  background: transparent;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.view-button:hover {
  border-color: rgba(103, 199, 226, 0.1);
  background: rgba(32, 97, 118, 0.1);
  color: #cfeaf3;
}

.view-button:hover small {
  color: #6d8a9a;
}

.view-button.is-active {
  border-color: rgba(96, 223, 250, 0.17);
  background: rgba(30, 121, 143, 0.12);
  color: var(--cyan);
}

.view-button.is-active small {
  color: #6dd1e5;
}

.view-button.is-active::after {
  background: var(--cyan);
  box-shadow: 0 0 7px var(--cyan);
}

.tool-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 42px;
  min-height: 48px;
  border: 1px solid transparent;
  background: transparent;
  color: #526e7f;
  font-family: var(--mono);
  font-size: 5px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.tool-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.25;
}

.tool-button:hover {
  border-color: rgba(103, 199, 226, 0.1);
  background: rgba(32, 97, 118, 0.1);
  color: #b6d9e4;
}

.tool-button.is-active {
  color: var(--cyan);
  background: rgba(34, 132, 153, 0.09);
}

.tool-button.is-active span {
  color: #6bb7c8;
}

.icon-rotate {
  transform-origin: center;
}

.tool-button.is-active .icon-rotate {
  animation: rotate-slow 9s linear infinite;
}

/* --------------------------------------------------------------------------
   Bottom hint
   -------------------------------------------------------------------------- */

.interaction-hint {
  position: fixed;
  right: 30px;
  bottom: 30px;
  z-index: 26;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #4c6373;
  font-family: var(--cn);
  font-size: 8px;
  letter-spacing: 0.04em;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.interaction-hint > span {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.interaction-hint i {
  position: relative;
  display: inline-block;
  width: 9px;
  height: 12px;
  border: 1px solid #526d7e;
  border-radius: 5px;
}

.mouse-icon::before {
  position: absolute;
  top: 3px;
  left: 50%;
  width: 1px;
  height: 3px;
  content: "";
  background: #7b9baa;
  transform: translateX(-50%);
}

.wheel-icon::before {
  position: absolute;
  top: 3px;
  left: 50%;
  width: 1px;
  height: 2px;
  content: "";
  background: var(--cyan);
  transform: translateX(-50%);
}

.pan-icon::before {
  position: absolute;
  top: 4px;
  left: 1px;
  width: 5px;
  height: 4px;
  content: "";
  border: 1px solid #526d7e;
  border-radius: 1px;
}

.hint-sep {
  width: 18px;
  height: 1px;
  background: rgba(98, 180, 209, 0.16);
}

.hint-key {
  padding: 2px 4px;
  border: 1px solid rgba(100, 188, 216, 0.2);
  color: #6e8d9e;
  font-family: var(--mono);
  font-size: 6px;
}

/* --------------------------------------------------------------------------
   Hover coordinate readout
   -------------------------------------------------------------------------- */

.hover-reticle {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 70;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(91, 229, 255, 0.64);
  border-radius: 50%;
  box-shadow: 0 0 14px rgba(57, 217, 245, 0.18), inset 0 0 7px rgba(76, 225, 255, 0.1);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
  will-change: transform;
}

.hover-reticle::before,
.hover-reticle::after {
  position: absolute;
  top: 50%;
  left: 50%;
  content: "";
  background: rgba(89, 234, 255, 0.6);
}

.hover-reticle::before {
  width: 30px;
  height: 1px;
  transform: translate(-50%, -50%);
}

.hover-reticle::after {
  width: 1px;
  height: 30px;
  transform: translate(-50%, -50%);
}

.hover-reticle i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan);
  transform: translate(-50%, -50%);
}

.hover-reticle.is-visible {
  opacity: 0.8;
}

.hover-card {
  --accent: var(--cyan);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 71;
  width: 232px;
  padding: 13px 14px 12px;
  border: 1px solid rgba(103, 218, 244, 0.28);
  border-left-color: var(--accent);
  background:
    linear-gradient(140deg, rgba(10, 31, 46, 0.94), rgba(3, 11, 18, 0.92));
  box-shadow:
    0 20px 42px rgba(0, 0, 0, 0.48),
    inset 0 0 22px rgba(23, 113, 136, 0.06);
  backdrop-filter: blur(15px) saturate(130%);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.14s ease;
  will-change: transform;
}

.hover-card.is-visible {
  opacity: 1;
}

.hover-topline {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.11em;
}

#hover-index {
  color: var(--accent);
}

.hover-topline i {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(101, 211, 238, 0.3), transparent);
}

#hover-mass {
  color: #8ca6b5;
  white-space: nowrap;
}

.hover-name {
  margin-top: 9px;
  color: #effbff;
  font-family: var(--cn);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 1;
}

.hover-en {
  margin-top: 6px;
  overflow: hidden;
  color: #5e8294;
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.12em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hover-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(104, 188, 214, 0.1);
}

.hover-spec {
  display: flex;
  gap: 5px;
  color: #718d9e;
  font-family: var(--cn);
  font-size: 8px;
  white-space: nowrap;
}

.hover-spec b {
  color: #b2cdda;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 400;
}

/* --------------------------------------------------------------------------
   Toast + loader + utility
   -------------------------------------------------------------------------- */

.toast {
  position: fixed;
  bottom: 98px;
  left: 50%;
  z-index: 90;
  padding: 8px 14px;
  border: 1px solid rgba(104, 211, 237, 0.2);
  background: rgba(4, 15, 24, 0.92);
  color: #9ac5d4;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 0.2s ease, transform 0.25s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 46%, rgba(15, 54, 72, 0.42), transparent 35%),
    #02060b;
  transition: opacity 0.65s ease, visibility 0.65s ease;
}

.loader::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image:
    linear-gradient(rgba(98, 183, 214, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(98, 183, 214, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, black, transparent 70%);
}

.loader.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.loader-inner {
  position: relative;
  width: 272px;
  text-align: center;
}

.loader-mark {
  width: 78px;
  height: 78px;
  margin: 0 auto 24px;
  filter: drop-shadow(0 0 18px rgba(64, 217, 246, 0.18));
}

.loader-mark svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.loader-ring,
.loader-hex {
  fill: none;
  stroke: rgba(94, 226, 255, 0.55);
  stroke-width: 0.8;
}

.ring-a {
  stroke-dasharray: 30 12 2 12;
  animation: spin 8s linear infinite;
  transform-origin: 48px 48px;
}

.ring-b {
  stroke: rgba(92, 207, 233, 0.2);
  stroke-dasharray: 1 6;
  animation: spin-reverse 12s linear infinite;
  transform-origin: 48px 48px;
}

.loader-hex {
  stroke: rgba(90, 220, 249, 0.34);
}

.loader-piston {
  fill: none;
  stroke: var(--cyan);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 0.9;
  opacity: 0.8;
}

.loader-brand {
  color: #b9dce9;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.23em;
}

.loader-brand span {
  color: var(--amber);
}

.loader-status {
  margin-top: 13px;
  color: #607d8d;
  font-family: var(--cn);
  font-size: 9px;
  letter-spacing: 0.09em;
}

.loader-track {
  height: 2px;
  margin-top: 20px;
  background: rgba(106, 193, 219, 0.12);
  overflow: hidden;
}

.loader-track i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #2d9fb9, var(--cyan));
  box-shadow: 0 0 10px rgba(79, 230, 255, 0.55);
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.loader-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 9px;
  color: #405b6a;
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.13em;
}

.loader-meta b {
  color: #73b8c9;
  font-weight: 400;
}

.no-script {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: #03070d;
  color: #dbeef7;
  font-family: var(--cn);
  font-size: 16px;
}

/* --------------------------------------------------------------------------
   Motion + reveal
   -------------------------------------------------------------------------- */

body:not(.is-ready) .brandbar,
body:not(.is-ready) .assembly-status,
body:not(.is-ready) .top-meta,
body:not(.is-ready) .panel,
body:not(.is-ready) .view-dock,
body:not(.is-ready) .interaction-hint {
  opacity: 0;
}

.brandbar,
.assembly-status,
.top-meta,
.panel,
.view-dock,
.interaction-hint {
  transition-property: opacity;
  transition-duration: 0.75s;
  transition-timing-function: ease;
}

body.is-ready .brandbar {
  transition-delay: 0.06s;
}

body.is-ready .assembly-status {
  transition-delay: 0.12s;
}

body.is-ready .top-meta {
  transition-delay: 0.16s;
}

body.is-ready .panel {
  transition-delay: 0.2s;
}

body.is-ready .view-dock {
  transition-delay: 0.28s;
}

body.is-ready .interaction-hint {
  transition-delay: 0.34s;
}

body.hide-ui .brandbar,
body.hide-ui .assembly-status,
body.hide-ui .top-meta,
body.hide-ui .panel,
body.hide-ui .view-dock,
body.hide-ui .interaction-hint {
  opacity: 0;
  pointer-events: none;
}

@keyframes breathe-dot {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(0.85);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes breathe-dot-amber {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(0.85);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

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

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

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

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

@media (max-width: 1280px) {
  .panel-left {
    left: 22px;
    width: 264px;
  }

  .panel-right {
    right: 22px;
    width: 306px;
  }

  .brandbar {
    left: 24px;
  }

  .top-meta {
    right: 24px;
  }

  .interaction-hint {
    right: 24px;
  }

  .view-dock {
    gap: 6px;
    padding: 6px;
  }

  .explode-button {
    width: 160px;
  }
}

@media (max-width: 1120px) {
  .top-meta {
    display: none;
  }

  .panel {
    top: 112px;
  }

  .panel-left {
    width: 246px;
    height: calc(100vh - 150px);
    min-height: 450px;
  }

  .panel-right {
    width: 286px;
    max-height: calc(100vh - 186px);
  }

  .panel-head {
    padding-right: 16px;
    padding-left: 16px;
  }

  .list-rule {
    padding-right: 16px;
    padding-left: 16px;
  }

  .detail-en,
  .detail-mass-row,
  .detail-specs {
    padding-right: 16px;
    padding-left: 16px;
  }

  .inspection-panel,
  .detail-explanation,
  .detail-actions {
    margin-right: 16px;
    margin-left: 16px;
  }

  .inspection-exit {
    padding-right: 5px;
    padding-left: 5px;
  }

  .detail-telemetry {
    padding-right: 16px;
    padding-left: 16px;
  }

  .part-name {
    font-size: 11px;
  }

  .view-button {
    width: 39px;
  }

  .interaction-hint {
    gap: 10px;
    font-size: 7px;
  }
}

@media (max-width: 940px) {
  .assembly-status {
    top: 86px;
  }

  .brandbar {
    top: 20px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand-name {
    font-size: 13px;
  }

  .panel-right {
    display: none;
  }

  .panel-right.is-mobile-open {
    top: 112px;
    right: 16px;
    left: 16px;
    z-index: 41;
    display: block;
    width: auto;
    max-height: calc(100vh - 312px);
    min-height: 0;
    background: linear-gradient(145deg, rgba(12, 28, 43, 0.97), rgba(4, 11, 19, 0.97));
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.62);
  }

  .panel-right.is-mobile-open .detail-close {
    opacity: 1;
    pointer-events: auto;
  }

  .panel-left {
    top: auto;
    right: 16px;
    bottom: 100px;
    left: 16px;
    display: block;
    width: auto;
    height: 112px;
    min-height: 0;
    max-height: none;
    background: linear-gradient(145deg, rgba(12, 27, 41, 0.9), rgba(4, 11, 19, 0.9));
  }

  .panel-left .panel-head,
  .panel-left .list-rule,
  .panel-left .panel-foot,
  .panel-left .panel-cut {
    display: none;
  }

  .part-list {
    display: flex;
    gap: 5px;
    height: 100%;
    padding: 11px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .part-button {
    flex: 0 0 148px;
    min-height: 88px;
    grid-template-columns: 28px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 0 8px;
    align-content: center;
    padding: 10px 10px;
    border: 1px solid rgba(97, 185, 212, 0.08);
    border-bottom: 2px solid transparent;
    background: rgba(8, 22, 33, 0.45);
  }

  .part-button:hover {
    transform: none;
  }

  .part-button.is-selected {
    border-color: rgba(95, 226, 255, 0.18);
    border-bottom-color: var(--cyan);
  }

  .part-button::after {
    display: none;
  }

  .part-index {
    grid-row: 1 / 3;
    align-self: center;
  }

  .part-mass {
    grid-column: 2;
    margin-top: 8px;
    color: #5f7c8c;
  }

  .part-name {
    font-size: 12px;
  }

  .part-meta {
    grid-column: 2;
    margin-top: 5px;
    font-size: 6px;
  }

  .view-dock {
    bottom: 18px;
    gap: 5px;
    padding: 5px;
  }

  .explode-button {
    width: 152px;
    min-height: 46px;
  }

  .view-button,
  .tool-button {
    min-height: 46px;
  }

  .interaction-hint {
    display: none;
  }

  .hover-card {
    width: 214px;
  }

  body.is-focused .panel-left,
  body.is-focused .view-dock {
    display: none;
  }

  body.is-focused .panel-right.is-mobile-open {
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 60;
    display: block;
    width: auto;
    max-height: 286px;
    background:
      linear-gradient(145deg, rgba(10, 25, 39, 0.98), rgba(3, 10, 17, 0.98));
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.72);
  }

  body.is-focused .panel-right.is-mobile-open .detail-head {
    position: sticky;
    top: 0;
    z-index: 3;
    background: linear-gradient(180deg, rgba(8, 21, 33, 0.98) 70%, rgba(8, 21, 33, 0));
  }

  body.is-focused .panel-right.is-mobile-open .detail-mass-row,
  body.is-focused .panel-right.is-mobile-open .detail-specs,
  body.is-focused .panel-right.is-mobile-open .detail-actions,
  body.is-focused .panel-right.is-mobile-open .detail-telemetry {
    display: none;
  }

  body.is-focused .panel-right.is-mobile-open .inspection-panel {
    margin-top: 8px;
  }

  body.is-focused .panel-right.is-mobile-open .detail-explanation {
    margin-top: 8px;
  }
}

@media (max-width: 720px) {
  .assembly-status {
    top: 78px;
    padding: 7px 10px;
  }

  .panel-right.is-mobile-open {
    top: 104px;
    max-height: calc(100vh - 288px);
  }

  .status-kicker,
  .status-cn,
  .status-wing {
    display: none;
  }

  .brand-sub {
    display: none;
  }

  .brandbar {
    gap: 10px;
  }

  .brand-slash {
    margin: 0 5px;
  }

  .view-presets {
    display: none;
  }

  .dock-divider {
    height: 26px;
  }

  .explode-button {
    width: 145px;
  }

  .explode-copy small {
    font-size: 5px;
  }

  .view-dock {
    left: 50%;
    width: max-content;
    max-width: calc(100vw - 24px);
  }

  .tool-button {
    width: 38px;
  }

  .panel-left {
    bottom: 87px;
    height: 100px;
  }

  .part-list {
    padding: 8px;
  }

  .part-button {
    flex-basis: 142px;
    min-height: 82px;
    padding: 8px;
  }

  .edge-frame {
    inset: 10px;
  }

  .hover-card {
    width: 194px;
  }

  .toast {
    bottom: 195px;
  }
}

@media (max-width: 480px) {
  .brand-name {
    font-size: 11px;
    letter-spacing: 0.12em;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .assembly-status {
    top: 68px;
  }

  .explode-button {
    width: 132px;
    gap: 7px;
    padding: 0 9px;
  }

  .explode-icon {
    width: 25px;
    height: 25px;
  }

  .explode-icon svg {
    width: 23px;
    height: 23px;
  }

  .explode-copy strong {
    font-size: 12px;
  }

  .tool-button {
    width: 34px;
  }

  .view-dock {
    gap: 3px;
  }

  .dock-divider {
    margin: 0 1px;
  }

  .panel-left {
    right: 10px;
    bottom: 80px;
    left: 10px;
    height: 92px;
  }

  .part-list {
    padding: 6px;
  }

  .part-button {
    flex-basis: 132px;
    min-height: 78px;
  }

  .hover-card {
    width: 186px;
  }

  .hover-specs {
    gap: 4px 8px;
  }
}

@media (max-height: 720px) and (min-width: 941px) {
  .panel {
    top: 102px;
  }

  .panel-left {
    height: calc(100vh - 164px);
    min-height: 0;
  }

  .panel-right {
    max-height: calc(100vh - 164px);
  }

  .panel-head {
    padding-top: 16px;
    padding-bottom: 10px;
  }

  .panel-title {
    font-size: 17px;
  }

  .part-button {
    min-height: 43px;
  }

  .part-meta {
    margin-top: 3px;
  }

  .panel-foot {
    padding-top: 9px;
    padding-bottom: 8px;
  }

  .detail-mass-row {
    margin-top: 12px;
    padding-top: 10px;
    padding-bottom: 11px;
  }

  .explain-row .detail-description {
    display: none;
  }
}

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