:root {
  --bg: #04080a;
  --bg-deep: #020405;
  --panel: rgba(8, 14, 17, 0.78);
  --panel-strong: rgba(10, 17, 20, 0.94);
  --line: rgba(129, 222, 240, 0.14);
  --line-strong: rgba(129, 222, 240, 0.34);
  --ice: #7fe8ff;
  --ice-bright: #c6f8ff;
  --ice-dim: rgba(127, 232, 255, 0.56);
  --red: #e11d2e;
  --red-bright: #ff4351;
  --amber: #ffb35c;
  --text: #e8f2f3;
  --muted: #81969c;
  --muted-2: #536970;
  --display: "Bahnschrift", "DIN Alternate", "Arial Narrow", "Segoe UI", "Microsoft YaHei", sans-serif;
  --ui: "Bahnschrift Light", "Segoe UI", "Microsoft YaHei", sans-serif;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

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

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

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

::selection {
  background: rgba(127, 232, 255, 0.28);
  color: #fff;
}

.app-shell {
  position: relative;
  width: 100%;
  height: 100%;
  height: 100dvh;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(14, 38, 44, 0.42), transparent 32%),
    radial-gradient(circle at 20% 20%, rgba(124, 24, 34, 0.1), transparent 28%),
    linear-gradient(180deg, #050a0c 0%, #04080a 55%, #020506 100%);
}

/* ----------------------------------------------------------------------------
   Atmosphere
---------------------------------------------------------------------------- */

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

.backdrop-grid {
  position: absolute;
  inset: -20%;
  background-image:
    linear-gradient(rgba(130, 225, 243, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(130, 225, 243, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  transform: perspective(700px) rotateX(58deg) translateY(17%) scale(1.4);
  transform-origin: 50% 60%;
  mask-image: radial-gradient(ellipse 55% 55% at 50% 55%, black 0%, transparent 78%);
  opacity: 0.58;
}

.backdrop-grid::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(130, 225, 243, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(130, 225, 243, 0.045) 1px, transparent 1px);
  background-size: 18px 18px;
  mask-image: radial-gradient(ellipse 40% 40% at 50% 50%, black, transparent 65%);
}

.backdrop-glow {
  position: absolute;
  width: 52vw;
  height: 52vw;
  min-width: 620px;
  min-height: 620px;
  border-radius: 50%;
  filter: blur(40px);
  transition: opacity 1.2s var(--ease), transform 1.4s var(--ease);
  will-change: opacity, transform;
}

.backdrop-glow--red {
  left: -18vw;
  top: 12%;
  opacity: 0.25;
  background: radial-gradient(circle, rgba(187, 18, 38, 0.32) 0%, rgba(94, 8, 22, 0.08) 40%, transparent 70%);
}

.backdrop-glow--ice {
  right: -14vw;
  bottom: -20vw;
  opacity: 0.42;
  background: radial-gradient(circle, rgba(53, 194, 220, 0.2) 0%, rgba(12, 85, 106, 0.07) 43%, transparent 70%);
}

.backdrop-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 64% 58% at 50% 48%, transparent 20%, rgba(2, 4, 5, 0.45) 100%),
    linear-gradient(90deg, rgba(2, 4, 5, 0.42), transparent 24%, transparent 78%, rgba(2, 4, 5, 0.5));
}

.backdrop-scan {
  position: absolute;
  left: 0;
  right: 0;
  top: -30%;
  height: 32%;
  background: linear-gradient(180deg, transparent, rgba(118, 233, 255, 0.025) 65%, rgba(118, 233, 255, 0.1) 99%, transparent);
  animation: ambientScan 11s linear infinite;
  opacity: 0.55;
}

.backdrop-scan::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(145, 242, 255, 0.6), transparent);
  box-shadow: 0 0 16px rgba(127, 232, 255, 0.45);
}

.backdrop-noise {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  mix-blend-mode: screen;
  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='.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
}

@keyframes ambientScan {
  0% { transform: translateY(0); }
  100% { transform: translateY(420%); }
}

.app-shell.is-exploded .backdrop-glow--ice {
  opacity: 0.9;
  transform: scale(1.22);
}

.app-shell.is-exploded .backdrop-glow--red {
  opacity: 0.5;
  transform: scale(1.14);
}

.app-shell.is-exploded .backdrop-grid {
  opacity: 0.9;
}

.app-shell.is-exploded .backdrop-scan {
  opacity: 0.9;
}

/* ----------------------------------------------------------------------------
   Canvas & labels
---------------------------------------------------------------------------- */

#scene {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
}

#scene.is-dragging {
  cursor: grabbing;
}

#scene.is-hovering {
  cursor: pointer;
}

.labels-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: hidden;
}

