:root{color-scheme:light;--ink:#152736;--muted:#697b89;--line:#e5eaef;--bg:#f4f7f9;--panel:#fff;--accent:#226a84;--accent-dark:#15536b;--mint:#e6f4f2;--blue:#eaf3f9;--danger:#c34e4e;--shadow:0 5px 26px rgba(16,37,55,.045)}*{box-sizing:border-box}html{font-family:-apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,"Noto Sans JP",Meiryo,sans-serif;-webkit-text-size-adjust:100%}body{margin:0;background:var(--bg);color:var(--ink);font-size:14px}button,input{font:inherit}button{cursor:pointer}button:disabled{opacity:.42;cursor:not-allowed}button:focus-visible,input:focus-visible,.drop-zone:focus-visible{outline:3px solid #74bbd1;outline-offset:2px}[hidden]{display:none!important}.app-header{background:#142637;color:white}.header-inner{max-width:1330px;margin:auto;min-height:80px;padding:14px 28px;display:flex;align-items:center;justify-content:space-between;gap:20px}.brand{display:flex;align-items:center;gap:13px}.brand-icon{width:41px;height:41px;border-radius:12px;display:grid;place-items:center;background:#337e91;color:#fff;font-size:29px;font-weight:700}.brand-icon span{line-height:1}.brand-name{font-size:22px;font-weight:800;letter-spacing:.04em}.version{font-size:11px;letter-spacing:0;opacity:.8;font-weight:500}.brand-sub{color:#c0d1db;font-size:10px;margin-top:3px;letter-spacing:.06em}.privacy-mark{display:inline-flex;gap:8px;align-items:center;color:#d7edf1;background:#254153;border:1px solid #3a5667;border-radius:100px;padding:8px 13px;font-size:12px}.privacy-dot{width:8px;height:8px;background:#91d5bd;border-radius:100%}.main{max-width:1330px;margin:0 auto;padding:30px 28px 22px}.intro{display:flex;justify-content:space-between;gap:30px}.eyebrow{margin:0 0 10px;font-size:10px;color:var(--accent);font-weight:800;letter-spacing:.23em}.intro h1{font-size:clamp(25px,2.55vw,35px);letter-spacing:-.045em;margin:0 0 9px;font-weight:850}.intro p:last-child{margin:0;color:var(--muted);font-size:13px;line-height:1.7}.modes{display:flex;gap:8px;margin:26px 0 19px;border-bottom:1px solid #dfe7eb;overflow-x:auto;scrollbar-width:none}.mode{border:0;background:none;padding:14px 19px 16px;color:#6b7a86;white-space:nowrap;font-weight:750;font-size:13px;border-bottom:3px solid transparent}.mode.active{color:var(--accent-dark);border-color:var(--accent)}.mode:hover{color:var(--accent)}.soon{display:inline-block;background:#e8edf0;color:#73808c;border-radius:40px;padding:3px 7px;font-weight:600;font-size:10px;margin-left:3px}.workspace{display:grid;grid-template-columns:minmax(290px,340px) minmax(0,1fr);align-items:start;gap:18px}.left-stack{display:grid;gap:18px}.panel{background:var(--panel);border:1px solid var(--line);box-shadow:var(--shadow);border-radius:16px;padding:22px}.panel-top{display:flex;align-items:start;justify-content:space-between;gap:8px;margin-bottom:18px}.step{font-size:10px;letter-spacing:.16em;font-weight:800;color:var(--accent);margin-bottom:6px}.panel h2{font-size:18px;margin:0;line-height:1.3}.panel-note{font-size:10px;color:var(--muted);padding-top:19px}.drop-zone{padding:25px 12px 22px;display:flex;flex-direction:column;align-items:center;gap:8px;border:1.6px dashed #a6c6d1;background:#f1f8fa;border-radius:13px;text-align:center;cursor:pointer;transition:background .15s,border .15s;user-select:none}.drop-zone:hover,.drop-zone.dragover{background:#e3f3f7;border-color:#2a8197}.upload-symbol{width:47px;height:47px;border:2px solid #b9d8e3;color:var(--accent);background:#fff;display:grid;place-items:center;border-radius:12px;font-size:29px;font-weight:300}.drop-zone strong{font-size:15px;color:#22566e}.drop-zone p{font-size:11px;color:var(--muted);margin:0;line-height:1.5}.drop-zone small{font-size:10px;color:#8997a3}.sources{display:grid;gap:8px;margin-top:13px}.source{display:flex;align-items:center;gap:9px;background:#f6f8fa;border:1px solid #ecf0f2;padding:9px 10px;border-radius:9px}.source-icon{color:#b34e4e;background:#ffecec;border-radius:6px;padding:6px;font-weight:850;font-size:9px}.source-info{flex:1;min-width:0}.source-name{font-size:12px;font-weight:750;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.source-meta{font-size:10px;color:var(--muted);margin-top:3px}.close-source{background:none;border:0;color:#83949f;font-size:21px;padding:0 4px;line-height:1}.tiny-notice{color:#82909d;font-size:10px;line-height:1.7;margin:13px 0 0}.stats{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:17px}.stats>div{background:#f2f7f9;border:1px solid #e4eef0;text-align:center;border-radius:10px;padding:11px 6px;display:grid;gap:3px}.stats b{font-size:24px;color:#205a6f;font-variant-numeric:tabular-nums}.stats small{font-size:10px;color:var(--muted)}.form-label{display:block;margin:12px 0 7px;font-size:11px;font-weight:800;color:#344858}.filename{display:flex;border:1px solid #dce5eb;border-radius:8px;align-items:center;overflow:hidden;background:#fff}.filename:focus-within{outline:2px solid #9dd0e1}.filename input{min-width:0;flex:1;padding:11px;border:0;outline:0;font-size:12px}.filename span{font-size:11px;color:var(--muted);padding-right:11px}.export-options{padding:0;margin:17px 0 0;border:0}.export-options legend{font-size:11px;font-weight:800;color:#344858;padding:0 0 9px}.export-options label{padding:10px;display:flex;align-items:start;gap:9px;border:1px solid #e7ebef;border-radius:9px;margin-bottom:7px;cursor:pointer}.export-options label:has(input:checked){border-color:#8fc2d1;background:#f0f8fa}.export-options input{margin:3px 0 0;accent-color:var(--accent)}.export-options label span{display:flex;flex-direction:column;gap:3px}.export-options label strong{font-size:12px}.export-options label small{color:var(--muted);font-size:10px}.ranges-area{margin:10px 0}.ranges-area input{width:100%;border:1px solid #dce5eb;padding:10px;border-radius:7px;font-size:12px}.ranges-area small{display:block;color:var(--muted);font-size:10px;line-height:1.6;margin-top:6px}.primary-action{width:100%;display:flex;align-items:center;justify-content:center;gap:8px;border:0;background:var(--accent);color:white;border-radius:9px;padding:14px;font-weight:800;font-size:13px;margin-top:13px}.primary-action:not(:disabled):hover{background:var(--accent-dark)}.primary-action.compact{width:auto;margin:12px auto 0;padding:12px 24px}.page-panel{min-height:610px}.page-panel-head{margin-bottom:11px}.count-pill{background:#f1f5f7;color:#788995;border-radius:99px;padding:5px 9px;font-size:10px;vertical-align:middle;white-space:nowrap}.header-actions{display:flex;align-items:center;gap:5px}.text-button{background:none;border:0;color:var(--accent);padding:8px 5px;font-size:12px;font-weight:750}.toolbar{border-top:1px solid var(--line);border-bottom:1px solid var(--line);display:flex;justify-content:space-between;gap:12px;align-items:center;padding:13px 0;margin-bottom:16px}.toolbar-lead{font-size:11px;color:var(--muted);line-height:1.65}.toolbar-actions{display:flex;gap:6px;white-space:nowrap}.small-button{padding:8px 11px;border:1px solid #cfdae1;background:#fff;border-radius:7px;color:#456070;font-size:11px;font-weight:750}.small-button:not(:disabled):hover{background:#eef6f7;border-color:#9ec3cc}.empty-state{padding:65px 18px 45px;text-align:center}.empty-illustration{height:103px;width:126px;position:relative;margin:0 auto 22px}.paper{position:absolute;width:63px;height:80px;border:2px solid #d4e0e5;background:white;border-radius:6px;box-shadow:0 8px 20px #a7bec222}.paper:after{content:'';display:block;position:absolute;top:20px;left:13px;width:33px;height:24px;background:repeating-linear-gradient(to bottom,#d6e2e8 0px,#d6e2e8 2px,transparent 2px,transparent 10px)}.paper.one{left:2px;top:18px;transform:rotate(-15deg)}.paper.two{right:8px;top:17px;transform:rotate(13deg)}.paper.three{left:34px;top:5px;border-color:#bad4dd}.empty-state h3{font-size:18px;margin:0 0 9px}.empty-state p{font-size:12px;color:var(--muted);line-height:1.8;max-width:400px;margin:0 auto}.howto{display:flex;justify-content:center;gap:9px;flex-wrap:wrap;margin-top:27px}.howto span{font-size:10px;color:#5b8392;background:#f0f7f8;padding:9px 11px;border-radius:99px}.pages-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:13px}.page-card{border:1px solid #e0e8ec;border-radius:11px;background:#fff;min-width:0;overflow:hidden;position:relative;box-shadow:0 3px 11px rgba(38,60,68,.03)}.page-card.disabled{opacity:.53}.page-card.dragging{opacity:.45;border-style:dashed}.page-card.drag-target{border:2px solid #3986a1}.page-card-head{padding:10px 10px 8px;display:flex;justify-content:space-between;gap:6px;align-items:center}.page-number{font-size:10px;font-weight:800;color:#58717d}.page-include{display:flex;align-items:center;gap:4px;font-size:10px;color:#476171;font-weight:700;cursor:pointer}.page-include input{width:15px;height:15px;accent-color:var(--accent)}.thumb-button{display:block;width:calc(100% - 20px);aspect-ratio:1/1.17;background:#eef3f6;border:0;border-radius:7px;margin:0 10px;overflow:hidden;position:relative;padding:10px;cursor:zoom-in}.thumb-sheet{position:absolute;inset:10px 17px;background:white;box-shadow:0 1px 7px #0001;display:grid;place-items:center;overflow:hidden}.thumb-sheet canvas{max-width:100%;max-height:100%;object-fit:contain}.thumb-placeholder{font-size:27px;color:#afc2ca}.thumb-button:hover{outline:2px solid #c6dfe6}.page-file{padding:10px 11px 0;font-size:11px;font-weight:750;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.page-origin{padding:2px 11px 9px;color:#8998a2;font-size:10px}.page-actions{padding:8px;border-top:1px solid #eef2f4;display:grid;grid-template-columns:repeat(5,1fr);gap:2px}.page-actions button{border:0;background:transparent;border-radius:6px;color:#526d7a;font-size:14px;min-width:0;min-height:32px}.page-actions button:hover{background:#eaf4f7}.page-actions button.delete{color:#c36d6d}.page-actions button:disabled{opacity:.22}.page-summary{display:flex;justify-content:space-between;align-items:center;gap:10px;border-top:1px solid var(--line);margin-top:17px;padding-top:14px;color:var(--muted);font-size:11px}.footer{display:flex;justify-content:space-between;gap:10px;margin:23px 0;font-size:10px;color:#8e9da8}.future-panel{text-align:center;max-width:620px;margin:0 auto;padding:60px 20px}.future-illustration{font-size:63px;color:#7eacb3;margin-bottom:16px}.future-panel h2{font-size:25px;margin:8px 0}.future-panel>p{color:var(--muted);max-width:430px;margin:16px auto;line-height:1.8}.future-note{font-size:11px!important}.toast{position:fixed;z-index:50;bottom:25px;left:50%;transform:translateX(-50%);background:#1d3443;color:#fff;padding:13px 19px;border-radius:9px;box-shadow:0 9px 25px #122d3440;max-width:min(90vw,600px);font-size:12px;line-height:1.6}.toast.error{background:#8e3535}.busy-overlay{position:fixed;inset:0;background:#1426378f;z-index:100;display:grid;place-items:center}.busy-card{border-radius:14px;background:white;width:min(90vw,350px);padding:33px;text-align:center;box-shadow:0 20px 70px #10222b55;display:grid;justify-items:center;gap:12px}.busy-card p{margin:0;font-size:12px;color:var(--muted)}.spinner{width:31px;height:31px;border:3px solid #cce3e9;border-top-color:var(--accent);border-radius:50%;animation:spin .7s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.preview-dialog{border:0;border-radius:16px;padding:0;max-width:min(95vw,830px);width:100%;max-height:93dvh;box-shadow:0 20px 60px #0006}.preview-dialog::backdrop{background:#122836b5}.dialog-top,.dialog-bottom{padding:15px 18px;display:flex;justify-content:space-between;gap:12px;align-items:center}.dialog-top{border-bottom:1px solid var(--line)}.dialog-top strong{font-size:15px}.dialog-top p{margin:5px 0 0;font-size:11px;color:var(--muted)}.dialog-bottom{border-top:1px solid var(--line)}.dialog-bottom span{font-size:11px;color:var(--muted)}.icon-button{background:#f1f5f7;border:0;border-radius:8px;width:37px;height:37px;font-size:25px;color:#566e7d}.preview-canvas-wrap{min-height:250px;max-height:68dvh;overflow:auto;background:#e8edef;padding:16px;display:flex;justify-content:center;align-items:flex-start}.preview-canvas-wrap canvas{display:block;max-width:100%;height:auto;background:white;box-shadow:0 4px 20px #0002}.mobile-br{display:none}@media(max-width:900px){.workspace{grid-template-columns:minmax(0,1fr)}.left-stack{grid-template-columns:1fr 1fr;align-items:start}.page-panel{min-height:450px}.drop-zone{min-height:164px}}@media(max-width:640px){.header-inner{padding:12px 16px;min-height:72px}.brand-name{font-size:19px}.brand-sub{font-size:9px}.brand-icon{height:37px;width:37px}.privacy-mark{font-size:0;width:29px;padding:0;height:29px;justify-content:center;background:#254153}.privacy-dot{width:9px;height:9px}.main{padding:23px 12px 16px}.intro{padding:0 4px}.intro h1{font-size:24px}.intro p:last-child{font-size:11px}.modes{margin:23px 0 13px}.mode{padding:13px 10px;font-size:11px}.soon{font-size:9px;padding:2px 5px}.left-stack{grid-template-columns:1fr;gap:12px}.workspace{gap:12px}.panel{padding:16px;border-radius:12px}.panel h2{font-size:17px}.drop-zone{min-height:0;padding:18px 10px}.export-panel{order:1}.page-panel{order:0}.workspace{display:flex;flex-direction:column}.left-stack{display:contents}.upload-panel{order:0;width:100%}.page-panel{order:1;width:100%}.export-panel{order:2;width:100%}.toolbar{align-items:flex-start;gap:7px;flex-wrap:wrap}.toolbar-lead{font-size:10px}.toolbar-actions{margin-left:auto}.mobile-br{display:none}.pages-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.thumb-button{aspect-ratio:1/1.15}.thumb-sheet{inset:8px 12px}.page-actions{padding:5px 3px}.page-actions button{font-size:16px;min-height:31px}.page-file{font-size:10px}.page-panel-head{flex-wrap:wrap}.footer{flex-direction:column;gap:5px}.dialog-bottom span{font-size:9px}}@media(max-width:370px){.pages-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.page-actions button{font-size:13px}.header-actions{width:100%;justify-content:flex-end}.toolbar-actions{width:100%;justify-content:flex-end}}

/* Keep the close action readable in narrow preview dialogs. */
.dialog-bottom .small-button{flex-shrink:0;white-space:nowrap}
.page-card-head{cursor:grab}
