/* Gameplay is a bounded game surface. Only roster rails and inspectors scroll. */
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
html.in-game,html.in-game body{height:100%;overflow:hidden}
.game-frame{height:100vh;height:100svh;height:min(100svh,var(--game-height,100svh));width:100%;display:grid;grid-template-rows:48px 66px minmax(0,1fr) auto;overflow:hidden;background:radial-gradient(ellipse at 50% 20%,#5e49352e,transparent 75%),#11131e;padding-top:env(safe-area-inset-top)}
.game-frame .game-header{height:48px;min-width:0;max-width:1440px;width:100%;margin:0 auto;padding:5px max(24px,env(safe-area-inset-right)) 5px max(24px,env(safe-area-inset-left));background:#11131edb}
.game-frame .wordmark{font-size:17px;line-height:.86;letter-spacing:0;flex-shrink:0}
.game-frame .header-right{gap:12px}.game-frame .header-team{font-size:11px}.game-frame .header-team .team-logo{width:28px;height:28px}
.game-frame .game-header .quiet{font-size:12px;min-height:38px;padding:6px 4px;min-width:44px}
.game-frame .nav-shell{position:static;min-width:0;height:66px;background:#11131ec9}
.game-frame .nav-shell .chapters{max-width:850px;height:100%;padding:3px 8px 0;gap:3px}
.game-frame .nav-shell .chapter-control{min-height:0;height:100%;display:flex;flex-direction:column;gap:3px;justify-content:center;text-align:center;padding:2px 1px 6px;font-size:9px;line-height:1.2}
.game-frame .nav-shell .chapter-control strong{font-size:9px;line-height:1.15;min-height:21px;max-width:100px}
.game-frame .nav-shell .stage-icon{width:23px;height:23px;box-shadow:none;flex-shrink:0}.game-frame .nav-shell .stage-icon svg{width:14px;height:14px}
.game-frame .game-shell{height:100%;min-height:0;min-width:0;overflow:hidden;padding:0;display:grid;grid-template-rows:minmax(0,1fr)}
.game-frame .office-scene{opacity:.12;inset:0;mask-image:none}.game-frame .office-scene svg{height:100%;filter:blur(3px)}
.game-frame .content{width:100%;height:100%;min-height:0;min-width:0;max-width:1440px;margin:0 auto;padding:14px max(24px,env(safe-area-inset-right)) 8px max(24px,env(safe-area-inset-left));overflow:hidden}
.viewport-stage{height:100%;min-height:0;min-width:0;display:grid;grid-template-rows:minmax(0,1fr);gap:9px}
.roster-region{display:grid;grid-template-rows:minmax(0,1fr) 44px;gap:6px;min-width:0;min-height:0;overflow:hidden}
.game-frame .roster-grid,.game-frame .team-choices{display:flex;flex-flow:row nowrap;align-items:stretch;gap:14px;min-width:0;min-height:0;height:100%;padding:2px 4px 7px;margin:0;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scroll-padding:4px;overscroll-behavior-x:contain;scrollbar-width:thin;scrollbar-color:#f3bd5470 transparent;touch-action:pan-x pinch-zoom}
.game-frame .roster-grid>.player-card{flex:0 0 clamp(180px,19vw,240px);width:clamp(180px,19vw,240px);height:100%;min-height:0;display:grid;grid-template-rows:minmax(0,1fr) auto auto;scroll-snap-align:start}
.game-frame .player-card .portrait-wrap{height:100%;min-height:0;min-width:0}.game-frame .portrait-wrap .portrait{min-height:0;height:100%;object-fit:contain;object-position:center bottom}
.game-frame .player-info{padding:12px}.game-frame .player-info h3{font-size:16px;line-height:1.2}.game-frame .player-meta{font-size:11px;gap:5px;line-height:1.3;flex-wrap:wrap}.game-frame .player-meta span:last-child{white-space:nowrap}
.game-frame .card-instruction{font-size:12px;font-weight:700;padding:12px;color:var(--gold);border-top:1px solid var(--line);min-height:44px;display:flex;align-items:center}
.game-frame .departed .card-instruction{color:var(--ink)}.game-frame .select-corner{height:26px;width:26px;top:9px;right:9px}.game-frame .player-card .badge{font-size:9px;padding:5px 7px;max-width:calc(100% - 55px)}
.game-frame .rail-tools{display:flex;min-width:0;align-items:center;gap:10px;justify-content:space-between;height:44px;overflow:hidden}
.game-frame .rail-tools .quiet{min-height:40px;padding:6px 8px;font-size:12px}.game-frame .rail-arrows{display:flex;gap:4px;margin-left:auto;flex-shrink:0}.game-frame .rail-arrows .quiet{height:40px;min-width:44px;font-size:22px;border:1px solid var(--line);border-radius:5px;background:#191c29bb;line-height:1}
.game-frame .roster-count{font-size:11px;color:var(--muted)}
.game-frame .dock{position:static;min-width:0;width:100%;margin:0;bottom:auto;padding:12px max(24px,calc((100vw - 1392px)/2),env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(24px,calc((100vw - 1392px)/2),env(safe-area-inset-left));min-height:76px;display:flex;gap:18px;justify-content:flex-end;align-items:center;background:#141622f5;box-shadow:0 -8px 35px #0003}
.game-frame .dock .button{min-height:48px;margin:0;min-width:220px;max-width:460px;font-size:14px;padding:12px 20px;line-height:1.2;flex:0 1 auto}
.game-frame .dock:has(>.button:only-child){justify-content:center}.game-frame .dock>.button:only-child{width:min(460px,100%)}
.game-frame .decision-count{font-size:12px;color:var(--muted);margin-right:auto;white-space:nowrap}.game-frame .pick-counter{display:block!important;margin-right:auto;min-height:44px;padding:8px 0;color:var(--gold);font-size:13px;border-bottom:1px dotted #f3bd5450;white-space:nowrap}
.game-frame .dock-score{margin-right:auto;flex-shrink:0}.game-frame .dock-score strong{font-family:Impact,'Arial Narrow',sans-serif;font-size:28px;font-weight:400;color:var(--gold);line-height:1}.game-frame .dock-score small{display:block;font-size:10px;margin-top:5px}
.game-frame .franchise-stage{grid-template-rows:minmax(0,1fr)}
.game-frame .team-carousel>.team-card{flex:0 0 clamp(245px,27vw,340px);height:100%;width:clamp(245px,27vw,340px);min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto;padding:18px;text-align:center;gap:10px;background:radial-gradient(ellipse at center,#77552f22,transparent),#1b1e2bd9;scroll-snap-align:center}
.game-frame .team-card.active{background:radial-gradient(ellipse,#ad6a2525,transparent),#242331;box-shadow:inset 0 0 0 1px #f3bd5444}
.game-frame .team-card-head{display:flex;flex-direction:column;align-items:center;gap:8px}.game-frame .team-card .team-logo{width:76px;height:76px}.game-frame .team-card h2{font-size:27px;line-height:1.1;max-width:100%;white-space:normal}
.game-frame .team-card .hero-players{width:100%;height:100%;min-height:0;margin:0;display:flex;align-items:flex-end;justify-content:center;overflow:hidden}
.game-frame .team-card .hero-players .portrait{width:43%;height:100%;min-height:0;max-height:260px;object-fit:contain;object-position:bottom;flex-shrink:0;margin:0 -5%}
.game-frame .team-card-record{font-size:13px}.game-frame .team-card-record strong{font-size:30px;color:var(--gold);font-family:Impact,'Arial Narrow',sans-serif;font-weight:400}.game-frame .team-card-record small{display:block;font-size:10px;margin-top:5px}
.game-frame .jump-team{flex:1;max-width:340px;min-width:0}.game-frame .jump-team select{min-height:40px;padding:8px;font-size:12px}
.game-frame .disaster-stage{grid-template-rows:44px minmax(0,1fr)}
.game-frame .scenario-rail{height:44px;min-height:0;gap:8px;padding:0;margin:0;overflow-y:hidden;scrollbar-width:none}.game-frame .scenario{font-size:12px;padding:6px 12px;min-height:40px;height:40px}.game-frame .scenario b{font-size:20px}
.game-frame .draft-stage{grid-template-rows:42px 44px minmax(0,1fr);gap:7px}
.game-frame .donor-rail{height:42px;min-height:0;margin:0;padding:0;gap:7px;overflow-y:hidden;scrollbar-width:none}.game-frame .donor{min-height:38px;height:38px;min-width:62px;padding:5px 9px;font-size:11px}.game-frame .donor .team-logo{width:24px;height:24px}
.game-frame .draft-toolbar{height:44px;min-height:0;min-width:0;margin:0;gap:7px;flex-wrap:nowrap}.game-frame .draft-toolbar input{width:0;min-width:0;flex:1;max-width:350px;min-height:40px;height:40px;font-size:12px;padding:8px 10px}.game-frame .draft-toolbar select{width:92px;min-height:40px;height:40px;font-size:11px;padding:8px}.game-frame .draft-toolbar .chip{min-height:40px;padding:8px 12px;font-size:12px}.game-frame .protected-button{font-size:11px;min-height:40px;padding:7px 9px;white-space:nowrap;border:1px solid var(--line)}
.game-frame .candidate-footer{display:block;margin:0;padding:0 10px 10px}.game-frame .candidate-footer .button{width:100%;min-height:48px;font-size:12px;padding:9px 8px;line-height:1.2;white-space:normal;overflow-wrap:anywhere}.game-frame .candidate-footer .button:disabled{opacity:.45}
.game-frame .player-card .star{position:absolute;top:5px;right:4px;z-index:2;width:44px;min-width:44px;height:44px;padding:0;display:grid;place-items:center;font-size:26px;color:#d9d5cb;text-shadow:0 1px 3px #000;background:#121522b8;border-radius:5px}.game-frame .player-card .star.active{color:var(--gold)}
.game-frame .upside{font-size:11px;margin-top:8px;line-height:1.2}.game-frame .load-card{display:flex!important;justify-content:center;align-items:center;text-align:center;font-size:14px;line-height:1.5;padding:18px;color:var(--gold)}
.game-frame .draft-grid>.empty{width:100%;padding:20px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;font-size:13px}.game-frame .draft-grid>.empty .button{font-size:12px;min-height:44px}
.game-frame .build-stage{grid-template-rows:44px minmax(0,1fr)}.game-frame .review-toolbar{height:44px;min-height:0;gap:7px;margin:0;flex-wrap:nowrap}.game-frame .review-toolbar button{min-height:40px;font-size:12px;padding:8px 13px}.game-frame .review-toolbar>.quiet{margin-left:auto}
.game-frame .court{min-height:0;height:100%;width:min(100%,850px);margin:0 auto;background:repeating-linear-gradient(90deg,#d6a05c15 0 50px,#a1754212 50px 100px),radial-gradient(ellipse at top,#6b522c33,#191d2b)}
.game-frame .court-player{height:28%;min-height:0;max-width:180px;display:grid;grid-template-rows:minmax(0,1fr) auto auto;gap:2px}.game-frame .court-player .portrait{height:100%;min-height:0;object-fit:contain;object-position:center bottom}.game-frame .court-player strong{font-size:12px;line-height:1.15;padding:3px 5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.game-frame .court-player small{font-size:9px;margin:0;line-height:1.2}
.game-frame .rotation-card{grid-template-rows:minmax(0,1fr) auto}.game-frame .minute-value{display:block;font-size:26px;font-family:Impact,'Arial Narrow',sans-serif;font-weight:400;margin-top:12px;color:var(--gold)}
.game-frame .season-stage{grid-template-rows:44px minmax(0,1fr);position:relative}.game-frame .season-status{display:flex;gap:10px;align-items:center;min-width:0}.game-frame .season-status .team-logo{width:35px;height:35px}.game-frame .season-status strong{font-size:13px}.game-frame .season-status>span{margin-left:auto;font-size:11px;color:var(--muted)}
.game-frame .simulation-status{position:absolute;inset:auto 0 0;padding:20px;background:#11131ee8;text-align:center;font-size:12px;color:var(--muted);border-radius:0 0 8px 8px}.game-frame .progress-track{margin:0 auto 12px;width:min(350px,90%)}
.game-frame .glory-stage{display:flex;flex-direction:column;align-items:center;justify-content:space-evenly;padding:5px 0;text-align:center;gap:8px}.game-frame .result-identity{display:flex;flex-direction:column;align-items:center;gap:7px}.game-frame .result-identity .team-logo{width:60px;height:60px}.game-frame .result-identity h1{font-family:Arial,Helvetica,sans-serif;font-size:18px;font-weight:700;line-height:1.2}
.game-frame .big-record{font-size:clamp(68px,19svh,150px);margin:0 0 6px;line-height:.95}.game-frame .result-score>span{font-size:11px;color:var(--muted)}.game-frame .record-compare{margin-top:14px;font-size:12px;gap:20px}.game-frame .glory-stage .stats{justify-content:center;margin:0;gap:32px}.game-frame .stat strong{font-size:23px}.game-frame .stat span{font-size:10px}
#game-dialog .protected-list{display:flex;gap:10px;overflow-x:auto;scroll-snap-type:x mandatory;padding:3px 0 12px;max-height:58svh}
#game-dialog .protected-player{width:140px;flex:0 0 140px;scroll-snap-align:start;background:#11131e77;border-radius:6px;padding:8px;text-align:center}
#game-dialog .protected-player .portrait{height:140px;width:100%;object-fit:contain}.protected-player strong{display:block;font-size:12px;line-height:1.3}
html.in-game #toast{bottom:max(92px,calc(env(safe-area-inset-bottom) + 82px))}
@media(max-width:700px){
 .game-frame{grid-template-rows:44px 62px minmax(0,1fr) auto}
 .game-frame .game-header{height:44px;padding:3px max(14px,env(safe-area-inset-right)) 3px max(14px,env(safe-area-inset-left))}.game-frame .wordmark{font-size:16px}.game-frame .header-right{gap:8px}.game-frame .header-team .team-logo{width:26px;height:26px}.game-frame .game-header .quiet{font-size:11px}
 .game-frame .nav-shell{height:62px}.game-frame .nav-shell .chapters{padding:2px 4px 0;gap:0}.game-frame .nav-shell .chapter-control strong{font-size:8px;max-width:70px;min-height:20px}.game-frame .nav-shell .stage-icon{width:22px;height:22px}
 .game-frame .content{padding:9px max(12px,env(safe-area-inset-right)) 4px max(12px,env(safe-area-inset-left))}
 .game-frame .roster-grid,.game-frame .team-choices{gap:10px;padding:1px 2px 5px}
 .game-frame .roster-grid>.player-card{flex-basis:clamp(160px,51vw,220px);width:clamp(160px,51vw,220px)}
 .game-frame .player-info{padding:10px}.game-frame .player-info h3{font-size:14px}.game-frame .player-meta{font-size:10px}.game-frame .card-instruction{font-size:11px;padding:10px;min-height:40px}.game-frame .candidate-footer{padding:0 8px 8px}.game-frame .candidate-footer .button{font-size:11px;padding:8px 6px;min-height:46px}
 .game-frame .rail-tools{gap:5px}.game-frame .rail-tools .quiet{font-size:10px;padding:5px 4px}.game-frame .rail-arrows{gap:4px}.game-frame .rail-arrows .quiet{font-size:20px;min-width:38px;width:38px}.game-frame .roster-count{font-size:10px}.game-frame .change-team{font-size:10px}.game-frame .rail-tools .change-team{padding-left:6px;padding-right:6px}
 .game-frame .dock{padding:10px max(14px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left));min-height:70px;gap:10px}
 .game-frame .dock .button{min-width:0;max-width:100%;min-height:46px;padding:10px 12px;font-size:12px;flex:1}.game-frame .dock .button.secondary{flex:0 1 36%;font-size:11px}.game-frame .dock .quiet{display:block}.game-frame .decision-count{font-size:10px;max-width:88px;white-space:normal;line-height:1.4}.game-frame .pick-counter{font-size:11px;flex-shrink:0}.game-frame .dock-score strong{font-size:25px}.game-frame .dock-score small{font-size:9px;max-width:125px;line-height:1.3}
 .game-frame .team-carousel>.team-card{flex-basis:76vw;width:76vw;padding:14px;gap:8px}.game-frame .team-card .team-logo{width:65px;height:65px}.game-frame .team-card h2{font-size:24px}.game-frame .team-card-head{gap:5px}.game-frame .team-card-record strong{font-size:28px}
 .game-frame .scenario{font-size:11px;padding:6px 10px;gap:7px}.game-frame .scenario b{font-size:18px}
 .game-frame .draft-stage{grid-template-rows:38px 40px minmax(0,1fr);gap:6px}.game-frame .donor-rail{height:38px}.game-frame .donor{height:35px;min-height:35px;min-width:58px;font-size:10px;padding:5px 8px}.game-frame .donor .team-logo{width:23px;height:23px}
 .game-frame .draft-toolbar{height:40px;gap:5px}.game-frame .draft-toolbar input{font-size:16px;min-height:38px;height:38px;padding:7px;max-width:none}.game-frame .draft-toolbar select{font-size:10px;width:72px;min-height:38px;height:38px;padding:6px}.game-frame .draft-toolbar .chip{font-size:11px;padding:7px;min-height:38px}.game-frame .protected-button{font-size:9px;min-height:38px;padding:7px 6px}
 .game-frame .review-toolbar{gap:5px}.game-frame .review-toolbar button{font-size:10px;padding:8px 10px}.game-frame .court-player strong{font-size:10px;padding:3px}.game-frame .court-player small{font-size:8px}
 .game-frame .season-status strong{font-size:12px}.game-frame .season-status>span{font-size:9px}.game-frame .season-status .team-logo{width:30px;height:30px}
 .game-frame .result-identity .team-logo{width:48px;height:48px}.game-frame .result-identity h1{font-size:16px}.game-frame .big-record{font-size:clamp(64px,17svh,120px)}.game-frame .glory-stage .stats{gap:24px}.game-frame .stat strong{font-size:21px}.game-frame .stat span{font-size:9px}.game-frame .record-compare{font-size:11px;gap:16px}
}
@media(max-height:550px){
 .game-frame{grid-template-rows:38px 51px minmax(0,1fr) auto}.game-frame .game-header{height:38px}.game-frame .wordmark{font-size:14px}.game-frame .nav-shell{height:51px}.game-frame .nav-shell .stage-icon{width:18px;height:18px}.game-frame .nav-shell .stage-icon svg{width:12px;height:12px}.game-frame .nav-shell .chapter-control{gap:2px}.game-frame .nav-shell .chapter-control strong{font-size:8px;min-height:17px;max-width:110px}
 .game-frame .content{padding-top:6px}.game-frame .dock{min-height:60px;padding-top:6px;padding-bottom:max(6px,env(safe-area-inset-bottom))}.game-frame .dock .button{min-height:42px;font-size:11px;padding:8px 12px}
 .game-frame .roster-region{grid-template-rows:minmax(0,1fr) 34px;gap:3px}.game-frame .rail-tools{height:34px}.game-frame .rail-tools .quiet{min-height:32px}.game-frame .rail-arrows .quiet{height:32px}
 .game-frame .player-info{padding:7px}.game-frame .player-info h3{font-size:12px}.game-frame .player-meta{font-size:9px;margin-top:4px}.game-frame .upside{font-size:9px;margin-top:5px}.game-frame .candidate-footer{padding:0 7px 6px}.game-frame .candidate-footer .button{min-height:40px;font-size:10px;padding:6px}.game-frame .card-instruction{font-size:10px;padding:7px;min-height:34px}
 .game-frame .team-card .team-logo{width:38px;height:38px}.game-frame .team-card h2{font-size:18px}.game-frame .team-card-record strong{font-size:23px}.game-frame .team-card-record small{font-size:9px;margin-top:2px}.game-frame .team-carousel>.team-card{gap:4px;padding:10px}.game-frame .team-card-head{gap:4px}
 .game-frame .big-record{font-size:70px}.game-frame .result-identity{flex-direction:row;gap:8px}.game-frame .result-identity .team-logo{width:32px;height:32px}.game-frame .result-identity h1{font-size:14px}.game-frame .record-compare{margin-top:8px}.game-frame .stat strong{font-size:18px}.game-frame .stat span{font-size:8px}.game-frame .season-status{height:32px}.game-frame .season-stage{grid-template-rows:32px minmax(0,1fr)}
}
@media(max-height:450px) and (min-width:600px){
 .game-frame{grid-template-rows:34px 45px minmax(0,1fr) auto}.game-frame .game-header{height:34px}.game-frame .nav-shell{height:45px}.game-frame .nav-shell .chapter-control{flex-direction:row;gap:6px}.game-frame .nav-shell .chapter-control strong{font-size:8px;min-height:0;max-width:100px;text-align:left}.game-frame .content{padding-top:5px}.game-frame .dock{min-height:55px}.game-frame .dock .button{min-height:40px}
 .game-frame .draft-stage{grid-template-columns:180px minmax(0,1fr);grid-template-rows:36px minmax(0,1fr);gap:6px 10px}.game-frame .donor-rail{grid-column:1 / 3;grid-row:1;height:36px}.game-frame .draft-toolbar{grid-column:1;grid-row:2;height:100%;flex-direction:column;justify-content:flex-start;align-items:stretch;gap:5px}.game-frame .draft-toolbar input{width:100%;height:36px;min-height:36px;flex:0 0 auto;max-width:100%;font-size:16px}.game-frame .draft-toolbar select{width:100%;height:32px;min-height:32px}.game-frame .draft-toolbar .chip,.game-frame .protected-button{min-height:32px}.game-frame .draft-stage>.roster-region{grid-column:2;grid-row:2}
 .game-frame .roster-grid>.player-card{flex-basis:170px;width:170px}.game-frame .team-carousel>.team-card{flex-basis:290px;width:290px;grid-template-columns:95px minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;gap:5px}.game-frame .team-card-head{grid-column:1;grid-row:1}.game-frame .team-card .hero-players{grid-column:2;grid-row:1 / 3}.game-frame .team-card-record{grid-column:1;grid-row:2}.game-frame .glory-stage{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto auto}.game-frame .result-identity{justify-content:center}.game-frame .result-score{grid-column:2;grid-row:1 / 3}.game-frame .glory-stage .stats{grid-column:1;grid-row:2;gap:22px}
}
.inspector-roster{display:flex;gap:12px;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;padding:3px 0 12px}
.inspector-card{flex:0 0 175px;min-width:0;background:#11131e88;border:1px solid var(--line);border-radius:6px;display:flex;flex-direction:column;gap:7px;padding:10px;scroll-snap-align:start}
.inspector-card .portrait{height:min(175px,30svh);width:100%;object-fit:contain}.inspector-card strong{font-size:13px;color:var(--ink);line-height:1.3}.inspector-card small{font-size:10px;line-height:1.3}.inspector-card .button{font-size:11px;padding:9px 6px;min-height:44px;line-height:1.2;margin-top:auto}
