@charset "UTF-8";
:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;color:#26313e;background:#f4f5f7;font-synthesis:none;--accent:#235d72;--accent-dark:#164455;--border:#dde2e7;--muted:#717d8b;--soft:#f7f9fa}*{box-sizing:border-box}body{margin:0}button,select,textarea{font:inherit}button,select{color:inherit}button{cursor:pointer;transition:background .12s,border-color .12s}button:disabled{cursor:not-allowed;opacity:.42}button:focus-visible,select:focus-visible,summary:focus-visible,a:focus-visible{outline:2px solid #2d819f;outline-offset:3px}button{border:1px solid var(--border);background:white;border-radius:6px}button:hover:not(:disabled){background:#edf3f5;border-color:#9eb7c1}select{border:1px solid var(--border);background:#fff;border-radius:5px;padding:5px 24px 5px 8px;font-size:12px;min-height:29px}button[hidden],[hidden]{display:none!important}.app{width:min(1180px,calc(100% - 48px));margin:27px auto 30px}.app-header{display:flex;justify-content:space-between;align-items:center;margin:0 2px 20px}.identity{display:flex;gap:12px;align-items:center}.app-mark{display:grid;place-items:center;background:var(--accent);color:#fff;width:42px;height:42px;border-radius:10px;font:bold italic 31px Georgia,serif;padding:0 3px 2px 0}.identity h1{font-size:21px;letter-spacing:.05em;line-height:1.25;margin:0 0 3px;font-weight:650}.identity p{font-size:11px;margin:0;color:var(--muted);letter-spacing:.08em}.privacy-badge{font-size:11px;display:flex;align-items:center;gap:7px;color:#526576}.privacy-badge>[aria-hidden="true"]{width:6px;height:6px;flex:none;background:#4c8d77;border-radius:50%}.panel{background:#fff;border:1px solid var(--border);border-radius:10px;box-shadow:0 2px 6px #20374b04;overflow:hidden}.panel+.panel{margin-top:18px}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 18px;border-bottom:1px solid var(--border);min-height:61px}.panel-heading h2{font-size:14px;font-weight:650;display:flex;align-items:center;gap:9px;margin:0}.section-number{font-size:10px;font-weight:600;color:#7a8a98;border:1px solid #e1e6eb;padding:3px 5px;border-radius:4px;letter-spacing:.03em}.mode-switch{display:flex;background:#eef1f4;border-radius:6px;padding:3px;gap:1px}.mode-switch button{font-size:12px;padding:5px 12px;border:0;background:transparent;color:#697684}.mode-switch button[aria-pressed=true]{background:#fff;color:var(--accent-dark);box-shadow:0 1px 3px #223d5618;font-weight:600}.edit-actions{display:flex;justify-content:space-between;align-items:center;padding:8px 13px;gap:10px;background:#fbfcfd}.history-actions{display:flex;align-items:center;gap:5px}.icon-button{width:30px;height:28px;padding:0;line-height:1;font-size:22px}.action-divider,.setting-divider{height:18px;width:1px;background:var(--border);margin:0 8px}.hint{font-size:11px;color:#87929d}.example-label{font-size:11px;color:var(--muted);display:flex;gap:7px;align-items:center}.example-label select{max-width:170px;min-height:27px;font-size:11px}.category-tabs{display:flex;gap:0;padding:0 13px;border-top:1px solid #f1f3f5;border-bottom:1px solid var(--border);overflow:auto;scrollbar-width:thin;background:#fbfcfd}.category-tabs button{flex:none;font-size:12px;padding:10px 10px 9px;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;color:#6d7783}.category-tabs button[aria-selected=true]{border-bottom-color:var(--accent);color:var(--accent);font-weight:650}.symbol-palette{display:flex;align-content:start;flex-wrap:wrap;gap:5px;min-height:62px;padding:10px 14px;background:#f8fafb;border-bottom:1px solid var(--border)}.symbol-button{height:38px;min-width:41px;padding:2px 11px;background:#fff;color:#283747;font:18px "Times New Roman",Georgia,serif;border-color:#e1e5e9;border-radius:4px}.symbol-button.wide{font-size:17px;min-width:65px}.symbol-button small{font:10px -apple-system,BlinkMacSystemFont,sans-serif;display:block;line-height:12px;color:var(--muted)}.symbol-button.source-only{border-style:dashed}.symbol-palette .palette-note{font-size:11px;color:#7f8995;align-self:center;padding-left:6px}.notice{margin:12px 16px 0;padding:9px 12px;border:1px solid #e7d8ae;border-radius:5px;background:#fffcf3;font-size:12px;color:#79622d;line-height:1.6}.input-area{min-height:148px;position:relative}.visual-pane{padding:26px 22px 22px;min-height:148px;display:flex;align-items:center}#mathfield-host{width:100%;min-width:0}math-field{display:block;width:100%;min-height:70px;border:none;outline:none;background:transparent;font-size:25px;--caret-color:var(--accent);--selection-background-color:#d9eaf0;--contains-highlight-background-color:#f1f6f8;--placeholder-color:#94a5b0;--placeholder-opacity:1;--smart-fence-color:#6d8592}math-field::part(menu-toggle),math-field::part(virtual-keyboard-toggle){display:none}.input-loading{font-size:12px;color:var(--muted);margin:0}.input-footer{display:flex;justify-content:space-between;gap:12px;padding:0 18px 10px;color:#8a949e;font-size:10px}.input-footer p{margin:0;line-height:1.5}#character-count{white-space:nowrap;font-variant-numeric:tabular-nums}textarea{display:block;resize:vertical;width:100%;height:148px;min-height:148px;max-height:430px;padding:20px 22px;border:0;outline:none;background:#fff;font:14px/1.7 "SFMono-Regular",Consolas,"Liberation Mono",monospace;tab-size:2;color:#25394b;white-space:pre;overflow:auto}textarea::placeholder{font-size:12px;color:#9ca4ad;white-space:normal}textarea:focus{box-shadow:inset 3px 0 var(--accent)}.editor-bottom{display:flex;justify-content:space-between;align-items:center;border-top:1px solid #edf0f3;padding:11px 16px;background:#fcfdfe}.key-hint{font-size:10px;color:#8b95a0;margin:0}kbd{display:inline-block;font:10px -apple-system,sans-serif;background:#fff;border:1px solid #e1e5e9;border-bottom-width:2px;padding:2px 4px;border-radius:3px;color:#74818d}.run-actions{display:flex;gap:7px;align-items:center}.run-actions button{font-size:12px;padding:8px 13px;min-height:34px}.run-actions .quiet-button{border-color:transparent;background:transparent;color:#7d8692}.run-actions .primary-button{background:var(--accent);border-color:var(--accent);color:#fff;font-weight:600;padding:8px 16px;display:flex;align-items:center;gap:7px}.primary-button:hover:not(:disabled){background:var(--accent-dark);border-color:var(--accent-dark)}.engine-label{font-size:10px;color:#87929d}.output-settings{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:11px 17px;background:#fbfcfd;border-bottom:1px solid #edf0f3}.output-settings label{font-size:11px;color:#677382;display:flex;align-items:center;gap:7px}.output-settings .unit{margin-left:-3px;color:#8d97a2}.output-settings select{font-size:11px;padding-left:7px}.output-settings .setting-divider{margin:0 4px}.status-row{display:flex;align-items:center;gap:8px;padding:12px 18px 10px;min-height:40px}.status-dot{width:6px;height:6px;flex:none;border-radius:50%;background:#aeb8c3}.status-dot.busy{background:#397b95;box-shadow:0 0 0 3px #e7f0f4;animation:pulse 1.4s ease-in-out infinite}.status-dot.success{background:#4b8e75}.status-dot.error{background:#bc625e}#status{margin:0;font-size:12px;color:#667586;line-height:1.5;flex:1;word-break:break-word}#elapsed{font-size:10px;color:#929ca8;white-space:nowrap}.progress-details{font-size:11px;color:#7c8995;line-height:1.6;padding:0 18px 10px}.progress-details p{margin:2px 0}.error-box{margin:0 17px 12px;padding:11px 13px;background:#fff6f3;border:1px solid #efcfc7;color:#9a493e;border-radius:6px;font-size:12px;line-height:1.65;white-space:pre-wrap;word-break:break-word}.preview{margin:0 16px 15px;border:1px solid #e7ebee;border-radius:6px;min-height:215px;max-height:480px;overflow:auto;display:flex;align-items:center;justify-content:center;padding:35px 28px;position:relative;background:#fff}.transparent-grid{background-color:#fff;background-image:linear-gradient(45deg,#f2f4f5 25%,transparent 25%),linear-gradient(-45deg,#f2f4f5 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#f2f4f5 75%),linear-gradient(-45deg,transparent 75%,#f2f4f5 75%);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0}#preview-image{height:auto;display:block;max-width:none;flex:none}.preview.stale #preview-image{opacity:.48}.stale-badge{position:absolute;bottom:12px;left:50%;transform:translateX(-50%);font-size:10px;background:#fffdf6eF;border:1px solid #e7dcb8;border-radius:4px;color:#8d7843;white-space:nowrap;padding:5px 8px}.preview-empty{text-align:center;color:#909ba6}.preview-empty .empty-equation{font:italic 32px Georgia,serif;color:#b5c0c9;letter-spacing:.07em}.preview-empty p{font-size:12px;margin:17px 0 5px;color:#8895a1}.preview-empty>span:last-child{font-size:10px;color:#a1abb4}.export-bar{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 17px;border-top:1px solid var(--border);background:#fcfdfe}#dimensions{margin:0;font-size:11px;color:#667585;line-height:1.7}#dimensions span{display:block;font-size:10px;color:#939eaa}.export-actions{display:flex;gap:7px;flex:none}.export-actions button{font-size:12px;font-weight:600;padding:9px 12px;min-width:80px}.export-actions button span{font-size:10px;font-weight:400;color:#8a94a0;margin-left:4px}.result-details{font-size:11px;padding:12px 18px;border-top:1px solid #edf0f3;color:#778492}.result-details summary{cursor:pointer}#warnings{line-height:1.6;color:#97763c;padding-left:18px;white-space:pre-wrap;word-break:break-word}#result-info{line-height:1.7;white-space:pre-line}.app-footer{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:10px 24px;margin:18px 2px;color:#637383;font-size:12px;line-height:1.7}.footer-credit{display:flex;flex-wrap:wrap;gap:4px 8px;margin:0;min-width:0}.footer-credit>span{white-space:nowrap}.footer-separator{margin-right:4px;color:#8b98a4}.footer-links{position:relative;display:flex;align-items:baseline;flex-wrap:wrap;gap:8px 20px;min-width:0;max-width:100%}.footer-links>a,.help summary{white-space:nowrap}.app-footer a{color:#526d80;text-decoration:none;text-underline-offset:3px}.app-footer a:hover,.app-footer a:focus-visible,.help summary:hover,.help summary:focus-visible{color:var(--accent-dark);text-decoration:underline}.help summary{cursor:pointer;list-style:none;color:#526d80}.help summary::marker{display:none}.help>div{position:absolute;bottom:calc(100% + 10px);right:0;width:min(400px,100%);max-height:70vh;overflow:auto;background:#fff;padding:12px 16px;border:1px solid var(--border);box-shadow:0 8px 30px #26394b18;border-radius:8px;white-space:normal;overflow-wrap:anywhere;z-index:2;font-size:12px;color:#526576}.help p{margin:6px 0 10px}.help code{font-size:10px;background:#f2f4f6;padding:1px 3px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@keyframes pulse{50%{opacity:.4}}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}@media(max-width:760px){.app{width:calc(100% - 24px);margin:18px auto}.app-header{align-items:flex-start}.privacy-badge{font-size:9px;padding-top:6px}.identity h1{font-size:18px}.app-mark{width:36px;height:36px;font-size:26px}.panel-heading{padding:12px}.engine-label{font-size:8px;max-width:180px;text-align:right}.hint,.key-hint,.setting-divider{display:none}.edit-actions{padding:8px 11px}.category-tabs{padding:0 6px}.category-tabs button{padding:10px 9px}.symbol-palette{padding:9px 10px;max-height:112px;overflow:auto}.input-footer{padding:0 12px 10px}.visual-pane{padding:22px 12px}math-field{font-size:23px}.editor-bottom{justify-content:flex-end;padding:10px 12px}.output-settings{padding:10px 12px;gap:10px 15px}.output-settings label{font-size:10px}.preview{margin:0 10px 11px;min-height:190px;justify-content:flex-start;padding:30px 18px}.preview-empty{margin:auto}.export-bar{align-items:flex-start;flex-direction:column;padding:11px 12px}.export-actions{width:100%}.export-actions button{flex:1}.app-footer{flex-direction:column;align-items:stretch}.footer-links{justify-content:flex-start}.help>div{left:0;right:auto}.mode-switch button{padding:5px 9px}.example-label select{max-width:143px}.stale-badge{left:10px;transform:none;font-size:9px}}

