/* =========================================================
 * 趋同集群 Convergence Flock — 实验台样式
 * 极简实验室风：暗青灰冷调 / 细边框 / 极小圆角 / 无阴影
 * ========================================================= */

:root {
  --bg: #12171a;
  --panel: #161c20;
  --panel-deep: #141a1e;
  --line: rgba(160, 180, 187, 0.16);
  --line-strong: rgba(160, 180, 187, 0.32);
  --text: #a0b4bb;
  --text-dim: rgba(160, 180, 187, 0.55);
  --text-faint: rgba(160, 180, 187, 0.34);
  --accent: #60a8b8;
  --curve: #73c2d1;
  --boid: #b8d6dd;
  --danger: #d66b6b;
  --obstacle: #44555c;
  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 300;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

button, input {
  font-family: inherit;
  font-weight: inherit;
  color: inherit;
}

:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- 顶栏 ---------- */
.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

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

.brand-mark {
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 13px solid var(--boid);
  opacity: 0.85;
  transform: rotate(18deg);
}

.brand-text h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: #c8dde3;
  white-space: nowrap;
}

.brand-en {
  margin-left: 8px;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.34em;
  color: var(--text-faint);
  vertical-align: 2px;
}

.brand-text p {
  margin: 1px 0 0;
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--text-faint);
}

.mode-tabs {
  display: flex;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  overflow: hidden;
  margin-left: auto;
}

.mode-tabs button {
  appearance: none;
  border: none;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--text-dim);
  padding: 8px 22px;
  font-size: 12px;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.mode-tabs button:last-child { border-right: none; }

.mode-tabs button:hover { color: var(--text); }

.mode-tabs button.active {
  background: rgba(96, 168, 184, 0.13);
  color: #d4e8ee;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ---------- 布局 ---------- */
.layout {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr) 352px;
  height: calc(100vh - 64px);
  min-height: 0;
}

.panel {
  background: var(--panel);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(160, 180, 187, 0.2) transparent;
}

.panel::-webkit-scrollbar { width: 6px; }
.panel::-webkit-scrollbar-thumb {
  background: rgba(160, 180, 187, 0.18);
  border-radius: 3px;
}
.panel::-webkit-scrollbar-track { background: transparent; }

.panel-left {
  border-right: 1px solid var(--line);
  padding: 4px 20px 26px;
}

.panel-right {
  border-left: 1px solid var(--line);
}

.stage-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #161c20;
}

#world {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.tool-hint {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  background: rgba(22, 28, 32, 0.82);
  border: 1px solid var(--line);
  border-radius: 2px;
  pointer-events: none;
}

.statusline {
  height: 34px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 16px;
  border-top: 1px solid var(--line);
  background: var(--panel-deep);
  font-size: 11px;
  color: var(--text-dim);
}

#statusKicker {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#statusRight {
  flex: none;
  font-variant-numeric: tabular-nums;
  color: var(--text-faint);
}

/* ---------- 左栏区块 ---------- */
.side-section {
  padding: 18px 0 20px;
  border-bottom: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.section-no {
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--text-faint);
}

.section-title {
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--text-dim);
}

.section-note {
  margin-left: auto;
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
}

.slider-row {
  margin-top: 15px;
}

.slider-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-dim);
}

.slider-head .val {
  color: var(--text);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

/* 滑块：2px 极细轨道，激活段使用 #60a8b8 */
input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 16px;
  margin: 4px 0 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  --p: 50%;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 2px;
  border-radius: 0;
  background: linear-gradient(
    90deg,
    var(--accent) 0%,
    var(--accent) var(--p),
    rgba(160, 180, 187, 0.15) var(--p),
    rgba(160, 180, 187, 0.15) 100%
  );
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  margin-top: -4px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
}

input[type="range"]::-moz-range-track {
  height: 2px;
  background: rgba(160, 180, 187, 0.15);
}

input[type="range"]::-moz-range-progress {
  height: 2px;
  background: var(--accent);
}

input[type="range"]::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
}

input[type="range"]:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ---------- 按钮 ---------- */
.ghost-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: transparent;
  color: var(--text);
  padding: 7px 14px;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.ghost-btn:hover:not(:disabled) {
  border-color: rgba(96, 168, 184, 0.7);
  color: #cfe6ec;
}

