/* ============================================================
   co-mic.css · 连麦画面布局（浮动/固定小窗/宫格）+ 外部观众模拟面板
   ------------------------------------------------------------
   连麦浮层/操作浮层/邀请抽屉见 co-mic-sheet.css。
   ============================================================ */

/* ============ 连麦画面布局 ============
   浮动模式保持主播全屏；固定模式使用主播大画面 + 右侧独立麦位栏；宫格随人数扩展。 */
:root {
    --interaction-stage-background:
        radial-gradient(ellipse 120% 78% at -12% 4%, rgba(var(--brand-3-rgb), 0.2) 0%, rgba(var(--brand-2-rgb), 0.13) 38%, transparent 68%),
        radial-gradient(ellipse 112% 92% at 112% 102%, rgba(var(--brand-1-rgb), 0.28) 0%, rgba(var(--brand-1-rgb), 0.12) 42%, transparent 72%),
        linear-gradient(138deg, #17304a 0%, #10223c 30%, #11182f 58%, #0a0c22 80%, #050714 100%);
}

html[data-theme="purple"] {
    --interaction-stage-background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, transparent 38%, rgba(0, 0, 0, 0.16) 100%),
        linear-gradient(105deg, #3c102d 0%, #34122f 22%, #281532 43%, #1f1737 57%, #15183e 76%, #091032 100%);
}

.co-mic-stage {
    --comic-stage-top: 132px;
    --comic-stage-height: 360px;
    --comic-fixed-top: 148px;
    --comic-fixed-height: 594px;
    --comic-fixed-host-width: 74%;
}

/* 主播端由手机外层统一承载渐变，使画面下方与 102px 底部控制栏连续到手机底边。 */
.phone[data-stage="living"]:has(> .co-mic-stage:is([data-comic-layout="fixed"], [data-comic-layout^="grid"])),
.phone[data-stage="living"]:has(> .host-interaction-stage.host-link-active) {
    background: var(--interaction-stage-background);
}

.phone[data-stage="living"]:has(> .co-mic-stage:is([data-comic-layout="fixed"], [data-comic-layout^="grid"]))
    > .video-stage,
.phone[data-stage="living"]:has(> .host-interaction-stage.host-link-active)
    > .video-stage {
    background: transparent;
}

.phone[data-stage="living"]:has(> .co-mic-stage:is([data-comic-layout="fixed"], [data-comic-layout^="grid"]))
    > .live-bottom-bar,
.phone[data-stage="living"]:has(> .host-interaction-stage.host-link-active)
    > .live-bottom-bar {
    background: transparent;
}

/* 互动舞台底部压暗层在边界处回到透明，让整机背景无断层地延伸进底栏。 */
.phone[data-stage="living"]:has(> .co-mic-stage:is([data-comic-layout="fixed"], [data-comic-layout^="grid"]))
    > .video-stage::after,
.phone[data-stage="living"]:has(> .host-interaction-stage.host-link-active)
    > .video-stage::after {
    background: linear-gradient(0deg,
        transparent 0%,
        rgba(0, 0, 0, 0.2) 28%,
        rgba(0, 0, 0, 0.08) 58%,
        transparent 100%);
}

/* 观众端没有独立底栏，直接在满高舞台上消费同一套互动渐变。 */
.audience-video-stage.co-mic-stage:is([data-comic-layout="fixed"], [data-comic-layout^="grid"]),
.audience-video-stage.host-interaction-stage.host-link-active {
    background: var(--interaction-stage-background);
}

.co-mic-host-media {
    transition:
        top 260ms cubic-bezier(0.2, 0.82, 0.24, 1),
        width 260ms cubic-bezier(0.2, 0.82, 0.24, 1),
        height 260ms cubic-bezier(0.2, 0.82, 0.24, 1),
        transform 260ms ease;
}

/* 固定画面底边与右侧麦位栏连成直线，不沿用主播视频舞台的底部圆角。 */
.video-stage.co-mic-stage[data-comic-layout="fixed"] {
    border-radius: 0;
}

.comic-stage-grid {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: none;
    pointer-events: none;
}

/* HTML 首屏先强制隐藏，避免样式/脚本尚未加载时九个占位节点以裸文本闪现 */
.comic-stage-grid[hidden] {
    display: none !important;
}

.co-mic-stage[data-comic-layout="floating"] .comic-stage-grid {
    display: block;
    inset: 0;
}

/* 固定小窗：主播画面与右侧麦位栏完全分隔，画面上下避开直播信息和控制区。 */
.co-mic-stage[data-comic-layout="fixed"] .comic-stage-grid {
    display: grid;
    top: var(--comic-fixed-top);
    right: 0;
    bottom: auto;
    left: var(--comic-fixed-host-width);
    width: calc(100% - var(--comic-fixed-host-width));
    height: var(--comic-fixed-height);
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(6, minmax(0, 1fr));
    background: rgba(12, 13, 19, 0.98);
}

.co-mic-stage[data-comic-layout="fixed"][data-comic-fixed-dense="true"] .comic-stage-grid {
    grid-template-rows: repeat(8, minmax(0, 1fr));
}

/* 八席时麦位高为 594 / 8 = 74.25px；右栏同步收窄，主播画面占满腾出的宽度。 */
.co-mic-stage[data-comic-layout="fixed"][data-comic-fixed-dense="true"] {
    --comic-fixed-host-width: calc(100% - 74.25px);
}

.co-mic-stage[data-comic-layout="fixed"] .co-mic-host-media,
.co-mic-stage[data-comic-layout="fixed"] .pad-layer {
    top: var(--comic-fixed-top);
    right: auto;
    bottom: auto;
    left: 0;
    width: var(--comic-fixed-host-width);
    height: var(--comic-fixed-height);
}

.co-mic-stage[data-comic-layout="fixed"] .comic-stage-slot.host {
    display: none;
}

/* 默认展示六个席位；从其他布局带入 7～8 人时自动切到八席紧凑态。 */
.co-mic-stage[data-comic-layout="fixed"]:not([data-comic-fixed-dense="true"])
    .comic-stage-slot:nth-child(n + 8) {
    display: none;
}

/* 评论和入场横幅只占主播画面宽度，不覆盖右侧独立麦位。 */
.co-mic-stage[data-comic-layout="fixed"] .live-message-panel,
.co-mic-stage[data-comic-layout="fixed"] .live-entry-banner-layer {
    width: calc(var(--comic-fixed-host-width) - 24px);
}

.co-mic-stage[data-comic-layout="grid2"] .comic-stage-grid,
.co-mic-stage[data-comic-layout="grid3"] .comic-stage-grid,
.co-mic-stage[data-comic-layout="grid4"] .comic-stage-grid,
.co-mic-stage[data-comic-layout="grid5"] .comic-stage-grid,
.co-mic-stage[data-comic-layout="grid6"] .comic-stage-grid,
.co-mic-stage[data-comic-layout="grid7"] .comic-stage-grid,
.co-mic-stage[data-comic-layout="grid8"] .comic-stage-grid,
.co-mic-stage[data-comic-layout="grid9"] .comic-stage-grid {
    display: grid;
    top: var(--comic-stage-top);
    bottom: auto;
    height: var(--comic-stage-height);
}

.co-mic-stage[data-comic-layout="grid2"] .comic-stage-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 1fr;
}

