/* /watch page layout around the fight view (the arena itself is styled in fight.css). */
.watch-page { --nav-h: 84px; }
.watch-page .nav { padding-top: 12px; }
.watch { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 12px 0 32px; }
.watch-stage { position: relative; height: calc(100dvh - var(--nav-h)); min-height: 520px; }
.watch-fight { position: absolute; inset: 0; overflow: hidden; background: #05060a; }
.watch-side { padding: 0 16px; min-width: 0; }
.watch-side__head h1 { margin: 0; font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -0.01em; }
.watch-side__head p { margin: 4px 0 16px; font-size: 14px; line-height: 20px; }
.watch-lists { display: grid; gap: 16px; }
.watch-group h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.watch-group h2 .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger, #ff6b5a); box-shadow: 0 0 0 4px rgba(255, 107, 90, 0.18); }
.watch-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.watch-item { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 12px; border-radius: 12px; border: 1px solid var(--line, #313131);
  background: var(--panel, #181818); color: var(--text, #f5f5f5); font: inherit; text-align: left; cursor: pointer; transition: background 300ms var(--ease, ease), border-color 300ms var(--ease, ease), transform 300ms var(--ease, ease); }
.watch-item:hover { background: var(--panel-2, #1f1f1f); transform: translateY(-1px); }
.watch-item:focus-visible { outline: 2px solid var(--accent, #ffcc33); outline-offset: 2px; }
.watch-item[aria-current="true"] { border-color: var(--accent, #ffcc33); background: var(--panel-3, #272727); }
.watch-item__names { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 14px; line-height: 20px; font-weight: 600; min-width: 0; }
.watch-item__names span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.watch-item__names span::before { content: ""; flex: 0 0 auto; width: 8px; height: 8px; border-radius: 2px; background: var(--c, #888); transform: skewX(-18deg); }
.watch-item__names i { font-style: normal; color: var(--muted, #9b9b9b); font-weight: 400; font-size: 12px; }
.watch-item__meta { grid-column: 1 / -1; font-size: 12px; line-height: 16px; color: var(--muted, #9b9b9b); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.watch-item__tag { font-size: 12px; line-height: 16px; font-weight: 600; padding: 2px 8px; border-radius: 9999px; background: var(--panel-3, #272727); color: var(--muted, #9b9b9b); white-space: nowrap; }
.watch-item__tag.is-live { background: rgba(255, 107, 90, 0.16); color: var(--danger, #ff6b5a); }
.watch-item__tag.is-demo { background: rgba(255, 204, 51, 0.14); color: var(--accent, #ffcc33); }
.watch-empty { margin: 0; font-size: 14px; line-height: 20px; color: var(--muted, #9b9b9b); }
.watch-legend { margin-top: 24px; border: 1px solid var(--line, #313131); border-radius: 12px; padding: 12px 16px; background: var(--panel, #181818); font-size: 14px; line-height: 20px; }
.watch-legend summary { cursor: pointer; font-weight: 600; }
.watch-legend ul { margin: 12px 0 0; padding-left: 16px; color: var(--muted, #9b9b9b); display: grid; gap: 4px; }
.watch-legend b { color: var(--text, #f5f5f5); font-weight: 600; }

@media (min-width: 1000px) {
  .watch { grid-template-columns: minmax(0, 1fr) 336px; gap: 0; padding: 12px 0 0; align-items: start; }
  .watch-stage { height: calc(100dvh - var(--nav-h) - 12px); margin-left: 16px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line, #313131); }
  .watch-side { height: calc(100dvh - var(--nav-h) - 12px); overflow-y: auto; padding: 4px 16px 16px; }
  .watch-page .footer { margin-top: 16px; }
}
@media (max-width: 480px) { .watch-page { --nav-h: 68px; } .watch-page .nav { padding-top: 8px; } .watch { padding-top: 8px; } }

/* live coach panel: side panel on desktop, bottom sheet on phones (the stage shrinks so the fight stays visible) */
.watch-coach { border: 1px solid var(--line, #313131); border-radius: 16px; background: var(--panel, #181818); padding: 12px; margin-bottom: 16px; }
.watch-coach[hidden] { display: none; }
.watch-coach > header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--accent, #ffcc33); }
.watch-coach__close { border: 1px solid var(--line, #313131); background: var(--panel-3, #272727); color: var(--text, #f5f5f5); border-radius: 9999px; padding: 4px 12px; font: inherit; font-size: 12px; line-height: 16px; cursor: pointer; }
.watch-coach__close:focus-visible { outline: 2px solid var(--accent, #ffcc33); outline-offset: 2px; }
@media (max-width: 999px) {
  .watch-coach { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; margin: 0; border-radius: 16px 16px 0 0; border-bottom: 0; max-height: 46dvh; overflow-y: auto; padding-bottom: max(12px, env(safe-area-inset-bottom)); box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.6); }
  body.coach-open .watch-stage { height: calc(100dvh - var(--nav-h) - var(--coach-h, 46dvh)); min-height: 200px; }
}
/* phone in landscape: slim nav, the fight fills the rest; the coach becomes a right-hand panel */
@media (max-height: 520px) and (orientation: landscape) {
  .watch-page { --nav-h: 56px; }
  .watch-page .nav { padding-top: 4px; }
  .watch { padding-top: 4px; gap: 12px; }
  .watch-stage { height: calc(100dvh - var(--nav-h)); min-height: 250px; margin: 0; border-radius: 0; border: 0; }
  .watch-side { height: auto; overflow: visible; }
  .watch-coach { position: fixed; left: auto; right: 0; top: 0; bottom: 0; width: min(320px, 42vw); max-height: none; border-radius: 16px 0 0 16px; z-index: 60; margin: 0; overflow-y: auto; }
  body.coach-open .watch-stage { height: calc(100dvh - var(--nav-h)); margin-right: min(320px, 42vw); }
}
