:root {
    --md-sys-color-background: #7ebaf0;
    --md-sys-color-on-background: #002952;
    --md-sys-color-surface: rgba(255,255,255,0.2);
    --md-sys-color-surface-container: rgba(255,255,255,0.2);
    --md-sys-color-surface-variant: rgba(255,255,255,0.2);
    --md-sys-color-on-surface-variant: #44474f;
    --md-sys-color-primary: #00539c;
    --md-sys-color-on-primary: #7ebaf0;
    --md-sys-color-primary-container: #d1e4ff;
    --md-sys-color-on-primary-container: #001d36;

    --weather-sun: #ffb300;
    --weather-moon: #5c6065;
    --weather-star: rgba(0, 0, 0, 0.18);
    --weather-lightning: #ffb300;
    --weather-dust-stream: #e5c483;
    --weather-dust-particle: #d4b26f;

    --md-sys-curve-emphasized: cubic-bezier(0.1, 0.9, 0.2, 1);
    --md-sys-curve-fluid: cubic-bezier(0.4, 0, 0.2, 1);
    --curve-spring: cubic-bezier(0.34, 1.2, 0.64, 1);
    --curve-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
    :root {
        --weather-moon: #ffffff;
        --weather-star: rgba(255, 255, 255, 0.85);
        --weather-lightning: #fff59d;
        --weather-dust-stream: #a88a52;
        --weather-dust-particle: #bfa065;
    }
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    width: 100%; height: 100%; overflow: hidden; margin: 0; padding: 0;
    background-color: var(--md-sys-color-background);
    color: var(--md-sys-color-on-background);
    display: flex; justify-content: center; align-items: center;
    font-family: 'Roboto', sans-serif;
    transition: background-color 0.8s var(--md-sys-curve-emphasized);
    -webkit-tap-highlight-color: transparent;
}

@supports (height: 100dvh) {
    html, body { height: 100dvh; }
}

.fast-bg-transition, .fast-bg-transition body, .fast-bg-transition .desk-container {
    transition: background-color 0.15s ease-out !important;
}

/* 竖屏手机屏体：窄屏铺满真机，宽屏收束为一台居中圆角手机 */
.desk-container {
    width: 100%; height: 100%; background: var(--md-sys-color-surface);
    display: flex; flex-direction: column; overflow: hidden; position: relative;
    transition: background-color 0.8s var(--md-sys-curve-emphasized);
    padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
    /* 以屏体宽度为准的容器查询上下文，保证宽屏手机框内的元素同样按竖屏比例缩放 */
    container-type: inline-size;
    container-name: desk;
}

/* 桌面宽屏：收束为现代手机竖屏比例（仅加圆角与投影，不绘制假机身） */
@media (min-width: 620px) and (min-height: 700px) {
    body {
        padding: 28px;
        background-color: color-mix(in srgb, var(--md-sys-color-background) 78%, #000000);
    }
    .desk-container {
        width: 430px;
        max-width: 430px;
        height: min(920px, 100%);
        flex: 0 0 auto;
        border-radius: 48px;
        border: 1px solid color-mix(in srgb, var(--md-sys-color-on-background) 12%, transparent);
        box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35), 0 6px 20px rgba(0, 0, 0, 0.18);
    }
}

/* 屏体内的纵向滚动层 */
.desk-scroll {
    position: relative; z-index: 3;
    flex: 1 1 auto; min-height: 0; width: 100%;
    display: flex; flex-direction: column;
    box-sizing: border-box;
    overflow-y: auto; overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    scrollbar-width: none; -ms-overflow-style: none;
}
.desk-scroll::-webkit-scrollbar { width: 0; height: 0; display: none; }

.weather-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.weather-space { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; overflow: hidden; }

.pane { width: 100%; position: relative; box-sizing: border-box; display: flex; flex-direction: column; z-index: 3; flex-shrink: 0; }

/* 上屏：时钟与气象总览 */
.pane-top { 
    padding: 26px 22px 6px; 
    justify-content: flex-start; 
    gap: 18px; 
}

/* 下屏：智能控制台 */
.pane-bottom { 
    padding: 10px 22px 32px; 
    background: transparent; 
    justify-content: flex-start; 
    gap: 14px;
}

.panel-content-router { flex: 0 0 auto; width: 100%; display: flex; flex-direction: column; overflow: visible; }
.view-panel { width: 100%; height: auto; display: flex; flex-direction: column; gap: 16px; overflow: visible; }
.view-panel.hidden { display: none !important; }

/* 高屏设备（如 430x932）留白微调 */
@media (min-width: 620px) and (min-height: 880px) {
    .pane-top { padding-top: 40px; gap: 24px; }
    .view-panel { gap: 18px; }
}

/* 时间排版彻底放大撑场面 */
.time-area { display: flex; flex-direction: column; align-items: flex-start; }
.time-display-stacked { 
    display: flex; flex-direction: column; line-height: 0.86; 
    font-size: clamp(96px, 24vw, 176px); 
    font-weight: 800; 
    letter-spacing: -5px; position: relative; z-index: 10; 
}
.time-display-stacked .hour-part { 
    color: var(--md-sys-color-primary); 
    transition: color 0.8s ease; 
    text-shadow: 4px 6px 16px color-mix(in srgb, var(--md-sys-color-primary) 30%, transparent);
}
.time-display-stacked .min-part { 
    color: var(--md-sys-color-on-background); 
    font-weight: 300; opacity: 0.85; transition: color 0.8s ease; 
    padding-left: 8px;
}
.date-container { margin-top: 16px; display: flex; flex-direction: column; gap: 6px; }
.date-display { font-size: clamp(18px, 4.6vw, 22px); font-weight: 700; opacity: 0.85; letter-spacing: 1px; }
.lunar-display { font-size: clamp(14px, 3.8vw, 17px); font-weight: 500; opacity: 0.7; letter-spacing: 0.5px; color: var(--md-sys-color-primary); transition: color 0.8s ease; }
.poetic-display { font-size: clamp(14px, 3.8vw, 17px); font-weight: 700; opacity: 0; color: var(--md-sys-color-primary); margin-top: 6px; transition: opacity 0.5s ease; height: 22px; letter-spacing: 1px; }

