:root{--ink:#173e39;--teal:#0d6a61;--paper:#f6f4eb;--line:#c5d6c8;--gold:#9b793d;--muted:#60736a;--tint:#e8f0e8;--warn:#8e513c}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;background:var(--paper);color:var(--ink);font-family:'PingFang SC','Microsoft YaHei',system-ui,sans-serif;font-size:16px;line-height:1.55}button,input,select,textarea{font:inherit;color:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer;border:1px solid var(--line);background:#fffef8;border-radius:6px;padding:8px 14px;font-size:16px;line-height:1.4}button:hover{background:#e4eee5}button:disabled{opacity:.48;cursor:not-allowed}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline:3px solid #bc963e;outline-offset:3px}.primary{background:var(--teal);border-color:var(--teal);color:#fff}.primary:hover{background:#145c54}.soft{background:#e8eee5}.selected,.choice.selected{background:#d9e9df;border-color:var(--teal)}input,textarea,select{background:#fffef9;border:1px solid #b9cbbd;border-radius:5px;padding:8px 10px;max-width:100%}textarea{resize:vertical;width:100%;min-height:90px}input[type=number]{width:130px}input[type=range]{padding:0;width:100%;accent-color:var(--teal)}label.field,.field{display:block;margin:10px 0}.field>input,.field>select{display:block;width:100%;margin-top:6px}.shell{display:flex;align-items:center;gap:20px;padding:10px 24px;background:#fffdf7;border-bottom:1px solid var(--line);min-height:62px}.brand{display:flex;align-items:baseline;gap:12px;white-space:nowrap}.brand b{font-size:23px;letter-spacing:2px;color:var(--teal)}.brand span{font-size:14px}.shell nav{display:flex;justify-content:center;gap:8px;flex:1}.shell nav button{border:0;background:transparent;white-space:nowrap}.shell nav button.active{background:var(--ink);color:white}.shell nav button.done:after{content:' •';color:#b39552}.session-strip{display:flex;gap:16px;align-items:center;justify-content:space-between;padding:5px 25px;background:#e8eee6;font-size:13px;min-height:40px}.session-strip #identity{font-weight:650}.session-strip #saveState{color:var(--muted)}#stage{max-width:1800px;margin:auto;padding:18px 26px 12px;min-height:calc(100vh - 104px)}.stage-header{display:flex;justify-content:space-between;align-items:center;gap:20px;padding-bottom:14px;border-bottom:1px solid #d6d7ca;margin-bottom:16px}.eyebrow{display:flex;align-items:center;gap:9px;color:#4b6e63;font-size:clamp(18px,1.5vw,25px)}.stage-letter{display:inline-flex;align-items:center;justify-content:center;width:1.65em;height:1.65em;border-radius:50%;background:var(--teal);color:white}.stage h1{font-size:clamp(29px,2.4vw,42px);line-height:1.25;margin:7px 0 3px;font-weight:650}.subtitle{font-size:16px;color:var(--muted);margin:3px 0}.stage-mark{display:flex;align-items:center;gap:14px;flex-shrink:0}.element{width:76px;height:83px;border:1px solid #a88b4e;border-radius:8px;padding:6px 10px;background:#f2ecda;display:grid;grid-template-columns:1fr;text-align:center;line-height:1.1}.element small{text-align:left;font-size:12px;color:var(--gold)}.element b{font-size:32px;font-family:Georgia,serif}.element span{font-size:11px}.stage-mark>div:last-child{font-size:15px;color:var(--gold)}.workbench{display:grid;gap:16px}.panel{padding:16px 18px;background:#fcfcf5;border:1px solid var(--line);border-radius:10px;min-width:0}.section-title{display:flex;gap:9px;align-items:baseline;font-size:22px;line-height:1.35;font-weight:650;margin:0 0 12px}.section-title span:first-child{font-family:Georgia,serif;color:var(--gold)}.split{display:grid;grid-template-columns:1fr 1fr;gap:16px}.muted{color:var(--muted)}.source-note{font-size:13px;color:var(--muted);line-height:1.55;margin:8px 0}.feedback{border-left:3px solid #b4954c;padding:8px 12px;background:#f1eee0;font-size:15px;line-height:1.6;margin-top:10px;min-height:0}.feedback:empty{display:none}.feedback.good{background:#e7f0e7;border-color:var(--teal)}.feedback.error{border-color:#a15d44;background:#f4e9df}.tabs{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 16px}.tabs button.active,.tab.active{background:var(--teal);color:white;border-color:var(--teal)}.equation{font-family:'Times New Roman','PingFang SC',serif;font-size:21px;line-height:1.8;background:#eef3e9;padding:10px 14px;border-radius:5px;overflow-x:auto}.data-table{border-collapse:collapse;width:100%;font-size:16px}.data-table th,.data-table td{padding:9px 11px;text-align:left;border-bottom:1px solid var(--line);vertical-align:top}.data-table th{background:#e8eee5;font-weight:650}.metrics{display:flex;gap:18px;flex-wrap:wrap}.metrics>b,.metrics>div{background:#e9efe4;padding:10px 14px;border-radius:5px}.module-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;border-top:1px solid #d6d7ca;padding-top:12px;margin-top:18px;font-size:13px}.module-footer>div{display:flex;gap:9px;flex-wrap:wrap}.module-footer button{font-size:14px}.module-footer span{color:var(--muted)}dialog{border:1px solid #b5c9ba;border-radius:12px;color:var(--ink);background:#fafbf5;padding:25px;width:min(860px,94vw);max-height:90vh;overflow:auto;box-shadow:0 18px 90px #153b3b44}dialog::backdrop{background:#153a3a80}.dialog-title{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:15px}.dialog-title h2{margin:0;font-size:24px}.dialog-title button{font-size:23px;line-height:1;border:0}.dialog-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}dialog input{width:100%}dialog label{display:block;margin:12px 0}dialog p{line-height:1.7}dialog pre{font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:var(--ink);color:white;padding:13px 23px;border-radius:8px;box-shadow:0 6px 22px #183e3e33;z-index:20;max-width:90vw}#reportView{padding:24px 3vw}.report-toolbar{display:flex;justify-content:space-between;gap:18px;align-items:center;margin-bottom:18px}.report-toolbar h1{font-size:24px;margin:0}.report-toolbar p{font-size:14px;color:var(--muted);margin:4px 0}.tools{display:flex;gap:8px;flex-wrap:wrap}#reportImage{max-width:1600px;margin:auto;box-shadow:0 8px 30px #183e3e18;line-height:0}#reportImage svg{width:100%;height:auto}a{color:var(--teal)}.rule-table{width:100%;border-collapse:collapse}.rule-table th,.rule-table td{padding:8px;border-bottom:1px solid var(--line);text-align:left}.task-hint{font-size:14px;color:var(--muted)}
@media(min-width:1500px) and (min-height:850px){.stage-header{margin-bottom:20px;padding-bottom:18px}.section-title{font-size:24px}.panel{padding:20px}.data-table{font-size:18px}button{font-size:17px}}
@media(max-width:1000px){.shell{padding:8px;gap:8px}.brand span{display:none}.shell nav{gap:2px;justify-content:flex-start;overflow-x:auto}.shell nav button{padding:8px;font-size:13px}.session-strip{padding:6px 12px;flex-wrap:wrap;gap:5px}#stage{padding:15px}.stage-mark>div:last-child{display:none}.element{width:60px;height:67px}.element b{font-size:28px}.split{grid-template-columns:1fr}.report-toolbar{align-items:flex-start;flex-direction:column}.section-title{font-size:20px}}
@media(max-width:600px){.brand{display:none}.shell{gap:4px}.shell nav button{font-size:12px}.shell>button{padding:6px;font-size:12px}.stage-header{align-items:flex-start;gap:8px}.stage-mark{display:none}.eyebrow{font-size:15px}.stage h1{font-size:28px}.subtitle{font-size:14px}.panel{padding:13px}.tabs{gap:5px}.tabs button{font-size:14px;padding:7px 9px}.data-table{font-size:14px}.data-table th,.data-table td{padding:6px}.equation{font-size:17px}.tools button{font-size:13px}#reportView{padding:14px 8px}}
@media print{.shell,.session-strip,.report-toolbar,.module-footer{display:none}#reportView{padding:0}#reportImage{box-shadow:none}@page{size:landscape;margin:0}}

.stage-mascot{margin:0 2px 0 12px;flex:0 0 244px}.stage-mascot img{display:block;width:244px;height:122px;object-fit:contain}.stage-mascot figcaption{display:flex;justify-content:space-around;font-size:14px;font-weight:600;color:#8a713f;line-height:1.2}.stage-header>div:first-child{min-width:0}
@media(max-width:1000px){.stage-mascot{flex-basis:175px;margin-left:0}.stage-mascot img{width:175px;height:87px}.stage-mascot figcaption{font-size:12px}}
@media(max-width:600px){.stage-mascot{flex-basis:88px;margin-top:3px}.stage-mascot img{width:88px;height:44px}.stage-mascot figcaption{font-size:10px}.stage h1{font-size:25px}.stage-header{align-items:center}}

@media(min-width:900px) and (max-height:820px){
#stage{padding-top:10px}.stage-header{padding-bottom:9px;margin-bottom:12px}.stage-mascot{flex-basis:190px}.stage-mascot img{width:190px;height:95px}.stage-mascot figcaption{font-size:12px}.stage h1{margin-top:5px}.stage-M .m-tabs{margin-bottom:12px}.stage-M .m-particle-panel{display:flex;flex-direction:column;padding:13px}.stage-M .m-particle-panel>.m-condition{order:0;margin:0 0 5px}.stage-M .m-particle-panel>.m-mechanisms{order:1;margin:4px 0}.stage-M .m-particle-panel>.m-view{order:2;display:flex;flex-direction:column;min-height:0}.stage-M .m-particle-panel>.m-motion-controls{order:3}.stage-M .m-particle-panel>p,.stage-M .m-particle-panel>.feedback,.stage-M .m-particle-panel>.m-equation,.stage-M .m-particle-panel>.m-note,.stage-M .m-particle-panel>.m-actions{order:4}.stage-M .m-particle-panel .m-assumption{order:9}.stage-M .m-particle-panel .m-particle-svg{height:240px;width:100%}.stage-E .e-mode-row{padding:5px 10px;margin-bottom:12px}.stage-E .tabs{margin-bottom:10px}.stage-E .e-lab-main{padding-top:12px}
}

/* 固定论文画布：每个任务页完整16:9，屏幕只缩放画布，不裁切内容。 */
#stageViewport{position:relative;margin:12px auto;flex:none}#stage{position:absolute;left:0;top:0;width:1920px;height:1080px;max-width:none;min-height:0;margin:0;padding:20px 32px;transform-origin:top left;display:grid;grid-template-rows:120px 850px 50px;gap:10px;background:#f6f4eb;border:1px solid #d0d8ca;box-shadow:0 6px 28px #173e3918}#stage .stage-header{height:120px;margin:0;padding:0 0 10px;gap:24px;min-width:0}#stage .stage-header .eyebrow{font-size:24px}#stage .stage-header h1{font-size:40px;line-height:1.2;margin:7px 0 3px}#stage .stage-header .subtitle{font-size:20px}#stage .stage-mascot{display:block;flex:0 0 210px;margin:0}#stage .stage-mascot img{width:210px;height:100px}#stage .stage-mascot figcaption{font-size:16px}#moduleContent{height:850px;min-height:0;min-width:0;position:relative}#stage .module-footer{height:50px;margin:0;padding:7px 0 0;flex-wrap:nowrap;font-size:17px}#stage .module-footer button{font-size:17px;padding:6px 12px}#stage .module-footer>div{flex-wrap:nowrap}#stage input,#stage select,#stage textarea{font-size:20px}#stage button{font-size:20px}.shell{min-height:54px;padding:7px 18px}.session-strip{min-height:30px;padding:4px 20px;font-size:13px}.shell .brand b{font-size:21px}.shell nav button{font-size:15px;padding:7px 11px}
@media(max-width:899px){#stageViewport{margin:12px auto}.shell nav{overflow-x:auto}.stage h1{font-size:40px}.shell .brand{display:none}}
@media print{#stageViewport{width:1920px!important;height:1080px!important;margin:0}#stage{transform:none!important;box-shadow:none;border:0}.shell,.session-strip,#toast{display:none!important}@page{size:1920px 1080px;margin:0}}

/* E/D 窄屏按阅读顺序重排；横版论文画布保持不变。 */
#stage.mobile-flow{position:relative;width:100%;height:auto;padding:15px;display:flex;flex-direction:column;gap:14px;overflow:visible;}
#stage.mobile-flow .stage-header{height:auto;min-height:0;align-items:flex-start;padding-bottom:12px;gap:8px;}
#stage.mobile-flow .stage-header h1{font-size:27px;line-height:1.35;}
#stage.mobile-flow .stage-header .eyebrow{font-size:17px;}
#stage.mobile-flow .stage-header .subtitle{font-size:17px;}
#stage.mobile-flow .stage-mascot{flex-basis:76px;}
#stage.mobile-flow .stage-mascot img{width:76px;height:50px;}
#stage.mobile-flow .stage-mascot figcaption{font-size:10px;}
#stage.mobile-flow #moduleContent{height:auto;}
#stage.mobile-flow .module-footer{height:auto;flex-wrap:wrap;gap:10px;}
#stage.mobile-flow .module-footer>div{flex-wrap:wrap;}
#stage.mobile-flow .module-footer button{font-size:16px;}
#stage.mobile-flow input,#stage.mobile-flow select,#stage.mobile-flow textarea{font-size:17px;}

.account-actions{display:flex;gap:8px;align-items:center;flex-shrink:0}.account-actions button{white-space:nowrap}#logoutBtn{color:#805437}#logoutBtn[hidden]{display:none}
