.math-editor-shell{position:fixed;inset:0;z-index:1200}.math-editor-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}.math-editor-backdrop{position:absolute;inset:0;background:rgba(11,19,43,.24);backdrop-filter:blur(8px) saturate(130%);-webkit-backdrop-filter:blur(8px) saturate(130%)}.math-editor-frame{position:fixed;display:grid;grid-template-rows:auto minmax(0,1fr);border:1px solid rgba(46,125,246,.22);border-radius:16px;background:rgba(255,255,255,.96);box-shadow:0 18px 48px rgba(0,0,0,.32);color:#111827;overflow:hidden}.math-editor-toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.65rem;padding:10px 14px;border-bottom:1px solid rgba(46,125,246,.16);background:rgba(46,125,246,.08)}.math-editor-color-chip{display:inline-flex;align-items:center;gap:.45rem;min-height:36px;padding:4px 8px;border:1px solid rgba(46,125,246,.2);border-radius:999px;background:rgba(255,255,255,.88);color:#1d2a44;box-sizing:border-box}.math-editor-color-chip-label{color:#526277;font-size:.8rem;font-weight:700;line-height:1;white-space:nowrap}.math-editor-color-input{width:26px;height:26px;padding:0;border:0;border-radius:999px;background:0 0;cursor:pointer;overflow:hidden}.math-editor-color-input::-webkit-color-swatch-wrapper{padding:0}.math-editor-color-input::-webkit-color-swatch{border:1px solid rgba(29,42,68,.16);border-radius:999px}.math-editor-color-input::-moz-color-swatch{border:1px solid rgba(29,42,68,.16);border-radius:999px}.math-editor-toolbar-title{flex:1 1 280px;margin:0;min-width:0;color:#1d2a44;font-size:1.02rem;font-weight:700;line-height:1.25;text-shadow:none;letter-spacing:0;text-align:left}.math-editor-toolbar-actions{display:flex;flex:0 0 auto;align-items:center;gap:.65rem;flex-wrap:wrap;justify-content:flex-end;margin-left:auto}.math-editor-btn{display:inline-flex;min-height:38px;align-items:center;justify-content:center;gap:8px;border:1px solid transparent;border-radius:999px;padding:8px 12px;font-weight:700;cursor:pointer;transition:transform 120ms,background 120ms,border-color 120ms,opacity 120ms,box-shadow 120ms;font-family:Arial,sans-serif;text-shadow:none}.math-editor-btn:hover:not(:disabled){transform:translateY(-1px)}.math-editor-btn:disabled{opacity:.5;cursor:not-allowed}.math-editor-btn-primary{background:linear-gradient(180deg,#74ba91,#5aa87c);border-color:rgba(88,144,108,.7);box-shadow:0 8px 18px rgba(88,144,108,.18);color:#0d2117}.math-editor-btn-secondary{background:#fff;border-color:rgba(46,125,246,.28);color:#1d2a44}.math-editor-layout{min-height:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;padding:12px}.math-editor-column{min-width:0;min-height:0}.math-editor-column-main{display:grid;grid-template-rows:minmax(0,1fr) auto minmax(0,1fr);gap:.9rem}.math-editor-pane{min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr);border:1px solid rgba(46,125,246,.14);border-radius:14px;background:rgba(248,250,252,.96);box-shadow:inset 0 1px 0 rgba(255,255,255,.9);overflow:hidden}.math-editor-pane-head{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:10px 14px;border-bottom:1px solid rgba(46,125,246,.12);background:rgba(46,125,246,.04)}.math-editor-pane-head h3{margin:0;font-size:.98rem;font-weight:700;line-height:1.25;color:#1d2a44;text-shadow:none;text-align:left}.math-editor-editor-pane{background:rgba(248,250,252,.96)}.math-editor-style-bar{display:flex;flex-direction:row;flex-wrap:wrap;align-items:flex-start;gap:.65rem;padding:.7rem .8rem;border:1px solid rgba(46,125,246,.14);border-radius:14px;background:rgba(248,250,252,.96);box-shadow:inset 0 1px 0 rgba(255,255,255,.9)}.math-editor-style-bar-head{display:flex;align-items:center;flex:0 0 auto}.math-editor-style-bar-title{margin:0;color:#1d2a44;font-size:.92rem;font-weight:700;line-height:1.2;text-shadow:none}.math-editor-style-controls{display:flex;flex-wrap:wrap;align-items:center;gap:.55rem;flex:1 1 auto;width:auto}.math-editor-color-chip-stroke{gap:.55rem}.math-editor-toggle-input{position:absolute;opacity:0;pointer-events:none}.math-editor-toggle{position:relative;width:34px;height:20px;border-radius:999px;background:rgba(82,98,119,.22);transition:background 120ms}.math-editor-toggle::after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.18);transition:transform 120ms}.math-editor-toggle-input:checked+.math-editor-toggle{background:rgba(46,125,246,.55)}.math-editor-toggle-input:checked+.math-editor-toggle::after{transform:translateX(14px)}.math-editor-color-input:disabled{opacity:.42;cursor:not-allowed}.math-editor-input{width:calc(100% - 1rem);min-width:0;min-height:0;margin:.5rem;border:0;border-radius:12px;outline:0;resize:none;box-sizing:border-box;padding:1rem;background:linear-gradient(180deg,#0b0f16,#101722);color:#f4f7fb;font-family:"Courier New","Lucida Console",monospace;font-size:1rem;line-height:1.5;box-shadow:inset 0 1px 0 rgba(255,255,255,.03)}.math-editor-input::placeholder{color:rgba(214,220,230,.42)}.math-editor-input::selection{background:rgba(127,197,159,.32)}.math-editor-preview-pane{grid-template-rows:auto auto minmax(0,1fr)}.math-editor-preview-alert{margin:10px 14px 0;padding:8px 10px;border-radius:10px;font-size:.9rem;line-height:1.35;color:#8f1d1d;background:rgba(210,50,50,.13);border:0}.math-editor-preview-alert[data-tone=info]{color:#1d4f91;background:rgba(46,125,246,.12)}.math-editor-preview{min-height:0;overflow:auto;margin:10px 14px 14px;padding:.9rem;border:1px solid rgba(46,125,246,.12);border-radius:16px;background:rgba(255,255,255,.78);color:#111827;display:flex;align-items:center;justify-content:center}.math-editor-preview.is-busy{opacity:.84}.math-editor-preview svg{max-width:100%;height:auto}.math-editor-preview-placeholder{width:100%;min-height:100%;display:flex;align-items:center;justify-content:center;color:#8b97ab;font-size:.96rem;line-height:1.4;text-align:center}.math-editor-preview-placeholder.is-empty{min-height:100%}.math-editor-library-pane{height:100%;grid-template-rows:auto auto minmax(0,1fr)}.math-editor-library-tabs{display:flex;flex-wrap:wrap;align-items:flex-start;gap:.3rem;overflow:visible;scrollbar-width:none;padding:8px 14px 0}.math-editor-library-tab{display:inline-flex;align-items:center;justify-content:center;align-self:flex-start;flex:0 0 auto;max-width:144px;height:30px;min-height:30px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:1px solid rgba(46,125,246,.18);border-radius:999px;padding:0 .62rem;background:rgba(255,255,255,.84);color:#526277;font-family:Arial,sans-serif;font-size:.73rem;font-weight:600;line-height:1;text-shadow:none;cursor:pointer;transition:background 120ms,border-color 120ms,color 120ms,box-shadow 120ms}.math-editor-library-tab:hover{background:rgba(46,125,246,.08);border-color:rgba(46,125,246,.28)}.math-editor-library-tab.is-active{background:rgba(46,125,246,.12);border-color:rgba(46,125,246,.36);color:#1d4f91;box-shadow:inset 0 1px 0 rgba(255,255,255,.75)}.math-editor-library-content{min-height:0;overflow:auto;padding:10px 14px 14px}.math-editor-library-placeholder{min-height:100%}.math-formula-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(108px,1fr));gap:.5rem}.math-formula-btn{border:1px solid rgba(46,125,246,.14);border-radius:14px;background:linear-gradient(180deg,#fff,#f2f6fb);color:#1d2a44;padding:.5rem .6rem;min-height:56px;display:flex;align-items:center;justify-content:center;text-align:center;cursor:pointer;transition:transform 120ms,box-shadow 120ms,border-color 120ms,background 120ms}.math-formula-btn:hover{transform:translateY(-1px);border-color:rgba(46,125,246,.28);background:linear-gradient(180deg,#fff,#eef5ff);box-shadow:0 10px 18px rgba(46,125,246,.12)}.math-formula-btn:active{transform:scale(.99)}.math-formula-render{display:inline-flex;align-items:center;justify-content:center;min-height:1.4rem;max-width:100%;overflow:hidden}.math-formula-render svg{max-width:100%;height:auto}@media (max-width:1100px){.math-editor-layout{grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) minmax(240px,0.78fr)}.math-editor-column-main{grid-template-rows:minmax(160px,0.9fr) auto minmax(160px,0.9fr)}}@media (max-width:760px){.math-editor-toolbar{padding:.8rem}.math-editor-toolbar-actions{width:100%;justify-content:flex-end}.math-editor-layout{padding:.75rem;gap:.75rem}.math-formula-grid{grid-template-columns:repeat(auto-fit,minmax(96px,1fr))}}@media (max-width:640px){.math-editor-frame{inset:8px!important;width:auto!important;height:auto!important;border-radius:12px}.math-editor-toolbar{padding:8px 10px;gap:6px}.math-editor-toolbar-title{flex:1 1 100%;font-size:.95rem}.math-editor-toolbar-actions{gap:.4rem}.math-editor-btn{min-height:36px;padding:6px 12px;font-size:.88rem}.math-editor-layout{grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) minmax(140px,0.85fr);padding:8px;gap:8px}.math-editor-column-main{grid-template-rows:minmax(90px,auto) auto minmax(90px,auto);gap:.55rem}.math-editor-pane-head{padding:7px 10px}.math-editor-pane-head h3{font-size:.9rem}.math-editor-input{margin:.4rem;padding:.7rem;width:calc(100% - .8rem);font-size:.95rem}.math-editor-style-bar{padding:.45rem .55rem;gap:.4rem}.math-editor-style-controls{gap:.35rem}.math-editor-color-chip{min-height:30px;padding:3px 6px;gap:.3rem}.math-editor-color-chip-label{font-size:.72rem}.math-editor-color-input{width:22px;height:22px}.math-editor-preview{margin:8px 10px 10px;padding:.55rem}.math-editor-preview-alert{margin:8px 10px 0;padding:6px 8px;font-size:.82rem}.math-editor-library-tabs{flex-wrap:nowrap;overflow-x:auto;padding:6px 10px 0;-webkit-overflow-scrolling:touch}.math-editor-library-tab{height:28px;min-height:28px;font-size:.7rem;padding:0 .55rem}.math-editor-library-content{padding:8px 10px 10px}.math-formula-grid{grid-template-columns:repeat(auto-fit,minmax(80px,1fr));gap:.4rem}.math-formula-btn{min-height:48px;padding:.4rem .45rem}}