/* V1.288 · A quiet, single-owner room background that keeps seats and controls in focus. */
:root {
  --room-lobby-minimal-art: url("assets/ui/room-lobby/room-lobby-minimal-celestial-v1.webp?v=V1.288Beta-room-lobby-minimal1");
}

html body:not(.maintenance-mode)
  #appRoot#appRoot.app.room-lobby-app
  > .arena {
  background-color: #dceaf4 !important;
  background-image:
    linear-gradient(
      180deg,
      rgba(13, 40, 67, 0.28) 0%,
      rgba(25, 58, 86, 0.1) 22%,
      rgba(255, 255, 255, 0.02) 58%,
      rgba(16, 43, 69, 0.2) 100%
    ),
    var(--room-lobby-minimal-art) !important;
  background-position: center center, center center !important;
  background-size: cover, cover !important;
  background-repeat: no-repeat, no-repeat !important;
  background-attachment: scroll, scroll !important;
}

html body:not(.maintenance-mode)
  #appRoot#appRoot.app.room-lobby-app
  > .arena::before,
html body:not(.maintenance-mode)
  #appRoot#appRoot.app.room-lobby-app
  > .arena::after {
  content: none !important;
  display: none !important;
  background: none !important;
  opacity: 0 !important;
}

html body:not(.maintenance-mode)
  #appRoot#appRoot.app.room-lobby-app
  #roomLobby#roomLobby.room-lobby:not([hidden]) {
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html body:not(.maintenance-mode)
  #appRoot#appRoot.app.room-lobby-app
  > .arena
  > .topbar h1,
html body:not(.maintenance-mode)
  #appRoot#appRoot.app.room-lobby-app
  > .arena
  > .topbar #subtitle {
  text-shadow:
    0 2px 6px rgba(5, 24, 42, 0.62),
    0 0 18px rgba(5, 24, 42, 0.22) !important;
}

@media (max-width: 720px) {
  html body:not(.maintenance-mode)
    #appRoot#appRoot.app.room-lobby-app
    > .arena {
    background-image:
      linear-gradient(
        180deg,
        rgba(12, 39, 67, 0.38) 0%,
        rgba(24, 57, 84, 0.14) 24%,
        rgba(255, 255, 255, 0.02) 54%,
        rgba(15, 42, 67, 0.24) 100%
      ),
      var(--room-lobby-minimal-art) !important;
    background-position: center center, center center !important;
    background-size: cover, cover !important;
    background-attachment: scroll, scroll !important;
  }

  /* Keep the compact room identity readable instead of squeezing 房间 vertically. */
  html body:not(.maintenance-mode)
    #appRoot#appRoot.app.room-lobby-app
    #roomPill#roomPill.room-pill:not([hidden]) {
    width: auto !important;
    min-width: 0 !important;
    max-width: min(230px, calc(100vw - 24px)) !important;
    display: inline-flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    white-space: nowrap !important;
  }

  html body:not(.maintenance-mode)
    #appRoot#appRoot.app.room-lobby-app
    #roomPill#roomPill.room-pill:not([hidden])
    > :is(span, strong, button) {
    min-width: 0 !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    writing-mode: horizontal-tb !important;
  }

  /* The room action rail occupies the phone's bottom edge; dock settings above it. */
  html body:not(.maintenance-mode):has(
      #appRoot.app.room-lobby-app #roomLobby.room-lobby:not([hidden])
    )
    > #settingsToggle.settings-toggle {
    --settings-bottom: max(
      104px,
      calc(env(safe-area-inset-bottom) + 100px)
    );
  }

  html body:not(.maintenance-mode):has(
      #appRoot.app.room-lobby-app #roomLobby.room-lobby:not([hidden])
    )
    > #settingsDockPanel.settings-dock-panel {
    --settings-bottom: max(
      150px,
      calc(env(safe-area-inset-bottom) + 146px)
    );
  }

  html body:not(.maintenance-mode).settings-dock-open:has(
      #appRoot.app.room-lobby-app #roomLobby.room-lobby:not([hidden])
    )
    > :is(#languageToggle.language-toggle, #musicToggle.music-toggle) {
    bottom: max(
      156px,
      calc(env(safe-area-inset-bottom) + 152px)
    ) !important;
  }

  html body:not(.maintenance-mode).settings-dock-open:has(
      #appRoot.app.room-lobby-app #roomLobby.room-lobby:not([hidden])
    )
    > :is(
      #soundEffectsToggle.sound-effects-toggle,
      #vfxQualityToggle.vfx-quality-toggle
    ) {
    bottom: max(
      206px,
      calc(env(safe-area-inset-bottom) + 202px)
    ) !important;
  }

  html body:not(.maintenance-mode).settings-dock-open:has(
      #appRoot.app.room-lobby-app #roomLobby.room-lobby:not([hidden])
    )
    > button#battleWallpaperToggle#battleWallpaperToggle.battle-wallpaper-toggle {
    bottom: max(
      256px,
      calc(env(safe-area-inset-bottom) + 252px)
    ) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body:not(.maintenance-mode)
    #appRoot#appRoot.app.room-lobby-app
    > .arena {
    background-attachment: scroll, scroll !important;
  }
}
