:root{color-scheme:light;--text:#081633;--hint:#74859f;--blue:#1478ef;--border:#dce9f6;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;font-size:16px;color:var(--text);background:#f6fbff}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body{margin:0;height:100%}body{background:radial-gradient(circle at 100% 0,rgba(44,154,241,.08),transparent 35%),linear-gradient(180deg,#fbfdff,#f6fbff)}button,input{font:inherit}button{cursor:pointer}button:disabled{cursor:default;opacity:.48}button:focus-visible,input:focus-visible{outline:3px solid #7fc8ff;outline-offset:3px}[hidden]{display:none!important}
#app{height:var(--app-height,100dvh);min-height:0;max-width:560px;margin:auto;display:flex;flex-direction:column;padding:20px 18px 0;padding-top:max(20px,var(--safe-top,0px));position:relative;overflow-y:auto;overscroll-behavior-y:contain}#app>*:not(.city){flex-shrink:0}h1{font-size:24px;line-height:1.2;letter-spacing:-.4px;margin:0;font-weight:800}h2{font-size:22px;line-height:1.3;margin:0 0 10px}.sub{font-size:14px;line-height:1.4;color:var(--hint);margin:6px 0 0}.hero{display:flex;align-items:center;gap:12px;margin-bottom:18px}.hero>div:last-child{min-width:0}.hero-icon{width:50px;height:50px;border-radius:16px;flex:0 0 50px;display:grid;place-items:center;background:linear-gradient(145deg,#e8f6ff,#d9efff);border:1px solid #d6ecfb;box-shadow:0 8px 20px #1f5b910b}.hero-icon svg{width:28px;height:28px}
.progress{display:flex;align-items:center;gap:10px;margin-bottom:14px}.steps{display:flex;flex:1;gap:6px}.step-dot{height:5px;flex:1;background:#e6edf5;border-radius:9px}.step-dot.active{background:linear-gradient(90deg,#2d9bf0,#4ab3ed)}.step-dot.done{background:#27b576}.step-caption{font-size:12px;color:var(--hint);white-space:nowrap}.welcome-card{padding:23px 20px;border:1px solid var(--border);border-radius:22px;background:linear-gradient(145deg,#fff,#f0f8ff);box-shadow:0 12px 32px #1f5b9110}.welcome-card p{font-size:17px;line-height:1.55;margin:0 0 20px;color:#294462}
.btn{width:100%;min-height:52px;padding:12px 16px;border:0;border-radius:16px;background:linear-gradient(135deg,#1478ef,#31aaf2);color:white;font-weight:750;font-size:16px;display:flex;align-items:center;justify-content:center;gap:10px}.btn.secondary{color:#253c59;background:#eef3f8;border:1px solid #e0eaf3}.arrow{font-size:23px;line-height:1}.field-label{display:block;color:#50617b;font-size:15px;font-weight:700;line-height:1.3;margin:14px 2px 7px}.choice-row{width:100%;display:flex;align-items:center;text-align:left;gap:11px;min-height:54px;padding:10px 13px;border:1px solid var(--border);border-radius:16px;background:linear-gradient(180deg,#fff,#f9fcff);box-shadow:0 8px 20px #1f5b9109;color:var(--text)}.choice-icon{width:32px;height:32px;border-radius:11px;display:grid;place-items:center;background:#eef7ff;flex:0 0 32px}.choice-icon svg{width:24px;height:24px}.choice-value{font-size:16px;font-weight:650;line-height:1.35;overflow-wrap:anywhere}.placeholder{color:#95a6bc;font-weight:450}.chevron{margin-left:auto;color:#8293aa;font-size:25px}.input{width:100%;height:52px;padding:0 14px;border:1px solid var(--border);border-radius:16px;outline:0;background:#fff;color:var(--text);font-size:16px}.input:focus{border-color:#4daaf1;box-shadow:0 0 0 3px #e5f3ff}.name-help{font-size:13px;color:var(--hint);line-height:1.4;margin:6px 3px 0}.field-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.field-grid>div{min-width:0}.field-grid .choice-icon{display:none}.language-choices{display:flex;gap:6px;min-height:54px}.language-choice{flex:1;min-width:0;min-height:54px;padding:9px 6px;background:#fff;border:1px solid var(--border);border-radius:15px;font-size:16px;font-weight:650;color:#435a77}.language-choice.selected{border-color:#2496f0;background:#eaf5ff;color:#096dcb;box-shadow:inset 0 0 0 1px #2496f0}
.city,.city.compact{margin:auto -18px 0;line-height:0;display:flex;align-items:flex-end;padding-top:12px;overflow:hidden;flex:1 1 0;min-height:0;max-height:340px;pointer-events:none}.city img{width:100%;height:100%;display:block;object-fit:cover;object-position:center bottom}.landing .city{max-height:460px}.actions{position:sticky;bottom:0;margin:10px -18px 0;padding:11px 18px max(12px,env(safe-area-inset-bottom),var(--safe-bottom,0px));background:rgba(255,255,255,.97);border-top:1px solid #e5edf6;display:flex;gap:10px;z-index:5}.actions .secondary{flex:0 0 28%;width:28%}.actions .primary{flex:1}
.directions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0}.direction{display:flex;align-items:center;text-align:left;gap:10px;background:#fff;padding:11px 12px;border:1.5px solid var(--border);border-radius:16px;min-height:58px;min-width:0;font-size:16px;font-weight:650;line-height:1.3;color:#213a5d;box-shadow:0 7px 20px #1f5b9107}.direction>span:last-child{overflow-wrap:anywhere}.direction.medical-direction{grid-column:1/-1}.direction .radio{width:22px;height:22px;border:2px solid #cbdced;border-radius:50%;flex:0 0 22px}.direction.selected{background:#edf7ff;border-color:#2496f0;color:#0a72d4}.direction.selected .radio{border:6px solid #2496f0}.medical-note{margin-top:12px;background:#eff8ff;border:1px solid #d8ebfa;border-left:3px solid #35a4ee;color:#45617e;padding:10px 12px;border-radius:13px;font-size:14px;line-height:1.4}.review{margin:12px 0 0;padding:12px 14px;background:#eff7ff;border-radius:15px;color:#5a7191;font-size:14px;line-height:1.5;white-space:pre-line;overflow-wrap:anywhere}
.error{background:#fff1f2;border:1px solid #ffd9dd;color:#c52f40;padding:10px 12px;margin-top:10px;border-radius:13px;font-size:14px;line-height:1.4}.info{padding:12px;border:1px solid #dcecff;border-radius:14px;color:#3c5a80;background:#f1f8ff;font-size:14px;line-height:1.4;margin:10px 0}.demo{color:#966315;background:#fff5d6;font-size:12px;padding:7px 10px;border-radius:10px;margin-bottom:10px}.success{padding:10px 2px 0;text-align:center}.success-mark{margin:4px auto 18px;width:72px;height:72px;border-radius:24px;background:linear-gradient(145deg,#e8fff2,#d8f9e7);color:#1da464;display:grid;place-items:center;font-size:40px;box-shadow:0 12px 30px #20b56a1c}.success .review{text-align:left}.receipt{font-size:13px;display:inline-block;border-radius:100px;background:#e9f5ff;color:#3271aa;padding:8px 14px;margin:12px 0 0}.loading{text-align:center;color:var(--hint);margin:100px 10px}.spinner{width:18px;height:18px;border:2px solid #ffffff70;border-top-color:white;border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
.sheet-backdrop{position:fixed;inset:0;bottom:auto;height:var(--app-height,100dvh);background:#05142a75;display:flex;align-items:flex-end;justify-content:center;z-index:50}.sheet{width:100%;max-width:560px;max-height:calc(var(--app-height,100dvh) * .85);background:#fff;border-radius:23px 23px 0 0;display:flex;flex-direction:column;padding:10px 16px max(14px,env(safe-area-inset-bottom));box-shadow:0 -18px 60px #0002;overflow:hidden}.sheet-handle{width:42px;height:5px;border-radius:99px;background:#d8e2ec;margin:0 auto 8px}.sheet-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.sheet-title{font-size:19px;margin:6px 0 12px}.sheet-close{border:0;border-radius:10px;background:#f0f5fa;color:#6e8199;width:36px;min-height:36px;font-size:24px}.sheet-search{height:46px;min-height:46px;margin-bottom:7px;flex-shrink:0}.sheet-list{min-height:0;flex:1 1 auto;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y;scrollbar-width:thin}.sheet-item{display:block;width:100%;text-align:left;border:0;border-bottom:1px solid #edf2f7;background:#fff;padding:10px 12px;min-height:46px;border-radius:12px;font-size:16px;line-height:20px;color:#243a58}.sheet-item span{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere}.sheet-item.selected{background:#eff8ff;color:#087ee4;font-weight:750}.sheet-empty{font-size:14px;padding:18px 10px;color:var(--hint);text-align:center;line-height:1.4}.choice-pagination{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:8px;min-height:34px;font-size:13px;color:#6d819a;flex-shrink:0}.choice-pagination button{background:#f1f7fc;border:1px solid #e1ebf4;border-radius:9px;padding:7px 10px;font-size:13px;min-height:34px;color:#426284}
@media(max-height:700px){#app{padding-top:max(12px,var(--safe-top,0px))}.hero{margin-bottom:12px}.hero-icon{width:44px;height:44px;flex-basis:44px}h1{font-size:22px}.sub{font-size:13px;line-height:1.35}.progress{margin-bottom:10px}.field-label{margin-top:10px}.medical-note{font-size:13px;line-height:1.3;padding:8px 10px;margin-top:10px}.direction{min-height:52px;padding:9px 10px;font-size:15px;gap:8px}.directions{gap:8px}.actions{margin-top:8px;padding-top:9px;padding-bottom:max(10px,env(safe-area-inset-bottom),var(--safe-bottom,0px))}.success-mark{width:60px;height:60px;margin-bottom:12px}.review{font-size:13px;padding:10px 12px}.choice-row{min-height:50px}.language-choice,.language-choices{min-height:50px}.input{height:50px}}
@media(max-width:350px){#app{padding-left:14px;padding-right:14px}.city,.city.compact{margin-left:-14px;margin-right:-14px}.actions{margin-left:-14px;margin-right:-14px;padding-left:14px;padding-right:14px}.hero{gap:9px}.hero-icon{width:40px;height:40px;flex-basis:40px}.field-label{font-size:14px}.language-choice{font-size:15px}.field-grid{gap:9px}.direction{font-size:14px;padding:8px;gap:7px}.direction .radio{width:20px;height:20px;flex-basis:20px}.direction.selected .radio{border-width:5px}.directions{gap:7px}.medical-note{font-size:13px}.btn{font-size:15px;min-height:48px}.sub{font-size:13px}}

@media(max-width:350px){.student-step h1{font-size:20px}}

.sheet-handle,.sheet-head,.sheet-search{flex-shrink:0}
.host-card{margin-top:16px;padding:14px 16px;border:1px solid #bfe3ff;border-left:4px solid #2a9ae9;background:#edf8ff;border-radius:16px}.host-label{display:block;color:#577796;font-size:13px;line-height:1.4;margin-bottom:7px}.host-card strong{display:block;color:#1167aa;font-size:18px}.host-card p{margin:7px 0 0;font-size:13px;line-height:1.4;color:#577796}.qr-card{align-self:center;text-align:center;padding:9px 12px 6px;background:#fff;border:1px solid var(--border);border-radius:20px;box-shadow:0 8px 24px #1f5b9109}.qr-image{display:block;width:214px;height:214px;max-width:64vw;object-fit:contain}.qr-loading{width:214px;max-width:64vw;min-height:180px;display:grid;place-items:center;color:var(--hint);font-size:14px}.qr-card .receipt{margin:0 0 5px}.application-summary{display:flex;flex-direction:column;gap:5px;font-size:14px;line-height:1.4;color:#57718d;margin:13px 0 0;padding:0 3px}.application-summary>strong{font-size:17px;color:var(--text)}.summary-host{margin-top:3px}.attendance-ok{background:#e8faf0;color:#178952;border-radius:12px;padding:10px;margin-top:9px;font-size:13px}.qr-step .city{max-height:150px}.scanner-card{padding:17px;border-radius:20px;border:1px solid var(--border);background:#fff}.scanner-name{font-weight:700;color:#2b608e}.scanner-card p{font-size:15px;line-height:1.45;color:#6c839d;margin:10px 0 16px}.camera-view{position:relative;margin-top:15px;border-radius:16px;overflow:hidden;background:#081633;line-height:0}.camera-view video{display:block;width:100%;height:250px;object-fit:cover}.scan-frame{position:absolute;top:18%;left:22%;width:56%;height:56%;border:3px solid #45d19c;border-radius:12px;pointer-events:none}.camera-stop{position:absolute;bottom:10px;left:15%;width:70%;border:0;border-radius:10px;background:#fffE;color:#19344f;padding:10px;font-size:14px}.scan-result{margin-top:15px;background:#eafff1;border:1px solid #b9eace;border-radius:18px;padding:15px}.scan-result>strong{display:block;color:#188452;font-size:14px}.scan-result h2{margin:10px 0;font-size:20px}.scan-result p{font-size:14px;line-height:1.4;margin:6px 0;color:#48687c}.scan-result>span{display:block;font-size:15px;font-weight:700;margin-top:10px;color:#16855a}.scan-result.duplicate{background:#fff9e9;border-color:#f1dfaa}.scan-result.duplicate>strong{color:#9d721b}.recent-scans{margin:20px 0 0}.recent-scans h2{font-size:16px;margin-bottom:10px}.recent-scans>div{display:flex;flex-direction:column;gap:4px;border-bottom:1px solid #e3edf6;padding:10px 1px;font-size:14px}.recent-scans span,.recent-scans>p{font-size:12px;color:#6e859b}.scanner-step .city{max-height:180px;min-height:60px;flex-shrink:0}.scanner-step .hero{margin-bottom:16px}
@media(max-height:700px){.host-card{padding:11px 13px;margin-top:12px}.host-card strong{font-size:17px}.qr-image{width:168px;height:168px}.qr-loading{min-height:150px}.qr-step .hero{margin-bottom:10px}.qr-step h1{font-size:22px}.application-summary{font-size:13px;gap:3px;margin-top:9px}.application-summary>strong{font-size:15px}.qr-step .city{padding-top:5px}.qr-step .actions{margin-top:7px}.camera-view video{height:210px}}

.host-location{margin-top:10px;border:1px solid #c7e4fa;border-radius:15px;overflow:hidden;background:#eef7fc;flex-shrink:0}.host-location iframe{display:block;width:100%;height:clamp(130px,21dvh,180px);border:0;background:#eef5fa}.map-open{display:flex;align-items:center;justify-content:center;gap:6px;min-height:32px;padding:6px 10px;background:#fff;color:#146db4;font-size:13px;font-weight:650;text-decoration:none}.map-open:focus-visible{outline:3px solid #7fc8ff;outline-offset:-3px}.school-step.has-map .host-card{margin-top:12px;padding:11px 13px}.school-step.has-map .city{max-height:170px}
@media(max-height:700px){.school-step.has-map .hero{margin-bottom:6px}.school-step.has-map .field-label{margin-top:7px;margin-bottom:5px;font-size:13px}.school-step.has-map .choice-row{min-height:44px;padding-top:6px;padding-bottom:6px}.school-step.has-map .host-card{margin-top:9px;padding:8px 10px}.school-step.has-map .host-label{font-size:12px;line-height:1.3;margin-bottom:4px}.school-step.has-map .host-card strong{font-size:16px}.school-step.has-map .host-card p{margin-top:4px;font-size:12px}.school-step.has-map .host-location{margin-top:8px}.school-step.has-map .host-location iframe{height:110px}.school-step.has-map .map-open{min-height:28px;padding:4px 8px;font-size:12px}.school-step.has-map .city{padding-top:0;max-height:55px}.school-step.has-map .actions{margin-top:8px}}

@media(max-height:600px){.school-step.has-map .progress{margin-bottom:6px}.school-step.has-map .hero{margin-bottom:2px}.school-step.has-map .field-label{margin-top:5px;margin-bottom:4px}.school-step.has-map .host-card{margin-top:7px}.school-step.has-map .actions{margin-top:6px}}

/* QR receipt fills the native viewport, independently of Telegram's cached height. */
#app.qr-step{position:fixed;inset:0;height:auto;min-height:0;padding:0;overflow:hidden;overscroll-behavior:none}
#app.qr-step>.qr-content{display:flex;flex-direction:column;flex:1 1 0;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;overflow-anchor:none;padding:max(20px,var(--safe-top,0px)) 18px 0}
.qr-content>*:not(.city){flex-shrink:0}
#app.qr-step>.actions{position:static;flex:0 0 auto;margin:0;width:100%;padding:11px 18px max(12px,env(safe-area-inset-bottom),var(--safe-bottom,0px))}
@media(max-height:700px){#app.qr-step>.qr-content{padding-top:max(12px,var(--safe-top,0px))}#app.qr-step>.actions{padding-top:9px;padding-bottom:max(10px,env(safe-area-inset-bottom),var(--safe-bottom,0px))}}
@media(max-width:350px){#app.qr-step>.qr-content{padding-left:14px;padding-right:14px}#app.qr-step>.actions{padding-left:14px;padding-right:14px}}

/* Give the school map all remaining space down to the action bar. */
#app.school-step.has-map>.host-location{display:flex;flex-direction:column;flex:1 0 140px;min-height:140px}
#app.school-step.has-map>.host-location>iframe{flex:1 1 0;height:0;min-height:0}
#app.school-step.has-map>.host-location>.map-open{flex:0 0 auto}
#app.school-step.has-map>.city{display:none}
#app.school-step.has-map>.actions{margin-top:6px}

@media(min-height:701px){#app.school-step.has-map>.progress{margin-bottom:10px}#app.school-step.has-map>.hero{margin-bottom:8px}#app.school-step.has-map>.field-label{margin-top:10px;margin-bottom:6px}#app.school-step.has-map>.choice-row{min-height:50px}#app.school-step.has-map>.host-card{margin-top:10px;padding:10px 12px}}