.co-mic-stage[data-comic-layout="grid3"] .comic-stage-grid,
.co-mic-stage[data-comic-layout="grid4"] .comic-stage-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
}

.co-mic-stage[data-comic-layout="grid3"] .comic-stage-slot.host {
    grid-column: 1;
    grid-row: 1 / span 2;
}

.co-mic-stage[data-comic-layout="grid5"] .comic-stage-grid,
.co-mic-stage[data-comic-layout="grid6"] .comic-stage-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
}

.co-mic-stage[data-comic-layout="grid7"] .comic-stage-grid,
.co-mic-stage[data-comic-layout="grid8"] .comic-stage-grid,
.co-mic-stage[data-comic-layout="grid9"] .comic-stage-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
}

.co-mic-stage[data-comic-layout="grid2"] .co-mic-host-media,
.co-mic-stage[data-comic-layout="grid2"] .pad-layer,
.co-mic-stage[data-comic-layout="grid3"] .co-mic-host-media,
.co-mic-stage[data-comic-layout="grid3"] .pad-layer {
    top: var(--comic-stage-top);
    bottom: auto;
    height: var(--comic-stage-height);
    width: 50%;
    right: auto;
}

.co-mic-stage[data-comic-layout="grid4"] .co-mic-host-media,
.co-mic-stage[data-comic-layout="grid4"] .pad-layer {
    top: var(--comic-stage-top);
    width: 50%;
    height: calc(var(--comic-stage-height) / 2);
    right: auto;
    bottom: auto;
}