.ghost-btn.primary {
  border-color: rgba(96, 168, 184, 0.5);
  color: #bfe3ea;
}

.ghost-btn.primary:hover:not(:disabled) {
  background: rgba(96, 168, 184, 0.08);
}

.ghost-btn.small {
  padding: 5px 10px;
  font-size: 11px;
}

.ghost-btn.wide {
  width: 100%;
  margin-top: 14px;
}

.ghost-btn:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}

.ghost-btn.on {
  border-color: rgba(96, 168, 184, 0.6);
  color: #cfe6ec;
}

.row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.row .ghost-btn { flex: 1; }

.seg {
  display: flex;
  flex: 1;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  overflow: hidden;
}

.seg button {
  flex: 1;
  appearance: none;
  border: none;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--text-dim);
  padding: 6px 0;
  font-size: 11px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
  font-variant-numeric: tabular-nums;
}

.seg button:last-child { border-right: none; }
.seg button:hover { color: var(--text); }

.seg button.active {
  background: rgba(96, 168, 184, 0.14);
  color: #d4e8ee;
}

.link {
  appearance: none;
  border: none;
  background: none;
  padding: 0;
  margin-left: auto;
  color: var(--text-faint);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  cursor: pointer;
  border-bottom: 1px dotted rgba(160, 180, 187, 0.22);
  transition: color 0.16s ease, border-color 0.16s ease;
}

.link:hover:not(:disabled) {
  color: var(--accent);
  border-color: var(--accent);
}

.link:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ---------- 工具 ---------- */
.tools {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.tool-btn {
  flex: 1;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: transparent;
  color: var(--text-dim);
  padding: 7px 4px;
  font-size: 11px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.tool-btn:hover:not(:disabled) {
  color: var(--text);
  border-color: rgba(96, 168, 184, 0.5);
}

.tool-btn.active {
  border-color: rgba(96, 168, 184, 0.75);
  color: #cfe6ec;
  background: rgba(96, 168, 184, 0.08);
}

.tool-btn:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}

.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: none;
}

.dot-obstacle { border: 1px solid var(--obstacle); background: transparent; }
.dot-predator { background: var(--danger); }
.dot-remove { border: 1px solid var(--text-faint); background: transparent; }

.tool-links {
  display: flex;
  gap: 16px;
  margin-top: 12px;
}

.tool-links .link {
  margin-left: 0;
}

/* ---------- 复选框 ---------- */
.check {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
}

