/* ==========================================================================
   1. ROOT VARIABLES & GLOBAL RESET (全局变量与重置)
   ========================================================================== */
:root {
    --bg-color: #f5f5f5;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --dot-color: #dcdcdc;
    --text-color: #666;
    --placeholder-bg: #e6e6e6;
    --app-icon-default: #cccccc;
    --app-icon-size: 62px;

    /* Dock 颜色 (带磨砂感) */
    --dock-bg: rgba(208, 208, 208, 0.7);

    /* 汽水音乐主题色 */
    --soda-yellow: #fce76d;
    --soda-dark: #121212;

    font-family: var(--font-family);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* 禁止双击缩放 */
    -webkit-tap-highlight-color: transparent;
    /* 禁止长按选中文字 (像原生APP一样) */
    -webkit-user-select: none;
    user-select: none;
}

/* 允许输入框被选中 */
input,
textarea,
[contenteditable="true"] {
    -webkit-user-select: text;
    user-select: text;
}

html {
    -webkit-text-size-adjust: 100%;
    height: 100dvh;
}

body {
    margin: 0;
    font-family: 'bulangni', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-weight: normal;
    background-color: #f0f2f5;
    height: 100%;
    overflow: hidden;
}

/* iOS风输入框样式 */
[contenteditable="true"] {
    background-color: rgba(235, 235, 240, 0.8);
    border-radius: 6px;
    padding: 2px 6px;
    caret-color: #007aff;
    min-width: 20px;
    cursor: text;
    transition: background-color 0.2s;
}

[contenteditable="true"]:focus {
    background-color: rgba(225, 225, 230, 0.9);
    outline: none;
}

html,
body,
div,
span,
p,
a,
button,
input,
textarea {
    -webkit-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
    -moz-text-size-adjust: 100% !important;
}

/* ==========================================================================
   2. PHONE CONTAINER & LAYOUT (手机容器与布局)
   ========================================================================== */
.phone-screen {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    overscroll-behavior: none;
}

.phone-screen::before {
    content: '';
    position: fixed !important;
    top: -20px;
    left: -20px;
    width: calc(100% + 40px);
    height: calc(100% + 40px);
    z-index: -1;
    background-image: var(--wall-url, none);
    background-color: #8e8e93;
    background-size: cover;
    background-position: center;

    /* 特效滤镜 */
    filter: blur(var(--bg-blur, 0px)) brightness(var(--bg-dim, 100%));
    transition: filter 0.3s ease, background-image 0.3s ease;
}

.phone-screen::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(circle, transparent 60%, rgba(0, 0, 0, var(--bg-vignette, 0)) 100%);
    transition: background 0.2s;
}

/* 桌面内容容器 */
.desktop-content {
    padding: 90px 20px 120px 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* STATUS BAR & HOME BAR (状态栏与底部条) */
.status-bar {
    height: 47px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 26px 0 26px;
    font-size: 15px;
    font-weight: 600;
    color: #000;
    z-index: 1000;
    position: fixed;
    top: 0;
    width: 100%;
    pointer-events: none;
}

.status-left {
    display: flex;
    align-items: center;
    gap: 4px;
}

.status-star {
    font-size: 12px;
    margin-top: 1px;
    pointer-events: auto;
    cursor: text;
}

.right-icons {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-icon {
    height: 18px;
    width: auto;
    display: block;
}

.icon-battery {
    height: 26px;
}

.home-bar {
    position: fixed;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 130px;
    height: 5px;
    background-color: #000;
    border-radius: 3px;
    z-index: 1001;
    cursor: pointer;
}

/* 隐形大按钮 */
.home-bar.hidden-mode {
    bottom: 10px;
    width: 200px;
    height: 30px;
    background-color: transparent !important;
    padding: 10px;
}

.home-bar:active {
    background-color: #555;
}

/* =========================================
  升级版：淡淡Ins风毛玻璃门禁
   ========================================= */
#activation-gate {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    /* 【核心改动】背景变半透明+超级毛玻璃 */
    background: rgba(255, 255, 255, 0.3);
    /* 淡淡的白色遮罩 */
    backdrop-filter: blur(35px);
    /* 强力模糊后面的背景 */
    -webkit-backdrop-filter: blur(35px);
    /* 兼容苹果手机 */
    z-index: 9999999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    animation: fadeIn 0.5s ease;
    /* 加个淡入动画 */
}

/* Logo 图片 */
.ins-logo img {
    width: 80px;
    height: 80px;
    margin-bottom: 25px;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.1));
    /* Logo投影加深一点 */
}

.ins-title {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a1a;
    /* 字体颜色加深一点点 */
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.ins-subtitle {
    font-size: 15px;
    color: #666;
    margin-bottom: 35px;
}

/* 输入框样式优化 */
.ins-input-wrapper {
    width: 100%;
    margin-bottom: 18px;
}

#activation-input {
    width: 100%;
    padding: 16px;
    background: #f0f2f5;
    /* 稍微深一点的灰底，不用边框了 */
    border: none;
    border-radius: 12px;
    font-size: 16px;
    color: #1a1a1a;
    outline: none;
    transition: all 0.3s;
    text-align: center;
    /* 文字居中输入更好看 */
    font-weight: 500;
}

/* 输入框聚焦时 - 变成蓝色光圈 */
#activation-input:focus {
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 149, 246, 0.3);
    /* Ins蓝光圈 */
}

#gate-error {
    color: #ed4956;
    font-size: 13px;
    margin-top: 20px;
    display: none;
    font-weight: 600;
    animation: shake 0.4s ease-in-out;
}

.ins-footer {
    position: absolute;
    bottom: 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    opacity: 0.8;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
    /* 加点文字描边防背景太花 */
}

.from-text {
    font-size: 13px;
    color: #666;
}

.brand-text {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    letter-spacing: 1px;
    margin-top: 4px;
}

/* 进场和摇晃动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-6px);
    }

    75% {
        transform: translateX(6px);
    }
}

.ins-logo img {
    width: 80px;
    height: 80px;
    margin-bottom: 25px;
    border-radius: 24px;
    object-fit: cover;
    /* 【新加】保证照片填满圆形不变形 */
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.2));
    /* 投影稍微加深一点点 */
}

/* 按钮样式 (改成高级深灰渐变) */
.gate-btn {
    width: 100%;
    padding: 16px 0;
    /* 【核心改动】背景色换成深灰渐变 */
    background: linear-gradient(45deg, #333333, #5a5a5a);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    /* 【核心改动】投影也换成黑色系的 */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.gate-btn:active {
    transform: scale(0.98);
    background: linear-gradient(45deg, #222222, #444444);
    /* 按下时更深 */
}

/* 禁用状态 (比如验证中) */
.gate-btn:disabled {
    background: #999999;
    /* 变成浅灰色 */
    box-shadow: none;
    cursor: not-allowed;
}

/* ==========================================================================
   3. DESKTOP WIDGETS (桌面与组件)
   ========================================================================== */
/* APP 图标 */
.app-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    row-gap: 20px;
    column-gap: 15px;
    margin-top: 15px;
    padding: 0 10px;
    width: 100%;
}

.app-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: transform 0.1s;
}

.app-item:active {
    transform: scale(0.95);
}