.co-mic-stage[data-comic-layout="grid5"] .co-mic-host-media,
.co-mic-stage[data-comic-layout="grid5"] .pad-layer,
.co-mic-stage[data-comic-layout="grid6"] .co-mic-host-media,
.co-mic-stage[data-comic-layout="grid6"] .pad-layer {
    top: var(--comic-stage-top);
    width: calc(100% / 3);
    height: calc(var(--comic-stage-height) / 2);
    right: auto;
    bottom: auto;
}

.co-mic-stage[data-comic-layout="grid7"] .co-mic-host-media,
.co-mic-stage[data-comic-layout="grid7"] .pad-layer,
.co-mic-stage[data-comic-layout="grid8"] .co-mic-host-media,
.co-mic-stage[data-comic-layout="grid8"] .pad-layer,
.co-mic-stage[data-comic-layout="grid9"] .co-mic-host-media,
.co-mic-stage[data-comic-layout="grid9"] .pad-layer {
    top: var(--comic-stage-top);
    width: calc(100% / 3);
    height: calc(var(--comic-stage-height) / 3);
    right: auto;
    bottom: auto;
}

.comic-stage-slot {
    position: relative;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.32);
    background:
        radial-gradient(circle at 50% 40%, rgba(var(--brand-2-rgb), 0.055), transparent 55%),
        rgba(13, 14, 19, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.045);
}

.comic-stage-slot:not(.host) {
    pointer-events: auto;
    cursor: pointer;
    transition: background 160ms ease, color 160ms ease;
}

.comic-stage-slot:not(.host):active {
    color: rgba(255, 255, 255, 0.55);
    background: rgba(18, 22, 30, 0.98);
}

.comic-stage-slot.connected {
    cursor: default;
    color: rgba(255, 255, 255, 0.9);
    background:
        radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--brand-2) 24%, transparent), transparent 58%),
        rgba(13, 17, 26, 0.98);
}

.comic-stage-slot.connected:active {
    color: #fff;
    background:
        radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--brand-2) 34%, transparent), transparent 62%),
        rgba(16, 22, 34, 0.98);
}

.comic-stage-slot.host {
    background: transparent;
}

/* 固定栏席位减少装饰，让六个近方形麦位形成连续、清晰的独立画面带。 */
.co-mic-stage[data-comic-layout="fixed"] .comic-stage-slot {
    gap: 3px;
    overflow: hidden;
    border-width: 0 0 1px 1px;
    border-color: rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at 50% 38%, rgba(var(--brand-2-rgb), 0.07), transparent 58%),
        rgba(18, 18, 27, 0.98);
}

.co-mic-stage[data-comic-layout="fixed"] .comic-stage-slot.connected {
    background:
        radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--brand-2) 20%, transparent), transparent 62%),
        linear-gradient(145deg, rgba(74, 78, 91, 0.96), rgba(32, 34, 43, 0.98));
}

.co-mic-stage[data-comic-layout="fixed"] .comic-slot-plus {
    font-size: 29px;
}

.co-mic-stage[data-comic-layout="fixed"] .comic-slot-label {
    font-size: 10px;
    letter-spacing: 0.3px;
}

.co-mic-stage[data-comic-layout="fixed"] .comic-slot-avatar {
    width: 42px;
    height: 42px;
    font-size: 38px;
}

