#jadeStage #authView { position:absolute!important;inset:0!important;display:block;padding:0!important;overflow:auto!important;overscroll-behavior:contain;isolation:isolate;background:radial-gradient(ellipse at center,#173f32,#062b23); }
#jadeStage #authView[hidden] { display:none!important; }
#jadeStage #authView::after { content:none!important; }
#authView .auth-content { position:relative;width:100%;height:100%;min-height:370px;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
#authView .auth-art-frame { position:absolute;left:50%;top:0;transform:translateX(-50%);width:min(100%,calc(var(--stage-height,100dvh) * 1.333333));height:min(var(--stage-height,100dvh),75vw);aspect-ratio:4/3; }
#authView #authStill,#authView #authMotion { position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none; }
#authView #authMotion[hidden] { display:none; }
#authView .auth-brand { position:absolute;left:50%;top:4%;transform:translateX(-50%);width:42%;max-width:340px;height:auto;object-fit:contain;pointer-events:none; }
#authView .auth-panel { position:absolute;left:50%;top:clamp(84px,28%,170px);transform:translateX(-50%);width:clamp(230px,26%,320px);max-width:calc(100% - 24px);margin:0;padding:14px 16px 16px;border:1px solid #dbbe73;border-radius:18px;background:linear-gradient(150deg,#0b4938ed,#062c25ed);box-shadow:inset 0 0 0 3px #80683270,0 8px 25px #031c24aa;backdrop-filter:blur(4px); }
#authView .auth-tabs { display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:0 0 12px;padding:0;background:none;border:0; }
#authView .auth-tabs button,#authView .auth-form button { position:relative;display:block;margin:0;padding:0;border:0;background:none;box-shadow:none;min-width:0;cursor:pointer;transform:none!important; }
#authView .auth-tabs button { height:42px;opacity:.7; }
#authView .auth-tabs button.active { opacity:1;filter:drop-shadow(0 0 3px #f3d08e65); }
#authView .auth-tabs button img,#authView .auth-form button img { display:block;width:100%;height:100%;object-fit:contain;pointer-events:none; }
#authView .auth-form { display:grid;gap:10px;margin:0; }
#authView .auth-form[hidden] { display:none!important; }
#authView .auth-form input { display:block;width:100%;min-width:0;height:44px;min-height:44px;box-sizing:border-box;padding:0 13px;border:1px solid #b99d60;border-radius:11px;background:#042b23ee;color:#fff3cf;box-shadow:inset 0 2px 7px #0005;font:500 16px/1.3 system-ui,sans-serif; }
#authView .auth-form input::placeholder { color:#e1d1ac;opacity:1; }
#authView .auth-form input:focus { outline:2px solid #f7d887;outline-offset:1px; }
#authView .auth-form button { height:58px;margin-top:1px; }
#authView button:focus-visible { outline:2px solid #ffe29b;outline-offset:2px;border-radius:12px; }
#authView .auth-form button[aria-busy="true"] { opacity:.7;cursor:wait; }
#authView .auth-form button[aria-busy="true"]::after { content:"";position:absolute;right:8px;top:calc(50% - 8px);width:16px;height:16px;border:2px solid #eccd7955;border-top-color:#ffe2a0;border-radius:50%;animation:auth-submit-spin 1s linear infinite; }
@keyframes auth-submit-spin { to { transform:rotate(360deg); } }
body.jade-mobile-stage #authView .auth-art-frame { width:min(100%,calc(var(--stage-height) * 1.333333));height:min(var(--stage-height),calc(var(--stage-width) * .75)); }
body.jade-mobile-stage #authView .auth-panel { top:84px;width:230px;padding:10px 12px 12px; }
body.jade-mobile-stage #authView .auth-tabs { margin-bottom:8px; }
body.jade-mobile-stage #authView .auth-tabs button { height:36px; }
body.jade-mobile-stage #authView .auth-form { gap:8px; }
body.jade-mobile-stage #authView .auth-form button { height:52px; }
@media (prefers-reduced-motion:reduce) { #authView .auth-form button::after { animation:none!important; } }

#authView .auth-loading { position:absolute;inset:0;z-index:30;display:grid;place-content:center;gap:8px;background:#07382eef;color:#f7dc96;text-align:center; }
#authView .auth-loading[hidden] { display:none; }
#authLoad progress { width:220px;accent-color:#daba6f; }

body.auth-pending > #jadeStage { display:block!important; }
body.auth-pending #jadeStage>.app-shell { visibility:hidden; }

#authView .auth-panel { transform:translateX(-50%)!important; }
body.auth-pending #jadeStage > :not(#authView):not(.toast):not(script) { display:none!important; }
#authView input:is(:-webkit-autofill,:autofill) { -webkit-box-shadow:0 0 0 1000px #062e27 inset!important;-webkit-text-fill-color:#fff0cc!important;caret-color:#fff0cc; }

#authView.auth-stack .auth-content { min-height:calc(var(--auth-image-height) + 355px); }
#authView.auth-stack .auth-panel,body.jade-mobile-stage #authView.auth-stack .auth-panel { top:calc(var(--auth-image-height) + 16px); }
#authView .auth-tabs button { min-height:0!important; }

/* The rotated form and artwork share the stage viewport during keyboard resizing. */
body.jade-stage-rotated #jadeStage #authView { overflow:hidden!important; }
body.jade-stage-rotated #authView .auth-content { display:grid;place-items:center;min-height:0!important;width:100%;height:100%;padding:8px;box-sizing:border-box; }
body.jade-stage-rotated #authView .auth-art-frame { inset:0;width:100%;height:100%;transform:none;aspect-ratio:auto; }
body.jade-stage-rotated #authView .auth-panel { position:relative;left:auto;top:auto!important;transform:none!important;width:min(230px,100%);max-width:100%;box-sizing:border-box;padding:10px 12px; }
body.jade-stage-rotated #authView .auth-tabs { gap:6px;margin-bottom:6px; }
body.jade-stage-rotated #authView .auth-tabs button { height:32px; }
body.jade-stage-rotated #authView .auth-form { gap:6px; }
body.jade-stage-rotated #authView .auth-form button { height:44px; }

body.auth-pending { margin:0;background:#07382e;font-family:system-ui,sans-serif; }
#jadeStage #authView { z-index:3000; }
#authView .auth-loading { inset:auto 12px 12px auto;z-index:2;padding:8px 12px;border-radius:12px;background:#07382ecf;pointer-events:none;display:grid;gap:4px; }
#authLoad progress { width:140px;height:8px; }#authLoad output { font:14px system-ui; }#authLoad button { pointer-events:auto;min-height:44px; }
#authNotice:empty { display:none; }#authNotice { display:block;color:#ffe4ad;font:14px/1.3 system-ui;margin-bottom:6px; }#authRetry[hidden] { display:none; }
#jadeLoading .load-brand { width:min(280px,60vw);height:auto;justify-self:center; }#jadeLoading button { min-height:44px;border:1px solid #dbc180;background:#145039;color:#ffe5a8;border-radius:12px;font:16px system-ui;padding:8px 18px; }#jadeLoading button[hidden] { display:none; }

body.jade-stage-rotated #authView .auth-art-frame { inset:auto;left:50%;top:50%;transform:translate(-50%,-50%);width:min(100%,calc(var(--stage-height) * 1.333333));height:min(var(--stage-height),calc(var(--stage-width) * .75));aspect-ratio:4/3; }

#jadeStage,#authView .auth-content { box-sizing:border-box; }
body.jade-stage-rotated #authView .auth-content { padding:calc(8px + env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) calc(8px + env(safe-area-inset-left)) calc(8px + env(safe-area-inset-top)); }
body.jade-stage-rotated #authView .auth-art-frame { left:var(--auth-center-x,50%);top:var(--auth-center-y,50%);width:var(--auth-fit-width);height:var(--auth-fit-height); }