.app-icon {
    width: var(--app-icon-size);
    height: var(--app-icon-size);
    border-radius: 14px;
    object-fit: cover;
    box-shadow:
        0 4px 10px rgba(0, 0, 0, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    transition: transform 0.1s ease, filter 0.2s;
    background-color: #000;

    /* ★★★ 加这两句！ ★★★ */
    position: relative;
    /* 让红点贴着我，别乱跑 */
    overflow: visible;
    /* 允许红点凸出去，别被切掉了 */
}

/* 图标光泽感 */
.app-name {
    font-size: 11px;
    color: #333;
    text-align: center;
    cursor: pointer;
}

.search-pill {
    margin: 10px auto 0;
    background: rgba(255, 255, 255, 0.5);
    padding: 4px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #555;
    backdrop-filter: blur(10px);
    cursor: pointer;
    width: fit-content;
}

/* Dock */
.dock {
    position: absolute;
    bottom: 15px;
    left: 15px;
    right: 15px;
    height: 100px;
    background: var(--dock-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 38px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
    z-index: 50;
}

/* Page 3: 第三页组件 */
.widgy-container {
    width: 100%;
    padding: 6px 6px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 顶部大卡片 */
.widgy-large-card {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.w-top-part {
    display: flex;
    align-items: center;
    gap: 10px;
}

.w-mini-cover {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.w-star-icon {
    font-size: 14px;
    color: #555;
}

.w-bottom-part {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.w-thumb-item {
    flex: 1;
    aspect-ratio: 1/1;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
}

/* 中间区域 */
.widgy-mid-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 11px;
}

/* 左边的大方块 */
.big-photo-widget {
    width: 50%;
    aspect-ratio: 1/1;
    background: #fff;
    border-radius: 24px;
    position: relative;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
    background-size: cover;
    background-position: center;
    overflow: visible !important;
}

.photo-tag {
    position: absolute;
    bottom: 10px;
    left: 12px;
    font-size: 10px;
    color: #888;
    background: rgba(255, 255, 255, 0.9);
    padding: 3px 8px;
    border-radius: 6px;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.widgy-small-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    row-gap: 15px;
    column-gap: 7px;
    align-content: start;
    padding-top: 5px;
}

/* 底部 App */
.app-grid {
    display: flex;
    justify-content: space-between;
    padding: -1px 10px;
}

/* ins风圆形头像组件 */
.fav-contacts-widget {
    background: transparent !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
    border: none !important;
    margin: 30px 0 10px 0;

    padding: 0 15px !important;
    width: 100%;
}

.fav-list {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.fav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 54px;
    position: relative;
}

.fav-avatar-box {
    position: relative;
    width: 45px;
    height: 44px;
    margin-bottom: 5px;
    z-index: 10;
}

.fav-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: transparent;
    background-size: cover;
    background-position: center;
    position: relative;
    z-index: 5;
    cursor: pointer;
}

.fav-frame {
    position: absolute;
    top: -5.4px;
    left: -5.4px;
    width: 124%;
    height: 124%;
    pointer-events: none;
    opacity: 0.2;
    z-index: 20;
}

.fav-name {
    width: 100%;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 8px;
    color: #333;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
    outline: none;
    padding: 0;
    margin-top: 2px;
    font-weight: 500;
}

/* =========================================
  Top Widgets 底部水印样式
   ========================================= */
.tw-bottom-label {
    position: absolute;
    bottom: -20px;
    /* 距离底部 6像素 */
    left: 50%;
    transform: translateX(-50%);
    /* 绝对居中 */
    font-size: 12px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.5);
    /* 淡淡的灰色 */
    pointer-events: none;
    /* 不挡点击 */
    font-family: -apple-system, sans-serif;
    z-index: 10;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* NEW DESKTOP SWIPER  */
/* 桌面容器 */
.desktop-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.desktop-wrapper::-webkit-scrollbar {
    display: none;
}

/* 页面布局 */
.desktop-page {
    min-width: 100%;
    height: 100%;
    scroll-snap-align: start;
    padding: 60px 20px 150px 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 底部控制区 */
.desktop-footer-controls {
    position: absolute;
    bottom: 130px;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 80;
    pointer-events: none;
}

.desktop-footer-controls .search-pill {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.desktop-pagination {
    display: flex;
    gap: 8px;
    pointer-events: auto;
}

.d-dot {
    width: 7px;
    height: 7px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    transition: all 0.3s;
}

.d-dot.active {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* 日历组件 */
.calendar-widget {
    background: #FFFFFF;
    width: 100%;
    border-radius: 20px;
    padding: 13px 18px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.cal-date-big {
    font-size: 42px;
    font-family: 'Times New Roman', serif;
    color: #343434;
    line-height: 1;
    letter-spacing: -1px;
}

.cal-day-text {
    font-size: 14px;
    color: #151515;
    margin-top: 4px;
    margin-left: 2px;
    font-weight: 500;
}

.cal-text-area {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    max-width: 60%;
}

.cal-sub-text {
    font-size: 11px;
    margin-bottom: 2px;
}

.cal-main-text {
    font-size: 12px;
    color: #444;
    font-weight: 500;
    line-height: 1.4;
}

.cal-photo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    height: 220px;
}

.cal-photo-item {
    background-color: #e0e0e0;
    border-radius: 23px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background-size: cover;
    background-position: center;
    transition: transform 0.1s;
    border: 1px solid transparent;
}

.cal-photo-item:active {
    transform: scale(0.96);
    border: 2px dashed #F1F1F1;
}

.wave-box {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 3px;
    align-items: center;
    height: 20px;
    padding: 0 12px;
    background: rgba(60, 60, 60, 0.5);
    backdrop-filter: blur(5px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.wave-bar {
    width: 3px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 2px;
    animation: waveJump 1s infinite ease-in-out;
}

.wave-bar:nth-child(1) {
    height: 6px;
    animation-delay: 0s;
}

.wave-bar:nth-child(2) {
    height: 10px;
    animation-delay: 0.2s;
}

.wave-bar:nth-child(3) {
    height: 5px;
    animation-delay: 0.4s;
}

@keyframes waveJump {

    0%,
    100% {
        height: 4px;
    }

    50% {
        height: 12px;
    }
}

/* 2x2：APP矩阵 */
.p3-app-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 25px;
}

/* App 组外容器：半透明正方形 */
.p3-app-group-container {
    width: 175px;
    height: 175px;
    background: rgba(255, 255, 255, 0.3);
    /* 半透明背景 */
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 内部网格微调 */
.p3-app-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    row-gap: 0.5px;
    /* 调大这个，上下就宽裕了 */
    column-gap: 7px;
    /* 调大这个，左右就分开了 */
    padding: 10px;
}

.p3-app-grid .app-item {
    gap: 2px !important;
}

/* ============================================================
   page-2 组件
   ============================================================ */
.twp-widget-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 0 0 8px 0;
    height: 340px;
    width: 100%;
    max-width: 350px;

    margin: 0 auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.twp-header-bg {
    width: 100%;
    height: 140px;
    background-size: cover;
    background-position: center;
    mask-image: linear-gradient(to bottom, black 20%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 20%, transparent 100%);
    opacity: 0.9;
}

.twp-profile-section {
    margin-top: -95px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    gap: 0px;
    pointer-events: none;
}

.twp-profile-section>* {
    pointer-events: auto;
}

.twp-header-bg {
    width: 100%;
    height: 140px;
    background-size: cover;
    background-position: center;
    mask-image: linear-gradient(to bottom, black 20%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 20%, transparent 100%);
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

/* 昵称字号改很小 */
.twp-name {
    font-size: 10px;
    font-weight: 800;
    color: #000;
    margin-bottom: 2px;
    letter-spacing: 0.5px;
}

.twp-avatar-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

.twp-quote-box {
    width: 18px;
    height: 18px;
    background: #e9e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

.twp-quote-box span {
    font-family: serif;
    font-size: 16px;
    color: #8a7c7c;
    line-height: 1;
    margin-top: 4px;
}

.twp-main-avatar {
    width: 68px;
    height: 68px;
    border-radius: 14px;
    background-color: #f0f0f0;
    background-size: cover;
    background-position: center;
    border: 3px solid #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.twp-id {
    font-size: 12px;
    /* 变小 */
    color: #888;
    font-weight: 700;
    margin-top: 4px;
    letter-spacing: 0.5px;
}

/* 搜索栏 */
.twp-search-bar {
    width: 85%;
    margin: 4px auto 8px;
    height: 28px;
    background: #ffffff;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #bbb;
    font-size: 8px;
    font-weight: 600;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.03);
}

.twp-search-icon {
    width: 14px;
    height: 14px;
    fill: #bbb;
}

/* 聊天消息区 */
.twp-chat-area {
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 12px;
}

.twp-msg-row {
    display: flex;
    align-items: flex-end;
    gap: 6px;
}

.twp-msg-row.right {
    justify-content: flex-end;
}

.twp-msg-row.left {
    justify-content: flex-start;
    align-items: flex-start;
    margin-top: 2px;
}

.twp-msg-row.right .twp-time {
    font-size: 8px;
    color: #333;
    font-weight: 500;
    margin-bottom: 4px;
}

/* 气泡 */
.twp-bubble {
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 600;
    position: relative;
    border: 0.8px solid rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.twp-bubble.pink {
    background: #fff5f5;
    color: #333;
}

.twp-bubble.white {
    background: #fff;
    color: #333;
}

/* 左侧消息结构 */
.twp-chat-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 0.5px solid rgba(0, 0, 0, 0.1);
    margin-top: 2px;
    flex-shrink: 0;
}

.twp-msg-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
    min-width: 0;
}

.twp-sender-name {
    font-size: 8px;
    color: #666;
    margin-bottom: 1px;
    margin-left: 4px;
    font-weight: 500;
}

.twp-bubble-group-left {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    max-width: 100%;
}

.twp-read-status {
    font-size: 8px;
    color: #999;
    margin-bottom: 2px;
    white-space: nowrap;
}

.twp-gallery-grid {
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
}

.twp-gallery-item {
    width: 31%;
    aspect-ratio: 4/3;
    background-color: #eee;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    border: 1.5px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    position: relative;
}

.twp-gallery-item::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    border: 0.5px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    pointer-events: none;
}

/* 外部标签 (平面) */
.twp-footer-label {
    text-align: center;
    font-size: 12px;
    font-weight: 400;
    color: #555;
    margin-top: 5px;
    letter-spacing: 0.5px;
    text-shadow: none;
}

.twp-split-layout {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    max-width: 350px;

    margin: 30px auto 0;
    padding: 0 2px;
}

/* 左侧：组合组件 */
.twp-combo-widget {
    width: 45%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 上半部分：头像行 */
.tcw-profile-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 2px;
}

.tcw-avatar-box {
    position: relative;
    width: 46px;
    height: 46px;
}

.tcw-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 2px solid #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.tcw-status-icon {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #fff;
    padding: 2px;
    border-radius: 50%;
    font-size: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.tcw-add-icon {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 14px;
    height: 14px;
    background: #333;
    color: #fff;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #fff;
}

.tcw-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tcw-name {
    font-size: 13px;
    font-weight: 700;
    color: #333;
    white-space: nowrap;
}

.tcw-date {
    font-size: 9px;
    color: #999;
    margin-top: 2px;
}

/* 下半部分：音乐卡片 */
.tcw-music-card {
    background: linear-gradient(to bottom right, #e8e8e8 0%, #ffffff 100%);

    border-radius: 16px;
    padding: 4px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
    border: none;
    width: 100%;
}

.tmc-top {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.tmc-cover {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
}

.tmc-content {
    flex: 1;
    overflow: hidden;
}

.tmc-title {
    font-size: 11px;
    font-weight: 700;
    color: #333;
    margin-bottom: 2px;
}

.tmc-lyric {
    font-size: 9px;
    color: #555;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tmc-mid {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tmc-progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: #555;
}

.tmc-bar-bg {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 2px;
    overflow: hidden;
}

.tmc-bar-fill {
    width: 59%;
    height: 100%;
    background: #555;
}

.tmc-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tmc-birthday {
    font-size: 8px;
    color: #666;
    font-family: monospace;
}

.tmc-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.tmc-controls svg {
    width: 12px;
    height: 12px;
    cursor: pointer;
}

.social-card-mini {
    width: 100%;
    max-width: 350px;

    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 20px;
    padding: 12px 15px;
    aspect-ratio: 2.1 / 1;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* 顶部装饰 */
.card-header {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    color: #eee;
    font-size: 12px;
    margin-bottom: 4px;
}

/* 主体区域 */
.card-body {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 12px;
}

/* 头像：等比例缩小 */
.avatar-wrapper {
    position: relative;
    width: 54px;
    height: 54px;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background-color: #dcdcdc;
    /* 纯灰色块 */
    border-radius: 14px;
}

.wing {
    position: absolute;
    width: 14px;
    height: 14px;
    background: #f8f8f8;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    z-index: -1;
}

.wing-left {
    left: -6px;
}

.wing-right {
    right: -6px;
}

/* 气泡文字 */
.content-bubble {
    background: #fcfcfc;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 11px;
    color: #555;
    line-height: 1.4;
    border: 1px solid #f5f5f5;
    flex: 1;
}

/* 底部功能区 */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 8px;
}

.user-info {
    display: flex;
    flex-direction: column;
    border-left: 2px solid #7a94e0;
    padding-left: 8px;
}

.username {
    font-size: 12px;
    font-weight: bold;
    color: #444;
}

.user-id {
    font-size: 9px;
    color: #bbb;
}

.action-buttons {
    display: flex;
    gap: 4px;
    background: #f7f7f7;
    padding: 3px 8px;
    border-radius: 15px;
}

.btn {
    border: none;
    background: none;
    font-size: 10px;
    color: #888;
    cursor: pointer;
}

/* 新增：桌面横向分栏（左大图右App，或左App右大图） */
.desktop-row-split {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    max-width: 350px;
    /* 锁死最大宽度，防止变形 */
    margin: 0 auto;
    gap: 15px;
}

.desktop-row-split .p3-app-grid {
    padding: 0 !important;
    gap: 15px !important;
}

.app-icon {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* ==========================================================================
   4. APP WINDOWS SYSTEM (窗口系统)
   ========================================================================== */
.app-window,
.sub-page-root {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 999;
    display: none;
    flex-direction: column;
    animation: openApp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    overflow: hidden;
}

@keyframes openApp {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.sub-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    background: #f2f2f7;
    z-index: 20000 !important;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overscroll-behavior: none;
}

.sub-page.active {
    transform: translateX(0);
}

.sub-header {
    height: 88px;
    background: #f2f2f7;
    padding-top: 60px;
    display: flex;
    align-items: center;
    padding-left: 8px;
    border-bottom: 0.5px solid #c6c6c8;
    font-weight: 600;
    font-size: 17px;
}

.back-btn {
    padding: 10px;
    color: #007aff;
    cursor: pointer;
    font-weight: normal;
    font-size: 17px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.sub-content {
    padding: 20px 16px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   5. WECHAT CORE (微信与部分子页面)
   ========================================================================== */
/* 微信顶栏  */
.wx-header {
    background: #F8F9F8;
    padding: 60px 16px 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 50;
    position: relative;
    border-bottom: 1px solid #eeecea;
}

.wx-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wx-h-left {
    position: relative;
}

.wx-small-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #eee;
    background-size: cover;
    background-position: center;
    border: 2px solid #eeecea;
}

/* 搜索框 */
.wx-search-bar {
    background: #fffffe;
    height: 33px;
    border-radius: 11px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    color: #666;
    font-size: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.wx-search-icon {
    width: 20px;
    height: 16px;
    fill: #888;
}

.wx-content-area {
    flex: 1;
    background: #fff;
    overflow-y: auto;
}

/* 聊天切换栏 */
.wx-blink-tabs {
    display: flex;
    background: #fff;
    border-radius: 20px;
    padding: 4px;
    gap: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.blink-tab {
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    color: #999;
    cursor: pointer;
    transition: all 0.2s;
}

.blink-tab.active {
    background: #333;
    color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* 底部悬浮Tab */
.wx-tab-bar {
    height: 65px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 0.5px solid rgba(0, 0, 0, 0.1);
    position: absolute;
    left: 0;
    right: 0;
    border-radius: 0;
    bottom: 30px;
    left: 20px;
    right: 20px;
    border-radius: 35px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    padding-top: 10px;
    z-index: 9999 !important;
}

.wx-tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 60px;
    cursor: pointer;
    transition: transform 0.1s;
}

.wx-tab-item:active {
    transform: scale(0.95);
}

.wx-tab-icon svg {
    fill: #B0B0B0 !important;
    width: 26px !important;
    height: 26px !important;
    display: block !important;
    transition: fill 0.2s ease;
}

.wx-tab-item span {
    display: block !important;
    font-size: 10px;
    font-weight: 500;
    color: #B0B0B0;
    transition: color 0.2s ease;
}

.wx-tab-item.active .wx-tab-icon svg {
    fill: #007aff !important;
}

.wx-tab-item.active span {
    color: #007aff;
}

/* 右上角菜单 */
.wx-dropdown-menu {
    position: absolute;
    top: 45px;
    right: 10px;
    background: #4c4c4c;
    color: #fff;
    border-radius: 6px;
    width: 150px;
    padding: 5px 0;
    display: none;
    flex-direction: column;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 200;
}

.wx-dropdown-menu::after {
    content: '';
    position: absolute;
    top: -6px;
    right: 10px;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #4c4c4c;
}

.wx-dropdown-menu.active {
    display: flex;
    animation: fadeIn 0.2s;
}

.wx-dd-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    font-size: 14px;
    cursor: pointer;
}

.wx-dd-item:active {
    background: rgba(255, 255, 255, 0.1);
}

.wx-dd-item svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

.wx-dd-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 10px;
}

/* 底部选择 Sheet */
.selector-sheet {
    background: #fff;
    width: 100%;
    border-radius: 20px 20px 0 0;
    max-height: 70%;
    display: flex;
    flex-direction: column;
    padding-bottom: 20px;
    animation: slideUp 0.3s ease;
}

.sheet-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.sheet-content {
    overflow-y: auto;
    padding: 0;
}

.sheet-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #f9f9f9;
    cursor: pointer;
}

.sheet-item:active {
    background: #f5f5f5;
}

.sheet-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #eee;
    margin-right: 12px;
    background-size: cover;
    background-position: center;
}

.sheet-name {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.sheet-skip-btn {
    text-align: center;
    padding: 15px;
    color: #999;
    font-size: 14px;
    cursor: pointer;
    border-top: 5px solid #f5f5f5;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

/* === 朋友圈/发现页 === */
.ins-layout {
    display: none;
    background: #fff;
    height: 100%;
    overflow-y: auto;
    padding-top: 85px;
    padding-bottom: 90px;
}

.ins-header-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 20px 10px 20px;
}

.ins-avatar-container {
    position: relative;
    margin-bottom: 15px;
}

.ins-mood-bubble {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    color: #333;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    border: 0.5px solid rgba(0, 0, 0, 0.05);
    z-index: 5;
    animation: floatBubble 3s ease-in-out infinite;
}

.ins-mood-bubble::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: #fff;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.05);
    border-right: 0.5px solid rgba(0, 0, 0, 0.05);
}

.ins-big-avatar {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background-color: #f0f0f0;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.ins-info {
    text-align: center;
    margin-bottom: 15px;
}

.ins-name {
    font-size: 18px;
    font-weight: 700;
    color: #000;
    margin-bottom: 4px;
}

.ins-bio {
    font-size: 13px;
    color: #333;
    line-height: 1.4;
}

.ins-stats {
    display: flex;
    gap: 40px;
    text-align: center;
    margin-bottom: 20px;
}

.ins-stat-item b {
    font-size: 16px;
    color: #000;
}

.ins-stat-item span {
    font-size: 12px;
    color: #666;
}

.ins-btn-row {
    display: flex;
    gap: 8px;
    width: 100%;
    justify-content: center;
    margin-bottom: 10px;
}

.ins-btn {
    background: #f0f0f0;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #000;
    cursor: pointer;
}

.ins-btn.primary {
    background: #f0f0f0;
    flex: 1;
    max-width: 120px;
    text-align: center;
}

.ins-btn.icon-btn {
    padding: 8px 10px;
}

.ins-highlights-scroll {
    display: flex;
    overflow-x: auto;
    padding: 10px 15px;
    gap: 15px;
    scrollbar-width: none;
}

.ins-highlights-scroll::-webkit-scrollbar {
    display: none;
}

.ins-highlight-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.ins-highlight-circle {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background-color: #fafafa;
    border: 1px solid #ddd;
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ins-highlight-circle.plus-btn {
    border: 1px solid #333;
    background: #fff;
}

.ins-highlight-circle.plus-btn svg {
    width: 24px;
    height: 24px;
    fill: #333;
}

.ins-highlight-text {
    font-size: 11px;
    color: #333;
}

.ins-feed-area {
    border-top: 1px solid #f0f0f0;
    margin-top: 10px;
}

.ins-feed-tabs {
    display: flex;
    justify-content: space-around;
    height: 44px;
    align-items: center;
}

.ins-tab svg {
    width: 24px;
    height: 24px;
    fill: #ccc;
}

.ins-tab.active svg {
    fill: #000;
}

.ins-photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
}

.ins-grid-item {
    aspect-ratio: 1/1;
    background-color: #f0f0f0;
    background-size: cover;
    background-position: center;
}

/* === Moments Feed Style (仿 Ins Feed) === */
.moment-card {
    background: #fff;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.m-card-header {
    display: flex;
    align-items: center;
    padding: 10px 15px;
}

.m-card-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    margin-right: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.m-card-user {
    font-size: 14px;
    font-weight: 600;
    color: #262626;
}

.m-card-more {
    margin-left: auto;
    color: #333;
    cursor: pointer;
}

/* 配图区域 */
.m-card-media {
    width: 100%;
    margin-bottom: 10px;
}

.m-single-img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 400px;
    object-fit: cover;
}

/* 交互按钮栏 */
.m-action-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 5px 15px;
}

.m-icon-btn {
    cursor: pointer;
    transition: transform 0.1s;
}

.m-icon-btn:active {
    transform: scale(0.9);
}

.m-icon-btn svg {
    width: 24px;
    height: 24px;
    fill: #262626;
}

.m-icon-btn.liked svg {
    fill: #ff3b30;
    stroke: none;
}

/* 文字与评论区 */
.m-content-area {
    padding: 0 15px;
    margin-top: 8px;
}

.m-likes-count {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #262626;
}

.m-caption {
    font-size: 13px;
    line-height: 1.4;
    color: #262626;
    margin-bottom: 6px;
}

.m-caption-user {
    font-weight: 600;
    margin-right: 5px;
}

.m-time {
    font-size: 10px;
    color: #8e8e93;
    text-transform: uppercase;
    margin-top: 4px;
}

/* === Post Creator Style === */
.post-option-row {
    display: flex;
    align-items: center;
    padding: 15px 5px;
    border-bottom: 1px solid #f9f9f9;
    cursor: pointer;
}

.p-opt-icon {
    width: 24px;
    font-size: 18px;
    margin-right: 10px;
    text-align: center;
}

.p-opt-text {
    font-size: 15px;
    color: #333;
    flex: 1;
}

.p-opt-arrow {
    color: #ccc;
    font-size: 18px;
}

.preview-img-box {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.preview-del-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 18px;
    height: 18px;
    background: #ff3b30;
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

/* 发现页（仿ins）*/
.ins-new-header {
    background: #fff;
    padding: 10px 20px 0;
}

.ins-top-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.ins-avatar-section {
    margin-right: 20px;
    position: relative;
}

.ins-stats-section {
    flex: 1;
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.ins-stat-box {
    display: flex;
    flex-direction: column;
}

.ins-stat-num {
    font-size: 18px;
    font-weight: 700;
    color: #000;
}

.ins-stat-label {
    font-size: 12px;
    color: #333;
}

.ins-bio-section {
    margin-bottom: 15px;
}

.ins-bio-name {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 2px;
}

.ins-bio-text {
    font-size: 14px;
    line-height: 1.4;
    color: #262626;
    white-space: pre-wrap;
}

.ins-action-btns {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.ins-edit-btn {
    flex: 1;
    background: #EFEFEF;
    height: 32px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.ins-icon-btn-small {
    width: 32px;
    height: 32px;
    background: #EFEFEF;
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

/* 朋友圈专用加载容器 */
.moments-loading-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 100px;
    /* 避开封面图位置 */
    color: #999;
}

/* 漂亮的转圈圈动画 */
.moments-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(0, 0, 0, 0.05);
    border-top-color: #07c160;
    /* 微信绿 */
    border-radius: 50%;
    animation: moments-spin 0.8s linear infinite;
    margin-bottom: 12px;
}

@keyframes moments-spin {
    to {
        transform: rotate(360deg);
    }
}

.moments-loading-text {
    font-size: 14px;
    letter-spacing: 1px;
}

/* 进场时的淡入效果 */
#moments-feed-container {
    transition: opacity 0.3s ease;
}

/* 朋友圈发布界面  */
.wx-post-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-end !important;
    padding: 0 16px 12px 16px !important;
    height: 100px !important;
    background: #fff;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.wx-post-cancel {
    font-size: 16px;
    color: #000;
    cursor: pointer;
}

.wx-post-publish {
    background: #07c160;
    color: #fff;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.wx-post-publish:active {
    opacity: 0.8;
}

.wx-post-content {
    padding: 20px 20px 0;
    display: flex;
    padding-top: 10px;
    flex-direction: column;
}

.wx-post-input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 16px;
    font-family: inherit;
    resize: none;
    min-height: 120px;
    margin-bottom: 20px;
    color: #333;
}

.wx-post-input::placeholder {
    color: #ccc;
}

.wx-options-list {
    margin-top: 20px;
    border-top: 0.5px solid #f0f0f0;
}

.wx-opt-item {
    display: flex;
    align-items: center;
    padding: 16px 0;
    border-bottom: 0.5px solid #f0f0f0;
    cursor: pointer;
    font-size: 15px;
    color: #333;
}

.wx-opt-icon {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    fill: #333;
}

.wx-opt-text {
    flex: 1;
    font-weight: 500;
}

.wx-opt-right {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #ccc;
}

.wx-opt-arrow {
    width: 16px;
    height: 16px;
    fill: #ccc;
}

/* 评论区 */
.m-comment-box {
    background: #f9f9f9;
    padding: 8px 12px;
    margin-top: 8px;
    border-radius: 4px;
    font-size: 13px;
    color: #333;
    display: none;
}

.m-comment-box.show {
    display: block;
}

.m-like-row {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #576b95;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 5px;
}

.m-like-icon {
    width: 14px;
    height: 14px;
    fill: #576b95;
    border: 1px solid #576b95;
    border-radius: 50%;
    padding: 2px;
}

/* 让小箭头和文字对齐得更完美 */
.setting-value {
    display: flex;
    align-items: center;
    color: #8e8e93;
    font-size: 15px;
}

.ios-chevron {
    flex-shrink: 0;
}

/* 朋友圈转发卡片容器 */
.moment-share-container {
    margin-bottom: 8px;
    position: relative;
    max-width: 260px;
    animation: bubble-pop-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* 链接头像的箭头 */
.m-share-arrow {
    position: absolute;
    left: -20px;
    top: 15px;
    width: 20px;
    height: 20px;
    opacity: 0.6;
    transform: rotate(180deg);
}

/* 卡片主体 */
.moment-share-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
}

.m-share-header {
    padding: 8px 12px;
    background: #fafafa;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.m-share-body {
    padding: 12px;
}

.m-share-text {
    font-size: 13px;
    color: #333;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.m-share-media img {
    width: 100%;
    border-radius: 8px;
    max-height: 180px;
    object-fit: cover;
}

.m-share-footer {
    padding: 6px 12px;
    font-size: 10px;
    color: #ccc;
    text-align: right;
    background: #fafafa;
}

/* 转发选择器专属动画 */
.forward-overlay-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f7f7f7;
    z-index: 30000;
    display: flex;
    flex-direction: column;
    /* 进场动画定义 */
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.forward-overlay-container.active {
    transform: translateY(0);
}

/* 退场动画状态 */
.forward-overlay-container.closing {
    transform: translateY(100%);
}

/* 里面的列表项稍微加一点点击反馈 */
.forward-row-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: #fff;
    border-bottom: 0.5px solid #f0f0f0;
    transition: background 0.2s;
}

.forward-row-item:active {
    background: #f2f2f2;
}

/* 朋友圈操作区容器 */
.moment-interactions {
    background: #F7F7F7;
    border-radius: 4px;
    margin-top: 10px;
    font-size: 14px;
    color: #404040;
}

/* 点赞列表区域 */
.moment-likes {
    padding: 6px 10px;
    border-bottom: 1px solid #EDEDED;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.moment-likes:empty {
    display: none;
}

/* 朋友圈卡片弹出动画 */
@keyframes cardPop {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    60% {
        transform: scale(1.05);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.moment-share-container.animate-pop {
    animation: cardPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    /* 贝塞尔曲线让它更有弹性 */
    transform-origin: center center;
}

/* 评论列表区域 */
.moment-comments {
    padding: 6px 10px;
}

.moment-comment-item {
    margin-bottom: 2px;
    line-height: 1.4;
}

.comment-author {
    color: #576B95;
    font-weight: 500;
    cursor: pointer;
}

/* --- 红点提示 --- */
/* 红点基础样式 */
.nav-red-dot {
    position: absolute;
    top: -2px;
    /* 往上挪一点 */
    right: -2px;
    /* 往右挪一点 */
    width: 8px;
    /* 小巧一点才精致 */
    height: 8px;
    background-color: #ff3b30;
    /* 苹果红，超醒目 */
    border-radius: 50%;
    /* 变圆圆 */
    border: 1.5px solid #fff;
    /* 加个小白边，防止跟背景混在一起 */
    z-index: 10;
}

/* 确保父容器是定位参考点 */
.wx-tab-icon {
    position: relative;
    display: inline-block;
}

/* WECHAT PROFILE (个人主页) */
#wx-profile-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 10000 !important;
    display: none;
    flex-direction: column;
    padding: 0 20px;
    animation: slideInFromLeft 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

@keyframes slideInFromLeft {
    from {
        transform: translateX(-100%);
        opacity: 0.8;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* --- 1. 朋友圈操作栏美化 --- */
.m-action-bar {
    display: flex;
    align-items: center;
    padding: 10px 0;
    position: relative;
    /* 为了放右边的标签 */
}

.m-act-icon {
    width: 24px;
    /* 图标大小，根据你的图调整 */
    height: 24px;
    object-fit: contain;
    margin-right: 20px;
    /* 图标之间的间距 */
    cursor: pointer;
    transition: transform 0.1s;
}

.m-act-icon:active {
    transform: scale(0.9);
}

.m-tag-icon {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    /* 标签小一点 */
    width: auto;
    opacity: 0.8;
}

/* --- 2. 只有选中时的绿色复选框美化 --- */
.v-check-box {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid #c5c5c5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    background: #fff;
}

.v-check-box.checked {
    background: #07c160;
    /* 微信绿 */
    border-color: #07c160;
}

.v-check-box::after {
    content: '';
    display: block;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-top: -2px;
    opacity: 0;
    /* 默认隐藏对勾 */
}

.v-check-box.checked::after {
    opacity: 1;
}

/* --- 3. 顶部新消息提示条 (图3的效果) --- */
#moments-msg-tip {
    background: #3a3a3a;
    color: #fff;
    padding: 10px 15px;
    margin: 15px auto;
    /* 居中 */
    width: 180px;
    border-radius: 6px;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

#moments-msg-tip img {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    margin-right: 8px;
}


/* 底部出口按钮 & 底部签名 */
.wx-p3-footer-area {
    position: absolute;
    bottom: 40px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0 30px;
}

.wx-profile-close-btn {
    width: 44px;
    height: 44px;
    background: #f2f2f7;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    color: #333;
    transition: transform 0.1s;
}

.wx-profile-close-btn:active {
    transform: scale(0.9);
}

.wx-p3-footer-text {
    font-size: 12px;
    color: #ccc;
    margin-bottom: 10px;
    text-align: right;
    font-weight: 500;
}

.wx-profile-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 280px;
    background-color: #ddd;
    background-size: cover;
    background-position: center;
    z-index: 0;
    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}

.wx-p3-nav {
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 60px;
    position: relative;
    z-index: 10;
    pointer-events: none;
}

.wx-p3-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 20px;
    position: relative;
    z-index: 10;
    pointer-events: none;
}

.wx-p2-back,
.wx-big-avatar-new,
.wx-small-avatar-right,
.edit-text {
    pointer-events: auto;
}

.wx-p3-header-area {
    position: relative;
    margin-bottom: 20px;
    margin-top: 100px;
    width: 100%;
    height: 140px;
}

.wx-p3-bubble,
.wx-p3-bubble-right {
    position: absolute;
    background: #a8a8a8;
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    animation: floatBubble 3s ease-in-out infinite;
    pointer-events: auto;
    min-width: 40px;
    min-height: 24px;
    cursor: text;
}

.wx-p3-bubble {
    top: -50px;
    left: 60px;
}

.wx-p3-bubble::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 20px;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #a8a8a8;
}

.wx-p3-bubble-right {
    top: auto;
    bottom: 80px;
    right: 10px;
    background: #333;
    animation-delay: 1.5s;
    z-index: 20;
}

.wx-p3-bubble-right::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 20px;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #333;
}

.wx-p3-bubble:empty::before,
.wx-p3-bubble-right:empty::before {
    content: ' talk about';
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

.wx-big-avatar-new {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px #ddd, 0 10px 20px rgba(0, 0, 0, 0.05);
    background-size: cover;
    background-position: center;
    cursor: pointer;
}

.wx-small-avatar-right {
    position: absolute;
    bottom: 10px;
    right: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    background-size: cover;
    background-position: center;
    cursor: pointer;
    z-index: 20;
}

.wx-p3-info-block {
    margin-left: 10px;
    margin-bottom: 25px;
}

.wx-p3-name {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
    position: relative;
    display: inline-block;
}

.wx-p3-name {
    display: inline-flex !important;
    align-items: center;
    white-space: nowrap;
    max-width: 100%;
}

.wx-p3-name::after {
    content: '★';
    font-size: 14px;
    margin-left: 5px;
}

.wx-p3-id {
    font-size: 14px;
    color: #999;
    margin-bottom: 12px;
    padding-left: 12px;
    border-left: 3px solid #eee;
}

.wx-p3-desc {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

.wx-p3-tags {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.wx-p3-tag {
    padding: 10px 15px;
    border-radius: 8px;
    background: #f9f9f9;
    font-size: 14px;
    color: #666;
    border-left: 4px solid #ddd;
}

.wx-p3-tag.grey {
    background: #e0e0e0;
    color: #555;
    border-left: 4px solid #999;
}

.wx-p3-footer {
    position: absolute;
    bottom: 50px;
    left: 0;
    width: 100%;
    font-size: 12px;
    color: #aaa;
    text-align: center;
}

@keyframes floatBubble {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

/* CONTACTS (通讯录页面) */
#wx-page-contacts {
    background-color: #fff !important;
    flex-direction: column !important;
    height: 100% !important;
    overflow: hidden !important;
    padding-bottom: 0 !important;
}

.im-header-top {
    position: relative !important;
    height: auto !important;
    padding: 65px 20px 10px 20px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.im-header-title {
    font-size: 17px;
    font-weight: 600;
    color: #000;
    margin-right: 30px;
}

.im-add-btn-fix {
    width: 32px !important;
    height: 32px !important;
    background: #007aff !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 10px rgba(0, 122, 255, 0.3) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: absolute !important;
    right: 20px !important;
    bottom: 10px !important;
    z-index: 99999 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}

.im-add-btn-fix svg {
    fill: #fff !important;
    width: 18px !important;
    height: 18px !important;
    pointer-events: none !important;
}

.im-add-btn-fix:active {
    transform: scale(0.9);
}

.im-search-box {
    padding: 5px 16px 10px;
}

.im-search-inner {
    background: #e9e9eb;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
}

.im-search-icon {
    width: 16px;
    height: 16px;
    fill: #8e8e93;
    margin-right: 6px;
}

.im-search-input {
    border: none;
    background: transparent;
    font-size: 16px;
    color: #000;
    width: 80px;
    outline: none;
}

.im-filter-row {
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    margin-top: 5px;
}

.im-filter-item {
    font-size: 13px;
    color: #999;
    padding-bottom: 8px;
    cursor: pointer;
    font-weight: 500;
    position: relative;
}

.im-filter-item.active {
    color: #007aff;
}

.im-filter-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #007aff;
}

.im-login-tip {
    background: #f9f9f9;
    padding: 10px 20px;
    font-size: 11px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 6px;
    border-top: 1px solid #f0f0f0;
}

.im-list-container {
    flex: 1 !important;
    overflow-y: auto !important;
    height: auto !important;
    padding-bottom: 120px !important;
    -webkit-overflow-scrolling: touch;
}

.im-contact-card {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin: 10px 16px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.03);
    cursor: pointer;
    transition: transform 0.1s;
}

.im-contact-card:active {
    transform: scale(0.98);
}

.im-c-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #f0f0f0;
    background-size: cover;
    background-position: center;
    margin-right: 15px;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.im-c-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    overflow: hidden;
}

.im-c-name {
    font-size: 16px;
    font-weight: 600;
    color: #000;
}

.im-c-preview {
    font-size: 14px;
    color: #8e8e93;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.edit-text {
    min-height: 20px;
    min-width: 40px;
    display: inline-block;
}

/* 当它被你删得空空如也时，显示提示文字 */
.edit-text:empty::before {
    content: "点击添加内容...";
    color: #a0a0a0;
    font-size: 14px;
    pointer-events: none;
}

/* ==========================================================================
   ★ CHARACTER CREATOR (角色资料卡 / 浏览器风格)
   ========================================================================== */

/* ------------------------------------------------------------
   1. 核心容器 (The Shell)
   ------------------------------------------------------------ */
#sub-page-creator,
.exp-theme-root {
    /* 定位与层级 */
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 20000 !important;
    background-color: #fff;
    height: 100% !important;
    bottom: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;

    /* 进场动画 */
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.3s ease;
}

/* 激活状态 */
#sub-page-creator.active,
.exp-theme-root.active {
    transform: translateY(0);
    opacity: 1;
}

/* ------------------------------------------------------------
   2. 顶部浏览器伪装栏 (Browser Top Bar)
   ------------------------------------------------------------ */
.exp-browser-top {
    background: #e0e0e0;
    padding-top: 50px;
    /* 避让刘海 */
    flex-shrink: 0;
    /* 防止被挤压 */
}

/* 标签页栏 */
.exp-tab-bar {
    display: flex;
    align-items: flex-end;
    padding: 0 10px;
    height: 36px;
    background: #e0e0e0;
    position: relative;
}

/* 单个标签 */
.exp-tab {
    background: #fff;
    border-radius: 8px 8px 0 0;
    padding: 6px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #333;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05);
    margin-right: 5px;
    position: relative;
    z-index: 2;
}

/* 激活标签的底部遮挡条 */
.exp-tab.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 4px;
    background: #fff;
}

/* 窗口控制按钮 (红黄绿) */
.exp-win-ctrls {
    margin-left: auto;
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #666;
    padding-bottom: 8px;
}

.exp-close {
    margin-left: 10px;
    font-size: 14px;
    color: #999;
    cursor: pointer;
}

.exp-close:hover {
    color: #000;
}

/* 工具栏 (地址栏那一行) */
.exp-tool-bar {
    background: #fff;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid #eee;
}

.exp-tool-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #555;
}

.exp-grid-icon {
    font-size: 16px;
}

/* 伪地址栏输入框 */
.exp-url-box {
    flex: 1;
    background: #f1f2f5;
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding: 0 8px;
    height: 30px;
    margin: 0 10px;
    transition: background 0.2s;
}

.exp-url-box:focus-within {
    background: #fff;
    border: 1px solid #007aff;
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.1);
}

.exp-search-icon {
    color: #999;
    margin-right: 6px;
    font-size: 14px;
    opacity: 0.8;
}

.exp-search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 12px;
    color: #333;
    font-family: inherit;
    margin-left: 5px;
    width: 100%;
}

.exp-search-input::placeholder {
    color: #ccc;
}

/* 右侧按钮组 */
.exp-tool-right {
    display: flex;
    gap: 12px;
}

.exp-btn {
    font-size: 16px;
    cursor: pointer;
    color: #555;
}

.exp-btn.save-btn {
    color: #000;
}

/* ------------------------------------------------------------
   3. 内容滚动区 (Content Scroll Area)
   ------------------------------------------------------------ */
.exp-content-scroll,
.creator-content-scroll-area {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 30px 25px 150px 25px;
    /* 底部留足空间给键盘 */
    background: #fff;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

/* ------------------------------------------------------------
   4. 头像与基本信息 (Avatar & Basic Info)
   ------------------------------------------------------------ */
.exp-header-layout {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.exp-avatar-area {
    flex-shrink: 0;
}

.exp-avatar-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #f0f0f0;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    filter: grayscale(20%);
}

.exp-avatar-tip {
    font-size: 10px;
    color: #aaa;
    text-align: center;
    line-height: 1.2;
}

/* 有图时隐藏提示文字 */
.exp-avatar-circle[style*="url"] .exp-avatar-tip {
    display: none;
}

.exp-info-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.exp-info-title {
    font-size: 10px;
    font-weight: bold;
    color: #666;
    margin-bottom: 2px;
    letter-spacing: 0.5px;
}

.exp-info-subtitle {
    font-size: 8px;
    color: #ccc;
    margin-bottom: 15px;
    line-height: 1.2;
}

/* ------------------------------------------------------------
   5. 表单与输入框样式 (Form Elements)
   ------------------------------------------------------------ */
.exp-body-section {
    margin-top: 10px;
}

/* 分区标题 */
.exp-sec-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.exp-sec-icon {
    font-size: 14px;
    margin-right: 8px;
    color: #666;
}

.exp-sec-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.exp-pill-btn {
    margin-left: auto;
    background: #f5f5f5;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 10px;
    color: #333;
    font-weight: bold;
}

/* 输入行样式 */
.exp-input-line {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 4px;
    margin-bottom: 12px;
}

.exp-prefix {
    font-weight: bold;
    font-size: 14px;
    margin-right: 8px;
    color: #000;
}

.exp-suffix {
    font-size: 10px;
    color: #ddd;
    margin-left: 8px;
    font-weight: bold;
}

/* 通用输入框 */
.exp-input {
    border: none;
    outline: none;
    background: transparent;
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: #000;
}

.exp-input::placeholder {
    color: #eee;
    font-weight: 400;
}

/* 行内小输入框 (身高体重等) */
.exp-text-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 8px;
    font-size: 12px;
    color: #333;
}

.exp-bold {
    font-weight: bold;
    margin-right: 6px;
}

.exp-label-small {
    color: #999;
    margin-right: 2px;
}

.exp-inline-input {
    border: none;
    border-bottom: 1px dashed #ddd;
    outline: none;
    font-size: 12px;
    color: #555;
    background: transparent;
    width: 120px;
    padding: 0 4px;
}

.exp-inline-input.small {
    width: 40px;
    text-align: center;
}

/* 文本域 (Textarea) */
.exp-text-area-wrapper {
    margin-top: 15px;
}

.exp-row-label {
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
}

.exp-textarea {
    width: 100%;
    border: 1px solid #f5f5f5;
    background: #fafafa;
    border-radius: 4px;
    padding: 8px;
    font-size: 12px;
    line-height: 1.6;
    color: #555;
    outline: none;
    /* 1. 必须限制高度，比如最多显示 8 行左右 */
    max-height: 150px;
    overflow-y: auto;
    resize: none;
    font-family: inherit;
}

/* 装饰元素 */
.exp-slash {
    margin: 0 6px;
    color: #ddd;
}

.exp-divider {
    margin: 0 10px;
    color: #eee;
}

.exp-footer-deco {
    margin-top: 15px;
    font-size: 10px;
    color: #bbb;
    word-spacing: 5px;
    font-weight: 600;
}

/* ------------------------------------------------------------
   兼容性/旧样式覆盖 (Legacy & Overlays)
   ------------------------------------------------------------ */
.profile-editor-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    /* 默认不阻挡 */
}

.profile-editor-overlay.active {
    pointer-events: auto;
    opacity: 1;
}

/* ==========================================================================
   6. CHAT 聊天界面 (Chat Interface System)
   ========================================================================== */
/* 强行修正聊天背景 */
.chat-page-body {
    background-attachment: fixed !important;
    background-size: cover !important;
    background-position: center !important;
    min-height: 100vh;
}

/* ------------------------------------------------------------
   6.1. 聊天列表页 (Chat List)
   ------------------------------------------------------------ */
#wx-page-chat {
    background-color: #F8F9F8 !important;
    min-height: 100vh;
}

