/* Original reference pixels, scaled uniformly; native browser chrome is excluded. */
#auth,#reader{min-height:0;margin:0;container-type:inline-size;background-size:100% 100%;background-repeat:no-repeat}
#auth{width:100%;height:200.865cqw;background-image:url('assets/iphone/auth.png')}
#reader{width:100%;height:200.865cqw;background-image:url('assets/iphone/reader.png');background-color:#37359e}
#auth .auth-stack,#reader .reader-top,#reader .guidance,#reader .reader-controls{position:static;margin:0;padding:0;width:auto;height:auto}
#auth .auth-stack>*,#reader .reader-top>*,#reader .guidance>*,#reader .reader-controls>*{visibility:hidden}
#auth #scan,#auth #enter,#reader .menu-button,#reader #cancel{visibility:visible;position:absolute;margin:0;padding:0;border:0;background:transparent;box-shadow:none;color:transparent;font-size:0;z-index:4;transform:none}
#auth #scan>*,#auth #enter>*,#reader .menu-button>*{visibility:hidden}
#auth #scan{left:5%;top:54.76%;width:90%;height:7.1%}#auth #enter{left:5%;top:63.7%;width:90%;height:7.1%}
#reader .menu-button{left:4.28%;top:2.28%;width:11.2%;height:5.66%}
#reader #cancel{left:4.7%;top:90.2%;width:90.6%;height:7.1%}
#reader .camera{position:absolute;left:2.486%;top:18.207%;width:95.304%;height:36.828%;aspect-ratio:auto;margin:0;border:0;border-radius:3cqw;background:#111}
#reader .camera-viewport{border-radius:3cqw}
#reader .frame{inset:0;transform:none;width:100%;height:100%;max-height:none;border:0;box-shadow:none;background:url('assets/iphone/camera-overlay.png') center/100% 100%;border-radius:0;z-index:2}
#reader .frame i{display:none}#reader #scan-hint{color:transparent;font-size:0;height:15.7%;padding:0;background:#0005;top:50%;z-index:1}
#reader #torch{right:-.3%;bottom:-3%;width:16.8%;height:21.7%;background: url('assets/iphone/torch.png') center/100% 100%;border-radius:50%;opacity:1;box-shadow:none;z-index:5}#reader #torch svg{visibility:hidden}#reader #torch[aria-pressed=true]{outline:3px solid #f8d64c}
#reader .scan-progress{position:absolute;left:4.7%;top:58.55%;width:90.6%;height:2.3%;margin:0;background:transparent;z-index:3}
#reader #camera-status{position:absolute;left:4%;top:76%;width:92%;margin:0;min-height:0;font-size:4.5cqw;line-height:1.4;color:transparent;visibility:visible}
#reader #camera-status.notice{color:white;background:#39359e;padding:1cqw;z-index:5}
#reader #retry-camera{visibility:visible;position:absolute;left:5%;top:90%;width:90%;height:7%;font-size:4cqw;z-index:6}
#reader #manual-option{visibility:visible;position:absolute;top:65%;left:5%;width:90%;background:#29286a;padding:10px;z-index:8}
#reader .menu-panel{top:8%;left:4%;z-index:9;font-size:14px}
#instructions{width:100%;height:200.865vw;max-width:none;max-height:none;padding:0;border:0;border-radius:0;box-shadow:none;background:url('assets/iphone/instructions.png') center/100% 100%;overflow:hidden}
#instructions::backdrop{background:#000}#instructions .instruction{visibility:hidden;position:absolute}
#instructions #dismiss-instructions{position:absolute;left:12.4%;top:69.7%;width:75.5%;height:7.1%;margin:0;padding:0;background:transparent;color:transparent;border:0;box-shadow:none}

