:root {
  --bg: #091117;
  --bg-soft: #0f1d23;
  --panel: rgba(9, 17, 23, 0.62);
  --panel-strong: rgba(7, 13, 18, 0.82);
  --line: rgba(255, 255, 255, 0.14);
  --line-soft: rgba(255, 255, 255, 0.08);
  --ink: #f2f4f7;
  --muted: rgba(236, 241, 246, 0.72);
  --accent: #ff8a5b;
  --accent-cool: #79d7ea;
  --success: #8de27f;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  color-scheme: dark;
  font-family: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top, rgba(29, 69, 84, 0.36), transparent 34%),
    linear-gradient(180deg, #0a141a, var(--bg));
  color: var(--ink);
}

body {
  min-height: 100svh;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.page-shell {
  min-height: 100svh;
  padding: 14px;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 750;
  text-decoration: none;
}

.brand-link img {
  width: 34px;
  height: 34px;
}

.masthead-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.crumbs,
.status-chip,
.section-kicker,
.metric-card span,
.dock-note,
.dock-head span,
.reason-list,
.location-caption,
.objective-head span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.experience {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 14px;
  min-height: calc(100svh - 84px);
}

.stage,
.control-dock {
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.stage {
  position: relative;
  min-height: 720px;
  background:
    radial-gradient(circle at 20% 22%, rgba(121, 215, 234, 0.14), transparent 18%),
    radial-gradient(circle at 70% 10%, rgba(255, 138, 91, 0.09), transparent 20%),
    linear-gradient(180deg, rgba(11, 21, 28, 0.55), rgba(10, 16, 22, 0.88));
}

#scene-canvas,
.stage-scrim {
  position: absolute;
  inset: 0;
}

#scene-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.stage-scrim {
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 36%, rgba(8, 15, 20, 0.18) 70%, rgba(5, 10, 14, 0.56) 100%),
    linear-gradient(90deg, rgba(6, 12, 16, 0.82), transparent 33%, transparent 67%, rgba(6, 12, 16, 0.64));
}

.hero-panel {
  position: absolute;
  top: 24px;
  left: 24px;
  width: min(440px, calc(100% - 48px));
  z-index: 2;
  display: grid;
  gap: 18px;
}

.eyebrow {
  margin: 0;
  color: var(--accent-cool);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(52px, 8vw, 108px);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 15px;
}

.hero-line {
  margin: 0;
  max-width: 27rem;
  font-size: clamp(18px, 2.1vw, 22px);
  line-height: 1.5;
  color: rgba(243, 246, 250, 0.9);
}

.objective-block,
.answer-block {
  backdrop-filter: blur(16px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.objective-head,
.dock-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.objective-head strong {
  color: var(--accent);
}

#objective-title {
  margin-top: 8px;
  font-size: 24px;
}

#objective-body,
.feedback-line {
  margin: 8px 0 0;
  color: rgba(241, 245, 248, 0.9);
  line-height: 1.55;
}

.feedback-line {
  color: var(--accent-cool);
}

.answer-row,
.segmented,
.preset-row {
  display: grid;
  gap: 8px;
}

.answer-row {
  margin-top: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-rail {
  position: absolute;
  right: 24px;
  bottom: 24px;
  left: 24px;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.metric-card {
  min-height: 86px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 15, 21, 0.68);
  backdrop-filter: blur(18px);
  display: grid;
  align-content: space-between;
}

.metric-card strong {
  font-size: clamp(20px, 2vw, 28px);
}

.task-list {
  display: grid;
  gap: 8px;
}

.task-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 14, 20, 0.54);
  backdrop-filter: blur(12px);
}

.task-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
}

.task-item.completed .task-dot {
  background: var(--success);
  border-color: var(--success);
  box-shadow: 0 0 16px rgba(141, 226, 127, 0.44);
}

.task-item.current {
  border-color: rgba(255, 138, 91, 0.48);
}

.task-title {
  font-weight: 650;
}

.task-status {
  color: var(--muted);
  font-size: 12px;
}

.control-dock {
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(10, 16, 22, 0.9), rgba(6, 11, 16, 0.94)),
    var(--bg-soft);
  display: grid;
  align-content: start;
  gap: 16px;
  overflow-y: auto;
}

.dock-group {
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}

.dock-group:first-child {
  padding-top: 0;
  border-top: 0;
}

.dock-group.compact {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 14px;
}

.location-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.location-card {
  width: 100%;
  padding: 12px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.location-card:hover,
.segmented button:hover,
.preset-row button:hover,
.answer-row button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.28);
}

.location-card.active,
.segmented button.active,
.preset-row button.active,
.answer-row button.active {
  background: rgba(255, 138, 91, 0.16);
  border-color: rgba(255, 138, 91, 0.58);
}

.location-card strong {
  display: block;
  margin-bottom: 6px;
}

.three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.top-gap {
  margin-top: 8px;
}

.segmented {
  margin-top: 12px;
}

.segmented button,
.preset-row button,
.answer-row button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

#height-range {
  width: 100%;
  margin: 14px 0 12px;
  accent-color: var(--accent);
}

.number-field {
  display: grid;
  gap: 8px;
}

.number-field input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
}

.preset-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 10px;
}

.footprint-svg {
  width: 100%;
  aspect-ratio: 1;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(14, 24, 31, 0.88), rgba(8, 15, 21, 0.72)),
    radial-gradient(circle at 50% 50%, rgba(121, 215, 234, 0.06), transparent 56%);
}

.footprint-ring {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 1;
}

.footprint-shape {
  fill: rgba(255, 138, 91, 0.16);
  stroke: var(--accent);
  stroke-width: 3;
}

.footprint-aim {
  fill: none;
  stroke: rgba(121, 215, 234, 0.72);
  stroke-width: 2;
  stroke-dasharray: 5 5;
}

.footprint-dot {
  fill: rgba(255, 138, 91, 0.88);
}

.observer-dot {
  fill: #fff;
  stroke: #111;
  stroke-width: 2;
}

.reason-list {
  margin: 12px 0 0;
  padding-left: 18px;
}

.reason-list li + li {
  margin-top: 7px;
}

@media (max-width: 1180px) {
  .experience {
    grid-template-columns: 1fr;
  }

  .control-dock {
    overflow: visible;
  }
}

@media (max-width: 860px) {
  .page-shell {
    padding: 10px;
  }

  .stage {
    min-height: 820px;
  }

  .hero-panel {
    top: 18px;
    left: 18px;
    right: 18px;
    width: auto;
  }

  .metric-rail {
    right: 18px;
    bottom: 18px;
    left: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .masthead {
    align-items: flex-start;
    flex-direction: column;
  }

  .masthead-meta {
    width: 100%;
    justify-content: space-between;
  }

  .crumbs {
    display: none;
  }

  .stage {
    min-height: 920px;
  }

  .stage-scrim {
    background:
      radial-gradient(circle at 50% 42%, transparent 0 26%, rgba(7, 13, 18, 0.24) 60%, rgba(5, 10, 14, 0.72) 100%),
      linear-gradient(180deg, rgba(6, 12, 16, 0.88), rgba(6, 12, 16, 0.16) 36%, rgba(6, 12, 16, 0.52) 100%);
  }

  .hero-panel {
    gap: 14px;
  }

  .answer-row,
  .three-up,
  .two-up,
  .preset-row {
    grid-template-columns: 1fr;
  }

  .metric-rail {
    grid-template-columns: 1fr;
  }

  .metric-card {
    min-height: 76px;
  }
}

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