#chat-list-container {
    background: transparent !important;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-group-card {
    background-color: #FFFFFF !important;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.03) !important;
}

/* 单条消息项 */
.ios-list-item {
    position: relative;
    height: 78px;
    background: #fff;
    overflow: hidden;
}

.ios-list-item:not(:last-child) .ili-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: calc(100% - 76px);
    height: 1px;
    background-color: #f0f0f0;
}

/* 滑动内容层 */
.ili-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    align-items: center;
    padding-left: 16px;
    z-index: 10;
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ili-avatar {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background-color: #f0f0f0;
    background-size: cover;
    background-position: center;
    margin-right: 12px;
    flex-shrink: 0;
    position: relative;
    border: 0.5px solid rgba(0, 0, 0, 0.05);
}

.ili-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ff3b30;
    color: #fff;
    font-size: 10px;
    padding: 2px 5px;
    min-width: 16px;
    text-align: center;
    border-radius: 10px;
    border: 2px solid #fff;
}

.ili-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: 16px;
    overflow: hidden;
}

.ili-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
}

.ili-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.ili-time {
    font-size: 11px;
    color: #b0b0b0;
    font-weight: 400;
}

.ili-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ili-msg {
    font-size: 13px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.pin-icon {
    width: 14px;
    height: 14px;
    fill: #ccc;
    margin-left: 5px;
}

/* 侧滑按钮 */
.ili-actions {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    display: flex;
    z-index: 1;
}

.ili-btn {
    width: 70px;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
}

.ili-btn.pin {
    background-color: #E7923F;
}

.ili-btn.del {
    background-color: #EA4E40;
}

/* ------------------------------------------------------------
   6.2. 聊天详情页框架 (Chat Detail Layout)
   ------------------------------------------------------------ */
/* CHAT DETAIL (聊天页详情) */
/* 很草率的菜单 */
.chat-plus-menu {
    display: none;
    position: absolute;
    bottom: 85px;
    left: 12px;
    width: 180px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    background: #FFFFFE;
    padding: 8px;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;

    /* 动画设置 */
    transform-origin: bottom left;
    transform: scale(0.85) translateY(10px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 20000;
}

/* 激活状态 */
.chat-plus-menu.active {
    display: grid;
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* 菜单项 */
.plus-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    background: #F8F8F9;
    border-radius: 8px;
    padding: 0 10px;
    height: 35px;
    cursor: pointer;
    transition: background 0.15s ease;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.plus-item:active {
    background: rgba(0, 0, 0, 0.05);
}

/* 图标图片 */
.plus-icon-img {
    width: 24px;
    height: 24px;
    border-radius: 5px;
    object-fit: contain;
    margin-right: 12px;
    flex-shrink: 0;
}

/* 文字标签 */
.plus-label {
    font-size: 10px;
    color: #1a1a1a;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mpm-row {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
    padding: 2px;
}

.mpm-item {
    padding: 10px 14px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    border-right: 0.5px solid rgba(255, 255, 255, 0.2);
    flex: 1;
    white-space: nowrap;
}

.mpm-item:last-child {
    border-right: none;
}

.mpm-item:active {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
}

.mpm-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid rgba(0, 0, 0, 0.85);
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
}

.mpm-arrow.up {
    bottom: auto;
    top: -8px;
    border-top: none;
    border-bottom: 8px solid rgba(0, 0, 0, 0.85);
}

@keyframes menuPop {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.msg-container-col {
    display: flex;
    flex-direction: column;
    max-width: 72%;
}

.me .msg-container-col {
    align-items: flex-end;
}

.other .msg-container-col {
    align-items: flex-start;
}

.msg-container-col .msg-content {
    max-width: 100%;
    margin-bottom: 4px;
}

/* === 引用消息 (气泡上方独立显示) === */
.msg-quote-outside {
    background: transparent !important;
    border: none !important;
    padding: 0 0 2px 10px !important;
    margin-bottom: 2px !important;
    margin-top: 5px !important;

    font-size: 11px !important;
    color: #999 !important;
    border-left: 2px solid #d1d1d1 !important;
    border-radius: 0 !important;

    display: block !important;
    max-width: 100% !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    opacity: 0.8;
}

.msg-quote-outside .quote-outside-name,
.msg-quote-outside .quote-outside-text {
    display: inline;
    margin: 0;
}

.msg-status-foot {
    width: 100%;
    font-size: 11px;
    color: #8e8e93;
    font-weight: 500;
    margin-top: 5px;
    margin-bottom: 20px;
    clear: both;
    display: block;
    opacity: 1 !important;
    animation: none;
}

/* 撤回消息 */
.msg-recall-pill {
    align-self: center;
    font-size: 12px;
    color: #999;
    background: rgba(0, 0, 0, 0.05);
    padding: 4px 10px;
    border-radius: 4px;
    margin: 10px 0;
    text-align: center;
}

.recall-link {
    color: #007aff;
    margin-left: 5px;
    cursor: pointer;
    font-weight: 500;
}

.msg-time-pill {
    align-self: center;
    font-size: 11px;
    color: #fff;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 8px;
    border-radius: 12px;
    margin: 15px 0 5px 0;
    font-weight: 500;
}

.chat-header-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    z-index: 100;
    background-color: #FEFFFD;
    background-size: cover;
    background-position: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
    padding-top: 30px;
    box-sizing: border-box;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.chl-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1;
}

.chat-header-layer[style*="url"] .chl-overlay {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.4));
}

.chl-content {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 100%;
    padding: 0 20px 20px 10px;
}

.chl-left-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chl-back-btn {
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    color: #333;
}

.chl-back-btn svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

.chl-avatar-box {
    padding: 2px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 14px;
    margin-right: 6px;
}

.chl-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background-color: #ddd;
    background-size: cover;
    background-position: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.chl-frame {
    position: absolute;
    top: 2;
    left: 2;
    width: 115%;
    height: 115%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 2;
    pointer-events: auto;
    transform: scale(0.95) translateY(-3px);
    transform-origin: center center;
}

.chl-text-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.chl-name {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

.chl-status {
    font-size: 11px;
    color: #666;
    font-weight: 500;
    margin-top: 2px;
    opacity: 0.8;
}

.chl-right-group {
    display: flex;
    align-items: center;
    padding-bottom: 5px;
}

.chl-menu-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.1s;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.chl-menu-btn:active {
    transform: scale(0.9);
    background: #fff;
}

.chl-menu-btn svg {
    width: 22px;
    height: 22px;
    fill: #333;
}

.chl-avatar-wrapper {
    position: relative;
    width: 54px;
    height: 54px;
    margin-right: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chl-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #ddd;
    background-size: cover;
    background-position: center;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.chl-tag {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: text;
}

@keyframes floatBubble {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

@keyframes breathe {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(0.9);
        opacity: 0.8;
    }
}

.chl-status {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.frame-lib-item {
    position: relative;
    width: 100%;
    height: 19vw;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #f0f0f0;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: all 0.2s;
}

.frame-lib-item:active {
    transform: scale(0.95);
}

/* 选中状态 */
.frame-lib-item.selected {
    border-color: #007aff;
    background: #f0f8ff;
}

.preview-face {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    background-color: #e0e0e0;
    border-radius: 50%;
    z-index: 1;
}

/* 框框图片 */
.frame-lib-img {
    position: relative;
    z-index: 2;
    width: 120%;
    height: 120%;
    object-fit: contain;
    pointer-events: none;
}

.chl-status-pill {
    background: rgba(255, 255, 255, 0.6);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    color: #555;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    border: 0.5px solid rgba(0, 0, 0, 0.05);
    animation: breath 3s infinite ease-in-out;
}

@keyframes breath {

    0%,
    100% {
        opacity: 0.8;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

.chat-header-ios {
    height: 90px;
    background: #f2f2f7;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: flex-end;
    padding: 0 16px 12px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
}

.c-h-left {
    flex: 1;
    display: flex;
    align-items: center;
    color: #007aff;
    cursor: pointer;
}

.c-h-left svg {
    width: 28px;
    fill: currentColor;
    margin-left: -8px;
}

.c-h-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 2;
}

.c-h-name {
    font-weight: 600;
    font-size: 16px;
    color: #000;
}

.c-h-status {
    font-size: 10px;
    color: #8e8e93;
}

.c-h-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    color: #007aff;
}

.chat-footer-ios {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #FEFFFD;
    padding: 10px 8px 30px 8px;

    display: flex;
    align-items: center;
    gap: 6px;
    border-top: 0.5px solid rgba(0, 0, 0, 0.1);
    z-index: 101;
    box-sizing: border-box;
    border: 1px solid #eeecea !important;
}

.chat-footer-ios.menu-open {
    transform: translateY(-200px);
}

.cf-icon-btn {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.1s;
}

.cf-icon-btn:active {
    transform: scale(0.9);
}

.cf-icon-btn svg {
    width: 26px;
    height: 26px;
    fill: #8e8e93;
}

.cf-icon-btn.custom-img-btn {
    width: 34px;
    height: 34px;
    background: transparent !important;
    border-radius: 50%;
    overflow: hidden;
    transition: transform 0.1s;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.cf-icon-btn.custom-img-btn:active {
    transform: scale(0.9);
}

.cf-icon-btn.custom-img-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* 输入框外壳 */
.cf-input-wrapper {
    flex: 1;
    min-width: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 18px;
    min-height: 36px;
    height: auto;
    display: flex;
    align-items: center;
    padding: 5px 12px;
    position: relative;
    transition: height 0.1s;
}

/* 输入框本体 */
#chat-input {
    flex: 1;
    width: 100%;
    border: none;
    background: transparent;
    outline: none;
    font-size: 16px;
    color: #000;
    margin-right: 26px;
    resize: none;
    overflow-y: hidden;
    height: 24px;
    max-height: 100px;
    line-height: 24px;
    font-family: inherit;
    padding: 0;
}

.cf-input-wrapper input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 16px;
    color: #000;
    height: 100%;
    margin-right: 26px;
    min-width: 0;
}

.cf-emoji-icon {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.cf-emoji-icon svg {
    width: 100%;
    height: 100%;
    fill: #8e8e93;
}

/* 聊天主体区域 */
.chat-body-ios {
    padding-top: 150px;
    padding-bottom: 90px;
    padding-left: 10px;
    padding-right: 10px;
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
    height: 100% !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-y: contain;
}

#chat-msg-area {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), padding-bottom 0.3s;
    position: relative;
    z-index: 0;
    scroll-behavior: smooth;
}

body.menu-open #chat-msg-area {
    padding-bottom: 380px !important;
    transform: translateY(-280px);
}

/* =========================================
   ★ 线下模式气泡
   ========================================= */
#offline-action-bar {
    position: absolute !important;
    bottom: 90px !important;
    left: 12px !important;
    z-index: 9999 !important;
    width: auto !important;
    display: flex;
    align-items: center;
    gap: 8px;

    background-color: #FEFFFD !important;
    border-radius: 12px 12px 12px 12px !important;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 8px 12px !important;
}

/* 输入框微调 */
#offline-action-bar input {
    background: #fff;
    border: none;
    border-radius: 6px;
    height: 30px;
    padding: 0 8px;
    font-size: 13px;
    width: 160px;
    outline: none;
}

/* 输入框和按钮 */
#offline-action-input-container input {
    height: 32px !important;
    font-size: 14px !important;
    border-radius: 8px !important;
    background: #fff !important;
    border: none !important;
    padding: 0 8px !important;
}

#offline-action-input-container button {
    height: 32px !important;
    border-radius: 16px !important;
    margin-left: 6px !important;
}

/* 发送按钮 */
.oab-send-btn {
    background: #000;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 10px;
    cursor: pointer;
    margin-left: 8px;
}

.oab-send-btn:active {
    transform: scale(0.9);
}

/* 防遮挡逻辑 */
body.offline-active #chat-msg-area {
    padding-bottom: 160px !important;
    transition: padding-bottom 0.3s ease;
}

/* =========================================
   ★ 动作气泡
   ========================================= */

.msg-row.action-aside {
    justify-content: center !important;
    margin: 15px 0 !important;
    width: 100% !important;
    display: flex !important;
    pointer-events: none;
}

/* 半透明黑胶囊 */
.msg-row.action-aside .msg-content {
    background-color: rgba(0, 0, 0, 0.2) !important;
    color: #fff !important;
    border-radius: 12px !important;
    padding: 4px 10px !important;
    font-size: 11px !important;
    font-weight: 500;
    text-align: center;
    max-width: 85%;
    box-shadow: none !important;
    border: none !important;
}

.msg-row.action-aside .msg-content::before,
.msg-row.action-aside .msg-avatar,
.msg-row.action-aside .msg-avatar-col {
    display: none !important;
}

.msg-multi-select-active .msg-row.action-aside,
.msg-multi-select-active .msg-time-pill,
.msg-multi-select-active .msg-recall-pill {
    pointer-events: auto !important;
    cursor: pointer;
}

.msg-multi-select-active .msg-row.action-aside .msg-check-circle,
.msg-multi-select-active .msg-time-pill-row .msg-check-circle,
.msg-multi-select-active .msg-recall-row .msg-check-circle {
    display: block;
    left: 15px;
}

/* ------------------------------------------------------------
   6.3. 消息气泡系统 (Message Bubbles)
   ------------------------------------------------------------ */

/* 气泡 */
.msg-row {
    display: flex;
    width: 100%;
    margin-bottom: 0px !important;
    align-items: flex-start;
    position: relative;
}

/* 有尾巴的消息，下面留多点空隙 */
.msg-row.has-tail {
    margin-bottom: 14px;
}

/* 头像 */
.msg-avatar {
    width: 36px;
    height: 36px;
    border-radius: 30%;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin-bottom: 0;
    z-index: 2;
    border: 0.5px solid rgba(0, 0, 0, 0.05);
    margin-top: 2px;
}

/* 专门的头像列容器 */
.msg-avatar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 44px;
    margin-right: 8px;
    flex-shrink: 0;
    position: absolute !important;
    top: 0 !important;
    z-index: 5;
    height: auto !important;
}

.me .msg-avatar-col {
    margin-right: 0;
    margin-left: 8px;
}

/* 头像本体 */
.msg-avatar {
    margin-right: 0 !important;
    margin-left: 0 !important;
    margin-bottom: 2px;
}

.msg-avatar-placeholder {
    width: 44px;
    height: 1px;
    flex-shrink: 0;
    margin-right: 8px;
}

.me .msg-avatar-placeholder {
    margin-left: 8px;
    margin-right: 0;
}

.msg-avatar-time {
    font-size: 9px;
    color: #999;
    transform: scale(0.9);
    white-space: nowrap;
    line-height: 1;
    margin-top: 2px;
}

/* 左边头像 (对方) 的位置 */
.msg-row.other .msg-avatar-col {
    left: 2px !important;
}

/* 右边头像 (我) 的位置 */
.msg-row.me .msg-avatar-col {
    right: 2px !important;
}

/* 隐藏那个占位符 */
.msg-avatar-placeholder {
    display: none !important;
}

/* 对方的消息 */
.msg-row.other .msg-container-col {
    margin-left: 54px !important;
    align-items: flex-start !important;
}

/* 我的消息 */
.msg-row.me .msg-container-col {
    margin-right: 54px !important;
    align-items: flex-end !important;
}

/* 气泡内容通用 */
.msg-content {
    max-width: 68%;
    position: relative;
    padding: 6px 12px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    z-index: 1;
    border-radius: 20px !important;
    box-shadow: none;
}

/* --- 对方的消息 --- */
.msg-row.other {
    justify-content: flex-start;
}

.msg-row.other .msg-avatar {
    margin-right: 8px;
}

.msg-row.other .msg-content {
    background: #E9E8E9;
    color: #000;
    margin-left: 2px;
}

