/* One artwork projection for the room, its floor and Brooke's native source contacts. */
[data-room-scene] { background-image: none !important; }
[data-room-scene]::before,[data-room-scene]::after { content: none !important; }
.room-scene-backdrop {
  position: absolute;
  inset: 0 auto auto 0;
  z-index: 0;
  pointer-events: none;
  background-image: linear-gradient(var(--room-shade),var(--room-shade)),var(--scene-bg);
  background-repeat: no-repeat;
  overflow: hidden;
}
[data-room-scene] :is(#room-companion,#workout-companion,#watch-companion,.finish-art,.welcome-character)[data-scene-placed='true'] {
  position: absolute;
  min-height: 0;
  max-width: none;
  max-height: none;
  margin: 0;
  transform: none;
  z-index: 1;
  pointer-events: none;
}
[data-room-scene] [data-scene-placed='true'] .brooke-companion { min-height: 0; }
[data-room-scene] :is(#room-bubble,.brooke-dialogue,.finish-bubble,.welcome-bubble) { z-index: 3; }
[data-room-scene] :is(.stage-topline,.stage-count,.stage-rest,.watch-back,.watch-fullscreen,.watch-scene-label) { z-index: 4; }
@media (prefers-reduced-motion: reduce) {
  .room-scene-backdrop,[data-scene-placed='true'] { transition: none !important; }
}
/* Existing room-background toggles remain functional in workout and Watch. */
:is(.workout-stage,.watch-stage)[data-room-scene]:not(.has-room) .room-scene-backdrop { visibility: hidden; }
/* Header and transport controls wrap at their real text size, including 200% text. */
@media (max-width: 1000px) {
  #watch-layout #watch-stage {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    align-items: flex-start;
    gap: 8px;
    padding: max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 0 max(12px,env(safe-area-inset-left));
  }
  #watch-layout #watch-stage .watch-back {
    position: relative;
    inset: auto;
    flex: 0 0 44px;
    margin: 0;
  }
  #watch-layout #watch-stage .watch-scene-label {
    position: relative;
    inset: auto;
    flex: 1 0 max-content;
    width: auto;
    max-width: 100%;
    align-self: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    min-width: 0;
  }
  #watch-layout #watch-stage .watch-scene-label span {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  #watch-layout #watch-stage .watch-fullscreen {
    position: relative;
    inset: auto;
    flex: 0 1 auto;
    max-width: 100%;
    margin-left: auto;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  #watch-layout .watch-controls .watch-transport {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  #watch-layout .watch-controls .watch-transport > .button {
    flex: 1 0 auto;
    min-width: max-content;
    max-width: 100%;
    order: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  #watch-layout .watch-controls .watch-transport > .watch-fullscreen-picker {
    flex: 1 0 100%;
    width: 100%;
    min-width: 0;
    order: 1;
  }
  #watch-layout .watch-controls .button { white-space: normal; overflow-wrap: anywhere; }
}
/* The native picker remains intact; a measured fallback exposes a long selection in full. */
#watch-layout .watch-selected-movement:not([hidden]) {
  display: block;
  max-width: 100%;
  margin: 0 0 8px;
  white-space: normal;
  overflow-wrap: anywhere;
  font: inherit;
  line-height: 1.35;
  color: inherit;
}
#watch-layout .watch-selected-movement[hidden] { display: none; }
@media (min-width: 601px) and (max-width: 1000px) {
  #watch-layout .watch-controls .watch-transport > .watch-fullscreen-picker {
    flex: 1 1 240px;
    width: auto;
    order: 0;
  }
}
