:root{color-scheme:dark;--bg: #0f172a;--card: #1e293b;--text: #f1f5f9;--muted: #94a3b8;--primary: #38bdf8;--primary-text: #0f172a;--secondary: #334155;--error: #f87171;--ok: #4ade80;--radius: 14px;--safe-bottom: env(safe-area-inset-bottom, 0px);font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif}*,*:before,*:after{box-sizing:border-box}html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text)}body{min-height:100dvh}.app{max-width:480px;margin:0 auto;padding:1.25rem 1rem calc(1.5rem + var(--safe-bottom))}.header h1{margin:0 0 .25rem;font-size:1.5rem;font-weight:700}.sub{margin:0 0 1.25rem;color:var(--muted);font-size:.9rem;word-break:break-all}.card{background:var(--card);border-radius:var(--radius);padding:1rem;margin-bottom:1rem;box-shadow:0 8px 24px #00000040}.card p{margin:0 0 .75rem;line-height:1.4}.field{display:flex;flex-direction:column;gap:.35rem;margin-bottom:1rem}.field-label{font-size:.85rem;color:var(--muted);font-weight:600}.field input{width:100%;min-height:48px;border:1px solid #475569;border-radius:10px;background:#0f172a;color:var(--text);padding:.65rem .85rem;font-size:1rem}.field input:focus{outline:2px solid var(--primary);outline-offset:1px}.btn{display:inline-flex;align-items:center;justify-content:center;width:100%;min-height:48px;border:none;border-radius:12px;font-size:1.05rem;font-weight:600;cursor:pointer;padding:.75rem 1rem;transition:opacity .15s ease,transform .05s ease;-webkit-tap-highlight-color:transparent}.btn:active:not(:disabled){transform:scale(.98)}.btn:disabled{opacity:.45;cursor:not-allowed}.btn.primary{background:var(--primary);color:var(--primary-text)}.btn.secondary{background:var(--secondary);color:var(--text)}.btn.capture{min-height:76px;font-size:1.25rem;margin-top:.25rem}.mode-toggle{display:grid;grid-template-columns:1fr 1fr;gap:.5rem;margin-bottom:1rem}.mode-toggle button{min-height:48px;border:2px solid #475569;border-radius:12px;background:transparent;color:var(--text);font-size:1rem;font-weight:600;cursor:pointer}.mode-toggle button.active{border-color:var(--primary);background:#38bdf826;color:var(--primary)}.multi-panel{margin-top:1rem}.thumb-tray{display:grid;grid-template-columns:repeat(3,1fr);gap:.5rem;margin-bottom:.75rem;min-height:0}.thumb{margin:0;aspect-ratio:1;border-radius:10px;overflow:hidden;background:#0f172a}.thumb img{width:100%;height:100%;object-fit:cover;display:block}.row{display:grid;grid-template-columns:1fr 1.4fr;gap:.5rem}.error{color:var(--error);font-size:.95rem;margin-top:.5rem!important}.hidden{display:none!important}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.toast{position:fixed;left:50%;bottom:calc(1.25rem + var(--safe-bottom));transform:translate(-50%);max-width:min(420px,calc(100% - 2rem));background:#334155;color:var(--text);padding:.85rem 1.1rem;border-radius:12px;font-weight:600;box-shadow:0 10px 30px #0006;z-index:50;text-align:center}.toast.error{background:#7f1d1d;color:#fecaca}.busy{position:fixed;top:0;right:0;bottom:0;left:0;background:#0f172ab8;display:flex;align-items:center;justify-content:center;font-size:1.2rem;font-weight:700;z-index:60}.busy:not(.hidden){display:flex}body.camera-open{overflow:hidden}.camera-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:100;background:#000;display:flex;flex-direction:column}.camera-overlay.hidden{display:none!important}.camera-overlay video{flex:1;width:100%;height:100%;object-fit:cover;background:#000}.camera-controls{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:.75rem;padding:1rem 1rem calc(1.25rem + var(--safe-bottom));background:linear-gradient(transparent,#000000bf);position:absolute;left:0;right:0;bottom:0}.camera-cancel{width:auto;min-height:44px;font-size:.95rem;justify-self:start}.camera-shutter{width:72px;height:72px;border-radius:50%;border:4px solid #fff;background:var(--primary);box-shadow:0 0 0 3px #00000059;cursor:pointer;justify-self:center;padding:0}.camera-shutter:active{transform:scale(.94);background:#7dd3fc}.camera-spacer{width:1px;height:1px}
