#study-calculator-root{--sc-green:#254d3c;--sc-ink:#2e4b39;--sc-muted:#85977a;font-family:"Segoe UI","Microsoft YaHei","PingFang SC",sans-serif;color:var(--sc-ink);font-size:13px;line-height:1.6}
#study-calculator-root *{box-sizing:border-box}#study-calculator-root button,#study-calculator-root input,#study-calculator-root select,#study-calculator-root textarea{font:inherit}#study-calculator-root button{cursor:pointer}#study-calculator-root button:disabled{opacity:.4;cursor:default}#study-calculator-root button:focus-visible{outline:2px solid #90af74;outline-offset:3px}#study-calculator-root input:focus,#study-calculator-root select:focus,#study-calculator-root textarea:focus{outline:2px solid #9db788;outline-offset:0}#study-calculator-root svg{display:inline-block;flex-shrink:0;vertical-align:middle}#study-calculator-root button{border:0}#study-calculator-root p,#study-calculator-root h2{margin:0}#study-calculator-root [hidden]{display:none!important}
.sc-launcher{position:fixed;right:22px;bottom:104px;z-index:55;display:flex;align-items:center;gap:8px;padding:11px 16px;border:1px solid #d7e1ca!important;border-radius:25px;background:#fff;color:#52733e;box-shadow:0 5px 25px #27432d13;font-size:12px!important}.sc-launcher:hover{background:#f1f6e9}.sc-launcher svg{width:17px;height:17px}
.sc-panel{position:fixed;right:20px;top:94px;z-index:60;width:440px;max-width:calc(100vw - 32px);max-height:calc(100vh - 118px);max-height:calc(100dvh - 118px);display:flex;flex-direction:column;overflow:hidden;background:#fff;border:1px solid #dce6d2;border-radius:14px;box-shadow:0 20px 70px #263c2830}.sc-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:17px 19px 14px;border-bottom:1px solid #edf1e6;flex-shrink:0;background:#fff}.sc-drag-handle{display:flex;align-items:center;gap:10px;cursor:grab;touch-action:none;flex:1}.sc-drag-handle:active{cursor:grabbing}.sc-brand-icon{display:grid;place-items:center;width:36px;height:36px;background:#edf3e3;border-radius:10px;color:#77955e}.sc-brand-icon svg{width:20px;height:20px}.sc-header h2{font-size:17px!important;font-weight:600;letter-spacing:.5px;line-height:1.4}.sc-header p{font-size:10px;color:#8b9b80;line-height:1.8;margin-top:3px!important}.sc-header>div:last-child{display:flex;gap:5px;align-items:center}.sc-header button{display:grid;place-items:center;width:29px;height:29px;padding:6px;background:#f8faf4;color:#8c9e7b;border:1px solid #e9eddf!important;border-radius:50%}.sc-header button:hover{background:#eaf2de;color:#3c633b}.sc-header button svg{width:16px;height:16px}
.sc-tabs{display:flex;gap:4px;padding:10px 16px 9px;flex-shrink:0;background:#fbfcf8;border-bottom:1px solid #edf1e5}.sc-tabs button{flex:1;white-space:nowrap;padding:8px 7px;background:transparent;color:#8b9b7b;border-radius:6px;font-size:12px!important;line-height:1.4}.sc-tabs button.active{background:#e8f0dc;color:#476d35;font-weight:600}.sc-tabs button:hover{background:#f0f5e7}
.sc-body{overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#c4d4b3 transparent;min-height:0;padding:18px 19px 12px}.sc-intro strong{display:block;font-size:13px;font-weight:500;color:#536e43}.sc-intro p{font-size:10px;color:#97a38b;margin-top:5px!important}.sc-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:16px}.sc-field{display:block;min-width:0}.sc-wide{grid-column:1/-1}.sc-field>span,.sc-tool-select>span{display:block;font-size:11px;color:#778d64;margin-bottom:6px}.sc-field>div{display:flex;align-items:center;min-width:0;border:1px solid #dae4ce;border-radius:7px;overflow:hidden;background:#fff}.sc-field input{min-width:0;width:100%;border:0;background:#fff;padding:10px 11px;color:#3b5b2b;font-size:14px!important;line-height:1.5;font-variant-numeric:tabular-nums}.sc-field input::placeholder{font-size:11px;color:#aab49b}.sc-field small{padding:0 9px;color:#97a88a;font-size:10px;white-space:nowrap}.sc-field select,.sc-tool-select select{width:100%;min-width:0;border:1px solid #dae4ce;border-radius:7px;padding:10px;background:#fff;color:#597449;font-size:12px!important;line-height:1.7}.sc-field textarea{border:0;width:100%;min-height:88px;resize:vertical;padding:10px 11px;line-height:1.9;font-size:13px;color:#4e6d39}.sc-field textarea::placeholder{color:#a7b493}.sc-form-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:11px 0 13px}.sc-form-actions>span{font-size:9px;color:#99a78b}.sc-form-actions button{padding:3px 0;background:none;font-size:10px!important;color:#79975b}.sc-form-actions button:hover{text-decoration:underline}.sc-tool-intro{font-size:11px;color:#8b9e79;line-height:1.8;margin:10px 0 0!important}
.sc-results{display:grid;grid-template-columns:1fr 1fr;gap:10px}.sc-result-card{min-width:0;background:#f4f7ee;border:1px solid #e4ecd9;border-radius:8px;padding:12px 12px 9px}.sc-result-card>span{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:10px;color:#8b9d79}.sc-result-card small{font-size:9px;font-weight:400;color:#9caa8e;white-space:nowrap}.sc-result-card strong{display:block;font-size:19px;line-height:1.5;letter-spacing:.1px;font-weight:500;color:#4a7032;overflow-wrap:anywhere;margin:5px 0 8px;font-variant-numeric:tabular-nums}.sc-result-card>div{display:flex;align-items:center;justify-content:flex-end;gap:9px;border-top:1px solid #e3ead8;padding-top:6px}.sc-result-card button{font-size:9px!important;display:flex;align-items:center;gap:3px;padding:0;background:transparent;color:#8b9f77}.sc-result-card button:hover{color:#315b2c}.sc-result-card button svg{width:11px;height:11px}.sc-formula{margin-top:12px;font-size:11px;line-height:1.9;padding:10px 12px;border-left:2px solid #b5cba0;background:#fafbf7;color:#748e5f;overflow-wrap:anywhere}.sc-result-note{font-size:10px;line-height:1.85;color:#92a27f;margin-top:10px!important}.sc-empty{font-size:11px;line-height:1.9;color:#a0ae92;background:#fafcf6;border:1px dashed #e0e9d3;border-radius:7px;padding:19px 14px;text-align:center}.sc-error{font-size:11px;line-height:1.9;color:#b28160;background:#fcf6ec;border:1px solid #f0e3cd;border-radius:7px;padding:11px 13px;margin-bottom:10px!important}
.sc-expression-label{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}.sc-expression-label label{font-size:11px;color:#879b72}.sc-expression-label select{border:1px solid #e0e8d5;border-radius:5px;color:#8c9e7a;background:#fafcf6;padding:3px 5px;font-size:9px!important}.sc-expression{display:block;width:100%;border:1px solid #d7e3ca;border-radius:8px;background:#fff;padding:12px;color:#365c29;font-size:18px!important;font-variant-numeric:tabular-nums;line-height:1.6}.sc-expression::placeholder{font-size:13px;color:#a5b394}.sc-science-result{margin:10px 0 12px}.sc-science-result .sc-results{grid-template-columns:1fr}.sc-science-result .sc-result-card{padding:10px 13px 8px}.sc-science-result .sc-result-card strong{font-size:24px;margin:3px 0 5px}.sc-science-result .sc-formula{display:none}.sc-science-result .sc-empty{padding:13px;font-size:10px}.sc-functions{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-bottom:8px}.sc-functions button{background:#f0f5e7;color:#79955b;border:1px solid #e1e9d5!important;border-radius:6px;min-height:33px;font-size:12px!important}.sc-keypad{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}.sc-keypad button{display:grid;place-items:center;min-height:37px;background:#fafbf7;color:#607d48;border:1px solid #e6ecdc!important;border-radius:7px;font-size:16px!important;font-variant-numeric:tabular-nums;line-height:1}.sc-keypad button:hover,.sc-functions button:hover{background:#e7f0d9}.sc-keypad button.sc-operator{background:#eef3e5;color:#5a7c40}.sc-keypad button.sc-equals{background:#345d40;color:#fff;border-color:#345d40!important}.sc-keypad button.sc-equals:hover{background:#47734d}.sc-keyboard-note{font-size:9px;line-height:1.8;color:#9cac8c;margin-top:12px!important}
.sc-history{margin-top:17px;border-top:1px solid #e7ecdf;padding-top:12px}.sc-history summary{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#90a17e;font-size:10px;cursor:pointer;list-style:none}.sc-history summary:before{content:'›';font-size:17px;line-height:1;margin-right:5px}.sc-history summary>span{margin-left:auto;font-size:9px}.sc-history[open] summary:before{transform:rotate(90deg)}.sc-history>div{padding-top:8px}.sc-history>div>button{width:100%;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:9px 0;border-bottom:1px solid #eef2e7!important;background:none;text-align:left}.sc-history>div>button>span{font-size:10px;color:#a0ae91;max-width:65%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sc-history strong{font-size:11px;color:#748d5b;font-weight:500;white-space:nowrap}.sc-history p{font-size:10px;line-height:1.9;color:#a7b599}.sc-clear-history{display:block;margin:10px 0 0 auto;background:none;padding:0;font-size:9px!important;color:#9bad88}
.sc-foot{display:flex;justify-content:space-between;gap:10px;flex-shrink:0;border-top:1px solid #edf0e5;background:#fbfcf8;padding:9px 17px;color:#a1af92;font-size:9px}.sc-notice{position:absolute;left:15px;right:15px;bottom:40px;background:#34593f;color:#f1f7e8;padding:10px 13px;border-radius:7px;font-size:11px;line-height:1.7;text-align:center;opacity:0;pointer-events:none;transition:opacity .15s}.sc-notice.visible{opacity:1}
@media(max-width:600px){.sc-launcher{right:14px;bottom:111px;padding:10px 13px;font-size:11px!important}.sc-panel{top:16px;right:10px;width:calc(100vw - 20px);max-width:calc(100vw - 20px);max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);border-radius:13px}.sc-header{padding:14px 16px 12px}.sc-header h2{font-size:16px!important}.sc-drag-handle{cursor:default;touch-action:auto}.sc-body{padding:15px 16px 12px}.sc-tabs{padding:9px 12px 8px}.sc-tabs button{font-size:11px!important;min-height:35px}.sc-field input,.sc-field textarea,.sc-field select,.sc-tool-select select{font-size:16px!important}.sc-field input{padding:9px 10px}.sc-field input::placeholder{font-size:11px}.sc-field select,.sc-tool-select select{padding:8px 9px}.sc-field>span,.sc-tool-select>span{font-size:10px}.sc-results{gap:8px}.sc-result-card{padding:10px}.sc-result-card strong{font-size:17px}.sc-result-card>span{font-size:10px}.sc-result-card button{font-size:10px!important;min-height:24px}.sc-result-note{font-size:10px}.sc-functions button{min-height:34px}.sc-keypad button{min-height:40px}.sc-expression{font-size:18px!important}.sc-foot{font-size:8px;padding:9px 15px}.sc-keyboard-note{font-size:9px}}
@media(prefers-reduced-motion:reduce){#study-calculator-root *{transition:none!important}}

#study-calculator-root.sc-answering .sc-panel{max-height:calc(100vh - 206px);max-height:calc(100dvh - 206px)}
@media(max-width:600px){#study-calculator-root.sc-answering .sc-panel{max-height:calc(100vh - 128px);max-height:calc(100dvh - 128px)}}

/* Wide workbench: keep inputs and results visible together. Dimensions are viewport-clamped in JS. */
#study-calculator-root .sc-panel,#study-calculator-root.sc-answering .sc-panel{max-width:none;max-height:none;min-width:0;min-height:0;resize:none}
#study-calculator-root .sc-header{padding:14px 18px 12px}
#study-calculator-root .sc-tabs{padding:8px 14px}
#study-calculator-root .sc-body{display:flex;flex-direction:column;overflow:hidden;padding:16px 18px 10px;gap:0}
.sc-workspace{display:grid;grid-template-columns:minmax(230px,.82fr) minmax(0,1.18fr);gap:20px;min-height:0;flex:1}
.sc-entry-col,.sc-output-col{min-width:0;min-height:0;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#cad8bd transparent;overscroll-behavior:contain;padding:0 3px 2px 0}
.sc-entry-col{border-right:1px solid #e9eedf;padding-right:17px}
#study-calculator-root .sc-fields{gap:11px;margin-top:12px}
#study-calculator-root .sc-field input{padding:9px 10px}
#study-calculator-root .sc-field select,#study-calculator-root .sc-tool-select select{padding:8px 9px}
#study-calculator-root .sc-form-actions{margin:10px 0}
#study-calculator-root .sc-results{gap:10px}
#study-calculator-root .sc-result-card{padding:11px 12px 9px}
#study-calculator-root .sc-result-card strong{font-size:20px;line-height:1.4;margin:6px 0 8px}
#study-calculator-root .sc-result-card>div{gap:9px}
.sc-conditions{margin-top:12px;padding-top:9px;border-top:1px dashed #dce6cf}
.sc-conditions>summary{cursor:pointer;font-size:10px;color:#8a9e75;line-height:1.9;list-style:none}
.sc-conditions>summary::before{content:'›';font-size:15px;margin-right:6px;display:inline-block;line-height:1}
.sc-conditions[open]>summary::before{transform:rotate(90deg)}
#study-calculator-root .sc-formula{margin-top:8px;padding:8px 10px;font-size:10px}
#study-calculator-root .sc-result-note{font-size:10px;line-height:1.9}
#study-calculator-root .sc-history{flex-shrink:0;margin-top:10px;padding-top:8px}
#study-calculator-root .sc-history>div{max-height:104px;overflow-y:auto;scrollbar-width:thin;padding-top:5px}
#study-calculator-root .sc-history>div>button{padding:7px 0}
#study-calculator-root .sc-foot{padding:8px 34px 8px 17px}
.sc-resize-grip{position:absolute;right:2px;bottom:2px;width:25px;height:25px;display:grid;place-items:center;padding:4px;background:transparent;color:#9ab182;cursor:nwse-resize!important;touch-action:none;border-radius:4px}
.sc-resize-grip:hover{color:#466d34;background:#eaf2de}.sc-resize-grip svg{width:17px;height:17px}
.sc-science-layout{display:grid;grid-template-columns:minmax(0,1fr) 250px;gap:19px;flex:1;min-height:0}
.sc-science-screen,.sc-science-keys{min-width:0;min-height:0;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#cad8bd transparent}
#study-calculator-root .sc-science-result{margin:9px 0 10px}
#study-calculator-root .sc-science-result .sc-result-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:0 9px;padding:9px 12px}
#study-calculator-root .sc-science-result .sc-result-card>span{grid-column:1;grid-row:1}
#study-calculator-root .sc-science-result .sc-result-card>strong{grid-column:1;grid-row:2;font-size:25px;margin:2px 0 0}
#study-calculator-root .sc-science-result .sc-result-card>div{grid-column:2;grid-row:1/3;display:flex;flex-direction:column;align-items:flex-end;justify-content:center;border:0;padding:0;gap:5px}
#study-calculator-root .sc-functions{gap:6px;margin-bottom:0}
#study-calculator-root .sc-functions button{min-height:32px}
#study-calculator-root .sc-keypad{gap:7px;height:100%;max-height:318px;grid-template-rows:repeat(6,minmax(35px,1fr))}
#study-calculator-root .sc-keypad button{min-height:35px;font-size:18px!important}
#study-calculator-root .sc-keyboard-note{font-size:9px;line-height:1.8;margin-top:10px!important}
#study-calculator-root .sc-science-result .sc-empty{padding:11px}
#study-calculator-root.sc-narrow .sc-workspace,#study-calculator-root.sc-narrow .sc-science-layout{display:block;overflow-y:auto;min-height:0;scrollbar-width:thin;scrollbar-color:#cad8bd transparent}
#study-calculator-root.sc-narrow .sc-entry-col{overflow:visible;border:0;padding:0}
#study-calculator-root.sc-narrow .sc-output-col{overflow:visible;padding:0}
#study-calculator-root.sc-narrow .sc-science-screen,#study-calculator-root.sc-narrow .sc-science-keys{overflow:visible}
#study-calculator-root.sc-narrow .sc-science-keys{margin-top:9px}
#study-calculator-root.sc-narrow .sc-keypad{height:auto;max-height:none;grid-template-rows:repeat(6,35px);gap:5px}
#study-calculator-root.sc-narrow .sc-keypad button{height:35px;min-height:35px}
#study-calculator-root.sc-narrow .sc-intro p{display:none}
#study-calculator-root.sc-narrow .sc-intro strong{font-size:12px}
#study-calculator-root.sc-narrow .sc-fields{margin-top:9px;gap:8px}
#study-calculator-root.sc-narrow .sc-results{gap:8px}
#study-calculator-root.sc-narrow .sc-result-card{padding:9px 10px 7px}
#study-calculator-root.sc-narrow .sc-result-card strong{font-size:18px;line-height:1.3;margin:5px 0 6px}
#study-calculator-root.sc-narrow .sc-result-card>div{padding-top:4px;gap:9px}
#study-calculator-root.sc-narrow .sc-result-card button{min-height:19px}
#study-calculator-root.sc-narrow .sc-form-actions{margin:7px 0 9px}
#study-calculator-root.sc-narrow .sc-keyboard-note{display:none}
#study-calculator-root.sc-narrow .sc-functions button{min-height:28px}
#study-calculator-root.sc-narrow .sc-conditions{margin-top:8px;padding-top:5px}
@media(max-width:700px){
 #study-calculator-root .sc-header{padding:11px 13px 9px}
 #study-calculator-root .sc-header h2{font-size:15px!important}
 #study-calculator-root .sc-header p{font-size:9px;margin-top:1px!important}
 #study-calculator-root .sc-brand-icon{width:31px;height:31px}
 #study-calculator-root .sc-header>div:last-child{gap:4px}
 #study-calculator-root .sc-header button{width:27px;height:27px;padding:5px}
 #study-calculator-root .sc-tabs{padding:6px 10px}
 #study-calculator-root .sc-tabs button{min-height:31px;padding:6px}
 #study-calculator-root .sc-body{padding:10px 12px 7px}
 #study-calculator-root .sc-field>span,#study-calculator-root .sc-tool-select>span{font-size:10px;margin-bottom:4px}
 #study-calculator-root .sc-field input{font-size:16px!important;padding:7px 8px}
 #study-calculator-root .sc-field select,#study-calculator-root .sc-tool-select select{font-size:16px!important;padding:6px 8px}
 #study-calculator-root .sc-history{margin-top:7px;padding-top:6px}
 #study-calculator-root .sc-foot{padding:7px 13px;font-size:8px}
 #study-calculator-root .sc-size-tip{font-size:0}
 #study-calculator-root .sc-size-tip:after{content:'本机计算 · 草稿自动保存';font-size:8px}
 #study-calculator-root .sc-resize-grip{display:none}
 #study-calculator-root .sc-notice{bottom:33px;font-size:10px;padding:8px 10px}
 #study-calculator-root .sc-science-result .sc-result-card>strong{font-size:23px;line-height:1.25}
 #study-calculator-root .sc-science-result .sc-result-card>div{gap:2px}
 #study-calculator-root .sc-science-result{margin:7px 0}
 #study-calculator-root .sc-expression{padding:9px 10px;font-size:17px!important}
 #study-calculator-root .sc-expression-label{margin-bottom:5px}
}

#study-calculator-root .sc-body{flex:1 1 auto}

.sc-power{white-space:nowrap}.sc-power sup{font-size:.64em;line-height:0;vertical-align:super}

/* In narrow scientific mode, history opens from the footer instead of taking a row from the keypad. */
#study-calculator-root.sc-narrow.sc-science-mode .sc-history{position:absolute;left:14px;right:auto;bottom:7px;width:125px;margin:0;padding:0;border:0;z-index:4;background:transparent}
#study-calculator-root.sc-narrow.sc-science-mode .sc-history>summary{font-size:9px;line-height:1.4}
#study-calculator-root.sc-narrow.sc-science-mode .sc-history>summary:before{font-size:13px}
#study-calculator-root.sc-narrow.sc-science-mode .sc-history[open]{left:12px;right:12px;bottom:31px;width:auto;background:#fff;border:1px solid #dce7ce;border-radius:8px;padding:10px 12px;box-shadow:0 -4px 25px #29432d12;max-height:220px;overflow:auto}
#study-calculator-root.sc-narrow.sc-science-mode .sc-foot{justify-content:flex-end}
#study-calculator-root.sc-narrow.sc-science-mode .sc-size-tip{display:none}