.check input {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 12px;
  height: 12px;
  margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: 1px;
  background: transparent;
  cursor: pointer;
  flex: none;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.check input:hover { border-color: rgba(96, 168, 184, 0.6); }

.check input:checked {
  border-color: var(--accent);
  background: rgba(96, 168, 184, 0.14);
}

.check input:checked::after {
  content: "";
  position: absolute;
  left: 3.5px;
  top: 1px;
  width: 3px;
  height: 6px;
  border-right: 1px solid var(--accent);
  border-bottom: 1px solid var(--accent);
  transform: rotate(40deg);
}

.side-note {
  margin: 18px 0 0;
  padding-top: 16px;
  font-size: 10.5px;
  line-height: 1.8;
  letter-spacing: 0.03em;
  color: var(--text-faint);
}

.demo-check {
  margin-top: 14px;
}

.demo-note {
  margin: 7px 0 0;
  font-size: 9.5px;
  line-height: 1.65;
  color: var(--text-faint);
}

/* 演示模式：略微放大关键读数，方便投影 */
body.demo-mode .metric-value {
  font-size: 52px;
}

body.demo-mode .metric-label::after {
  content: " · DEMO";
  color: var(--accent);
  letter-spacing: 0.12em;
}

body.demo-mode .chart-box {
  height: 192px;
}

body.demo-mode .active-guide {
  color: var(--text);
}

body.demo-mode .statusline {
  font-size: 11.5px;
}

/* ---------- 右栏：指标 ---------- */
.panel-right > section {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.metric-section {
  padding-top: 22px !important;
}

.metric-label {
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--text-faint);
}

.metric-label span {
  margin-left: 8px;
  font-size: 8px;
  letter-spacing: 0.28em;
  color: rgba(160, 180, 187, 0.22);
}

.metric-value {
  margin-top: 8px;
  display: flex;
  align-items: baseline;
  gap: 3px;
  color: #d4e8ee;
  font-weight: 200;
  font-size: 44px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.metric-unit {
  font-size: 15px;
  color: var(--text-dim);
  font-weight: 300;
}

.metric-sub {
  margin-top: 7px;
  font-size: 10.5px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.stat-grid {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
}

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

.stat-label {
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.1em;
}

.stat-value {
  font-size: 11.5px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* ---------- 曲线 ---------- */
.chart-section {
  padding-bottom: 14px !important;
}

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

.chart-legend {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
}

.legend-line {
  display: inline-block;
  width: 12px;
  height: 1px;
  margin-left: 6px;
  background: var(--curve);
}

.legend-dash {
  display: inline-block;
  width: 12px;
  height: 1px;
  margin-left: 8px;
  background: repeating-linear-gradient(
    90deg,
    rgba(160, 180, 187, 0.4) 0 2px,
    transparent 2px 4px
  );
}

.chart-box {
  position: relative;
  width: 100%;
  height: 168px;
  margin-top: 12px;
}

.chart-box canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
}

/* ---------- 模式面板 ---------- */
.mode-section {
  display: none;
}

.mode-section.active {
  display: block;
}

.panel-note {
  margin: 10px 0 0;
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--text-faint);
  letter-spacing: 0.02em;
}

.panel-note.dim {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.sub-head {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  color: var(--text-faint);
}

.exp-list {
  margin-top: 12px;
}

.exp-item {
  padding: 12px 0 13px;
  border-top: 1px solid var(--line);
}

.exp-item:first-child {
  border-top: none;
  padding-top: 4px;
}

.exp-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.exp-index {
  font-size: 9px;
  letter-spacing: 0.2em;
  color: rgba(160, 180, 187, 0.28);
}

.exp-badge {
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  border: 1px solid var(--line);
  border-radius: 1px;
  padding: 0 5px;
  line-height: 1.6;
}

.exp-name {
  margin: 4px 0 0;
  font-size: 12.5px;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--text);
}

.exp-desc {
  margin: 5px 0 8px;
  font-size: 10.5px;
  line-height: 1.75;
  color: var(--text-faint);
}

.exp-item.active .exp-name {
  color: #cfe6ec;
}

.exp-item.active .exp-index {
  color: var(--accent);
}

/* 进行中的场景框 */
.active-box {
  margin-top: 14px;
  padding: 12px 12px 13px;
  border: 1px solid rgba(96, 168, 184, 0.4);
  border-radius: 2px;
  background: rgba(96, 168, 184, 0.045);
}

.active-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #bfe3ea;
}

.active-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.active-guide {
  margin: 8px 0 0;
  font-size: 10.5px;
  line-height: 1.75;
  color: var(--text-dim);
}

.active-box .row {
  margin-top: 11px;
}

/* 记录列表 */
.record-list {
  margin-top: 8px;
}

.record-row {
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border: none;
  border-bottom: 1px solid var(--line);
  background: none;
  text-align: left;
  cursor: pointer;
  color: var(--text-dim);
  font-size: 10.5px;
  transition: color 0.16s ease;
}

.record-row:hover { color: #cfe6ec; }

.rec-name {
  letter-spacing: 0.06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rec-meta {
  flex: none;
  color: var(--text-faint);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
}

.empty-note {
  margin: 10px 0 0;
  font-size: 10.5px;
  color: var(--text-faint);
  letter-spacing: 0.02em;
}

/* 挑战难度 */
.challenge-list {
  margin-top: 12px;
}

.diff-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.diff-item:first-child { border-top: none; padding-top: 4px; }

.diff-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.diff-name {
  font-size: 12px;
  color: var(--text);
  letter-spacing: 0.1em;
}

.diff-desc {
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.02em;
}

.best {
  flex: none;
  font-size: 9.5px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.ch-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 11px;
}

.ch-stats div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ch-stats span {
  font-size: 9px;
  color: var(--text-faint);
  letter-spacing: 0.08em;
}

.ch-stats b {
  font-size: 13px;
  font-weight: 400;
  color: #cfe6ec;
  font-variant-numeric: tabular-nums;
}

.ch-best {
  margin: 9px 0 0;
  font-size: 9.5px;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}

.ch-best.beat {
  color: var(--accent);
}

.active-box > .ghost-btn {
  margin-top: 11px;
}

/* 沙盒 */
.explore-tip {
  margin: 13px 0 0;
  padding: 9px 10px;
  border-left: 1px solid rgba(96, 168, 184, 0.4);
  font-size: 10px;
  line-height: 1.7;
  color: var(--text-faint);
  background: rgba(96, 168, 184, 0.03);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.gallery img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  border: 1px solid var(--line);
  border-radius: 1px;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.16s ease, border-color 0.16s ease;
}

.gallery img:hover {
  opacity: 1;
  border-color: rgba(96, 168, 184, 0.55);
}

.gallery .empty-note {
  grid-column: 1 / -1;
}

/* ---------- 弹层 ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal[hidden] { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 11, 13, 0.72);
}

.modal-panel {
  position: relative;
  width: min(860px, 94vw);
  max-height: 92vh;
  overflow-y: auto;
  padding: 16px 18px 18px;
  background: var(--panel);
  border: 1px solid rgba(160, 180, 187, 0.3);
  border-radius: 2px;
  animation: fade-in 0.14s ease-out;
  scrollbar-width: thin;
  scrollbar-color: rgba(160, 180, 187, 0.2) transparent;
}

.modal-panel::-webkit-scrollbar { width: 6px; }
.modal-panel::-webkit-scrollbar-thumb {
  background: rgba(160, 180, 187, 0.18);
  border-radius: 3px;
}
.modal-panel::-webkit-scrollbar-track { background: transparent; }

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--text-faint);
}

.modal-content canvas,
.modal-content img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--line);
  border-radius: 1px;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

/* ---------- 游玩说明 ---------- */
.guide {
  max-width: 760px;
  font-size: 12px;
  line-height: 1.9;
  color: var(--text-dim);
}

.guide-lead {
  margin: 0 0 4px;
  font-size: 12px;
  line-height: 1.9;
  color: var(--text-dim);
}

.guide-section {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.guide-section h4 {
  margin: 0 0 8px;
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.22em;
  color: var(--text-faint);
}

.guide-section p {
  margin: 0 0 6px;
}

.guide ol,
.guide ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 5px;
}

.guide li {
  padding-left: 2px;
}

.guide li b {
  font-weight: 400;
  color: var(--text);
}

.guide ol li::marker {
  color: var(--accent);
  font-size: 10px;
}

.guide ul li::marker {
  color: var(--text-faint);
}

.g-icon {
  display: inline-block;
  margin-right: 8px;
  vertical-align: 1px;
}

.g-boid {
  width: 0;
  height: 0;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-bottom: 6px solid var(--boid);
}

.g-pred {
  width: 0;
  height: 0;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-bottom: 6px solid var(--danger);
}

.g-ring {
  width: 6px;
  height: 6px;
  border: 1px solid var(--obstacle);
  border-radius: 50%;
}

.key {
  display: inline-block;
  padding: 0 5px;
  margin: 0 2px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  font-size: 10px;
  line-height: 1.7;
  color: var(--text);
}

.guide-quote {
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  text-align: right;
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--text-faint);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1280px) {
  .layout { grid-template-columns: 264px minmax(0, 1fr) 324px; }
  .mode-tabs button { padding: 8px 15px; }
}

@media (max-width: 1080px) {
  body { overflow: auto; }
  .layout {
    grid-template-columns: 1fr;
    height: auto;
    min-height: calc(100vh - 64px);
  }
  .panel-left { order: 2; border-right: none; border-top: 1px solid var(--line); }
  .stage-col { order: 1; height: 68vh; min-height: 420px; }
  .panel-right { order: 3; border-left: none; border-top: 1px solid var(--line); }
  .topbar { gap: 10px; padding: 0 12px; }
  .brand-en { display: none; }
  .brand-text p { display: none; }
  .brand-text h1 { font-size: 15px; letter-spacing: 0.12em; }
  .mode-tabs button { padding: 7px 10px; font-size: 11px; }
  .top-actions { gap: 6px; }
  .top-actions .ghost-btn { padding: 5px 8px; font-size: 10.5px; white-space: nowrap; }
}