/* 单房间布局：最近房间、语音面板、工具与聊天、成员列表。 */
.workspace{grid-template-columns:64px 208px minmax(0,1fr) 192px;grid-template-rows:104px minmax(0,1fr);gap:12px;height:100dvh;min-height:0;padding:16px;background:var(--color-page)}
.room-overview{grid-column:1/3;grid-row:1;min-width:0;padding:14px;border:1px solid var(--line);border-radius:13px;background:var(--color-surface)}
.room-overview .room-brand{height:auto;gap:9px;margin:0 0 14px;border:0}
.room-overview .room-brand strong{font-size:20px;letter-spacing:-.5px}
.room-overview .room-brand>span:last-of-type{font-size:12px;font-weight:600;color:var(--color-accent);margin-left:auto;white-space:nowrap}

.room-overview #leave-room{width:25px;height:25px;padding:4px!important;color:var(--color-secondary);background:none;border:0}
.room-summary{display:flex;align-items:center;gap:10px;min-width:0}
#open-invite{display:flex;align-items:center;justify-content:flex-start;gap:7px;flex:1;min-width:0;padding:0;border:0;background:none;text-align:left}
#open-invite strong{font-size:11px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#invite-code{font-size:9px;letter-spacing:.6px;color:var(--color-muted)}
#room-online-count{font-size:10px;white-space:nowrap;color:var(--mint)}
.recent-rail{grid-column:1;grid-row:2;display:flex;flex-direction:column;align-items:center;gap:13px;min-height:0;overflow-y:auto;padding:15px 7px;border:1px solid var(--line);border-radius:13px;background:var(--color-surface);scrollbar-width:none}
.rail-label{font-size:9px;color:var(--color-muted);letter-spacing:2px}
#room-shortcuts{display:flex;flex-direction:column;gap:14px}
.room-shortcut{display:grid;place-items:center;flex-shrink:0;width:46px;height:46px;padding:0;border:1px solid var(--color-border-subtle);border-radius:50%;background:var(--color-surface-raised);color:var(--color-accent);font-size:12px;font-weight:600}
.room-shortcut:hover{border-color:var(--color-accent-border);background:var(--color-control-hover)}
.room-shortcut.current{color:var(--color-text);background:var(--color-accent-tint);border-color:var(--color-accent-border);box-shadow:0 0 0 3px var(--color-focus-ring)}
.recent-rail .add-room{margin-top:auto;background:none;border-style:dashed;color:var(--color-secondary)}
.workspace>.sidebar{grid-column:2;grid-row:2;display:flex;flex-direction:column;align-items:stretch;min-height:0;max-height:none;padding:14px 12px;border:1px solid var(--line);border-radius:13px;background:var(--color-surface);overflow-y:auto}
.workspace .voice-card{display:block;margin:0;padding:0;border:0;border-radius:0;background:none;box-shadow:none;flex-shrink:0}
.voice-card>.voice-heading{display:flex;align-items:center;justify-content:space-between;margin:0 0 12px}
.voice-heading h2{display:flex;align-items:center;gap:7px;margin:0;font-size:13px;color:var(--color-accent)}
.voice-heading h2>.ui-icon{width:17px;height:17px;color:var(--color-success)}
.voice-heading>span{font-size:10px;color:var(--color-secondary);padding:2px 7px;border-radius:5px;background:var(--color-hover-tint)}
.workspace #voice-toggle{width:100%;min-height:37px;margin:0 0 14px;font-size:11px}
.workspace .voice-card .voice-connection{display:flex;margin:0 0 14px;gap:8px;font-size:10px}
.workspace .voice-connection small{font-size:9px;line-height:1.6}
.workspace .self-profile{display:flex;padding:11px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);gap:7px}
.workspace .self-profile .avatar{width:30px;height:30px;border-radius:10px}
.workspace .self-profile>button:first-child{justify-content:flex-start;text-align:left;gap:8px;min-width:0}
.workspace .self-profile>button:first-child>div:last-child{min-width:0;flex:1}
.workspace .self-profile>button:last-child{width:26px;height:26px;padding:5px!important}
.workspace .voice-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:11px}
.workspace .voice-actions button{padding:9px 4px;font-size:10px;min-width:0;gap:5px}
.workspace .voice-settings{margin-top:12px}
.workspace #voice-volume-controls{display:block}
.voice-participants{flex:1;min-height:0;margin-top:23px}
.voice-participants h3{margin:0 0 12px;font-size:10px;font-weight:500;color:var(--color-muted)}
.voice-participants .voice-empty{padding:14px 7px;margin:0;font-size:10px;line-height:1.9}
.voice-participants .voice-empty span{font-size:9px}
.workspace .voice-member-row{gap:7px;padding:9px 5px}
.workspace .voice-member-row .avatar{width:25px;height:25px;border-radius:8px}
.workspace .voice-member-info strong{font-size:10px}
.workspace .voice-member-level{font-size:9px}
.workspace>.room-main{grid-column:3;grid-row:1/3;display:flex;min-height:0;overflow:hidden;border:1px solid var(--line);border-radius:13px;background:var(--color-surface)}
.workspace .room-toolbar{display:flex;flex-direction:column;align-items:stretch;justify-content:center;position:static;gap:10px;min-height:103px;height:auto;padding:14px 16px;background:var(--color-surface);border-bottom:1px solid var(--line)}
.workspace .room-toolbar>.toolbar-main{display:flex;align-items:center;justify-content:space-between;gap:10px}
.workspace .room-toolbar span{border:0;padding-left:0}
.toolbar-identity{display:flex;align-items:center;gap:10px;min-width:0}
.workspace .toolbar-identity>strong{font-size:12px;white-space:nowrap}
.workspace #connection-status{border:0;padding:0;font-size:9px;white-space:nowrap}
.workspace #toggle-voice-panel{display:none}
.workspace .header-actions{display:flex;align-items:center;justify-content:flex-end;gap:5px;flex-wrap:wrap}
.workspace .header-actions>button{font-size:10px;padding:8px;min-height:32px}
.workspace #room-panel-label{max-width:76px}
.workspace .room-toolbar>.screen-toolbar{display:flex;gap:6px;align-items:center;justify-content:flex-start;min-width:0}
.workspace .screen-toolbar>div:not(.focus-voice-actions){display:flex;max-width:100%;flex-wrap:wrap;justify-content:flex-start;padding:0;border:0;background:none;gap:3px}
.workspace .screen-toolbar button{font-size:9px;min-height:26px;padding:5px 6px}
.workspace .screen-area{--screen-height:48dvh;flex:0 0 auto;max-height:var(--screen-height);padding:16px;overflow:auto;border-bottom:1px solid var(--line)}
.screen-section-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:11px}
.screen-section-heading strong,.chat-heading strong{display:flex;align-items:center;gap:6px;font-size:11px;font-weight:600;color:var(--color-accent)}
.screen-section-heading .ui-icon,.chat-heading .ui-icon{width:14px;height:14px;color:var(--color-accent)}
.screen-section-heading>span{font-size:9px;color:var(--color-muted)}
.workspace .screen-list{gap:7px;margin:0}
.workspace .screen-list.is-empty{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.screen-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;height:108px;min-width:0;border:1px dashed var(--color-border-subtle);border-radius:10px;background:linear-gradient(145deg,var(--color-surface),var(--color-accent-tint));color:var(--color-muted)}
.screen-placeholder>.ui-icon{width:23px;height:23px;stroke-width:1.4}
.screen-placeholder strong{font-size:10px;font-weight:500;color:var(--color-secondary)}
.screen-placeholder>span{font-size:9px;color:var(--color-muted)}
.workspace .screen-choice{padding:7px 8px;border-radius:8px;gap:7px;min-width:0}
.workspace .screen-choice>span{font-size:10px}
.workspace .screen-choice small{font-size:8px}
.workspace .screen-choice .avatar{width:23px;height:23px;border-radius:7px}
.workspace .screen-hint{display:block;min-height:0;border:0;background:none;text-align:left;font-size:9px;margin:10px 0 0;padding:0;line-height:1.7}
.workspace .screen-hint>.ui-icon{display:none}
.workspace .watch-stage[data-count='0']{display:none}
.workspace .watch-stage[data-layout=grid]{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:10px}
.workspace .watch-stage[data-layout=grid] .video-frame{height:clamp(92px,10vw,160px)}
.workspace .watch-stage[data-layout=grid] video{cursor:pointer}
.workspace .watch-stage[data-layout=grid] .player:not(:fullscreen) .player-controls{min-height:34px;padding:6px;gap:4px;flex-wrap:nowrap}
.workspace .watch-stage[data-layout=grid] .player:not(:fullscreen) .player-state{display:none}
.workspace .watch-stage[data-layout=grid] .player:not(:fullscreen) .player-buttons{flex:0 0 auto;overflow:visible}
.workspace .watch-stage[data-layout=grid] .player:not(:fullscreen) .player-buttons>button{display:none;padding:4px}
.workspace .watch-stage[data-layout=grid] .player:not(:fullscreen) .player-buttons>.tools-toggle{display:flex;font-size:0;width:24px;height:24px;justify-content:center}
.workspace .watch-stage[data-layout=grid] .player:not(:fullscreen) .tools-toggle>.icon-label{display:none}
.workspace .watch-stage[data-layout=grid] .player:not(:fullscreen) .stream-volume{display:none}
.workspace .watch-stage[data-layout=grid] .player[data-tools-expanded=true]:not(:fullscreen) .player-controls{flex-wrap:wrap}
.workspace .watch-stage[data-layout=grid] .player[data-tools-expanded=true]:not(:fullscreen) .player-buttons{flex:0 0 100%;overflow-x:auto;justify-content:flex-start}
.workspace .watch-stage[data-layout=grid] .player[data-tools-expanded=true]:not(:fullscreen) .player-buttons>button{display:inline-flex;white-space:nowrap}
.workspace .watch-stage[data-layout=grid] .player[data-tools-expanded=true]:not(:fullscreen) .stream-volume{display:flex}
.workspace .chat{flex:1 1 0;min-height:170px;padding:15px 16px 12px;overflow:hidden}
.chat-heading{display:flex;align-items:center;justify-content:space-between;flex-shrink:0;gap:8px;padding-bottom:12px;border-bottom:1px solid var(--color-border-subtle)}
.chat-heading>span{font-size:9px;color:var(--color-muted)}
.workspace .message-history{min-height:50px}
.workspace .messages{padding:15px 0}
.workspace .messages:empty::before{border:0;background:none;padding:25px 12px}
.workspace>.member-sidebar{grid-column:4;grid-row:1/3;display:flex;min-height:0;padding:18px 13px;border:1px solid var(--line);border-radius:13px;background:var(--color-surface)}
.workspace>.member-sidebar h3{margin:0 0 15px;padding:2px 0 15px;border-bottom:1px solid var(--line);font-size:12px;color:var(--color-accent)}
.workspace #members{overflow-y:auto;min-height:0;scrollbar-width:thin}
.workspace .member{gap:8px;padding:11px 0}
.workspace .member .avatar{width:30px;height:30px;border-radius:10px}
.workspace .member strong{font-size:10px}
.workspace .member small{font-size:9px}
/* 游戏活动保留语音状态，长名称可悬停查看完整内容。 */
.workspace .member .member-game,#room-panel-members .member-game,.voice-member-info .member-game{color:var(--color-success);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.member-game[hidden]{display:none}
.workspace .desktop-link{flex-shrink:0;font-size:10px;padding-top:20px}
/* 专注观看沿用播放器，隐藏外围面板并保留退出入口和语音静音操作。 */
.workspace.focus-mode{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
.workspace.focus-mode>.room-overview,.workspace.focus-mode>.recent-rail,.workspace.focus-mode>.sidebar,.workspace.focus-mode>.member-sidebar{display:none}
.workspace.focus-mode>.room-main{grid-column:1;grid-row:1}
.workspace.focus-mode .screen-area{flex:1;max-height:none;--screen-height:calc(100dvh - 270px)}
.workspace.focus-mode .chat{flex:0 0 150px;min-height:150px}
.workspace.focus-mode .watch-stage[data-layout=grid] .video-frame{height:clamp(140px,26dvh,360px)}
.workspace.focus-mode .screen-toolbar>.focus-voice-actions{display:flex}
/* 中等宽度的成员列表由房间信息窗口承载，最近房间与语音区继续保留。 */
@media(max-width:1100px){
 .workspace{grid-template-columns:58px 194px minmax(0,1fr);gap:10px;padding:12px}
 .workspace>.member-sidebar{display:none}
 .room-shortcut{width:40px;height:40px}
 .workspace #connection-status{display:none}
}
/* 手机使用圆形房间栏与可收起的语音面板，聊天区保留独立滚动。 */
@media(max-width:760px){
 .workspace{grid-template-columns:48px minmax(0,1fr);grid-template-rows:90px auto minmax(0,1fr);gap:8px;padding:8px}
 .room-overview{grid-column:1/3;grid-row:1;padding:12px}
 .room-overview .room-brand{margin-bottom:10px}
 .room-overview .room-brand>span:last-of-type{margin-left:0}
 .room-overview #leave-room{margin-left:auto}
 .recent-rail{grid-column:1;grid-row:2/4;padding:12px 4px;gap:12px}
 .room-shortcut{width:36px;height:36px;font-size:10px}
 #room-shortcuts{gap:12px}
 .workspace>.sidebar{grid-column:2;grid-row:2;max-height:240px;padding:12px}
 .workspace.voice-collapsed{grid-template-rows:90px auto minmax(0,1fr)}
 .workspace.voice-collapsed>.sidebar{display:none}
 .workspace>.room-main{grid-column:2;grid-row:3;overflow:auto}
 .workspace #toggle-voice-panel{display:inline-flex;padding:6px;font-size:10px}
 .workspace .toolbar-identity>strong{display:none}
 .workspace .room-toolbar{min-height:95px;padding:10px;gap:8px;flex-shrink:0}
 .workspace .header-actions{width:auto;gap:4px}
 .workspace .header-actions>button{padding:6px;min-height:29px;font-size:9px}
 .workspace #room-panel-label{max-width:55px}
 .workspace .screen-toolbar>div:not(.focus-voice-actions){flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin}
 .workspace .screen-toolbar button{flex-shrink:0;white-space:nowrap}
 .workspace .screen-area{--screen-height:40dvh;padding:12px;max-height:var(--screen-height)}
 .workspace .screen-list.is-empty,.workspace .watch-stage[data-layout=grid]{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
 .screen-placeholder{height:82px;gap:5px}
 .screen-placeholder>.ui-icon{width:19px;height:19px}
 .workspace .watch-stage[data-layout=grid] .video-frame{height:100px}
 .workspace .chat{flex:1 0 230px;min-height:230px;padding:12px}
 .chat-heading>span{display:none}
 .workspace .voice-card>.voice-heading{margin-bottom:9px}
 .workspace #voice-toggle{margin-bottom:10px}
 .workspace .voice-card .voice-connection{margin-bottom:10px}
 .voice-participants{margin-top:15px}
 .workspace.voice-collapsed .screen-toolbar>.focus-voice-actions{display:flex}
 .workspace.focus-mode{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
 .workspace.focus-mode>.room-main{grid-column:1;grid-row:1}
 .workspace.focus-mode #toggle-voice-panel{display:none}
 .workspace.focus-mode .chat{flex:0 0 150px;min-height:150px}
}

/* 房间标题沿用同一Kivo 图标，适应紧凑标题区。 */
.room-overview .brand-icon{width:30px;height:30px}
