[hidden]{display:none!important}.demo .stage svg{width:100%;height:72vh;min-height:460px;max-height:850px;display:block;touch-action:none;user-select:none}.model-list{display:flex;gap:8px;flex-wrap:wrap}.model-button{border:1px solid #cbd5e1;background:white;border-radius:10px;padding:11px;font-size:18px;cursor:pointer}.model-button.on{background:#0062ff;color:white}.demo-controls .panel{margin-top:14px}.param{display:grid;gap:8px;margin:14px 0}.param input{width:100%}.param output{color:#0062ff}.demo-toolbar,.demo-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.demo-toolbar{justify-content:space-between;margin-bottom:10px}.demo-readout{display:flex;flex-wrap:wrap;gap:12px;margin-top:12px}.readout-item{flex:1;min-width:140px;background:#eff6ff;border-radius:10px;padding:10px 14px;color:#475569}.readout-item strong{display:block;font-size:24px;color:#0062ff}.short-note{font-size:15px;color:#64748b;margin:12px 0}.demo nav .wrap{gap:12px}.demo nav #project{margin-left:auto}.projection .demo-controls{display:none}.projection .demo-layout{display:block;max-width:1550px;margin:auto}.projection nav{display:block!important}.projection .stage svg{height:76vh}svg text{font-family:'Microsoft YaHei',sans-serif}@media(max-width:760px){.demo .stage svg{height:auto;min-height:0;max-height:none}.demo .logo{font-size:15px}.demo .nav-back{font-size:13px;margin-left:0}.readout-item{min-width:110px}.readout-item strong{font-size:20px}}

@media(max-width:760px){.demo .stage svg{height:auto;aspect-ratio:660 / 1460}.demo svg text{font-size:34px!important}.demo .demo-main{min-width:0}}
/* Keep the primary manipulation controls before the tall two-view mobile board. */
@media(max-width:760px){
 .demo:not(.projection) .demo-layout{display:flex;flex-direction:column;gap:10px}
 .demo:not(.projection) .demo-controls{display:contents}
 .demo:not(.projection) .demo-controls>.model-list{order:-2;width:100%;flex-direction:row;gap:8px}
 .demo:not(.projection) .demo-controls>.model-list button{flex:1;text-align:center;font-size:16px;padding:10px 8px}
 .demo:not(.projection) #timeControl{order:-1;width:100%;margin:0;padding:10px 12px;background:white;border:1px solid #e2e8f0;border-radius:10px}
 .demo:not(.projection) .demo-main{order:0;position:static;width:100%}
 .demo:not(.projection) .demo-controls>.panel{order:1;width:100%;margin:0}
}


/* 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,.demo:not(.projection) .layout-three>.demo-right{display:contents}.demo:not(.projection) .layout-three>.demo-left>.model-list{order:-3;width:100%}.demo:not(.projection) .layout-three #timeControl{order:-2;display:block;width:100%;padding:10px 12px;margin:0;border:1px solid #e2e8f0;border-radius:10px;background:white}.demo:not(.projection) .layout-three .demo-controls>.panel{order:1;width:100%;margin:0}.demo .layout-three .demo-main .stage svg{height:auto;min-height:0;max-height:none;aspect-ratio:660/1460}.demo.projection .layout-three .demo-main .stage svg{height:auto;min-height:0;max-height:none}}