.leader-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.leader-lines line {
  stroke: rgba(137, 234, 251, 0.52);
  stroke-width: 1;
  stroke-dasharray: 2 4;
  animation: dashFlow 9s linear infinite;
}

.leader-lines circle {
  fill: var(--ice);
  filter: drop-shadow(0 0 4px rgba(127, 232, 255, 0.95));
}

.leader-lines .leader-anchor-ring {
  fill: none;
  stroke: rgba(127, 232, 255, 0.4);
  stroke-width: 1;
}

@keyframes dashFlow {
  to { stroke-dashoffset: -60; }
}

.part-label {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 5px 12px 5px 5px;
  border: 1px solid rgba(130, 228, 246, 0.18);
  border-left-color: rgba(130, 228, 246, 0.55);
  background:
    linear-gradient(90deg, rgba(29, 84, 96, 0.2), transparent 58%),
    rgba(4, 10, 13, 0.8);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.38), inset 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  color: var(--text);
  white-space: nowrap;
  pointer-events: auto;
  cursor: pointer;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.94);
  transition: opacity 0.32s var(--ease), border-color 0.25s, background 0.25s, transform 0.32s var(--ease);
  will-change: left, top, transform;
}

.part-label::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 7px;
  bottom: 7px;
  width: 1px;
  background: var(--ice);
  box-shadow: 0 0 8px rgba(127, 232, 255, 0.75);
}

.part-label.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.part-label:hover,
.part-label.is-active {
  border-color: rgba(127, 232, 255, 0.64);
  background:
    linear-gradient(90deg, rgba(43, 142, 161, 0.34), transparent 65%),
    rgba(4, 13, 16, 0.94);
  box-shadow: 0 0 0 1px rgba(127, 232, 255, 0.16), 0 12px 34px rgba(0, 0, 0, 0.46), 0 0 28px rgba(58, 204, 233, 0.12);
}

.pl-number {
  display: grid;
  place-items: center;
  width: 26px;
  height: 28px;
  flex: 0 0 auto;
  background: rgba(127, 232, 255, 0.09);
  border: 1px solid rgba(127, 232, 255, 0.18);
  color: var(--ice);
  font: 600 10px/1 var(--mono);
  letter-spacing: 0.04em;
}

.pl-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pl-copy strong {
  font-family: var(--display);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.pl-copy small {
  color: var(--muted);
  font: 9px/1.3 var(--mono);
  letter-spacing: 0.08em;
}

.pl-copy small em {
  color: var(--ice-dim);
  font-style: normal;
  margin-left: 6px;
}

@media (max-width: 1180px) {
  .part-label:nth-of-type(n+7) {
    display: none;
  }
}

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

.glass-panel {
  position: absolute;
  background:
    linear-gradient(140deg, rgba(17, 29, 33, 0.8), rgba(5, 10, 13, 0.9) 62%),
    var(--panel);
  border: 1px solid var(--line);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    inset 0 -1px 0 rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(22px) saturate(120%);
}

.panel-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  pointer-events: none;
  z-index: 2;
}

.panel-corner--tl {
  top: -1px;
  left: -1px;
  border-top: 1px solid var(--ice);
  border-left: 1px solid var(--ice);
  filter: drop-shadow(0 0 4px rgba(127, 232, 255, 0.55));
}

.panel-corner--br {
  right: -1px;
  bottom: -1px;
  border-right: 1px solid var(--ice);
  border-bottom: 1px solid var(--ice);
  filter: drop-shadow(0 0 4px rgba(127, 232, 255, 0.55));
}

