/* Load this layer before the individual desktop game skins. Important declarations 
   inside their layers otherwise keep their bars visible above the phone overlays. */
@layer ar-phone-game40 {
  @media (orientation:landscape) {
    dialog.ar-library-player[open][data-player-phone]:not([data-ember-game-only])[data-phone-game-chevron][data-launch-state="ready"]:not([data-phone-game-hud="open"]) #ar-player-controls {
      display:none!important;
    }
    dialog.ar-library-player[open][data-player-phone]:not([data-ember-game-only])[data-phone-game-chevron][data-launch-state="ready"][data-phone-game-hud="open"] #ar-player-controls {
      --phone-game-rail-safe40:env(safe-area-inset-top,0px);
      --phone-game-rail-height40:calc(38px + var(--phone-game-rail-safe40));
      position:absolute!important;inset:0 0 auto!important;
      z-index:480!important;display:flex!important;flex-direction:row!important;
      align-items:center!important;justify-content:space-between!important;
      width:100%!important;height:var(--phone-game-rail-height40)!important;
      min-height:var(--phone-game-rail-height40)!important;
      max-height:var(--phone-game-rail-height40)!important;flex:none!important;
      gap:8px!important;box-sizing:border-box!important;
      padding:var(--phone-game-rail-safe40) max(8px,env(safe-area-inset-right,0px)) 0 max(8px,env(safe-area-inset-left,0px))!important;
      transform:none!important;visibility:visible!important;opacity:1!important;pointer-events:auto!important;
      overflow:hidden!important;
    }
    dialog.ar-library-player[open][data-player-phone]:not([data-ember-game-only])[data-phone-game-chevron][data-launch-state="ready"][data-phone-game-hud="open"] #ar-player-controls .ar-library-player-heading {
      flex:0 1 calc(50% - 28px)!important;min-width:0!important;height:auto!important;
      display:block!important;text-align:start!important;
    }
    dialog.ar-library-player[open][data-player-phone]:not([data-ember-game-only])[data-phone-game-chevron][data-launch-state="ready"][data-phone-game-hud="open"] #ar-player-controls .ar-library-player-heading > h2 {
      margin:0!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
      line-height:1.12!important;font-size:clamp(14px,2.1vw,17px)!important;
    }
    dialog.ar-library-player[open][data-player-phone]:not([data-ember-game-only])[data-phone-game-chevron][data-launch-state="ready"][data-phone-game-hud="open"] #ar-player-controls .ar-library-player-actions {
      flex:0 0 auto!important;align-self:center!important;align-items:center!important;
      gap:4px!important;margin:0!important;flex-wrap:nowrap!important;
    }
    dialog.ar-library-player[open][data-player-phone]:not([data-ember-game-only])[data-phone-game-chevron][data-launch-state="ready"][data-phone-game-hud="open"] #ar-player-controls .ar-library-player-actions > button:not([hidden]) {
      height:36px!important;min-height:36px!important;padding-block:0!important;line-height:1.1!important;
    }
    dialog.ar-library-player[open][data-player-phone]:not([data-ember-game-only])[data-phone-game-chevron][data-launch-state="ready"][data-player-app="cottage"][data-phone-game-hud="open"] #ar-player-controls .ar-library-player-actions > button:not([hidden]):not([data-player-fullscreen]) {
      flex:0 0 36px!important;width:36px!important;min-width:36px!important;padding-inline:0!important;
    }
    dialog.ar-library-player[open][data-player-phone]:not([data-ember-game-only])[data-phone-game-chevron][data-launch-state="ready"][data-player-app="cottage"][data-phone-game-hud="open"] #ar-player-controls .cottage-glyph155 {
      width:19px;height:19px;
    }
    /* The Sheep iframe takes over when native fullscreen is available.
       Keep the browser fallback trusted retry and preserve Ember's native HUD. */
    dialog.ar-library-player[open][data-player-phone][data-player-app="sheep"][data-launch-state="ready"]:not([data-phone-game-rotate]) [data-player-fullscreen-host]:fullscreen:has(iframe[data-sheep-menu46]) #ar-player-controls {
      display:none!important;
    }
    dialog.ar-library-player[open][data-player-phone]:not([data-ember-game-only])[data-phone-game-chevron][data-launch-state="ready"][data-phone-game-hud="open"] #ar-player-controls .ar-library-player-actions > button:focus-visible {
      outline-offset:-3px!important;
    }
    dialog.ar-library-player[open][data-player-phone]:not([data-ember-game-only])[data-phone-game-chevron][data-launch-state="ready"][data-phone-game-hud="open"] .phone-game-trim33 {
      top:env(safe-area-inset-top,0px);
    }
    dialog.ar-library-player[open][data-player-phone]:not([data-ember-game-only])[data-phone-game-chevron][data-launch-state="ready"][data-phone-game-hud="open"] .phone-game-chevron33 {
      height:38px;
    }
  }
}
