/* 友讲短视频 H5 移动端 — 现代极简风格 | 双主题 */
[data-theme="dark"] {
    /* 品牌红对齐 Logo #FC3C2A；避开抖音粉心/青绿皮 */
    --brand: #FC3C2A;
    --primary: #FC3C2A;
    --primary-dark: #E03524;
    --primary-soft: #3D1A16;
    --soft-border: rgba(252, 60, 42, 0.28);
    --soft-border-strong: rgba(252, 60, 42, 0.55);
    --radius-card: 16px;
    --like: #FC3C2A;
    --accent-cyan: #5BA4E8;
    --points: #E8A838;
    --danger: #E85D5D;
    --bottom-nav-h: 56px;
    --bg: #161E28;
    --bg-card: #1E2836;
    --bg-card2: #263142;
    --bg-input: #1E2836;
    --text: #F0F4F8;
    --text-secondary: #8B98A8;
    --text-muted: #6B7A8A;
    --border: #2A3544;
    --border-medium: #3A4658;
    --success: #30D158;
    --warning: #E8A838;
    --radius: 12px;
    --radius-sm: 8px;
    --safe-bottom: env(safe-area-inset-bottom, 16px);
    --shadow-color: rgba(0, 0, 0, 0.3);
    /* 统一间距体系 */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    /* 文字层级 */
    --text-title: 18px;
    --text-body: 15px;
    --text-body-sm: 14px;
    --text-caption: 12px;
    --text-mini: 11px;
}

[data-theme="light"] {
    --primary: #2EC4B6;
    --primary-dark: #26A99D;
    --primary-soft: #E6F8F5;
    --soft-border: rgba(46, 196, 182, 0.22);
    --soft-border-strong: rgba(46, 196, 182, 0.55);
    --radius-card: 16px;
    --like: #FF6B8A;
    --accent-cyan: #5BA4E8;
    --points: #E8A838;
    --danger: #E85D5D;
    --bottom-nav-h: 56px;
    --bg: #F4F7FA;
    --bg-card: #FFFFFF;
    --bg-card2: #EAEFF4;
    --bg-input: #FFFFFF;
    --text: #1A2332;
    --text-secondary: #5C6B7A;
    --text-muted: #8B98A8;
    --border: #E3E9F0;
    --border-medium: #D0D8E0;
    --success: #2EC4B6;
    --warning: #E8A838;
    --radius: 16px;
    --radius-sm: 12px;
    --safe-bottom: env(safe-area-inset-bottom, 16px);
    --shadow-color: rgba(26, 35, 50, 0.06);
    /* 统一间距体系 */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    /* 文字层级 */
    --text-title: 18px;
    --text-body: 15px;
    --text-body-sm: 14px;
    --text-caption: 12px;
    --text-mini: 11px;
}

/* 默认浅色清凉；JS 可切深色。:root 预置 light token，避免首屏闪黑 */
:root {
    --primary: #2EC4B6;
    --primary-dark: #26A99D;
    --primary-soft: #E6F8F5;
    --soft-border: rgba(46, 196, 182, 0.22);
    --soft-border-strong: rgba(46, 196, 182, 0.55);
    --radius-card: 16px;
    --like: #FF6B8A;
    --accent-cyan: #5BA4E8;
    --points: #E8A838;
    --danger: #E85D5D;
    --bottom-nav-h: 56px;
    --bg: #F4F7FA;
    --bg-card: #FFFFFF;
    --bg-card2: #EAEFF4;
    --bg-input: #FFFFFF;
    --text: #1A2332;
    --text-secondary: #5C6B7A;
    --text-muted: #8B98A8;
    --border: #E3E9F0;
    --border-medium: #D0D8E0;
    --success: #2EC4B6;
    --warning: #E8A838;
    --radius: 16px;
    --radius-sm: 12px;
    --safe-bottom: env(safe-area-inset-bottom, 16px);
    --shadow-color: rgba(26, 35, 50, 0.06);
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --text-title: 18px;
    --text-body: 15px;
    --text-body-sm: 14px;
    --text-caption: 12px;
    --text-mini: 11px;
    background: var(--bg);
    color: var(--text);
}
[data-theme="dark"],
[data-theme="light"] {
    background: var(--bg);
    color: var(--text);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

.hidden { display: none !important; }

body {
    font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

body.login-sheet-open {
    overflow: hidden;
}

/* ==================== App 容器 ==================== */
.app { height: 100%; display: flex; flex-direction: column; }

#main-page {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.page-content {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* ==================== 5 Tab 底栏 ==================== */
.bottom-nav {
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    flex-shrink: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding-bottom: max(6px, env(safe-area-inset-bottom));
    z-index: 300;
    transition: opacity 0.25s ease;
}
/* 消息页沉浸模式：底栏淡出，不遮挡 */
.bottom-nav.immersive-mode {
    opacity: 0.18;
    pointer-events: none;
}
.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 4px 6px;
    border: none;
    background: transparent;
    color: #9094A8;
    font-size: 10px;
    cursor: pointer;
    position: relative;
    touch-action: manipulation;
    transition: color 0.2s;
}
.bottom-nav-item.active { color: var(--primary); }
.bottom-nav-item.active .bottom-nav-label {
    font-weight: 600;
}
.bottom-nav-item.active .bottom-nav-icon {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}
.bottom-nav-label {
    line-height: 1.2;
    transition: font-weight 0.2s ease;
}
.bottom-nav-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.bottom-nav-icon .vh-icon { display: block; }
.bottom-nav-label { line-height: 1.2; }
/* 浅色模式下非沉浸模式 - 固定颜色确保清晰可见 */
[data-theme="light"] .bottom-nav-item { color: #5C5E72; }
[data-theme="light"] .bottom-nav-item.active { color: var(--primary); }
.bottom-nav-publish {
    flex: 0 0 auto;
    padding: 0 12px;
}
.bottom-nav-publish-icon {
    width: 44px;
    height: 32px;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    font-size: 24px;
    font-weight: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(46, 196, 182, 0.45);
}
.bottom-notif-badge {
    position: absolute;
    top: 4px;
    right: calc(50% - 22px);
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
}
/* Feed 沉浸模式：始终实心深底+白字（勿用顶部透明渐变，否则浅色底上白字不可见） */
.main-page--feed-immersive .bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    border-top: none;
}
.main-page--feed-immersive .bottom-nav-item,
.main-page--feed-immersive .bottom-nav-item .bottom-nav-label {
    color: rgba(255, 255, 255, 0.85);
}
.main-page--feed-immersive .bottom-nav-item.active,
.main-page--feed-immersive .bottom-nav-item.active .bottom-nav-label {
    color: #fff;
}

/* ==================== 页面通用头（布局见 ui.css .vh-page-header） ==================== */
.page-header--with-back {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    align-items: center;
    gap: 4px;
}
.page-back-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}
.page-back-btn:active { background: var(--bg-card2); }
.msg-list-page { flex: 1; overflow-y: auto; min-height: 0; }

/* 消息页全屏列表 */
#messages-page .notif-list {
    max-height: none;
    flex: 1;
    min-height: 0;
    padding: 0 12px;
}
#messages-page .notif-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 4px;
}

/* ==================== 页面 ==================== */
.page { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
.page.hidden { display: none !important; }
.sub-page { flex: 1; overflow-y: auto; overflow-x: hidden; display: none; }
.sub-page.active {
    display: flex !important;
    flex-direction: column;
    padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom));
}

/* ==================== 离线横幅 ==================== */
.network-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(46, 196, 182, 0.92);
    color: #fff;
    font-size: 13px;
    flex-shrink: 0;
    z-index: 400;
}
.network-banner.hidden { display: none !important; }
.network-banner-icon { display: flex; align-items: center; opacity: 0.9; }


/* ==================== 登录页（清凉透气） ==================== */
#login-page {
    position: relative;
    overflow: auto;
    background:
        radial-gradient(120% 70% at 50% -8%, rgba(46, 196, 182, 0.22), transparent 58%),
        radial-gradient(70% 45% at 100% 100%, rgba(91, 164, 232, 0.14), transparent 55%),
        radial-gradient(60% 40% at 0% 80%, rgba(46, 196, 182, 0.08), transparent 50%),
        var(--bg);
}
[data-theme="dark"] #login-page {
    background:
        radial-gradient(120% 70% at 50% -8%, rgba(46, 196, 182, 0.16), transparent 58%),
        var(--bg);
}
.login-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px 48px;
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}
.login-logo {
    width: 72px;
    height: 72px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
    background: linear-gradient(160deg, rgba(46, 196, 182, 0.2), rgba(91, 164, 232, 0.12));
    box-shadow: 0 12px 32px rgba(46, 196, 182, 0.12);
}
.login-logo-svg { font-size: 0; line-height: 0; }
.login-logo-svg .vh-logo { display: block; }
.login-title {
    font-size: 26px;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
    color: var(--text);
}
.login-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 36px;
    font-weight: 400;
}
#login-form { width: 100%; }
.input-group { margin-bottom: 16px; }
.input-group label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }
.input-group input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 2px rgba(26, 35, 50, 0.03);
}
.input-group input:focus {
    border-color: rgba(46, 196, 182, 0.55);
    box-shadow: 0 0 0 3px rgba(46, 196, 182, 0.14);
}
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; }

/* ==================== 图形验证码 ==================== */
.captcha-row {
    display: flex;
    gap: 10px;
    align-items: center;
}
.captcha-row input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
    letter-spacing: 4px;
    text-transform: uppercase;
}
.captcha-row input:focus { border-color: var(--primary); }
.captcha-img {
    width: 120px;
    height: 44px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity 0.2s, border-color 0.2s;
    background: var(--bg-input);
}
.captcha-img:hover { border-color: var(--primary); }
.optional { font-size: 11px; color: var(--text-muted); font-weight: normal; }
.input-hint { font-size: 12px; margin-top: 4px; display: block; }
.input-hint.valid { color: var(--success); }
.input-hint.invalid { color: var(--primary); }
.login-agreement { text-align: center; font-size: 12px; color: var(--text-muted); margin-top: 16px; }
.login-agreement a { color: var(--primary); text-decoration: none; }

/* ==================== 按钮 ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.btn-primary {
    background: linear-gradient(180deg, #45D4C6 0%, #2EC4B6 100%);
    color: #fff;
    border-radius: 999px;
    box-shadow: 0 10px 28px rgba(46, 196, 182, 0.28);
    font-weight: 600;
    letter-spacing: 0.02em;
}
.btn-primary:active {
    background: var(--primary-dark);
    transform: scale(0.98);
    box-shadow: 0 4px 14px rgba(46, 196, 182, 0.2);
}
[data-theme="dark"] .btn-primary {
    box-shadow: 0 8px 22px rgba(46, 196, 182, 0.22);
}
.btn-outline { background: transparent; border: 1px solid var(--primary); color: var(--primary); }
.btn-sm { padding: 8px 16px; font-size: 13px; border-radius: 20px; }
.btn-block { width: 100%; }
.btn-publish { border-radius: 24px; padding: 14px 32px; font-size: 16px; box-shadow: 0 4px 15px rgba(46, 196, 182, 0.4); }
.btn-exchange { background: var(--primary); color: #fff; min-width: 90px; }

/* ==================== Feed 流 — 全屏沉浸式 ==================== */
.main-page--feed-immersive {
    overflow: hidden;
    position: relative;
}

#feed-page.active {
    display: block;
    overflow: hidden;
    position: relative;
    flex: 1;
    min-height: 0;
    padding-bottom: 0;
}
.main-page--feed-immersive #feed-page.active {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.feed-container {
    width: 100%;
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    background: #000;
    position: relative;
}
.main-page--feed-immersive .feed-container {
    padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
}
.feed-container::-webkit-scrollbar { display: none; }
.feed-container { scrollbar-width: none; }

.feed-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    color: var(--text-muted);
    pointer-events: none;
}

.feed-network-hint {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0px) + 56px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 18;
    padding: 6px 14px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.62);
    color: rgba(255, 255, 255, 0.92);
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
    animation: feedHintFade 3.2s ease-out forwards;
}
@keyframes feedHintFade {
    0%, 15% { opacity: 0; transform: translateX(-50%) translateY(-4px); }
    25%, 75% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-2px); }
}

.feed-pull {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 0 8px;
    padding-top: max(12px, env(safe-area-inset-top));
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    pointer-events: none;
    transition: transform 0.15s ease-out;
}
.feed-pull.hidden { display: none; }
.feed-pull-spinner {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-top-color: var(--primary);
    border-radius: 50%;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.2s;
}
.feed-pull.refreshing .feed-pull-spinner {
    opacity: 1;
    animation: vh-spin 0.7s linear infinite;
}
.feed-pull.refreshing .feed-pull-text { opacity: 0.7; }

.feed-slide-skeleton { pointer-events: none; }
.feed-skeleton-cover {
    position: absolute;
    inset: 0;
    border-radius: 0;
}
.feed-skeleton-overlay {
    position: absolute;
    left: 16px;
    right: 72px;
    bottom: calc(88px + var(--safe-bottom));
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2;
}
.main-page--feed-immersive .feed-skeleton-overlay {
    bottom: calc(72px + var(--bottom-nav-h) + var(--safe-bottom));
}
.feed-skeleton-actions {
    position: absolute;
    right: 12px;
    bottom: calc(88px + var(--safe-bottom));
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 2;
}
.main-page--feed-immersive .feed-skeleton-actions {
    bottom: calc(72px + var(--bottom-nav-h) + var(--safe-bottom));
}

.feed-list { display: block; }

.feed-slide {
    width: 100%;
    height: var(--feed-slide-h, 100%);
    min-height: var(--feed-slide-h, 100%);
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
    background: #000;
    overflow: hidden;
    flex-shrink: 0;
}

.feed-media {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.feed-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.feed-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}
.feed-slide.playing .feed-poster { opacity: 0; }

.feed-video-placeholder {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 0;
}
.feed-video-placeholder-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(46, 196, 182, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    box-shadow: 0 4px 15px rgba(46, 196, 182, 0.5);
}