.panel-kicker {
  margin: 0 0 7px;
  color: var(--ice-dim);
  font: 9px/1 var(--mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.panel-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.panel-count {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 18px;
  padding: 0 5px;
  background: rgba(127, 232, 255, 0.1);
  border: 1px solid rgba(127, 232, 255, 0.2);
  color: var(--ice);
  font: 600 9px/1 var(--mono);
  letter-spacing: 0.06em;
}

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

.topbar {
  position: absolute;
  z-index: 30;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: minmax(390px, 1fr) auto auto;
  align-items: start;
  gap: 28px;
  padding: 25px 32px 20px;
  background: linear-gradient(180deg, rgba(3, 7, 8, 0.88), rgba(3, 7, 8, 0.35) 65%, transparent);
  pointer-events: none;
}

.topbar::after {
  content: "";
  position: absolute;
  left: 32px;
  right: 32px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(127, 232, 255, 0.14), transparent 38%, transparent 62%, rgba(127, 232, 255, 0.08));
}

.topbar > * {
  pointer-events: auto;
}

.brand {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
}

.crest {
  position: relative;
  width: 47px;
  height: 58px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  clip-path: polygon(50% 0, 93% 12%, 89% 72%, 50% 100%, 11% 72%, 7% 12%);
  background: linear-gradient(145deg, #dfc37a, #7d632b 55%, #f4e2a4);
  padding: 2px;
  filter: drop-shadow(0 5px 13px rgba(0, 0, 0, 0.5));
}

.crest::before {
  content: "";
  position: absolute;
  inset: 2px;
  clip-path: inherit;
  background:
    linear-gradient(90deg, transparent 45%, rgba(222, 190, 107, 0.6) 46%, rgba(222, 190, 107, 0.6) 54%, transparent 55%),
    linear-gradient(180deg, #171b1b 0 48%, #89212b 49% 100%);
}

.crest-inner {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 31px;
  height: 34px;
  margin-top: -3px;
  border: 1px solid rgba(239, 214, 150, 0.62);
  color: #e6cb88;
  font: 600 22px/1 Georgia, serif;
  letter-spacing: -0.04em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.crest-stripe {
  position: absolute;
  z-index: 2;
  bottom: 4px;
  width: 2px;
  height: 24px;
  background: rgba(239, 214, 150, 0.36);
}

.crest-stripe--a { left: 9px; transform: rotate(-14deg); }
.crest-stripe--b { left: 22px; }
.crest-stripe--c { right: 9px; transform: rotate(14deg); }

.brand-copy {
  min-width: 0;
  padding-top: 1px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  color: #b8c9cc;
  font: 9px/1 var(--mono);
  letter-spacing: 0.22em;
  white-space: nowrap;
}

.eyebrow i {
  width: 20px;
  height: 1px;
  background: rgba(127, 232, 255, 0.4);
}

.brand-title-row {
  display: flex;
  align-items: flex-end;
  gap: 15px;
}

.brand h1 {
  margin: 0;
  color: #f1f7f7;
  font-family: var(--display);
  font-size: clamp(34px, 3vw, 47px);
  font-weight: 700;
  line-height: 0.84;
  letter-spacing: 0.035em;
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.5);
}

.engine-type {
  position: relative;
  top: -3px;
  padding: 4px 8px;
  border: 1px solid rgba(225, 29, 46, 0.45);
  background: rgba(118, 12, 23, 0.18);
  color: #ff9ca3;
  font: 600 9px/1 var(--mono);
  letter-spacing: 0.13em;
  white-space: nowrap;
}

.brand-sub {
  margin: 8px 0 0;
  color: var(--muted);
  font: 9px/1.4 var(--mono);
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.hero-metrics {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 4px 24px 0;
}

.hero-metric {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 76px;
}

.metric-label {
  color: var(--muted-2);
  font: 8px/1 var(--mono);
  letter-spacing: 0.16em;
}

.hero-metric strong {
  color: #dce9e9;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
}

.hero-metric small {
  margin-left: 4px;
  color: var(--muted);
  font: 9px/1 var(--mono);
  letter-spacing: 0.03em;
}

.metric-sep {
  width: 1px;
  height: 28px;
  background: linear-gradient(180deg, transparent, rgba(127, 232, 255, 0.22), transparent);
}

.top-actions {
  display: flex;
  align-items: flex-start;
  gap: 3px;
}

.icon-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 55px;
  padding: 8px 7px 7px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.22s, background 0.22s, border-color 0.22s;
}

.icon-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: filter 0.22s;
}

.icon-btn span {
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.icon-btn:hover {
  color: var(--text);
  background: rgba(127, 232, 255, 0.05);
  border-color: rgba(127, 232, 255, 0.12);
}

.icon-btn.is-active {
  color: var(--ice);
  background: linear-gradient(180deg, rgba(127, 232, 255, 0.11), rgba(127, 232, 255, 0.025));
  border-color: rgba(127, 232, 255, 0.2);
}

.icon-btn.is-active svg {
  filter: drop-shadow(0 0 6px rgba(127, 232, 255, 0.55));
}

.top-actions .mobile-only {
  display: none;
}

/* ----------------------------------------------------------------------------
   Component index
---------------------------------------------------------------------------- */

.index-panel {
  z-index: 20;
  top: 124px;
  left: 28px;
  bottom: 150px;
  width: 298px;
  display: flex;
  flex-direction: column;
  padding: 18px 0 0;
  transition: transform 0.42s var(--ease), opacity 0.32s var(--ease);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0 18px 14px;
  border-bottom: 1px solid rgba(127, 232, 255, 0.09);
}

.panel-collapse,
.detail-close {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(127, 232, 255, 0.12);
  background: rgba(127, 232, 255, 0.035);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.22s, border-color 0.22s, background 0.22s;
}

.panel-collapse svg,
.detail-close svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.panel-collapse:hover,
.detail-close:hover {
  color: var(--ice);
  border-color: rgba(127, 232, 255, 0.35);
  background: rgba(127, 232, 255, 0.08);
}

.filter-row {
  display: flex;
  gap: 3px;
  padding: 12px 14px 10px;
}

.filter-btn {
  flex: 1;
  padding: 7px 4px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.012);
  color: var(--muted-2);
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.22s;
}

.filter-btn:hover {
  color: var(--text);
}

.filter-btn.is-active {
  border-color: rgba(127, 232, 255, 0.18);
  background: rgba(127, 232, 255, 0.07);
  color: var(--ice);
}

.component-list {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 9px 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(127, 232, 255, 0.25) transparent;
}

.component-list::-webkit-scrollbar {
  width: 4px;
}

.component-list::-webkit-scrollbar-thumb {
  background: rgba(127, 232, 255, 0.22);
}

.component-item {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 8px;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 51px;
  padding: 7px 9px;
  border: 0;
  border-bottom: 1px solid rgba(127, 232, 255, 0.055);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background 0.26s, padding-left 0.26s;
}

.component-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--ice);
  box-shadow: 0 0 12px rgba(127, 232, 255, 0.75);
  opacity: 0;
  transform: scaleY(0.3);
  transition: opacity 0.22s, transform 0.3s var(--ease);
}

