/* 全量实验台。只作用于 #demo，不改变页面其余模块或数学模型。 */
#demo.lab-studio { padding:0; overflow:hidden; border:1px solid var(--border); border-radius:20px; background:var(--surface); box-shadow:0 16px 50px #172b2410; }
.lab-studio { --lab-accent:var(--c); --lab-paper:color-mix(in srgb,var(--surface) 96%,var(--c)); }
.lab-heading { padding:27px 28px 23px; display:flex; align-items:center; justify-content:space-between; gap:18px; background:linear-gradient(120deg,var(--lab-paper),var(--surface)); }
.lab-eyebrow { color:var(--c); font-size:10px; font-weight:750; letter-spacing:1.7px; margin-bottom:9px; }
.lab-eyebrow span { opacity:.5; }
.lab-heading h3 { font-size:23px; letter-spacing:-.5px; margin:0; }
.lab-heading p { font-size:13px; color:var(--muted); margin:6px 0 0; }
.lab-badge { display:flex; align-items:center; gap:7px; white-space:nowrap; border:1px solid var(--border); border-radius:30px; padding:7px 11px; color:var(--muted); font-size:11px; }
.lab-badge i,.lab-state i { width:6px; height:6px; border-radius:50%; background:var(--c); display:inline-block; }
.lab-guide { padding:11px 28px; display:flex; gap:28px; border-block:1px solid var(--border); color:var(--muted); font-size:11px; }
.lab-guide b { color:var(--c); font-size:10px; margin-right:5px; font-variant-numeric:tabular-nums; }
.lab-context { padding:13px 28px; border-bottom:1px solid var(--border); font-size:12px; background:var(--surface); color:var(--muted); }
.lab-context summary { cursor:pointer; color:var(--text); }
.lab-context p { line-height:1.85; margin:10px 0 0; }
.lab-body.demo { padding:24px 28px; border:0; border-radius:0; background:var(--lab-paper); }
.lab-body .demo-controls { gap:12px; margin-bottom:22px; grid-template-columns:repeat(auto-fit,minmax(195px,1fr)); }
.lab-body .demo-controls > label { background:var(--surface); border:1px solid var(--border); padding:14px 15px; border-radius:12px; font-size:12px; line-height:1.8; min-width:0; }
.lab-body label output { color:var(--c); font-size:14px; font-variant-numeric:tabular-nums; margin-left:6px; }
.lab-body input[type=range] { appearance:none; -webkit-appearance:none; height:6px; margin:16px 0 9px; border-radius:9px; background:linear-gradient(to right,var(--c) 0 var(--lab-fill,50%),var(--border) var(--lab-fill,50%) 100%); cursor:pointer; display:block; }
.lab-body input[type=range]::-webkit-slider-thumb { appearance:none; -webkit-appearance:none; width:17px; height:17px; background:var(--surface); border:4px solid var(--c); border-radius:50%; box-shadow:0 2px 5px #0002; }
.lab-body input[type=range]::-moz-range-thumb { width:10px; height:10px; background:var(--surface); border:4px solid var(--c); border-radius:50%; }
.lab-body :is(input,select,textarea,button):focus-visible,.lab-studio button:focus-visible { outline:3px solid color-mix(in srgb,var(--c) 50%,transparent); outline-offset:4px; }
.lab-body :is(input:not([type=range]):not([type=checkbox]):not([type=radio]),select,textarea) { max-width:100%; border-color:var(--border); border-radius:8px; background:var(--surface); color:var(--text); }
.lab-body canvas { border:1px solid var(--border); border-radius:12px; background:radial-gradient(ellipse at 25% 10%,color-mix(in srgb,var(--c) 6%,var(--surface)),var(--surface-2)); box-shadow:inset 0 1px 5px #00000004; margin-block:12px; }
.lab-body .btn-row { margin-block:14px; gap:8px; }
.lab-body .btn { border-radius:9px; font-size:12px; min-height:36px; }
.lab-body .demo-out { padding:17px 18px; border-radius:12px; border:1px solid var(--border); background:var(--surface); font-size:13px; line-height:1.85; overflow-wrap:anywhere; }
.lab-body .demo-out:empty { display:none; }
.lab-body .demo-metrics { gap:9px; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); }
.lab-body .demo-metric { position:relative; border:1px solid color-mix(in srgb,var(--c) 14%,var(--border)); border-radius:10px; background:linear-gradient(135deg,color-mix(in srgb,var(--c) 5%,var(--surface)),var(--surface)); padding:13px 14px; }
.lab-body .demo-metric span { font-size:11px; line-height:1.6; margin-bottom:7px; }
.lab-body .demo-metric b { font-size:20px; line-height:1.35; font-variant-numeric:tabular-nums; letter-spacing:-.3px; }
.lab-body .table { font-size:12px; }
.lab-body .matrix { display:block; max-width:100%; width:max-content; overflow-x:auto; }
.lab-toolbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:15px; padding:17px 28px; border-block:1px solid var(--border); background:var(--surface); }
.lab-state { display:flex; align-items:center; gap:8px; color:var(--muted); font-size:11px; }
.lab-state i { opacity:.4; }
.lab-adjusted .lab-state i { opacity:1; box-shadow:0 0 0 4px color-mix(in srgb,var(--c) 12%,transparent); }
.lab-actions { display:flex; gap:8px; }
.lab-studio :is(.lab-actions,.lab-notebook) button { font:inherit; font-size:12px; padding:8px 11px; background:var(--surface); color:var(--text); border:1px solid var(--border); border-radius:8px; cursor:pointer; }
.lab-actions button[data-lab=capture] { background:var(--c); color:#fff; border-color:transparent; }
.lab-studio button:disabled { opacity:.45; cursor:not-allowed; }
.lab-studio :is(.lab-actions,.lab-notebook) button:hover:not(:disabled) { filter:brightness(.94); }
.lab-notebook { padding:23px 28px; background:var(--lab-paper); }
.lab-notebook-title { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.lab-notebook h4 { font-size:14px; margin:0; }
.lab-notebook h4 span { font-size:10px; font-weight:400; color:var(--muted); margin-left:10px; }
.lab-empty { font-size:12px; color:var(--muted); padding:18px; border:1px dashed var(--border); border-radius:10px; margin:0; line-height:1.8; }
.lab-records { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:12px; }
.lab-record { min-width:0; border:1px solid var(--border); border-radius:12px; padding:14px; background:var(--surface); }
.lab-record-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; font-size:12px; }
.lab-notebook .lab-record-head button { padding:0; width:24px; height:24px; font-size:17px; color:var(--muted); border:0; }
.lab-record img { width:100%; display:block; border-radius:7px; border:1px solid var(--border); margin-bottom:12px; }
.lab-record details { font-size:11px; color:var(--muted); border-bottom:1px solid var(--border); padding-bottom:10px; margin-bottom:10px; }
.lab-record summary { cursor:pointer; line-height:1.7; }
.lab-record dl { font-size:11px; margin:10px 0 0; }
.lab-record dl div { display:flex; justify-content:space-between; gap:10px; margin-bottom:7px; align-items:baseline; }
.lab-record dt { color:var(--muted); }
.lab-record dd { margin:0; text-align:right; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; max-width:65%; }
.lab-record-metrics div { flex-direction:column; gap:3px !important; }
.lab-record-metrics { display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:10px; }
.lab-delta { font-size:10px; color:var(--muted); line-height:1.7; }
.lab-record-metrics dd { max-width:100%; text-align:left; color:var(--c); font-size:15px; font-weight:650; }
.lab-record-text { font-size:11px; white-space:pre-line; line-height:1.8; overflow-wrap:anywhere; margin:0; }
.lab-record > small { display:block; color:var(--muted); font-size:10px; margin-top:12px; }
.lab-boundary { padding:15px 28px 20px; display:flex; align-items:flex-start; gap:9px; color:var(--muted); background:var(--lab-paper); font-size:11px; }
.lab-boundary p { margin:0; line-height:1.8; }
.lab-boundary p span { opacity:.75; font-size:10px; }
.lab-announcement { height:1px; width:1px; overflow:hidden; position:absolute; clip-path:inset(50%); }
.lab-probe { position:fixed; z-index:50; pointer-events:none; max-width:270px; padding:11px 13px; border:1px solid var(--border); border-radius:10px; box-shadow:0 8px 24px #0002; background:var(--surface); color:var(--text); font-size:11px; line-height:1.8; white-space:pre-line; }
.lab-studio [hidden] { display:none !important; }
/* 保留已有的正午观测台；不覆盖它的材质与布局。 */
.lab-body:has(.earth-lab) { padding:0; }
.lab-body .earth-lab canvas { margin:0; border:0; box-shadow:none; border-radius:0; background:transparent; }
.lab-body .earth-lab input[type=range] { margin:9px 0 0; }
.lab-body .earth-lab .earth-lab-panel label { border:0; padding:0; background:transparent; }
@media(max-width:680px) {
 .lab-heading { padding:21px 19px; align-items:flex-start; }
 .lab-heading h3 { font-size:21px; }
 .lab-heading p { font-size:12px; }
 .lab-eyebrow { font-size:9px; letter-spacing:1.2px; }
 .lab-badge { display:none; }
 .lab-guide { padding:11px 19px; justify-content:space-between; gap:8px; font-size:10px; }
 .lab-context { padding:13px 19px; font-size:11px; }
 .lab-body.demo { padding:18px 15px; }
 .lab-body .demo-controls { grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:9px; }
 .lab-body .demo-controls > label { padding:12px 11px; font-size:11px; }
 .lab-body label output { font-size:12px; }
 .lab-body .demo-out { padding:14px 12px; font-size:12px; }
 .lab-body .demo-metrics { grid-template-columns:repeat(auto-fit,minmax(130px,1fr)); }
 .lab-body .demo-metric b { font-size:18px; }
 .lab-body .matrix :is(td,th) { padding:8px 7px; font-size:12px; }
 .lab-toolbar,.lab-notebook { padding:18px 19px; }
 .lab-toolbar { align-items:stretch; }
 .lab-actions { width:100%; }
 .lab-actions button { flex:1; }
 .lab-boundary { padding:0 19px 20px; }
 .lab-body:has(.earth-lab) { padding:0; }
 .lab-records { grid-template-columns:1fr; }
}
@media(prefers-reduced-motion:reduce) { .lab-studio * { scroll-behavior:auto; transition:none !important; } }
