:root{--bg:#0f172a;--panel:#1e293b;--border:#334155;--text:#e2e8f0;--muted:#94a3b8;--accent:#38bdf8;--danger:#f87171;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark}@media (prefers-color-scheme:dark){:root{--lightningcss-light: ;--lightningcss-dark:initial}}@media (prefers-color-scheme:light){:root{--bg:#f8fafc;--panel:#fff;--border:#cbd5e1;--text:#0f172a;--muted:#64748b;--accent:#0284c7;--danger:#dc2626}}*{box-sizing:border-box}body{background:var(--bg);color:var(--text);padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);margin:0;font:16px/1.5 system-ui,-apple-system,Segoe UI,Roboto,sans-serif}.container{max-width:960px;margin:0 auto;padding:24px 16px 64px}.hero h1{margin:16px 0 4px;font-size:2rem}.hero p,.muted{color:var(--muted)}.center{text-align:center}.search,input,select,button{font:inherit;color:inherit}.search{border:1px solid var(--border);background:var(--panel);border-radius:12px;width:100%;margin:20px 0;padding:12px 16px}.grid{grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:16px;display:grid}.tile{background:var(--panel);border:1px solid var(--border);color:inherit;border-radius:16px;flex-direction:column;gap:6px;padding:18px;text-decoration:none;transition:transform .1s,border-color .1s;display:flex;position:relative}.tile:hover,.tile:focus-visible{border-color:var(--accent);outline:none;transform:translateY(-2px)}.tile-icon{font-size:1.8rem}.tile .fav{min-height:auto;color:var(--muted);cursor:pointer;background:0 0;border:none;padding:2px 6px;font-size:1.1rem;line-height:1;position:absolute;top:8px;right:8px}.tile .fav.on,.tile .fav:hover{color:#f5b31d}.chips{flex-wrap:wrap;gap:8px;margin:-8px 0 20px;display:flex}.chips button{border-radius:999px;min-height:auto;padding:6px 14px;font-size:.85rem}.chips button[aria-pressed=true]{background:var(--accent);color:#0f172a;border-color:var(--accent);font-weight:600}.section-title{color:var(--muted);text-transform:uppercase;letter-spacing:.04em;margin:24px 0 12px;font-size:1rem}.back{color:var(--accent);text-decoration:none}.card{background:var(--panel);border:1px solid var(--border);border-radius:16px;margin:16px 0;padding:16px}.row{flex-wrap:wrap;align-items:end;gap:12px;display:flex}.row>label{color:var(--muted);flex-direction:column;flex:160px;gap:4px;font-size:.9rem;display:flex}input,select{border:1px solid var(--border);background:var(--bg);border-radius:10px;min-height:44px;padding:10px 12px}button{border:1px solid var(--border);background:var(--panel);cursor:pointer;border-radius:10px;min-height:44px;padding:10px 16px}button.primary{background:var(--accent);color:#0f172a;border-color:var(--accent);font-weight:600}button:disabled{opacity:.5;cursor:not-allowed}button.danger{color:var(--danger)}.tabs{gap:8px;margin:16px 0;display:flex}.tabs button[aria-pressed=true]{border-color:var(--accent);color:var(--accent)}.result{font-size:1.4rem;font-weight:600}.stats{grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:8px;margin-top:12px;display:grid}.stats div{background:var(--bg);border-radius:10px;padding:10px}.stats b{font-size:1.2rem;display:block}.error{color:var(--danger)}.pages{grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:12px;display:grid}.page{background:var(--bg);border:1px solid var(--border);text-align:center;border-radius:10px;padding:8px;font-size:.85rem}.page.off{opacity:.4;text-decoration:line-through}.page .box{place-items:center;height:128px;font-size:1.6rem;display:grid;overflow:hidden}.page .box span{transition:transform .15s}.page canvas{background:#fff;border-radius:2px;transition:transform .15s;display:block;box-shadow:0 1px 4px #00000059}.page .acts{flex-wrap:wrap;justify-content:center;gap:4px;display:flex}.page .acts button{min-height:32px;padding:2px 8px}.file-list{gap:8px;margin:12px 0;padding:0;list-style:none;display:grid}.file-list li{background:var(--bg);border-radius:10px;align-items:center;gap:8px;padding:8px 12px;display:flex}.file-list .name{text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}.field{color:var(--muted);flex-direction:column;gap:4px;font-size:.9rem;display:flex}textarea{border:1px solid var(--border);background:var(--bg);font:inherit;color:inherit;resize:vertical;border-radius:10px;width:100%;padding:10px 12px}.btn{border:1px solid var(--border);background:var(--panel);cursor:pointer;border-radius:10px;min-height:44px;padding:10px 16px;line-height:22px;display:inline-block}.diff{white-space:pre-wrap;word-break:break-word;background:var(--bg);border-radius:10px;margin:0;padding:12px;font:.9rem/1.5 ui-monospace,Menlo,Consolas,monospace}ins{background:#22c55e40;text-decoration:none}del{background:#ef444440}.ins{color:#22c55e;font-weight:600}.del{color:var(--danger);font-weight:600}.notes{grid-template-columns:220px 1fr;align-items:start;gap:16px;display:grid}@media (max-width:640px){.notes{grid-template-columns:1fr}}.result.mono{word-break:break-all}details summary{cursor:pointer}.qr{background:#fff;border-radius:12px;width:256px;max-width:100%;margin:16px 0;padding:8px}.qr svg{width:100%;height:auto;display:block}.card img{border-radius:8px;max-width:100%}.card table{border-collapse:collapse;width:100%}.card th,.card td{border:1px solid var(--border);text-align:left;padding:6px 10px}.card blockquote{border-left:3px solid var(--accent);color:var(--muted);margin:0;padding-left:12px}.card mark{color:inherit;background:#38bdf859;border-radius:2px}input[type=file]{min-width:0;max-width:100%}.stats div{overflow-wrap:anywhere;min-width:0}
