:root{font-family:Inter,"Microsoft YaHei",system-ui,sans-serif;color:#253b39;background:#f6f5f0;font-synthesis:none;font-size:15px}*{box-sizing:border-box}body{margin:0}button{font:inherit;cursor:pointer;border:1px solid #d7ded7;background:#fffdfa;color:#29403c;border-radius:10px;min-height:42px;padding:9px 16px;transition:transform .15s}button:hover{background:#e7eee7}button:focus-visible,a:focus-visible{outline:3px solid #619e89;outline-offset:3px}button.active,.primary{background:#285c50;color:white;border-color:#285c50}button[disabled]{opacity:.5;cursor:wait}header{height:88px;padding:18px 32px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #dce1d9;background:#fbfaf6;gap:20px}.brand{display:flex;gap:13px;align-items:center}.brand-icon{font-size:40px;color:#42685b}.brand small{font-size:10px;letter-spacing:2px;color:#67827a}.brand h1{font-size:23px;letter-spacing:2px;margin:3px 0 0;font-weight:600}.switch{display:flex;border:1px solid #dbe1d8;padding:4px;border-radius:13px;background:#f0f2ec;gap:4px}.switch button{border:0;min-width:118px;background:transparent}.switch button.active{background:#285c50}.quiet{background:transparent}main{display:grid;grid-template-columns:260px 1fr;height:calc(100dvh - 134px);min-height:570px}aside{padding:28px 23px 18px;border-right:1px solid #dce1d9;display:flex;flex-direction:column;background:#fbfaf6;overflow:auto}.chapter{font-size:11px;color:#6b8178;letter-spacing:.6px}aside h2{font-size:25px;line-height:1.5;font-weight:500;margin:20px 0 9px}.intro{font-size:12px;line-height:1.9;color:#75817b;margin:0 0 22px}.parts{display:grid;grid-template-columns:1fr 1fr;gap:8px}.parts button{text-align:left;font-size:13px;padding:10px 9px;border-radius:8px;background:transparent}.parts button.active{background:#e6eee6;color:#234d41;border-color:#98b3a2}.parts i{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:7px;background:var(--part-color)}.aside-bottom{margin-top:auto;padding-top:25px;color:#698074;font-size:11px;display:flex;align-items:center;gap:7px}.dot{width:6px;height:6px;background:#629574;border-radius:50%}.workspace{position:relative;overflow:hidden;background:radial-gradient(ellipse at 50% 38%,#fffefa,#f0eee6)}#stage{position:absolute;inset:0}canvas{display:block;touch-action:none;width:100%;height:100%}.stage-head{position:absolute;top:24px;left:28px;right:28px;display:flex;justify-content:space-between;pointer-events:none;font-size:13px;color:#556960;align-items:center}.tag{font-size:10px;letter-spacing:1px;border:1px solid #c9d2c6;padding:6px 10px;border-radius:20px}.stage-tools{position:absolute;bottom:28px;left:50%;transform:translateX(-50%);display:flex;gap:7px;white-space:nowrap}.stage-tools button{font-size:12px;background:#fffffff0;box-shadow:0 3px 12px #3c554010}.view-hint{position:absolute;left:28px;top:62px;font-size:11px;color:#8c968b}.detail{position:absolute;right:24px;bottom:89px;width:300px;background:#fffefaed;backdrop-filter:blur(14px);padding:22px;border-radius:16px;border:1px solid #d7ded3;box-shadow:0 10px 35px #2a443111}.detail small{color:#718475;font-size:10px;letter-spacing:1px}.detail h2{margin:5px 0 10px;font-size:23px;font-weight:500}.detail p{font-size:13px;line-height:1.9;margin:0 0 20px;color:#63706a}.detail-actions{display:flex;flex-wrap:wrap;gap:7px}.detail-actions button{font-size:12px;min-height:38px;padding:8px 11px}.detail-actions .primary{width:100%}.loading{position:absolute;inset:0;display:grid;place-content:center;text-align:center;background:#f6f5efe8;color:#54725f;font-size:13px}.loading span{width:28px;height:28px;margin:auto;border:2px solid #cbd8c9;border-top-color:#477a5d;border-radius:50%;animation:spin 1s infinite linear}@keyframes spin{to{transform:rotate(360deg)}}[hidden]{display:none!important}#error{position:absolute;left:20%;right:20%;top:25%;background:#fff8eb;color:#885934;padding:20px;border:1px solid #dac3a3;border-radius:12px;font-size:13px}footer{height:46px;display:flex;align-items:center;justify-content:space-between;padding:0 25px;border-top:1px solid #dce1d9;font-size:10px;color:#788278;gap:12px}footer button{border:0;background:none;font-size:11px;min-height:30px;padding:4px}#labels{position:absolute;inset:0;pointer-events:none}.model-label{position:absolute;font-size:11px;white-space:nowrap;background:#fffcf2e8;border:1px solid #d9d9c7;border-radius:5px;padding:4px 7px;transform:translate(-50%,-100%);color:#456354}.model-label::after{content:'';height:12px;width:1px;background:#96a28e;position:absolute;left:50%;bottom:-12px}dialog{border:1px solid #d5dfd2;border-radius:18px;background:#fffefa;color:#344c42;padding:30px;max-width:650px;line-height:1.9;font-size:14px;max-height:85vh}dialog::backdrop{background:#1d322866;backdrop-filter:blur(3px)}.dialog-close{float:right;font-size:12px}dialog a{color:#286e55}summary{cursor:pointer}details p{font-size:12px} @media(max-width:900px){header{padding:12px 18px;height:78px}.brand h1{font-size:19px}.brand small{font-size:8px}.brand-icon{display:none}main{grid-template-columns:205px 1fr;height:calc(100dvh - 124px)}aside{padding:20px 15px}aside h2{font-size:21px}.detail{width:245px;right:15px;padding:16px}.stage-tools{bottom:18px;gap:5px}.stage-tools button{padding:8px 10px;font-size:11px}footer span:nth-child(2){display:none}}@media(max-width:620px){header{height:110px;flex-wrap:wrap;gap:8px;padding:10px 14px}.brand{flex:1}.switch{order:3;width:100%;justify-content:center;padding:2px}.switch button{min-height:34px;font-size:12px;flex:1}.quiet{font-size:11px;min-height:34px;padding:6px 10px}main{display:flex;flex-direction:column;height:auto;min-height:0}aside{order:2;border-right:0;border-top:1px solid #dce1d9;padding:16px}.chapter,.intro,aside h2,.aside-bottom{display:none}.parts{grid-template-columns:repeat(4,1fr);gap:6px}.parts button{font-size:11px;min-height:36px;padding:7px 5px}.parts i{margin-right:4px;width:6px;height:6px}.workspace{height:calc(100dvh - 290px);min-height:390px}.stage-head{top:16px;left:16px;right:16px;font-size:11px}.view-hint{top:47px;left:16px;font-size:10px}.tag{font-size:8px}.stage-tools{bottom:14px;width:100%;justify-content:center}.stage-tools button{font-size:10px;padding:7px 10px;min-height:36px}.detail{bottom:59px;width:210px;padding:12px;right:10px}.detail h2{font-size:19px}.detail p{font-size:11px;margin-bottom:10px}.detail small{font-size:9px}.detail-actions button{font-size:10px;min-height:31px;padding:6px 8px}footer{height:38px;padding:0 14px;font-size:9px}}
/* 课堂布局：大字、主画面留给模型，详情进入单层操作栏。 */
:root{font-size:18px}header{height:82px;padding:12px 22px}.brand small{font-size:11px}.brand h1{font-size:25px}.switch button{font-size:20px;min-width:132px}button{min-height:46px}main{grid-template-columns:300px 1fr;height:calc(100dvh - 124px);min-height:600px}aside{padding:18px;overflow:visible}.chapter{font-size:14px}aside h2{font-size:25px;line-height:1.3;margin:12px 0}.intro{font-size:17px;margin:0 0 14px;line-height:1.5}.parts{gap:7px}.parts button{font-size:19px;min-height:48px;padding:8px}.parts i{width:10px;height:10px;margin-right:7px}.aside-bottom{font-size:14px;padding-top:12px}.stage-head{font-size:20px;top:18px;left:22px;right:22px}.tag{font-size:13px}.view-hint{font-size:15px;top:58px;left:22px}.stage-tools{bottom:18px;max-width:95%;justify-content:center;flex-wrap:wrap;white-space:normal;gap:6px}.stage-tools button{font-size:17px;min-height:44px;padding:8px 12px}.detail{position:static;width:auto;padding:12px 0 0;background:none;border:0;border-radius:0;box-shadow:none;backdrop-filter:none}.detail small{display:none}.detail h2{font-size:23px;margin:0 0 6px}.detail p{font-size:17px;line-height:1.6;margin:0 0 10px}.detail-actions button{font-size:17px;min-height:44px;padding:8px 10px}.detail-actions .primary{width:auto;flex:1}.detail-actions{gap:6px}.loading,#error{font-size:18px}footer{height:42px;font-size:12px}footer button{font-size:16px;min-height:38px}.model-label{font-size:17px;padding:5px 8px}dialog{font-size:18px}details p{font-size:15px}.dialog-close{font-size:17px}button[aria-pressed=true]{background:#285c50;color:white}#zoom-in,#zoom-out{font-size:21px;min-width:46px}body:fullscreen{overflow:auto;background:#f6f5f0}
@media(max-height:820px) and (min-width:951px){main{min-height:580px}.brand small,.intro{display:none}aside h2{font-size:23px;margin:10px 0}.parts button{min-height:42px;font-size:18px}.detail p{font-size:16px;line-height:1.5}.detail-actions button{min-height:42px}.aside-bottom{display:none}}
@media(max-width:1100px){main{grid-template-columns:270px 1fr}.tag{display:none}.stage-tools button{font-size:16px;padding:8px}.detail p{font-size:16px}footer span:nth-child(2){display:none}}
@media(max-width:950px){header{padding:10px 14px}.brand h1{font-size:22px}.brand small{display:none}main{grid-template-columns:240px 1fr;height:calc(100dvh - 124px);min-height:660px}aside{padding:14px}.parts button{font-size:17px;padding:7px}.parts i{margin-right:5px}aside h2{font-size:22px}.stage-tools{bottom:12px;width:95%}.stage-head{font-size:19px;left:16px}.view-hint{font-size:14px;left:16px}.detail{width:auto}.detail h2{font-size:22px}.detail-actions button{font-size:16px}.intro{font-size:16px}}
@media(max-width:650px){header{height:auto;min-height:116px;gap:8px;flex-wrap:wrap}.brand{flex:1}.brand h1{font-size:23px}.quiet{font-size:16px;min-height:44px}.switch{order:3;width:100%;padding:3px}.switch button{font-size:19px;min-height:44px;flex:1}main{display:flex;flex-direction:column;height:auto;min-height:0}.workspace{order:0;height:58dvh;min-height:430px}aside{order:1;padding:14px;overflow:visible}.chapter{display:block;font-size:14px;margin-bottom:10px}aside h2,.intro,.aside-bottom{display:none}.parts{grid-template-columns:repeat(3,1fr);gap:7px}.parts button{font-size:17px;min-height:46px}.parts i{width:8px;height:8px}.stage-head{font-size:18px;top:14px;right:14px}.view-hint{font-size:14px;top:45px}.stage-tools{bottom:10px;gap:5px}.stage-tools button{font-size:16px;padding:7px 10px;min-height:44px}.detail{width:auto;padding-top:14px}.detail h2{font-size:24px}.detail p{font-size:18px;margin-bottom:12px}.detail-actions button{font-size:18px;min-height:46px}.detail-actions .primary{flex:0 1 auto}footer{height:auto;min-height:44px;font-size:12px;padding:6px 14px}footer button{font-size:15px}#error{left:10%;right:10%;top:22%}}
.detail-actions{display:grid;grid-template-columns:1fr 1fr}.detail-actions .primary{width:100%;grid-column:1/-1}.stage-tools{width:calc(100% - 32px);max-width:850px}.stage-tools button{flex:0 0 auto}.stage-head .tag{display:none}
.workspace.dark{background:radial-gradient(ellipse at 50% 42%,#243443,#101823 85%)}.dark .stage-head,.dark .view-hint{color:#e9f3f6}.dark .model-label{background:#172f43f5;color:#fff;border-color:#a3c2d3;box-shadow:0 2px 8px #0008}.dark .model-label::after{background:#d4efff}.dark .stage-tools button{background:#243949;color:#f4fafc;border-color:#718593}.dark .stage-tools button[aria-pressed=true]{background:#c1e2d3;color:#163e32}.nucleus-tools{display:flex;gap:6px;margin-top:8px}.nucleus-tools button{font-size:17px;flex:1;padding:8px}.detail-actions button:disabled{opacity:1;background:#e9eee9;color:#627268;border-color:#b4c0b6}.stage-tools #contrast{font-size:16px}
.model-label{transform:none;font-size:17px}.model-label::after{display:none}.label-lines{position:absolute;inset:0;width:100%;height:100%;overflow:visible;stroke:#52695d;stroke-width:1.2;opacity:.65}.dark .label-lines{stroke:#d8f0fa;opacity:.8}@media(max-width:650px){.model-label{font-size:15px;padding:5px}.label-lines{stroke-width:1}}
.view-tools{position:absolute;right:14px;top:82px;display:flex;flex-direction:column;gap:6px;width:56px;z-index:3}.view-tools button{min-height:46px;padding:7px 4px;font-size:17px;background:#fffdf8e8;box-shadow:0 2px 8px #0001}.view-tools button:disabled{opacity:1;color:#718078;background:#e6eae5}.dark .view-tools button{background:#243949;color:#f2fbff;border-color:#91a3af}.dark .view-tools button:disabled{color:#a1b0ba;background:#24303c}.dark .view-tools button[aria-pressed=true]{background:#c1e2d3;color:#153e32}.gesture-help{position:absolute;left:22px;top:54px;font-size:15px;z-index:4}.gesture-help summary{padding:4px 0}.gesture-help div{max-width:350px;background:#fffefa;border:1px solid #c3d0c4;border-radius:10px;padding:10px 14px;box-shadow:0 8px 30px #0002;line-height:1.6}.gesture-help p{font-size:16px;margin:4px 0}.dark .gesture-help{color:#f2f7f9}.dark .gesture-help div{background:#253b4b;border-color:#829da9}.view-hint{top:88px;max-width:70%}.stage-tools{bottom:16px}.stage-tools button{font-size:17px}
@media(max-width:650px){.view-tools{top:auto;bottom:72px;left:12px;right:12px;flex-direction:row;width:auto;justify-content:center}.view-tools button{min-width:48px;min-height:44px;font-size:16px}.gesture-help{left:16px;top:45px;font-size:14px}.gesture-help div{max-width:calc(100vw - 36px)}.view-hint{top:77px;font-size:13px}.stage-tools{bottom:12px;width:calc(100% - 16px);gap:5px}.stage-tools button{font-size:14px;padding:6px 7px;min-height:44px}.stage-tools #contrast{font-size:14px}.workspace{min-height:480px}}
.view-tools{right:60px}@media(max-width:650px){.view-tools{right:12px}}
@media(max-width:650px){.workspace{height:65dvh;min-height:540px}#stage,#labels{bottom:160px}.view-tools{bottom:105px}.stage-tools{bottom:8px;display:grid;grid-template-columns:repeat(3,1fr);gap:5px;max-width:360px}.stage-tools button{min-width:0;min-height:44px;width:100%}.view-hint{max-width:95%}.model-label{font-size:14px}}

.selection-tools{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}.selection-tools button{font-size:16px;padding:8px;flex:1;min-height:44px;white-space:nowrap}.selection-tools button:disabled{cursor:default;opacity:.55}aside{overflow-y:auto}
