:root{--bg:#04070d;--panel:rgba(10,16,30,.82);--line:rgba(255,255,255,.14);--text:#f8fbff;--muted:rgba(248,251,255,.68);--accent:#63ffe1;--accent2:#5b8cff;--warn:#ffd866;--ok:#57ff9a}*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body{margin:0;width:100%;min-height:100%;background:#03050a;color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;overscroll-behavior:none}.ds-scanner{position:fixed;inset:0;background:#04070d;overflow:hidden;contain:layout paint style}.screen{position:absolute;inset:0;display:none}.screen.is-active{display:block}.hidden{display:none!important}.brandmark{position:absolute;top:calc(env(safe-area-inset-top,0px) + 18px);left:22px;font-weight:900;letter-spacing:-.04em;z-index:5}.intro{padding:24px;overflow:auto;-webkit-overflow-scrolling:touch}.intro.is-active{display:grid;place-items:center}.intro-grid{width:min(1080px,100%);display:grid;grid-template-columns:1fr 360px;gap:48px;align-items:center}.intro-copy{max-width:620px}.pill{display:inline-flex;align-items:center;border:1px solid rgba(99,255,225,.28);background:rgba(99,255,225,.08);color:var(--accent);border-radius:999px;padding:8px 13px;font-size:13px;font-weight:900}.intro h1{font-size:clamp(38px,6vw,78px);line-height:.94;margin:18px 0;letter-spacing:-.07em}.intro p{font-size:clamp(16px,2vw,20px);line-height:1.55;color:var(--muted);max-width:530px}.primary,.secondary,.ghost,.textbtn,.round,.bottom-tool,.shutter,.handle,.format-grid button{font:inherit;cursor:pointer}.primary{border:0;border-radius:18px;background:linear-gradient(135deg,#2c76ff,#63ffe1);color:#021018;font-weight:950}.primary.large{min-height:56px;padding:0 22px;font-size:16px}.secondary,.ghost{border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.07);color:#fff;font-weight:850;min-height:54px;padding:0 18px}.ghost{margin-left:10px;background:transparent}.phone-memory{width:310px;height:620px;border:1px solid rgba(255,255,255,.16);border-radius:42px;background:#08101d;position:relative;margin:auto;overflow:hidden}.phone-top{position:absolute;left:50%;top:14px;transform:translateX(-50%);width:92px;height:25px;border-radius:0 0 18px 18px;background:#03050a}.phone-paper{position:absolute;left:28px;right:28px;top:125px;height:360px;border:2px solid var(--accent);border-radius:24px}.phone-paper i{position:absolute;width:42px;height:42px;border-color:#fff}.phone-paper i:nth-child(1){left:-4px;top:-4px;border-left:5px solid;border-top:5px solid;border-radius:20px 0 0 0}.phone-paper i:nth-child(2){right:-4px;top:-4px;border-right:5px solid;border-top:5px solid;border-radius:0 20px 0 0}.phone-paper i:nth-child(3){right:-4px;bottom:-4px;border-right:5px solid;border-bottom:5px solid;border-radius:0 0 20px 0}.phone-paper i:nth-child(4){left:-4px;bottom:-4px;border-left:5px solid;border-bottom:5px solid;border-radius:0 0 0 20px}.phone-paper b{position:absolute;left:12%;right:12%;top:20%;height:2px;background:var(--accent);opacity:.7}.phone-shutter{position:absolute;left:50%;bottom:38px;transform:translateX(-50%);width:68px;height:68px;border-radius:50%;background:#fff;border:6px solid rgba(255,255,255,.42)}.camera-video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:#000}.camera-scrim{position:absolute;inset:0;background:rgba(0,0,0,.18);pointer-events:none}.scanner-topbar{position:absolute;left:0;right:0;top:0;z-index:10;padding:calc(env(safe-area-inset-top,0px) + 12px) 16px 16px;display:grid;grid-template-columns:52px 1fr 52px;align-items:center;background:rgba(0,0,0,.72)}.round{width:46px;height:46px;border:1px solid rgba(255,255,255,.14);border-radius:50%;background:rgba(9,14,24,.78);color:white;font-size:24px;font-weight:800}.scanner-state{text-align:center;line-height:1.12}.scanner-state strong{display:block;font-size:15px}.scanner-state span{display:block;margin-top:4px;font-size:12px;color:var(--muted)}.doc-guide{position:absolute;left:50%;top:47%;transform:translate(-50%,-50%);width:min(84vw,560px);height:min(62vh,720px);max-height:68vh;border:2px solid rgba(255,216,102,.88);border-radius:24px;z-index:4;box-shadow:0 0 0 9999px rgba(0,0,0,.10);will-change:auto}.doc-guide.locked{border-color:var(--ok)}.doc-guide span{position:absolute;width:34px;height:34px;border-color:white}.doc-guide span:nth-child(1){left:-4px;top:-4px;border-left:5px solid;border-top:5px solid;border-radius:18px 0 0 0}.doc-guide span:nth-child(2){right:-4px;top:-4px;border-right:5px solid;border-top:5px solid;border-radius:0 18px 0 0}.doc-guide span:nth-child(3){right:-4px;bottom:-4px;border-right:5px solid;border-bottom:5px solid;border-radius:0 0 18px 0}.doc-guide span:nth-child(4){left:-4px;bottom:-4px;border-left:5px solid;border-bottom:5px solid;border-radius:0 0 0 18px}.doc-guide em{display:none}.mini-pages{position:absolute;left:12px;right:12px;bottom:122px;z-index:12;display:flex;gap:8px;overflow-x:auto;padding-bottom:2px}.mini-pages img{width:46px;height:62px;border-radius:10px;object-fit:cover;border:1px solid rgba(255,255,255,.42);background:#111}.scanner-bottombar{position:absolute;left:0;right:0;bottom:0;z-index:11;padding:14px 18px calc(env(safe-area-inset-bottom,0px) + 18px);display:grid;grid-template-columns:1fr auto 1fr;gap:18px;align-items:center;background:rgba(0,0,0,.82)}.bottom-tool{border:0;background:transparent;color:white;display:grid;place-items:center;gap:6px;font-weight:900}.bottom-tool strong{min-width:48px;height:48px;border-radius:18px;background:rgba(255,255,255,.12);display:grid;place-items:center}.bottom-tool small{font-size:12px;color:var(--muted)}.shutter{width:78px;height:78px;border-radius:50%;border:6px solid rgba(255,255,255,.72);background:#fff}.shutter:active{transform:scale(.96)}.editor{background:#03050a;flex-direction:column}.editor.is-active{display:flex}.edit-topbar,.export-topbar{display:flex;align-items:center;justify-content:space-between;padding:calc(env(safe-area-inset-top,0px) + 12px) 14px 12px;border-bottom:1px solid var(--line);background:rgba(0,0,0,.85);z-index:5}.textbtn{border:0;background:rgba(255,255,255,.08);color:#fff;border-radius:999px;min-height:42px;padding:0 14px;font-weight:900}.edit-board{position:relative;flex:1;min-height:0;margin:14px;border-radius:24px;overflow:hidden;background:#000;display:grid;place-items:center;touch-action:none}.edit-board img{max-width:100%;max-height:100%;object-fit:contain;user-select:none;-webkit-user-drag:none}.crop-svg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.crop-svg polygon{fill:rgba(99,255,225,.10);stroke:var(--accent);stroke-width:.72}.handle{position:absolute;width:42px;height:42px;border-radius:50%;border:4px solid #fff;background:var(--accent);touch-action:none}.edit-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:12px 14px calc(env(safe-area-inset-bottom,0px) + 14px)}.export{background:#05070d;overflow:auto;-webkit-overflow-scrolling:touch}.export-wrap{padding:18px;max-width:1040px;margin:0 auto}.page-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:12px}.scan-page{border:1px solid var(--line);background:rgba(255,255,255,.065);border-radius:18px;padding:8px}.scan-page img{width:100%;height:128px;border-radius:12px;object-fit:cover}.scan-page small{display:block;color:var(--muted);margin-top:6px;text-align:center}.export-card{margin-top:18px;border:1px solid var(--line);border-radius:24px;background:rgba(255,255,255,.065);padding:18px}.export-card h2{margin:0 0 6px;font-size:25px;letter-spacing:-.04em}.export-card p{margin:0 0 15px;color:var(--muted)}.format-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.format-grid button{border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.06);color:#fff;padding:14px 8px}.format-grid button.is-active{border-color:var(--accent);background:rgba(99,255,225,.12)}.format-grid strong{display:block}.format-grid small{color:var(--muted)}.file-name{width:100%;height:52px;margin:14px 0;border:1px solid var(--line);border-radius:16px;background:rgba(0,0,0,.28);color:white;padding:0 14px;font:inherit}.export-note{min-height:20px;color:var(--muted)}@media(max-width:820px){html,body{height:100%;overflow:hidden}.ds-scanner{background:#04070d}.intro-grid{grid-template-columns:1fr;gap:18px}.phone-memory{width:210px;height:410px;order:-1}.phone-paper{top:82px;height:236px}.phone-shutter{width:54px;height:54px;bottom:22px}.ghost{margin:10px 0 0;width:100%}.primary.large{width:100%}.intro-copy{text-align:center}.intro p{margin-left:auto;margin-right:auto}.brandmark{font-size:15px}.intro h1{font-size:36px}.scanner-topbar,.scanner-bottombar{transform:none!important}.format-grid{grid-template-columns:1fr}.doc-guide{width:86vw;height:60vh}}@media(min-width:900px){.scanner-topbar{max-width:820px;left:50%;transform:translateX(-50%);border-radius:0 0 28px 28px}.scanner-bottombar{max-width:820px;left:50%;transform:translateX(-50%);border-radius:30px 30px 0 0}.edit-board{max-width:920px;width:100%;align-self:center}.doc-guide{width:min(52vw,560px)}}@media(max-width:820px),(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;filter:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;text-shadow:none!important}.primary{box-shadow:none!important}.phone-memory{box-shadow:none!important}}


/* Scanner page v15 mobile stability patch */
@media (max-width:900px){
  body.ds-scanner-body{background:#020617!important;overflow:hidden!important;}
  .ds-scanner,.screen,.camera,.edit,.export{ -webkit-backdrop-filter:none!important;backdrop-filter:none!important;filter:none!important;box-shadow:none!important;}
  .camera-video{transform:none!important;will-change:auto!important;}
  .corner,.guide,.scan-line{will-change:auto!important;}
}

/* Scanner v16 precision patch: image-true crop overlay and export safety */
#exportBtn:disabled{opacity:.55;cursor:wait;filter:grayscale(.2)}
.edit-board img{position:relative;z-index:1}
.crop-svg{z-index:2}
.handle{z-index:3;box-shadow:0 0 0 5px rgba(0,0,0,.28)}
#modeText{font-size:12px;letter-spacing:-.02em}
@media(max-width:820px){
  .doc-guide{top:48%;height:min(58vh,680px);width:84vw}
  .edit-board{margin:10px;border-radius:18px}
  .handle{width:44px;height:44px}
}


/* DocShift Scanner v17 - mobile render and crop precision hardening */
.ds-scanner-body{background:#04070d;touch-action:manipulation;-webkit-text-size-adjust:100%;}
.ds-scanner{isolation:isolate;transform:translateZ(0);}
.camera-video{backface-visibility:hidden;-webkit-backface-visibility:hidden;image-rendering:auto;}
.camera-scrim{background:linear-gradient(180deg,rgba(0,0,0,.16),rgba(0,0,0,.10) 44%,rgba(0,0,0,.22));}
.doc-guide{contain:layout paint;transform:translate3d(-50%,-50%,0);}
.doc-guide.locked{box-shadow:0 0 0 9999px rgba(0,0,0,.08),0 0 0 1px rgba(99,255,225,.25),0 0 26px rgba(99,255,225,.18)}
.edit-board{contain:layout paint;}
.edit-board img{display:block;transform:translateZ(0);backface-visibility:hidden;-webkit-backface-visibility:hidden;}
.crop-svg{overflow:visible;}
.handle{touch-action:none;-webkit-tap-highlight-color:transparent;}
.export-note{line-height:1.45;}
@media(max-width:820px){
  .scanner-topbar{background:rgba(4,7,13,.86)!important;}
  .scanner-bottombar{background:rgba(4,7,13,.90)!important;}
  .doc-guide{width:84vw;height:min(57vh,660px);top:48%;border-radius:22px;}
  .intro h1,.export-card h2{text-rendering:geometricPrecision;}
  .page-list{grid-template-columns:repeat(auto-fill,minmax(86px,1fr));}
  .scan-page img{height:118px;}
}
@supports (-webkit-touch-callout:none){
  .ds-scanner,.screen,.scanner-topbar,.scanner-bottombar,.export-card{backdrop-filter:none!important;-webkit-backdrop-filter:none!important;}
  .phone-memory{filter:none!important;}
}

/* DocShift Scanner v18 - iPhone Notes reference behavior tuning */
.doc-guide::after{
  content:"";
  position:absolute;
  left:14px;right:14px;bottom:-15px;height:4px;border-radius:99px;
  background:linear-gradient(90deg,rgba(99,255,225,.95) var(--scan-progress,0%),rgba(255,255,255,.18) 0);
  opacity:.72;
}
.doc-guide.almost{border-color:rgba(255,216,102,.96)}
.doc-guide.locked{border-color:rgba(99,255,225,.98)!important;background:rgba(99,255,225,.035)}
.doc-guide.capturing{border-color:#fff!important;background:rgba(255,255,255,.10)}
.doc-guide.capturing span{border-color:#fff!important}
.camera .scanner-topbar,.camera .scanner-bottombar{box-shadow:none!important;}
.camera-scrim{background:linear-gradient(180deg,rgba(0,0,0,.20),rgba(0,0,0,.05) 45%,rgba(0,0,0,.24))!important;}
.handle{transform:translateZ(0);contain:layout paint;}
.crop-svg polygon{stroke-width:.62;vector-effect:non-scaling-stroke;}
@media(max-width:820px){
  .scanner-state strong{font-size:14px;letter-spacing:-.01em}
  .scanner-state span{font-size:11.5px}
  .doc-guide{height:min(56vh,640px);width:83vw;}
  .doc-guide::after{bottom:-13px;height:3px;}
  .shutter{width:74px;height:74px;}
  .bottom-tool strong{min-width:44px;height:44px;border-radius:16px;}
}
@supports (-webkit-touch-callout:none){
  .doc-guide,.handle,.crop-svg{will-change:transform;}
  .camera-video{transform:translateZ(0);}
}

/* DocShift Scanner v19 - iPhone Notes reference: yellow mask, smoother tracking, lighter capture UI */
.doc-guide{
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  left:0!important;top:0!important;right:0!important;bottom:0!important;width:100%!important;height:100%!important;max-height:none!important;transform:none!important;pointer-events:none;
  --qpoly:28% 24%, 72% 24%, 76% 74%, 24% 74%;
}
.doc-guide::before{
  content:"";position:absolute;inset:0;
  clip-path:polygon(var(--qpoly));
  background:rgba(255,213,47,.19);
  border:2.5px solid rgba(255,220,75,.98);
  filter:drop-shadow(0 0 14px rgba(255,205,45,.22));
  transition:clip-path .18s linear, background-color .18s ease, border-color .18s ease, opacity .15s ease;
  opacity:.88;
}
.doc-guide.searching::before{opacity:.22;background:rgba(255,213,47,.06);border-color:rgba(255,220,75,.42)}
.doc-guide.almost::before{opacity:.95;background:rgba(255,213,47,.22);border-color:rgba(255,226,90,.98)}
.doc-guide.locked::before{background:rgba(99,255,225,.15);border-color:rgba(99,255,225,.98);filter:drop-shadow(0 0 18px rgba(99,255,225,.25))}
.doc-guide.capturing::before{background:rgba(255,255,255,.20);border-color:#fff;filter:drop-shadow(0 0 24px rgba(255,255,255,.36))}
.doc-guide::after{
  left:50%!important;right:auto!important;bottom:calc(env(safe-area-inset-bottom,0px) + 116px)!important;transform:translateX(-50%);
  width:min(190px,46vw);height:3px!important;background:linear-gradient(90deg,rgba(255,220,75,.98) var(--scan-progress,0%),rgba(255,255,255,.24) 0)!important;
  opacity:.82!important;z-index:6;
}
.doc-guide span{display:none!important}.doc-guide em{display:none!important}
.camera-scrim{background:linear-gradient(180deg,rgba(0,0,0,.26),rgba(0,0,0,.02) 43%,rgba(0,0,0,.28))!important}
.camera .scanner-topbar{background:rgba(0,0,0,.62)!important}.camera .scanner-bottombar{background:rgba(0,0,0,.76)!important}
.scanner-state strong{font-weight:800}.scanner-state span{font-weight:500;color:rgba(255,255,255,.72)}
.mini-pages{left:16px;right:auto;bottom:calc(env(safe-area-inset-bottom,0px) + 108px);max-width:58vw}
.mini-pages img{width:42px;height:58px;border-radius:8px;border-color:rgba(255,220,75,.92);box-shadow:0 4px 16px rgba(0,0,0,.28)}
@media(max-width:820px){
  .camera .scanner-topbar{padding-top:calc(env(safe-area-inset-top,0px) + 10px);padding-bottom:12px}
  .camera .scanner-bottombar{padding-top:12px}
  .doc-guide::after{bottom:calc(env(safe-area-inset-bottom,0px) + 106px)!important}
}


/* DocShift scanner v7.2 minimal safe fix */
.camera-video{width:100vw!important;height:100vh!important;height:100dvh!important;object-fit:cover!important;position:absolute!important;top:0!important;left:0!important;z-index:1!important;}
.camera-scrim,.scanner-topbar,.doc-guide,.mini-pages,.scanner-bottombar{position:absolute;z-index:2;}
.doc-guide{z-index:4!important;}
.doc-guide::before{will-change:clip-path,background-color;transform:translateZ(0);}
.handle{width:24px!important;height:24px!important;margin:-12px 0 0 -12px!important;border-width:3px!important;box-shadow:0 0 0 3px rgba(0,0,0,.22)!important;}
.handle::after{content:"";position:absolute;inset:-20px;background:transparent;}
@media(max-width:820px){.phone-memory{display:block!important;visibility:visible!important;opacity:1!important}.intro-grid{align-items:center}.handle{width:24px!important;height:24px!important}}


/* DocShift scanner v7.3 crop/export refinement */
.edit-board{
  touch-action:none!important;
  user-select:none!important;
  -webkit-user-select:none!important;
  overscroll-behavior:contain!important;
}
.handle{
  width:18px!important;
  height:18px!important;
  margin:0!important;
  transform:translate(-50%,-50%) translateZ(0)!important;
  border-width:2px!important;
  background:#20d6ff!important;
  box-shadow:0 0 0 2px rgba(5,12,30,.45),0 0 12px rgba(32,214,255,.38)!important;
  opacity:.92!important;
}
.handle::after{
  content:"";
  position:absolute;
  inset:-24px!important;
  background:transparent!important;
}
.crop-svg polygon{
  stroke:rgba(32,214,255,.92)!important;
  stroke-width:.48!important;
  fill:rgba(0,180,255,.055)!important;
  vector-effect:non-scaling-stroke!important;
}
.export-note .download-fallback,
.download-fallback{
  color:#61e8ff;
  font-weight:800;
  text-decoration:underline;
}
@media(max-width:820px){
  .handle{width:18px!important;height:18px!important;border-width:2px!important;}
  .edit-actions{padding-bottom:calc(env(safe-area-inset-bottom,0px) + 14px)!important;}
  .edit-board{min-height:58vh!important;}
}

/* DocShift Dynamic Scanner Core v8.2 - true document-bound overlay + document output mode */
.doc-guide{
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  pointer-events:none!important;
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  transform:none!important;
  z-index:4!important;
}
.doc-guide::before{
  content:none!important;
  display:none!important;
  opacity:0!important;
}
.doc-quad-svg{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  overflow:visible;
  pointer-events:none;
}
#guidePoly{
  fill:rgba(255,216,80,.16);
  stroke:rgba(255,224,90,.96);
  stroke-width:.55;
  vector-effect:non-scaling-stroke;
  filter:drop-shadow(0 0 10px rgba(255,205,45,.22));
  transition:points .16s linear, fill .16s ease, stroke .16s ease, opacity .14s ease;
  opacity:.96;
}
.doc-guide.searching #guidePoly{opacity:0;}
.doc-guide.almost #guidePoly{fill:rgba(255,216,80,.21);stroke:rgba(255,226,90,.98);}
.doc-guide.locked #guidePoly{fill:rgba(99,255,225,.13);stroke:rgba(99,255,225,.98);filter:drop-shadow(0 0 14px rgba(99,255,225,.25));}
.doc-guide.capturing #guidePoly{fill:rgba(255,255,255,.18);stroke:#fff;filter:drop-shadow(0 0 18px rgba(255,255,255,.30));}
.doc-guide::after{
  content:"";
  position:absolute;
  left:50%!important;
  right:auto!important;
  bottom:calc(env(safe-area-inset-bottom,0px) + 116px)!important;
  transform:translateX(-50%);
  width:min(190px,46vw);
  height:3px!important;
  border-radius:99px;
  background:linear-gradient(90deg,rgba(255,220,75,.98) var(--scan-progress,0%),rgba(255,255,255,.24) 0)!important;
  opacity:.82!important;
  z-index:6;
}
@media(max-width:820px){
  .doc-guide::after{bottom:calc(env(safe-area-inset-bottom,0px) + 106px)!important;}
  #guidePoly{stroke-width:.75;}
}


/* DocShift Scanner Foundation V8 */
.export-card .format-grid small{line-height:1.25}
.export-note{min-height:22px}
.download-fallback{font-weight:700;text-decoration:underline}


/* DocShift Scanner Pro V9 - iOS-like automatic/manual capture UX */
.scanner-toast{
  position:absolute;left:50%;bottom:calc(env(safe-area-inset-bottom,0px) + 178px);transform:translateX(-50%) translateY(10px);
  z-index:8;max-width:min(86vw,360px);padding:10px 14px;border-radius:999px;
  background:rgba(5,10,22,.82);color:#fff;font-weight:800;font-size:13px;letter-spacing:-.01em;
  border:1px solid rgba(255,255,255,.14);box-shadow:0 12px 34px rgba(0,0,0,.28);
  opacity:0;pointer-events:none;transition:opacity .18s ease,transform .18s ease;
}
.scanner-toast.is-visible{opacity:1;transform:translateX(-50%) translateY(0)}
.doc-guide.locked #guidePoly{fill:rgba(255,216,80,.22)!important;stroke:rgba(255,224,90,.98)!important;filter:drop-shadow(0 0 18px rgba(255,205,45,.30))!important;}
.doc-guide.capturing #guidePoly{fill:rgba(255,255,255,.22)!important;stroke:#fff!important;filter:drop-shadow(0 0 24px rgba(255,255,255,.42))!important;}
.shutter::after{content:"";position:absolute;inset:11px;border-radius:50%;background:rgba(255,255,255,.96);box-shadow:inset 0 0 0 2px rgba(0,0,0,.05)}
.shutter.is-auto-ready{box-shadow:0 0 0 5px rgba(255,220,75,.22),0 0 28px rgba(255,220,75,.34)!important;}
.bottom-tool.is-active strong{background:rgba(255,220,75,.18)!important;border-color:rgba(255,220,75,.62)!important;color:#ffe06a!important;}
.camera[data-mode="NORMAL"] .doc-guide::after{opacity:.28!important;background:rgba(255,255,255,.22)!important;}
.camera[data-mode="NORMAL"] #guidePoly{opacity:.25!important;stroke:rgba(255,255,255,.58)!important;fill:rgba(255,255,255,.06)!important;}
.export-card .scanner-v9-note{margin-top:10px;color:rgba(255,255,255,.62);font-size:12px;line-height:1.35}
@media(max-width:820px){.scanner-toast{bottom:calc(env(safe-area-inset-bottom,0px) + 154px);font-size:12.5px}.mini-pages{bottom:calc(env(safe-area-inset-bottom,0px) + 112px)}}


/* DocShift Scanner Pro V9 Corrected - portrait mobile UI + conservative auto capture */
.camera.is-active{display:block!important;position:absolute!important;inset:0!important;overflow:hidden!important;background:#000!important;}
.camera-video{position:absolute!important;inset:0!important;width:100vw!important;height:100dvh!important;object-fit:cover!important;transform:none!important;rotate:0deg!important;z-index:1!important;}
.camera-scrim{z-index:2!important;pointer-events:none!important;background:linear-gradient(180deg,rgba(0,0,0,.44),rgba(0,0,0,.02) 42%,rgba(0,0,0,.50))!important;}
.camera .scanner-topbar{position:absolute!important;left:0!important;right:0!important;top:0!important;z-index:10!important;display:grid!important;grid-template-columns:46px 1fr 46px!important;align-items:center!important;gap:10px!important;min-height:auto!important;padding:calc(env(safe-area-inset-top,0px) + 8px) 12px 10px!important;background:rgba(0,0,0,.52)!important;border-radius:0!important;transform:none!important;}
.camera .scanner-bottombar{position:absolute!important;left:0!important;right:0!important;bottom:0!important;z-index:11!important;display:grid!important;grid-template-columns:1fr auto 1fr!important;align-items:center!important;gap:14px!important;padding:12px 18px calc(env(safe-area-inset-bottom,0px) + 16px)!important;background:rgba(0,0,0,.64)!important;border-radius:0!important;transform:none!important;}
.scanner-state{text-align:center!important;writing-mode:horizontal-tb!important;transform:none!important;}
.scanner-state strong,.scanner-state span{display:block!important;white-space:normal!important;writing-mode:horizontal-tb!important;transform:none!important;}
.round{width:42px!important;height:42px!important;border-radius:50%!important;background:rgba(8,12,22,.72)!important;color:#fff!important;border:1px solid rgba(255,255,255,.20)!important;display:grid!important;place-items:center!important;}
.bottom-tool{min-width:62px!important;border:0!important;background:transparent!important;color:#fff!important;display:grid!important;place-items:center!important;gap:5px!important;writing-mode:horizontal-tb!important;transform:none!important;}
.bottom-tool strong{min-width:42px!important;width:42px!important;height:42px!important;border-radius:15px!important;background:rgba(12,18,30,.72)!important;border:1px solid rgba(255,255,255,.16)!important;display:grid!important;place-items:center!important;font-size:14px!important;}
.bottom-tool small{font-size:11px!important;color:rgba(255,255,255,.72)!important;}
.shutter{width:72px!important;height:72px!important;min-width:72px!important;border-radius:50%!important;border:5px solid rgba(255,255,255,.76)!important;background:rgba(255,255,255,.18)!important;box-shadow:none!important;position:relative!important;}
.shutter::after{content:""!important;position:absolute!important;inset:10px!important;border-radius:50%!important;background:#fff!important;}
.shutter.is-auto-ready{box-shadow:0 0 0 5px rgba(255,220,75,.20),0 0 22px rgba(255,220,75,.28)!important;}
.doc-guide{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;z-index:4!important;pointer-events:none!important;transform:none!important;}
#guidePoly{fill:rgba(255,216,80,.14)!important;stroke:rgba(255,226,72,.98)!important;stroke-width:.75!important;vector-effect:non-scaling-stroke!important;filter:drop-shadow(0 0 10px rgba(255,210,60,.24))!important;}
.doc-guide.searching #guidePoly{opacity:0!important;}
.doc-guide.almost #guidePoly{fill:rgba(255,216,80,.18)!important;stroke:rgba(255,226,90,.98)!important;}
.doc-guide.locked #guidePoly{fill:rgba(255,216,80,.22)!important;stroke:rgba(255,226,90,.98)!important;}
.doc-guide.capturing #guidePoly{fill:rgba(255,255,255,.18)!important;stroke:#fff!important;}
.doc-guide::after{bottom:calc(env(safe-area-inset-bottom,0px) + 104px)!important;width:min(200px,54vw)!important;height:3px!important;}
.mini-pages{left:12px!important;right:auto!important;bottom:calc(env(safe-area-inset-bottom,0px) + 104px)!important;z-index:12!important;max-width:52vw!important;}
.mini-pages img{width:38px!important;height:52px!important;border-radius:8px!important;object-fit:cover!important;border:1px solid rgba(255,226,90,.88)!important;}
.scanner-toast{bottom:calc(env(safe-area-inset-bottom,0px) + 150px)!important;z-index:13!important;}
@media(max-width:820px){
  .camera .scanner-topbar{padding-top:calc(env(safe-area-inset-top,0px) + 7px)!important;}
  .scanner-state strong{font-size:13.5px!important;line-height:1.12!important;}
  .scanner-state span{font-size:11px!important;line-height:1.2!important;margin-top:3px!important;}
  .shutter{width:70px!important;height:70px!important;min-width:70px!important;}
}