/* 左边的小尾巴 */
.msg-row.other.has-tail .msg-content::before {
    content: "";
    position: absolute;
    z-index: 0;

    /* 微调区 */
    width: 16px;
    /* 图片的宽度 */
    height: 16px;
    /* 图片的高度 */
    bottom: -7.5px;
    /* 稍微往下一点点*/
    left: 3px;
    /* 往左伸出去的距离 */

    /* 填入【左边尾巴】图片链接 */
    background-image: url('https://i.postimg.cc/xTN25zFt/wu-biao-ti119-20260118120040.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: bottom right;
}

/* 我的消息 */
.msg-row.me {
    justify-content: flex-end;
}

.msg-row.me .msg-avatar {
    margin-left: 8px;
}

.msg-row.me .msg-content {
    background: #565656;
    color: #fff;
    margin-right: 2px;
}

/* 右边的小尾巴 */
.msg-row.me.has-tail .msg-content::before {
    content: "";
    position: absolute;
    z-index: 0;

    /* 微调区 */
    width: 16px;
    /* 图片的宽度 */
    height: 16px;
    /* 图片的高度 */
    bottom: -8px;
    /* 稍微往下一点点 */
    right: 2px;
    /* 往右伸出去的距离 */

    /* 填入【右边尾巴】图片链接 */
    background-image: url('https://i.postimg.cc/65F9S28q/wu-biao-ti111-20260101105920.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: bottom left;
}

/* 消息上升动画 */
@keyframes msgSlideUpIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.msg-row.new-msg-anim {
    animation: msgSlideUpIn 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    opacity: 0;
}

#chat-msg-area {
    scroll-behavior: smooth;
}

.msg-row.me+.msg-row.other,
.msg-row.other+.msg-row.me {
    margin-top: 15px;
}

/* 正在输入 */
.typing-row {
    display: flex;
    align-items: flex-end;
    margin-bottom: 10px;
    padding-left: 4px;
    animation: slideUpFade 0.3s ease-out;
}

.typing-bubble {
    background-color: #F1F1F1;
    padding: 4px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    height: 40px;
    width: fit-content;
    position: relative;
    margin-left: 20px;
    border-bottom-left-radius: 20px;
}

.typing-bubble::before {
    content: "";
    position: absolute;
    z-index: 0;
    bottom: 1px;
    left: -3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #F1F1F1;
}

.typing-bubble::after {
    content: "";
    position: absolute;
    z-index: 0;
    bottom: -2px;
    left: -13px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #F1F1F1;
}

.typing-dot {
    width: 9px;
    height: 9px;
    background-color: #8e8e93;
    border-radius: 50%;
    opacity: 0.6;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0s;
}

@keyframes typingBounce {

    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.chat-action-sheet {
    height: 200px;
    padding-bottom: 30px;
}

/* 正在输入气泡进场动画 */
@keyframes bubble-pop-in {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(10px);
    }

    60% {
        opacity: 1;
        transform: scale(1.1) translateY(-5px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.typing-row {
    display: flex;
    align-items: flex-end;
    margin-bottom: 15px;
    animation: bubble-pop-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    transform-origin: 10px bottom;
    padding-left: 10px;
}

/* 纯图片消息  */
/* 气泡隐身 */
.msg-content:has(img) {
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
}

/* 剪尾巴 */
.msg-row.other.has-tail .msg-content:has(img)::before,
.msg-row.me.has-tail .msg-content:has(img)::before {
    display: none !important;
}

/* 图片本体 */
.msg-content:has(img) img {
    border-radius: 12px;
    max-width: 120px;
    height: auto;
    display: block;
    margin-top: 2px;
}

/* 长按菜单 */
.msg-pop-menu {
    position: fixed;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 0;
    display: none;
    flex-wrap: wrap;
    z-index: 20000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    animation: menuPop 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 280px;
    transform-origin: center bottom;
}

.mpm-row {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 10px !important;
}

.mpm-item {
    padding: 10px 14px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    border-right: 0.5px solid rgba(255, 255, 255, 0.2);
    flex: 1;
    white-space: nowrap;
}

.mpm-item:last-child {
    border-right: none;
}

.mpm-item:active {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
}

.mpm-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid rgba(0, 0, 0, 0.85);
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
}

.mpm-arrow.up {
    bottom: auto;
    top: -8px;
    border-top: none;
    border-bottom: 8px solid rgba(0, 0, 0, 0.85);
}

/* === 优化后的消息进场动画 === */
@keyframes msgSlideUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.msg-row.new-msg {
    animation: msgSlideUp 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    transform-origin: bottom center;
}

.msg-check-circle {
    display: none;
    width: 22px;
    height: 22px;
    border: 1.5px solid #d1d1d6;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    transform: translateY(-50%) scale(1);
    background: #fff;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    box-sizing: border-box;
}

.msg-multi-select-active .msg-check-circle {
    display: flex !important;
    /* 强制生效 flex */
    align-items: center;
    /* 垂直居中 */
    justify-content: center;
}

.msg-row.selected .msg-check-circle::after {
    content: '✓';
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
}

.msg-row.selected .msg-check-circle {
    background-color: #007aff;
    border-color: #007aff;
    /* 引用修复后的动画 */
    animation: ios-pop-fixed 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes ios-pop-fixed {
    0% {
        transform: translateY(-50%) scale(0.8);
    }

    70% {
        transform: translateY(-50%) scale(1.1);
    }

    100% {
        transform: translateY(-50%) scale(1);
    }
}

.msg-row.me .msg-check-circle {
    left: -32px;
}

.msg-row.other .msg-check-circle {
    right: -32px;
}

.msg-multi-select-active .msg-container-col {
    position: relative;
    margin-left: 48px !important;
    margin-right: 48px !important;
    transition: margin 0.3s ease;
}

/* 底部操作栏 */
.msg-multi-bar {
    position: fixed;
    bottom: -100px;
    left: 0;
    width: 100%;
    height: 85px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 0.5px solid #eee;
    z-index: 20000;
    transition: bottom 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    padding-bottom: 25px;
}

.msg-multi-select-active .msg-multi-bar {
    bottom: 0;
}

.multi-act-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #007aff;
    font-size: 10px;
}

.multi-act-btn .icon {
    font-size: 22px;
}

.multi-act-btn.delete {
    color: #ff3b30;
}

/* --- 底部多选栏粗边框 --- */
.msg-multi-bar {
    border-top: 1px solid rgba(0, 0, 0, 0.0.08);
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05);
}

/* 模拟图片样式（就是假的图片） */
.msg-sim-image {
    width: 150px;
    height: 150px;
    background-color: #EFEFF4;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 0.5px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 5px !important;
}

/* 图片中间的文字 "Image" */
.msg-sim-text {
    font-size: 14px;
    font-weight: 500;
    color: #B0B0B5;
    margin-top: 0px;
}

/* 语音条 */
.msg-voice-bubble {
    padding: 0 16px;
    height: 35px;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.2s;
    margin-bottom: 5px !important;
}

.msg-voice-bubble:active {
    opacity: 0.7;
}

/* 我发的语音 (深色背景) */
.msg-bubble-right.msg-voice-bubble {
    background-color: #565656 !important;
    color: #FFFFFF !important;
    border: none !important;
}

/* 对方发的语音 */
.msg-bubble-left.msg-voice-bubble {
    background-color: #E9E8E9 !important;
    color: #000000 !important;
    border: none !important;
}

/* 语音/图片的翻译/描述框 */
.msg-translation-box {
    display: none;
    margin-top: 6px;
    padding: 8px 12px;
    background: #FFFFFF;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    line-height: 1.4;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    max-width: 240px;
    position: relative;
    animation: fadeIn 0.2s ease;
    margin-bottom: 5px !important;
}

/* 翻译/描述框的小尖角 */
.msg-translation-box::before {
    content: "";
    position: absolute;
    top: -6px;
    width: 12px;
    height: 12px;
    background: #FFFFFF;
    transform: rotate(45deg);
    box-shadow: -1px -1px 1px rgba(0, 0, 0, 0.03);
}

.msg-translation-box.trans-right {
    align-self: flex-end;
    margin-right: 4px;
    background: #fcfcfc;
}

.msg-translation-box.trans-right::before {
    right: 15px;
    left: auto;
    background: #fcfcfc;
}

.msg-translation-box.trans-left {
    align-self: flex-start;
    margin-left: 4px;
}

.msg-translation-box.trans-left::before {
    left: 15px;
    right: auto;
}

/* 心声气泡 */
/* 外层容器 */
.msg-row.inner-voice-row {
    height: auto !important;
    margin-bottom: 12px !important;
    margin-top: 8px !important;
    overflow: visible !important;
    background: transparent !important;
    border: none !important;
    display: block;
    position: relative;
    z-index: 1;
}

/* 气泡层（控制整体位置） */
.inner-voice-float-layer {
    position: relative;
    margin-left: -6px;
    width: fit-content;
    max-width: 90%;
    animation: thoughtAppear 0.5s ease-out forwards;
    transform-origin: bottom left;
}

/* 心声气泡本体 */
.thought-bubble-main {
    background: #fffffe;
    border: 1px solid #e6e6e6;
    border-radius: 16px;
    padding: 10px 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: block;
}

/* 文字样式 */
.thought-text {
    font-size: 13px;
    color: #666;
    font-style: italic;
    line-height: 1.4;
    margin-bottom: 4px;
}

.thought-fav {
    text-align: right;
    font-size: 10px;
    color: #FF9500;
    font-weight: 600;
    opacity: 0.8;
}

/* 动画 */
@keyframes thoughtAppear {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 心声气泡的连接小圆圈 */
.thought-tail-1 {
    position: absolute;
    bottom: -6px;
    left: 7px;
    width: 25px;
    height: 25px;
    background: #fffffe;
    border-radius: 50%;
}

.thought-tail-2 {
    position: absolute;
    bottom: -18px;
    left: -4px;
    width: 12px;
    height: 12px;
    background: #fffffe;
    border-radius: 50%;
}

/* 隐藏心声行的头像 */
.msg-row.inner-voice-row .msg-avatar-col,
.msg-row.inner-voice-row .msg-avatar-placeholder {
    display: none !important;
}

/* 状态页脚样式，确保占位稳定 */
.msg-status-foot {
    color: #8e8e93;
    font-size: 11px;
    margin-top: 2px;
    margin-bottom: 12px;
    clear: both;
}

/* 消息行基础间距 */
.msg-row {
    margin-bottom: 4px;
}

.msg-row.has-tail {
    margin-bottom: 8px;
}

/* 丝滑进场动画 */
@keyframes msgSlideUp {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.new-msg-anim {
    animation: msgSlideUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* 灰飞烟灭动画：元素会向上飘散并消失 */
@keyframes disintegrate {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0) grayscale(0);
    }

    20% {
        transform: scale(1.02) translateX(2px);
    }

    100% {
        opacity: 0;
        transform: scale(1.5) translateY(-40px) rotate(5deg);
        filter: blur(15px) grayscale(1) brightness(2);
    }
}

/* 触发类名 */
.disintegrating {
    animation: disintegrate 0.6s cubic-bezier(0.55, 0.055, 0.675, 0.19) forwards !important;
    pointer-events: none !important;
}

/* ============================================================
   6.4. 表情包系统 (Sticker System) 
   ============================================================ */
/* 容器与面板 (基础骨架) */
.sticker-picker-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20000 !important;
    display: none;
    align-items: flex-end;
    pointer-events: none;
}

.sticker-picker-container.active {
    display: flex !important;
    pointer-events: auto !important;
}

.sticker-glass-panel {
    width: 100%;
    height: 45vh;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    animation: slideUpSticker 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes slideUpSticker {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

/* 顶部导航与分组 */
.sticker-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.sticker-tab {
    padding: 6px 14px;
    margin-right: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #999;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.sticker-tab.active {
    background: #333;
    color: #fff;
}

.sticker-close {
    margin-left: auto;
    width: 30px;
    height: 30px;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #666;
    font-size: 18px;
    cursor: pointer;
}

/* 分组子导航 */
.sticker-sub-nav {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    scrollbar-width: none;
}

.sticker-sub-nav::-webkit-scrollbar {
    display: none;
}

.sticker-group-pill {
    flex-shrink: 0;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #999;
    background: #f2f2f7;
    border-radius: 16px;
    transition: all 0.2s;
    cursor: pointer;
}

.sticker-group-pill.active {
    background: #000;
    color: #fff;
    transform: scale(1.05);
}

/* --- 3. 表情网格 --- */
.sticker-body {
    flex: 1 !important;
    min-height: 0 !important;
    width: 100% !important;
    background: #fff !important;
    overflow: hidden !important;
}

.sticker-grid-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    align-content: start;
}

/* 单个表情项 - 修复变形的关键在这里 */
.sticker-item {
    aspect-ratio: 1/1;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    background-color: #f9f9f9;
    cursor: pointer;
    position: relative;
    box-sizing: border-box;
    /* 锁住尺寸，防止加边框变大 */
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), border 0.1s;
}

.sticker-item:active {
    transform: scale(0.95);
}

/* --- 4. 选中状态逻辑  --- */
.sticker-item.selected {
    transform: scale(0.88);
    border: 3px solid #007aff;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

/* 屏蔽掉旧代码里的 ghost 伪元素 */
.sticker-item.selected::after {
    display: none;
}

/* 右上角对勾 */
.sticker-item.selected::before {
    content: '✓';
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    background: #007aff;
    color: white;
    font-size: 13px;
    font-weight: 800;
    border-radius: 50%;
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    animation: checkPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes checkPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    80% {
        transform: scale(1.2);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 名称标签 */
.sticker-name-tag {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    font-size: 9px;
    color: rgba(0, 0, 0, 0.4);
    text-align: center;
    pointer-events: none;
    opacity: 0;
}

.sticker-item:hover .sticker-name-tag {
    opacity: 1;
}

/* 添加按钮特殊样式 */
.sticker-item.add-item {
    border: 2px dashed #e0e0e0 !important;
    background: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.sticker-item.add-item span {
    color: #ccc !important;
    font-weight: 300 !important;
    font-size: 32px !important;
    margin-top: -2px;
}

/* --- 5. 底部与操作栏 --- */
.sticker-footer {
    flex-shrink: 0 !important;
    background: #fff !important;
    border-top: 1px solid rgba(0, 0, 0, 0.05) !important;
    padding: 10px 20px 30px !important;
    /* 统一padding */
    position: relative !important;
    z-index: 999 !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sticker-add-btn {
    background: #f0f0f0;
    color: #333;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

/* 删除模式底栏 */
.sticker-delete-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.delete-count-text {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.delete-confirm-btn {
    background: #ff3b30;
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(255, 59, 48, 0.3);
    transition: transform 0.1s, opacity 0.2s;
    cursor: pointer;
}

.delete-confirm-btn:active {
    transform: scale(0.95);
}

.delete-cancel-btn {
    color: #007aff;
    font-size: 16px;
    font-weight: 500;
    padding: 8px 10px;
    cursor: pointer;
}

/* --- 6. 上传弹窗 (Overlay) --- */
#sticker-upload-overlay .custom-alert-box {
    width: 310px !important;
    height: 420px !important;
    max-height: 80vh !important;
    background: #fff !important;
    border-radius: 24px !important;
    padding: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2) !important;
    position: relative !important;
}

.upload-modal-header {
    flex-shrink: 0;
}

.upload-modal-body::-webkit-scrollbar {
    width: 4px;
}

.upload-modal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

/* URL输入行 */
.url-input-row {
    display: flex !important;
    gap: 8px !important;
    margin-bottom: 10px !important;
    align-items: center !important;
}

#sticker-url-input {
    flex: 2 !important;
    height: 34px !important;
    background: #f5f5f7 !important;
    border: none !important;
    padding: 0 10px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    outline: none !important;
}

.url-add-btn {
    flex: 1 !important;
    height: 34px !important;
    background: #eee !important;
    color: #333 !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
}

/* 预览列表项 */
.upload-preview-item {
    display: flex !important;
    align-items: center !important;
    background: #fff !important;
    padding: 8px !important;
    border-radius: 12px !important;
    margin-bottom: 8px !important;
    border: 1px solid rgba(0, 0, 0, 0.02) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.up-thumb {
    width: 44px !important;
    height: 44px !important;
    border-radius: 8px !important;
    background-size: cover !important;
    background-position: center !important;
    background-color: #f0f0f0 !important;
    flex-shrink: 0 !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.up-input-name {
    flex: 1;
    margin: 0 10px;
    border: none;
    background: #f5f5f7;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    outline: none;
    transition: background 0.2s;
}

.up-input-name:focus {
    background: #eef;
}

.up-del {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
}

.up-del:hover {
    background: #ff3b30;
    color: white;
}

/* 预览项：修复图片和输入框对齐 */
.sticker-preview-item {
    display: flex;
    align-items: center;
    /* 垂直居中对齐的关键 */
    gap: 12px;
    padding: 10px;
    background: #fff;
    border-radius: 12px;
    margin-bottom: 8px;
}

.sticker-preview-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.sticker-preview-item input {
    flex: 1;
    height: 36px;
    border: 1px solid #efeff4;
    background: #f9f9f9;
    border-radius: 8px;
    padding: 0 10px;
    font-size: 13px;
    outline: none;
}

/* ------------------------------------------------------------
   6.5. 聊天控制面板 (Control Panel / Settings)
   ------------------------------------------------------------ */
.ins-header-card {
    padding: 30px 20px 20px;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ins-avatar-pair {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    width: 100%;
}

.ins-head-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
}

.ins-big-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #f0f0f0;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.ins-big-name {
    font-size: 16px;
    font-weight: 700;
    color: #000;
}

.ins-role-tag {
    font-size: 10px;
    color: #999;
    border: 1px solid #eee;
    padding: 2px 8px;
    border-radius: 10px;
}

.ins-heart-connect {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: -30px;
}

.heart-line {
    width: 40px;
    height: 1px;
    background: #eee;
    margin-bottom: 5px;
}

.heart-icon {
    font-size: 14px;
    color: #ff3b30;
    animation: beat 1s infinite;
}

@keyframes beat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

.ins-days-counter {
    font-size: 12px;
    color: #666;
    background: #f9f9f9;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.ins-bio-box {
    width: 100%;
    margin-top: 10px;
}

.ins-label {
    font-size: 11px;
    color: #999;
    margin-bottom: 5px;
    font-weight: 600;
}

.ins-bio-input {
    width: 100%;
    border: none;
    border-bottom: 1px solid #eee;
    padding: 8px 0;
    font-size: 15px;
    outline: none;
    color: #333;
    background: transparent;
}

.ins-divider-line {
    height: 10px;
    background: #f9f9f9;
    width: 100%;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.ins-section-title {
    padding: 20px 20px 10px;
    font-size: 14px;
    font-weight: 700;
    color: #000;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ins-section-title::before {
    content: '•';
    color: #000;
}

.ins-menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
}

.ins-menu-item:active {
    background: #fafafa;
}

.ins-menu-left {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.ins-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ins-icon-box svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.ins-point {
    font-size: 12px;
    color: #000;
    margin-top: 3px;
}

.ins-menu-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ins-menu-text .title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.ins-menu-text .desc {
    font-size: 11px;
    color: #999;
}

.ins-arrow {
    color: #ccc;
    font-size: 18px;
    font-family: monospace;
}

.frame-lib-item {
    position: relative;
    width: 100%;
    height: 19vw;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #f0f0f0;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: all 0.2s;
}

.frame-lib-item:active {
    transform: scale(0.95);
}

.frame-lib-item.selected {
    border-color: #007aff;
    background: #f0f8ff;
}

.preview-face {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    background-color: #e0e0e0;
    border-radius: 50%;
    z-index: 1;
}

.frame-lib-img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.cc-header-card {
    background: #fff;
    margin: 20px 16px 15px;
    border-radius: 20px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.cc-user-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    cursor: pointer;
}

.cc-user-column:active {
    opacity: 0.7;
}

.cc-avatar-large {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: #eee;
    background-size: cover;
    background-position: center;
    border: 3px solid #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.cc-user-name {
    font-size: 15px;
    font-weight: 700;
    color: #333;
}

.cc-user-role {
    font-size: 10px;
    color: #999;
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 10px;
}

.cc-connect-line {
    width: 40px;
    height: 2px;
    background: #eee;
    position: relative;
    margin-top: -20px;
}

.cc-connect-line::after {
    content: '❤';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    color: #ff2d55;
    font-size: 12px;
    padding: 0 5px;
}

/* 右键通用菜单 */
.ins-context-menu {
    position: fixed;
    z-index: 22000 !important;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 8px;
    width: 220px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    animation: menuPop 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    -webkit-user-select: none;
    user-select: none;
}

.ins-menu-item {
    padding: 12px 16px;
    font-size: 14px;
    color: #333;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.ins-menu-item:last-child {
    border-bottom: none;
}

.ins-menu-item:active {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
}

.ins-menu-item.danger {
    color: #ff3b30;
}

/* 详细设定页的小标题样式微调 */
.ins-menu-text .title {
    font-weight: 600;
    color: #333;
}

/* 那个频率输入框被选中时的样子 */
.ios-input-number:focus {
    background: #fff !important;
    border-color: #007aff !important;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

#active-interval-box {
    transition: all 0.3s ease;
}

/* ------------------------------------------------------------
   6.6. 聊天总结/故事页 (Summary / Stories)
   ------------------------------------------------------------ */
/* 基础容器 */
#sub-page-summary .sub-content {
    background: #fafafa;
    /* 浅灰底色 */
    min-height: 100%;
}

/* 头部区域 */
.ins-header-v2 {
    background: #fff;
    padding: 30px 20px 25px;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.03);
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 10;
}

/* 双人头像组 */
.ins-avatar-pair {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 15px;
}

/* 单个头像圆圈 */
.avatar-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background-color: #f0f0f0;
    background-size: cover;
    background-position: center;
    border: 3px solid #fff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: transform 0.2s;
}

.avatar-circle:nth-child(2) {
    margin-left: -20px;
    /* ★ 向左挤压 */
    z-index: 2;
}

.avatar-circle:nth-child(1) {
    z-index: 1;
}

/* 中间的连接图标 */
.ins-connect-icon {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(30%);
    background: #fff;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 11px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    z-index: 3;
    color: #ff2d55;
}

/* 文字信息 (名字 & Shared Memories) */
.ins-header-info {
    text-align: center;
    margin-bottom: 25px;
}

.ins-header-title {
    font-size: 18px;
    font-weight: 800;
    color: #1c1c1e;
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}

.ins-header-sub {
    font-size: 11px;
    color: #999;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 600;
}

/* 操作按钮行 */
.ins-action-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

/* 胶囊按钮本体 */
.ins-action-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.1s;
    background: #fff;
    box-shadow: none;
    border: 1px solid #cbcbcb;
    color: #333;
}

.ins-action-pill:active {
    transform: scale(0.96);
    background: #f9f9f9;
}

.ins-action-pill .icon {
    margin-right: 6px;
    font-size: 15px;
}

/* AI 按钮特殊样式 */
.ins-action-pill.ai {
    background: #575757;
    color: #fff;
    border-color: #E5E5EA;
}

/* === iCity 风格日记卡片 === */
.icity-card {
    background: #fff;
    width: 90%;
    max-width: 360px;
    margin: 15px auto;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* 头部：头像 + 名字 */
.icity-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.icity-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-color: #eee;
    margin-right: 10px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.icity-info {
    display: flex;
    flex-direction: column;
}

.icity-name {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.icity-handle {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

/* 内容区域 */
.icity-body {
    font-size: 14px;
    color: #333;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    margin-bottom: 8px;
    min-height: 20px;
    outline: none;
}

/* 时间 */
.icity-time {
    font-size: 11px;
    color: #ccc;
    margin-bottom: 12px;
    font-family: sans-serif;
}

/* 经典的虚线分割 */
.icity-divider {
    width: 100%;
    height: 1px;
    border-top: 2px dashed #f0f0f0;
    margin-bottom: 12px;
}

/* 底部操作栏 */
.icity-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #999;
    font-size: 12px;
}

.icity-btn {
    display: flex;
    align-items: center;
    gap: 4px;
}

.icity-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #999;
    font-size: 12px;
    padding-top: 4px;
}

.icity-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: color 0.2s;
}

/* 所有的 SVG 图标统一大小 */
.icity-btn svg {
    width: 18px;
    height: 18px;
    fill: #999;
    transition: fill 0.2s;
}

/* 只有点赞按钮的图标可以变红 */
.icity-btn.like-btn:active svg,
.icity-btn.like-btn.active svg {
    fill: #ff4757;
}

/* ------------------------------------------------------------
   6.7. 通用按钮组件 (General Buttons)
   ------------------------------------------------------------ */
.alert-btn {
    flex: 1;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    transition: opacity 0.2s;
}

.alert-btn:active {
    opacity: 0.7;
}

.action-btn-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    width: 100%;
}

.url-input-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    align-items: center;
}

#sticker-url-input {
    flex: 2;
    height: 34px;
    background: #f5f5f7;
    border: none;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 12px;
    outline: none;
}

.url-add-btn {
    flex: 1;
    height: 34px;
    background: #eee;
    color: #333;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* ==========================================================================
   7. SETTINGS & 子页面 (设置与其部分子页面)
   ========================================================================== */
.settings-ui {
    background: #f2f2f7;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.settings-header-area {
    padding: 50px 16px 10px 16px !important;
    background: #f2f2f7;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settings-big-title {
    font-size: 34px;
    font-weight: 700;
    color: #000;
    margin-bottom: 5px;
    margin-left: 4px;
    line-height: 1.2;
}

.settings-search-bar {
    background: #e3e3e8;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    color: #8e8e93;
    font-size: 17px;
    width: 100%;
    box-sizing: border-box;
}

.s-search-icon {
    width: 18px;
    height: 18px;
    fill: #8e8e93;
    flex-shrink: 0;
}

.s-mic-icon {
    width: 18px;
    height: 18px;
    fill: #8e8e93;
    flex-shrink: 0;
    opacity: 0.7;
}

.s-search-placeholder {
    flex: 1;
    margin-left: 8px;
    text-align: left;
    font-size: 17px;
    line-height: normal;
}

.settings-list {
    padding: 0 16px;
    flex: 1;
    overflow-y: auto;
    padding-bottom: 40px;
}

.settings-list .profile-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #ddd;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.s-group {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 18px;
}

.s-item {
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 48px;
    cursor: pointer;
    font-size: 16px;
    position: relative;
}

.s-item:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 56px;
    right: 0;
    height: 1px;
    background: #c6c6c8;
    transform: scaleY(0.5);
}

