:root{color-scheme:light;--bg: #f6f7f8;--surface: #ffffff;--surface-muted: #e9ebee;--hover: #f0f1f3;--text: #1a1d21;--text-muted: #5c6470;--border: #d6dade;--danger: #b3261e;--focus: #3b6ea5;--primary: #1a1d21;--primary-text: #ffffff;--cm-heading: #1f4b8f;--cm-link: #3b6ea5;--cm-code: #7a4d00;--cm-property: #6b2f8f;--cm-string: #1a6b3a;--cm-number: #a13c1a;--cm-keyword: #8a2b6b;--cm-selection: #cfe0f5;--cm-match: #ffe08a;--cm-match-selected: #ffb347}:root[data-theme=dark]{color-scheme:dark;--bg: #16181c;--surface: #1f2226;--surface-muted: #26292e;--hover: #2a2e33;--text: #e8eaed;--text-muted: #9aa3ad;--border: #3a3f45;--danger: #f28b82;--focus: #7ab3e8;--primary: #e8eaed;--primary-text: #16181c;--cm-heading: #8fb8ee;--cm-link: #7ab3e8;--cm-code: #e6b566;--cm-property: #c79bea;--cm-string: #8fd4a6;--cm-number: #f0a07a;--cm-keyword: #e39ac8;--cm-selection: #2f4a6b;--cm-match: #665a1f;--cm-match-selected: #8a6a10}*{box-sizing:border-box}body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;background:var(--bg);color:var(--text);line-height:1.5}.app{max-width:700px;margin:0 auto;padding:2rem 1rem 3rem}.header{display:flex;align-items:flex-start;justify-content:space-between;gap:.75rem}.header h1{margin:0;font-size:1.75rem}.header-actions{display:flex;gap:.5rem}.button-small{padding:.35rem .6rem;font-size:.875rem;line-height:1.4}.subtitle{margin:.25rem 0 1.5rem;color:var(--text-muted)}.tabs{display:flex;gap:.25rem;padding:.25rem;background:var(--surface-muted);border-radius:10px;margin-bottom:1.5rem}.tab{flex:1;padding:.5rem .75rem;border:none;border-radius:8px;background:transparent;font:inherit;color:var(--text-muted);cursor:pointer}.tab[aria-selected=true]{background:var(--surface);color:var(--text);box-shadow:0 1px 2px #00000014}.panel{display:flex;flex-direction:column;gap:.75rem}.field-label{font-size:.875rem;font-weight:600;color:var(--text-muted)}.textarea{width:100%;min-height:8rem;padding:.75rem;border:1px solid var(--border);border-radius:8px;background:var(--surface);font:inherit;color:inherit;resize:vertical}.textarea:focus-visible,.select:focus-visible,.button:focus-visible,.tab:focus-visible{outline:2px solid var(--focus);outline-offset:1px}.field-row{display:flex;align-items:center;justify-content:space-between;gap:.75rem;flex-wrap:wrap}.counter{font-size:.875rem;color:var(--text-muted)}.counter-limit{color:var(--danger);font-weight:600}.actions{display:flex;gap:.5rem}.button{padding:.5rem 1rem;border:1px solid var(--border);border-radius:8px;background:var(--surface);font:inherit;color:inherit;cursor:pointer}.button:hover:enabled{background:var(--hover)}.button:disabled{opacity:.5;cursor:default}.generator-form{display:flex;flex-direction:column;gap:.75rem}.qr-panel{display:flex;align-items:center;justify-content:center;padding:1.5rem;background:var(--surface);border:1px solid var(--border);border-radius:10px}.qr-placeholder{margin:0;color:var(--text-muted)}.qr-canvas{width:min(100%,360px);height:auto}@media(max-width:759px){.qr-panel{min-height:85svh}}@media(min-width:760px){.app{max-width:880px}.mobile-only{display:none}.generator{display:grid;grid-template-columns:1fr 320px;gap:1.5rem;align-items:start}.generator .textarea{min-height:14rem}.qr-panel{position:sticky;top:1.5rem;min-height:320px}.qr-canvas{width:min(100%,280px)}.scanner{width:100%;max-width:640px;margin-inline:auto}}.camera-select{display:flex;flex-direction:column;gap:.25rem}.select{padding:.5rem;border:1px solid var(--border);border-radius:8px;background:var(--surface);font:inherit;color:inherit}.camera-region{width:100%;overflow:hidden;border-radius:10px}.camera-region video{width:100%;border-radius:10px}.camera-region.is-framed{position:relative;aspect-ratio:1}.camera-region.is-framed video{width:100%;height:100%;object-fit:cover}.scan-guide{position:absolute;inset:0;margin:auto;width:var(--scan-crop);height:var(--scan-crop);border:2px solid rgb(255 255 255 / .85);border-radius:10px;box-shadow:0 0 0 100vmax #0006;pointer-events:none}.scan-guide-hit{position:absolute;inset:-2px;border:2px solid #35c46a;border-radius:10px;opacity:0;animation:scan-hit .7s ease-out}@keyframes scan-hit{0%{opacity:1}to{opacity:0}}@media(prefers-reduced-motion:reduce){.scan-guide-hit{animation:none;opacity:.9}}.hint{margin:0;color:var(--text-muted);text-align:center}.error{margin:0;color:var(--danger)}.result{display:flex;flex-direction:column;gap:.75rem}.result-text{margin:0;padding:.75rem;background:var(--surface);border:1px solid var(--border);border-radius:8px;font:inherit;white-space:pre-wrap;word-break:break-word}.nav{margin-bottom:1.25rem;border-bottom:1px solid var(--border)}.nav-list{display:flex;gap:.25rem;margin:0;padding:0;list-style:none}.nav-link{padding:.5rem .75rem;border:none;border-bottom:2px solid transparent;margin-bottom:-1px;background:transparent;font:inherit;font-weight:500;color:var(--text-muted);cursor:pointer}.nav-link:hover{color:var(--text)}.nav-link[aria-current=page]{color:var(--text);border-bottom-color:var(--text)}.nav-link:focus-visible{outline:2px solid var(--focus);outline-offset:1px;border-radius:6px}.button-primary{background:var(--primary);border-color:var(--primary);color:var(--primary-text)}.button-primary:hover:enabled{background:var(--primary);opacity:.9}.select-small{padding:.3rem .45rem;font-size:.875rem}.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}.actions-center{justify-content:center;flex-wrap:wrap}.actions-end{justify-content:flex-end;flex-wrap:wrap}.actions-between{justify-content:space-between;flex-wrap:wrap}a.button{display:inline-block;text-decoration:none;text-align:center}.panel-center{align-items:center;padding:2rem 0}.notice{margin:0;font-size:.875rem;color:var(--text-muted)}.large-transfer{display:flex;flex-direction:column}.editor-shell{display:flex;flex-direction:column;min-height:0;border:1px solid var(--border);border-radius:10px;background:var(--surface);overflow:hidden}.editor-toolbar{display:flex;align-items:center;justify-content:space-between;gap:.5rem .75rem;flex-wrap:wrap;padding:.5rem .75rem;border-bottom:1px solid var(--border);background:var(--surface-muted)}.editor-title{white-space:nowrap}.editor-actions{display:flex;align-items:center;gap:.35rem;flex-wrap:wrap}.editor-host{flex:none;height:min(60svh,32rem)}.editor-shell.is-tall .editor-host{height:min(70svh,40rem)}.editor-host .cm-editor{height:100%}.editor-footer{padding:.5rem .75rem;border-top:1px solid var(--border);background:var(--surface-muted)}.editor-shell.is-fullscreen{position:fixed;inset:0;z-index:20;height:100dvh;border:none;border-radius:0}.editor-shell.is-fullscreen .editor-host{flex:1 1 0;min-height:0;height:auto}.stats{display:flex;flex-direction:column;gap:.35rem}.stats-list{display:flex;flex-wrap:wrap;gap:.25rem 1rem;margin:0;padding:0;list-style:none;font-size:.875rem;color:var(--text-muted)}.stats-center{justify-content:center}.summary{display:flex;flex-direction:column;align-items:center;gap:.75rem;padding-top:.5rem}.summary-status{margin:0;text-align:center}.summary-filename{max-width:16rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.summary-list{display:grid;grid-template-columns:auto auto;gap:.35rem 1.5rem;margin:0}.summary-list>div{display:contents}.summary-list dt{color:var(--text-muted)}.summary-list dd{margin:0;text-align:right;font-variant-numeric:tabular-nums}.transfer{display:flex;flex-direction:column;align-items:center;gap:1.5rem;padding:1rem 0}.transfer-stage{display:flex;flex-direction:column;align-items:center;gap:.75rem;width:100%}.transfer-qr{display:block;width:min(100%,calc(100dvh - 18rem),560px);min-width:min(100%,280px);height:auto;aspect-ratio:1;background:#fff;border-radius:10px;image-rendering:auto;-webkit-user-select:none;user-select:none}.transfer-index{margin:0;font-size:1.125rem;font-variant-numeric:tabular-nums}.transfer-controls{display:flex;flex-direction:column;align-items:center;gap:.75rem}.speed{display:flex;align-items:center;gap:.75rem}.speed-value{min-width:4.5rem;text-align:center;font-variant-numeric:tabular-nums}.transfer.is-fullscreen{position:fixed;inset:0;z-index:20;height:100dvh;gap:1rem;padding:1rem;background:var(--bg)}.transfer.is-fullscreen .transfer-stage{flex:1 1 0;min-height:0;justify-content:center}.transfer.is-fullscreen .transfer-qr{flex:1 1 0;min-height:0;width:100%;height:auto;aspect-ratio:auto;object-fit:contain;background:transparent;border-radius:0}.progress{display:flex;flex-direction:column;align-items:center;gap:.5rem}.progress-count{margin:0;font-size:1.125rem;font-variant-numeric:tabular-nums}.progress-bar{width:100%;max-width:420px;height:.5rem;border-radius:999px;background:var(--surface-muted);overflow:hidden}.progress-fill{height:100%;background:var(--text);transition:width .12s linear}.progress-details{font-size:.8125rem;color:var(--text-muted);text-align:center}.progress-details p{margin:.25rem 0 0;word-break:break-word}.received-summary{display:flex;flex-direction:column;align-items:center;gap:.75rem;padding:1rem 0;text-align:center}.received-title{margin:0;font-size:1.25rem}.verified{color:var(--text);font-weight:600}@media(min-width:760px){.receiver{width:100%;max-width:640px;margin-inline:auto}}.source{display:flex;align-items:center;gap:.75rem}.segmented{display:inline-flex;gap:.25rem;padding:.25rem;background:var(--surface-muted);border-radius:10px}.segment{padding:.35rem .9rem;border:none;border-radius:8px;background:transparent;font:inherit;font-size:.9375rem;color:var(--text-muted);cursor:pointer}.segment[aria-pressed=true]{background:var(--surface);color:var(--text);box-shadow:0 1px 2px #00000014}.segment:focus-visible{outline:2px solid var(--focus);outline-offset:1px}.dropzone{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;min-height:14rem;padding:2rem 1rem;border:2px dashed var(--border);border-radius:10px;background:var(--surface);text-align:center}.dropzone.is-dragging{border-color:var(--focus);background:var(--surface-muted)}.dropzone-title{margin:0;font-weight:600}.dropzone .hint{margin:0}.file-card{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem 1rem;padding:.75rem 1rem;border:1px solid var(--border);border-radius:10px;background:var(--surface)}.file-thumb{width:4.5rem;height:4.5rem;object-fit:cover;border-radius:8px;background:var(--surface-muted)}.file-info{flex:1 1 12rem;min-width:0}.file-info .hint{margin:.15rem 0 0;text-align:left}.file-name{margin:0;font-weight:600;overflow-wrap:anywhere}.received-filename{max-width:100%}.received-image{display:block;max-width:min(100%,420px);max-height:60svh;border-radius:8px;background:var(--surface-muted)}.progress-meta{margin:0;overflow-wrap:anywhere}.dialog{width:min(100% - 2rem,520px);max-height:calc(100dvh - 2rem);padding:0;border:1px solid var(--border);border-radius:12px;background:var(--surface);color:var(--text)}.dialog::backdrop{background:#00000073}.dialog-body{display:flex;flex-direction:column;gap:1rem;padding:1rem 1.25rem 1.25rem;overflow-y:auto;max-height:calc(100dvh - 2rem)}.dialog-header{display:flex;align-items:center;justify-content:space-between;gap:.5rem}.dialog-title{margin:0;font-size:1.125rem}.profile-list{display:flex;flex-direction:column;gap:.5rem;margin:0;padding:0;border:none}.profile-list legend{padding:0;margin-bottom:.25rem}.profile-option{display:flex;align-items:flex-start;gap:.6rem;padding:.5rem .6rem;border:1px solid var(--border);border-radius:8px;cursor:pointer}.profile-option:has(input:checked){border-color:var(--text)}.profile-option input{margin:.2rem 0 0;accent-color:var(--text)}.profile-option>span{display:flex;flex-direction:column;gap:.1rem}.profile-option .hint{margin:0;text-align:left}.profile-name{font-weight:600}.advanced summary{cursor:pointer;color:var(--text-muted);font-size:.9375rem}.advanced-field{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin-top:.75rem}@media(max-width:759px){.dialog{width:100%;max-width:none;max-height:calc(100dvh - 2rem);margin:auto 0 0;border-radius:12px 12px 0 0;border-bottom:none}}.scan-debug{margin-top:.75rem;padding:.75rem;border:1px solid var(--border);border-radius:8px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.75rem}.scan-debug dl{display:grid;grid-template-columns:repeat(auto-fit,minmax(9rem,1fr));gap:.25rem 1rem;margin:0}.scan-debug dt{color:var(--text-muted)}.scan-debug dd{margin:0;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.scan-debug [data-field=sightings]{grid-column:1 / -1}.scan-debug [data-field=sightings] dd{max-height:4.5rem;overflow-y:auto;color:var(--text-muted)}