.weather-status-area { display: flex; flex-direction: column; gap: 8px; margin-top: 2px; }
.temp-display { font-size: clamp(44px, 12vw, 62px); font-weight: 300; line-height: 1.05; }
.weather-desc-row { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; flex-wrap: wrap; }
.desc-text { opacity: 0.85; }
.forecast-text-box { font-size: 14px; opacity: 0.8; font-weight: 500; margin-top: 4px; color: var(--md-sys-color-primary); min-height: 20px; transition: all 0.3s ease; }

.aqi-pill { padding: 5px 12px; border-radius: 14px; font-size: 13px; font-weight: 700; background: color-mix(in srgb, var(--md-sys-color-primary) 15%, transparent); color: var(--md-sys-color-primary); letter-spacing: 0.5px; transition: all 0.8s ease; }

/* 顶级通透液态玻璃面板：高光边缘与深层投影 */
.widget-card-glass {
    background: var(--md-sys-color-surface-container);
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    border-radius: 26px; 
    padding: 18px; 
    flex-shrink: 0;
    display: flex; flex-direction: column; justify-content: space-between; box-sizing: border-box; 
    will-change: transform;
    transform: translate3d(0, 0, 0); 
    backface-visibility: hidden;
    transition: transform 0.4s var(--curve-smooth), 
                background-color 0.8s var(--md-sys-curve-emphasized), 
                border-color 0.8s ease;
    border: 1px solid color-mix(in srgb, var(--md-sys-color-on-surface-variant) 15%, rgba(255,255,255,0.3));
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}
@media (prefers-color-scheme: dark) {
    .widget-card-glass {
        border: 1px solid color-mix(in srgb, var(--md-sys-color-on-surface-variant) 20%, rgba(255,255,255,0.1));
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    }
}
@container desk (min-width: 380px) {
    .widget-card-glass { padding: 20px; border-radius: 28px; }
}

.widget-card-glass[onclick], .ha-mini-pill-btn, .mode-tab-btn, .sim-mini-btn, .sim-select { transition: all 0.3s var(--curve-spring); }
.widget-card-glass[onclick]:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(0,0,0,0.08); }
.widget-card-glass[onclick]:active { transform: translateY(2px) scale(0.98); transition: all 0.15s ease-out; }

.ha-mini-pill-btn:hover { transform: translateY(-3px); }
.ha-mini-pill-btn:active, .mode-tab-btn:active, .sim-mini-btn:active { transform: scale(0.94); transition: transform 0.15s ease-out, background-color 0.15s ease-out; }

.large-action-card { background: color-mix(in srgb, var(--md-sys-color-primary-container) 50%, transparent) !important; color: var(--md-sys-color-on-primary-container) !important; border: 1px solid color-mix(in srgb, var(--md-sys-color-primary) 25%, transparent) !important; }
@media (prefers-color-scheme: dark) { .large-action-card { background: color-mix(in srgb, var(--md-sys-color-primary-container) 30%, transparent) !important; } }
.large-action-card .giant-icon { color: var(--md-sys-color-primary); font-size: 46px !important; }

.right-pane-header { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-bottom: 4px; flex-shrink: 0; gap: 10px; }
.pane-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; opacity: 0.6; margin: 0; white-space: nowrap; }

.mode-toggle-capsule { display: flex; background: color-mix(in srgb, var(--md-sys-color-on-background) 8%, transparent); padding: 4px; border-radius: 99px; flex-shrink: 0; }
.mode-tab-btn { padding: 7px 12px; font-size: 13px; font-weight: 500; border: none; background: transparent; color: var(--md-sys-color-on-background); cursor: pointer; border-radius: 99px; display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.mode-tab-btn .material-symbols-rounded { font-size: 15px !important; }
.mode-tab-btn.active { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); font-weight: 700; box-shadow: 0 4px 12px rgba(0,0,0,0.15); }