.feed-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
    height: 4px;
    z-index: 15;
    cursor: pointer;
    touch-action: none;
    padding: 10px 0;
    margin: -10px 0;
    box-sizing: content-box;
}
.feed-progress-track {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 3px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    transition: height 0.2s ease;
}
.feed-progress-bar {
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, rgba(91, 164, 232, 0.95), rgba(46, 196, 182, 0.98));
    border-radius: 999px;
    transform: translateY(-50%) scaleX(0);
    transform-origin: left center;
    transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform;
    z-index: 1;
}
.feed-progress.scrubbing .feed-progress-bar,
.feed-progress.feed-progress--snap .feed-progress-bar {
    transition: none;
}
.feed-progress.scrubbing .feed-progress-track { height: 5px; }
/* 品牌滑块：柔和跟随 */
.feed-progress-thumb {
    position: absolute;
    top: 50%;
    width: 8px;
    height: 8px;
    margin-top: -4px;
    margin-left: -4px;
    background: #fff;
    border-radius: 50%;
    z-index: 2;
    pointer-events: none;
    left: 0;
    transition:
        left 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
        width 0.18s ease,
        height 0.18s ease,
        margin 0.18s ease,
        box-shadow 0.18s ease;
    box-shadow: 0 0 0 2px rgba(46, 196, 182, 0.35), 0 1px 4px rgba(0, 0, 0, 0.35);
    will-change: left;
}
.feed-progress.scrubbing .feed-progress-thumb,
.feed-progress.feed-progress--snap .feed-progress-thumb {
    transition: width 0.18s ease, height 0.18s ease, margin 0.18s ease, box-shadow 0.18s ease;
}
.feed-progress.scrubbing .feed-progress-thumb {
    width: 14px;
    height: 14px;
    margin-top: -7px;
    margin-left: -7px;
    box-shadow: 0 0 0 3px rgba(46, 196, 182, 0.45), 0 2px 8px rgba(0, 0, 0, 0.4);
}
/* 播放时间：右下角，current左 / total右 */
.feed-progress-time {
    position: absolute;
    right: 8px;
    bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 14px);
    display: flex;
    align-items: center;
    gap: 1px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.85);
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum';
    z-index: 15;
    pointer-events: none;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.2s;
}
.feed-progress-time.visible,
.feed-progress.scrubbing ~ .feed-progress-time {
    opacity: 1;
}
.feed-time-current { color: rgba(255, 255, 255, 0.9); }
.feed-time-sep     { color: rgba(255, 255, 255, 0.5); margin: 0 1px; }
.feed-time-total   { color: rgba(255, 255, 255, 0.6); }
.main-page:not(.main-page--feed-immersive) .feed-progress-time {
    bottom: 14px;
}
.feed-mode-tabs {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    z-index: 1;
    padding: 0 0 4px;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    pointer-events: auto;
}
.feed-mode-indicator {
    display: none !important;
}
.feed-mode-tab {
    position: relative;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.62);
    font-size: 16px;
    font-weight: 500;
    padding: 8px 4px 10px;
    border-radius: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    pointer-events: auto;
    touch-action: manipulation;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
    transition: color var(--motion-ink, 220ms) var(--motion-ease-out, cubic-bezier(0.32, 0.72, 0, 1));
}
.feed-mode-tab::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 2px;
    width: 18px;
    height: 2.5px;
    border-radius: 2px;
    background: #fff;
    transform: translateX(-50%) scaleX(0);
    opacity: 0;
    transition:
        transform var(--motion-ink, 220ms) var(--motion-ease-out, cubic-bezier(0.32, 0.72, 0, 1)),
        opacity var(--motion-ink, 220ms) var(--motion-ease-out, cubic-bezier(0.32, 0.72, 0, 1));
}
.feed-mode-tab.active {
    background: transparent;
    color: #fff;
    font-weight: 700;
}
.feed-mode-tab.active::after {
    transform: translateX(-50%) scaleX(1);
    opacity: 1;
}
/* Feed 不用滑动 ink：残留 ink 一律隐藏，避免白线跑到小窗按钮下 */
.feed-mode-tabs .vh-seg-ink {
    display: none !important;
}
/* 恢复 Tab 自身底线动画（不用 :has(.vh-seg-ink) 隐藏） */
.feed-mode-tabs .feed-mode-tab.active::after {
    display: block;
}
.login-sheet {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: auto;
}
.login-sheet.hidden {
    display: none !important;
    pointer-events: none !important;
    visibility: hidden !important;
}
.login-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}
.login-sheet-panel {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: var(--bg-card, #fff);
    border-radius: 16px 16px 0 0;
    padding: 12px 20px calc(20px + env(safe-area-inset-bottom, 0px));
    animation: login-sheet-up 0.25s ease-out;
}
@keyframes login-sheet-up {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.sheet-handle,
.login-sheet-handle {
    width: 36px;
    height: 4px;
    background: var(--border-medium, #ddd);
    border-radius: 2px;
    margin: 10px auto 8px;
}
.login-sheet-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 4px;
    text-align: center;
}
.login-sheet-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    margin: 0 0 16px;
}
.login-sheet-agreement {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    margin: 4px 0 12px;
    line-height: 1.4;
}
.login-sheet-agreement input { margin-top: 2px; flex-shrink: 0; }
.modal-invite-poster .modal-content { max-width: 340px; }
.invite-poster-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 8px 0 12px;
}
#invite-poster-canvas {
    width: 100%;
    max-width: 300px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}
.invite-poster-qr { border-radius: 8px; }
.invite-poster-actions {
    display: flex;
    gap: 10px;
    padding-top: 4px;
}
.invite-poster-actions .btn { flex: 1; }
.publish-cover-section {
    margin: 4px 0 16px;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.publish-cover-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}
.publish-cover-head-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.publish-cover-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    color: var(--text);
    line-height: 1.3;
}
.publish-cover-hint {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.3;
}
.publish-cover-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.publish-cover-option {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    aspect-ratio: 3 / 4;
    max-height: 148px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    background: var(--bg-input, #16161f);
    box-shadow: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.publish-cover-option:active { transform: scale(0.97); }
.publish-cover-option.selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(46, 196, 182, 0.2);
}
.publish-cover-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #0d0d12;
}
.publish-cover-option-mask {
    position: absolute;
    inset: auto 0 0 0;
    height: 42%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent);
    pointer-events: none;
}
.publish-cover-option-label {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 7px;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
    pointer-events: none;
}
.publish-cover-option-label small {
    font-size: 10px;
    font-weight: 500;
    opacity: 0.85;
}
.publish-cover-option-check {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.15s ease, transform 0.15s ease;
    pointer-events: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.publish-cover-option.selected .publish-cover-option-check {
    opacity: 1;
    transform: scale(1);
}
.publish-cover-option.is-loading {
    pointer-events: none;
    border-color: transparent;
    background: linear-gradient(110deg, var(--bg-input, #1a1a24) 25%, var(--bg-card2, #242430) 45%, var(--bg-input, #1a1a24) 65%);
    background-size: 200% 100%;
    animation: publish-cover-skeleton 1.1s ease-in-out infinite;
}
.publish-cover-option.is-loading .publish-cover-option-mask,
.publish-cover-option.is-loading .publish-cover-option-check {
    display: none;
}
.publish-cover-option.is-loading .publish-cover-option-label {
    bottom: 50%;
    transform: translateY(50%);
    color: var(--text-muted);
    text-shadow: none;
    font-weight: 500;
}
@keyframes publish-cover-skeleton {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}
[data-theme="light"] .publish-cover-section {
    background: var(--bg-card);
}
[data-theme="light"] .publish-cover-option {
    background: #f0f0f3;
}
[data-theme="light"] .publish-cover-option.is-loading {
    background: linear-gradient(110deg, #ececf0 25%, #f7f7f9 45%, #ececf0 65%);
    background-size: 200% 100%;
}
.main-page:not(.main-page--feed-immersive) .feed-progress {
    bottom: 0;
}
.feed-tap-zone {
    position: absolute;
    inset: 0;
    z-index: 5;
    -webkit-tap-highlight-color: transparent;
}

.feed-play-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 6;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}
.feed-play-hint .vh-icon { filter: drop-shadow(0 1px 4px rgba(0,0,0,0.4)); }
.feed-stat-play, .me-stat-play {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.feed-stat-play .vh-icon, .me-stat-play .vh-icon { flex-shrink: 0; }
.feed-video-placeholder-icon { display: flex; align-items: center; justify-content: center; opacity: 0.45; }
.feed-end-hint {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.45);
    font-size: 13px;
    scroll-snap-align: none;
    pointer-events: none;
}
.feed-slide.paused .feed-play-hint { opacity: 1; }

.feed-heart-burst {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.3);
    z-index: 20;
    pointer-events: none;
    animation: feedHeartPop 0.65s ease-out forwards;
}
.feed-heart-burst .vh-icon { width: 88px; height: 88px; }
@keyframes feedHeartPop {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
    15% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.4); }
}

.feed-video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 72px 86px 22px 14px;
    padding-bottom: calc(22px + var(--safe-bottom));
    background: linear-gradient(transparent 0%, rgba(0,0,0,0.28) 42%, rgba(0,0,0,0.72) 100%);
    z-index: 10;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}
.main-page--feed-immersive .feed-video-overlay {
    padding-bottom: calc(16px + var(--bottom-nav-h) + var(--safe-bottom));
}
.feed-author-handle {
    pointer-events: auto;
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.01em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}
.feed-author-handle:active { opacity: 0.85; }
.feed-video-caption,
.feed-video-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.96);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
    max-width: 100%;
    pointer-events: auto;
}
.feed-title-meta {
    font-size: 12px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.48);
    white-space: nowrap;
}
.feed-title-sep {
    opacity: 0.5;
}
.feed-empty-action { margin-top: var(--space-4); min-width: 140px; }

/* ==================== 空状态统一样式 ==================== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px var(--space-4);
    color: var(--text-muted);
    text-align: center;
    gap: var(--space-2);
}
.empty-state.hidden { display: none; }
.empty-icon {
    color: var(--text-muted);
    opacity: 0.6;
    margin-bottom: var(--space-3);
}
.empty-state p {
    font-size: var(--text-body-sm);
    color: var(--text-secondary);
    margin: 0;
}
.empty-state .empty-hint {
    font-size: var(--text-caption);
    color: var(--text-muted);
}
.empty-state .empty-action,
.empty-actions {
    margin-top: var(--space-4);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
}
.empty-actions .btn { min-width: 140px; }
.notif-empty .empty-hint { margin-bottom: var(--space-2); }
.feed-video-author-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.4);
}
.feed-video-stats { margin-left: auto; display: flex; gap: 12px; }

.feed-slide--buffering .feed-media::after {
    content: '';
    position: absolute;
    inset: 0;
    margin: auto;
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255,255,255,0.25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: feed-spin 0.75s linear infinite;
    z-index: 8;
    pointer-events: none;
}
@keyframes feed-spin { to { transform: rotate(360deg); } }

.feed-media-error {
    position: absolute;
    inset: 0;
    z-index: 9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(0,0,0,0.55);
    pointer-events: auto;
}
.feed-media-error-text {
    margin: 0;
    font-size: 14px;
    color: rgba(255,255,255,0.9);
}
.feed-media-retry-btn {
    padding: 8px 20px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}
.feed-media-retry-btn:active { transform: scale(0.96); }

.feed-actions {
    position: absolute;
    right: 12px;
    bottom: calc(88px + var(--safe-bottom));
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    z-index: 30;
    pointer-events: auto;
}
.main-page--feed-immersive .feed-actions {
    bottom: calc(72px + var(--bottom-nav-h) + var(--safe-bottom));
}

.feed-action-btn.feed-avatar-btn {
    position: relative;
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
    padding: 0;
}
.feed-action-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.85);
    display: block;
    background: #666;
}
.feed-action-follow-dot {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 0; /* 未关注的 “+” 用 ::before，便于单独调圆内坐标 */
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
}
/* 只调圆圈里面的加号位置，不挪整颗角标 */
.feed-action-follow-dot:not(.is-followed)::before {
    content: '+';
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    transform: translateY(-1px);
}
.feed-action-follow-dot.is-followed {
    background: #2EC4B6;
    font-size: 0; /* 内容用 SVG，不用字符 */
}
.feed-action-follow-dot.is-followed svg {
    display: block;
    width: 10px;
    height: 10px;
    flex-shrink: 0;
}

