.watch-open {
  margin-bottom: 20px;
  padding: 13px 18px;
  background: var(--accent);
  color: #fff;
  font-weight: 750;
}
.watch-dialog {
  box-sizing: border-box;
  width: min(1040px, calc(100vw - 24px));
  max-width: none;
  height: min(900px, calc(100dvh - 24px));
  max-height: calc(100dvh - 24px);
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface, #1b2430);
  color: var(--text);
  overflow: auto;
  overscroll-behavior: contain;
}
.watch-dialog[open] {
  display: flex;
  flex-direction: column;
}
body:has(#owner-watch-dialog[open]) {
  overflow: hidden;
}
.watch-dialog > :not(#owner-watch-grid) {
  flex-shrink: 0;
}
#owner-watch-status:empty {
  display: none;
}
.watch-dialog::backdrop {
  background: #000b;
}
.watch-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.watch-header h2 {
  margin: 0;
  font-size: 22px;
}


.watch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}
.watch-actions .action,
.watch-header .action {
  min-height: 44px;
  font-size: 13px;
}
#owner-watch-audio[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
}

#owner-watch-grid {
  min-height: 0;
  overflow: auto;
  align-content: start;
  grid-auto-rows: max-content;
  display: grid;
  gap: 18px;
}
.watch-call {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
  background: #131c2a;
}
.watch-names {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
}
.watch-names strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 15px;
}
.watch-names strong:last-child {
  text-align: right;
}
.watch-names > span {
  color: var(--muted);
}
.watch-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2px;
  width: 100%;
  padding: 0;
  border: 0;
  background: #000;
  cursor: pointer;
}
.watch-preview:focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: -3px;
}
.watch-half {
  width: 100%;
  display: block;
  min-width: 0;
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: 190px;
}
.watch-half video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0a1018;
}
.watch-half small {
  position: absolute;
  bottom: 6px;
  left: 8px;
  padding: 3px 6px;
  border-radius: 4px;
  background: #000b;
  color: #fff;
  font-size: 12px;
}
.watch-call.expanded .watch-half {
  max-height: 52dvh;
}
.watch-messages {
  max-height: 230px;
  overflow: auto;
  padding: 12px;
  border-top: 1px solid var(--line);
}
.watch-messages:empty::after {
  content: "—";
  color: var(--muted);
}
.watch-messages p {
  display: grid;
  gap: 4px;
  margin: 0 0 10px;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.watch-messages b {
  font-size: 12px;
  color: var(--accent-soft);
}
.watch-messages span {
  white-space: pre-wrap;
}
.watch-dialog [hidden],
.watch-open[hidden] {
  display: none !important;
}
@media (max-width: 520px) {
  .watch-call.expanded .watch-preview {
    grid-template-columns: 1fr;
  }
  .watch-dialog {
    padding: 12px;
  }
  .watch-header h2 {
    font-size: 18px;
  }
  .watch-names {
    gap: 6px;
    padding: 10px;
  }
  .watch-names strong {
    font-size: 12px;
  }
}

.watch-call.has-audio { border-color: var(--accent); }
.watch-call.has-audio .watch-names > span::after { content: " ♪"; color: var(--accent-soft); }
