/* Keep every reward and its controls inside the current screen. */
body[data-view="lab"] .app-shell{height:100vh;height:100dvh;min-height:340px;max-width:1100px;display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;gap:8px;padding:max(8px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left))}
body[data-view="lab"] .topbar{height:56px;border:0}
body[data-view="lab"] .brand-icon{width:38px;height:38px;font-size:26px;line-height:37px;border-radius:13px;flex:none}
body[data-view="lab"] .brand-title{font-size:21px}
body[data-view="lab"] .brand .eyebrow{font-size:9px}
body[data-view="lab"] .tabs{padding:0;gap:6px}
body[data-view="lab"] .tab{min-height:44px;padding:8px 18px}
body[data-view="lab"] main,body[data-view="lab"] #lab-view,body[data-view="lab"] .lab-layout{min-height:0;height:100%}
body[data-view="lab"] #lab-view>.section-heading{display:none}
body[data-view="lab"] .lab-layout{display:block;max-width:none}
body[data-view="lab"] .play-column{height:100%;min-height:0;display:grid;grid-template-rows:minmax(0,1fr) auto;gap:10px}
body[data-view="lab"] .stage{min-height:0;--shadow-x:0px;--lift:0}
body[data-view="lab"] .stage-heading{padding:12px 18px 3px;flex:none}
body[data-view="lab"] .stage-heading h2{font-size:21px;line-height:1.3;overflow-wrap:anywhere}
body[data-view="lab"] .stage-heading .eyebrow{display:none}
body[data-view="lab"] .canvas-area{height:auto;min-height:70px;flex:1}
body[data-view="lab"] .canvas-area:after{left:38%;right:38%;bottom:4%;height:18px;transform:translateX(var(--shadow-x)) scaleX(calc(1 + var(--compression)*.45 - var(--lift)*.24));opacity:calc(.65 - var(--lift)*.35)}
body[data-view="lab"] .stage-bottom{padding:4px 14px 10px;flex:none}
body[data-view="lab"] .gesture-hint{font-size:12px;white-space:normal}
body[data-view="lab"] .under-stage{margin:0;gap:8px}
body[data-view="lab"] .under-stage button{min-height:48px;white-space:nowrap}
body[data-view="lab"] .next-gacha{color:#b83e66;border-color:#fac1d3;background:#fff0f5}
body[data-view="lab"] footer{margin:0;padding:0;border:0;min-height:25px;align-items:center;flex-direction:row;letter-spacing:0}
body[data-view="lab"] footer>span{display:none}
body[data-view="lab"] footer div{gap:18px}
.lineup-art{position:relative;display:grid;place-items:center}
.lineup-art img{display:block}
.lineup-item.is-secret{background:linear-gradient(135deg,#f3ecff,#fff0f6);border:1px dashed #bf9acb}
.lineup-item.is-secret img{filter:brightness(0);opacity:.32}
.secret-mark{position:absolute;color:white;text-shadow:0 2px 5px #51356166;font-size:38px;font-weight:900;line-height:1}
.rarity.secret{color:#8d4ba2}
@media(max-width:600px){
 body[data-view="lab"] .app-shell{padding-inline:max(10px,env(safe-area-inset-left)) max(10px,env(safe-area-inset-right));gap:6px}
 body[data-view="lab"] .topbar{height:54px}
 body[data-view="lab"] .brand-title{font-size:17px}
 body[data-view="lab"] .brand-title>span{font-size:14px}
 body[data-view="lab"] .brand .eyebrow{font-size:8px}
 body[data-view="lab"] .tab{padding:8px 4px;font-size:12px}
 body[data-view="lab"] .stage-heading{padding:10px 13px 3px}
 body[data-view="lab"] .stage-heading h2{font-size:18px}
 body[data-view="lab"] .material-badge{font-size:10px;padding:5px 8px}
 body[data-view="lab"] .gesture-hint{font-size:10px}
 body[data-view="lab"] .under-stage button{flex:1;min-width:0;padding:10px 7px;font-size:12px}
 body[data-view="lab"] .keyboard-tip{display:none}
 body[data-view="lab"] footer a{font-size:10px}
}
@media(max-height:500px) and (min-width:600px){
 body[data-view="lab"] .app-shell{min-height:300px;gap:4px}
 body[data-view="lab"] .topbar{height:44px}
 body[data-view="lab"] .brand-title{font-size:18px}
 body[data-view="lab"] .tab{padding:6px 16px}
 body[data-view="lab"] .play-column{grid-template-columns:minmax(0,1fr) 128px;grid-template-rows:minmax(0,1fr)}
 body[data-view="lab"] .under-stage{flex-direction:column;justify-content:center}
 body[data-view="lab"] .under-stage button{width:100%}
 body[data-view="lab"] .keyboard-tip{display:none}
 body[data-view="lab"] .stage-heading{padding-top:6px}
 body[data-view="lab"] .stage-heading h2{font-size:17px}
 body[data-view="lab"] .stage-bottom{padding-bottom:5px}
}

body[data-view="lab"] .under-stage button{padding-inline:8px;min-width:0}
@media(max-width:600px){body[data-view="lab"] .under-stage{gap:5px}body[data-view="lab"] .under-stage button{font-size:12px;padding-inline:4px;flex:1}}
@media(max-height:500px) and (min-width:600px){body[data-view="lab"] .under-stage{gap:6px}body[data-view="lab"] .under-stage button{min-height:44px;padding-block:8px}}