.feed-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: transparent;
    border: none;
    box-shadow: none;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    color: #fff;
    cursor: pointer;
    font-size: 11px;
    padding: 0;
    min-width: 36px;
    min-height: 36px;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.15s;
}
.feed-action-btn:active { transform: scale(0.9); }
.feed-action-btn .action-icon {
    width: 36px;
    height: 36px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
.feed-action-btn .action-icon svg {
    width: 26px;
    height: 26px;
    display: block;
    pointer-events: none;
    background: none;
    border: none;
    filter: none;
}
.feed-action-btn .action-count {
    font-size: 11px;
    min-width: 36px;
    text-align: center;
    text-shadow: none;
    line-height: 1.2;
}
.feed-action-btn.feed-share-btn {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    position: relative;
}
/* 分享按钮动效：点击放大 + 青色粒子扩散 */
@keyframes share-pop {
    0%   { transform: scale(1); opacity: 1; }
    50%  { transform: scale(1.25); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes share-dot-1 {
    0%   { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(14px, -14px) scale(0.3); opacity: 0; }
}
@keyframes share-dot-2 {
    0%   { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(18px, 0) scale(0.3); opacity: 0; }
}
@keyframes share-dot-3 {
    0%   { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(14px, 14px) scale(0.3); opacity: 0; }
}
.feed-share-btn.popping .action-icon {
    animation: share-pop 0.25s ease-out;
}
.feed-share-btn.popping::before,
.feed-share-btn.popping::after {
    content: '';
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent-cyan, #25F4EE);
    pointer-events: none;
    left: 50%;
    top: 50%;
}
.feed-share-btn.popping::before {
    animation: share-dot-1 0.35s ease-out forwards;
}
.feed-share-btn.popping::after {
    animation: share-dot-2 0.35s ease-out 0.03s forwards;
}
/* 第三个粒子在 SVG 内部用伪元素实现，或通过额外 span — 这里用JS动态注入 */
.feed-action-btn.liked .action-icon { color: var(--like); }
.feed-action-btn.saved .action-icon { color: var(--warning); }
.feed-action-btn.followed .action-count { color: var(--accent-cyan); }
.feed-slide:not(.feed-slide--current) .feed-actions {
    pointer-events: none;
}

.loading { text-align: center; padding: 40px; color: var(--text-muted); }

/* 兼容旧类名（搜索/历史仍可能引用 formatCount 等） */
.feed-item { display: none; }

/* ==================== 搜索 ==================== */
.search-header { padding: 12px 16px; }
.search-input-wrap {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 0 16px;
    transition: border-color 0.2s;
}
.search-input-wrap:focus-within { border-color: var(--primary); }
.search-icon {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--text-muted);
}
.hot-title { display: inline-flex; align-items: center; gap: 4px; }
.hot-title-icon { display: inline-flex; align-items: center; }
.search-chip .history-icon {
    display: inline-flex;
    align-items: center;
    margin-right: 4px;
    vertical-align: middle;
    opacity: 0.7;
}
.search-input {
    flex: 1;
    padding: 12px 0;
    background: none;
    border: none;
    color: var(--text);
    font-size: 15px;
    outline: none;
}
.hot-search { padding: 0 16px 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hot-label { font-size: 12px; color: var(--warning); flex-shrink: 0; }
.hot-words { display: flex; gap: 8px; flex-wrap: wrap; }
.hot-word {
    padding: 4px 12px;
    background: var(--bg-input);
    border-radius: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}
.hot-word:active { background: var(--primary); color: #fff; }

/* 搜索发现面板 */
.search-discovery { padding: 0 16px 12px; }
.search-section { margin-bottom: 16px; }
.search-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.search-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}
.search-section-title.hot-title { color: var(--warning); }
.search-chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.search-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.search-chip:active { border-color: var(--primary); color: var(--text); }
.search-chip.empty-chip { cursor: default; opacity: 0.7; }
.hot-chip .hot-rank {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    min-width: 14px;
}
.history-chip .history-icon { font-size: 12px; opacity: 0.7; }
.search-clear-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    line-height: 1;
    padding: 0 4px;
    cursor: pointer;
}
.search-clear-btn:active { color: var(--text); }

.search-results { flex: 1; overflow-y: auto; padding: 8px 16px; }

/* 搜索结果项 */
.result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}
.result-item:active { opacity: 0.7; }
.result-thumb {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--bg-input);
    flex-shrink: 0;
}
.result-info { flex: 1; min-width: 0; }
.result-title {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.result-meta { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.result-action { flex-shrink: 0; }

/* ==================== 观看历史 ==================== */
.history-header { padding: 16px 16px 8px; display: flex; justify-content: space-between; align-items: center; }
.history-header h3 { font-size: 18px; }
.continue-section { padding: 8px 16px 0; }
.section-title { font-size: 14px; color: var(--text-secondary); margin-bottom: 8px; }
.continue-list { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; }
.continue-item {
    flex-shrink: 0;
    width: 132px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-card);
    cursor: pointer;
    scroll-snap-align: start;
    position: relative;
}
.continue-item img {
    width: 100%;
    height: 176px;
    object-fit: cover;
    display: block;
}
.continue-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255,255,255,0.2);
}
.continue-progress-bar {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s;
}
.continue-item-title {
    padding: 8px;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.history-list { padding: 0 16px; }
.history-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    align-items: center;
}
.history-item-cover {
    width: 112px;
    height: 63px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-input);
}
.history-item-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.history-item-info { flex: 1; min-width: 0; }
.history-item-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
}
.history-item-meta { font-size: 12px; color: var(--text-secondary); }

/* ==================== 发布栏 ==================== */
.publish-bar {
    padding: 12px 16px calc(12px + var(--safe-bottom));
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
}

/* ==================== 发布弹窗（复用通用弹窗/表单样式） ==================== */
.publish-body { padding: 0 20px calc(24px + var(--safe-bottom)); }
.publish-body .input-group { margin-bottom: 16px; }
.publish-select-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: var(--bg-input);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 15px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}
.publish-upload-icon { display: flex; color: var(--primary); }
.publish-select-btn:active { border-color: var(--primary); color: var(--text); }
.publish-steps {
    display: flex;
    gap: 6px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.publish-step {
    flex: 1;
    min-width: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 6px;
    border-radius: 999px;
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-card2);
    border: 1px solid transparent;
}
.publish-step span {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 35, 50, 0.08);
    font-weight: 600;
}
.publish-step.is-active {
    color: var(--primary-dark);
    background: var(--primary-soft);
    border-color: rgba(46, 196, 182, 0.35);
}
.publish-step.is-active span,
.publish-step.is-done span {
    background: var(--primary);
    color: #fff;
}
.publish-step.is-done { color: var(--text-secondary); }
.publish-step-panel { margin-bottom: 8px; }
.publish-nav {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}
.publish-nav .btn { flex: 1; }
.publish-confirm-summary {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0 0 12px;
    padding: 12px;
    background: var(--primary-soft);
    border-radius: 12px;
}
.discover-card-cover--empty {
    aspect-ratio: 3/4;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    background: var(--bg-card2);
    font-size: 22px;
}
.publish-preview video {
    width: 100%;
    max-height: 240px;
    border-radius: var(--radius);
    background: #000;
    margin-bottom: 16px;
}
.publish-progress-wrap {
    margin-bottom: 16px;
    padding: 12px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.publish-progress-wrap.is-uploading {
    border-color: rgba(46, 196, 182, 0.35);
    background: rgba(46, 196, 182, 0.06);
}
.publish-progress-wrap.is-done {
    border-color: rgba(37, 244, 238, 0.35);
    background: rgba(37, 244, 238, 0.06);
}
.publish-progress-wrap.is-error {
    border-color: rgba(232, 93, 93, 0.4);
    background: rgba(232, 93, 93, 0.06);
}
.publish-progress-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    gap: 8px;
}
#publish-progress-label {
    font-weight: 500;
    color: var(--text);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#publish-progress-text {
    color: var(--primary);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}
.publish-progress {
    height: 8px;
    background: var(--bg-input, var(--border));
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}
.publish-progress-bar {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #45D4C6, #2EC4B6 55%, #5BA4E8);
    background-size: 200% 100%;
    transition: width 0.25s ease-out;
    box-shadow: 0 0 8px rgba(46, 196, 182, 0.35);
}
.publish-progress-wrap.is-uploading .publish-progress-bar {
    animation: publish-progress-shine 1.4s linear infinite;
}
.publish-progress-wrap.is-indeterminate .publish-progress-bar {
    width: 36% !important;
    animation: publish-progress-indeterminate 1.2s ease-in-out infinite;
}
.publish-progress-wrap.is-done .publish-progress-bar {
    background: linear-gradient(90deg, #25F4EE, #2dd4bf);
    box-shadow: 0 0 8px rgba(37, 244, 238, 0.35);
    animation: none;
}
.publish-progress-wrap.is-error .publish-progress-bar {
    background: #FF4757;
    box-shadow: none;
    animation: none;
}
.publish-progress-detail {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
    font-variant-numeric: tabular-nums;
}
@keyframes publish-progress-shine {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}
@keyframes publish-progress-indeterminate {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(280%); }
}

/* 有双入口时走公共等宽格；hidden 仍优先隐藏 */
#publish-upload-wrap.vh-pick-grid,
#publish-upload-wrap.publish-source-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
}
#publish-upload-wrap.hidden { display: none !important; }

/* 发布成功预览层 */
.publish-success-wrap {
    margin-bottom: 16px;
}
.publish-success-tip {
    background: linear-gradient(135deg, #45D4C6, #2EC4B6);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 12px;
}
.publish-success-cover {
    width: 100%;
    aspect-ratio: 9/16;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 8px;
    background: var(--border);
}
.publish-success-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.publish-success-status {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}
.publish-success-status.pending { color: #f5a623; }
.publish-success-status.passed  { color: #27ae60; }
.publish-success-status.rejected { color: #e74c3c; }
.publish-success-actions {
    display: flex;
    gap: 12px;
}
.publish-success-actions .btn {
    flex: 1;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 24px;
}

/* ==================== 全局弹窗层（Portal 目标） ==================== */
#vh-overlay-root {
    position: fixed;
    inset: 0;
    z-index: 8000;
    display: none;
    pointer-events: none;
}
#vh-overlay-root.vh-overlay-root--active {
    display: block;
    pointer-events: auto;
}
body.vh-modal-open {
    overflow: hidden;
}

/* ==================== 弹窗 ==================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
    box-sizing: border-box;
    margin: 0;
    border: none;
    pointer-events: none;
}
.modal:not(.hidden) {
    z-index: 5000;
    pointer-events: auto;
}
.modal.modal--closing {
    pointer-events: none !important;
}
.modal.hidden {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}
.modal-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(0, 0, 0, 0.55);
    animation: modalBackdropIn 0.25s ease;
}
/* 底部抽屉：评论 / 分享 / 发布（拇指热区） */
.modal.modal--sheet {
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}
.modal.modal--center {
    align-items: center;
    justify-content: center;
}
#confirm-modal:not(.hidden) { z-index: 5100; }

.modal-content {
    position: relative;
    z-index: 2;
    flex: 0 1 auto;
    width: min(100%, 400px);
    max-width: 400px;
    max-height: min(85vh, calc(100dvh - 40px));
    margin: auto;
    pointer-events: auto;
    background: var(--bg-card);
    border-radius: 16px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    animation: modalCenterIn 0.28s cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.42);
    -webkit-overflow-scrolling: touch;
}
.modal--sheet .modal-content {
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    margin: 0;
    border-radius: 20px 20px 0 0;
    animation: slideUp 0.32s cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.28);
}

.modal-content.modal-confirm {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    width: min(316px, calc(100vw - 40px));
    min-width: 268px;
    padding: 0;
    border-radius: 16px;
    max-height: none;
    overflow: hidden;
    margin: 0;
    animation: modalCenterIn 0.22s cubic-bezier(0.32, 0.72, 0, 1);
}
.confirm-body {
    padding: 22px 20px 8px;
    text-align: center;
}
.confirm-title {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 650;
    color: var(--text);
    line-height: 1.35;
}
.confirm-title.hidden { display: none; }
.confirm-message {
    text-align: center;
    font-size: 14px;
    line-height: 1.55;
    padding: 0;
    margin: 0;
    color: var(--text-secondary);
    white-space: pre-line;
    word-break: break-word;
}
.confirm-body:has(.confirm-title.hidden) .confirm-message,
.confirm-body .confirm-message:only-child {
    padding: 4px 0 12px;
    font-size: 15px;
    color: var(--text);
}
.confirm-actions {
    display: flex;
    border-top: 1px solid var(--border);
    gap: 0;
    margin-top: 16px;
}
.confirm-actions .btn {
    flex: 1;
    min-height: 0;
    height: 48px;
    padding: 0 12px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 0;
    border: none;
    background: transparent;
    touch-action: manipulation;
    cursor: pointer;
    position: relative;
    z-index: 3;
}
.confirm-actions .btn-outline {
    color: var(--text-secondary);
    border: none;
    background: transparent;
}
.confirm-actions .btn-outline:active { background: rgba(255, 255, 255, 0.04); transform: none; }
.confirm-actions .btn-primary {
    color: var(--primary);
    font-weight: 600;
    border: none;
    border-left: 1px solid var(--border);
    background: transparent;
}
.confirm-actions .btn-primary:active { background: rgba(46, 196, 182, 0.08); transform: none; }
.confirm-actions .btn-danger {
    color: #FF4757;
    font-weight: 600;
    border: none;
    border-left: 1px solid var(--border);
    background: transparent;
}
.confirm-actions .btn-danger:active { background: rgba(46, 196, 182, 0.08); transform: none; }
[data-theme="light"] .confirm-actions .btn-outline:active { background: rgba(0, 0, 0, 0.04); }

@keyframes modalBackdropIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalCenterIn {
    from { opacity: 0; transform: scale(0.94) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 12px;
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 10;
}
.modal-header h3 { font-size: 18px; }
.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--bg-input);
    color: var(--text);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 积分弹窗 — 居中卡片 */
.modal-points {
    max-width: 360px;
    padding-bottom: 12px;
}
.points-balance-card {
    margin: 0 20px 20px;
    padding: 24px;
    background: linear-gradient(145deg, #E6F8F5 0%, #D7F0FF 55%, #EAF7F4 100%);
    border: 1px solid rgba(46, 196, 182, 0.25);
    border-radius: 16px;
    text-align: center;
    color: var(--text);
}
.balance-label { font-size: 13px; color: var(--text-secondary); display: block; margin-bottom: 8px; }
.balance-value { font-size: 40px; font-weight: 700; color: var(--primary-dark); }
.exchange-options { padding: 0 20px; }
.exchange-options h4 { font-size: 14px; color: var(--text-secondary); margin-bottom: 12px; }
.exchange-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--bg-input);
    border-radius: var(--radius);
    margin-bottom: 12px;
}
.exchange-info { display: flex; align-items: center; gap: 12px; }
.exchange-icon { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex-shrink: 0; }
.exchange-info strong { font-size: 14px; display: block; margin-bottom: 2px; }
.exchange-info p { font-size: 12px; color: var(--text-secondary); }

/* 邀请码卡片 */
.invite-card {
    margin: 0 20px 16px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(46, 196, 182, 0.15), rgba(255, 165, 2, 0.1));
    border: 1px solid rgba(46, 196, 182, 0.25);
    border-radius: var(--radius);
}
.invite-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.invite-card-title { font-size: 15px; font-weight: 600; }
.invite-count-label { font-size: 12px; color: var(--warning); }
.invite-card-desc { font-size: 12px; color: var(--text-secondary); margin-bottom: 12px; line-height: 1.4; }
.invite-code-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.invite-code-display {
    flex: 1;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--warning);
    background: var(--bg-input);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    text-align: center;
}

