/* 正式資料與既有聊天室的顯示補充；共用色彩仍取自 style-guide。 */
.room-player { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-stage { isolation: isolate; }
/* 打賞覆蓋整個遊戲可視區；等比例鋪滿，超出邊緣裁切，不攔截下方操作。 */
.gift-animation { position: absolute; inset: 0; z-index: 15; overflow: hidden; pointer-events: none; }
.gift-animation[hidden] { display: none; }
.gift-animation video { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: .7; }
.video-tools, .video-controls { z-index: 2; }
.connection-status { flex: none; margin: 0; padding: 3px 12px; color: var(--color-grey); background: var(--color-black); }
.chat-messages { overflow-anchor: none; }
.chat-message { display: block; overflow-wrap: anywhere; max-width: 100%; padding: 8px 10px; margin: 8px 0; border: 1px solid var(--color-frame); border-radius: 8px; background: var(--gradient-video-bg); }
.chat-message--self { margin-left: 24px; border-color: var(--color-main-green-line); }
.chat-message table { max-width: 100%; border-collapse: collapse; font-size: 11px; }
.chat-message td, .chat-message th { padding: 3px; border: 1px solid var(--color-frame); }
.chat-message .message-image { max-width: min(64px, 100%); max-height: 64px; width: auto; height: auto; }
/* 16px 避免 iPhone 聚焦輸入時自動放大；不以失焦迴避鍵盤。 */
.mobile-no-zoom input, .mobile-no-zoom textarea, .mobile-no-zoom select { font-size: 16px; }
.message-name { color: var(--color-letter-line); font-weight: 600; margin-bottom: 4px; }
.message-time { font-size: 10px; color: var(--color-grey); }
.result-win { color: var(--color-letter-line); }
.result-lose { color: var(--color-live); }
.result-tie { color: var(--color-yellow); }
.scroll-bottom[data-unread="true"] { border: 1px solid var(--color-letter-line); border-radius: 50%; }
.road-panel { display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 72px; }
.road-results { position: static; flex: none; display: block; height: auto; overflow: visible; padding: 8px 4px; border-radius: 0; }
.road-table { width: 100%; table-layout: fixed; border-collapse: collapse; text-align: center; font-size: 10px; line-height: 1.2; }
.road-table td, .road-table th { height: 22px; padding: 3px 0; border: 1px solid var(--color-frame); overflow-wrap: anywhere; }
.road-table th { white-space: nowrap; }
.road-table th:first-child { background: var(--color-outer-frame); }
.road-table--amount td { font-size: 9px; }
.road-tabs { position: static; flex: none; }
.account-dialog { max-height: calc(100dvh - 32px); overflow-y: auto; }
.room-feedback { z-index: 20; pointer-events: none; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 35dvh; overflow: auto; }
.gifts-header { justify-content: space-between; }
.bet-panel { height: auto; max-height: calc(100% - 100px); overflow-y: auto; padding-bottom: 12px; }
.banker-actions { margin-top: 12px; border-top: 1px solid var(--color-main-green-line); padding-top: 8px; }
.banker-actions summary { cursor: pointer; padding: 4px; }
.banker-actions__buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 8px 0; }
.banker-actions__buttons button { padding: 0 4px; font-size: 12px; }
.regulations-list { white-space: normal; overflow-wrap: anywhere; }
.regulations-list p { margin-bottom: 12px; }
.regulations-list img { max-width: 100%; }
.menu-name > p { min-width: 0; }
[data-lobby-status]:not(.sr-only) { padding: 12px; font-size: 12px; color: var(--color-yellow); }
.button-primary[aria-disabled="true"] { opacity: .65; }
@media (max-width: 390px) {
  .jackpot { gap: 4px; font-size: 11px; }
  .connection-status { font-size: 10px; }
}
/* 使用可視視窗高度，涵蓋不會改變 CSS media query 的 iOS 軟鍵盤。 */
.room-shell.is-compact .video-stage { min-height: 112px; max-height: min(150px, calc(var(--room-viewport-height) * .32)); }
.room-shell.is-compact .connection-status { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-shell.is-compact .round-status { height: 28px; }
.room-shell.is-compact .room-footer { min-height: 60px; padding-block: 6px; }
.room-shell.is-compact .bottom-panel { bottom: 60px; }
.room-shell.is-compact .gifts-panel { bottom: 0; height: calc(100% - 40px); }
.room-shell.is-compact .road-panel { padding-bottom: 60px; }
.room-shell.is-compact .chat-messages { padding: 4px 12px 44px; }
.room-shell.is-compact .scroll-bottom { width: 32px; height: 32px; bottom: 6px; right: 12px; }