.component-item:hover {
  background: linear-gradient(90deg, rgba(127, 232, 255, 0.065), transparent 88%);
  padding-left: 13px;
}

.component-item.is-active {
  background: linear-gradient(90deg, rgba(127, 232, 255, 0.12), rgba(127, 232, 255, 0.015) 82%);
}

.component-item.is-active::before {
  opacity: 1;
  transform: scaleY(1);
}

.ci-index {
  color: var(--muted-2);
  font: 500 9px/1 var(--mono);
  letter-spacing: 0.02em;
  transition: color 0.22s;
}

.component-item.is-active .ci-index {
  color: var(--ice);
}

.ci-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.ci-main strong {
  overflow: hidden;
  color: #cbd8da;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.22s;
}

.component-item.is-active .ci-main strong,
.component-item:hover .ci-main strong {
  color: #f3fbfc;
}

.ci-main small {
  overflow: hidden;
  color: var(--muted-2);
  font: 8px/1.2 var(--mono);
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ci-state {
  width: 5px;
  height: 5px;
  border: 1px solid rgba(127, 232, 255, 0.35);
  border-radius: 50%;
  transition: background 0.22s, box-shadow 0.22s;
}

.component-item.is-active .ci-state {
  background: var(--ice);
  border-color: var(--ice);
  box-shadow: 0 0 8px rgba(127, 232, 255, 0.9);
}

.component-item[data-category="core"] .ci-state {
  border-color: rgba(255, 84, 98, 0.35);
}

.component-item[data-category="core"].is-active .ci-state {
  background: var(--red-bright);
  border-color: var(--red-bright);
  box-shadow: 0 0 9px rgba(255, 67, 81, 0.85);
}

.component-item.is-filtered-out {
  display: none;
}

.index-footer {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 45px;
  padding: 0 17px;
  border-top: 1px solid rgba(127, 232, 255, 0.08);
  color: var(--muted-2);
  font: 8px/1.3 var(--mono);
  letter-spacing: 0.03em;
}

.pulse-dot {
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--ice);
  box-shadow: 0 0 9px rgba(127, 232, 255, 0.9);
  animation: pulseDot 2.2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 0.35; transform: scale(0.75); }
  50% { opacity: 1; transform: scale(1); }
}

.index-panel.is-collapsed {
  transform: translateX(calc(-100% - 36px));
  opacity: 0;
  pointer-events: none;
}

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

.detail-panel {
  z-index: 24;
  top: 124px;
  right: 28px;
  width: 352px;
  max-height: calc(100vh - 272px);
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(28px);
  transition: opacity 0.36s var(--ease), transform 0.44s var(--ease);
}

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

.detail-close {
  position: absolute;
  z-index: 4;
  top: 15px;
  right: 15px;
}

.detail-scroll {
  position: relative;
  max-height: calc(100vh - 272px);
  overflow-y: auto;
  padding: 22px 22px 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(127, 232, 255, 0.25) transparent;
}

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

.detail-scroll::-webkit-scrollbar-thumb {
  background: rgba(127, 232, 255, 0.22);
}

.detail-ghost {
  position: absolute;
  z-index: 0;
  top: 8px;
  right: 14px;
  color: rgba(127, 232, 255, 0.045);
  font-family: var(--display);
  font-size: 94px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.05em;
  pointer-events: none;
}

.detail-topline {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--muted);
  font: 8px/1 var(--mono);
  letter-spacing: 0.18em;
}

.detail-topline .live {
  color: var(--ice);
}

