/* The control lives outside #app so screen changes never remove the exit route. */
@layer components {
  .fullscreen-button {
    position:fixed;
    right:calc(16px + env(safe-area-inset-right,0px));
    bottom:calc(16px + env(safe-area-inset-bottom,0px));
    z-index:60;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:9px;
    min-width:48px;
    min-height:48px;
    padding:11px 15px;
    border:1px solid #d9d0e9;
    border-radius:15px;
    background:#fff;
    color:var(--purple-dark);
    box-shadow:0 3px 15px #49356114;
    font-size:.8rem;
    font-weight:600;
    line-height:1.25;
    white-space:nowrap;
    touch-action:manipulation;
    transition:background .16s,border-color .16s;
  }
  .fullscreen-button:hover { background:var(--purple-soft); border-color:#bbaad7; }
  .fullscreen-button:focus-visible { outline:3px solid #8a73d8; outline-offset:4px; }
  .fullscreen-button svg { width:20px; height:20px; flex-shrink:0; }
  .fullscreen-button .fullscreen-exit,
  .fullscreen-button[aria-pressed=true] .fullscreen-enter { display:none; }
  .fullscreen-button[aria-pressed=true] .fullscreen-exit { display:block; }

}

@layer responsive {
  .has-fullscreen-control .main { padding-bottom:80px; }
  .has-fullscreen-control .player-footer {
    min-height:calc(80px + env(safe-area-inset-bottom,0px));
    align-items:center;
    padding-right:calc(190px + env(safe-area-inset-right,0px));
  }
  .has-fullscreen-control .completion-caption { padding-bottom:calc(88px + env(safe-area-inset-bottom,0px)); }
  .has-fullscreen-control .reward-stage { padding-bottom:calc(88px + env(safe-area-inset-bottom,0px)); }
  .has-fullscreen-control .pause-backdrop { padding:16px 0 calc(80px + env(safe-area-inset-bottom,0px)); }
  .has-fullscreen-control .toast { bottom:calc(80px + env(safe-area-inset-bottom,0px)); }
  @media(max-width:650px) {
    .fullscreen-button { padding:12px; }
    .fullscreen-button [data-fullscreen-label] { display:none; }
    .has-fullscreen-control .player-footer { padding-right:calc(84px + env(safe-area-inset-right,0px)); }
  }
}