.s-item:active {
    background: #e5e5ea;
}

.profile-item {
    height: 80px !important;
}

.profile-item::after {
    left: 16px !important;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-desc {
    font-size: 12px;
    color: #666;
}

.s-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ios-icon-img {
    width: 29px;
    height: 29px;
    border-radius: 6px;
    object-fit: cover;
}

.ios-icon-bg {
    width: 29px;
    height: 29px;
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
}

.ios-icon-svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.s-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.s-status {
    font-size: 15px;
    color: #8e8e93;
}

.s-arrow {
    color: #c4c4c7;
    font-size: 22px;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin-top: -3px;
    transform: scaleY(1.1);
    margin-left: auto;
    padding-left: 10px;
}

.ios-switch {
    position: relative;
    display: inline-block;
    width: 51px;
    height: 31px;
}

.ios-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e9e9ea;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 27px;
    width: 27px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked+.slider {
    background-color: #34c759;
}

input:checked+.slider:before {
    transform: translateX(20px);
}

.bg-blue {
    background-color: #007aff;
}

.bg-teal {
    background-color: #5ac8fa;
}

.bg-gray {
    background-color: #8e8e93;
}

.bg-orange {
    background-color: #ff9500;
}

.bg-green {
    background-color: #34c759;
}

/* API配置 & 全局顶栏 */
/* 全局顶栏*/
.sub-header {
    height: 94px;
    padding-top: 46px;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid #eeecea !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    position: sticky !important;
    top: 0;
    z-index: 100
}

.sub-header .back-btn {
    position: absolute !important;
    left: 10px !important;
    top: auto !important;
    bottom: 0 !important;
    height: 50px !important;
    width: 50px !important;
    color: #1c1c1e !important;
    font-size: 28px !important;
    font-weight: 300 !important;
    display: flex;
    align-items: center;
    justify-content: flex-start
}

.sub-header span {
    color: #000 !important;
    font-size: 17px !important;
    font-weight: 600 !important;
    letter-spacing: -0.5px;
    margin-top: 4px
}

.sub-header div[onclick*="save"],
.sub-header div[onclick*="Save"],
.sub-header div[onclick*="apply"],
.sub-header div[onclick*="Done"] {
    position: absolute !important;
    right: 15px !important;
    top: auto !important;
    bottom: 10px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #000 !important;
    background: rgba(0, 0, 0, 0.05) !important;
    padding: 6px 14px !important;
    border-radius: 20px !important
}

/* API 配置页 (设置卡片风格) */
.ins-form-page {
    background-color: #FAFAFA !important;
    padding: 20px;
    min-height: 100%
}

.ins-settings-card {
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02)
}

.ins-card-title {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center
}

.ins-input-group {
    margin-bottom: 12px
}

.ins-input-label {
    font-size: 11px;
    color: #999;
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
    letter-spacing: 0.5px
}

.ins-input-field {
    width: 100%;
    background: #F5F5F7;
    border: none;
    border-radius: 12px;
    padding: 12px 15px;
    font-size: 14px;
    color: #333;
    outline: none;
    transition: background 0.2s
}

.ins-input-field:focus {
    background: #EFEFF1
}

.ins-input-field::placeholder {
    color: #ccc
}

.ins-segment-control {
    display: flex;
    background: #F5F5F7;
    padding: 4px;
    border-radius: 14px;
    margin-bottom: 20px
}

.ins-segment-btn {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    font-size: 13px;
    font-weight: 600;
    color: #999;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s
}

.ins-segment-btn.active {
    background: #fff;
    color: #000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05)
}

.ins-btn-full {
    width: 100%;
    background: #000;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    padding: 14px 0;
    border-radius: 14px;
    text-align: center;
    cursor: pointer;
    margin-top: 10px
}

.ins-btn-full:active {
    opacity: 0.8
}

.ins-btn-ghost {
    color: #FF3B30;
    font-size: 13px;
    text-align: center;
    padding: 15px;
    cursor: pointer;
    font-weight: 500
}

/* 备份页卡片 (Ins Style Backup) */
.ins-card {
    background: #fff;
    border-radius: 24px;
    padding: 20px;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden
}

.ins-card:active {
    transform: scale(0.96)
}

.ins-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 60%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none
}

.ins-card-icon-bg {
    width: 56px;
    height: 56px;
    background: #FFF0F5;
    color: #FF69B4;
    border-radius: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    margin-right: 18px
}

.ins-card-icon-bg svg {
    width: 28px;
    height: 28px;
    fill: currentColor
}

.ins-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center
}

.ins-card-title {
    font-size: 17px;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px
}

.ins-card-desc {
    font-size: 12px;
    color: #999;
    line-height: 1.4
}

.ins-card-arrow {
    width: 30px;
    height: 30px;
    background: #F5F5F5;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    font-weight: bold;
    color: #FF69B4
}


/* 全局字体设置 (Global Font Settings) */
/* 定义全局变量 */
:root {
    --global-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body,
button,
input,
textarea,
select,
.edit-text {
    font-family: var(--global-font) !important;
}

/* 设置面板样式 */
.font-setting-card {
    grid-column: 1 / -1 !important;
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    width: 100%;
}

.font-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.font-url-input {
    flex: 1;
    background: #f5f5f5;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    outline: none;
    transition: all 0.2s;
}

.font-url-input:focus {
    background: #fff;
    border-color: #007aff;
}

.font-btn {
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.font-btn.apply {
    background: #000;
    color: #fff;
}

.font-btn.reset {
    background: #f0f0f0;
    color: #ff3b30;
}

/* 预览区域 */
.font-preview-box {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    border: 1px dashed #ddd;
    margin-top: 10px;
}

.font-preview-text {
    font-size: 20px;
    margin-bottom: 5px;
    color: #333;
    font-family: var(--global-font);
}

.font-preview-sub {
    font-size: 12px;
    color: #999;
}

/* Ins风 壁纸控制面板 */
.blur-control-card {
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.bcc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 700;
    color: #333;
}

.bcc-reset {
    font-size: 11px;
    color: #007aff;
    background: rgba(0, 122, 255, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
    cursor: pointer;
}

.bcc-row {
    margin-bottom: 18px;
}

.bcc-row:last-child {
    margin-bottom: 0;
}

.bcc-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
    font-weight: 600;
}

.bcc-num {
    color: #333;
    font-family: monospace;
}

/* iOS风格滑块美化 */
.ios-slider-range {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    outline: none;
}

.ios-slider-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.1s;
}

.ios-slider-range::-webkit-slider-thumb:active {
    transform: scale(1.1);
    background: #fafafa;
}

/* 预览图同步层 */
#wall-current-preview {
    position: relative;
    width: 100%;
    height: 56%;
    border-radius: 12px;
    background-color: #8e8e93;
    background-image: var(--wall-url, none);
    background-size: cover;
    background-position: center;
    filter: blur(var(--bg-blur, 0px)) brightness(var(--bg-dim, 100%));
    transition: filter 0.1s linear;
    overflow: hidden;
    z-index: 1;
}

#wall-current-preview::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: radial-gradient(circle, transparent 60%, rgba(0, 0, 0, var(--bg-vignette, 0)) 100%);
    z-index: 2;
}

/* 桌面美化 & 主题系统 */
#sub-icon {
    background-color: #FAFAFA !important;
}

/* 主题预设 */
.theme-preset-area {
    padding: 20px;
    background: #fff;
    margin-bottom: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.theme-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.theme-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    letter-spacing: 0.5px;
}

.theme-add-btn {
    background: #333;
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.preset-scroll-view {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: none;
}

.preset-scroll-view::-webkit-scrollbar {
    display: none;
}

.preset-card {
    min-width: 100px;
    height: 140px;
    background: #f4f4f4;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.preset-card.active {
    border-color: #333;
    background: #fff;
}

.preset-preview {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: #ddd;
    margin-bottom: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    background-size: cover;
    background-position: center;
}

.preset-name {
    font-size: 12px;
    color: #666;
    font-weight: 600;
}

/* 优雅的灰色减号 */
.preset-del {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background: #e0e0e0;
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.preset-del::before {
    content: '';
    width: 8px;
    height: 2px;
    background: #fff;
    border-radius: 1px;
}

.preset-del span {
    display: none;
}

/* 图标编辑 */
.icon-edit-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 0 20px 40px 20px;
}

.icon-edit-card {
    background: #fff;
    border-radius: 18px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    transition: transform 0.1s;
}

.icon-edit-card:active {
    transform: scale(0.98);
}

.icon-preview-box {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background-color: #f0f0f0;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    cursor: pointer;
    position: relative;
}

.icon-preview-box::after {
    content: '📷';
    position: absolute;
    bottom: 0;
    right: 0;
    font-size: 10px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 4px;
    padding: 1px;
}

.icon-input-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.icon-label-static {
    font-size: 10px;
    color: #bbb;
    text-transform: uppercase;
}

.icon-name-input {
    width: 100%;
    border: none;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    padding: 4px 0;
    outline: none;
    background: transparent;
}

.icon-name-input:focus {
    border-bottom-color: #333;
}

/* 吐司边框样式 */
.app-icon.toast-style {
    box-shadow: 0 0 0 var(--toast-width, 4px) var(--toast-color, #fff), 0 4px 10px rgba(0, 0, 0, 0.1);
    background-origin: border-box;
    transition: box-shadow 0.2s;
}

/* 组件与空APP */
.widget-dual-row {
    display: flex;
    gap: 15px;
    padding: 0 5px;
    margin-top: 15px;
    width: 100%;
}

.ins-square-widget {
    flex: 1;
    aspect-ratio: 1/1;
    background-color: #fff;
    border-radius: 20px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.ins-square-widget[style*="background-image: initial"]::after,
.ins-square-widget:not([style*="background-image"])::after {
    content: '+';
    font-size: 30px;
    color: #eee;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.app-item.empty {
    opacity: 0;
    pointer-events: none;
}

.app-item.placeholder {
    opacity: 1;
}

.app-item.placeholder .app-icon {
    background-color: rgba(255, 255, 255, 0.3) !important;
    border: 2px dashed rgba(0, 0, 0, 0.1);
    box-shadow: none;
}

.app-item.placeholder .app-icon::before {
    display: none;
}

/* ==========================================================================
   1:1 复刻 iOS 原生壁纸设置页 (V3 - 最终纯净版)
   ========================================================================== */
.ios-wallpaper-page {
    background: #f2f2f7;
    height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    overflow: hidden;
}

/* 苹果原生顶栏 */
.ios-wp-header {
    padding: 55px 20px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
    background: #f2f2f7;
}

.ios-wp-title {
    font-size: 17px;
    font-weight: 600;
    color: #000;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    letter-spacing: 0.5px;
}

.ios-wp-back {
    font-size: 17px;
    color: #007aff;
    display: flex;
    align-items: center;
    cursor: pointer;
    letter-spacing: -0.3px;
    gap: 4px;
}

.ios-wp-back svg {
    width: 22px;
    height: 22px;
    fill: #007aff;
    margin-left: -6px;
}

.ios-wp-content {
    padding: 0 20px 40px;
    overflow-y: auto;
    flex: 1;
    scrollbar-width: none;
}

.ios-wp-content::-webkit-scrollbar {
    display: none;
}

/* 白色主卡片 (包裹两台手机的容器) */
.ios-wp-main-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px 0 35px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.ios-wp-current-label {
    font-size: 14px;
    font-weight: 600;
    color: #8e8e93;
    margin-bottom: 25px;
    letter-spacing: 1px;
}

/* 双机同框预览区 */
.ios-wp-preview-section {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 0 15px;
    width: 100%;
}

/* 手机模型 (已合并裁切与防溢出代码) */
.ios-mockup-phone {
    box-sizing: border-box;
    width: calc(50% - 8px);
    max-width: 155px;
    aspect-ratio: 9 / 19.5;
    flex-shrink: 0;
    border-radius: 24px;
    background-color: #000;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
    transition: filter 0.2s;
    -webkit-clip-path: inset(0 round 24px);
    clip-path: inset(0 round 24px);
    transform: translateZ(0);
}

/* "自定义" 悬浮按钮 */
.ios-customize-btn {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    color: #000;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    white-space: nowrap;
}

/* UI 遮罩层布局 */
.mock-ui-layer {
    box-sizing: border-box;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 10% 8%;
    display: flex;
    flex-direction: column;
    pointer-events: none;
    border-radius: inherit;
}

.mock-ls-date {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 9px;
    font-weight: 500;
    margin-top: 15%;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.mock-ls-time {
    text-align: center;
    color: #fff;
    font-size: 40px;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
    margin-top: -2%;
}

/* 主屏幕模糊占位符 */
.mock-placeholder {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    border-radius: 8px;
}

/* 蓝色添加按钮 (已合并间距修正代码) */
.ios-add-wp-btn {
    margin-top: 30px;
    background: #007aff;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: 0.2s;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 6px rgba(0, 122, 255, 0.2);
}

.ios-add-wp-btn:active {
    transform: scale(0.96);
    opacity: 0.9;
}

/* 底部提示卡片 */
.ios-wp-hint-card {
    background: #e5e5ea;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ios-wp-hint-text {
    flex: 1;
    padding-right: 15px;
}

.ios-wp-hint-title {
    font-size: 14px;
    font-weight: 600;
    color: #000;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.ios-wp-hint-sub {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
}

.ios-wp-hint-icon {
    width: 36px;
    height: 76px;
    border-radius: 8px;
    border: 2px solid #c7c7cc;
    position: relative;
    overflow: hidden;
    background: #d1d1d6;
    flex-shrink: 0;
}

.ios-wp-hint-icon::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* 特效调节区 */
.ios-effects-group {
    background: #fff;
    border-radius: 12px;
    padding: 0 20px;
    margin-top: 20px;
}

.ios-effect-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 0.5px solid #c6c6c8;
}

.ios-effect-row:last-child {
    border-bottom: none;
}

.ios-effect-label {
    font-size: 15px;
    color: #000;
    width: 80px;
}

.ios-effect-slider {
    flex: 1;
    margin: 0 15px;
    -webkit-appearance: none;
    height: 4px;
    background: #e5e5ea;
    border-radius: 2px;
    outline: none;
}

.ios-effect-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.ios-effect-val {
    font-size: 15px;
    color: #8e8e93;
    width: 45px;
    text-align: right;
}

/* ==========================================================================
   8. ALERTS & OVERLAYS (弹窗系统）
   ========================================================================== */
.custom-alert-overlay {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0);
    z-index: 20000 !important;
    display: none;
    justify-content: center;
    align-items: center;
    animation: fadeOverlayIn 0.3s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.custom-alert-overlay.closing-anim {
    animation: fadeOverlayOut 0.2s ease-in forwards;
    pointer-events: none;
}

#delete-alert-overlay {
    z-index: 100002 !important;
}

.custom-alert-box {
    width: 280px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 20px;
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 1;
    transform: scale(1);
    animation: iosSpring 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* 退场时的盒子动画 */
.custom-alert-overlay.closing-anim .custom-alert-box {
    animation: iosZoomOut 0.15s ease-in forwards;
}

.alert-title {
    font-size: 19px;
    font-weight: 700;
    color: #000;
    margin-bottom: 8px;
    text-align: center;
}

.alert-msg {
    font-size: 14px;
    color: #666;
    text-align: center;
    line-height: 1.5;
    margin-bottom: 25px;
    width: 100%;
    word-wrap: break-word;
}

.alert-btn-group {
    display: flex;
    gap: 12px;
    width: 100%;
    justify-content: center;
}

/* 竖向排列的按钮组 */
.alert-btn-group[style*="column"] {
    gap: 10px;
}

.alert-btn {
    flex: 1;
    padding: 12px 0;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.05);
    color: #999999;
    transition: all 0.1s;
    position: relative;
    overflow: hidden;
}

.alert-btn:active {
    transform: scale(0.97);
    opacity: 0.8;
}

/* 颜色变种 */
.alert-btn.confirm {
    background: #007aff;
    color: #999999;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.25);
}

.alert-btn.cancel {
    background: #E5E5EA;
    color: #000;
    font-weight: 500;
}

.alert-btn[style*="background:#34c759"] {
    background: #34C759 !important;
    box-shadow: 0 2px 8px rgba(52, 199, 89, 0.25);
}

.alert-btn[style*="background: #ff3b30"] {
    background: #FF3B30 !important;
    box-shadow: 0 2px 8px rgba(255, 59, 48, 0.25);
}

.alert-btn.confirm {
    background: #007aff;
    color: #fff !important;
}

.alert-btn.cancel {
    background: #e5e5ea;
    color: #999999 !important;
}

.delete-btn {
    color: #ff3b30 !important;
    margin-left: 10px;
    cursor: pointer;
}

/* 关键帧动画 */
@keyframes iosSpring {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }

    60% {
        transform: scale(1.05);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes iosZoomOut {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(0.9);
        opacity: 0;
    }
}

@keyframes fadeOverlayIn {
    from {
        background: rgba(0, 0, 0, 0);
    }

    to {
        background: rgba(0, 0, 0, 0.4);
    }
}

@keyframes fadeOverlayOut {
    from {
        background: rgba(0, 0, 0, 0.4);
    }

    to {
        background: rgba(0, 0, 0, 0);
    }
}

/* 顶部消息提示 */
#custom-toast-container {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    pointer-events: none;
    z-index: 20000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.ins-toast {
    background: rgba(40, 40, 40, 0.9) !important;
    color: #ffffff !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 6px 24px !important;
    border-radius: 50px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15) !important;
    border: none !important;
    z-index: 20001 !important;
    transform: translateY(-20px) scale(0.9);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.ins-toast.show {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.ins-toast .toast-icon {
    display: none !important;
}

.ins-toast .toast-msg {
    margin: 0;
}

/* ================== 通用弹窗样式 ================== */
/* 通用弹窗容器 (Confirm & Input) */
.custom-alert-box.ins-style {
    /* 容器外观 */
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 20px !important;
    width: 280px !important;
    /* ★★★ 修改1: 增加垂直内边距，让弹窗更高、不那么扁 ★★★ */
    padding: 32px 24px !important;
    min-height: 180px !important;
    /* 保证一个最小高度 */
    /* 柔和投影 */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    height: auto !important;
    /* 默认入场动画 (假设你有，没有也不影响) */
    /* animation: alertFadeIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); */
}

/* 标题 */
.custom-alert-box.ins-style .alert-title {
    width: 100% !important;
    text-align: center !important;
    font-size: 19px !important;
    font-weight: 800 !important;
    color: #000 !important;
    margin: 0 0 12px 0 !important;
    /* 间距稍微拉大 */
    line-height: 1.3 !important;
    padding: 0 !important;
}

/* 内容文字 */
.custom-alert-box.ins-style .alert-msg {
    width: 100% !important;
    text-align: center !important;
    font-size: 14px !important;
    color: #666 !important;
    line-height: 1.5 !important;
    margin: 0 0 28px 0 !important;
    /* 间距拉大，支撑高度 */
    padding: 0 !important;
    white-space: normal !important;
    word-wrap: break-word !important;
}

/* 输入框 (如果有的话) */
.custom-alert-box.ins-style input {
    width: 100% !important;
    background: #F2F2F7 !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 10px !important;
    height: 44px !important;
    font-size: 16px !important;
    color: #000 !important;
    margin-bottom: 24px !important;
    outline: none !important;
    text-align: center !important;
    box-shadow: none !important;
}

/* 按钮组容器 */
.custom-alert-box.ins-style .alert-btn-group {
    width: 100% !important;
    display: flex !important;
    gap: 12px !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 按钮通用基础样式 */
.custom-alert-box.ins-style .alert-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 14px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    height: 48px !important;
    flex: 1 !important;
    cursor: pointer;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
    transition: transform 0.1s, background-color 0.2s !important;
}

.custom-alert-box.ins-style .alert-btn:active {
    transform: scale(0.96) !important;
}

.custom-alert-box.ins-style .alert-btn.confirm {
    background: #007aff !important;
    /* iOS Blue */
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 6px 15px rgba(0, 122, 255, 0.35) !important;
    /* 蓝色光晕 */
}

/* ★★★ 修改2: 危险操作样式 (红色 - 删除/警告) ★★★ */
/* 如果弹窗容器加了 'destructive' 这个类，按钮就会变红 */
.custom-alert-box.ins-style.destructive .alert-btn.confirm {
    background: #FF3B30 !important;
    /* iOS Red */
    box-shadow: 0 6px 15px rgba(255, 59, 48, 0.35) !important;
    /* 红色光晕 */
}

/* 可选：危险操作时，标题也变红 */
.custom-alert-box.ins-style.destructive .alert-title {
    color: #FF3B30 !important;
}

/* 取消按钮 (通用浅灰色) */
.custom-alert-box.ins-style .alert-btn.cancel {
    background: #F2F2F7 !important;
    color: #8E8E93 !important;
    border: none !important;
}

/* 定义缩放渐隐动画关键帧 */
@keyframes alertFadeOutScale {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(0.9);
        /* 稍微缩小一点退场 */
    }
}

/* 当JS给弹窗加上 'closing' 类时触发动画 */
.custom-alert-box.ins-style.closing {
    animation: alertFadeOutScale 0.2s ease-in forwards !important;
    pointer-events: none !important;
    /* 退场时禁止再次点击 */
}

/* 针对次要按钮和边框按钮 */
.btn-secondary,
.btn-outline {
    border: 2px solid #c7c7cc !important;
    font-weight: 500;
}

.close-btn {
    border: 2px solid #c7c7cc !important;
}

/* 通知条 & 红点 */
.ios-notification-banner {
    position: fixed;
    top: 55px;
    left: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 18px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    z-index: 99999;
    transform: translateY(-200%);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ios-notification-banner.show {
    transform: translateY(0);
}

.notif-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: #eee;
    background-size: cover;
    background-position: center;
}

.notif-content {
    flex: 1;
    overflow: hidden;
}

.notif-title {
    font-size: 14px;
    font-weight: 600;
    color: #000;
    margin-bottom: 2px;
}

.notif-msg {
    font-size: 13px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-time {
    font-size: 11px;
    color: #999;
    margin-left: auto;
    align-self: flex-start;
}

/* 桌面红点 */
.app-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 20px;
    height: 20px;
    background-color: #ff3b30;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid #fff;
    z-index: 100;
    display: none;
    pointer-events: none;
}

.app-badge.show {
    display: flex;
}

/* ========================================== */
/* ★★★ 高仿 iOS 原生红点样式 (Pro Max 版) ★★★ */
/* ========================================== */
.badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 24px;
    height: 24px;
    border-radius: 24px;
    padding: 0 6px;
    box-sizing: border-box;
    background-color: #ff3b30;
    color: white;
    font-size: 14px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    display: none;
    align-items: center;
    justify-content: center;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.badge.show {
    display: flex !important;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    0% {
        transform: scale(0);
    }

    100% {
        transform: scale(1);
    }
}

/* ==========================================================================
   9. 酷狗音乐全套样式 
   ========================================================================== */
.widget-music-ios {
    position: relative;
    width: 310px;
    height: 140px;
    background: rgba(30, 30, 35, 0.65);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    overflow: hidden;
    margin: 15px auto 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.03);
    color: white;
    transition: transform 0.2s;
    z-index: 10;
}

.widget-music-ios:active {
    transform: scale(0.98);
}

.music-widget-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    height: 100%;
    padding: 16px;
}