.widget-header { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.widget-header h3 { margin: 0; font-size: 15px; font-weight: 700; opacity: 0.85; display: flex; align-items: center; gap: 8px; }

/* 常用联系人专属卡片（位置居首，彻底修正超出边界异常） */
.contact-widget-glass { 
    width: 100%; 
    box-sizing: border-box; 
    overflow: hidden; 
}
.contact-single-row { 
    width: 100%; 
    box-sizing: border-box; 
    margin-top: 12px;
}
.contact-card-single {
    width: 100%; 
    max-width: 100%;
    box-sizing: border-box; 
    display: flex; 
    flex-direction: row; 
    align-items: center; 
    justify-content: space-between; 
    gap: 14px;
    padding: 14px 16px; 
    border-radius: 18px;
    background: color-mix(in srgb, var(--md-sys-color-on-background) 4%, transparent);
    border: 1px solid color-mix(in srgb, var(--md-sys-color-on-background) 8%, transparent);
    cursor: pointer; 
    transition: all 0.35s var(--curve-spring);
    overflow: hidden;
}
.contact-card-single:hover {
    transform: translateY(-2px);
    background: color-mix(in srgb, var(--md-sys-color-on-background) 7%, transparent);
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    border-color: color-mix(in srgb, var(--md-sys-color-primary) 35%, transparent);
}
.contact-avatar-wrapper { position: relative; width: 54px; height: 54px; flex-shrink: 0; }
.contact-card-single .contact-avatar {
    width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12); background: var(--md-sys-color-surface-variant);
    border: 2px solid color-mix(in srgb, var(--md-sys-color-primary) 40%, transparent);
    transition: transform 0.35s var(--curve-spring);
}
.contact-card-single:hover .contact-avatar { transform: scale(1.05); }
.contact-cam-badge {
    position: absolute; bottom: -2px; right: -2px;
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.contact-cam-badge .material-symbols-rounded { font-size: 12px !important; }

.contact-meta-group { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
.contact-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; overflow: hidden; }
.contact-name-row .contact-name { font-size: 15px; font-weight: 700; white-space: nowrap; }
.contact-channel-tag {
    font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 6px;
    background: color-mix(in srgb, var(--md-sys-color-primary) 12%, transparent);
    color: var(--md-sys-color-primary); letter-spacing: 0.3px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px;
}
.contact-subtext { 
    font-size: 12px; opacity: 0.65; 
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; 
}

.contact-action-call { flex-shrink: 0; }
.call-launch-btn {
    width: 42px; height: 42px; border-radius: 50%; border: none;
    background: color-mix(in srgb, #34c759 16%, var(--md-sys-color-surface-variant));
    color: #34c759; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.35s var(--curve-spring);
    box-shadow: 0 4px 12px rgba(52, 199, 89, 0.15);
}
.call-launch-btn .material-symbols-rounded { font-size: 20px !important; }
.contact-card-single:hover .call-launch-btn {
    background: #34c759; color: #fff;
    transform: scale(1.08); box-shadow: 0 6px 18px rgba(52, 199, 89, 0.4);
}

.rtm-badge-pill {
    font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 10px; border-radius: 12px;
    background: color-mix(in srgb, var(--md-sys-color-on-background) 6%, transparent);
    color: var(--md-sys-color-on-background); opacity: 0.85;
}
.status-dot {
    width: 7px; height: 7px; border-radius: 50%; background: #e0a800;
    box-shadow: 0 0 6px rgba(224, 168, 0, 0.6);
}
.status-dot.online {
    background: #34c759; box-shadow: 0 0 8px rgba(52, 199, 89, 0.8);
}

/* ========================================================================= */
/* 天气语音播报重构卡片样式（与联系人栏位置交换，置于其下方）                    */
/* ========================================================================= */
.weather-broadcast-glass {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    cursor: pointer;
    overflow: hidden;
}
.weather-broadcast-glass:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}
.wb-icon-wrapper {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: color-mix(in srgb, var(--md-sys-color-primary) 14%, transparent);
    color: var(--md-sys-color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.35s var(--curve-spring);
}
.weather-broadcast-glass:hover .wb-icon-wrapper {
    transform: scale(1.06);
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
}
.wb-icon-wrapper .material-symbols-rounded {
    font-size: 26px !important;
}
.wb-meta-group {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
}
.wb-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.wb-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--md-sys-color-on-background);
    white-space: nowrap;
}
.wb-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--md-sys-color-primary) 12%, transparent);
    color: var(--md-sys-color-primary);
    letter-spacing: 0.3px;
}
.wb-subtext {
    font-size: 12px;
    opacity: 0.65;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wb-action {
    flex-shrink: 0;
}
.wb-launch-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: color-mix(in srgb, var(--md-sys-color-primary) 15%, var(--md-sys-color-surface-variant));
    color: var(--md-sys-color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.35s var(--curve-spring);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--md-sys-color-primary) 20%, transparent);
}
.wb-launch-btn .material-symbols-rounded {
    font-size: 20px !important;
}
.weather-broadcast-glass:hover .wb-launch-btn {
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    transform: scale(1.08);
}

/* ========================================================================= */
/* 白噪音重构区域样式：彻底去掉复杂容器嵌套与混乱视觉                          */
/* ========================================================================= */
.wn-card-container {
    gap: 16px;
}

.wn-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.wn-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    cursor: pointer;
    border: 2px solid transparent;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s var(--curve-spring);
}

.wn-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

.wn-card.active {
    border-color: var(--md-sys-color-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--md-sys-color-primary) 30%, transparent),
                0 8px 20px rgba(0, 0, 0, 0.2);
}

.wn-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.wn-card:hover .wn-cover,
.wn-card.active .wn-cover {
    transform: scale(1.1);
}

.wn-card-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.7) 100%);
    pointer-events: none;
}

.wn-title {
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    text-align: center;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    pointer-events: none;
}

.wn-control-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: color-mix(in srgb, var(--md-sys-color-on-background) 5%, transparent);
    padding: 8px 12px;
    border-radius: 18px;
    border: 1px solid color-mix(in srgb, var(--md-sys-color-on-background) 8%, transparent);
}

.wn-play-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--md-sys-color-primary) 35%, transparent);
    transition: transform 0.2s var(--curve-spring), background-color 0.3s ease;
    flex-shrink: 0;
}

.wn-play-btn:active {
    transform: scale(0.92);
}

.wn-play-btn .material-symbols-rounded {
    font-size: 24px;
}

.wn-slider-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
}

.wn-control-bar input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: color-mix(in srgb, var(--md-sys-color-on-background) 15%, transparent);
    outline: none;
    cursor: pointer;
}

