.reader-app{display:block}.reader-tabs{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:var(--line);border-bottom:1px solid var(--line)}.reader-tabs button{display:flex;align-items:center;justify-content:center;gap:.65rem;min-height:4.5rem;padding:.7rem;color:var(--ink-700);background:#fff;border:0;font:inherit;cursor:pointer}.reader-tabs button>span{display:grid;place-items:center;width:2rem;height:2rem;color:var(--primary-dark);background:var(--primary-soft);border-radius:50%;font-weight:850}.reader-tabs strong,.reader-tabs small{display:block;text-align:left}.reader-tabs strong{font-size:.75rem}.reader-tabs small{margin-top:.08rem;color:var(--muted);font-size:.56rem}.reader-tabs button.is-active{color:#fff;background:var(--primary)}.reader-tabs button.is-active>span{color:var(--primary);background:#fff}.reader-tabs button.is-active small{color:rgba(255,255,255,.76)}.reader-grid{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(20rem,.95fr)}.scan-panel{border-right:1px solid var(--line)}.image-drop{display:flex;align-items:center;justify-content:center;flex-direction:column;min-height:21rem;margin-top:1rem;padding:1.2rem;color:var(--ink-700);background:var(--canvas);border:2px dashed var(--line-strong);border-radius:14px;text-align:center;cursor:pointer}.image-drop:hover,.image-drop.is-dragging{background:var(--primary-soft);border-color:var(--primary)}.image-drop input{position:absolute;width:1px;height:1px;overflow:hidden;opacity:0}.scan-icon{display:grid;place-items:center;width:4rem;height:4rem;color:#fff;background:var(--primary);border-radius:50%;font-size:1.4rem}.image-drop strong{margin-top:.85rem;font-size:.95rem}.image-drop small,.image-drop em{display:block}.image-drop small{margin-top:.2rem;color:var(--muted);font-size:.67rem}.image-drop em{margin-top:.7rem;color:var(--primary-dark);font-size:.58rem;font-style:normal}.image-preview{position:relative;display:grid;place-items:center;min-height:21rem;margin-top:1rem;overflow:hidden;background:#17231f;border-radius:14px}.image-preview img{display:block;max-width:100%;max-height:28rem;object-fit:contain}.scan-line{position:absolute;right:7%;left:7%;height:2px;background:#65e4c2;box-shadow:0 0 10px #65e4c2;animation:scan 2s ease-in-out infinite}.scan-again{width:100%;min-height:2.8rem;margin-top:.55rem;color:var(--primary-dark);background:var(--primary-soft);border:1px solid var(--brand-100);border-radius:9px;font:inherit;font-size:.68rem;font-weight:800;cursor:pointer}.scan-status{margin-top:.7rem;color:var(--muted);font-size:.66rem}.input-error{margin-top:.65rem;padding:.72rem;color:#8d2e20;background:#fff0ed;border:1px solid #edc5bd;border-radius:9px;font-size:.67rem}.input-error[hidden],[data-mode-panel][hidden],.image-preview[hidden],.scan-again[hidden],.result-content[hidden],.safe-url[hidden],.camera-guide[hidden],[data-device-field][hidden],[data-torch][hidden]{display:none}.camera-stage{position:relative;display:grid;place-items:center;min-height:24rem;margin-top:1rem;overflow:hidden;background:#17231f;border-radius:14px}.camera-stage video{display:block;width:100%;height:100%;min-height:24rem;object-fit:cover}.camera-empty{position:absolute;display:grid;place-items:center;color:#fff;text-align:center}.camera-empty>span{display:grid;place-items:center;width:3.5rem;height:3.5rem;background:rgba(255,255,255,.14);border-radius:50%;font-size:1.3rem}.camera-empty strong{margin-top:.7rem;font-size:.8rem}.camera-empty p{margin-top:.2rem;color:rgba(255,255,255,.65);font-size:.61rem}.camera-guide{position:absolute;inset:15%;border:1px solid rgba(255,255,255,.5)}.camera-guide i{position:absolute;width:2.5rem;height:2.5rem;border-color:#65e4c2;border-style:solid}.camera-guide i:nth-child(1){top:-2px;left:-2px;border-width:4px 0 0 4px}.camera-guide i:nth-child(2){top:-2px;right:-2px;border-width:4px 4px 0 0}.camera-guide i:nth-child(3){right:-2px;bottom:-2px;border-width:0 4px 4px 0}.camera-guide i:nth-child(4){bottom:-2px;left:-2px;border-width:0 0 4px 4px}.camera-guide span{position:absolute;bottom:-2.2rem;left:50%;padding:.25rem .4rem;color:#fff;background:rgba(0,0,0,.5);border-radius:4px;font-size:.58rem;transform:translateX(-50%);white-space:nowrap}.camera-controls{display:grid;grid-template-columns:2fr 1fr 1fr;gap:.45rem;margin-top:.55rem}.camera-controls button{min-height:3rem;padding:.5rem;color:var(--ink-700);background:#fff;border:1px solid var(--line-strong);border-radius:9px;font:inherit;font-size:.67rem;font-weight:800;cursor:pointer}.camera-controls .start-camera{color:#fff;background:var(--primary);border-color:var(--primary)}.camera-controls button:disabled{opacity:.42;cursor:not-allowed}.device-field{margin-top:.6rem!important}
.result-state{padding:.3rem .5rem;color:var(--muted);background:var(--canvas);border-radius:6px;font-size:.6rem;font-weight:800}.result-state.is-success{color:#fff;background:var(--primary)}.result-empty{display:grid;place-items:center;min-height:20rem;margin-top:1rem;padding:1rem;color:var(--muted);background:var(--canvas);border:1px solid var(--line);border-radius:13px;text-align:center}.result-empty>span{display:grid;place-items:center;width:4rem;height:4rem;color:var(--primary-dark);background:var(--primary-soft);border-radius:50%;font-size:1.5rem}.result-empty strong{margin-top:.7rem;color:var(--ink);font-size:.82rem}.result-empty p{margin-top:.2rem;font-size:.64rem}.result-type{display:flex;align-items:center;gap:.7rem;margin-top:1rem}.result-type>span{display:grid;place-items:center;width:3.4rem;height:3.4rem;color:#fff;background:var(--primary);border-radius:11px;font-size:.7rem;font-weight:850}.result-type strong,.result-type small{display:block}.result-type strong{font-size:.9rem}.result-type small{margin-top:.1rem;color:var(--muted);font-size:.58rem}.safe-url{margin-top:.8rem;padding:.75rem;background:var(--primary-soft);border:1px solid var(--brand-100);border-radius:10px}.safe-url span{display:inline-block;padding:.15rem .35rem;color:#fff;background:var(--primary);border-radius:4px;font-size:.53rem;font-weight:850}.safe-url strong{display:block;margin-top:.3rem;font-size:.77rem;overflow-wrap:anywhere}.safe-url p{margin-top:.15rem;color:var(--muted);font-size:.58rem}.result-content>label{display:block;margin-top:.8rem;font-size:.67rem;font-weight:800}.result-content textarea{width:100%;min-height:9rem;margin-top:.3rem;padding:.75rem;color:var(--ink);background:#fff;border:1px solid var(--line-strong);border-radius:10px;font:inherit;font-size:.75rem;line-height:1.6;resize:vertical}.result-meta{display:flex;justify-content:space-between;margin-top:.25rem;color:var(--muted);font-size:.57rem}.result-actions{display:grid;grid-template-columns:1fr 1fr;gap:.45rem;margin-top:.7rem}.result-actions button{min-height:3rem;padding:.5rem;color:var(--primary-dark);background:#fff;border:1px solid var(--line-strong);border-radius:9px;font:inherit;font-size:.67rem;font-weight:800;cursor:pointer}.result-actions .primary-result{grid-column:1/-1;color:#fff;background:var(--primary);border-color:var(--primary)}.action-status{min-height:1rem;margin-top:.4rem;color:var(--primary-dark);font-size:.59rem;text-align:right}.security-note{display:flex;gap:.55rem;margin-top:.8rem;padding:.7rem;color:#79501b;background:#fff8eb;border:1px solid #e7cfaa;border-radius:9px}.security-note>span{display:grid;place-items:center;flex:0 0 1.5rem;height:1.5rem;background:#fff;border-radius:50%;font-weight:900}.security-note p{font-size:.6rem}.history-panel{background:#fbfdfc}.history-panel h2{margin-top:.15rem;font-size:1.2rem}.history-panel .editor-heading>button{min-height:2.75rem;padding:.4rem .65rem;color:var(--muted);background:#fff;border:1px solid var(--line-strong);border-radius:8px;font:inherit;font-size:.63rem;cursor:pointer}.history-panel .editor-heading>button:disabled{opacity:.4}.history-empty{margin-top:.8rem;padding:.8rem;color:var(--muted);background:var(--canvas);border-radius:9px;font-size:.65rem;text-align:center}.history-list{display:grid;gap:.45rem;margin-top:.7rem}.history-item{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:.6rem;width:100%;min-width:0;padding:.65rem;color:var(--ink);background:#fff;border:1px solid var(--line);border-radius:9px;text-align:left;cursor:pointer}.history-item>span{padding:.2rem .38rem;color:var(--primary-dark);background:var(--primary-soft);border-radius:5px;font-size:.54rem;font-weight:850}.history-item div{min-width:0}.history-item strong,.history-item small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.history-item strong{font-size:.68rem}.history-item small{margin-top:.1rem;color:var(--muted);font-size:.55rem}.history-item time{color:var(--muted);font-size:.55rem}
@keyframes scan{0%,100%{top:15%}50%{top:82%}}
@media(max-width:880px){.reader-grid{grid-template-columns:1fr}.scan-panel{border-right:0}.result-panel{border-top:1px solid var(--line)}.result-empty{min-height:13rem}}
@media(max-width:600px){.reader-tabs button{flex-direction:column;gap:.3rem;min-height:5.2rem}.reader-tabs strong,.reader-tabs small{text-align:center}.image-drop{min-height:16rem}.camera-stage,.camera-stage video{min-height:20rem}.camera-controls{grid-template-columns:1fr 1fr}.camera-controls .start-camera{grid-column:1/-1}.history-panel .editor-heading{align-items:center}.history-item{grid-template-columns:auto minmax(0,1fr)}.history-item time{grid-column:2}}
