:root{--bg:#0b1020;--card:#121b2b;--line:#2a354b;--text:#f1f4fc;--muted:#a5b3cc;--accent:#9873ff;--accent-bg:#7950e8;--photo-ratio:1.333333;--panel-height:calc(100svh - 130px);color-scheme:dark;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans TC",sans-serif}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html{background:var(--bg)}body{margin:0;color:var(--text);background:radial-gradient(ellipse at 80% 0%,#201b3c 0,transparent 48%),var(--bg);min-height:100svh}button,input,select{font:inherit}button,a,input,select{touch-action:manipulation}button{display:inline-flex;align-items:center;justify-content:center;gap:12px;min-height:50px;padding:13px 20px;border:1px solid transparent;border-radius:14px;background:#253148;color:var(--text);font-weight:750;font-size:17px;cursor:pointer;transition:background .15s,border-color .15s,transform .15s}button span[aria-hidden]{margin-left:auto}button:disabled{opacity:.45;cursor:default}button:not(:disabled):active{transform:scale(.98)}button:not(:disabled):hover{filter:brightness(1.08)}:focus-visible{outline:3px solid #c8b4ff;outline-offset:3px}.primary{background:var(--accent-bg);color:white}.secondary{background:#2b2348;border-color:#66558e}.quiet{background:transparent;border-color:var(--line);color:var(--muted)}.danger{background:#40252e;border-color:#78404b;color:#ffd4d4}.green{background:#234338;border-color:#396a51;color:#b9f8d4}.small{min-height:40px;font-size:14px;padding:9px 14px}.large{min-height:60px;font-size:19px}[hidden]{display:none!important}
.appShell{max-width:1480px;margin:auto;padding:0 20px 20px}.appHeader{height:72px;display:flex;align-items:center;justify-content:space-between;gap:20px;border-bottom:1px solid var(--line)}.brand{text-decoration:none;color:var(--text);font-weight:850;font-size:20px;white-space:nowrap;display:flex;align-items:center;gap:10px}.brandMark{font-size:26px;color:#b59aff}.flowSteps{display:flex;align-items:center;gap:22px;margin:0;padding:0;list-style:none;counter-reset:step}.flowSteps li{counter-increment:step;font-size:14px;font-weight:700;color:#68768d;white-space:nowrap;display:flex;gap:7px;align-items:center}.flowSteps li:before{content:counter(step);display:grid;place-items:center;width:24px;height:24px;border-radius:50%;border:1px solid var(--line);font-size:12px}.flowSteps li.active{color:#dfd4ff}.flowSteps li.active:before{background:var(--accent-bg);border-color:var(--accent-bg);color:white}.flowSteps li.done{color:#a899ce}.flowSteps li.done:before{content:'✓'}#queueBtn{white-space:nowrap}#queueCount{display:grid;place-items:center;min-width:20px;height:20px;border-radius:6px;background:#2a3347;color:#e3e9f6;font-size:12px}.feedback{height:36px;display:flex;align-items:center;justify-content:center;font-size:14px;color:var(--muted);opacity:0;transition:opacity .2s}.feedback.on{opacity:1}.feedback.error{color:#ffc4c4}.screen{display:none}.screen.active{display:block}
.workLayout{display:grid;grid-template-columns:minmax(0,1fr) 296px;gap:16px;min-height:var(--panel-height)}.card{background:rgba(18,27,43,.94);border:1px solid var(--line);border-radius:22px;padding:24px;min-width:0}.previewPanel{height:var(--panel-height);display:flex;flex-direction:column;gap:16px;overflow:hidden}.mainPanel{min-height:var(--panel-height)}.panelHeading{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-shrink:0}.eyebrow{font-size:11px;letter-spacing:2px;color:#b29bdc;font-weight:800;margin:0 0 8px}.panelHeading h1,h2,h3{margin:0}h1{font-size:clamp(23px,2.5vw,32px);letter-spacing:-.6px;line-height:1.35}h2{font-size:21px;line-height:1.4}h3{font-size:15px;margin-bottom:12px}.muted,.lead{color:var(--muted);font-size:15px;line-height:1.7;margin:10px 0 0}.sidePanel{height:var(--panel-height);display:flex;flex-direction:column;gap:20px;overflow:auto;scrollbar-width:thin}.panelActions{display:flex;flex-direction:column;gap:10px;margin-top:auto;flex-shrink:0}.panelActions button{width:100%}.stageHolder{display:flex;justify-content:center;align-items:center;flex:1;min-height:0;min-width:0;background:#080d18;border:1px solid #202a3e;border-radius:16px;padding:10px;overflow:hidden}.stage{position:relative;aspect-ratio:var(--photo-ratio);width:100%;overflow:hidden;background:#080d18;border-radius:10px;flex-shrink:0}.frameBg,.photoCanvas,.overlay,.flash{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.frameBg{background-position:center;background-size:contain;background-repeat:no-repeat;z-index:0}.photoCanvas{z-index:2}.overlay{display:flex;align-items:center;justify-content:center;font-size:clamp(76px,12vw,150px);font-weight:900;background:#0003;z-index:6;color:#fff;text-shadow:0 4px 30px #0008}.flash{opacity:0;background:#fff;z-index:5}.flash.on{animation:flash .28s linear}@keyframes flash{0%{opacity:0}20%{opacity:.96}100%{opacity:0}}.previewHint{margin:0;font-size:13px;line-height:1.6;color:var(--muted);text-align:center;flex-shrink:0}.pill{font-size:12px;white-space:nowrap;padding:7px 10px;background:#26223b;border:1px solid #4d406e;color:#d7c6ff;border-radius:100px;font-weight:700}.pill.success{background:#173e32;border-color:#285e48;color:#a8ebc4}
.filterGrid{display:grid;gap:9px;overflow:auto;min-height:0;padding:4px;scrollbar-width:thin}.filterBtn{justify-content:space-between;flex-shrink:0;text-align:left;border:1px solid var(--line);background:#192337;padding:12px;min-height:61px}.filterBtn span{font-size:16px}.filterBtn small{font-size:11px;color:var(--muted);font-weight:500;white-space:nowrap}.filterBtn.active{border-color:#b89cff;box-shadow:0 0 0 2px #b89cff;background:#302449}.filterGrid~.panelActions{padding-top:4px}.frameGrid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;margin-top:26px;padding:4px}.frameBtn{position:relative;display:block;padding:9px;background:#192337;border:1px solid var(--line);border-radius:14px;text-align:left;min-width:0}.frameBtn img{display:block;width:100%;aspect-ratio:1/3;object-fit:contain;border-radius:6px;background:#0c111d}.frameInfo{display:grid;gap:5px;margin:12px 0 3px;line-height:1.3}.frameInfo strong{font-size:13px;white-space:nowrap}.frameInfo small{font-size:10px;color:var(--muted);font-weight:500}.frameBtn.active{border-color:#c2a9ff;box-shadow:0 0 0 2px #b89cff;background:#302449}.selectedMark{display:none;position:absolute;right:5px;top:5px;width:24px;height:24px;place-items:center;background:var(--accent-bg);border:2px solid #d4c2ff;border-radius:50%;font-size:12px;color:white}.frameBtn.active .selectedMark{display:grid}.cameraSection{margin-top:12px}.cameraGrid{display:grid;gap:8px}.cameraBtn{font-size:14px;text-align:left;justify-content:flex-start;border:1px solid var(--line);background:#192337;overflow-wrap:anywhere}.cameraBtn.active{border-color:#a78bfa;background:#302449}.cameraStatus{font-size:13px;line-height:1.6;margin:12px 0 0;color:var(--muted)}.cameraStatus.error{color:#ffc4c4}#retryCameraBtn{margin-top:10px;width:100%}.captureProgress{margin-top:16px}.status{font-size:17px;line-height:1.6;font-weight:650;margin:12px 0;color:#e8e2ff}.liveDot{width:8px;height:8px;display:inline-block;background:#9eddb9;border-radius:50%}.shotProgress{display:flex;gap:8px;margin-top:18px}.shotProgress span{height:6px;flex:1;background:#30394e;border-radius:8px}.shotProgress span.done{background:#a687f5}.shotProgress span.active{background:#e0d3ff}
.resultStatus{font-size:14px;color:var(--muted);font-weight:500;min-height:44px}.resultItem{display:flex;align-items:center;justify-content:center;flex:1;min-height:0;padding:8px;border-radius:16px;background:#080d18}.resultItem img{display:block;max-width:100%;max-height:100%;height:100%;width:auto;object-fit:contain}.qrSection{display:grid;gap:12px;justify-items:center}.qrGrid{width:100%}.qrCard{padding:12px;border-radius:16px;background:#fff}.qrCard img{display:block;max-width:100%;width:220px;aspect-ratio:1;height:auto;margin:auto}.qrCaption{color:var(--muted);text-align:center;font-size:13px;margin:10px 0 0}.qrPlaceholder{display:grid;place-items:center;min-height:160px;width:100%;border:1px dashed #45516b;border-radius:16px;color:var(--muted);text-align:center;padding:20px;font-size:14px;line-height:1.7}.printNotice{font-size:13px;line-height:1.6;color:#b7dbc7;margin:0}.printNotice.error,.inlineError{color:#ffbcbc}.printNotice:empty,.inlineError:empty{display:none}.resultActions{gap:8px}.resultActions button{min-height:45px;padding:10px}.detailsPhotoHolder{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;background:#080d18;border-radius:16px;padding:16px}.detailsPhoto{max-width:100%;max-height:100%;height:100%;width:auto;object-fit:contain;border-radius:12px}.detailsLayout{grid-template-columns:minmax(0,1fr) 370px}.detailsForm{display:flex;flex-direction:column;gap:22px;flex:1;min-height:0}.detailsForm label,.birthField{display:grid;gap:9px;font-size:16px;font-weight:750}.detailsForm input,.detailsForm select{width:100%;min-width:0;min-height:52px;border:1px solid #46516b;border-radius:12px;padding:12px;background:#0b1220;color:var(--text);font-size:17px}.birthSelects{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:7px}.birthSelects select{padding:12px 8px}.inlineError{font-size:14px;line-height:1.6;margin:0}.jesusChoiceGrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-top:25px}.jesusChoice{display:grid;gap:14px;text-align:center;font-size:13px;color:var(--muted)}.jesusChoice img{display:block;width:100%;max-height:calc(var(--panel-height) - 180px);object-fit:contain;border-radius:16px;background:#0b1220;padding:12px}
.queuePanel{min-height:var(--panel-height)}.queueHeaderActions{display:flex;gap:10px;flex-wrap:wrap}.queueHelp{font-size:13px;color:var(--muted);line-height:1.7;margin:20px 0}.queueList{display:grid;gap:12px}.queueItem{display:grid;grid-template-columns:88px minmax(0,1fr);gap:20px;align-items:center;border:1px solid var(--line);background:#0e1727;border-radius:16px;padding:16px}.queueThumb{width:88px;aspect-ratio:2/3;object-fit:contain;background:#080d18;border-radius:9px}.queueMeta{display:grid;gap:9px}.queueTitle{font-size:20px;font-weight:800}.queueBadge{font-size:12px;display:inline-block;padding:5px 9px;border-radius:6px;background:#273148;color:#d1d9ec}.queueBadge.confirmed{background:#1d4535;color:#b9f0ce}.queueBadge.opened{background:#493e22;color:#f5df9e}.queueBadge.reprint{background:#44304e;color:#edc4fa}.queueSub{font-size:12px;color:var(--muted);line-height:1.5}.queueActions{display:flex;flex-wrap:wrap;gap:8px}.queueActions button{font-size:14px;min-height:40px;padding:9px 14px}.queueEmpty{padding:70px 20px;text-align:center;border:1px dashed #3a465d;border-radius:16px;color:var(--muted);line-height:1.8}
.welcome{min-height:var(--panel-height);display:grid;grid-template-columns:1fr 1fr;gap:30px;align-items:center;max-width:1160px;margin:auto}.welcome h1{font-size:clamp(36px,4.8vw,64px);line-height:1.3;letter-spacing:-1.5px}.welcome .eyebrow{margin-bottom:20px}.welcome .lead{font-size:17px;margin-top:24px}.welcome .large{min-width:230px;margin-top:30px}.welcomeNote{font-size:12px;color:#8493ad;margin-top:18px}.welcomeFrames{display:flex;align-items:center;justify-content:center;gap:14px;padding:30px 15px;overflow:hidden}.welcomeFrames img{width:29%;max-height:58svh;object-fit:contain;border:7px solid #e5e3e9;border-radius:4px;box-shadow:0 20px 35px #0005;transform:rotate(-7deg)}.welcomeFrames img:nth-child(2){transform:translateY(-15px) rotate(4deg);z-index:1}.welcomeFrames img:nth-child(3){transform:translateY(30px) rotate(10deg)}body[data-screen="welcome"] .flowSteps,body[data-screen="queue"] .flowSteps{visibility:hidden}.hiddenVideo,.hiddenCanvas{position:fixed;left:-9999px;top:-9999px;width:1px;height:1px;opacity:0;pointer-events:none}dialog{max-width:min(440px,calc(100% - 36px));padding:28px;background:#172135;color:var(--text);border:1px solid #485574;border-radius:22px}dialog::backdrop{background:#040814b8;backdrop-filter:blur(4px)}dialog p{font-size:15px;line-height:1.8;color:var(--muted);margin:16px 0 24px}.dialogActions{display:flex;gap:12px;justify-content:flex-end}
@media(min-width:701px) and (max-width:1050px){.appShell{padding:0 14px 14px}.card{padding:18px}.workLayout{grid-template-columns:minmax(0,1fr) 252px;gap:12px}.detailsLayout{grid-template-columns:minmax(0,1fr) 330px}.frameGrid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:18px}.frameBtn img{height:calc((var(--panel-height) - 275px)/2);min-height:160px;width:100%;aspect-ratio:auto}.frameInfo strong{font-size:14px}.frameInfo small{font-size:11px}.flowSteps{gap:12px}.sidePanel{gap:16px}.filterBtn small{display:none}.filterBtn{min-height:56px}.welcome h1{font-size:43px}.welcomeFrames{gap:5px;padding:20px 0}.welcomeFrames img{border-width:5px;width:30%}}
@media(max-width:700px){:root{--panel-height:calc(100svh - 114px)}.appShell{padding:0 12px 16px}.appHeader{height:64px;gap:10px}.brand{font-size:17px;gap:6px}.brandMark{font-size:22px}.flowSteps{gap:5px}.flowSteps li{font-size:0;gap:0}.flowSteps li:before{width:21px;height:21px;font-size:10px}#queueBtn{font-size:12px;min-height:36px;padding:7px 9px;gap:5px}#queueCount{min-width:17px;height:17px}.feedback{height:34px;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;text-align:center;line-height:34px}.workLayout{grid-template-columns:1fr;gap:12px;min-height:0}.card{padding:16px;border-radius:18px}.mainPanel{min-height:0}.panelHeading{gap:8px}.panelHeading h1{font-size:23px}.panelHeading>.muted{display:none}.eyebrow{font-size:10px;letter-spacing:1.5px}.frameGrid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:20px;padding:3px}.frameBtn{padding:7px}.frameBtn img{height:25svh;min-height:130px;aspect-ratio:auto}.frameInfo{margin-top:9px}.frameInfo strong{font-size:12px}.frameInfo small{font-size:10px}.frameLayout .sidePanel{height:auto;overflow:visible}.frameLayout .sidePanel>div:first-child{display:none}.cameraSection{margin:0}.cameraGrid{grid-template-columns:repeat(2,minmax(0,1fr))}.frameLayout .panelActions{margin-top:8px}.previewPanel{height:calc(100svh - 300px);min-height:320px;gap:12px}.sidePanel{height:auto;min-height:0;overflow:visible;gap:16px}.filterLayout{grid-template-columns:minmax(0,1fr) 142px;gap:8px}.filterLayout .card{padding:12px}.filterLayout .previewPanel{height:var(--panel-height);min-height:0}.filterLayout .sidePanel{height:var(--panel-height);overflow:auto;gap:14px}.filterLayout .sidePanel>div:first-child h2{font-size:17px}.filterLayout .sidePanel>div:first-child .muted,.filterLayout .previewHint{display:none}.filterLayout .panelHeading h1{font-size:19px}.filterLayout .panelHeading .eyebrow{font-size:9px}.filterLayout .stageHolder{padding:0;border:0}.filterGrid{gap:9px;padding:4px}.filterBtn{min-height:47px;justify-content:center;padding:10px 4px}.filterBtn span{font-size:15px}.filterBtn small{display:none}.filterLayout .panelActions button{padding:12px 4px;font-size:15px;min-height:46px}.filterLayout .panelActions{gap:8px}.captureLayout{gap:10px}.captureLayout .previewPanel{height:calc(100svh - 327px);min-height:280px}.captureLayout .sidePanel{display:grid;grid-template-columns:1fr 1fr;gap:10px 16px}.captureLayout .sidePanel>div:first-child{align-self:start}.captureLayout .sidePanel h2{font-size:17px}.captureLayout .sidePanel .muted{font-size:12px;margin:4px 0 0}.captureProgress{margin:0}.liveDot{display:none}.status{font-size:14px;margin:0}.shotProgress{margin-top:10px}.captureLayout .panelActions{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;margin:0;gap:8px}.captureLayout .panelActions #shootBtn{grid-column:1/-1;min-height:52px}.captureLayout .panelActions button{min-height:42px;padding:10px;font-size:15px}.captureLayout .previewHint{font-size:11px}.resultLayout .previewPanel{height:58svh;min-height:350px}.resultLayout .sidePanel{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px}.resultLayout .sidePanel>div:first-child{grid-column:1/-1}.resultStatus{min-height:0;margin-top:6px}.qrSection{grid-column:1;align-self:start}.qrCard{padding:7px}.qrCaption{font-size:11px}.qrPlaceholder{min-height:140px;font-size:12px;padding:10px}.resultActions{grid-column:2;grid-row:2/4;align-self:start}.resultActions button{font-size:14px;min-height:44px;padding:10px 5px}.printNotice{grid-column:1;font-size:11px}.detailsLayout .previewPanel{height:42svh;min-height:300px}.detailsForm{gap:20px}.detailsForm .panelActions{margin-top:5px}.detailsLayout .sidePanel{height:auto}.choiceLayout .sidePanel{gap:22px}.jesusChoiceGrid{gap:8px;margin-top:20px}.jesusChoice img{padding:6px;max-height:40svh}.choiceLayout .panelActions{display:grid;grid-template-columns:1fr 1fr}.choiceLayout #backFromJesusBtn{grid-column:1/-1}.queuePanel{padding:16px}.queuePanel .panelHeading{align-items:flex-start;flex-direction:column}.queueHeaderActions{width:100%}.queueHeaderActions button{flex:1;min-height:42px;font-size:14px}.queueItem{grid-template-columns:64px minmax(0,1fr);gap:12px;padding:12px}.queueThumb{width:64px}.queueActions{display:grid;grid-template-columns:1fr 1fr;gap:6px}.queueActions button{font-size:12px;padding:8px;min-height:38px}.welcome{grid-template-columns:1fr;gap:10px;min-height:var(--panel-height);padding-top:20px}.welcomeCopy{text-align:center}.welcome h1{font-size:38px}.welcome .eyebrow{margin-bottom:12px}.welcome .lead{font-size:15px;margin-top:16px}.welcome .large{margin-top:22px}.welcomeFrames{padding:20px 35px}.welcomeFrames img{max-height:29svh;border-width:4px}.welcomeNote{font-size:11px}.dialogActions button{font-size:15px}}
@media(min-width:701px) and (max-height:650px){:root{--panel-height:calc(100svh - 112px)}.appHeader{height:58px}.feedback{height:34px}.card{padding:16px}.sidePanel{gap:12px}.panelHeading h1{font-size:22px}.eyebrow{margin-bottom:4px}.previewPanel{gap:10px}.filterBtn{min-height:44px;padding:9px}.filterGrid{gap:8px}.panelActions{gap:7px}.panelActions button{min-height:42px;padding:10px;font-size:15px}.large{min-height:48px}.frameGrid{grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}.frameBtn img{height:calc(var(--panel-height) - 180px);min-height:80px}.frameInfo strong{font-size:11px}.frameInfo small{font-size:9px}.frameInfo{gap:3px;margin:7px 0 0}.stageHolder{padding:5px}.filterBtn small{display:none}.detailsForm{gap:12px}.detailsForm input,.detailsForm select{min-height:44px;padding:8px;font-size:15px}.sidePanel h2{font-size:18px}.muted{font-size:13px}.resultActions button{min-height:36px;padding:7px}.qrCard img{width:130px}.qrPlaceholder{min-height:100px;font-size:12px}.resultStatus{font-size:12px;min-height:0}.printNotice{font-size:11px}.resultLayout .sidePanel{gap:10px}.welcome h1{font-size:40px}.welcome .lead{margin-top:12px}.welcome .large{margin-top:20px}.welcomeFrames img{max-height:58svh}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
h1:focus{outline:none}
.resultLayout .sidePanel{gap:14px}
.resultStatus{min-height:0;margin:8px 0 0}
.qrCard img{width:175px}
@media(min-height:900px) and (min-width:701px){.qrCard img{width:220px}}
.filterGrid{scroll-padding:6px;align-content:start;grid-auto-rows:min-content}
@media(min-width:701px) and (max-width:1050px){.filterBtn{min-height:52px}}
@media(min-width:701px) and (max-height:650px){
 .captureLayout .sidePanel{gap:8px}
 .captureLayout .captureProgress{margin-top:0}
 .captureLayout .captureProgress .liveDot{display:none}
 .captureLayout .status{font-size:14px;line-height:1.4;margin:0}
 .captureLayout .shotProgress{margin-top:8px}
 .captureLayout .sidePanel .muted{font-size:12px;line-height:1.4;margin-top:6px}
 .captureLayout #backHomeBtn{min-height:36px;padding:8px}
 .resultLayout{grid-template-columns:minmax(0,1fr) 330px}
 .resultLayout .sidePanel{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px 12px}
 .resultLayout .sidePanel>div:first-child{grid-column:1/-1}
 .resultLayout .qrSection{grid-column:1;align-self:start}
 .resultLayout .resultActions{grid-column:2;grid-row:2/4;align-self:start}
 .resultLayout .printNotice{grid-column:1}
 .resultLayout .resultActions button{font-size:12px}
 .resultLayout .resultStatus{margin:4px 0 0;line-height:1.4}
 .resultLayout .qrCard{padding:8px}
 .resultLayout .qrCard img{width:110px}
 .qrCaption{font-size:11px;margin-top:5px}
 .detailsForm{gap:10px}.detailsForm .muted{display:none}
 .detailsForm label,.birthField{font-size:14px;gap:5px}
 .detailsForm input,.detailsForm select{min-height:38px}
 .detailsForm .panelActions button{min-height:36px;padding:8px}
}

/* Original button palette; larger previews with only essential labels. */
:root{--accent-bg:#7c3aed}
button{background:#1e293b;color:#eef2ff}
.primary,.secondary{background:#7c3aed;border-color:transparent;color:#fff}
.green{background:#22c55e;border-color:transparent;color:#052e16}
.danger{background:#ef4444;border-color:transparent;color:#fff}
.quiet{background:#1e293b;border-color:#334155;color:#eef2ff}
.frameBtn,.filterBtn{background:#1e293b;border-color:#334155}
.frameBtn.active,.filterBtn.active{background:#312e81;border-color:#a78bfa;box-shadow:0 0 0 2px #a78bfa}
.eyebrow{margin-bottom:0;font-size:13px;letter-spacing:1.5px}
.eyebrow:focus{outline:none}
.previewPanel{gap:12px}
.stageHolder{padding:0}
.frameLayout{grid-template-columns:minmax(0,1fr) 176px;gap:12px}
.frameLayout .mainPanel{height:var(--panel-height);display:flex;flex-direction:column;min-height:0}
.frameLayout .sidePanel{padding:18px}
.frameLayout .cameraSection{margin:0}
.selectedFramePreview{display:flex;align-items:center;justify-content:center;flex:1;min-height:0}
.selectedFramePreview img{display:block;width:100%;height:100%;object-fit:contain;max-width:100%;max-height:100%}
.cameraStatus:empty{display:none}
.frameGrid{grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;flex:1;min-height:0;margin-top:14px;align-items:center}
.frameBtn{padding:5px}
.frameBtn img{width:100%;height:auto;max-height:calc(var(--panel-height) - 104px);aspect-ratio:1/3;object-fit:contain}
.frameInfo{margin:10px 0 5px;gap:0;text-align:center}
.frameInfo strong{font-size:13px}
.filterGrid{gap:10px}
.filterBtn{min-height:54px}
.captureProgress{margin-top:10px}
.captureLayout .previewPanel{gap:12px}
.captureLayout .status{font-size:17px}
.detailsPhotoHolder{padding:0}
.resultItem{padding:0}
.resultStatus{margin-top:0}
.resultLayout .panelHeading{min-height:20px}
.detailsForm{gap:20px}
.jesusChoiceGrid{margin-top:16px}
.queueList{margin-top:20px}
@media(min-width:701px) and (max-width:900px) and (min-height:651px){
 .frameGrid{grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch;gap:10px}
 .frameBtn img{height:calc((var(--panel-height) - 170px)/2);max-height:none;aspect-ratio:auto}
}
@media(max-width:700px){
 .frameLayout{grid-template-columns:1fr}
 .frameLayout .mainPanel{height:auto}
 .frameLayout .sidePanel{height:auto;padding:12px}
 .frameLayout .sidePanel>div:first-child{display:block}
 .frameLayout .sidePanel>.selectedFramePreview{display:none}
 .frameLayout .cameraSection:has(.cameraStatus:empty):has(#retryCameraBtn[hidden]){display:none}
 .frameLayout .panelActions{display:grid;grid-template-columns:1fr 1fr;margin:0}
 .frameGrid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
 .frameBtn img{height:auto;max-height:none;min-height:0;aspect-ratio:1/3}
 .frameInfo strong{font-size:11px}
 .filterLayout .panelHeading .eyebrow{font-size:12px}
 .captureLayout .previewPanel{height:calc(100svh - 267px)}
 .captureLayout .panelActions #shootBtn{grid-column:auto}
 .captureLayout .panelActions{grid-template-columns:1fr 1fr}
 .captureLayout .panelActions button{min-height:52px}
 .captureLayout .status{font-size:14px}
 .detailsLayout .previewPanel{height:46svh}
 .resultLayout .previewPanel{height:64svh}
}
@media(min-width:701px) and (max-height:650px){
 .frameLayout{grid-template-columns:minmax(0,1fr) 160px}
 .frameBtn img{height:auto;min-height:0;max-height:calc(var(--panel-height) - 100px);aspect-ratio:1/3}
 .frameInfo strong{font-size:10px}
 .captureLayout .status{font-size:14px}
 .filterBtn{min-height:44px}
}

/* Home gallery, simple frame selection, and a larger download code. */
#queueBtn[hidden]{display:none}
body[data-screen="welcome"] .brand,body[data-screen="welcome"] .flowSteps{display:none}
body[data-screen="welcome"] .appHeader{height:52px;border:0;justify-content:flex-end}
body[data-screen="welcome"] .feedback{height:0;overflow:hidden}
.welcome{height:calc(100svh - 76px);min-height:0;max-width:1380px;display:flex;flex-direction:column;justify-content:center;gap:18px;padding:0 0 14px}
.welcomeFrames{flex:1;min-height:0;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));align-content:center;justify-items:center;align-items:center;gap:clamp(10px,1.4vw,22px);padding:36px clamp(28px,4vw,50px);width:100%;overflow:visible}
.welcomeFrames img{display:block;width:100%;height:auto;aspect-ratio:1/3;max-height:calc(100svh - 230px);object-fit:contain;border:5px solid #e5e3e9;border-radius:4px;box-shadow:0 15px 30px #0005;transform:rotate(-6deg)}
.welcomeFrames img:nth-child(2){transform:translateY(-15px) rotate(4deg)}
.welcomeFrames img:nth-child(3){transform:translateY(12px) rotate(-3deg)}
.welcomeFrames img:nth-child(4){transform:translateY(-8px) rotate(6deg)}
.welcomeFrames img:nth-child(5){transform:translateY(15px) rotate(-5deg)}
.welcomeFrames img:nth-child(6){transform:translateY(-5px) rotate(6deg)}
.welcome>.large{margin:0;min-width:230px;flex-shrink:0}
.frameLayout{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;height:var(--panel-height);gap:12px}
.frameLayout .mainPanel{height:auto;min-height:0}
.frameLayout .sidePanel{height:auto;min-height:0;padding:12px;gap:10px;overflow:visible}
.frameLayout .panelActions{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:0}
.frameLayout #backHomeFromFrameBtn{order:0}.frameLayout #toFilterBtn{order:1}
.frameLayout .cameraSection:has(.cameraStatus:empty):has(#retryCameraBtn[hidden]){display:none}
.frameGrid{grid-template-columns:repeat(6,minmax(0,1fr));margin-top:12px;align-items:center}
.frameBtn img{max-height:calc(var(--panel-height) - 180px);min-height:0;width:100%;height:auto;aspect-ratio:1/3}
.filterBtn{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:5px;min-height:63px}
.filterBtn small{display:block;white-space:normal;font-size:12px;font-weight:400;line-height:1.35;color:#c4b5fd}
.lightPurple{background:#c4b5fd;border-color:transparent;color:#2e1065}
.choiceLayout{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;height:var(--panel-height);gap:12px}
.choiceLayout .mainPanel{min-height:0;display:flex;flex-direction:column;padding-bottom:16px}
.choiceLayout .sidePanel{height:auto;min-height:0;padding:12px;overflow:visible}
.choiceLayout .panelActions{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px;margin:0}
.choiceLayout #backFromJesusBtn{order:0}.choiceLayout #jesusNo{order:1}.choiceLayout #jesusYes{order:2}
.jesusChoiceGrid{flex:1;min-height:0;margin-top:14px;align-items:stretch;gap:16px}
.jesusChoice{min-height:0;display:flex;flex-direction:column;gap:8px;align-items:center}
.jesusChoice img{flex:1;min-height:0;width:100%;max-height:100%;object-fit:contain;border:1px solid var(--line);padding:10px;border-radius:14px}
.jesusChoice span{flex-shrink:0}
.resultLayout{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.resultLayout .sidePanel{gap:12px;overflow:hidden}
.resultActions{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.resultActions button{min-height:50px}
.qrSection{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:0;width:100%;gap:8px}
#qrArea{display:flex;align-items:center;justify-content:center;width:100%;height:100%;min-height:0}
.qrGrid{display:flex;align-items:center;justify-content:center;width:100%;height:100%;min-height:0}
.qrCard{width:var(--qr-size,100%);height:var(--qr-size,auto);aspect-ratio:1;max-width:100%;max-height:100%;padding:8px;flex-shrink:0}
.qrCard img{display:block;width:100%;height:100%;max-width:100%;max-height:100%;aspect-ratio:1;object-fit:contain}
.qrPlaceholder{min-height:0;height:100%;width:100%}
@media(min-width:701px) and (max-width:1050px){.resultLayout{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}}
@media(min-width:701px) and (max-width:900px) and (min-height:651px){
 .welcomeFrames{grid-template-columns:repeat(3,minmax(0,1fr));gap:22px;padding:28px 40px}
 .welcomeFrames img{width:min(100%,calc((100svh - 250px)/6));max-height:none}
 .frameGrid{grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch}
 .frameBtn img{height:calc((var(--panel-height) - 230px)/2);aspect-ratio:auto;max-height:none}
}
@media(max-width:700px){
 .welcome{height:calc(100svh - 68px);padding:0 0 8px;gap:14px}
 .welcomeFrames{grid-template-columns:repeat(3,minmax(0,1fr));padding:26px 24px;gap:18px 16px}
 .welcomeFrames img{width:min(100%,calc((100svh - 230px)/6));max-height:none;border-width:4px}
 .welcome>.large{min-width:210px;margin:0}
 .frameLayout{height:auto;min-height:var(--panel-height);grid-template-columns:1fr;grid-template-rows:auto auto}
 .frameLayout .mainPanel{height:auto}
 .frameGrid{grid-template-columns:repeat(3,minmax(0,1fr))}
 .frameBtn img{max-height:none;height:auto;aspect-ratio:1/3}
 .filterBtn{align-items:flex-start;min-height:63px;padding:10px 6px;gap:4px}
 .filterBtn small{display:block;font-size:10px;line-height:1.3}
 .choiceLayout{height:var(--panel-height);grid-template-rows:minmax(0,1fr) auto}
 .choiceLayout .panelActions{grid-template-columns:1fr 1fr;gap:8px}
 .choiceLayout #backFromJesusBtn{grid-column:1/-1;order:3}
 .choiceLayout .sidePanel{padding:12px}
 .jesusChoiceGrid{gap:8px}.jesusChoice img{padding:4px;max-height:100%}
 .resultLayout{grid-template-columns:1fr}
 .resultLayout .sidePanel{display:flex;flex-direction:column;height:auto;overflow:visible}
 .resultLayout .qrSection{height:auto;flex:none;min-height:0}
 #qrArea{height:auto;aspect-ratio:1}
 .resultActions{display:grid;grid-template-columns:1fr 1fr;width:100%;margin:0}
 .resultActions button{min-height:48px;font-size:15px}
 .qrCard img{width:100%;height:100%}
}
@media(min-width:701px) and (max-height:650px){
 .welcomeFrames{padding:22px 36px;gap:12px}
 .welcomeFrames img{max-height:calc(100svh - 240px);border-width:4px}
 .frameLayout{grid-template-columns:1fr}
 .frameBtn img{height:auto;max-height:calc(var(--panel-height) - 150px);aspect-ratio:1/3}
 .filterBtn{min-height:56px;padding:8px;gap:3px}
 .filterBtn small{font-size:10px}
 .choiceLayout{grid-template-columns:1fr}
 .choiceLayout .panelActions button{min-height:42px}
 .jesusChoice img{padding:5px}
 .resultLayout{grid-template-columns:minmax(180px,1fr) minmax(380px,1.65fr)}
 .resultLayout .sidePanel{grid-template-columns:minmax(0,1fr) 174px;grid-template-rows:auto minmax(0,1fr) auto;gap:8px 12px}
 .resultLayout .qrSection{grid-column:1;grid-row:2;align-self:stretch;height:100%}
 .resultLayout .printNotice{grid-column:1;grid-row:3}
 .resultLayout .resultActions{display:flex;grid-column:2;grid-row:2/4;align-self:stretch;gap:7px}
 .resultLayout .resultActions button{min-height:36px;font-size:13px}
 .resultLayout .qrCard{padding:6px}
 .resultLayout .qrCard img{width:100%;height:100%}
}
@media(max-width:700px){
 .choiceLayout .jesusChoiceGrid{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:10px;align-items:stretch;justify-items:center}
 .choiceLayout .jesusChoice{width:100%;height:100%;gap:5px}
 .choiceLayout .jesusChoice:last-child{grid-column:1/-1;width:calc((100% - 10px)/2)}
 .choiceLayout .jesusChoice img{min-height:0;max-height:100%;padding:4px}
}

/* Spacing audit: content-sized controls and space reserved only when needed. */
.filterLayout .previewPanel,.captureLayout .previewPanel,.detailsLayout .previewPanel,.resultLayout .previewPanel{justify-self:center;align-self:center;max-width:100%}
:root{--panel-height:calc(100svh - 90px)}
.appShell{padding:0 16px 14px}
.appHeader{height:64px}
main{padding-top:12px}
.feedback{height:0;min-height:0;padding:0;overflow:hidden;line-height:1.4}
.feedback.on{height:auto;min-height:28px;padding:6px 0}
body[data-screen="welcome"] main{padding-top:0}
body[data-screen="welcome"] .feedback{height:0;min-height:0;padding:0}
.card{padding:16px}
.previewPanel{gap:10px}
.stageHolder{background:transparent;border:0;border-radius:0}
.detailsPhotoHolder,.resultItem{background:transparent;border-radius:0}
.frameLayout{height:auto;min-height:0;grid-template-rows:auto auto;gap:10px}
.frameLayout .mainPanel{height:auto;min-height:0}
.frameGrid{flex:none;margin-top:10px;align-items:start;gap:10px}
.frameBtn img{max-height:calc(var(--panel-height) - 170px)}
.frameInfo{margin:7px 0 3px}
.frameLayout .sidePanel,.choiceLayout .sidePanel{padding:10px}
.frameLayout .panelActions,.choiceLayout .panelActions{gap:10px}
.choiceLayout{gap:10px}
.choiceLayout .mainPanel{padding:16px}
.jesusChoiceGrid{margin-top:10px;gap:12px}
.jesusChoice img{padding:0;border:0;background:transparent}
.resultLayout{grid-template-columns:minmax(0,.75fr) minmax(0,1.25fr);gap:12px}
.resultLayout .sidePanel{padding:16px;gap:10px}
.resultLayout .panelHeading{min-height:18px}
.resultActions{gap:8px}
.queuePanel{min-height:0}
.queueList{margin-top:14px;gap:10px}
.queueItem{padding:12px;gap:14px}
.queueEmpty{padding:28px 16px}
.queueStatus{margin:6px 0 0}
.welcomeFrames{flex:none}
.welcome{gap:16px}
@media(min-width:701px) and (max-width:900px) and (min-height:651px){
 .frameBtn img{height:calc((var(--panel-height) - 260px)/2);max-height:none}
}
@media(max-width:700px){
 .appShell{padding:0 12px 12px}
 .appHeader{height:56px}
 main{padding-top:10px}
 .card{padding:12px}
 .eyebrow{font-size:12px}
 .workLayout{gap:10px}
 .frameLayout{min-height:0}
 .frameLayout .mainPanel{padding:12px}
 .frameLayout{gap:8px}
 .frameLayout .sidePanel{padding:6px}
 .frameLayout .frameInfo{margin:3px 0 1px}
 .frameBtn img{height:auto;max-height:none;aspect-ratio:1/3}
 .frameInfo strong{font-size:11px}
 .detailsLayout .previewPanel{height:min(30svh,260px);min-height:0;padding:12px}
 .resultLayout{grid-template-columns:1fr}
 .resultLayout .previewPanel{height:min(45svh,400px);min-height:0;padding:12px}
 .resultLayout .sidePanel{padding:12px;gap:10px}
 .resultActions{margin:0;gap:8px}
 .choiceLayout .mainPanel{padding:12px}
 .choiceLayout .sidePanel{padding:10px}
 .choiceLayout .jesusChoiceGrid{margin-top:10px;gap:8px}
 .choiceLayout .jesusChoice img{padding:0}
 .queuePanel{padding:12px}
 .queuePanel .panelHeading{gap:10px}
 .queueItem{padding:10px;gap:10px}
 .queueEmpty{padding:24px 12px}
 .welcome{gap:12px}
}
@media(min-width:701px) and (max-height:650px){
 .appHeader{height:56px}
 .card{padding:12px}
 .frameBtn img{height:auto;max-height:calc(var(--panel-height) - 145px);aspect-ratio:1/3}
 .choiceLayout .mainPanel,.choiceLayout .sidePanel{padding:10px}
 .resultLayout{grid-template-columns:minmax(180px,1fr) minmax(380px,1.65fr)}
 .resultLayout .sidePanel{padding:12px;gap:6px 10px}
}
/* Restore the preceding right-hand controls; keep the final page geometry. */
.filterLayout .sidePanel,.captureLayout .sidePanel,.detailsLayout .sidePanel{padding:24px}
@media(min-width:701px) and (max-width:1050px){
 .filterLayout .sidePanel,.captureLayout .sidePanel,.detailsLayout .sidePanel{padding:18px}
}
@media(max-width:700px){
 .filterLayout .sidePanel{padding:12px}
 .captureLayout .sidePanel,.detailsLayout .sidePanel{padding:16px}
}
@media(min-width:701px) and (max-height:650px){
 .filterLayout .sidePanel,.captureLayout .sidePanel,.detailsLayout .sidePanel{padding:16px}
}
/* Size the image content by its natural aspect ratio, with a uniform border. */
.welcomeFrames img{box-sizing:content-box;width:min(calc(100% - 10px),calc((100svh - 230px)/3));height:auto;aspect-ratio:auto;max-height:none}
@media(min-width:701px) and (max-width:900px) and (min-height:651px){
 .welcomeFrames img{width:min(calc(100% - 10px),calc((100svh - 250px)/6))}
}
@media(max-width:700px){
 .welcomeFrames img{width:min(calc(100% - 8px),calc((100svh - 230px)/6))}
}
@media(min-width:701px) and (max-height:650px){
 .welcomeFrames img{width:min(calc(100% - 8px),calc((100svh - 240px)/3))}
}
/* Scale visually inside the unchanged QR slot, without affecting layout. */
.resultLayout .qrCard{transform:scale(.7);transform-origin:center}

/* Disable double-tap zoom while retaining scrolling and button taps. */
html,body{touch-action:manipulation}

/* Tighter frame choices: use the recovered space for larger, uncropped images. */
.frameLayout .mainPanel{padding:10px}
.frameLayout .frameGrid{gap:6px;margin-top:6px;justify-items:center}
.frameLayout .frameBtn{padding:2px;width:min(100%,calc((var(--panel-height) - 130px)/3 + 6px));border-radius:9px}
.frameLayout .frameBtn img{width:100%;height:auto;max-height:none;aspect-ratio:auto}
@media(min-width:701px) and (max-width:900px) and (min-height:651px){
 .frameLayout .frameBtn{width:min(100%,calc((var(--panel-height) - 140px)/6 + 6px))}
}
@media(max-width:700px){
 .frameLayout .mainPanel{padding:8px}
 .frameLayout .frameGrid{gap:4px;margin-top:4px}
 .frameLayout .frameBtn{width:min(100%,calc((var(--panel-height) - 140px)/6 + 6px))}
}

/* A prominent welcome action that echoes the purple selection accents. */
#startFlowBtn{position:relative;isolation:isolate;min-width:300px;min-height:76px;padding:14px 22px 14px 34px;gap:42px;border:1px solid #d4bfff;border-radius:999px;background:linear-gradient(115deg,#a879ff 0%,#8b46f5 48%,#7026d9 100%);color:#fff;font-size:25px;font-weight:850;letter-spacing:.14em;box-shadow:0 12px 32px #7333e859,0 0 0 6px #aa7dff12,inset 0 1px 0 #ffffff55;text-shadow:0 1px 2px #45127b55;transition:transform .18s,box-shadow .18s,filter .18s}
#startFlowBtn::after{content:'\2192';display:grid;place-items:center;flex-shrink:0;width:38px;height:38px;border:1px solid #ffffff4d;border-radius:50%;background:#ffffff1f;font-size:24px;font-weight:600;letter-spacing:0;text-shadow:none}
#startFlowBtn:not(:disabled):hover{transform:translateY(-2px);filter:brightness(1.08);box-shadow:0 16px 38px #7333e878,0 0 0 7px #aa7dff1a,inset 0 1px 0 #ffffff66}
#startFlowBtn:not(:disabled):active{transform:translateY(1px) scale(.98);box-shadow:0 6px 18px #7333e850,inset 0 1px 0 #ffffff40}
#startFlowBtn:focus-visible{outline:3px solid #ede4ff;outline-offset:7px}
@media(max-width:700px){#startFlowBtn{min-width:0;width:min(80vw,320px);min-height:68px;font-size:23px;gap:36px}#startFlowBtn::after{width:34px;height:34px;font-size:22px}}
@media(min-width:701px) and (max-height:650px){#startFlowBtn{min-width:260px;min-height:58px;padding:10px 20px 10px 30px;font-size:22px;gap:32px}#startFlowBtn::after{width:32px;height:32px;font-size:21px}}