/* 积分排行榜 */
.leaderboard-section { padding: 0 20px 16px; }
.leaderboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.leaderboard-header h4 { font-size: 14px; color: var(--text-secondary); }
.leaderboard-tabs { display: flex; gap: 6px; }
.leaderboard-tab {
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
}
.leaderboard-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.leaderboard-list { background: var(--bg-input); border-radius: var(--radius); overflow: hidden; }
.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
}
.leaderboard-item:last-child { border-bottom: none; }
.leaderboard-item.is-me { background: rgba(46, 196, 182, 0.08); }
.leaderboard-rank { width: 28px; text-align: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.leaderboard-rank.rank-top {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
}
.leaderboard-rank.rank-1 { background: linear-gradient(135deg, #ffd700, #ffb800); color: #1a1a1a; }
.leaderboard-rank.rank-2 { background: linear-gradient(135deg, #e8e8e8, #b0b0b0); color: #1a1a1a; }
.leaderboard-rank.rank-3 { background: linear-gradient(135deg, #e8a86b, #cd7f32); color: #fff; }
.leaderboard-skeleton { pointer-events: none; }
.leaderboard-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--border);
}
.leaderboard-info { flex: 1; min-width: 0; }
.leaderboard-name {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.leaderboard-points { font-size: 13px; color: var(--warning); font-weight: 600; white-space: nowrap; }
.leaderboard-loading, .leaderboard-empty {
    padding: 20px;
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
}

.points-records-link { padding: 16px 20px; text-align: center; display: flex; flex-direction: column; gap: 8px; }
.points-records-link a { color: var(--primary); text-decoration: none; font-size: 14px; }

.search-load-more,
.msg-load-more {
    padding: 12px 16px 20px;
}
.records-list { padding: 0 20px 20px; }
.record-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.record-info { font-size: 14px; }
.record-date { font-size: 12px; color: var(--text-secondary); }
.record-amount { font-weight: 600; font-size: 15px; }
.record-amount.positive { color: var(--success); }
.record-amount.negative { color: var(--primary); }
.modal-records { max-width: 360px; }

/* 评论弹窗 */
.modal-content.modal-comments {
    display: flex;
    flex-direction: column;
    min-height: min(55vh, 420px);
    max-height: min(85vh, calc(var(--vh-comment, 100dvh) * 0.85));
}
.comment-list {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0 20px;
    min-height: 160px;
    max-height: none;
}
.comment-item { padding: 12px 0; border-bottom: 1px solid var(--border); }
.comment-user { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.comment-text { font-size: 14px; color: var(--text-secondary); line-height: 1.5; }
.comment-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ==================== 统一消息输入条 vh-composer（评论/弹幕/AI） ==================== */
.vh-composer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}
.vh-composer__hint {
    flex: 0 0 auto;
    font-size: 12px;
    color: var(--primary);
    padding: 0 2px;
}
.vh-composer__hint.hidden { display: none !important; }
.vh-composer__row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
}
.vh-composer__field {
    flex: 1;
    min-width: 0;
    height: 40px;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0 4px 0 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--bg-input);
    box-sizing: border-box;
}
.vh-composer__input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: none;
    border-radius: 0;
    padding: 0;
    background: transparent;
    color: var(--text);
    font-size: 15px;
    outline: none;
    box-shadow: none;
}
.vh-composer__input::placeholder { color: var(--text-muted); }
.vh-composer__tool {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.vh-composer__tool.is-active {
    background: rgba(46, 196, 182, 0.14);
    color: var(--primary);
}
.vh-composer__tool:active { transform: scale(0.92); }
.vh-composer__tool.hidden { display: none !important; }
.vh-composer__cancel {
    flex-shrink: 0;
    height: 40px;
    padding: 0 10px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
}
.vh-composer__cancel.hidden { display: none !important; }
.vh-composer__send {
    flex-shrink: 0;
    height: 40px;
    min-width: 64px;
    padding: 0 16px;
    border: none;
    border-radius: 20px;
    background: var(--primary);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    appearance: none;
}
.vh-composer__send:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.vh-composer__send:active { transform: scale(0.96); opacity: 0.92; }
.vh-composer__panel {
    width: 100%;
    max-height: 140px;
    overflow: auto;
    padding: 8px;
    border-radius: 12px;
    background: var(--bg-card2, var(--bg-input));
    border: 1px solid var(--border);
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}
.vh-composer__panel.hidden { display: none !important; }
.vh-composer__panel[data-composer-panel="emoji"] {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
}
.vh-composer__panel[data-composer-panel="emoji"].hidden { display: none !important; }
.vh-composer__emoji-item {
    height: 36px;
    border: none;
    border-radius: 8px;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.vh-composer__emoji-item:active { background: rgba(0, 0, 0, 0.06); }
.vh-composer__panel[data-composer-panel="color"] {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.vh-composer__swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid transparent;
    padding: 0;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.vh-composer__swatch.is-active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(46, 196, 182, 0.35);
}
.vh-composer__swatch--light {
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}

/* 浅色场景：评论半屏 / AI */
.vh-composer--light {
    padding: 12px 16px calc(12px + var(--safe-bottom, 0px));
    border-top: 1px solid var(--border);
    background: var(--bg-card);
}
.vh-composer--light .vh-composer__send {
    background: var(--primary);
    color: #fff;
}

/* 深色场景：Feed 弹幕条 —— 结构共用，配色适配沉浸 Feed */
.vh-composer--dark .vh-composer__field {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.22);
}
.vh-composer--dark .vh-composer__input { color: #fff; }
.vh-composer--dark .vh-composer__input::placeholder { color: rgba(255, 255, 255, 0.55); }
.vh-composer--dark .vh-composer__tool { color: rgba(255, 255, 255, 0.88); }
.vh-composer--dark .vh-composer__tool.is-active {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}
.vh-composer--dark .vh-composer__send {
    background: rgba(46, 196, 182, 0.22);
    border: 1px solid rgba(46, 196, 182, 0.55);
    color: #2EC4B6;
}
.vh-composer--dark .vh-composer__panel {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.12);
}
.vh-composer--dark .vh-composer__emoji-item:active { background: rgba(255, 255, 255, 0.12); }

/* 评论区沿用 vh-composer，键盘顶起仍作用在整条上 */
#comment-composer.vh-composer {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

/* 播放器弹窗 */
.player-content {
    position: fixed;
    inset: 0;
    background: #000;
    display: flex;
    flex-direction: column;
    z-index: 1001;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.player-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 16px;
    z-index: 10;
    display: flex;
    justify-content: flex-end;
}
.player-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.2);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.player-video-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}
#player-video { width: 100%; max-height: 60vh; object-fit: contain; }
.player-info { padding: 16px 20px 8px; background: var(--bg); }
.player-author { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.player-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.player-nickname { font-size: 14px; font-weight: 500; }
.player-title { font-size: 16px; margin-bottom: 8px; }
.player-stats { display: flex; gap: 16px; font-size: 12px; color: var(--text-secondary); }
.player-actions {
    display: flex;
    justify-content: space-around;
    padding: 12px 20px calc(12px + var(--safe-bottom));
    background: var(--bg);
    border-top: 1px solid var(--border);
}
.player-actions .action-btn {
    background: none;
    border: none;
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
}

/* ==================== 空状态 ==================== */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--text-muted);
    opacity: 0.55;
}
.inline-icon {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin-right: 2px;
}
.empty-hint { font-size: 13px; margin-top: 8px; color: var(--text-muted); }

/* ==================== Toast（浅/深色自适应） ==================== */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 14px;
    z-index: 9200;
    animation: toastIn 0.3s ease;
}
[data-theme="light"] .toast {
    background: rgba(0, 0, 0, 0.75);
}
.toast.hidden { display: none; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -50%) scale(0.8); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }

/* 滚动条隐藏 */
::-webkit-scrollbar { display: none; }

/* ==================== 短信验证码 ==================== */
.sms-row {
    display: flex;
    gap: 10px;
    align-items: center;
}
.sms-row input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
    letter-spacing: 2px;
}
.sms-row input:focus { border-color: var(--primary); }
.btn-send-code {
    padding: 12px 16px;
    font-size: 14px;
    white-space: nowrap;
}

/* ==================== 测试账号选择器 ==================== */
.test-accounts-panel {
    margin-top: 24px;
    padding: 14px;
    background: var(--primary-soft);
    border: 1px dashed rgba(46, 196, 182, 0.35);
    border-radius: 16px;
}
.test-accounts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 12px;
    color: var(--text-secondary);
}
.test-badge {
    background: rgba(46, 196, 182, 0.9);
    color: #fff;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
}
.test-accounts-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}
.test-account-btn {
    padding: 8px 4px;
    font-size: 11px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
[data-theme="dark"] .test-account-btn { background: var(--bg-card); }
.test-account-btn:hover {
    border-color: var(--primary);
    background: rgba(46, 196, 182, 0.1);
}
.test-account-btn:active {
    transform: scale(0.95);
}

/* ==================== 分享弹窗 ==================== */
.modal-share {
    max-width: 320px;
}
.share-content {
    padding: 16px;
    position: relative;
    overflow: hidden;
    min-height: 120px;
}
#share-pane-host > [id$="-panel"].vh-pane--during {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    width: 100%;
    padding: 0;
    background: var(--bg-card, #fff);
}
.share-title {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.5;
}
.share-count-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    padding: 8px 12px;
    background: var(--bg-card);
    border-radius: var(--radius);
}
.share-count-wrap strong {
    color: var(--primary);
}
.share-count-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 16px;
}
.share-arrow-icon svg { display: block; }
.share-options {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}
#share-modal .share-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
}
#share-modal .share-btn:hover {
    border-color: var(--primary);
    background: rgba(46, 196, 182, 0.1);
}
#share-modal .share-btn:active {
    transform: scale(0.95);
}
.share-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--primary);
}
#share-modal .share-btn span:last-child {
    font-size: 12px;
}
.share-link-wrap {
    display: flex;
    gap: 8px;
    font-size: 11px;
    color: var(--text-muted);
    word-break: break-all;
}
.share-link-label {
    flex-shrink: 0;
}
.share-link {
    flex: 1;
    color: var(--text-secondary);
}

.share-target-video {
    padding: 8px 12px 0;
    font-size: 13px;
    color: var(--primary);
    line-height: 1.4;
    word-break: break-all;
}

.share-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
}
.share-tab {
    flex: 1;
    padding: 10px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.share-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.share-user-search {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text);
    font-size: 14px;
    outline: none;
    margin-bottom: 10px;
}
.share-user-search:focus { border-color: var(--primary); }

.share-user-list {
    max-height: 280px;
    overflow-y: auto;
}
.share-user-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 4px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s;
}
.share-user-item:last-child { border-bottom: none; }
.share-user-item:active { background: var(--bg-card); }
.share-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-input);
    flex-shrink: 0;
}
.share-user-info { flex: 1; min-width: 0; }
.share-user-name {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.share-user-bio {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.share-user-following {
    font-size: 11px;
    color: var(--primary);
    flex-shrink: 0;
}
.share-user-loading,
.share-user-empty {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 13px;
}

#share-inline-panel { }

/* ==================== 通知列表（消息 Tab） ==================== */
.modal-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* .btn-text 已迁入 ui.css（.vh-text-action） */

.notif-list {
    flex: 1;
    overflow-y: auto;
    min-height: 200px;
    max-height: 55vh;
    padding-bottom: max(16px, env(safe-area-inset-bottom, 16px));
}
.notif-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 0 12px 6px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s;
    width: 100%;
    box-sizing: border-box;
}
.notif-item:active { background: var(--bg-card); }
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: rgba(46, 196, 182, 0.06); }
.notif-item.unread .notif-title { font-weight: 600; }
.notif-item--flash {
    outline: 2px solid var(--like, #FF6B8A);
    outline-offset: -2px;
    transition: outline-color 0.3s ease;
}
.notif-item.read .notif-title { color: var(--text-secondary); }
.notif-item.read .notif-text  { color: var(--text-muted); }
.notif-icon-wrap {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--text-secondary);
}
.notif-icon-wrap .vh-icon { display: block; line-height: 0; }
.notif-icon-wrap .vh-icon svg { width: 18px; height: 18px; display: block; }
.notif-unread-dot {
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    border: 1.5px solid var(--bg-card);
    z-index: 1;
}
.notif-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}
.notif-empty .empty-icon { margin-bottom: 12px; }
.notif-skeleton { pointer-events: none; border-bottom-color: transparent !important; }
.notif-skeleton-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.notif-body { flex: 1; min-width: 0; overflow: hidden; }
.notif-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.notif-text {
    font-size: 12px;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.45;
}
.notif-time {
    font-size: 11px;
    color: var(--text-muted);
    flex-shrink: 0;
    white-space: nowrap;
    padding-top: 2px;
}
.notif-loading,
.notif-empty {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
    font-size: 13px;
}

/* ==================== 「我的」页面 ==================== */
/* 勿覆盖 .sub-page.active 的 padding-bottom，保证底部 Tab 不遮挡「更多服务」 */

.me-profile-card {
    display: flex;
    gap: 16px;
    padding: 20px 16px 12px;
    align-items: flex-start;
    position: relative;
}

.me-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.me-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--primary-soft, #E6F8F5);
    border: 1px solid var(--border);
}

.me-avatar-edit {
    position: absolute;
    /* 贴在右下圆弧：一半在头像内、一半探出；相对原先整体上移 */
    right: -2px;
    bottom: 6px;
    /* 无圆底，热区略放大便于点；视觉只有铅笔 */
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary, #2EC4B6);
    box-shadow: none;
    padding: 0;
    z-index: 2;
    -webkit-tap-highlight-color: transparent;
    /* 图标本态约 45°，顺时针 17° → 视觉约 28°（不太直也不太平） */
    transform: rotate(17deg);
}
.me-avatar-edit:active {
    transform: rotate(17deg) scale(0.92);
}
.me-avatar-edit-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    /* 无底托时略提对比，避免浅色头像上「看不见」 */
    filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.4));
}
.me-avatar-edit-icon .vh-icon,
.me-avatar-edit-icon svg {
    width: 22px;
    height: 22px;
    display: block;
}

