/* Scanner usability v014: 16px body, generous touch targets, natural page scroll. */
.submit[data-current-step]{background:#f8fafd!important;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#172f43}
.submit[data-current-step] .step.active{height:auto!important;min-height:100dvh;overflow:visible!important;padding:5.2rem 1.25rem max(2rem,env(safe-area-inset-bottom))!important;display:block!important}
.submit[data-current-step] .step h2{font-family:inherit!important;font-size:2rem!important;font-weight:650;line-height:1.18!important;letter-spacing:-.025em;color:#183b52}
.submit[data-current-step] .step>.kicker{font-size:.875rem!important;line-height:1.4;letter-spacing:.06em;padding:.35rem .7rem;margin-bottom:.75rem!important}
.submit[data-current-step] .step-lead{font-size:1rem!important;line-height:1.55!important;color:#415365;margin:.75rem auto 1.25rem!important}
.submit[data-current-step] .submit-brand{position:absolute!important;inset-inline-start:1.25rem;left:auto;top:1.2rem;font-size:.875rem;color:#176080;letter-spacing:.04em}
.submit[data-current-step] .close.dark{position:fixed;width:48px;height:48px;font-size:2rem;top:.75rem;right:1rem;box-shadow:none;border:1px solid #cad4df;background:#fff}
.submit[data-current-step] .scan-start-actions{display:grid;grid-template-columns:1fr!important;gap:.75rem!important;position:static!important;padding:0!important;margin:0 auto 1.6rem!important;border:0!important;background:none!important;box-shadow:none!important;backdrop-filter:none!important;width:100%}
.submit[data-current-step] .scan-start-actions>*{width:100%;min-height:56px!important;box-sizing:border-box;border-radius:16px;padding:.85rem 1rem;font-size:1rem!important;text-transform:none!important;letter-spacing:0!important}
.submit[data-current-step] .scan-start-actions .primary-photo-button{order:0;background:#0a6d9a;min-height:76px!important}
.submit[data-current-step] .scan-start-actions label.secondary{order:1;background:#fff;border:1px solid #bdcedd}
.submit[data-current-step] .scan-start-actions .smart-scan-button{order:2;background:#edf3f8;border:0}
.submit[data-current-step] .primary-photo-button>span,.submit[data-current-step] .smart-scan-button>span{font-size:1rem!important}
.submit[data-current-step] .primary-photo-button>small,.submit[data-current-step] .smart-scan-button>small{font-size:.875rem!important;line-height:1.5;font-weight:400;letter-spacing:0!important;color:#415365}
.submit[data-current-step] .primary-photo-button>small{color:#fff}
.submit[data-current-step] .parent-scan-tips{display:grid;grid-template-columns:1fr;gap:0;margin:0 auto 1rem!important;overflow:visible!important}
.submit[data-current-step] .parent-scan-tips>div{grid-template-columns:32px minmax(0,1fr);gap:.35rem .85rem;padding:1rem 0;border:0;border-top:1px solid #dce4ec;border-radius:0;background:none;box-shadow:none}
.submit[data-current-step] .parent-scan-tips>div>span{width:32px;height:32px;font-size:.875rem;background:#e1edf6;color:#22536e}
.submit[data-current-step] .parent-scan-tips b{font-size:1rem!important;line-height:1.4;color:#243e52}
.submit[data-current-step] .parent-scan-tips small{font-size:1rem!important;line-height:1.5!important;color:#415365}
.submit[data-current-step] .scan-privacy{font-size:.875rem!important;line-height:1.5;color:#415365;text-align:start;margin:1rem auto!important}
.submit[data-current-step] .scan-status{border-radius:16px;box-shadow:none;padding:1rem;background:#eaf3fb}
.submit[data-current-step] .scan-status b,.submit[data-current-step] .scan-status small{font-size:1rem!important;line-height:1.5!important}
.submit[data-current-step] .scan-quality{gap:.65rem;grid-template-columns:repeat(2,minmax(0,1fr))}
.submit[data-current-step] .scan-quality>div{border:1px solid #dce4ec;box-shadow:none;border-radius:12px;padding:.8rem}
.submit[data-current-step] .scan-quality span{font-size:.875rem!important;letter-spacing:0;text-transform:none}
.submit[data-current-step] .scan-quality b{font-size:1rem!important;line-height:1.5}
.submit[data-current-step] .scan-adjust b,.submit[data-current-step] .scan-adjust span,.submit[data-current-step] .corner-editor-copy span{font-size:1rem!important;line-height:1.5}
.submit[data-current-step] .button-row{gap:.75rem;flex-wrap:wrap}
.submit[data-current-step] .primary,.submit[data-current-step] .secondary{font-size:1rem!important;min-height:48px!important;text-transform:none;letter-spacing:0;white-space:normal;line-height:1.4}
.submit[data-current-step] .fields label,.submit[data-current-step] .consent,.submit[data-current-step] .consent span,.submit[data-current-step] .field-note{font-size:1rem!important;line-height:1.5}
.submit[data-current-step] input:not([type=file]),.submit[data-current-step] select,.submit[data-current-step] textarea{font-size:1rem!important;min-height:48px}
.submit[data-current-step] .scan-frame{padding:.75rem;border-radius:16px;box-shadow:none;background:#172832}
.submit[data-current-step="camera"] .smart-camera-shell{height:min(55dvh,32rem);min-height:200px!important;flex:none!important}
.submit[data-current-step="camera"] .smart-camera-actions{grid-template-columns:1fr!important;gap:.75rem}
.submit[data-current-step].corner-editing .step.active{height:100dvh!important;overflow:hidden!important;padding:0!important}
@media(min-width:720px){.submit[data-current-step] .step.active{padding-inline:2rem!important}.submit[data-current-step] .step h2{font-size:2.5rem!important}}
@media(prefers-reduced-motion:reduce){.submit[data-current-step] *{scroll-behavior:auto}}

.submit[data-current-step] .file-button:focus-within{outline:3px solid #086ca1;outline-offset:3px}

.submit[data-current-step] .submit-brand{left:auto;right:auto;inset-inline-start:1.25rem}
.submit[data-current-step] .close.dark{left:auto;right:auto;inset-inline-end:1rem}
.submit[data-current-step] .scan-status[data-tone="warn"]{background:#fff3cc;color:#634a12}
.submit[data-current-step] .scan-status[data-tone="warn"] small{color:#634a12}

/* v016: review controls follow quality results instead of covering them. */
.submit[data-current-step] .scan-buttons{position:static!important;background:none!important;border-top:1px solid #dce4ec;margin-top:1.25rem;padding:1rem 0 0!important;justify-content:start}
.submit[data-current-step] .scan-buttons .secondary{flex:1 1 auto}
.submit[data-current-step] .scan-buttons .primary{width:100%;min-height:56px!important}

/* Calm warning treatment: amber accents, white surfaces, explicit text. */
.submit[data-current-step] .scan-status[data-tone="warn"]{background:#fff;border:1px solid #d9b775;color:#183b52}
.submit[data-current-step] .scan-status[data-tone="warn"] small{color:#52697b}
.submit[data-current-step] .scan-status.scan-status[data-tone="warn"]>span{background:#fff9ef;color:#875600;border:1px solid #d9b775;flex-shrink:0}
.submit[data-current-step] .scan-quality>div[data-tone="warn"]{background:#fff;border-color:#d9b775;box-shadow:none}
.submit[data-current-step] .scan-quality>div[data-tone="warn"] b{color:#875600}
.submit[data-current-step] .scan-adjust{background:#fff;border:1px solid #d5dfe7}
.submit[data-current-step] .scan-adjust b{color:#183b52}
.submit[data-current-step] .scan-adjust span{color:#52697b}

/* Keep manual orientation visible beside a completed scan preview. */
.submit[data-current-step] .scan-orientation{display:none;justify-content:flex-end;margin:.6rem auto .2rem}
.submit[data-current-step] .scan-frame[data-state="ready"] + .scan-orientation{display:flex}
.submit[data-current-step] .scan-orientation .secondary{min-height:48px!important;padding:.55rem 1.15rem;border:1px solid #cad8e2;border-radius:999px;background:#fff;color:#225270;box-shadow:none}
.submit[data-current-step] .scan-orientation .secondary::before{content:"↻";display:inline-block;margin-right:.45rem;font-size:1.2em;line-height:1}
.submit[data-current-step] .scan-orientation .secondary:focus-visible{outline:3px solid #086ca1;outline-offset:3px}
.submit[data-current-step] .is-adjusting>.scan-orientation{display:none}

/* United Earth Drawing Wall — 2026-10-11 scanner layout refinement.
   Scoped ONLY to capture step; retain v014 accessibility font scale and button sizes. */
@media(max-width:620px){
 .submit[data-current-step="tips"] .step[data-step="tips"].active{
   height:100dvh!important;min-height:0!important;max-height:100dvh!important;
   box-sizing:border-box!important;overflow:hidden!important;display:flex!important;
   flex-direction:column!important;padding:4.6rem 1rem max(.6rem,env(safe-area-inset-bottom))!important
 }
 .submit[data-current-step="tips"] .step[data-step="tips"].active>.kicker{
   flex:0 0 auto;margin-bottom:.3rem!important;font-size:.76rem!important
 }
 .submit[data-current-step="tips"] .step[data-step="tips"].active>h2{
   flex:0 0 auto;font-size:clamp(1.85rem,9vw,2.2rem)!important;line-height:1.12!important;
   margin:0!important
 }
 .submit[data-current-step="tips"] .step[data-step="tips"].active>.step-lead{
   flex:0 0 auto;margin:.45rem auto .55rem!important;
   font-size:.85rem!important;line-height:1.42!important
 }
 .submit[data-current-step="tips"] .scan-learning{
   flex:1 1 0!important;min-height:0!important;max-height:none;
   display:block!important;overflow-y:auto!important;
   margin:0 auto .55rem!important;padding:0 .1rem .25rem;
   scrollbar-width:thin;overscroll-behavior:contain
 }
 .submit[data-current-step="tips"] .scan-learning .scan-photo-guide{
   margin:0 0 .6rem!important;grid-template-columns:30px 1fr;
   padding:.65rem .75rem
 }
 .submit[data-current-step="tips"] .scan-learning .scan-photo-guide strong{
   font-size:.88rem
 }
 .submit[data-current-step="tips"] .scan-learning .scan-photo-guide p{
   font-size:.79rem;line-height:1.42
 }
 .submit[data-current-step="tips"] .scan-learning .scan-example-pair{
   margin-bottom:.55rem
 }
 .submit[data-current-step="tips"] .scan-learning .scan-example svg{
   height:60px
 }
 .submit[data-current-step="tips"] .scan-learning .scan-example figcaption{
   font-size:.72rem
 }
 .submit[data-current-step="tips"] .scan-learning .scan-more-tips{
   padding:.12rem .8rem;margin-bottom:.55rem
 }
 .submit[data-current-step="tips"] .scan-learning .scan-more-tips summary{
   font-size:.82rem;min-height:42px
 }
 .submit[data-current-step="tips"] .scan-learning .parent-scan-tips{
   display:grid;grid-template-columns:1fr;gap:.35rem;margin:0 0 .6rem!important;
   overflow:visible!important;min-height:0
 }
 .submit[data-current-step="tips"] .scan-learning .parent-scan-tips>div{
   padding:.5rem .35rem;min-height:0
 }
 .submit[data-current-step="tips"] .scan-learning .parent-scan-tips b{
   font-size:.82rem!important
 }
 .submit[data-current-step="tips"] .scan-learning .parent-scan-tips small{
   font-size:.82rem!important;line-height:1.35!important
 }
 .submit[data-current-step="tips"] .scan-learning .scan-privacy{
   font-size:.76rem!important;line-height:1.45!important;margin:.5rem auto!important
 }
 .submit[data-current-step="tips"] .scan-start-actions{
   flex:0 0 auto!important;position:relative!important;order:0;
   width:100%!important;max-width:42rem!important;
   margin:0 auto!important;display:grid!important;
   grid-template-columns:repeat(2,minmax(0,1fr))!important;
   gap:.38rem!important;padding:.42rem!important;border:1px solid #d7e6f1!important;
   background:#f6fafd!important;border-radius:15px!important;
   box-shadow:0 -7px 22px #1e527c14!important
 }
 .submit[data-current-step="tips"] .scan-start-actions>.primary-photo-button{
   grid-column:1/-1!important;min-height:52px!important;padding:.4rem .6rem!important
 }
 .submit[data-current-step="tips"] .scan-start-actions>.secondary{
   grid-column:auto!important;min-height:47px!important;
   padding:.5rem .25rem!important;font-size:.8rem!important;
   line-height:1.28!important;letter-spacing:0!important
 }
 .submit[data-current-step="tips"] .scan-start-actions .primary-photo-button>span{
   font-size:.93rem!important
 }
 .submit[data-current-step="tips"] .scan-start-actions .primary-photo-button>small{
   font-size:.76rem!important;line-height:1.22!important
 }
 .submit[data-current-step="tips"] .scan-start-actions .secondary span{
   font-size:.8rem!important;line-height:1.2!important
 }
 .submit[data-current-step="tips"] .scan-start-actions .secondary small{
   font-size:.68rem!important;line-height:1.2!important
 }
}
@media(max-width:375px) and (max-height:650px){
 .submit[data-current-step="tips"] .step[data-step="tips"].active{
   padding:3.65rem .75rem max(.4rem,env(safe-area-inset-bottom))!important
 }
 .submit[data-current-step="tips"] .step[data-step="tips"].active>.step-lead{
   font-size:.78rem!important;line-height:1.34!important;margin:.3rem auto .4rem!important
 }
 .submit[data-current-step="tips"] .step[data-step="tips"].active>h2{
   font-size:1.95rem!important
 }
 .submit[data-current-step="tips"] .scan-start-actions{
   padding:.35rem!important;gap:.32rem!important
 }
 .submit[data-current-step="tips"] .scan-start-actions>.primary-photo-button{min-height:49px!important}
 .submit[data-current-step="tips"] .scan-start-actions>.secondary{
   min-height:44px!important;font-size:.75rem!important;padding:.35rem .2rem!important
 }
}


/* In scan review, the image and its real quality feedback should both be visible
   on a phone. Never modify crop, subject or consent logic. */
@media(max-width:620px){
 .submit[data-current-step="scan"] .scan-frame{
   height:min(49dvh,395px);
   min-height:0!important;max-height:395px;
   padding:.6rem!important;box-sizing:border-box
 }
 .submit[data-current-step="scan"] .scan-frame canvas{
   width:auto;height:auto;max-width:100%;
   max-height:calc(min(49dvh,395px) - 1.2rem)
 }
 .submit[data-current-step="scan"] .scan-status{
   margin:.55rem auto .75rem;padding:.75rem .82rem
 }
 .submit[data-current-step="scan"] .scan-quality{
   margin:.65rem auto .85rem;gap:.45rem
 }
 .submit[data-current-step="scan"] .scan-quality>div{
   padding:.65rem!important
 }
}