/* Width follows the viewport, independently of available browser height. */
html,body{width:100%;min-height:100%;margin:0}
#app{width:100%;max-width:none;container-type:inline-size;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}
#auth,#reader{background-color:#33359e}
#instructions{position:absolute;top:env(safe-area-inset-top,0px);left:0;transform:none;margin:0;max-height:none;overflow:visible}
#instructions::backdrop{background:#20204c}
#instructions #dismiss-instructions{left:12%;top:70.5%;width:76%;height:5.5%;color:white;font-size:3.5vw;background:linear-gradient(100deg,#357bf1,#a12bef);border-radius:50px}
#instructions #dismiss-instructions:focus:not(:focus-visible){outline:0}
#instruction-loading{position:absolute;left:12%;top:70.5%;width:76%;font-size:3.3vw;text-align:center;color:#444}
#instruction-loading progress{display:block;width:100%;height:2.3vw;margin-top:2vw;accent-color:#7655ef}
#reader.consulting{background-image:url('assets/iphone/consulting.png')}
#reader.consulting .camera-viewport:after{content:'';position:absolute;inset:0;background:#0006;z-index:3}
#reader.consulting .camera:after{content:'';position:absolute;width:7%;height:9%;left:46%;top:81%;border:4px solid #fff5;border-top-color:white;border-radius:50%;animation:spin .8s linear infinite;z-index:4}
@keyframes spin{to{transform:rotate(360deg)}}
#home{padding:0;min-height:0;height:189.63cqw;background:url('assets/iphone/home.png') top center/100% auto no-repeat}
#home .presentation-card{position:static;margin:0;padding:0;border:0;background:none;border-radius:0}
#home .presentation-card>*{visibility:hidden}
#home #open{visibility:visible;position:absolute;left:70.8%;top:68%;width:22%;height:5.8%;padding:0;margin:0;color:transparent;background:transparent;border:0;box-shadow:none;font-size:0}
#auth,#reader{min-height:calc(100svh - env(safe-area-inset-top) - env(safe-area-inset-bottom))}
#instructions #dismiss-instructions{background:url('assets/iphone/authenticate-button.png') center/100% 100%;color:transparent}
#reader.consulting #camera-status{color:transparent;background:transparent}
#reader.consulting .scan-progress>div{visibility:hidden}

/* Clear references supplied on 10/11; retain the existing functional controls. */
#auth,#reader{height:193.22cqw}
#instructions{height:193.22vw}
#auth #scan{left:6.1%;top:55.44%;width:87.8%;height:7.98%}
#auth #enter{left:6.1%;top:65.44%;width:87.8%;height:8.07%}
#reader .camera{left:2.54%;top:18.86%;width:94.92%;height:37.37%}
#reader .menu-button{left:5.08%;top:2.63%;width:12.2%;height:6.32%}
#reader #cancel{left:5.08%;top:88.95%;width:89.84%;height:7.98%}
#reader .scan-progress{left:5.08%;top:60.09%;width:89.84%;height:2.63%}
#reader #camera-status{top:74%}
#instructions #dismiss-instructions{left:14.3%;top:78.95%;width:71.4%;height:7.98%}
#instruction-loading{left:14.3%;top:78.95%;width:71.4%}