.detail-topline i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ice);
  box-shadow: 0 0 7px rgba(127, 232, 255, 0.9);
}

.detail-title {
  position: relative;
  z-index: 1;
  margin: 0 0 5px;
  font-family: var(--display);
  font-size: 27px;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: 0.04em;
}

.detail-en {
  position: relative;
  z-index: 1;
  margin: 0 0 17px;
  color: var(--ice-dim);
  font: 9px/1.4 var(--mono);
  letter-spacing: 0.15em;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 17px;
}

.detail-tag {
  padding: 4px 7px;
  border: 1px solid rgba(127, 232, 255, 0.12);
  background: rgba(127, 232, 255, 0.035);
  color: #a7bcc0;
  font: 8px/1 var(--mono);
  letter-spacing: 0.08em;
}

.detail-tag--red {
  border-color: rgba(225, 29, 46, 0.3);
  background: rgba(225, 29, 46, 0.07);
  color: #ff8f98;
}

.detail-summary {
  position: relative;
  z-index: 1;
  margin: 0 0 18px;
  padding-left: 11px;
  border-left: 1px solid rgba(127, 232, 255, 0.32);
  color: #a7b6b8;
  font-size: 11.5px;
  line-height: 1.72;
}

.detail-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-bottom: 19px;
  background: rgba(127, 232, 255, 0.12);
  border: 1px solid rgba(127, 232, 255, 0.12);
}

.spec-cell {
  min-height: 62px;
  padding: 10px 11px;
  background: rgba(3, 8, 10, 0.72);
}

.spec-cell span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted-2);
  font: 7.5px/1 var(--mono);
  letter-spacing: 0.12em;
}

.spec-cell strong {
  color: #dfeaeb;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.spec-cell small {
  margin-left: 3px;
  color: var(--muted);
  font: 8px/1 var(--mono);
}

.detail-block {
  margin-bottom: 17px;
}

.detail-block h4 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 7px;
  color: #d9e5e6;
  font-family: var(--display);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
}

.detail-block h4::before {
  content: "";
  width: 12px;
  height: 1px;
  background: var(--ice);
  box-shadow: 0 0 5px rgba(127, 232, 255, 0.6);
}

.detail-block p {
  margin: 0;
  color: #82979b;
  font-size: 10.5px;
  line-height: 1.72;
}

.material-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 17px;
  padding: 9px 10px;
  border: 1px solid rgba(127, 232, 255, 0.09);
  background: rgba(255, 255, 255, 0.018);
  color: var(--muted);
  font: 8px/1.4 var(--mono);
  letter-spacing: 0.04em;
}

.material-line b {
  color: #bdcbcd;
  font-weight: 500;
  text-align: right;
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.detail-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(127, 232, 255, 0.16);
  background: rgba(127, 232, 255, 0.045);
  color: #b9cdd0;
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.22s;
}

.detail-action svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.detail-action:hover {
  border-color: rgba(127, 232, 255, 0.44);
  background: rgba(127, 232, 255, 0.09);
  color: var(--ice);
}

.detail-action.is-active {
  border-color: rgba(255, 179, 92, 0.4);
  background: rgba(255, 179, 92, 0.08);
  color: var(--amber);
}

/* ----------------------------------------------------------------------------
   Bottom control dock
---------------------------------------------------------------------------- */

.control-dock {
  position: absolute;
  z-index: 26;
  left: 50%;
  bottom: 24px;
  width: min(700px, calc(100vw - 720px));
  min-width: 540px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 172px 1fr;
  gap: 0 18px;
  padding: 13px 18px 11px;
  border: 1px solid rgba(127, 232, 255, 0.17);
  background:
    linear-gradient(110deg, rgba(32, 59, 65, 0.22), transparent 38%),
    rgba(4, 9, 12, 0.82);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), inset 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(22px) saturate(125%);
}

.control-dock::before,
.control-dock::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  pointer-events: none;
}

.control-dock::before {
  top: -1px;
  left: -1px;
  border-top: 1px solid var(--ice);
  border-left: 1px solid var(--ice);
}

.control-dock::after {
  right: -1px;
  bottom: -1px;
  border-right: 1px solid var(--ice);
  border-bottom: 1px solid var(--ice);
}

.dock-status {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding-right: 17px;
  border-right: 1px solid rgba(127, 232, 255, 0.12);
}

.dock-kicker {
  color: var(--muted-2);
  font: 8px/1 var(--mono);
  letter-spacing: 0.14em;
}

.dock-state-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.dock-state-row strong {
  color: #d8e6e7;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.dock-state-row span {
  color: var(--ice);
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.04em;
}

.dock-progress {
  position: relative;
  height: 2px;
  margin-top: 2px;
  overflow: hidden;
  background: rgba(127, 232, 255, 0.12);
}