/* 头像角 — 主题快捷切换（仅图标，无圆框） */
.me-theme-btn {
    position: absolute;
    right: -2px;
    top: -2px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    z-index: 3;
    padding: 0;
    overflow: visible;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.15s ease, color 0.2s ease;
}
.me-theme-btn:active { transform: scale(0.9); }
.me-theme-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}
.me-theme-btn-icon .vh-icon,
.me-theme-btn-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}
.me-theme-btn.is-light { color: #E89B0C; }
.me-theme-btn.is-dark { color: #6B8CFF; }
.me-theme-btn.popping .me-theme-btn-icon {
    animation: me-theme-spin 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.me-theme-btn-burst {
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
}
.me-theme-btn.popping .me-theme-btn-burst {
    animation: me-theme-ring 0.5s ease-out forwards;
}
.me-theme-btn.popping .me-theme-btn-burst::before,
.me-theme-btn.popping .me-theme-btn-burst::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    margin: -2px 0 0 -2px;
}
.me-theme-btn.popping .me-theme-btn-burst::before {
    animation: me-theme-dot-a 0.45s ease-out forwards;
}
.me-theme-btn.popping .me-theme-btn-burst::after {
    animation: me-theme-dot-b 0.45s ease-out 0.04s forwards;
}
@keyframes me-theme-spin {
    0%   { transform: scale(1) rotate(0deg); opacity: 1; }
    40%  { transform: scale(0.4) rotate(-90deg); opacity: 0.3; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
@keyframes me-theme-ring {
    0%   { box-shadow: 0 0 0 0 currentColor; opacity: 0.35; }
    100% { box-shadow: 0 0 0 10px transparent; opacity: 0; }
}
@keyframes me-theme-dot-a {
    0%   { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(11px, -12px) scale(0.15); opacity: 0; }
}
@keyframes me-theme-dot-b {
    0%   { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(-12px, -9px) scale(0.15); opacity: 0; }
}
[data-theme="light"] .me-theme-btn {
    background: transparent;
    border: none;
    box-shadow: none;
}
[data-theme="light"] .me-theme-btn-icon {
    filter: drop-shadow(0 1px 1px rgba(255, 255, 255, 0.8));
}

/* 资料卡右侧 — 设置入口，与昵称行「编辑资料」垂直居中 */
.me-info-top {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 6px;
}
.me-settings-btn {
    position: static;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    margin: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    color: var(--text-secondary);
    opacity: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s ease, transform 0.15s ease;
    z-index: 2;
}
.me-settings-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}
.me-settings-btn-icon .vh-icon,
.me-settings-btn-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}
.me-settings-btn:active {
    transform: scale(0.92);
    color: var(--text);
    background: transparent;
}
[data-theme="light"] .me-settings-btn {
    background: transparent;
    color: #5C5E72;
}
[data-theme="light"] .me-settings-btn:active {
    background: transparent;
    color: #1C1D2E;
}

.me-info {
    flex: 1;
    min-width: 0;
    padding-right: 0;
}

/* ==================== 设置页 ==================== */
#settings-page {
    background: var(--bg);
}
.settings-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 0 40px;
}
.settings-section {
    padding: 0 16px;
    margin-bottom: 24px;
}
.settings-section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 16px 0 8px;
}
.settings-section-title--danger {
    color: var(--primary);
}
.settings-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    background: transparent;
    border-left: none;
    border-right: none;
    border-top: none;
    cursor: pointer;
    color: var(--text);
    width: 100%;
    text-align: left;
    font-size: 15px;
    -webkit-tap-highlight-color: transparent;
}
.settings-item:last-child { border-bottom: none; }
.settings-item:active { opacity: 0.7; }
.settings-item-icon {
    color: var(--text-secondary);
    flex-shrink: 0;
    display: flex;
}
.settings-item-icon--text { font-size: 16px; }
.settings-item-label { flex: 1; }
.settings-item-arrow { color: var(--text-muted); font-size: 13px; }
.settings-points-balance {
    margin-left: 6px;
    font-size: 13px;
    color: var(--warning);
    font-weight: 600;
}
.settings-item--warn { color: #FF9500; }
.settings-item--danger { color: var(--primary); }

/* 主题选择 */
.settings-theme-options {
    display: flex;
    gap: 12px;
    padding: 4px 0;
}
.settings-theme-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 8px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    cursor: pointer;
    color: var(--text);
    font-size: 12px;
    transition: border-color 0.15s, background 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.settings-theme-btn.active {
    border-color: var(--primary);
    background: rgba(46, 196, 182, 0.08);
}
.settings-theme-btn:active { opacity: 0.8; }
.theme-preview {
    width: 36px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid var(--border);
}
.theme-preview--light { background: #F8F9FC; }
.theme-preview--dark  { background: #181925; }

.settings-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
}

.settings-version {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    padding: 24px 16px;
    line-height: 1.6;
}
.settings-version-hint {
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.6;
}
.site-icp {
    text-align: center;
    margin: 12px 0 0;
    font-size: 12px;
    line-height: 1.4;
}
.site-icp a,
.site-icp-link {
    color: var(--text-muted);
    text-decoration: none;
}
.site-icp a:active,
.site-icp-link:active {
    color: var(--primary);
}

.me-nickname-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

.me-nickname {
    font-size: 20px;
    font-weight: 700;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.me-bio {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    line-height: 1.4;
}

.me-phone {
    font-size: 12px;
    color: var(--text-muted);
}

.me-follow-bar {
    width: 100%;
    padding: 0 16px 12px;
}
.me-follow-main-btn {
    min-height: 44px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
}
.me-other-header,
.me-sublist-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 8px 8px 4px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 48px;
    box-sizing: border-box;
}
.me-back-btn {
    border: none;
    background: none;
    color: var(--text);
    font-size: 15px;
    padding: 4px 10px;
    margin: 0;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    -webkit-tap-highlight-color: transparent;
}
.me-back-btn:active {
    background: rgba(0, 0, 0, 0.05);
}
.me-back-btn-icon {
    font-size: 32px;
    line-height: 1;
    font-weight: 300;
    transform: translateY(-1px);
}
.me-other-title,
.me-sublist-title {
    flex: 1;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}
.me-sublist-bar-spacer {
    width: 44px;
    flex-shrink: 0;
}

/* 粉丝 | 关注 分段（子页内切换，人数一眼可见） */
.me-social-tabs {
    display: flex;
    gap: 0;
    padding: 0 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    position: sticky;
    top: 48px;
    z-index: 19;
}
.me-social-tab {
    flex: 1;
    border: none;
    background: none;
    padding: 12px 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}
.me-social-tab.active {
    color: var(--text);
}
.me-social-tab.active::after {
    content: '';
    position: absolute;
    left: 22%;
    right: 22%;
    bottom: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--primary, #2ec4b6);
}
.me-social-tab-n {
    font-weight: 700;
    margin-left: 2px;
}
.me-user-follow-btn--muted {
    color: var(--text-secondary) !important;
    border-color: var(--border) !important;
}
.me-user-follow-btn.btn-primary {
    min-width: 72px;
}

.me-home-shell {
    display: block;
}

#me-page.me-page--sub-enter #me-sublist-bar,
#me-page.me-page--sub-enter #me-content-area,
#me-page.me-page--sub-enter #me-creator-panel:not(.hidden) {
    animation: meSubEnter 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes meSubEnter {
    from { opacity: 0; transform: translateX(18px); }
    to { opacity: 1; transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
    #me-page.me-page--sub-enter #me-sublist-bar,
    #me-page.me-page--sub-enter #me-content-area,
    #me-page.me-page--sub-enter #me-creator-panel:not(.hidden) {
        animation: none;
    }
}

.me-empty-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 0 24px;
}
.me-empty-hint {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.45;
    margin: 0;
    text-align: center;
}

.me-stats-row {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 4px 8px 14px;
    border-bottom: 1px solid var(--border);
}

.me-stat-item {
    text-align: center;
    flex: 1;
    border: none;
    background: none;
    padding: 8px 4px;
    margin: 0;
    color: inherit;
    font: inherit;
    border-radius: 12px;
    -webkit-tap-highlight-color: transparent;
}

.me-stat-item--action {
    cursor: pointer;
}

.me-stat-item--action:active {
    background: rgba(46, 196, 182, 0.08);
}

.me-stat-item--action .me-stat-label::after {
    content: ' ›';
    opacity: 0.4;
    font-weight: 500;
}

.me-stat-item--static {
    cursor: default;
    pointer-events: none;
}

.me-stat-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
}

.me-stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 常用工具：双卡入口，易点、好认 */
.me-tools-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 12px 16px 4px;
    box-sizing: border-box;
}
.me-tools-row--single {
    grid-template-columns: 1fr;
}

.me-tool-card {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 56px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(46, 196, 182, 0.18);
    background: var(--primary-soft, #E6F8F5);
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}
.me-tool-card:active {
    opacity: 0.9;
    transform: scale(0.985);
}
.me-tool-card-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.72);
    color: var(--primary, #2ec4b6);
}
.me-tool-card-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.me-tool-card-title {
    font-size: 14px;
    font-weight: 650;
    line-height: 1.2;
}
.me-tool-card-sub {
    font-size: 11px;
    color: var(--text-muted, #8a93a0);
    line-height: 1.2;
}
.me-tool-card-arrow {
    color: var(--text-muted, #8a93a0);
    font-size: 18px;
    line-height: 1;
}

.me-creator-panel {
    padding: 16px;
    box-sizing: border-box;
}

.me-creator-panel-card {
    padding: 18px 16px 16px;
    border-radius: 18px;
    background: var(--bg-elevated, #fff);
    border: 1px solid var(--border, #e5e8eb);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.me-creator-panel-title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.me-creator-panel-hint {
    margin: 0 0 16px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.45;
}

.me-creator-goto-videos {
    margin-top: 16px;
    min-height: 44px;
    border-radius: 12px;
}

.me-stat-divider {
    width: 1px;
    height: 28px;
    background: var(--border);
}

.me-content-tabs {
    display: flex;
    flex: 1;
    width: 100%;
    border-bottom: none;
    padding: 0;
    min-width: 0;
    background: transparent;
    gap: 0;
}
.me-content-tabs.msg-tabs {
    /* 外层 .me-tab-chrome 已有底边，避免双线 */
    border-bottom: none;
    background: transparent;
}

.me-tab-chrome {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--border);
    position: relative;
    min-height: 44px;
}

/* 批量态：整行只显示「批量管理 + 完成」，不要和四个 Tab 并排 */
.me-tab-chrome.me-tab-chrome--batch .me-content-tabs,
#me-page.me-page--edit .me-content-tabs {
    display: none !important;
}
.me-tab-chrome.me-tab-chrome--batch .me-batch-header,
#me-page.me-page--edit .me-batch-header {
    display: flex !important;
    flex: 1;
    width: 100%;
}
.me-tab-chrome:not(.me-tab-chrome--batch) .me-batch-header,
#me-page:not(.me-page--edit) .me-batch-header {
    display: none !important;
}

/* 批量管理顶栏（学 B 站） */
.me-batch-header {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 44px;
    padding: 0 12px;
    position: relative;
}

.me-batch-header.hidden { display: none !important; }

.me-batch-header-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.me-batch-done-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    color: var(--primary);
    font-size: 15px;
    font-weight: 500;
    padding: 8px 4px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* 各 Tab 内容区顶栏 */
.me-list-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px 4px;
    min-height: 36px;
}

.me-list-toolbar.hidden { display: none; }

.me-toolbar-spacer { flex: 1; }

.me-toolbar-link {
    border: none;
    background: none;
    color: var(--text-secondary);
    font-size: 13px;
    padding: 6px 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.me-toolbar-link:active { color: var(--warning); }

.me-manage-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-size: 13px;
    padding: 6px 4px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.me-manage-btn:active { color: var(--text); }

.me-manage-btn-icon {
    display: inline-flex;
    align-items: center;
    color: var(--text-secondary);
}

.me-edit-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    padding: 0 12px;
    min-height: 44px;
}

.me-edit-bar.hidden { display: none; }

.me-edit-bar-btn {
    border: none;
    background: none;
    color: var(--text);
    font-size: 15px;
    padding: 8px 4px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.me-edit-count {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.me-batch-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(var(--bottom-nav-h, 56px) + env(safe-area-inset-bottom, 0px));
    z-index: 310;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 16px 12px;
    background: var(--bg);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(110%);
    opacity: 0;
    pointer-events: none;
    transition: transform 220ms cubic-bezier(0.32, 0.72, 0, 1), opacity 220ms ease;
}

.me-batch-bar:not(.hidden) {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.me-batch-bar.hidden {
    /* 勿写 display:flex，否则会和全局 .hidden 抢优先级导致布局异常 */
    display: none !important;
    transform: translateY(110%);
    opacity: 0;
    pointer-events: none;
}

.me-batch-select-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    background: none;
    color: var(--text);
    font-size: 15px;
    padding: 8px 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.me-batch-check-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 180ms ease, border-color 180ms ease;
}

.me-batch-check-icon.checked {
    background: var(--primary);
    border-color: var(--primary);
}

.me-batch-check-icon.checked svg path {
    stroke: #fff !important;
}

.me-batch-delete-btn {
    flex-shrink: 0;
    min-width: 72px;
    padding: 8px 20px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--primary);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.me-batch-delete-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.me-batch-delete-btn:not(:disabled):active {
    transform: scale(0.98);
}

.action-sheet-item-danger {
    color: var(--warning) !important;
}

.me-page--edit .me-content-area {
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}

/* ==================== 我的 — B 站风格单行列表 ==================== */
.me-video-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    background: var(--bg);
}

.me-list-section-head {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 14px 12px 8px;
    background: var(--bg);
}

.me-list-section-head:first-child {
    padding-top: 4px;
}

.me-video-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 120ms ease, opacity 220ms ease, transform 220ms ease;
}

.me-video-row:active:not(.me-video-row--batch) {
    background: rgba(255, 255, 255, 0.05);
}

.me-video-row--batch {
    cursor: default;
    align-items: center;
}

.me-video-row.me-row-removing {
    opacity: 0;
    transform: translateX(-8px);
    pointer-events: none;
}

