/* Shared camera only: all selectors stay inside its own dialog namespace. */
.magic-capture{position:fixed;inset:0;z-index:1000;background:#080f19;color:#f5eddd;overflow:auto;overscroll-behavior:contain;font-family:var(--font-display,'Fraunces',Georgia,serif);font-weight:400;line-height:1.6;-webkit-font-smoothing:antialiased;padding:max(20px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left));box-sizing:border-box}
.magic-capture *{box-sizing:border-box}
.magic-capture-shell{max-width:970px;margin:0 auto}
.magic-capture-header{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:14px}
.magic-capture-eyebrow{font-size:9px;letter-spacing:2px;color:#ddbf89;margin:0 0 10px}
.magic-capture-title{font:350 clamp(27px,4vw,38px)/1.22 var(--font-display,'Fraunces',Georgia,serif);letter-spacing:-.6px;color:#f5eddd;margin:0}
.magic-capture button{font-family:inherit;touch-action:manipulation;-webkit-tap-highlight-color:transparent;cursor:pointer}
.magic-capture button:focus-visible{outline:2px solid #e9d6b1;outline-offset:4px}
.magic-capture-close{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;border:1px solid #ddbf8960;border-radius:50%;font:300 30px/1 Georgia,serif;background:transparent;color:#e9d6b1}
.magic-capture-instruction{max-width:640px;font-size:14px;line-height:1.7;color:#c8c0b2;margin:0 0 20px}
.magic-capture-frame{position:relative;isolation:isolate;width:100%;height:min(56svh,580px);min-height:210px;background:#020407;border:1px solid #ddbf8930;overflow:hidden}
.magic-capture-video,.magic-capture-guide{display:block!important;position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;margin:0!important;border:0!important;border-radius:0!important;object-fit:contain!important;object-position:center!important;background:transparent!important}
.magic-capture-guide{pointer-events:none;filter:drop-shadow(0 1px 2px #000a)}
.magic-capture-status{position:absolute;inset:0;display:grid;place-items:center;font-size:14px;color:#e9d6b1;margin:0;padding:25px;text-align:center;background:#080f1980}
.magic-capture-error{font-size:14px;color:#f5d6b0;line-height:1.7;margin:16px 0 8px}
.magic-capture-controls{display:flex;flex-direction:column;align-items:center;max-width:490px;margin:20px auto 0;text-align:center}
.magic-capture-shutter{width:100%;min-height:54px;padding:13px 22px;border:1px solid #f3dfb1;border-radius:999px;color:#1d1b19;background:linear-gradient(135deg,#f0ddb5,#cfaa69);font-size:15px;font-weight:500;line-height:1.5}
.magic-capture-shutter:disabled{opacity:.45;cursor:default}
.magic-capture-fallback{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 9px;margin-top:8px;border:0;background:transparent;color:#e9d6b1;text-decoration:underline;text-decoration-color:#ddbf8960;text-underline-offset:5px;font-size:13px;line-height:1.5}
.magic-capture-note{font-size:12px;line-height:1.7;color:#bcb6aa;margin:7px 0 0}
.magic-capture [hidden]{display:none!important}
@media(min-width:900px){.magic-capture{padding-top:27px}.magic-capture-frame{height:min(62svh,640px)}.magic-capture-instruction{margin-bottom:18px}.magic-capture-controls{margin-top:18px}}
@media(max-height:650px) and (orientation:landscape){.magic-capture-header{margin-bottom:8px}.magic-capture-eyebrow{margin-bottom:3px;font-size:8px}.magic-capture-title{font-size:25px}.magic-capture-instruction{font-size:12px;margin-bottom:12px}.magic-capture-frame{height:46svh;min-height:140px}.magic-capture-controls{margin-top:12px}.magic-capture-note{display:none}}

/* Match the native camera aspect after startup, keeping the full image in view. */
.magic-capture-frame.magic-capture-ready{width:min(100%,calc(56svh * var(--capture-aspect)));height:auto;min-height:0;aspect-ratio:var(--capture-aspect);margin-inline:auto}
@media(min-width:900px){.magic-capture-frame.magic-capture-ready{width:min(100%,calc(62svh * var(--capture-aspect)))}}
@media(max-height:650px) and (orientation:landscape){.magic-capture-frame.magic-capture-ready{width:min(100%,calc(46svh * var(--capture-aspect)))}}

/* Use the shared readable type scale inside the camera, including older
   product styles that otherwise shrink the instruction to quiet text. */
#magic-capture.magic-capture{font-family:var(--font-display,'Lancelot',Georgia,serif);font-size:var(--type-body,18px);font-weight:400;color:var(--gold,#f4e5c8)}
#magic-capture.magic-capture .magic-capture-title{font-size:var(--type-title,36px)!important;font-weight:400;color:var(--gold,#f4e5c8)}
#magic-capture.magic-capture .magic-capture-instruction{font-size:var(--type-body,18px)!important;line-height:1.6;color:var(--gold,#f4e5c8)}
#magic-capture.magic-capture :is(.magic-capture-eyebrow,.magic-capture-note,.magic-capture-status,.magic-capture-error,.magic-capture-fallback){font-size:var(--type-quiet,16px)!important;line-height:1.6;color:var(--gold,#f4e5c8)}
#magic-capture.magic-capture .magic-capture-shutter{font-size:var(--type-body,18px)!important}
@media(max-width:720px){#magic-capture.magic-capture .magic-capture-title{font-size:var(--type-title,28px)!important}}