.wn-control-bar input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--md-sys-color-primary);
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.wn-control-bar input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.wn-timer-tag {
    font-size: 18px;
    font-weight: 800;
    color: var(--md-sys-color-primary);
    min-width: 60px;
    text-align: right;
    flex-shrink: 0;
}

.wn-timer-tag .unit {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.7;
    margin-left: 2px;
    color: var(--md-sys-color-on-background);
}

/* HA 扩展 */
.ha-ext-block { flex-shrink: 0; }
.ha-ext-label { font-size: 12px; font-weight: 700; opacity: 0.5; margin-bottom: 10px; letter-spacing: 1px; }
.ha-ext-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; width: 100%; }
.ha-mini-pill-btn { 
    padding: 14px 6px; border-radius: 18px; 
    border: 1px dashed color-mix(in srgb, var(--md-sys-color-on-background) 25%, transparent); 
    background: color-mix(in srgb, var(--md-sys-color-on-background) 4%, transparent); 
    color: var(--md-sys-color-on-background); font-size: 12px; font-weight: 700; 
    cursor: pointer; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; 
}
.ha-mini-pill-btn:hover { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); border-style: solid; border-color: transparent; }
.ha-mini-pill-btn .material-symbols-rounded { font-size: 20px; opacity: 0.9; }

.lightning-flash-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.65) 0%, transparent 85%); opacity: 0; pointer-events: none; z-index: 3; mix-blend-mode: screen; }
.flash-active .lightning-flash-overlay { animation: soft-flash 0.42s var(--md-sys-curve-fluid); }

.w-element { position: absolute; opacity: 0; pointer-events: none; will-change: transform, opacity; transition: opacity 1.5s var(--md-sys-curve-fluid), filter 1.5s ease; }
.ele-sun { width: 85px; height: 85px; background: var(--weather-sun); border-radius: 50%; top: 12%; left: 22%; box-shadow: 0 0 45px rgba(255, 179, 0, 0.5); }
.ele-sun::before { content: ''; position: absolute; top: -45px; left: -45px; right: -45px; bottom: -45px; background: radial-gradient(circle, rgba(255, 235, 59, 0.3) 0%, rgba(255, 179, 0, 0.1) 50%, transparent 75%); border-radius: 50%; z-index: -1; animation: sun-halo-rotate 22s infinite linear; }
.is-daytime.m-sunny .ele-sun { opacity: 0.95; pointer-events: auto; animation: sun-pulse 6s infinite alternate var(--md-sys-curve-fluid); filter: none; }
.is-daytime.m-cloudy .ele-sun { opacity: 0.35; pointer-events: auto; filter: blur(4px); transform: scale(0.95); }

.ele-moon { width: 60px; height: 60px; border-radius: 50%; top: 14%; left: 23%; box-shadow: -15px 15px 0 0 var(--weather-moon); filter: drop-shadow(0 0 14px var(--weather-moon)); transform: rotate(-15deg); transition: all 1.5s ease;}
.is-nighttime.m-sunny .ele-moon { opacity: 1; pointer-events: auto; animation: moon-float 8s infinite var(--md-sys-curve-fluid); filter: drop-shadow(0 0 14px var(--weather-moon)); }
.is-nighttime.m-cloudy .ele-moon { opacity: 0.38; pointer-events: auto; animation: moon-float 12s infinite linear; filter: blur(5px) rotate(-10deg); }

