/* The active round is a chat screen; game controls stay in its compact header. */
.chat-screen-active { overflow: hidden; background: #efeae2; }
.live-chat-screen { position: fixed; top: var(--chat-viewport-top, 0px); left: 0; right: 0; height: calc(var(--chat-viewport-height, 100dvh) - var(--chat-composer-height, 72px)); max-width: 1100px; margin: auto; display: flex; flex-direction: column; overflow: hidden; background: #efeae2; }
.chat-room-header { flex: none; display: flex; align-items: center; gap: 5px; min-height: 64px; padding: calc(6px + env(safe-area-inset-top)) 9px 6px; background: #fff; border-bottom: 1px solid #e2e8e0; }
.chat-room-identity { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; padding: 0; border: 0; background: none; text-align: left; }
.chat-room-identity img { width: 39px; height: 39px; border-radius: 50%; flex: none; }
.chat-room-identity>span { min-width: 0; }
.chat-room-identity strong { display: block; font-size: 15px; font-weight: 650; color: #19392c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-room-identity small { display: block; margin-top: 3px; font-size: 10px; font-weight: 400; color: #728177; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-header-icon { display: grid; place-items: center; width: 42px; min-height: 48px; flex: 0 0 42px; padding: 0; border: 0; background: none; color: #345a49; }
.chat-header-icon[aria-expanded=true] { background: #eef5ed; border-radius: 12px; }
.chat-language .language { width: 71px; max-width: 71px; min-height: 48px; padding: 4px 1px; font-size: 12px; border: 0; border-radius: 0; background: #fff; }
.chat-round-bar { display: flex; align-items: center; gap: 6px; flex: none; padding: 0 12px; background: #f8faf5; border-bottom: 1px solid #dfe5d9; }
.chat-round-bar>button { display: flex; align-items: center; gap: 7px; min-width: 0; flex: 1; min-height: 48px; padding: 5px 0; border: 0; background: none; color: #40594b; }
.chat-round-bar strong { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; font-size: 12px; font-weight: 600; }
.chat-round-bar small { font-size: 10px; white-space: nowrap; color: #728174; font-weight: 400; }
.chat-round-bar>time { font-size: 10px; color: #728174; font-variant-numeric: tabular-nums; }
.chat-connect-warning,.chat-global-recording { flex: none; padding: 8px 14px; font-size: 12px; background: #fff0da; color: #745325; }
.chat-global-recording { background: #fff0ed; color: #982e2e; }
.live-chat-screen>.notice { flex: none; margin: 0; border-radius: 0; padding: 9px 14px; font-size: 12px; }
.chat-room-panel,.chat-rules-panel { flex: 0 1 auto; min-height: 0; max-height: 55%; overflow-y: auto; overscroll-behavior: contain; padding: 14px; border-bottom: 1px solid #d9e2d7; background: #fff; }
.chat-room-panel .surface { padding: 0; border: 0; border-radius: 0; box-shadow: none; }
.chat-room-panel h2 { font-size: 16px; }
.chat-room-panel .player-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 18px; margin: 7px 0; }
.chat-panel-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.chat-panel-actions button { flex: 1; width: auto; font-size: 12px; min-width: 115px; padding: 9px 10px; }
.chat-rule-king { color: #8c6632; font-size: 12px; margin-bottom: 7px; }
.chat-rules-panel>p { font-size: 14px; white-space: pre-wrap; line-height: 1.65; }
.chat-rules-panel details { margin: 0; }
.chat-rules-panel summary { font-size: 12px; }
.chat-video-panel { flex: 0 1 auto; min-height: 0; max-height: 55%; overflow-y: auto; padding: 8px 12px 0; background: #f7faf5; }
.chat-video-panel .video-workbench { margin-bottom: 8px; }
.live-chat-screen .compact-chat { display: flex; flex: 1; min-height: 0; overflow: hidden; padding: 0; margin: 0; }
.live-chat-screen .conversation-stream { flex: 1; min-height: 0; max-height: none; width: 100%; margin: 0; padding: 17px max(14px,calc((100% - 850px)/2)) 16px; gap: 10px; overflow-y: auto; overscroll-behavior: contain; background: #efeae2; background-image: radial-gradient(#d7d0c54a .7px,transparent .7px); background-size: 16px 16px; }
.conversation-stream .chat-entry { position: relative; border: 0; border-radius: 0 10px 10px 10px; background: #fff; box-shadow: 0 1px 1px #17291a16; padding: 8px 10px 4px; }
.conversation-stream .chat-entry.self { background: #d9fdd3; border-radius: 10px 0 10px 10px; }
.conversation-stream .chat-entry:before { content: ''; position: absolute; top: 0; left: -5px; border-top: 6px solid white; border-left: 6px solid transparent; }
.conversation-stream .chat-entry.self:before { left: auto; right: -5px; border-top-color: #d9fdd3; border-left: 0; border-right: 6px solid transparent; }
.conversation-stream .chat-entry p { font-size: 15px; line-height: 1.48; color: #1b2c24; }
.conversation-stream .chat-meta { color: #a66f32; font-size: 12px; }
.chat-stamp { display: flex; justify-content: flex-end; align-items: center; gap: 4px; margin-top: 3px; color: #758374; font-size: 10px; line-height: 14px; }
.chat-stamp time { font-size: inherit; color: inherit; }
.conversation-stream .chat-entry.media-entry { padding: 3px; }
.conversation-stream .media-entry:has(.chat-voice) { width: min(88%, 300px); padding: 4px 6px 2px; }
.chat-gesture-hint { flex: none; text-align: center; padding: 5px 10px 1px; color: #7d877e; font-size: 10px; line-height: 1.4; background: #efeae2; }
.chat-screen-active #composer-workbench { top: calc(var(--chat-viewport-top, 0px) + var(--chat-viewport-height, 100dvh) - var(--chat-composer-height, 72px)); bottom: auto; padding: 8px 9px calc(10px + env(safe-area-inset-bottom)); border: 0; background: #efeae2; backdrop-filter: none; }
.composer-shell { width: min(850px, 100%); }
.compact-composer { gap: 7px; }
.composer-input-pill { flex: 1; min-width: 0; display: flex; align-items: flex-end; background: #fff; border-radius: 26px; padding: 0 3px; box-shadow: 0 1px 2px #00000017; }
.compact-composer .composer-input-pill textarea { border: 0; border-radius: 0; padding: 12px 2px; background: transparent; box-shadow: none; }
.compact-composer .composer-input-pill .composer-icon { color: #7c8b82; }
.compact-composer .composer-primary { background: #13896c; }
.compact-composer #composer-voice:active { background: #0e7159; }
.attachment-menu { border: 0; border-radius: 20px; padding: 15px 10px; bottom: calc(100% + 9px); box-shadow: 0 7px 28px #213b2f22; }
.attachment-menu button { flex-direction: column; justify-content: center; gap: 7px; border: 0; padding: 10px 5px; min-height: 88px; background: none; text-align: center; font-size: 12px; }
.attachment-menu button>span:first-child { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: #e1f3e7; color: #248568; }
.attachment-menu button[data-attach=video]>span:first-child { background: #f6e1de; color: #b96a5b; }
.attachment-menu button[data-attach=audio]>span:first-child { background: #f7ecd1; color: #b38c3d; }
.attachment-menu button[data-attach=file]>span:first-child { background: #e5e5f8; color: #7c74b3; }
.attachment-menu p { font-size: 11px; text-align: center; margin: 0 9px; }
.chat-screen-active .voice-recording-hud,.chat-screen-active .media-inline-status { bottom: auto; top: calc(var(--chat-viewport-top, 0px) + var(--chat-viewport-height, 100dvh) - var(--chat-composer-height, 72px) - 54px); }
@media(min-width:760px) { .live-chat-screen { border-inline: 1px solid #dedfd4; } .chat-room-header { padding-inline: 22px; } .chat-round-bar { padding-inline: 25px; } .attachment-menu { right: auto; width: min(390px,100%); } }
@media(max-width:360px) { .chat-room-header { gap: 1px; padding-inline: 6px; } .chat-room-identity { gap: 6px; } .chat-room-identity img { width: 33px; height: 33px; } .chat-room-identity strong { font-size: 13px; } .chat-room-identity small { font-size: 9px; } .chat-header-icon { flex-basis: 37px; width: 37px; } .chat-language .language { width: 65px; max-width: 65px; } .chat-round-bar>time { display: none; } }
@media(max-height:500px) { .chat-room-header { min-height: 50px; padding-block: 0; } .chat-round-bar>button { min-height: 40px; } .chat-gesture-hint { display: none; } .chat-video-panel { max-height: 45%; } .attachment-menu { max-height: calc(var(--chat-viewport-height,100dvh) - 90px); overflow-y: auto; grid-template-columns: repeat(4,minmax(0,1fr)); } .attachment-menu button { min-height: 65px; padding: 0; } .attachment-menu p { display: none; } }

html,body { touch-action: pan-x pan-y; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
button,a,summary { touch-action: manipulation; }
#composer-voice { touch-action: none; }
@media(pointer:coarse) { input,textarea,select,.chat-language .language { font-size: 16px; } }