.co-mic-stage[data-comic-layout="fixed"] .comic-slot-name {
    max-width: 88%;
    font-size: 9px;
}

.co-mic-stage[data-comic-layout="fixed"] .comic-slot-muted {
    top: 5px;
    right: 5px;
    padding: 2px 5px;
    font-size: 8px;
}

.co-mic-stage[data-comic-layout="fixed"][data-comic-fixed-dense="true"] .comic-slot-plus {
    font-size: 23px;
}

.co-mic-stage[data-comic-layout="fixed"][data-comic-fixed-dense="true"] .comic-slot-avatar {
    width: 29px;
    height: 29px;
    font-size: 27px;
}

.co-mic-stage[data-comic-layout="fixed"][data-comic-fixed-dense="true"] .comic-slot-name,
.co-mic-stage[data-comic-layout="fixed"][data-comic-fixed-dense="true"] .comic-slot-label {
    font-size: 8px;
}

/* 大空麦位保留半透明白雾、柔和反光与内高光，形成清晰的磨砂层级。 */
.co-mic-stage:is([data-comic-layout="fixed"], [data-comic-layout^="grid"])
    .comic-stage-slot:not(.host):not(.connected) {
    color: rgba(255, 255, 255, 0.46);
    border-width: 2px;
    border-color: transparent;
    background:
        radial-gradient(circle at 50% 34%, rgba(var(--brand-2-rgb), 0.11), transparent 58%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.035)),
        rgba(15, 20, 31, 0.48);
    background-clip: padding-box;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.09),
        inset 1px 0 0 rgba(255, 255, 255, 0.035);
    backdrop-filter: blur(16px) saturate(125%);
    -webkit-backdrop-filter: blur(16px) saturate(125%);
}

/* 固定栏小空麦位不再自带光斑或内高光，只覆盖一层纯磨砂。 */
.co-mic-stage[data-comic-layout="fixed"]
    .comic-stage-slot:not(.host):not(.connected) {
    border-width: 0 0 2px 2px;
    border-color: transparent;
    background: rgba(255, 255, 255, 0.055);
    background-clip: padding-box;
    box-shadow: none;
    backdrop-filter: blur(16px) saturate(118%);
    -webkit-backdrop-filter: blur(16px) saturate(118%);
}

/* 3×3 九宫格密度更高：磨砂减轻，所有格子只画右/下单侧分隔线，避免相邻边框叠成 2px。 */
.co-mic-stage:is(
    [data-comic-layout="grid7"],
    [data-comic-layout="grid8"],
    [data-comic-layout="grid9"]
)
    .comic-stage-slot {
    border: 0;
    border-right: 2px solid rgba(255, 255, 255, 0.06);
    border-bottom: 2px solid rgba(255, 255, 255, 0.06);
}

.co-mic-stage:is(
    [data-comic-layout="grid7"],
    [data-comic-layout="grid8"],
    [data-comic-layout="grid9"]
)
    .comic-stage-slot:nth-child(3n) {
    border-right: 0;
}

.co-mic-stage:is(
    [data-comic-layout="grid7"],
    [data-comic-layout="grid8"],
    [data-comic-layout="grid9"]
)
    .comic-stage-slot:nth-child(n + 7) {
    border-bottom: 0;
}

.co-mic-stage:is(
    [data-comic-layout="grid7"],
    [data-comic-layout="grid8"],
    [data-comic-layout="grid9"]
)
    .comic-stage-slot:not(.host):not(.connected) {
    border-color: transparent;
    background: rgba(255, 255, 255, 0.035);
    background-clip: padding-box;
    box-shadow: none;
    backdrop-filter: blur(12px) saturate(110%);
    -webkit-backdrop-filter: blur(12px) saturate(110%);
}

/* 二宫格右侧空位只保留左侧透明分隔；关闭整格模糊，避免透明边框仍被滤镜覆盖。 */
.co-mic-stage[data-comic-layout="grid2"]
    .comic-stage-slot:nth-child(2):not(.connected) {
    border-width: 0 0 0 2px;
    border-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* 固定麦位栏让底层互动渐变透进空位，避免不透明栏底吃掉磨砂效果。 */
.co-mic-stage[data-comic-layout="fixed"] .comic-stage-grid {
    background: transparent;
}

/* 宫格下沿做极轻的空间分界，下面仍保持同一块连续渐变背景。 */
.co-mic-stage[data-comic-layout^="grid"] .comic-stage-grid {
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.065),
        0 18px 30px rgba(0, 0, 0, 0.2);
}