.ele-moon.m-full-moon { box-shadow: 0 0 35px rgba(255, 235, 150, 0.6), inset 0 0 20px rgba(255, 235, 150, 0.5); background: radial-gradient(circle at 35% 35%, #fffde7 0%, #fff59d 100%); filter: drop-shadow(0 0 20px #fff59d); transform: none !important; }
.is-nighttime.m-sunny .ele-moon.m-full-moon { animation: moon-float-full 8s infinite var(--md-sys-curve-fluid) !important; }

.ele-star { width: 3px; height: 3px; background: var(--weather-star); border-radius: 50%; }
.star-1 { left: 4%; top: 12%; }   .star-2 { left: 14%; top: 28%; }
.star-3 { left: 22%; top: 8%; }   .star-4 { left: 31%; top: 22%; }
.star-5 { left: 39%; top: 15%; }  .star-6 { left: 48%; top: 33%; }
.star-7 { left: 55%; top: 9%; }   .star-8 { left: 62%; top: 25%; }
.star-9 { left: 69%; top: 14%; }  .star-10 { left: 74%; top: 38%; }
.star-11 { left: 81%; top: 7%; }  .star-12 { left: 86%; top: 21%; }
.star-13 { left: 91%; top: 32%; } .star-14 { left: 96%; top: 11%; }
.star-15 { left: 10%; top: 68%; } .star-16 { left: 50%; top: 75%; }
.is-nighttime.m-sunny .ele-star { opacity: 0.85; animation: star-twinkle 2.5s infinite var(--md-sys-curve-fluid); }
.is-nighttime.m-sunny .star-1, .is-nighttime.m-sunny .star-5, .is-nighttime.m-sunny .star-9, .is-nighttime.m-sunny .star-13 { animation-delay: 0.3s; animation-duration: 2s; }
.is-nighttime.m-sunny .star-2, .is-nighttime.m-sunny .star-6, .is-nighttime.m-sunny .star-10, .is-nighttime.m-sunny .star-14 { animation-delay: 0.7s; animation-duration: 3s; }
.is-nighttime.m-sunny .star-3, .is-nighttime.m-sunny .star-7, .is-nighttime.m-sunny .star-11, .is-nighttime.m-sunny .star-15 { animation-delay: 1.2s; animation-duration: 2.4s; }
.is-nighttime.m-sunny .star-4, .is-nighttime.m-sunny .star-8, .is-nighttime.m-sunny .star-12, .is-nighttime.m-sunny .star-16 { animation-delay: 1.8s; animation-duration: 3.5s; }
.is-nighttime.m-cloudy .ele-star { opacity: 0.15; animation: star-twinkle 4s infinite linear; }

.milky-way { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity 2s ease; z-index: 1; }
.is-qixi .milky-way { opacity: 1; }
.mw-star { position: absolute; background: white; border-radius: 50%; animation: mw-twinkle var(--duration) infinite alternate ease-in-out; opacity: 0.8; }

.ele-cloud-box { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; opacity: 0; will-change: opacity; transition: opacity 1.8s var(--md-sys-curve-fluid); }
.m-cloudy .ele-cloud-box, .m-thunder .ele-cloud-box, .m-storm .ele-cloud-box, .m-storm_thunder .ele-cloud-box, .m-rain .ele-cloud-box, .m-snow .ele-cloud-box { opacity: 1; }

.cloud-puff { 
    position: absolute;
    border-radius: 50%;
    filter: blur(25px); 
    will-change: transform; 
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

.cp-1 { 
    width: 500px; height: 500px; left: -10%; top: -20%; 
    background: radial-gradient(circle at 40% 40%, var(--weather-cloud-start) 0%, var(--weather-cloud-end) 70%); 
    animation: cloud-drift-1 22s infinite alternate ease-in-out; opacity: 0.95; 
}
.cp-2 { 
    width: 350px; height: 350px; left: 8%; top: -15%; 
    background: radial-gradient(circle at 30% 30%, var(--weather-cloud-start) 0%, transparent 70%); 
    animation: cloud-drift-1 22s infinite alternate ease-in-out; opacity: 1; 
}
.cp-3 { 
    width: 600px; height: 250px; left: -5%; top: 20%; 
    background: radial-gradient(circle at 50% 70%, var(--weather-cloud-end) 0%, transparent 75%); 
    animation: cloud-drift-1 22s infinite alternate ease-in-out; opacity: 0.9; 
}

.cp-4 { 
    width: 700px; height: 350px; left: 25%; top: -10%; 
    background: radial-gradient(circle at 50% 50%, var(--weather-cloud-start) 0%, var(--weather-cloud-end) 80%); 
    animation: cloud-drift-3 30s infinite alternate ease-in-out; opacity: 0.65; z-index: -1; 
}

.cp-5 { 
    width: 550px; height: 550px; left: 65%; top: -25%; 
    background: radial-gradient(circle at 60% 40%, var(--weather-cloud-start) 0%, var(--weather-cloud-end) 70%); 
    animation: cloud-drift-2 26s infinite alternate ease-in-out; opacity: 0.95; 
}
.cp-6 { 
    width: 400px; height: 400px; left: 55%; top: -10%; 
    background: radial-gradient(circle at 70% 30%, var(--weather-cloud-start) 0%, transparent 70%); 
    animation: cloud-drift-2 26s infinite alternate ease-in-out; opacity: 1; 
}
.cp-7 { 
    width: 650px; height: 250px; left: 58%; top: 22%; 
    background: radial-gradient(circle at 50% 70%, var(--weather-cloud-end) 0%, transparent 75%); 
    animation: cloud-drift-2 26s infinite alternate ease-in-out; opacity: 0.9; 
}

@keyframes cloud-drift-1 { 0% { transform: translate3d(0, 0, 0) scale(1); } 100% { transform: translate3d(60px, -15px, 0) scale(1.08); } }
@keyframes cloud-drift-2 { 0% { transform: translate3d(0, 0, 0) scale(1); } 100% { transform: translate3d(-60px, 15px, 0) scale(0.95); } }
@keyframes cloud-drift-3 { 0% { transform: translate3d(0, 0, 0) scale(1); } 100% { transform: translate3d(40px, 5px, 0) scale(1.02); } }

.ele-typhoon-eye { width: 80px; height: 80px; border: 6px dashed rgba(180,185,200,0.5); border-radius: 50%; top: 20%; left: 46%; animation: typhoon-spin 4s infinite linear; }
.m-typhoon .ele-typhoon-eye { opacity: 0.7; pointer-events: auto; }

.ele-haze-stream-box { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; opacity: 0; transition: opacity 2.0s ease-in-out; }
.aqi-moderate .ele-haze-stream-box, .aqi-heavy .ele-haze-stream-box { opacity: 1; }

.haze-cloud-wave { 
    position: absolute; 
    background: var(--weather-dust-stream); 
    border-radius: 50%; 
    filter: blur(30px); 
    opacity: 0; 
    will-change: transform, opacity; 
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}
.aqi-moderate .hcw-1 { width: 400px; height: 120px; left: -100px; top: 30%; animation: haze-swell-left 18s infinite alternate ease-in-out; --haze-op: 0.45; }
.aqi-heavy .hcw-1 { width: 500px; height: 150px; left: -100px; top: 25%; animation: haze-swell-left 13s infinite alternate ease-in-out; --haze-op: 0.75; }

.ele-dust-box { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 5; pointer-events: none; }
.dust-particle { position: absolute; background: var(--weather-dust-particle); border-radius: 50%; opacity: 0; display: none; }
.aqi-heavy .dust-particle { display: block; --dust-op: 0.75; --dust-sc: 1.3; }
.dp-1 { width: 4px; height: 4px; left: -20px; top: 55%; animation: dust-tur-1 6.2s infinite linear; }
.dp-2 { width: 3px; height: 3px; left: -20px; top: 25%; animation: dust-tur-2 7.0s infinite linear 0.4s; }
.dp-3 { width: 5px; height: 5px; left: -20px; top: 15%; animation: dust-tur-1 6.8s infinite linear 1.5s; }
.dp-4 { width: 3px; height: 3px; left: -20px; top: 42%; animation: dust-tur-2 7.5s infinite linear 2.2s; }
.dp-5 { width: 4px; height: 4px; left: -20px; top: 70%; animation: dust-tur-1 5.8s infinite linear 3.1s; }
.dp-6 { width: 2.5px; height: 2.5px; left: -20px; top: 85%; animation: dust-tur-2 8.0s infinite linear 0.9s; }
.dp-7 { width: 3.5px; height: 3.5px; left: -20px; top: 33%; animation: dust-tur-1 6.5s infinite linear 4.5s; }
.dp-8 { width: 4.5px; height: 4.5px; left: -20px; top: 62%; animation: dust-tur-2 7.2s infinite linear 5.2s; }

.sim-select { width: 100%; padding: 8px 12px; font-size: 14px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--md-sys-color-on-background) 15%, transparent); background: color-mix(in srgb, var(--md-sys-color-on-background) 5%, transparent); color: var(--md-sys-color-on-background); outline: none; margin-top: 4px; cursor: pointer; }
.sim-select:focus { border-color: var(--md-sys-color-primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--md-sys-color-primary) 30%, transparent); }
.sim-group { display: flex; gap: 8px; margin-top: 4px; }
.sim-mini-btn { flex: 1; padding: 8px; font-size: 13px; border: none; border-radius: 10px; background: color-mix(in srgb, var(--md-sys-color-on-background) 6%, transparent); color: var(--md-sys-color-on-background); cursor: pointer; text-align: center; }
.sim-mini-btn.active { background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); font-weight: 700; }

