/* Дополнения доступны только на странице тестового релиза. */
.room-mode-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 18px; }
#room-mode-label { color: var(--muted); font-size: 14px; font-weight: 700; }
.room-mode-bar .button { min-height: 42px; }
.room-info { margin: 0 0 16px; }
.room-presence { color: var(--muted); font-size: 13px; line-height: 1.45; margin: 8px 0; }
.room-presence[data-offline="true"] { color: #98501c; }
.room-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.room-tools .button { width: 100%; }
.room-text-button { padding: 4px 0; border: 0; background: transparent; color: var(--green-dark); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.room-text-button:disabled { opacity: .5; cursor: default; }
.room-dialog { display: none; position: fixed; inset: 0; width: min(440px, calc(100% - 24px)); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; margin: auto; padding: 24px; border: 1px solid var(--line); border-radius: 22px; color: var(--ink); background: #fffdf8; box-shadow: 0 20px 60px rgba(24,37,32,.25); }
.room-dialog[open] { display: block; }
.room-dialog::backdrop { background: rgba(24,37,32,.55); }
.room-dialog h2 { margin: 0 0 12px; }
.room-dialog p { line-height: 1.45; }
.room-dialog label { display: block; margin-bottom: 8px; font-size: 14px; }
.room-dialog-actions { display: flex; gap: 10px; margin-top: 18px; }
.room-dialog-actions .button { flex: 1; min-width: 0; }
.room-dialog .share-actions { flex-direction: column; }
#room-invite-close { width: 100%; margin-top: 14px; }
.room-ratings { display: flex; gap: 8px; margin: 0 0 10px; }
.score-strip small, .legend span { overflow-wrap: anywhere; }
.legend > span { min-width: 0; }
.legend > span > span { display: inline; }
#room-result-summary { font-size: 14px; line-height: 1.5; }
.room-mode .status-card h2, .room-mode .status-text { overflow-wrap: anywhere; }
.room-rematch-notice { position: sticky; top: 0; z-index: 2; margin-bottom: 18px; padding: 14px; border: 1px solid var(--green); border-radius: 14px; background: #e5f1e8; }
.room-rematch-notice p { margin: 0 0 12px; line-height: 1.4; }
.room-rematch-notice .button { width: 100%; }
.match-players { overflow-wrap: anywhere; }
.match-player { display: inline-block; max-width: 100%; vertical-align: middle; }
.board-start-button { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 28%; min-width: 112px; height: 46px; padding: 0; border: 0; border-radius: 14px; background: transparent; cursor: pointer; touch-action: manipulation; }
.board-start-button:disabled { cursor: default; pointer-events: none; }
.board-start-button:focus-visible { outline: 3px solid var(--green); outline-offset: -3px; }
.board-start-button:hover:not(:disabled) { background: rgba(229,168,60,.12); }
@media (max-width: 600px) {
    .room-mode-bar { gap: 8px; margin-bottom: 12px; }
    .room-mode-bar .button { padding: 9px 12px; font-size: 13px; }
    #room-mode-label { font-size: 12px; }
    .room-dialog { padding: 20px 16px; }
    .room-mode .board-heading { flex-wrap: wrap; gap: 8px; }
    .room-mode .legend { width: 100%; justify-content: flex-start; }
    .room-mode .legend > span { max-width: 48%; }
}
@media (max-height: 450px) {
    .room-dialog { padding: 16px; }
    .room-dialog h2 { font-size: 23px; }
}

/* На низком десктопе прокручивается текст карточки, основные кнопки остаются видимыми. */
@media (min-width: 921px) {
    .room-mode .status-card { display: flex; flex-direction: column; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); }
    .room-mode .room-status-scroll { min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin-bottom: 14px; }
    .room-mode .status-card > .actions, .room-mode .status-card > .result-share-link { flex-shrink: 0; }
}
