@font-face{font-family:QRNanum;src:url('/static/fonts/NanumGothic.ttf') format('truetype');font-display:swap}.qr-dialog,.qr-scanner,#attendanceStatistics{font-family:QRNanum,'Malgun Gothic',sans-serif}
.qr-dialog{width:min(900px,calc(100vw - 24px));max-height:90dvh;padding:0;border:1px solid #dce4ef;border-radius:18px;color:#23344b;background:#fff;box-shadow:0 24px 90px #17283f44}.qr-dialog::backdrop{background:#10203880}.qr-dialog[open]{display:flex;flex-direction:column}.qr-dialog header,.qr-dialog footer{padding:16px 20px;display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid #e4eaf2;flex-shrink:0}.qr-dialog footer{border-bottom:0;border-top:1px solid #e4eaf2;justify-content:flex-end;flex-wrap:wrap}.qr-dialog h2{margin:0}.qr-dialog header p{margin:5px 0 0;font-size:12px;color:#64748b}.qr-dialog [data-qr-close]{cursor:pointer}.qr-dialog header button{border:0;background:#eff3f8;border-radius:10px;width:36px;height:36px}.qr-tools{display:flex;flex-wrap:wrap;gap:10px;align-items:end;padding:12px 16px}.qr-tools label{display:flex;flex-direction:column;gap:5px;font-size:12px}.qr-tools input,.qr-tools select,.qr-dialog footer select{padding:9px;border:1px solid #ced9e7;border-radius:8px;max-width:100%;background:white;color:#24354a}.qr-tools label:has(input[type=checkbox]){flex-direction:row;align-items:center}.qr-people-list{min-height:120px;overflow:auto;padding:0 16px;flex:1}.qr-person-body{padding:20px;text-align:center;overflow:auto;background:white;color:#111827}.qr-person-body img{display:block;margin:auto;width:min(320px,80vw);max-width:100%;aspect-ratio:1}.qr-person-body h3{font-size:24px;margin:8px}.qr-person-dialog{width:min(440px,calc(100vw - 24px))}.qr-list-row{display:grid;grid-template-columns:28px 1fr 1fr;gap:8px;padding:11px 8px;border-bottom:1px solid #e8edf4;cursor:pointer}.qr-list-row:hover{background:#f4f8ff}.qr-list-row input{width:19px;height:19px}.qr-list-row span{overflow-wrap:anywhere}.qr-system-launch{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:9px;color:inherit;text-decoration:none;border:1px solid #d5dfed;border-radius:11px;background:#f8fbff;font-size:12px;white-space:nowrap}.qr-system-launch svg{width:21px;height:21px}.itda-hide-attendance-scan .qr-system-launch{display:none!important}.qr-video-wrap{position:relative;width:min(720px,100%);margin:12px auto;background:#142132;border-radius:18px;overflow:hidden;aspect-ratio:4/3}.qr-video-wrap video{width:100%;height:100%;object-fit:contain}.qr-viewfinder{position:absolute;pointer-events:none;inset:18%;border:3px solid #9fd65e;border-radius:14px}.qr-scan-result{text-align:center;padding:20px;background:#eff6ff;border-radius:12px;font-size:23px;font-weight:800}.qr-scan-result.success{background:#e8f7ed;color:#166534}.qr-scan-result.error{background:#fff0ef;color:#a32626}.qr-stats-controls{display:flex;flex-wrap:wrap;gap:12px;padding:16px;background:#f5f8fc;border-radius:12px}.qr-stats-controls label{display:flex;flex-direction:column;gap:5px;font-size:12px}.qr-stats-controls input,.qr-stats-controls select{padding:9px;border:1px solid #d3ddeb;border-radius:8px;background:#fff}.qr-stats-services{display:flex;gap:10px;flex-wrap:wrap;padding:14px 0}.qr-stats-services label{display:flex;align-items:center;gap:5px}.qr-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:18px 0}.qr-summary article{padding:18px;border:1px solid #dbe5f0;border-radius:14px;background:#fff}.qr-summary b{display:block;font-size:26px;color:#245ba1}.qr-chart{height:300px;margin:16px 0;background:#fff;border:1px solid #e4ebf3;border-radius:14px}.qr-data-table{width:100%;border-collapse:collapse;font-size:13px}.qr-data-table td,.qr-data-table th{padding:10px;border-bottom:1px solid #e4ebf3;text-align:left}.qr-data-table th{background:#eef3fa;position:sticky;top:0}.qr-table-scroll{max-height:65vh;overflow:auto}.qr-stats-help{font-size:12px;color:#64748b;line-height:1.65}.qr-error{color:#b42318;padding:16px}.qr-members-controls{display:flex;gap:10px;align-items:center;margin:20px 0 10px;flex-wrap:wrap}@media(max-width:700px){.qr-system-launch span{display:none}.qr-system-launch{padding:8px}.qr-summary{grid-template-columns:repeat(2,1fr)}.qr-tools label{flex:1;min-width:110px}.qr-person-dialog[open]{position:fixed;inset:0;width:100%;height:100dvh;max-height:100dvh;max-width:none;margin:0;border:0;border-radius:0}.qr-person-body{flex:1;display:flex;flex-direction:column;justify-content:center}.qr-dialog footer .btn{padding:8px 10px}.qr-stats-controls label{flex:1;min-width:120px}.qr-scanner{padding:12px}.qr-scan-result{font-size:19px}}[hidden]{display:none!important}
#attendanceApp .att-toolbar[hidden],#attendanceApp .att-meta[hidden],#attendanceApp .att-scroll[hidden],#attendanceApp #attendanceStatistics[hidden]{display:none!important}
/* Tablet scanner: camera stage, compact live context, and a quiet receipt-style result. */
.scan-dialog{--scan-ink:#16233a;--scan-blue:#2359b7;--scan-line:#e2e8f1;width:min(940px,calc(100vw - 40px));max-width:940px;max-height:94dvh;margin:auto;padding:0;border:1px solid #ffffffa6;border-radius:26px;background:#f4f7fc;color:var(--scan-ink);box-shadow:0 40px 120px #0b173d55;font-family:QRNanum,'Malgun Gothic',sans-serif;overflow:hidden}.scan-dialog::backdrop{background:#0c1939a6;backdrop-filter:blur(6px)}.scan-dialog[open]{display:flex;flex-direction:column}.scan-modal-head{padding:22px 26px 18px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--scan-line);background:linear-gradient(110deg,#fff 40%,#eaf0ff)}.scan-eyebrow{display:block;color:#5474a2;font-size:10px;letter-spacing:2px;font-weight:800}.scan-modal-head h2{margin:5px 0 0;font-size:24px;letter-spacing:-1px;color:var(--scan-ink)}.scan-close{width:38px;height:38px;border:1px solid #d9e1ee;border-radius:50%;background:#fff;color:#516079;cursor:pointer;font-size:17px}.scan-close:hover{background:#e7edf8}.scan-modal-body{padding:0 24px 20px;overflow:auto;min-height:0}.scan-context-bar{padding:15px 0;display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px}.scan-context-bar>div{display:flex;align-items:center;gap:9px;min-width:0}.scan-context-bar button{flex:none;padding:7px 10px;border:1px solid #d9e2f0;background:#fff;color:#536480;border-radius:9px;font-size:11px;cursor:pointer}.scan-live-dot{width:7px;height:7px;flex:none;border-radius:50%;background:#9caac1;box-shadow:0 0 0 4px #e5eaf2}.camera-on .scan-live-dot{background:#45b994;box-shadow:0 0 0 4px #def4ea}.scan-settings{padding:15px;background:white;border:1px solid var(--scan-line);border-radius:14px;margin-bottom:14px;display:grid;grid-template-columns:1fr 1.5fr 1fr;gap:10px}.scan-settings label{font-size:11px;display:grid;gap:6px;color:#62728a}.scan-settings input,.scan-settings select{width:100%;min-width:0;box-sizing:border-box;padding:9px;border:1px solid #d4deeb;border-radius:9px;background:#f9fbff;color:#243a5b;font-size:13px}.scan-stage{padding:9px;border:1px solid #d7e0ed;background:#e8edf5;border-radius:23px}.scan-camera-surface{position:relative;height:min(43vh,390px);min-height:220px;overflow:hidden;border-radius:16px;background:radial-gradient(ellipse at 50% 30%,#263750,#101d31 75%)}.scan-camera-surface video{display:block;width:100%;height:100%;object-fit:contain}.scan-camera-placeholder{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;color:#dce6f6;pointer-events:none}.scan-camera-placeholder svg{width:56px;height:56px;color:#91a6c7;margin-bottom:6px}.scan-camera-placeholder b{font-size:16px;font-weight:500}.scan-camera-placeholder span{font-size:11px;color:#8da2c1}.scan-frame{position:absolute;inset:16% 24%;pointer-events:none;transition:transform .3s ease,filter .3s ease}.scan-frame i{position:absolute;width:24px;height:24px;border:2px solid #b2c7e8;filter:drop-shadow(0 1px 3px #0005)}.scan-frame i:nth-child(1){top:0;left:0;border-right:0;border-bottom:0;border-radius:8px 0 0}.scan-frame i:nth-child(2){top:0;right:0;border-left:0;border-bottom:0;border-radius:0 8px 0 0}.scan-frame i:nth-child(3){bottom:0;left:0;border-right:0;border-top:0;border-radius:0 0 0 8px}.scan-frame i:nth-child(4){bottom:0;right:0;border-left:0;border-top:0;border-radius:0 0 8px}.scan-camera-status{position:absolute;left:15px;bottom:13px;font:9px ui-monospace,monospace;letter-spacing:1.5px;color:#a3b5d0;padding:6px 8px;border:1px solid #ffffff18;border-radius:6px;background:#0a172c66}.camera-on .scan-camera-status{color:#b0e9d5}.scan-flash{position:absolute;inset:0;pointer-events:none;background:white;opacity:0}.scan-captured-check{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%) scale(.75);width:66px;height:66px;opacity:0;pointer-events:none}.scan-captured-check svg{width:100%;height:100%;stroke:#fff;stroke-width:2.5}.scan-captured-check circle{fill:#229e7de6;stroke:#ffffff88;stroke-width:1}.scan-captured-check path{stroke-dasharray:40;stroke-dashoffset:40;stroke-linecap:round;stroke-linejoin:round}.is-captured .scan-flash{animation:scanShutter .32s ease-out}.is-captured .scan-frame{animation:scanFrameCapture .65s ease-out}.is-captured .scan-frame i{border-color:#a2e2c9}.is-captured .scan-captured-check{animation:scanCheckPop .8s ease-out}.is-captured .scan-captured-check path{animation:scanCheckDraw .35s .1s ease forwards}.scan-receipt{position:relative;display:flex;align-items:center;gap:15px;background:#fff;border:1px solid #e1e7f0;border-radius:14px;margin-top:9px;padding:21px 23px;box-shadow:0 5px 16px #1d385307}.scan-result-icon{display:flex;align-items:center;justify-content:center;flex:none;width:44px;height:44px;border-radius:15px;background:#f0f4fb;color:#7e94b3}.scan-result-icon svg{width:25px;height:25px}.scan-receipt small{display:block;font:9px ui-monospace,monospace;letter-spacing:1.3px;color:#8997ab}.scan-receipt h3{margin:6px 0;font-size:23px;letter-spacing:-.8px;line-height:1.35;color:#192942;font-weight:800;overflow-wrap:anywhere}.scan-receipt p{margin:0;font-size:12px;color:#6a7890;line-height:1.6}.scan-result-time{margin-left:auto;align-self:flex-start;font:11px ui-monospace,monospace;color:#8e9caf;padding-top:2px;white-space:nowrap}.scan-receipt[data-state=success] .scan-result-icon{background:#e7f5ef;color:#26966f}.scan-receipt[data-state=success] small{color:#449178}.scan-receipt[data-state=duplicate] .scan-result-icon{background:#edf3fc;color:#5d7da9}.scan-receipt[data-state=error] .scan-result-icon{background:#fff0ef;color:#ba5d54}.scan-receipt[data-state=error] h3{font-size:17px}.scan-receipt[data-state=pending] h3{font-size:19px}.scan-receipt.is-entering{animation:scanReceiptIn .3s ease-out}.scan-actions{padding:18px 3px 0;display:flex;align-items:center;justify-content:space-between;gap:10px}.scan-actions>span{font-size:11px;color:#75849b}.scan-actions>div{display:flex;gap:8px}.scan-actions button{font:inherit;font-size:12px;border-radius:10px;padding:11px 18px;cursor:pointer}.scan-start{background:#2458ac;border:1px solid #2458ac;color:#fff;box-shadow:0 4px 9px #2458ac24}.scan-stop{background:transparent;border:1px solid #d3ddeb;color:#61728c}.scan-actions button:disabled{opacity:.45;cursor:default}@keyframes scanShutter{0%{opacity:0}12%{opacity:.65}100%{opacity:0}}@keyframes scanFrameCapture{0%,100%{transform:scale(1)}28%{transform:scale(.94)}}@keyframes scanCheckPop{0%{opacity:0;transform:translate(-50%,-50%) scale(.7)}20%,70%{opacity:1;transform:translate(-50%,-50%) scale(1)}100%{opacity:0;transform:translate(-50%,-50%) scale(1.04)}}@keyframes scanCheckDraw{to{stroke-dashoffset:0}}@keyframes scanReceiptIn{from{opacity:.45;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@media(max-width:700px){.scan-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);border-radius:20px}.scan-modal-head{padding:17px 18px 15px}.scan-modal-head h2{font-size:21px}.scan-modal-body{padding:0 12px 16px}.scan-context-bar{font-size:10px;align-items:start;padding:13px 3px;gap:8px}.scan-context-bar>div{line-height:1.8}.scan-live-dot{margin-top:5px}.scan-context-bar button{font-size:10px;padding:7px}.scan-settings{grid-template-columns:1fr 1fr}.scan-settings label:nth-child(2){grid-column:1/-1;grid-row:2}.scan-stage{padding:6px;border-radius:18px}.scan-camera-surface{height:min(40vh,320px);min-height:190px;border-radius:12px}.scan-frame{inset:19% 17%}.scan-receipt{padding:17px 13px;gap:10px;border-radius:12px}.scan-receipt h3{font-size:21px}.scan-receipt p{font-size:11px}.scan-result-icon{width:36px;height:36px;border-radius:12px}.scan-result-time{font-size:9px}.scan-actions{align-items:center;padding-top:14px;gap:8px}.scan-actions>span{font-size:10px;max-width:130px;line-height:1.6}.scan-actions button{padding:10px 12px;font-size:11px}}@media(prefers-reduced-motion:reduce){.scan-dialog .scan-flash{display:none}.scan-dialog .scan-frame,.scan-dialog .scan-captured-check,.scan-dialog .scan-captured-check path,.scan-dialog .scan-receipt{animation:none!important;transition:none!important}.scan-dialog.is-captured .scan-captured-check{opacity:1;transform:translate(-50%,-50%)}.scan-dialog.is-captured .scan-captured-check path{stroke-dashoffset:0}}
.card-select-dialog{width:min(1010px,calc(100vw - 32px));background:#fff;border-radius:24px}.card-select-dialog>header,.card-preview-dialog>header{padding:23px 25px;background:linear-gradient(110deg,#fff,#edf3fd);border-bottom:1px solid #e0e8f2}.card-kicker{display:block;font:9px ui-monospace,monospace;letter-spacing:1.8px;color:#6d86aa;margin-bottom:8px}.card-select-dialog>header h2,.card-preview-dialog h2{font-size:23px;letter-spacing:-.8px;color:#172945;margin:0}.card-select-layout{display:grid;grid-template-columns:minmax(0,1fr) 282px;min-height:0;overflow:hidden;flex:1}.card-select-main{display:flex;flex-direction:column;min-height:0;padding:20px 20px 0}.card-filter-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;font-size:12px;color:#273e5f}.card-filter-heading span{font-size:10px;color:#8b99ac}.card-filter-grid{display:grid;grid-template-columns:1.3fr 1.2fr .8fr .9fr auto;padding:13px;background:#f3f6fb;border:1px solid #e6ecf4;border-radius:13px;gap:8px}.card-filter-grid label{min-width:0;font-size:10px}.card-filter-grid input,.card-filter-grid select{width:100%;min-width:0;font-size:12px;padding:9px 6px}.card-filter-grid .btn{padding:9px 12px;font-size:11px}.card-selection-bar{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:17px 2px 11px;font-size:10px}.card-selection-bar button{border:0;background:none;color:#3e69a4;font-size:10px;padding:0 8px 0 0;cursor:pointer}.card-selection-bar button+button{color:#8c99ac;border-left:1px solid #dce3ed;padding-left:8px}.card-selection-bar label{display:flex;align-items:center;gap:5px;white-space:nowrap;color:#718098}.card-list-head{display:grid;grid-template-columns:28px 1fr 1fr;gap:8px;padding:10px 8px;background:#f7f9fc;border-top:1px solid #e8edf4;border-bottom:1px solid #e8edf4;font-size:10px;color:#7c8ca3}.card-select-main .qr-people-list{padding:0;min-height:180px;max-height:42vh}.card-select-main .qr-list-row{padding:14px 8px;font-size:12px}.card-select-side{background:linear-gradient(160deg,#f1f5fc,#e9eff9);border-left:1px solid #e0e7f2;padding:25px 20px}.card-mini-pair{display:flex;align-items:center;justify-content:center;height:157px;padding:8px 0 12px}.card-mini{position:relative;flex:none;display:flex;flex-direction:column;width:88px;height:139px;border:1px solid #e1e8f2;border-radius:8px;padding:13px 9px;background:#fff;box-shadow:0 9px 20px #1e3b6826;transform:rotate(-8deg);z-index:1}.card-mini.back{transform:rotate(10deg);margin-left:-9px;margin-top:8px;z-index:0}.card-mini img{width:100%;height:20px;object-fit:contain}.card-mini small{font:5px ui-monospace,monospace;color:#386ab3;letter-spacing:1px;margin-top:17px}.card-mini b{font-size:19px;letter-spacing:-1px;color:#152c4a;margin-top:3px}.card-mini b span{font-size:15px;color:#3472c5;position:absolute;right:12px;top:48px;transform:rotate(12deg)}.card-mini i{display:block;height:1px;background:#4c83c9;margin:2px 0}.card-mini em{font-style:normal;font-size:7px;color:#5e718a;margin-top:4px}.card-mini>span{font:3px ui-monospace,monospace;letter-spacing:.3px;color:#8492a5;margin-top:auto}.card-mini-qr{width:48px;height:48px;margin:15px auto 3px;display:grid;place-items:center;border:2px dashed #a8b9d0;color:#6e849f;font:12px ui-monospace,monospace}.card-mini.back b{font-size:10px;text-align:center}.card-side-caption{text-align:center;font-size:9px;color:#7f8fa8;margin:5px 0 20px}.card-side-count{border-top:1px solid #d9e2f0;padding-top:19px}.card-side-count>span{font-size:10px;color:#71849f}.card-side-count strong{display:block;font-size:26px;color:#234e8d;letter-spacing:-1px;margin:7px 0}.card-side-count p{font-size:10px;color:#6881a6;margin:0}.card-side-spec{display:grid;gap:10px;margin:20px 0;font-size:10px}.card-side-spec>span{display:flex;justify-content:space-between;color:#8493a9}.card-side-spec b{font-weight:500;color:#3f5675}.card-flip-label{display:grid;gap:7px;font-size:10px;color:#667e9f}.card-flip-label select{padding:10px;border:1px solid #d5dfed;border-radius:9px;color:#3b567b;background:#fff;font-size:11px;max-width:100%}.card-side-note{font-size:10px;color:#8292aa;line-height:1.8;margin:13px 0 0}.card-select-dialog>footer{background:#fff;padding:16px 24px}.card-footer-hint{margin-right:auto;font-size:10px;color:#8a98ab}.card-select-dialog footer .btn{font-size:12px;padding:11px 17px;border-radius:11px}.card-preview-dialog{display:none;width:min(1120px,calc(100vw - 32px));height:min(94dvh,1000px);max-height:94dvh;margin:auto;padding:0;border:1px solid #dce5f1;border-radius:24px;color:#1b304c;background:#eef2f8;box-shadow:0 40px 120px #12284955;overflow:hidden;font-family:QRNanum,'Malgun Gothic',sans-serif}.card-preview-dialog[open]{display:flex;flex-direction:column}.card-preview-dialog::backdrop{background:#122139a6;backdrop-filter:blur(5px)}.card-preview-dialog header{display:flex;justify-content:space-between;align-items:center;flex:none}.card-preview-dialog header p{font-size:11px;color:#7286a0;margin:8px 0 0}.card-preview-dialog header button{width:36px;height:36px;border:1px solid #d6e1ee;border-radius:50%;background:#fff;color:#6c809d;cursor:pointer}.card-preview-canvas{min-height:0;flex:1;padding:12px}.card-preview-canvas iframe{width:100%;height:100%;display:block;border:0;border-radius:12px;background:#e8edf4}.card-preview-dialog footer{display:flex;justify-content:flex-end;align-items:center;gap:10px;background:#fff;padding:17px 22px;border-top:1px solid #dce5f1;flex:none}.card-preview-dialog footer>span{margin-right:auto;font-size:11px;color:#6c809c}.card-preview-dialog footer button{border-radius:10px;padding:11px 17px;font-size:12px}@media(max-width:760px){.card-select-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 20px);border-radius:19px}.card-select-dialog>header,.card-preview-dialog>header{padding:18px}.card-select-dialog>header h2,.card-preview-dialog h2{font-size:20px}.card-select-layout{display:flex;flex-direction:column;overflow:auto}.card-select-main{padding:16px 13px 0;flex-shrink:0}.card-filter-grid{grid-template-columns:1fr 1fr;padding:10px;gap:8px}.card-filter-grid label{min-width:0;flex:none}.card-filter-grid .btn{grid-column:1/-1}.card-select-main .qr-people-list{max-height:30vh;min-height:135px}.card-select-side{display:grid;grid-template-columns:100px minmax(0,1fr);gap:0 16px;padding:16px;border-left:0;border-top:1px solid #dee6f2;flex:none}.card-mini-pair{grid-column:1;grid-row:1/4;height:120px;transform:scale(.7);transform-origin:left center;width:130px;margin-right:-30px}.card-side-caption,.card-side-note,.card-side-spec{display:none}.card-side-count{grid-column:2;padding-top:0;border:0}.card-side-count strong{font-size:22px;margin:5px 0}.card-flip-label{grid-column:2;font-size:9px;gap:5px;margin-top:10px}.card-flip-label select{font-size:10px;padding:8px}.card-select-dialog>footer{padding:13px;gap:7px}.card-footer-hint{display:none}.card-select-dialog footer .btn{font-size:11px;padding:10px 13px}.card-preview-dialog{width:calc(100vw - 12px);height:calc(100dvh - 12px);max-height:calc(100dvh - 12px);border-radius:18px}.card-preview-canvas{padding:6px}.card-preview-dialog footer{padding:12px;flex-wrap:wrap;gap:8px}.card-preview-dialog footer>span{width:100%;font-size:10px;margin-bottom:2px}.card-preview-dialog footer button{font-size:11px;padding:10px 14px}}
.card-preview-offsets{display:flex;gap:8px}.card-preview-offsets label{display:grid;gap:4px;font-size:9px;color:#7385a0}.card-preview-offsets input{width:69px;padding:5px;border:1px solid #d5dfed;border-radius:7px;color:#3d5475;font-size:11px}@media(max-width:760px){.card-preview-offsets{margin-right:auto}.card-preview-offsets input{width:59px}}

/* Keep QR controls visible in the mobile account menu and the selector inside the viewport. */
.mobile-nav-qr .account-action-icon svg,.profile-menu-item-icon svg{display:block;width:20px;height:20px;flex:none;stroke-linecap:round;stroke-linejoin:round}
@media(max-width:760px){dialog.card-select-dialog[open]{position:fixed;inset:0;margin:auto;box-sizing:border-box;width:calc(100% - 16px);max-width:calc(100% - 16px);height:calc(100vh - 20px);height:calc(100dvh - 20px);max-height:calc(100dvh - 20px);overflow:hidden}.card-select-dialog .card-select-layout{min-height:0;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}.card-select-dialog>header,.card-select-dialog>footer{flex-shrink:0}.mobile-nav-qr .account-action-icon{display:flex!important;align-items:center;justify-content:center}.mobile-nav-qr .account-action-icon svg{display:block!important}}
/* Shared finishing touches for attendance dialogs. */
.qr-button-icon{width:18px;height:18px;flex:none;stroke-linecap:round;stroke-linejoin:round}
.qr-dialog footer .btn,.card-preview-dialog footer .btn{display:inline-flex;align-items:center;justify-content:center;gap:7px}
.qr-dialog button,.card-preview-dialog button,.scan-dialog button{-webkit-tap-highlight-color:transparent;touch-action:manipulation}
.qr-dialog button:focus-visible,.card-preview-dialog button:focus-visible,.scan-dialog button:focus-visible{outline:3px solid #9dbcf2;outline-offset:2px}
.qr-dialog input[type=checkbox],#attendanceStatistics input[type=checkbox]{accent-color:#3262a6;flex:none}
.qr-person-dialog>header{background:linear-gradient(125deg,#fff 45%,#eef4fd);align-items:flex-start}
.qr-person-dialog .qr-person-body{background:radial-gradient(ellipse at 50% 35%,#edf3fc,#f8fafd 72%);padding:28px 24px}
.qr-person-body img{box-sizing:border-box;padding:14px;border:1px solid #e0e8f3;border-radius:20px;background:#fff;box-shadow:0 12px 32px #263f6210}
.qr-person-body h3{margin:20px 0 6px;letter-spacing:-.8px;color:#1c304c}
.qr-person-body p{margin:0;color:#72839a;font-size:13px}
.qr-person-dialog footer{background:#fff}
.card-preview-offsets{display:flex;gap:10px}.card-preview-offsets label{display:grid;gap:5px;font-size:10px;color:#72839a}.card-preview-offsets input{box-sizing:border-box;width:86px;min-width:0;padding:8px 10px;border:1px solid #d9e2ee;border-radius:9px;background:#f7f9fc;color:#243b5b;font:inherit;font-size:13px}
.qr-stats-guide{border:1px solid #e1e8f2;border-radius:12px;background:#f8fafd;margin:14px 0;padding:12px 15px}.qr-stats-guide summary{cursor:pointer;font-size:12px;font-weight:700;color:#627794}.qr-stats-guide .qr-stats-help{margin:10px 0 0}
@media(max-width:760px){
.qr-dialog,.card-preview-dialog,.scan-dialog{box-sizing:border-box;-webkit-text-size-adjust:100%}
.qr-dialog>header,.scan-modal-head,.card-preview-dialog>header{gap:12px}
.qr-dialog header button,.card-preview-dialog header button,.scan-close{width:40px;height:40px;min-width:40px;min-height:40px;flex:none;display:grid;place-items:center}
.qr-dialog .card-kicker,.card-preview-dialog .card-kicker{font-size:9px;letter-spacing:1.4px;margin-bottom:6px}
.qr-dialog header p,.card-preview-dialog header p{font-size:11px;line-height:1.6;overflow-wrap:anywhere}
.qr-person-dialog[open]{inset:8px;width:calc(100% - 16px);height:calc(100vh - 16px);height:calc(100dvh - 16px);max-height:calc(100dvh - 16px);margin:auto;border:1px solid #e1e8f2;border-radius:22px}
.qr-person-dialog>header{padding:20px 18px 17px}.qr-person-dialog h2{font-size:21px;letter-spacing:-.7px}
.qr-person-dialog .qr-person-body{min-height:0;flex:1;padding:22px 18px;justify-content:center;gap:0}
.qr-person-body img{width:min(280px,100%);max-height:48dvh;object-fit:contain;flex-shrink:1;margin:0 auto;padding:12px;border-radius:18px}
.qr-person-body h3{font-size:25px;margin:18px 0 7px}.qr-person-body p{font-size:13px}
.qr-person-dialog footer{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:14px 16px calc(14px + env(safe-area-inset-bottom,0px))}
.qr-dialog footer .btn,.card-preview-dialog footer .btn{min-width:0;min-height:44px;font-size:12px;padding:10px 12px;border-radius:11px;line-height:1.4}
#qrPersonSave{color:#fff;background:#285ba9;border:1px solid #285ba9}
.card-select-main{padding:16px 14px 0}.card-filter-heading{font-size:13px}.card-filter-heading span{font-size:11px}
.card-filter-grid{gap:10px;border-radius:14px;padding:12px}.card-filter-grid label{font-size:11px;gap:7px}.card-filter-grid input,.card-filter-grid select{box-sizing:border-box;min-height:44px;padding:10px;font-size:16px;border-radius:10px}
.card-filter-grid .btn{min-height:42px;font-size:12px;border-radius:10px}
.card-selection-bar{flex-wrap:wrap;gap:8px;padding:12px 0 8px}.card-selection-bar>div{display:flex;gap:4px}.card-selection-bar button{min-height:40px;font-size:11px;padding:8px}.card-selection-bar label{font-size:11px;min-height:36px}.card-selection-bar input{width:18px;height:18px}
.card-list-head{font-size:11px;padding:11px 9px}.card-select-main .qr-list-row{min-height:48px;align-items:center;box-sizing:border-box;padding:12px 9px;font-size:13px;grid-template-columns:28px minmax(0,1fr) minmax(0,1fr)}
.card-select-main .qr-list-row:has(input:checked){background:#edf4ff;color:#244f8e}
.card-select-main .qr-people-list{max-height:34dvh;min-height:145px;overscroll-behavior:contain}
.card-select-side{padding:16px 18px;gap:0 14px}.card-side-count>span{font-size:11px}.card-side-count p{font-size:11px;line-height:1.5}.card-flip-label{font-size:11px}.card-flip-label select{min-height:42px;font-size:13px;width:100%;box-sizing:border-box}
.card-select-dialog>footer{display:grid;grid-template-columns:72px minmax(0,1fr);padding:12px 14px calc(12px + env(safe-area-inset-bottom,0px));box-shadow:0 -5px 18px #20395a08}
.card-preview-dialog footer{display:grid;grid-template-columns:1fr 1fr;padding:12px 14px calc(12px + env(safe-area-inset-bottom,0px));gap:10px}
.card-preview-dialog footer>span{grid-column:1/-1;width:auto;margin:0;line-height:1.6}.card-preview-offsets{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;padding:10px;background:#f5f8fc;border-radius:12px;gap:12px}.card-preview-offsets label{font-size:11px;gap:6px}.card-preview-offsets input{width:100%;height:40px;background:white;font-size:16px}
.scan-modal-head{padding:17px 18px}.scan-modal-body{padding:0 14px 16px}.scan-context-bar{font-size:12px;line-height:1.5}.scan-context-bar button{min-height:40px;font-size:11px}.scan-settings label{font-size:12px}.scan-settings input,.scan-settings select{min-height:44px;font-size:16px}.scan-camera-surface{height:clamp(190px,32dvh,310px);min-height:190px}.scan-receipt{align-items:flex-start;padding:18px 14px}.scan-receipt h3{font-size:23px}.scan-receipt p{font-size:13px;line-height:1.7}.scan-result-time{position:absolute;right:14px;top:15px;font-size:9px}.scan-receipt small{padding-right:45px}.scan-actions{gap:12px;flex-wrap:wrap}.scan-actions>span{font-size:11px;max-width:none}.scan-actions>div{display:flex;margin-left:auto}.scan-actions button{min-height:44px;font-size:12px;padding:10px 15px}
#attendanceStatistics{min-width:0}#attendanceStatistics .qr-stats-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:15px;border:1px solid #e1e8f3;border-radius:16px;background:#f5f8fc}
.qr-stats-controls label{min-width:0!important;font-size:12px;gap:7px}.qr-stats-controls input,.qr-stats-controls select{box-sizing:border-box;width:100%;min-width:0;min-height:44px;font-size:16px;padding:9px 8px;border-radius:10px}.qr-stats-controls label:nth-child(5){grid-column:1/-1}.qr-stats-controls button{min-height:44px;width:100%;font-size:12px;border-radius:11px}
.qr-stats-services{padding:14px 0;gap:8px}.qr-stats-services>label,.qr-stats-services #statsServices label{display:inline-flex;gap:7px;align-items:center;min-height:40px;padding:0 11px;border:1px solid #dfe7f2;border-radius:10px;background:#fff;font-size:12px;box-sizing:border-box}.qr-stats-services label:has(input:checked){background:#edf4ff;border-color:#bfd1ed;color:#285794}.qr-stats-services #statsServices{display:flex;flex-wrap:wrap;gap:8px}.qr-stats-services input{width:17px;height:17px;margin:0}
.qr-members-controls{display:grid;gap:12px;margin:12px 0}.qr-members-controls label{display:grid;gap:7px;font-size:12px;color:#596f8c}.qr-members-controls select{box-sizing:border-box;width:100%;min-width:0;min-height:44px;font-size:14px;border:1px solid #d8e2ef;border-radius:10px;background:#fff;padding:10px;color:#243b5b}
.qr-summary{gap:10px;margin:16px 0 22px}.qr-summary article{padding:15px 12px;border-radius:14px;font-size:12px;line-height:1.6;min-width:0;overflow-wrap:anywhere}.qr-summary b{font-size:25px;letter-spacing:-.8px}#statsResult>h3{font-size:16px;margin:24px 0 12px;color:#243b5b}.qr-chart{height:280px;margin:12px 0 18px;border-radius:16px}.qr-table-scroll{border:1px solid #e0e8f3;border-radius:12px;-webkit-overflow-scrolling:touch;max-width:100%}.qr-data-table{min-width:540px;font-size:12px}.qr-data-table th,.qr-data-table td{padding:12px;white-space:nowrap}.qr-stats-help{font-size:12px;line-height:1.8}
.member-list-actions .member-toolbar-action{min-height:44px!important;height:44px!important;font-size:12px!important;border-radius:12px!important}
}
@media(max-height:560px) and (max-width:760px){.qr-person-dialog .qr-person-body{justify-content:flex-start}.qr-person-body img{max-height:none;width:200px;flex-shrink:0}.scan-camera-surface{height:190px}.qr-person-dialog>header{padding:12px 16px}}

@font-face{font-family:QRCardName;src:url('/static/fonts/design/Jua.ttf') format('truetype');font-display:swap}.card-mini b{font-family:QRCardName,QRNanum,sans-serif;font-weight:400}.card-mini em{font-weight:400;color:#7b8189}.card-mini b span{right:16px;transform:rotate(12deg)}.card-mini b span svg{display:block;width:13px;height:10px}.card-mini.front i{position:relative;margin-right:6px}.card-mini.front i:after{content:'';position:absolute;right:-7px;top:-2px;width:5px;height:5px;background:#add51d;clip-path:polygon(50% 0,61% 35%,98% 35%,68% 57%,79% 94%,50% 72%,21% 94%,32% 57%,2% 35%,39% 35%)}
/* Attendance insights: distinct filters, charts and member roster. */
#attendanceStatistics{--stats-line:var(--border,#e0e7f0);--stats-ink:var(--text,#24364e);--stats-muted:var(--muted,#738298);color:var(--stats-ink)}
#attendanceStatistics .stats-heading{display:flex;justify-content:space-between;align-items:center;gap:18px;margin:6px 0 22px}.stats-eyebrow{font-size:10px;letter-spacing:1.8px;color:var(--primary,#35649b);font-weight:800}.stats-heading h2{font-size:25px;letter-spacing:-1px;margin:7px 0 9px}.stats-heading p{margin:0;font-size:13px;line-height:1.7;color:var(--stats-muted)}
#attendanceStatistics .stats-panel{min-width:0;border:1px solid var(--stats-line);background:var(--surface,#fff);border-radius:17px;padding:20px;box-shadow:0 4px 16px #24365004}#attendanceStatistics .stats-panel-heading{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:17px}.stats-panel-heading h3{font-size:16px;letter-spacing:-.4px;margin:0}.stats-panel-heading p{font-size:12px;line-height:1.6;margin:6px 0 0;color:var(--stats-muted)}.stats-section-mark{font:12px ui-monospace,monospace;color:#9aabc0;border:1px solid #e2e9f2;border-radius:10px;padding:8px}.stats-chart-unit{color:var(--stats-muted);font-size:11px;white-space:nowrap}
#attendanceStatistics .qr-stats-controls{display:grid;grid-template-columns:1.1fr 1.1fr .8fr 1fr 1fr auto;gap:12px;align-items:end;border:0;border-radius:0;background:transparent;padding:0}#attendanceStatistics .qr-stats-controls label{min-width:0;font-size:12px;gap:7px;display:grid}#attendanceStatistics .qr-stats-controls input,#attendanceStatistics .qr-stats-controls select{box-sizing:border-box;width:100%;min-width:0;height:42px;font-size:13px;border-color:#dce4ef;background:var(--surface,#fff);color:var(--stats-ink);border-radius:10px}#attendanceStatistics .stats-services-heading{border-top:1px solid #edf1f6;padding-top:18px;margin-top:20px;font-size:12px;font-weight:700}.stats-services-heading small{margin-left:7px;font-size:11px;color:var(--stats-muted);font-weight:400}#attendanceStatistics .qr-stats-services{padding:12px 0 0;gap:8px;align-items:start}#attendanceStatistics #statsServices{display:flex;flex-wrap:wrap;gap:8px}#attendanceStatistics .qr-stats-services label{display:inline-flex;align-items:center;gap:7px;min-height:36px;padding:7px 11px;border:1px solid #e0e7f0;border-radius:9px;background:var(--surface,#fff);font-size:12px;box-sizing:border-box;cursor:pointer}#attendanceStatistics .qr-stats-services label:has(input:checked){background:var(--primarySoft,#edf4ff);border-color:#bfd1e8;color:var(--primary,#285794)}#attendanceStatistics .qr-stats-services input{width:16px;height:16px;margin:0}#attendanceStatistics .stats-query-status{font-size:12px;color:var(--stats-muted);padding:0 2px;line-height:1.7;margin:15px 0}
#attendanceStatistics .qr-summary{grid-template-columns:repeat(4,minmax(0,1fr));margin:16px 0 20px;gap:14px}#attendanceStatistics .qr-summary article{position:relative;padding:20px;border:1px solid var(--stats-line);border-radius:16px;background:var(--surface,#fff);overflow:hidden}#attendanceStatistics .qr-summary article:before{content:'';position:absolute;left:0;top:19px;bottom:19px;width:3px;border-radius:0 3px 3px 0;background:#7696c2}#attendanceStatistics .qr-summary article:nth-child(2):before{background:#6ca58e}#attendanceStatistics .qr-summary article:nth-child(3):before{background:#b4a0d0}#attendanceStatistics .qr-summary article:nth-child(4):before{background:#d0b079}#attendanceStatistics .qr-summary small{font-size:12px;color:var(--stats-muted)}#attendanceStatistics .qr-summary b{font-size:29px;color:var(--stats-ink);letter-spacing:-1px;margin-top:9px}
.stats-charts-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:16px;margin:0 0 18px}#attendanceStatistics .qr-chart{height:300px;margin:0;border:0;border-radius:0;background:transparent}#attendanceStatistics .stats-table-panel{margin:18px 0}#attendanceStatistics .qr-table-scroll{border:1px solid #e3e9f2;border-radius:11px;max-height:440px;overflow:auto}#attendanceStatistics .qr-data-table{font-size:12px;min-width:620px}#attendanceStatistics .qr-data-table th{background:#f4f7fb;color:#64778f;font-size:11px;font-weight:700;white-space:nowrap}#attendanceStatistics .qr-data-table th,#attendanceStatistics .qr-data-table td{padding:13px 14px;border-bottom:1px solid #edf1f6}#attendanceStatistics .qr-data-table tbody tr:nth-child(even){background:#fafbfd}#attendanceStatistics .qr-data-table tbody tr:hover{background:#f0f5fc}#attendanceStatistics .qr-members-controls{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:14px;padding:15px;background:#f7f9fc;border-radius:12px;margin:0 0 10px}#attendanceStatistics .qr-members-controls label{display:grid;gap:7px;font-size:12px;color:#61748f}#attendanceStatistics .qr-members-controls select{box-sizing:border-box;width:100%;min-width:0;border:1px solid #dce4ef;border-radius:9px;padding:10px;color:var(--stats-ink);background:var(--surface,#fff);font-size:13px}.stats-roster-note{font-size:11px;line-height:1.7;color:var(--stats-muted);margin:10px 0 15px}
/* Added action buttons consume the same ITDA customization variables as existing buttons. */
body :is(.member-list-actions,.qr-dialog,.card-preview-dialog,.scan-dialog,#attendanceStatistics) .itda-action-button{height:var(--itda-action-height)!important;min-height:var(--itda-action-height)!important;border-radius:var(--itda-action-radius)!important;border:1px solid var(--itda-action-border)!important;background:var(--itda-action-bg)!important;color:var(--itda-action-text)!important;font-size:var(--itda-action-font-size)!important;font-weight:var(--itda-action-font-weight)!important;padding:0 15px!important;box-shadow:0 2px calc(3px + var(--itda-action-shadow) * 1px) rgba(15,23,42,calc(var(--itda-action-shadow) / 100))!important}
body :is(.member-list-actions,.qr-dialog,.card-preview-dialog,.scan-dialog,#attendanceStatistics) .itda-action-button:hover:not(:disabled){background:var(--itda-action-hover)!important}
body :is(.member-list-actions,.qr-dialog,.card-preview-dialog,.scan-dialog,#attendanceStatistics) .itda-action-button[hidden]{display:none!important}
body .qr-dialog header .itda-action-button,body .card-preview-dialog header .itda-action-button{width:auto}
@media(max-width:1000px){#attendanceStatistics .qr-stats-controls{grid-template-columns:repeat(3,minmax(0,1fr))}.stats-charts-grid{grid-template-columns:1fr}}
@media(max-width:760px){#attendanceStatistics .stats-heading{align-items:flex-start;flex-wrap:wrap;margin-bottom:16px;gap:12px}.stats-heading h2{font-size:23px}.stats-heading p{font-size:12px}.stats-eyebrow{font-size:9px}#attendanceStatistics .stats-panel{padding:16px 14px;border-radius:15px}#attendanceStatistics .stats-panel-heading{margin-bottom:15px;align-items:flex-start}.stats-panel-heading h3{font-size:15px}.stats-panel-heading p{font-size:11px}#attendanceStatistics .qr-stats-controls{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}#attendanceStatistics .qr-stats-controls label:nth-child(5){grid-column:auto}#attendanceStatistics .qr-stats-controls input,#attendanceStatistics .qr-stats-controls select{height:44px;font-size:16px}#attendanceStatistics #statsQuery{width:100%;align-self:end}#attendanceStatistics .qr-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}#attendanceStatistics .qr-summary article{padding:17px 15px}#attendanceStatistics .qr-summary b{font-size:26px}.stats-charts-grid{gap:14px}#attendanceStatistics .qr-chart{height:270px}.stats-chart-unit{font-size:10px}#attendanceStatistics .qr-members-controls{grid-template-columns:1fr;padding:12px;gap:12px}#attendanceStatistics .qr-members-controls select{min-height:44px;font-size:14px}#attendanceStatistics .qr-stats-services label{min-height:40px}#attendanceStatistics .qr-stats-guide{font-size:12px}#attendanceStatistics .qr-table-scroll{max-height:390px}}
@media(max-width:760px){
/* Consistent attendance filter dimensions, scoped away from table editors and QR art. */
:is(#attendanceApp .att-toolbar,#attendanceStatistics .qr-stats-controls,#attendanceStatistics .qr-members-controls,#qrCardSelector .card-filter-grid,#qrScanner .scan-settings,#attendanceBibleModal .att-bible-toolbar){--att-field-height:42px;--att-field-gap:12px}
body :is(#attendanceApp .att-toolbar,#attendanceStatistics .qr-stats-controls,#attendanceStatistics .qr-members-controls,#qrCardSelector .card-filter-grid,#qrScanner .scan-settings,#attendanceBibleModal .att-bible-toolbar) label{display:grid;align-content:start;gap:7px;min-width:0;max-width:100%;margin:0;font-size:12px;font-weight:600;line-height:18px;color:var(--itda-custom-muted,#64748b)}
body :is(#attendanceApp .att-toolbar,#attendanceStatistics .qr-stats-controls,#attendanceStatistics .qr-members-controls,#qrCardSelector .card-filter-grid,#qrScanner .scan-settings,#attendanceBibleModal .att-bible-toolbar) :is(input:not([type=checkbox]),select){box-sizing:border-box;display:block;width:100%;min-width:0;max-width:100%;height:var(--att-field-height);min-height:var(--att-field-height);margin:0;padding:0 11px;border:1px solid var(--itda-custom-border,#d5dfec);border-radius:9px;background:var(--itda-custom-surface,#fff);color:var(--itda-custom-text,#24374f);font-family:inherit;font-size:13px;font-weight:400;line-height:normal;box-shadow:none}
body :is(#attendanceApp .att-toolbar,#attendanceStatistics .qr-stats-controls,#attendanceStatistics .qr-members-controls,#qrCardSelector .card-filter-grid,#qrScanner .scan-settings,#attendanceBibleModal .att-bible-toolbar) :is(input,select):focus-visible{outline:2px solid var(--itda-custom-primary,#3975bd);outline-offset:2px}
body :is(#attendanceApp .att-toolbar,#attendanceStatistics .qr-stats-controls,#qrCardSelector .card-filter-grid,#qrScanner .scan-settings) input::placeholder{color:#94a3b8;font-weight:400}
body #attendanceApp .att-toolbar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:end;gap:16px 12px;padding:20px}
body #attendanceApp .att-toolbar>.btn{align-self:end;justify-self:start}body #attendanceApp .att-export{grid-column:1/-1;margin:0;justify-content:flex-end;flex-wrap:wrap}
body #attendanceApp .att-worship-filter{min-width:0;max-width:100%;gap:7px;font-size:12px;line-height:18px;font-weight:600}body #attendanceApp .att-worship-filter summary{box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;gap:8px;height:42px;min-height:42px;width:100%;max-width:100%;padding:0 11px;font-size:13px;font-weight:400;line-height:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-radius:9px}body #attendanceApp .att-worship-options{box-sizing:border-box;max-width:min(340px,calc(100vw - 48px));width:max-content;min-width:min(240px,calc(100vw - 48px))}body #attendanceApp .att-worship-options label{display:flex;align-items:center;gap:8px;min-height:36px;font-size:13px;font-weight:400}
body #attendanceStatistics .qr-stats-controls{grid-template-columns:1.15fr 1.15fr .85fr 1fr 1fr auto;gap:16px 12px;align-items:end}body #attendanceStatistics .qr-members-controls{align-items:end;gap:14px}body #qrCardSelector .card-filter-grid{grid-template-columns:1.3fr 1.2fr .8fr .9fr auto;gap:12px;align-items:end}body #qrScanner .scan-settings{grid-template-columns:minmax(0,1fr) minmax(0,1.4fr) minmax(0,1fr);gap:12px;align-items:end}
body #attendanceBibleModal .att-bible-toolbar{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,.8fr) auto;gap:12px;align-items:end}body #attendanceBibleModal .att-bible-toolbar label{min-width:0}
body .card-preview-offsets{align-items:end}body .card-preview-offsets label{gap:7px;line-height:18px;font-size:12px}body .card-preview-offsets input{height:42px;min-height:42px;padding:0 11px;font-size:13px;border-radius:9px}
@media(min-width:761px) and (max-width:1100px){body #attendanceApp .att-toolbar{grid-template-columns:repeat(3,minmax(0,1fr))}body #attendanceStatistics .qr-stats-controls{grid-template-columns:repeat(3,minmax(0,1fr))}body #qrCardSelector .card-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}body #qrCardSelector .card-filter-grid>.btn{grid-column:1/-1;justify-self:end}}
@media(max-width:760px){
:is(#attendanceApp .att-toolbar,#attendanceStatistics .qr-stats-controls,#attendanceStatistics .qr-members-controls,#qrCardSelector .card-filter-grid,#qrScanner .scan-settings,#attendanceBibleModal .att-bible-toolbar){--att-field-height:44px}
body #attendanceApp .att-toolbar{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 10px;padding:15px}body #attendanceApp .att-toolbar>.btn{justify-self:stretch;width:100%}
body #attendanceStatistics .qr-stats-controls,body #qrCardSelector .card-filter-grid,body #qrScanner .scan-settings,body #attendanceBibleModal .att-bible-toolbar{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 10px}
body #attendanceStatistics .qr-stats-controls label:nth-child(5){grid-column:auto}body #attendanceStatistics .qr-members-controls{grid-template-columns:1fr;gap:14px}
body #qrCardSelector .card-filter-grid>.btn{grid-column:1/-1;justify-self:stretch;width:100%}body #qrScanner .scan-settings label:nth-child(2){grid-row:2;grid-column:1/-1}
body #attendanceBibleModal .att-bible-toolbar>.btn{grid-column:1/-1;justify-self:start}
body :is(#attendanceApp .att-toolbar,#attendanceStatistics .qr-stats-controls,#attendanceStatistics .qr-members-controls,#qrCardSelector .card-filter-grid,#qrScanner .scan-settings,#attendanceBibleModal .att-bible-toolbar) :is(input:not([type=checkbox]),select){font-size:16px;padding:0 10px}
body #attendanceApp .att-worship-filter summary{height:44px;min-height:44px;font-size:16px}body .card-preview-offsets input{height:44px;min-height:44px;font-size:16px}
}

}
#attendanceStatistics .qr-members-controls{grid-template-columns:minmax(0,1fr) minmax(0,1.5fr) minmax(0,1fr)}
@media(max-width:760px){#attendanceStatistics .stats-table-panel .stats-panel-heading{flex-wrap:wrap}#attendanceStatistics .qr-members-controls{grid-template-columns:repeat(2,minmax(0,1fr))}#attendanceStatistics .qr-members-controls label:nth-child(2){grid-column:1/-1;grid-row:2}body #attendanceStatistics .qr-members-controls{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Match the page-body spacing used by the other management screens. */
body #attendanceApp #attendanceStatistics{box-sizing:border-box;padding:24px;min-width:0}
body #attendanceStatistics .stats-panel{padding:24px}
body #attendanceStatistics .stats-panel-heading{margin-bottom:22px;gap:16px;align-items:flex-start;flex-wrap:wrap}
body #attendanceStatistics .stats-panel-heading p{margin-top:8px;line-height:1.7}
body #attendanceStatistics .qr-stats-controls{row-gap:18px}
body #attendanceStatistics .stats-services-heading{margin-top:24px;padding-top:20px}
body #attendanceStatistics .qr-stats-services{padding-top:14px;gap:10px}
body #attendanceStatistics #statsServices{gap:10px}
body #attendanceStatistics .stats-query-status{margin:18px 2px;line-height:1.8}
body #attendanceStatistics .stats-query-status:empty{display:none}
body #attendanceStatistics #statsResult{display:grid;gap:24px}
body #attendanceStatistics #statsResult[hidden]{display:none!important}
body #attendanceStatistics .qr-summary{margin:0;gap:16px}
body #attendanceStatistics .qr-summary article{padding:22px}
body #attendanceStatistics .stats-charts-grid{margin:0;gap:24px}
body #attendanceStatistics .stats-table-panel{margin:0}
body #attendanceStatistics .qr-members-controls{padding:18px;margin:0;gap:16px}
body #attendanceStatistics .stats-roster-note{margin:12px 0 20px;line-height:1.8}
body #attendanceStatistics .qr-stats-guide{margin:24px 0 0;padding:16px 18px}
@media(max-width:760px){
body #attendanceApp #attendanceStatistics{padding:18px 14px 22px}
body #attendanceStatistics .stats-panel{padding:20px 15px}
body #attendanceStatistics .stats-panel-heading{margin-bottom:20px;gap:12px}
body #attendanceStatistics .stats-panel-heading>div{min-width:0;flex:1 1 180px}
body #attendanceStatistics .stats-panel-heading>.btn{flex:none;max-width:100%}
body #attendanceStatistics .qr-stats-controls{gap:16px 12px}
body #attendanceStatistics #statsResult{gap:20px}
body #attendanceStatistics .qr-summary{gap:12px}
body #attendanceStatistics .qr-summary article{padding:18px 15px}
body #attendanceStatistics .stats-charts-grid{gap:20px}
body #attendanceStatistics .qr-members-controls{padding:14px;gap:16px 12px}
body #attendanceStatistics .qr-stats-guide{margin-top:20px;padding:15px}
}
body #attendanceStatistics .qr-stats-controls{grid-template-columns:1.05fr 1.05fr .8fr 1.25fr 1fr 1fr auto}
#attendanceStatistics .stats-worship-field{display:grid;gap:7px;min-width:0;font-size:12px;font-weight:600;line-height:18px;color:var(--itda-custom-muted,#64748b)}
#attendanceStatistics #statsWorshipDropdown{position:relative;min-width:0;font-weight:400}
#attendanceStatistics #statsWorshipDropdown>summary{display:flex;align-items:center;justify-content:space-between;gap:8px;box-sizing:border-box;height:42px;padding:0 11px;border:1px solid var(--itda-custom-border,#d5dfec);border-radius:9px;background:var(--itda-custom-surface,#fff);color:var(--itda-custom-text,#24374f);font-size:13px;cursor:pointer;list-style:none}
#statsWorshipDropdown>summary::-webkit-details-marker{display:none}#statsWorshipSummary{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;min-width:0}#statsWorshipDropdown>summary svg{flex:none;transition:transform .15s}#statsWorshipDropdown[open]>summary svg{transform:rotate(180deg)}
#attendanceStatistics .stats-worship-menu{position:absolute;z-index:20;top:calc(100% + 7px);left:0;width:max-content;min-width:100%;max-width:min(320px,calc(100vw - 60px));box-sizing:border-box;padding:10px;border:1px solid #dce4ef;border-radius:12px;background:var(--itda-custom-surface,#fff);box-shadow:0 12px 35px #23375024}
body #attendanceStatistics .stats-worship-menu label{display:flex;align-items:center;gap:9px;padding:10px 8px;min-height:40px;box-sizing:border-box;font-size:13px;font-weight:400;line-height:1.5;cursor:pointer;white-space:normal;border-radius:7px;color:var(--itda-custom-text,#334155)}
#attendanceStatistics .stats-worship-menu label:hover{background:var(--primarySoft,#eff5fc)}#attendanceStatistics .stats-worship-menu input[type=checkbox]{width:18px;height:18px;margin:0;flex:none}#attendanceStatistics .stats-worship-all{border-bottom:1px solid #e8edf4;border-radius:0!important;margin-bottom:6px!important;font-weight:700!important}#attendanceStatistics #statsServices{display:block;max-height:240px;overflow:auto;overscroll-behavior:contain}#attendanceStatistics .stats-worship-menu small{display:block;font-size:11px;color:#8a99ab;padding:10px 8px 4px}
@media(min-width:761px) and (max-width:1100px){body #attendanceStatistics .qr-stats-controls{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:760px){body #attendanceStatistics .qr-stats-controls{grid-template-columns:repeat(2,minmax(0,1fr))}#attendanceStatistics #statsWorshipDropdown>summary{height:44px;font-size:16px}#attendanceStatistics .stats-worship-menu{left:auto;right:0;max-width:calc(100vw - 60px);min-width:max(100%,220px)}body #attendanceStatistics #statsQuery{grid-column:1/-1}}

#attendanceStatistics #statsWorshipDone{width:100%;margin-top:10px}

body #attendanceStatistics .qr-stats-controls{grid-template-columns:.8fr 1.05fr 1.05fr 1.25fr 1fr 1fr auto}@media(min-width:761px) and (max-width:1100px){body #attendanceStatistics .qr-stats-controls{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(max-width:760px){body #attendanceStatistics .qr-stats-controls{grid-template-columns:repeat(2,minmax(0,1fr))}body #attendanceStatistics .qr-stats-controls>label:has(#statsUnit){grid-column:1/-1}}
@media(max-width:760px){body #attendanceStatistics .qr-stats-controls>label:has(#statsUnit){grid-column:auto;order:0}body #attendanceStatistics .stats-worship-field{order:1}body #attendanceStatistics .qr-stats-controls>label:has(#statsStart){order:2}body #attendanceStatistics .qr-stats-controls>label:has(#statsEnd){order:3}body #attendanceStatistics .qr-stats-controls>label:has(#statsOrg){order:4}body #attendanceStatistics .qr-stats-controls>label:has(#statsName){order:5}body #attendanceStatistics #statsQuery{order:6}}

@font-face{font-family:QRCrew;src:url('/static/fonts/itdam/Caveat.ttf') format('truetype');font-display:swap}@font-face{font-family:QROrg;src:url('/static/fonts/design/Gaegu.ttf') format('truetype');font-display:swap}.card-mini.front small{font-family:QRCrew,cursive;font-size:9px;font-weight:500;letter-spacing:0;color:#7b8189;line-height:1;transform:rotate(-5deg);transform-origin:left center}.card-mini em{font-family:QROrg,QRNanum,sans-serif;font-weight:400;color:#7b8189}

.card-mini.front em{margin-top:2px}

body #attendanceStatistics .stats-worship-menu #statsServices label,body #attendanceStatistics .stats-worship-menu label.stats-worship-all{display:flex!important;flex-direction:row!important;align-items:center!important;flex-wrap:nowrap!important;gap:9px!important;white-space:nowrap!important;min-width:0;width:100%}body #attendanceStatistics .stats-worship-menu input[type=checkbox]{display:block!important;flex:0 0 18px!important;width:18px!important;height:18px!important;min-width:18px!important;margin:0!important}body #attendanceStatistics #statsServices label>span{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;line-height:1.6}.stats-worship-empty{padding:10px 8px;color:#7b8a9d;font-size:12px;line-height:1.7}
.qr-preview-paper{display:grid;gap:6px;font-size:11px;color:#71839a;min-width:0}.qr-preview-paper select{height:42px;min-width:0;max-width:100%;padding:0 9px;border:1px solid #d5dfed;border-radius:9px;background:#fff;color:#334b69;font:inherit;font-size:12px}.card-select-side>.card-flip-label+.card-flip-label{margin-top:12px}@media(max-width:760px){.qr-preview-paper{grid-column:1/-1}.qr-preview-paper select{width:100%;font-size:16px;min-height:44px}.card-select-side>.card-flip-label{grid-column:2}}

/* The four ITDA friends roam only inside the recognition receipt. */
.scan-receipt{flex-wrap:wrap}.scan-receipt>div:not(.scan-mates){flex:1;min-width:0}
.scan-mates{position:relative;flex:0 0 100%;width:100%;height:88px;margin-top:4px;border-top:1px solid #eff2f7;overflow:hidden;pointer-events:none}
.scan-mates:after{content:'';position:absolute;left:0;right:0;bottom:3px;height:1px;background:linear-gradient(90deg,transparent,#e4eaf3 15%,#e4eaf3 85%,transparent)}
.scan-mate{position:absolute;bottom:5px;left:0;display:block;width:34px;height:65px;will-change:transform;z-index:1;--mate-color:#7638ef;color:#20212c}
.scan-mate-body{position:absolute;bottom:0;left:3px;display:block;width:28px;height:62px;background:var(--mate-color);border-radius:5px 5px 3px 3px;transform-origin:bottom center;animation:scanMateWalk .65s ease-in-out infinite alternate;box-shadow:inset -3px 0 #00000008}
.scan-mate.black{width:33px;height:51px;--mate-color:#20212c;color:#fff}.scan-mate.black .scan-mate-body{width:27px;height:48px;border-radius:5px}
.scan-mate.yellow{width:34px;height:43px;--mate-color:#ffcf35}.scan-mate.yellow .scan-mate-body{width:28px;height:40px;border-radius:18px 18px 4px 4px}
.scan-mate.orange{width:56px;height:36px;--mate-color:#ff823f}.scan-mate.orange .scan-mate-body{width:50px;height:33px;border-radius:35px 35px 4px 4px}
.scan-mate:nth-child(2) .scan-mate-body{animation-delay:-.2s}.scan-mate:nth-child(3) .scan-mate-body{animation-delay:-.4s}.scan-mate:nth-child(4) .scan-mate-body{animation-delay:-.1s}
.scan-mate-eyes{position:absolute;left:32%;top:34%;width:3px;height:4px;background:currentColor;border-radius:50%;box-shadow:9px 0 currentColor;transition:transform .2s}.scan-mate.faces-left .scan-mate-eyes{transform:translateX(-2px)}.scan-mate-mouth{position:absolute;left:43%;top:52%;width:7px;height:4px;border-bottom:1.5px solid currentColor;border-radius:0 0 8px 8px}.scan-mate-arm{position:absolute;top:45%;width:5px;height:14px;background:var(--mate-color);border-radius:5px;transform-origin:50% 3px}.scan-mate-arm.left{left:-3px;transform:rotate(15deg)}.scan-mate-arm.right{right:-3px;transform:rotate(-15deg)}
.scan-mates.is-greeting .scan-mate-body{animation:scanMateBow 1.2s ease-in-out 2}.scan-mates.is-greeting .scan-mate-arm.right{top:30%;transform:rotate(-145deg);animation:scanMateWave .3s ease-in-out infinite alternate}.scan-mates.is-greeting .scan-mate-eyes{height:3px;background:transparent;border-top:2px solid currentColor;box-shadow:none}.scan-mates.is-greeting .scan-mate-eyes:after{content:'';position:absolute;left:9px;top:-2px;width:3px;border-top:2px solid currentColor}
@keyframes scanMateWalk{from{transform:translateY(0) rotate(-2deg)}to{transform:translateY(-2px) rotate(2deg)}}@keyframes scanMateBow{0%,100%{transform:rotate(0)}35%,65%{transform:rotate(7deg) scaleY(.94)}}@keyframes scanMateWave{from{transform:rotate(-125deg)}to{transform:rotate(-160deg)}}
@media(max-width:760px){.scan-mates{height:80px;margin-top:2px}.scan-receipt{row-gap:10px}}
@media(prefers-reduced-motion:reduce){.scan-mates .scan-mate-body,.scan-mates .scan-mate-arm{animation:none!important;transition:none!important}}

.scan-mates{height:108px}.scan-mate-bubble{position:absolute;z-index:8;top:4px;padding:3px 7px;border:1px solid #e1e7f0;border-radius:10px 10px 10px 3px;background:#fff;color:#728096;font:10px QRNanum,sans-serif;white-space:nowrap;box-shadow:0 2px 6px #26395007}.scan-mate-prop{position:absolute;bottom:5px;left:0;z-index:5;width:13px;height:13px;border:1px solid #8db7c4;border-radius:50%;background:conic-gradient(#f6fcff 0 25%,#9dd1d9 25% 50%,#f6fcff 50% 75%,#9dd1d9 75%)}.scan-mate-prop[data-kind=spark]{background:#e8c46c;border:0;border-radius:0;clip-path:polygon(50% 0,60% 35%,100% 50%,60% 60%,50% 100%,40% 60%,0 50%,40% 35%);bottom:32px}
.scan-mate[data-pose=watch] .scan-mate-body,.scan-mate[data-pose=freeze] .scan-mate-body{animation:none;transform:none}.scan-mate[data-pose=run] .scan-mate-body{animation:scanMateRun .19s infinite alternate}.scan-mate[data-pose=wobble] .scan-mate-body{animation:scanMateWobble .45s infinite}.scan-mate[data-pose=lean] .scan-mate-body{animation:scanMateLean 1.1s infinite alternate}.scan-mate[data-pose=peek] .scan-mate-body{animation:scanMatePeek .75s infinite alternate}.scan-mate[data-pose=sneeze] .scan-mate-body{animation:scanMateSneeze .28s infinite}.scan-mate[data-pose=surprised] .scan-mate-body{animation:scanMateSurprise .55s infinite}.scan-mate[data-pose=surprised] .scan-mate-mouth{border:1px solid currentColor;border-radius:50%;height:5px;width:4px}.scan-mate[data-pose=blush] .scan-mate-body{animation:scanMateBow 1.1s infinite}.scan-mate[data-pose=nod] .scan-mate-body{animation:scanMateBow 1.2s infinite}.scan-mate[data-pose=five] .scan-mate-body{animation:scanMateSurprise .7s infinite}.scan-mate[data-pose=five] .scan-mate-arm.right{transform:rotate(-150deg);top:22%}.scan-mate[data-pose=sneak] .scan-mate-body{animation:scanMateSneak .7s infinite alternate}.scan-mate[data-pose=sleep] .scan-mate-body{animation:scanMateSleep 1.4s infinite alternate}.scan-mate[data-pose=sleep] .scan-mate-eyes{height:1px;transform:rotate(-5deg)}
.scan-mates.is-greeting .scan-mate .scan-mate-body{animation:scanMateBow 1.2s ease-in-out 2}.scan-mates.is-greeting .scan-mate .scan-mate-mouth{width:7px;height:4px;border:0;border-bottom:1.5px solid currentColor;border-radius:0 0 8px 8px}
@keyframes scanMateRun{to{transform:translateY(-4px) rotate(6deg)}}@keyframes scanMateWobble{0%,100%{transform:rotate(0)}30%{transform:rotate(-12deg)}65%{transform:rotate(9deg)}}@keyframes scanMateLean{to{transform:rotate(-13deg)}}@keyframes scanMatePeek{to{transform:rotate(12deg) translateX(3px)}}@keyframes scanMateSneeze{50%{transform:scaleY(.86) rotate(-7deg)}}@keyframes scanMateSurprise{0%,100%{transform:translateY(0)}45%{transform:translateY(-9px) rotate(4deg)}}@keyframes scanMateSneak{to{transform:translateY(-3px) rotate(-8deg)}}@keyframes scanMateSleep{to{transform:scaleY(.92) rotate(4deg)}}
@media(max-width:760px){.scan-mates{height:102px}}@media(prefers-reduced-motion:reduce){.scan-mates .scan-mate .scan-mate-body,.scan-mates .scan-mate .scan-mate-arm{animation:none!important}}

/* The wording itself is the playground; there is no separate character strip. */
.scan-result-copy{position:relative;min-width:0}.scan-word-stage{position:relative;isolation:isolate;margin:6px 0}.scan-word-stage>h3{position:relative;z-index:3;display:inline-block;margin:0!important;background:#fff;border-radius:4px;box-shadow:3px 0 #fff,-3px 0 #fff;transform:translateX(var(--word-shift,0px)) rotate(var(--word-tilt,0deg));transform-origin:50% 80%}
.scan-word-stage.has-mates{height:132px}.scan-word-stage.has-mates>h3{position:absolute;top:53px;left:2px;max-width:calc(100% - 6px)}
.scan-word-stage .scan-mates{position:absolute;inset:0;display:block;box-sizing:border-box;width:100%;height:100%!important;margin:0!important;border:0!important;overflow:hidden;pointer-events:none}.scan-word-stage .scan-mates:after{display:none}.scan-word-stage .scan-mate{bottom:auto;top:0;width:26px;height:48px;transition:opacity .25s}.scan-word-stage .scan-mate-body{width:20px;height:45px}.scan-word-stage .scan-mate.black{width:26px;height:37px}.scan-word-stage .scan-mate.black .scan-mate-body{width:20px;height:34px}.scan-word-stage .scan-mate.yellow{width:28px;height:33px}.scan-word-stage .scan-mate.yellow .scan-mate-body{width:22px;height:30px}.scan-word-stage .scan-mate.orange{width:42px;height:27px}.scan-word-stage .scan-mate.orange .scan-mate-body{width:36px;height:24px}
.scan-word-stage .scan-mate-eyes{left:25%;width:2.5px;height:3px;box-shadow:8px 0 currentColor}.scan-word-stage .scan-mate-mouth{left:36%;width:6px;height:3px}.scan-word-stage .scan-mate-arm{height:10px;width:4px}
.scan-word-slide{position:absolute;inset:0;z-index:1;width:100%;height:100%;opacity:0;transition:opacity .8s;pointer-events:none}.scan-word-stage.is-slide .scan-word-slide{opacity:1}
.scan-word-stage .scan-mate[data-pose=push] .scan-mate-body{animation:scanWordPush .8s ease-in-out infinite alternate}.scan-word-stage .scan-mate[data-pose=push] .scan-mate-arm{transform:rotate(-85deg)}.scan-word-stage .scan-mate[data-pose=climb] .scan-mate-body{animation:scanWordClimb .4s infinite alternate}.scan-word-stage .scan-mate[data-pose=slide] .scan-mate-body{animation:scanWordSlide .6s ease-in-out infinite alternate}.scan-word-stage .scan-mates.is-greeting .scan-mate .scan-mate-body{animation:scanMateBow 1.2s ease-in-out 2}.scan-word-stage .scan-mate-bubble{z-index:6;font-size:9px}
@keyframes scanWordPush{to{transform:rotate(12deg) scaleX(.96)}}@keyframes scanWordClimb{to{transform:rotate(-6deg) translateY(-2px)}}@keyframes scanWordSlide{from{transform:rotate(15deg)}to{transform:rotate(25deg) translateY(-1px)}}
@media(max-width:760px){.scan-word-stage.has-mates{height:136px}.scan-word-stage.has-mates>h3{top:53px;font-size:21px;line-height:1.45}}
@media(prefers-reduced-motion:reduce){.scan-word-stage .scan-mate .scan-mate-body{animation:none!important}.scan-word-stage>h3{transform:none!important}}

.scan-word-stage>h3{background:transparent;box-shadow:none;pointer-events:none}.scan-play-letter{display:inline-block;position:relative;background:#fff;white-space:pre;border-radius:2px;transform-origin:50% 95%;transition:transform .6s;box-shadow:1px 0 #fff,-1px 0 #fff}.scan-word-stage.is-letter-lift .scan-play-letter:nth-child(3){animation:scanLetterLift 1.5s ease-in-out infinite alternate}.scan-word-stage.is-domino .scan-play-letter:nth-child(4n){animation:scanLetterTip 1.5s ease-in-out infinite alternate}.scan-word-stage.is-domino .scan-play-letter:nth-child(4n+1){animation:scanLetterTip 1.5s .15s ease-in-out infinite alternate}.scan-word-stage.is-tug .scan-word-slide{opacity:.8}.scan-word-stage.is-magic .scan-play-letter:nth-child(3n){animation:scanLetterMagic 2.5s ease-in-out infinite}
.scan-word-stage .scan-mate[data-pose=balance] .scan-mate-body{animation:scanMateWobble .8s ease-in-out infinite}.scan-word-stage .scan-mate[data-pose=balance] .scan-mate-arm.left{transform:rotate(85deg)}.scan-word-stage .scan-mate[data-pose=balance] .scan-mate-arm.right{transform:rotate(-85deg)}.scan-word-stage .scan-mate[data-pose=lift] .scan-mate-arm{transform:rotate(160deg);top:20%}.scan-word-stage .scan-mate[data-pose=lift] .scan-mate-body{animation:scanWordLift .7s infinite alternate}.scan-word-stage .scan-mate[data-pose=tug] .scan-mate-body{animation:scanWordPush .65s infinite alternate}.scan-word-stage .scan-mate[data-pose=tug] .scan-mate-arm{transform:rotate(-100deg);top:35%}.scan-word-stage .scan-mate[data-pose=hop] .scan-mate-body{animation:scanMateSurprise .5s infinite}.scan-word-stage .scan-mate[data-pose=balloon]:after{content:'';position:absolute;left:18px;top:-21px;width:15px;height:18px;background:#cce4f3;border-radius:50%;box-shadow:0 8px 0 -7px #a6bfd0}.scan-word-stage .scan-mate[data-pose=balloon]:before{content:'';position:absolute;left:24px;top:-5px;height:21px;border-left:1px solid #a6bfd0}.scan-word-stage .scan-mate[data-pose=magician] .scan-mate-arm.right{transform:rotate(-130deg)}.scan-word-stage .scan-mate[data-pose=magician] .scan-mate-body{animation:scanMateBow 1.2s infinite}.scan-word-stage .scan-mate[data-pose=stretch] .scan-mate-body{animation:scanMateStretch 1s infinite alternate}.scan-word-stage .scan-mate[data-pose=point] .scan-mate-arm.right{transform:rotate(-90deg)}
@keyframes scanLetterLift{to{transform:translateY(-7px) rotate(-4deg)}}@keyframes scanLetterTip{to{transform:rotate(12deg) translateY(2px)}}@keyframes scanLetterMagic{50%{transform:translateY(-3px);opacity:.5}}@keyframes scanWordLift{to{transform:scaleY(.93) rotate(3deg)}}@keyframes scanMateStretch{to{transform:scaleX(1.18) scaleY(.93)}}
.scan-mates.is-greeting .scan-mate{opacity:1!important}.scan-word-stage:has(.is-greeting) .scan-play-letter{animation-play-state:paused!important}
@media(prefers-reduced-motion:reduce){.scan-play-letter{animation:none!important;transition:none!important}}

/* Light weather stays behind the wording, away from the camera feed. */
.scan-word-weather{display:none;position:absolute;inset:0;z-index:0;overflow:hidden;pointer-events:none;border-radius:12px}.scan-word-stage.has-mates .scan-word-weather{display:block}.scan-word-weather i{position:absolute;left:var(--wx);top:-12px;animation-delay:var(--wd)!important;pointer-events:none}
.scan-word-stage[data-weather=clear] .scan-word-weather{background:radial-gradient(ellipse at 85% 5%,#fff4cb50,transparent 65%)}.scan-word-stage[data-weather=clear] .scan-word-weather i{display:none}
.scan-word-stage[data-weather=snow] .scan-word-weather{background:linear-gradient(#edf5fc50,transparent)}.scan-word-stage[data-weather=snow] .scan-word-weather i{width:var(--ws);height:var(--ws);border-radius:50%;background:#bdd1e4;opacity:.5;animation:scanSnow 6s linear infinite}
.scan-word-stage[data-weather=rain] .scan-word-weather{background:linear-gradient(#e7eff750,transparent)}.scan-word-stage[data-weather=rain] .scan-word-weather i{width:1px;height:12px;background:#a4bfd5;opacity:.45;animation:scanRain 1.4s linear infinite}
.scan-word-stage[data-weather=wind] .scan-word-weather i{top:var(--wx);left:-50px;width:32px;height:6px;border-top:1px solid #bdcddd;border-radius:50%;opacity:.55;animation:scanWind 3.3s linear infinite}
.scan-word-stage[data-weather=petals] .scan-word-weather i{width:var(--ws);height:calc(var(--ws) * 1.4);background:#e7bcc8;border-radius:70% 0 70% 20%;opacity:.55;animation:scanPetals 6s linear infinite}
.scan-word-stage[data-weather=stars] .scan-word-weather{background:linear-gradient(#e9e9fb60,transparent)}.scan-word-stage[data-weather=stars] .scan-word-weather i{top:var(--wx);width:var(--ws);height:var(--ws);background:#c5bbdc;clip-path:polygon(50% 0,61% 35%,100% 50%,61% 62%,50% 100%,39% 62%,0 50%,39% 35%);animation:scanStar 2.8s ease-in-out infinite alternate}
@keyframes scanSnow{from{transform:translate(0,-10px)}to{transform:translate(14px,170px)}}@keyframes scanRain{to{transform:translate(-18px,175px)}}@keyframes scanWind{to{transform:translateX(420px)}}@keyframes scanPetals{to{transform:translate(40px,175px) rotate(240deg)}}@keyframes scanStar{from{opacity:.12;transform:scale(.65) rotate(0)}to{opacity:.6;transform:scale(1) rotate(30deg)}}
.scan-word-stage[data-weather=rain] .scan-mate.black:after{content:'';position:absolute;left:-3px;top:-10px;width:34px;height:15px;border-radius:28px 28px 0 0;background:#a7c7d7;border-bottom:1px solid #7c9eb1;z-index:2}.scan-word-stage[data-weather=rain] .scan-mate.black:before{content:'';position:absolute;left:15px;top:2px;height:20px;border-right:1px solid #7c9eb1;z-index:2}
.scan-word-stage[data-weather=snow] .scan-mate.purple .scan-mate-body{border-top:3px solid #edf5fb}
@media(max-width:760px){.scan-weather-setting{grid-column:1/-1}}
@media(prefers-reduced-motion:reduce){.scan-word-weather i{animation:none!important;display:none}.scan-word-stage .scan-word-weather{opacity:.5}}
/* 2026-10-27 scanner layout stability: reserve the character/title and helper-copy space before camera start. */
.scan-word-stage{height:132px;box-sizing:border-box}
.scan-word-stage>h3{position:absolute;top:53px;left:2px;max-width:calc(100% - 6px)}
.scan-word-stage.has-mates{height:132px}
.scan-result-copy>p{min-height:3.2em;box-sizing:border-box}
.scan-actions{min-height:58px;box-sizing:border-box}
.scan-actions>span{display:flex;align-items:center;min-height:3.2em}
@media(max-width:700px){
 .scan-word-stage,.scan-word-stage.has-mates{height:136px}
 .scan-word-stage>h3,.scan-word-stage.has-mates>h3{top:53px;font-size:21px;line-height:1.45}
 .scan-result-copy>p{min-height:3.2em}
 .scan-actions{min-height:64px}
 .scan-actions>span{min-height:3.2em}
}

/* 2026-10-27 scanner mates: keep the same proportions as the login modal and enlarge slightly. */
.scan-word-stage .scan-mate.purple{width:27px;height:66px}
.scan-word-stage .scan-mate.purple .scan-mate-body{left:3px;width:21px;height:63px;border-radius:3px 3px 2px 2px}
.scan-word-stage .scan-mate.black{width:24px;height:49px}
.scan-word-stage .scan-mate.black .scan-mate-body{left:3px;width:18px;height:46px;border-radius:4px 4px 2px 2px}
.scan-word-stage .scan-mate.yellow{width:24px;height:39px}
.scan-word-stage .scan-mate.yellow .scan-mate-body{left:3px;width:18px;height:36px;border-radius:12px 12px 3px 3px}
.scan-word-stage .scan-mate.orange{width:52px;height:34px}
.scan-word-stage .scan-mate.orange .scan-mate-body{left:3px;width:46px;height:31px;border-radius:30px 30px 3px 3px}


/* 2026-10-27 scanner receipt hard lock + staged mate entrance. */
#qrScanResult.scan-receipt{
  box-sizing:border-box;
  min-height:218px;
  height:218px;
  overflow:hidden;
  align-items:flex-start;
  flex-wrap:nowrap;
}
#qrScanResult .scan-result-icon{margin-top:5px}
#qrScanResult .scan-result-copy{
  position:relative;
  flex:1 1 auto;
  min-width:0;
  height:174px;
  overflow:hidden;
}
#qrScanResult .scan-word-stage,
#qrScanResult .scan-word-stage.has-mates{
  position:relative;
  box-sizing:border-box;
  height:120px;
  min-height:120px;
  max-height:120px;
  margin:4px 0 2px;
  overflow:hidden;
}
#qrScanResult .scan-word-stage>h3,
#qrScanResult .scan-word-stage.has-mates>h3{
  position:absolute;
  left:2px;
  right:2px;
  top:58px;
  width:auto;
  max-width:none;
  margin:0!important;
  box-sizing:border-box;
  overflow:hidden;
  overflow-wrap:anywhere;
  word-break:keep-all;
  white-space:normal;
  line-height:1.28;
  max-height:2.56em;
}
#qrScanResult .scan-result-copy>p{
  margin:0;
  height:38px;
  min-height:38px;
  max-height:38px;
  overflow:hidden;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}
#qrScanResult .scan-result-time{flex:0 0 auto}
#qrScanResult .scan-word-stage .scan-mates{overflow:hidden}
#qrScanResult .scan-word-stage.mates-entering .scan-mate-body{animation-duration:.42s}
#qrScanResult .scan-word-stage[data-story=gather] .scan-mate-body{animation:scanMatePeek .7s ease-in-out infinite alternate}

@media(max-width:700px){
 #qrScanResult.scan-receipt{height:222px;min-height:222px;max-height:222px;padding:15px 12px;gap:10px}
 #qrScanResult .scan-result-copy{height:190px}
 #qrScanResult .scan-word-stage,#qrScanResult .scan-word-stage.has-mates{height:128px;min-height:128px;max-height:128px}
 #qrScanResult .scan-word-stage>h3,#qrScanResult .scan-word-stage.has-mates>h3{top:62px;font-size:19px;line-height:1.3;max-height:2.6em}
 #qrScanResult .scan-result-copy>p{height:42px;min-height:42px;max-height:42px;line-height:1.6}
}

/* 2026-10-28: full camera viewport and continuous, speed-bounded story routes. */
.scan-camera-surface #qrVideo{width:100%;height:100%;object-fit:cover!important;object-position:50% 50%}
#qrWaitingMates .scan-mate{will-change:transform;transition:none;animation:scanMateAppear .65s ease both}
.scan-mate-facing{position:absolute;inset:0;display:block;transform:rotateY(0deg);transition:transform .28s ease-in-out;transform-origin:center}
.faces-left .scan-mate-facing{transform:rotateY(180deg)}
#qrWaitingMates .scan-mate.faces-left .scan-mate-eyes{transform:none}
#qrWaitingMates .scan-mate[data-turning] .scan-mate-body{animation:none;transform:scaleY(.98)}
#qrWaitingMates .scan-mate[data-pose=walk] .scan-mate-body{animation:scanMateGentleWalk .8s ease-in-out infinite alternate}
.scan-story-held{position:absolute;left:55%;top:35%;width:23px;height:25px;color:#6e8bab;opacity:0;transition:opacity .5s,rotate .8s;pointer-events:none;z-index:4}
.scan-story-held svg,.scan-story-scenery svg{width:100%;height:100%;display:block}
.scan-story-held.is-visible{opacity:1}.scan-story-held.upside-down{rotate:180deg}
.scan-story-scenery{position:absolute;left:45%;bottom:4px;width:30px;height:32px;color:#a2b5c8;opacity:0;transition:opacity .7s;z-index:1;pointer-events:none}
.scan-story-scenery.is-visible{opacity:.8}
#qrWaitingMates .scan-mate-bubble{max-width:calc(100% - 10px);white-space:normal;line-height:1.4;font-size:9px;background:#f6f9fce8;color:#7c90aa;box-shadow:none;border:0;padding:3px 6px}
#qrWaitingMates .scan-mate-bubble:after{display:none}
#qrScanResult .scan-word-stage[data-season=passion] .scan-mate-body,#qrScanResult .scan-word-stage[data-season=lent] .scan-mate-body{animation-duration:1.5s}
@keyframes scanMateGentleWalk{from{transform:rotate(-2deg) translateY(0)}to{transform:rotate(2deg) translateY(-1.5px)}}
@keyframes scanMateAppear{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){.scan-mate-facing,.scan-story-held,.scan-story-scenery{transition:none!important}#qrWaitingMates .scan-mate{animation:none!important}}

#qrScanResult .scan-word-stage[data-prop=umbrella] .scan-story-held{top:-17px;left:-1px;width:32px;height:34px}
#qrScanResult .scan-word-stage[data-prop=balloon] .scan-story-held{top:-24px;left:50%}
#qrScanResult .scan-word-stage[data-season=pentecost] .scan-story-held,#qrScanResult .scan-word-stage[data-season=pentecost] .scan-story-scenery{color:#c87655}
#qrScanResult .scan-word-stage[data-season=christmas] .scan-story-held,#qrScanResult .scan-word-stage[data-season=christmas] .scan-story-scenery{color:#799b8b}
#qrScanResult .scan-word-stage[data-season=harvest] .scan-story-scenery{color:#b89b64}
/* Reserve the clock width so attendance feedback cannot squeeze the playground. */
#qrScanResult .scan-result-time{width:42px;min-width:42px}
#qrScanResult .scan-word-stage[data-season=pentecost][data-prop=flame] .scan-story-held{top:-19px;left:28%;width:17px;height:20px}
#qrWaitingMates.is-greeting .scan-mate .scan-mate-body{animation:scanMateBow 1.2s ease-in-out 2}
#qrWaitingMates.is-greeting .scan-mate-arm.right{top:30%;transform:rotate(-145deg);animation:scanMateWave .3s ease-in-out infinite alternate}
#qrWaitingMates.is-greeting .scan-mate-facing{transform:rotateY(0deg)}