.debug-stack { display: flex; flex-direction: column; gap: 14px; }
.debug-stack .sim-label { font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.debug-stack .sim-label.spaced { margin-top: 14px; }

.log-box { 
    height: 180px; min-height: 180px; background: color-mix(in srgb, var(--md-sys-color-on-surface-variant) 8%, transparent); border-radius: 14px; padding: 12px; font-family: monospace; font-size: 12px; overflow-y: auto; white-space: pre-wrap; box-sizing: border-box; color: var(--md-sys-color-on-surface-variant); margin-top: 6px;
    border: 1px solid color-mix(in srgb, var(--md-sys-color-on-surface-variant) 10%, transparent);
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.03);
}

/* ========================================================================= */
/* 环境仿真舱调试弹窗（长按实时气温呼出）                                       */
/* ========================================================================= */
.temp-display {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
}
.temp-display.temp-pressing {
    transform: scale(0.92);
    opacity: 0.7;
}

.debug-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding: 0;
    animation: debugFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.debug-modal-overlay.hidden {
    display: none !important;
}

@keyframes debugFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.debug-modal-sheet {
    width: 100%;
    max-width: 580px;
    max-height: 85vh;
    background: var(--md-sys-color-background);
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.35);
    border: 1px solid color-mix(in srgb, var(--md-sys-color-on-background) 12%, transparent);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: debugSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@media (min-width: 640px) {
    .debug-modal-overlay {
        align-items: center;
        padding: 24px;
    }
    .debug-modal-sheet {
        border-radius: 28px;
        max-height: 88vh;
    }
}

@keyframes debugSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.debug-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid color-mix(in srgb, var(--md-sys-color-on-background) 10%, transparent);
    background: color-mix(in srgb, var(--md-sys-color-surface-container) 80%, transparent);
}
.debug-modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: var(--md-sys-color-on-background);
}
.debug-modal-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: color-mix(in srgb, var(--md-sys-color-on-background) 8%, transparent);
    color: var(--md-sys-color-on-background);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.debug-modal-close-btn:hover {
    background: color-mix(in srgb, var(--md-sys-color-on-background) 16%, transparent);
    transform: scale(1.06);
}
.debug-modal-body {
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    -webkit-overflow-scrolling: touch;
}