.me-video-list--batch .me-video-row {
    padding-left: 10px;
}

/* 批量：最左侧圆形勾选（学 B 站） */
.me-row-check {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    padding: 0;
    margin: 0;
    border-radius: 50%;
    border: 1.5px solid var(--text-muted);
    background: transparent;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 180ms ease, border-color 180ms ease;
}

.me-row-check.checked {
    background: var(--primary);
    border-color: var(--primary);
}

.me-row-check.checked svg path {
    stroke: #fff !important;
}

/* 封面 + 右侧文案区（文案永远在封面右边） */
.me-row-media {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 8px;
}

.me-row-thumb-wrap {
    position: relative;
    flex-shrink: 0;
    width: 78px;
    height: 44px;
    border-radius: 3px;
    overflow: hidden;
    background: var(--bg-card2);
}

.me-row-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.me-row-duration {
    position: absolute;
    right: 2px;
    bottom: 2px;
    padding: 0 3px;
    border-radius: 2px;
    font-size: 9px;
    line-height: 1.35;
    font-variant-numeric: tabular-nums;
    color: #fff;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2;
}

.me-row-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 2;
}

.me-row-progress-bar {
    height: 100%;
    background: var(--primary);
}

.me-row-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 1px;
}

.me-row-title {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.me-row-author {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.3;
}

.me-row-author-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.me-row-creator-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.02em;
    color: var(--primary);
    background: rgba(46, 196, 182, 0.12);
    border: 1px solid rgba(46, 196, 182, 0.35);
}

.me-row-sub {
    font-size: 11px;
    line-height: 1.35;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.me-row-time {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    line-height: 1.35;
    color: var(--text-muted);
}

.me-row-time svg {
    flex-shrink: 0;
    opacity: 0.65;
}

.me-row-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 1px;
}

.me-row-tag {
    display: inline-block;
    padding: 0 4px;
    border-radius: 2px;
    font-size: 10px;
    line-height: 1.5;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
}

.me-row-tag--warn {
    color: #f5a623;
    background: rgba(245, 166, 35, 0.12);
}

.me-row-tag--danger {
    color: var(--warning);
    background: rgba(46, 196, 182, 0.12);
}

.me-row-menu-btn {
    flex-shrink: 0;
    align-self: center;
    width: 24px;
    height: 32px;
    border: none;
    background: none;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    border-radius: 4px;
    margin: 0 -2px 0 0;
    padding: 0;
}

.me-row-menu-btn:active {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
}

.me-video-row--skeleton {
    pointer-events: none;
}

.me-video-row--skeleton .me-row-media {
    align-items: center;
}

.me-row-skeleton-thumb {
    width: 78px;
    height: 44px;
    border-radius: 3px;
    flex-shrink: 0;
}

.me-grid--edit .me-video-cell {
    cursor: default;
}

.me-cell-select {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.85);
    background: rgba(0, 0, 0, 0.35);
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.me-cell-select.checked {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.06);
}

.me-cell-select.checked svg path {
    stroke: #fff !important;
}

.me-video-cell.me-cell-removing {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 220ms ease, transform 220ms ease;
    pointer-events: none;
}

.me-content-tab {
    flex: 1;
    padding: 12px 8px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: none;
    margin-bottom: 0;
    position: relative;
}

.me-content-tab.active {
    color: var(--primary);
    border-bottom-color: transparent;
    font-weight: 600;
}
.me-content-tab.active::after {
    content: '';
    position: absolute;
    left: 20%;
    right: 20%;
    bottom: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--primary);
}

.me-content-area {
    flex: 0 0 auto;
    padding: 0 0 12px;
    min-height: 0;
}

/* 「我的」整页下滑：内容区随列表增高，覆盖 vh-pane-host 的 overflow:hidden / flex:1 裁切 */
#me-page {
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
}
#me-page .me-content-area.vh-pane-host,
#me-page .me-content-area {
    flex: 0 0 auto !important;
    overflow: visible !important;
    min-height: 0;
    height: auto;
}
#me-page .me-tab-chrome {
    position: sticky;
    top: 0;
    z-index: 12;
    background: var(--bg);
}

.me-loading {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
}

.me-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.me-video-cell {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    background: var(--bg-card);
}

.me-video-menu-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.me-video-menu-btn:active { background: rgba(0, 0, 0, 0.75); }

.me-video-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.me-video-meta {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 6px 8px;
    font-size: 11px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
}

.me-audit-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    background: rgba(0,0,0,0.65);
}

.me-audit-pending { color: var(--warning); }
.me-audit-reject { color: var(--primary); }

.me-user-list { display: flex; flex-direction: column; gap: 0; }

.me-user-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 8px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}

.me-user-row:active { background: var(--bg-card); }

.me-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-card);
}

.me-user-name { font-size: 15px; font-weight: 500; }
.me-user-meta { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

.me-empty {
    text-align: center;
    padding: 40px 16px;
    color: var(--text-muted);
}

.me-load-more { padding: 12px 8px 0; }

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* ==================== 举报 / 编辑资料弹窗 ==================== */
.modal-report {
    max-width: 360px;
}

.modal-edit-profile {
    max-width: 500px;
    padding: 0 0 calc(16px + var(--safe-bottom, 0px));
    background: var(--bg-card);
}

.modal-edit-profile__header {
    padding: 8px 20px 4px;
}

.modal-edit-profile__header h3 {
    font-size: 17px;
    font-weight: 650;
    letter-spacing: 0.01em;
}

.edit-profile-form {
    padding: 8px 20px 4px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.edit-profile-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.edit-profile-field__meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.edit-profile-field__meta label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.edit-profile-count {
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    color: var(--text-muted);
}

.edit-profile-count.is-limit {
    color: var(--danger, #E85D5D);
}

.edit-profile-input,
.modal-edit-profile .edit-bio-input {
    width: 100%;
    margin: 0;
    padding: 14px 16px;
    background: var(--bg-card2);
    border: 1px solid transparent;
    border-radius: 14px;
    color: var(--text);
    font-size: 16px;
    line-height: 1.45;
    outline: none;
    resize: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    box-shadow: none;
}

.modal-edit-profile .edit-bio-input {
    min-height: 96px;
}

.edit-profile-input::placeholder,
.modal-edit-profile .edit-bio-input::placeholder {
    color: var(--text-muted);
}

.edit-profile-input:focus,
.modal-edit-profile .edit-bio-input:focus {
    background: var(--bg-card);
    border-color: rgba(46, 196, 182, 0.55);
    box-shadow: 0 0 0 3px rgba(46, 196, 182, 0.14);
}

.edit-profile-save {
    margin-top: 4px;
    height: 48px;
    font-size: 16px;
}

.report-video-info {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    padding: 0 4px;
}

.report-reasons {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.report-reason-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.report-reason-item:active { background: var(--bg-card); }

.report-desc-wrap { margin-bottom: 12px; }

.report-desc-input,
.edit-bio-input {
    width: 100%;
    min-height: 72px;
    padding: 10px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    resize: vertical;
    outline: none;
}

.report-actions {
    display: flex;
    gap: 10px;
}

.report-actions .btn { flex: 1; }

.feed-more-btn {
    display: none !important;
}

.exchange-active-status {
    margin-top: 4px;
    font-size: 12px;
    color: var(--gold, #FFD700);
    font-weight: 600;
}

/* ==================== Feed 网络错误 ==================== */
.feed-error {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
    z-index: 5;
}

/* ==================== 登录协议勾选 ==================== */
.login-agreement-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}
.login-agreement-check input { margin-top: 2px; flex-shrink: 0; }
.login-agreement-check a { color: var(--primary); text-decoration: none; }

/* ==================== 我的：邀请码 & 设置 ==================== */
.me-invite-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}
.me-invite-count { color: var(--text-secondary); font-size: 12px; flex-shrink: 0; }
.me-invite-sub { color: var(--text-secondary); font-size: 12px; margin: 0 0 10px; }
.invite-card-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.modal-invite-hub { max-width: 420px; max-height: 85vh; overflow-y: auto; }
.invite-hub-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}
.invite-stat-card {
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 12px;
    text-align: center;
}
.invite-stat-value { display: block; font-size: 22px; font-weight: 700; color: var(--primary); }
.invite-stat-value.invite-stat-code { font-size: 16px; font-family: monospace; }
.invite-stat-label { font-size: 11px; color: var(--text-secondary); margin-top: 4px; }
.invite-hub-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.invite-hub-actions .btn { flex: 1; min-width: 90px; }
.invite-hub-section h4 { font-size: 14px; margin: 0 0 8px; }
.invite-hub-empty { font-size: 13px; color: var(--text-secondary); text-align: center; padding: 12px 0; }
.invite-recent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}
.invite-recent-meta { color: var(--text-secondary); font-size: 11px; }
.invite-board-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}
.invite-board-item.is-me { background: rgba(46, 196, 182, 0.08); border-radius: 8px; padding: 8px; }
.invite-board-rank { width: 24px; text-align: center; font-weight: 700; color: var(--text-secondary); }
.invite-board-rank.top-1 { color: #FFD700; }
.invite-board-rank.top-2 { color: #C0C0C0; }
.invite-board-rank.top-3 { color: #CD7F32; }
.invite-board-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: #333; }
.invite-board-info { flex: 1; min-width: 0; }
.invite-board-name { display: block; font-size: 14px; font-weight: 600; }
.invite-board-count { font-size: 12px; color: var(--text-secondary); }
html.wechat-browser body { -webkit-text-size-adjust: 100%; }
html.wechat-ios .login-sheet-panel { padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }

.me-settings-section {
    margin: 4px 16px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.me-settings-section-title {
    padding: 12px 16px 4px;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}
.me-settings-item {
    display: block;
    width: 100%;
    padding: 14px 16px;
    background: none;
    border: none;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    text-align: left;
    font-size: 14px;
    cursor: pointer;
}
.me-settings-item:last-child { border-bottom: none; }
.me-settings-item:active { background: rgba(255,255,255,0.04); }
.me-settings-danger { color: var(--primary); }

.me-audit-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--warning);
    font-weight: 600;
    pointer-events: none;
}
.me-audit-overlay-reject { color: var(--primary); }
.me-audit-overlay-transcode { color: var(--accent-cyan, #25F4EE); }
.me-audit-overlay-fail {
    color: var(--warning);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    pointer-events: auto;
}

.me-user-follow-btn { flex-shrink: 0; }

/* ==================== 合规文档 ==================== */
.modal-legal { max-height: 80vh; display: flex; flex-direction: column; }
.legal-body {
    flex: 1;
    overflow-y: auto;
    padding: 4px 4px 16px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-secondary);
    white-space: pre-wrap;
}

/* ==================== AI 助手 ==================== */
.modal-ai {
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}
.ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    min-height: 240px;
    max-height: 50vh;
}
.ai-message {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.ai-message-user { flex-direction: row-reverse; }
.ai-message-avatar {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--text-secondary);
}
.profile-badge {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin-left: 2px;
}
.ai-message-bubble {
    max-width: 80%;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    background: var(--bg-card);
}
.ai-message-user .ai-message-bubble {
    background: rgba(46, 196, 182, 0.2);
}
.ai-input-bar { display: none; } /* 已迁入 #ai-composer.vh-composer */

/* ==================== 评论增强 ==================== */
.comment-item {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-card);
    flex-shrink: 0;
}
.comment-body { flex: 1; min-width: 0; }
.comment-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}
.comment-delete-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 12px;
    cursor: pointer;
    padding: 0;
}
.comment-load-hint, .comment-loading {
    text-align: center;
    padding: 12px;
    color: var(--text-muted);
    font-size: 12px;
}

/* ==================== 头像预览 ==================== */
.modal-avatar-preview {
    max-width: 320px;
    text-align: center;
    padding-bottom: 16px;
}
.avatar-preview-img {
    width: 100%;
    max-height: 60vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
}

/* ==================== 我的 — 历史 Tab（与作品同款三列网格） ==================== */
.me-history-grid {
    padding: 0 4px 16px;
}
.me-history-section-head {
    grid-column: 1 / -1;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 12px 4px 6px;
    margin: 0;
}
.me-history-section-head:first-child {
    padding-top: 4px;
}
.me-history-cell .me-video-meta {
    padding: 6px 6px 10px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.82));
}
.me-history-cell-title {
    display: block;
    font-size: 11px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.me-history-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    z-index: 2;
    max-width: calc(100% - 12px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.me-history-badge-done {
    color: rgba(255, 255, 255, 0.85);
}
.me-history-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 2;
}
.me-history-progress-bar {
    height: 100%;
    background: var(--primary);
}
/* ==================== 搜索联想 ==================== */
.search-suggest {
    margin-top: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.search-suggest-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
}
.search-suggest-item:last-child { border-bottom: none; }
.search-suggest-item:active { background: var(--bg-input); }
.search-input-wrap:focus-within {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 1px rgba(37, 244, 238, 0.25);
}

/* ==================== Feed 操作面板 ==================== */
.action-sheet {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
}
.action-sheet:not(.hidden) {
    pointer-events: auto;
}
.action-sheet.hidden {
    display: none !important;
    pointer-events: none !important;
    visibility: hidden !important;
}
.action-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.action-sheet-panel {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: var(--bg-card);
    border-radius: 16px 16px 0 0;
    padding: 8px 0 calc(8px + var(--safe-bottom));
    z-index: 1;
    transform: translateY(100%);
    transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}
.action-sheet.open .action-sheet-backdrop { opacity: 1; }
.action-sheet.open .action-sheet-panel { transform: translateY(0); }
.action-sheet-item {
    display: block;
    width: 100%;
    padding: 16px;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 16px;
    text-align: center;
    cursor: pointer;
}
.action-sheet-item:active { background: var(--bg-input); }
.action-sheet-item[data-action="not-interested"] { color: var(--accent-cyan); }
.action-sheet-item[data-action="report"] { color: var(--warning); }
.action-sheet-cancel {
    margin-top: 8px;
    border-top: 8px solid var(--bg);
    color: var(--text-secondary);
}
.action-sheet-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    text-align: left;
    background: transparent;
    color: var(--text);
    box-sizing: border-box;
}
.action-sheet-toggle:active { background: var(--bg-input); }
.action-sheet-toggle-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.action-sheet-toggle-title { font-size: 16px; font-weight: 500; }
.action-sheet-toggle-desc { font-size: 12px; color: var(--text-muted); }

