@import "https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+JP:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap";:root{--navy-950:#0d2c24;--navy-900:#12382f;--navy-800:#173f35;--teal-600:#2f8f6b;--teal-100:#e2f1e9;--blue-600:#26795b;--paper:#f3f0e8;--surface:#fff;--surface-2:#edf1f4;--ink:#183129;--muted:#64766f;--line:#d8d7d0;--danger:#a64658;--shadow:0 18px 55px #0c1f3021;--current-view-height:800px;color:var(--ink);background:var(--paper);font-synthesis:none;font-family:IBM Plex Sans JP,Yu Gothic UI,Hiragino Sans,Meiryo,system-ui,sans-serif}*{box-sizing:border-box}html,body{min-height:100%}body{background:radial-gradient(circle at 8% 8%, #2f8f6b1a, transparent 26rem), radial-gradient(circle at 92% 28%, #173f3514, transparent 34rem), var(--paper);margin:0}button,input,textarea,select{font:inherit}button,a,label.file-button{-webkit-tap-highlight-color:transparent}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline-offset:2px;outline:3px solid #168f8a47}[hidden]{display:none!important}.app-shell{grid-template-rows:auto auto minmax(0,1fr);min-height:100dvh;display:grid}.topbar{z-index:10;background:var(--navy-950);color:#fff;grid-template-columns:minmax(260px,1fr) auto;align-items:center;gap:18px;min-height:82px;padding:14px 26px;display:grid;position:relative;box-shadow:0 5px 24px #05111d38}.brand{min-width:0;color:inherit;align-items:center;gap:12px;text-decoration:none;display:inline-flex}.brand img{border-radius:13px;width:46px;height:46px;box-shadow:0 6px 18px #0003}.brand-copy{gap:1px;min-width:0;display:grid}.brand-copy strong{text-overflow:ellipsis;white-space:nowrap;letter-spacing:.04em;font-size:18px;overflow:hidden}.brand-copy small{color:#a7cabd;letter-spacing:.13em;font:700 9px Manrope,sans-serif}.top-actions{justify-content:flex-end;gap:8px;display:flex}.button{cursor:pointer;border:1px solid #0000;border-radius:8px;justify-content:center;align-items:center;min-height:42px;padding:9px 15px;font-size:12px;font-weight:700;text-decoration:none;transition:transform .18s,background .18s,border-color .18s,box-shadow .18s;display:inline-flex}.button:hover{transform:translateY(-1px)}.button:disabled{cursor:wait;opacity:.55;transform:none}.button.primary{background:var(--navy-800);color:#fff;box-shadow:0 10px 24px #173f3533}.button.secondary{color:#263b55;background:#fff;border-color:#cad4de}.button.ghost{color:#3c4d63;background:#edf1f4;border-color:#d5dce4}.button.quiet{color:#e5f1ed;background:0 0;border-color:#ffffff2e;min-height:36px;padding:7px 11px}.button.wide{width:100%;min-height:44px;margin-top:9px}.text-button{color:var(--blue-600);cursor:pointer;background:0 0;border:0;padding:4px 0;font-size:11px;font-weight:800}.text-button.danger{color:var(--danger)}.icon-button{color:#29425f;cursor:pointer;background:#fff;border:1px solid #d5dce4;border-radius:8px;width:34px;height:34px;font-size:18px}.learning-line{border-bottom:1px solid var(--line);background:#fffdf9;justify-content:center;align-items:center;gap:15px;min-height:54px;padding:10px 28px;display:flex;position:relative}.learning-line>span{color:var(--muted);white-space:nowrap;align-items:center;gap:7px;font-size:12px;font-weight:700;display:inline-flex}.learning-line>span b{border:1px solid;border-radius:50%;place-items:center;width:23px;height:23px;font:700 10px Manrope,sans-serif;display:grid}.learning-line>span.is-current{color:var(--navy-800)}.learning-line>span.is-current b{color:#fff;border-color:var(--teal-600);background:var(--teal-600)}.learning-line>i{background:#b9c1bc;width:40px;height:1px}.learning-line-window-button{min-height:34px;padding-inline:12px;font-size:11px;position:absolute;right:26px}.workspace{width:min(1280px,100%);min-height:0;margin:0 auto;padding:24px}.setup-panel,.history-panel{z-index:91;visibility:hidden;width:min(420px,100vw - 24px);transition:transform .22s,visibility .22s;position:fixed;inset-block:12px;overflow:auto}.setup-panel{inset-inline-start:12px;transform:translate(calc(-100% - 28px))}.history-panel{inset-inline-end:12px;transform:translate(calc(100% + 28px))}.setup-panel.is-open,.history-panel.is-open{visibility:visible;transform:translate(0)}.panel-card{border:1px solid var(--line);background:#fffdf8f7;border-radius:14px;min-height:100%;padding:52px 20px 22px;position:relative;box-shadow:0 20px 45px #122c2424}.panel-close{z-index:2;border:1px solid var(--line);width:34px;height:34px;color:var(--navy-800);cursor:pointer;background:#fff;border-radius:50%;place-items:center;font-size:20px;display:none;position:absolute;top:13px;right:13px}.setup-panel.is-open .setup-close,.history-panel.is-open .history-close{display:grid}.side-panel-backdrop{z-index:90;opacity:0;visibility:hidden;background:#0d2c246b;border:0;display:none;position:fixed;inset:0}.side-panel-backdrop.is-open{opacity:1;visibility:visible;display:block}body.side-panel-open{overflow:hidden}.eyebrow{color:var(--teal-600);letter-spacing:.13em;justify-content:space-between;align-items:center;font:700 9px Manrope,sans-serif;display:flex}.eyebrow b{color:var(--navy-800)}.setup-card>h1{color:var(--navy-950);letter-spacing:-.035em;margin:14px 0 9px;font-size:29px;line-height:1.35}.setup-card>h1 em{color:var(--teal-600);font-style:normal}.lead{color:var(--muted);margin:0 0 18px;font-size:12px;line-height:1.7}.setup-block{border-top:1px solid var(--line);padding:17px 0}.setup-block:last-of-type{padding-bottom:0}.history-title{justify-content:space-between;align-items:baseline;gap:12px;margin-top:14px;display:flex}.history-title h2{color:var(--navy-950);margin:0;font-size:24px}.history-title span{color:var(--teal-600);font-size:11px;font-weight:800}.history-drawer-button span{min-width:19px;color:var(--navy-950);background:#e5bd54;border-radius:999px;padding:2px 5px;font:800 9px Manrope,sans-serif}.input-panel{border-right:1px solid var(--line);background:#edf1f4;min-height:0;padding:18px;overflow:auto}.panel-section{background:#ffffffeb;border:1px solid #d4dce4;border-radius:14px;padding:18px;box-shadow:0 10px 28px #152a3d0f}.problem-source{transition:border-color .16s,box-shadow .16s,background .16s}.problem-source.is-dragging{border-color:var(--teal-600);background:#f1fbfa;box-shadow:0 0 0 4px #168f8a29}.panel-section+.panel-section{margin-top:13px}.section-heading{justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px;display:flex}.section-heading>div{align-items:center;gap:9px;display:flex}.section-heading h2{margin:0;font:700 17px/1.2 Georgia,Yu Mincho,serif}.step{background:var(--teal-100);width:28px;height:28px;color:var(--teal-600);border-radius:9px;place-items:center;font-size:10px;font-weight:900;display:grid}textarea,select,input[type=text],input[type=date],input[type=number]{width:100%;color:var(--ink);background:#fff;border:1px solid #cbd5df;border-radius:9px}textarea{resize:vertical;padding:12px;line-height:1.65;display:block}select,input[type=text],input[type=date],input[type=number]{min-height:40px;padding:0 10px}.source-actions{flex-wrap:wrap;gap:7px;margin-top:9px;display:flex}.source-actions .button{flex:92px}.file-button input{opacity:0;pointer-events:none;block-size:1px;inline-size:1px;position:absolute}.hint{color:var(--muted);margin:9px 0 0;font-size:10px;line-height:1.6}.file-preview{background:#f5f7f9;border:1px solid #cfd8e1;border-radius:10px;margin-top:10px;position:relative;overflow:hidden}.file-preview img{object-fit:contain;background:#15283a;width:100%;max-height:210px;display:block}.file-preview .file-card{color:#40516a;padding:13px;font-size:12px}.pdf-page-field{color:#526076;gap:6px;margin-top:10px;font-size:10px;font-weight:800;display:grid}.pdf-page-field .hint{margin-top:0;font-weight:500}.pdf-page-row{grid-template-columns:minmax(0,1fr) auto;gap:7px;display:grid}.pdf-page-row .button{min-width:68px}.pdf-page-status{color:#66758a;background:#f4f6f7;border:1px solid #d3dce3;border-radius:8px;padding:7px 9px;font-weight:700}.pdf-page-status.is-confirmed{color:#176e58;background:#e9f7f2;border-color:#8ac7b6}.pdf-unconfirmed-message{text-align:center;background:#f5f7f8;border:1px dashed #aebcc8;border-radius:10px;padding:14px}.field-grid{grid-template-columns:1fr 1fr;gap:9px;display:grid}.field-grid label{color:#526076;gap:6px;font-size:10px;font-weight:800;display:grid}.field-grid .discipline-field{grid-column:1/-1}.detail-field{border:0;margin:13px 0 0;padding:0}.detail-field legend{color:#526076;margin-bottom:7px;font-size:10px;font-weight:800}.segmented{background:#e9eef2;border-radius:10px;grid-template-columns:repeat(3,1fr);padding:3px;display:grid}.segmented label{min-width:0}.segmented input{opacity:0;pointer-events:none;position:absolute}.segmented span{color:#5d6b7e;cursor:pointer;border-radius:8px;place-items:center;min-height:34px;font-size:11px;font-weight:800;display:grid}.segmented input:checked+span{color:var(--navy-800);background:#fff;box-shadow:0 3px 10px #1f35481f}.result-panel{border:1px solid var(--line);background:var(--paper);border-radius:14px;grid-template-rows:auto auto minmax(0,1fr);min-width:0;min-height:800px;display:grid;position:relative;overflow:hidden;box-shadow:0 12px 34px #152e2512}.tabbar{z-index:30;background:#fff;border-bottom:1px solid #d8ddde;align-items:stretch;gap:8px;min-width:0;padding:10px 18px 0;display:flex;position:sticky;top:0}.tab-list{scrollbar-width:thin;flex:auto;gap:2px;min-width:0;display:flex;overflow-x:auto}.tab{color:#687488;cursor:pointer;white-space:nowrap;background:0 0;border:0;min-height:42px;padding:0 16px;font-size:12px;font-weight:800;position:relative}.tab:after{content:"";background:0 0;border-radius:3px 3px 0 0;height:3px;position:absolute;inset:auto 11px 0}.tab.is-active{color:var(--navy-800)}.tab.is-active:after{background:var(--teal-600)}.tab-actions{flex:none;align-items:center;gap:7px;padding-bottom:7px;display:flex}.tab-actions .button{white-space:nowrap;min-height:34px;padding-inline:12px;font-size:11px}.tab-actions .is-active{box-shadow:0 0 0 3px color-mix(in srgb, var(--teal-600) 22%, transparent)}.result-toolbar{background:#fbfaf7;border-bottom:1px solid #e0e3e4;justify-content:space-between;align-items:center;gap:16px;min-height:58px;padding:8px 22px;display:flex}#resultTitle{gap:3px;display:grid}#resultTitle small{color:var(--teal-600);letter-spacing:.16em;font-size:8px;font-weight:900}#resultTitle strong{font:700 18px Georgia,Yu Mincho,serif}.view-actions{align-items:center;gap:7px;display:flex}.view-actions .export-button{white-space:nowrap;min-height:34px;padding-inline:10px;font-size:11px}#zoomValue{color:#687487;text-align:center;min-width:45px;font-size:10px;font-weight:800}.tab-stage{height:var(--current-view-height);min-height:var(--current-view-height);position:relative;overflow:hidden}.tab-pane{min-height:0;padding:clamp(18px,3.8vw,48px);display:none;position:absolute;inset:0;overflow:auto}.tab-pane.is-active{display:block}.document-view{width:min(980px,100%);min-height:100%;box-shadow:var(--shadow);transform-origin:top;color:#203049;background:#fffefa;border:1px solid #dedbd3;margin:0 auto;padding:clamp(22px,4vw,52px);line-height:1.85}.document-view.empty-state{text-align:center;color:#768295;place-content:center;justify-items:center;display:grid}.empty-state h2{color:#344a64;margin:13px 0 5px;font:600 25px Georgia,Yu Mincho,serif}.empty-state p{margin:0}.empty-mark{width:54px;height:54px;color:var(--teal-600);background:#f4f7f8;border:1px solid #ccd6de;border-radius:17px;place-items:center;font:700 23px Georgia,serif;display:grid}.document-view h1,.document-view h2,.document-view h3,.document-view h4,.document-view h5,.document-view h6{color:#183550;font-family:Georgia,Yu Mincho,serif;line-height:1.35}.document-view h1{border-bottom:2px solid #183550;margin:0 0 24px;padding-bottom:14px;font-size:30px}.document-view h2{border-left:4px solid var(--teal-600);margin:34px 0 12px;padding-left:12px;font-size:23px}.document-view h3{margin:25px 0 9px;font-size:18px}.document-view h4{border-bottom:1px solid #cbd6df;margin:22px 0 8px;padding-bottom:6px;font-size:16px}.document-view h5{color:#315676;margin:18px 0 7px;font-size:14px}.document-view h6{color:#4b647a;letter-spacing:.03em;margin:16px 0 6px;font-size:12px}.document-view p{margin:0 0 14px}.document-view ul,.document-view ol{padding-left:1.6em}.document-view blockquote{color:#4d6076;background:#edf3f6;border-left:4px solid #9eb4c8;margin:18px 0;padding:12px 16px}.document-view blockquote.japanese-quote{padding:16px 19px;line-height:2}.document-view blockquote.japanese-quote.kanbun{color:#43275a;background:#f4edf8;border-left-color:#7b4f9f;font-family:Yu Mincho,Hiragino Mincho ProN,serif}.document-view blockquote.japanese-quote.kobun{color:#644221;background:#fbf2e8;border-left-color:#a76d37;font-family:Yu Mincho,Hiragino Mincho ProN,serif}.document-view blockquote.japanese-quote.modern{color:#274c6a;background:#edf4fa;border-left-color:#477aa5}.japanese-special{border-radius:8px;padding:10px 13px}.japanese-special.kakikudashi{background:#f5eff9;border-left:4px solid #76539a;font-family:Yu Mincho,Hiragino Mincho ProN,serif}.japanese-special.translation{background:#eef6fa;border-left:4px solid #3e7a9e}.japanese-special.morphology{background:#fbf4ea;border-left:4px solid #9a6b34;font-weight:800}.document-view code{background:#e9edf0;border-radius:5px;padding:2px 5px;font-family:Consolas,monospace}.document-view pre{color:#e8f2fa;background:#11263a;border-radius:9px;padding:14px;overflow:auto}.document-view ruby rt{color:#7a4b2d;font-size:.55em}.document-view .kaeriten{color:#a44c35;vertical-align:sub;margin-inline:.05em;font-size:.7em;font-weight:800;display:inline-block}.document-view .okurigana{color:#7a4b2d;white-space:nowrap;vertical-align:middle;font-size:.72em;line-height:1;display:inline-block}.document-view .okurigana-bracket{text-align:center;transform-origin:50%;inline-size:.78em;display:inline-block;transform:rotate(90deg)}.document-view.vertical .vertical-rotate-symbol{writing-mode:horizontal-tb;text-orientation:mixed;transform-origin:50%;place-items:center;block-size:1em;inline-size:1em;line-height:1;display:inline-grid;transform:rotate(90deg)}.document-view .okurigana-text{text-orientation:upright}.kanbun-line{font-family:Yu Mincho,Hiragino Mincho ProN,serif;display:inline}.kanbun-unit{inline-size:var(--kanbun-advance,1.25em);min-inline-size:var(--kanbun-advance,1.25em);vertical-align:top;block-size:2.4em;display:inline-block;position:relative}.kanbun-base{place-items:center;width:1em;height:1em;font-size:1em;line-height:1;display:grid;position:absolute;top:0;right:.65em}.kanbun-unit>.okurigana{writing-mode:vertical-rl;text-orientation:upright;font-size:.5em;line-height:1;display:inline-block;position:absolute;top:.55em;right:0}.kanbun-unit>.okurigana .okurigana-bracket{inline-size:.72em}.kanbun-kaeriten{color:#a44c35;white-space:nowrap;writing-mode:vertical-rl;text-orientation:upright;font-size:.52em;font-weight:800;line-height:1;position:absolute;top:.78em;left:0;right:auto}.kanbun-plain{text-align:center;block-size:2.4em;min-inline-size:.85em;display:inline-block}.kanbun-punctuation{text-orientation:upright}#verticalPrintPages{visibility:hidden;pointer-events:none;position:fixed;top:0;left:-100000px}.vertical-print-measure.document-view.vertical{writing-mode:vertical-rl;text-orientation:upright;width:273mm;height:180mm;min-height:180mm;max-height:180mm;margin:0;padding:0;overflow:auto}.vertical-print-page{writing-mode:horizontal-tb;width:273mm;height:180mm;min-height:180mm;max-height:180mm;margin:0;padding:0;position:relative;overflow:hidden}.vertical-print-page-content.document-view.vertical{top:0;right:calc(var(--print-page-offset) * -1);width:max-content;height:180mm;min-height:180mm;max-height:180mm;box-shadow:none;color:#203049;border:0;margin:0;padding:0;line-height:1.85;position:absolute;overflow:visible}.vertical-print-problem-page{justify-content:flex-end;align-items:stretch;display:flex}.vertical-print-problem-content{writing-mode:horizontal-tb;justify-content:flex-end;align-items:stretch;width:273mm;height:180mm;min-height:180mm;max-height:180mm;display:flex;overflow:hidden}.vertical-print-problem-content img{object-fit:contain;object-position:right top;width:auto;max-width:273mm;height:180mm;min-height:180mm;max-height:180mm;margin:0 0 0 auto;display:block}.table-scroll{max-width:100%;margin:18px 0;overflow-x:auto}.document-view table{border-collapse:collapse;width:100%;font-size:.94em}.document-view th,.document-view td{text-align:left;vertical-align:top;border:1px solid #bdc9d3;padding:9px 11px}.document-view th{color:#183550;background:#e9f0f4}.term-entry{border-bottom:1px solid #d8dfe3;margin:0 0 20px;padding:0 0 16px 18px}.term-entry h3{margin:0 0 5px}.term-entry p{margin:0}.document-view img,.document-view embed{max-width:100%}.document-view{-webkit-user-select:text;user-select:text}.input-latex-preview{color:#203049;-webkit-user-select:text;user-select:text;background:#f5f8fa;border:1px dashed #b9c7d2;border-radius:8px;padding:10px 12px;font-size:13px;line-height:1.65}.document-view.vertical{width:100%;height:var(--current-view-height);min-height:var(--current-view-height);max-height:var(--current-view-height);writing-mode:vertical-rl;text-orientation:upright;margin:0;overflow:auto}.document-view.vertical h1{border:0;border-left:2px solid #183550;padding:0 0 0 14px}.document-view sup,.document-view sub{line-height:0}.problem-attachment{gap:18px;display:grid}.problem-attachment img{object-fit:contain;object-position:left top;align-self:start;max-height:58vh;margin:0 auto 0 0}.problem-attachment .pdf-selected-page{width:100%;max-height:none}#problemDisplay.vertical .problem-attachment{align-items:stretch;height:100%;min-height:100%;display:flex}#problemDisplay.vertical{padding:0}#problemDisplay.vertical .problem-attachment img{object-fit:contain;object-position:right top;width:auto;max-width:none;height:100%;max-height:100%;margin:0}.problem-pdf{border:0;width:100%;min-height:62vh}.chat-form{background:#fffffff5;border:1px solid #d6dde3;border-radius:12px;grid-template-columns:minmax(0,1fr) auto;gap:8px;width:min(900px,100%);margin:5px auto 0;padding:7px;display:grid;box-shadow:0 7px 22px #0f263914}.chat-form textarea{resize:none;border:0;min-height:48px}.chat-window{z-index:70;cursor:move;background:#fffffffa;border:1px solid #c8d2dc;border-radius:16px;width:min(520px,100vw - 24px);position:fixed;right:clamp(12px,2vw,28px);box-shadow:0 24px 70px #05142047}.chat-window textarea,.chat-window input,.chat-window select,.chat-window .rich-text,.chat-window .input-latex-preview{cursor:text}.chat-window{resize:none;min-width:320px;max-width:calc(100vw - 24px);min-height:230px;max-height:calc(100dvh - 88px);padding:16px;bottom:clamp(12px,2vw,28px);overflow:auto}.chat-window-header{cursor:move;touch-action:none;justify-content:space-between;align-items:flex-start;gap:16px;display:flex}.chat-window-header small{color:var(--teal-600);letter-spacing:.16em;font-size:8px;font-weight:900}.chat-window-header h2{color:#183550;margin:2px 0 0;font:700 20px Georgia,Yu Mincho,serif}.chat-window-close{color:#29425f;cursor:pointer;background:#edf1f4;border:0;border-radius:9px;flex:none;width:34px;height:34px;font-size:20px}.chat-window-hint,.history-window-hint{color:#637083;margin:9px 0;font-size:11px;line-height:1.6}.chat-window .chat-form{grid-template-columns:1fr;width:100%;margin:0}.chat-window .chat-form textarea{resize:vertical;min-height:96px}.chat-window .chat-form .button{justify-self:end}.window-resize-handle{z-index:2;touch-action:none;background:0 0;border:0;padding:0;position:absolute}button.window-resize-handle.resize-n,button.window-resize-handle.resize-s{cursor:ns-resize;height:10px;left:12px;right:12px}button.window-resize-handle.resize-n{top:-5px}button.window-resize-handle.resize-s{bottom:-5px}button.window-resize-handle.resize-e,button.window-resize-handle.resize-w{cursor:ew-resize;width:10px;top:12px;bottom:12px}button.window-resize-handle.resize-e{right:-5px}button.window-resize-handle.resize-w{left:-5px}button.window-resize-handle.resize-ne,button.window-resize-handle.resize-nw,button.window-resize-handle.resize-se,button.window-resize-handle.resize-sw{width:16px;height:16px}button.window-resize-handle.resize-ne{cursor:nesw-resize;top:-7px;right:-7px}button.window-resize-handle.resize-nw{cursor:nwse-resize;top:-7px;left:-7px}button.window-resize-handle.resize-se{cursor:nwse-resize;bottom:-7px;right:-7px}button.window-resize-handle.resize-sw{cursor:nesw-resize;bottom:-7px;left:-7px}.history-card{grid-template-rows:auto auto auto minmax(0,1fr);display:grid}.history-list{border-top:1px solid #e0e5e9;min-height:0;margin-top:10px;overflow:auto}.history-item{border-bottom:1px solid #e0e5e9;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;padding:12px 40px 12px 2px;display:grid;position:relative}.history-item>div:first-child{gap:4px;min-width:0;display:grid}.history-item time{color:var(--teal-600);font-size:10px;font-weight:900}.history-item strong{color:#203049;text-overflow:ellipsis;white-space:nowrap;font-size:12px;overflow:hidden}.history-item small{color:#6a7687;font-size:10px}.history-item-actions{align-items:center;gap:8px;display:flex}.history-item-actions .button{min-height:34px;padding-inline:11px;font-size:10px}.history-delete{color:#fff;cursor:pointer;background:#c62828;border:0;border-radius:50%;width:24px;height:24px;padding:0;font-size:18px;font-weight:900;line-height:24px;position:absolute;top:7px;right:7px}.history-delete:hover{background:#a61919}.history-empty{color:#6a7687;text-align:center;padding:24px 8px;font-size:12px}.history-empty.is-error{color:var(--danger)}.explanation-chat-history{margin-top:34px}.chat-separator{color:#ce6418;text-align:center;border-block:4px double #d87931;margin:0 0 22px;padding:13px;font-size:18px}.explanation-chat-question{color:#1f538d;margin:18px 0 8px;font-weight:800}.explanation-chat-answer{border-left:2px solid #b7c9d9;margin:0 0 20px;padding-left:12px}.progress-status{z-index:45;position:absolute;top:112px;right:18px}.progress-status b{background:var(--navy-900);color:#fff;border-radius:8px;padding:8px 11px;font-size:10px;display:block;box-shadow:0 8px 24px #07182633}.modal{border:1px solid #c9d3dc;border-radius:16px;width:min(520px,100vw - 28px);padding:0;box-shadow:0 28px 80px #04111b59}.modal::backdrop{background:#0614209e}.modal form{padding:24px;position:relative}.modal h2{margin:0 0 10px;font:700 24px Georgia,Yu Mincho,serif}.modal p,.modal li{color:#526176;line-height:1.7}.modal-close{cursor:pointer;background:#edf1f4;border:0;border-radius:9px;width:34px;height:34px;font-size:20px;position:absolute;top:12px;right:12px}.toast{z-index:80;color:#fff;background:#091c2bf2;border-radius:999px;max-width:calc(100% - 30px);padding:11px 16px;font-size:12px;position:fixed;bottom:22px;left:50%;transform:translate(-50%);box-shadow:0 12px 34px #0819283d}@media (max-width:980px){.topbar{grid-template-columns:minmax(0,1fr) auto}.learning-line{justify-content:flex-start;overflow-x:auto}.learning-line-window-button{flex:none;margin-left:auto;position:static}}@media (max-width:760px){.topbar{flex-wrap:wrap;min-height:58px;padding:12px 15px;display:flex;position:sticky;top:0}.brand img{width:36px;height:36px}.brand{flex:1}.brand-copy strong{font-size:14px}.brand-copy small{display:none}.top-actions{grid-template-columns:repeat(3,minmax(0,1fr));width:100%;display:grid}.top-actions .button{min-height:34px;padding:0 9px;font-size:10px}.top-actions #installButton{display:none}.learning-line{padding-inline:15px}.workspace{padding:14px}.result-panel{grid-template-rows:auto auto minmax(560px,1fr);min-height:78dvh}.tabbar{padding-inline:8px}.tab{padding-inline:12px}.tab-actions .button{padding-inline:9px}.result-toolbar{padding-inline:12px}.view-actions .button{padding-inline:9px}.tab-pane{padding:12px}.document-view{padding:22px 18px}}@media (max-width:430px){.brand-copy{display:none}.top-actions{grid-template-columns:1fr 1fr}.learning-line>span{font-size:0}.learning-line>span b{font-size:10px}.field-grid{grid-template-columns:1fr}.source-actions .button{flex-basis:calc(50% - 7px)}.result-toolbar{align-items:flex-start}#resultTitle strong{font-size:15px}.view-actions{flex-wrap:wrap;justify-content:flex-end}.view-actions .export-button{padding-inline:8px;font-size:10px}.tab-actions{gap:4px}.tab-actions .button{padding-inline:8px;font-size:9px}.chat-window{resize:none;min-width:0}.history-item{grid-template-columns:1fr}.history-item-actions{justify-content:flex-end}}@media (prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}@media print{@page{size:A4 portrait;margin:12mm}@page vertical-output{size:A4 landscape;margin:12mm}body{background:#fff}.topbar,.learning-line,.setup-panel,.history-panel,.side-panel-backdrop,.tabbar,.result-toolbar,.chat-window,.progress-status,.toast{display:none!important}.workspace,.result-panel,.tab-stage,.tab-pane{display:block!important;position:static!important;overflow:visible!important}.tab-pane{padding:0}.tab-pane:not(.is-active){display:none!important}body.print-all .tab-pane[data-pane=problem],body.print-all .tab-pane[data-pane=explanation],body.print-all .tab-pane[data-pane=terms]{margin-bottom:26px;display:block!important}body.print-all .tab-pane[data-pane=log]{display:none!important}body.print-vertical,body.print-vertical .result-panel,body.print-vertical .tab-pane{page:vertical-output}body.print-all .pdf-selected-page{break-after:page;page-break-after:always;object-fit:contain;width:100%;max-height:none}body.print-all .problem-attachment{display:block}body.print-all .problem-attachment img{object-position:left top;margin:0 auto 0 0}.document-view{width:auto;min-height:0;box-shadow:none;border:0;padding:0;transform:none!important}body.print-vertical .app-shell,body.print-vertical .tab-stage{display:none!important}body.print-vertical #verticalPrintPages{visibility:visible;writing-mode:horizontal-tb;display:block;position:static}body.print-vertical .vertical-print-measure{display:none!important}body.print-vertical .vertical-print-page{break-after:page;page-break-after:always;display:block}body.print-vertical .vertical-print-page:last-child{break-after:auto;page-break-after:auto}body.print-vertical .vertical-print-problem-content img{object-fit:contain;object-position:right top;width:auto;max-width:273mm;height:180mm;min-height:180mm;max-height:180mm;margin:0 0 0 auto}}html,body{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}input,textarea,[contenteditable=true],[contenteditable=plaintext-only]{-webkit-user-select:text;user-select:text}img,a{-webkit-user-drag:none}.generated-figure{text-align:center;writing-mode:horizontal-tb;break-inside:avoid;background:#fff;border:1px solid #cfd8df;border-radius:10px;margin:20px auto;padding:12px}.generated-figure svg{width:min(100%,820px);height:auto;max-height:560px;margin:auto;display:block}.generated-figure figcaption{color:#637083;margin-top:8px;font-size:11px}.document-view.vertical .generated-figure{height:calc(var(--current-view-height) - 24px)}.document-view.vertical .generated-figure svg{width:auto;max-width:78vw;height:calc(100% - 28px);max-height:100%}.svg-warning{color:var(--danger);font-weight:700}.gemini-model-dialog{width:min(560px,100vw - 28px);color:var(--ink,#17263a);background:#fff;border:1px solid #c9d3dc;border-radius:16px;padding:0;box-shadow:0 28px 80px #04111b59}.gemini-model-dialog::backdrop{background:#0614209e}.gemini-model-dialog form{gap:14px;padding:24px;display:grid;position:relative}.gemini-model-dialog h2,.gemini-model-dialog p{margin:0}.gemini-model-dialog h2{padding-right:36px;font-size:22px}.gemini-model-dialog p,.gemini-model-dialog label{color:#526176;font-size:12px;line-height:1.7}.gemini-model-dialog label{gap:7px;font-weight:800;display:grid}.gemini-model-dialog select{color:#17263a;background:#fff;border:1px solid #cbd5df;border-radius:9px;width:100%;min-height:44px;padding:0 10px}.gemini-model-close{cursor:pointer;background:#edf1f4;border:0;border-radius:9px;width:34px;height:34px;font-size:20px;position:absolute;top:12px;right:12px}.gemini-model-setting-actions{justify-content:flex-end;margin-top:10px;display:flex}.account-model-button{text-align:left;align-items:center;gap:10px;min-width:190px;display:inline-flex}.account-model-copy{gap:2px;min-width:0;display:grid}.account-model-copy strong,.account-model-copy small{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.account-model-copy strong{font-size:11px}.account-model-copy small{color:#68798c;font-size:9px}.account-model-chevron{margin-left:auto;font-size:17px;line-height:1}.process-log-window{z-index:101;color:#e6eef9;background:#111c2d;border:1px solid #52647d;border-radius:13px;grid-template-rows:auto minmax(0,1fr);width:min(600px,100vw - 24px);min-width:min(320px,100vw - 24px);max-width:calc(100vw - 12px);height:min(400px,100dvh - 100px);min-height:min(190px,100dvh - 12px);max-height:calc(100dvh - 12px);display:grid;position:fixed;top:82px;right:18px;overflow:hidden;box-shadow:0 18px 55px #050d1b61}.process-log-window[hidden]{display:none}.communication-error-dialog{width:min(700px,100vw - 28px);max-width:none;color:var(--ink);background:#fff;border:1px solid #c83e4d;border-radius:16px;padding:0;box-shadow:0 28px 80px #0515206b}.communication-error-dialog::backdrop{background:#06141fb3}.communication-error-dialog>section{gap:12px;padding:24px;display:grid}.communication-error-kicker{color:#b42335;letter-spacing:.14em;font-size:10px;font-weight:900}.communication-error-dialog h2,.communication-error-dialog p{margin:0}.communication-error-dialog h2{color:var(--navy-800)}.communication-error-dialog p{color:var(--muted);line-height:1.7}.communication-error-dialog label{color:var(--navy-800);font-size:12px;font-weight:900}.communication-error-dialog textarea{resize:vertical;color:#16283a;-webkit-user-select:text;user-select:text;background:#f7f9fa;min-height:220px;font:12px/1.6 Consolas,Yu Gothic UI,monospace}.communication-error-actions{grid-template-columns:auto 1fr auto auto;align-items:center;gap:9px;display:grid}.communication-error-actions .button{min-height:42px}@media (max-width:620px){.communication-error-actions{grid-template-columns:1fr 1fr}.communication-error-actions span{display:none}.communication-error-actions .button:first-child{grid-column:1/-1}}.process-log-head{cursor:move;touch-action:none;-webkit-user-select:none;user-select:none;background:#17263b;border-bottom:1px solid #30425b;justify-content:space-between;align-items:center;gap:12px;min-height:52px;padding:8px 10px 8px 14px;display:flex}.process-log-head>div{gap:3px;display:grid}.process-log-head small{color:#70cab2;letter-spacing:.17em;font-size:9px;font-weight:900}.process-log-head strong{font:700 15px Georgia,Yu Mincho,serif}.process-log-close{color:#c7d3e5;cursor:pointer;background:0 0;border:0;border-radius:50%;width:32px;height:32px;font-size:22px}.process-log-close:hover{color:#fff;background:#2b3b52}.process-log-body{color:#d8e6f6;white-space:pre-wrap;overflow-wrap:anywhere;-webkit-user-select:text;user-select:text;min-width:0;min-height:0;margin:0;padding:14px;font:12px/1.65 Consolas,Yu Gothic UI,monospace;overflow:auto}.process-log-resize-handle{z-index:3;touch-action:none;-webkit-user-select:none;user-select:none;background:0 0;border:0;padding:0;position:absolute}button.process-log-resize-handle.resize-n,button.process-log-resize-handle.resize-s{cursor:ns-resize;height:10px;left:14px;right:14px}button.process-log-resize-handle.resize-n{top:0}button.process-log-resize-handle.resize-s{bottom:0}button.process-log-resize-handle.resize-e,button.process-log-resize-handle.resize-w{cursor:ew-resize;width:10px;top:14px;bottom:14px}button.process-log-resize-handle.resize-e{right:0}button.process-log-resize-handle.resize-w{left:0}button.process-log-resize-handle.resize-ne,button.process-log-resize-handle.resize-nw,button.process-log-resize-handle.resize-se,button.process-log-resize-handle.resize-sw{width:16px;height:16px}button.process-log-resize-handle.resize-ne{cursor:nesw-resize;top:0;right:0}button.process-log-resize-handle.resize-nw{cursor:nwse-resize;top:0;left:0}button.process-log-resize-handle.resize-se{cursor:nwse-resize;bottom:0;right:0}button.process-log-resize-handle.resize-sw{cursor:nesw-resize;bottom:0;left:0}.process-log-resize-handle:focus-visible{outline-offset:-2px;outline:2px solid #70cab2}.process-log-head .process-log-close{z-index:4;position:relative}.gemini-setting-section{background:#f7f9fb;border:1px solid #d5dee7;border-radius:12px;gap:9px;padding:15px;display:grid}.gemini-setting-section h3{color:#17263a;margin:0;font-size:14px}.gemini-setting-status{color:#526176;margin:0;font-weight:800}.gemini-setting-status.is-ready{color:#176b4d}.gemini-setting-status.is-error{color:#a64658}.gemini-setting-section .account-switch-button{justify-self:start}.camera-media-dialog{background:#f7fafc;border:1px solid #b8c8d5;border-radius:14px;width:min(980px,100vw - 8px);max-width:none;height:calc(100dvh - 8px);max-height:none;padding:0;overflow:hidden}.camera-media-dialog::backdrop{-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);background:#081622ad}.camera-media-card{grid-template-rows:auto minmax(0,1fr);gap:0;width:100%;height:100%;margin:0;display:grid}.camera-media-card>header{background:#fff;border-bottom:1px solid #d8e1e8;justify-content:space-between;align-items:center;gap:12px;min-height:54px;padding:8px 12px 8px 18px;display:flex}.camera-media-card>header div{gap:2px;display:grid}.camera-media-card>header small{color:var(--teal-600,#168f8a);letter-spacing:.16em;font-size:9px;font-weight:900}.camera-media-card>header h2{color:var(--navy,#102b3a);margin:0;font-size:17px}.camera-media-close{color:#526176;cursor:pointer;background:0 0;border:0;border-radius:50%;width:36px;height:36px;font-size:24px}.camera-media-choice{text-align:center;align-content:center;gap:22px;padding:24px;display:grid}.camera-media-choice>p{color:#526176;margin:0;font-weight:800}.camera-media-choice>div{grid-template-columns:repeat(2,minmax(0,260px));justify-content:center;gap:18px;display:grid}.camera-media-choice button{min-height:150px;color:var(--navy,#102b3a);cursor:pointer;background:#fff;border:2px solid #c9d7df;border-radius:16px;align-content:center;gap:8px;padding:22px;display:grid}.camera-media-choice button:hover{border-color:var(--teal-600,#168f8a);box-shadow:0 8px 24px #1737441f}.camera-media-choice strong{font-size:25px}.camera-media-choice span{color:#5c6d7d;font-size:12px}.camera-media-live,.camera-media-editor,.camera-media-review{min-width:0;min-height:0}.camera-media-live{grid-template-rows:minmax(0,1fr) auto;display:grid}.camera-media-live[hidden],.camera-media-editor[hidden],.camera-media-review[hidden],.camera-media-choice[hidden]{display:none}.camera-media-stage{background:#08131b;min-height:0;position:relative;overflow:hidden}.camera-media-stage video{object-fit:contain;width:100%;height:100%;display:block}.camera-media-guide{aspect-ratio:210/297;pointer-events:none;border:2px dashed #3baeff;border-radius:6px;width:82%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);box-shadow:0 0 0 200vmax #0003}.camera-media-status{color:#eef7fa;text-align:center;background:#000000a8;border-radius:999px;max-width:calc(100% - 24px);margin:0;padding:6px 10px;font-size:11px;position:absolute;top:10px;left:50%;transform:translate(-50%)}.camera-media-status.error{background:#801b1be6}.camera-media-shutter{cursor:pointer;background:#00000040;border:3px solid #fff;border-radius:50%;width:68px;height:68px;padding:5px;position:absolute;bottom:16px;left:50%;transform:translate(-50%)}.camera-media-shutter span{background:#fff;border-radius:50%;width:100%;height:100%;display:block}.camera-media-live>footer,.camera-media-editor>footer,.camera-media-review>footer{background:#fff;border-top:1px solid #d8e1e8;justify-content:flex-end;align-items:center;gap:9px;min-height:58px;padding:9px 12px;display:flex}.camera-media-file{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.camera-media-editor{grid-template-rows:minmax(0,1fr) auto;display:grid}.camera-media-canvas-wrap{touch-action:none;background:#0b1821;place-self:center;width:-moz-fit-content;width:fit-content;max-width:100%;max-height:100%;position:relative;overflow:hidden}.camera-media-canvas-wrap canvas{object-fit:contain;width:auto;max-width:100%;height:auto;max-height:calc(100dvh - 190px);display:block}.camera-media-handles{touch-action:none;position:absolute;inset:0}.camera-media-handles svg{z-index:1;pointer-events:none;width:100%;height:100%;display:block;position:absolute;inset:0;overflow:visible}.camera-media-handles polygon{fill:#079cff1f;stroke:#079cff;stroke-width:2px;vector-effect:non-scaling-stroke;filter:drop-shadow(0 0 1px #001722)drop-shadow(0 0 2px #fff)}.camera-media-handles polygon.image-crop-outline{fill:#079cff0f;stroke-width:3px;stroke-dasharray:7 5}.camera-media-handle{z-index:2;touch-action:none;cursor:move;background:0 0;border:0;border-radius:50%;width:54px;height:54px;padding:0;position:absolute;transform:translate(-50%,-50%)}.camera-media-handle:after{content:"";background:#079cff;border:3px solid #fff;border-radius:50%;width:16px;height:16px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);box-shadow:0 1px 5px #001722}.camera-media-handle.crop-edge:after{border-radius:999px;width:30px;height:12px}.camera-media-handle.crop-edge-left:after,.camera-media-handle.crop-edge-right:after{width:12px;height:30px}.camera-media-quality-menu{color:#526176;align-items:center;gap:6px;margin-right:auto;font-size:11px;font-weight:800;display:flex}.camera-media-quality-menu select{color:#344b5d;background:#fff;border:1px solid #bdccd5;border-radius:8px;width:auto;min-width:130px;min-height:38px;padding:6px 30px 6px 9px}.camera-media-review{grid-template-rows:minmax(0,1fr) auto auto;display:grid}.camera-media-review-stage{background:#0b1821;place-items:center;min-width:0;min-height:0;display:grid;overflow:hidden}.camera-media-review-stage>img{width:min(var(--camera-preview-width,100%), 100%);max-width:100%;height:min(var(--camera-preview-height,100%), 100%);object-fit:contain;min-width:0;min-height:0;max-height:100%;display:block}.camera-media-pages{background:#edf3f6;border-top:1px solid #d8e1e8;align-items:center;gap:8px;min-height:70px;max-height:92px;padding:7px 10px;display:flex;overflow-x:auto}.camera-media-pages>p{color:#526176;flex:none;margin:0;font-size:11px;font-weight:800}.camera-media-page{cursor:pointer;background:#fff;border:1px solid #bdccd5;border-radius:7px;flex:0 0 58px;gap:2px;padding:3px;display:grid;position:relative}.camera-media-page.selected{border-color:#168f8a;box-shadow:0 0 0 2px #168f8a47}.camera-media-page img{object-fit:cover;width:50px;height:42px}.camera-media-page span{font-size:8px}.camera-media-page b{color:#fff;background:#a64658;border-radius:6px;padding:2px 4px;font-size:8px;position:absolute;top:-5px;right:-5px}@media (max-width:620px){.camera-media-dialog{border-radius:0;width:100vw;height:100dvh}.camera-media-choice>div{grid-template-columns:1fr}.camera-media-choice button{min-height:112px}.camera-media-live>footer,.camera-media-editor>footer,.camera-media-review>footer{flex-wrap:wrap}.camera-media-live>footer .button,.camera-media-editor>footer .button,.camera-media-review>footer .button{flex:auto}}@media print{.camera-media-dialog{display:none!important}}