@keyframes sun-pulse { 0%, 100% { transform: scale(1); opacity: 0.95; } 50% { transform: scale(1.04); opacity: 1; } }
@keyframes sun-halo-rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes moon-float { 0%, 100% { transform: rotate(-15deg) translateY(0); } 50% { transform: rotate(-11deg) translateY(-3px); } }
@keyframes moon-float-full { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes star-twinkle { 0%, 100% { opacity: 0.15; transform: scale(0.8); } 50% { opacity: 0.95; transform: scale(1.25); } }

@keyframes mw-twinkle { 
    0% { transform: scale(0.5); opacity: 0.3; } 
    100% { transform: scale(1.5); opacity: 1; } 
}

@keyframes typhoon-spin { to { transform: rotate(360deg); } }
@keyframes haze-swell-left { 0% { transform: translateX(0) scale(1) rotate(0deg); opacity: 0; } 20%, 80% { opacity: var(--haze-op, 0.5); } 100% { transform: translateX(var(--haze-travel, 700px)) scale(1.4) rotate(10deg); opacity: 0; } }
@keyframes dust-tur-1 { 0% { transform: translate(0, 0) scale(calc(0.6 * var(--dust-sc, 1))); opacity: 0; } 15%, 85% { opacity: var(--dust-op, 0.5); } 100% { transform: translate(var(--dust-travel, 1300px), -5px) scale(calc(0.7 * var(--dust-sc, 1))); opacity: 0; } }
@keyframes dust-tur-2 { 0% { transform: translate(0, 0) scale(calc(0.8 * var(--dust-sc, 1))); opacity: 0; } 20%, 75% { opacity: var(--dust-op, 0.5); } 100% { transform: translate(var(--dust-travel, 1300px), -30px) scale(calc(1.2 * var(--dust-sc, 1))); opacity: 0; } }
@keyframes soft-flash { 0%, 26%, 100% { opacity: 0; } 8%, 20% { opacity: 0.42; } }

/* ========================================================================= */
/* 竖屏比例适配：以屏体宽度为准（容器查询），宽屏手机框内同样生效            */
/* ========================================================================= */
@container desk (max-width: 600px) {

    /* 日月与台风眼：上移居中，避开竖屏顶部的时钟主视觉 */
    .ele-sun { width: 66px; height: 66px; top: 7%; left: 32%; box-shadow: 0 0 34px rgba(255, 179, 0, 0.5); }
    .ele-sun::before { top: -34px; left: -34px; right: -34px; bottom: -34px; }
    .ele-moon { top: 8%; left: 34%; }
    .ele-typhoon-eye { width: 64px; height: 64px; left: 38%; top: 15%; }

    /* 云团：等比收缩，避免在窄屏上糊成一片 */
    .cp-1 { width: 330px; height: 330px; left: -14%; top: -12%; }
    .cp-2 { width: 240px; height: 240px; left: 8%; top: -8%; }
    .cp-3 { width: 400px; height: 170px; left: -10%; top: 14%; }
    .cp-4 { width: 460px; height: 220px; left: 20%; top: -6%; }
    .cp-5 { width: 350px; height: 350px; left: 56%; top: -14%; }
    .cp-6 { width: 260px; height: 260px; left: 46%; top: -4%; }
    .cp-7 { width: 420px; height: 170px; left: 50%; top: 16%; }

    /* 尘埃与雾霾横移距离：按竖屏宽度收短，保证粒子在可视区停留 */
    .weather-space { --dust-travel: 620px; --haze-travel: 520px; }
    .aqi-moderate .hcw-1 { width: 300px; height: 100px; left: -80px; top: 26%; }
    .aqi-heavy .hcw-1 { width: 380px; height: 130px; left: -80px; top: 22%; }
}

/* ========================================================================= */
/* 全屏沉浸式视频通话二级界面样式 (Minimalist & Immersive Video Call UI)      */
/* ========================================================================= */

.video-call-modal {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    background: #090b0e;
    color: #f7f9fd;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.4s;
}

.video-call-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: scale(1);
}

body.in-call-lock {
    overflow: hidden !important;
}

/* 动态氛围遮罩与液态光晕 */
.call-ambient-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: 
        radial-gradient(circle at 50% 20%, rgba(56, 128, 255, 0.12) 0%, transparent 60%),
        radial-gradient(circle at 80% 80%, rgba(46, 204, 113, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 20% 70%, rgba(155, 89, 182, 0.08) 0%, transparent 55%);
    z-index: 1;
}

/* 顶部状态与导航栏 */
.call-top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, rgba(9, 11, 14, 0.9) 0%, rgba(9, 11, 14, 0) 100%);
    pointer-events: auto;
}

.call-top-left, .call-top-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.call-peer-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.call-peer-title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.call-peer-subtitle {
    font-size: 12px;
    opacity: 0.6;
    letter-spacing: 0.2px;
}

.call-icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s var(--curve-spring);
}
.call-icon-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.06);
}
.call-icon-btn .material-symbols-rounded {
    font-size: 22px !important;
}

.call-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    letter-spacing: 0.4px;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34c759;
    box-shadow: 0 0 10px #34c759;
}
.live-dot.calling {
    background: #ff9f0a;
    box-shadow: 0 0 10px #ff9f0a;
    animation: live-blink 1.2s ease-in-out infinite;
}
.live-dot.incoming {
    background: #0a84ff;
    box-shadow: 0 0 10px #0a84ff;
    animation: live-blink 0.8s ease-in-out infinite;
}
@keyframes live-blink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.85); }
}

.call-pill-small {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.8;
}
.call-pill-small.online {
    border-color: rgba(52, 199, 89, 0.3);
}

/* 远端主视频与舞台区 */
.call-stage-area {
    position: relative;
    flex: 1;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 2;
}

.remote-video-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}
.remote-video-container div,
.remote-video-container video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* 呼叫中 / 等待中遮罩 */
.call-waiting-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 16px;
    background: rgba(9, 11, 14, 0.82);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    transition: opacity 0.5s ease;
}

.calling-pulse-rings {
    position: relative;
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

.calling-avatar {
    width: 104px;
    height: 104px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
    border: 3px solid rgba(255, 255, 255, 0.2);
    z-index: 4;
}

.pulse-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(52, 199, 89, 0.5);
    opacity: 0;
    animation: ring-pulse-grow 3s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}
.pulse-ring.ring-2 { animation-delay: 1s; border-color: rgba(10, 132, 255, 0.4); }
.pulse-ring.ring-3 { animation-delay: 2s; border-color: rgba(175, 82, 222, 0.3); }

@keyframes ring-pulse-grow {
    0% { transform: scale(0.7); opacity: 0.8; }
    50% { opacity: 0.35; }
    100% { transform: scale(1.8); opacity: 0; }
}

.calling-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.calling-prompt {
    margin: 0;
    font-size: 14px;
    opacity: 0.7;
    letter-spacing: 0.3px;
}

.calling-channel-capsule {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    opacity: 0.85;
}