.action-sheet-rate {
    padding: 12px 16px 8px;
    border-bottom: 1px solid var(--border-subtle, rgba(0,0,0,.06));
}
.action-sheet-rate-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
}
.action-sheet-rate-row,
.settings-rate-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.action-sheet-rate-btn,
.settings-rate-btn {
    min-width: 48px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid var(--border, rgba(0,0,0,.08));
    background: var(--bg-input, #f2f4f7);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
}
.action-sheet-rate-btn.is-active,
.settings-rate-btn.is-active {
    border-color: var(--brand, #2EC4B6);
    background: rgba(46, 196, 182, 0.14);
    color: var(--brand, #2EC4B6);
}
.settings-item--rate {
    flex-wrap: wrap;
    align-items: flex-start;
}
.settings-item--rate .settings-rate-row {
    width: 100%;
    margin-top: 10px;
    padding-left: 26px;
}
.settings-item--static {
    cursor: default;
}

/* ==================== 开关控件 ==================== */
.vh-switch-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}
.vh-switch {
    position: relative;
    flex-shrink: 0;
    width: 44px;
    height: 26px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.18);
    transition: background 0.2s ease;
}
.vh-switch-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease;
}
.vh-switch-input:checked + .vh-switch,
.action-sheet-toggle.is-on .vh-switch,
[data-auto-play-toggle].is-on .vh-switch {
    background: var(--primary);
}
.vh-switch-input:checked + .vh-switch .vh-switch-knob,
.action-sheet-toggle.is-on .vh-switch-knob,
[data-auto-play-toggle].is-on .vh-switch-knob {
    transform: translateX(18px);
}
.settings-item--toggle {
    cursor: pointer;
    position: relative;
}
.settings-item--toggle:active { opacity: 1; }
.settings-item-hint {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
}
[data-theme="light"] .vh-switch {
    background: rgba(28, 29, 46, 0.16);
}

.me-nickname-loading {
    background: linear-gradient(90deg, rgba(255,255,255,0.08) 25%, rgba(255,255,255,0.16) 50%, rgba(255,255,255,0.08) 75%);
    background-size: 200% 100%;
    animation: vh-shimmer 1.4s ease-in-out infinite;
    border-radius: 6px;
    color: var(--text-muted);
    min-width: 96px;
    display: inline-block;
}
.me-nickname-loading .profile-badge { display: none; }
[data-theme="light"] .me-nickname-loading {
    background: linear-gradient(90deg, rgba(28,29,46,0.06) 25%, rgba(28,29,46,0.12) 50%, rgba(28,29,46,0.06) 75%);
    background-size: 200% 100%;
    color: var(--text-secondary);
}

.share-user-empty {
    text-align: center;
    padding: 32px 16px;
    color: var(--text-muted);
    font-size: 13px;
}
.share-user-empty .empty-icon { margin-bottom: 8px; }
.share-user-skeleton { display: flex; gap: 12px; padding: 12px 0; pointer-events: none; }
.share-user-skeleton-body { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.record-skeleton { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; pointer-events: none; }
.empty-state.compact { padding: 32px 20px; }

.me-points-balance {
    float: right;
    color: var(--warning);
    font-weight: 600;
}

/* ==================== 骨架屏 shimmer ==================== */
@keyframes vh-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes vh-spin {
    to { transform: rotate(360deg); }
}
/* 品牌 Loading：青圆环旋转 + 红点呼吸 */
@keyframes brand-ring-spin {
    to { transform: rotate(360deg); }
}
@keyframes brand-dot-breathe {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    50% { transform: translate(-50%, -60%) scale(0.8); opacity: 0.7; }
}
@keyframes brand-dot-orbit {
    from { transform: rotate(0deg) translateX(16px) rotate(0deg); }
    to { transform: rotate(360deg) translateX(16px) rotate(-360deg); }
}
.vh-skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.06) 25%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.06) 75%);
    background-size: 200% 100%;
    animation: vh-shimmer 1.2s ease-in-out infinite;
    border-radius: var(--radius-sm);
}
/* 评论半屏浅底：原先白 shimmer 在白底上看不见，只剩分隔线 */
.modal-comments .vh-skeleton,
[data-theme="light"] .vh-skeleton {
    background: linear-gradient(90deg, #e8ecf1 25%, #f3f5f8 50%, #e8ecf1 75%);
    background-size: 200% 100%;
}
.vh-skeleton-line { height: 14px; width: 70%; }
.vh-skeleton-line.lg { height: 18px; width: 85%; }
.vh-skeleton-line.sm { height: 12px; width: 45%; }
.vh-skeleton-circle { width: 36px; height: 36px; border-radius: 50%; }
.vh-skeleton-row { height: 56px; margin-bottom: 12px; border-radius: var(--radius-sm); }
.vh-skeleton-title { height: 16px; width: 96px; margin: 12px 0; }
.vh-skeleton-history-row { height: 72px; margin-bottom: 10px; border-radius: var(--radius-sm); }
.vh-skeleton-list { padding: 8px 16px; }
.me-skeleton-thumb {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: var(--radius-sm);
}
.me-skeleton-thumb.wide { aspect-ratio: 16 / 9; min-width: 140px; }
.me-skeleton-cell { pointer-events: none; }

.vh-loading-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px;
    color: var(--text-muted);
    font-size: 13px;
}
.vh-spinner {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: vh-spin 0.8s linear infinite;
    flex-shrink: 0;
}

/* ==================== 品牌 Loading（高频首屏） ==================== */
.brand-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: var(--text-secondary);
    font-size: 13px;
}
.brand-loading-ring {
    position: relative;
    width: 48px;
    height: 48px;
}
.brand-loading-ring::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 3px solid rgba(37, 244, 238, 0.2);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: brand-ring-spin 1.2s linear infinite;
}
.brand-loading-ring::after {
    content: '';
    position: absolute;
    inset: 6px;
    border: 2px solid rgba(46, 196, 182, 0.15);
    border-radius: 50%;
    animation: brand-ring-spin 1.2s linear infinite reverse;
}
.brand-loading-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    background: var(--primary);
    border-radius: 50%;
    animation: brand-dot-breathe 1.5s ease-in-out infinite;
}
.brand-loading-orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    margin: -2px 0 0 -2px;
    background: var(--accent-cyan);
    border-radius: 50%;
    animation: brand-dot-orbit 1.5s linear infinite;
    opacity: 0.7;
}
.brand-loading-text {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}
.brand-loading .vh-skeleton {
    background: linear-gradient(90deg, rgba(37,244,238,0.08) 25%, rgba(37,244,238,0.15) 50%, rgba(37,244,238,0.08) 75%);
}
.vh-skeleton-line.md { height: 14px; width: 60%; }
.vh-skeleton-circle.sm { width: 32px; height: 32px; }
.vh-skeleton-circle.md { width: 40px; height: 40px; flex-shrink: 0; }
.vh-skeleton-rank { width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; }
.vh-skeleton-line.flex1 { flex: 1; }
.vh-skeleton-line.w48 { width: 48px; flex-shrink: 0; }
.comment-skeleton { display: flex; gap: 10px; padding: 12px 0; pointer-events: none; border-bottom: none; }
.comment-skeleton-body { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.leaderboard-skeleton { display: flex; align-items: center; gap: 10px; }

/* ==================== 浅色模式 — 非 Feed 页补充 ==================== */
[data-theme="light"] .page-header h3 { color: var(--text); }
[data-theme="light"] .notif-item.unread { background: rgba(46, 196, 182, 0.06); border-left-color: var(--primary); }
[data-theme="light"] .settings-item:active { background: var(--bg-card2); }
[data-theme="light"] .me-content-tab.active { color: var(--primary); }
[data-theme="light"] .search-discovery,
[data-theme="light"] #settings-page,
[data-theme="light"] #messages-page,
[data-theme="light"] #me-page { color: var(--text); }
[data-theme="light"] .sheet-handle,
[data-theme="light"] .login-sheet-handle { background: var(--border-medium); }
[data-theme="light"] .login-sheet-title { color: var(--text); }
/* 独立页头用灰底；分段顶栏内工具行由 ui.css 的 under-seg 保持透明 */
[data-theme="light"] .page-header:not(.page-header--under-seg):not(.vh-page-header--under-seg) {
    background: var(--bg);
    border-bottom-color: var(--border);
}
[data-theme="light"] .bottom-nav { background: var(--bg-card); border-top-color: var(--border); }
/* Feed 沉浸模式底栏：按主题保证文字对比度 */
#main-page.main-page--feed-immersive #bottom-nav {
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 500 !important;
}
/* 夜间 + 首页：深底白字 */
#main-page.main-page--feed-immersive #bottom-nav {
    background: rgba(10, 10, 15, 0.96) !important;
    border-top: none !important;
}
#main-page.main-page--feed-immersive #bottom-nav .bottom-nav-item,
#main-page.main-page--feed-immersive #bottom-nav .bottom-nav-label,
#main-page.main-page--feed-immersive #bottom-nav .vh-icon,
#main-page.main-page--feed-immersive #bottom-nav .bottom-nav-icon svg {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    opacity: 1 !important;
}
/* 白天 + 首页：白底深字（解决「白天模式点首页看不到」） */
[data-theme="light"] #main-page.main-page--feed-immersive #bottom-nav {
    background: #FFFFFF !important;
    border-top: 1px solid #E4E7EF !important;
    box-shadow: 0 -2px 12px rgba(28, 29, 46, 0.08);
}
[data-theme="light"] #main-page.main-page--feed-immersive #bottom-nav .bottom-nav-item,
[data-theme="light"] #main-page.main-page--feed-immersive #bottom-nav .bottom-nav-label,
[data-theme="light"] #main-page.main-page--feed-immersive #bottom-nav .vh-icon,
[data-theme="light"] #main-page.main-page--feed-immersive #bottom-nav .bottom-nav-icon svg {
    color: #1C1D2E !important;
    -webkit-text-fill-color: #1C1D2E !important;
}
[data-theme="light"] #main-page.main-page--feed-immersive #bottom-nav .bottom-nav-item.active,
[data-theme="light"] #main-page.main-page--feed-immersive #bottom-nav .bottom-nav-item.active .bottom-nav-label,
[data-theme="light"] #main-page.main-page--feed-immersive #bottom-nav .bottom-nav-item.active .vh-icon,
[data-theme="light"] #main-page.main-page--feed-immersive #bottom-nav .bottom-nav-item.active .bottom-nav-icon svg {
    color: var(--primary) !important;
    -webkit-text-fill-color: var(--primary) !important;
}


/* ===== Feed 顶栏（左：返回?/搜索 | 中：关注|推荐 | 右：更多） ===== */
.feed-top-bar {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 4px);
    left: 0;
    right: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 44px;
    padding: 0 max(4px, env(safe-area-inset-right, 0px)) 0 max(4px, env(safe-area-inset-left, 0px));
    pointer-events: none;
}
.feed-top-bar .feed-mode-tabs {
    /* relative：::after 锚在本元素；左右等宽后自然居中 */
    position: relative;
    left: auto;
    transform: none;
    width: max-content;
    max-width: min(42vw, 160px);
    flex: 0 0 auto;
    z-index: 1;
    /* 仅 Tab 文字可点，避免透明区挡住左右图标 */
    pointer-events: none;
}
.feed-top-bar .feed-mode-tab {
    pointer-events: auto;
}
.feed-top-bar .feed-top-left,
.feed-top-bar .feed-top-right {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 0;
    min-width: 0;
    flex: 1 1 0;
    flex-wrap: nowrap;
    pointer-events: auto;
}
/* 左右等宽占位 → 「关注|推荐」视觉居中 */
.feed-top-bar .feed-top-left {
    justify-content: flex-start;
}
.feed-top-bar .feed-top-right {
    justify-content: flex-end;
}
.feed-top-bar .feed-back-btn,
.feed-top-bar .feed-search-btn,
.feed-top-bar .feed-more-top-btn {
    position: static;
    transform: none;
    flex: 0 0 auto;
    width: 36px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}
.feed-top-bar .feed-back-btn:active,
.feed-top-bar .feed-search-btn:active,
.feed-top-bar .feed-more-top-btn:active {
    transform: scale(0.92);
    opacity: 0.85;
}
.feed-top-bar .feed-back-btn.hidden { display: none !important; }

/* 注意：勿写无条件 display:flex，会压过 .sub-page{display:none} 导致其它 Tab 被顶出半屏空白 */
#discover-page {
    /* 小红书式浅灰底：干净、少渐变噪点 */
    background: #F5F6F8;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
[data-theme="dark"] #discover-page {
    background: var(--bg);
}
#discover-page.active {
    display: flex !important;
    flex-direction: column;
}

.discover-top {
    /* 粘性/底色见 ui.css .vh-page-top */
    padding: 0;
}
/* 发现分段复用 .msg-tabs / .msg-tab，不再单独做胶囊样式 */
.discover-seg.msg-tabs {
    max-width: none;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
}
.discover-seg-btn.msg-tab {
    border-radius: 0;
    box-shadow: none;
}
.discover-seg-btn.msg-tab.active {
    background: transparent;
    box-shadow: none;
}