/* 3×3 布局底部直接融入大背景，不保留宫格容器自身的底边高光或阴影。 */
.co-mic-stage:is(
    [data-comic-layout="grid7"],
    [data-comic-layout="grid8"],
    [data-comic-layout="grid9"]
)
    .comic-stage-grid {
    box-shadow: none;
}

/* 浮动语音席位：92px 正方形、零间距；第一位在列底，后续观众从下往上排列。
   JS 按人数写入 --floating-bottom：1 人距底 80px，每增加一人整列下沉 11px，8 人近乎铺满。 */
.co-mic-stage[data-comic-layout="floating"] .comic-stage-slot.host,
.co-mic-stage[data-comic-layout="floating"] .comic-stage-slot:not(.connected) {
    display: none;
}

.co-mic-stage[data-comic-layout="floating"] .comic-stage-slot.connected {
    position: absolute;
    right: 10px;
    bottom: var(--floating-bottom);
    width: 92px;
    height: 92px;
    min-width: 92px;
    min-height: 92px;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    color: rgba(255, 255, 255, 0.94);
    background:
        radial-gradient(circle at 68% 28%, rgba(255, 255, 255, 0.16), transparent 46%),
        linear-gradient(145deg, rgba(113, 119, 132, 0.88), rgba(54, 58, 68, 0.92));
    box-shadow: 0 7px 22px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: bottom 220ms cubic-bezier(0.2, 0.8, 0.2, 1), background 160ms ease;
}

.co-mic-stage[data-comic-layout="floating"] .comic-stage-slot.connected:nth-child(3n) {
    background:
        radial-gradient(circle at 68% 28%, rgba(255, 255, 255, 0.14), transparent 46%),
        linear-gradient(145deg, rgba(118, 101, 106, 0.9), rgba(61, 54, 62, 0.94));
}

.co-mic-stage[data-comic-layout="floating"] .comic-stage-slot.connected:nth-child(3n + 1) {
    background:
        radial-gradient(circle at 68% 28%, rgba(255, 255, 255, 0.15), transparent 46%),
        linear-gradient(145deg, rgba(91, 106, 121, 0.9), rgba(45, 54, 66, 0.94));
}

.co-mic-stage[data-comic-layout="floating"] .comic-stage-slot.connected::after {
    content: '';
    position: absolute;
    z-index: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: 38%;
    pointer-events: none;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent);
}

.co-mic-stage[data-comic-layout="floating"] .comic-slot-avatar {
    position: relative;
    z-index: 1;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid rgba(255, 255, 255, 0.78);
    border-radius: 50%;
    background: rgba(239, 243, 249, 0.88);
    box-shadow: 0 4px 13px rgba(0, 0, 0, 0.22);
    font-size: 31px;
    line-height: 1;
    filter: none;
}

.co-mic-stage[data-comic-layout="floating"] .comic-slot-name {
    position: absolute;
    z-index: 2;
    left: 7px;
    right: 5px;
    bottom: 5px;
    max-width: none;
    color: #fff;
    font-size: 10px;
    line-height: 1.15;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.comic-slot-audio {
    display: none;
}

.co-mic-stage[data-comic-layout="floating"] .comic-slot-audio {
    position: absolute;
    z-index: 2;
    top: 5px;
    left: 5px;
    width: 23px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(36, 36, 43, 0.48);
}

.co-mic-stage[data-comic-layout="floating"] .comic-slot-audio svg {
    width: 11px;
    height: 11px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.comic-slot-index {
    display: none;
    position: absolute;
    top: 7px;
    left: 7px;
    padding: 2px 7px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.66);
    background: rgba(0, 0, 0, 0.42);
    font-size: 10px;
    line-height: 1.2;
}

.comic-slot-plus {
    font-size: 34px;
    font-weight: 200;
    line-height: 0.9;
}

.comic-slot-label {
    font-size: 12px;
    letter-spacing: 1px;
}

.comic-slot-avatar {
    position: relative;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 50%;
    background: rgba(239, 243, 249, 0.88);
    font-size: 42px;
    line-height: 1;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.36));
}