/* 本地画中画浮窗 PiP */
.local-pip-window {
    position: absolute;
    right: 32px;
    top: 96px;
    width: 200px;
    height: 270px;
    z-index: 20;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(22, 26, 33, 0.85);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.local-video-container {
    width: 100%;
    height: 100%;
}
.local-video-container div,
.local-video-container video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transform: scaleX(-1); /* 镜像画面 */
}

.local-cam-off-cover,
.local-cam-off-hint {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(18, 22, 28, 0.95);
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    z-index: 5;
}
.local-cam-off-cover .material-symbols-rounded,
.local-cam-off-hint .material-symbols-rounded {
    font-size: 32px !important;
}

.local-pip-badges {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 6;
    pointer-events: none;
}
.local-pip-label {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    color: #fff;
}
.local-pip-badge.mic-off {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 59, 48, 0.85);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.local-pip-badge.mic-off .material-symbols-rounded {
    font-size: 13px !important;
}

/* 远端纯音频模式占位 */
.remote-audio-only-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: radial-gradient(circle at center, rgba(30, 36, 46, 0.95) 0%, rgba(9, 11, 14, 0.98) 100%);
}
.remote-placeholder-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
    border: 3px solid rgba(255, 255, 255, 0.15);
}
.remote-placeholder-name {
    font-size: 18px;
    font-weight: 600;
    opacity: 0.85;
}

/* 底部浮动控制栏 Dock */
.call-bottom-dock {
    position: absolute;
    bottom: 36px;
    left: 0;
    right: 0;
    z-index: 30;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.call-dock-capsule {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 12px 28px;
    border-radius: 999px;
    background: rgba(24, 28, 36, 0.85);
    backdrop-filter: blur(36px);
    -webkit-backdrop-filter: blur(36px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55);
}

.dock-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    color: #fff;
    padding: 0;
    outline: none;
    transition: transform 0.2s ease;
}

.dock-action-btn .btn-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--curve-spring);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.dock-action-btn:hover .btn-circle {
    background: rgba(255, 255, 255, 0.22);
    transform: scale(1.08);
}
.dock-action-btn:active .btn-circle {
    transform: scale(0.94);
}
.dock-action-btn .material-symbols-rounded {
    font-size: 24px !important;
}
.dock-action-btn .btn-label {
    font-size: 11px;
    font-weight: 500;
    opacity: 0.75;
    letter-spacing: 0.2px;
}

/* 挂断键专项凸显 */
.dock-action-btn.hangup-btn .circle-danger {
    width: 62px;
    height: 62px;
    background: #ff3b30 !important;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 28px rgba(255, 59, 48, 0.45);
}
.dock-action-btn.hangup-btn:hover .circle-danger {
    background: #ff453a !important;
    box-shadow: 0 14px 34px rgba(255, 59, 48, 0.65);
    transform: scale(1.08);
}

/* 开关关闭状态样式 */
.dock-action-btn.muted .btn-circle,
.dock-action-btn.off .btn-circle {
    background: rgba(255, 59, 48, 0.25);
    color: #ff453a;
    border-color: rgba(255, 59, 48, 0.4);
}

/* 设备切换抽屉 Popover */
.call-device-sheet {
    position: absolute;
    bottom: 120px;
    right: 32px;
    width: 320px;
    z-index: 35;
    background: rgba(22, 26, 34, 0.95);
    backdrop-filter: blur(36px);
    -webkit-backdrop-filter: blur(36px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(0.96);
    transition: all 0.35s var(--curve-spring);
}
.call-device-sheet.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.sheet-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sheet-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}
.sheet-close-btn:hover { opacity: 1; }

.sheet-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}
.sheet-field label {
    font-size: 12px;
    font-weight: 600;
    opacity: 0.8;
}
.sheet-field .sim-select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 13px;
    outline: none;
}
.sheet-field .sim-select option {
    background: #1a1e26;
    color: #fff;
}
.sheet-tips {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    opacity: 0.55;
    margin-top: 8px;
}

/* 呼叫即时提示气泡 Toast */
.call-toast-pill {
    position: absolute;
    top: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    z-index: 40;
    padding: 10px 24px;
    border-radius: 999px;
    background: rgba(24, 28, 36, 0.92);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.3px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.call-toast-pill.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 移动端与小屏适配 */
@media (max-width: 640px) {
    .call-top-bar { padding: 16px 18px; }
    .call-live-badge { padding: 6px 12px; font-size: 12px; }
    .local-pip-window {
        width: 120px;
        height: 165px;
        right: 16px;
        top: 76px;
        border-radius: 14px;
    }
    .call-dock-capsule {
        gap: 16px;
        padding: 10px 20px;
    }
    .dock-action-btn .btn-circle {
        width: 46px;
        height: 46px;
    }
    .dock-action-btn.hangup-btn .circle-danger {
        width: 54px !important;
        height: 54px !important;
    }
    .call-device-sheet {
        left: 16px;
        right: 16px;
        bottom: 110px;
        width: auto;
    }
}

/* 呼叫界面重发信令胶囊按钮 */
.call-resend-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    padding: 8px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.25s ease;
}
.call-resend-pill-btn:hover {
    background: rgba(255, 255, 255, 0.24);
    transform: translateY(-1px);
}
.call-resend-pill-btn:active {
    transform: scale(0.97);
}

/* 声网信令诊断卡片样式 */
.rtm-diag-card {
    margin-bottom: 16px;
}
.rtm-diag-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.rtm-diag-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.rtm-diag-row label {
    font-size: 12px;
    opacity: 0.75;
    font-weight: 500;
}
.rtm-diag-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}
.rtm-diag-actions .sim-mini-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.rtm-diag-tips {
    font-size: 11px;
    line-height: 1.5;
    opacity: 0.65;
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