.dock-progress i {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--ice));
  box-shadow: 0 0 8px rgba(127, 232, 255, 0.75);
  transition: width 0.12s linear;
}

.dock-main {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.dock-icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 1px solid rgba(127, 232, 255, 0.13);
  background: rgba(127, 232, 255, 0.035);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.22s;
}

.dock-icon-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dock-icon-btn:hover {
  border-color: rgba(127, 232, 255, 0.36);
  color: var(--ice);
}

.slider-wrap {
  position: relative;
  flex: 1;
  min-width: 80px;
  padding-bottom: 10px;
}

#explode-slider {
  --p: 0%;
  width: 100%;
  height: 16px;
  margin: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}

#explode-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 2px;
  border-radius: 0;
  background: linear-gradient(90deg, var(--ice) var(--p), rgba(127, 232, 255, 0.14) var(--p));
}

#explode-slider::-moz-range-track {
  width: 100%;
  height: 2px;
  border-radius: 0;
  background: linear-gradient(90deg, var(--ice) var(--p), rgba(127, 232, 255, 0.14) var(--p));
}

#explode-slider::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  margin-top: -5.5px;
  border: 1px solid var(--ice-bright);
  border-radius: 50%;
  background: #071015;
  box-shadow: 0 0 0 3px rgba(127, 232, 255, 0.1), 0 0 12px rgba(127, 232, 255, 0.7);
  transition: transform 0.18s;
}

#explode-slider::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: 1px solid var(--ice-bright);
  border-radius: 50%;
  background: #071015;
  box-shadow: 0 0 0 3px rgba(127, 232, 255, 0.1), 0 0 12px rgba(127, 232, 255, 0.7);
}

#explode-slider:hover::-webkit-slider-thumb {
  transform: scale(1.18);
}

.slider-ticks {
  position: absolute;
  left: 1px;
  right: 1px;
  bottom: 0;
  display: flex;
  justify-content: space-between;
}

.slider-ticks i {
  width: 1px;
  height: 4px;
  background: rgba(127, 232, 255, 0.18);
}

.dock-main-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 104px;
  height: 36px;
  flex: 0 0 auto;
  padding: 0 12px;
  border: 1px solid rgba(127, 232, 255, 0.4);
  background: linear-gradient(135deg, rgba(127, 232, 255, 0.19), rgba(127, 232, 255, 0.055));
  color: var(--ice-bright);
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.24s;
}

.dock-main-btn svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  transition: transform 0.5s var(--ease);
}

.dock-main-btn:hover {
  background: linear-gradient(135deg, rgba(127, 232, 255, 0.29), rgba(127, 232, 255, 0.1));
  box-shadow: 0 0 24px rgba(127, 232, 255, 0.15);
}

.dock-main-btn.is-assembled svg {
  transform: rotate(45deg);
}

.dock-hints {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid rgba(127, 232, 255, 0.075);
  color: var(--muted-2);
  font: 8px/1 var(--mono);
  letter-spacing: 0.06em;
}

.dock-hints b {
  color: #9fb3b6;
  font-weight: 500;
}

/* ----------------------------------------------------------------------------
   Readouts, compass, tooltip
---------------------------------------------------------------------------- */

.scene-readout {
  position: absolute;
  z-index: 12;
  right: 28px;
  bottom: 25px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 154px;
  padding: 10px 12px;
  border-left: 1px solid rgba(127, 232, 255, 0.22);
  background: linear-gradient(90deg, rgba(5, 12, 15, 0.55), transparent);
  pointer-events: none;
}

.readout-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted-2);
  font: 7.5px/1 var(--mono);
  letter-spacing: 0.08em;
}

.readout-row b {
  color: var(--ice-dim);
  font-weight: 500;
}

.axis-compass {
  position: absolute;
  z-index: 12;
  right: 36px;
  bottom: 157px;
  width: 72px;
  height: 72px;
  border: 1px solid rgba(127, 232, 255, 0.12);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(8, 19, 22, 0.7), rgba(3, 7, 9, 0.1) 68%);
  pointer-events: none;
}

.axis-compass::before,
.axis-compass::after {
  content: "";
  position: absolute;
  background: rgba(127, 232, 255, 0.12);
}

.axis-compass::before {
  left: 50%;
  top: 7px;
  bottom: 7px;
  width: 1px;
}

.axis-compass::after {
  top: 50%;
  left: 7px;
  right: 7px;
  height: 1px;
}

.compass-ring {
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(127, 232, 255, 0.18);
  border-radius: 50%;
}

.compass-label {
  position: absolute;
  z-index: 2;
  color: var(--muted-2);
  font: 7px/1 var(--mono);
}