.comic-slot-avatar::before {
    content: attr(data-emoji);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(25, 27, 34, 0.9);
    font-size: 0.72em;
    line-height: 1;
}

.comic-slot-avatar img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    opacity: 0;
    transition: opacity 100ms ease;
}

.comic-slot-avatar img.is-loaded {
    opacity: 1;
}

.comic-stage-slot.camera-off .comic-slot-avatar {
    opacity: 0.42;
    filter: grayscale(0.35) drop-shadow(0 6px 16px rgba(0, 0, 0, 0.28));
}

.comic-slot-camera-off {
    position: absolute;
    z-index: 3;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(7, 8, 12, 0.68);
    transform: translate(-50%, -50%);
}

.comic-slot-camera-off svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.comic-slot-name {
    max-width: 88%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.8);
    font-size: 11px;
}

.comic-slot-muted {
    position: absolute;
    top: 7px;
    right: 7px;
    padding: 3px 7px;
    border: 1px solid color-mix(in srgb, var(--brand-2) 28%, transparent);
    border-radius: 999px;
    color: var(--brand-text-soft);
    background: rgba(3, 12, 26, 0.68);
    box-shadow: 0 0 12px color-mix(in srgb, var(--brand-2) 18%, transparent);
    font-size: 9px;
    line-height: 1;
}

.co-mic-stage[data-comic-layout="grid2"] .comic-stage-slot:nth-child(n + 3) {
    display: none;
}

.co-mic-stage[data-comic-layout="grid3"] .comic-stage-slot:nth-child(n + 4) {
    display: none;
}

.co-mic-stage[data-comic-layout="grid4"] .comic-stage-slot:nth-child(n + 5) {
    display: none;
}

.co-mic-stage[data-comic-layout="grid5"] .comic-stage-slot:nth-child(n + 6) {
    display: none;
}

.co-mic-stage[data-comic-layout="grid6"] .comic-stage-slot:nth-child(n + 7) {
    display: none;
}

.co-mic-stage[data-comic-layout="grid7"] .comic-stage-slot:nth-child(n + 8) {
    display: none;
}

.co-mic-stage[data-comic-layout="grid8"] .comic-stage-slot:nth-child(n + 9) {
    display: none;
}

.co-mic-stage[data-comic-layout="grid5"] .comic-slot-index,
.co-mic-stage[data-comic-layout="grid6"] .comic-slot-index {
    display: inline-flex;
}

.co-mic-stage[data-comic-layout="grid5"] .comic-slot-plus,
.co-mic-stage[data-comic-layout="grid6"] .comic-slot-plus,
.co-mic-stage[data-comic-layout="grid7"] .comic-slot-plus,
.co-mic-stage[data-comic-layout="grid8"] .comic-slot-plus,
.co-mic-stage[data-comic-layout="grid9"] .comic-slot-plus {
    font-size: 26px;
}

.co-mic-stage[data-comic-layout="grid5"] .comic-slot-label,
.co-mic-stage[data-comic-layout="grid6"] .comic-slot-label,
.co-mic-stage[data-comic-layout="grid7"] .comic-slot-label,
.co-mic-stage[data-comic-layout="grid8"] .comic-slot-label,
.co-mic-stage[data-comic-layout="grid9"] .comic-slot-label {
    font-size: 10px;
}

.co-mic-stage[data-comic-layout="grid5"] .comic-slot-avatar,
.co-mic-stage[data-comic-layout="grid6"] .comic-slot-avatar,
.co-mic-stage[data-comic-layout="grid7"] .comic-slot-avatar,
.co-mic-stage[data-comic-layout="grid8"] .comic-slot-avatar,
.co-mic-stage[data-comic-layout="grid9"] .comic-slot-avatar {
    width: 30px;
    height: 30px;
    font-size: 28px;
}