/* Auto margins center small formulas while preserving access to the left edge of wide formulas. */
.preview{justify-content:flex-start}#preview-image{margin:auto}.status-dot.warning{background:#b58b38}

.export-actions{flex-wrap:wrap}.export-pair{display:flex}.export-pair button:first-child{border-radius:6px 0 0 6px;color:var(--accent-dark)}.export-pair .download-button{border-radius:0 6px 6px 0;border-left:0;padding:8px 0;min-width:32px;width:32px;flex:0 0 32px}.copy-status{margin:0;padding:10px 18px;border-top:1px solid #edf0f3;font-size:12px;line-height:1.6;color:var(--accent-dark)}
.header-actions{display:flex;align-items:center;justify-content:flex-end;gap:16px;flex-wrap:wrap}.language-switch{display:flex;gap:2px;padding:3px;border:1px solid var(--border);border-radius:7px;background:#eef1f4}.language-switch button{padding:5px 9px;font-size:11px;border:0;background:transparent;color:var(--muted);white-space:nowrap}.language-switch button[aria-pressed=true]{background:#fff;color:var(--accent-dark);box-shadow:0 1px 3px #223d5618;font-weight:600}.export-actions button{white-space:nowrap}.export-pair .download-button{width:32px;min-width:32px;flex:0 0 32px}.app-header{gap:16px}.output-settings{flex-wrap:wrap}.input-footer{gap:12px}.input-footer p{line-height:1.6}.export-bar{gap:14px;flex-wrap:wrap}.export-pair{flex:none}@media(max-width:760px){.app-header{flex-wrap:wrap}.header-actions{justify-content:flex-start;gap:8px 14px}.privacy-badge{padding:0}.panel-heading{flex-wrap:wrap}.export-actions{flex-wrap:wrap}.export-actions>button{flex:none}.example-label select{max-width:155px}.input-footer{align-items:flex-start}.input-footer p{max-width:75%}}

/* Keep the status text independent of the decorative dot in both languages. */
.privacy-badge{min-width:0;max-width:100%;line-height:1.5}.privacy-badge>[data-i18n]{width:auto;height:auto;min-width:0;background:none;border-radius:0}.header-actions{min-width:0;max-width:100%}.language-switch{flex:none}.identity{flex:none}.app-header{flex-wrap:wrap}.export-actions{max-width:100%;flex-wrap:wrap}
@media(max-width:480px){.edit-actions{flex-wrap:wrap}.example-label{max-width:100%;min-width:0}.example-label select{min-width:0;max-width:155px}.run-actions{flex-wrap:wrap}.run-actions .primary-button{white-space:nowrap}}

.style-tools{display:flex;align-items:center;gap:8px 12px;flex-wrap:wrap;padding:8px 14px;border-top:1px solid var(--border);font-size:11px;color:var(--muted)}.style-tools select{max-width:100%}.style-tools span{line-height:1.5}

@media(max-width:480px){.footer-credit{flex-direction:column;gap:2px}.footer-separator{display:none}.footer-links{gap:8px 18px}}
