:root{--font-sans:"Inter", "Segoe UI", system-ui, -apple-system, sans-serif;--color-bg:#eef2f6;--color-bg-end:#e8edf3;--color-bg-accent:#e2e8f0;--color-surface:#fff;--color-surface-muted:#f8fafc;--color-surface-elevated:#fff;--color-border:#dbe3ec;--color-border-strong:#c5d0dc;--color-text:#0f172a;--color-text-secondary:#475569;--color-text-muted:#64748b;--color-primary:#1d4ed8;--color-primary-hover:#1e40af;--color-primary-soft:#eff6ff;--color-primary-border:#bfdbfe;--color-primary-bright:#3b82f6;--color-primary-glow:#1d4ed81f;--color-success:#047857;--color-success-soft:#ecfdf5;--color-success-border:#a7f3d0;--color-success-bright:#10b981;--color-error:#b91c1c;--color-error-soft:#fef2f2;--color-error-border:#fecaca;--color-warning-soft:#fffbeb;--color-smart-border:#c4b5fd;--color-smart-bg:#f5f3ff;--color-smart-text:#6d28d9;--color-on-primary:#fff;--shadow-sm:0 1px 2px #0f172a0d;--shadow-md:0 4px 16px #0f172a14;--shadow-lg:0 12px 40px #0f172a1f;--radius-sm:6px;--radius-md:10px;--radius-lg:16px;--transition:.15s ease}[data-theme=dark]{--color-bg:#0f172a;--color-bg-end:#0b1220;--color-bg-accent:#1e293b;--color-surface:#1e293b;--color-surface-muted:#162032;--color-surface-elevated:#243044;--color-border:#334155;--color-border-strong:#475569;--color-text:#f1f5f9;--color-text-secondary:#cbd5e1;--color-text-muted:#94a3b8;--color-primary:#3b82f6;--color-primary-hover:#60a5fa;--color-primary-soft:#1e3a5f;--color-primary-border:#2563eb;--color-primary-bright:#60a5fa;--color-primary-glow:#3b82f626;--color-success:#34d399;--color-success-soft:#064e3b;--color-success-border:#047857;--color-success-bright:#10b981;--color-error:#f87171;--color-error-soft:#450a0a;--color-error-border:#b91c1c;--color-warning-soft:#422006;--color-smart-border:#6d28d9;--color-smart-bg:#2e1065;--color-smart-text:#c4b5fd;--color-on-primary:#fff;--shadow-sm:0 1px 2px #00000059;--shadow-md:0 4px 16px #0006;--shadow-lg:0 12px 40px #00000073}*{box-sizing:border-box}body{min-width:320px;min-height:100vh;font-family:var(--font-sans);color:var(--color-text);background:radial-gradient(ellipse 80% 50% at 50% -20%, var(--color-primary-glow), transparent), linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-end) 100%);font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0;font-weight:400;line-height:1.5}#root{height:100dvh;min-height:100vh}button,input{font:inherit}input:disabled{background:var(--color-surface-muted);color:var(--color-text-muted)}:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}::selection{background:var(--color-primary-soft);color:var(--color-text)}.ad-consent{z-index:20;border:1px solid var(--color-border);border-radius:var(--radius-lg);background:var(--color-surface);max-width:42rem;box-shadow:var(--shadow-lg);flex-direction:column;gap:.875rem;margin:0 auto;padding:1rem 1.125rem;display:flex;position:fixed;bottom:1rem;left:1rem;right:1rem}.ad-consent__title{color:var(--color-text);margin:0;font-size:.9375rem;font-weight:600}.ad-consent__text{color:var(--color-text-secondary);margin:.35rem 0 0;font-size:.8125rem}.ad-consent__link{color:var(--color-primary);text-underline-offset:2px;font-weight:500;text-decoration:underline}.ad-consent__link:hover{color:var(--color-primary-hover)}.ad-consent__actions{flex-wrap:wrap;justify-content:flex-end;gap:.5rem;display:flex}.ad-consent__btn{min-height:2.25rem}@media (width>=640px){.ad-consent{flex-direction:row;justify-content:space-between;align-items:center;gap:1rem}.ad-consent__actions{flex-shrink:0}}.theme-toggle{border:1px solid var(--color-border);background:var(--color-surface);box-shadow:var(--shadow-sm);border-radius:999px;align-items:center;gap:.125rem;padding:.2rem;display:inline-flex}.theme-toggle__option{min-height:2rem;color:var(--color-text-muted);cursor:pointer;transition:background var(--transition), color var(--transition), box-shadow var(--transition);background:0 0;border:none;border-radius:999px;align-items:center;gap:.35rem;padding:.35rem .75rem;font-size:.8125rem;font-weight:500;display:inline-flex}.theme-toggle__option svg{width:.95rem;height:.95rem}.theme-toggle__option:hover{color:var(--color-text-secondary)}.theme-toggle__option.is-active{background:var(--color-primary-soft);color:var(--color-primary);box-shadow:var(--shadow-sm)}@media (width<=640px){.theme-toggle__option{padding:.35rem .55rem}.theme-toggle__label{display:none}}.app-shell{flex-direction:column;align-items:center;height:100%;min-height:100%;display:flex}.app-layout{flex:auto;justify-content:center;align-items:stretch;gap:1rem;width:100%;min-height:0;padding:0 1rem;display:flex}.ad-rail{flex:0 0 160px;width:160px;min-height:0;padding:1.5rem 0 0;display:none}.ad-rail .ad-slot{flex-direction:column;flex:1;min-height:0;display:flex}.ad-slot{width:100%;overflow:hidden}.ad-slot--preview{border:1.5px dashed var(--color-border-strong);border-radius:var(--radius-sm);background:var(--color-surface-muted)}.ad-slot__placeholder{flex:1;justify-content:center;align-items:center;width:100%;min-height:0;display:flex}.ad-slot__label{letter-spacing:.08em;text-transform:uppercase;color:var(--color-text-muted);font-size:.6875rem;font-weight:600}.ad-slot--side-left,.ad-slot--side-right{min-height:0}.ad-slot--bottom,.ad-slot--horizontal{min-height:90px}.app-bottom-ad{flex-shrink:0}.app{flex-direction:column;flex:980px;gap:1.25rem;width:100%;max-width:980px;height:100%;min-height:0;margin:0;padding:1.5rem 0 0;display:flex;overflow:hidden}.app-header{flex-direction:column;flex-shrink:0;gap:1rem;display:flex}.header-top{justify-content:space-between;align-items:flex-start;gap:1rem;display:flex}.header-top .header-brand{flex:1;min-width:0}.header-top .theme-toggle{flex-shrink:0}.header-brand{align-items:flex-start;gap:1rem;display:flex}.brand-icon{border-radius:var(--radius-md);background:linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-bright) 100%);width:3rem;height:3rem;color:var(--color-on-primary);box-shadow:var(--shadow-md);flex-shrink:0;justify-content:center;align-items:center;display:flex}.brand-icon svg{width:1.5rem;height:1.5rem}.header-text h1{letter-spacing:-.03em;color:var(--color-text);margin:0;font-size:1.75rem;font-weight:700}.header-descriptor{color:var(--color-primary);margin:.15rem 0 0;font-size:.9375rem;font-weight:600}.header-subtitle{color:var(--color-text-secondary);max-width:36rem;margin:.35rem 0 0;font-size:.9375rem}.trust-badges{flex-wrap:wrap;gap:.625rem;display:flex}.trust-badge{border:1px solid var(--color-border);background:var(--color-surface);color:var(--color-text-secondary);box-shadow:var(--shadow-sm);border-radius:999px;align-items:center;gap:.4rem;padding:.4rem .75rem;font-size:.8125rem;font-weight:500;display:inline-flex}.trust-badge svg{flex-shrink:0;width:.95rem;height:.95rem}.trust-badge--secure{border-color:var(--color-success-border);background:var(--color-success-soft);color:var(--color-success)}.trust-badge--local{border-color:var(--color-primary-border);background:var(--color-primary-soft);color:var(--color-primary)}.trust-badge--smart{border-color:var(--color-smart-border);background:var(--color-smart-bg);color:var(--color-smart-text)}.feature-tags{letter-spacing:.02em;color:var(--color-text-muted);margin:0;font-size:.8125rem;font-weight:500}.app-card{background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-lg);box-shadow:var(--shadow-lg);flex-direction:column;flex:auto;min-height:0;display:flex;overflow:hidden}.app-main{flex-direction:column;flex:auto;min-height:0;display:flex}.content-row{flex:auto;align-items:stretch;gap:.75rem;min-height:0;padding:1.25rem 1.25rem 0;display:flex;overflow:hidden}.grid-panel{border:1px solid var(--color-border);border-radius:var(--radius-md);background:var(--color-surface);flex-direction:column;flex:1 1 0;align-self:stretch;min-width:0;min-height:0;max-height:100%;display:flex;overflow:hidden}.grid-panel-header{background:var(--color-surface-muted);border-bottom:1px solid var(--color-border);flex-shrink:0;justify-content:space-between;align-items:center;padding:.75rem 1rem;display:flex}.grid-panel-title{text-transform:uppercase;letter-spacing:.04em;color:var(--color-text-muted);margin:0;font-size:.8125rem;font-weight:600}.file-count{color:var(--color-text-secondary);background:var(--color-surface);border:1px solid var(--color-border);border-radius:999px;padding:.15rem .6rem;font-size:.8125rem;font-weight:500}.table-wrap{scrollbar-width:thin;scrollbar-color:var(--color-border-strong) var(--color-surface-muted);flex:auto;min-height:0;overflow:hidden auto}.table-wrap::-webkit-scrollbar{width:10px;height:10px}.table-wrap::-webkit-scrollbar-track{background:var(--color-surface-muted);border-radius:999px}.table-wrap::-webkit-scrollbar-thumb{background:var(--color-border-strong);border:2px solid var(--color-surface-muted);border-radius:999px}.table-wrap::-webkit-scrollbar-thumb:hover{background:var(--color-text-muted)}.file-table{border-collapse:collapse;table-layout:fixed;width:100%}.file-table col.col-drag{width:2.75rem}.file-table col.col-pages{width:7rem}.file-table col.col-count{width:5rem}.file-table th,.file-table td{border-bottom:1px solid var(--color-border);text-align:left;vertical-align:middle;padding:.625rem .75rem}.file-table th{background:var(--color-surface-muted);z-index:1;text-transform:uppercase;letter-spacing:.04em;color:var(--color-text-muted);font-size:.75rem;font-weight:600;position:sticky;top:0}.file-row{cursor:pointer;transition:background var(--transition)}.file-row:hover:not(.selected){background:var(--color-surface-muted)}.file-row.selected{background:var(--color-primary-soft)}.file-row.selected .file-name{color:var(--color-primary-hover);font-weight:500}.file-row.has-error{background:var(--color-error-soft)}.file-row.is-dragging{background:var(--color-primary-soft);box-shadow:var(--shadow-md)}.file-row.has-error input{border-color:var(--color-error);background:var(--color-surface)}.empty-row td{text-align:center;padding:2.5rem 1rem}.empty-state{color:var(--color-text-muted);flex-direction:column;align-items:center;gap:.5rem;display:flex}.empty-state-icon{background:var(--color-surface-muted);border:1px dashed var(--color-border-strong);width:3rem;height:3rem;color:var(--color-text-muted);border-radius:50%;justify-content:center;align-items:center;display:flex}.empty-state-icon svg{width:1.35rem;height:1.35rem}.empty-state-title{color:var(--color-text-secondary);margin:0;font-weight:600}.empty-state-hint{margin:0;font-size:.875rem}.file-cell-inner{align-items:center;gap:.5rem;min-width:0;display:flex}.file-icon{border-radius:var(--radius-sm);background:var(--color-error-soft);width:1.75rem;height:1.75rem;color:var(--color-error);flex-shrink:0;justify-content:center;align-items:center;display:flex}.file-icon svg{width:.9rem;height:.9rem}.file-name{text-overflow:ellipsis;white-space:nowrap;font-size:.875rem;overflow:hidden}.file-details{flex:1;min-width:0}.page-count-hint{color:var(--color-text-muted);margin-top:.1rem;font-size:.6875rem;display:block}.pages-cell input,.count-cell input{box-sizing:border-box;border:1px solid var(--color-border);border-radius:var(--radius-sm);background:var(--color-surface);width:100%;color:var(--color-text);transition:border-color var(--transition), box-shadow var(--transition);padding:.35rem .5rem;font-size:.875rem}.pages-cell input:focus,.count-cell input:focus{border-color:var(--color-primary);outline:none;box-shadow:0 0 0 3px #1d4ed81f}.count-cell input{text-align:center}.drag-cell{text-align:center;width:2.75rem}.drag-handle{border-radius:var(--radius-sm);cursor:grab;width:1.75rem;height:1.75rem;color:var(--color-text-muted);transition:background var(--transition), color var(--transition), border-color var(--transition);background:0 0;border:1px solid #0000;justify-content:center;align-items:center;padding:0;display:inline-flex}.drag-handle:hover:not(:disabled){background:var(--color-surface-muted);border-color:var(--color-border);color:var(--color-text-secondary)}.drag-handle:active:not(:disabled){cursor:grabbing}.drag-handle:disabled{cursor:not-allowed;opacity:.4}.drag-handle svg{width:.85rem;height:.85rem}.toolbar{border-top:1px solid var(--color-border);background:var(--color-surface-muted);flex-wrap:wrap;flex-shrink:0;align-items:center;gap:.625rem;padding:1rem 1.25rem;display:flex}.toolbar-group{flex-wrap:wrap;gap:.5rem;display:flex}.toolbar-spacer{flex:1}.btn{border-radius:var(--radius-sm);cursor:pointer;min-height:2.375rem;transition:background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);white-space:nowrap;border:1px solid #0000;justify-content:center;align-items:center;gap:.4rem;padding:.5rem 1rem;font-size:.875rem;font-weight:500;display:inline-flex}.btn svg{flex-shrink:0;width:1rem;height:1rem}.btn:active:not(:disabled){transform:translateY(1px)}.btn:disabled{opacity:.5;cursor:not-allowed;transform:none}.btn-secondary{background:var(--color-surface);border-color:var(--color-border-strong);color:var(--color-text);box-shadow:var(--shadow-sm)}.btn-secondary:hover:not(:disabled){background:var(--color-surface-muted);border-color:var(--color-text-muted)}.btn-primary{background:linear-gradient(180deg, var(--color-primary-bright) 0%, var(--color-primary) 100%);border-color:var(--color-primary);color:var(--color-on-primary);box-shadow:0 1px 2px #1d4ed84d,0 4px 12px #1d4ed833}.btn-primary:hover:not(:disabled){background:linear-gradient(180deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);box-shadow:0 2px 4px #1d4ed859,0 6px 16px #1d4ed840}.btn-icon{min-width:2.375rem;padding:.5rem}.status-bar{border-top:1px solid var(--color-border);background:var(--color-surface);flex-direction:column;flex-shrink:0;gap:.5rem;padding:.875rem 1.25rem 1.125rem;display:flex}.status-header{align-items:center;gap:.5rem;min-width:0;display:flex}.status-indicator{border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;width:1.5rem;height:1.5rem;display:flex}.status-indicator svg{width:.85rem;height:.85rem}.status-bar--ready .status-indicator{background:var(--color-surface-muted);color:var(--color-text-muted)}.status-bar--working .status-indicator{background:var(--color-primary-soft);color:var(--color-primary)}.status-bar--success .status-indicator{background:var(--color-success-soft);color:var(--color-success)}.status-bar--error .status-indicator{background:var(--color-error-soft);color:var(--color-error)}.status-message{text-overflow:ellipsis;white-space:nowrap;color:var(--color-text-secondary);flex:1;margin:0;font-size:.875rem;overflow:hidden}.status-bar--success .status-message{color:var(--color-success);font-weight:500}.status-bar--error .status-message{color:var(--color-error);font-weight:500}.status-bar--working .status-message{color:var(--color-text)}.progress-track{background:var(--color-bg-accent);border-radius:999px;width:100%;height:.375rem;overflow:hidden}.progress-fill{background:linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-bright) 100%);border-radius:999px;height:100%;transition:width .2s}.progress-fill.is-complete{background:linear-gradient(90deg, var(--color-success) 0%, var(--color-success-bright) 100%)}.progress-fill.is-error{background:var(--color-error)}.spinner{animation:.8s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.app-shell>.app-footer-note{width:100%;max-width:980px;padding:0 1rem 1rem}.app-footer-note{text-align:center;color:var(--color-text-muted);flex-shrink:0;margin:0;font-size:.8125rem}.app-footer-link{color:var(--color-primary);text-underline-offset:2px;font-weight:500;text-decoration:underline}.app-footer-link:hover{color:var(--color-primary-hover)}@media (width>=1320px){.ad-rail{flex-direction:column;display:flex}}@media (width<=640px){.app-layout{padding:0 .875rem}.app-shell>.app-footer-note{padding:0 .875rem .75rem}.app{height:auto;min-height:100dvh;padding:1rem 0 0;overflow:auto}#root{height:auto;min-height:100dvh}.header-brand{flex-direction:column;align-items:flex-start}.content-row{flex-direction:column;padding:1rem 1rem 0}.toolbar{flex-direction:column;align-items:stretch}.toolbar-spacer{display:none}.btn-primary{width:100%}}.privacy-page{height:100%;min-height:100%;padding:1.5rem 1.25rem 1rem;overflow-y:auto}.privacy-page__inner{flex-direction:column;gap:1.25rem;max-width:42rem;margin:0 auto;display:flex}.privacy-header-top{justify-content:space-between;align-items:center;gap:1rem;display:flex}.privacy-header-top .privacy-back-link{min-width:0}.privacy-header-top .theme-toggle{flex-shrink:0}.privacy-header h1{letter-spacing:-.03em;margin:.75rem 0 0;font-size:1.75rem;font-weight:700}.privacy-meta{color:var(--color-text-muted);margin:.35rem 0 0;font-size:.875rem}.privacy-back-link{color:var(--color-primary);font-size:.875rem;font-weight:500;text-decoration:none}.privacy-back-link:hover{color:var(--color-primary-hover);text-decoration:underline}.privacy-card{background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-lg);box-shadow:var(--shadow-lg);flex-direction:column;gap:1.25rem;padding:1.5rem 1.375rem;display:flex}.privacy-card section h2{color:var(--color-text);margin:0 0 .5rem;font-size:1rem;font-weight:600}.privacy-card section p,.privacy-card section ul{color:var(--color-text-secondary);margin:0;font-size:.9375rem}.privacy-card section p+p{margin-top:.75rem}.privacy-card section ul{flex-direction:column;gap:.35rem;padding-left:1.25rem;display:flex}.privacy-card a{color:var(--color-primary);text-underline-offset:2px;text-decoration:underline}.privacy-card a:hover{color:var(--color-primary-hover)}@media (width<=640px){.privacy-page{padding:1rem .875rem .75rem}.privacy-card{padding:1.125rem 1rem}}