/* Preserve source proportions at every viewport height; surplus uses the screen color. */
#auth,#reader{min-height:0;background-size:100% auto}
body:has(#home:not([hidden])){background:#000}
body:has(#auth:not([hidden])),body:has(#reader:not([hidden])){background:#33359e}
body:has(#result:not([hidden])){background:#f0f4f7}
/* Native autnow.app result layout, using its preserved original graphic files. */
#result{width:100%;height:auto;min-height:100svh;padding-bottom:3cqw;background:#f0f4f7}
#result .result-top{height:auto;padding:6.75cqw 4.7cqw 0;position:relative;background:white}
#result .result-top>img{width:14.2cqw;height:12.2cqw;margin:0 auto;object-fit:contain}
#result .result-home{top:6.75cqw;left:4.7cqw;width:11cqw;height:11cqw;padding:0;align-items:center;gap:1.25cqw;border-radius:2.5cqw}
#result .result-home span{width:6cqw;height:.8cqw;border-radius:1cqw}
#result .result-language{top:10cqw;right:4.7cqw;font-size:3.4cqw;padding:1.6cqw 1.8cqw;border:.5cqw solid #39414d}
#result .product-name{font-size:3.9cqw;line-height:1.3;margin:0;padding:3cqw 0 6.2cqw}
#result .result-banner{min-height:15.5cqw;padding:1.7cqw 4.7cqw 1.7cqw 3.4cqw;gap:1.7cqw}
#result .verification-badge{width:11.8cqw;height:11.8cqw}
#result #result-title{font-size:5.1cqw;line-height:1.2}
#result .result-code{font-size:4.45cqw;line-height:1.2;margin-top:.9cqw}
#result .result-chevron{font-size:9cqw;line-height:1;margin-right:0}
#result .product-image{padding-top:0;margin:1.8cqw auto 0;width:94%;height:auto;aspect-ratio:701/809;object-fit:contain;mix-blend-mode:normal}
#result .product-disclaimer{margin:4cqw 4.7cqw 0;font-size:2.9cqw;line-height:1.28}
#result .product-dose{margin:2cqw 5.4cqw 0;font-size:2.9cqw;line-height:1.28}
#result .product-actions{margin-top:7cqw;padding:0 25.3%}
#result .product-actions button{width:15.7cqw;height:15.4cqw}
#result[data-valid=true] #again,#result[data-valid=true] .result-back,#result[data-valid=true] #result-message{display:none}

/* Clean camera guide: draw only its strokes, without captured camera pixels. */
#reader .frame{inset:auto;left:14%;top:3%;width:72%;height:94%;background:none;box-shadow:none;border:0;border-radius:0}
#reader .frame i{display:block;width:18%;height:18%;border:2px solid #80a65c;opacity:1}
#reader .frame i:nth-child(1){top:0;left:0;border-right:0;border-bottom:0;border-radius:6cqw 0 0 0}
#reader .frame i:nth-child(2){top:0;right:0;border-left:0;border-bottom:0;border-radius:0 6cqw 0 0}
#reader .frame i:nth-child(3){bottom:0;left:0;border-right:0;border-top:0;border-radius:0 0 0 6cqw}
#reader .frame i:nth-child(4){bottom:0;right:0;border-left:0;border-top:0;border-radius:0 0 6cqw 0}
#instructions #camera-consent-label{position:absolute;left:14.3%;top:65%;width:71.4%;min-height:9%;display:flex;align-items:center;gap:2vw;padding:2vw;color:#555;background:#f8f9fa;border:1px solid #e5e5e5;border-radius:3vw;font-size:3.4vw;line-height:1.4;cursor:pointer}
#camera-consent{appearance:auto;flex:none;width:4.8vw;height:4.8vw;margin:0;accent-color:#7655ef;cursor:pointer}
#instructions #dismiss-instructions:disabled{background:#ced0d8;color:#fff;cursor:default;opacity:1}
/* Safari may draw a focus ring around the heading focused after verification. */
#result #result-title[tabindex="-1"]:focus{outline:none}

/* Match the original consent card (590 px source), including text and spacing. */
#instructions:focus{outline:none}
#instructions #camera-consent-label{left:14.237%;top:64.825%;width:71.526%;height:10.877%;min-height:0;align-items:flex-start;gap:3.05vw;padding:3.05vw 3.22vw;background:#f8f9fa;border:1px solid #e5e5e5;border-radius:3.4vw;font-size:3.73vw;line-height:1.3;color:#555}
#instructions #camera-consent-label span{flex:1;min-width:0}
#instructions #camera-consent-label a{color:#2563b9;font-weight:700;text-decoration:underline;text-underline-offset:.15em}
#instructions #camera-consent{appearance:none;-webkit-appearance:none;width:5.08vw;height:5.08vw;flex:0 0 5.08vw;margin:.5vw 0 0;border:.38vw solid #939393;border-radius:1.6vw;background:#fff;position:relative;outline:none}
#instructions #camera-consent:checked{background:#7655ef;border-color:#7655ef}
#instructions #camera-consent:checked:after{content:'';position:absolute;left:1.25vw;top:.5vw;width:1.35vw;height:2.5vw;border:solid white;border-width:0 .5vw .5vw 0;transform:rotate(45deg)}
#instructions #camera-consent:focus-visible{outline:2px solid #2563b9;outline-offset:2px}
#instructions #dismiss-instructions{left:14.237%;top:78.947%;width:71.526%;height:7.982%;font-size:5.08vw;border-radius:9vw;background:linear-gradient(100deg,#357bf1,#a12bef);color:#fff}
#instructions #dismiss-instructions:disabled{background:#ced0d8;color:#fff}

/* Definitive client references: 740 × 1458 web pixels, uniformly scaled by width. */
#auth,#reader{height:197.027027cqw;min-height:0;background-size:100% auto}
#auth{background-image:url('assets/client-three/auth.png')}
#reader,#reader.consulting{background-image:url('assets/client-three/reader.png')}
#auth #scan{left:5.676%;top:54.938%;width:88.649%;height:7.133%}
#auth #enter{left:5.676%;top:63.992%;width:88.649%;height:7.133%}
#instructions{height:197.027027vw;background-image:url('assets/client-three/instructions.png');background-size:100% auto}
#instructions #camera-consent-label{left:13.108%;top:63.443%;width:73.784%;height:9.671%;min-height:0;padding:0;border:0;border-radius:0;background:transparent;display:block;z-index:4}
#instructions #camera-consent-label .sr-only{visibility:hidden}
#instructions #camera-consent{position:absolute;left:4.029%;top:17.73%;width:4.865vw;height:4.865vw;margin:0;border:.27vw solid #939393;border-radius:1.4vw;background:#fff;outline:none}
#instructions #camera-consent:checked{border:0;background:url('assets/client-three/consent-checked.png') center/100% 100%}
#instructions #camera-consent:checked:after{display:none}
#instructions #camera-consent:focus-visible{outline:2px solid #2563b9;outline-offset:2px}
#instructions .privacy-hit{position:absolute;z-index:5;font-size:0;color:transparent;background:transparent;height:1.8%;text-decoration:none}
#instructions #privacy-first{left:48.2%;top:65.15%;width:17%}
#instructions #privacy-second{left:23.6%;top:67.35%;width:18.8%}
#instructions #dismiss-instructions{left:13.108%;top:76.063%;width:73.784%;height:7.133%;border-radius:20vw;background:transparent;color:transparent;font-size:0;padding:0;box-shadow:none}
#instructions #dismiss-instructions:disabled{background:#ced0d8;color:white;font-size:4.73vw}
#instruction-loading{left:13.108%;top:76.063%;width:73.784%;background:#ced0d8;border-radius:20vw;padding:1vw;font-size:3.3vw}
#reader .menu-button{left:4.73%;top:2.33%;width:11.22%;height:5.69%}
#reader .camera{left:2.568%;top:18.038%;width:94.865%;height:36.557%}
#reader .frame{left:14.8%;top:3.2%;width:70.9%;height:93.7%}
#reader .frame i{border-color:#80a65c}
#reader #scan-hint{display:none}
#reader #torch{right:0;bottom:-3%;width:15.81%;height:20.83%;background-image:url('assets/client-three/torch.png')}
#reader #cancel{left:5%;top:90.123%;width:90%;height:7.133%}
#reader .scan-progress{left:5%;top:58.162%;width:90%;height:2.4%}
#reader #camera-status{top:76%}
body:has(#auth:not([hidden])){background:#223d88}

/* Use original guide and button pixels rather than CSS drawings. */
#reader .frame{inset:0;width:100%;height:100%;background:url('assets/client-three/camera-guide.png') center/100% 100% no-repeat}
#reader .frame i{display:none}
#instructions #dismiss-instructions:disabled{background:url('assets/client-three/authenticate-disabled.png') center/100% 100% no-repeat;color:transparent;font-size:0}

/* Short iPhone viewports must not inherit the old max-width:71.6% guide rule. */
#reader .frame{position:absolute;inset:0;left:0;top:0;right:0;bottom:0;width:100%;height:100%;min-width:0;min-height:0;max-width:none;max-height:none;transform:none;aspect-ratio:auto;background-size:100% 100%}
