/* Clear connection state and room sharing in light and dark themes. */
.room-panel{display:grid;gap:10px}
.room-header{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
#room-code{font-size:1.08rem;letter-spacing:.03em}
#seat,#connection{font-size:.875rem;font-weight:650;border:1px solid var(--panel-edge);border-radius:999px;padding:4px 10px;background:var(--background)}
#connection[data-status="ready"]{color:#146133;border-color:#8ccca5;background:#edf9f1}
#connection[data-status="waiting"]{color:#815200;border-color:#dbbc77;background:#fff8e6}
#connection[data-status="offline"]{color:#9e2533;border-color:#d9a0a7;background:#fff0f0}
:root[data-theme="dark"] #connection[data-status="ready"]{color:#a4e7bb;border-color:#4f8d68;background:#1b3b2b}
:root[data-theme="dark"] #connection[data-status="waiting"]{color:#ffe09a;border-color:#967334;background:#3c301b}
:root[data-theme="dark"] #connection[data-status="offline"]{color:#ffb5bc;border-color:#9f5862;background:#44272d}
.room-invite{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;padding:12px;border:1px solid var(--panel-edge);border-radius:10px;background:var(--background)}
#invite{flex:1 1 300px;margin:0;overflow-wrap:anywhere;color:var(--foreground)}
#copy-status{flex-basis:100%;font-size:.875rem;color:var(--muted-foreground)}
#copy-status:empty{display:none}
#room-help{margin:0;color:var(--muted-foreground)}
.room-leave{justify-self:start}
.lobby-heading p.lobby-rules{margin:-12px 0 20px;font-size:.9rem;color:var(--muted-foreground)}
button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #2c71df;outline-offset:3px}
:root[data-theme="dark"] :is(button,input,select,summary):focus-visible{outline-color:#a9cbff}
@media(max-width:520px){.room-invite{align-items:stretch}.room-copy{width:100%}.room-panel{padding:14px}.room-header{gap:6px}}

/* Make the two independent matchmaking queues equally easy to find. */
.match-buttons{display:flex;gap:8px;flex-wrap:wrap}
.match-buttons .btn{flex:1 1 auto}
@media(max-width:520px){.match-buttons{width:100%;display:grid;grid-template-columns:1fr}.match-buttons .btn{width:100%}}
