:root{font-family:system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;display:flex;place-items:center;min-width:320px;min-height:100vh}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;background-color:#1a1a1a;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}@media (prefers-color-scheme: light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}:root{--gap: 12px}*{box-sizing:border-box}.app h1{text-align:left;margin-bottom:12px;font-size:18px}body{background:#f2f4ef;width:100%}#root{max-width:none;padding:0;width:100%}.layout{min-height:100vh}.sidebar{width:100vw;background:#fafafa;border-right:1px solid #e6e8eb;position:fixed;height:100dvh;overflow:hidden;transform:translate(-100%);transition:transform .2s ease;z-index:60;box-shadow:0 10px 30px #0000001f}.sidebar.open{transform:translate(0)}.backdrop{position:fixed;inset:0;background:#0006;z-index:20}.main{flex:1;padding:24px}.topbar{display:flex;align-items:center;gap:8px;margin-bottom:12px}.menu-btn{background:transparent;border-color:#e5e7eb}.menu-btn:hover{background:#f3f4f6}.brand{display:flex;align-items:center;gap:8px;margin-bottom:12px}.brand .dot{width:8px;height:8px;border-radius:50%;background:#84cc16}.panel{margin:16px 16px 28px;text-align:left}.panel>p{cursor:pointer;font-weight:700;margin:16px 0}.divider{height:8px;background:#eaeaea;width:100%}label{display:flex;flex-direction:row;gap:6px;font-size:14px;width:100%;justify-content:space-between;align-items:center}.vertical{display:flex;flex-direction:column;gap:6px;font-size:14px;width:100%;justify-content:space-between;align-items:start;margin-bottom:20px}input[type=text],input[type=number],input:not([type]),input[type=file],input[type=search],input[type=url],input[type=email],input[type=password],select{padding:12px 10px;border:1px solid rgba(0,0,0,.2);border-radius:6px;font-size:15px;width:100%}textarea{width:100%;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;padding:8px 10px;border:1px solid rgba(0,0,0,.2);border-radius:6px;font-size:14px}textarea[readOnly],textarea[readonly]{background:#f7f7f7;color:#333}.row{display:flex;align-items:center;flex-wrap:wrap}.checkbox{display:inline-flex;align-items:center;gap:8px;font-size:14px}button{padding:10px 14px;border-radius:6px;border:1px solid rgba(0,0,0,.2);background:#add8a8;cursor:pointer}button:disabled{opacity:.6;cursor:default}button.danger{background:#f2a3a3;border-color:#e49393}button.danger:hover{background:#ef9}.btn-primary{background:#111827;color:#fff;border-color:#111827}.btn-primary:hover{background:#0b1220}.btn-ghost{background:transparent;border-color:#e5e7eb}.btn-ghost:hover{background:#f3f4f6}.hint{color:#666;font-size:12px;margin-top:-4px;margin-bottom:8px}.output pre{white-space:pre-wrap;background:#f8f8f8;border:1px solid #eee;padding:12px;border-radius:6px}.result-header{display:flex;align-items:center;gap:8px;margin-bottom:12px}.result-title{font-size:16px;font-weight:600}.reader{max-width:760px;margin:0 auto;padding:8px 4px;overflow-anchor:none}.reader p{margin:0 0 1em;line-height:1.9;font-size:18px;color:#1f2937}.reader .p2,.reader .p3{overflow-anchor:none}.reader p.title-line{font-weight:700;font-size:20px}.reader .sent{cursor:pointer}.reader .sent:hover{background:#0000000a}.reader .sent,.reader .trans-paragraph{-webkit-tap-highlight-color:transparent;outline:none}.reader,.reader p,.reader .trans-paragraph{-webkit-user-select:text;user-select:text}.bottomsheet{position:fixed;inset:0;background:#0006;display:flex;align-items:flex-end;justify-content:center;z-index:40}.bottomsheet-body{width:100%;max-width:720px;background:#fff;border-top-left-radius:12px;border-top-right-radius:12px;padding:16px;box-shadow:0 -10px 30px #0000001a}.bottomsheet .term-row{display:grid;grid-template-columns:minmax(120px,auto) auto 1fr auto auto;gap:8px;align-items:center}.bottomsheet select{padding:8px 10px;border:1px solid #ddd;border-radius:6px}.ui-select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center;background-size:16px 16px;padding:10px 36px 10px 12px;border:1px solid #e5e7eb;border-radius:8px;font-size:14px;color:#111827;box-shadow:0 1px 2px #00000005;transition:border-color .15s ease,box-shadow .15s ease}.ui-select:hover{border-color:#d1d5db}.ui-select:focus{outline:none;border-color:#111827;box-shadow:0 0 0 3px #1118271f}.columns{display:grid;grid-template-columns:1fr;gap:12px}@media (min-width: 900px){.columns{grid-template-columns:1fr 1fr}}.original{font-size:13px;color:#444;background:#fbfbfb}.translation{font-size:14px;line-height:1.6}.translation p{margin-bottom:14px}.htmlOut{border:1px solid #eee;padding:12px;border-radius:6px}.list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:8px}.seg{padding:10px 12px;border:1px solid #eee;border-radius:6px;background:#fafafa;cursor:pointer;text-align:left}.seg.pending{opacity:.7;cursor:default}.seg.err{border-color:#e99;background:#fff5f5}.seg.done:hover{background:#f0f7ef}.modal{position:fixed;inset:0;background:#00000040;display:flex;align-items:center;justify-content:center;padding:16px;z-index:70;animation:fadeIn .15s ease-out}.modal-body{background:#fff;max-width:640px;width:100%;border-radius:12px;padding:20px;border:1px solid #e5e7eb;box-shadow:0 20px 60px #0003,0 6px 20px #0000001a;animation:popIn .18s ease-out}.modal-header{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}.modal-title{margin:0;font-size:18px;font-weight:600;color:#111827}.modal-desc{margin:4px 0 0;color:#6b7280;font-size:13px}.modal-body .row button{border-radius:999px}.modal-body p{background:#f9fafb;border:1px solid #eef2f7;border-radius:10px;padding:12px;width:100%;overflow:auto;font-size:16px;line-height:180%}.modal-footer{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}.icon-btn{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:6px;border:1px solid #e5e7eb;background:#fff;color:#6b7280;cursor:pointer}.icon-btn:hover{background:#f3f4f6}@keyframes popIn{0%{transform:translateY(6px) scale(.98);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.terms{display:flex;flex-direction:column;gap:8px;margin:8px 0}.term-row{display:grid;grid-template-columns:auto 1fr auto auto;gap:8px;align-items:center}.term-src{font-weight:600;white-space:nowrap}.term-input{padding:8px 10px;border:1px solid #ddd;border-radius:6px}.progress{position:relative;height:10px;background:#f0f0f0;border-radius:6px;margin:8px 0 6px}.progress .bar{position:absolute;left:0;top:0;bottom:0;background:#add8a8;border-radius:6px;transition:width .2s ease}.progress .meta{font-size:12px;color:#555;margin-top:6px}.log{max-height:200px;overflow:auto;background:#0a0a0a;color:#d8d8d8;padding:8px;border-radius:6px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px}.logline{white-space:pre-wrap}.nav-overlay{position:fixed;inset:0;background:transparent;z-index:45;display:none;pointer-events:none;flex:1}.nav-overlay.active{display:flex;pointer-events:auto}.nav-overlay.with-drawer{pointer-events:none}.nav-topbar{position:absolute;top:0;left:50%;transform:translate(-50%);width:100%;background:#d8dbd5;padding:6px 12px 10px;box-sizing:border-box;display:flex;gap:4px;align-items:center;justify-content:center;flex-direction:column}.nav-topbar p{margin:0;font-size:16px;color:#3f3f3f;font-weight:500;line-height:200%}.nav-topbar:before{content:"";position:absolute;inset:0 0 -1px;border-bottom:1px solid #e0e0e0;pointer-events:none}.nav-input-container{display:flex;align-items:stretch;gap:4px;width:100%;flex-direction:row;height:max-content}.nav-title span{font-size:16px;font-weight:600;color:#111827;margin:10px 20px}.nav-urlbar{width:100%;background:#fff;border-radius:8px;border:none;padding:8px 8px 8px 16px;resize:vertical;overflow:auto;font-size:14px;line-height:1.5}.nav-urlbar:before{content:"";position:absolute;inset:0;border:1px solid #e0e0e0;border-radius:8px;pointer-events:none}.nav-translate{padding:6px 12px;border-radius:8px;background:#f0f3ed;color:#3f3f3f;border:none;font-size:14px;white-space:nowrap}.nav-toolbar{position:absolute;bottom:0;left:50%;transform:translate(-50%);width:100%;background:#d8dbd5;padding:6px 12px 12px;box-sizing:border-box;display:flex;gap:4px;align-items:center;justify-content:center}.nav-toolbar:before{content:"";position:absolute;inset:-1px 0 0;border-top:1px solid #e0e0e0;pointer-events:none}.nav-btn{background:transparent;border:none;display:inline-flex;align-items:center;gap:4px;width:100%;padding:8px;height:48px;border-radius:8px;font-size:14px;color:#3f3f3f;cursor:pointer;justify-content:center}.nav-btn svg{width:24px;height:24px}.nav-btn:active{background:#efefef}.drawer-content{height:100%;overflow:auto;padding-bottom:100px;box-sizing:border-box;-webkit-overflow-scrolling:touch;display:flex;flex-direction:column;width:100%}.drawer-toolbar{position:fixed;left:0;right:0;bottom:0;background:#d8dbd5;padding:6px 12px calc(12px + env(safe-area-inset-bottom));box-sizing:border-box;display:flex;gap:4px;align-items:center;justify-content:center;z-index:80}.drawer-toolbar:before{content:"";position:absolute;inset:-1px 0 0;border-top:1px solid #e0e0e0;pointer-events:none}.reader.page-disabled{-webkit-user-select:none;user-select:none}.reader.page-disabled .sent,.reader.page-disabled .trans-paragraph{pointer-events:none}.page-overlay{position:fixed;inset:0;z-index:50;background:transparent}
