/* VOKKEM input surface: the existing brand, immediate capture/import actions. */
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
body:has(#scan:not([hidden]))>.app-scroll>.app-header{display:none}
body:has(#scan:not([hidden])) main#main{padding:16px 16px 24px}
.capture-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 18px}
.capture-brand{display:flex;align-items:center;gap:8px}.capture-brand img{object-fit:contain}
.capture-icon{width:44px;height:44px;min-height:44px;display:grid;place-items:center;background:#edf0fc;color:#172865;border-radius:50%;padding:10px}
.capture-icon:disabled{opacity:.4}
#capture-start{margin:0}
#capture-start .capture-card{border:0;padding:0;background:none;box-shadow:none}
#capture-start .capture-languages{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:10px;margin:0 0 14px;max-width:none;text-align:left}
.capture-languages>div{background:#eff2ff;border:1px solid #e0e6fc;border-radius:28px;padding:10px 14px;min-width:0}
.capture-languages label{font-size:.72rem;color:#7984a3;margin:0 0 3px;font-weight:650}
.capture-languages select{min-height:30px;padding:0 20px 0 0;border:0;border-radius:0;background:transparent;font-size:.9rem;font-weight:700;color:#182653;width:100%;text-overflow:ellipsis}
.capture-languages input{margin-top:8px;font-size:.85rem}
.capture-scene{height:clamp(310px,49dvh,500px);position:relative;isolation:isolate;border-radius:26px;overflow:hidden;background:radial-gradient(ellipse at 70% 25%,#d3dcfc,transparent 65%),#e5ebfb;display:grid;place-items:center}
.capture-scene>img{width:100%;height:100%;object-fit:contain;object-position:center;filter:brightness(.82)}
.capture-example{position:absolute;top:14px;left:50%;transform:translateX(-50%);padding:4px 10px;border-radius:99px;color:#fff;background:#15203b73;font-size:.7rem}
.capture-overlay{position:absolute;inset:45% 0 auto;background:linear-gradient(transparent,#101a388f,transparent);padding:24px 8px;text-align:center;color:white;text-shadow:0 1px 5px #142038}
#capture-start .capture-overlay h2{font-size:clamp(1.2rem,5vw,1.7rem);color:white;margin:0 0 8px;font-weight:800}
.capture-overlay p{font-size:clamp(.78rem,3vw,1rem);line-height:1.5}
.frame-corner{position:absolute;width:28px;height:28px;border:3px solid white;border-radius:12px}.top-left{top:18px;left:18px;border-right:0;border-bottom:0}.top-right{top:18px;right:18px;border-left:0;border-bottom:0}.bottom-left{bottom:18px;left:18px;border-right:0;border-top:0}.bottom-right{bottom:18px;right:18px;border-left:0;border-top:0}
#capture-start .capture-actions{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;margin:16px auto 8px;max-width:500px}
#capture-start .capture-actions button{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:10px;background:none;border:0;box-shadow:none;padding:0;color:#182653;font-size:.87rem;font-weight:700;line-height:1.4}
.capture-option>[data-icon]{width:58px;height:58px;border:1px solid #e0e5fa;border-radius:50%;background:#eff2ff;margin-top:9px}.capture-option svg{width:26px;height:26px}
#capture-start #camera{color:#345bff;transform:none}
.shutter-disc{width:78px;height:78px;border-radius:50%;background:linear-gradient(125deg,#04a1ff,#3c5cff 50%,#802bff);border:4px solid #4f61ff;box-shadow:inset 0 0 0 3px #fff,0 5px 12px #4663da25;transition:transform .15s}
#camera:active .shutter-disc{transform:scale(.92)}
.camera-hint{font-size:.68rem;color:#8791a8;margin:10px 0}
#capture-start .photo-privacy{margin:10px auto 0}#capture-start .photo-privacy summary{font-size:.8rem;color:#7e89a3}
#scan .manual-entry{margin-top:10px}#scan .manual-entry>summary{color:#78849f;font-size:.8rem}
#document-title{overflow-wrap:anywhere;margin:14px 0}#document-count{margin-bottom:20px}#document-status{font-size:.88rem;line-height:1.6}#document-panel .caption{display:block;margin-top:12px;line-height:1.7}
.word-tags{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0}.word-tags>span{padding:3px 9px;border-radius:99px;background:#edf1ff;color:#4f62ab;font-size:.75rem}.word-metadata{grid-column:1/-1}.word-metadata details p{font-size:.84rem;line-height:1.6}.word-metadata summary{font-size:.8rem;color:#78849f}
@media(min-width:641px){#scan{max-width:560px;margin:auto}.capture-scene{height:440px}.capture-languages select{font-size:1rem}}
@media(max-width:360px){.capture-brand img:last-child{width:110px}.capture-toolbar{gap:8px}.capture-languages>div{padding:9px 10px}.capture-languages select{font-size:.8rem}.capture-scene{height:310px}.capture-option>[data-icon]{width:50px;height:50px}.shutter-disc{width:68px;height:68px}#capture-start .capture-actions button{font-size:.8rem}}
#capture-start .capture-overlay h2{display:block}
#capture-start .camera-hint{font-size:.68rem;line-height:1.5}
.capture-scene>img{object-fit:cover;filter:none}
.capture-overlay{inset:50% 0 auto;padding:22px 8px;background:linear-gradient(transparent,#101a387a,transparent)}
/* The focus frame is anchored to the printed word, at every screen size. */
.capture-toolbar{display:grid;grid-template-columns:44px 1fr 44px}
.capture-brand{justify-content:center}.capture-toolbar-spacer{width:44px}
#capture-start .capture-languages{margin-inline:auto;grid-template-columns:minmax(0,1fr) minmax(0,1fr);text-align:center}
.capture-languages label{text-align:center}
.capture-languages select{text-align:center;text-align-last:center;padding-inline:0}
.capture-overlay{inset:12% 0 auto;pointer-events:none;z-index:3}
.demo-book{position:absolute;left:7%;top:37%;width:86%;height:58%;display:flex;transform:rotate(-4deg);transform-origin:50% 90%;filter:drop-shadow(0 8px 10px #17213e30);pointer-events:none;text-align:start;direction:ltr}
.demo-book-page{width:84%;padding:18px 14px 14px 24px;background:linear-gradient(90deg,#eee5d8,#fffdf8 10%,#fffdf8 90%,#e3dacc);border-radius:9px 18px 5px 9px;border-bottom:5px double #d9cdbc;color:#3a302a;font-family:Georgia,'Times New Roman',serif}
.demo-book-page small{display:block;font-size:8px;letter-spacing:.13em;color:#837264}
.demo-book-page h3{font-family:inherit;font-size:17px;font-weight:500;margin:6px 0 13px;line-height:1.2;letter-spacing:0}
.demo-book-page p{font-family:inherit;font-size:clamp(14px,3.8vw,17px);line-height:1.55;overflow-wrap:normal;margin:0 0 10px;color:#51473f}
.demo-book-page p:last-child{font-size:clamp(12px,3.2vw,14px);color:#8a7a6d}
.demo-book-edge{flex:1;background:linear-gradient(90deg,#cbbfae,#f8f2e6 24%,#fffdf7);border-radius:18px 8px 9px 4px;border-bottom:5px double #d9cdbc;transform:skewY(7deg);transform-origin:left bottom}
.demo-target{position:relative;display:inline-block;color:#30274f;font-weight:700;white-space:nowrap}
.demo-focus{position:absolute;inset:-5px -7px;border:2px solid #7460ff;border-radius:7px;background:#7763ff12;opacity:0}
.demo-camera{position:absolute;left:calc(100% + 12px);top:-15px;display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:linear-gradient(135deg,#128dff,#7144ff);color:white;box-shadow:0 3px 8px #584ae340;opacity:0}
.demo-camera svg{width:20px;height:20px}
.demo-snapshot{position:absolute;inset:0;background:white;opacity:0;pointer-events:none;z-index:4}
.demo-word-card{position:absolute;right:5%;bottom:5%;width:138px;max-width:47%;padding:13px 16px;text-align:start;border:1px solid #dce4ff;border-bottom:4px solid #d7def6;border-radius:16px;background:#fff;color:#17213e;box-shadow:0 8px 20px #10234c30;transform:rotate(4deg);pointer-events:none;z-index:4}
.demo-word-card strong{display:block;font-size:1.2rem;line-height:1.4;margin-bottom:4px;letter-spacing:-.035em}
.demo-word-card>span:last-child{color:#727c98;font-size:.9rem}
.demo-card-mark{position:absolute;right:9px;top:5px;color:#ffc334;font-size:18px}
#capture-start .demo-replay{position:absolute;top:12px;right:12px;z-index:5;display:grid;place-items:center;width:44px;height:44px;min-height:44px;padding:11px;border-radius:50%;background:#172443b8;color:white;border:1px solid #ffffff38;box-shadow:none}
.demo-replay svg{width:21px;height:21px}
.is-demonstrating .demo-book{animation:book-open 4.8s ease-out both}
.is-demonstrating .demo-focus{animation:word-focus 4.8s ease-in-out both}
.is-demonstrating .demo-camera{animation:word-camera 4.8s ease-in-out both}
.is-demonstrating .demo-snapshot{animation:word-snapshot 4.8s linear both}
.is-demonstrating .demo-word-card{animation:word-card 4.8s cubic-bezier(.2,.7,.2,1) both}
@keyframes book-open{0%{opacity:0;transform:translateY(70px) rotate(-10deg) scale(.86)}20%,100%{opacity:1;transform:translateY(0) rotate(-4deg) scale(1)}}
@keyframes word-focus{0%,22%{opacity:0;transform:scale(1.6)}35%,100%{opacity:1;transform:scale(1)}}
@keyframes word-camera{0%,34%{opacity:0;transform:translate(12px,-12px) scale(.85)}43%,54%{opacity:1;transform:translate(0,0) scale(1)}58%{opacity:1;transform:scale(.86)}65%,100%{opacity:0;transform:scale(1)}}
@keyframes word-snapshot{0%,54%{opacity:0}57%{opacity:.25}62%,100%{opacity:0}}
@keyframes word-card{0%,61%{opacity:0;transform:translate(-55px,-55px) scale(.6) rotate(-4deg)}84%,100%{opacity:1;transform:translate(0,0) scale(1) rotate(4deg)}}
@media(max-width:360px){.demo-book-page{padding:12px 10px 10px 18px}.demo-book-page h3{font-size:15px;margin-bottom:8px}.demo-book-page p{font-size:13px}.demo-book-page p:last-child{font-size:11px}.demo-word-card{width:120px;padding:10px 14px}.demo-word-card strong{font-size:1.05rem}}
@media(prefers-reduced-motion:reduce){.is-demonstrating .demo-book,.is-demonstrating .demo-focus,.is-demonstrating .demo-camera,.is-demonstrating .demo-snapshot,.is-demonstrating .demo-word-card{animation:none}.demo-focus{opacity:1}.demo-camera,.demo-snapshot{display:none}#capture-start .demo-replay{display:none}}
/* One photograph collects several highlighted words into one vocabulary book. */
.demo-focus{inset:-3px -3px;border-width:1.5px;border-radius:5px}
.demo-vocabulary{width:164px;max-width:52%;padding:10px 12px;bottom:4%;right:4%;transform:rotate(3deg)}
.demo-deck-title{display:flex;align-items:center;gap:5px;padding-bottom:7px;color:#4c55bb;font-family:inherit;font-size:.74rem;font-weight:700}
.demo-deck-title svg{width:16px;height:16px}.demo-deck-count{margin-inline-start:auto;background:#eeeaff;padding:1px 6px;border-radius:8px}
.demo-entry{display:flex;align-items:baseline;justify-content:space-between;gap:8px;padding:6px 0;border-top:1px solid #edf0f8}
.demo-entry strong{font-size:.96rem;margin:0;letter-spacing:-.02em}.demo-entry>span{font-size:.72rem;color:#727c98;text-align:end}
.is-demonstrating .demo-life .demo-focus{animation-name:life-focus}
.is-demonstrating .demo-single .demo-focus{animation-name:single-focus}
.is-demonstrating .demo-entry{animation:deck-entries 4.8s ease-out both}
.is-demonstrating .demo-entry:nth-child(3){animation-name:deck-entry-two}
.is-demonstrating .demo-entry:nth-child(4){animation-name:deck-entry-three}
@keyframes life-focus{0%,19%{opacity:0;transform:scale(1.5)}29%,100%{opacity:1;transform:scale(1)}}
@keyframes single-focus{0%,31%{opacity:0;transform:scale(1.5)}42%,100%{opacity:1;transform:scale(1)}}
@keyframes deck-entries{0%,67%{opacity:0;transform:translateY(8px)}78%,100%{opacity:1;transform:translateY(0)}}
@keyframes deck-entry-two{0%,73%{opacity:0;transform:translateY(8px)}84%,100%{opacity:1;transform:translateY(0)}}
@keyframes deck-entry-three{0%,79%{opacity:0;transform:translateY(8px)}90%,100%{opacity:1;transform:translateY(0)}}
@media(max-width:360px){.demo-vocabulary{width:143px;padding:8px 10px}.demo-entry{padding:5px 0}.demo-entry strong{font-size:.86rem}.demo-entry>span{font-size:.66rem}.demo-deck-title{font-size:.68rem}}
@media(prefers-reduced-motion:reduce){.is-demonstrating .demo-entry,.is-demonstrating .demo-life .demo-focus,.is-demonstrating .demo-single .demo-focus{animation:none}}
.live-camera-scene{position:relative;height:clamp(280px,47dvh,500px);background:#101a31;border-radius:26px;overflow:hidden;isolation:isolate}
#live-camera{display:block;width:100%;height:100%;object-fit:contain}
#camera-placeholder{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:36px 24px;gap:16px;color:#fff;text-align:center;background:linear-gradient(145deg,#172743,#202449)}
#camera-placeholder>[data-icon] svg{width:44px;height:44px;color:#b5c6ff}
#camera-placeholder p{font-size:1rem;line-height:1.6;max-width:280px}
#camera-placeholder .secondary{color:#182653;background:#f2f5ff}
#camera-help{margin:12px 0;padding:16px;text-align:start}#camera-help p{font-size:.85rem;line-height:1.7;margin:0 0 10px}
#capture-flash[aria-pressed=true]{background:#e1ddff;color:#5943e6}
.live-camera-scene .frame-corner{pointer-events:none;opacity:.6}
#capture-start>.photo-privacy{margin:8px 0 20px;text-align:center}
#capture-start>.photo-privacy summary{color:#7e89a3;font-size:.8rem}
.capture-onboarding{margin:8px 0 24px;border:1px solid #e0e6fc;border-radius:20px;padding:12px;background:#f7f8ff}
.capture-onboarding>summary{font-size:.9rem;color:#4f62ab;padding:8px 4px}
.capture-onboarding .capture-scene{height:380px;max-width:400px;margin:8px auto 12px}
.capture-onboarding .capture-overlay h2{font-size:1.15rem;color:#fff}
.capture-onboarding .demo-replay{position:absolute;top:12px;right:12px;width:44px;height:44px;border-radius:50%;background:#172443b8;color:white;padding:11px;z-index:5}
@media(prefers-reduced-motion:reduce){.capture-onboarding .demo-replay{display:none}}
.native-camera-link{display:flex;margin:4px auto;color:#69769a;font-size:.8rem}
#camera-grid{position:absolute;inset:0;pointer-events:none;background:linear-gradient(to right,transparent 33.1%,#ffffff65 33.1%,#ffffff65 33.4%,transparent 33.4%,transparent 66.5%,#ffffff65 66.5%,#ffffff65 66.8%,transparent 66.8%),linear-gradient(to bottom,transparent 33.1%,#ffffff65 33.1%,#ffffff65 33.4%,transparent 33.4%,transparent 66.5%,#ffffff65 66.5%,#ffffff65 66.8%,transparent 66.8%)}
#camera-focus-ring{position:absolute;width:48px;height:48px;border:2px solid #ffd45b;border-radius:10px;transform:translate(-50%,-50%);pointer-events:none}
#camera-controls{margin:12px 0 0;padding:0 4px}
.camera-tools{display:flex;justify-content:center;gap:8px;flex-wrap:wrap}
.camera-tools button{display:flex;align-items:center;justify-content:center;gap:6px;min-height:44px;border:1px solid #dee4fa;border-radius:18px;background:#f3f5ff;color:#233d79;padding:8px 12px;font-size:12px;font-weight:600}
.camera-tools button[aria-pressed=true]{background:#e0e7ff;border-color:#596afb;color:#263df0}
.camera-tools button>span:first-child{font-size:22px;line-height:1}
.camera-adjustment{display:flex;align-items:center;gap:12px;margin:8px 0;font-size:12px;color:#556285;min-height:40px}
.camera-adjustment>span{min-width:62px}.camera-adjustment input{flex:1;min-width:0;width:auto;accent-color:#4154fb;padding:0;min-height:36px}.camera-adjustment output{min-width:54px;text-align:end;font-variant-numeric:tabular-nums}
#camera-control-status{font-size:12px;color:#596580;text-align:center;margin:4px 0}#camera-control-status:empty{display:none}
#camera-controls [hidden],#camera-grid[hidden],#camera-focus-ring[hidden]{display:none!important}
/* Full-screen camera: only the entry surface overlays the live view. */
body:has(#scan:not([hidden]) #capture-start:not([hidden])) .bottom-nav{display:none!important}
body:has(#scan:not([hidden]) #capture-start:not([hidden])) #app-scroll{overflow:hidden}
#scan:has(#capture-start:not([hidden])){position:fixed;inset:0;max-width:none;margin:0;background:#101a31;z-index:20;isolation:isolate}
#scan:has(#capture-start:not([hidden])) .capture-toolbar{position:absolute;inset:0 0 auto;z-index:4;margin:0;padding:calc(12px + env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) 12px max(16px,env(safe-area-inset-left));background:linear-gradient(#071021bc,transparent);grid-template-columns:44px 1fr 44px}
#scan:has(#capture-start:not([hidden])) .capture-brand{justify-self:center;padding:9px 13px;background:#fffffff2;border-radius:18px;gap:7px}
#scan:has(#capture-start:not([hidden])) .capture-icon{background:#101a318c;color:white;border:1px solid #ffffff40}
#scan:has(#capture-start:not([hidden])) #resume-results{position:absolute;top:calc(156px + env(safe-area-inset-top));left:50%;transform:translateX(-50%);z-index:5;width:max-content;max-width:90%;font-size:.75rem;padding:8px 14px;min-height:36px}
#capture-start .live-camera-scene{position:absolute;inset:0;width:100%;height:100%;border-radius:0;z-index:-1}
#capture-start #live-camera{object-fit:cover}
#capture-start .live-camera-scene .frame-corner{display:none}
#capture-start #camera-placeholder{padding:175px 24px 240px;min-height:100%;justify-content:center}
#capture-start .capture-languages{position:absolute;top:calc(82px + env(safe-area-inset-top));left:max(16px,env(safe-area-inset-left));right:max(16px,env(safe-area-inset-right));width:auto;max-width:560px;margin:0 auto;gap:8px;z-index:3}
#capture-start .capture-languages>div{background:#ffffffed;border-color:#ffffff80;padding:8px 12px;border-radius:22px}
#capture-start .capture-languages label{font-size:.68rem;margin:0 0 2px}
#capture-start .capture-languages select{font-size:.85rem;min-height:26px}
#capture-start .camera-dock{position:absolute;bottom:0;left:0;right:0;z-index:3;padding:22px max(16px,env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));background:linear-gradient(transparent,#070d1be8 28%);max-height:calc(100dvh - 170px - env(safe-area-inset-top));overflow-y:auto;overscroll-behavior:contain;color:white}
#capture-start .camera-dock .capture-actions{margin:0 auto 12px;width:100%;max-width:500px;align-items:center}
#capture-start .camera-dock .capture-actions button,#capture-start .camera-dock #camera{color:white;font-size:.78rem}
#capture-start .camera-dock .capture-option>[data-icon]{background:#ffffff1c;border-color:#ffffff60;width:52px;height:52px;margin-top:10px}
#capture-start .camera-dock .shutter-disc{width:76px;height:76px;border-color:#ffffffaa;box-shadow:inset 0 0 0 4px white,0 3px 12px #0003}
#capture-start .camera-dock #camera-controls{margin:0 auto;max-width:500px;padding:0}
#capture-start .camera-dock details{margin:0 auto;max-width:500px;text-align:center;border:0;background:none;padding:0}
#capture-start .camera-dock details>summary{color:#e1e7fa;font-size:.72rem;padding:7px 8px;min-height:34px}
#capture-start .camera-dock details[open]{background:#f7f8ff;color:#182653;border-radius:18px;padding:8px 14px;margin:8px auto;text-align:start}
#capture-start .camera-dock details[open]>summary{color:#233d79;text-align:center}
#capture-start .camera-dock #native-camera{color:#e1e7fa;margin:0 auto;min-height:34px;padding:6px 10px;font-size:.72rem}
#capture-start .camera-dock .photo-privacy p{color:#334367;font-size:.8rem}
#capture-start .camera-dock #camera-help{color:#182653;max-width:500px;margin:8px auto}
@media(max-height:600px){#scan:has(#capture-start:not([hidden])) .capture-toolbar{padding-top:6px}.capture-brand img:first-child{width:28px;height:28px}#capture-start .capture-languages{top:66px;max-width:420px}#capture-start .camera-dock{padding-top:10px;max-height:calc(100dvh - 130px)}#capture-start .camera-dock .shutter-disc{width:60px;height:60px}#capture-start .camera-dock .capture-actions{margin-bottom:4px}#capture-start .camera-dock details>summary,#capture-start .camera-dock #native-camera{min-height:28px;padding:4px}}

/* Keep the viewfinder clear: one compact action row and secondary disclosures. */
#scan:has(#capture-start:not([hidden])) .capture-toolbar{padding-top:calc(8px + env(safe-area-inset-top));padding-bottom:6px}
#scan:has(#capture-start:not([hidden])) .capture-brand{padding:6px 11px}
#capture-start .capture-languages{top:calc(68px + env(safe-area-inset-top));max-width:460px;gap:8px}
#capture-start .capture-languages>div{padding:4px 10px;border-radius:18px}
#capture-start .capture-languages label{font-size:.62rem;line-height:1.2;margin-bottom:1px}
#capture-start .capture-languages select{font-size:.8rem;min-height:28px;line-height:1.2}
#capture-start .camera-dock{display:grid;grid-template-columns:1fr 1fr;align-items:end;gap:0 6px;padding-top:14px;padding-bottom:calc(4px + env(safe-area-inset-bottom));background:linear-gradient(transparent,#070d1bd9 40%)}
#capture-start .camera-dock .capture-actions{grid-column:1/-1;margin-bottom:4px}
#capture-start .camera-dock .capture-actions button{gap:5px}
#capture-start .camera-dock .shutter-disc{width:72px;height:72px}
#capture-start .camera-dock .capture-option>[data-icon]{width:48px;height:48px;margin-top:8px}
#capture-start .camera-dock>.camera-more,#capture-start .camera-dock>.photo-privacy{width:100%;margin:0;max-width:none}
#capture-start .camera-dock>.camera-more>summary,#capture-start .camera-dock>.photo-privacy>summary{min-height:40px;padding:10px 2px;font-size:.66rem}
#capture-start .camera-dock>.camera-more[open],#capture-start .camera-dock>.photo-privacy[open],#capture-start .camera-dock>#camera-help{grid-column:1/-1}
#capture-start .camera-dock .camera-more[open] #native-camera{color:#334367}
#scan:has(#capture-start:not([hidden])) #resume-results{top:calc(122px + env(safe-area-inset-top))}
@media(max-height:600px){#capture-start .capture-languages{top:calc(60px + env(safe-area-inset-top))}#capture-start .camera-dock{padding-top:6px}#capture-start .camera-dock .shutter-disc{width:58px;height:58px}}

.app-update{position:fixed;z-index:120;top:calc(8px + env(safe-area-inset-top));left:50%;transform:translateX(-50%);width:max-content;max-width:90vw;min-height:44px;padding:10px 18px;border:1px solid #8799ff;border-radius:22px;background:#283eca;color:white;box-shadow:0 4px 18px #101f4933;font-size:14px}
/* One quiet header, rather than separate floating white islands. */
#scan:has(#capture-start:not([hidden]))::before{content:'';position:absolute;inset:0 0 auto;height:calc(52px + env(safe-area-inset-top));background:linear-gradient(145deg,#f9fbfff5,#e9effff0);border-bottom:1px solid #ffffff80;z-index:2;pointer-events:none}
#scan:has(#capture-start:not([hidden])) .capture-toolbar{background:none;padding-top:calc(4px + env(safe-area-inset-top));padding-bottom:4px}
#scan:has(#capture-start:not([hidden])) .capture-brand{background:none;border-radius:0;padding:0;gap:6px}
#scan:has(#capture-start:not([hidden])) .capture-brand img:first-child{width:28px;height:28px}
#scan:has(#capture-start:not([hidden])) .capture-icon{background:transparent;border:0;color:#26366c}
#capture-start .capture-languages{top:calc(60px + env(safe-area-inset-top));gap:0;left:16px;right:16px;background:rgba(13,23,42,.64);border:1px solid #ffffff38;border-radius:16px;padding:2px 0;color-scheme:dark}
#capture-start .capture-languages>div{background:none;border:0;border-radius:0;padding:3px 10px}
#capture-start .capture-languages>div+div{border-inline-start:1px solid #ffffff30}
#capture-start .capture-languages label{font-size:.65rem;color:#d4def0;font-weight:500}
#capture-start .capture-languages select{font-size:.82rem;color:#fff;min-height:30px;background-color:transparent}
#capture-start .capture-languages select option{background:#172239;color:#fff}
#capture-start .capture-languages input{background:#172239;color:#fff;border-color:#728099}
#capture-start .capture-languages input::placeholder{color:#c5d0e3}
/* Dark compact disclosures keep labels readable against the viewfinder. */
#capture-start .camera-dock details[open]{background:#172239f5;color:#f3f6ff;border:1px solid #526078;border-radius:16px;padding:6px 12px;margin:4px auto}
#capture-start .camera-dock details[open]>summary{color:#fff;font-size:.76rem;min-height:40px}
#capture-start .camera-dock .camera-more[open] #native-camera,#capture-start .camera-dock .camera-more button.quiet{color:#edf2ff;background:#ffffff0d;border-radius:10px;min-height:40px;font-size:.78rem;margin:4px 0;padding:8px 12px}
#capture-start .camera-dock .camera-more label,#capture-start .camera-dock .camera-more output,#capture-start .camera-dock .camera-more #camera-control-status{color:#d9e3fa}
#capture-start .camera-dock .camera-more input,#capture-start .camera-dock .camera-more textarea{color:#fff;background:#0e1729;border-color:#586982;font-size:16px}
#capture-start .camera-dock .camera-more textarea{min-height:90px;height:90px;max-height:140px;margin-bottom:8px}
#capture-start .camera-dock .camera-more textarea::placeholder{color:#aebbd2}
#capture-start .camera-dock .camera-more .secondary,#capture-start .camera-dock .camera-tools button{background:#293956;color:white;border-color:#596d91;min-height:40px}
#capture-start .camera-dock .camera-tools button[aria-pressed=true]{background:#4253ce;border-color:#a9b5ff}
#capture-start .camera-dock .camera-more details[open]{background:#101a2c;border-color:#364861}
#capture-start .camera-dock .photo-privacy p,#capture-start .camera-dock .photo-privacy a{color:#d9e3fa}
#capture-start .camera-dock>.camera-more>summary,#capture-start .camera-dock>.photo-privacy>summary{font-size:.72rem;color:#f0f3ff}
.camera-dock .camera-more[open]{color:#f5f7ff}
#capture-start .camera-dock .camera-more[open] #native-camera{display:block;width:fit-content;max-width:100%;margin:6px auto;text-align:center}

/* Camera gestures and inline zoom need no settings menu. */
#live-camera{touch-action:none;user-select:none;-webkit-user-select:none}
#capture-start .camera-dock:not(:has(details[open])){overflow:visible}
#capture-start .camera-dock>#camera-controls{position:absolute;bottom:calc(100% + 2px);left:16px;right:16px;width:auto;max-width:340px;margin:0 auto;background:none;pointer-events:none}
#capture-start #camera-controls .camera-tools{position:absolute;inset:auto 0 6px auto}
#capture-start #camera-controls #camera-grid-toggle,#capture-start #camera-controls #camera-focus,#capture-start #camera-controls label:has(#camera-exposureCompensation){display:none}
#capture-start #camera-controls #camera-flip{pointer-events:auto;border-color:#ffffff40;background:#101a31a8;color:white;width:44px;height:44px;padding:8px;border-radius:50%}
#capture-start #camera-controls #camera-flip>span:last-child{display:none}
#capture-start #camera-controls label:has(#camera-zoom){pointer-events:auto;background:#101a31ad;border:1px solid #ffffff35;border-radius:24px;width:220px;max-width:calc(100% - 102px);margin:0 auto 6px;padding:0 12px;gap:8px;min-height:40px;color:white}
#capture-start #camera-controls label:has(#camera-zoom)>span{display:none}
#capture-start #camera-controls #camera-zoom{accent-color:#b2bfff;height:36px}
#capture-start #camera-controls #camera-zoom-value{color:#fff;font-size:.8rem;min-width:34px}
#capture-start #camera-control-status{color:#fff;background:#101a31b8;border-radius:12px;padding:6px 10px;width:fit-content;max-width:90%;margin:6px auto;font-size:.73rem}

#capture-start #camera-controls #camera-focus-native{display:block;pointer-events:auto;margin:6px auto;padding:10px 16px;min-height:44px;border-radius:22px;background:#edf2ff;color:#1d3063;font-size:.8rem;border:1px solid #b3c1eb}
#capture-start #camera-controls label:has(#camera-zoom){max-width:90%}

/* Keep an inline capture at viewfinder size, rather than a 260px thumbnail. */
#scan:not([hidden]) #capture-process.viewfinder-result:not([hidden]){position:fixed;inset:0;z-index:60;padding:0;margin:0;background:#101a31;overflow:auto;isolation:isolate}
#capture-process.viewfinder-result #preview-wrap{position:absolute;inset:0;margin:0;padding:0;border:0;border-radius:0;background:#101a31}
#capture-process.viewfinder-result #photo-preview{display:block;width:100%;height:100%;max-width:none;max-height:none;margin:0;border-radius:0;object-fit:contain}
#capture-process.viewfinder-result #photo-back{position:relative;z-index:2;margin:calc(12px + env(safe-area-inset-top)) 16px 0;padding:10px 16px;background:#172239e8;color:#fff;border-radius:22px;min-height:44px}
#capture-process.viewfinder-result #photo-status{position:absolute;z-index:2;bottom:calc(18px + env(safe-area-inset-bottom));left:16px;right:16px;max-height:40dvh;overflow:auto;border-radius:20px;padding:16px;background:#172239ee;color:#fff}
#capture-process.viewfinder-result #photo-status .loading-state{margin:0;padding:8px;background:none;border:0}
#capture-process.viewfinder-result #photo-status h2,#capture-process.viewfinder-result #photo-status .muted,#capture-process.viewfinder-result #ocr-status{color:#fff}
#capture-process.viewfinder-result #photo-status:has(#photo-progress[hidden]):not(:has(#photo-error:not([hidden]))):has(#ocr-status:empty){display:none}
#capture-process.viewfinder-result:has(#photo-retry:not([hidden])) #photo-status{bottom:calc(110px + env(safe-area-inset-bottom))}
#capture-process.viewfinder-result #photo-retry{position:absolute;z-index:3;bottom:calc(14px + env(safe-area-inset-bottom));left:16px;right:16px;padding:10px;border-radius:16px;background:#172239ee}
