/* v4: supplied device-specific backgrounds and LEO QA feedback. */
@font-face{font-family:KinoMono;src:url('/share-tech-mono-v1.ttf') format('truetype');font-display:optional}
:root{color-scheme:dark;--cyan:#04e0ee;--muted:#8aafbf;--line:#08778b;--green:#55ec86;--red:#ff687b;font-family:Arial,Helvetica,sans-serif;color:#edfaff;background:#001018}*{box-sizing:border-box}body{margin:0}button,input,a{-webkit-tap-highlight-color:transparent}button,input{font:inherit}button,a{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:wait;opacity:.6}button:focus-visible,a:focus-visible,input:focus-visible{outline:2px solid #b4fbff;outline-offset:5px}button{color:inherit}a{color:var(--cyan)}[hidden]{display:none!important}.auth-body{min-height:100svh;background:#001018 url('/auth/cinema-hall-v1.webp') center/cover fixed no-repeat}.auth-stage{min-height:100svh;display:grid;place-items:center;padding:42px 24px;background:linear-gradient(90deg,#00081022,#00081005 50%,#00081022)}.auth-panel{position:relative;width:min(620px,100%);min-height:654px;display:flex;flex-direction:column;padding:48px 48px 30px;background:linear-gradient(140deg,#00131bee,#000b11ee);border:1px solid #13c6e1;box-shadow:0 0 0 6px #00172066,0 24px 80px #000a,inset 0 0 45px #03728a12;clip-path:polygon(14px 0,calc(100% - 14px) 0,100% 14px,100% calc(100% - 14px),calc(100% - 14px) 100%,14px 100%,0 calc(100% - 14px),0 14px)}.auth-panel:before,.auth-panel:after{content:'';position:absolute;width:30px;height:30px;pointer-events:none;border:solid #4bedff66}.auth-panel:before{left:12px;bottom:12px;border-width:0 0 1px 1px}.auth-panel:after{right:12px;top:12px;border-width:1px 1px 0 0}.auth-brand{text-align:center;margin-bottom:42px}.auth-brand img{display:block;width:290px;max-width:80%;height:auto;margin:auto;filter:drop-shadow(0 0 14px #0bdbea18)}.auth-brand p{font-size:11px;letter-spacing:.54em;color:#8db6ce;margin:18px 0 0;padding-left:.54em}h1,h2,p{margin-top:0}.auth-panel h1{font-size:29px;letter-spacing:.06em;text-align:center;margin-bottom:14px;line-height:1.25}.subtitle{text-align:center;font-size:16px;line-height:1.6;color:#94dce8;margin-bottom:28px}.code-entry{position:relative;height:72px;margin-top:34px}.code-cells{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px;height:100%;pointer-events:none}.code-cells span{display:grid;place-items:center;font-size:34px;font-weight:500;border:1px solid #1684a0;background:linear-gradient(155deg,#00334a55,#00101744);clip-path:polygon(5px 0,calc(100% - 5px) 0,100% 5px,100% calc(100% - 5px),calc(100% - 5px) 100%,5px 100%,0 calc(100% - 5px),0 5px);transition:border-color .18s,background .18s}.code-cells span.active{border-color:var(--cyan);background:#003746;box-shadow:inset 0 0 22px #00dff222}.code-cells span.active:empty:after{content:'';height:28px;width:2px;background:var(--cyan);animation:cursor 1.2s ease-in-out infinite}#access-code{position:absolute;inset:0;width:100%;height:100%;font-size:20px;opacity:0;cursor:text}.text-action{display:block;border:0;border-bottom:1px solid var(--cyan);background:none;padding:8px 0;color:var(--cyan);font-size:12px;font-weight:700;letter-spacing:.13em;margin:28px auto 10px}.keypad{display:none;grid-template-columns:repeat(3,1fr);gap:8px;margin:18px auto 4px;max-width:285px}.keypad button{height:48px;border:1px solid #12607a;background:#001d2ac9;font-size:23px;color:#b9f6ff;border-radius:3px}.keypad button:active{background:#07516a}.united{display:flex;align-items:center;justify-content:center;gap:11px;color:var(--green);font-size:11px;font-weight:500;letter-spacing:.15em;padding-top:25px;border-top:1px solid #13455477;margin-top:auto;white-space:nowrap}.united svg{width:21px;height:21px;flex-shrink:0}.auth-message{min-height:42px;margin:14px 0 12px;color:#a9d7e0;text-align:center;font-size:13px;line-height:1.5}.auth-message.error{color:#ffa2ae}.auth-panel.success{border-color:var(--green);box-shadow:0 0 45px #36dd7438}.success .code-cells span{color:#9cffb5;border-color:var(--green);background:#073c2d}.auth-panel.error{border-color:var(--red)}.error .code-cells{animation:shake .32s ease-in-out}.error .code-cells span{border-color:var(--red);background:#421a29}.primary{width:100%;padding:15px 14px;border:1px solid var(--cyan);border-radius:3px;background:linear-gradient(#00314188,#001722);box-shadow:inset 0 0 16px #0ae4ef0d;color:#edfaff;letter-spacing:.05em;font-size:16px;font-weight:600;display:flex;justify-content:center;align-items:center;gap:20px}.primary:hover{background:#053648}.primary span{font-size:23px;font-weight:400}.close-step{position:absolute;right:23px;top:16px;border:0;background:none;font-size:31px;color:#7eb7c8}.name-label,.avatar-field legend{font-size:11px;letter-spacing:.15em;color:#a4cbd9}.name-input{display:block;width:100%;border:1px solid #1684a0;background:#00111a;padding:14px;margin:9px 0 24px;color:white;font-size:16px;border-radius:3px}.name-input::placeholder{color:#648b9c}.avatar-field{margin:0 0 24px;padding:0;border:0;min-width:0}.avatar-field legend{margin-bottom:12px}.avatar-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px}.avatar-choice{position:relative;cursor:pointer;aspect-ratio:1;display:block}.avatar-choice input{position:absolute;opacity:0}.avatar-choice img{width:100%;height:100%;object-fit:cover;display:block;border:1px solid #16566c;border-radius:5px}.avatar-choice input:checked+img{border:2px solid var(--cyan);box-shadow:0 0 12px #00e5ef55}.avatar-choice input:focus-visible+img{outline:2px solid white;outline-offset:3px}.avatar-choice span{display:none;position:absolute;right:-3px;top:-4px;border-radius:50%;background:var(--cyan);color:#00272e;font-size:10px;width:17px;height:17px;place-items:center}.avatar-choice input:checked~span{display:grid}.issued-code{display:block;width:100%;padding:32px 14px 16px;border:1px solid var(--cyan);background:linear-gradient(#002c3baa,#001b24aa);box-shadow:inset 0 0 35px #00cbeb18,0 0 15px #00c1e51a;border-radius:8px;margin:30px 0}.issued-code output{display:block;font-size:48px;font-weight:600;letter-spacing:.06em;text-shadow:0 0 22px #9af5ff44}.issued-code small{display:block;text-align:right;color:var(--cyan);font-size:10px;letter-spacing:.09em;margin-top:22px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.auth-panel:has(#register-view:not([hidden])) .auth-brand{margin-bottom:27px}.auth-panel:has(#register-view:not([hidden])) h1{font-size:26px}.auth-panel:has(#register-view:not([hidden])) .subtitle{margin-bottom:23px}
@keyframes cursor{0%,100%{opacity:.15}50%{opacity:1}}@keyframes shake{0%,100%{transform:translateX(0)}25%{transform:translateX(-5px)}75%{transform:translateX(5px)}}
@media(max-width:600px){.auth-stage{padding:20px 16px;align-items:center}.auth-panel{min-height:660px;padding:34px 22px 25px}.auth-brand{margin-bottom:29px}.auth-brand img{width:240px}.auth-brand p{font-size:9px;letter-spacing:.46em}.auth-panel h1{font-size:23px;letter-spacing:.08em}.subtitle{font-size:14px;margin-bottom:20px}.code-entry{height:53px;margin-top:23px}.code-cells{gap:6px}.code-cells span{font-size:26px}.keypad{display:grid}.text-action{margin-top:18px}.united{font-size:9px;letter-spacing:.1em;gap:8px;padding-top:19px}.united svg{width:19px;height:19px}.auth-message{font-size:12px;min-height:34px;margin:10px 0}.avatar-grid{gap:9px;grid-template-columns:repeat(4,minmax(0,1fr));max-width:320px;margin:auto}.avatar-choice{max-height:65px}.name-input{margin-bottom:18px}.avatar-field{margin-bottom:18px}.issued-code output{font-size:36px}.primary{font-size:13px}.auth-panel:has(#register-view:not([hidden])) .auth-brand{margin-bottom:22px}.auth-panel:has(#register-view:not([hidden])) h1{font-size:22px}.auth-panel:has(#code-view:not([hidden])){min-height:660px}}
@media(max-height:550px) and (orientation:landscape){.auth-stage{padding:18px}.auth-panel{min-height:440px;width:600px;padding:24px 40px}.auth-brand{margin-bottom:20px}.auth-brand img{width:200px}.auth-brand p{margin-top:10px}.keypad{display:none}.auth-panel h1{font-size:23px}.code-entry{height:52px;margin-top:15px}.united{padding-top:15px}.auth-message{min-height:20px}.text-action{margin-top:15px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
/* Admin uses the same restrained cinema palette, without a decorative backdrop. */
.admin-body{background:#080e12;color:#e1f1f5;min-height:100svh}.admin-header{height:82px;display:flex;align-items:center;gap:28px;padding:0 max(24px,4vw);border-bottom:1px solid #23414b;background:#071219}.admin-header img{width:145px;height:auto;display:block}.admin-header>span{color:#7aabbf;letter-spacing:.2em;font-size:11px}.admin-header>div{margin-left:auto;display:flex;align-items:center;gap:20px}.admin-header a{text-decoration:none;font-size:13px}.admin-body button{background:#10212a;border:1px solid #2e5363;padding:9px 13px;border-radius:3px}.admin-main{max-width:1600px;margin:34px auto;padding:0 max(24px,4vw)}.section-heading{display:flex;justify-content:space-between;align-items:center;gap:20px}.eyebrow{font-size:11px;color:#69a2b9;letter-spacing:.19em;margin-bottom:10px}.admin-main h1{font-size:28px;font-weight:500;margin-bottom:12px}.admin-main h2{font-size:19px;font-weight:500;margin:0 0 9px}.muted{font-size:12px;color:#7fa0ad;line-height:1.65}.metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin:26px 0}.metric{border:1px solid #223d48;padding:22px;background:linear-gradient(130deg,#10212b,#0b161c);min-height:154px}.metric h3{font-size:12px;letter-spacing:.08em;color:#8bb5c5;margin:0 0 18px}.metric strong{font-size:27px;font-weight:500;display:block;margin-bottom:13px}.metric p{font-size:12px;line-height:1.7;color:#9cbac6;margin:0}.online{color:#62dfa4}.offline{color:#e3b177}.members-panel{border:1px solid #223d48;background:#0c151b;padding:24px;margin-bottom:20px}.members-panel input{border:1px solid #2e5363;background:#081017;color:#d7edf5;padding:11px;max-width:210px;min-width:0}.table-wrap{overflow-x:auto;margin-top:17px}table{width:100%;border-collapse:collapse;font-size:13px;text-align:left}th{font-size:10px;font-weight:500;text-transform:uppercase;letter-spacing:.1em;color:#7da6b6;padding:15px 10px;border-bottom:1px solid #274550;white-space:nowrap}td{padding:14px 10px;border-bottom:1px solid #1b313b;white-space:nowrap}td.person{display:flex;gap:12px;align-items:center}.person img{width:42px;height:42px;object-fit:cover;border-radius:4px}.person small{display:block;margin-top:5px;color:#6f9caf;font-size:10px}.table-actions{display:flex;gap:6px}.table-actions button{font-size:11px;padding:8px}.table-actions button.danger{color:#ff96a0;border-color:#62333f}.member-count{color:#55dcec;font-size:14px}dialog{border:1px solid #2a8195;background:#091820;color:#e8f7fa;border-radius:6px;padding:30px;width:min(480px,calc(100vw - 30px));max-height:85svh}dialog::backdrop{background:#000b;backdrop-filter:blur(3px)}.dialog-close{float:right}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}.admin-body dialog p{line-height:1.65;color:#98b8c6}.admin-body dialog output{display:block;text-align:center;font-size:42px;letter-spacing:.09em;padding:24px 0;color:#9ff6ff}.events{list-style:none;padding:0;max-height:48svh;overflow-y:auto}.events li{padding:12px 0;border-bottom:1px solid #26414c}.events small{display:block;margin-top:5px;color:#7fa5b7;font-size:11px}.admin-body button:hover{border-color:#15d9e6}.admin-message{color:#ffa2ae}
@media(max-width:1000px){.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.admin-header{height:65px;padding:0 16px;gap:12px}.admin-header img{width:98px}.admin-header>span{display:none}.admin-header>div{gap:10px}.admin-header a,.admin-header button{font-size:11px}.admin-main{padding:0 16px;margin-top:25px}.admin-main h1{font-size:21px}.section-heading{align-items:flex-start;flex-wrap:wrap;gap:12px}.metric-grid{gap:10px;margin:20px 0}.metric{padding:15px;min-height:155px}.metric strong{font-size:23px}.metric h3{font-size:10px}.metric p{font-size:11px}.members-panel{padding:15px}.members-panel input{max-width:none;width:100%}.section-heading>input{flex:1}.section-heading>div{min-width:0}.admin-main>.section-heading>button{font-size:12px}}
/* One square desktop terminal, shared by all three steps. */
.auth-panel{width:min(700px,100%);min-height:700px;padding:36px 52px 26px;--state:#06dcec;--state-soft:#06dcec22;border-color:var(--state)}
.auth-panel::before{inset:17px;width:auto;height:auto;border:0;background:linear-gradient(var(--state),var(--state)) left top/32px 1px,linear-gradient(var(--state),var(--state)) left top/1px 32px,linear-gradient(var(--state),var(--state)) right top/32px 1px,linear-gradient(var(--state),var(--state)) right top/1px 32px,linear-gradient(var(--state),var(--state)) left bottom/32px 1px,linear-gradient(var(--state),var(--state)) left bottom/1px 32px,linear-gradient(var(--state),var(--state)) right bottom/32px 1px,linear-gradient(var(--state),var(--state)) right bottom/1px 32px;background-repeat:no-repeat;opacity:.65}
.auth-panel::after{content:none}
.auth-brand{margin-top:36px;margin-bottom:62px}
.auth-brand img{width:320px}
.auth-panel h1{font-family:"Arial Narrow","SF Pro Display","Segoe UI",sans-serif;font-weight:500;letter-spacing:.16em;font-size:32px}
#login-view h1{display:flex;align-items:center;justify-content:center;gap:20px}
#login-view h1::before,#login-view h1::after{content:'';height:1px;flex:1;max-width:52px;background:linear-gradient(90deg,transparent,var(--state))}
#login-view h1::after{transform:rotate(180deg)}
#login-view .subtitle{font-family:"SFMono-Regular","Roboto Mono",Consolas,"Liberation Mono",monospace;letter-spacing:.14em;color:var(--state)}
.code-entry{height:78px;margin-top:34px}
.code-cells{gap:10px}
.code-cells span{font-size:29px;color:var(--state);text-shadow:0 0 14px var(--state-soft)}
.code-cells span.active:empty::after{content:none;animation:none}
#access-code{caret-color:transparent;cursor:default}
.text-action{font-family:"SFMono-Regular","Roboto Mono",Consolas,"Liberation Mono",monospace;font-weight:400;font-size:14px;letter-spacing:.12em}
.united{font-family:"SFMono-Regular","Roboto Mono",Consolas,"Liberation Mono",monospace;border-top:0;gap:10px;padding-top:18px}
.united::before,.united::after{content:'';height:1px;width:52px;background:linear-gradient(90deg,transparent,#55ec8655)}
.united::after{transform:rotate(180deg)}
.auth-message{min-height:30px;margin:10px 0}
.auth-panel:has(#register-view:not([hidden])) .auth-brand,.auth-panel:has(#code-view:not([hidden])) .auth-brand{margin-top:0;margin-bottom:24px}
.auth-panel:has(#register-view:not([hidden])) .auth-brand img{width:250px}
.auth-panel:has(#register-view:not([hidden])) h1{font-size:26px;margin-bottom:8px}
.auth-panel:has(#register-view:not([hidden])) .subtitle{font-size:14px;margin-bottom:18px}
.name-input{height:46px;margin-bottom:18px}
.avatar-grid{max-width:444px;margin:auto;gap:8px}
.avatar-field{margin-bottom:18px}
.avatar-field legend{margin-bottom:10px}
.primary{min-height:52px;padding:12px 14px}
.auth-panel.success{--state:#53f1a9;--state-soft:#53f1a933}
.auth-panel.error{--state:#ff526a;--state-soft:#ff526a33}
.auth-panel:is(.success,.error) :is(h1,.subtitle,.text-action,.keypad button,.united){color:var(--state);border-color:var(--state)}
.auth-panel:is(.success,.error) .auth-brand img{filter:drop-shadow(0 0 14px var(--state))}
.auth-panel:is(.success,.error) .keypad button{box-shadow:inset 0 0 22px var(--state-soft)}
@media(min-width:760px){.auth-stage{padding:24px}.auth-panel{height:700px}}
@media(max-width:600px){.auth-panel,.auth-panel:has(#code-view:not([hidden])){min-height:740px}.auth-panel:has(#register-view:not([hidden])){padding-top:28px}.auth-panel:has(#register-view:not([hidden])) .auth-brand img{width:220px}}
@media(max-width:600px){.auth-panel{padding:30px 22px 25px}.auth-brand{margin-top:4px;margin-bottom:32px}.auth-brand img{width:240px}.auth-panel h1{font-size:24px;letter-spacing:.1em}#login-view h1{gap:10px}#login-view h1::before,#login-view h1::after{max-width:24px}#login-view .subtitle{letter-spacing:.1em}.code-entry{height:53px;margin-top:23px}.code-cells{gap:6px}.code-cells span{font-size:25px}.keypad button{border-radius:0;-webkit-touch-callout:none;user-select:none}.avatar-grid{max-width:320px;gap:9px}.united{gap:7px;font-size:9px;letter-spacing:.08em}.united::before,.united::after{width:18px;flex-shrink:1}.united svg{width:18px;height:18px}.auth-panel:has(#register-view:not([hidden])) h1{font-size:22px}}
@media(max-height:550px) and (orientation:landscape){.auth-panel{min-height:440px;height:auto;padding:24px 40px}.auth-brand{margin-top:0;margin-bottom:20px}.auth-brand img{width:200px}.code-entry{height:52px;margin-top:15px}.auth-panel h1{font-size:23px}}

/* Compact steps and the LEO code card. Background is a single image. */
.auth-stage{position:relative;z-index:1}
.auth-panel:has(#login-view:not([hidden])) .auth-brand{margin-top:48px;margin-bottom:46px}
.auth-panel:has(#login-view:not([hidden])) .united{margin-top:26px}
.text-action{transition:color .15s}
.text-action:hover{border-bottom-color:transparent;text-decoration:none}
.primary:hover{text-decoration:none}
.code-cells span{position:relative;font-size:0}
.code-cells span:not(:empty)::before{content:'';position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:block;width:12px;height:12px;border-radius:50%;background:var(--state);box-shadow:0 0 12px var(--state),0 0 24px var(--state-soft)}
.code-cells span.active{background:linear-gradient(155deg,#00334a55,#00101744);box-shadow:none}
.profile-preview{display:flex;align-items:center;gap:16px;padding-bottom:14px;margin-bottom:18px;border-bottom:1px solid #19506377;min-width:0}
.profile-preview img{flex:0 0 54px;object-fit:cover}
.profile-preview>div{min-width:0;text-align:left}
.profile-preview small{display:block;font-size:10px;letter-spacing:.14em;color:var(--cyan);margin-bottom:7px}
.profile-preview strong{display:block;font-size:18px;font-weight:600;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.auth-panel:has(:is(#register-view,#code-view):not([hidden])) .auth-brand{margin:0 0 18px}
.auth-panel:has(:is(#register-view,#code-view):not([hidden])) .auth-brand img{width:180px}
.auth-panel:has(:is(#register-view,#code-view):not([hidden])) .auth-brand p{font-size:8px;margin-top:9px}
.auth-panel:has(:is(#register-view,#code-view):not([hidden])) h1{font-size:26px;letter-spacing:.06em;margin-bottom:8px}
.auth-panel:has(:is(#register-view,#code-view):not([hidden])) .subtitle{font-size:14px;margin-bottom:14px}
.avatar-grid{max-width:416px}
.name-input{margin-bottom:14px}
.issued-code{position:relative;min-height:146px;display:flex;align-items:center;justify-content:center;margin:20px 0 16px;padding:36px 20px;border-radius:0;border-color:#299d6c;background:linear-gradient(135deg,#0a3427c9,#041c17e6);box-shadow:inset 0 0 32px #30f5a309;color:#beffe2}
.issued-code:hover{background:linear-gradient(135deg,#104631df,#06251ee6);border-color:#60e6a4}
.issued-code-line{display:flex;align-items:center;justify-content:center;gap:14px;font-family:"SFMono-Regular",Consolas,monospace;font-size:44px;font-weight:700;line-height:1.3}
.issued-code output{font:inherit;letter-spacing:.14em;text-indent:.14em;text-shadow:none;font-variant-numeric:tabular-nums}
.issued-code small{position:absolute;right:14px;bottom:12px;margin:0;font-size:9px;letter-spacing:.07em;color:#8fefbe}
.copy-icon{position:absolute;right:15px;top:14px;width:20px;height:20px;color:#bcfadb}
.back-action{font-size:12px;margin:15px auto 0;color:#95b7c5;border-color:#95b7c5}
@media(max-width:600px){
 .auth-panel:has(#login-view:not([hidden])) .auth-brand{margin-top:4px;margin-bottom:27px}
 .auth-panel:has(#login-view:not([hidden])) .united{margin-top:auto}
 .code-cells span{font-size:0}.code-cells span:not(:empty)::before{width:10px;height:10px}
 .profile-preview{gap:12px;padding-bottom:12px;margin-bottom:14px}.profile-preview img{width:44px;height:44px;flex-basis:44px}.profile-preview strong{font-size:16px}
 .auth-panel:has(:is(#register-view,#code-view):not([hidden])) .auth-brand{margin-bottom:15px}
 .auth-panel:has(:is(#register-view,#code-view):not([hidden])) .auth-brand img{width:154px}
 .auth-panel:has(:is(#register-view,#code-view):not([hidden])) h1{font-size:21px;letter-spacing:.045em}
 .auth-panel:has(:is(#register-view,#code-view):not([hidden])) .subtitle{font-size:12px;margin-bottom:14px}
 .avatar-grid{max-width:270px;gap:8px}.avatar-choice{max-height:58px}
 .issued-code{padding:34px 8px;min-height:142px}.issued-code-line{font-size:clamp(25px,8.2vw,34px);gap:8px}
 .issued-code output{letter-spacing:.08em;text-indent:.08em}
}
@media(max-height:550px) and (orientation:landscape){
 .auth-panel:has(#login-view:not([hidden])) .auth-brand{margin-top:0;margin-bottom:20px}
 .auth-panel:has(#login-view:not([hidden])) .united{margin-top:12px}
 .auth-panel:has(:is(#register-view,#code-view):not([hidden])){min-height:620px}
}

/* LEO Visual QA v0.8.960 reference: numeric material and responsive geometry.
   KINO keeps its own six-digit credential, clear key, branding and account flow. */
.keypad{width:100%;max-width:none;gap:10px;margin:18px 0 4px}
.keypad button{display:grid;place-items:center;align-content:center;gap:4px;min-width:0;height:74px;padding:7px 0 6px;border:1px solid #33a4c357;border-radius:0;clip-path:polygon(9px 0,calc(100% - 9px) 0,100% 9px,100% calc(100% - 9px),calc(100% - 9px) 100%,9px 100%,0 calc(100% - 9px),0 9px);background:linear-gradient(155deg,#041a25e8,#000b12f7);color:#eefcff;font-family:"SF Pro Display",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;box-shadow:inset 0 0 22px #005a7e0e,0 4px 12px #0003;transition:transform 75ms,border-color 110ms,background 110ms;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.keypad button b{font-size:34px;line-height:.95;font-weight:390;pointer-events:none}
.keypad button small{font-size:7px;font-weight:560;line-height:1;letter-spacing:.2em;text-indent:.2em;pointer-events:none}
.keypad button svg{width:28px;height:28px;pointer-events:none}
.keypad button[data-key=clear],.keypad button[data-key=back]{color:#5ee6ff}
.keypad button[data-key=clear] b{font-size:25px}
.keypad button:active{background:linear-gradient(155deg,#073c4cf5,#001e2afa);border-color:#34e6fffa;box-shadow:0 0 20px #27dfff47,inset 0 0 24px #27dfff24;transform:translateY(1px) scale(.975)}
.auth-panel:is(.success,.error) .keypad button{background:linear-gradient(155deg,var(--state-soft),#000b12f7);border-color:var(--state);color:var(--state)}
@media(max-width:600px) and (orientation:portrait){
 .auth-stage{padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));align-items:start}
 .auth-panel,.auth-panel:has(#code-view:not([hidden])){height:calc(100svh - 24px);min-height:620px;padding:24px 16px 20px}
 .auth-panel{background:linear-gradient(140deg,#00131be8,#000b11eb)}
 .auth-panel:has(#register-view:not([hidden])){padding-top:24px}
 .auth-panel:has(#login-view:not([hidden])) .auth-brand{margin:4px 0 24px}
 .auth-brand img{width:240px}.auth-brand p{margin-top:12px}
 .auth-panel h1{font-size:clamp(23px,6.8vw,29px);font-weight:600;letter-spacing:.12em;margin-bottom:14px}
 .code-entry{height:clamp(44px,12.8vw,58px);margin-top:20px}
 .keypad{gap:clamp(6px,1.2svh,10px) 10px;margin-top:16px}
 .keypad button{height:clamp(48px,calc((100svh - 475px)/4),74px)}
 .keypad button b{font-size:clamp(28px,8.6vw,36px)}
 .auth-panel:has(#login-view:not([hidden])) .united{margin-top:12px;padding-top:8px}
 .auth-panel:has(#login-view:not([hidden])) .auth-message{min-height:18px;margin:5px 0}
 .text-action{margin-top:18px}
 .auth-panel:has(:is(#register-view,#code-view):not([hidden])) .auth-brand{margin-bottom:12px}
 .profile-preview{margin-bottom:12px;padding-bottom:10px}
}
@media(min-width:601px) and (max-width:900px) and (orientation:portrait){
 .auth-stage{padding:12px}.auth-panel{height:calc(100svh - 24px);min-height:740px}
 .auth-panel:has(#login-view:not([hidden])) .auth-brand{margin-top:24px;margin-bottom:34px}
 .code-entry{height:58px;max-width:390px;margin:22px auto 0}
 .keypad{display:grid;max-width:344px;gap:11px 13px;margin:22px auto 4px}
 .keypad button{height:82px}.auth-panel:has(#login-view:not([hidden])) .united{margin-top:16px}
}
@media(min-width:601px) and (max-width:1450px) and (max-height:720px) and (orientation:landscape){
 .auth-stage{padding:6px 8px;min-height:100svh}
 .auth-panel,.auth-panel:has(:is(#register-view,#code-view):not([hidden])){width:100%;max-width:1400px;height:calc(100svh - 12px);min-height:0;padding:20px clamp(22px,3vw,42px);display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);grid-template-rows:minmax(0,1fr) repeat(4,auto);column-gap:clamp(22px,4vw,56px)}
 .auth-panel>section{display:contents}
 .auth-panel .auth-brand,.auth-panel:has(#login-view:not([hidden])) .auth-brand{grid-column:1;grid-row:1;margin:0;align-self:center}
 .auth-panel .auth-brand img{width:min(320px,84%)}
 #login-view h1{grid-column:1;grid-row:2;font-size:clamp(18px,2.6vw,30px);margin:14px 0 8px;letter-spacing:.1em}
 #login-form{grid-column:2;grid-row:1/6;align-self:center;min-width:0}
 #login-form .subtitle{font-size:12px;margin:0 0 10px;line-height:1.4}
 .code-entry{height:clamp(42px,14svh,88px);margin:0}
 .keypad{display:grid;max-width:none;gap:clamp(5px,1.3svh,10px) 8px;margin:10px 0 0}
 .keypad button{height:clamp(40px,12.5svh,84px)}.keypad button b{font-size:clamp(22px,6.5svh,36px)}
 #new-account{grid-column:1;grid-row:3;margin:12px auto 4px;font-size:12px}
 .auth-message{grid-column:1;grid-row:4;min-height:18px;font-size:11px;margin:5px 0}
 .auth-panel .united,.auth-panel:has(#login-view:not([hidden])) .united{grid-column:1;grid-row:5;align-self:end;margin:0;padding-top:6px;font-size:8px;gap:6px}
 .united::before,.united::after{width:24px}.united svg{width:16px;height:16px}
 .auth-panel:has(:is(#register-view,#code-view):not([hidden])) .auth-brand{grid-column:1;grid-row:1;margin:0;align-self:center}
 .auth-panel:has(:is(#register-view,#code-view):not([hidden])) .auth-brand img{width:200px}
 .profile-preview{grid-column:1;grid-row:2;margin:14px 0 8px;padding-bottom:10px}
 #register-view h1,#code-view h1{grid-column:1;grid-row:3;font-size:22px;margin:6px 0}
 #register-view .subtitle{display:none}
 #register-form{grid-column:2;grid-row:1/6;align-self:center}
 .name-input{height:42px;margin:7px 0 10px}
 .avatar-field{margin-bottom:12px}.avatar-field legend{margin-bottom:8px}
 .avatar-grid{max-width:414px;gap:6px}.avatar-choice{max-height:clamp(42px,12svh,68px)}
 .primary{min-height:44px;font-size:13px;padding:10px}
 #code-view .subtitle{grid-column:2;grid-row:1;align-self:end;margin:0;font-size:12px}
 .issued-code{grid-column:2;grid-row:2;min-height:132px;margin:12px 0}
 #saved-code{grid-column:2;grid-row:3}.back-action{grid-column:2;grid-row:4;margin:10px auto 0}
}
@media(max-width:600px) and (max-height:700px) and (orientation:portrait){
 .auth-panel,.auth-panel:has(#register-view:not([hidden])){padding-top:18px;padding-bottom:16px}
 .auth-panel:has(#login-view:not([hidden])) .auth-brand{margin:0 0 18px}.auth-brand img{width:210px}.auth-brand p{margin-top:8px}
 .auth-panel:has(:is(#register-view,#code-view):not([hidden])) .auth-brand img{width:126px}
 .auth-panel:has(:is(#register-view,#code-view):not([hidden])) .auth-brand p{margin-top:6px;font-size:7px}
 .profile-preview img{width:36px;height:36px;flex-basis:36px}.profile-preview{margin-bottom:10px;padding-bottom:8px}
 .avatar-choice{max-height:48px}.avatar-field{margin-bottom:12px}.avatar-field legend{margin-bottom:8px}
 .auth-panel:has(:is(#register-view,#code-view):not([hidden])) h1{font-size:20px}
 .auth-panel:has(:is(#register-view,#code-view):not([hidden])) .subtitle{margin-bottom:10px}
 .auth-message{min-height:20px;margin:6px 0}.united{padding-top:10px}
}

/* Shorter frames: no repeated registration heading or profile on code step. */
.auth-panel{height:auto;min-height:0}
.auth-panel:has(#login-view:not([hidden])){padding-top:42px;padding-bottom:30px}
.auth-panel:has(#login-view:not([hidden])) .auth-brand{margin:0 0 32px}
#new-account{margin:22px auto 0}
.auth-message:empty{display:none}
.auth-panel:has(#login-view:not([hidden])) .united{margin-top:34px;padding-top:0}
.auth-panel:has(#register-view:not([hidden])){height:auto;min-height:0;padding-top:28px;padding-bottom:26px}
.auth-panel:has(#register-view:not([hidden])) .profile-preview h1{font-family:Arial,Helvetica,sans-serif;font-size:11px;font-weight:600;letter-spacing:.14em;text-align:left;color:var(--cyan);margin:0 0 7px}
.auth-panel:has(#register-view:not([hidden])) .united{margin-top:22px;padding-top:0}
.auth-panel:has(#code-view:not([hidden])){height:auto;min-height:0;padding:48px 52px 36px;display:flex;flex-direction:column}
#code-view{display:block}
.auth-panel:has(#code-view:not([hidden])) #code-view h1{font-size:28px;font-weight:600;margin:0 0 12px}
.auth-panel:has(#code-view:not([hidden])) .subtitle{color:#71e6a9;margin:0;line-height:1.6}
.auth-panel:has(#code-view:not([hidden])) .back-action{margin:16px auto 0}
@media(max-width:600px){
 .auth-stage{align-items:center}
 .auth-panel:has(#login-view:not([hidden])){height:auto;min-height:0;padding:26px 16px 22px}
 .auth-panel:has(#login-view:not([hidden])) .auth-brand{margin:0 0 22px}
 .auth-panel:has(#login-view:not([hidden])) .united{margin-top:22px;padding-top:0}
 #new-account{margin:16px auto 0}
 .auth-panel:has(#register-view:not([hidden])){padding:24px 20px}
 .auth-panel:has(#code-view:not([hidden])){padding:34px 22px 26px}
 .auth-panel:has(#code-view:not([hidden])) #code-view h1{font-size:23px}
}
@media(min-width:601px) and (max-width:900px) and (orientation:portrait){
 .auth-panel:has(#login-view:not([hidden])){height:auto;min-height:0}
}
@media(min-width:601px) and (max-width:1450px) and (max-height:720px) and (orientation:landscape){
 .auth-panel:has(#login-view:not([hidden])),.auth-panel:has(#register-view:not([hidden])){height:calc(100svh - 12px);padding:20px clamp(22px,3vw,42px)}
 .auth-panel:has(#login-view:not([hidden])) .auth-brand{margin:0}
 .auth-panel:has(#login-view:not([hidden])) .united,.auth-panel:has(#register-view:not([hidden])) .united{margin:0;padding-top:6px}
 #new-account{margin:12px auto 4px}
 .auth-panel:has(#code-view:not([hidden])){width:min(700px,100%);padding:30px 44px}
 .auth-panel:has(#code-view:not([hidden])) .issued-code{min-height:116px;margin:16px 0 12px}
}
@media(max-width:600px) and (max-height:700px) and (orientation:portrait){
 .auth-panel:has(#login-view:not([hidden])){padding-top:20px;padding-bottom:18px}
 .auth-panel:has(#login-view:not([hidden])) .auth-brand{margin-bottom:18px}
 .auth-panel:has(#login-view:not([hidden])) .united{margin-top:16px}
}

/* Idle signal loss, adapted from the final chat-room access terminal. */
@media(min-width:601px) and (max-height:400px) and (orientation:landscape){
 .auth-panel:has(#code-view:not([hidden])){padding:18px 40px}
 .auth-panel:has(#code-view:not([hidden])) #code-view h1{font-size:22px;margin-bottom:6px}
 .auth-panel:has(#code-view:not([hidden])) .subtitle{font-size:12px;line-height:1.4}
 .auth-panel:has(#code-view:not([hidden])) .issued-code{min-height:90px;margin:10px 0;padding:20px 10px}
 .auth-panel:has(#code-view:not([hidden])) .issued-code-line{font-size:30px}
 .auth-panel:has(#code-view:not([hidden])) .back-action{margin-top:6px;min-height:38px}
}
.auth-body{background-image:url('/auth/background-pc-v4.webp')}
@media(orientation:portrait){.auth-body{background-image:url('/auth/background-mobile-v14.webp')}}
#access-hint{min-height:1.5em;margin-bottom:0}
#access-hint.error{color:#ff8797}
.success #access-hint{color:var(--green)}
.keypad button[data-key=mode]{color:#5ee6ff}
.keypad button[data-key=mode] b{font-size:23px}
.settings-row{display:flex;gap:16px;align-items:end;flex-wrap:wrap}
.settings-row label{display:grid;gap:8px;font-size:13px;color:#a4cbd9}
.settings-row select{background:#081017;color:#d7edf5;border:1px solid #2e5363;padding:11px}
.settings-panel h2{margin-bottom:12px}
@media(max-width:600px) and (orientation:portrait){
 .auth-stage{padding:18px 22px}
 .auth-panel:has(#login-view:not([hidden])){padding:22px 12px 20px}
 .auth-panel:has(#login-view:not([hidden])) .auth-brand{margin-bottom:18px}
 .auth-brand img{width:216px}
 #access-hint{font-size:13px;letter-spacing:.08em}
 .keypad{border:1px solid #14718a66;padding:7px;gap:7px;margin-top:12px}
 .keypad button{height:clamp(44px,calc((100svh - 440px)/4),68px)}
 .keypad button b{font-size:30px}
 #new-account{font-size:13px;margin-top:12px}
 .auth-panel:has(#login-view:not([hidden])) .united{font-size:9px;letter-spacing:.08em;margin-top:18px;gap:7px}
 .united::before,.united::after{width:18px}
}
@media(min-width:601px) and (max-width:1450px) and (max-height:720px) and (orientation:landscape){
 .auth-stage{padding:12px 18px}
 .auth-panel:has(#login-view:not([hidden])){height:calc(100svh - 24px);padding:16px 24px;grid-template-rows:minmax(0,1fr) auto auto auto minmax(24px,.28fr)}
 #login-view h1{margin:0 0 10px;align-self:start}
 #new-account{font-size:clamp(14px,1.35vw,18px);margin:10px auto 4px}
 #login-form .subtitle{font-size:clamp(13px,1.3vw,17px);margin-bottom:10px}
 .auth-panel:has(#login-view:not([hidden])) .united{font-size:clamp(10px,.95vw,13px);align-self:center;letter-spacing:.09em}
 .keypad{padding:6px;border:1px solid #14718a66;margin-top:7px}
 .keypad button{height:clamp(40px,11.8svh,78px)}
 .code-entry{height:clamp(40px,12svh,78px)}
}
.signal-glitch .auth-stage>.auth-panel{animation:kino-signal-jolt 940ms steps(1,end) both;will-change:transform,filter}
.auth-panel.signal-slice{position:fixed;z-index:20;left:var(--signal-left);top:var(--signal-top);width:var(--signal-width);height:var(--signal-height);min-height:0;margin:0;pointer-events:none;user-select:none;opacity:0;clip-path:inset(var(--signal-bandTop) 0 var(--signal-bandBottom) 0);filter:brightness(1.18) contrast(1.32) saturate(1.45) drop-shadow(5px 0 #20e9ff66) drop-shadow(-5px 0 #245bff55);will-change:transform,opacity}
.signal-glitch .signal-slice{animation:kino-signal-band 940ms steps(1,end) both}
.signal-glitch .signal-slice-2,.signal-glitch .signal-slice-4{animation-direction:reverse}
.auth-body.signal-glitch::before,.auth-body.signal-glitch::after{content:'';position:fixed;inset:0;pointer-events:none;z-index:21;opacity:0}
.auth-body.signal-glitch::before{background-image:repeating-radial-gradient(circle at 17% 36%,#82f5ff66 0 .6px,transparent .8px 3px),repeating-radial-gradient(circle at 72% 64%,#ffffff44 0 .5px,transparent .8px 4px);background-size:5px 7px,9px 6px;mix-blend-mode:screen;animation:kino-signal-noise 940ms steps(2,end) both}
.auth-body.signal-glitch::after{background:linear-gradient(transparent 42%,#cefdfbcc 49.5%,#128fb114 52%,transparent 59%),repeating-linear-gradient(#78e9ff1c 0 1px,transparent 1px 4px);background-size:100% 18%,100% 4px;background-repeat:no-repeat,repeat;animation:kino-signal-scan 940ms cubic-bezier(.72,0,.4,1) both}
@keyframes kino-signal-jolt{0%,100%{transform:translate(0);filter:none}5%{transform:translate(-5px,1px);filter:brightness(1.12) contrast(1.14)}8%{transform:translate(8px,-2px)}12%{transform:translate(-2px,0)}22%{transform:translate(0,2px);filter:brightness(.8) contrast(1.4)}27%{transform:translate(11px,-1px)}31%{transform:translate(-7px,1px)}39%{transform:translate(0);filter:none}53%{transform:translate(3px,-1px);filter:brightness(1.2)}57%{transform:translate(-3px,0)}64%{transform:translate(0);filter:none}78%{transform:translate(-1px,0)}83%{transform:translate(1px,0)}}
@keyframes kino-signal-band{0%,100%{opacity:0;transform:translateX(0)}4%{opacity:.94;transform:translateX(var(--signal-shift)) skewX(.8deg)}9%{opacity:.56;transform:translateX(var(--signal-back))}13%{opacity:0}23%{opacity:.86;transform:translateX(calc(var(--signal-shift)*-1))}29%{opacity:.54;transform:translateX(var(--signal-back))}34%{opacity:0}52%{opacity:.64;transform:translateX(var(--signal-shift))}58%{opacity:0}79%{opacity:.34;transform:translateX(var(--signal-back))}84%{opacity:0}}
@keyframes kino-signal-noise{0%,100%{opacity:0}4%{opacity:.22;transform:translate(-2%,1%)}11%{opacity:.05;transform:translate(1%,-1%)}23%{opacity:.28;transform:translate(2%,0)}31%{opacity:.04}52%{opacity:.16}62%{opacity:0}}
@keyframes kino-signal-scan{0%{opacity:0;background-position:0 -22%,0 0}8%{opacity:.18}26%{opacity:.4}30%{opacity:.04}52%{opacity:.23}72%{opacity:.14;background-position:0 102%,0 2px}76%{opacity:.4}82%{opacity:.06}88%{opacity:.14}100%{opacity:0;background-position:0 122%,0 0}}
@media(prefers-reduced-motion:reduce){.signal-slice{display:none!important}.signal-glitch::before,.signal-glitch::after{display:none!important}}


@font-face{font-family:KinoSans;src:url('/ibm-plex-sans-regular-v1.ttf') format('truetype');font-display:optional}
.admin-body .dialog-close{display:grid;place-items:center;width:36px;height:36px;padding:5px;border:1px solid #195663;border-radius:4px;color:#b1e2e8;background:#03151b}
.admin-body .dialog-close svg{width:24px;height:24px}
.admin-body .dialog-close:hover{border-color:#04e0ee;background:#063441}
/* A single frame contract for all three steps; content may scroll, never the frame. */
.auth-stage{padding:24px!important;min-height:100svh;place-items:center!important}
.auth-stage>.auth-panel{width:min(760px,100%)!important;height:min(680px,calc(100svh - 48px))!important;min-height:0!important;max-width:100%!important;padding:38px 44px 30px!important;display:flex!important;flex-direction:column;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:#146072 transparent;justify-content:center;gap:0}
.auth-stage>.auth-panel>section{display:block!important;flex:none;min-width:0}
.auth-stage>.auth-panel>section[hidden]{display:none!important}
.auth-stage>.auth-panel .auth-brand{margin:0 0 28px!important;flex:none;align-self:auto!important;grid-area:auto!important}
.auth-stage>.auth-panel .auth-brand img{width:300px!important;max-width:80%;height:auto}
.auth-stage>.auth-panel .auth-brand p{font-size:10px!important;margin-top:14px!important}
.auth-stage>.auth-panel #auth-title{font-family:KinoSans,'Segoe UI',Arial,sans-serif!important;font-size:32px!important;font-weight:600;letter-spacing:.1em!important;line-height:1.25;margin:0 0 15px!important}
.auth-stage>.auth-panel #access-hint{font-size:15px!important;line-height:1.6;margin:0!important;min-height:24px}
.auth-stage>.auth-panel .code-entry{height:72px!important;margin:26px 0 0!important}
.auth-stage>.auth-panel .code-cells span{background:linear-gradient(155deg,#00334a55,#00101744);border-color:#1684a0;box-shadow:none}
.auth-stage>.auth-panel.success .code-cells span{border-color:var(--green);background:#073c2d}
.auth-stage>.auth-panel.error .code-cells span{border-color:var(--red);background:#421a29}
.auth-stage>.auth-panel #new-account{font-size:15px!important;margin:23px auto 0!important;min-height:38px;grid-area:auto}
.auth-stage>.auth-panel .united{font-size:11px!important;margin:28px 0 0!important;padding:0!important;grid-area:auto;align-self:auto}
.auth-stage>.auth-panel .auth-message{display:none!important}
.auth-stage>.auth-panel .keypad{display:none!important}
.auth-stage>.auth-panel[data-step=register]{justify-content:flex-start}
.auth-stage>.auth-panel[data-step=register] .auth-brand{margin-bottom:20px!important}
.auth-stage>.auth-panel[data-step=register] .auth-brand img{width:190px!important}
.auth-stage>.auth-panel[data-step=register] .auth-brand p{margin-top:9px!important;font-size:8px!important}
.auth-stage>.auth-panel .profile-preview{margin:0 0 14px!important;padding-bottom:12px;flex:none}
.auth-stage>.auth-panel .profile-preview img{width:48px;height:48px;flex-basis:48px}
.auth-stage>.auth-panel .profile-preview h1{font:600 11px/1.4 KinoSans,Arial,sans-serif!important;letter-spacing:.13em!important;text-align:left;margin:0 0 5px!important}
.auth-stage>.auth-panel .name-input{height:45px;padding:10px 12px;margin:8px 0 17px;outline:none!important;box-shadow:none!important;border:1px solid #1684a0}
.auth-stage>.auth-panel .name-input:focus{border-color:#60f5ff}
.auth-stage>.auth-panel .name-label.error{color:#ff8797}
.auth-stage>.auth-panel .avatar-grid{width:100%;max-width:none!important;grid-template-columns:repeat(8,minmax(0,1fr))!important;gap:9px!important;margin:0!important}
.auth-stage>.auth-panel .avatar-choice{max-height:none!important}
.auth-stage>.auth-panel .avatar-field{margin-bottom:20px!important}
.auth-stage>.auth-panel .primary{min-height:48px;font:600 15px/1.3 KinoSans,Arial,sans-serif;letter-spacing:.04em;text-decoration:none}
.auth-stage>.auth-panel[data-step=register] .united{margin-top:auto!important;padding-top:20px!important}
.auth-stage>.auth-panel[data-step=code] #issued-title{font:600 29px/1.3 KinoSans,Arial,sans-serif!important;letter-spacing:.04em;margin-bottom:12px!important}
.auth-stage>.auth-panel[data-step=code] .subtitle{font-size:15px!important;line-height:1.65!important;margin:0 0 20px!important;color:#71e6a9}
.auth-stage>.auth-panel[data-step=code] .subtitle.error{color:#ff8797}
.auth-stage>.auth-panel[data-step=code] .issued-code{min-height:150px!important;margin:0 0 18px!important;padding:38px 14px!important}
.auth-stage>.auth-panel[data-step=code] .issued-code-line{font-size:44px!important}
.auth-stage>.auth-panel .back-action{margin:15px auto 0!important;font-size:13px;min-height:40px}
.auth-stage>.auth-panel .close-step{z-index:2;top:21px;right:21px;width:36px;height:36px;padding:6px;display:grid;place-items:center;background:#03151bb3;border:1px solid #195663;border-radius:5px;color:#a4dce6;transition:background .15s,color .15s,border-color .15s}
.auth-stage>.auth-panel .close-step[hidden]{display:none!important}
.close-step svg{display:block;width:23px;height:23px}
.auth-stage>.auth-panel .close-step:hover{color:#e9fdff;background:#063441;border-color:#04e0ee}
.auth-stage>.auth-panel .close-step:active{background:#095064;transform:scale(.96)}
@media(max-width:600px) and (orientation:portrait){
 .auth-stage{padding:18px 22px!important}
 .auth-stage>.auth-panel{height:min(740px,calc(100svh - 36px))!important;padding:26px 16px 22px!important;justify-content:center}
 .auth-stage>.auth-panel .auth-brand{margin-bottom:20px!important}
 .auth-stage>.auth-panel .auth-brand img{width:232px!important}
 .auth-stage>.auth-panel .auth-brand p{font-size:8px!important;letter-spacing:.45em}
 .auth-stage>.auth-panel #auth-title{font-size:clamp(19px,5.8vw,25px)!important;letter-spacing:.07em!important;margin-bottom:10px!important;gap:10px}
 .auth-stage>.auth-panel #access-hint{font-size:12px!important;letter-spacing:.06em}
 .auth-stage>.auth-panel .code-entry{height:48px!important;margin-top:16px!important}
 .auth-stage>.auth-panel .code-cells{gap:6px}
 .auth-stage>.auth-panel .code-cells span:not(:empty)::before{width:9px;height:9px}
 .auth-stage>.auth-panel .keypad{display:grid!important;width:100%;max-width:none;gap:7px;padding:7px;border:1px solid #14718a66;margin:12px 0 0}
 .auth-stage>.auth-panel .keypad button{height:clamp(40px,calc((100svh - 400px)/4),62px);min-height:40px}
 .auth-stage>.auth-panel .keypad button b{font-size:27px}
 .auth-stage>.auth-panel #new-account{font-size:13px!important;margin-top:12px!important;min-height:32px}
 .auth-stage>.auth-panel .united{font-size:9px!important;letter-spacing:.06em;margin-top:16px!important;gap:6px}
 .auth-stage>.auth-panel[data-step=register]{justify-content:center}
 .auth-stage>.auth-panel[data-step=register] .auth-brand{margin-bottom:20px!important}
 .auth-stage>.auth-panel[data-step=register] .auth-brand img{width:165px!important}
 .auth-stage>.auth-panel .avatar-grid{gap:5px!important}
 .auth-stage>.auth-panel .avatar-choice img{border-radius:2px}
 .auth-stage>.auth-panel .avatar-choice span{width:12px;height:12px;right:-2px;top:-3px;font-size:8px}
 .auth-stage>.auth-panel[data-step=register] .united{margin-top:22px!important;padding-top:0!important}
 .auth-stage>.auth-panel[data-step=code] #issued-title{font-size:22px!important}
 .auth-stage>.auth-panel[data-step=code] .subtitle{font-size:13px!important}
 .auth-stage>.auth-panel[data-step=code] .issued-code-line{font-size:clamp(26px,8vw,38px)!important;gap:5px}
 .auth-stage>.auth-panel[data-step=code] .issued-code{min-height:132px!important}
 .auth-stage>.auth-panel .close-step{right:16px;top:16px;width:32px;height:32px}
}
@media(min-width:601px) and (max-height:550px) and (orientation:landscape){
 .auth-stage{padding:14px 20px!important}
 .auth-stage>.auth-panel{width:min(1180px,100%)!important;height:calc(100svh - 28px)!important;padding:18px 28px!important;display:grid!important;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:0 30px;grid-template-rows:1fr auto auto}
 .auth-stage>.auth-panel[data-step=login] #login-view{display:contents!important}
 .auth-stage>.auth-panel .auth-brand{grid-area:1/1!important;align-self:center!important;margin:0!important}
 .auth-stage>.auth-panel #auth-title{grid-area:2/1;font-size:clamp(19px,2.8vw,28px)!important;margin:0 0 8px!important}
 .auth-stage>.auth-panel #new-account{grid-area:3/1;margin:0 auto 26px!important;font-size:14px!important}
 .auth-stage>.auth-panel #login-form{grid-area:1/2/4/3;align-self:center}
 .auth-stage>.auth-panel #access-hint{font-size:13px!important;margin-bottom:7px!important}
 .auth-stage>.auth-panel .code-entry{height:42px!important;margin:0!important}
 .auth-stage>.auth-panel .keypad{display:grid!important;max-width:none;margin:7px 0 0;padding:5px;gap:5px;border:1px solid #14718a66}
 .auth-stage>.auth-panel .keypad button{height:clamp(35px,10svh,52px);min-height:35px}
 .auth-stage>.auth-panel .keypad button b{font-size:24px}
 .auth-stage>.auth-panel .united{position:absolute;bottom:17px;left:28px;width:calc(45% - 20px);font-size:9px!important;margin:0!important}
 .auth-stage>.auth-panel[data-step=register] .profile-preview{grid-area:2/1/4/2;margin-bottom:30px!important}
 .auth-stage>.auth-panel[data-step=register] #register-view{grid-area:1/2/4/3;align-self:center}
 .auth-stage>.auth-panel[data-step=register] .avatar-grid{gap:5px!important}
 .auth-stage>.auth-panel[data-step=register] .name-input{height:38px;margin:6px 0 10px}
 .auth-stage>.auth-panel[data-step=register] .avatar-field{margin-bottom:10px!important}
 .auth-stage>.auth-panel[data-step=code]{display:flex!important;justify-content:center}
 .auth-stage>.auth-panel[data-step=code] #code-view{max-width:560px;width:100%;margin:auto}
 .auth-stage>.auth-panel[data-step=code] #issued-title{font-size:22px!important;margin-bottom:5px!important}
 .auth-stage>.auth-panel[data-step=code] .subtitle{font-size:12px!important;margin-bottom:10px!important}
 .auth-stage>.auth-panel[data-step=code] .issued-code{min-height:88px!important;padding:25px 10px!important;margin-bottom:10px!important}
 .auth-stage>.auth-panel[data-step=code] .issued-code-line{font-size:32px!important}
 .auth-stage>.auth-panel .primary{min-height:40px;font-size:13px}
 .auth-stage>.auth-panel .back-action{margin-top:4px!important;min-height:30px}
}


/* Same outer rectangle and footer anchor for login, registration and code. */
.auth-stage>.auth-panel{padding:34px 44px 70px!important;justify-content:flex-start}
.auth-stage>.auth-panel .auth-brand{margin:26px 0 38px!important}
.auth-stage>.auth-panel .auth-brand img{width:320px!important}
.auth-stage>.auth-panel #login-view{margin:auto 0!important}
.auth-stage>.auth-panel #auth-title{font-size:32px!important;letter-spacing:.06em!important}
.auth-stage>.auth-panel .code-entry{height:auto!important;margin-top:28px!important}
.auth-stage>.auth-panel .code-cells{height:auto!important;gap:12px}
.auth-stage>.auth-panel .code-cells span{position:relative;aspect-ratio:1;min-width:0;min-height:0;font-size:0!important}
.auth-stage>.auth-panel .code-cells span:not(:empty)::before{left:50%;top:50%;width:12px;height:12px;transform:translate(-50%,-50%)}
.auth-stage>.auth-panel #new-account{margin-top:24px!important;font-size:16px!important}
.auth-stage>.auth-panel .united{position:absolute;left:28px;right:28px;bottom:28px;width:auto!important;margin:0!important;padding:0!important;font-size:11px!important}
.auth-stage>.auth-panel .profile-preview{border:0;margin:0 0 13px!important;padding:0}
.auth-stage>.auth-panel[data-step=register] .auth-brand{margin:0 0 18px!important}
.auth-stage>.auth-panel[data-step=register] .auth-brand img{width:178px!important}
.auth-stage>.auth-panel .avatar-grid{grid-template-columns:repeat(8,minmax(0,1fr))!important;gap:8px!important}
.auth-stage>.auth-panel .avatar-field{margin-bottom:16px!important}
.auth-stage>.auth-panel .avatar-upload{aspect-ratio:1;min-width:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px;border:1px dashed #00cadb;background:#06232b;color:#50f1fa;cursor:pointer;font:11px/1.2 KinoSans,Arial,sans-serif}
.auth-stage>.auth-panel .avatar-upload b{font-size:24px;font-weight:400;line-height:1}
.auth-stage>.auth-panel .avatar-upload[aria-pressed=true]{border:2px solid #00e4f4;background:#075360}
.auth-stage>.auth-panel .avatar-upload:hover{background:#0a3944}
.auth-stage>.auth-panel .avatar-choice:focus-within,.avatar-upload:focus-visible{outline:2px solid #7bfcff;outline-offset:2px}
.auth-stage>.auth-panel[data-step=code]{justify-content:center}
.auth-stage>.auth-panel .close-step{top:28px;right:28px;width:38px;height:38px}
.avatar-crop-dialog{width:min(370px,calc(100vw - 36px));padding:24px;background:#03151b;color:#eafaff;border:1px solid #02d7e7;box-shadow:0 0 35px #00d8eb33}
.avatar-crop-dialog::backdrop{background:#000b}
.avatar-crop-dialog h2{font:600 20px KinoSans,Arial,sans-serif;margin:0 0 18px}
.avatar-crop-dialog canvas{display:block;width:min(256px,100%);height:auto;margin:0 auto 20px;border:1px solid #08d5e5}
.avatar-crop-dialog label{display:block;font:14px KinoSans,Arial,sans-serif}
.avatar-crop-dialog input[type=range]{display:block;width:100%;margin:14px 0 20px;accent-color:#05dcea}
.avatar-crop-actions{display:flex;gap:10px}.avatar-crop-actions button{flex:1;padding:12px 8px;border:1px solid #06d9e7;color:#eafaff;background:#062e38;font:600 14px KinoSans,Arial,sans-serif;cursor:pointer}
.avatar-crop-actions button:hover{background:#095264}
@media(max-width:600px) and (orientation:portrait){
 .auth-stage>.auth-panel{padding:24px 16px 58px!important}
 .auth-stage>.auth-panel .auth-brand{margin:8px 0 20px!important}
 .auth-stage>.auth-panel .auth-brand img{width:224px!important}
 .auth-stage>.auth-panel #login-view{margin:auto 0!important}
 .auth-stage>.auth-panel #auth-title{font-size:clamp(19px,5.8vw,25px)!important}
 .auth-stage>.auth-panel .code-entry{margin-top:15px!important}
 .auth-stage>.auth-panel .code-cells{gap:6px}
 .auth-stage>.auth-panel .code-cells span:not(:empty)::before{width:9px;height:9px}
 .auth-stage>.auth-panel #new-account{font-size:14px!important;margin-top:12px!important}
 .auth-stage>.auth-panel .united{left:14px;right:14px;bottom:22px;font-size:9px!important}
 .auth-stage>.auth-panel[data-step=register]{justify-content:flex-start}
 .auth-stage>.auth-panel[data-step=register] .auth-brand{margin:0 0 14px!important}
 .auth-stage>.auth-panel[data-step=register] .auth-brand img{width:155px!important}
 .auth-stage>.auth-panel .profile-preview{margin-bottom:10px!important}
 .auth-stage>.auth-panel .name-input{margin-bottom:13px}
 .auth-stage>.auth-panel .avatar-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:7px!important;max-height:clamp(120px,calc(100svh - 430px),320px);overflow-y:auto;padding:4px;scrollbar-width:thin;scrollbar-color:#127b8d transparent}
 .auth-stage>.auth-panel .avatar-choice{min-height:44px}
 .auth-stage>.auth-panel .avatar-field{margin-bottom:13px!important}
 .auth-stage>.auth-panel .close-step{top:20px;right:20px;width:34px;height:34px}
}
@media(min-width:601px) and (max-height:550px) and (orientation:landscape){
 .auth-stage>.auth-panel{padding:20px 28px 48px!important;grid-template-rows:1fr auto auto}
 .auth-stage>.auth-panel .auth-brand{margin:0!important}
 .auth-stage>.auth-panel #auth-title{font-size:clamp(20px,2.8vw,28px)!important}
 .auth-stage>.auth-panel .code-entry{margin-top:0!important;max-width:420px;margin-left:auto!important;margin-right:auto!important}
 .auth-stage>.auth-panel .code-cells{gap:6px}
 .auth-stage>.auth-panel .keypad button{height:clamp(32px,9svh,46px);min-height:32px}
 .auth-stage>.auth-panel #new-account{margin:4px auto 18px!important;font-size:15px!important}
 .auth-stage>.auth-panel .united{left:28px;right:auto;bottom:17px;width:calc(45% - 20px)!important;font-size:10px!important}
 .auth-stage>.auth-panel .avatar-grid{max-height:clamp(95px,calc(100svh - 230px),235px);overflow:auto;padding:4px}
 .auth-stage>.auth-panel .close-step{top:18px;right:18px;width:32px;height:32px}
}

/* v7: no cascading stylesheet round trips on the first login. */
@media(orientation:landscape){.auth-body{background-image:url('/auth/background-pc-v7.webp')}}
.auth-stage>.auth-panel .auth-brand,.auth-stage>.auth-panel .auth-brand img,.auth-stage>.auth-panel .auth-brand p{filter:none!important;text-shadow:none!important;box-shadow:none!important;mix-blend-mode:normal}
.auth-body:has(.auth-panel.success){--feedback:#53f1a9}
.auth-body:has(.auth-panel.error){--feedback:#ff526a}
.auth-body::after{content:'';position:fixed;inset:0;z-index:9;pointer-events:none;border:1px solid transparent;opacity:0;transition:opacity .18s;box-shadow:inset 0 0 20px var(--feedback),inset 0 0 5px var(--feedback);mask-image:linear-gradient(to right,#000,transparent 22px,transparent calc(100% - 22px),#000),linear-gradient(to bottom,#000,transparent 22px,transparent calc(100% - 22px),#000)}
.auth-body:has(.auth-panel:is(.success,.error))::after{opacity:.88;border-color:var(--feedback)}
.auth-stage>.auth-panel .avatar-grid{grid-auto-rows:max-content;align-content:start;align-items:start;max-width:none;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y;scrollbar-gutter:stable;max-height:245px;padding:5px}
.auth-stage>.auth-panel .avatar-choice,.auth-stage>.auth-panel .avatar-upload{width:100%;height:auto!important;min-height:0!important;max-height:none!important;aspect-ratio:1;flex:none;align-self:start}
.auth-stage>.auth-panel .avatar-choice img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.auth-stage>.auth-panel .avatar-field{flex:none}
.auth-stage>.auth-panel .issued-code-line{display:flex;flex-wrap:nowrap;justify-content:center;align-items:center;gap:.14em;white-space:nowrap;min-width:0;font-size:clamp(24px,6.6vw,44px)!important;letter-spacing:.02em}
.auth-stage>.auth-panel .issued-code-line output{display:inline;flex:none;font:inherit!important;letter-spacing:inherit!important;white-space:nowrap!important;overflow-wrap:normal;word-break:normal}
.auth-stage>.auth-panel .issued-code-line>span{flex:none}
.auth-stage>.auth-panel #code-view .subtitle{min-height:3.2em}
@media(max-width:600px) and (orientation:portrait){
 .auth-stage>.auth-panel{height:min(700px,calc(100svh - 36px))!important;padding-bottom:48px!important}
 .auth-stage>.auth-panel .auth-brand{margin:16px 0 16px!important}
 .auth-stage>.auth-panel #login-view{margin:0!important}
 .auth-stage>.auth-panel .keypad{gap:6px;margin-top:12px!important;padding:6px!important}
 .auth-stage>.auth-panel .keypad button{height:clamp(44px,calc((100svh - 405px)/4),56px)!important;min-height:44px!important}
 .auth-stage>.auth-panel .united{bottom:19px}
 .auth-stage>.auth-panel .avatar-grid{max-height:clamp(100px,calc(100svh - 405px),300px);grid-template-columns:repeat(4,minmax(0,1fr))!important}
 .auth-stage>.auth-panel[data-step=register] .auth-brand{margin:0 0 12px!important}
 .auth-stage>.auth-panel .issued-code{padding-inline:10px!important}
 .auth-stage>.auth-panel .issued-code-line{font-size:clamp(23px,7vw,38px)!important}
}
@media(min-width:601px) and (max-height:550px) and (orientation:landscape){.auth-stage>.auth-panel .avatar-grid{max-height:clamp(85px,calc(100svh - 230px),235px);grid-template-columns:repeat(4,minmax(0,1fr))!important}}

/* v8: taller mobile keys with a scrollable short-screen layout. */
@media(max-width:600px) and (orientation:portrait){
 .auth-stage>.auth-panel{height:min(740px,calc(100svh - 36px))!important}
 .auth-stage>.auth-panel .keypad button{height:clamp(54px,calc((100svh - 390px)/4),68px)!important;min-height:54px!important}
}
@media(max-width:600px) and (max-height:700px) and (orientation:portrait){
 .auth-stage>.auth-panel[data-step=login]{padding-bottom:22px!important;justify-content:flex-start}
 .auth-stage>.auth-panel[data-step=login] .united{position:static;width:100%!important;margin:22px 0 0!important;flex:none}
}


/* Center the full logo group in the space above the desktop login heading. */
@media(min-width:601px) and (min-height:551px){
 .auth-stage>.auth-panel[data-step=login]{padding-top:0!important}
 .auth-stage>.auth-panel[data-step=login] .auth-brand{flex:1;min-height:148px;margin:0!important;display:flex;flex-direction:column;justify-content:center;align-items:center}
 .auth-stage>.auth-panel[data-step=login] .auth-brand img{margin:0 auto!important;flex:none}
 .auth-stage>.auth-panel[data-step=login] .auth-brand p{margin-bottom:0;flex:none}
 .auth-stage>.auth-panel[data-step=login] #login-view{margin:0 0 60px!important;flex:none}
}

/* Match the taller reference keys without compressing them on short phones. */
@media(max-width:600px) and (orientation:portrait){
 .auth-stage>.auth-panel .keypad button{height:auto!important;min-height:64px!important;aspect-ratio:1.2;flex-shrink:0}
 .auth-stage>.auth-panel[data-step=login]{height:auto!important;max-height:calc(100svh - 36px);padding-bottom:22px!important;overflow-y:auto}
 .auth-stage>.auth-panel[data-step=login] .united{position:static;width:100%!important;margin:26px 0 0!important;flex:none}
}

/* V11: restore desktop hall, inline validation, full desktop avatar grid. */
@media(orientation:landscape){.auth-body{background-image:url('/auth/background-pc-v4.webp')}}
.name-input[aria-invalid="true"]{border-color:#ff536c!important;box-shadow:0 0 0 1px #ff536c,0 0 14px #ff536c33!important}
@media(min-width:701px) and (pointer:fine){.avatar-grid{max-height:none!important;overflow:visible!important;scrollbar-gutter:auto!important}}

html{background:#090d0f;color-scheme:dark}


.auth-stage>.auth-panel .profile-preview>.close-step{position:static;margin-left:auto;align-self:center;flex:0 0 36px;width:36px;height:36px;transform:none}
.auth-stage>.auth-panel #access-code{opacity:1;background:transparent;border:0;color:transparent;-webkit-text-fill-color:transparent;caret-color:transparent;box-shadow:none;user-select:text;-webkit-user-select:text;touch-action:auto}
@media(orientation:portrait){.auth-body{background-image:url('/auth/background-mobile-v14.webp');background-position:center;background-size:cover;background-repeat:no-repeat}}


/* Keep the keypad's individual keys; remove the extra outer frame. Busy keys
   remain legible and unchanged while duplicate submission stays disabled. */
.auth-stage>.auth-panel .keypad{border:0!important;outline:none!important;box-shadow:none!important}
.auth-stage>.auth-panel .keypad button:disabled{opacity:1;filter:none}

/* Use the phone's available height instead of a fixed keypad aspect ratio. */
@media(max-width:600px) and (orientation:portrait){
 .auth-stage{--auth-gap:clamp(6px,1.4svh,12px);height:100svh;min-height:0!important;box-sizing:border-box;padding:max(8px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))!important}
 @supports(height:100dvh){.auth-stage{height:100dvh}}
 .auth-stage>.auth-panel[data-step]{height:100%!important;max-height:820px!important;min-height:0!important;padding:clamp(12px,2.3svh,22px) 16px!important;overflow:hidden;justify-content:flex-start;gap:var(--auth-gap)}
 .auth-stage>.auth-panel .auth-brand{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:none;min-height:0!important;gap:clamp(5px,1svh,9px);margin:0!important}
 .auth-stage>.auth-panel .auth-brand img{width:clamp(150px,35svh,260px)!important;max-width:82%;height:auto;margin:0!important}
 .auth-stage>.auth-panel .auth-brand p{font-size:8px!important;line-height:1.3;margin:0!important}
 .auth-stage>.auth-panel[data-step=login]{display:grid!important;height:100%!important;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);justify-content:stretch}
 .auth-stage>.auth-panel[data-step=login] #login-view{display:grid!important;grid-template-rows:auto minmax(0,1fr) auto;gap:var(--auth-gap);min-height:0;margin:0!important}
 .auth-stage>.auth-panel #auth-title{margin:0!important;font-size:clamp(18px,4.8vw,25px)!important;line-height:1.2}
 .auth-stage>.auth-panel #login-form{display:grid;grid-template-rows:auto clamp(34px,7svh,56px) minmax(0,1fr);gap:var(--auth-gap);min-height:0;margin:0}
 .auth-stage>.auth-panel #access-hint{min-height:0;font-size:clamp(11px,2.7vw,13px)!important;line-height:1.4;margin:0!important}
 .auth-stage>.auth-panel .code-entry{height:100%!important;max-width:none;width:100%;margin:0!important}
 .auth-stage>.auth-panel .code-cells{height:100%!important}
 .auth-stage>.auth-panel .code-cells span{aspect-ratio:auto}
 .auth-stage>.auth-panel .keypad{height:100%;max-height:360px;align-self:center;grid-template-rows:repeat(4,minmax(44px,1fr));gap:clamp(4px,1svh,8px);padding:0!important;margin:0!important}
 .auth-stage>.auth-panel .keypad button{height:100%!important;min-height:44px!important;aspect-ratio:auto;padding:4px 0;gap:3px}
 .auth-stage>.auth-panel .keypad button b{font-size:clamp(24px,5.7svh,36px)}
 .auth-stage>.auth-panel #new-account{min-height:44px;margin:0 auto!important;padding:8px 4px;font-size:13px!important}
 .auth-stage>.auth-panel[data-step=register]{display:flex!important}
 .auth-stage>.auth-panel[data-step=register] .auth-brand{margin:0!important}
 .auth-stage>.auth-panel[data-step=register] .auth-brand img{width:150px!important}
 .auth-stage>.auth-panel .profile-preview{margin:0!important;padding:0;min-height:48px}
 .auth-stage>.auth-panel[data-step=register] #register-view{display:flex!important;flex:1 1 auto;min-height:0}
 .auth-stage>.auth-panel #register-form{align-self:stretch;height:100%;display:grid;grid-template-rows:auto 44px minmax(0,1fr) auto;gap:8px;width:100%;min-height:0}
 .auth-stage>.auth-panel .name-input{height:44px;margin:0;font-size:16px}
 .auth-stage>.auth-panel .avatar-field{display:flex;flex-direction:column;min-height:0;margin:0!important}
 .auth-stage>.auth-panel .avatar-field legend{flex:none;margin:0 0 6px}
 .auth-stage>.auth-panel .avatar-grid{flex:1;min-height:0;max-height:100%!important;grid-template-columns:repeat(4,minmax(0,1fr))!important}
 .auth-stage>.auth-panel #register-form>.primary{min-height:44px;margin:0}
 .auth-stage>.auth-panel[data-step=code]{justify-content:center}
 .auth-stage>.auth-panel[data-step=code] .auth-brand[hidden]{display:none!important}
}

@media(orientation:landscape) and (max-height:550px){
 .auth-stage{height:100svh;min-height:0!important;padding:max(8px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))!important}
 @supports(height:100dvh){.auth-stage{height:100dvh}}
 .auth-stage>.auth-panel{width:min(1180px,100%)!important;height:100%!important;max-height:100%!important;min-height:0!important;overflow:hidden;padding:12px 16px!important;display:grid!important;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr)!important;grid-template-rows:minmax(0,1fr) auto auto!important;gap:6px 20px}
 .auth-stage>.auth-panel[data-step=login] #login-view{display:contents!important}
 .auth-stage>.auth-panel .auth-brand{grid-area:1/1!important;margin:0!important;align-self:center!important}
 .auth-stage>.auth-panel .auth-brand img{width:240px!important;max-width:90%}
 .auth-stage>.auth-panel .auth-brand p{font-size:8px!important;margin:8px 0 0!important}
 .auth-stage>.auth-panel #auth-title{grid-area:2/1;margin:0!important;font-size:clamp(16px,3.2vw,25px)!important;line-height:1.2}
 .auth-stage>.auth-panel #new-account{grid-area:3/1;margin:0 auto!important;min-height:44px;font-size:13px!important;padding:8px 2px}
 .auth-stage>.auth-panel #login-form{grid-area:1/2/4/3;align-self:stretch;display:grid;grid-template-rows:auto 34px minmax(0,1fr);gap:6px;min-height:0;height:100%;margin:0}
 .auth-stage>.auth-panel #access-hint{min-height:0;font-size:11px!important;line-height:1.3;margin:0!important}
 .auth-stage>.auth-panel .code-entry{height:100%!important;margin:0!important;max-width:none}
 .auth-stage>.auth-panel .code-cells{height:100%!important}
 .auth-stage>.auth-panel .code-cells span{aspect-ratio:auto}
 .auth-stage>.auth-panel .keypad{display:grid!important;grid-template-rows:repeat(4,minmax(44px,1fr));gap:4px;margin:0!important;padding:0!important;min-height:0;max-width:none;height:100%;max-height:340px;align-self:center}
 .auth-stage>.auth-panel .keypad button{height:100%!important;min-height:44px!important;aspect-ratio:auto;padding:4px 0;gap:3px}
 .auth-stage>.auth-panel .keypad button b{font-size:26px}
 .auth-stage>.auth-panel[data-step=register] .profile-preview{grid-area:2/1/4/2;margin:0!important;padding:0}
 .auth-stage>.auth-panel[data-step=register] #register-view{grid-area:1/2/4/3;display:flex!important;align-self:stretch;min-height:0}
 .auth-stage>.auth-panel #register-form{align-self:stretch;height:100%;display:grid;grid-template-rows:auto 40px minmax(0,1fr) auto;gap:6px;width:100%;min-height:0}
 .auth-stage>.auth-panel .name-input{height:40px;margin:0;font-size:16px}
 .auth-stage>.auth-panel .avatar-field{display:flex;flex-direction:column;min-height:0;margin:0!important}
 .auth-stage>.auth-panel .avatar-field legend{flex:none;margin:0 0 6px}
 .auth-stage>.auth-panel .avatar-grid{flex:1;min-height:0;max-height:100%!important;grid-template-columns:repeat(4,minmax(0,1fr))!important}
 .auth-stage>.auth-panel #register-form>.primary{min-height:44px;margin:0}
 .auth-stage>.auth-panel[data-step=code]{display:flex!important;justify-content:center}
 .auth-stage>.auth-panel[data-step=code] #code-view{width:100%;max-width:560px;margin:auto}
 .auth-stage>.auth-panel[data-step=code] #issued-title{font-size:22px!important;line-height:1.2;margin:0!important}
 .auth-stage>.auth-panel[data-step=code] .subtitle{font-size:12px!important;line-height:1.5!important;min-height:3em;margin:8px 0!important}
 .auth-stage>.auth-panel[data-step=code] .issued-code{min-height:88px!important;padding:20px 10px!important;margin:10px 0!important}
 .auth-stage>.auth-panel[data-step=code] .issued-code-line{font-size:32px!important}
 .auth-stage>.auth-panel[data-step=code] #saved-code{min-height:44px;height:44px;padding:10px}
 .auth-stage>.auth-panel[data-step=code] .auth-brand[hidden]{display:none!important}
}

@media(max-width:600px) and (orientation:portrait) and (max-height:480px){
 .auth-stage{--auth-gap:5px;padding-top:max(6px,env(safe-area-inset-top))!important;padding-bottom:max(6px,env(safe-area-inset-bottom))!important}
 .auth-stage>.auth-panel[data-step]{padding:8px 14px!important}
 .auth-stage>.auth-panel .auth-brand{gap:4px}
 .auth-stage>.auth-panel .auth-brand img{width:140px!important}
 .auth-stage>.auth-panel #login-form{grid-template-rows:auto 32px minmax(0,1fr)}
 .auth-stage>.auth-panel .keypad{gap:4px}
}

/* Native and overlay scrollbars need a clear lane outside the content. */
.auth-stage>.auth-panel .avatar-grid{padding-inline-end:14px;scrollbar-gutter:stable;scroll-padding:6px}
.admin-body :is(.admin-sidebar,.table-wrap,#admin-dialog){scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:#24778a transparent}
.admin-body .admin-sidebar{padding-inline-end:12px}
.admin-body .table-wrap{padding-bottom:12px}
@media(max-width:800px){.admin-body .admin-sidebar{padding-bottom:12px}}
