/* 模块定位：明亮简约的大脑首页。核心职责：浅色空间、沉浸构图和外观面板。
 * 方法清单：舞台 / 导航 / 状态浮条 / 对话框 / 外观选择 / 响应式适配。
 * 拆分理由：纯展示样式，视觉偏好与研究核心、训练控制隔离。 */

.brain-stage { position: relative; height: 100svh; min-height: 780px; isolation: isolate; overflow: hidden; background: radial-gradient(ellipse at 67% 44%, #e1eafa85, transparent 49%), var(--bg); }
.ambient-grid { position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(#8f9eb833 .7px, transparent .7px); background-size: 26px 26px; mask-image: radial-gradient(ellipse at 65% 50%, #0008, transparent 63%); }
#brain-canvas { position: absolute; inset: 10% 1% 21% 24%; z-index: 0; touch-action: none; cursor: grab; }
#brain-canvas:active { cursor: grabbing; }
#brain-canvas canvas { display: block; width: 100%; height: 100%; }
.orbital-guide { position: absolute; left: 45%; top: 20%; width: 39vw; height: 39vw; max-height: 61vh; border: 1px solid #a5b6d221; border-radius: 50%; transform: rotate(-25deg); pointer-events: none; }
.orbital-guide:after { content: ""; position: absolute; inset: -7%; border: 1px solid #a5b6d210; border-radius: 50%; }
.orbital-guide span { position: absolute; top: 50%; left: -3px; width: 5px; height: 5px; background: #a7b9d45c; border-radius: 50%; }
.orbital-guide span + span { left: auto; right: -3px; }
.stage-heading { position: absolute; left: 7%; top: 24%; z-index: 2; pointer-events: none; }
.stage-heading button { pointer-events: auto; }
.eyebrow { font-size: 12px; letter-spacing: 3px; color: var(--muted); }
.stage-heading .eyebrow { display: flex; gap: 12px; align-items: center; margin: 0 0 29px; }
.eyebrow > span { display: inline-block; width: 22px; height: 1px; background: #a5b0c0; }
h1 { font-size: clamp(54px, 4.8vw, 76px); font-weight: 750; letter-spacing: -2px; line-height: 1.2; margin: 0 0 24px; }
h1 em { font-style: normal; color: var(--accent); }
.intro { font-size: 17px; line-height: 2; color: var(--muted); letter-spacing: 1px; margin: 0 0 32px; }
.explore-button { display: flex; align-items: center; gap: 36px; border-radius: 40px; background: #293e5a; color: #fff; padding: 17px 24px; font-size: 15px; letter-spacing: 1px; box-shadow: 0 8px 20px #293e5a16; }
.explore-button:hover:not(:disabled) { color: white; background: #3f5e85; box-shadow: 0 10px 24px #293e5a29; }
.explore-button span { font-size: 18px; }
.text-button { display: block; font-size: 14px; color: var(--muted); padding: 20px 0; }
.text-button span { margin-left: 17px; }
.object-caption { position: absolute; right: 6.5%; top: 28%; display: flex; gap: 14px; align-items: flex-start; pointer-events: none; }
.caption-line { width: 35px; height: 1px; background: #b3c0d3; margin-top: 8px; }
.object-caption p { font-size: 12px; letter-spacing: 2px; margin: 0; color: #697e98; }
.object-caption p > span { font: 12px ui-monospace, monospace; margin-left: 10px; color: #718198; }
.object-caption small { display: block; font-size: 12px; letter-spacing: 0; margin-top: 9px; color: #718198; }
.render-tag { position: absolute; right: 5%; bottom: 22%; display: flex; align-items: center; gap: 8px; color: #8796a9; font-size: 12px; letter-spacing: 1px; pointer-events: none; }
.render-tag small { font: 12px ui-monospace, monospace; color: #92a0b1; }
.style-switcher { position: absolute; left: 64%; bottom: 24%; transform: translateX(-50%); display: flex; gap: 3px; align-items: center; padding: 5px; border: 1px solid #fff; border-radius: 30px; background: #ffffffa6; box-shadow: 0 3px 22px #415b8310; white-space: nowrap; z-index: 2; }
.style-switcher > span { font-size: 12px; color: #91a0b1; margin: 0 8px; }
.style-switcher button { padding: 9px 13px; border-radius: 22px; font-size: 12px; color: #73829a; }
.style-switcher button[aria-pressed="true"] { color: #45699f; background: #eaf0f9; }
.live-dock { position: absolute; bottom: 9%; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 36px; border: 1px solid #fff; background: #ffffffba; box-shadow: 0 12px 50px #354c7010; backdrop-filter: blur(20px); border-radius: 18px; padding: 20px 25px; z-index: 2; }
.live-dock small { font-size: 12px; color: var(--muted); letter-spacing: 1px; display: block; margin-bottom: 8px; white-space: nowrap; }
.live-dock strong { font-size: 17px; font-weight: 400; line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dock-state { display: flex; align-items: center; gap: 15px; min-width: 145px; }
.dock-state strong { font-size: 15px; }
.dock-state > span { width: 29px; height: 29px; border: 1px solid #acc3db; border-radius: 50%; background: #edf3fa; }
.dock-state > span:after { content: ""; display: block; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); margin: 11px; }
.live-dock[data-running="true"] .dock-state > span { box-shadow: 0 0 18px #7fa8dd55; }
.dock-metric { min-width: 75px; }
.dock-details { border-left: 1px solid var(--line); padding: 14px 0 14px 26px; font-size: 14px; white-space: nowrap; }
.dock-details span { margin-left: 17px; color: var(--accent); }
.stage-foot { position: absolute; bottom: 25px; left: 4.5%; right: 4.5%; display: flex; justify-content: space-between; align-items: center; color: #718198; font-size: 12px; letter-spacing: 1px; gap: 20px; }
.stage-foot > div { display: flex; gap: 24px; }
.stage-foot button { font-size: 12px; color: #7d8a9b; padding: 8px 0; }
.interaction-hint b { margin: 0 12px; font-weight: normal; }
#gpu-error { position: absolute; right: 5%; top: 45%; width: min(440px, 90%); background: #fff6ed; border: 1px solid #dec3aa; color: #8c5b33; padding: 24px; z-index: 4; font-size: 17px; line-height: 1.8; }
.side-dialog { position: fixed; inset: 0 0 0 auto; margin: 0; width: 560px; max-width: 100%; height: 100dvh; max-height: 100dvh; border: 0; border-left: 1px solid #fff; padding: 30px 32px; background: var(--surface); color: var(--ink); box-shadow: -20px 0 100px #354c701a; overflow-y: auto; overscroll-behavior: contain; }
.side-dialog::backdrop { background: #788ba724; backdrop-filter: blur(9px); }
.dialog-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.close-button { border: 1px solid var(--line); border-radius: 50%; height: 34px; width: 34px; font-size: 17px; flex-shrink: 0; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
h2 { font-size: 28px; font-weight: 700; margin: 0; letter-spacing: -.5px; line-height: 1.5; }
.panel-description { color: var(--muted); font-size: 15px; line-height: 1.9; margin: 17px 0 28px; }
.status-label { font-size: 12px; color: var(--muted); border: 1px solid var(--line); padding: 5px 8px; border-radius: 20px; white-space: nowrap; }
.status-label.running { color: #438d74; }
.field { display: flex; flex-direction: column; gap: 10px; color: #677c95; font-size: 14px; margin-bottom: 20px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.control-actions { display: flex; gap: 9px; }
.control-actions button, .access button { border: 1px solid var(--line); border-radius: 8px; padding: 12px 15px; font-size: 14px; }
.control-actions .primary-button { display: flex; justify-content: space-between; flex: 1; gap: 12px; background: #375b8a; color: white; border-color: #375b8a; }
.access { margin: 22px 0 12px; font-size: 14px; color: var(--muted); }
.access summary { padding: 8px 0; }
.access .field { margin: 12px 0; }
.control-message { font-size: 14px; line-height: 1.8; color: var(--muted); min-height: 38px; }
.control-message.error { color: #ba6651; }
.world-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 27px 0 15px; padding-top: 23px; border-top: 1px solid var(--line); }
h3 { font-size: 15px; font-weight: 400; margin: 0; }
.world-heading > span { font-size: 12px; color: var(--muted); }
#game-window { display: block; width: 100%; height: 390px; border: 1px solid var(--line); border-radius: 8px; background: #f4f7fa; }
.world-note, .boundary { font-size: 12px; line-height: 1.8; color: #8796a7; }
.environment-link { display: flex; justify-content: space-between; padding: 20px 0; font-size: 14px; border-top: 1px solid var(--line); margin-top: 25px; color: var(--muted); }
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 20px 0; }
.metrics span { display: block; color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.metrics strong { font-size: 30px; font-weight: 650; }
.candidate { display: flex; align-items: center; gap: 12px; font-size: 14px; padding: 9px 0; color: var(--muted); }
.candidate > span:first-child { width: 75px; overflow-wrap: anywhere; }
.candidate-track { flex: 1; height: 3px; background: #e3eaf4; border-radius: 3px; }
.candidate-track i { display: block; height: 100%; background: #9aafc8; }
.candidate.selected { color: var(--accent); }
.candidate.selected i { background: var(--accent); }
.candidate small { width: 42px; text-align: right; font: 12px ui-monospace, monospace; }
.feedback-line { display: flex; align-items: center; gap: 15px; font-size: 14px; margin: 20px 0; color: var(--muted); }
.feedback-line strong { color: var(--accent); font-weight: 400; }
.feedback-line small { margin-left: auto; }
#event-list { list-style: none; padding: 0; margin: 0; max-height: 40vh; overflow: auto; }
#event-list li { display: grid; grid-template-columns: 56px 62px 1fr; gap: 9px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 12px; line-height: 1.8; color: #73849b; }
#event-list time { color: #94a2b5; font: 12px ui-monospace, monospace; padding-top: 3px; }
#event-list .event-phase { color: var(--accent); }
#event-list .empty-event { display: block; color: var(--muted); padding: 25px 0; }
.boundary { margin-top: 27px; }
.appearance-fieldset { border: 0; padding: 0; margin: 0 0 25px; min-width: 0; }
.appearance-fieldset legend { font-size: 14px; color: #677c95; margin-bottom: 13px; }
.shape-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.shape-options button { display: flex; align-items: center; flex-direction: column; padding: 15px 7px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; }
.shape-options button[aria-pressed="true"] { border-color: #7a9ac9; background: #eff4fc; box-shadow: 0 0 0 1px #7a9ac92b; }
.shape-options strong { font-size: 16px; font-weight: 650; margin: 15px 0 7px; }
.shape-options small { font-size: 12px; color: #718198; line-height: 1.6; text-align: center; }
.shape-preview { display: block; width: 42px; height: 42px; border-radius: 50%; background: radial-gradient(circle at 28% 23%, white, #c6d8ee 32%, #b6b6df 65%, #edcfc8); box-shadow: inset -3px -3px 8px #8d9db92b, 0 5px 10px #9cacc426; }
.liquid-preview { border-radius: 45% 55% 53% 47% / 47% 42% 58% 53%; transform: rotate(-20deg); }
.lobes-preview { position: relative; width: 49px; border-radius: 48%; }
.lobes-preview:after { content: ""; position: absolute; left: 50%; top: 3px; bottom: 3px; width: 2px; border-radius: 50%; background: #8da2c13d; }
.orbit-preview { position: relative; width: 36px; height: 36px; margin: 3px; }
.orbit-preview:after { content: ""; position: absolute; inset: -6px -13px; border: 1px solid #99afd5; border-radius: 50%; transform: rotate(-35deg) scaleY(.43); }
.palette-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.palette-options button { display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 12px 4px; border: 1px solid var(--line); border-radius: 10px; font-size: 12px; }
.palette-options button[aria-pressed="true"] { border-color: #7a9ac9; background: #eff4fc; }
.palette-options i { width: 24px; height: 24px; border-radius: 50%; border: 1px solid #ffffffc9; box-shadow: 0 2px 7px #61759614; }
.swatch-pearl { background: linear-gradient(135deg, #8dbef0, #c4b6ee, #f3d2c7); }
.swatch-lagoon { background: linear-gradient(135deg, #79cfc9, #cde6ed); }
.swatch-lilac { background: linear-gradient(135deg, #b2a2e8, #f0cddd); }
.swatch-coral { background: linear-gradient(135deg, #eab39e, #eed7bc); }
.range-field { display: block; margin: 25px 0; font-size: 14px; color: #677c95; }
.range-field > span, .range-field > small { display: flex; justify-content: space-between; align-items: center; }
.range-field output { color: var(--accent); font: 12px ui-monospace, monospace; }
.range-field input { accent-color: #7294c7; padding: 0; margin: 15px 0 10px; height: 5px; cursor: pointer; }
.range-field > small { font-size: 12px; color: #91a0b2; }
.toggle-field { display: flex; align-items: center; justify-content: space-between; font-size: 14px; color: #677c95; margin: 28px 0; }
.toggle-field input { accent-color: #7294c7; width: 17px; height: 17px; }
.reset-button { width: 100%; display: flex; justify-content: space-between; padding: 13px 16px; border: 1px solid var(--line); border-radius: 9px; font-size: 14px; }

/* 可读性层级：正文和交互控件优先，辅助标签保持清晰而不喧宾夺主。 */
.eyebrow { font-size: 13px; letter-spacing: 2px; }
.intro { font-size: 17px; line-height: 1.85; letter-spacing: .3px; }
.explore-button { font-size: 16px; font-weight: 600; padding: 18px 26px; }
.text-button { font-size: 15px; }
.object-caption p { font-size: 13px; letter-spacing: 1px; }
.object-caption small, .object-caption p > span { font-size: 12px; }
.style-switcher { bottom: 24%; padding: 6px; }
.style-switcher button { font-size: 14px; padding: 11px 14px; font-weight: 550; }
.style-switcher button:last-child { border-left: 1px solid var(--line); border-radius: 0 22px 22px 0; margin-left: 4px; }
.live-dock { gap: 36px; padding: 22px 28px; }
.live-dock small { font-size: 13px; letter-spacing: 0; }
.live-dock strong { font-size: 25px; font-weight: 650; }
.dock-state { min-width: 150px; }
.dock-state strong { font-size: 16px; font-weight: 600; }
.dock-details { font-size: 15px; font-weight: 550; }
.panel-description { font-size: 16px; line-height: 1.8; }
.field, .range-field, .toggle-field { font-size: 15px; font-weight: 550; }
.control-actions button, .access button, .reset-button { font-size: 15px; font-weight: 600; }
.access, .control-message { font-size: 14px; }
h3 { font-size: 16px; font-weight: 650; }
.world-heading > span { font-size: 13px; }
.world-note, .boundary { font-size: 13px; color: #718198; }
.environment-link { font-size: 15px; }
.appearance-fieldset legend { font-size: 15px; font-weight: 600; margin-bottom: 15px; }
.shape-options button { padding: 20px 12px 16px; }
.shape-options small { font-size: 13px; line-height: 1.7; }
.palette-options button { font-size: 14px; padding: 14px 5px; }
.range-field output { font-size: 14px; }
.range-field > small { font-size: 12px; }
.candidate, .feedback-line { font-size: 14px; }
.candidate > span:first-child { width: 90px; }
#event-list li { grid-template-columns: 68px 76px 1fr; font-size: 14px; gap: 10px; }
#event-list time { font-size: 12px; }
.close-button { width: 42px; height: 42px; font-size: 16px; }
.ribbons-preview { border-radius: 46%; background: none; box-shadow: none; border: 6px solid #b4c3e9; transform: rotate(-30deg) skew(-12deg); }
.ribbons-preview:after { content: ""; display: block; width: 34px; height: 34px; border: 5px solid #e3c7da; border-radius: 48%; transform: rotate(70deg) translate(-4px,-2px); }
.knot-preview { background: none; border: 9px solid #b6c6e9; box-shadow: none; border-radius: 40%; transform: rotate(-35deg); }
.knot-preview:after { content: ""; display: block; width: 23px; height: 32px; border: 6px solid #d8c4e5; border-radius: 48%; transform: translate(1px,-8px) rotate(50deg); }
.wave-preview { border-radius: 10% 65% 20% 45%; transform: rotate(-18deg) skewY(15deg); }
@media (min-width: 1700px) { .stage-heading { left: 10%; top: 29%; } }
@media (max-width: 1100px) {
  .stage-heading { left: 6%; top: 26%; }
  h1 { font-size: 46px; } #brain-canvas { left: 25%; right: -8%; top: 12%; bottom: 25%; }
  .object-caption { right: 4%; top: 25%; } .live-dock { gap: 25px; }
  .render-tag { bottom: 21%; } .style-switcher { bottom: 26%; left: 65%; }
  .interaction-hint { display: none; }
}
@media (max-width: 650px) {
  .brain-stage { height: max(100svh, 1080px); min-height: 1080px; }
  .stage-heading { top: 170px; left: 8%; right: 7%; }
  .stage-heading .eyebrow { font-size: 12px; letter-spacing: 1px; margin-bottom: 22px; gap: 9px; }
  h1 { font-size: clamp(40px, 11vw, 50px); font-weight: 750; line-height: 1.18; letter-spacing: -1px; margin-bottom: 22px; }
  .intro { font-size: 15px; line-height: 1.75; margin-bottom: 25px; letter-spacing: 0; }
  .explore-button { padding: 15px 20px; font-size: 15px; gap: 28px; }
  .text-button { display: none; }
  #brain-canvas { left: -8%; right: -8%; top: 480px; height: 310px; bottom: auto; }
  .orbital-guide { left: 12%; top: 500px; width: 78vw; height: 78vw; max-height: none; }
  .object-caption { top: 495px; right: 7%; } .caption-line { width: 18px; }
  .object-caption p { font-size: 12px; } .object-caption small { display: none; }
  .style-switcher { left: 50%; top: 805px; bottom: auto; display: grid; grid-template-columns: 1fr 1fr; width: 88%; gap: 4px; padding: 6px; border-radius: 18px; }
  .style-switcher button { font-size: 14px; padding: 11px 9px; border-radius: 12px; }
  .style-switcher button:last-child { border: 0; margin: 0; border-radius: 12px; }
  .render-tag { left: 0; right: 0; justify-content: center; top: 775px; bottom: auto; font-size: 11px; gap: 6px; }
  .render-tag small { font-size: 11px; }
  .live-dock { left: 6%; right: 6%; top: 925px; bottom: auto; transform: none; gap: 12px; padding: 17px 14px; border-radius: 15px; justify-content: space-between; }
  .dock-state { min-width: 0; gap: 9px; } .dock-state > span { width: 23px; height: 23px; flex-shrink: 0; }
  .dock-state > span:after { margin: 8px; }
  .live-dock small { font-size: 11px; margin-bottom: 7px; } .dock-state strong { font-size: 14px; }
  .dock-metric { min-width: 0; } .dock-metric strong { font-size: 21px; }
  .dock-details { font-size: 0; padding: 10px 0 10px 9px; } .dock-details span { font-size: 20px; margin: 0; }
  .stage-foot { left: 6%; right: 6%; bottom: 10px; gap: 8px; font-size: 10px; letter-spacing: 0; }
  .stage-foot > div { gap: 12px; } .stage-foot button { font-size: 11px; }
  .foot-note { display: none; } .interaction-hint { display: none; }
  .side-dialog { padding: 23px 20px; } .panel-heading h2 { font-size: 25px; }
  .shape-options { gap: 10px; } .shape-options button { padding: 18px 10px 14px; }
  .shape-options strong { font-size: 16px; } .shape-options small { font-size: 12px; }
  .palette-options { grid-template-columns: 1fr 1fr; gap: 9px; }
  .palette-options button { flex-direction: row; justify-content: center; font-size: 14px; }
  .field-row { gap: 10px; } .control-actions { gap: 6px; }
  .control-actions button { font-size: 14px; padding: 12px 10px; }
  #event-list li { grid-template-columns: 64px 68px 1fr; gap: 7px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { button, a { transition: none; } dialog::backdrop { backdrop-filter: none; } }
