/* Watch room panel: local to .room-panel, uses the site's dark surface tokens. */
.room-panel { padding: 18px; border: 1px solid var(--line, #30333f); border-radius: 16px; background: var(--surface, #161922); color: var(--text, #f1f3f8); display: grid; gap: 12px; min-width: 0; }
.room-panel[hidden], .room-panel [hidden] { display: none !important; }
.room-panel .room-head, .room-title, .room-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.room-panel .room-head { justify-content: space-between; }
.room-title b { font-size: 18px; }
.room-code { font-family: monospace; letter-spacing: .12em; color: #c2b8ff; }
.room-member-count, .room-connection, .room-presence, .room-last-action { font-size: 13px; color: var(--muted, #b1b6c7); }
.room-panel .room-button, .room-settings summary { min-width: 44px; min-height: 44px; padding: 10px 14px; cursor: pointer; }
.room-panel :is(button, input, summary, [tabindex]):focus-visible { outline: 2px solid #b7a5ff; outline-offset: 3px; }
.room-panel .room-button:disabled { opacity: .6; cursor: wait; }
.room-sync-status, .room-error, .room-last-action { margin: 0; overflow-wrap: anywhere; }
.room-error { padding: 10px 12px; border-left: 3px solid #e6b76c; background: #e6b76c12; color: #f1cd96; }
.room-panel[data-connection="reconnecting"] .room-connection { color: #f1cd96; }
.room-member-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.room-member { display: flex; align-items: center; gap: 9px; padding: 10px; border: 1px solid var(--line, #30333f); border-radius: 12px; flex: 1 1 240px; min-width: 0; }
.room-avatar { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; object-fit: cover; background: #38304f; display: grid; place-items: center; }
.room-member-identity { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; min-width: 0; flex: 1; }
.room-member-name { flex-basis: 100%; overflow-wrap: anywhere; font-weight: 600; }
.room-role { font-size: 12px; color: #d4c9ff; }
.room-grant { flex-shrink: 0; font-size: 12px; }
.room-settings { border-top: 1px solid var(--line, #30333f); }
.room-settings summary { width: fit-content; }
.room-chat { max-height: 300px; min-height: 96px; overflow: auto; overscroll-behavior: contain; overflow-anchor: none; border-top: 1px solid var(--line, #30333f); padding: 12px 2px; }
.room-msg { padding: 6px 0 10px; overflow-wrap: anywhere; }
.room-msg-meta { display: flex; align-items: baseline; gap: 12px; font-size: 13px; }
.room-msg-meta time { font-size: 11px; color: var(--muted, #b1b6c7); flex-shrink: 0; }
.room-msg p { white-space: pre-wrap; margin: 5px 0 0; }
.room-panel .room-form { display: flex; align-items: stretch; gap: 8px; }
.room-panel input { min-width: 0; min-height: 44px; flex: 1; padding: 10px 12px; border: 1px solid var(--line, #454958); border-radius: 9px; background: var(--bg, #10121a); color: inherit; }
@media (max-width: 520px) {
  .room-panel { padding: 12px; gap: 10px; }
  .room-title { width: 100%; }
  .room-actions { width: 100%; }
  .room-actions button { flex: 1; }
  .room-member { flex-basis: 100%; }
  .room-panel .room-form { flex-wrap: wrap; }
  .room-form input { flex-basis: 100%; }
  .room-form button { width: 100%; }
}
