.player-toolbar .icon-button { min-width:44px; min-height:44px; }
.player-toolbar > div { gap:8px; }
.player-toolbar strong { min-width:0; overflow-wrap:anywhere; }
body.player-expanded-open { overflow:hidden; overscroll-behavior:none; }
.player-expanded-open .bottom-nav { display:none; }
.player-shell.player-expanded {
  position:fixed; inset:0; z-index:1000; width:100%; height:100vh; height:100dvh;
  display:flex; flex-direction:column; border:0; border-radius:0;
  padding:env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
}
.player-shell.player-expanded .game-stage,
.player-shell:fullscreen .game-stage {
  flex:1 1 0; min-height:0; max-height:none; aspect-ratio:auto;
}
.player-expanded .player-toolbar, .player-shell:fullscreen .player-toolbar {
  flex:none; padding-bottom:max(6px,env(safe-area-inset-bottom));
}
@media (max-width:420px) {
  .player-toolbar { gap:4px; }
  .player-toolbar strong { max-width:calc(100% - 208px); }
}
/* Keep game space usable when an iPhone rotates with its browser bars visible. */
.player-expanded .game-stage,.player-shell:fullscreen .game-stage{touch-action:none}
.frame-loading{padding:24px;text-align:center;color:#fff}
.frame-loading button[hidden]{display:none}
@media (max-height:500px) and (orientation:landscape){
 .player-expanded .player-toolbar,.player-shell:fullscreen .player-toolbar{min-height:44px;padding:3px 10px;flex-wrap:nowrap}
 .player-expanded .player-summary,.player-shell:fullscreen .player-summary{width:auto;flex:1;min-width:0}
 .player-expanded .player-summary .card-stats,.player-shell:fullscreen .player-summary .card-stats{display:none}
 .player-expanded .player-actions,.player-shell:fullscreen .player-actions{width:auto;border:0;padding:0;gap:4px}
 .player-expanded .player-actions button,.player-shell:fullscreen .player-actions button{min-height:40px;min-width:44px}
}
@media(max-width:767px) and (orientation:portrait){
 .playing .player-shell.landscape.player-expanded .game-stage::after{content:'Turn your phone sideways for a larger game view';position:absolute;left:16px;right:16px;top:max(14px,env(safe-area-inset-top));text-align:center;color:#d6d9e5;font:13px/1.5 system-ui;pointer-events:none}
}
/* Matching licensed IconScout toolbar set, with equal visual and touch sizes. */
.game-reference .player-actions{gap:6px}
.game-reference .player-actions .icon-button{min-width:64px;min-height:56px;padding:7px 10px;gap:5px;border-radius:10px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--text)}
.game-reference .player-actions .icon-button>svg{width:24px;height:24px;flex:0 0 24px;display:block}
.game-reference .player-actions .icon-button>span{font-size:11px;font-weight:500;line-height:1.2}
.game-reference .player-actions .icon-button:hover{background:var(--panel2);color:#ff5630}
.game-reference .player-actions .icon-button.saved{color:#ff5630}
.game-reference .player-actions .restart-control{display:none}
.playing .game-reference .player-actions .restart-control{display:flex}
@media(max-height:500px) and (orientation:landscape){.game-reference .player-expanded .player-actions .icon-button{min-height:48px;min-width:60px;padding:3px 8px;gap:3px}}