.mw-left {
    margin-right: 16px;
}

.mw-cover {
    width: 100px;
    height: 100px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.mw-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.mw-song-info {
    margin-bottom: 10px;
}

.mw-title {
    display: block;
    font-size: 17px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.mw-waveform {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 18px;
    opacity: 0.8;
}

.wave-bar {
    width: 3px;
    background: #fff;
    border-radius: 3px;
    height: 3px;
    animation: waveJump 0.8s ease-in-out infinite alternate;
    animation-play-state: paused;
}

.wb1 {
    height: 10px;
    animation-delay: 0s;
}

.wb2 {
    height: 16px;
    animation-delay: 0.2s;
}

.wb3 {
    height: 8px;
    animation-delay: 0.4s;
}

.wb4 {
    height: 14px;
    animation-delay: 0.1s;
}

.wb5 {
    height: 6px;
    animation-delay: 0.3s;
}

.widget-music-ios.playing .wave-bar {
    animation-play-state: running;
}

@keyframes waveJump {
    0% {
        transform: scaleY(1);
        opacity: 0.6;
    }

    100% {
        transform: scaleY(1.6);
        opacity: 1;
    }
}

.mw-controls {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 5px;
}

.mw-btn {
    width: 24px;
    height: 24px;
    cursor: pointer;
    opacity: 0.9;
}

.mw-play-btn {
    width: 30px;
    height: 30px;
}

/* =========================================
   ✨ Doris 社交风音乐组件 (魔改版)
   ========================================= */
.doris-music-card {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.6));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 22px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    font-family: -apple-system, sans-serif;
    color: #333;
}

.dm-profile-area {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    padding: 0 4px;
}

.dm-avatar-box {
    position: relative;
    margin-right: 10px;
}

.dm-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.dm-note-bubble {
    position: absolute;
    bottom: -2px;
    right: -4px;
    background: #fff;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    font-size: 9px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dm-user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.dm-name {
    font-size: 14px;
    font-weight: 800;
    color: #333;
    line-height: 1.1;
}

.dm-handle {
    font-size: 10px;
    color: #888;
    margin-top: 2px;
    font-weight: 500;
}

.dm-edit-btn {
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    border: none;
    font-size: 11px;
    font-weight: 700;
    color: #555;
}

.dm-player-box {
    flex: 1;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    padding: 8px;
    display: flex;
    align-items: center;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.dm-cover-wrapper {
    flex-shrink: 0;
    margin-right: 10px;
}

.dm-album-art {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.dm-track-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.dm-text-info {
    margin-bottom: 6px;
}

.dm-song-title {
    font-size: 13px;
    font-weight: 700;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.dm-meta-row {
    display: flex;
    align-items: center;
}

.dm-artist {
    font-size: 10px;
    color: #666;
    font-weight: 500;
}

.dm-progress-mini {
    width: 100%;
    height: 3px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 2px;
    margin-bottom: 6px;
    overflow: hidden;
}

.dm-prog-fill {
    height: 100%;
    background: #333;
    border-radius: 2px;
}

.dm-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dm-ctrl-btn {
    width: 20px;
    height: 20px;
    cursor: pointer;
    filter: grayscale(100%) opacity(0.7);
    transition: transform 0.1s;
}

.dm-play-big {
    width: 24px;
    height: 24px;
    filter: grayscale(100%) opacity(0.9);
}

.dm-ctrl-btn:active {
    transform: scale(0.85);
}

/* ==================== 2. 酷狗 APP 主界面 (全屏) ==================== */
#app-kugou {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 5000;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.kugou-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(3px) brightness(0.6);
    z-index: 0;
    pointer-events: none;
    transition: background-image 0.5s ease;
}

.music-header {
    position: relative;
    z-index: 10;
    height: 50px;
    margin-top: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    color: white;
}

.music-main {
    position: relative;
    z-index: 10;
}

.disk-container {
    border: 8px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.disk-rotating {
    animation: rotateDisk 20s linear infinite;
}

.disk-paused {
    animation-play-state: paused;
}

@keyframes rotateDisk {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.music-controls {
    position: relative;
    z-index: 10;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
}

#prog-bar {
    -webkit-appearance: none;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

#prog-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
}

/* ==================== 3. 新功能：抽屉与列表 (CSS补丁) ==================== */
.music-result-row,
.playlist-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.2s;
}

.music-result-row:active,
.playlist-item:active {
    background: rgba(255, 255, 255, 0.1);
}

.playlist-item.playing {
    color: #fce76d;
}

.playlist-item.playing .song-artist {
    color: rgba(252, 231, 109, 0.7) !important;
}

#like-btn {
    font-size: 20px;
    margin-left: 8px;
    transition: transform 0.2s;
}

#like-btn.liked {
    color: #ff4757 !important;
    font-weight: bold;
}

#like-btn:active {
    transform: scale(1.3);
}

#music-search-results::-webkit-scrollbar,
#playlist-content::-webkit-scrollbar {
    width: 4px;
}

#music-search-results::-webkit-scrollbar-thumb,
#playlist-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

/* === 🎵 音波动画 === */
.wave-bar {
    width: 4px;
    background: #fff;
    border-radius: 2px;
    height: 5px;
    animation: waveJump 1s ease-in-out infinite;
    animation-play-state: paused;
}

.wave-bar:nth-child(1) {
    height: 10px;
    animation-duration: 0.8s;
}

.wave-bar:nth-child(2) {
    height: 20px;
    animation-duration: 1.1s;
}

.wave-bar:nth-child(3) {
    height: 15px;
    animation-duration: 1.3s;
}

.wave-bar:nth-child(4) {
    height: 25px;
    animation-duration: 0.9s;
}

.wave-bar:nth-child(5) {
    height: 18px;
    animation-duration: 1.2s;
}

.wave-bar:nth-child(6) {
    height: 22px;
    animation-duration: 1.4s;
}

.wave-bar:nth-child(7) {
    height: 12px;
    animation-duration: 1.0s;
}

.wave-bar:nth-child(8) {
    height: 16px;
    animation-duration: 1.5s;
}

.playing .wave-bar {
    animation-play-state: running !important;
}

@keyframes waveJump {

    0%,
    100% {
        height: 5px;
        opacity: 0.5;
    }

    50% {
        height: 25px;
        opacity: 1;
    }
}

/* === 🎤 歌词样式 === */
#lyric-view::-webkit-scrollbar {
    display: none;
}

/* === 🎤 歌词列表 (紧凑精致版) === */
#lyric-view {
    height: 100%;
    overflow-y: auto;
    padding: 0;
    scrollbar-width: none;
    scroll-behavior: smooth;
    position: relative;
}

.lrc-line {
    color: rgba(255, 255, 255, 0.5);
    font-size: 15px;
    padding: 4px 0;
    line-height: 1.4;
    transition: all 0.4s ease-out;
    cursor: pointer;
    transform: scale(0.95);
    filter: blur(0.3px);
}

.lrc-active {
    color: #fff !important;
    font-size: 18px;
    font-weight: 700;
    transform: scale(1.05);
    margin: 8px 0;
    filter: blur(0);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.lrc-line:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* === Ins风搜索结果列表 === */
.ins-search-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
    transition: background 0.2s;
}

.ins-search-item:active {
    opacity: 0.7;
    transform: scale(0.98);
}

.ins-search-cover {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    margin-right: 12px;
    background: rgba(255, 255, 255, 0.1);
}

.ins-search-info {
    flex: 1;
    min-width: 0;
}

.ins-search-title {
    font-size: 15px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

.ins-search-artist {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ins-add-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fce76d;
    font-size: 16px;
    margin-left: 10px;
}

/* === iOS 风格大型音乐组件 === */
.ios-music-widget-lg {
    width: 325px;
    height: 180px;
    background: rgba(30, 30, 30, 0.5);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin: 10px auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    color: #fff;
}

.imw-top {
    display: flex;
    gap: 15px;
    align-items: center;
}

.imw-cover-box img {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.imw-info {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.imw-title {
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.imw-artist {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 2px;
}

.imw-lyric {
    font-size: 12px;
    color: #fce76d;
    margin-top: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.9;
    font-weight: 500;
}

.imw-progress {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 5px;
}

.imw-bar-bg {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.imw-bar-fill {
    height: 100%;
    background: #fff;
    border-radius: 2px;
    transition: width 0.1s linear;
}

.imw-time {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    font-family: monospace;
}

.imw-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.imw-btn {
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.imw-btn:active {
    transform: scale(0.9);
    opacity: 0.7;
}

.imw-btn.sm {
    width: 28px;
    height: 28px;
}

.imw-btn.lg {
    width: 42px;
    height: 42px;
}

/* === 🍎 iOS 丝滑按压动画 (通用) === */
.ios-click-anim {
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
    cursor: pointer;
    will-change: transform;
}

.ios-click-anim:active {
    transform: scale(0.85);
    opacity: 0.7;
}

/* === 🎵 iOS 扁平版音乐组件 (更透明版) === */
.ios-music-widget-flat {
    width: 340px;
    height: 145px;
    background: rgba(30, 30, 30, 0.2);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 14px 18px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin: 5px auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    color: #fff;
}

.imw-top-flat {
    display: flex;
    gap: 12px;
    align-items: center;
    height: 60px;
}

.imw-cover-flat {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.imw-controls-flat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
    margin-top: 2px;
}

.imw-center-group {
    display: flex;
    align-items: center;
    gap: 32px;
}

/* ==========================================================================
   10. 全局组件 (顶栏 & 灵动岛适配 & 动画)
   ========================================================================== */
.sub-header {
    height: 96px !important;
    padding-top: 46px !important;
    background-color: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.05) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    position: sticky !important;
    top: 0;
    z-index: 100;
}

.sub-header .back-btn {
    position: absolute !important;
    left: 10px !important;
    bottom: 0 !important;
    height: 50px !important;
    width: 50px !important;
    color: #1c1c1e !important;
    font-size: 28px !important;
    font-weight: 300 !important;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.sub-header span {
    color: #000 !important;
    font-size: 17px !important;
    font-weight: 600 !important;
    letter-spacing: -0.5px;
    margin-top: 4px;
}

.sub-header div[onclick*="save"],
.sub-header div[onclick*="Save"],
.sub-header div[onclick*="apply"] {
    position: absolute !important;
    right: 15px !important;
    bottom: 10px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #000 !important;
    background: rgba(0, 0, 0, 0.05) !important;
    padding: 6px 14px !important;
    border-radius: 20px !important;
}

#sub-api-config .sub-header {
    padding-top: 68px !important;
    height: 96px !important;
}

#sub-api-config .sub-header span {
    margin-top: 10px !important;
}

/* iOS 弹窗动画 */
@keyframes iosAppOpen {
    0% {
        transform: scale(0.92);
        opacity: 0;
        border-radius: 50px;
    }

    100% {
        transform: scale(1);
        opacity: 1;
        border-radius: 0;
    }
}

@keyframes iosAppClose {
    0% {
        transform: scale(1);
        opacity: 1;
        border-radius: 0;
    }

    100% {
        transform: scale(0.92);
        opacity: 0;
        border-radius: 50px;
    }
}

.app-window {
    display: none;
    animation-duration: 0.4s;
    animation-timing-function: cubic-bezier(0.32, 0.72, 0, 1);
    animation-fill-mode: forwards;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.4s cubic-bezier(0.32, 1, 0.23, 1), transform 0.4s cubic-bezier(0.32, 1, 0.23, 1);
    pointer-events: none;
}

.app-window.active {
    display: flex;
    animation-name: iosAppOpen;
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.app-window.closing {
    animation-name: iosAppClose;
    pointer-events: none;
    transform: scale(0.92);
    opacity: 0;
}

.back-btn {
    transition: transform 0.1s;
}

.back-btn:active {
    transform: scale(0.8);
}

.sub-header span,
.wx-h-title,
.chat-h-name {
    color: #000 !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    letter-spacing: -0.5px;
}

/* ==========================================================================
   8. 钱包 & 转账系统 (淡淡的极简 Ins 风)
   ========================================================================== */

/* 基础重置与布局 */
.ins-wallet-light {
    background: #ffffff;
    color: #111;
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
    height: 100vh;
    overflow-y: auto;
    display: none;
    flex-direction: column;
    list-style: none !important;
}

.ins-wallet-light * {
    list-style: none !important;
    box-sizing: border-box;
}

/* 极简顶部 */
.ins-wal-header-light {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 50px 24px 10px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.ins-wal-header-left {
    cursor: pointer;
    display: flex;
    align-items: center;
}

.ins-wal-title-light {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* 留白呼吸感余额区 */
.ins-wal-balance-area {
    padding: 40px 24px 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ins-wal-balance-label {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
    margin-bottom: 12px;
}

.ins-wal-balance-value {
    font-size: 56px;
    font-weight: 700;
    letter-spacing: -2px;
    margin: 0 0 24px 0;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

.ins-wal-balance-symbol {
    font-size: 24px;
    font-weight: 500;
    color: #333;
}

/* 胶囊按钮 */
.ins-wal-action-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    width: 100%;
}

.ins-wal-action-btn {
    background: #f5f5f5;
    color: #111;
    padding: 14px 0;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    flex: 1;
    max-width: 150px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ins-wal-action-btn:active {
    background: #e8e8e8;
    transform: scale(0.98);
}

/* 模块标题 (打上承重钢筋) */
.ins-wal-section-title-light {
    font-size: 13px;
    font-weight: 700;
    color: #111;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 20px 24px 10px;
    flex-shrink: 0;
    /* 🌟 关键：标题绝对不允许被压缩 */
}

/* 快捷头像区 (终极防塌陷霸体版) */
.ins-wal-qt-scroll {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    /* 🌟 关键：彻底封杀垂直方向的滑动可能 */
    padding: 10px 24px 20px;
    gap: 18px;
    scrollbar-width: none;
    align-items: flex-start;
    flex-shrink: 0;
    /* 🌟 关键：整个大盒子不允许被底下的账单挤扁！ */
    min-height: 105px;
    /* 🌟 强制预留出完美的完美高度 (头像52+间距8+名字15+内边距30) */
}

.ins-wal-qt-scroll::-webkit-scrollbar {
    display: none;
}

/* 单个头像卡片 */
.ins-wal-qt-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    cursor: pointer;
}

/* 锁死头像本身的宽高 */
.ins-wal-qt-avatar {
    width: 52px;
    height: 52px;
    min-width: 52px;
    min-height: 52px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-color: #f5f5f5;
    border: 1px solid #eaeaea;
    transition: transform 0.2s;
}

.ins-wal-qt-avatar:active {
    transform: scale(0.9);
}

.ins-wal-qt-avatar.add {
    border: 1.5px dashed #ccc;
    background: #fafafa;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    color: #999;
    font-weight: 300;
}

/* 名字文本 */
.ins-wal-qt-name {
    font-size: 11px;
    font-weight: 500;
    color: #555;
    width: 100%;
    max-width: 52px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

/* 极简流水线账单 (无卡片，纯文本排版) */
.ins-wal-bill-list-light {
    padding: 0 24px 40px;
    display: flex;
    flex-direction: column;
}

.ins-wal-bill-item-light {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #f2f2f2;
}

.ins-wal-bill-item-light:last-child {
    border-bottom: none;
}

.ins-wal-bill-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ins-wal-bill-name {
    font-size: 15px;
    font-weight: 600;
    color: #111;
    margin: 0;
}

.ins-wal-bill-time {
    font-size: 12px;
    color: #999;
    margin: 0;
}

.ins-wal-bill-amount {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.ins-wal-bill-amount.in {
    color: #07C160;
}

.ins-wal-bill-amount.out {
    color: #111;
}

/* 全屏收款页动画控制 */
.transfer-page-anim {
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.4s ease;
    transform: translateY(100%);
    opacity: 0;
}

.transfer-page-anim.show {
    transform: translateY(0);
    opacity: 1;
}

/* --- [B] 全屏收款页--- */
.msg-content.transfer {
    background-color: #2c2c2e !important;
    color: #fff !important;
    padding: 12px 16px !important;
    width: 230px !important;
    border-radius: 18px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    cursor: pointer !important;
    position: relative !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: opacity 0.2s;
}

.msg-content.transfer .tf-icon-img {
    width: 40px;
    height: 40px;
    background-image: url('https://i.postimg.cc/Kv8ysdkp/wu-biao-ti119-20260117103413.png');
    background-size: cover;
    background-position: center;
    border-radius: 14px;
    flex-shrink: 0;
}

.msg-content.transfer .tf-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.msg-content.transfer .tf-amt {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.msg-content.transfer .tf-status {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.msg-content.transfer.accepted,
.msg-content.transfer.refunded {
    background-color: #3a3a3c !important;
    opacity: 0.8;
}

.msg-content.transfer.accepted .tf-icon-img {
    filter: grayscale(100%);
    opacity: 0.6;
}

.msg-row.me.has-tail .msg-content.transfer::before,
.msg-row.other.has-tail .msg-content.transfer::before {
    display: none !important;
}

.msg-content.receipt {
    background-color: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    color: #333 !important;
    padding: 10px 14px !important;
    border-radius: 12px !important;
    font-size: 13px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important;
    min-width: 140px;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.receipt-icon {
    width: 20px;
    height: 20px;
    background: #faae2d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    flex-shrink: 0;
}

.receipt-icon.refund {
    background: #ff3b30;
}

.receipt-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.receipt-sub {
    font-size: 10px;
    color: #999;
}

.msg-row .msg-content.receipt::before,
.msg-row.has-tail .msg-content.receipt::before {
    display: none !important;
}


/* --- [C] 发起转账 & 密码输入界面 --- */
#transfer-amount-overlay {
    background: #fff;
}

#transfer-pwd-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.tf-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-size: cover;
}

#tf-amount-input {
    border: none;
    font-size: 40px;
    font-weight: 600;
    width: 100%;
    outline: none;
    background: transparent;
}

#tf-next-btn {
    transition: all 0.3s;
}

#tf-next-btn.disabled {
    background: #f0f0f0 !important;
    color: #ccc !important;
    pointer-events: none;
}

.pwd-dot {
    width: 14px;
    height: 14px;
    border: 1px solid #ddd;
    border-radius: 50%;
    transition: all 0.2s;
}

.pwd-dot.active {
    background: #000;
    border-color: #000;
}

.ins-num-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: #f0f0f0;
    border-top: 1px solid #f0f0f0;
}

.num-key {
    background: #fff;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 500;
    color: #000;
    cursor: pointer;
}

.num-key:active {
    background: #f9f9f9;
}

.num-key.empty {
    background: #f9f9f9;
    cursor: default;
}

.num-key.del {
    font-size: 20px;
    background: #f9f9f9;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}


/* --- [D] 层级控制 --- */
#transfer-amount-overlay,
#transfer-pwd-overlay,
.custom-alert-overlay {
    z-index: 214748 !important;
}

/* ==========================================================================
   超可爱复古小票弹窗样式
   ========================================================================== */
#receipt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.receipt-paper {
    width: 280px;
    background: #fff;
    color: #000;
    padding: 30px 25px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    /* 模拟撕纸边缘的上下虚线 */
    border-top: 3px dashed #ccc;
    border-bottom: 3px dashed #ccc;
    font-family: 'Courier New', Courier, monospace;
    /* 复古打印机字体 */
    transform: scale(0.8);
    opacity: 0;
    animation: popReceipt 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popReceipt {
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.receipt-header {
    text-align: center;
    margin-bottom: 15px;
}

.rcpt-cute-text {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.rcpt-title {
    font-size: 36px;
    font-weight: 900;
    letter-spacing: 2px;
    line-height: 1;
    font-family: 'Arial Black', Impact, sans-serif;
}

.rcpt-subtitle {
    font-size: 14px;
    font-weight: bold;
    margin-top: 4px;
}

.rcpt-divider {
    border-top: 2px dotted #000;
    margin: 15px 0;
}

.rcpt-table {
    width: 100%;
    border-collapse: collapse;
    font-weight: bold;
    font-size: 14px;
}

.rcpt-table th {
    border-bottom: 2px solid #000;
    padding-bottom: 5px;
}

.rcpt-total-area {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 24px;
    font-weight: 900;
    font-family: 'Arial Black', Impact, sans-serif;
    margin: 20px 0;
}

/* 纯代码画的黑白条形码 (超酷) */
.rcpt-barcode {
    width: 100%;
    height: 50px;
    margin: 20px 0;
    background: repeating-linear-gradient(90deg,
            #000, #000 2px, #fff 2px, #fff 4px,
            #000 4px, #000 5px, #fff 5px, #fff 8px,
            #000 8px, #000 12px, #fff 12px, #fff 14px,
            #000 14px, #000 16px, #fff 16px, #fff 19px);
}

.rcpt-footer {
    text-align: center;
    font-weight: bold;
    font-size: 13px;
    letter-spacing: 1px;
}

.rcpt-close-btn {
    margin-top: 20px;
    font-size: 12px;
    color: #888;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s;
}

.rcpt-close-btn:active {
    color: #000;
}

/* ==========================================================================
   ★ 10. 全局统一顶栏与布局系统 (User 定制版)
   ========================================================================== */
.sub-header,
#sub-api-config .sub-header,
#sub-page-summary .sub-header,
.settings-header-area .sub-header,
.chat-header-layer,
.chat-header-ios {
    height: 105px !important;
    padding-top: 50px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.15) !important;
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.chat-header-layer {
    background: transparent !important;
    border-bottom: none !important;
    height: 115px !important;
    padding-top: 55px !important;
    display: block !important;
}

.header-left-group {
    display: flex;
    align-items: center;
    height: 100%;
    padding-left: 5px;
    padding-top: 10px;
}

.sub-header .back-btn,
.chat-header-ios .c-h-left,
.header-left-group .back-btn {
    height: 40px !important;
    width: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10 !important;
    cursor: pointer;
}

.sub-header .back-btn svg,
.header-left-group .back-btn svg {
    fill: #000 !important;
}

.sub-header .left-title,
.header-left-group .left-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #000 !important;
    margin-left: 5px !important;
    letter-spacing: -0.5px;
}

.sub-header>span:not(.left-title),
.sub-header .title,
.chat-header-ios .title {
    position: absolute !important;
    top: 55px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    font-size: 17px !important;
    font-weight: 600 !important;
    color: #000 !important;
    z-index: 1;
}

.header-right-btn,
.sub-header .header-right-btn,
.chat-header-ios .c-h-right {
    position: absolute !important;
    right: 15px !important;
    top: 55px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10 !important;
}

.header-right-btn svg {
    fill: #000 !important;
}

.chat-header-layer .chl-name,
.chat-header-layer .chl-back-btn {
    color: #fff !important;
}

.sub-page .settings-list,
.sub-page .sub-content,
.sub-page .ali-scroll-content,
.sub-page .ins-form-page {
    padding-top: 120px !important;
    margin-top: 0 !important;
}

#sub-page-creator {
    padding-top: 0 !important;
}

.chat-header-layer {
    height: 120px !important;
    padding-top: 40px !important;
    background: #FEFEFC !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.15) !important;
    box-shadow: none !important;
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2000;
    display: block !important;
}

.chat-header-layer .chl-name {
    color: #000 !important;
}

.chat-header-layer .chl-status {
    color: #999 !important;
}

.chl-back-btn svg,
.chl-menu-btn svg {
    fill: #000 !important;
}

.sub-header .back-btn {
    top: 50px !important;
    padding-bottom: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 44px !important;
    line-height: 1 !important;
}

/* === 朋友圈可见性弹窗样式 === */
.vis-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 20000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
    justify-content: center;
    align-items: flex-end;
}

.vis-overlay.active {
    display: flex;
    opacity: 1;
}

.vis-drawer {
    width: 100%;
    background: #fff;
    border-radius: 20px 20px 0 0;
    padding-bottom: 30px;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.vis-overlay.active .vis-drawer {
    transform: translateY(0);
}

.vis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.vis-title {
    font-weight: 700;
    font-size: 16px;
}

.vis-done-btn {
    color: #007aff;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
    text-align: right;
}

.visibility-drawer-overlay,
.mention-drawer-overlay {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
    z-index: 9999;
    display: none;
    flex-direction: column;
    justify-content: flex-end;
}

.visibility-drawer-overlay.active,
.mention-drawer-overlay.active {
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.drawer-content {
    background: #fff;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.active .drawer-content {
    transform: translateY(0);
}

.closing-anim .drawer-content {
    transform: translateY(100%);
}

.mention-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 30000;
    display: none;
    align-items: flex-end;
}

.mention-drawer-overlay.active {
    display: flex !important;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
}

.mention-drawer-overlay .drawer-content {
    width: 100%;
    background: #ffffff;
    border-radius: 15px 15px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
}

.mention-drawer-overlay.active .drawer-content {
    transform: translateY(0);
}

.mention-drawer-overlay.closing-anim .drawer-content {
    transform: translateY(100%);
}

.drawer-header {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 0.5px solid #efefef;
}

.drawer-header span {
    font-size: 16px;
    font-weight: 600;
    color: #262626;
    flex: 1;
    text-align: center;
    margin-left: 40px;
}

.drawer-close {
    font-size: 15px;
    font-weight: 600;
    color: #0095f6;
    cursor: pointer;
    padding: 10px 0;
}

.drawer-list {
    max-height: 60vh;
    overflow-y: auto;
    padding: 10px 0;
}

.v-row-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    transition: background 0.2s;
}

.v-row-item:active {
    background: #fafafa;
}

.v-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 0.5px solid #efefef;
    margin-right: 12px;
}

.v-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #262626;
}

.v-check-box {
    width: 22px;
    height: 22px;
    border: 2px solid #dbdbdb;
    border-radius: 50%;
    position: relative;
    transition: all 0.2s;
}

.v-check-box.checked {
    background: #0095f6;
    border-color: #0095f6;
}

.v-check-box.checked::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* === Mist Forest 风格提醒卡片 === */
.mist-card-container {
    width: 240px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
}

.mist-card-container:active {
    transform: scale(0.98);
}

.mist-browser-header {
    height: 28px;
    background: linear-gradient(to bottom, #e8e8e8, #dcdcdc);
    display: flex;
    align-items: center;
    padding: 0 10px;
    border-bottom: 1px solid #ccc;
    position: relative;
}

.mist-dots {
    display: flex;
    gap: 5px;
}

.mist-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: block;
}

.mist-title {
    position: absolute;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 10px;
    color: #666;
    font-weight: 600;
    font-family: monospace;
    pointer-events: none;
}

.mist-card-body {
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg, #fff 0%, #f9f9f9 100%);
}

.mist-avatar-box {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    padding: 3px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
}

.mist-main-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.mist-deco-star {
    position: absolute;
    font-size: 12px;
    color: #ccc;
    opacity: 0.6;
}

.mist-info-text {
    text-align: center;
    margin-bottom: 15px;
}

.mist-username {
    font-size: 12px;
    font-weight: bold;
    color: #333;
}

.mist-sub {
    font-size: 10px;
    color: #999;
    letter-spacing: 0.5px;
}

.mist-enter-btn {
    background: #666;
    color: #fff;
    font-size: 10px;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 500;
}

/* ================= World Book ULTIMATE CLEAN ================= */
#worldbook-app {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #F2F2F7;
    z-index: 1000;
    display: none;
    opacity: 0;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.3s;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
    color: #000;
    flex-direction: column;
}

#worldbook-app.active {
    display: flex !important;
    transform: translateY(0);
    opacity: 1;
}

#wb-home-view,
#wb-detail-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: #F2F2F7;
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

#wb-detail-view {
    transform: translateX(100%);
    z-index: 2;
    background: #fff;
}

#wb-home-view.slide-left {
    transform: translateX(-30%);
    filter: brightness(0.9);
}

#wb-detail-view.slide-in {
    transform: translateX(0);
}

.wb-navbar-large {
    flex-shrink: 0;
    padding: 30px 16px 10px;
    background: #F2F2F7;
    display: flex;
    flex-direction: column;
}

.wb-nav-top {
    height: 44px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 5px;
}

.wb-nav-action {
    color: #007AFF;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
}

.wb-large-title {
    font-size: 34px;
    font-weight: 800;
    color: #000;
    margin-bottom: 10px;
    line-height: 1.1;
}

.wb-search-bar {
    background: #E3E3E8;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    margin-bottom: 15px;
    color: #8E8E93;
    font-size: 17px;
}

.wb-segment-control {
    background: #E3E3E8;
    border-radius: 9px;
    padding: 2px;
    display: flex;
    height: 32px;
    width: 100%;
}

.wb-segment-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 500;
    border-radius: 7px;
    color: #000;
    transition: 0.2s;
}