.compass-label--n { top: 4px; left: 50%; transform: translateX(-50%); color: var(--ice-dim); }
.compass-label--e { right: 5px; top: 50%; transform: translateY(-50%); }
.compass-label--s { bottom: 4px; left: 50%; transform: translateX(-50%); }
.compass-label--w { left: 5px; top: 50%; transform: translateY(-50%); }

.compass-needle {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 1px;
  height: 24px;
  transform-origin: 50% 0;
  background: linear-gradient(180deg, var(--ice), transparent);
  box-shadow: 0 0 6px rgba(127, 232, 255, 0.7);
  transition: transform 0.1s linear;
}

.hover-tooltip {
  position: absolute;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  border: 1px solid rgba(127, 232, 255, 0.28);
  background: rgba(4, 11, 14, 0.92);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  pointer-events: none;
  opacity: 0;
  transform: translate(12px, 14px);
  transition: opacity 0.16s;
}

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

.ht-index {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  background: rgba(127, 232, 255, 0.1);
  color: var(--ice);
  font: 600 8px/1 var(--mono);
}

.hover-tooltip div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hover-tooltip strong {
  font-family: var(--display);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.hover-tooltip small {
  color: var(--muted);
  font: 7.5px/1 var(--mono);
  letter-spacing: 0.08em;
}

/* ----------------------------------------------------------------------------
   Guide, boot, toast
---------------------------------------------------------------------------- */

.guide-modal {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(1, 4, 5, 0.68);
  backdrop-filter: blur(9px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s var(--ease);
}

.guide-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.guide-card {
  position: relative;
  width: min(510px, 100%);
  padding: 27px 29px 25px;
}

.guide-card h2 {
  margin: 0 0 20px;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-bottom: 23px;
  background: rgba(127, 232, 255, 0.1);
  border: 1px solid rgba(127, 232, 255, 0.1);
}

.guide-step {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 13px;
  padding: 13px 14px;
  background: rgba(4, 9, 11, 0.76);
}

.guide-step > span {
  color: var(--ice);
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.06em;
  padding-top: 3px;
}

.guide-step h3 {
  margin: 0 0 5px;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.guide-step p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.guide-start {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 42px;
  padding: 0 15px;
  border: 1px solid rgba(127, 232, 255, 0.4);
  background: linear-gradient(90deg, rgba(127, 232, 255, 0.16), rgba(127, 232, 255, 0.035));
  color: var(--ice-bright);
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.24s;
}

.guide-start span {
  color: var(--muted);
  font: 8px/1 var(--mono);
  letter-spacing: 0.12em;
}

.guide-start:hover {
  background: rgba(127, 232, 255, 0.2);
  box-shadow: 0 0 24px rgba(127, 232, 255, 0.12);
}

.boot-screen {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(16, 44, 51, 0.36), transparent 33%),
    #030607;
  transition: opacity 0.75s var(--ease), visibility 0.75s;
}

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

.boot-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 106px;
  height: 106px;
  margin-bottom: 29px;
}

.boot-ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(127, 232, 255, 0.18);
  border-radius: 50%;
  border-top-color: var(--ice);
  animation: ringSpin 2.6s linear infinite;
}

.boot-ring--two {
  inset: 13px;
  border-color: rgba(225, 29, 46, 0.25);
  border-bottom-color: var(--red);
  animation-direction: reverse;
  animation-duration: 3.7s;
}

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

.boot-letter {
  display: grid;
  place-items: center;
  width: 48px;
  height: 54px;
  border: 1px solid rgba(239, 214, 150, 0.5);
  color: #e6cb88;
  font: 600 32px/1 Georgia, serif;
  clip-path: polygon(50% 0, 94% 13%, 89% 72%, 50% 100%, 11% 72%, 6% 13%);
  background: #141819;
}

.boot-kicker {
  margin: 0 0 8px;
  color: var(--ice-dim);
  font: 9px/1 var(--mono);
  letter-spacing: 0.24em;
}

.boot-screen h2 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 47px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.boot-sub {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.boot-bar {
  width: min(310px, 70vw);
  height: 1px;
  margin-bottom: 10px;
  overflow: hidden;
  background: rgba(127, 232, 255, 0.12);
}

.boot-bar i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--ice));
  box-shadow: 0 0 12px rgba(127, 232, 255, 0.7);
  transition: width 0.3s var(--ease);
}

.boot-meta {
  display: flex;
  justify-content: space-between;
  width: min(310px, 70vw);
  color: var(--muted-2);
  font: 7.5px/1 var(--mono);
  letter-spacing: 0.1em;
}

