/* Optical layer for entry pages only; inbox/reader/game remain unchanged. */
body.lg-stage{position:relative;isolation:isolate;overflow-x:clip;--lg-color-text:#1f4354;--lg-color-focus:#235e72}
.lg-stage>.lg-canvas{position:absolute;inset:0;width:100%;height:100%;z-index:-1;pointer-events:none;border-radius:0}
.lg-stage.webgl-ready:before{visibility:hidden}
.lg-stage .lens-surface{position:relative;isolation:isolate}
.lg-stage.webgl-ready .lens-surface{background:transparent!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;box-shadow:none!important;border-color:transparent!important}
.lg-stage.webgl-ready .lens-surface:hover{background:transparent!important;transform:none}
.lg-stage .lens-surface:focus-visible{outline:3px solid #1f5269;outline-offset:4px}
.lg-stage .feature-entry{border-radius:20px}
.lg-stage .login-card{border-radius:26px}
.lg-stage .account-module{border-radius:26px}
.lg-stage.webgl-ready .login-card .tabs{background:transparent}
.lg-stage .feature-entry,.lg-stage .login-card h1,.lg-stage .account-name{color:#16374a;text-shadow:0 1px 3px #ffffff9e}
.lg-stage .login-card input{color:#143549}
.lg-stage .login-card input::placeholder{color:#365767;opacity:1}
.lg-stage.webgl-ready .login-card .tabs button[aria-pressed=true]{box-shadow:inset 0 -2px 0 #235e72!important;color:#123b50;font-weight:600}
@media(prefers-reduced-motion:reduce){.lg-stage .lens-surface{transition:none!important}}

/* Clear, stronger type; feedback follows the pointer and touch without moving the form. */
.lg-stage .feature-entry,.lg-stage .account-name{font-weight:750;color:#082d40;text-shadow:0 1px 1px #fff,0 0 8px #ffffffb0}
.lg-stage .feature-entry .icon{stroke-width:1.9;filter:drop-shadow(0 1px 1px #ffffffa0)}
.lg-stage .login-card h1{font-weight:800;color:#082d40;text-shadow:0 1px 1px #fff,0 0 8px #ffffffb0}
.lg-stage .login-card label,.lg-stage .account-role,.lg-stage .account-body,.lg-stage .login-card .note{color:#123849;font-weight:650;text-shadow:0 1px 2px #ffffffed,0 0 6px #ffffffb0}
.lg-stage .glass-button,.lg-stage .login-card .guest,.lg-stage .login-card .tabs button{font-weight:700;color:#0a3145;text-shadow:0 1px 2px #ffffffc0}
.lg-stage .login-card input{font-weight:600;color:#082d40}.lg-stage .login-card input::placeholder{font-weight:500;color:#284e60}
.lg-stage .feature-entry,.lg-stage .glass-button,.lg-stage .guest,.lg-stage .login-card .tabs button{transition:transform .22s cubic-bezier(.2,.85,.25,1.25),filter .2s;overflow:hidden}
.lg-stage :is(.feature-entry,.glass-button,.login-card .primary,.guest,.login-card .tabs button)::after{content:'';position:absolute;inset:0;pointer-events:none;border-radius:inherit;background:radial-gradient(ellipse at var(--lens-x,50%) var(--lens-y,35%),#ffffff85 0%,#ffffff24 28%,transparent 66%);box-shadow:inset 0 1px 1px #ffffffe0,inset 0 0 0 1px #ffffff80;opacity:0;transition:opacity .18s}
@media(hover:hover) and (pointer:fine){.lg-stage.webgl-ready :is(.feature-entry,.glass-button,.login-card .primary,.guest):hover{transform:translateY(-3px) scale(1.008)}.lg-stage :is(.feature-entry,.glass-button,.login-card .primary,.guest,.login-card .tabs button):hover::after{opacity:.85}}
.lg-stage.webgl-ready [data-lens-pressed=true],.lg-stage [data-lens-pressed=true]{transform:scale(.975)!important;filter:brightness(1.12)}
.lg-stage [data-lens-pressed=true]::after{opacity:1!important;background:radial-gradient(ellipse at var(--lens-x,50%) var(--lens-y,50%),#ffffffad,transparent 72%);box-shadow:inset 0 0 0 2px #ffffffe0}
.lg-stage .login-card input:focus{outline:2px solid #174c66;outline-offset:3px}
@media(prefers-reduced-motion:reduce){.lg-stage.webgl-ready :is(.feature-entry,.glass-button,.login-card .primary,.guest):hover,.lg-stage [data-lens-pressed=true]{transform:none!important}.lg-stage :is(.feature-entry,.glass-button,.login-card .primary,.guest,.login-card .tabs button)::after{transition:none}}

.lg-stage .login-card .primary{position:relative;isolation:isolate;color:#082d40!important;font-weight:800;text-shadow:0 1px 2px #fff,0 0 6px #ffffffc0;background:#ffffff30!important;border:1px solid #ffffffa6!important}
.lg-stage.webgl-ready .login-card .primary,.lg-stage.webgl-ready .login-card .primary:hover{background:transparent!important;border-color:transparent!important}

/* Keep a complete CSS scene visible while the optical canvas loads/resizes. */
.lg-stage.webgl-ready:before{visibility:visible}
body.lg-stage{min-height:100svh}
.lg-stage>.lg-canvas{min-height:100%;max-width:none;max-height:none}

/* Entry pages fill one phone viewport; only the form may scroll under a keyboard. */
@media(max-width:760px){
 html:has(body.login-page),html:has(body.workbench-home){height:100%;overflow:hidden;overscroll-behavior:none}
 body.login-page,body.workbench-home{height:100dvh!important;min-height:0!important;max-height:100dvh;overflow:hidden;overscroll-behavior:none;box-sizing:border-box}
 body.workbench-home{padding-top:calc(72px + env(safe-area-inset-top,0px))!important}
 .workbench-home>.home-layout{min-height:0;flex:1;width:100%;margin:12px auto!important;display:flex;align-items:center}
 .workbench-home .launch-grid{width:100%;grid-template-columns:1fr;gap:clamp(10px,2dvh,16px)}
 .workbench-home .feature-entry{height:clamp(76px,14dvh,112px);min-height:0}
 body.login-page{padding: max(12px,env(safe-area-inset-top)) 16px max(8px,env(safe-area-inset-bottom));gap:8px!important}
 .login-page>.login-layout{min-height:0;flex:1;display:flex!important;align-items:center;margin:0 auto!important}
 .login-page .login-card{max-height:100%;overflow-y:auto;overscroll-behavior:contain}
 .login-page>footer,.workbench-home>footer{flex:none;width:100%;font-size:10px!important;padding-block:8px max(8px,env(safe-area-inset-bottom))!important}
}
@media(max-width:760px) and (max-height:650px){.login-page .login-card{padding:18px}.login-page .login-card h1{margin-bottom:10px}.login-page .login-card .tabs{margin-bottom:12px}.login-page .login-card label{margin-bottom:10px}.login-page .login-card .note{margin-top:12px}}

/* Standalone iOS must cover the full containing viewport, including the home-indicator edge. */
@media(max-width:760px){
 html:has(body.workbench-home),html:has(body.login-page){background:#7195aa url('/static/rain-glass-portrait-v1.jpg') center/cover no-repeat}
}
@media(max-width:760px) and (display-mode:standalone){
 body.workbench-home,body.login-page{position:fixed;inset:0;height:100%!important;max-height:none;min-height:0!important}
 body.workbench-home:before,body.login-page:before{position:absolute;inset:0}
}
