:root{font-family:system-ui,-apple-system,"Noto Sans TC","Microsoft JhengHei",sans-serif;color:#1a2840;background:#f3f6fa;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #7bbaff;outline-offset:2px}a{color:#1a61b3}.layout{display:flex;min-height:100vh}.sidebar{width:240px;flex:0 0 240px;background:#111d31;color:#b2c1d7;padding:30px 15px 25px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh}.brand{display:flex;align-items:center;gap:13px;text-decoration:none;color:white;margin:0 8px 40px}.brand-icon{background:#e5a83b;width:44px;height:44px;display:grid;place-items:center;color:#111d31;border-radius:13px;font-size:28px}.brand strong{font-size:21px;letter-spacing:.03em}.gold{color:#edb94d}.brand small{display:block;font-size:9px;letter-spacing:.16em;color:#8193ac}.side-label{font-size:11px;letter-spacing:.13em;padding-left:16px;color:#667b98;margin-bottom:13px}.sidebar nav{display:grid;gap:5px}.nav-item{width:100%;background:transparent;color:#a9bad2;text-align:left;border:0;border-radius:12px;padding:14px 17px;font-size:14px;display:flex;align-items:center;gap:15px}.nav-item span{font-size:21px;width:22px;text-align:center}.nav-item:hover,.nav-item.active{background:#263956;color:#fff}.nav-item.active{box-shadow:inset 3px 0 #f0b94b}.sidebar-bottom{margin-top:auto;padding:18px 12px 2px;font-size:12px;color:#7f92ad}.sidebar-bottom small{display:block;margin-top:13px}.status-dot-row{display:flex;align-items:center;gap:8px}.status-dot-row i{display:block;flex:0 0 7px;height:7px;background:#cf795e;border-radius:50%}.status-dot-row i.good{background:#5fce94}.main{width:calc(100% - 240px);min-width:0}.topbar{padding:25px clamp(20px,4vw,54px);background:#fff;box-shadow:0 1px 0 #e5ebf3;display:flex;justify-content:space-between;align-items:center;gap:12px}.eyebrow{color:#90a0b4;font-weight:800;letter-spacing:.17em;font-size:10px;margin-bottom:6px}h1{font-size:28px;margin:0;font-weight:750;letter-spacing:.01em}h2{font-size:20px;margin:0 0 5px}h3{font-size:16px;margin:0}.content{max-width:1320px;margin:auto;padding:30px clamp(18px,3vw,50px) 60px}.overview{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin-bottom:31px}.metric{background:#fff;border:1px solid #e8edf3;box-shadow:0 4px 14px #1d33520a;border-radius:16px;padding:21px}.metric span{font-size:13px;color:#7a899c}.metric strong{display:block;font-size:34px;margin:5px 0 0;color:#192b45;font-variant-numeric:tabular-nums}.metric small{font-size:11px;color:#92a0b0}.metric:nth-child(2) strong{color:#1b9d78}.metric:nth-child(3) strong{color:#cc8060}.progress{height:5px;background:#e7edf4;border-radius:9px;overflow:hidden;margin-top:15px}.progress i{display:block;width:0;background:#2cb894;height:100%;transition:width .2s}.section-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:20px}.section-head p{color:#8190a2;font-size:13px;margin:0}.count-label{font-size:12px;color:#758ca5}.button{display:inline-flex;align-items:center;justify-content:center;gap:6px;border-radius:10px;font-size:13px;min-height:40px;padding:9px 15px;font-weight:650;white-space:nowrap;border:1px solid transparent}.button-primary{background:#2374bd;color:#fff}.button-primary:hover{background:#135f9f}.button-outline{border-color:#cbd7e5;background:#fff;color:#344b66}.button-outline:hover,.button-ghost:hover{background:#edf4fb}.button-ghost{border-color:#e5e9f0;background:#fff;color:#40546e}.button-danger{background:#fff3f0;border-color:#f3bbb0;color:#b43e30}.filter-shell,.panel{background:#fff;border:1px solid #e6ebf2;border-radius:15px;padding:17px;margin-bottom:14px;box-shadow:0 3px 12px #1d335208}.search-label{display:flex;align-items:center;border:1px solid #dce4ed;border-radius:10px;height:44px;gap:8px;padding:0 12px}.search-label:focus-within{border-color:#438ac8}.search-label span{font-size:24px;color:#91a4ba}.search-label input{width:100%;border:0;outline:none;font-size:14px}.filter-row{display:flex;flex-wrap:wrap;gap:9px;margin-top:11px}.filter-row select,.inline-actions select{flex:1 1 145px;min-width:125px;border:1px solid #dae4ee;background:#f8fafc;border-radius:9px;height:39px;color:#3d506b;padding:0 8px;font-size:12px}.hint{font-size:12px;line-height:1.8;color:#7c8ca0;margin:12px 0 18px}.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:13px}.unit-card{background:#fff;border:1px solid #e5ebf2;border-radius:13px;overflow:hidden;min-width:0;position:relative;transition:transform .1s,border-color .1s}.unit-card:hover{transform:translateY(-2px);border-color:#93bde1}.unit-card.owned{border-color:#a5ddce}.portrait{height:125px;background:linear-gradient(135deg,#e9eff5,#dce6f2);display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden;cursor:pointer}.portrait img{width:100%;height:100%;object-fit:contain;image-rendering:auto}.portrait .fallback{font-size:31px;font-weight:900;color:#8a9cb6}.portrait .stars{position:absolute;left:7px;top:7px;background:#152943dd;color:#ffd279;padding:2px 6px;font-size:11px;border-radius:5px}.portrait .type{position:absolute;right:7px;top:7px;font-size:10px;font-weight:800;padding:3px 5px;color:white;border-radius:5px;background:#6f84a1}.type.STR{background:#d95f64}.type.DEX{background:#56a673}.type.QCK{background:#4d8ece}.type.PSY{background:#e0b544}.type.INT{background:#9372bf}.unit-info{padding:10px}.unit-info .id{color:#8ca0b4;font-size:11px;font-weight:700}.unit-info .name{font-size:12px;font-weight:700;line-height:1.45;height:34px;margin:3px 0 10px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.unit-info .label-row{height:16px;display:flex;gap:4px;overflow:hidden}.chip{border-radius:5px;background:#eef2f8;color:#627e9b;padding:1px 5px;font-size:9px;white-space:nowrap}.chip.gold-chip{color:#926816;background:#fff0ca}.card-action{width:100%;height:34px;border:0;border-top:1px solid #e6edf4;background:#f7f9fc;color:#56708d;font-size:12px;font-weight:700}.owned .card-action{color:#158965;background:#ecfbf5}.card-action:hover{background:#e7f0f8}.loadmore{display:flex;margin:20px auto 0;min-width:190px}.empty{text-align:center;padding:55px 10px;color:#9aa9b9}.alert{padding:13px 16px;background:#fff6df;border:1px solid #efd692;color:#745d23;border-radius:11px;font-size:13px;line-height:1.6;margin-bottom:20px}.miss-panels{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.miss-panels button{background:#fff;border:1px solid #dfe7f0;text-align:left;display:flex;flex-direction:column;gap:7px;padding:22px;border-radius:14px}.miss-panels button:hover{border-color:#6ea3cd;background:#f9fcff}.miss-panels span{font-size:13px;color:#607693}.miss-panels strong{font-size:32px;color:#1e3552}.miss-panels small{color:#9ca9ba}.two-col{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.panel{padding:22px;line-height:1.75}.panel p{font-size:13px;color:#6d7e94}.panel-heading{display:flex;align-items:center;color:#4a8cc3;gap:10px;margin-bottom:10px;font-size:16px;font-weight:800}.panel-heading h3{color:#223653}.panel textarea{width:100%;border:1px solid #d7e1ec;border-radius:9px;padding:12px;resize:vertical;font-size:14px}.inline-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:13px}.inline-actions label{font-size:12px;color:#71839a}.inline-actions input[type=number]{width:64px;padding:7px;border:1px solid #d5e0ee;border-radius:8px}.subtle{font-size:12px!important;color:#93a0b3!important}.file-button{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;background:#2276b9;color:#fff;font-size:13px;font-weight:650;border-radius:10px;padding:10px 14px;min-height:40px}.secondary-file{margin:9px;background:#e8f0f8;color:#355b82}.inline-link{display:inline-block;font-size:12px;margin:12px 0}.danger-zone{border-color:#f1d5d1}.screenshot-panel{margin-top:5px}.shot-wrapper{max-width:550px;position:relative;margin:16px auto;border-radius:8px;overflow:hidden;background:#202936}.shot-wrapper img{display:block;width:100%;height:auto}.shot-grid{position:absolute;display:grid;gap:1px}.shot-grid button{border:1px solid #ffd971a8;background:#ffe34a12;position:relative;min-width:0;min-height:0;color:#fff;text-shadow:0 1px 3px #111}.shot-grid button.done{background:#1bd09369;border:2px solid #24e0ae}.shot-grid button:hover{background:#fff6;cursor:crosshair}.shot-grid button span{background:#123d31aa;border-radius:20px;font-size:10px;position:absolute;right:1px;bottom:1px;padding:0 2px}.team-toolbar{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:20px}.team-toolbar input,.team-chooser input{border:1px solid #dae3ed;border-radius:9px;padding:11px;min-width:170px;flex:1;background:#fff}.team-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;max-width:760px;margin-bottom:25px}.team-slot{background:#fff;border:2px dashed #cbd9e8;border-radius:14px;min-height:118px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;padding:9px;position:relative;text-align:center;color:#8a9cb0}.team-slot.filled{border-style:solid;border-color:#99c9e8}.team-slot img{width:70px;height:70px;object-fit:contain}.team-slot b{font-size:11px;display:block;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#273e5c}.team-slot .remove{position:absolute;top:3px;right:5px;border:0;background:#f4e3e0;border-radius:50%;font-size:12px;color:#af534a}.team-chooser,.saved-teams{margin:25px 0}.team-chooser h3,.saved-teams h3{margin-bottom:12px}.team-options{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:8px;margin-top:10px;max-height:300px;overflow:auto}.team-options button{border:1px solid #dbe5ed;border-radius:9px;background:#fff;display:flex;gap:10px;align-items:center;text-align:left;padding:7px;font-size:12px;min-width:0}.team-options img{width:43px;height:43px;object-fit:contain;background:#edf3f8}.team-options span{overflow:hidden;text-overflow:ellipsis}.saved-team-card{background:#fff;padding:12px;border:1px solid #e0e8ef;border-radius:10px;margin-bottom:8px;display:flex;justify-content:space-between;align-items:center;gap:8px}.saved-team-card strong{font-size:13px}.saved-team-card small{font-size:11px;color:#8c9db1}.saved-team-card button{border:1px solid #dde7ed;padding:7px 11px;border-radius:7px;background:#fff;color:#45617e}.dialog{width:min(520px,92vw);max-height:85vh;border:none;border-radius:18px;box-shadow:0 30px 80px #10253f66;padding:25px;overflow:auto}.dialog::backdrop{background:#0e1e36b8}.close-dialog{position:absolute;top:12px;right:12px;border:0;border-radius:50%;background:#e9eff5;width:30px;height:30px;color:#566b83}.detail-top{display:flex;align-items:center;gap:18px;padding-right:25px}.detail-top img{width:95px;height:95px;object-fit:contain;background:#eaf0f6;border-radius:10px}.detail-top h3{font-size:18px;line-height:1.4}.detail-meta{color:#73859e;font-size:12px}.detail-tags{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}.detail-actions{display:flex;flex-wrap:wrap;gap:9px;margin:18px 0}.tag-button{border:1px solid #bfcfe0;background:#fff;border-radius:9px;padding:9px;font-size:12px}.tag-button.active{background:#fff3d1;border-color:#e5b74d;color:#8a640f}.dialog-note{font-size:12px;color:#8596aa;line-height:1.6}.shot-modal{padding-top:8px}.shot-modal h3{margin-bottom:8px}.shot-modal>img{width:90px;height:90px;object-fit:contain;border:1px solid #d6e1eb;border-radius:8px;margin:7px 0}.shot-modal>input{width:100%;padding:11px;border:1px solid #cfdaea;border-radius:9px}.shot-modal>p{font-size:12px;color:#8899ad}.shot-choices{max-height:290px;overflow:auto;display:grid;gap:5px;margin-top:12px}.shot-choices button{border:1px solid #e4ebf2;background:#fff;display:flex;align-items:center;gap:10px;text-align:left;padding:8px;border-radius:8px;color:#263850;font-size:12px}.shot-choices img{width:44px;height:44px;object-fit:contain}.toast{position:fixed;right:22px;bottom:22px;background:#1d334e;color:#fff;padding:13px 19px;border-radius:12px;max-width:min(420px,90vw);font-size:13px;box-shadow:0 8px 32px #061c3b44;opacity:0;transform:translateY(12px);pointer-events:none;z-index:30;transition:opacity .15s,transform .15s}.toast.show{opacity:1;transform:translateY(0)}.bottom-nav{display:none}
@media(max-width:980px){.sidebar{width:200px;flex-basis:200px}.main{width:calc(100% - 200px)}.overview{grid-template-columns:repeat(2,minmax(0,1fr))}.two-col{grid-template-columns:1fr}.content{padding:22px}.cards{grid-template-columns:repeat(auto-fill,minmax(140px,1fr))}}
@media(max-width:650px){.sidebar{display:none}.main{width:100%}.topbar{padding:19px 18px}.eyebrow{font-size:9px}h1{font-size:23px}.topbar .button{font-size:12px;padding:8px 11px;min-height:36px}.content{padding:17px 14px 95px}.overview{gap:8px;margin-bottom:23px}.metric{padding:13px;border-radius:12px}.metric span{font-size:11px}.metric strong{font-size:27px}.metric small{font-size:10px}.filter-shell{padding:12px}.filter-row{gap:7px}.filter-row select{flex:1 1 120px;min-width:105px;font-size:11px}.cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.portrait{height:110px}.unit-info{padding:8px 6px}.unit-info .name{font-size:11px}.section-head{align-items:flex-start}.section-head p{line-height:1.5}.miss-panels{gap:8px}.miss-panels button{padding:15px}.miss-panels strong{font-size:27px}.team-grid{gap:8px}.team-slot{min-height:105px}.team-slot img{width:55px;height:55px}.bottom-nav{position:fixed;display:grid;grid-template-columns:repeat(5,1fr);bottom:0;left:0;right:0;height:calc(66px + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);background:#fff;border-top:1px solid #e0e8ef;box-shadow:0 -4px 20px #102c5112;z-index:15}.bottom-nav button{border:0;background:transparent;color:#8596ad;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px}.bottom-nav button.active{color:#176db2;font-weight:800}.bottom-nav button span{font-size:23px}.bottom-nav button small{font-size:10px}.toast{bottom:78px;left:14px;right:14px}.panel{padding:15px}}
/* Always honor HTML hidden even where a class sets display:grid/flex. */
[hidden] { display:none !important; }

/* v0.2: local screenshot candidates */
.auto-panel{border-color:#bed7ee}.index-meter{margin-top:15px}.index-meter .progress{max-width:560px;height:8px}.index-meter p{line-height:1.6}
.scan-results{margin-top:18px}.scan-results h3{margin:0 0 10px}.match-row{background:#f8fafc;border:1px solid #dfe6ee;border-radius:11px;display:grid;grid-template-columns:105px minmax(0,1fr);gap:12px;padding:12px;margin:10px 0}.match-crop img{width:90px;height:90px;object-fit:cover;border-radius:8px;border:2px solid #e7c365}.match-crop small{display:block;line-height:1.4;font-size:10px;color:#768ca3}.match-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(165px,1fr));gap:6px}.match-options button{background:#fff;border:1px solid #dce5ed;border-radius:9px;display:flex;align-items:center;gap:7px;padding:5px;text-align:left;min-width:0;color:#263c56}.match-options button:hover{border-color:#3e91c4}.match-options img{width:45px;height:45px;object-fit:contain;background:#e8f0f6}.match-options span{display:flex;flex-direction:column;overflow:hidden;min-width:0}.match-options b{font-size:12px}.match-options small{font-size:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.match-options .match-manual,.match-options .match-skip{justify-content:center;font-size:12px;color:#3b698e;background:#edf5fb}.match-options .match-skip{color:#78899b;background:#fff}
@media(max-width:650px){.match-row{grid-template-columns:75px minmax(0,1fr);gap:8px;padding:8px}.match-crop img{width:68px;height:68px}.match-options{grid-template-columns:minmax(0,1fr)}.match-options button{padding:6px}.match-options img{width:39px;height:39px}}

.version-indicator{display:inline-block;font-size:10px;color:#8194ab;font-weight:650;margin-top:3px;letter-spacing:.02em}

/* v0.2.1 — make four boundary controls usable on narrow Android screens */
.shot-edge-controls label{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.shot-edge-controls input[type=number]{width:74px;min-height:39px;font-variant-numeric:tabular-nums}
.shot-edge-controls .button{min-height:39px}
@media (max-width:650px){.shot-edge-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.shot-edge-controls label{display:flex;justify-content:space-between;gap:4px}.shot-edge-controls input[type=number]{width:62px;flex:0 0 62px}.shot-edge-controls .button{grid-column:1/-1}.shot-edge-controls #shot-select{grid-column:1/-1;width:100%}}

/* v0.3: touch-friendly grid corner resize and whole-grid translation */
.shot-wrapper{overflow:visible;touch-action:pan-y}
.shot-grid{z-index:2}
.shot-handles{position:absolute;z-index:5;pointer-events:none;border:2px solid #ffe25a;box-shadow:inset 0 0 0 1px #13223888}
.drag-handle{pointer-events:auto;touch-action:none;user-select:none;-webkit-user-select:none;position:absolute;width:29px;height:29px;padding:0;display:grid;place-items:center;border:2px solid #142d49;background:#fce26a;color:#18324f;border-radius:50%;font-size:17px;line-height:1;box-shadow:0 2px 8px #13263b99;cursor:grab}
.drag-handle:active{cursor:grabbing;background:#fff29e}
.drag-handle.nw{left:-15px;top:-15px}.drag-handle.ne{right:-15px;top:-15px}.drag-handle.sw{left:-15px;bottom:-15px}.drag-handle.se{right:-15px;bottom:-15px}.drag-handle.center{left:calc(50% - 15px);top:calc(50% - 15px);border:2px solid #fff;color:#fff;background:#194f8fe8}
@media(max-width:650px){.drag-handle{width:25px;height:25px;font-size:14px}.drag-handle.nw{left:-12px;top:-12px}.drag-handle.ne{right:-12px;top:-12px}.drag-handle.sw{left:-12px;bottom:-12px}.drag-handle.se{right:-12px;bottom:-12px}.drag-handle.center{left:calc(50% - 13px);top:calc(50% - 13px)}.shot-edge-controls #shot-auto-detect{grid-column:1/-1}}
.scan-type{font-size:11px;display:inline-flex;align-items:center;gap:5px;padding:3px 6px;border-radius:7px;background:#edf3f8;color:#3c5d7d;margin-top:4px}
.scan-type.STR{border-left:4px solid #d43842}.scan-type.DEX{border-left:4px solid #4dac48}.scan-type.QCK{border-left:4px solid #268aca}.scan-type.PSY{border-left:4px solid #e6bc36}.scan-type.INT{border-left:4px solid #8955bd}

/* v0.3.1: each recognition result shows the actual small attribute badge crop. */
.match-crop .badge-preview{display:block;width:40px;height:40px;object-fit:cover;border:2px solid #dfc778;border-radius:50%;margin:5px auto;box-sizing:border-box;background:#e6e7ea;}

/* v0.3.3 Safe in-app deploy updater */
.software-update-panel{border-color:color-mix(in srgb,var(--accent,#008b88) 35%,#d9e1e8)}
.software-update-controls{display:grid;gap:12px;margin:16px 0}
.software-update-controls[hidden]{display:none!important}
.software-field{font-weight:650;font-size:.9rem}
.software-update-controls input[type=file],.software-update-controls input[type=password]{display:block;box-sizing:border-box;max-width:100%;width:100%;padding:12px;border:1px solid #ccd5df;border-radius:12px;background:#fff;color:#142238;font-size:16px}
.software-backup-confirm{display:flex;align-items:center;gap:10px;line-height:1.5;padding:8px 0;font-size:.91rem}
.software-backup-confirm input{width:20px;height:20px;flex-shrink:0}
.software-update-progress{white-space:pre-wrap;overflow-wrap:anywhere}
.software-setup{margin-top:12px;font-size:.87rem;line-height:1.7}
.software-setup summary{cursor:pointer;font-weight:600}

/* v0.3.5: Candidates always remain visible; only confirmation is manual. */
.match-warning{color:#ac4d2d;font-weight:700;line-height:1.6;margin:8px 0;}
.match-hint{color:#556579;font-size:.89rem;line-height:1.6;margin:8px 0;}
.match-options details{width:100%;border:1px solid #e4c9ac;border-radius:12px;padding:10px;background:#fffaf3;margin-bottom:8px;}
.match-options details summary{cursor:pointer;font-weight:700;color:#795632;line-height:1.5;}
.match-options details[open] summary{margin-bottom:10px;}

/* v0.3.7: on-image point calibration and isolated portrait search */
.shot-wrapper.calibration-active{cursor:crosshair;touch-action:manipulation}
.shot-wrapper.calibration-active .shot-grid,.shot-wrapper.calibration-active .shot-handles{pointer-events:none!important}
.shot-wrapper.calibration-active .shot-grid button{pointer-events:none!important}
.shot-tap-markers{position:absolute;inset:0;pointer-events:none;z-index:9}
.shot-tap-marker{position:absolute;transform:translate(-50%,-50%);display:grid;place-items:center;width:25px;height:25px;background:#ffed58;color:#1a2840;border:2px solid #172c47;border-radius:50%;font-size:13px;font-weight:800;box-shadow:0 2px 6px #1118}
.calibration-selected{outline:3px solid #ffc857!important;background:#244c76!important;color:white!important}
.shot-tap-toolbar .button{white-space:normal;text-align:center;min-height:42px}

/* v0.3.8: make the two simple one-card actions primary on narrow screens. */
.one-tile-toolbar{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0 6px}
.one-tile-toolbar .button{flex:1 1 200px;white-space:normal;min-height:48px}
.advanced-calibration{margin:14px 0 10px;border:1px solid var(--border,#d5dce4);border-radius:12px;padding:10px 12px}
.advanced-calibration summary{font-weight:600;cursor:pointer}
.advanced-calibration[open]>.inline-actions{margin-top:12px}

/* Exact input crops before running image recognition. */
.shot-tile-preview{display:grid;gap:4px;margin:12px 0 18px}
.shot-tile-preview[hidden]{display:none!important}
.shot-tile-thumb{position:relative;min-width:0;aspect-ratio:1;border:1px solid #dae3ec;border-radius:6px;overflow:hidden;padding:0;background:#edf2f5}
.shot-tile-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.shot-tile-thumb small{position:absolute;right:2px;bottom:1px;background:#192b45c9;color:#fff;font-size:9px;padding:0px 3px;border-radius:2px}

/* v0.4.1: A SINGLE visible result. Full original is optional, never stacked above 25 crops. */
.shot-source-details{margin:16px 0;border:1px solid #d5e0ee;border-radius:12px;padding:10px 12px}
.shot-source-details>summary{cursor:pointer;font-size:13px;color:#36577e;font-weight:650;min-height:30px}
.shot-source-details:not([open]) .shot-wrapper{display:none!important}
.shot-tile-heading{font-weight:700;color:#233d59;margin-top:18px}
.shot-tile-preview{margin-top:9px!important;gap:5px!important}
#shot-select{width:100%;max-width:380px;height:39px;border-radius:9px;border:1px solid #dce6ef;background:#f8fafc}
@media(max-width:620px){.shot-tile-preview{gap:3px!important}.shot-tile-thumb{border-radius:4px}}

/* v0.4.1: single primary screenshot; tiny card previews are opt-in */
.shot-source-details{margin-top:12px}
.shot-source-details[open]>summary{margin-bottom:12px}
.one-tile-toolbar{display:flex;flex-wrap:wrap;gap:8px}
#shot-wrapper{touch-action:pan-y}
#shot-tiles-details:not([open]) #shot-tile-preview{display:none!important}

#shot-auto-proposal[hidden]{display:none!important}

/* v0.4.3 review-and-commit batch import */
.batch-toolbar{border:1px solid #cbd5e1;border-radius:14px;padding:14px;margin:12px 0;background:var(--card-bg,#fff)}
.batch-toolbar .inline-actions{display:flex;gap:7px;flex-wrap:wrap;margin:9px 0}
.batch-toolbar .button{font-size:13px;white-space:normal;padding:9px 11px}
.batch-toolbar .batch-count{font-size:14px;font-weight:700}
.batch-rows{display:grid;grid-template-columns:repeat(auto-fill,minmax(275px,1fr));gap:10px}
.batch-row{display:flex;gap:10px;padding:9px;border:1px solid #d2dae4;border-radius:13px;min-width:0;background:#fff;color:#243346}
.batch-row.batch-uncertain{border-color:#dfb6a0}
.batch-row .batch-crop{width:75px;height:75px;flex:0 0 75px;object-fit:cover;border-radius:8px}
.batch-info{display:flex;flex-direction:column;flex:1;gap:5px;min-width:0}
.batch-info strong{font-size:13px}
.batch-info small{font-size:12px;color:#4c5e70;line-height:1.3}
.batch-alert{font-size:11px;color:#a15120;font-weight:600}
.batch-select-label{display:flex;flex-direction:column;font-size:11px;gap:3px}
.batch-select-label select{width:100%;min-width:0;font-size:12px;padding:7px;border:1px solid #ccd4df;border-radius:8px;background:#fff;color:#223449}
.batch-secondary{display:flex;gap:5px;flex-wrap:wrap}
.batch-secondary button{font-size:11px;color:#556477;border:0;background:transparent;padding:3px;cursor:pointer}
@media(max-width:430px){.batch-rows{grid-template-columns:1fr}.batch-toolbar{padding:10px}.batch-row .batch-crop{width:68px;height:68px;flex-basis:68px}}

/* v0.4.4: picture-first visual candidate confirmation. */
.batch-rows{grid-template-columns:repeat(auto-fill,minmax(310px,1fr));gap:14px}
.batch-row{display:block;padding:12px;border-radius:14px;min-width:0}
.batch-review-head{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-bottom:9px}
.batch-compare{display:flex;justify-content:center;align-items:center;gap:12px;padding:9px 6px;background:#f4f7fb;border-radius:12px}
.batch-reference,.batch-current{display:flex;flex-direction:column;align-items:center;gap:5px;min-width:95px;color:#31465d;font-size:12px;font-weight:650;text-align:center}
.batch-compare .batch-crop,.batch-selected-image img{width:95px;height:95px;object-fit:cover;border:2px solid #d2b75c;border-radius:9px;background:#e7eaf0}
.batch-selected-image{display:block;width:95px;height:95px}
.batch-compare-separator{color:#687f96;font-weight:800;font-size:22px}
.batch-no-choice{display:grid;place-items:center;width:95px;height:95px;border:2px dashed #adbcca;border-radius:9px;background:#fff;color:#718196;font-size:12px}
.batch-top-result{color:#4c6076;font-size:12px;margin:9px 0}
.batch-visual-label{font-size:12px;font-weight:750;margin:8px 0 6px;color:#253e58}
.batch-candidates{display:flex;gap:8px;overflow-x:auto;overscroll-behavior-inline:contain;scroll-snap-type:x proximity;padding:3px 2px 9px;scrollbar-width:thin}
.batch-option{position:relative;display:flex;flex-direction:column;align-items:center;text-align:center;gap:3px;min-width:103px;width:103px;flex:0 0 103px;border:2px solid #d7e1ea;border-radius:11px;background:#fff;color:#21374d;padding:7px 5px;cursor:pointer;scroll-snap-align:start}
.batch-option.selected{border-color:#218b75;background:#eaf8f2;box-shadow:0 0 0 1px #218b75}
.batch-option-picture{display:block;width:82px;height:82px;border-radius:8px;background:#e7ebf2;overflow:hidden}
.batch-option-picture img{width:100%;height:100%;object-fit:contain;display:block}
.batch-option-number{position:absolute;left:5px;top:5px;font-size:11px;font-weight:800;background:#233951;color:white;border-radius:30px;width:21px;height:21px;display:grid;place-items:center}
.batch-option-id{font-size:12px;font-weight:750}
.batch-option-name{font-size:10px;line-height:1.25;min-height:25px;max-height:25px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.batch-option-check{font-size:10px;color:#317368;font-weight:700}
.batch-secondary{margin-top:6px}
.batch-secondary button{min-height:30px}
@media(max-width:430px){.batch-rows{grid-template-columns:minmax(0,1fr)}.batch-row{padding:10px}.batch-compare .batch-crop,.batch-selected-image img,.batch-selected-image,.batch-no-choice{width:88px;height:88px}.batch-option{width:98px;min-width:98px;flex-basis:98px}.batch-option-picture{width:77px;height:77px}}


/* v0.4.6: condensed image-first, one-screen 5x5 review. */
.quick-review{display:grid;gap:9px;margin:8px 0 18px;scroll-margin-top:14px}
.quick-heading h3{margin:0!important;font-size:17px}.quick-heading h3 small{font-size:12px;font-weight:500}
.quick-heading p,.quick-safety{margin:5px 0;font-size:12px;line-height:1.5;color:#566b7d}
.quick-meta{display:flex;flex-wrap:wrap;gap:7px;align-items:center;font-size:12px}
.quick-meta span{padding:5px 8px;border-radius:8px;background:#eaf2f7;color:#24445c}
.quick-actions{display:flex;gap:5px;overflow-x:auto;padding:2px 0 7px;scrollbar-width:thin}
.quick-actions button{white-space:nowrap;border:1px solid #ccdae5;border-radius:9px;background:#fff;color:#294560;padding:7px 10px;font-size:12px;font-weight:650;flex-shrink:0}
.quick-actions button.active{border-color:#2975ac;background:#e8f4fc}
.quick-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}
.quick-tile{position:relative;aspect-ratio:1;min-width:0;overflow:hidden;display:block;border:2px solid #bed3d4;border-radius:8px;padding:0;background:#eaf0f6;cursor:pointer}
.quick-tile.pending,.quick-tile.empty{border-color:#e2a044}
.quick-tile.skipped{border-color:#9aa4b1;filter:saturate(.55)}
.quick-tile.verified{border-color:#18996c}
.quick-original{display:block;width:100%;height:100%;object-fit:cover}
.quick-match{position:absolute;right:0;bottom:0;width:45%;height:45%;border:1.5px solid white;background:#eef2f6;box-shadow:0 0 4px #10253b77;border-radius:4px;overflow:hidden}
.quick-match img{width:100%;height:100%;object-fit:cover;display:block}
.quick-index{position:absolute;left:2px;top:2px;min-width:16px;height:16px;background:#162d46df;border-radius:4px;color:#fff;font-size:10px;font-weight:700;display:grid;place-items:center}
.quick-status{position:absolute;right:2px;top:2px;width:15px;height:15px;display:grid;place-items:center;border-radius:50%;background:#267b63;color:white;font-weight:800;font-size:11px}
.quick-tile.pending .quick-status,.quick-tile.empty .quick-status{background:#c77526}
.quick-tile.skipped .quick-status{background:#7b8795}
.quick-footer{display:flex;gap:7px;flex-wrap:wrap;align-items:center;position:sticky;bottom:64px;background:#fffef0f4;z-index:11;border:1px solid #dce6e1;border-radius:12px;padding:9px;box-shadow:0 2px 10px #182a3f15}
.quick-footer .button{flex:1 1 160px;font-size:13px;min-height:44px}
.quick-dialog{border:0;border-radius:18px;width:min(560px,calc(100vw - 18px));max-height:90dvh;overflow:auto;padding:0;background:#fff;color:#152b43;box-shadow:0 25px 70px #0008}
.quick-dialog::backdrop{background:#0f1d31a6}
.quick-dialog-inner{padding:15px;display:grid;gap:11px}
.quick-dialog-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.quick-dialog-top h3{margin:0;font-size:17px}
.quick-dialog-top button{border:0;background:#edf3f7;border-radius:50%;width:36px;height:36px;font-size:20px;color:#23445b}
.quick-compare-large{display:grid;grid-template-columns:1fr 1fr;gap:13px;background:#f1f5f9;border-radius:12px;padding:10px}
.quick-compare-large>div{display:flex;flex-direction:column;align-items:center;gap:6px;color:#34516c;font-size:12px;font-weight:700}
#quick-original,#quick-selected img{width:min(100%,132px);aspect-ratio:1;object-fit:cover;border:2px solid #d5ad4d;border-radius:7px}
#quick-selected{display:flex;flex-direction:column;align-items:center;gap:3px;width:100%;min-height:132px}
#quick-selected small{font-size:11px;color:#27465d}
.quick-none{height:126px;width:126px;max-width:100%;border:2px dashed #b9c4d0;border-radius:8px;display:grid;place-items:center;color:#7d8998}
.quick-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.quick-candidate{position:relative;min-width:0;border:2px solid #d9e4ed;background:#fff;border-radius:11px;display:grid;justify-items:center;gap:3px;padding:7px 4px;color:#223b54;text-align:center;cursor:pointer}
.quick-candidate.active{border-color:#238870;background:#ecfbf5}
.quick-candidate img{display:block;width:min(100%,84px);aspect-ratio:1;object-fit:cover}
.quick-candidate strong{font-size:12px}.quick-candidate small{font-size:10px;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.quick-rank{position:absolute;left:4px;top:4px;background:#284867;color:#fff;border-radius:50%;font-size:11px;width:20px;height:20px;display:grid;place-items:center}
.quick-dialog-actions{display:flex;flex-wrap:wrap;gap:7px}
.quick-dialog-actions button{flex:1 1 110px;border:1px solid #c7d6e2;background:#eff5fa;color:#264962;border-radius:9px;min-height:40px;font-size:13px;font-weight:650}
@media(max-width:460px){.quick-grid{gap:3px}.quick-tile{border-radius:5px}.quick-footer{bottom:76px}.quick-actions button{padding:7px 9px}.quick-dialog-inner{padding:12px}.quick-candidate img{width:min(100%,72px)}}