.toast {
  position: absolute;
  z-index: 34;
  left: 348px;
  bottom: 31px;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 280px;
  padding: 7px 11px;
  border-left: 1px solid rgba(127, 232, 255, 0.38);
  background: rgba(4, 10, 12, 0.62);
  color: var(--muted);
  font: 8px/1.35 var(--mono);
  letter-spacing: 0.03em;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast-dot {
  width: 4px;
  height: 4px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--ice);
  box-shadow: 0 0 7px rgba(127, 232, 255, 0.9);
}

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

@media (max-width: 1320px) {
  .topbar {
    grid-template-columns: minmax(320px, 1fr) auto auto;
    gap: 16px;
    padding-left: 22px;
    padding-right: 22px;
  }

  .hero-metrics {
    gap: 12px;
    padding-left: 8px;
    padding-right: 8px;
  }

  .hero-metric {
    min-width: 65px;
  }

  .hero-metric strong {
    font-size: 19px;
  }

  .icon-btn {
    min-width: 48px;
  }

  .icon-btn span {
    font-size: 8px;
  }

  .index-panel {
    left: 22px;
    width: 280px;
  }

  .detail-panel {
    right: 22px;
    width: 330px;
  }

  .control-dock {
    width: min(660px, calc(100vw - 660px));
    min-width: 500px;
  }

  .toast {
    left: 318px;
  }
}

@media (max-width: 1120px) {
  .topbar {
    grid-template-columns: minmax(300px, 1fr) auto;
  }

  .hero-metrics {
    display: none;
  }

  .control-dock {
    width: min(620px, calc(100vw - 420px));
    min-width: 470px;
  }

  .index-panel {
    width: 255px;
  }

  .detail-panel {
    width: 310px;
  }

  .brand-sub {
    font-size: 8px;
  }

  .toast {
    left: 297px;
  }

  .scene-readout {
    display: none;
  }

  .axis-compass {
    right: 24px;
    bottom: 154px;
  }
}

@media (max-width: 900px) {
  .topbar {
    padding: 17px 17px 12px;
    grid-template-columns: 1fr auto;
  }

  .topbar::after {
    left: 17px;
    right: 17px;
  }

  .crest {
    width: 39px;
    height: 48px;
  }

  .crest-inner {
    width: 25px;
    height: 28px;
    font-size: 18px;
  }

  .eyebrow {
    font-size: 7.5px;
    letter-spacing: 0.15em;
  }

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

  .brand-sub {
    display: none;
  }

  .engine-type {
    font-size: 8px;
  }

  .top-actions .mobile-only {
    display: flex;
  }

  .icon-btn {
    min-width: 40px;
  }

  .icon-btn span {
    display: none;
  }

  .index-panel {
    top: 100px;
    left: 12px;
    bottom: auto;
    width: min(280px, calc(100vw - 24px));
    height: min(60vh, 470px);
    transform: translateX(calc(-100% - 24px));
    opacity: 0;
    pointer-events: none;
  }

  .index-panel.is-mobile-open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }

  .detail-panel {
    top: auto;
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-height: min(62vh, 520px);
    transform: translateY(calc(100% + 25px));
  }

  .detail-panel.is-open {
    transform: translateY(0);
  }

  .detail-scroll {
    max-height: min(62vh, 520px);
  }

  .control-dock {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    min-width: 0;
    transform: none;
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 12px 13px 9px;
  }

  .control-dock.is-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(15px);
  }

  .dock-status {
    display: none;
  }

  .dock-main {
    gap: 8px;
  }

  .dock-hints {
    gap: 10px;
    font-size: 7px;
  }

  .dock-hints span:nth-child(2n) {
    display: none;
  }

  .axis-compass {
    display: none;
  }

  .toast {
    left: 14px;
    bottom: 102px;
    max-width: calc(100vw - 28px);
  }

  .part-label {
    display: none !important;
  }

  .leader-lines {
    display: none;
  }

  .labels-layer {
    display: none;
  }
}

@media (max-width: 900px) {
  .top-actions [data-action="labels"],
  .top-actions [data-action="fullscreen"] {
    display: none;
  }
}

@media (max-width: 480px) {
  .crest {
    display: none;
  }

  .brand {
    gap: 0;
  }

  .brand-title-row {
    gap: 9px;
  }

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

  .engine-type {
    padding: 3px 5px;
    font-size: 7px;
  }

  .top-actions {
    gap: 0;
  }

  .icon-btn {
    min-width: 33px;
    padding: 7px 5px;
  }

  .icon-btn svg {
    width: 15px;
    height: 15px;
  }

  .dock-main-btn {
    min-width: 88px;
    padding: 0 8px;
    font-size: 9px;
  }

  .dock-icon-btn {
    display: none;
  }

  .dock-hints {
    justify-content: space-between;
  }

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

  .detail-panel {
    max-height: 68vh;
  }

  .detail-scroll {
    max-height: 68vh;
    padding: 18px 17px 17px;
  }
}

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