.watch-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.watch-heading h1 {
  margin: 7px 0 3px;
  font-size: clamp(30px, 3vw, 44px);
  letter-spacing: -1.4px;
}
.watch-heading p {
  margin: 0;
}
.watch-only-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 15px;
  border-radius: 30px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 13px;
  white-space: nowrap;
}
.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 24px;
  align-items: start;
}
.watch-main {
  min-width: 0;
}
.watch-stage {
  height: clamp(360px, calc(100dvh - 330px), 730px);
  position: relative;
  background: var(--green-soft);
  border-radius: 24px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--line);
}
.watch-stage.has-room {
  background-image: linear-gradient(var(--art-color-fff5), var(--art-color-fff1)), url('../assets/brooke/backgrounds/roomwave-gym.webp');
  background-position: center 73%;
  background-size: cover;
}
.watch-stage.has-room:before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--art-color-21362c25), transparent 35%);
  z-index: -1;
}
.watch-companion {
  position: absolute;
  inset: 58px 5% 45px;
}
.watch-companion .brooke-canvas {
  filter: drop-shadow(0 8px 4px var(--art-color-233c371c));
}
.watch-scene-label {
  position: absolute;
  left: 70px;
  right: 176px;
  top: 17px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  z-index: 2;
  pointer-events: none;
}
.watch-back,
.watch-fullscreen {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  min-height: 44px;
  padding: 10px 13px;
  font-size: 13px;
  border-color: var(--art-color-ffffff90);
  background: var(--art-color-fffdf4eb);
  color: var(--art-color-233c37);
  backdrop-filter: blur(8px);
}
.watch-back {
  left: 12px;
  right: auto;
  width: 44px;
  padding: 10px;
}
.watch-fullscreen-picker,
.watch-view-options {
  display: none;
}
.watch-scene-label span,
.watch-scene-bottom {
  border: 1px solid var(--art-color-ffffff90);
  background: var(--art-color-fffdf4e8);
  color: var(--art-color-233c37);
  border-radius: 13px;
  padding: 7px 13px;
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(8px);
}
.watch-scene-bottom {
  position: absolute;
  bottom: 13px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90%;
  text-align: center;
  font-size: 15px;
  pointer-events: none;
}
.watch-controls {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  margin-top: 14px;
}
.watch-transport {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.watch-transport .button {
  min-height: 48px;
}
.watch-transport #watch-play {
  min-width: 112px;
}
.watch-options {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
  margin-top: 14px;
}
.watch-options label,
.watch-category {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}
.watch-options select,
.watch-category select {
  min-height: 42px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 10px;
  padding: 7px 10px;
  font: inherit;
  font-size: 14px;
}
.watch-options .button,
.watch-audio .button {
  font-size: 12px;
  min-height: 42px;
  padding: 9px 11px;
}
.watch-advanced-options {
  margin-top: 14px;
  border-top: 1px solid var(--line);
}
.watch-advanced-options summary {
  display: list-item;
  padding: 12px 0;
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
}
.watch-advanced-options .watch-options {
  margin-top: 0;
}
.watch-audio {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  border-top: 1px solid var(--line);
  margin-top: 13px;
  padding-top: 12px;
}
.watch-audio label {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}
.watch-audio input {
  width: 100px;
  accent-color: var(--green);
}
.watch-tour-progress {
  height: 3px;
  background: var(--line);
  border-radius: 3px;
  margin-top: 12px;
  overflow: hidden;
}
.watch-tour-progress i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--green);
  transition: width 0.25s linear;
}
.watch-audio-status:empty {
  display: none;
}
.watch-instructions {
  margin-top: 20px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
}
.watch-instructions h2 {
  font-size: 20px;
  margin: 0;
}
.watch-instructions .section-heading {
  align-items: center;
  gap: 12px;
}
.watch-instructions .section-heading .button {
  font-size: 12px;
  flex-shrink: 0;
}
.watch-browser {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 15px;
  position: sticky;
  top: 18px;
  min-width: 0;
}
.watch-browser .search-box {
  min-width: 0;
  max-width: 100%;
  padding: 0 10px;
}
.watch-browser .search-box input {
  min-width: 0;
  width: 100%;
  font-size: 13px;
}
.watch-category {
  margin: 14px 0;
}
.watch-list {
  max-height: 62dvh;
  overflow: auto;
  scrollbar-width: thin;
  display: grid;
  gap: 7px;
}
.watch-movement {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  border: 1px solid transparent;
  background: none;
  color: var(--ink);
  padding: 12px 10px;
  min-height: 66px;
  border-radius: 13px;
  cursor: pointer;
  width: 100%;
}
.watch-movement > span:first-child {
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border-radius: 11px;
  width: 37px;
  height: 37px;
  flex-shrink: 0;
}
.watch-movement > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.watch-movement strong {
  font-size: 13px;
  line-height: 1.35;
  display: block;
}
.watch-movement small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}
.watch-movement > .icon {
  width: 15px;
  flex-shrink: 0;
}
.watch-movement:hover,
.watch-movement.selected {
  border-color: var(--green);
  background: var(--green-soft);
}
.watch-browser > .field-note {
  font-size: 12px;
  margin: 14px 3px 0;
}
.page-watch {
  max-width: 1700px;
}
.guest-watch {
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px;
}
.guest-watch > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.exercise-card {
  display: flex;
  flex-direction: column;
}
.exercise-card .exercise-open {
  height: auto;
  flex: 1;
}
.exercise-options {
  min-height: 44px;
  padding: 10px 24px;
  border-top: 1px solid var(--line);
  justify-content: flex-start;
  font-size: 12px;
}
.player-view-actions .button {
  font-size: 12px;
  min-height: 40px;
}
.page-workout.is-brooke-large {
  max-width: none;
}
.workout-stage.has-room {
  background-image:
    linear-gradient(var(--art-color-faf8f42e), var(--art-color-faf8f428)), url('../assets/brooke/backgrounds/roomwave-gym.webp');
  background-size: cover;
  background-position: center 73%;
}
.workout-stage.has-room .stage-badge,
.workout-stage.has-room .stage-topline .icon-button,
.workout-stage.has-room .stage-bottom,
.workout-stage.has-room .brooke-dialogue {
  background: var(--art-color-fffdf4eb);
  color: var(--art-color-233c37);
}
.workout-stage.has-room .brooke-dialogue .bubble-name {
  color: var(--art-color-286b5c);
}
.workout-stage.has-room .stage-badge {
  border-radius: 13px;
  padding: 8px 12px;
}
.workout-stage.has-room .stage-topline .text-button {
  color: var(--art-color-286b5c);
}
.paused-workouts {
  margin-bottom: 24px;
}
.paused-workout-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.paused-workout-row > div {
  flex: 1;
}
.paused-workout-row small {
  display: block;
  color: var(--muted);
}
@media (min-width: 1500px) {
  .page-watch {
    padding-left: 24px;
    padding-right: 24px;
  }
  .watch-layout {
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
  }
}
@media (max-width: 1050px) {
  .watch-layout {
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 15px;
  }
  .watch-heading {
    align-items: flex-start;
  }
  .watch-only-badge {
    font-size: 12px;
  }
  .watch-instructions .section-heading {
    flex-wrap: wrap;
  }
}
@media (max-width: 760px) {
  .watch-heading {
    display: block;
    margin-bottom: 16px;
  }
  .watch-only-badge {
    display: inline-flex;
    margin-top: 12px;
  }
  .watch-layout {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }
  .watch-main,
  .watch-browser {
    width: 100%;
  }
  .watch-stage {
    height: 58dvh;
    min-height: 330px;
    max-height: 610px;
  }
  .watch-companion {
    inset: 46px 3% 40px;
  }
  .watch-browser {
    position: static;
    order: 2;
  }
  .watch-list {
    max-height: 360px;
  }
  .watch-instructions {
    padding: 18px;
  }
  .watch-controls {
    padding: 12px;
  }
  .watch-transport {
    gap: 7px;
  }
  .watch-transport .button {
    padding: 10px 12px;
  }
  .watch-options {
    gap: 9px;
  }
  .watch-audio {
    gap: 5px;
  }
  .watch-category {
    margin: 12px 0;
  }
  .watch-scene-label {
    left: 66px;
    right: 168px;
  }
  .watch-scene-label span {
    font-size: 12px;
    padding: 7px 9px;
  }
  #watch-position {
    display: none;
  }
  .guest-watch {
    padding: 18px;
  }
  .player-view-actions .desktop-enlarge {
    display: none;
  }
  .page-workout.is-brooke-large .workout-stage {
    min-height: 0;
  }
  .page-workout.is-brooke-large .player-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  .watch-tour-progress i {
    transition: none;
  }
}