.wb-segment-btn.active {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

.wb-scroll-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px 16px 80px;
}

.wb-section-header {
    font-size: 20px;
    font-weight: 700;
    margin: 10px 0 15px;
    color: #000;
}

.wb-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 20px;
    row-gap: 90px;
    padding: 10px 16px;
    width: 100%;
}

.wb-folder-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    transition: transform 0.1s, opacity 0.1s;
}

.wb-folder-item:active {
    transform: scale(0.95);
    opacity: 0.8;
}

.wb-folder-name {
    margin-top: 6px;
    font-size: 13px;
    color: #000;
    font-weight: 400;
    text-align: center;
    width: 100%;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wb-folder-count {
    font-size: 11px;
    color: #8E8E93;
    margin-top: 2px;
}

.wb-navbar-inline {
    height: 90px;
    padding-top: 50px;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 8px;
    padding-right: 16px;
    flex-shrink: 0;
}

#wb-entries-list {
    flex: 1;
    overflow-y: auto;
    background: #fff;
    padding: 0;
}

/* ================= File Grid View (文件网格模式) ================= */
#wb-entries-list {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
    padding: 20px 16px !important;
    background: #F2F2F7 !important;
    align-content: start;
    flex-direction: row !important;
}

.wb-file-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    animation: fadeIn 0.3s ease;
}

.wb-file-preview {
    width: 100%;
    aspect-ratio: 3 / 4;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    position: relative;
    overflow: hidden;
}

.wb-file-name {
    font-size: 13px;
    color: #333;
    text-align: center;
    line-height: 1.3;
    width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wb-file-date {
    font-size: 10px;
    color: #999;
    margin-top: 2px;
}

.wb-file-icon-box {
    width: 38px;
    height: 48px;
    border: 1px solid #E5E5EA;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 20px;
    color: #666;
}

#wb-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 20000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

#wb-sheet-overlay.active {
    opacity: 1;
}

.wb-sheet-card {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 92%;
    background: #fff;
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
}

#wb-sheet-overlay.active .wb-sheet-card {
    transform: translateY(0);
}

.wb-sheet-handle {
    width: 36px;
    height: 5px;
    background: #D1D1D6;
    border-radius: 3px;
    margin: 8px auto;
    flex-shrink: 0;
}

.wb-sheet-header {
    height: 44px;
    padding: 0 16px;
    border-bottom: 0.5px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.wb-sheet-body {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.wb-input-line {
    width: 100%;
    font-size: 24px;
    font-weight: 700;
    border: none;
    outline: none;
    margin-bottom: 10px;
}

.wb-editor-wrapper {
    flex: 1;
    border: 1px solid #E5E5EA;
    border-radius: 12px;
    overflow: hidden;
    background: #FAFAFA;
    display: flex;
}

.wb-editor-wrapper textarea {
    width: 100%;
    height: 100%;
    border: none;
    padding: 15px;
    outline: none;
    background: transparent;
    font-size: 15px;
    resize: none;
}

#wb-preview-container {
    flex: 1;
    width: 100%;
    height: 100%;
    background: #fff;
    display: none;
}

.wb-nav-img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    display: block;
}

.wb-nav-icon-btn {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.wb-nav-icon-btn:active {
    opacity: 0.5;
}

#wb-entries-list {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
    padding: 20px 16px !important;
    background: #F2F2F7 !important;
    align-content: start;
    flex-direction: row !important;
}

.wb-grid-file-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    position: relative;
    transition: opacity 0.1s;
}

.wb-grid-file-item:active {
    opacity: 0.6;
}

.wb-file-paper {
    width: 100%;
    aspect-ratio: 3 / 4;
    background: #FFFFFF;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.wb-grid-file-name {
    font-size: 13px;
    color: #000;
    text-align: center;
    line-height: 1.3;
    width: 100%;
    font-weight: 400;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wb-grid-file-date {
    font-size: 10px;
    color: #8E8E93;
    margin-top: 2px;
    text-align: center;
}

.wb-context-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 25000;
    display: none;
    opacity: 0;
    transition: opacity 0.2s;
    flex-direction: column;
    justify-content: flex-end;
}

.wb-context-overlay.active {
    display: flex;
    opacity: 1;
}

.wb-action-sheet {
    width: 96%;
    max-width: 400px;
    margin: 0 auto 10px;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.wb-context-overlay.active .wb-action-sheet {
    transform: translateY(0);
}

.wb-ctx-header {
    background: rgba(249, 249, 249, 0.92);
    backdrop-filter: blur(20px);
    color: #8E8E93;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    padding: 12px;
    border-radius: 13px 13px 0 0;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.1);
}

.wb-ctx-scroll-area {
    background: rgba(249, 249, 249, 0.92);
    backdrop-filter: blur(20px);
    border-radius: 0 0 13px 13px;
    overflow: hidden;
    max-height: 50vh;
    overflow-y: auto;
}

.wb-ctx-item {
    background: transparent;
    padding: 16px;
    text-align: center;
    font-size: 17px;
    color: #007AFF;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.wb-ctx-item:last-child {
    border-bottom: none;
}

.wb-ctx-item:active {
    background: rgba(0, 0, 0, 0.05);
}

.wb-ctx-item.destructive {
    color: #FF3B30;
    font-weight: 600;
}

.wb-ctx-cancel {
    margin-top: 8px;
    background: #fff;
    border-radius: 13px;
    padding: 16px;
    text-align: center;
    font-size: 17px;
    font-weight: 600;
    color: #007AFF;
    cursor: pointer;
}

.wb-ctx-cancel:active {
    background: #f2f2f2;
}

/* --- 单个文件单元 (精致版) --- */
.wb-grid-file-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    transform: scale(0.75);
    transition: all 0.2s ease;
}

.wb-grid-file-item:active {
    transform: scale(0.95);
    opacity: 0.8;
}

.wb-file-paper {
    width: 100%;
    aspect-ratio: 3 / 4;
    background: #FFFFFF;
    border-radius: 5px;
    border: 0.5px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.wb-grid-file-name {
    font-size: 12px;
    color: #000;
    text-align: center;
    line-height: 1.3;
    width: 100%;
    font-weight: 400;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding: 0 2px;
}

.wb-grid-file-date {
    font-size: 10px;
    color: #999;
    margin-top: 2px;
    transform: scale(0.9);
}

.wb-input-sub-line {
    width: 100%;
    font-size: 15px;
    color: #8E8E93;
    border: none;
    outline: none;
    margin-bottom: 15px;
    background: transparent;
    padding-bottom: 8px;
    border-bottom: 0.5px solid #E5E5EA;
}

.wb-input-line {
    margin-bottom: 5px;
}

/* --- 世界书选择器 (分组样式) --- */
.vis-group-header {
    background: #F2F2F7;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #8E8E93;
    text-transform: uppercase;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.vis-group-item {
    background: #fff;
    padding: 12px 16px;
    border-bottom: 0.5px solid #E5E5EA;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding-left: 24px;
}

.vis-group-item:active {
    background-color: #f9f9f9;
}

.vis-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid #C7C7CC;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
}

.vis-check.checked {
    background: #007AFF;
    border-color: #007AFF;
}

/* ==========================================================
   ★ iOS 相册 - Ins 风格精致版 CSS
   ========================================================== */
.ios-photos-app {
    background-color: #ffffff;
    color: #000000;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 500;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Helvetica, Arial, sans-serif;
}

/* 顶栏：极致透明毛玻璃 */
.ph-header-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 94px;
    padding: 44px 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
    box-sizing: border-box;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.3) 100%);
    backdrop-filter: blur(5px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border-bottom: none;
}

.ph-header-left-group {
    display: flex;
    flex-direction: column;
}

.ph-status-time {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.3px;
    margin-bottom: 2px;
}

.ph-main-title {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(45deg, #000, #444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 右上角按钮：去容器化 */
.ph-btn-container {
    display: flex;
    align-items: center;
    gap: 18px;
}

.ph-select-capsule {
    color: #007aff;
    font-size: 17px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.ph-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* --- 2. 滚动区域 --- */
.photos-scroll-view {
    flex: 1;
    overflow-y: scroll;
    /* 允许滚动 */
    padding-top: 100px;
    padding-bottom: 120px;

    background: #ffffff;
    -webkit-overflow-scrolling: touch;
    height: 100%;
    position: relative;
}

/* 隐藏滚动条 */
.photos-scroll-view::-webkit-scrollbar {
    display: none;
}

/* 核心照片网格 (Ins 宫格) */
.photos-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5px;
    /* 极细间距 */
    margin-bottom: 35px;
}

.ph-grid-item {
    position: relative;
    aspect-ratio: 1 / 1;
    background-color: #fafafa;
    overflow: hidden;
}

.ph-grid-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 选中状态：右下角精致对勾 */
.ph-check-circle {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.2);
    z-index: 10;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.select-mode-active .ph-check-circle {
    display: flex;
}

.ph-grid-item.selected .ph-check-circle {
    background: #007aff;
    border-color: #007aff;
}

.ph-grid-item.selected .ph-check-circle::after {
    content: '✓';
    color: #fff;
    font-size: 13px;
    font-weight: 900;
}

/* --- 4. Ins 风格横向滚动区 (通用标题) --- */
.photos-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 20px 12px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.photos-section-header .arrow {
    color: #c7c7cc;
    font-weight: 400;
}

.photos-h-scroll {
    display: flex;
    overflow-x: auto;
    padding: 0 16px;
    gap: 12px;
}

.photos-h-scroll::-webkit-scrollbar {
    display: none;
}

/* A. 最近的日子：大圆角卡片 */
.ph-memory-card {
    flex: 0 0 170px;
    height: 220px;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.ph-mem-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ph-mem-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
}

/* B. 人物：纯圆、微光阴影 */
.ph-person-item {
    flex: 0 0 85px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ph-person-avatar {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    margin-bottom: 8px;
    border: 0.5px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* C. 我的相簿：Ins 拼贴感封面 */
.ph-album-card {
    flex: 0 0 150px;
    margin-bottom: 10px;
}

.ph-album-cover {
    width: 150px;
    height: 150px;
    border-radius: 12px;
    background-color: #f2f2f7;
    background-size: cover;
    background-position: center;
    margin-bottom: 6px;
    border: 0.5px solid rgba(0, 0, 0, 0.05);
}

.ph-album-name {
    font-size: 15px;
    font-weight: 600;
    color: #000;
    display: block;
}

.ph-album-count {
    font-size: 13px;
    color: #8e8e93;
}

/* --- 5. 长按抖动与删除细节 --- */
@keyframes shake-album {
    0% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-1.5deg);
    }

    75% {
        transform: rotate(1.5deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

.ph-album-card.shaking {
    animation: shake-album 0.3s infinite;
}

.ph-album-delete-badge {
    position: absolute;
    top: -6px;
    left: -6px;
    width: 26px;
    height: 26px;
    background: #ff3b30;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    z-index: 20;
}

/* --- 6. 详情页：仿原生右滑入场 --- */
.ph-view-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.ph-view-layer.active {
    transform: translateX(0);
    z-index: 10;
}

.ph-view-layer.next-page {
    transform: translateX(100%);
    z-index: 20;
}

.ph-view-layer.prev-page {
    transform: translateX(-30%);
    z-index: 5;
    filter: brightness(0.9);
}

/* === 大图浏览器 (动画增强) === */
.photo-browser {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.photo-browser.show {
    opacity: 1;
    pointer-events: auto;
}

.pb-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;

    padding: 44px 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffffff;
    z-index: 2010;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
}

/* 让里面的按钮恢复可点击 */
.pb-back,
.pb-time-info {
    pointer-events: auto;
    cursor: pointer;
}

.pb-time-info {
    text-align: center;
}

.pb-time-main {
    font-size: 16px;
    font-weight: 600;
}

.pb-date-sub {
    font-size: 11px;
    opacity: 0.6;
}

.pb-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- 8. 底部操作栏 --- */
.ph-footer-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 84px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 0.5px solid rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    padding: 10px 40px 25px;
    z-index: 150;
    box-sizing: border-box;
}

.ph-footer-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s;
}

.ph-footer-icon-btn:active {
    transform: scale(0.85);
}

.ph-custom-icon {
    width: 26px;
    height: 26px;
}

/* --- 撤回消息整行居中 --- */
.msg-row.recall-row {
    justify-content: center !important;
    /* 核心：让 Flex 容器内容居中 */
    width: 100% !important;
    margin: 12px 0 !important;
    pointer-events: none;
    /* 默认不可点，防止误触 */
}

/* --- 撤回提醒的胶囊样式 --- */
.msg-recall-pill {
    background: rgba(0, 0, 0, 0.05);
    /* 淡淡的灰色背景 */
    color: #999;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 4px;
    /* 微信风格是小方圆角 */
    text-align: center;
    max-width: 80%;
    pointer-events: auto;
    /* 恢复内部文字和链接的可点属性 */
}

/* 多选模式下的勾勾偏移补丁 */
.msg-multi-select-active .recall-row .msg-check-circle {
    display: block;
    left: 20px;
    /* 固定在左侧，不破坏中间的文字对齐 */
}

/* --- 1. 个人主页退场：向左滑出 --- */
@keyframes slideOutToLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(-100%);
        opacity: 0.8;
    }
}

#wx-profile-view.closing {
    animation: slideOutToLeft 0.4s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

/* ============================================================
   INSTAGRAM APP
   ============================================================ */
/* --- 基础 App 框架 --- */
#app-window-instagram {
    background-color: #fff;
    color: #000;
    display: flex;
    flex-direction: column;
    z-index: 500;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: var(--font-family);
}