.co-mic-stage[data-comic-layout="grid5"] .comic-slot-name,
.co-mic-stage[data-comic-layout="grid6"] .comic-slot-name,
.co-mic-stage[data-comic-layout="grid7"] .comic-slot-name,
.co-mic-stage[data-comic-layout="grid8"] .comic-slot-name,
.co-mic-stage[data-comic-layout="grid9"] .comic-slot-name {
    font-size: 9px;
}

/* 无摄像头权限时的降级占位（人物光晕） */
.video-stage.no-cam::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 42%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 240px;
    background:
        radial-gradient(circle at 50% 30%, rgba(255, 220, 200, 0.28) 0%, transparent 25%),
        radial-gradient(ellipse at 50% 70%, rgba(120, 90, 180, 0.22) 0%, transparent 50%);
    filter: blur(2px);
}

/* ============ 手机外部观众交互模拟 ============ */
.audience-simulator {
    position: fixed;
    right: 32px;
    top: 50%;
    transform: translateY(-50%);
    width: 268px;
    max-height: calc(100vh - 48px);
    padding: 22px;
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.72);
    background:
        radial-gradient(circle at 100% 0%, rgba(var(--brand-2-rgb), 0.14), transparent 45%),
        rgba(20, 20, 28, 0.72);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.audience-simulator h2 {
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.audience-simulator .sub {
    margin-top: 4px;
    color: rgba(var(--brand-2-rgb), 0.72);
    font-size: 10px;
    letter-spacing: 1.6px;
}

.sim-audience-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: calc(100vh - 300px);
    margin-top: 16px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.sim-audience {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.sim-audience-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.sim-audience-copy {
    min-width: 0;
}

.sim-audience-name-row {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 7px;
}

.sim-audience-avatar {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    font-size: 25px;
    background: rgba(var(--brand-1-rgb), 0.2);
    box-shadow: inset 0 0 0 1px rgba(var(--brand-2-rgb), 0.24);
    overflow: hidden;
}

.sim-audience-name {
    min-width: 0;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sim-audience-name-row .live-level-badge {
    top: 0;
    flex: 0 0 auto;
    margin-right: 0;
}

.sim-audience-status {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.46);
    font-size: 10px;
    line-height: 1.45;
}

.sim-inline-actions {
    display: flex;
    gap: 7px;
}

.sim-mini-button {
    flex: 1 1 0;
    min-width: 0;
    height: 30px;
    padding: 0 8px;
    border: 1px solid rgba(var(--brand-3-rgb), 0.22);
    border-radius: 9px;
    color: #fff;
    background: rgba(var(--brand-1-rgb), 0.46);
    font: inherit;
    font-size: 10px;
    cursor: pointer;
}

.sim-mini-button.secondary {
    border-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.58);
    background: rgba(255, 255, 255, 0.05);
}

.sim-mini-button:active {
    transform: scale(0.97);
}

.sim-empty {
    padding: 24px 12px;
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.34);
    font-size: 11px;
    text-align: center;
}

.sim-actions {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: 14px;
}

.sim-button {
    width: 100%;
    min-height: 40px;
    padding: 9px 12px;
    border: 1px solid rgba(var(--brand-3-rgb), 0.28);
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, rgba(var(--brand-1-rgb), 0.76), rgba(var(--brand-2-rgb), 0.62));
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.sim-button.secondary {
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.62);
    background: rgba(255, 255, 255, 0.055);
}

.sim-button:disabled {
    cursor: not-allowed;
    opacity: 0.38;
}

.sim-button:not(:disabled):active {
    transform: scale(0.98);
}

.sim-tip {
    margin-top: 14px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 9px;
    line-height: 1.5;
}

@media (max-width: 1180px) {
    body {
        justify-content: flex-start;
        padding-left: 32px;
    }

    .info-panel {
        display: none;
    }
}

@media (max-width: 900px) {
    body {
        justify-content: center;
        padding-left: 0;
    }

    .info-panel,
    .audience-simulator {
        display: none;
    }
}
