body{background:#f6f8fc}.demo-layout{max-width:1540px;margin:auto;display:grid;grid-template-columns:250px minmax(0,1fr);gap:18px;padding:20px}.demo-controls{background:white;border:1px solid #e2e8f0;border-radius:12px;padding:18px}.demo-controls h2{font-size:15px;color:#64748b;margin-bottom:14px}.model-list{display:grid;gap:6px;margin-bottom:24px}.model-button{text-align:left;background:#fff;border:1px solid transparent;border-radius:8px;padding:10px 12px;cursor:pointer;font:inherit}.model-button.active{color:#0062ff;background:#edf4ff;border-color:#c7dcff}.param{display:block;margin:16px 0;font-size:14px}.param select{width:100%;padding:8px;margin-top:8px}.param input{display:block;width:100%;margin-top:10px}.param output{float:right;color:#0062ff;font-variant-numeric:tabular-nums}.stage svg{display:block;width:100%;height:65vh;min-height:370px;max-height:690px;touch-action:none}.stage text{font-family:'Microsoft YaHei',sans-serif}.demo-main{min-width:0}.demo-readout{font-size:20px;color:#334155;padding:14px 3px;min-height:55px;font-variant-numeric:tabular-nums}.demo-actions{display:flex;gap:10px;flex-wrap:wrap}.hint{margin:12px 4px;color:#64748b;font-size:13px}[data-hit]{cursor:pointer}[data-drag]{cursor:ew-resize}.animal{transition:transform .3s,opacity .3s}.projection .demo-controls{display:none}.projection .demo-layout{display:block;max-width:1500px}.projection .stage svg{height:73vh;max-height:none}.projection .demo-readout{font-size:25px}.projection nav{display:block!important}.projection .nav-back{display:none}@media(max-width:800px){.demo-layout{display:block;padding:12px}.demo-controls{margin-bottom:12px}.model-list{display:flex;overflow:auto;gap:4px;margin-bottom:12px}.model-button{white-space:nowrap;padding:8px}.demo-controls h2{display:none}.stage svg{height:48vh;min-height:300px}.demo-readout{font-size:17px}.param{margin:10px 0}.demo-controls #controls{display:flex;gap:14px;flex-wrap:wrap}.param{flex:1;min-width:130px}}
.demo-toolbar{display:none}@media(max-width:700px){body.demo .demo-layout{display:flex;flex-direction:column}.demo-main{order:0;width:100%}.demo-controls{order:1;display:block;max-height:none}.demo-toolbar{display:block}.demo-toolbar select{width:100%;font-size:16px;padding:9px}.demo-controls .model-list{display:none}.demo .demo-main .stage svg{height:48vh;min-height:280px}.demo-controls #controls{display:flex;gap:12px}.demo .demo-readout{font-size:16px}.demo .demo-actions .param{margin:6px 0;min-width:180px}}


/* Three-column tool layout; model and parameter containers retain their IDs. */
.demo .layout-three{display:grid;grid-template-columns:210px minmax(0,1fr);gap:16px;max-width:1780px;padding:16px 22px;align-items:start}
.demo .layout-three>.demo-left{grid-column:1;grid-row:1}
.demo .layout-three>.demo-main{grid-column:2;grid-row:1 / span 2;position:sticky;top:74px;min-width:0;width:auto;order:initial}
.demo .layout-three>.demo-right{grid-column:1;grid-row:2}
.demo .layout-three>.demo-controls{display:block;position:sticky;top:74px;max-height:calc(100dvh - 92px);overflow:auto;min-width:0;width:auto;order:initial}
.demo .layout-three .demo-main .stage svg{height:calc(100dvh - 225px);min-height:370px;max-height:800px;width:100%}
.demo .demo-right .demo-readout{display:flex;flex-direction:column;align-items:stretch;font-size:16px;gap:9px;margin:0;padding:0;min-height:0;line-height:1.8}
.demo .demo-right .demo-readout strong{font-size:21px}.demo .demo-right .readout-item{width:100%;min-width:0;padding:10px 12px;font-size:13px;flex:auto}
.demo .demo-right .formula,.demo .demo-right #formula{font-size:14px;line-height:1.8;margin:10px 0 0;overflow-wrap:anywhere}
.demo .layout-three>.demo-right>.panel{margin-top:0;margin-bottom:12px}.demo .layout-three .model-list{display:flex;flex-direction:column;gap:6px}.demo .layout-three .model-button{font-size:14px;padding:9px 10px;text-align:left}
.demo .demo-right #controls{display:block}.demo .demo-right .param{min-width:0;font-size:13px;margin:13px 0}
@media(min-width:1280px){.demo .layout-three{grid-template-columns:200px minmax(0,1fr) 240px}.demo .layout-three>.demo-main{grid-column:2;grid-row:1}.demo .layout-three>.demo-right{grid-column:3;grid-row:1}}
.demo.projection .layout-three{display:block;max-width:1750px}.demo.projection .layout-three>.demo-controls{display:none!important}.demo.projection .layout-three>.demo-main{position:static;width:100%}.demo.projection .layout-three .demo-main .stage svg{height:calc(100dvh - 190px);max-height:none}
@media(max-width:760px){.demo .layout-three{display:flex;flex-direction:column;padding:10px;gap:10px}.demo .layout-three>.demo-controls{position:static;max-height:none;overflow:visible;width:100%}.demo .layout-three>.demo-left{order:-1}.demo .layout-three>.demo-main{order:0;position:static;width:100%}.demo .layout-three>.demo-right{order:1}.demo .layout-three .model-list{flex-direction:row;flex-wrap:wrap;margin-bottom:0}.demo .layout-three .model-button{font-size:12px;padding:7px 9px}.demo .layout-three .demo-main .stage svg{height:51dvh;min-height:285px;max-height:600px}.demo .demo-right .demo-readout{flex-direction:row;flex-wrap:wrap}.demo .demo-right .readout-item{width:auto;min-width:105px;flex:1}.demo .demo-right .param{margin:12px 0}.demo .demo-right #controls{display:block}.demo.projection .layout-three .demo-main .stage svg{height:72dvh;min-height:330px}}

@media(max-width:760px){.demo:not(.projection) .layout-three>.demo-left{display:none}.demo .demo-toolbar{display:flex}.demo .demo-toolbar select{max-width:100%;width:auto}}