.section-padding {
    padding: 0 16px;
}

#insta-main-content {
    flex-grow: 1;
    position: relative;
    overflow: hidden;
    background-color: #fff;
}

.insta-page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    display: none;
    scrollbar-width: none;
}

.insta-page::-webkit-scrollbar {
    display: none;
}

.insta-page.active-page {
    display: block;
}

/* --- 顶部导航 --- */
.insta-status-bar-placeholder {
    height: 48px;
    /* 预留灵动岛位置 */
    flex-shrink: 0;
}

#insta-top-nav {
    height: 44px;
    background: #fff;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.insta-nav-header {
    display: none;
    height: 100%;
    align-items: center;
    padding: 0 12px;
}

.insta-nav-header.active {
    display: flex;
    justify-content: space-between;
}

/* ID 绝对居中逻辑 */
.insta-center-title-wrap {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.insta-profile-username {
    font-size: 16px;
    font-weight: 700;
    color: #000;
}

.username-arrow-big {
    width: 14px;
    height: 14px;
    object-fit: contain;
}

.insta-header-left {
    display: flex;
    align-items: center;
}

.insta-header-actions {
    display: flex;
    gap: 18px;
    align-items: center;
    font-size: 22px;
}

.insta-header-icon-small {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

/* --- 首页 Feed 样式 --- */
.insta-stories-bar {
    display: flex;
    gap: 15px;
    padding: 10px 15px;
    overflow-x: auto;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.1);
}

.story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 64px;
    flex-shrink: 0;
}

.story-ring {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    padding: 3px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 5px;
}

.story-ring.unread {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.story-ring.read {
    background-color: #dbdbdb;
}

.story-ring img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #fff;
    object-fit: cover;
}

.story-item span {
    font-size: 11px;
    text-align: center;
}

.insta-post {
    border-bottom: 1px solid #efefef;
    padding-bottom: 10px;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
}

.post-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.post-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.post-image-container img {
    width: 100%;
    display: block;
}

.post-info {
    padding: 10px 15px;
    font-size: 14px;
}

.post-likes {
    font-weight: 700;
    margin-bottom: 4px;
}

/* --- 个人主页 Profile --- */

/* 头像与气泡组 */
.profile-header-new {
    display: flex;
    align-items: center;
    padding: 12px 16px;
}

.profile-avatar-wrapper {
    position: relative;
    width: 86px;
    height: 86px;
    margin-right: 28px;
}

.story-ring-outer {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    border: 1px solid #dbdbdb;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3px;
}

.profile-avatar-big {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
}

.profile-avatar-big img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 状态气泡 (Note Bubble) */
.status-bubble-wrap {
    position: absolute;
    top: -18px;
    left: 10px;
    z-index: 10;
}

.status-bubble-main {
    background: #fff;
    border-radius: 18px;
    padding: 12px 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 0.5px solid #eee;
    display: flex;
    align-items: center;
    gap: 4px;
}

.bubble-text {
    font-size: 11px;
    color: #666;
    font-weight: 500;
}

.bubble-dot-1 {
    width: 15px;
    height: 15px;
    background: #fff;
    border-radius: 50%;
    margin-left: 10px;
    margin-top: -12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.bubble-dot-2 {
    width: 5px;
    height: 5px;
    background: #fff;
    border-radius: 50%;
    margin-left: 20px;
    margin-top: 1px;
}

.avatar-plus-icon-new {
    position: absolute;
    right: 0px;
    bottom: 0px;
    width: 24px;
    height: 24px;
}

/* 数据统计 */
.profile-stats-container {
    flex: 1;
    display: flex;
    justify-content: space-around;
}

.stat-box {
    text-align: center;
}

.stat-num {
    font-size: 17px;
    font-weight: 700;
    color: #000;
    letter-spacing: -0.5px;
}

.stat-label {
    font-size: 14px;
    color: #000;
}

/* 简介 */
.profile-bio-new {
    padding: 0 16px;
    font-size: 14px;
    line-height: 1.4;
    color: #000;
}

.bio-name {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 2px;
}

/* 专业面板与按钮组 (紧凑布局) */
.professional-dashboard-wrap {
    margin-top: 10px;
}

.professional-dashboard {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #efefef;
    border-radius: 10px;
    padding: 10px 14px;
}

.dash-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dash-title {
    font-size: 14px;
    font-weight: 600;
    color: #000;
}

.dash-sub {
    font-size: 13px;
    color: #737373;
    margin-top: 1px;
}

.profile-actions-new {
    margin-top: 8px;
    display: flex;
    gap: 6px;
    padding: 0 16px 16px 16px;
}

.insta-btn-action {
    flex: 1;
    background: #efefef;
    border: none;
    border-radius: 8px;
    height: 34px;
    font-weight: 600;
    font-size: 14px;
    color: #000;
    cursor: pointer;
}

.insta-btn-icon {
    width: 34px;
    height: 34px;
    background: #efefef;
    border: none;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.insta-btn-icon img {
    width: 18px;
}

/* 精选 */
.highlights-bar {
    padding-bottom: 16px;
    border: none;
}

.story-ring.highlight {
    background-color: #fff;
    border: 1px solid #dbdbdb;
}

.add-highlight {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    color: #000;
}

/* Tab 栏与 1/2 滑动黑条 */
.profile-tabs-container {
    position: relative;
    border-top: 0.5px solid #dbdbdb;
}

.profile-tabs {
    display: flex;
    height: 44px;
}

.tab-item {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.tab-icon {
    width: 22px;
    height: 22px;
}

#tab-sliding-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 33.333%;
    height: 1.5px;
    background: transparent;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: center;
}

#tab-sliding-line::after {
    content: '';
    width: 50%;
    height: 100%;
    background: #000;
}

/* 网格 */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background-color: #fff;
}

.grid-item {
    aspect-ratio: 1/1;
    background-color: #f8f8f8;
    overflow: hidden;
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- 底部导航栏 (iOS 抬高适配) --- */
#insta-bottom-nav {
    height: 85px;
    padding-bottom: 25px;
    /* 抬高图标，留出系统 Home Bar 位置 */
    background: #fff;
    border-top: 0.5px solid #dbdbdb;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-shrink: 0;
    z-index: 100;
}

.insta-nav-item {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.insta-nav-icon {
    width: 26px;
    height: 26px;
    object-fit: contain;
    transition: transform 0.1s ease;
}

.insta-nav-item:active .insta-nav-icon {
    transform: scale(0.9);
}

#app-window-instagram {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100dvh !important;
    background-color: #fff !important;
    overflow: hidden !important;
    z-index: 9999;
}

img {
    vertical-align: middle;
}

/* --- 页面切换隐身术 --- */
.ios-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 30000;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform: translateY(0);
    display: flex;
    flex-direction: column;
}

.ios-page.hidden {
    transform: translateY(100%);
    pointer-events: none;
}

/* --- 顶部导航栏 --- */
.insta-header-bar {
    position: relative;
    flex-shrink: 0;
    height: 100px;
    padding-top: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 0.5px solid #dbdbdb;
    background: #fff;
}

/* --- 底部导航栏适配 --- */
#insta-bottom-nav {
    height: calc(60px + env(safe-area-inset-bottom)) !important;
    padding-bottom: env(safe-area-inset-bottom) !important;
    min-height: 85px;
}

.insta-nav-icon {
    display: block !important;
    margin: 0 auto;
}

/* --- 菜单遮罩层 --- */
.insta-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0);
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9999;
    overflow: hidden;
}

.insta-menu-overlay.active {
    background: rgba(0, 0, 0, 0.5);
    visibility: visible;
}

.insta-bottom-sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    border-radius: 12px 12px 0 0;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    padding-bottom: env(safe-area-inset-bottom);
}

.insta-menu-overlay.active .insta-bottom-sheet {
    transform: translateY(0);
}

.sheet-drag-handle {
    width: 36px;
    height: 4px;
    background: #dbdbdb;
    border-radius: 2px;
    margin: 10px auto 8px auto;
}

.sheet-header {
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    padding-bottom: 12px;
    border-bottom: 0.5px solid #dbdbdb;
    margin-bottom: 5px;
}

.sheet-content .menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    gap: 15px;
}

.sheet-content .menu-item:active {
    background: #f5f5f5;
}

.menu-item img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.menu-item span {
    font-size: 16px;
    font-weight: 500;
    color: #000;
}

/* --- 新建帖子：编辑区域 --- */
.insta-compose-area-pro {
    display: flex;
    flex-direction: column;
    padding: 20px 16px 10px;
    background: #fff;
}

.compose-main-image-box {
    width: 200px;
    height: 200px;
    margin: 0 auto 16px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.compose-main-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.add-overlay-hint {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 10px;
    text-align: center;
    padding: 2px 0;
    pointer-events: none;
}

#insta-caption-input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 15px;
    line-height: 1.5;
    min-height: 60px;
    resize: none;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

/* --- 滤镜栏--- */
.filter-scroll-view {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 10px 16px;
    background: #fff;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.filter-scroll-view::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    opacity: 0.5;
    transform: scale(0.95);
    transition: all 0.2s ease;
}

.filter-chip.active {
    opacity: 1 !important;
    transform: scale(1.05);
}

.filter-preview {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    background-color: #eee;
    background-size: cover;
    background-position: center;
    border: 1px solid #ddd;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

/* 选中状态：灰色框 */
.filter-chip.active .filter-preview {
    border: 1px solid #a0a0a0 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.filter-name {
    font-size: 11px;
    color: #262626;
}

/* 滤镜效果定义 */
.f-original {
    filter: none;
}

.f-vivid {
    filter: saturate(1.5) contrast(1.1);
}

.f-warm {
    filter: sepia(0.2) saturate(1.2);
}

.f-cool {
    filter: hue-rotate(180deg) sepia(0.1);
}

.f-bw {
    filter: grayscale(1);
}

.f-film {
    filter: contrast(1.2) brightness(0.9) sepia(0.1);
}

/* --- 话题与投票 --- */
.insta-creative-tags {
    display: flex;
    gap: 10px;
    padding: 5px 16px 5px;
    background: #fff;
    flex-wrap: wrap;
}

.creative-tag-btn {
    width: fit-content;
    display: flex;
    align-items: center;
    gap: 6px;
    background: #efefef;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
}

.creative-tag-btn:active {
    opacity: 0.7;
}

.tag-icon {
    width: 16px;
    height: 16px;
    display: block;
}

.tag-text {
    font-size: 13px;
    font-weight: 500;
    color: #262626;
    line-height: 1;
}

/* --- 通用列表项 --- */
.insta-option-list {
    padding-bottom: 20px;
}

.insta-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 0.5px solid #efefef;
    background: #fff;
}

.list-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.list-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.list-label {
    font-size: 15px;
    color: #262626;
}

.list-right {
    display: flex;
    align-items: center;
    height: 100%;
}

.list-arrow {
    width: 16px;
    height: 16px;
    opacity: 0.4;
}

.list-value {
    font-size: 14px;
    color: #8e8e8e;
    margin-right: 4px;
}

.insta-divider-thick {
    height: 8px;
    background: #f5f5f5;
    border-top: 0.5px solid #efefef;
    border-bottom: 0.5px solid #efefef;
}

.insta-divider-line {
    height: 0.5px;
    background: #efefef;
    margin-left: 16px;
}

/* === 只有你需要隔断时才用的“空砖头” === */
.insta-gap {
    height: 8px;
    /* 想要隔得宽一点就改大，比如 12px */
    background: #f5f5f5;
    /* 这种浅灰色最像原生 App 的背景 */
    border-top: 0.5px solid #efefef;
    /* 上边框线 */
    border-bottom: 0.5px solid #efefef;
    /* 下边框线 */
    width: 100%;
}

/* --- 底部固定分享按钮 --- */
.insta-bottom-share-bar {
    background: #fff;
    padding: 12px 16px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    border-top: 0.5px solid #dbdbdb;
    flex-shrink: 0;
    z-index: 30001;
}

.insta-share-btn-large {
    width: 100%;
    background: #4E5CEC;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 0;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.insta-share-btn-large:active {
    opacity: 0.7;
}

/* --- 评论弹窗基础布局 --- */
.comments-sheet {
    height: 70vh;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.sheet-header {
    width: 100% !important;
    text-align: center !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    padding: 12px 0 !important;
    border-bottom: 0.5px solid #dbdbdb;
    position: relative !important;
}

.comments-list-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px 80px;
}

/* --- 评论单项样式 --- */
.comment-item {
    display: flex;
    gap: 12px;
    padding: 8px;
    margin: 0 -8px 8px;
    font-size: 14px;
    transition: background 0.2s;
    border-radius: 8px;
    -webkit-user-select: none;
    user-select: none;
}

.comment-item:active {
    background: #f0f0f0;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-username {
    font-weight: 600;
    margin-right: 4px;
    color: #262626;
}

.comment-text {
    color: #262626;
    line-height: 1.4;
    flex: 1;
}

.comment-meta {
    margin-top: 4px;
    font-size: 12px;
    color: #8e8e8e;
    display: flex;
    gap: 12px;
}

.reply-text-btn {
    font-weight: 600;
    cursor: pointer;
}

.comment-empty-state {
    text-align: center;
    color: #8e8e8e;
    margin-top: 40px;
}

/* --- 帖子操作栏 --- */
.post-actions {
    padding: 10px 14px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.left-actions {
    display: flex;
    gap: 8px !important;
    /* 紧凑间距 */
    align-items: center;
}

.action-item {
    display: flex;
    align-items: center;
    gap: 4px !important;
    /* 图标与数字紧凑 */
    cursor: pointer;
}

.action-count {
    font-size: 14px;
    font-weight: 600;
    color: #262626;
    min-width: 8px;
}

/* --- 底部评论输入区 --- */
.comments-input-area {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    border-top: 0.5px solid #dbdbdb;
    padding: 10px 16px;

    padding-bottom: max(12px, env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10;
}

.input-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.input-wrapper {
    flex: 1;
    display: flex;
    border: 1px solid #efefef;
    border-radius: 20px;
    padding: 16px 50px 6px 12px;

    align-items: center;
    background: #f8f8f8;
    position: relative;
}

#insta-comment-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    background: transparent;
    transform: translateY(-4px);
}

.post-comment-btn-icon {
    width: 60px;
    height: 60px;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 45%;
    transform: translateY(-50%);
    z-index: 2;
}

.post-comment-btn-icon:active {
    /* 点击时的缩放效果 */
    transform: translateY(-50%) scale(0.9);
}

/* === 1. 评论区标题彻底居中 === */
.comments-sheet .sheet-header {
    width: 100%;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 16px;
    height: 48px;
    border-bottom: 0.5px solid #dbdbdb;
}

/* === 评论项布局 (头像靠顶) === */
.comment-item {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
    align-items: flex-start;
}

/* =========================================
   全局标题居中
   ========================================= */
.sheet-header {
    width: 100%;
    text-align: center;
    justify-content: center;
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 16px;
    padding: 12px 0;
    border-bottom: 0.5px solid #dbdbdb;
    margin-bottom: 0;
}

/* ============================================================
   1. 通用工具类 & 基础设置
   ============================================================ */
.hidden {
    display: none !important;
}

/* 基础页面容器 */
.insta-page {
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
}

/* ============================================================
   私信首页列表样式 (Direct List)
   ============================================================ */
.insta-dm-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: white;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.insta-dm-item:active {
    background: #f5f5f5;
}

/* 首页头像 */
.insta-dm-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin-right: 15px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    object-fit: cover;
    flex-shrink: 0;
}

/* ============================================================
   新建聊天遮罩层 (New Chat Overlay)
   ============================================================ */
#insta-new-chat-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 99999;
    display: flex;
    flex-direction: column;
}

/* 遮罩层 Header */
#insta-new-chat-overlay .insta-header {
    flex-shrink: 0;
    /* 禁止压缩 */
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    border-bottom: 1px solid #dbdbdb;
    background: #fff;
}

/* 搜索框区域 */
.insta-search-box {
    flex-shrink: 0;
    /* 禁止压缩 */
    padding: 10px 15px;
    border-bottom: 1px solid #efefef;
}

/* “建议”标题 */
.insta-suggestion-title {
    flex-shrink: 0;
    padding: 15px 15px 10px 15px;
    font-weight: 600;
    color: #262626;
    font-size: 14px;
}

/* 联系人列表容器 (可滚动) */
#insta-contact-selector-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 20px;
}

/* 单个联系人行 */
#insta-contact-selector-list>div {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    cursor: pointer;
    transition: background 0.2s;
}

#insta-contact-selector-list>div:active {
    background-color: #f5f5f5;
}

/* 遮罩层初始状态：完全透明且在屏幕右侧 */
#insta-new-chat-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.3s ease;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
}

/* 联系人列表容器：用来撑开高度实现垂直居中 */
#insta-contact-selector-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* ============================================================
   4. 聊天窗口气泡样式 (Chat Bubbles)
   ============================================================ */
#insta-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 15px 0;
    background: #fff;
}

/* ============================================================
   全局强制修复 (保留你之前的防塌陷代码)
   ============================================================ */
#insta-profile-page,
.insta-page,
.insta-scroll-container {
    width: 100% !important;
    box-sizing: border-box !important;
}

/* 修复网格空状态 */
.profile-grid-empty-state {
    grid-column: 1 / -1;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    text-align: center;
    color: #8e8e8e;
    font-size: 14px;
}

/* ========================================== */
/* 新建聊天遮罩层样式 (动画 & 布局) */
/* ========================================== */

#insta-new-chat-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 9999;
    display: flex;
    flex-direction: column;

    /* ★★★ 丝滑动画核心 ★★★ */
    /* 默认状态：位于屏幕右侧 (100%)，透明度为 0 */
    transform: translateX(100%);
    opacity: 0;
    /* 使用 ease-in-out 让进出场更自然 */
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    /* 隐藏时不响应鼠标事件，防止点到 */
    pointer-events: none;
}

/* 激活状态：通过 JS 添加此类名来显示 */
#insta-new-chat-overlay.active {
    transform: translateX(0);
    /* 回到屏幕中间 */
    opacity: 1;
    /* 变为不透明 */
    pointer-events: auto;
    /* 恢复鼠标事件响应 */
}

/* 列表容器：设为 flex column 以便让空状态子元素居中 */
#insta-contact-selector-list {
    flex: 1;
    /* 占满剩余空间 */
    overflow-y: auto;
    /* 内容多时滚动 */
    display: flex;
    flex-direction: column;
    background: #fff;
}

/* 空状态提示的专用样式 (暴力居中) */
.insta-no-contacts {
    flex: 1;
    /* 撑满容器高度 */
    display: flex;
    align-items: center;
    /* 垂直居中 */
    justify-content: center;
    /* 水平居中 */
    text-align: center;
    color: #8e8e8e;
    font-size: 14px;
    padding-bottom: 50px;
    /* 稍微往上提一点，视觉上更平衡 */
}

/* 聊天界面激活时的动画状态 */
#insta-chat-view.active {
    transform: translateX(0) !important;
}

/* 快拍全屏出现动画 */
#insta-story-viewer:not(.hidden) {
    display: flex !important;
    animation: storyZoomIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.1) forwards;
}

@keyframes storyZoomIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
        border-radius: 50px;
    }

    100% {
        transform: scale(1);
        opacity: 1;
        border-radius: 0;
    }
}

/* 顶部进度条基础样式 */
.story-progress-bg {
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.story-progress-fill {
    height: 100%;
    background: white;
    width: 0%;
    transition: width 0.1s linear;
    /* 进度条平滑增长 */
}

/* 你的外部 HTML 中光圈的渐变色 (Instagram 经典渐变) */
.story-ring.unread {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    padding: 2px;
    border-radius: 50%;
}

.story-ring.unread img {
    border: 2px solid white;
    /* 镂空效果 */
}

#insta-custom-prompt-overlay.active {
    opacity: 1 !important;
}

#insta-custom-prompt-overlay.active #insta-custom-prompt-box {
    transform: scale(1) !important;
}

/* ========================================== */
/* 快拍系统：丝滑进出场动画 */
/* ========================================== */

/* 1. 观看快拍界面的动画 (缩放 + 渐变) */
#insta-story-viewer {
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

#insta-story-viewer.active {
    opacity: 1;
    transform: scale(1);
}

/* 2. 发布快拍界面的动画 (从底部滑出) */
#insta-story-creator {
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

#insta-story-creator.active {
    transform: translateY(0);
}

/* 3. 底部“添加说明”输入框的占位符样式 */
#story-creator-caption::placeholder {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

/* ========================================== */
/* 快拍全屏界面的丝滑进出场动画 */
/* ========================================== */
#insta-story-viewer {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.25s ease-out, transform 0.25s ease-out;
    pointer-events: none;
    /* 隐藏时禁止点击 */
}

#insta-story-viewer.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
    /* 显示时恢复点击 */
}

/* 个人主页：空状态强制居中 */
.profile-empty-state {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    grid-column: 1 / -1;
    /* 跨越九宫格的所有列 */
}

/* 快拍图片圆角 */
#insta-story-image {
    border-radius: 16px;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========================================== */
/* 哈基米专属 GPU 硬件加速补丁 */
/* ========================================== */
.ins-modal-box,
.ins-modal-overlay,
.app-window,
#chat-msg-area,
.persona-card {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform, opacity;
}