.watch-mobile-picker {
  display: none;
}
@media (max-width: 760px) {
  .watch-mobile-picker {
    display: grid;
    gap: 5px;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 14px;
  }
  .watch-mobile-picker select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    border-radius: 12px;
    padding: 10px;
    font: inherit;
    font-size: 14px;
  }
}

@media (max-width: 760px) {
  .player-view-actions [data-action='workout-room'] {
    display: none;
  }
  .page-workout .player-heading {
    margin-bottom: 8px;
  }
  .player-view-actions {
    margin-bottom: 6px;
  }
  .page-workout .workout-progress {
    margin-bottom: 6px;
  }
  .workout-stage.has-room .stage-badge {
    padding: 6px 8px;
  }
}

/* The scene fills the screen; only a compact playback dock remains over it. */
.watch-layout:is(:fullscreen, .is-immersive) {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: block;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--bg);
}
.watch-layout:is(:fullscreen, .is-immersive) .watch-main {
  height: 100%;
}
.watch-layout:is(:fullscreen, .is-immersive) .watch-stage {
  height: 100%;
  min-height: 0;
  max-height: none;
  border: 0;
  border-radius: 0;
}
.watch-layout:is(:fullscreen, .is-immersive) .watch-companion {
  inset: calc(62px + env(safe-area-inset-top, 0px)) 3% calc(98px + env(safe-area-inset-bottom, 0px));
}
.watch-layout:is(:fullscreen, .is-immersive) :is(.watch-back, .watch-fullscreen) {
  top: max(12px, env(safe-area-inset-top, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
}
.watch-layout:is(:fullscreen, .is-immersive) .watch-scene-label {
  top: max(18px, env(safe-area-inset-top, 0px));
  left: calc(70px + env(safe-area-inset-left, 0px));
  right: 190px;
  justify-content: flex-start;
}
.watch-layout:is(:fullscreen, .is-immersive) :is(.watch-browser, .watch-instructions, .watch-scene-bottom) {
  display: none;
}
.watch-layout:is(:fullscreen, .is-immersive) .watch-controls {
  position: absolute;
  z-index: 4;
  bottom: max(12px, env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  width: min(780px, calc(100% - 32px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
  max-height: calc(100% - 82px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  margin: 0;
  padding: 12px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 8px 32px var(--art-color-142c3326);
  overflow: auto;
  overscroll-behavior: contain;
}
.watch-layout:is(:fullscreen, .is-immersive) .watch-transport {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
}
.watch-layout:is(:fullscreen, .is-immersive) .watch-transport .button {
  min-height: 44px;
  padding: 10px 12px;
  font-size: 13px;
  white-space: nowrap;
}
.watch-layout:is(:fullscreen, .is-immersive) #watch-play {
  min-width: 100px;
}
.watch-layout:is(:fullscreen, .is-immersive) .watch-fullscreen-picker {
  display: block;
  flex: 1;
  min-width: 0;
}
.watch-fullscreen-picker select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 10px;
  padding: 8px;
  font: inherit;
  font-size: 13px;
}
.watch-layout:is(:fullscreen, .is-immersive) .watch-view-options {
  display: inline-flex;
}
.watch-layout:is(:fullscreen, .is-immersive):not(.show-view-options) .watch-extra-controls {
  display: none;
}
.watch-layout:is(:fullscreen, .is-immersive) .watch-tour-progress {
  margin-top: 8px;
}
@media (max-width: 600px) {
  .watch-layout:is(:fullscreen, .is-immersive) .watch-transport {
    display: grid;
    grid-template-columns: minmax(90px, 1fr) minmax(75px, 1fr) auto;
  }
  .watch-layout:is(:fullscreen, .is-immersive) .watch-fullscreen-picker {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .watch-layout:is(:fullscreen, .is-immersive) #watch-play {
    min-width: 0;
  }
  .watch-layout:is(:fullscreen, .is-immersive) .watch-view-options {
    padding: 10px;
  }
  .watch-layout:is(:fullscreen, .is-immersive) .watch-view-options .icon {
    display: none;
  }
  .watch-layout:is(:fullscreen, .is-immersive) .watch-companion {
    bottom: calc(150px + env(safe-area-inset-bottom, 0px));
  }
  .watch-layout:is(:fullscreen, .is-immersive) .watch-controls {
    width: calc(100% - 20px);
    padding: 10px;
    bottom: max(8px, env(safe-area-inset-bottom, 0px));
  }
}

.watch-layout:is(:fullscreen, .is-immersive) .watch-back {
  left: max(12px, env(safe-area-inset-left, 0px));
  right: auto;
}

/* Familiar transport icons leave room for the movement picker on a phone. */
.watch-layout:is(:fullscreen, .is-immersive) .watch-transport {
  display: grid;
  grid-template-columns: 44px 44px minmax(0, 1fr) 44px;
  gap: 8px;
  align-items: center;
}
.watch-layout:is(:fullscreen, .is-immersive) .watch-transport > .icon-button {
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 10px;
}
.watch-layout:is(:fullscreen, .is-immersive) .watch-fullscreen-picker {
  grid-column: 3;
  grid-row: 1;
}
.watch-layout:is(:fullscreen, .is-immersive) .watch-view-options .icon { display: block; }
.watch-layout:is(:fullscreen, .is-immersive) .watch-fullscreen { width: 44px; min-width: 44px; padding: 10px; }
@media (max-width: 600px) {
  .watch-scene-label,
  .watch-layout:is(:fullscreen, .is-immersive) .watch-scene-label {
    left: calc(66px + env(safe-area-inset-left, 0px));
    right: 155px;
    top: max(17px, env(safe-area-inset-top, 0px));
  }
  .watch-scene-label span {
    padding: 7px;
  }
}
