/* PP Chat "Watch together" (Marshal, staging). Layered on style.css; Music view is unchanged. */
.view-tabs { display: inline-flex; gap: 4px; padding: 3px; border: 1px solid var(--line, #30313a); border-radius: 8px; }
.view-tab { border: 0; border-radius: 6px; padding: 6px 12px; background: transparent; color: var(--muted, #a3a4ad); font-weight: 600; }
.view-tab[aria-pressed="true"] { background: var(--accent, #c8102e); color: #fff; }
.app-header { flex-wrap: wrap; }
.watch-controls, .watch-note { display: none; }
.watch-button { margin-right: 6px; }
.search-item .watch-button { padding: 6px 12px; }
.watch-tap-hint[hidden] { display: none; }
.watch-tap-hint {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 3;
  padding: 8px 14px; border: 0; border-radius: 8px; background: rgba(0,0,0,.78); color: #fff;
  font-weight: 600; font-size: .85rem; pointer-events: none; white-space: nowrap;
}

/* Watch view: big 16:9 player first, then search/queue below. */
html[data-view="watch"] .app-shell { width: min(100%, 1080px); display: flex; flex-direction: column; }
html[data-view="watch"] .now-playing { order: -1; }
html[data-view="watch"] .app-header { order: -2; }
html[data-view="watch"] #notice { order: -2; }
html[data-view="watch"] .audio-panel { order: 5; }
html[data-view="watch"] .player-shell { width: min(100%, calc(72vh * 16 / 9)); margin-left: auto; margin-right: auto; }
html[data-view="watch"] .watch-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
html[data-view="watch"] .watch-note { display: block; }
html[data-view="watch"] .transport-controls { display: none; }
html[data-view="watch"] .now-playing > .helper-text:not(.watch-note) { display: none; }
.watch-seek { flex: 1 1 160px; min-width: 120px; accent-color: var(--accent, #c8102e); }
.watch-time { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; color: var(--muted, #a3a4ad); white-space: nowrap; }
@media (max-width: 520px) {
  html[data-view="watch"] .app-shell { padding: 10px 8px 24px; }
  html[data-view="watch"] .player-shell { width: 100%; border-radius: 6px; }
  .watch-controls .secondary-button { padding: 8px 10px; }
}

/* Full screen (desktop/Android): video fills the screen, shared controls stay at the bottom. */
.now-playing:fullscreen, .now-playing:-webkit-full-screen {
  display: flex; flex-direction: column; justify-content: center; padding: 12px; background: #000; border: 0; border-radius: 0;
}
.now-playing:fullscreen .section-heading, .now-playing:-webkit-full-screen .section-heading,
.now-playing:fullscreen .watch-note, .now-playing:-webkit-full-screen .watch-note { display: none; }
.now-playing:fullscreen .player-shell, .now-playing:-webkit-full-screen .player-shell {
  flex: 1 1 auto; width: 100%; max-height: calc(100vh - 80px); aspect-ratio: auto; margin: 0; border: 0;
}
.now-playing:fullscreen .watch-controls, .now-playing:-webkit-full-screen .watch-controls { display: flex; }
.watch-seek[hidden] { display: none; }

/* ---- v2 (Marshal): top row, compact phone Watch view, landscape ---- */
.watch-toprow { display: inline-flex; align-items: center; gap: 8px; }
.watch-close { display: none; border: 1px solid var(--line, #30313a); border-radius: 6px; padding: 6px 12px; background: transparent; color: #f4f3f1; font-weight: 600; }
.watch-nowtitle { display: none; }
.notice:empty { display: none; }

/* Phone / narrow Watch view: slim top row, edge-to-edge video, one control row, search right below. */
html[data-view="watch"][data-compact="1"] body { background: #000; }
html[data-view="watch"][data-compact="1"] .app-shell { width: 100%; padding: 0 0 24px; }
html[data-view="watch"][data-compact="1"] .app-header { margin: 0; padding: 6px 8px; gap: 0; }
html[data-view="watch"][data-compact="1"] .app-header > div:first-child,
html[data-view="watch"][data-compact="1"] #mode { display: none; }
html[data-view="watch"][data-compact="1"] .watch-toprow { display: flex; width: 100%; justify-content: space-between; }
html[data-view="watch"][data-compact="1"][data-in-drawer="1"] .watch-close { display: inline-block; }
html[data-view="watch"][data-compact="1"] .view-tab { padding: 5px 12px; }
html[data-view="watch"][data-compact="1"] #notice { margin: 0 10px 6px; }
html[data-view="watch"][data-compact="1"] .panel.now-playing { margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
html[data-view="watch"][data-compact="1"] .now-playing > .section-heading,
html[data-view="watch"][data-compact="1"] .watch-note { display: none; }
html[data-view="watch"][data-compact="1"] .player-shell { width: 100%; max-width: none; margin: 0; border: 0; border-radius: 0; }
html[data-view="watch"][data-compact="1"] .watch-nowtitle {
  display: block; margin: 8px 10px 0; font-size: .85rem; font-weight: 600; color: #f4f3f1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
html[data-view="watch"][data-compact="1"] .watch-nowtitle:empty { display: none; }
html[data-view="watch"][data-compact="1"] .watch-controls { flex-wrap: nowrap; gap: 6px; margin: 6px 0 0; padding: 0 8px; }
html[data-view="watch"][data-compact="1"] .watch-controls .secondary-button { padding: 7px 9px; font-size: .8rem; flex: 0 0 auto; }
html[data-view="watch"][data-compact="1"] .watch-seek { min-width: 60px; flex: 1 1 auto; }
html[data-view="watch"][data-compact="1"] .watch-time { font-size: .72rem; }
html[data-view="watch"][data-compact="1"] .panel { margin: 10px 8px 0; padding: 12px; border-radius: 10px; }
html[data-view="watch"][data-compact="1"] .add-panel { display: flex; flex-direction: column; }
html[data-view="watch"][data-compact="1"] .add-panel > .section-heading { display: none; }
html[data-view="watch"][data-compact="1"] .search-panel { order: -1; margin: 0; }
html[data-view="watch"][data-compact="1"] .search-panel .search-form { margin-top: 0; }
html[data-view="watch"][data-compact="1"] .add-panel > .add-form:not(.search-form) { margin-top: 10px; }

/* Phone landscape: the video takes the whole screen; controls, search and queue are below (scroll). */
@media (orientation: landscape) and (max-height: 500px) {
  html[data-view="watch"][data-compact="1"] .player-shell { height: 100vh; height: 100dvh; aspect-ratio: auto; background: #000; }
  html[data-view="watch"][data-compact="1"] .app-header { order: 1; }
  html[data-view="watch"][data-compact="1"] #notice { order: 1; }
  html[data-view="watch"][data-compact="1"] .now-playing { order: 0; }
  html[data-view="watch"][data-compact="1"] .add-panel { order: 2; }
  html[data-view="watch"][data-compact="1"] .queue-panel { order: 3; }
}