.discover-pane {
    flex: 1;
    min-height: 0;
}
#discover-page .vh-pane-host {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    position: relative;
    overflow: hidden;
}
#discover-page .discover-pane.vh-pane--during {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: inherit;
}
#discover-page .discover-pane:not(.hidden) {
    display: flex;
    flex-direction: column;
}
.discover-pane--hot {
    padding: 8px 6px 24px;
}
.discover-pane--search {
    padding-bottom: 16px;
}
.discover-search-header {
    position: sticky;
    top: 0;
    z-index: 4;
    background: color-mix(in srgb, var(--bg) 90%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.discover-pull-hint {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    padding: 4px 0 8px;
}

/* ========== 小红书气质瀑布流 ========== */
.discover-waterfall {
    column-count: 2;
    column-gap: 5px;
    padding: 0 2px 12px;
}
@supports (grid-template-rows: masonry) {
    .discover-waterfall {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: masonry;
        column-count: auto;
        gap: 5px;
    }
    .discover-card {
        display: block;
        margin: 0;
        width: auto;
    }
}

.discover-card {
    display: inline-block;
    width: 100%;
    margin: 0 0 5px;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 0;
    box-shadow: none;
    text-align: left;
    padding: 0;
    color: inherit;
    cursor: pointer;
    vertical-align: top;
    -webkit-tap-highlight-color: transparent;
    transition: transform 160ms ease, opacity 160ms ease;
}
[data-theme="dark"] .discover-card {
    background: var(--bg-card);
}
.discover-card:active {
    transform: scale(0.985);
    opacity: 0.96;
}
.discover-card-media {
    position: relative;
    overflow: hidden;
    background: #EEF0F3;
}
.discover-card.ratio-tall .discover-card-media { aspect-ratio: 3 / 4; }
.discover-card.ratio-std .discover-card-media { aspect-ratio: 3 / 3.55; }
.discover-card.ratio-wide .discover-card-media { aspect-ratio: 4 / 3; }
.discover-card.ratio-sq .discover-card-media { aspect-ratio: 1 / 1; }
.discover-card-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 280ms ease, transform 380ms ease;
    background: #EEF0F3;
}
.discover-card-cover.is-ready {
    opacity: 1;
    transform: scale(1);
}
.discover-card-cover.is-broken {
    opacity: 0.4;
    transform: none;
}
.discover-card-cover--empty {
    width: 100%;
    height: 100%;
    min-height: 120px;
    opacity: 1;
    transform: none;
    background: linear-gradient(135deg, #E8EDF2 0%, #F3E9EE 100%);
}
.discover-card-play {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: none;
}
.discover-card-play::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 5px;
    border-style: solid;
    border-width: 4px 0 4px 6px;
    border-color: transparent transparent transparent #fff;
}
.discover-card-body {
    padding: 8px 8px 10px;
}
.discover-card-title {
    margin: 0;
    font-size: 13px;
    line-height: 1.38;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}
[data-theme="dark"] .discover-card-title {
    color: var(--text);
}
.discover-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-top: 7px;
}
.discover-card-author {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    flex: 1;
}
.discover-card-avatar {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #E6E9EE;
}
.discover-card-name {
    font-size: 11px;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
[data-theme="dark"] .discover-card-name {
    color: var(--text-secondary);
}
.discover-card-like {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    font-size: 11px;
    color: #999;
    line-height: 1;
}
.discover-card-like-icon {
    display: inline-flex;
    width: 12px;
    height: 12px;
    opacity: 0.75;
}
.discover-card-like-icon svg {
    width: 12px;
    height: 12px;
}
.discover-hot-loading {
    padding: 0 2px 8px;
}
.discover-hot-empty {
    padding: 48px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}
.discover-hot-empty .btn { margin-top: 12px; }

.discover-skeleton {
    column-count: 2;
    column-gap: 5px;
}
.discover-skel-card {
    display: inline-block;
    width: 100%;
    margin: 0 0 5px;
    break-inside: avoid;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}
[data-theme="dark"] .discover-skel-card {
    background: var(--bg-card);
}
.discover-skel-media {
    background: linear-gradient(90deg, #EEF0F3 25%, #F7F8FA 37%, #EEF0F3 63%);
    background-size: 400% 100%;
    animation: discover-shimmer 1.2s ease infinite;
}
.discover-skel-card.ratio-tall .discover-skel-media { aspect-ratio: 3 / 4; }
.discover-skel-card.ratio-std .discover-skel-media { aspect-ratio: 3 / 3.55; }
.discover-skel-card.ratio-wide .discover-skel-media { aspect-ratio: 4 / 3; }
.discover-skel-card.ratio-sq .discover-skel-media { aspect-ratio: 1 / 1; }
.discover-skel-line {
    height: 10px;
    margin: 10px 8px 0;
    border-radius: 4px;
    background: #EEF0F3;
}
.discover-skel-line.short {
    width: 55%;
    margin: 8px 8px 12px;
}
@keyframes discover-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: 0 0; }
}

/* 兼容旧类名（防止残留引用） */
.discover-hot-section { padding: 0; }
.discover-grid {
    display: block;
}

/* 增长卡 / 分段 Tab / 发布双入口：公共样式见 css/ui.css
   这里只保留页面级差异（如创作数据格子、发布可见性） */

.settings-theme-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* P1: 登录一键/短信折叠 */
.login-sms-toggle {
    margin: 10px 0 4px;
    color: var(--text-muted);
    font-size: 14px;
}
.login-sms-panel {
    margin-top: 12px;
    padding-top: 4px;
    border-top: 1px solid var(--border, rgba(0,0,0,.06));
}
.login-sms-panel.hidden { display: none; }

/* P1: 发布可见性（双入口网格在 ui.css） */
.publish-visibility-row {
    display: flex;
    gap: 8px;
}
.publish-visibility-btn {
    flex: 1;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border, #d8dee6);
    background: var(--bg-input, #f7f9fb);
    font-size: 14px;
    color: var(--text-muted);
}
.publish-visibility-btn.is-active {
    border-color: var(--primary);
    background: var(--primary-soft, #E6F8F5);
    color: var(--primary);
    font-weight: 600;
}
.publish-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.publish-nav .btn { flex: 1 1 auto; min-width: 0; }
#publish-save-draft-btn { flex: 0 0 100%; }

/* P1: 创作数据卡 / 草稿 */
.me-creator-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 8px;
    margin-top: 4px;
}
@media (min-width: 360px) {
    .me-creator-stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
.me-creator-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.me-creator-stat-val {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}
.me-creator-stat-label {
    font-size: 11px;
    color: var(--text-muted);
}
.me-row-tag--private {
    background: rgba(100, 116, 139, 0.15);
    color: var(--text-muted);
}

/* P1: 评论回复/点赞 */
.comment-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.comment-item--reply { padding-left: 44px; }
.comment-like-btn {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px;
    border: none;
    background: none;
    color: var(--text-muted);
    font-size: 11px;
}
.comment-like-btn.liked { color: var(--like, #ff4757); }
.comment-reply-btn,
.comment-delete-btn {
    border: none;
    background: none;
    padding: 0;
    margin-left: 8px;
    font-size: 12px;
    color: var(--text-muted);
}
.comment-author-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 0 5px;
    border-radius: 4px;
    font-size: 10px;
    background: var(--primary-soft, #E6F8F5);
    color: var(--primary);
}
.comment-replies { margin: -4px 0 8px; }
.comment-expand-btn,
.comment-collapse-btn {
    display: block;
    margin: 0 0 8px 44px;
    border: none;
    background: none;
    color: var(--primary);
    font-size: 13px;
    padding: 4px 0;
}
.comment-reply-hint {
    font-size: 12px;
    color: var(--primary);
    padding: 0 2px;
}
.comment-reply-to { color: var(--primary); }
/* 旧 comment-input-wrap 规则已迁入 .vh-composer */

/* P1: 草稿列表 */
.draft-list { max-height: 60vh; overflow-y: auto; }
.draft-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border, rgba(0,0,0,.06));
}
.draft-item-title { font-size: 14px; font-weight: 600; }
.draft-item-meta { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.draft-item-actions { display: flex; flex-direction: column; gap: 4px; }

/* ==================== 短视频进度弹幕 ==================== */
.feed-danmaku-layer {
    position: absolute;
    left: 0;
    right: 72px; /* 避开右侧互动热区 */
    top: 0;
    /* 为底部输入条 + 标题 + 进度条留空，避免飘字压住控件 */
    bottom: calc(120px + var(--safe-bottom, 0px));
    z-index: 12;
    overflow: hidden;
    pointer-events: none;
}
.main-page--feed-immersive .feed-danmaku-layer {
    bottom: calc(108px + var(--bottom-nav-h, 56px) + var(--safe-bottom, 0px));
}
.feed-danmaku-item {
    position: absolute;
    left: 100%;
    white-space: nowrap;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.35;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65), 0 0 6px rgba(0, 0, 0, 0.35);
    pointer-events: none;
    will-change: transform;
    animation-name: feed-danmaku-scroll;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
}
.feed-danmaku-item--mine {
    color: #9EF0E6;
}
@keyframes feed-danmaku-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(calc(-100vw - 100%)); }
}

/*
 * 快手风格弹幕入口 / 输入条
 * - 平时：入口在视频信息区上方左侧（与快手一致，在昵称/标题之上）
 * - 展开：固定输入条贴齐键盘；浅色输入、弱对比按钮
 */
.feed-danmaku-entry-wrap {
    display: none;
    margin: 0 0 10px;
    pointer-events: auto;
}
#feed-page.feed-danmaku-on:not(.feed-danmaku-composing) .feed-danmaku-entry-wrap {
    display: block;
}
.feed-danmaku-entry-local {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    -webkit-tap-highlight-color: transparent;
    opacity: 0.92;
}
.feed-danmaku-entry-local:active { transform: scale(0.94); opacity: 0.85; }
.feed-danmaku-entry-local .vh-icon { display: block; width: 18px; height: 18px; }

.feed-danmaku-composer {
    position: fixed;
    left: max(10px, env(safe-area-inset-left, 0px));
    right: auto;
    bottom: calc(var(--bottom-nav-h, 56px) + env(safe-area-inset-bottom, 0px) + 10px);
    z-index: 190;
    display: none;
    align-items: center;
    gap: 8px;
    width: auto;
    max-width: calc(100vw - 96px - env(safe-area-inset-right, 0px));
    pointer-events: auto;
}
/* 仅展开输入时显示固定条；平时入口用 slide 内 local 按钮 */
.feed-danmaku-composer.feed-danmaku-composer--open {
    display: flex;
    left: max(8px, env(safe-area-inset-left, 0px));
    right: max(8px, env(safe-area-inset-right, 0px));
    bottom: 8px;
    max-width: none;
    width: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 16px 16px 0 0;
    background: rgba(48, 48, 52, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.28);
}
.feed-danmaku-composer.feed-danmaku-composer--kb {
    border-radius: 14px;
    padding: 8px 10px;
}
/* 表情/色板模式：钉在底栏上方，不跟键盘高度动画追跳 */
.feed-danmaku-composer.feed-danmaku-composer--open.feed-danmaku-composer--panel {
    bottom: calc(var(--bottom-nav-h, 56px) + env(safe-area-inset-bottom, 0px) + 8px) !important;
}
.main-page:not(.main-page--feed-immersive) .feed-danmaku-composer.feed-danmaku-composer--open.feed-danmaku-composer--panel {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 8px) !important;
}
.feed-danmaku-main-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
}
.main-page:not(.main-page--feed-immersive) .feed-danmaku-composer.feed-danmaku-composer--open {
    bottom: 8px;
}
.feed-danmaku-composer.hidden { display: none !important; }

/* 展开条左侧入口：图标青绿（写死色值，避免运行态 CSS 未同步时仍显白） */
.feed-danmaku-entry,
.feed-danmaku-composer--open .feed-danmaku-entry {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(46, 196, 182, 0.55);
    border-radius: 50%;
    background: rgba(46, 196, 182, 0.18);
    color: #2EC4B6;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.feed-danmaku-entry:active { transform: scale(0.94); }
.feed-danmaku-entry .vh-icon { display: block; width: 18px; height: 18px; color: inherit; }
.feed-danmaku-entry.feed-danmaku-entry--active,
.feed-danmaku-composer--open .feed-danmaku-entry.feed-danmaku-entry--active {
    opacity: 1;
    color: #2EC4B6;
    border-color: rgba(46, 196, 182, 0.75);
    background: rgba(46, 196, 182, 0.24);
}

.feed-danmaku-editor {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.feed-danmaku-editor.hidden { display: none !important; }
.feed-danmaku-input-wrap {
    flex: 1;
    min-width: 0;
    height: 40px;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0 4px 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.22);
    box-shadow: none;
    box-sizing: border-box;
}
.feed-danmaku-input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: none;
    border-radius: 0;
    padding: 0;
    background: transparent;
    color: #fff;
    font-size: 15px;
    outline: none;
    box-shadow: none;
}
.feed-danmaku-input::placeholder { color: rgba(255, 255, 255, 0.55); }
.feed-danmaku-tool-btn {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: rgba(255, 255, 255, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.feed-danmaku-tool-btn.is-active {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}
.feed-danmaku-tool-btn:active { transform: scale(0.92); opacity: 0.9; }
.feed-danmaku-send,
.feed-danmaku-composer--open .feed-danmaku-send {
    flex-shrink: 0;
    height: 40px;
    min-width: 64px;
    padding: 0 16px;
    border: 1px solid rgba(46, 196, 182, 0.55);
    border-radius: 20px;
    background: rgba(46, 196, 182, 0.22);
    color: #2EC4B6;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    appearance: none;
}
.feed-danmaku-send:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.feed-danmaku-send:active { transform: scale(0.96); opacity: 0.9; }

.feed-danmaku-panel {
    width: 100%;
    max-height: 132px;
    overflow: auto;
    padding: 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: none;
    -webkit-overflow-scrolling: touch;
}
.feed-danmaku-panel.hidden { display: none !important; }
.feed-danmaku-emoji-panel {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
}
.feed-danmaku-emoji-item {
    height: 36px;
    border: none;
    border-radius: 8px;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.feed-danmaku-emoji-item:active { background: rgba(255, 255, 255, 0.12); }
.feed-danmaku-color-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.feed-danmaku-color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.25);
    padding: 0;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
    -webkit-tap-highlight-color: transparent;
}
.feed-danmaku-color-swatch--light {
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
}
.feed-danmaku-color-swatch.is-active {
    border-color: #fff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.45);
}

/* 平时入口在 overlay 内，不再给整块 overlay 左缩进 */
#feed-page.feed-danmaku-composing .feed-progress {
    pointer-events: none;
}
#feed-page.feed-page--mini .feed-danmaku-layer,
#feed-page.feed-page--mini .feed-danmaku-composer,
#feed-page.feed-page--mini .feed-danmaku-entry-wrap {
    display: none !important;
}
