:root{font-family:system-ui,"Microsoft JhengHei",sans-serif;font-synthesis:none;color:#203b48;background:#edf2f4;--ink:#203b48;--muted:#587380;--accent:#245a6d;--line:#d7e2e7;--surface:#fff;--soft:#f4f8fa}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0;padding:10px 16px 12px;height:100dvh;display:grid;grid-template-rows:64px minmax(0,1fr) 124px;gap:12px}
button,select,input{font:inherit;touch-action:manipulation}
button,select{color:var(--ink);border:1px solid var(--line);border-radius:8px;background:var(--soft);padding:7px 10px;font-size:13px;min-height:32px}
button{cursor:pointer}
button:hover,select:hover{background:#e6eff3}
button.active,button[aria-pressed=true]{background:#deedf2;border-color:#79a7b8;color:#1b4c60}
button:disabled{opacity:.5;cursor:wait}
button:focus-visible,select:focus-visible,input:focus-visible,a:focus-visible,summary:focus-visible,canvas:focus-visible{outline:3px solid #4c96b0;outline-offset:3px}
a{color:var(--accent);text-underline-offset:3px}
input{accent-color:#31788f}
input[type=range]{cursor:pointer;margin:0;height:20px;min-width:0}
input[type=checkbox]{width:15px;height:15px;margin:0;flex-shrink:0}
h1,h2,p{margin:0}
h2{font-size:14px;font-weight:650;line-height:1.5}
.page-header{display:flex;justify-content:space-between;align-items:center;gap:16px;min-width:0}
.heading,.header-tools{display:flex;align-items:center;gap:16px;min-width:0}
.heading h1{font-size:24px;letter-spacing:-.025em;font-weight:650;line-height:1.3}
.eyebrow{font-size:10px;color:var(--muted);letter-spacing:.08em;line-height:1.6}
.back{font-size:13px;text-decoration:none;white-space:nowrap}
.divider{height:32px;width:1px;background:#cad9df}
.header-tools #status{font-size:11px;color:var(--muted);max-width:160px}
.header-tools select{max-width:220px;font-size:12px;background:#ffffffb0}
.workspace{min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 360px 300px;grid-template-rows:minmax(0,1fr);grid-template-areas:"model evidence inspector";gap:12px}
.panel{border:1px solid var(--line);border-radius:14px;background:var(--surface);min-width:0;box-shadow:0 4px 18px #25475305}
.panel-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-shrink:0}
.panel-heading small{color:var(--muted);font-size:11px}
.model-panel{grid-area:model;display:grid;grid-template-rows:42px minmax(0,1fr) 38px;overflow:hidden}
.model-heading{padding:7px 12px;background:#ffffff9e;border-bottom:1px solid #edf2f4}
.model-heading button{font-size:12px;min-height:28px;padding:4px 10px}
.model-hint{color:var(--muted);font-size:11px;margin-left:auto}
.viewport{position:relative;width:100%;height:100%;min-height:0;background:#edf2f4;overflow:hidden}
#scene{display:block;width:100%;height:100%;outline-offset:-3px}
#labels{position:absolute;inset:0;overflow:hidden;pointer-events:none}
.label{position:absolute;padding:5px 8px;border:1px solid #bbd1db;border-radius:7px;background:#ffffffef;color:#294957;font-size:12px;white-space:nowrap;transform:translate(-50%,-140%)}
.label:after{content:"";position:absolute;bottom:-9px;left:50%;height:8px;width:1px;background:#7e9aa7}
.process-status{position:absolute;top:10px;left:12px;padding:6px 10px;border:1px solid #c5dce5;border-radius:8px;background:#fffffff0;font-size:11px;color:#456d7e;pointer-events:none}
.scene-toolbar{display:flex;align-items:center;gap:16px;padding:7px 12px;border-top:1px solid #e3ecef;flex-wrap:wrap;font-size:12px;background:#fbfdfe}
.scene-toolbar label,.setting-checks label{display:flex;align-items:center;gap:6px;white-space:nowrap;cursor:pointer}
.toolbar-note{font-size:10px;color:var(--muted);margin-left:auto}
.inspector{grid-area:inspector;padding:14px;overflow:auto;scrollbar-width:thin;overscroll-behavior:contain}
.feature-picker .panel-heading{margin-bottom:10px}
.places{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.place{display:flex;align-items:center;gap:9px;text-align:left;font-size:13px;min-height:36px;padding:7px 10px}
.place span{font-size:10px;color:#6a8795;font-variant-numeric:tabular-nums}
.caption{margin:14px 0;padding-bottom:14px;border-bottom:1px solid var(--line)}
.caption small{font-size:10px;letter-spacing:.06em;color:var(--muted)}
.caption h2{font-size:17px;margin:5px 0 8px;line-height:1.5}
.caption p{font-size:13px;line-height:1.75;color:#486573;white-space:pre-line}
.ice-settings{border:0;margin:0;padding:0 0 12px;min-width:0;border-bottom:1px solid var(--line)}
.ice-settings legend{font-size:13px;font-weight:650;padding:0;margin-bottom:10px}
.setting-checks{display:flex;gap:18px;font-size:12px}
.opacity-heading{display:flex;justify-content:space-between;font-size:12px;margin:12px 0 3px}
.opacity-heading output{font-variant-numeric:tabular-nums;color:var(--accent)}
#ice-transparency{width:100%;height:22px}
.ice-caution{font-size:11px;color:var(--muted);line-height:1.65;margin-top:5px}
.phase-info{margin-top:12px}
.phase-info h2{font-size:12px}
.phase-info p{font-size:12px;line-height:1.7;color:var(--muted);margin-top:5px}
.science-note{font-size:11px;line-height:1.7;color:var(--muted);border-top:1px solid var(--line);margin-top:12px;padding-top:10px}
.science-note summary,.study-explanation summary{cursor:pointer;color:#426574}
.science-note p{margin-top:8px}
.evidence-grid{grid-area:evidence;display:grid;grid-template-columns:1fr;grid-template-rows:repeat(2,minmax(0,1fr));gap:12px;min-width:0;min-height:0}
.evidence-card{padding:10px 12px;display:flex;flex-direction:column;gap:5px;overflow:auto;scrollbar-width:thin;min-height:0}
.evidence-card .panel-heading{min-height:30px}
.cut-control{font-size:11px;display:flex;align-items:center;gap:5px;white-space:nowrap}
.cut-control select{font-size:11px;padding:4px 6px;min-height:28px}
#section-chart{width:100%;height:130px;flex:1 1 110px;min-height:95px;max-height:150px;display:block;fill:#516b76}
#section-chart text{font-size:23px}
.section-legend{display:flex;gap:12px;font-size:11px;color:var(--muted);flex-wrap:wrap}
#section-material{font-size:12px;line-height:1.6;color:#486573}
.section-caution{font-size:10px;line-height:1.5;color:var(--muted)}
.study-tabs{display:flex;gap:4px}
.study-tabs button{font-size:12px;min-height:28px;padding:4px 9px}
#study-title{font-size:14px}
#study-figure{width:100%;height:138px;display:block;flex:0 0 138px;border-radius:9px;background:#edf4f6}
#study-figure text{font-size:24px}
#study-figure text[font-size]{font-size:16px}
.study-actions{display:flex;gap:5px;flex-wrap:wrap}
.study-actions button{font-size:11px;min-height:29px;padding:5px 8px}
.study-explanation{font-size:11px;line-height:1.65;margin-top:2px}
.study-explanation[open]{padding-bottom:6px}
#study-body{font-size:13px;line-height:1.8;color:#486573}
#study-body p{margin:10px 0}
.study-note{font-size:11px;color:var(--muted);line-height:1.7}
.controls{padding:9px 16px;display:flex;flex-direction:column;gap:5px;min-width:0;min-height:0}
.timeline-top{display:flex;justify-content:space-between;align-items:center;gap:18px;min-height:34px}
.timeline-heading{display:flex;align-items:center;gap:12px;min-width:0}
.timeline-heading strong{font-size:14px}
.timeline-heading output{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums;white-space:nowrap}
.play-row{display:flex;align-items:center;gap:6px;flex-shrink:0}
.play-row button{font-size:12px;padding:5px 10px;min-height:30px}
#evolution-play{background:var(--accent);color:white;border-color:var(--accent);min-width:64px}
#evolution-play:hover{background:#347489}
.play-row label{font-size:12px;display:flex;gap:6px;align-items:center;margin-left:7px}
.play-row select{font-size:12px;min-height:30px;padding:4px 6px}
#evolution-seek{width:100%;height:18px}
#phase-buttons{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px}
#phase-buttons button{font-size:12px;padding:6px;min-height:30px;line-height:1.4}
.error{color:#a13838!important}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

@media(min-width:1151px) and (max-height:760px){body{grid-template-rows:56px minmax(0,1fr) 118px;gap:9px;padding-top:6px}
.workspace{grid-template-rows:minmax(0,1fr);gap:9px}
.evidence-grid{gap:9px}
.evidence-card{padding:7px 10px;gap:3px}
#study-figure{height:116px;flex-basis:116px}
#section-chart{min-height:75px}
.inspector{padding:11px}
.caption{margin:11px 0;padding-bottom:10px}
.caption p{font-size:12px;line-height:1.65}
.place{min-height:32px}
.ice-caution{font-size:10px}
.phase-info p{font-size:11px}
.scene-toolbar{gap:12px}
.toolbar-note{display:none}
.model-heading{padding:5px 10px}
}

@media(max-width:1150px){body{height:auto;min-height:100dvh;display:flex;flex-direction:column;padding:12px;gap:12px}
.page-header{min-height:60px;flex-wrap:wrap}
.workspace{display:grid;grid-template-columns:1fr;grid-template-rows:auto;grid-template-areas:"model" "inspector" "evidence";min-height:0}
.model-panel{height:clamp(340px,52dvh,620px);grid-template-rows:42px minmax(0,1fr) auto}
.scene-toolbar{min-height:38px}
.inspector{overflow:visible;display:grid;grid-template-columns:1fr 1fr;gap:14px 22px;padding:16px}
.caption{margin:0;padding:0;border:0}
.ice-settings{padding-bottom:0;border-bottom:0}
.phase-info{margin:0}
.science-note{grid-column:1/-1;margin:0}
.evidence-grid{grid-template-columns:1fr 1fr;grid-template-rows:auto;min-height:300px;align-items:start}
.evidence-card{min-height:290px;overflow:visible}
#study-figure{height:auto;max-height:170px;flex-basis:auto;aspect-ratio:19/6}
#section-chart{height:150px;flex:none;max-height:none}
.controls{min-height:126px;flex:none}
.timeline-heading .eyebrow{display:none}
.toolbar-note{display:none}
}

@media(max-width:650px){body{padding:10px;gap:10px}
.page-header{gap:10px}
.heading{gap:10px}
.heading h1{font-size:21px}
.heading .eyebrow{font-size:10px}
.back{font-size:12px}
.header-tools{width:100%;justify-content:space-between;gap:8px}
.header-tools #status{max-width:145px;font-size:11px}
.header-tools select{font-size:11px;max-width:195px;min-height:34px}
.model-panel{height:400px;max-height:65dvh;min-height:310px}
.model-hint{display:none}
.scene-toolbar{gap:8px 15px;padding:8px 10px;font-size:12px}
.scene-toolbar label{min-height:28px}
.inspector{grid-template-columns:1fr;gap:16px;padding:14px}
.caption{padding-bottom:14px;border-bottom:1px solid var(--line)}
.caption p{font-size:14px}
.caption h2{font-size:18px}
.places{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.place{font-size:12px;gap:5px;padding:7px;min-height:40px}
.place span{font-size:9px}
.evidence-grid{grid-template-columns:1fr;gap:10px}
.evidence-card{min-height:0;padding:12px;overflow:visible}
.evidence-card .panel-heading{margin-bottom:4px}
#section-chart{height:170px}
#study-figure{max-height:none;min-height:115px;height:auto}
.study-actions{display:grid;grid-template-columns:repeat(2,1fr);gap:6px}
.study-actions button{min-height:38px;font-size:12px}
.study-tabs button{min-height:34px}
.study-explanation{font-size:12px;line-height:1.75}
.controls{padding:12px;gap:8px}
.timeline-top{flex-direction:column;align-items:stretch;gap:9px}
.timeline-heading{justify-content:space-between;gap:8px}
.timeline-heading strong{font-size:14px}
.play-row{justify-content:space-between;gap:5px}
.play-row label{margin-left:auto}
.play-row button{min-height:36px}
.play-row select{min-height:36px}
.play-row label{font-size:11px}
#phase-buttons{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
#phase-buttons button{font-size:11px;min-height:38px}
input[type=range]{height:28px}
.process-status{font-size:10px;max-width:calc(100% - 24px)}
}

@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important}
}


@media(min-width:1151px) and (max-width:1350px){.workspace{grid-template-columns:minmax(0,1fr) 330px 280px}
.inspector{padding:12px}
.scene-toolbar{gap:10px}
.toolbar-note{display:none}
.model-hint{font-size:10px}
}


@media(min-width:1700px){.workspace{grid-template-columns:minmax(0,1fr) 420px 320px}
#study-figure{height:180px;flex-basis:180px}
#section-chart{max-height:210px;min-height:150px}
}

