:root {
    /* å®šä¹‰å¸¸ç”¨å˜é‡ï¼Œæ–¹ä¾¿ç»Ÿä¸€ä¿®æ”¹ */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --header-base-height: 15px;
    --footer-base-height: 20px;
    --keyboard-height: 0px;
    --bg-color: #FFF2F4; 
    --card-bg: #ffffff;
    --tab-active-bg: #777A8A;
    --tab-active-text: #FAEBF0;
    --accent-color: #FF8E9E;
    --custom-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", sans-serif;
    
    /* --- ç¬¬1å±‚ï¼šåŸºç¡€å†…å®¹å±‚ (1-99) --- */
    --z-base: 1;
    --z-content: 10;
    --z-card: 20;
    
    /* --- ç¬¬2å±‚ï¼šæµ®åŠ¨å…ƒç´ å±‚ (100-199) --- */
    --z-sticky: 100;
    --z-dropdown: 150;
    
    /* --- ç¬¬3å±‚ï¼šè¦†ç›–å±‚ (200-999) --- */
    --z-overlay: 200;
    --z-header: 250;
    
    /* --- ç¬¬4å±‚ï¼šäºŒçº§é¡µé¢å±‚ (1000-1999) --- */
    --z-page-secondary: 1000;
    
    /* --- ç¬¬5å±‚ï¼šèŠå¤©å®¤ä¸“ç”¨å±‚ (2000-2999) --- */
    --z-chatroom: 2000;
    --z-chatroom-header: 2100;
    --z-chatroom-footer: 2200;
    --z-chatroom-panel: 2300;
    
    /* --- ç¬¬6å±‚ï¼šè®¾ç½®é¡µé¢å±‚ (3000-3999) --- */
    --z-settings: 3000;
    --z-settings-sub: 3500;
    
    /* --- ç¬¬7å±‚ï¼šåº•éƒ¨å¼¹å‡ºå±‚ (4000-4999) --- */
    --z-sheet: 4000;
    --z-sheet-content: 4100;
    
    /* --- ç¬¬8å±‚ï¼šæ¨¡æ€æ¡†å±‚ (5000-5999) --- */
    --z-modal-backdrop: 5000;
    --z-modal: 5100;
    --z-modal-dropdown: 5200;
    
    /* --- ç¬¬9å±‚ï¼šæ°”æ³¡èœå•å±‚ (6000-6999) --- */
    --z-popover: 6000;
    
    /* --- ç¬¬10å±‚ï¼šå…¨å±€æµ®å±‚ (7000-7999) --- */
    --z-toast: 7000;
    --z-tooltip: 7500;
    
    /* --- ç¬¬11å±‚ï¼šéŸ³ä¹/åª’ä½“é¢æ¿ (8000-8999) --- */
    --z-media-backdrop: 8000;
    --z-media-panel: 8100;
    --z-media-dropdown: 8200;
    
    /* --- ç¬¬12å±‚ï¼šæœ€é«˜ä¼˜å…ˆçº§ (9000+) --- */
    --z-critical: 9000;
    --z-max: 9999;
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    -webkit-tap-highlight-color: transparent;
    outline: none; 
    font-family: inherit;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100vh; 
    overflow: hidden; 
    background-color: var(--bg-color); 
    -webkit-text-size-adjust: 100%;
    -webkit-user-select: none;
    user-select: none;
    overscroll-behavior: none;
}

.phone-frame {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-color); 
    z-index: var(--z-base);
}

body.has-wallpaper .phone-frame {
    background-color: transparent !important;
}

body.has-wallpaper {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed; 
}

.scroll-y {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.scroll-y::-webkit-scrollbar { display: none; }

.safe-pt {
    padding-top: calc(15px + var(--safe-top)) !important;
}
.safe-pb {
    padding-bottom: calc(10px + var(--safe-bottom)) !important;
}

/* --- æ¶ˆæ¯æ°”æ³¡åŸºç¡€ --- */
.msg-bubble { 
    padding: 10px 14px;
    font-size: 15px; 
    line-height: 1.5; 
    position: relative; 
    word-wrap: break-word; 
    max-width: 100%;
}

.message-row.other .msg-bubble { 
    background: #fff; 
    color: #333;
    border-radius: 18px 18px 18px 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.message-row.self .msg-bubble { 
    background: #FFD1DC;
    color: #000; 
    border-radius: 18px 18px 4px 18px;
    box-shadow: none !important; 
    outline: none !important;
    border: none !important;
}

.msg-time { 
    font-size: 10px; 
    color: #999; 
    margin: 0 6px;
    align-self: flex-end;
    white-space: nowrap;
}

/* ä¸»å±å¹•å†…å®¹å®¹å™¨ */
.screen-content {
    flex: 1;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding-top: var(--safe-top); 
    padding-bottom: calc(90px + var(--safe-bottom)); 
}
.screen-content::-webkit-scrollbar { display: none; }

.profile-section {
    width: 90%; 
    /* æ ¸å¿ƒä¿®æ”¹ï¼šè´Ÿè¾¹è· -60pxï¼Œè®©çŽ»ç’ƒå¡ç‰‡å¾€ä¸Šå åœ¨å›¾ç‰‡ä¸Š */
    margin: -60px auto 10px auto; 
    position: relative;
    z-index: var(--z-content);
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.avatar { 
    width: 80px; 
    height: 80px; 
    border-radius: 50%; 
    /* å¤´åƒè¾¹æ¡†ä¿æŒåŠé€æ˜Žç™½ */
    border: 3px solid rgba(255, 255, 255, 0.8); 
    object-fit: cover; 
    
    position: absolute; 
    top: -40px; /* å¤´åƒä½ç½® */
    left: 50%; 
    transform: translateX(-50%);
    
    z-index: var(--z-card); 
    /* æŠ•å½±æ”¹ä¸ºå¼¥æ•£å…‰ */
    box-shadow: 0 8px 20px rgba(0,0,0,0.15); 
    background: #ddd; 
    cursor: pointer; 
}

.info-card { 
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(20px); 
    -webkit-backdrop-filter: blur(20px);
    width: 100%; 
    border-radius: 24px; 
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 45px; 
    padding-bottom: 15px; 
    text-align: center;
    box-shadow: none;
    display: flex; 
    flex-direction: column; 
    align-items: center; 
}

.kaomoji { 
    font-size: 17px; 
    font-weight: 800; 
    /* çº¯æ·±è‰²æ–‡å­—ï¼Œæ— ç™½è‰²æè¾¹ */
    color: #1a1a1a; 
    margin: 4px 0; 
    cursor: pointer; 
    padding: 2px 10px; 
    border-radius: 10px;
    letter-spacing: 0.5px;
    /* å·²åˆ é™¤ text-shadow */
} 
.kaomoji:active { opacity: 0.6; }

.text-group { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    margin-top: 2px; 
}

.editable-text { 
    cursor: pointer; 
    padding: 2px 5px; 
    border-radius: 4px; 
} 
.editable-text:active { background: rgba(255,255,255,0.2); }

.handle { 
    font-size: 11px; 
    font-weight: 600;
    color: #333; 
    margin-bottom: 2px; 
    /* å·²åˆ é™¤ text-shadow */
}

.bio { 
    font-size: 12px; 
    color: #222; 
    font-weight: 500;
    margin-bottom: 2px; 
    width: 90%;
    line-height: 1.3;
}

.location { 
    font-size: 11px; 
    color: #999; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 4px; 
    cursor: pointer; 
    padding: 2px 5px; 
    border-radius: 4px;
} 
.location:active { background: #f0f0f0; }

.section-title { 
    font-size: 12px; 
    font-weight: 600; 
    color: #333; 
    width: 92%; 
    text-align: center; 
    z-index: var(--z-base); 
    flex-shrink: 0; 
    cursor: pointer; 
    margin: 15px auto 8px auto; 
}

/* Layout */
.main-layout-row { 
    width: 100%; 
    padding: 0 4%; 
    display: flex; 
    justify-content: space-between; 
    align-items: flex-start; 
    flex-shrink: 0; 
    margin-bottom: 10px; 
}

.kawaii-wrapper { 
    width: 47%; 
    min-width: 140px; 
    position: relative; 
    z-index: var(--z-base); 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    margin-top: 5px; 
}

.avatar-row { 
    display: flex; 
    justify-content: center; 
    gap: 12px; 
    margin-bottom: 12px; 
    z-index: var(--z-card); 
    position: relative; 
    top: 5px; 
}

.kawaii-avatar { 
    width: 46px; 
    height: 46px; 
    border-radius: 50%; 
    object-fit: cover; 
    background: #ddd; 
    cursor: pointer; 
}

.kawaii-card { 
    background: #F3F3F3; 
    width: 100%; 
    border-radius: 20px; 
    padding: 8px 5px 10px 5px; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    position: relative; 
}

.kawaii-text { 
    font-size: 10px; 
    color: #666; 
    font-weight: 500; 
    margin-bottom: 6px; 
    cursor: pointer; 
    white-space: nowrap; 
    transform: scale(0.95); 
}

.kawaii-white-box { 
    background: #ffffff; 
    width: 94%; 
    border-radius: 14px; 
    padding: 8px 4px; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
}

.k-time-text { font-size: 20px; font-weight: 400; color: #333; }
.k-date-text { font-size: 9px; color: #999; margin-bottom: 6px; }
.k-icons-row { display: flex; gap: 8px; justify-content: center; }

.k-icon-btn { 
    width: 28px; 
    height: 28px; 
    border-radius: 50%; 
    background-color: #F3F3F3; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: #555; 
}
.k-icon-btn i { font-size: 12px; }
.bluetooth-icon { font-size: 15.5px !important; }

.kawaii-bottom-text { 
    font-size: 14px; 
    font-weight: 700; 
    color: #333; 
    margin-top: 18px; 
    cursor: pointer; 
    text-align: center; 
    width: 100%; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}

.right-column { 
    width: 47%; 
    display: flex; 
    flex-direction: column; 
    gap: 12px; 
    padding-top: 0; 
}

.right-apps-row { 
    display: flex; 
    justify-content: space-between; 
    width: 100%; 
    padding: 0 5px; 
}

.mini-app-item { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 5px; 
    cursor: pointer; 
}

.mini-app-icon { 
    width: 55px; 
    height: 55px; 
    background: #fff; 
    border-radius: 18px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.03); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 20px; 
    color: #ccc; 
    overflow: hidden; 
}
.mini-app-icon img { width: 100%; height: 100%; object-fit: cover; }
.mini-app-label { font-size: 10px; color: #666; }

.camera-widget { 
    width: 100%; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    position: relative; 
}

.captcha-top { 
    background: #fff; 
    border: 1px solid #dcdcdc; 
    border-radius: 4px; 
    padding: 4px 8px; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    width: 80%; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); 
    margin-bottom: 8px; 
    z-index: calc(var(--z-base) + 1);
}

.captcha-checkbox { 
    width: 16px; 
    height: 16px; 
    border: 2px solid #c1c1c1; 
    border-radius: 2px; 
    background: #fff; 
}

.captcha-label { 
    font-size: 11px; 
    font-weight: 500; 
    color: #333; 
    cursor: pointer; 
}

.captcha-body { 
    background: #fff; 
    border: 1px solid #dcdcdc; 
    padding: 8px; 
    border-radius: 6px; 
    width: 100%; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); 
    display: flex; 
    flex-direction: column; 
    gap: 6px; 
    z-index: var(--z-base);
    position: relative; 
}

.captcha-body::before { 
    content: ''; 
    position: absolute; 
    top: -6px; 
    left: 20px; 
    width: 10px; 
    height: 10px; 
    background: #fff; 
    border-left: 1px solid #dcdcdc; 
    border-top: 1px solid #dcdcdc; 
    transform: rotate(45deg); 
    z-index: calc(var(--z-base) + 1);
}

.captcha-input-row { display: flex; gap: 5px; height: 24px; }

.captcha-input { 
    flex: 1; 
    border: 1px solid #dcdcdc; 
    font-size: 10px; 
    padding: 0 5px; 
    color: #999; 
    display: flex; 
    align-items: center; 
    cursor: pointer; 
}

.captcha-verify-btn { 
    background: #555; 
    color: #fff; 
    font-size: 10px; 
    font-weight: bold; 
    padding: 0 8px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 2px; 
}

.captcha-content-row { display: flex; gap: 5px; height: 80px; }

.captcha-img-container { 
    flex: 1; 
    border: 1px solid #eee; 
    overflow: hidden; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer; 
}

.captcha-img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    filter: none; 
}

.captcha-icons-col { 
    display: flex; 
    flex-direction: column; 
    justify-content: flex-start; 
    gap: 8px; 
    width: 16px; 
    padding: 2px 0; 
}

.c-icon { font-size: 14px; color: #999; text-align: center; }

.search-pill-container { 
    width: 100%; 
    display: flex; 
    justify-content: center; 
    margin-top: 20px; 
}

.search-pill { 
    background: #fff; 
    padding: 6px 18px; 
    border-radius: 30px; 
    font-size: 12px; 
    color: #888; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 6px; 
    border: none; 
    width: auto; 
}

/* ä¸»å±å¹• Dock æ  */
.dock-capsule {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 420px;
    height: 70px;
    bottom: 25px;
    margin-bottom: 0 !important;
    
    /* ã€ä¿®æ”¹ç‚¹ã€‘å¤§å¹…é™ä½Žä¸é€æ˜Žåº¦ (0.85 -> 0.45)ï¼Œè®©å®ƒæ›´é€šé€ */
    background-color: rgba(255, 255, 255, 0.45);
    
    /* ã€ä¿®æ”¹ç‚¹ã€‘å¢žåŠ  saturate(150%) æå‡é€šé€æ„Ÿï¼Œç±»ä¼¼ iOS åŽŸç”Ÿæ•ˆæžœ */
    backdrop-filter: blur(25px) saturate(150%);
    -webkit-backdrop-filter: blur(25px) saturate(150%);
    
    /* ã€æ–°å¢žã€‘å¢žåŠ ä¸€ä¸ªæžç»†çš„åŠé€æ˜Žè¾¹æ¡†ï¼Œè®©å®ƒä¸é‚£ä¹ˆâ€œè‚‰â€ï¼Œå¢žåŠ ç²¾è‡´æ„Ÿ */
    border: 1px solid rgba(255, 255, 255, 0.2);
    
    border-radius: 35px;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    z-index: var(--z-sticky);
    
    /* ã€ä¿®æ”¹ç‚¹ã€‘é˜´å½±æ‰©æ•£èŒƒå›´å˜å¤§ï¼Œé¢œè‰²å˜æ·¡ï¼Œæ˜¾å¾—æ›´æµ®ç©º */
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.dock-btn { 
    width: 45px; 
    height: 45px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer; 
    transition: transform 0.1s; 
}
.dock-btn:active { transform: scale(0.9); }
.dock-btn img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    border-radius: 12px; 
}

.popover-menu { 
    position: absolute; 
    background: #fff; 
    border-radius: 12px; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.15); 
    padding: 6px; 
    display: none; 
    flex-direction: column; 
    width: 130px; 
    z-index: var(--z-max) !important; 
    animation: fadeIn 0.2s ease-out; 
}

@keyframes fadeIn { 
    from { opacity: 0; transform: scale(0.95); } 
    to { opacity: 1; transform: scale(1); } 
}

.menu-item { 
    padding: 10px; 
    font-size: 13px; 
    color: #333; 
    border-radius: 8px; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}
.menu-item:hover { background-color: #f5f5f7; }

@media screen and (max-height: 750px) { 
    .info-card { padding-top: 40px; } 
    .section-title { margin-top: 10px; } 
}

/* App è¦†ç›–å±‚ã€èŠå¤©å®¤ã€è®¾ç½®é¡µé¢ - ç»Ÿä¸€åŸºç¡€æ ·å¼ */
.app-overlay, 
.chat-room,
.api-settings-page,
.chat-settings-page,
.wb-settings-page {
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: var(--bg-color);
    z-index: var(--z-settings);
    display: flex;
    flex-direction: column;
    overflow: hidden; 
    overscroll-behavior: none;
}

.app-overlay {
    top: 0 !important; 
    left: 0 !important; 
    right: 0 !important;
    bottom: 0 !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    z-index: var(--z-overlay);
    padding-top: 0 !important;
    opacity: 0;
    pointer-events: none;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    visibility: hidden;
}

.app-overlay.active { 
    opacity: 1; 
    visibility: visible; 
    pointer-events: auto; 
    transform: translateX(0); 
}

.chat-container { 
    width: 100%; 
    height: 100%; 
    display: flex; 
    flex-direction: column; 
    position: relative; 
    overflow: hidden; 
    padding-top: 0;
    box-sizing: border-box;
    padding-bottom: calc(55px + env(safe-area-inset-bottom, 0px));
}

.tab-view {
    display: none;
    flex-direction: column;
    flex: 1;
    width: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-top: calc(10px + var(--safe-top)) !important; 
    padding-bottom: calc(60px + var(--safe-bottom)) !important; 
    overscroll-behavior-y: contain;
}

.tab-view.active { 
    display: flex; 
}

/* å¾®ä¿¡å¤´éƒ¨ */
.wechat-top-bar {
    padding-top: calc(5px + var(--safe-top));
}
.wechat-header-title { font-size: 16px; font-weight: 600; color: #000; }
.wechat-plus-btn { 
    position: absolute; 
    right: 20px; 
    top: 50%; 
    transform: translateY(-50%); 
    font-size: 18px; 
    color: #333; 
    cursor: pointer; 
    padding-top: 5px; 
}

.wechat-search-container { 
    width: 100%; 
    padding: 5px 0; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    gap: 12px; 
    background: transparent; 
    position: relative; 
    flex-shrink: 0; 
}

.search-row-wrapper { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px; 
    cursor: pointer; 
    width: 100%; 
}

.search-circle-btn { 
    width: 20px; 
    height: 20px; 
    background-color: #007aff; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}
.search-circle-btn i { color: #fff; font-size: 10px; }

.search-text-label { 
    font-size: 15px; 
    font-weight: 600; 
    color: #333; 
    position: relative; 
    line-height: 1.2; 
}
.search-text-label::after { 
    content: ''; 
    position: absolute; 
    bottom: -4px; 
    left: 0; 
    width: 100%; 
    height: 3px; 
    background-color: #007aff; 
    border-radius: 2px; 
}

.wechat-pill-tabs { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 2px; 
    background-color: #fff; 
    padding: 4px; 
    border-radius: 50px; 
    width: fit-content; 
    margin: 0 auto; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.03); 
}

.wechat-tab-btn { 
    padding: 6px 14px; 
    font-size: 13px; 
    font-weight: 600; 
    color: #888; 
    border-radius: 40px; 
    cursor: pointer; 
    white-space: nowrap; 
    transition: all 0.2s; 
    background: transparent; 
}
.wechat-tab-btn.active { 
    background-color: #e6f2ff; 
    color: #007aff; 
}

.chat-dropdown { 
    position: absolute; 
    background: #fff; 
    border-radius: 10px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.15); 
    padding: 5px; 
    display: none; 
    flex-direction: column; 
    width: 120px; 
    z-index: var(--z-modal-dropdown); 
    top: 50px; 
    right: 15px; 
}

.chat-dropdown-item { 
    padding: 10px 12px; 
    font-size: 13px; 
    color: #333; 
    border-radius: 8px; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}
.chat-dropdown-item:hover { background-color: #f5f5f7; }

.chat-list-container { flex: 1; width: 100%; padding: 10px 20px 0 20px; }

.pinned-section, .normal-section { 
    width: 100%; 
    display: flex; 
    flex-direction: column; 
    background: #fff; 
    border-radius: 18px; 
    padding: 4px 0; 
    margin-bottom: 20px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    overflow: hidden;
}

.chat-item-wrapper { 
    position: relative; 
    width: 100%; 
    height: 72px; 
    overflow: hidden; 
    background-color: #fff; 
    border-radius: 0 !important; 
    flex-shrink: 0; 
}

.chat-item-content { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background-color: #fff; 
    z-index: var(--z-content); 
    display: flex; 
    align-items: center; 
    padding: 0 15px; 
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1); 
    cursor: pointer; 
    box-shadow: 0 0 0 1px #fff; 
}
.chat-item-content:active { background-color: #f9f9f9; }

.chat-actions-right { 
    position: absolute; 
    top: 0; 
    right: 8px; 
    height: 100%; 
    display: flex; 
    z-index: var(--z-base);
}

.action-btn { 
    font-size: 13px; 
    color: #fff; 
    width: 70px; 
    cursor: pointer; 
    font-weight: 500; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    height: 100%; 
    transition: background 0.2s; 
}
.btn-cancel { background-color: #c7c7cc; } 
.btn-pin { background-color: #ff9f00; } 
.btn-del { background-color: #ff3b30; } 

.chat-item-avatar { 
    width: 48px; 
    height: 48px; 
    border-radius: 10px; 
    object-fit: cover; 
    margin-right: 12px; 
    flex-shrink: 0; 
}

.chat-item-text { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    overflow: hidden; 
    pointer-events: none; 
}

.chat-item-top { 
    display: flex; 
    justify-content: space-between; 
    align-items: baseline; 
    margin-bottom: 4px; 
}

.chat-item-name { font-size: 15px; font-weight: 600; color: #000; }
.chat-item-time { font-size: 11px; color: #999; }
.chat-item-msg { 
    font-size: 13px; 
    color: #888; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    min-height: 18px; 
}
.chat-item-msg img {
    display: none !important;
}

/* --- æˆ‘é¡µé¢æ ·å¼ --- */
#view-me { position: relative; }

.me-header-container { 
    position: relative; 
    width: 92%; 
    margin: 10px auto 20px auto; 
    background: #fff; 
    border-radius: 25px; 
    height: 180px; 
    display: flex; 
    flex-direction: column; 
    flex-shrink: 0; 
}

.me-banner { 
    width: 100%; 
    height: 120px; 
    border-radius: 25px 25px 0 0; 
    object-fit: cover; 
    cursor: pointer; 
}

.me-avatar { 
    position: absolute; 
    bottom: 15px; 
    left: 25px; 
    width: 80px; 
    height: 80px; 
    border-radius: 50%; 
    border: 4px solid #fff; 
    object-fit: cover; 
    cursor: pointer; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); 
    z-index: var(--z-content); 
}

.me-slogan { 
    position: absolute; 
    top: 15px; 
    right: 15px; 
    background: rgba(255,255,255,0.9); 
    padding: 4px 10px; 
    border-radius: 15px; 
    font-size: 12px; 
    font-weight: bold; 
    color: #333; 
    font-family: 'Courier New', Courier, monospace; 
    cursor: pointer; 
}

.me-list-container { width: 92%; margin: 0 auto; flex-shrink: 0; }

.me-card-list { 
    background: #fff; 
    border-radius: 25px; 
    padding: 5px 0; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.02); 
    display: flex; 
    flex-direction: column; 
}

.me-list-item { 
    background: transparent; 
    padding: 16px 25px; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    font-size: 15px; 
    color: #333; 
    font-weight: 500; 
    cursor: pointer; 
    border-bottom: 1px solid #f7f7f7; 
}
.me-list-item:last-child { border-bottom: none; }
.me-list-item:active { background-color: #f9f9f9; }

.me-item-left { display: flex; align-items: center; gap: 12px; }
.me-item-icon { font-size: 16px; color: #666; width: 24px; text-align: center; }
.me-arrow { color: #ddd; font-size: 12px; }

/* å­—ä½“è®¾ç½®é¡µé¢æ ·å¼ */
.font-preview-box {
    background: #fff;
    color: #000;
    padding: 30px 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 1px solid #eee;
    transition: all 0.3s;
}
.font-text-cn { font-size: 18px; font-weight: bold; word-break: break-all; }
.font-text-en { font-size: 14px; color: #666; word-break: break-all; }

.font-scheme-item {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    border: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.2s;
}
.font-scheme-item:active { transform: scale(0.98); background: #f9f9f9; }

.font-scheme-left { display: flex; align-items: center; gap: 15px; }

.font-preview-char { 
    font-size: 24px; 
    width: 50px; 
    height: 50px; 
    background: #f5f5f5; 
    border-radius: 8px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: #333;
}

.font-scheme-info { display: flex; flex-direction: column; }
.font-scheme-name { font-size: 15px; font-weight: 600; color: #333; }
.font-scheme-src { 
    font-size: 11px; 
    color: #999; 
    max-width: 150px; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}

.font-del-btn { padding: 8px; color: #ccc; }
.font-del-btn:hover { color: #ff3b30; }

/* è®¾ç½®é¡µé¢ */
.api-settings-page { 
    z-index: var(--z-settings);
    transform: translateX(100%); 
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); 
    padding-top: env(safe-area-inset-top, 0px); 
    box-sizing: border-box;
}
.api-settings-page.active { transform: translateX(0); }

.api-header { 
    height: 50px; 
    background: transparent; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 0 15px; 
    color: #000; 
    margin-top: 10px; 
    flex-shrink: 0; 
}

.api-back-btn { font-size: 20px; cursor: pointer; width: 40px; }
.api-title { font-size: 17px; font-weight: 600; }

.api-content { 
    flex: 1; 
    padding: 20px; 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
    overflow-y: auto; 
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    padding-bottom: env(safe-area-inset-bottom, 10px);
}

.api-input-group { display: flex; flex-direction: column; gap: 8px; }
.api-input-group label { font-size: 13px; color: #666; font-weight: 500; margin-left: 5px; }

.api-input { 
    width: 100%; 
    padding: 14px; 
    border: 1px solid #ddd; 
    border-radius: 12px; 
    font-size: 15px; 
    background: #fff; 
    outline: none; 
    transition: border 0.2s; 
}
.api-input:focus { border-color: #333; }

.api-row-flex { display: flex; gap: 10px; align-items: center; }

.api-btn-small { 
    padding: 14px 20px; 
    background-color: #EDEDED !important;
    color: #AAAAAA !important;
    border-radius: 12px; 
    font-size: 14px; 
    font-weight: 600; 
    cursor: pointer; 
    border: none !important; 
    white-space: nowrap; 
}

.dock-preview-wrapper { 
    background: #e0e0e0; 
    padding: 20px; 
    border-radius: 20px; 
    display: flex; 
    justify-content: center; 
    margin-bottom: 10px; 
}

.dock-preview { 
    width: 90%; 
    height: 65px; 
    background-color: rgba(255, 255, 255, 0.9); 
    border-radius: 40px; 
    display: flex; 
    justify-content: space-evenly; 
    align-items: center; 
}
.dock-preview .dock-btn img { border-radius: 12px; }

.app-preview-wrapper { 
    display: flex; 
    gap: 25px; 
    justify-content: center; 
    margin-bottom: 10px; 
    padding: 10px; 
    background: #ffffff; 
    border-radius: 15px; 
}

.app-preview-icon { 
    width: 55px; 
    height: 55px; 
    background: #fff; 
    border-radius: 18px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 20px; 
    color: #ccc; 
    overflow: hidden; 
}
.app-preview-icon img { width: 100%; height: 100%; object-fit: cover; }

.edit-grid { 
    display: grid !important; 
    grid-template-columns: 1fr 1fr; 
    gap: 15px; 
    width: 100%;
    margin-bottom: 25px;
}

.edit-card { 
    background: #fff; 
    padding: 12px; 
    border-radius: 15px; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 8px; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.03); 
}

.edit-card-title { font-size: 13px; font-weight: 600; color: #333; }
.edit-btns-row { display: flex; gap: 5px; width: 100%; }

.edit-btn { 
    flex: 1; 
    padding: 6px 0; 
    font-size: 10px; 
    background: #f2f2f7; 
    border-radius: 8px; 
    text-align: center; 
    cursor: pointer; 
    border: none; 
    color: #333; 
}

#wallpaperPreviewBox, 
#wcWallpaperPreviewBox,
#chatRoomWallpaperPreviewBox {
    width: 100px !important;       
    height: 180px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    overflow: hidden !important;
    border: 2px solid #fff !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1) !important;
    background-color: #f2f2f2;
    margin: 0 auto 5px auto !important;
}

#wallpaperPreviewImg, 
#wcWallpaperPreviewImg,
#chatRoomWallpaperPreviewImg {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important; 
    display: block;
    background-color: transparent !important;
}

/* Generic Modals */
.placeholder-page { 
    width: 100%; 
    height: 100%; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    color: #ccc; 
    font-size: 18px; 
    font-weight: bold; 
}

.generic-page { 
    width: 100%; 
    height: 100%; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
}

 .modal-overlay { 
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.5); 
    z-index: var(--z-modal-backdrop);
    display: none; 
    justify-content: center; 
    align-items: flex-end;
    opacity: 0; 
    transition: opacity 0.3s; 
    backdrop-filter: blur(5px); 
    -webkit-backdrop-filter: blur(5px); 
}

.modal-overlay.show { opacity: 1; }

.modal-box { 
    background: #fff; 
    width: 100%; 
    max-height: 85vh; 
    overflow-y: auto; 
    -webkit-overflow-scrolling: touch;
    border-radius: 20px 20px 0 0; 
    padding: 25px 25px 20px 25px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    box-shadow: 0 -10px 40px rgba(0,0,0,0.1); 
    transform: translateY(100%); 
    transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1); 
}
.modal-overlay.show .modal-box { transform: translateY(0); }

.modal-title { font-size: 18px; font-weight: 700; margin-bottom: 20px; color: #333; }

.modal-avatar { 
    width: 80px; 
    height: 80px; 
    border-radius: 50%; 
    border: 3px solid #f0f0f0; 
    object-fit: cover; 
    margin-bottom: 10px; 
    cursor: pointer; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
}

.modal-avatar-hint { font-size: 11px; color: #999; margin-bottom: 20px; }
.modal-input-group { width: 100%; margin-bottom: 15px; }
.modal-label { font-size: 13px; color: #666; margin-bottom: 6px; display: block; font-weight: 500; }

.modal-input { 
    width: 100%; 
    padding: 12px; 
    border: 1px solid #eee; 
    border-radius: 12px; 
    font-size: 15px; 
    background: #f9f9f9; 
    outline: none; 
    transition: border 0.2s; 
}
.modal-input:focus { border-color: #333; background: #fff; }
textarea.modal-input { height: 80px; resize: none; }

.world-book-selector { 
    width: 100%; 
    padding: 12px; 
    border: 1px solid #eee; 
    border-radius: 12px; 
    font-size: 14px; 
    background: #fff; 
    color: #888; 
    cursor: pointer; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    transition: background 0.2s, border-color 0.2s; /* æ–°å¢žè¿‡æ¸¡ */
}
.world-book-selector:active {
    background-color: #f5f5f5; /* ç‚¹å‡»æ—¶å˜ç°ï¼Œå¢žåŠ åé¦ˆæ„Ÿ */
    border-color: #ccc;
}
.world-book-selector.has-value { color: #333; font-weight: 500; } /* åŠ é‡å·²æœ‰å€¼çš„é¢œè‰² */

.modal-btns { width: 100%; display: flex; gap: 10px; margin-top: 10px; }

.modal-btn { 
    flex: 1; 
    padding: 14px; 
    border-radius: 14px; 
    font-size: 15px; 
    font-weight: 600; 
    cursor: pointer; 
    text-align: center; 
    border: none; 
}
.btn-cancel-modal { background: #f2f2f7; color: #333; }
.btn-confirm-modal { background: #000; color: #fff; }

.wb-modal-overlay { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.3); 
    z-index: var(--z-popover);
    display: none; 
    justify-content: center; 
    align-items: center; 
}

.wb-modal-box { 
    background: #fff; 
    width: 80%; 
    max-height: 60vh; 
    border-radius: 15px; 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
    box-shadow: 0 5px 25px rgba(0,0,0,0.2); 
}

.wb-header { padding: 15px; border-bottom: 1px solid #eee; font-weight: bold; text-align: center; }
.wb-list { flex: 1; overflow-y: auto; padding: 10px; }

.wb-item { 
    padding: 10px; 
    border-bottom: 1px solid #f5f5f5; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    cursor: pointer; 
}

.wb-checkbox { width: 18px; height: 18px; accent-color: #000; }
.wb-confirm-btn { padding: 12px; background: #000; color: #fff; text-align: center; cursor: pointer; font-weight: bold; }

/* èŠå¤©å®¤ */
.chat-room {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-top: env(safe-area-inset-top) !important;
    z-index: var(--z-chatroom) !important;
    background-color: var(--bg-color) !important;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    overflow: hidden !important;
    overscroll-behavior: none;
}

.chat-room.active { 
    transform: translateX(0); 
}

.room-header { 
    height: 50px; 
    background: transparent; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 0 15px; 
    font-size: 16px; 
    font-weight: 600; 
    color: #000; 
    z-index: var(--z-content); 
    margin-top: 10px; 
    flex-shrink: 0; 
}

.room-back-btn { font-size: 20px; cursor: pointer; width: 40px; }
.room-header-right { display: flex; gap: 15px; width: 60px; justify-content: flex-end; }
.room-header-icon { font-size: 18px; cursor: pointer; }

/* èŠå¤©å®¤å†…æ¶ˆæ¯åˆ—è¡¨ */
.room-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    padding: 15px 5px;
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    gap: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.8) 30%, rgba(255, 255, 255, 0) 100%);
    border-top-right-radius: 20px;
    border-top-left-radius: 0;
    position: relative;
    z-index: var(--z-content);
    box-shadow: 2px -2px 10px rgba(0,0,0,0.02);
}

.date-divider { 
    align-self: center; 
    background: rgba(0,0,0,0.1); 
    color: #fff; 
    padding: 4px 10px; 
    border-radius: 12px; 
    font-size: 11px; 
    margin: 10px 0; 
}

/* Miuæ°”æ³¡æ ·å¼ */
.Miu-miu {
    display: flex;
    width: 100%;
    padding: 0 10px;
    margin-bottom: 2px !important; 
    overflow: visible !important;
    align-items: center !important;
}

.Miu-miu .bubble-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    max-width: 75%;
    position: relative;
    overflow: visible !important;
    margin-top: 6px !important; 
}

.Miu-miu.user .content,
.Miu-miu.ai .content {
    --top-left: 18px;
    --top-right: 18px;
    --bottom-right: 18px;
    --bottom-left: 18px;
    padding: 6px 11px !important; 
    font-size: 12px !important;    
    line-height: 1.3;
    position: relative;
    word-wrap: break-word;
    z-index: var(--z-base);
    white-space: pre-wrap;
}

.Miu-miu.user {
    justify-content: flex-end;
}

.Miu-miu.user .content {
    background-color: #929292;
    color: #fff;
    border-radius: var(--top-left) var(--top-right) var(--bottom-right) var(--bottom-left);
    box-shadow: none;
}

.Miu-miu.ai {
    justify-content: flex-start;
}

.Miu-miu.ai .content {
    background-color: #fff;
    color: #000;
    border-radius: var(--top-left) var(--top-right) var(--bottom-right) var(--bottom-left);
    box-shadow: none;
}

.Miu-miu.user .content::after {
    content: "";
    position: absolute;
    width: 12px;
    height: 15px;
    bottom: -15px;
    right: 6px;
    background-color: #929292;
    clip-path: path("M 15,13 Q 12,0 2,2 Q 7,3 5,22 L 13,12");
    z-index: var(--z-base);
    transform: rotate(-2deg) scale(-1);
    transform-origin: top right;
    box-sizing: border-box;
}

.Miu-miu.ai .content::before {
    content: "";
    position: absolute;
    width: 12px;
    height: 15px;
    bottom: -15px;
    left: -7px;
    background-color: #fff;
    clip-path: path("M 11,16 Q 10,0 1,1 Q 6.6,3 1,19 L 19,16");
    z-index: var(--z-base);
    transform: rotate(19deg) scaleY(-1); 
    transform-origin: top left;
    box-sizing: border-box;
}

.Miu-miu .avatar-img {
    width: 35px;
    height: 35px;
    border-radius: 12px;
    margin-top: 0;
    flex-shrink: 0;
}
.Miu-miu.ai .avatar-img { margin-right: 8px; }
.Miu-miu.user .avatar-img { margin-left: 8px; }

.Miu-miu .time {
    font-size: 10px;
    color: #999;
    margin-bottom: 2px;
    white-space: nowrap;
}

.Miu-miu .content.voice-bubble {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px;
    min-width: 100px;
    padding-left: 14px !important;
    padding-right: 14px !important;
    width: auto !important;
    display: inline-flex !important;
}

.Miu-miu .content.voice-bubble .voice-icon,
.Miu-miu .content.voice-bubble .voice-duration {
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
}

.Miu-miu.ai .content.voice-bubble .voice-icon,
.Miu-miu.ai .content.voice-bubble .voice-duration {
    color: #ffffff;
}

.Miu-miu.user .content.voice-bubble .voice-icon,
.Miu-miu.user .content.voice-bubble .voice-duration {
    color: #ffffff;
}

/* é¡¶éƒ¨å›¾ç‰‡å¡ç‰‡ */
.bubble-image-wrapper {
    position: relative;
    width: 90% !important;
    min-height: 140px;
    height: calc(175px + env(safe-area-inset-top, 0px));
    margin-top: calc(0px - env(safe-area-inset-top, 0px)) !important;
    margin-right: auto !important;
    margin-bottom: 15px !important;
    margin-left: auto !important;
    border-radius: 25px 25px 0 0;
    overflow: hidden; 
    transform: translateZ(0); 
    z-index: var(--z-base);
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: env(safe-area-inset-top, 0px);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.bubble-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 25px 25px 0 0;
}

/* èŠå¤©è®¾ç½®é¡µä¿®å¤ */
.chat-settings-page { 
    z-index: var(--z-settings);
    transform: translateX(100%); 
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); 
    padding-top: env(safe-area-inset-top, 0px); 
    box-sizing: border-box;
}
.chat-settings-page.active { transform: translateX(0); }

.settings-header { 
    height: 50px; 
    background: transparent; 
    display: flex; 
    align-items: center; 
    padding: 0 15px; 
    font-size: 17px; 
    font-weight: 600; 
    color: #000; 
    margin-top: 10px; 
    flex-shrink: 0; 
}

.settings-back-btn { font-size: 20px; margin-right: 15px; cursor: pointer; }

.settings-content { 
    padding: 20px; 
    flex: 1; 
    overflow-y: auto; 
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    padding-bottom: env(safe-area-inset-bottom, 10px);
}

.settings-profile-row { 
    display: flex; 
    justify-content: space-around; 
    width: 100%; 
    margin-bottom: 30px; 
}

.settings-profile-col { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    width: 45%; 
}

.settings-avatar { 
    width: 80px; 
    height: 80px; 
    border-radius: 20px; 
    object-fit: cover; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); 
    margin-bottom: 10px; 
    cursor: pointer; 
    flex-shrink: 0;
}

.settings-real-name-display { font-size: 14px; font-weight: bold; color: #666; margin-bottom: 5px; }

.settings-display-name { 
    font-size: 16px; 
    font-weight: bold; 
    color: #000; 
    cursor: pointer; 
    padding: 4px 8px; 
    border-radius: 8px; 
    background: rgba(0,0,0,0.03); 
}

.settings-menu { width: 100%; background: #fff; border-radius: 15px; overflow: hidden; }

.settings-card-box {
    background: #fff;
    width: 100%;
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.settings-label {
    font-size: 13px;
    font-weight: 700;
    color: #333;
    margin-left: 5px;
}

.settings-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 12px;
    font-size: 14px;
    background: #f9f9f9;
    outline: none;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.code-font {
    font-size: 12px;
    color: #333;
    background: #f5f5f5;
    min-height: 150px;
}

/* --- èŠå¤©è®¾ç½®é¡µï¼šæŒ‰é’®å¹¶æŽ’å¸ƒå±€å®¹å™¨ (æ–°å¢ž) --- */
.settings-btns-row {
    display: flex;           /* å¯ç”¨ Flex å¸ƒå±€ */
    gap: 15px;               /* æŒ‰é’®ä¹‹é—´çš„é—´è· */
    width: 100%;             /* å æ»¡å®½åº¦ */
    margin-top: 20px;        /* é¡¶éƒ¨é—´è· */
}

/* --- ä¿å­˜æŒ‰é’® (ä¿®æ”¹ï¼šæ‰¾åˆ°åŽŸæœ‰çš„ .save-float-btn è¿›è¡Œæ›¿æ¢æˆ–è¦†ç›–) --- */
.save-float-btn {
    flex: 1;                 /* å…³é”®ï¼šè®©æŒ‰é’®å æ®ä¸€åŠå®½åº¦ */
    background: #000;
    color: #fff;
    padding: 12px;
    border-radius: 12px;
    text-align: center;
    font-weight: bold;
    cursor: pointer;
    margin-top: 0;           /* åŽ»æŽ‰åŽŸæœ‰çš„é¡¶éƒ¨é—´è·ï¼Œç”±å®¹å™¨æŽ§åˆ¶ */
    border: none;            /* ç¡®ä¿æ— è¾¹æ¡† */
}
.save-float-btn:active {
    opacity: 0.8;
}

/* --- æ¸…é™¤èŠå¤©æŒ‰é’® (æ–°å¢ž) --- */
.clear-chat-btn {
    flex: 1;                 /* å…³é”®ï¼šè®©æŒ‰é’®å æ®ä¸€åŠå®½åº¦ */
    background: #FFF2F2;     /* æµ…çº¢è‰²èƒŒæ™¯ï¼Œè¡¨ç¤ºè­¦ç¤º */
    color: #FF3B30;          /* çº¢è‰²æ–‡å­— */
    border: 1px solid #FFD6D6; /* æµ…çº¢è‰²è¾¹æ¡† */
    padding: 12px;
    border-radius: 12px;
    text-align: center;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.clear-chat-btn:active {
    background: #FFE0E0;     /* ç‚¹å‡»æ—¶çš„æ·±è‰²åé¦ˆ */
    transform: scale(0.98);  /* ç‚¹å‡»å¾®ç¼©æ•ˆæžœ */
}

.settings-spacer { height: 10px; }

.settings-item { 
    padding: 15px; 
    border-bottom: 1px solid #f0f0f0; 
    display: flex; 
    justify-content: space-between; 
    cursor: pointer; 
    font-size: 15px; 
}
.settings-item:last-child { border-bottom: none; }
.settings-item.danger { color: #ff3b30; }

/* World Book è®¾ç½®é¡µ */
.wb-settings-page { 
    z-index: var(--z-settings);
    transform: translateX(100%); 
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); 
    padding-top: env(safe-area-inset-top, 0px); 
    box-sizing: border-box;
}
.wb-settings-page.active { transform: translateX(0); }

.wb-main-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 15px 20px; 
    flex-shrink: 0; 
}

.wb-main-title { font-size: 22px; font-weight: 700; color: #000; }
.wb-add-icon { font-size: 20px; cursor: pointer; padding: 5px; }

.wb-filter-section { padding: 10px 20px; flex-shrink: 0; }

.wb-filter-card { 
    background: #fff; 
    border-radius: 18px; 
    padding: 15px; 
    display: flex; 
    flex-direction: column; 
    gap: 8px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.02); 
}

.wb-filter-label { font-size: 12px; font-weight: 600; color: #666; }

.wb-filter-trigger { 
    border: 1px solid #eee; 
    border-radius: 12px; 
    padding: 12px; 
    font-size: 14px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    cursor: pointer; 
    background-color: #f9f9f9; 
    color: #333; 
    font-weight: 500; 
}
.wb-filter-trigger:active { background-color: #f0f0f0; }

.wb-content-area { flex: 1; overflow-y: auto; padding: 10px 20px 50px 20px; }

.wb-group-card { 
    background: #fff; 
    border-radius: 18px; 
    padding: 5px 0; 
    margin-bottom: 15px; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.02); 
    overflow: hidden; 
}

.wb-group-title { 
    padding: 10px 15px; 
    font-size: 12px; 
    font-weight: 600; 
    color: #999; 
    border-bottom: 1px solid #f9f9f9; 
}

.wb-book-item { 
    padding: 15px; 
    border-bottom: 1px solid #f7f7f7; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    font-size: 15px; 
}
.wb-book-item:last-child { border-bottom: none; }

.sheet-overlay { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.4); 
    z-index: var(--z-sheet); 
    opacity: 0; 
    pointer-events: none; 
    transition: opacity 0.3s; 
    backdrop-filter: blur(2px); 
    -webkit-backdrop-filter: blur(2px); 
}
.sheet-overlay.active { opacity: 1; pointer-events: auto; }

.bottom-sheet { 
    position: absolute; 
    bottom: 0; 
    left: 0; 
    width: 100%; 
    background: #fff; 
    border-radius: 20px 20px 0 0; 
    transform: translateY(100%); 
    transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1); 
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
}
.sheet-overlay.active .bottom-sheet { transform: translateY(0); }

.sheet-header { 
    padding: 15px; 
    text-align: center; 
    font-size: 14px; 
    color: #999; 
    font-weight: 500; 
    border-bottom: 1px solid #eee; 
}

.sheet-option { 
    padding: 10px 20px; 
    font-size: 16px; 
    color: #333; 
    text-align: center; 
    border-bottom: none; 
    cursor: pointer; 
}
.sheet-option:active { background-color: #f5f5f5; }

.sheet-option.selected { 
    color: #000; 
    font-weight: bold; 
    position: relative; 
}
.sheet-option.selected::after { 
    content: 'âœ“'; 
    position: absolute; 
    right: 40px; 
    color: #000; 
}

.sheet-cancel { margin-top: 8px; border-top: 6px solid #f5f5f5; font-weight: bold; }

.wb-create-modal { 
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(255,255,255,0.6); 
    backdrop-filter: blur(20px); 
    -webkit-backdrop-filter: blur(20px); 
    z-index: var(--z-settings-sub);
    display: none; 
    flex-direction: column; 
    align-items: center; 
    padding-top: calc(50px + env(safe-area-inset-top, 0px)); 
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto; 
    -webkit-overflow-scrolling: touch;
}
.wb-create-modal.show { display: flex; }

.wb-create-card { 
    width: 90%; 
    max-width: 400px; 
    background: #fff; 
    border-radius: 25px; 
    padding: 25px 20px; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.1); 
    display: flex; 
    flex-direction: column; 
    gap: 20px; 
    margin-bottom: 20px; 
    border: 1px solid #eee; 
}

.wb-create-title { font-size: 18px; font-weight: 700; text-align: center; }

.wb-field { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.wb-field-label { font-size: 12px; font-weight: 600; color: #888; }

.wb-field-input { 
    width: 100%; 
    padding: 12px; 
    border: 1px solid #eee; 
    border-radius: 12px; 
    font-size: 14px; 
    outline: none; 
    background: #f9f9f9; 
    box-sizing: border-box; 
}

.wb-row-space { display: flex; justify-content: space-between; align-items: center; }

.wb-toggle { 
    width: 40px; 
    height: 24px; 
    background: #eee; 
    border-radius: 20px; 
    position: relative; 
    cursor: pointer; 
    transition: background 0.2s; 
}
.wb-toggle.checked { background: #000; }

.wb-toggle-knob { 
    width: 20px; 
    height: 20px; 
    background: #fff; 
    border-radius: 50%; 
    position: absolute; 
    top: 2px; 
    left: 2px; 
    transition: transform 0.2s; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); 
}
.wb-toggle.checked .wb-toggle-knob { transform: translateX(16px); }

.wb-manage-link { font-size: 12px; color: #007aff; cursor: pointer; text-decoration: none; }
.wb-sub-btn { font-size: 12px; padding: 5px 10px; background: #f0f0f0; border-radius: 8px; cursor: pointer; }

.wb-entries-list { display: flex; flex-direction: column; gap: 15px; margin-top: 10px; width: 100%; }

.wb-entry-row { 
    display: flex; 
    flex-direction: column; 
    gap: 5px; 
    background: #f9f9f9; 
    padding: 6px; 
    border-radius: 8px; 
    position: relative; 
    margin-bottom: 5px; 
}

.wb-entry-input { 
    width: 100%; 
    padding: 10px; 
    border: 1px solid #e0e0e0; 
    border-radius: 8px; 
    font-size: 13px; 
    background: #fff; 
    box-sizing: border-box; 
}
textarea.wb-entry-input { height: 80px; resize: none; font-family: inherit; }

.wb-del-entry { 
    position: absolute; 
    top: 10px; 
    right: 10px; 
    color: #ccc; 
    cursor: pointer; 
    padding: 5px; 
}

.wb-entry-add-btn { 
    text-align: center; 
    padding: 10px; 
    background: #f9f9f9; 
    border-radius: 12px; 
    font-size: 13px; 
    color: #666; 
    cursor: pointer; 
    margin-top: 10px; 
    font-weight: 600; 
}

.wb-save-btn { 
    width: 100%; 
    padding: 15px; 
    background: #000; 
    color: #fff; 
    border-radius: 15px; 
    font-weight: 600; 
    text-align: center; 
    cursor: pointer; 
    margin-top: 10px; 
}

.wb-cancel-btn { 
    width: 100%; 
    padding: 15px; 
    background: transparent; 
    color: #999; 
    text-align: center; 
    cursor: pointer; 
    font-size: 14px; 
}

.wb-popover { 
    position: absolute; 
    top: 60px; 
    right: 20px; 
    background: #fff; 
    border-radius: 12px; 
    box-shadow: 0 5px 20px rgba(0,0,0,0.15); 
    display: none; 
    flex-direction: column; 
    width: 150px; 
    z-index: var(--z-page-secondary); 
}

.wb-pop-item { 
    padding: 12px 15px; 
    font-size: 14px; 
    border-bottom: 1px solid #f7f7f7; 
    cursor: pointer; 
}
.wb-pop-item:last-child { border-bottom: none; }

.wb-mini-overlay { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.3); 
    z-index: var(--z-sheet-content); 
    display: none; 
    justify-content: center; 
    align-items: center; 
}

.wb-mini-box { 
    background: #fff; 
    width: 80%; 
    border-radius: 15px; 
    padding: 15px; 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
    box-shadow: 0 5px 30px rgba(0,0,0,0.2); 
}

.wb-mini-list { max-height: 200px; overflow-y: auto; }

.wb-mini-item { 
    padding: 10px; 
    border-bottom: 1px solid #eee; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.wb-mini-del { color: red; font-size: 12px; cursor: pointer; }

@keyframes shakeMode {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(0.2deg); }
    75% { transform: rotate(-0.2deg); }
    100% { transform: rotate(0deg); }
}

.wb-group-card.shaking {
    animation: shakeMode 0.25s infinite linear;
    transform: scale(0.95);
    margin: 10px 5px;
    overflow: visible !important;
    border: 1px solid #ddd;
    cursor: default;
}

.wb-del-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 22px;
    height: 22px;
    background: #ff3b30;
    border-radius: 50%;
    z-index: var(--z-sticky);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    cursor: pointer;
}
.wb-del-badge::before { content: 'Ã—'; font-weight: bold; margin-top: -2px; }

/* è®°å¿†è®¾ç½®å¡ç‰‡æ ·å¼ */
.mem-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    width: 100%;
}

.mem-input-small {
    width: 60px;
    padding: 6px;
    border: 1px solid #eee;
    border-radius: 8px;
    text-align: center;
    background: #f9f9f9;
    font-size: 13px;
    outline: none;
    font-family: inherit;
}

.plump-btn {
    background: #ffffff;
    color: #333;
    border: 1px solid #e0e0e0;
    border-bottom: 4px solid #dcdcdc;
    border-radius: 15px;
    padding: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 5px;
}
.plump-btn:active {
    transform: translateY(2px);
    border-bottom: 2px solid #dcdcdc;
}

.mem-bank-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5px;
    cursor: pointer;
    margin-top: 5px;
    border-radius: 8px;
    transition: background 0.2s;
}
.mem-bank-header:active { background: #f5f5f5; }

.mem-bank-arrow {
    transition: transform 0.3s;
    font-size: 12px;
    color: #ccc;
}
.mem-bank-header.open .mem-bank-arrow { transform: rotate(90deg); }

#memSummaryContainer {
    display: none;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    padding: 5px;
    background: #f8f8fa;
    border-radius: 12px;
}

.mem-summary-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 10px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.mem-card-date { font-size: 10px; color: #999; }

.mem-card-textarea {
    width: 100%;
    border: none;
    font-size: 13px;
    color: #333;
    resize: vertical;
    min-height: 60px;
    outline: none;
    font-family: inherit;
    background: transparent;
}

.mem-card-actions {
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid #f9f9f9;
    padding-top: 5px;
}

.mem-del-btn-text { font-size: 11px; color: #ff3b30; cursor: pointer; padding: 2px 5px; }

.mem-stats-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed #eee;
    font-size: 11px;
    color: #999;
    font-family: monospace;
}

.mem-stat-item { display: flex; align-items: center; gap: 4px; }

/* ç¼–è¾‘æŒ‰é’®æ ·å¼ (ä¸Žåˆ é™¤æŒ‰é’®ç±»ä¼¼ä½†é¢œè‰²ä¸åŒ) */
.mem-edit-btn-text { 
    font-size: 11px; 
    color: #007aff; /* è“è‰² */
    cursor: pointer; 
    padding: 2px 8px; 
    margin-right: 5px;
    border-right: 1px solid #eee; /* åŠ ä¸ªåˆ†å‰²çº¿ */
}

/* ä¼˜åŒ–æ–‡æœ¬æ¡†åœ¨â€œä¸å¯ç¼–è¾‘â€çŠ¶æ€ä¸‹çš„æ˜¾ç¤º */
.mem-card-textarea:disabled {
    background: transparent;
    color: #666;
    border: none;
    cursor: default;
    opacity: 1; /* iOS Safari ä¿®æ­£ */
    -webkit-text-fill-color: #666;
}

/* æ¿€æ´»ç¼–è¾‘æ—¶çš„æ–‡æœ¬æ¡†æ ·å¼ */
.mem-card-textarea:not(:disabled) {
    background: #fff;
    border: 1px solid #007aff; /* ç¼–è¾‘æ—¶æ˜¾ç¤ºè“æ¡† */
    color: #000;
    box-shadow: 0 0 5px rgba(0,122,255,0.2);
}

/* èŠå¤©å®¤å¤´éƒ¨ */
.folder-header-container {
    height: 54px;
    display: flex;
    align-items: flex-end;
    position: relative;
    z-index: var(--z-card);
    padding-left: 0;
    margin-bottom: -1px; 
}

.folder-tab {
    position: relative;
    background-color: #fff;
    width: auto;
    min-width: 120px;
    height: 44px;
    border-radius: 16px 16px 0 0; 
    display: flex;
    align-items: center;
    padding-left: 15px;
    padding-right: 15px;
    gap: 8px;
    box-shadow: -2px -4px 10px rgba(0,0,0,0.05); 
    z-index: var(--z-card);
}

.folder-curve-connector {
    position: absolute;
    bottom: 0;
    right: -20px;
    width: 20px;
    height: 20px;
    background: transparent;
    box-shadow: -10px 0 0 0 #fff;
    border-bottom-left-radius: 16px;
    z-index: var(--z-card);
}

.folder-back-btn {
    font-family: Arial, sans-serif;
    font-size: 26px;
    color: #666;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    margin-top: -2px;
    padding: 5px;
}

.folder-title {
    font-size: 16px;
    font-weight: 600;
    color: #000;
    white-space: nowrap;
}

.folder-right-space {
    flex: 1;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 15px;
    padding-bottom: 10px;
}

.folder-menu-btn {
    width: 32px;
    height: 32px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08); 
    cursor: pointer;
    color: #333;
    font-size: 14px;
}

/* é¢œè‰²é€‰æ‹©å™¨ */
.color-selector-wrapper {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 5px 2px;
    margin-bottom: 15px;
    scrollbar-width: none;
}
.color-selector-wrapper::-webkit-scrollbar { display: none; }

.color-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: transform 0.2s;
    min-width: 40px;
}
.color-option:active { transform: scale(0.9); }

.color-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.c-half-left { position: absolute; left: 0; top: 0; width: 50%; height: 100%; }
.c-half-right { position: absolute; right: 0; top: 0; width: 50%; height: 100%; }

.color-name { font-size: 11px; color: #666; font-weight: 500; }

/* æ°”æ³¡é¢„è§ˆ */
.img-preview-wrapper {
    position: relative;
    width: 100%;
    overflow: visible; 
    border-radius: 12px;
    margin-top: 10px;
}

.img-preview-bg {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 12px; 
    pointer-events: none; 
}

.preview-overlay-box {
    position: absolute;
    max-width: 80%; 
    display: flex;
    flex-direction: column;
    z-index: var(--z-content);
}

.preview-pos-left {
    top: 50%;
    left: 15px;    
    align-items: flex-start;
}

.preview-pos-right {
    top: 70%;
    right: 15px;   
    align-items: flex-end;
}

.img-preview-wrapper .Miu-miu {
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    display: flex !important;
    align-items: flex-start !important;
    overflow: visible !important;
    margin-bottom: 5px !important;
}

.img-preview-wrapper .Miu-miu .content {
    font-size: 12px;
    padding: 6px 11px;
    white-space: normal;
    min-height: 0;
    line-height: 1.4;
    position: relative !important;
}

.img-preview-wrapper .Miu-miu.user .content::after {
    content: "";
    position: absolute;
    width: 12px;
    height: 15px;
    bottom: -15px !important; 
    right: 6px !important;    
    clip-path: path("M 15,13 Q 12,0 2,2 Q 7,3 5,22 L 13,12"); 
    z-index: var(--z-base);
    transform: rotate(-2deg) scale(-1);
    transform-origin: top right;
    box-sizing: border-box;
}

.img-preview-wrapper .Miu-miu.ai .content::before {
    content: "";
    position: absolute;
    width: 12px;
    height: 15px;
    bottom: -15px !important; 
    left: -7px !important;    
    clip-path: path("M 11,16 Q 10,0 1,1 Q 6.6,3 1,19 L 19,16");
    z-index: var(--z-base);
    transform: rotate(19deg) scaleY(-1);
    transform-origin: top left;
    box-sizing: border-box;
}

.img-preview-wrapper .avatar-img {
    width: 30px !important;
    height: 30px !important;
    border-radius: 10px !important;
    object-fit: cover;
    display: block !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex-shrink: 0;
    margin-top: 0 !important;
}

.img-preview-wrapper .Miu-miu.ai .avatar-img { margin-right: 8px !important; }
.img-preview-wrapper .Miu-miu.user .avatar-img { margin-left: 8px !important; }

.bubble-preview-container .Miu-miu { margin-bottom: 0 !important; }

/* é¢„è®¾ç®¡ç†å™¨ */
.preset-manager-toggle {
    margin-top: 15px;
    background: #fff;
    border: 1px solid #eee;
    padding: 12px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 13px;
    color: #333;
    font-weight: 600;
    transition: background 0.2s;
}
.preset-manager-toggle:active { background: #f9f9f9; }

.preset-manager-body {
    display: none;
    background: #f8f8f8;
    margin-top: 5px;
    border-radius: 12px;
    padding: 15px;
    flex-direction: column;
    gap: 12px;
    animation: fadeIn 0.3s ease-out;
    border: 1px solid #eee;
}

.preset-select-row select {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    outline: none;
    background: #fff;
    font-size: 13px;
    color: #333;
    height: 40px;
}

.preset-btn-row {
    display: flex;
    gap: 10px;
    width: 100%;
}

.preset-btn {
    flex: 1;
    padding: 12px 0;
    border-radius: 8px;
    border: none;
    font-size: 12px;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    text-align: center;
    transition: opacity 0.2s;
}
.preset-btn:active { opacity: 0.8; }
.btn-save-new { background-color: #EFEFEF; }
.btn-update   { background-color: #EFEFEF; }
.btn-delete   { background-color: #EFEFEF; }

.preset-hint {
    font-size: 11px;
    color: #999;
    text-align: center;
    margin-top: 5px;
}

/* èŠå¤©å®¤åº•éƒ¨è¾“å…¥æ  */
.room-footer {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    background: #fff;
    z-index: var(--z-chatroom-footer) !important;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    padding: 10px 15px;
    padding-bottom: max(12px, env(safe-area-inset-bottom)) !important;
    border-top: 0.5px solid #eee;
    gap: 10px;
    transition: bottom 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

.room-footer.keyboard-open {
    bottom: var(--keyboard-height, 0px);
}

.room-footer.tools-active {
    bottom: 0 !important;
}

#plusIcon { transition: transform 0.3s; }
.room-footer.tools-active #plusIcon { 
    transform: rotate(45deg); 
    color: #333;
}

.footer-btn-side {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 22px;
    flex-shrink: 0;
    border-radius: 50%;
    cursor: pointer;
}
.footer-btn-side:active { background: #f5f5f5; }

.msg-input {
    flex: 1;
    min-width: 0;
    background: #f2f2f2;
    border: none;
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 15px;
    color: #333;
    outline: none;
    min-height: 38px;
    max-height: 120px;
    overflow-y: auto;
    overflow-x: hidden;
    word-break: break-all;
    resize: none;
    box-sizing: border-box;
}

/* æ¶²æ€çŽ»ç’ƒæ‚¬æµ®é¢æ¿ */
.chat-tools-panel {
    position: absolute !important;
    bottom: 80px !important;
    left: 15px !important;
    right: 15px !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: 400px !important;
    background: rgba(245, 245, 247, 0.65) !important;
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border-radius: 24px !important;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.08),
        inset 0 1px 2px rgba(255, 255, 255, 0.8);
    padding: 15px !important;
    z-index: var(--z-chatroom-header) !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    overflow: hidden !important;
}

.chat-tools-panel:has(.sticker-panel.active) {
    height: 350px !important;
    padding: 0 !important;
}

.chat-tools-panel.sticker-mode {
    height: 350px !important;
    padding: 0 !important;
}

.chat-tools-panel.active {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scale(1) !important;
}

/* --- å·¥å…·æ å¸ƒå±€ (ä¿®æ­£ç‰ˆï¼šä¸€è¡Œ5ä¸ªï¼Œè‡ªåŠ¨æ¢è¡Œ) --- */
.tools-grid {
    display: grid !important;
    /* â˜…â˜…â˜… æ ¸å¿ƒï¼šå¼ºåˆ¶ä¸€è¡Œ5åˆ—ï¼Œæ¯ä¸ªå 1ä»½å®½åº¦ â˜…â˜…â˜… */
    grid-template-columns: repeat(5, 1fr) !important; 
    /* åž‚ç›´é—´è·15pxï¼Œæ°´å¹³é—´è·10px (ä¿æŒåŽŸæœ‰ç–å¯†æ„Ÿ) */
    gap: 15px 10px !important; 
    width: 100%;
    padding: 10px 5px !important;
    overflow: visible !important; /* ä¸å†éœ€è¦æ¨ªå‘æ»šåŠ¨ */
    box-sizing: border-box;
}

.tool-item {
    width: auto !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    margin: 0 auto; /* åœ¨å„è‡ªçš„æ ¼å­åŠ›å±…ä¸­ */
}

/* ä¹‹å‰æ·»åŠ çš„éšè—è€³æœºçº¿ä»£ç ï¼Œç¡®è®¤ä¸€ä¸‹è¿˜åœ¨ä¸åœ¨ï¼Œä¸åœ¨çš„è¯åŠ ä¸Š */
.vc-wire {
    display: none !important;
}

.tool-icon-box {
    width: 50px;
    height: 50px;
    border-radius: 18px !important;
    background: linear-gradient(145deg, rgba(255,255,255,0.7), rgba(240,240,245,0.4)) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    box-shadow: 
        5px 5px 10px rgba(163, 177, 198, 0.15), 
        -5px -5px 10px rgba(255, 255, 255, 0.8),
        inset 2px 2px 4px rgba(255, 255, 255, 0.5) !important;
    color: #666 !important;
    font-size: 20px !important;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.tool-icon-box:active {
    transform: scale(0.92);
    box-shadow: 
        inset 3px 3px 6px rgba(163, 177, 198, 0.15), 
        inset -3px -3px 6px rgba(255, 255, 255, 0.8) !important;
}

.tool-name {
    font-size: 11px;
    color: #888;
    font-weight: 500;
}

/* è¡¨æƒ…åŒ…é¢æ¿ */
.sticker-panel {
    display: none;
    flex-direction: column;
    width: 100%;
    height: 350px !important;
    max-height: 350px !important;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}

.sticker-panel.active {
    display: flex !important;
}

/* è¡¨æƒ…åŒ…é¡¶éƒ¨å¯¼èˆªæ  */
.sticker-nav-tabs {
    order: 1 !important; 
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 10px 15px !important;
    border-bottom: 1px solid rgba(0,0,0,0.05) !important;
    flex-shrink: 0 !important;
    height: 44px !important;
    z-index: var(--z-content) !important;
}

.sticker-tab-item {
    font-size: 14px;
    color: #666;
    cursor: pointer;
    font-weight: 500;
}
.sticker-tab-item.active {
    color: #000;
    font-weight: 700;
}

/* è¡¨æƒ…åŒ…å¤´éƒ¨ */
.sticker-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 40px;
    background: transparent !important;
    border-bottom: 1px solid rgba(0,0,0,0.05) !important;
    padding: 0 5px !important;
    margin-bottom: 5px;
    flex-shrink: 0;
    z-index: var(--z-content);
    order: 1;
}

.sticker-header-item {
    font-size: 14px;
    color: #333;
    padding: 5px 8px;
    cursor: pointer;
    font-weight: 500;
}

.sticker-header-title {
    font-weight: 700;
    font-size: 15px;
}

/* è¡¨æƒ…åŒ…æ»šåŠ¨åŒºåŸŸ */
.sticker-scroll-area {
    order: 2 !important;
    flex: 1 !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 10px 5px !important;
    position: relative !important;
    padding-bottom: 80px;
}

.sticker-scroll-area::-webkit-scrollbar {
    width: 4px;
}

.sticker-scroll-area::-webkit-scrollbar-track {
    background: transparent;
}

.sticker-scroll-area::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

.sticker-scroll-area::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* è¡¨æƒ…åŒ…ç½‘æ ¼å¸ƒå±€ */
.sticker-grid-layout {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px 10px; 
    padding: 10px 5px;
    align-items: start; 
}

/* è¡¨æƒ…åŒ…å•å…ƒæ ¼ */
.sticker-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* è¡¨æƒ…åŒ…å›¾ç‰‡å®¹å™¨ */
.sticker-item-box {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    background: rgba(255,255,255,0.4);
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* è¡¨æƒ…åŒ…å›¾ç‰‡ */
.sticker-img-content {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* è¡¨æƒ…åŒ…åå­— */
.sticker-name {
    font-size: 10px;
    color: #666;
    margin-top: 5px;
    text-align: center;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 14px; 
    line-height: 14px;
}

/* è¡¨æƒ…åŒ…é€‰ä¸­çŠ¶æ€ */
.sticker-select-circle {
    display: none;
    position: absolute;
    top: 5px;
    right: 5px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: rgba(0,0,0,0.2);
    z-index: var(--z-content);
}

.sticker-panel.edit-mode .sticker-select-circle {
    display: block;
}

.sticker-panel.lock-mode .sticker-select-circle {
    display: block;
}
.sticker-panel.lock-mode .sticker-select-circle.selected {
    background: #ff3b30; /* ä¸Šé”æ—¶çš„åœ†åœˆå˜ä¸ºçº¢è‰²è­¦å‘Šè‰² */
    border-color: #ff3b30;
}

.sticker-select-circle.selected {
    background: #007aff;
    border-color: #007aff;
}
.sticker-select-circle.selected::after {
    content: 'âœ“';
    color: #fff;
    font-size: 10px;
    position: absolute;
    top: 50%; 
    left: 50%;
    transform: translate(-50%, -50%);
}

/* åº•éƒ¨åˆ†ç±»æ  */
.sticker-category-nav {
    order: 3 !important;
    display: flex !important;
    gap: 8px;
    padding: 10px 12px !important;
    overflow-x: auto !important;
    scrollbar-width: none;
    border-top: 1px solid rgba(0,0,0,0.05) !important;
    margin-top: auto !important;
    flex-shrink: 0 !important;
    background: transparent;
    z-index: var(--z-content);
    max-height: 50px;
    box-sizing: border-box;
}

.sticker-category-nav::-webkit-scrollbar { 
    display: none; 
}

.cat-pill {
    padding: 5px 12px;
    background: #f2f2f7;
    border-radius: 15px;
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.cat-pill.active {
    background: #000;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.cat-pill.edit-mode {
    position: relative;
    padding-right: 18px;
    display: inline-flex;
    align-items: center;
}

.cat-pill .cat-pill-text {
    white-space: nowrap;
}

.cat-pill .cat-delete-x {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 18px;
    height: 18px;
    background: #ff3b30;
    color: #fff;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    line-height: 16px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: var(--z-content);
}

.cat-pill .cat-delete-x:active {
    transform: scale(0.9);
}

/* ç¼–è¾‘æ¨¡å¼åº•éƒ¨æ“ä½œæ  */
.sticker-action-bar {
    display: none !important;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    gap: 12px;
    z-index: var(--z-overlay);
}

.sticker-panel.edit-mode .sticker-action-bar {
    display: flex !important;
    animation: popUpBar 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popUpBar {
    from { transform: translate(-50%, 40px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

.edit-action-btn {
    flex: 1;
    height: 44px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    gap: 6px;
    transition: transform 0.1s;
}
.edit-action-btn:active { transform: scale(0.96); }

.btn-category {
    background: #333;
    color: #fff;
}

.btn-delete-confirm {
    background: #ff3b30;
    color: #fff;
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.3);
}

/* åˆ†ç±»ç®¡ç†å¼¹çª—æ ·å¼ */
.category-popup-box {
    width: 85%;
    max-width: 320px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    animation: zoomIn 0.2s ease-out;
    max-height: 60vh;
}

@keyframes zoomIn { 
    from { transform: scale(0.9); opacity: 0; } 
    to { transform: scale(1); opacity: 1; } 
}

.cat-popup-header { 
    text-align: center; 
    font-weight: 700; 
    font-size: 16px; 
    margin-bottom: 15px; 
    color: #333; 
}

.cat-list-scroll { 
    max-height: 200px; 
    overflow-y: auto; 
    margin-bottom: 15px; 
}

.cat-option-item {
    padding: 12px;
    border-radius: 12px;
    background: #f9f9f9;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid transparent;
}
.cat-option-item.selected {
    background: #eef6ff;
    border-color: #007aff;
    color: #007aff;
    font-weight: bold;
}

.cat-check { 
    width: 18px; 
    height: 18px; 
    border: 2px solid #ddd; 
    border-radius: 50%; 
}
.cat-option-item.selected .cat-check { 
    border-color: #007aff; 
    background: #007aff; 
}

.new-cat-row { 
    display: flex; 
    gap: 8px; 
    margin-top: 5px; 
    padding-top: 15px; 
    border-top: 1px solid #eee; 
}

.new-cat-input { 
    flex: 1; 
    padding: 10px; 
    border-radius: 10px; 
    border: 1px solid #eee; 
    background: #f5f5f5; 
    outline: none; 
    font-size: 13px;
}

.btn-create-cat { 
    background: #000; 
    color: #fff; 
    padding: 0 15px; 
    border-radius: 10px; 
    font-size: 13px; 
    display: flex; 
    align-items: center; 
    cursor: pointer; 
    font-weight: 600;
}

.cat-popup-footer { 
    display: flex; 
    gap: 10px; 
    margin-top: 15px; 
}

.cat-btn { 
    flex: 1; 
    padding: 12px; 
    border-radius: 12px; 
    text-align: center; 
    font-weight: bold; 
    font-size: 14px; 
    cursor: pointer; 
}
.cat-btn-cancel { background: #f2f2f2; color: #333; }
.cat-btn-confirm { background: #007aff; color: #fff; }

/* é€šç”¨äºŒçº§å¼¹çª—é®ç½© */
.glass-popup-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: var(--z-critical) !important;
    display: none;
    justify-content: center !important;
    align-items: center !important;
}

.glass-popup-overlay.show {
    display: flex !important;
}

#stickerCategoryOverlay {
    display: none !important;
}

#stickerCategoryOverlay.show {
    display: flex !important;
}

/* å¼¹çª—æœ¬ä½“ - æ¶²æ€é£Žæ ¼ */
.glass-popup-box {
    width: 75%;
    max-width: 320px;
    padding: 25px 20px;
    background: rgba(245, 245, 247, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.1),
        inset 0 1px 1px rgba(255,255,255,0.8);
    display: flex;
    flex-direction: column;
    gap: 15px;
    animation: popupScale 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: var(--z-modal);
}

@keyframes popupScale {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.glass-popup-title {
    text-align: center;
    font-size: 17px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.glass-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.glass-input-label {
    font-size: 12px;
    color: #888;
    margin-left: 5px;
}

.glass-input {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.05);
    background: rgba(255,255,255,0.6);
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}

.glass-input:focus {
    background: #fff;
    border-color: rgba(0,0,0,0.1);
}

.glass-btn-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.glass-btn {
    flex: 1;
    display: flex !important;
    justify-content: center !important; /* æ°´å¹³å±…ä¸­ */
    align-items: center !important;     /* åž‚ç›´å±…ä¸­ */
    padding: 0 !important;              /* åŽ»æŽ‰ paddingï¼Œé  flex å±…ä¸­ */
    height: 44px !important;            /* å›ºå®šé«˜åº¦ï¼Œç¡®ä¿ç»Ÿä¸€ */
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.glass-btn-cancel {
    background: rgba(0,0,0,0.05);
    color: #666;
}

.glass-btn-confirm {
    background: #000;
    color: #fff;
}

/* â˜…â˜…â˜… çº¯è¡¨æƒ…åŒ…æ°”æ³¡ - ç§»é™¤èƒŒæ™¯ â˜…â˜…â˜… */
#roomMessages .Miu-miu .content.sticker-only,
.Miu-miu.user .content.sticker-only,
.Miu-miu.ai .content.sticker-only {
    background: transparent !important;
    background-color: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
}

/* ç§»é™¤å°å°¾å·´ */
#roomMessages .Miu-miu.user .content.sticker-only::after,
#roomMessages .Miu-miu.ai .content.sticker-only::before {
    display: none !important;
    content: none !important;
    background: transparent !important;
}

/* è¡¨æƒ…åŒ…å›¾ç‰‡å¤§å° */
.chat-sticker-img {
    max-width: 85px !important;
    max-height: 85px !important;
    width: auto !important;
    height: auto !important;
    border-radius: 8px;
    display: block;
}


.msg-action-menu {
    position: absolute; 
    z-index: var(--z-popover);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-radius: 12px; /* åœ†è§’ç¨å¾®æ”¹å¤§ä¸€ç‚¹æ›´åœ†æ¶¦ */
    display: none; 

    /* â˜…â˜…â˜… æ ¸å¿ƒä¿®æ”¹ï¼šå®½åº¦æ”¹å°ï¼Œé—´è·è‡ªç„¶å°±å°äº† â˜…â˜…â˜… */
    width: 216px;           
    padding: 4px;           
    gap: 0;                 /* å¿…é¡»æ˜¯0 */
    
    flex-wrap: wrap;       
    flex-direction: row; 
    align-items: flex-start;
    justify-content: flex-start;
    
    transform-origin: center bottom;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.msg-action-menu.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1) translateY(0);
}

.msg-action-item {
    position: relative;
    
    /* ä¿æŒ 33.33% ç¡®ä¿ä¸€è¡Œ3ä¸ª */
    width: 33.33%; 
    flex-shrink: 0;
    
    /* ä¸Šä¸‹å†…è¾¹è·ç¨å¾®åŠ å¤§ä¸€ç‚¹ï¼Œæ–¹ä¾¿æ‰‹æŒ‡ç‚¹å‡» */
    padding: 8px 0;           
    
    /* å­—ä½“ç¨å¾®æ”¹å°ï¼Œé€‚é…ç´§å‡‘å¸ƒå±€ */
    font-size: 12px;          
    font-weight: 500;
    border-radius: 8px;       
    
    text-align: center;
    justify-content: center;
    display: flex;
    color: #333; 
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.msg-action-item:active {
    background: rgba(0,0,0,0.06);
}

/* [ä¿®æ”¹] ç«–çº¿åˆ†éš”ç¬¦ - å¿…é¡»éšè— */
.msg-action-item:not(:last-child)::after {
    display: none; 
 
    content: '';
    position: absolute;
    right: 0;
    top: 25%;    
    height: 50%; 
    width: 1px;
    background: rgba(0,0,0,0.15); 
}

/* ç§»é™¤ä¹‹å‰çš„å›¾æ ‡æ ·å¼ï¼Œé˜²æ­¢æ®‹ç•™ */
.msg-action-icon, .msg-action-text {
    display: contents; 
}

.msg-action-item:first-child { border-top-left-radius: 12px; border-bottom-left-radius: 12px; } 
.msg-action-item:last-child { border-top-right-radius: 12px; border-bottom-right-radius: 12px; } 
/* --- è¯­éŸ³æ°”æ³¡æ ·å¼ (ç«–æ¡æ³¢çº¹ç‰ˆ) --- */
.voice-inner-container {
    display: inline-flex;
    flex-direction: column;
    cursor: pointer;
}

.voice-main-row {
    display: inline-flex;
    align-items: center; 
    justify-content: center;
    /* å…³é”®ï¼šå¼ºåˆ¶è®¾ä¸º rowï¼Œä¿è¯åŠ¨ç”»æ°¸è¿œåœ¨å·¦ï¼Œæ•°å­—æ°¸è¿œåœ¨å³ */
    flex-direction: row !important; 
}

/* åŠ¨ç”»å®¹å™¨ */
.voice-animate-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px; /* ç«–æ¡ä¹‹é—´çš„é—´è· */
    height: 16px;
    flex-shrink: 0;
    margin-right: 6px; /* åŠ¨ç”»å’Œæ•°å­—ä¹‹é—´çš„é—´è· */
}

/* ç«–æ¡æ ·å¼ */
.voice-line {
    width: 2.8px; 
    background-color: currentColor; 
    border-radius: 2px;
    animation: voice-wave 1s infinite ease-in-out;
    height: 6px; /* é»˜è®¤é™æ­¢é«˜åº¦ */
}

/* 4æ ¹ç«–æ¡åˆ†åˆ«è®¾ç½®å»¶è¿Ÿï¼Œå½¢æˆæ³¢æµªæ„Ÿ */
.voice-line:nth-child(1) { animation-delay: 0.1s; }
.voice-line:nth-child(2) { animation-delay: 0.3s; }
.voice-line:nth-child(3) { animation-delay: 0.5s; }
.voice-line:nth-child(4) { animation-delay: 0.2s; }

/* æ³¢çº¹å¾‹åŠ¨åŠ¨ç”» */
@keyframes voice-wave {
    0%, 100% { height: 6px; opacity: 0.6; }
    50% { height: 14px; opacity: 1; }
}

/* æ•°å­—æ—¶é•¿ */
.voice-duration {
    font-size: 14px !important;
    font-weight: 500;
    line-height: 1;
    opacity: 0.9;
}

/* éšè—æ—§å›¾æ ‡ */
.voice-icon { display: none !important; }

/* è½¬æ–‡å­—ç»“æžœæ¡† (ä¿æŒä¸å˜) */
.voice-trans-result {
    display: none;
    margin-top: 6px;
    padding: 5px 8px;
    background: rgba(0, 0, 0, 0.05); /* åŠé€æ˜Žé»‘ï¼Œé€‚é…å„ç§åº•è‰² */
    border-radius: 6px;
    font-size: 11px;
    line-height: 1.4;
    word-break: break-all;
    max-width: 180px;
    text-align: left;
}
.voice-trans-result.show { display: block !important; }

.Miu-miu.ai .voice-animate-icon {
    transform: rotate(0deg);
}

.Miu-miu.user .voice-animate-icon {
    transform: scaleX(-1);
}

.voice-icon {
    font-size: 14px !important;
}

.voice-duration {
    font-size: 13px !important;
    font-weight: 500;
    line-height: 1;
}

.voice-trans-result {
    display: none;
    margin-top: 6px;
    padding: 5px 8px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    font-size: 11px;
    line-height: 1.4;
    word-break: break-all;
    max-width: 180px;
}

.voice-trans-result.show {
    display: block !important;
}

/* è¿žç»­æ¶ˆæ¯éšè—å°¾å·´ */
.Miu-miu.user.no-tail .content::after {
    display: none !important;
    content: none !important;
}

.Miu-miu.ai.no-tail .content::before {
    display: none !important;
    content: none !important;
}

.Miu-miu.user.no-tail .content {
    --bottom-right: 18px;
}

.Miu-miu.ai.no-tail .content {
    --bottom-left: 18px;
}

/* åˆ—è¡¨æ ·å¼ */
.group-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 4px 8px;
    margin: 10px auto;
    width: 94%;
    display: flex;
    justify-content: space-between;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.group-item {
    flex: 1;
    text-align: center;
    font-size: 13px;
    padding: 6px 0;
    border-radius: 6px;
    color: #888;
    transition: all 0.2s;
    cursor: pointer;
}

.group-item.active {
    background-color: var(--tab-active-bg);
    color: var(--tab-active-text);
    font-weight: 600;
}

#chat-list-container {
    width: 100%;
    padding: 10px 0; 
    padding-bottom: calc(70px + env(safe-area-inset-bottom)) !important;
}

.chat-list-group {
    background: white;
    border-radius: 18px;
    /* æ ¸å¿ƒä¿®æ”¹ï¼šä¸Šä¸‹é—´è·ä¿æŒï¼Œå·¦å³è‡ªåŠ¨å±…ä¸­ï¼Œå®½åº¦æ”¹ä¸º94% */
    margin: 0 auto 15px auto; 
    width: 94%; 
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.chat-swipe-row {
    position: relative;
    width: 100%;
    height: 72px;
    overflow: hidden;
    background: #f5f5f5;
    border-bottom: 0.5px solid #f0f0f0;
}
.chat-swipe-row:last-child { border-bottom: none; }

.chat-swipe-actions {
    position: absolute;
    top: 0; 
    right: 0; 
    height: 100%;
    display: flex; 
    z-index: var(--z-base);
}

.swipe-btn {
    display: flex; 
    align-items: center; 
    justify-content: center;
    color: white; 
    font-size: 13px; 
    font-weight: 500;
    width: 65px; 
    height: 100%; 
    cursor: pointer;
}
.btn-cancel { background-color: #C7C7CC; }
.btn-pin { background-color: #FF9500; }
.btn-delete { background-color: #ff3b30; }
.btn-edit { background-color: #007aff; }

.chat-avatar { 
    width: 48px; 
    height: 48px; 
    border-radius: 10px; 
    background: #eee; 
    margin-right: 12px; 
    object-fit: cover; 
    flex-shrink: 0; 
}

.chat-info { 
    flex: 1; 
    overflow: hidden; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
}

.chat-name-row { 
    display: flex; 
    justify-content: space-between; 
    align-items: baseline; 
    margin-bottom: 4px; 
}

.chat-name { font-size: 15px; font-weight: 600; color: #333; }
.chat-time { font-size: 11px; color: #b2b2b2; }
.chat-preview { 
    font-size: 13px; 
    color: #999; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}

/* "æˆ‘çš„" é¡µé¢ */
.me-main-card {
    background: white; 
    border-radius: 30px; 
    margin: 10px auto;
    width: 94%; 
    height: 260px; 
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); 
    overflow: hidden;
    flex-shrink: 0;
}

.music-area { 
    width: 85%; 
    height: 100%; 
    padding: 25px; 
    display: flex; 
    flex-direction: column; 
    position: relative; 
    z-index: calc(var(--z-base) + 1);
}

.player-top { display: flex; align-items: center; }

.player-avatar {
    width: 90px; 
    height: 90px; 
    background: #f5f5f5; 
    border-radius: 18px; 
    margin-right: 18px; 
    position: relative; 
    cursor: pointer; 
    overflow: hidden; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.player-info { flex: 1; cursor: pointer; }

.song-name { 
    font-size: 20px; 
    font-weight: bold; 
    color: #333; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    white-space: nowrap; 
}

.artist-name { font-size: 14px; color: #999; margin-top: 5px; }

.player-controls { margin-top: auto; padding-bottom: 5px; width: 100%; }

.progress-container {
    width: 100%; 
    height: 20px; 
    display: flex; 
    align-items: center; 
    margin-bottom: 15px; 
    cursor: pointer;
}

.progress-bar-bg { 
    flex: 1; 
    height: 4px; 
    background: #eee; 
    border-radius: 2px; 
    position: relative; 
}

.progress-fill { 
    height: 100%; 
    background: var(--accent-color); 
    width: 0%; 
    border-radius: 2px; 
}

.progress-dot {
    position: absolute; 
    width: 12px; 
    height: 12px; 
    background: var(--accent-color); 
    border-radius: 50%;
    top: 50%; 
    transform: translate(-50%, -50%); 
    left: 0%; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.control-btns { 
    display: flex; 
    gap: 20px; 
    align-items: center; 
    justify-content: flex-start; 
}

.nav-btn-svg { 
    width: 32px; 
    height: 32px; 
    cursor: pointer; 
    fill: #bbb; 
    transition: fill 0.2s; 
}
.nav-btn-svg:active { fill: var(--accent-color); }

.play-btn-wrapper {
    width: 55px; 
    height: 55px; 
    background: white; 
    border-radius: 50%;
    display: flex; 
    align-items: center; 
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1), inset 0 1px 2px white;
    cursor: pointer; 
    transition: transform 0.2s, box-shadow 0.2s; 
    margin: 0 5px;
}
.play-btn-wrapper:active { transform: scale(0.92); }

.play-icon { width: 28px; height: 28px; fill: #444; margin-left: 4px; }
.pause-icon { width: 26px; height: 26px; fill: #444; display: none; }

.playing .play-icon { display: none; }
.playing .pause-icon { display: block; }
.playing .play-btn-wrapper { box-shadow: 0 4px 12px rgba(255, 142, 158, 0.3); }

.doll-deco {
    position: absolute; 
    right: -20px; 
    bottom: -20px; 
    width: 160px; 
    height: 160px;
    background-image: url('https://i.postimg.cc/TKhTX9Q9/image.png');
    background-size: contain; 
    background-repeat: no-repeat;
    background-position: bottom right; 
    pointer-events: none; 
    z-index: var(--z-base);
}

.api-card { 
    background: white; 
    border-radius: 30px; 
    padding: 12px 20px; 
    margin: 15px auto; 
    width: 94%; 
    font-size: 15px; 
    font-weight: 500; 
    display: flex; 
    align-items: center; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.03); 
    cursor: pointer;
}

.icon-img { 
    width: 26px; 
    height: 26px; 
    margin-right: 7px; 
    background-size: contain; 
    background-repeat: no-repeat; 
    background-position: center; 
}
.icon-api { background-image: url('https://i.postimg.cc/NyFhXfZ8/image.png'); }
.icon-theme { background-image: url('https://i.postimg.cc/G4BJTWqz/image.png'); }

.settings-list { 
    background: white; 
    border-radius: 25px; 
    margin: 10px auto; 
    width: 94%; 
    padding: 10px 0; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.03); 
}

.setting-item { 
    padding: 12px 20px; 
    font-size: 15px; 
    display: flex; 
    align-items: center; 
    border-bottom: none; 
    cursor: pointer; 
    color: #333;
}
.setting-item:active { background: #f9f9f9; }

/* éŸ³ä¹é¢æ¿ */
#music-panel-overlay {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(0,0,0,0.3); 
    z-index: var(--z-media-backdrop);
    display: none; 
    opacity: 0; 
    transition: opacity 0.3s;
}

#music-panel {
    position: fixed; 
    bottom: -70%; 
    left: 0; 
    width: 100%; 
    height: auto; 
    min-height: 40%;
    background: white; 
    border-radius: 30px 30px 0 0;
    z-index: var(--z-media-panel); 
    padding: 25px 20px;
    padding-bottom: calc(25px + env(safe-area-inset-bottom, 0px));
    transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; 
    flex-direction: column;
    box-shadow: 0 -5px 30px rgba(0,0,0,0.1);
}

.panel-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding-bottom: 15px;
    border-bottom: 1px solid #f5f5f5;
    margin-bottom: 10px;
    flex-shrink: 0;
    position: relative;
}

.panel-title { font-size: 18px; font-weight: 700; color: #333; }

.panel-plus { 
    font-size: 28px; 
    color: #333;
    font-weight: 300;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    line-height: 1;
}
.panel-plus:active { opacity: 0.6; }

.music-list-scroll { 
    flex: 1; 
    overflow-y: auto; 
    max-height: 50vh; 
    scrollbar-width: none;
}
.music-list-scroll::-webkit-scrollbar { display: none; }

.music-list-item {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 12px 5px; 
    border-bottom: 0.5px solid #f2f2f2;
    transition: background 0.2s;
}
.music-list-item:active { background-color: #f9f9f9; }

.list-info { 
    flex: 1; 
    cursor: pointer; 
    overflow: hidden;
    margin-right: 10px;
}

.list-song { 
    font-size: 15px; 
    color: #333; 
    font-weight: 500; 
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-artist { font-size: 12px; color: #999; margin-top: 3px; }

.list-delete { 
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc; 
    font-size: 20px; 
    cursor: pointer;
    border-radius: 50%;
}
.list-delete:active {
    background-color: #f0f0f0;
    color: #ff3b30;
}

/* å¾®ä¿¡åº•éƒ¨å¯¼èˆª */
#wechat-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: var(--z-sticky) !important;
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    box-sizing: border-box;
    padding-top: 8px;
    padding-bottom: max(15px, env(safe-area-inset-bottom)) !important;
    border-top: 0.5px solid rgba(0,0,0,0.05);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 10px;
    cursor: pointer;
    padding: 2px 0;
}

.nav-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 2px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-image: url('https://i.postimg.cc/xJH5zvCX/icon.png');
    filter: grayscale(100%) opacity(0.4);
}

.nav-item.active .nav-icon {
    filter: none;
    opacity: 1;
}
.nav-item.active { color: #333; }

/* éŸ³ä¹é¢æ¿å°èœå• */
.music-plus-dropdown {
    position: absolute;
    top: 50px;
    right: 0px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    width: 110px;
    display: none;
    flex-direction: column;
    z-index: var(--z-max);
    border: 1px solid #f0f0f0;
    animation: fadeIn 0.2s ease-out;
}

.music-plus-dropdown.active {
    display: flex;
}

.mp-item {
    padding: 12px 0;
    text-align: center;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    font-weight: 500;
}

.mp-item:active {
    background-color: #f9f9f9;
    border-radius: 12px;
}

.mp-line {
    height: 1px;
    background: #f5f5f5;
    width: 100%;
}

/* è¯­éŸ³è¾“å…¥ç‹¬ç«‹æ¶²æ€å¼¹çª— */
#voice-overlay {
    position: fixed;
    top: 0; 
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: var(--z-max);
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

#voice-overlay.show {
    display: flex;
}

#voice-overlay .glass-box {
    width: 75%;
    max-width: 320px;
    padding: 25px 20px;
    background: rgba(245, 245, 247, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.1),
        inset 0 1px 1px rgba(255,255,255,0.8);
    display: flex;
    flex-direction: column;
    gap: 15px;
    animation: voicePopupScale 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes voicePopupScale {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

#voice-overlay textarea {
    width: 100%;
    height: 120px;
    padding: 15px;
    border-radius: 15px;
    border: 1px solid rgba(0,0,0,0.05);
    background: rgba(255,255,255,0.6);
    font-size: 15px;
    color: #333;
    outline: none;
    resize: none;
    font-family: inherit;
    line-height: 1.5;
    box-sizing: border-box;
}

#voice-overlay textarea:focus {
    background: #fff;
    border-color: rgba(0,0,0,0.1);
}

#voice-overlay .btn-row {
    display: flex;
    gap: 12px;
    margin-top: 5px;
}

#voice-overlay .v-btn {
    flex: 1;
    padding: 14px 0;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-align: center;
    transition: opacity 0.2s;
}

#voice-overlay .v-btn:active { opacity: 0.7; }

#voice-overlay .btn-cancel {
    background: rgba(0,0,0,0.05);
    color: #666;
}

#voice-overlay .btn-send {
    background: #000;
    color: #fff;
}

/* API è¿›åº¦æ¡æ»‘å— */
#apiTemp {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: #f0f0f0;
    border-radius: 10px;
    outline: none;
    border: none !important;
    margin: 15px 0;
    accent-color: #FFFFFF !important; 
}

#apiTemp::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px; 
    height: 22px;
    background: #FFFFFF; 
    border-radius: 50%;
    cursor: pointer;
    box-shadow: none !important;
    position: relative;
    z-index: calc(var(--z-base) + 1);
}

#apiTemp::-moz-range-progress {
    background-color: #FFFFFF;
    height: 6px;
    border-radius: 10px;
}

#apiTemp::-moz-range-thumb {
    width: 22px;
    height: 22px;
    background: #FFFFFF;
    border-radius: 50%;
}

#apiModel {
    color: #AAAAAA !important; 
}

.sticker-grid {
    padding-bottom: 0 !important;
    max-height: 250px;
    overflow-y: auto;
}

/* --- å¼•ç”¨å›žå¤ç³»ç»Ÿ v3 (ä¿®å¤ç‰ˆ) --- */

/* 1. è¾“å…¥æ¡†ä¸Šæ–¹çš„é¢„è§ˆæ¡ (æ— å·¦ä¾§ç«–çº¿) */
.reply-bar-container {
    position: absolute;
    bottom: 100%;
    left: 0;
    width: 100%;
    background-color: #f2f2f2;
    padding: 8px 15px;
    display: none;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-radius: 18px 18px 0 0; 
    z-index: var(--z-content);
    box-sizing: border-box;
    box-shadow: 0 -1px 5px rgba(0,0,0,0.02);
    margin-bottom: -1px;
}
.reply-bar-container.show { display: flex; }

.reply-bar-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 5px;
    margin-right: 15px;
    overflow: hidden;
}

.reply-bar-title {
    font-size: 12px;
    font-weight: bold;
    color: #333;
    margin-bottom: 2px;
}

.reply-bar-text {
    font-size: 11px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 2. æ¶ˆæ¯åž‚ç›´å †å å®¹å™¨ (å…³é”®ä¿®å¤ï¼šç”¨æ¥åŒ…ä½ä¸»æ°”æ³¡å’Œå›žå¤æ°”æ³¡) */
.msg-stack {
    display: flex;
    flex-direction: column;
    max-width: 100%;
}

/* å·±æ–¹é å³ï¼Œå¯¹æ–¹é å·¦ */
.Miu-miu.user .msg-stack { align-items: flex-end; }
.Miu-miu.ai .msg-stack { align-items: flex-start; }

/* 3. ç‹¬ç«‹å›žå¤å°æ°”æ³¡æ ·å¼ (ç»Ÿä¸€ç°è‰²) */
.reply-tiny-bubble {
    font-size: 11px;
    color: #888;
    background-color: #f7f7f7; /* ç»Ÿä¸€ç”¨æµ…ç° */
    padding: 5px 10px;
    border-radius: 10px;
    margin-top: 4px; /* åœ¨ä¸»æ°”æ³¡ä¸‹æ–¹ç•™å‡ºé—´éš™ */
    max-width: 100%;
    width: fit-content;
    line-height: 1.3;
    cursor: pointer;
    position: relative;
    z-index: var(--z-base);
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

/* 4. ä¿®å¤ï¼šç¡®ä¿ bubble-wrapper æ¢å¤æ°´å¹³æŽ’åˆ— (è®©æ—¶é—´å›žåˆ°ä¾§è¾¹) */
.Miu-miu .bubble-wrapper {
    flex-direction: row !important; 
    align-items: flex-end !important; /* åº•éƒ¨å¯¹é½ï¼Œä¿è¯æ—¶é—´åœ¨æ°”æ³¡æ—è¾¹ */
}

/* 5. ç¡®ä¿ no-tail æ ·å¼ç”Ÿæ•ˆ */
.Miu-miu.user.no-tail .content::after { display: none !important; }
.Miu-miu.ai.no-tail .content::before { display: none !important; }

/* --- START: æ¶ˆæ¯ç¼–è¾‘é€šç”¨å¼¹çª— (æ–°å¢ž) --- */
#edit-msg-overlay {
    position: fixed;
    top: 0; 
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: var(--z-modal); /* ç¡®ä¿åœ¨èŠå¤©å®¤ä¹‹ä¸Š */
    display: none; /* é»˜è®¤éšè— */
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.2s ease;
}

#edit-msg-overlay.active {
    display: flex;
    opacity: 1;
}

/* å¼¹çª—ä¸»ä½“ - æ¶²æ€çŽ»ç’ƒé£Žæ ¼ */
.edit-glass-box {
    width: 78%;
    max-width: 320px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    box-shadow: 
        0 20px 50px rgba(0,0,0,0.15),
        inset 0 1px 2px rgba(255,255,255,0.9);
    display: flex;
    flex-direction: column;
    gap: 15px;
    transform: scale(0.95);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#edit-msg-overlay.active .edit-glass-box {
    transform: scale(1);
}

.edit-header-title {
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

/* åŠ¨æ€å†…å®¹å®¹å™¨ */
#edit-dynamic-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 1. çº¯æ–‡æœ¬ç¼–è¾‘æ¨¡å¼æ ·å¼ */
.edit-text-area {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.05);
    background: rgba(255,255,255,0.5);
    font-size: 15px;
    color: #333;
    outline: none;
    resize: none;
    font-family: inherit;
    line-height: 1.5;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.02);
}
.edit-text-area:focus {
    background: #fff;
    border-color: rgba(0,0,0,0.1);
}

/* 2. è¯­éŸ³ç¼–è¾‘æ¨¡å¼æ ·å¼ */
.edit-voice-row {
    display: flex;
    gap: 10px;
    align-items: center;
}
.edit-voice-label {
    font-size: 13px;
    color: #888;
    width: 40px;
}
.edit-voice-input {
    flex: 1;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.05);
    background: rgba(255,255,255,0.5);
    font-size: 14px;
    text-align: center;
    outline: none;
}

/* 3. å›¾ç‰‡/è¡¨æƒ…åŒ…é¢„è§ˆæ ·å¼ */
.edit-img-preview-box {
    width: 100%;
    height: 120px;
    border-radius: 16px;
    background: rgba(0,0,0,0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px dashed rgba(0,0,0,0.1);
    position: relative;
    cursor: pointer;
}
.edit-preview-img {
    height: 100%;
    width: auto;
    object-fit: contain;
}
.edit-img-hint {
    position: absolute;
    bottom: 5px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    backdrop-filter: blur(4px);
}

/* åº•éƒ¨æŒ‰é’®æ  */
.edit-btn-row {
    display: flex;
    gap: 12px;
    margin-top: 5px;
}

.edit-btn {
    flex: 1;
    padding: 12px 0;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-align: center;
    transition: opacity 0.2s, transform 0.1s;
}
.edit-btn:active { transform: scale(0.98); }

.edit-btn-cancel {
    background: rgba(0,0,0,0.05);
    color: #666;
}
.edit-btn-confirm {
    background: #000;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
/* --- END: æ¶ˆæ¯ç¼–è¾‘é€šç”¨å¼¹çª— --- */
/* --- START: å¤šé€‰åˆ é™¤æ¨¡å¼ (Batch Delete Mode) --- */

/* 1. é¡¶éƒ¨å¤šé€‰æ“ä½œæ  (è¦†ç›–åŽŸæ ‡é¢˜æ ) */
.multi-select-navbar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px; /* ä¸ŽåŽŸ header é«˜åº¦ä¸€è‡´ */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: var(--z-chatroom-header); /* ç¡®ä¿è¦†ç›–åœ¨èŠå¤©å®¤å¤´éƒ¨ä¹‹ä¸Š */
    display: none; /* é»˜è®¤éšè— */
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    padding-top: env(safe-area-inset-top, 0px); /* é€‚é…åˆ˜æµ·å± */
    box-shadow: 0 1px 0 rgba(0,0,0,0.05);
    animation: slideDownFade 0.2s ease-out;
}

/* æ¿€æ´»çŠ¶æ€ */
.chat-room.multi-select-mode .multi-select-navbar {
    display: flex;
}

/* éšè—åŽŸæœ‰çš„å¤´éƒ¨å’Œåº•éƒ¨è¾“å…¥æ¡† */
.chat-room.multi-select-mode .room-header,
.chat-room.multi-select-mode .room-footer {
    display: none !important;
}

/* é¡¶éƒ¨æŒ‰é’®æ ·å¼ */
.ms-nav-btn {
    font-size: 16px;
    cursor: pointer;
    padding: 10px 5px;
}

.ms-nav-cancel {
    color: #333;
    font-weight: 500;
}

.ms-nav-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.ms-nav-delete {
    color: #ff3b30; /* è­¦ç¤ºçº¢ */
    font-weight: 700;
}

.ms-nav-delete.disabled {
    color: #ccc;
    pointer-events: none;
}

/* 2. æ¶ˆæ¯æ°”æ³¡å¤é€‰æ¡†æ ·å¼ (ä¿®æ­£ç‰ˆï¼šæ›´å°ã€æ²‰åº•å¯¹é½) */
.msg-checkbox {
    width: 18px;  /* æ”¹å°å°ºå¯¸ */
    height: 18px; /* æ”¹å°å°ºå¯¸ */
    border-radius: 50%;
    border: 1.5px solid #C5C5C5; /* è¾¹æ¡†ç¨å¾®ç»†ä¸€ç‚¹ */
    background: transparent;
    display: none; 
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin: 0 8px; /* é—´è·ç¼©å°ï¼Œæ›´ç´§å‡‘ */
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* â˜…â˜…â˜… å…³é”®ï¼šè®©å‹¾é€‰æ¡†æ²‰åº•å¯¹é½ï¼Œä½äºŽæ°”æ³¡ä¸‹è§’ â˜…â˜…â˜… */
    align-self: flex-end; 
    margin-bottom: 5px; /* ç¨å¾®æŠ¬é«˜ä¸€ç‚¹ç‚¹ï¼Œå¯¹é½æ°”æ³¡åº•éƒ¨è§†è§‰ */
}

/* å¤šé€‰æ¨¡å¼ä¸‹æ˜¾ç¤º */
.chat-room.multi-select-mode .msg-checkbox {
    display: flex;
    animation: scaleIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* é€‰ä¸­çŠ¶æ€ */
.Miu-miu.ms-selected .msg-checkbox {
    background-color: #444444; /* ç°é»‘è‰² */
    border-color: #444444;
}

/* å‹¾å·å›¾æ ‡ (é…åˆ 18px çš„åœˆåœˆç¼©å°å°ºå¯¸) */
.msg-checkbox::after {
    content: '';
    width: 6px;       /* ç¼©å° */
    height: 3.5px;    /* ç¼©å° */
    border-left: 1.5px solid #fff;   /* å˜ç»† */
    border-bottom: 1.5px solid #fff; /* å˜ç»† */
    transform: rotate(-45deg) translate(0.5px, -1px); /* å¾®è°ƒä½ç½® */
    opacity: 0;
    transition: opacity 0.2s;
}

.Miu-miu.ms-selected .msg-checkbox::after {
    opacity: 1;
}

/* 3. å¸ƒå±€è°ƒæ•´ï¼šè®©å¤é€‰æ¡†å‡ºçŽ°åœ¨æ°”æ³¡å°¾éƒ¨ */
/* è¿™é‡Œçš„é€»è¾‘æ˜¯ï¼š
   AI (å·¦ä¾§æ¶ˆæ¯): å¤´åƒ -> æ°”æ³¡ -> å¤é€‰æ¡†
   User (å³ä¾§æ¶ˆæ¯): å¤é€‰æ¡† -> æ°”æ³¡ -> å¤´åƒ (å› ä¸ºæ˜¯flex-end, orderè¶Šå°è¶Šé å·¦)
*/

/* ç¡®ä¿æ¶ˆæ¯è¡Œå¯ä»¥å®¹çº³å¤é€‰æ¡† */
.chat-room.multi-select-mode .Miu-miu {
    cursor: pointer; /* æ•´ä¸ªåŒºåŸŸå¯ç‚¹ */
}

/* AI æ¶ˆæ¯ï¼šå¤é€‰æ¡†åœ¨æœ€å³ä¾§ (Order 3) */
.Miu-miu.ai .msg-checkbox {
    order: 3;
}

/* User æ¶ˆæ¯ï¼šå¤é€‰æ¡†åœ¨æœ€å·¦ä¾§ (Order 0) */
.Miu-miu.user .msg-checkbox {
    order: 0; 
}

/* ç®€å•çš„åŠ¨ç”»å®šä¹‰ */
@keyframes slideDownFade {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* --- END: å¤šé€‰åˆ é™¤æ¨¡å¼ --- */

/* --- æ’¤å›žæ¶ˆæ¯æ ·å¼ (æœ€ç»ˆåˆå¹¶ä¿®æ­£ç‰ˆ) --- */
.recall-notice-row {
    width: 100%;
    clear: both;
    margin: 10px 0;      /* ä¸Šä¸‹ç•™è· */
    text-align: center;  /* è®©å†…éƒ¨èƒ¶å›Šå±…ä¸­ */
    display: block;      /* å—çº§å®¹å™¨ */
}

.recall-pill {
    /* â˜…â˜…â˜… æ ¸å¿ƒä¿®å¤ï¼šå¿…é¡»æ˜¯ inline-blockï¼Œæ‰èƒ½æ˜¯å°èƒ¶å›Šå¤§å°ï¼Œä¸ä¼šé“ºæ»¡æ•´è¡Œ â˜…â˜…â˜… */
    display: inline-block !important; 
    
    /* é¢œè‰²è¿˜åŽŸï¼šç»å…¸æµ…ç°è‰² */
    background-color: #f7f7f7; 
    
    /* å½¢çŠ¶è¿˜åŽŸï¼šåœ†æ¶¦çš„èƒ¶å›Š */
    border-radius: 10px;   
    padding: 3px 12px;     
    
    /* æ–‡å­—æ ·å¼ */
    font-size: 11px;
    color: #888;
    
    /* æ¸…é™¤å¤šä½™ç‰¹æ•ˆï¼Œä¿æŒå¹²å‡€ */
    box-shadow: none;
    backdrop-filter: none;
    transform: none;
}

.recall-link {
    color: #576b95; /* å¾®ä¿¡è“ */
    font-weight: 600;
    cursor: pointer;
    margin-left: 4px; /* æ–‡å­—å’Œé“¾æŽ¥çš„é—´è· */
}

/* --- API é…ç½®ç®¡ç†ç¾ŽåŒ– (æ–°å¢ž) --- */

/* 1. é…ç½®ç®¡ç†çš„æ•´ä½“å®¹å™¨ */
.api-preset-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
    width: 100%;
}

/* 2. æ ‡é¢˜æ–‡å­— "é€‰æ‹©é…ç½®" - ä¿æŒä¸Žä¸Šæ–¹ç°è‰²å°å­—ä¸€è‡´ */
.api-preset-label {
    font-size: 13px;
    color: #666; /* ç°è‰² */
    font-weight: 500;
    margin-left: 5px;
}

/* 3. æ“ä½œè¡Œï¼šåŒ…å«é€‰æ‹©æ¡†å’Œåˆ é™¤æŒ‰é’® */
.api-preset-row {
    display: flex;
    align-items: center;
    gap: 10px; /* ä¸¤ä¸ªæŽ§ä»¶ä¹‹é—´çš„é—´è· */
    width: 100%;
}

/* 4. é€‰æ‹©æ¡† (æ¨¡æ‹Ÿ iOS æŒ‰é’®é£Žæ ¼) */
.api-preset-select {
    flex: 1; /* å æ»¡å‰©ä½™ç©ºé—´ */
    -webkit-appearance: none; /* åŽ»é™¤æµè§ˆå™¨é»˜è®¤ä¸‘é™‹çš„è¾¹æ¡† */
    appearance: none;
    
    background-color: #fff; /* ç™½è‰²èƒŒæ™¯ */
    border: 1px solid #ddd; /* ç»†å¾®çš„è¾¹æ¡† */
    border-radius: 12px; /* åœ†è§’ */
    
    padding: 12px 15px; /* å†…éƒ¨å¡«å…… */
    padding-right: 30px; /* ç»™å³è¾¹çš„ç®­å¤´ç•™ä½ç½® */
    
    font-size: 15px;
    color: #333;
    outline: none;
    font-family: inherit;
    
    /* è‡ªå®šä¹‰å³ä¾§çš„å°ç®­å¤´å›¾æ ‡ */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23CCCCCC' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    
    transition: border-color 0.2s, background-color 0.2s;
    cursor: pointer;
}

/* ç‚¹å‡»æ—¶çš„æ•ˆæžœ */
.api-preset-select:active, .api-preset-select:focus {
    border-color: #333;
    background-color: #f9f9f9;
}

/* å ä½ç¬¦é¢œè‰² (å¦‚æžœæ²¡æœ‰é€‰ä¸­å€¼) */
.api-preset-select:invalid {
    color: #aaa;
}

/* 5. åˆ é™¤æŒ‰é’® */
.api-preset-del-btn {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background-color: #FFF2F2; /* æµ…çº¢è‰²èƒŒæ™¯ */
    border: 1px solid #FFD6D6;
    
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    
    /* åžƒåœ¾æ¡¶å›¾æ ‡ (SVG) */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23FF3B30' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='3 6 5 6 21 6'%3e%3c/polyline%3e%3cpath d='M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'%3e%3c/path%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    
    transition: transform 0.1s, background-color 0.2s;
}

/* åˆ é™¤æŒ‰é’®ç‚¹å‡»åé¦ˆ */
.api-preset-del-btn:active {
    transform: scale(0.92);
    background-color: #FFE0E0;
}

/* --- icity é£Žæ ¼æ—¥è®°é¡µé¢æ ·å¼ --- */

 #view-diary {
    padding: 0 !important;
    background-color: #F2F3F5;
    
    /* --- ä¿®æ”¹å¼€å§‹ï¼šæ”¹ä¸ºç»å¯¹å®šä½å…¨å±è¦†ç›– --- */
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* æ ¸å¿ƒï¼šæé«˜å±‚çº§ï¼Œè¦†ç›–åº•éƒ¨çš„ Dock æ  (Dockå±‚çº§é€šå¸¸ä¸º100) */
    z-index: var(--z-page-secondary); 
    /* --- ä¿®æ”¹ç»“æŸ --- */

    overflow: hidden;
    
    /* ç¡®ä¿å¦‚æžœæœ‰ tab-view ç±»ä¹Ÿä¸ä¼šè¢« padding æŒ¤åŽ‹ */
    box-sizing: border-box; 
}

/* 1. é€šç”¨å±‚æ ·å¼ï¼šé»˜è®¤å…¨éƒ¨è—åˆ°å³è¾¹åŽ»ï¼Œé˜²æ­¢é®æŒ¡ */
.diary-layer {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: #F2F3F5;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    
    /* â˜…â˜…â˜… å…³é”®ä¿®å¤ï¼šé»˜è®¤è®©æ‰€æœ‰å±‚éƒ½èº²åˆ°å±å¹•å³ä¾§ï¼Œä¸é®æŒ¡è§†çº¿ â˜…â˜…â˜… */
    transform: translateX(100%); 
    
    z-index: var(--z-content); 
}

/* 2. é€‰äººå±‚ç‰¹ä¾‹ï¼šå¿…é¡»æ°¸è¿œåœç•™åœ¨å±å¹•ä¸­é—´ï¼Œä½œä¸ºâ€œåº•åº§â€ */
#diary-selection-layer {
    background-color: #ffffff; 
    z-index: var(--z-base); /* å±‚çº§æœ€ä½Ž */
    
    /* â˜…â˜…â˜… å…³é”®ä¿®å¤ï¼šå¼ºåˆ¶è®©é€‰äººå±‚å§‹ç»ˆå¯è§ â˜…â˜…â˜… */
    transform: translateX(0) !important; 
}

/* 3. æ¿€æ´»çŠ¶æ€ï¼šå½“é€šè¿‡JSåŠ ä¸Šactiveç±»æ—¶ï¼Œæ»‘å…¥å±å¹•ä¸­é—´ */
.diary-layer.active {
    transform: translateX(0); /* æ»‘è¿›æ¥ */
    z-index: var(--z-card);   /* å±‚çº§å˜é«˜ï¼Œç›–åœ¨é€‰äººå±‚ä¸Šé¢ */
}


.diary-page-header {
    /* ä¿æŒä¸Šä¸€æ­¥ä¿®æ”¹çš„ padding (ç´§è´´çµåŠ¨å²›) */
    padding: calc(5px + var(--safe-top)) 20px 10px 20px; 
    
    background: #ffffff; 
    
    /* â˜…â˜…â˜… ä¿®æ”¹å¸ƒå±€æ–¹å¼ â˜…â˜…â˜… */
    display: flex;
    justify-content: space-between; /* ä¸¤ç«¯å¯¹é½ï¼šç®­å¤´åœ¨å·¦ï¼Œå›¾æ ‡åœ¨å³ */
    align-items: center;
    
    position: relative; /* å…³é”®ï¼šä¸ºæ ‡é¢˜çš„ç»å¯¹å®šä½æä¾›åŸºå‡† */
    z-index: var(--z-sticky); 
    border-bottom: none;
}

.diary-app-name {
    font-size: 20px;
    font-weight: 800;
    color: #333;
    letter-spacing: 0.5px;
    
    /* â˜…â˜…â˜… æ ¸å¿ƒä¿®æ”¹ï¼šç»å¯¹å±…ä¸­ â˜…â˜…â˜… */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    
    /* é˜²æ­¢æ–‡å­—æ¢è¡Œæˆ–å¤ªé•¿ */
    white-space: nowrap;
    text-align: center;
}

.diary-header-icons {
    display: flex;
    gap: 18px;
    color: #888;
    font-size: 18px;
    z-index: var(--z-content);
}

.diary-grid-title {
    padding: 20px 20px 10px 20px;
    font-size: 13px;
    color: #999;
    font-weight: 500;
}

.diary-home-back-btn {
    font-size: 24px;   /* å¤§å° */
    color: #333;       /* é¢œè‰² */
    cursor: pointer;
    padding: 5px 10px 5px 0; /* å¢žåŠ ä¸€ç‚¹ç‚¹å‡»åŒºåŸŸ */
    margin-left: -5px; /* å¾®è°ƒä½ç½®ï¼Œå¯¹é½è¾¹ç¼˜ */
    display: flex;
    align-items: center;
}

.diary-selection-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    padding: 0 15px;
    overflow-y: auto;
}

.diary-selector-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.diary-sel-avatar {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    background: #fff;
    border: 2px solid #fff;
}

.diary-sel-name {
    font-size: 12px;
    color: #333;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.diary-navbar-sticky {
    /* åŽŸæ¥æ˜¯: calc(35px + var(--safe-top)) ... */
    /* ä¿®æ”¹ä¸º: 5px */
    padding: calc(5px + var(--safe-top)) 15px 15px 15px;
    
    background: #F2F3F5; 
    backdrop-filter: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    border-bottom: none;
    font-size: 17px;
    font-weight: 600;
    z-index: var(--z-sticky);
}

.diary-scroll-container {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    padding-bottom: 80px; 
    -webkit-overflow-scrolling: touch;
}

/* æ ¸å¿ƒå¡ç‰‡å®¹å™¨ */
.icity-card {
    background: transparent;
    border-radius: 8px;
    padding: 0;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    position: relative;
    overflow: hidden;
    border: none;
    z-index: var(--z-base);
}

.icity-header {
    background-color: #F7F8FA;
    padding: 8px 20px;
    margin-bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px dashed #e0e0e0;
}

.icity-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icity-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #f5f5f5;
}

.icity-meta-col {
    display: flex;
    flex-direction: column;
}

.icity-name {
    font-size: 14px;
    font-weight: 700;
    color: #333;
}

.icity-handle {
    font-size: 11px;
    color: #999;
    font-weight: 400;
}

.icity-date {
    font-size: 11px;
    color: #aaa;
    letter-spacing: 0.5px;
}

.icity-content {
    background-color: #ffffff;
    font-size: 15px;
    line-height: 1.6;
    color: #222;
    text-align: justify;
    word-break: break-all;
    white-space: pre-wrap;
    padding: 20px 20px 10px 20px;
    margin-bottom: 0;
}

.icity-footer {
    background-color: #ffffff;
    display: flex;
    justify-content: flex-end;
    gap: 20px;
    padding: 5px 20px 15px 20px;
    border-top: none;
}

.icity-action {
    color: #ccc;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}
.icity-action:hover { color: #ff8e9e; }
.icity-action span { font-size: 11px; }

/* åˆ æ—¥è®°æŒ‰é’® */
.diary-del-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    color: #eee;
    font-size: 12px;
    padding: 5px;
    z-index: var(--z-content); 
}

/* --- START: ç…§ç‰‡åŠŸèƒ½æ ·å¼ (Photo Function) - ä¿®å¤ç‰ˆ --- */

/* 1. ç…§ç‰‡è¾“å…¥å¼¹çª— (ä¿æŒä¸å˜) */
#photo-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: var(--z-max);
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.2s ease;
}

#photo-overlay.show {
    display: flex;
    opacity: 1;
}

#photo-overlay .glass-box {
    width: 78%;
    max-width: 320px;
    padding: 20px;
    background: rgba(245, 245, 247, 0.85);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    box-shadow: 
        0 20px 50px rgba(0,0,0,0.15),
        inset 0 1px 2px rgba(255,255,255,0.9);
    display: flex;
    flex-direction: column;
    gap: 15px;
    transform: scale(0.95);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#photo-overlay.show .glass-box {
    transform: scale(1);
}

.photo-modal-title {
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

#photo-desc-input {
    width: 100%;
    height: 100px;
    padding: 15px;
    border-radius: 15px;
    border: 1px solid rgba(0,0,0,0.05);
    background: rgba(255,255,255,0.6);
    font-size: 15px;
    color: #333;
    outline: none;
    resize: none;
    font-family: inherit;
    line-height: 1.5;
    box-sizing: border-box;
}

#photo-desc-input:focus {
    background: #fff;
    border-color: rgba(0,0,0,0.1);
}

#photo-overlay .btn-row {
    display: flex;
    gap: 12px;
    margin-top: 5px;
}

#photo-overlay .p-btn {
    flex: 1;
    padding: 12px 0;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-align: center;
    transition: opacity 0.2s;
}

#photo-overlay .p-btn:active { opacity: 0.7; }

#photo-overlay .btn-cancel {
    background: rgba(0,0,0,0.05);
    color: #666;
}

#photo-overlay .btn-send {
    background: #000;
    color: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

/* --- ä¿®å¤ç‰ˆï¼šç…§ç‰‡æ°”æ³¡æ ·å¼ (å®Œç¾ŽåŽ»é™¤æ‰€æœ‰è¾¹è·) --- */

/* 1. é’ˆå¯¹æ‰€æœ‰ç…§ç‰‡æ°”æ³¡çš„åŸºç¡€é‡ç½® */
.Miu-miu .content.photo-only {
    padding: 0 !important;             /* æ ¸å¿ƒï¼šåŽ»é™¤å†…è¾¹è· */
    margin: 0 !important;
    background: transparent !important; /* åŽ»é™¤èƒŒæ™¯è‰² */
    background-color: transparent !important;
    box-shadow: none !important;        /* åŽ»é™¤é˜´å½± */
    border: none !important;            /* åŽ»é™¤è¾¹æ¡† */
    border-radius: 0 !important;        /* åŽ»é™¤åœ†è§’ */
    overflow: visible !important;
    min-width: 0 !important;
    width: auto !important;
    display: block !important;          /* å—çº§æ˜¾ç¤ºï¼Œæ¶ˆé™¤è¡Œå†…é—´éš™ */
}

/* 2. â˜…â˜…â˜… ç‰¹åˆ«åŠ å¼ºï¼šé’ˆå¯¹ AI å’Œ User çš„åˆ†åˆ«å¼ºåˆ¶é‡ç½® â˜…â˜…â˜… */
.Miu-miu.ai .content.photo-only,
.Miu-miu.user .content.photo-only {
    padding: 0 !important;
    background: transparent !important;
}

/* 3. åŽ»é™¤å°å°¾å·´ (æ°”æ³¡å°–è§’) */
.Miu-miu.user .content.photo-only::after,
.Miu-miu.ai .content.photo-only::before {
    display: none !important;
    content: none !important;
    border: none !important;
}

/* 4. å›¾ç‰‡æœ¬ä½“æ ·å¼ */
.photo-msg-img {
    width: 110px;        /* å›¾ç‰‡å¤§å° */
    height: 110px;
    object-fit: cover;
    border-radius: 0;    /* â˜…â˜…â˜… æŒ‰ç…§ä½ çš„è¦æ±‚ï¼šä¸åšåœ†è§’ï¼ˆç›´è§’ï¼‰ â˜…â˜…â˜… */
    display: block;      /* æ¶ˆé™¤å›¾ç‰‡åº•éƒ¨çš„å¾®å°ç¼éš™ */
    margin: 0;           /* ç¡®ä¿æ— å¤–è¾¹è· */
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
/* 3. æŸ¥çœ‹æè¿°å¼¹çª— (ä¿æŒä¸å˜) */
#photo-desc-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: var(--z-toast); 
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.2s;
}

#photo-desc-overlay.show {
    display: flex;
    opacity: 1;
}

.photo-desc-box {
    width: 70%;
    max-width: 280px;
    background: #fff;
    border-radius: 18px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: popIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.photo-desc-text {
    font-size: 15px;
    color: #333;
    line-height: 1.5;
    word-break: break-all;
    text-align: left;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-desc-close {
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
    color: #007aff;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
}

@keyframes popIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
/* --- END: ç…§ç‰‡åŠŸèƒ½æ ·å¼ --- */
/* --- START: ç›¸å†Œ (Album) åŠŸèƒ½å®Œæ•´æ ·å¼ --- */

/* 1. éšè—ç³»ç»ŸåŽŸç”Ÿçš„æ–‡ä»¶é€‰æ‹©æŽ§ä»¶ */
#native-file-input {
    display: none !important;
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    z-index: var(--z-negative);
    pointer-events: none;
}

/* 2. ç›¸å†Œå›¾æ ‡æ ·å¼ (æ‚¨å‘çš„è¿™æ®µ) */
.icon-album-bg {
    width: 100%;
    height: 100%;
    /* ç»å…¸çš„ç›¸å†Œå›¾æ ‡ï¼šæ–¹æ¡†ã€å±±å³°ã€å¤ªé˜³ */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3crect x='3' y='3' width='18' height='18' rx='4' stroke='%23666666' stroke-width='2'/%3e%3ccircle cx='8.5' cy='8.5' r='1.5' stroke='%23666666' stroke-width='2'/%3e%3cpath d='M21 15l-5-5L5 21' stroke='%23666666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 24px; 
    opacity: 0.8;          
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 3. ç‚¹å‡»æ—¶çš„å›¾æ ‡åé¦ˆåŠ¨ç”» */
.tool-icon-box:active .icon-album-bg {
    transform: scale(0.9); 
    opacity: 1;            
}

/* 1. å›¾ç‰‡æœ¬ä½“æ ·å¼ */
.album-msg-img {
    width: auto !important;
    height: auto !important;
    /* â˜… è¿˜åŽŸå°å°ºå¯¸ */
    max-width: 125px !important;  
    max-height: 180px !important; 
    object-fit: contain !important;
    
    /* â˜… ç›´è§’ + æ— é˜´å½± */
    border-radius: 0 !important; 
    box-shadow: none !important;
    
    display: block;
    cursor: pointer;
    margin: 0;
}

/* 2. æ ¸å¿ƒä¿®å¤ï¼šå¼ºåˆ¶åŽ»é™¤æ°”æ³¡å®¹å™¨çš„æ‰€æœ‰èƒŒæ™¯ã€è¾¹æ¡†å’Œé˜´å½± */
.Miu-miu .content.album-only,
.Miu-miu.ai .content.album-only,
.Miu-miu.user .content.album-only {
    padding: 0 !important;              /* åŽ»å†…è¾¹è· */
    background: transparent !important; /* åŽ»èƒŒæ™¯è‰² */
    background-color: transparent !important;
    box-shadow: none !important;        /* åŽ»æ°”æ³¡é˜´å½± */
    border: none !important;            /* åŽ»è¾¹æ¡† */
    width: auto !important;
    max-width: none !important;
    display: block !important;
}

/* 3. å½»åº•éšè—å°å°¾å·´ */
.Miu-miu.user .content.album-only::after,
.Miu-miu.ai .content.album-only::before {
    display: none !important;
    content: none !important;
    border: none !important;
    background: transparent !important;
}

/* --- START OF MOMENT APP STYLES --- */

/* 1. Moment é¡µé¢å®¹å™¨ - å…¨å±è¦†ç›– */
#view-moment {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-page-secondary); /* ä¸Žæ—¥è®°é¡µåŒçº§ */
    background-color: #000; /* é»˜è®¤åº•è‰²ï¼Œé˜²é€ */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transform: translateX(100%); /* é»˜è®¤éšè—åœ¨å³ä¾§ */
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#view-moment.active {
    transform: translateX(0);
}

/* 2. åŠ¨æ€èƒŒæ™¯å±‚ - è¿™é‡Œçš„å›¾ç‰‡å¯ä»¥é€šè¿‡JSæ›´æ”¹ */
.moment-bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://i.postimg.cc/8z6M7W7M/moment-bg.jpg'); /* é»˜è®¤èƒŒæ™¯å›¾ï¼Œå¯JSæ›¿æ¢ */
    background-size: cover;
    background-position: center;
    z-index: var(--z-background);
    filter: brightness(0.9); /* ç¨å¾®åŽ‹æš—ä¸€ç‚¹èƒŒæ™¯ï¼Œçªå‡ºå‰æ™¯ */
}

/* 3. æ ¸å¿ƒæ‚¬æµ®çŽ»ç’ƒå¡ç‰‡ */
.moment-glass-card {
    position: relative;
    width: 94%;
    height: 92%; /* ä¸Šä¸‹ç•™å‡ºç©ºéš™ */
    margin-top: calc(10px + var(--safe-top)); /* é¿å¼€çµåŠ¨å²›/åˆ˜æµ· */
    margin-bottom: calc(10px + var(--safe-bottom));
    
    background: rgba(255, 255, 255, 0.65); /* åŠé€æ˜Žç™½åº• */
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    
    display: flex;
    flex-direction: column;
    overflow: hidden; /* è£å‰ªå†…éƒ¨å†…å®¹ */
    z-index: var(--z-base);
}

/* 4. é¡¶éƒ¨ Banner åŒºåŸŸ */
.moment-header-banner {
    width: 100%;
    height: 180px;
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
}

.moment-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.95);
    cursor: pointer; /* ç‚¹å‡»å¯æ›´æ¢ */
}

/* 5. ä¸ªäººä¿¡æ¯åŒºåŸŸ (å¤´åƒã€åå­—ã€å…³æ³¨æŒ‰é’®) */
.moment-profile-section {
    position: relative;
    padding: 0 20px;
    padding-top: 50px; /* ä¸ºå¤´åƒç•™å‡ºç©ºé—´ */
    padding-bottom: 15px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(to bottom, rgba(255,255,255,0.4), transparent);
}

/* æ‚¬æµ®å¤´åƒ - æ ¸å¿ƒè§†è§‰ç‚¹ */
.moment-avatar-container {
    position: absolute;
    top: -45px; /* ä¸€åŠåœ¨bannerä¸Šï¼Œä¸€åŠåœ¨ä¸‹é¢ */
    left: 20px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    padding: 4px;
    background: rgba(255, 255, 255, 0.3); /* å¤´åƒå¤–å…‰çŽ¯ */
    backdrop-filter: blur(10px);
    z-index: calc(var(--z-base) + 1);
    cursor: pointer;
}

.moment-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* åå­—å’Œå…³æ³¨æŒ‰é’®è¡Œ */
.moment-name-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.moment-handle {
    font-size: 13px;       /* æ¯”åå­—ç¨å° */
    color: #8899a6;        /* ç»å…¸çš„æŽ¨ç‰¹ç°ï¼Œæˆ–è€…ç”¨ #999 */
    font-weight: normal;   /* å³ä½¿åå­—æ˜¯ç²—ä½“ï¼Œè¿™ä¸ªä¹Ÿä¿æŒæ­£å¸¸ç²—ç»† */
    margin-left: 6px;      /* ä¸Žåå­—ä¿æŒè·ç¦» */
    vertical-align: baseline;
}

.moment-user-name {
    font-size: 20px;
    font-weight: 800;
    color: #333;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 1px rgba(255,255,255,0.5);
}

.moment-follow-btn {
    padding: 6px 20px;          /* å¢žåŠ å·¦å³å†…è¾¹è·ï¼Œä½¿å…¶æ›´é•¿ */
    background: #ffffff;        /* çº¯ç™½èƒŒæ™¯ */
    border-radius: 50px;        /* å®Œå…¨åœ†è§’ */
    font-size: 14px;            /* å­—ä½“å¤§å° */
    font-weight: 500;           /* å­—ä½“ä¸è¦å¤ªç²— */
    color: #333;                /* æ·±è‰²æ–‡å­— */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* æžæ·¡çš„æŠ•å½± */
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;                   /* å›¾æ ‡å’Œæ–‡å­—çš„é—´è· */
    transition: transform 0.1s;
    border: 1px solid rgba(0,0,0,0.05); /* å¯é€‰ï¼šæžç»†çš„è¾¹æ¡†å¢žåŠ è´¨æ„Ÿ */
}

.moment-follow-btn:active {
    transform: scale(0.95);
    background: #f5f5f5;
}

/* ç”¨æˆ· Handle (@xxxx) */
.moment-handle {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
    font-weight: 600;
}

/* ç®€ä»‹æ–‡å­— */
.moment-bio-text {
    margin-top: 15px !important;
    margin-bottom: 15px;
    font-size: 13px;
    color: #444;
    line-height: 1.5;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 6. å¯¼èˆª Tab æ  */
.moment-tab-bar {
    display: flex;
    border-top: 1px solid rgba(255,255,255,0.3);
    border-bottom: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.2);
    padding: 5px 10px;
    flex-shrink: 0;
}

.moment-tab-item {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    font-size: 14px;
    color: #777;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.moment-tab-item.active {
    color: #333;
    font-weight: 700;
}

/* é€‰ä¸­çŠ¶æ€çš„å°æ¨ªæ¡ */
.moment-tab-item.active::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: #333;
    border-radius: 2px;
}

/* 7. æ»šåŠ¨å†…å®¹åŒºåŸŸ (Feedæµ) */
.moment-scroll-area {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 20px;
    background: rgba(255, 255, 255, 0.3); /* å†…å®¹åŒºç¨å¾®äº®ä¸€ç‚¹ */
}

/* å•æ¡åŠ¨æ€å¡ç‰‡ */
.moment-post-card {
    padding: 20px;
    border-bottom: 1px solid rgba(0,0,0,0.03);
    display: flex;
    gap: 12px;
    transition: background 0.2s;
}
.moment-post-card:active { background: rgba(255,255,255,0.4); }

.mp-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.mp-content-col {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.mp-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
}

/* [æ–°å¢ž] åå­—ç»„å®¹å™¨ï¼šåŒ…è£¹åå­—å’ŒHandleï¼Œè®©å®ƒä»¬åœ¨å·¦ä¾§æ¨ªå‘æŽ’åˆ— */
.mp-name-group {
    display: flex;
    align-items: baseline; /* åº•éƒ¨å¯¹é½ï¼Œè®©å°å­—å¯¹é½å¤§å­—åº•éƒ¨ */
    gap: 10px;              /* åå­—å’Œ@ä¹‹é—´çš„è·ç¦» */
    overflow: hidden;
    max-width: 80%;        /* é˜²æ­¢è¿‡é•¿æŒ¤åˆ°æ—¶é—´ */
}

/* [æ–°å¢ž] Handle (@xxx) çš„æ ·å¼ */
.mp-post-handle {
    font-size: 12px;       /* æ¯”åå­—å° */
    color: #999;           /* ç°è‰²ï¼Œä¸Žé»‘è‰²åå­—åŒºåˆ† */
    font-weight: 400;      /* å­—é‡æ­£å¸¸ï¼Œä¸è¦å¤ªç²— */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mp-name { font-size: 15px; font-weight: 700; color: #222; }
.mp-time { font-size: 11px; color: #999; }

.mp-text {
    font-size: 15px;
    color: #333;
    line-height: 1.5;
    margin-bottom: 10px;
    white-space: pre-wrap;
}

/* åŠ¨æ€å›¾ç‰‡ç½‘æ ¼ */
.mp-img-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.mp-img-item {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.05);
}
.mp-img-item.single {
    width: 180px;
    height: auto;
    max-height: 240px;
}

/* åº•éƒ¨æ“ä½œæ  (ç‚¹èµž/è¯„è®º) */
.mp-actions {
    display: flex;
    gap: 20px;
    margin-top: 5px;
}

.mp-action-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #888;
    font-size: 12px;
    cursor: pointer;
}
.mp-action-btn i { font-size: 16px; }
.mp-action-btn:active { color: #ff8e9e; }
.mp-action-btn.liked { color: #ff3b30; }

/* 8. å‘å¸ƒåŠ¨æ€/è¯´è¯´ å¼¹çª—æ ·å¼ */
/* å¤ç”¨å¹¶æ”¹é€  glass-popup-box æ ·å¼ */
.moment-publish-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: var(--z-modal);
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.moment-publish-modal.show {
    display: flex;
    opacity: 1;
}

.moment-publish-box {
    width: 85%;
    max-width: 340px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(25px);
    border-radius: 24px;
    padding: 25px 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    gap: 15px;
    transform: scale(0.9);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.moment-publish-modal.show .moment-publish-box {
    transform: scale(1);
}

.mp-modal-title {
    text-align: center;
    font-size: 17px;
    font-weight: 700;
    color: #333;
}

.mp-input-area {
    width: 100%;
    height: 120px;
    padding: 15px;
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 16px;
    background: #f7f7f7;
    font-size: 15px;
    color: #333;
    outline: none;
    resize: none;
    font-family: inherit;
}

.mp-image-selector {
    width: 100%;
    height: 50px;
    border: 1px dashed #ccc;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 13px;
    cursor: pointer;
    gap: 8px;
}
.mp-image-selector:active { background: #f0f0f0; }

.mp-btn-row {
    display: flex;
    gap: 12px;
    margin-top: 5px;
}

.mp-btn {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}
.mp-btn-cancel { background: #f2f2f2; color: #666; }
.mp-btn-pub { background: #000; color: #fff; }

/* å›žåˆ°ä¸»é¡µçš„å…³é—­æŒ‰é’® (Momentå·¦ä¸Šè§’) */
.moment-close-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: var(--z-content);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.moment-close-btn i { font-size: 18px; color: #333; }

/* å³ä¸Šè§’å‘å¸ƒæŒ‰é’® (FAB) */
.moment-fab-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    background: rgba(0,0,0,0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: var(--z-content);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.moment-fab-btn i { font-size: 16px; color: #fff; }

/* --- æœ‹å‹åœˆè¯„è®ºæ ·å¼ä¿®æ­£ (é»‘è‰²äººå + æ˜¾çœ¼è¾“å…¥æ¡†) --- */

/* 1. äººåé¢œè‰²æ”¹ä¸ºé»‘è‰² */
.mp-cmt-name {
    color: #333 !important; /* å¼ºåˆ¶é»‘è‰²ï¼Œä¸å†ç”¨æ·±è“ */
    font-weight: 400;       /* ç¨å¾®åŠ ç²—ä¸€ç‚¹ç‚¹åŒºåˆ† */
    cursor: pointer;
}

/* 2. å†…å®¹é¢œè‰² */
.mp-cmt-content {
    color: #333;
}

/* 3. è¯„è®ºåŒºå®¹å™¨ */
.mp-comments-box {
    background-color: #F7F7F7;
    border-radius: 6px;
    padding: 8px 10px;
    margin-top: 10px;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* 4. è¾“å…¥æ¡†æ ·å¼ (å¤åˆ»å›¾2æ•ˆæžœ) */
.inline-input-row {
    margin-top: 5px;
    padding-top: 5px;
}

.inline-moment-input {
    width: 100%;
    height: 36px;
    background: #fff;       /* çº¯ç™½èƒŒæ™¯ */
    border: 1px solid #ddd; /* æµ…ç°è¾¹æ¡† */
    border-radius: 4px;     /* å°åœ†è§’ */
    padding: 0 8px;
    font-size: 14px;
    color: #333;
    outline: none;
    caret-color: #07c160;   /* å¾®ä¿¡ç»¿å…‰æ ‡ */
    font-family: inherit;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02); /* å¾®å¼±æŠ•å½±å¢žåŠ ç«‹ä½“æ„Ÿ */
}

.inline-moment-input::placeholder {
    color: #aaa;
    font-size: 13px;
}

.font-slider-wrapper {
    width: 100%;
    padding: 15px 5px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.font-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5px;
}

.font-slider-label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.font-slider-value {
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

/* æ»‘åŠ¨æ¡è½¨é“æ ·å¼ */
#fontSizeSlider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: #e0e0e0; /*ç¨å¾®æ·±ä¸€ç‚¹çš„ç°è‰²ï¼Œå¢žåŠ å¯¹æ¯”åº¦*/
    border-radius: 10px;
    outline: none;
    border: none !important;
    margin: 10px 0;
    cursor: pointer;
}

/* æ»‘å—åœ†é’®æ ·å¼ (Webkit / iOS / Chrome) */
#fontSizeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px; 
    height: 24px;
    background: #FFFFFF; 
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    z-index: calc(var(--z-base) + 1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05); 
    transition: transform 0.1s ease;
}

/* æŒ‰ä¸‹æ—¶çš„å¾®åŠ¨æ•ˆ */
#fontSizeSlider::-webkit-slider-thumb:active {
    transform: scale(1.1);
}

/* å…¼å®¹ Firefox çš„æ ·å¼ (ä»¥é˜²ä¸‡ä¸€) */
#fontSizeSlider::-moz-range-progress {
    background-color: #999; /* è¿›åº¦æ¡é¢œè‰² */
    height: 6px;
    border-radius: 10px;
}

#fontSizeSlider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: #FFFFFF;
    border: none;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* --- å¿ƒå£° (Heart Voice) åŠŸèƒ½æ ·å¼ --- */

/* 1. éšå½¢æŒ‰é’® (ä½äºŽå³ä¸Šè§’è®¾ç½®æŒ‰é’®å·¦ä¾§) */
.invisible-heart-btn {
    position: absolute;
    right: 50px; /* ä½äºŽèœå•æŒ‰é’®å·¦ä¾§ */
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    z-index: var(--z-card);
    cursor: pointer;
    background-color: transparent; 
}

/* 2. å¼¹çª—é®ç½© */
#heart-voice-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    z-index: var(--z-modal);
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#heart-voice-overlay.show {
    display: flex;
    opacity: 1;
}

/* 1. å¿ƒå£°å¡ç‰‡æœ¬ä½“ */
.heart-card-box {
    width: 82vw;
    max-width: 380px;
    min-height: 500px;
    height: auto;
    
    background-color: #ffffff;
    border-radius: 0px !important;
    box-shadow: none;
    
    position: relative;
    /* é¡¶éƒ¨å†…è¾¹è·å‡å°ï¼Œè®©æ•´ä½“å†…å®¹å¾€ä¸Šæ */
    padding: 25px 30px 40px 30px; 
    
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #333;
    
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: visible; 
}

/* 2. å¤´åƒ (ç¨å¾®æ”¾å¤§) */
.hv-avatar {
    width: 72px;        /* ä»Ž 65px æ”¹ä¸º 72px */
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: none !important;
    box-shadow: none !important;
    margin-top: 0;       
    margin-bottom: 10px; /* é—´è·ç¼©å° */
    z-index: calc(var(--z-base) + 1);
    filter: grayscale(30%); 
}

/* 3. å…³æ³¨æŒ‰é’® (å°ºå¯¸ä¸å˜ï¼Œå¤§å¹…å‡å°‘ä¸‹æ–¹é—´è·) */
.hv-follow-btn {
    background-color: #000;
    color: #fff;
    font-size: 11px;
    width: 80px;
    padding: 4px 0;
    border-radius: 50px;
    
    margin-bottom: 15px; /* â˜… å¤§å¹…å‡å° (åŽŸ30px)ï¼ŒæŠŠä¸‹é¢å†…å®¹æä¸Šæ¥ */
    
    cursor: pointer;
    box-shadow: none;
    text-align: center;
    letter-spacing: 1px;
    font-weight: 400;
}

/* 4. åˆ†åŒºæ ‡é¢˜ <å…³äºŽæˆ‘> */
.hv-section-title {
    font-size: 10px;
    color: #b0b0b0;
    font-weight: 400;
    margin: 0 0 8px 0;   /* é—´è·ç¼©å° */
    letter-spacing: 1px;
}

/* 5. åå­— */
.hv-line-hi {
    font-size: 15px;
    font-weight: 500;
    color: #555555;
    margin-bottom: 4px;  /* é—´è·ç¼©å° */
    letter-spacing: 0.5px;
}

/* 6. æ ‡ç­¾ (ISTP) */
.hv-tags {
    font-size: 11px;
    color: #999999;
    margin-bottom: 10px; /* é—´è·ç¼©å° */
    font-weight: 400;
}

/* 7. çŸ­å¥ (ã€Œ...ã€) */
.hv-short-quote {
    font-size: 12px;
    color: #666666;
    font-weight: 500;
    margin-bottom: 15px; 
    text-align: center;
    width: 100%;
    letter-spacing: 0.5px;
}

/* 8. é•¿æ–‡æœ¬æ®µè½ (å…¶å®žçœ¼ç›...) */
.hv-long-text {
    font-size: 12px;
    color: #7a7a7a;
    
    /* â˜… è¡Œè·æ”¶ç´§ï¼Œä¸å†é‚£ä¹ˆæ•£ */
    line-height: 1.75;      /* åŽŸæ¥æ˜¯ 2.2ï¼Œæ”¹å°ä¸€ç‚¹ */
    
    text-align: justify;
    text-align-last: center;
    
    margin-bottom: 20px;   /* ä¸‹æ–¹ç•™ç™½ä¹Ÿå‡å°ï¼Œç»™åº•éƒ¨æ–‡æ¡ˆè…¾åœ°æ–¹ */
    width: 100%;
    word-break: break-all;
    font-weight: 400;
}

/* 9. åº•éƒ¨ç¢Žç¢Žå¿µ/æ–‡æ¡ˆ (ç•™å‡ºæ›´å¤šç©ºé—´å†™è¿™ä¸ª) */
.hv-tiny-mutter {
    font-size: 11px;
    color: #999;
    margin-bottom: 5px;
    margin-top: auto;      /* è‡ªåŠ¨æŠŠè¿™ä¸ªå…ƒç´ æŽ¨åˆ°åº•éƒ¨ */
    letter-spacing: 2px;
    white-space: pre-wrap; /* å…è®¸æ¢è¡Œ */
    text-align: center;
}

/* 10. åº•éƒ¨ç­¾å */
.hv-footer-sign {
    font-size: 13px;
    color: #ccc;
    font-weight: 400;
}

/* å¿ƒå£°å¡ç‰‡åº•éƒ¨çš„é¢å¤–æ–‡æ¡ˆæ ·å¼ */
.hv-long-text.bottom-style {
    margin-top: 15px;       /* ä¸Žä¸Šé¢ç­¾åæ‹‰å¼€è·ç¦» */
    padding-top: 15px;      /* å†…éƒ¨ç•™ç™½ */
    border-top: 1px dashed #eee; /* å¯é€‰ï¼šåŠ ä¸€æ¡è™šçº¿åˆ†å‰²ï¼Œåƒç¥¨æ®ä¸€æ · */
    font-size: 12px;        /* å­—å·ç¨å° */
    color: #999;            /* é¢œè‰²æ›´æµ… */
    line-height: 1.6;
}

/* ========================================= */
/* â˜…â˜…â˜… è½¬è´¦å¡ç‰‡çº¯ç™½ä¿®æ­£ç‰ˆ (Pure White Fix) â˜…â˜…â˜… */
/* ========================================= */

/* 1. æ ¸å¿ƒï¼šè®©è½¬è´¦æ¶ˆæ¯çš„ wrapper ä¸å—å®½åº¦é™åˆ¶ */
.bubble-wrapper.transfer-wrapper {
    max-width: none !important;
    width: auto !important;
}

/* 2. æ°”æ³¡å®¹å™¨å¼ºåŠ›é‡ç½® (æ¸…é™¤æ‰€æœ‰é»˜è®¤æ°”æ³¡æ ·å¼) */
.Miu-miu .content.transfer-msg,
.Miu-miu.user .content.transfer-msg,
.Miu-miu.ai .content.transfer-msg {
    all: unset !important; /* å¼ºåˆ¶æ¸…é™¤ç»§æ‰¿å±žæ€§ */
    display: inline-block !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
}

/* åŽ»é™¤æ‰€æœ‰å°å°¾å·´ */
.Miu-miu.user .content.transfer-msg::after,
.Miu-miu.ai .content.transfer-msg::before {
    display: none !important;
    content: none !important;
}

/* 3. å¡ç‰‡æœ¬ä½“ï¼šæ— è®ºä»€ä¹ˆçŠ¶æ€ï¼ˆè½¬è´¦ã€é€€è¿˜ã€å·²æ”¶ï¼‰å…¨æ˜¯ç™½åº• */
.transfer-card,
.transfer-card.done,
.transfer-card.refund,
.transfer-card.received {
    background-color: #FFFFFF !important; /* æ ¸å¿ƒï¼šæ°¸è¿œçº¯ç™½ */
    background: #FFFFFF !important;
    
    /* ç»Ÿä¸€è¾¹æ¡†é¢œè‰² */
    border: 1.5px solid #cfcfcf !important; 
    border-radius: 6px !important;
    
    /* å¼ºåˆ¶å°ºå¯¸ */
    width: 230px !important;
    min-width: 230px !important;
    max-width: 230px !important;
    height: auto !important;
    
    display: flex !important;
    flex-direction: column !important;
    flex: 0 0 230px !important;
    
    overflow: hidden !important;
    position: relative !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    
    /* æ ¸å¿ƒï¼šç§»é™¤é€æ˜Žåº¦å˜åŒ–ï¼Œé˜²æ­¢å˜ç° */
    opacity: 1 !important; 
}

/* 4. ä¸ŠåŠéƒ¨åˆ†å†…å®¹åŒº */
.transfer-top {
    background-color: #FFFFFF !important; /* æ ¸å¿ƒï¼šæ°¸è¿œçº¯ç™½ */
    background: #FFFFFF !important;
    padding: 12px 15px 15px 15px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    flex: 1 !important;
}

.transfer-info-col {
    width: 100% !important;
    display: block !important;
}

/* æ–‡å­—æ ·å¼ */
.transfer-amount-text {
    font-size: 17px !important;
    font-weight: 600 !important;
    color: #000 !important;
    margin-bottom: 4px !important;
    display: block !important;
}

.transfer-status-text {
    font-size: 12px !important;
    color: #999999 !important;
    display: block !important;
}

/* 5. åˆ†å‰²çº¿ */
.transfer-line {
    width: 100% !important;
    height: 1.5px !important;
    background-color: #cfcfcf !important;
    margin: 0 !important;
    display: block !important;
    opacity: 1 !important;
}

/* 6. åº•éƒ¨åŒºåŸŸï¼šæ— è®ºä»€ä¹ˆçŠ¶æ€å…¨æ˜¯ç™½åº• */
.transfer-footer {
    background-color: #FFFFFF !important; /* æ ¸å¿ƒï¼šæ°¸è¿œçº¯ç™½ */
    background: #FFFFFF !important;
    padding: 6px 15px !important;
    font-size: 10px !important;
    color: #B2B2B2 !important;
    text-align: right !important;
    width: 100% !important;
    box-sizing: border-box !important;
    line-height: 1.2 !important;
    flex-shrink: 0 !important;
    display: block !important;
}

#transfer-amount, #rc-amount {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 26px !important;
    font-weight: bold !important;
    color: #333 !important;
    padding: 0 5px !important;
    width: 140px !important;
    text-align: left !important;
    outline: none !important;
    height: 40px !important;
}

/* 8. å¼¹çª—æŒ‰é’® (ä¿æŒé»‘/ç°é…è‰²) */
.modal-btn, 
.btn-confirm-modal, 
.btn-cancel-modal, 
.action-btn {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    height: 44px !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    padding: 0 !important;
    line-height: 1 !important; 
}

/* é»‘è‰²ç¡®è®¤æŒ‰é’® */
#transfer-action-overlay .modal-btn:last-child,
.btn-confirm-modal {
    background-color: #000000 !important;
    color: #FFFFFF !important;
    border: none !important;
}

/* ç°è‰²å–æ¶ˆæŒ‰é’® */
.btn-cancel-modal,
#transfer-action-overlay .modal-btn:first-child {
    background-color: #F2F2F7 !important;
    color: #000000 !important;
}

/* 9. å›¾æ ‡ */
.icon-transfer-bg {
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M7 10h14l-4-4' stroke='%23666666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M17 14H3l4 4' stroke='%23666666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 24px;
    opacity: 0.8;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tool-icon-box:active .icon-transfer-bg {
    transform: scale(0.9);
    opacity: 1;
}

/* --- è¯­éŸ³é€šè¯å…¨å±ç•Œé¢æ ·å¼ --- */
#voice-call-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-max); /* æœ€é«˜å±‚çº§ */
    background: #000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#voice-call-overlay.active {
    transform: translateY(0);
}

/* åŠ¨æ€æ¨¡ç³ŠèƒŒæ™¯ */
#vc-bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(5px) brightness(0.9); 
    z-index: var(--z-negative);
    transition: background-image 0.3s;
}

/* é¡¶éƒ¨æ  */
.vc-header {
    padding-top: calc(10px + var(--safe-top));
    padding-bottom: 10px;
    padding-left: 20px;
    padding-right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    z-index: var(--z-content);
}

.vc-minimize-btn {
    font-size: 20px;
    opacity: 0.8;
    cursor: pointer;
    padding: 5px;
}

.vc-char-name {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* è§†è§‰åŒºåŸŸ (å¤´åƒ+çº¿) */
.vc-visual-area {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.vc-avatars-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px; /* å¤´åƒé—´è· */
    position: relative;
    margin-bottom: 20px;
}

.vc-avatar-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
}

.vc-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.8);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    z-index: calc(var(--z-base) + 1); 
}

/* ä¸­é—´å¾‹åŠ¨æ³¢çº¹ */
.vc-wave-anim {
    display: flex;
    gap: 3px;
    height: 20px;
    align-items: center;
}
.vc-wave-anim span {
    width: 3px;
    background: rgba(255,255,255,0.8);
    border-radius: 2px;
    animation: wave 1s infinite ease-in-out;
}
.vc-wave-anim span:nth-child(1) { animation-delay: 0.0s; height: 10px; }
.vc-wave-anim span:nth-child(2) { animation-delay: 0.2s; height: 15px; }
.vc-wave-anim span:nth-child(3) { animation-delay: 0.4s; height: 10px; }

@keyframes wave {
    0%, 100% { transform: scaleY(1); opacity: 0.5; }
    50% { transform: scaleY(1.5); opacity: 1; }
}

.vc-status-text {
    font-size: 14px;
    color: rgba(255,255,255,0.9);
    font-weight: 500;
    margin-bottom: 5px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.vc-timer-text {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
}

/* æ»šåŠ¨æ¶ˆæ¯åŒº - ä¿®å¤æ— æ³•ä¸Šæ»‘çš„æ ¸å¿ƒä»£ç  */
.vc-scroll-content {
    flex: 1;
    width: 100%;
    /* â˜…â˜…â˜… å…³é”®ä¿®å¤ï¼šé˜²æ­¢Flexå­å…ƒç´ æº¢å‡ºå¡æ­»æ»šåŠ¨ â˜…â˜…â˜… */
    min-height: 0; 
    
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 25px;
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    
    /* â˜…â˜…â˜… å…³é”®ä¿®å¤ï¼šè®©iOSæ»šåŠ¨æ›´é¡ºæ»‘ â˜…â˜…â˜… */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    
    scrollbar-width: none; 
    -ms-overflow-style: none;
    position: relative;
    z-index: var(--z-content);
}
.vc-scroll-content::-webkit-scrollbar { display: none; }

/* é€šè¯ç•Œé¢çš„æ¶ˆæ¯è¡Œ - ä¿®å¤è¯´å®Œè¯æ¶ˆå¤± */
.vc-msg-row {
    display: flex;
    flex-direction: column;
    width: 100%;
    /* â˜…â˜…â˜… å…³é”®ä¿®å¤ï¼šforwards ç¡®ä¿åŠ¨ç”»ç»“æŸåŽä¿æŒæ˜¾ç¤ºçŠ¶æ€ï¼Œä¸ä¼šå˜å›žé€æ˜Ž â˜…â˜…â˜… */
    animation: fadeIn 0.3s ease-out forwards;
    opacity: 0; 
    flex-shrink: 0;
}

.vc-msg-row.ai { align-items: flex-start; }
.vc-msg-row.self { align-items: flex-end; }

/* --- ç»Ÿä¸€é€šè¯æ°”æ³¡æ ·å¼ (ç¡®ä¿åŒæ–¹ä¸€è‡´) --- */
.vc-msg-text {
    max-width: 85%;
    font-size: 15px;
    line-height: 1.5;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    background: rgba(0, 0, 0, 0.45) !important; 
    padding: 10px 14px;
    border-radius: 12px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.15) !important;
    word-wrap: break-word;
}

.vc-msg-row.self .vc-msg-text {
    background: rgba(0, 0, 0, 0.45) !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
    color: #ffffff !important;
}

/* åº•éƒ¨è¾“å…¥åŒº */
.vc-footer-area {
    padding: 15px 20px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    width: 100%;
    z-index: var(--z-card);
}

/* æ¯›çŽ»ç’ƒèƒ¶å›Šè¾“å…¥æ¡† */
.vc-input-capsule {
    width: 100%;
    height: 50px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 25px; /* åœ†è§’èƒ¶å›Š */
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    padding: 5px; /* å†…éƒ¨ç•™ç™½ */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

#vcInput {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    height: 100%;
    color: #fff;
    font-size: 15px;
    padding-left: 15px;
    padding-right: 10px;
}
#vcInput::placeholder {
    color: rgba(255,255,255,0.6);
}

/* å‘é€æŒ‰é’® (åœ†å½¢) */
.vc-send-circle {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}
.vc-send-circle:active {
    background: rgba(255,255,255,0.5);
}
.vc-send-circle i {
    color: #fff;
    font-size: 16px;
    margin-left: -2px; /* è§†è§‰ä¿®æ­£ */
    margin-top: 2px;
}
/* --- æœ‹å‹åœˆè¯„è®ºåŒºç¾ŽåŒ– (å·¦å³åˆ†ç¦»ç‰ˆ) --- */

/* 1. è¯„è®ºå•è¡Œå®¹å™¨ï¼šFlexå¸ƒå±€ï¼Œä¸¤ç«¯å¯¹é½ */
.mp-comment-item {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important; /* é˜²æ­¢å¤šè¡Œæ–‡å­—æ—¶å‰å·è·‘å */
    padding: 2px 4px;
    border-radius: 4px;
    position: relative;
}

/* ç‚¹å‡»æ—¶çš„ç°è‰²èƒŒæ™¯åé¦ˆ (ä»¿å¾®ä¿¡) */
.mp-comment-item:active {
    background-color: #e5e5e5;
}

/* 2. å·¦ä¾§æ–‡å­—åŒºåŸŸï¼šå æ»¡å‰©ä½™ç©ºé—´ */
.mp-cmt-body {
    flex: 1; /* éœ¸å å·¦è¾¹æ‰€æœ‰åœ°ç›˜ */
    margin-right: 10px; /* è·Ÿå³è¾¹çš„å‰å·ä¿æŒè·ç¦» */
    cursor: pointer;
    word-break: break-all;
}

/* 3. å³ä¾§åˆ é™¤æŒ‰é’®ï¼šå¹³æ—¶éšèº«ï¼Œæ‚¬åœçŽ°èº« */
.mp-cmt-del {
    color: #999;           /* é¢œè‰²æ·±ä¸€ç‚¹ç‚¹ */
    font-size: 16px;
    font-family: Arial, sans-serif;
    cursor: pointer;
    padding: 0 8px;        /* å¢žå¤§ç‚¹å‡»èŒƒå›´ */
    flex-shrink: 0;
    line-height: 1.4;
    
    /* â˜…â˜…â˜… æ ¸å¿ƒä¿®æ”¹ï¼šé»˜è®¤é€æ˜Žåº¦ä¸º0 (çœ‹ä¸è§) â˜…â˜…â˜… */
    opacity: 0;            
    transition: opacity 0.2s ease; /* åŠ ä¸ªæ¸å˜åŠ¨ç”» */
}

/* â˜…â˜…â˜… æ ¸å¿ƒä¿®æ”¹ï¼šåªæœ‰å½“é¼ æ ‡æ‚¬åœåœ¨æ•´è¡Œè¯„è®ºä¸Šæ—¶ï¼Œå‰å·æ‰æ˜¾ç¤º â˜…â˜…â˜… */
.mp-comment-item:hover .mp-cmt-del {
    opacity: 1;
}

/* ç‚¹å‡»å‰å·æ—¶å˜çº¢ */
.mp-cmt-del:active {
    color: #ff3b30;
}

/* 4. (ä¿æŒä¹‹å‰çš„) å‘é€æŒ‰é’®ç°è‰²æ ·å¼ */
.inline-send-btn {
    background-color: #e5e5e5;
    color: #333;
    border: none;
    border-radius: 4px;
    padding: 0 12px;
    height: 36px;
    font-size: 13px;
    cursor: pointer;
    font-weight: 500;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.inline-input-row {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-top: 8px !important;
    width: 100% !important;
}
/* --- â˜…â˜…â˜… æ–°å¢žï¼šè¯­éŸ³é€šè¯æ‚¬æµ®å°çª—æ ·å¼ â˜…â˜…â˜… --- */

#vc-floating-window {
    position: absolute;
    top: 100px;        /* é»˜è®¤æ‚¬æµ®ä½ç½®ï¼šè·ç¦»é¡¶éƒ¨ 100px */
    right: 10px;       /* é å³æ˜¾ç¤º */
    width: 60px;
    height: 60px;
    border-radius: 50%;
    z-index: var(--z-max); /* ä¿è¯åœ¨æ‰€æœ‰é¡µé¢ä¹‹ä¸Š */
    display: none;     /* é»˜è®¤éšè— */
    align-items: center;
    justify-content: center;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    cursor: pointer;
    border: 2px solid #fff;
    transition: transform 0.2s;
}

#vc-floating-window:active {
    transform: scale(0.95);
}

/* ç»¿è‰²å‘¼å¸å…‰çŽ¯ï¼ˆè¡¨ç¤ºé€šè¯ä¸­ï¼‰ */
.vc-float-wave {
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    border-radius: 50%;
    border: 2px solid #34c759; /* å¾®ä¿¡ç»¿ */
    animation: floatPulse 1.5s infinite;
    opacity: 0.6;
    pointer-events: none;
}

@keyframes floatPulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.2); opacity: 0; }
}

/* æ‚¬æµ®çª—å†…çš„å¤´åƒ */
.vc-float-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    padding: 2px; /* ç•™ç™½ */
    background: #fff;
}

/* æ‚¬æµ®çª—ä¸­é—´çš„è·³åŠ¨éŸ³æŸ±ï¼ˆè¦†ç›–åœ¨å¤´åƒä¸Šï¼‰ */
.vc-float-status {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(0,0,0,0.3); /* åŠé€æ˜Žé»‘åº•ï¼Œè®©éŸ³æŸ±æ›´æ˜Žæ˜¾ */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    backdrop-filter: blur(1px);
}

.vc-float-bar {
    width: 3px;
    background: #fff;
    border-radius: 2px;
    animation: voice-wave 1s infinite ease-in-out;
}
/* å¤ç”¨ä¹‹å‰çš„åŠ¨ç”»ï¼Œä½†è°ƒæ•´åˆå§‹é«˜åº¦ */
.vc-float-bar:nth-child(1) { height: 10px; animation-delay: 0.1s; }
.vc-float-bar:nth-child(2) { height: 16px; animation-delay: 0.3s; }
.vc-float-bar:nth-child(3) { height: 12px; animation-delay: 0.5s; }

/* --- å…¨å±€æ¶ˆæ¯é€šçŸ¥ (Liquid Glass Toast) - æœ€ç»ˆå®Œç¾Žéšèº«ç‰ˆ --- */
#msg-notification-toast {
    position: fixed;
    /* é€‚é…åˆ˜æµ·å±ï¼Œè·ç¦»é¡¶éƒ¨æœ‰ä¸€ç‚¹è·ç¦» */
    top: calc(10px + env(safe-area-inset-top)); 
    left: 50%;
    
    /* é»˜è®¤ä½ç½®ï¼šè—åœ¨å±å¹•ä¸Šæ–¹å¤–é¢ï¼Œè€Œä¸”æ˜¯ä¸é€æ˜Žåº¦ä¸º0ï¼Œä¸”ä¸å¯è§ */
    transform: translateX(-50%) translateY(-200%); 
    opacity: 0;            
    visibility: hidden;    
    pointer-events: none;  /* éšèº«æ—¶å®Œå…¨æ— æ³•ç‚¹å‡»ï¼Œä¸ä¼šæŒ¡ä½åŽé¢çš„æŒ‰é’® */
    
    width: 92%;
    max-width: 380px;
    z-index: var(--z-toast); /* ä¿è¯åœ¨æœ€é¡¶å±‚ */
    
    /* åŠ¨ç”»æ•ˆæžœï¼šå¹³æ»‘è¿‡æ¸¡ */
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); 
    
    cursor: pointer;
    display: flex;
    justify-content: center;
}

/* æ¿€æ´»çŠ¶æ€ï¼šå½“JSåŠ ä¸Š .show ç±»åæ—¶ */
#msg-notification-toast.show {
    /* æ»‘ä¸‹æ¥ï¼Œå˜ä¸é€æ˜Žï¼Œå˜å¯è§ï¼Œå…è®¸ç‚¹å‡» */
    transform: translateX(-50%) translateY(0); 
    opacity: 1;
    visibility: visible;
    pointer-events: auto; 
}

/* å†…éƒ¨çŽ»ç’ƒå¡ç‰‡æ ·å¼ */
.toast-glass-content {
    width: 100%;
    background: rgba(255, 255, 255, 0.75); 
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border-radius: 24px;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.toast-text-col {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.toast-name {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin-bottom: 2px;
}

.toast-msg {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- START: æ•°æ®ç®¡ç†å¼¹çª—æ ·å¼ (æ–°å¢ž) --- */
#backup-modal { 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: var(--z-max);
    display: none; 
    align-items: center; 
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: opacity 0.3s ease;
}

.modal-card {
    background: white;
    padding: 25px;
    border-radius: 25px;
    width: 85%;
    max-width: 320px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-btn {
    display: block;
    width: 100%;
    padding: 14px;
    margin: 10px 0;
    background: #f8f8f8;
    border-radius: 15px;
    color: #333;
    font-weight: 600;
    border: none;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.modal-btn:active { background: #e5e5e5; }

/* çº¢è‰²å±é™©æŒ‰é’® */
.modal-btn.danger {
    background: #FF3B30;
    color: white;
}
.modal-btn.danger:active { background: #d63229; }

/* å–æ¶ˆæŒ‰é’® */
.modal-btn.cancel { color: #999; background: transparent; }
/* --- END: æ•°æ®ç®¡ç†å¼¹çª—æ ·å¼ --- */

/* style.css */

/* åŽå°æ´»åŠ¨è§’è‰²åˆ—è¡¨é¡¹ */
.auto-char-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 5px;
    border-bottom: 1px solid #f5f5f5;
}
.auto-char-item:last-child {
    border-bottom: none;
}

.auto-char-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auto-char-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: #eee;
}

.auto-char-name {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

/* å¤é€‰æ¡†æ ·å¼ */
.auto-char-checkbox {
    width: 20px;
    height: 20px;
    accent-color: #000; /* é»‘è‰²å‹¾é€‰æ¡† */
    cursor: pointer;
}
/* --- 1. æƒ…ä¾£ç©ºé—´å…¨å±é®ç½© (ä¿®æ”¹ç‰ˆï¼šé€šé€æ¨¡ç³ŠèƒŒæ™¯) --- */
#couple-space-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: var(--z-modal);
    display: none;
    justify-content: center;
    align-items: center;
    
    /* æ”¹åŠ¨ï¼šåŽ»æŽ‰å…¨å±ç²‰è‰²æ™•æŸ“ï¼Œæ”¹ä¸ºé»‘è‰²åŠé€æ˜Žé®ç½© + é«˜æ–¯æ¨¡ç³Š */
    background: rgba(0, 0, 0, 0.25); 
    backdrop-filter: blur(8px); /* ç£¨ç ‚çŽ»ç’ƒèƒŒæ™¯ */
    -webkit-backdrop-filter: blur(8px);
    
    opacity: 0;
    transition: opacity 0.3s ease;
}

#couple-space-overlay.active {
    display: flex;
    opacity: 1;
}

/* --- 2. çŽ»ç’ƒé¢æ¿ (ä¿®æ”¹ç‰ˆï¼šç‰›å¥¶æ¨±èŠ±ç²‰ï¼Œé€šé€ä¸çªå…€) --- */
.couple-glass-box {
    width: 85%;
    max-width: 360px;
    height: 70vh;
    
    /* æ ¸å¿ƒä¿®æ”¹ï¼šæ”¹ä¸ºä»Žçº¯ç™½ -> æžæ·¡çš„ç²‰ç™½ï¼ŒåŽ»é™¤æ·±è‰²æ‚è´¨ */
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.98) 0%, 
        rgba(255, 252, 253, 0.95) 60%, 
        rgba(255, 240, 245, 0.9) 100%);
        
    /* ä¿æŒæ¯›çŽ»ç’ƒæ•ˆæžœ */
    backdrop-filter: blur(40px) saturate(120%);
    -webkit-backdrop-filter: blur(40px) saturate(120%);
    
    /* è¾¹æ¡†æ”¹ä¸ºçº¯ç™½é«˜äº®ï¼Œå¢žåŠ ç²¾è‡´æ„Ÿ */
    border: 1px solid rgba(255, 255, 255, 1);
    border-radius: 30px;
    
    /* ä¿®æ”¹æŠ•å½±ï¼šç”¨æ·¡æ·¡çš„ç²‰è‰²å…‰æ™•ä»£æ›¿æ·±è‰²é˜´å½± */
    box-shadow: 
        0 20px 40px rgba(255, 192, 203, 0.2), /* å¾ˆæµ…çš„ç²‰è‰²æŠ•å½± */
        inset 0 -20px 60px rgba(255, 235, 240, 0.5); /* å†…éƒ¨åº•éƒ¨æ³›èµ·ä¸€ç‚¹ç‚¹å«©ç²‰ */
        
    display: flex;
    flex-direction: column;
    padding: 20px;
    
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    
    position: relative;
    overflow: hidden;
}

/* æ¿€æ´»æ—¶çš„å¼¹è·³åŠ¨ç”» */
#couple-space-overlay.active .couple-glass-box {
    transform: scale(1);
}

/* 3. å¤´éƒ¨ */
.couple-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 10px;
}

.couple-header-title {
    font-size: 20px;
    font-weight: 800;
    color: #681528; /* æ·±çº¢è¤è‰² */
    font-family: 'Times New Roman', serif; /* æ¨¡ä»¿å›¾ä¸­çš„ä¼˜é›…å­—ä½“ */
    letter-spacing: 1px;
    font-style: italic;
}

.couple-close-btn {
    font-size: 24px;
    color: #E33B65;
    cursor: pointer;
    line-height: 1;
}

/* 4. åˆ—è¡¨åŒºåŸŸ */
.couple-scroll-area {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.couple-section-title {
    font-size: 12px;
    color: #E33B65;
    font-weight: 600;
    margin-top: 10px;
    padding-left: 5px;
    opacity: 0.8;
}

.couple-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.couple-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.couple-avatar-box {
    position: relative;
    width: 60px;
    height: 60px;
}

.couple-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 4px 10px rgba(227, 59, 101, 0.1);
}

/* å·²å¼€é€šçš„å¿ƒå½¢è§’æ ‡ */
.couple-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    background: #E33B65;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 10px;
    border: 2px solid #fff;
}

/* æœªå¼€é€šçš„åŠ å· */
.couple-plus {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #E33B65;
    font-size: 20px;
    opacity: 0;
    transition: opacity 0.2s;
}
.couple-avatar-box:not(.opened):active .couple-plus { opacity: 1; }

.couple-name {
    font-size: 12px;
    color: #681528;
    font-weight: 500;
}
/* --- style.css æ–°ç‰ˆæƒ…ä¾£å¡ç‰‡æ ·å¼ (æ›¿æ¢åŽŸæ¥çš„) --- */

/* 1. å¼ºåˆ¶åŽ»é™¤èŠå¤©æ°”æ³¡çš„é»˜è®¤èƒŒæ™¯å’Œè¾¹è· */
.Miu-miu .content.couple-msg-bubble,
.Miu-miu.user .content.couple-msg-bubble,
.Miu-miu.ai .content.couple-msg-bubble {
    padding: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
    display: block !important;
    /* æ ¸å¿ƒï¼šå®½åº¦å›ºå®šä¸º 255pxï¼Œä¸å†è®©å®ƒè‡ªå·±æ’‘å¤§ */
    width: 255px !important;
    min-width: 255px !important;
    max-width: 255px !important;
}

/* åŽ»é™¤å°å°¾å·´ */
.Miu-miu.user .content.couple-msg-bubble::after,
.Miu-miu.ai .content.couple-msg-bubble::before {
    display: none !important;
    content: none !important;
}

/* 2. å¡ç‰‡ä¸»ä½“æ ·å¼ */
.transfer-card.couple-card {
    /* ç²‰è‰²æ¸å˜èƒŒæ™¯ */
    background: linear-gradient(135deg, #FAE7EC 0%, #FBE8ED 100%) !important;
    border: 1px solid #E33B65 !important;
    border-radius: 12px !important;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 15px rgba(227, 59, 101, 0.15) !important;
    margin: 5px 0 !important;
    
    /* æ ¸å¿ƒï¼šå›ºå®šå¡ç‰‡å°ºå¯¸ */
    width: 255px !important;
    min-width: 255px !important;
    max-width: 255px !important;
    height: auto !important;
}

/* 3. å¡ç‰‡ä¸ŠåŠéƒ¨åˆ† (ç´§å‡‘æŽ’ç‰ˆ) */
.couple-card-top {
    padding: 12px 15px !important; /* å†…è¾¹è·ç¼©å° */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    background: transparent !important;
}

/* 4. å›¾æ ‡æ ·å¼ */
.couple-icon-row {
    font-size: 20px;
    color: #E33B65;
    margin-bottom: 2px;
}
.couple-icon-row i {
    font-size: 20px;
}

/* 5. æ ‡é¢˜æ ·å¼ (åŽ»æŽ‰é‚£ä¸ªå¤¸å¼ çš„ VIP å­—ä½“ï¼Œæ”¹ç”¨æ›´çŽ°ä»£çš„è¡¬çº¿ä½“æˆ–é»˜è®¤) */
.couple-title {
    font-size: 16px !important; /* å­—å·æ”¹å° */
    font-weight: 700 !important;
    color: #681528 !important; /* æ·±çº¢ */
    letter-spacing: 0.5px;
    line-height: 1.4;
    font-family: inherit; /* ä¸å¼ºåˆ¶ Times New Romanï¼Œçœ‹èµ·æ¥æ›´äº²åˆ‡ */
}

/* 6. å‰¯æ ‡é¢˜/å†…å®¹æ ·å¼ */
.couple-subtitle, .couple-msg-content {
    font-size: 11px !important;
    color: #E33B65 !important;
    opacity: 0.8;
}

/* å›žå¤å†…å®¹ */
.couple-msg-content {
    font-size: 12px !important;
    margin-top: 5px;
    color: #681528 !important;
    font-weight: 500;
}

/* 7. åˆ†å‰²çº¿ */
.couple-line {
    width: 100% !important;
    height: 1px !important;
    background: rgba(227, 59, 101, 0.15) !important;
    margin: 0 !important;
}

/* 8. åº•éƒ¨å°å­— */
.couple-footer {
    padding: 6px 15px !important;
    font-size: 10px !important;
    color: #E33B65 !important;
    opacity: 0.6;
    text-align: right;
    background: rgba(255, 255, 255, 0.3) !important;
}

/* --- çŠ¶æ€å˜åŒ–é¢œè‰² --- */

/* åŒæ„/å·²å¼€é€šï¼šèƒŒæ™¯ç•¥æ·±ä¸€ç‚¹çš„ç²‰ */
.transfer-card.couple-card.accepted,
.transfer-card.couple-card.response-yes {
    background: linear-gradient(135deg, #FAE7EC 0%, #FFD1DC 100%) !important;
    border-color: #E33B65 !important;
}

/* æ‹’ç»ï¼šç°è‰²è°ƒ */
.transfer-card.couple-card.rejected,
.transfer-card.couple-card.response-no {
    background: #F8F8F8 !important;
    border-color: #DDD !important;
}
.transfer-card.couple-card.response-no .couple-title {
    color: #999 !important;
}
/* ========================================= */
/* â˜…â˜…â˜… æƒ…ä¾£ç©ºé—´ (Couple Space) å®Œæ•´ä¿®æ­£ç‰ˆ â˜…â˜…â˜… */
/* ========================================= */

/* 1. è¯¦æƒ…é¡µå®¹å™¨ (åŸºç¡€å±‚) */
#couple-dashboard-view {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: var(--z-modal);
    background: #fff; 
    display: none;
    flex-direction: column;
    overflow: hidden;
}

/* 2. åŠ¨æ€èƒŒæ™¯å±‚ (ç²‰è‰²èƒŒæ™¯) */
#cp-bg-layer {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    background-image: linear-gradient(180deg, #FFFFFF 0%, #FFE6EA 60%, #FFD1DC 100%);
    z-index: var(--z-background);
}

/* 3. é¡¶éƒ¨å¯¼èˆªæ  (å¼ºåˆ¶ç™½è‰²å›¾æ ‡) */
.cp-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: calc(10px + env(safe-area-inset-top)) 15px 10px 15px;
    
    /* â˜… æ”¹ä¸ºç™½è‰²æ–‡å­—å’Œå›¾æ ‡ â˜… */
    color: #ffffff; 
    font-size: 17px;
    font-weight: 700;
    position: relative;
    z-index: var(--z-content);
    flex-shrink: 0;
    /* åŠ ä¸€ç‚¹è½»å¾®é˜´å½±é˜²æ­¢èƒŒæ™¯å¤ªäº®çœ‹ä¸æ¸… */
    text-shadow: 0 1px 3px rgba(0,0,0,0.1); 
}

.cp-nav-header i {
    color: #ffffff !important; /* å›¾æ ‡å¼ºåˆ¶ç™½è‰² */
    font-size: 20px;
    cursor: pointer;
}

/* 4. é¡¶éƒ¨å¡ç‰‡ (çº¯ç™½ã€æ— å…‰ã€æ— ç«‹ä½“æ„Ÿ) */
.cp-top-card {
    position: relative;
    z-index: var(--z-base);
    flex-shrink: 0;
    background-color: rgba(255, 255, 255, 0.85); 
    
    backdrop-filter: none !important;
    
    /* åŽ»é™¤æ‰€æœ‰è¾¹æ¡†å’ŒæŠ•å½± */
    border: none !important;
    border-radius: 24px;
    
    /* ä»…ä¿ç•™æžæ·¡çš„è½®å»“é˜´å½± */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
    
    margin: 10px 20px 20px 20px;
    padding: 25px 30px;
    
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow: hidden;
}

/* å¤´åƒå®¹å™¨ (å½»åº•åŽ»é™¤å‘å…‰) */
.cp-avatar-wrap {
    width: 65px !important; 
    height: 65px !important;
    border-radius: 50%;
    padding: 0; 
    background: transparent;
    
    /* â˜…â˜…â˜… æ ¸å¿ƒä¿®å¤ï¼šå¼ºåˆ¶åŽ»é™¤é˜´å½±å’Œå‘å…‰ â˜…â˜…â˜… */
    box-shadow: none !important; 
    border: none !important; 
    
    overflow: hidden;
    flex-shrink: 0;
}

.cp-head-img {
    width: 100%; 
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

/* ä¸­é—´å¤©æ•°æ–‡å­— (æ”¹ä¸ºèƒŒæ™¯åŒæ¬¾å«©ç²‰è‰²) */
.cp-days-info { 
    flex: 1; 
    text-align: center; 
    cursor: pointer; 
    z-index: var(--z-base);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.cp-days-label { 
    font-size: 12px; 
    /* â˜… æ”¹ä¸ºå«©ç²‰è‰² (é…åˆèƒŒæ™¯) â˜… */
    color: #FFB7C5!important; 
    margin-bottom: 4px; 
    font-weight: 600; 
    letter-spacing: 1px;
    text-shadow: none !important;
}

.cp-days-count { 
    font-size: 36px; 
    font-weight: 800; 
    /* â˜… æ”¹ä¸ºå«©ç²‰è‰² (é…åˆèƒŒæ™¯) â˜… */
    color: #FFB7C5 !important; 
    font-family: 'Arial', sans-serif;
    line-height: 1;
    text-shadow: none !important;
}

/* 5. åº•éƒ¨èœå•æ  (é»‘è‰²å›¾æ ‡ + é€æ˜Žåº¦å˜åŒ–) */
.cp-menu-bar {
    display: flex;
    justify-content: space-around;
    padding: 0 20px;
    margin-bottom: 15px;
    flex-shrink: 0;
    position: relative;
    z-index: var(--z-base);
}

.cp-menu-item { 
    /* â˜… é»˜è®¤æµ…è‰² (ä½Žä¸é€æ˜Žåº¦) â˜… */
    opacity: 0.4; 
    transition: all 0.2s; 
    cursor: pointer; 
}

/* â˜… é€‰ä¸­æˆ–ç‚¹å‡»æ—¶å˜æ·± (å®Œå…¨ä¸é€æ˜Ž) â˜… */
.cp-menu-item.active { 
    opacity: 1; 
    transform: scale(1.05); 
}

.cp-menu-icon {
    width: 44px; height: 44px;
    background: #ffffff; /* ç™½åº• */
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    
    /* â˜… å›¾æ ‡æ”¹ä¸ºé»‘è‰² â˜… */
    color: #000000; 
    
    /* æ·¡æ·¡çš„é˜´å½± */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* 6. å†…å®¹å®¹å™¨ */
.cp-content-container {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px;
    padding-bottom: 80px;
    -webkit-overflow-scrolling: touch;
    position: relative;
    z-index: var(--z-base);
}

/* --- æƒ…ä¾£ç›¸å†Œç½‘æ ¼ (è¡¨æƒ…åŒ…å¤§å°ç‰ˆ) --- */

.cp-album-grid {
    display: grid;
    /* â˜…â˜…â˜… æ ¸å¿ƒä¿®æ”¹ï¼šè¿™é‡Œæ”¹æˆ 5ï¼Œå›¾ç‰‡å°±ä¼šå˜å°ï¼Œä¸€æŽ’æŒ¤5ä¸ª â˜…â˜…â˜… */
    grid-template-columns: repeat(5, 1fr); 
    
    gap: 6px; /* å›¾ç‰‡ä¹‹é—´çš„é—´éš™ï¼Œ6px åˆšåˆšå¥½ */
    padding: 10px 15px; /* æ•´ä½“å†…è¾¹è· */
    width: 100%;
    box-sizing: border-box; /* é˜²æ­¢å®½åº¦æº¢å‡º */
}

.cp-album-item {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1; /* ä¿æŒæ­£æ–¹å½¢ */
    border-radius: 6px;  /* åœ†è§’ç¨å¾®æ”¹å°ä¸€ç‚¹ç‚¹ï¼Œé€‚é…å°å›¾ */
    overflow: hidden;
    background: #f0f0f0;
    /* åŠ ä¸Šæ·¡æ·¡çš„æè¾¹ï¼Œæ›´æœ‰è¡¨æƒ…åŒ…çš„æ„Ÿè§‰ */
    border: 1px solid rgba(0,0,0,0.05); 
}

.cp-album-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* åˆ é™¤æŒ‰é’®ä¹Ÿè¦ç›¸åº”ç¼©å°ä¸€ç‚¹ï¼Œä¸ç„¶æŒ¡ä½å›¾äº† */
.cp-album-del {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px; /* ç¼©å° */
    height: 18px; /* ç¼©å° */
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px; /* å›¾æ ‡ç¼©å° */
    color: #fff;
    cursor: pointer;
    z-index: var(--z-base);
}

/* 7. åŠ¨æ€å¡ç‰‡ & è¯„è®ºåŒº (ä¿®å¤é¢œè‰²) */
.cp-feed-item {
    background: #ffffff;
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.cp-feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
}
.cp-feed-name { font-weight: 700; color: #333; }
.cp-feed-time { color: #ccc; font-size: 11px; }

/* åŠ¨æ€å†…å®¹è¡Œ (åŒ…å«åžƒåœ¾æ¡¶) */
.cp-feed-row {
    display: flex;
    justify-content: space-between; /* å·¦å³ä¸¤ç«¯å¯¹é½ */
    align-items: flex-start;
    width: 100%;
    margin-bottom: 10px;
}

.cp-feed-text { 
    font-size: 15px; 
    color: #444; 
    line-height: 1.6; 
    flex: 1; 
    margin-right: 15px;
    white-space: pre-wrap; 
    word-break: break-all;
}

.cp-del-btn {
    color: #ddd; /* æµ…ç°åžƒåœ¾æ¡¶ */
    font-size: 14px;
    cursor: pointer;
    padding: 2px 5px;
    flex-shrink: 0;
    margin-top: 2px;
}
.cp-del-btn:active { color: #ff3b30; }

/* â˜…â˜…â˜… è¯„è®ºåŒº (å…¨ç°ä¿®å¤) â˜…â˜…â˜… */
.cp-comments-area {
    background: #F9F9F9;
    border-radius: 10px;
    padding: 10px 12px;
    margin-top: 5px;
    font-size: 13px;
    display: flex; 
    flex-direction: column; 
    gap: 6px;
    
    /* å¼ºåˆ¶æ•´ä½“å˜ç° */
    color: #999 !important; 
}

.cp-comment-row { 
    /* è¯„è®ºå†…å®¹ç°è‰² */
    color: #999 !important; 
    line-height: 1.4; 
    word-break: break-all; 
}

.cp-cmt-user { 
    /* è¯„è®ºåå­—ç¨å¾®æ·±ä¸€ç‚¹çš„ç°ï¼Œä¸è¦é»‘è‰² */
    font-weight: 600; 
    color: #777 !important; 
    cursor: pointer; 
}

/* 8. æ‚¬æµ®å‘å¸ƒæŒ‰é’® (+å·) */
.cp-fab-btn {
    position: absolute;
    bottom: 40px; right: 25px;
    width: 50px; height: 50px;
    background: #000; 
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    z-index: var(--z-popover);
    transition: transform 0.1s;
    cursor: pointer;
}
.cp-fab-btn:active { transform: scale(0.9); }

/* 9. è¾“å…¥å¼¹çª— */
.cp-input-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(5px);
    z-index: var(--z-max) !important;
    display: none;
    align-items: center; justify-content: center;
}

.cp-input-box {
    width: 80%;
    max-width: 320px;
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    animation: zoomIn 0.2s ease;
    display: flex;
    flex-direction: column;
}
.cp-input-title { font-weight: bold; margin-bottom: 15px; color: #333; text-align: center; font-size: 16px; }
#cp-input-text {
    width: 100%; height: 100px;
    border: 1px solid #eee; border-radius: 12px;
    padding: 10px; font-size: 15px; outline: none;
    background: #f9f9f9; resize: none; margin-bottom: 15px;
    box-sizing: border-box;
}
.cp-btn-row { display: flex; gap: 10px; }
.cp-btn { flex: 1; padding: 12px 0; text-align: center; border-radius: 12px; font-size: 14px; font-weight: 600; cursor: pointer; }
.cp-btn.cancel { background: #f2f2f2; color: #666; }
.cp-btn.confirm { background: #000; color: #fff; }

@keyframes zoomIn { 
    from { opacity: 0; transform: scale(0.9); } 
    to { opacity: 1; transform: scale(1); } 
}
/* --- æƒ…ä¾£ç©ºé—´ï¼šç»æœŸæ—¥åŽ†æ ·å¼ --- */

/* æ—¥åŽ†å¤´éƒ¨ */
.cp-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5px;
    margin-bottom: 10px;
}
.cp-cal-month {
    font-size: 20px;
    font-weight: 800;
    color: #333;
}
.cp-cal-controls i {
    font-size: 18px;
    color: #333;
    padding: 5px 10px;
    cursor: pointer;
}

/* æ˜ŸæœŸæŠ¬å¤´ */
.cp-week-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

/* æ—¥åŽ†ç½‘æ ¼ */
.cp-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    /* è‡ªåŠ¨å¡«å……é«˜åº¦ï¼Œä½¿å…¶é“ºæ»¡ */
    grid-auto-rows: 1fr; 
    gap: 8px 0;
    padding-bottom: 20px;
}

/* æ—¥æœŸå•å…ƒæ ¼ */
.cp-date-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 50px;
    cursor: pointer;
    position: relative;
}

.cp-date-num {
    font-size: 16px;
    color: #333;
    z-index: var(--z-base);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 500;
}

/* ä»Šå¤©çš„ç‰¹æ®Šæ ·å¼ (æ–‡å­—ä¸‹é¢åŠ ä¸ªç‚¹æˆ–è€…åœˆ) */
.cp-date-cell.is-today .cp-date-num {
    border: 1px solid #E33B65;
    color: #E33B65;
    font-weight: 700;
}

/* --- çŠ¶æ€é¢œè‰²åœ†åœˆ (æ¨¡ä»¿å›¾ç¤º) --- */

/* 1. ç»æœŸ (å®žå¿ƒç²‰çº¢) */
.cp-date-cell.status-period .cp-date-num {
    background-color: #FF5276;
    color: #fff;
    box-shadow: 0 2px 8px rgba(255, 82, 118, 0.4);
}

/* 2. é¢„æµ‹ç»æœŸ (æµ…ç²‰æ¡çº¹æˆ–æµ…è‰²) */
.cp-date-cell.status-predict .cp-date-num {
    background-color: #FFDce5; /* æµ…ç²‰ */
    color: #FF5276;
    /* åŠ ä¸Šæ–œçº¹æ•ˆæžœæ›´åƒé¢„æµ‹ */
    background-image: repeating-linear-gradient(
      45deg,
      transparent,
      transparent 2px,
      rgba(255, 255, 255, 0.5) 2px,
      rgba(255, 255, 255, 0.5) 4px
    );
}

/* 3. æŽ’åµæœŸ (æµ…è“) */
.cp-date-cell.status-fertile .cp-date-num {
    background-color: #5AC8FA;
    color: #fff;
}

/* 4. æŽ’åµæ—¥ (ç´«è‰²/æ·±è“) */
.cp-date-cell.status-ovulation .cp-date-num {
    background-color: #9d75ff; /* ç´«è‰² */
    color: #fff;
    box-shadow: 0 2px 8px rgba(157, 117, 255, 0.4);
}

/* å¿ƒå½¢å°å›¾æ ‡ (å¯é€‰ï¼Œæ”¾åœ¨æ—¥æœŸä¸‹æ–¹) */
.cp-date-icon {
    font-size: 8px;
    margin-top: 2px;
    color: #FF5276;
    display: none;
}
.cp-date-cell.has-record .cp-date-icon { display: block; }

/* åº•éƒ¨å›¾ä¾‹ */
.cp-legend-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}
.cp-legend-item {
    display: flex;
    align-items: center;
    font-size: 11px;
    color: #666;
    gap: 4px;
}
.cp-dot { width: 8px; height: 8px; border-radius: 50%; display: block; }
.l-period { background: #FF5276; }
.l-predict { background: #FFDce5; }
.l-fertile { background: #5AC8FA; }
.l-ovulation { background: #9d75ff; }

/* çŠ¶æ€é€‰æ‹©å¼¹çª— */
.cp-period-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}
.cp-p-opt {
    padding: 12px;
    border-radius: 12px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: #fff;
}
.cp-p-opt.period { background: #FF5276; }
.cp-p-opt.predict { background: #FFDce5; color: #FF5276; }
.cp-p-opt.fertile { background: #5AC8FA; }
.cp-p-opt.ovulation { background: #9d75ff; }
.cp-p-opt.clear { background: #f0f0f0; color: #666; }

/* --- ä¿¡ç®± (Letter) å®¹å™¨ --- */
.cp-letter-container {
    padding: 30px 20px;
    position: relative; /* å¿…é¡»ä¿ç•™ï¼Œä½œä¸ºè¿žçº¿çš„å®šä½åŸºå‡† */
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 50px; /* å¢žåŠ å¡ç‰‡åž‚ç›´é—´è·ï¼Œè®©è¿žçº¿ç¨å¾®é•¿ä¸€ç‚¹ï¼Œæ›´å¥½çœ‹ */
    min-height: 100%;
}

/* âŒ åˆ é™¤ä¸­é—´çš„åž‚ç›´æ—¶é—´è½´çº¿ï¼Œå› ä¸ºä½ è¯´ä¸éœ€è¦ä¸­é—´æœ‰ç«–çº¿ */
.cp-letter-timeline-line {
    display: none; 
}

/* --- å¡ç‰‡æ ·å¼ (ä¾¦æŽ¢çº¿ç´¢æ¿/æ‹ç«‹å¾—é£Žæ ¼) --- */
.cp-letter-card {
    position: relative;
    width: 46%; /* å·¦å³äº¤é”™ */
    background: #fff;
    /* æ¨¡ä»¿çº¸å¼ è´¨æ„Ÿ */
    padding: 15px 15px 25px 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); 
    z-index: var(--z-base);
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    gap: 8px;
    
    /* ç¨å¾®åŠ ä¸€ç‚¹çº¸å¼ çº¹ç†èƒŒæ™¯ */
    background-image: linear-gradient(to bottom, #fafafa 0%, #fff 100%);
    border: 1px solid #eee;
}

.cp-letter-card:active {
    transform: scale(0.98) !important; /* ç‚¹å‡»å¾®ç¼© */
}

/* å·¦å³äº¤é”™å¸ƒå±€ */
.cp-letter-card.left {
    align-self: flex-start;
    transform: rotate(-3deg); /* å‘å·¦æ­ªä¸€ç‚¹ */
    margin-right: auto;
}

.cp-letter-card.right {
    align-self: flex-end;
    transform: rotate(2deg); /* å‘å³æ­ªä¸€ç‚¹ */
    margin-left: auto;
}

/* --- å¤§å¤´é’ˆ (Pin) æ•ˆæžœ --- */
.cp-letter-card::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #333; /* é»‘è‰²åœ†é’‰ */
    box-shadow: 1px 2px 4px rgba(0,0,0,0.3);
    z-index: var(--z-content);
    top: -6px; /* é’‰åœ¨å¡ç‰‡æ­£ä¸Šæ–¹ä¸­é—´ */
    left: 50%;
    transform: translateX(-50%);
}

.cp-lines-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; 
    z-index: var(--z-background);
    overflow: visible;
}

/* è¿žçº¿çš„æ ·å¼ */
.cp-connection-line {
    stroke: #666;      /* çº¿æ¡é¢œè‰²ï¼šæ·±ç°ï¼Œåƒæ£‰çº¿ */
    stroke-width: 1.5px; /* çº¿æ¡ç²—ç»† */
    stroke-opacity: 0.6; /* ç¨å¾®é€æ˜Žä¸€ç‚¹ï¼Œä¸æŠ¢çœ¼ */
    fill: none;
    /* å¦‚æžœæƒ³è¦è™šçº¿æ•ˆæžœï¼Œå¯ä»¥åŠ è¿™å¥: stroke-dasharray: 5, 5; */
}

/* --- å¡ç‰‡æ ·å¼è°ƒæ•´ --- */
.cp-letter-card {
    /* ä¿æŒåŽŸæœ‰çš„æ ·å¼ä¸å˜ */
    position: relative;
    width: 46%;
    background: #fff;
    padding: 15px 15px 25px 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); 
    z-index: var(--z-base);
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background-image: linear-gradient(to bottom, #fafafa 0%, #fff 100%);
    border: 1px solid #eee;
}

/* å·¦å³äº¤é”™è§’åº¦ç¨å¾®å¤§ä¸€ç‚¹ï¼Œå¢žåŠ ä¸è§„åˆ™æ„Ÿ */
.cp-letter-card.left {
    align-self: flex-start;
    transform: rotate(-3deg); 
    margin-right: auto;
}

.cp-letter-card.right {
    align-self: flex-end;
    transform: rotate(3deg); 
    margin-left: auto;
}

/* --- å¤§å¤´é’ˆ (Pin) --- */
.cp-letter-card::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #333;
    box-shadow: 1px 2px 4px rgba(0,0,0,0.3);
    z-index: var(--z-content);
    top: -6px; /* é’‰åœ¨å¡ç‰‡æ­£ä¸Šæ–¹ä¸­é—´ */
    left: 50%;
    transform: translateX(-50%);
    /* ç»™è¿™ä¸ªé’‰å­åŠ ä¸ªæ ‡è®°ï¼Œæ–¹ä¾¿JSæ‰¾åˆ°å®ƒçš„ä½ç½® */
    pointer-events: none;
}

/* âŒ å½»åº•åˆ é™¤ä¹‹å‰çš„ ::after è¿žçº¿ä»£ç ï¼Œæˆ‘ä»¬çŽ°åœ¨ç”¨ JS ç”»çœŸçº¿ */
.cp-letter-card::after {
    display: none;
}


/* --- å¡ç‰‡å†…éƒ¨æŽ’ç‰ˆ --- */

/* 1. ç¬¬ä¸€è¡Œï¼šæ•°å­— + æ¨ªçº¿ */
.cp-l-header-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.cp-l-num {
    font-size: 24px;
    font-weight: 700; /* ç²—ä½“ */
    font-family: 'Times New Roman', serif; /* è¡¬çº¿ä½“æ›´å¥½çœ‹ */
    color: #333;
    line-height: 1;
}

/* é‚£ä¸ªæ¨ªçº¿ */
.cp-l-sep-line {
    flex: 1; /* å æ»¡å‰©ä½™å®½åº¦ */
    height: 1px;
    background-color: #333; /* é»‘çº¿ */
    opacity: 0.8;
}

/* 2. ç¬¬äºŒè¡Œï¼šæ ‡é¢˜ */
.cp-l-title {
    font-size: 14px;
    font-weight: 700;
    color: #000;
    margin: 5px 0 10px 0;
    line-height: 1.4;
    text-align: left; /* æ ‡é¢˜å·¦å¯¹é½ */
    
    /* æœ€å¤šæ˜¾ç¤ºä¸¤è¡Œæ ‡é¢˜ï¼Œå¤šäº†çœç•¥ */
    display: -webkit-box;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* âŒ éšè—æ­£æ–‡é¢„è§ˆ (æ ¸å¿ƒè¦æ±‚) */
.cp-l-preview {
    display: none !important;
}

/* 3. ç¬¬ä¸‰è¡Œï¼šFrom å’Œ Date */
.cp-l-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    color: #999;
    font-family: serif; /* è¡¬çº¿ä½“ */
    margin-top: auto; /* æŽ¨åˆ°åº•éƒ¨ */
}

.cp-l-from {
    font-style: italic;
    color: #666;
    font-weight: 600;
}

/* --- å†™ä¿¡å¼¹çª—æ ·å¼ --- */
.cp-letter-input-title {
    width: 100%;
    border: none;
    border-bottom: 1px solid #eee;
    padding: 10px 0;
    font-size: 16px;
    font-weight: 600;
    outline: none;
    background: transparent;
    margin-bottom: 15px;
}

.cp-letter-input-area {
    flex: 1;
    width: 100%;
    border: none;
    background: #f9f9f9;
    border-radius: 12px;
    padding: 15px;
    font-size: 14px;
    line-height: 1.6;
    outline: none;
    resize: none;
}

/* --- è¯»ä¿¡å…¨å±æ ·å¼ (Paper View) --- */
.cp-letter-paper-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    z-index: var(--z-popover);
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}
.cp-letter-paper-overlay.active { display: flex; opacity: 1; }

.cp-letter-paper {
    width: 90%;
    max-width: 400px;
    height: 85vh; /* é•¿ä¿¡çº¸ */
    background: #fffdf5; /* ç±³é»„è‰²çº¸å¼  */
    border-radius: 2px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    padding: 30px;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cp-letter-paper-overlay.active .cp-letter-paper { transform: translateY(0); }

/* çº¸å¼ çº¹ç† */
.cp-paper-texture {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: linear-gradient(#e6e6e6 1px, transparent 1px);
    background-size: 100% 30px; /* è¡Œé—´è· */
    opacity: 0.15;
    pointer-events: none;
}

.cp-paper-header {
    display: flex;
    justify-content: space-between;
    font-family: 'Times New Roman', serif;
    color: #999;
    font-size: 12px;
    margin-bottom: 20px;
}

.cp-paper-title {
    font-size: 20px;
    font-weight: 800;
    color: #333;
    text-align: center;
    margin-bottom: 10px;
    font-family: serif;
}

.cp-paper-line {
    width: 40px;
    height: 2px;
    background: #333;
    margin: 0 auto 20px auto;
}

.cp-paper-body {
    flex: 1;
    overflow-y: auto;
    font-size: 15px;
    line-height: 30px; /* å¯¹é½ç½‘æ ¼çº¿ */
    color: #444;
    white-space: pre-wrap;
    text-align: justify;
    padding-bottom: 20px;
    font-family: serif; /* è¡¬çº¿ä½“æ›´æœ‰ä¹¦ä¿¡æ„Ÿ */
}

.cp-paper-footer {
    text-align: right;
    font-family: serif;
    font-size: 14px;
    color: #666;
    margin-top: 10px;
    font-style: italic;
}

.cp-paper-close {
    position: absolute;
    top: 15px; right: 15px;
    font-size: 20px;
    color: #ccc;
    cursor: pointer;
}
.cp-paper-close:hover { color: #333; }

/* --- æžç®€æ¶²æ€èœå•ä¸“ç”¨æ ·å¼ --- */

/* 1. èœå•å®¹å™¨ï¼šå–æ¶ˆé»˜è®¤çš„ç™½è‰²å¤§èƒŒæ™¯ï¼Œæ”¹ä¸ºé€æ˜Žå¸ƒå±€å®¹å™¨ */
.simple-glass-menu {
    width: 280px;
    display: flex;
    flex-direction: column;
    gap: 12px; /* ä¸Šä¸‹ä¸¤ç»„æŒ‰é’®çš„é—´è· */
    animation: popupScale 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* 2. æŒ‰é’®ç»„å®¹å™¨ (ä¸Šé¢ä¸¤ä¸ªæŒ‰é’®åŒ…åœ¨ä¸€èµ·) */
.sg-group {
    display: flex;
    flex-direction: column;
    /* æ¶²æ€çŽ»ç’ƒæ ¸å¿ƒ */
    background: rgba(255, 255, 255, 0.75); 
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border-radius: 14px;
    overflow: hidden;
    /* çŽ»ç’ƒå…‰æ³½è¾¹æ¡† */
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* 3. æŒ‰é’®é€šç”¨æ ·å¼ (çº¯æ–‡å­—åŒ…è£¹) */
.sg-btn {
    height: 56px; /* æŒ‰é’®é«˜åº¦ï¼Œæ–¹ä¾¿ç‚¹å‡» */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #333; /* é»˜è®¤é»‘è‰²æ–‡å­— */
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    /* ç¡®ä¿æ–‡å­—å±…ä¸­ */
    text-align: center;
}

/* ç‚¹å‡»æ—¶çš„åé¦ˆ (å˜æ·±ä¸€ç‚¹) */
.sg-btn:active {
    background: rgba(255, 255, 255, 0.5);
}

/* 4. åˆ†å‰²çº¿ (æžç»†) */
.sg-line {
    height: 1px;
    background: rgba(0, 0, 0, 0.1); /* å¾ˆæ·¡çš„é»‘çº¿ */
    width: 100%;
}

/* 5. å±é™©æ“ä½œ (è§£é™¤å…³ç³») - åªæœ‰æ–‡å­—å˜çº¢ï¼Œæ²¡æœ‰å…¶ä»–èŠ±å“¨çš„ */
.sg-btn.danger {
    color: #ff3b30; 
    font-weight: 600;
}

/* 6. å–æ¶ˆæŒ‰é’® (ç‹¬ç«‹çš„ä¸€å—çŽ»ç’ƒ) */
.sg-btn.cancel {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border-radius: 14px;
    color: #007aff; /* è“è‰²æ–‡å­—è¡¨ç¤ºå–æ¶ˆ */
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* è¦†ç›–å¯èƒ½å­˜åœ¨çš„æ—§æ ·å¼å¹²æ‰° */
#couple-settings-modal .glass-popup-box {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    width: auto !important;
}

/* --- â˜…â˜…â˜… ä¿®å¤ï¼šæƒ…ä¾£é—®ç­” (Questions) ç¼ºå¤±çš„æ ·å¼ â˜…â˜…â˜… --- */

/* 1. é—®ç­”åˆ—è¡¨å®¹å™¨ */
#cp-questions-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-bottom: 20px;
}

/* 2. é—®é¢˜å¡ç‰‡ä¸»ä½“ */
.cp-qa-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
    border: 1px solid rgba(0,0,0,0.02);
}
.cp-qa-card:active {
    transform: scale(0.99);
}

/* 3. é—®é¢˜æ ‡é¢˜ */
.cp-qa-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 6px;
    line-height: 1.4;
}

/* 4. å‰¯æ ‡é¢˜ (æ ‡ç­¾ã€æ—¥æœŸ) */
.cp-qa-sub {
    font-size: 11px;
    color: #999;
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

/* 5. åˆ†å‰²çº¿ */
.cp-qa-line {
    width: 100%;
    height: 1px;
    background: #f5f5f5;
    margin-bottom: 12px;
}

/* 6. å›žç­”åŒºåŸŸå— */
.cp-qa-answer-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 7. å›žç­”è¡Œ (åå­—+å†…å®¹) */
.cp-qa-row {
    display: flex;
    align-items: flex-start;
    font-size: 14px;
    line-height: 1.6;
}

/* åå­—æ ·å¼ */
.cp-qa-name {
    font-weight: 700;
    white-space: nowrap;
    margin-right: 6px;
    min-width: fit-content;
}
.cp-qa-name.is-me { color: #666; }    /* æˆ‘çš„åå­—é¢œè‰² */
.cp-qa-name.is-char { color: #666; }     /* å¯¹æ–¹åå­—é¢œè‰² */

/* å†…å®¹æ ·å¼ */
.cp-qa-text {
    color: #555;
    word-break: break-all;
    flex: 1;
}

/* 8. æŒ‰é’®å®¹å™¨ */
.cp-qa-btn-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-top: 5px;
}

/* 9. ä¿®æ”¹æŒ‰é’® (å°) */
.cp-qa-action-btn {
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 12px;
    background: #f7f7f7;
    color: #888;
    cursor: pointer;
    border: 1px solid #eee;
    transition: all 0.2s;
}
.cp-qa-action-btn:active {
    background: #e0e0e0;
    color: #333;
}

.cp-qa-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    width: 100%;
}

/* ç°è‰²è¾“å…¥æ¡† */
.cp-qa-inline-input {
    flex: 1;
    background: #f5f5f5; /* ç°è‰²èƒŒæ™¯ */
    border: 1px solid #eee;
    border-radius: 30px; /* åœ†è§’èƒ¶å›ŠçŠ¶ */
    padding: 8px 12px;
    font-size: 13px;
    color: #333;
    outline: none;
    font-family: inherit;
    transition: background 0.2s;
}

.cp-qa-inline-input:focus {
    background: #fff;
    border-color: #ddd;
}

/* å‘é€æŒ‰é’® */
.cp-qa-inline-btn {
    font-size: 13px;
    font-weight: 600;
    color: #333; /* é»‘è‰²æ–‡å­— */
    padding: 6px 12px;
    background: #e0e0e0;
    border-radius: 15px;
    cursor: pointer;
    white-space: nowrap;
    border: none;
}

.cp-qa-inline-btn:active {
    background: #d0d0d0;
}

/* --- é—®ç­”å·¦æ»‘åˆ é™¤æ ·å¼ --- */

/* 1. å¤–å±‚åŒ…è£¹å®¹å™¨ (éšè—è¶…å‡ºçš„åˆ é™¤æŒ‰é’®) */
.cp-qa-swipe-container {
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden; /* å…³é”®ï¼šéšè—å³è¾¹çš„åˆ é™¤æŒ‰é’® */
    border-radius: 18px; /* ä¿æŒåœ†è§’ */
    margin-bottom: 15px; /* å¡ç‰‡é—´è· */
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

/* 2. å®žé™…æ»‘åŠ¨çš„å¡ç‰‡å±‚ */
.cp-qa-card-slider {
    position: relative;
    z-index: var(--z-base);
    background: #ffffff;
    width: 100%;
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1); /* å¹³æ»‘å›žå¼¹ */
    /* æ³¨æ„ï¼šè¦æŠŠåŽŸæ¥ .cp-qa-card çš„ margin å’Œ shadow ç§»åˆ°å®¹å™¨ä¸Šï¼Œè¿™é‡ŒåŽ»æŽ‰ */
    box-shadow: none !important;
    margin-bottom: 0 !important;
    border-radius: 18px; /* ä¿æŒåœ†è§’ */
}

/* 3. çº¢è‰²åˆ é™¤æŒ‰é’® (å®šä½åœ¨å³ä¾§) */
.cp-qa-delete-action {
    position: absolute;
    top: 0;
    right: 0;
    width: 70px;
    height: 100%;
    background-color: #ff3b30;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: var(--z-base);
    border-radius: 0 18px 18px 0;
    opacity: 0; 
    transition: opacity 0.2s ease;
}

/* --- æ¶ˆæ¯ç¿»è¯‘åŠŸèƒ½æ ·å¼ --- */

/* åˆ†å‰²çº¿ */
.msg-trans-line {
    width: 100%;
    height: 1px;
    background-color: rgba(0, 0, 0, 0.1); /* æ·¡æ·¡çš„é»‘çº¿ */
    margin: 8px 0;
    display: block;
}

/* é»‘æš—æ¨¡å¼/æ·±è‰²æ°”æ³¡é€‚é… (ç”¨æˆ·å‘çš„æ¶ˆæ¯å¦‚æžœæ˜¯æ·±è‰²èƒŒæ™¯) */
.Miu-miu.user .content .msg-trans-line {
    background-color: rgba(255, 255, 255, 0.2); /* æ·¡æ·¡çš„ç™½çº¿ */
}

/* ç¿»è¯‘åŽçš„æ–‡å­— */
.msg-trans-text {
    font-size: 12px; /* æ¯”æ­£æ–‡ç¨å° */
    line-height: 1.4;
    opacity: 0.85;   /* ç¨å¾®æ·¡ä¸€ç‚¹ */
    font-weight: 400;
}

/* 1. åˆ—è¡¨å®¹å™¨ï¼šæ¸…ç†å¤šä½™çš„å†…è¾¹è· */
.cp-mood-timeline {
    padding: 20px 15px; /* ç»™å·¦å³ç•™ç‚¹ç©ºéš™ */
    padding-bottom: 50px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px; /* æ¯æ¡æ—¥è®°ä¹‹é—´çš„é—´è· */
    overflow-y: auto;
    overflow-x: hidden;
}

/* 2. å•æ¡æ—¥è®°å®¹å™¨ */
.mood-node {
    display: flex;
    flex-direction: column; /* åž‚ç›´æŽ’åˆ—ï¼šä¸Šé¢æ˜¯æ—¶é—´ï¼Œä¸‹é¢æ˜¯å¡ç‰‡ */
    width: 100%;
    margin-bottom: 5px;
}

/* å·¦å³å¯¹é½é€»è¾‘ */
.mood-node.left {
    align-items: flex-start; /* å¯¹æ–¹é å·¦ */
}
.mood-node.right {
    align-items: flex-end;   /* æˆ‘é å³ */
}

/* 3. æ–°å¢žï¼šæ—¶é—´æ—¥æœŸæ ‡ç­¾æ ·å¼ */
.mood-date-tag {
    font-size: 11px;
    color: #b0b0b0; /* æµ…ç°è‰²ï¼Œä¸æŠ¢çœ¼ */
    margin-bottom: 6px;
    font-family: Arial, sans-serif;
    padding: 0 4px; /* ç¨å¾®è·Ÿè¾¹ç¼˜æœ‰ç‚¹è·ç¦» */
}

/* 4. ç›´è§’å¡ç‰‡æ ·å¼ (ä¿æŒä½ å–œæ¬¢çš„ç›´è§’é£Žæ ¼) */
.mood-unified-card {
    background: #ffffff;
    padding: 10px 14px;
    
    /* ç›´è§’ */
    border-radius: 2px !important; 
    
    /* çº¸æ¡è¾¹æ¡† */
    border: 1px solid #e0e0e0 !important;
    
    /* çº¸æ¡æŠ•å½± */
    box-shadow: 2px 2px 5px rgba(0,0,0,0.03) !important;
    
    display: inline-flex;
    align-items: center; 
    gap: 10px; 
    max-width: 85%; /* é™åˆ¶æœ€å¤§å®½åº¦ï¼Œé˜²æ­¢å¤ªé•¿ */
}

/* åªæœ‰å³ä¾§(æˆ‘)çš„æ¶ˆæ¯ï¼Œè®©è´´å›¾åœ¨å³è¾¹ï¼Œæ–‡å­—åœ¨å·¦è¾¹ */
.mood-node.right .mood-unified-card {
    flex-direction: row-reverse; 
}

/* è´´å›¾å¤§å° */
.mood-sticker-img {
    width: 28px; 
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}

/* æ–‡å­—æ ·å¼ï¼šæ‰‹å†™æ„Ÿ/æ—¥è®°æ„Ÿ */
.mood-text-content {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-all;
    text-align: left;
    /* å­—ä½“å»ºè®®ï¼Œå¦‚æžœä¸å–œæ¬¢å¯ä»¥åŽ»æŽ‰è¿™è¡Œ */
    font-family: serif; 
}

/* å·¦ä¾§ (Char) - å†…å®¹åœ¨å·¦ï¼Œå¾€å³å¯¹é½ */
.mood-node.left .mood-wrapper-side {
    justify-content: flex-end; 
    padding-right: 20px; /* ç»™åœ†ç‚¹ç•™ç©ºéš™ */
}

/* å³ä¾§ (Me) - å†…å®¹åœ¨å³ï¼Œå¾€å·¦å¯¹é½ */
.mood-node.right .mood-wrapper-side {
    margin-left: 50%;
    justify-content: flex-start;
    padding-left: 20px; /* ç»™åœ†ç‚¹ç•™ç©ºéš™ */
}

/* 5. æ ¸å¿ƒï¼šé•¿æ¡å½¢æ–‡å­—æ¡† (è‡ªé€‚åº”é«˜åº¦) */
.mood-unified-card {
    background: #ffffff;
    
    /* ä¸Šä¸‹å†…è¾¹è·ï¼Œå·¦å³å†…è¾¹è· */
    padding: 8px 12px; 
    
    border-radius: 8px; /* å°åœ†è§’ */
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    
    display: inline-flex;
    align-items: center; /* å›¾æ ‡å’Œæ–‡å­—åž‚ç›´å±…ä¸­ */
    gap: 8px; 
    
    position: relative;
    z-index: var(--z-base);
    height: auto; 
    min-height: 36px;
    max-width: 100%; /* é˜²æ­¢æ’‘ç ´å±å¹• */
}

/* å³ä¾§(æˆ‘)çš„æ¶ˆæ¯ï¼Œè´´å›¾åœ¨å³ï¼Œæ–‡å­—åœ¨å·¦ */
.mood-node.right .mood-unified-card {
    flex-direction: row-reverse; 
}

/* 6. å†…å®¹å…ƒç´ å¾®è°ƒ */
.mood-sticker-img {
    width: 32px; 
    height: 32px;
    object-fit: contain;
    flex-shrink: 0; /* é˜²æ­¢è´´å›¾è¢«æŒ¤æ‰ */
}

.mood-text-content {
    font-size: 13px;
    color: #444;
    font-weight: 500;
    
    /* â˜…â˜…â˜… æ ¸å¿ƒä¿®å¤ï¼šå…è®¸æ¢è¡Œï¼Œç¦æ­¢çœç•¥å· â˜…â˜…â˜… */
    white-space: pre-wrap;  /* ä¿ç•™æ¢è¡Œç¬¦ï¼Œè‡ªåŠ¨æ¢è¡Œ */
    word-break: break-all;  /* é•¿å•è¯å¼ºåˆ¶æ¢è¡Œ */
    overflow: visible;      /* æ˜¾ç¤ºæ‰€æœ‰å†…å®¹ */
    line-height: 1.5;       /* å¢žåŠ è¡Œé«˜ï¼Œå¤šè¡Œæ—¶æ›´å¥½çœ‹ */
    max-width: 130px;       /* é™åˆ¶æ–‡å­—æœ€å¤§å®½åº¦ï¼Œå¼ºåˆ¶å¤šè¡Œ */
    text-align: left;
}

/* æ—¶é—´æˆ³ï¼šæ”¾åœ¨å¡ç‰‡ä¸Šæ–¹ */
.mood-time-label {
    position: absolute;
    top: -18px; 
    font-size: 10px;
    color: #ccc;
    font-family: Arial, sans-serif;
    white-space: nowrap;
}

/* æ—¶é—´å¯¹é½å¾®è°ƒ */
.mood-node.left .mood-time-label { right: 20px; }
.mood-node.right .mood-time-label { left: 20px; }

/* 7. â˜…â˜…â˜… æ¢å¤è¾“å…¥æ¡†æ ·å¼ â˜…â˜…â˜… */
/* å¼ºåˆ¶è¦†ç›–ä¹‹å‰ä»»ä½•å¯èƒ½å¯¼è‡´å±…ä¸­çš„æ ·å¼ */
.cp-mood-input {
    width: 100%; 
    height: 100px;
    background: #f7f7f7 !important; 
    border: 1px solid #eee !important;
    border-radius: 12px; 
    padding: 12px !important;
    font-size: 14px !important; 
    color: #333 !important;
    outline: none; 
    resize: none;
    text-align: left !important; /* æ ¸å¿ƒï¼šå·¦å¯¹é½ */
    box-sizing: border-box;
    font-family: inherit;
}

/* ä¿æŒå¼¹çª—é€‰å›¾ç½‘æ ¼æ­£å¸¸ */
.cp-mood-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}
.cp-mood-option {
    display: flex; flex-direction: column; align-items: center;
}
.cp-mood-option img { width: 45px; height: 45px; }

/* ========================================= */
/* â˜…â˜…â˜… é’±åŒ…åŠŸèƒ½æ ·å¼ (å®Œç¾Žå¤åˆ» SVG ç‰ˆ) â˜…â˜…â˜… */
/* ========================================= */

#wallet-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: var(--z-page-secondary);
    display: none;
    flex-direction: column;
    background: #fff;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#wallet-overlay.active {
    transform: translateX(0);
}

/* èƒŒæ™¯å±‚ */
#wallet-bg-layer {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: #FFF2F4; 
    background-size: cover;
    background-position: center;
    z-index: var(--z-background);
}

/* é¡¶éƒ¨å¯¼èˆªå®¹å™¨ */
.wallet-nav-bar {
    position: relative;
    z-index: var(--z-content);
    padding-top: calc(10px + env(safe-area-inset-top));
    padding-bottom: 5px; 
    padding-left: 15px;
    padding-right: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-shadow: none;
    color: #333;
}

.wallet-nav-title {
    font-size: 18px;
    font-weight: 700;
}

/* å·¦ä¾§ï¼šäº¤æ¢å›¾æ ‡ (SVG å®¹å™¨) */
.wallet-nav-icon-left {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    cursor: pointer;
    position: relative; /* ç”¨äºŽå åŠ  SVG */
    opacity: 1;
    transition: opacity 0.2s;
}

.wallet-nav-icon-left svg {
    /* ç¡®ä¿ SVG é¢œè‰²æ­£ç¡® */
    stroke: #2b91f0; 
}

.wallet-nav-icon-left:active { 
    opacity: 0.6; 
}

/* å³ä¾§ï¼šè£…é¥° (è“è‰²åœ†åœˆ+ç™½ç‚¹) - å·²ç¼©å°å°ºå¯¸ */
.wallet-menu-circle {
    width: 24px;   /* ä»Ž 32px æ”¹ä¸º 24pxï¼Œæ›´å°å·§ */
    height: 24px;  /* ä»Ž 32px æ”¹ä¸º 24px */
    background-color: #007aff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 10px; /* å›¾æ ‡æ–‡å­—ä¹Ÿç›¸åº”è°ƒå° */
    box-shadow: 0 2px 5px rgba(0, 122, 255, 0.25);
    cursor: pointer;
}

/* æ»šåŠ¨åŒºåŸŸ */
.wallet-scroll-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    position: relative;
    z-index: var(--z-base);
    -webkit-overflow-scrolling: touch;
}

/* é€šç”¨ç™½è‰²å¡ç‰‡ */
.w-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    margin-bottom: 15px;
}

/* 1. å‡€èµ„äº§å¡ç‰‡ */
.w-asset-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.w-asset-label {
    font-size: 13px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* å‡€èµ„äº§å¤§æ•°å­— */
.w-asset-num {
    font-size: 32px;
    font-weight: 800;
    color: #000;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
    letter-spacing: -0.5px;
    cursor: pointer; 
    border-bottom: none !important;
    display: inline-block;
    width: fit-content;
}
.w-asset-num:active { opacity: 0.6; }

/* 2. æ”¶æ”¯æ¦‚è§ˆè¡Œ */
.w-row-summary {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.w-summary-item {
    flex: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.w-sum-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
}

.w-sum-num {
    font-size: 18px;
    font-weight: 700;
    font-family: -apple-system, sans-serif;
    color: #000;
}

/* 3. äº¤æ˜“åˆ—è¡¨æ ·å¼ - æ—¥æœŸæ ä¸Šç§» */
.w-date-header {
    font-size: 12px;
    color: #888;
    /* â˜… æ ¸å¿ƒï¼šä¸Šé—´è·æžå°ï¼Œè®©åˆ—è¡¨ç´§è´´ä¸Šæ–¹ */
    margin: 5px 5px 8px 5px !important; 
    font-weight: 500;
    display: flex;
    justify-content: space-between;
}

.w-trans-card-group {
    background: #ffffff;
    border-radius: 16px;
    padding: 5px 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    margin-bottom: 10px;
}

.w-trans-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f5f5f5;
}
.w-trans-item:last-child { border-bottom: none; }

/* ç®­å¤´å›¾æ ‡å®¹å™¨ */
.w-arrow-box {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-right: 12px;
    flex-shrink: 0;
    font-size: 18px;
}
.w-arrow-box.expense { background-color: #555555; }
.w-arrow-box.income { background-color: #34C759; }

.w-trans-info { flex: 1; display: flex; flex-direction: column; }
.w-trans-name { font-size: 16px; font-weight: 600; color: #333; margin-bottom: 2px; }
.w-trans-time { font-size: 11px; color: #aaa; }
.w-trans-amount { font-size: 16px; font-weight: 600; font-family: -apple-system, sans-serif; text-align: right; color: #333; }

#wallet-menu-overlay { z-index: var(--z-popover); }

/* --- 1. äº²å±žå¡å›¾æ ‡ (ç°è‰²çº¿æ¡é£Žæ ¼) --- */
.icon-relative-bg {
    width: 100%;
    height: 100%;
    /* ä½¿ç”¨ç°è‰² (#666666) ç»˜åˆ¶ï¼Œå¡ç‰‡+çˆ±å¿ƒå½¢çŠ¶ */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3crect x='2' y='5' width='20' height='14' rx='2' stroke='%23666666' stroke-width='2'/%3e%3cpath d='M12 14.5C12 14.5 14 12.5 16 12.5C18 12.5 19 13.5 19 15' stroke='%23666666' stroke-width='1.5' stroke-linecap='round'/%3e%3cpath d='M7 10H10' stroke='%23666666' stroke-width='2' stroke-linecap='round'/%3e%3cpath d='M7 14H12' stroke='%23666666' stroke-width='2' stroke-linecap='round'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 24px;
    opacity: 0.8;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tool-icon-box:active .icon-relative-bg {
    transform: scale(0.9);
    opacity: 1;
}

/* --- 2. äº²å±žå¡æ°”æ³¡æ ·å¼ (ç°è“èŽ«å…°è¿ªè‰²ç³») --- */

/* å¡ç‰‡æ•´ä½“ï¼šç°è“è‰²èƒŒæ™¯ï¼Œæ— å‘å…‰ */
.transfer-card.relative-card {
    background: #F4F7F9 !important; /* å¾ˆæ·¡çš„ç°è“ */
    background-color: #F4F7F9 !important;
    border: 1px solid #D8E0E8 !important; /* æ·¡è“ç°è¾¹æ¡† */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important; /* æžæ·¡çš„é˜´å½± */
}

/* é¡¶éƒ¨åŒºåŸŸé€æ˜Ž */
.transfer-card.relative-card .transfer-top {
    background: transparent !important;
}

/* é‡Œé¢çš„å›¾æ ‡ (æ·±è“ç°è‰²) */
.transfer-card.relative-card .couple-icon-row {
    color: #5C7080 !important; 
}

/* æ ‡é¢˜ (æ·±ç°) */
.transfer-card.relative-card .couple-title {
    color: #333333 !important;
}

/* å‰¯æ ‡é¢˜/é‡‘é¢ (æµ…ç°) */
.transfer-card.relative-card .couple-subtitle {
    color: #8899A6 !important;
}

/* åˆ†å‰²çº¿ (æ·¡ç™½/ç°) */
.transfer-card.relative-card .transfer-line {
    background-color: rgba(0, 0, 0, 0.05) !important;
}

/* åº•éƒ¨åŒºåŸŸ (ç¨å¾®æ·±ä¸€ç‚¹çš„ç°è“) */
.transfer-card.relative-card .transfer-footer {
    background-color: #EBF0F5 !important;
    color: #5C7080 !important;
    text-align: left !important; /* æ–‡å­—é å·¦ */
    font-weight: 500 !important;
}

/* --- çŠ¶æ€å˜åŒ–é¢œè‰² (å·²é¢†å–/å·²é€€è¿˜) --- */
/* ä¿æŒä¸€ç§æ›´åŠ ä½Žè°ƒçš„ç°è‰² */
.transfer-card.relative-card.accepted,
.transfer-card.relative-card.rejected {
    background: #F8F8F8 !important;
    border-color: #EEEEEE !important;
}
.transfer-card.relative-card.accepted .couple-title,
.transfer-card.relative-card.rejected .couple-title {
    color: #999 !important;
}
.transfer-card.relative-card.accepted .transfer-footer,
.transfer-card.relative-card.rejected .transfer-footer {
    background-color: #F2F2F2 !important;
    color: #CCC !important;
}

/* style.css */

.mask-avatar-menu {
  position: fixed;
  display: none;
  flex-direction: column;
  width: 150px;
  padding: 6px;
  border-radius: 14px;
  background: rgba(255,255,255,0.98);
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  z-index: var(--z-max); 
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
#userMaskPage {
    position: fixed !important; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-settings-sub) !important; 
    background-color: #FFF2F4 !important; 
    display: flex;
    flex-direction: column;
    padding-top: env(safe-area-inset-top);
    box-sizing: border-box;
    overflow: hidden;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
#userMaskPage.active {
    transform: translateX(0);
}

/* style.css */

/* --- å¿«é€Ÿæ ¼å¼ä¿®å¤é¢æ¿æ ·å¼ --- */
.quick-fix-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #eee;
    width: 100%;
}

.quick-fix-title {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
    margin-left: 2px;
    font-weight: 500;
}

.quick-fix-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* ä¾ç„¶æ˜¯ä¸€è¡Œ3ä¸ª */
    gap: 8px; /* é—´è· */
}

.fix-btn {
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 8px 5px;
    display: flex;
    flex-direction: row; /* å›¾æ ‡æ–‡å­—æ¨ªæŽ’ */
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.fix-btn:active {
    background-color: #e5e5e5;
    transform: scale(0.96);
}

.fix-btn i {
    font-size: 14px;
    color: #555;
    width: 16px;
    text-align: center;
}

.fix-btn span {
    font-size: 12px;
    color: #333;
    font-weight: 500;
}

/* --- style.css æœ«å°¾æ·»åŠ  --- */

/* 1. å…¨å±é®ç½© (æ·±è‰²èƒŒæ™¯) */
#activation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000; /* çº¯é»‘èƒŒæ™¯ */
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
}

/* 2. ç™½è‰²æ¿€æ´»å¡ç‰‡ */
.activation-card {
    background: #ffffff;
    width: 80%;
    max-width: 320px;
    border-radius: 20px;
    padding: 30px 25px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(255, 255, 255, 0.1);
    animation: popIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes popIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* 3. æ ‡é¢˜å’Œæ–‡å­— */
.act-title {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin: 0 0 10px 0;
}

.act-desc {
    font-size: 13px;
    color: #888;
    margin-bottom: 25px;
    line-height: 1.5;
}

/* 4. è®¾å¤‡ç ç°è‰²åŒºåŸŸ */
.device-code-box {
    background: #F5F5F7;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border: 1px solid #E5E5EA;
}

.dc-label {
    font-size: 13px;
    color: #333;
    font-weight: 500;
}

.dc-value {
    font-family: monospace;
    font-size: 14px;
    color: #007AFF; /* è“è‰² */
    font-weight: 700;
    letter-spacing: 0.5px;
}

.dc-copy-btn {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    color: #333;
    cursor: pointer;
    transition: background 0.2s;
}
.dc-copy-btn:active { background: #eee; }

/* 5. è¾“å…¥æ¡† */
.act-input {
    width: 100%;
    height: 44px;
    border: 1px solid #E5E5EA;
    border-radius: 10px;
    text-align: center;
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
    outline: none;
    box-sizing: border-box; /* é˜²æ­¢æ’‘ç ´ */
    background: #fff;
}
.act-input:focus { border-color: #007AFF; }

/* 6. æ¿€æ´»æŒ‰é’® */
.act-confirm-btn {
    width: 100%;
    height: 44px;
    background-color: #007AFF;
    color: white;
    border: none;
    border-radius: 22px; /* åœ†æ¶¦æŒ‰é’® */
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}
.act-confirm-btn:active { transform: scale(0.96); }

/* 7. åº•éƒ¨å°å­— */
.act-footer-text {
    margin-top: 15px;
    font-size: 11px;
    color: #ccc;
}

/* ========================================= */
/* â˜…â˜…â˜… è§†é¢‘é€šè¯å®Œæ•´æ ·å¼ (ä¿®å¤ç‰ˆï¼šè´´è¾¹+åŽ»ç™½æ¡†+é£žæœºé å³) â˜…â˜…â˜… */
/* ========================================= */

/* 1. è§†é¢‘é€šè¯å…¨å±å®¹å™¨ */
#video-call-overlay {
    position: fixed;
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    z-index: var(--z-modal); 
    background: #000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#video-call-overlay.active {
    transform: translateY(0);
}

/* 2. AI å…¨å±èƒŒæ™¯å±‚ */
#video-bg-layer {
    position: absolute;
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: var(--z-base); 
    filter: brightness(0.9); 
}

/* 3. ç”¨æˆ·æ‘„åƒå¤´ (å³ä¸Šè§’æ— æ¡†è´´è¾¹) */
.video-user-cam-box {
    position: absolute;
    /* ç´§è´´é¡¶éƒ¨å®‰å…¨åŒº + 5px é—´éš™ */
    top: calc(5px + var(--safe-top));   
    /* ç´§è´´å³ä¾§ */
    right: 5px; 
    
    width: 100px;
    height: 140px;
    
    /* å…³é”®ï¼šåŽ»é™¤èƒŒæ™¯è‰²å’Œè¾¹æ¡† */
    background: transparent;
    border: none;
    box-shadow: none;
    
    border-radius: 12px;
    overflow: hidden;
    z-index: var(--z-popover); 
}

#user-cam-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* é•œåƒ */
    background: transparent;
}

/* 4. é¡¶éƒ¨æ  (Header) */
.vc-header {
    padding-top: calc(10px + var(--safe-top));
    padding-bottom: 10px;
    padding-left: 20px;
    padding-right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    z-index: var(--z-header); 
}

.vc-minimize-btn {
    font-size: 20px;
    opacity: 0.8;
    cursor: pointer;
    padding: 5px;
}

.vc-char-name {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* 5. å±å¹•ä¸­é—´çš„åŠ¨ä½œæå†™ (å­—å¹•é£Žæ ¼) */
#video-status-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: var(--z-header);
    
    font-size: 13px; 
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    
    /* æžæ·¡èƒŒæ™¯ï¼Œä»…ä¸ºäº†çœ‹æ¸…å­— */
    background: rgba(0, 0, 0, 0.2); 
    padding: 4px 12px;              
    border-radius: 20px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    
    text-align: center;
    max-width: 85%;
    line-height: 1.4;
    pointer-events: none;
    
    display: none; 
    transition: opacity 0.2s;
}

/* 6. æ»šåŠ¨æ¶ˆæ¯åŒº */
#videoScrollContent {
    flex: 1;
    overflow-y: auto;
    /* é¡¶éƒ¨ç•™ç™½é¿å¼€æ‘„åƒå¤´ */
    padding-top: 220px; 
    padding-bottom: 20px;
    padding-left: 15px;
    padding-right: 15px;
    z-index: var(--z-content); 
    
    /* é¡¶éƒ¨æ¸å˜é®ç½© */
    mask-image: linear-gradient(to bottom, transparent 0%, black 15%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%);
    
    scrollbar-width: none;
}
#videoScrollContent::-webkit-scrollbar { display: none; }

.vc-msg-row {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 15px;
    flex-shrink: 0;
    animation: vcSlideIn 0.3s ease-out forwards;
}

@keyframes vcSlideIn {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

.vc-msg-row.ai { align-items: flex-start; }
.vc-msg-row.self { align-items: flex-end; }

.vc-msg-text {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 15px;
    line-height: 1.5;
    color: #fff;
    word-wrap: break-word;
    
    background: rgba(0, 0, 0, 0.45); 
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* åŠ¨ä½œæå†™è¡Œ (å±…ä¸­) */
.vc-action-row {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 10px;
    animation: fadeIn 0.5s;
}
.vc-action-text {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    background: rgba(0,0,0,0.25);
    padding: 4px 10px;
    border-radius: 12px;
    font-style: italic;
}

/* 7. åº•éƒ¨è¾“å…¥åŒº (ä¿®å¤çš„æ ¸å¿ƒ) */
.vc-footer-area {
    padding: 15px 20px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    width: 100%;
    z-index: var(--z-card);
}

/* èƒ¶å›Šå®¹å™¨ï¼šè¿™é‡Œè´Ÿè´£ç»Ÿä¸€çš„åŠé€æ˜ŽèƒŒæ™¯ */
.vc-input-capsule {
    width: 100%;
    height: 50px;
    
    /* æ•´ä½“ç£¨ç ‚çŽ»ç’ƒèƒŒæ™¯ */
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    
    border-radius: 30px; 
    
    /* Flex å¸ƒå±€ï¼šä¿è¯å·¦è¾¹è¾“å…¥æ¡†ï¼Œå³è¾¹æŒ‰é’® */
    display: flex;
    align-items: center;
    justify-content: space-between;
    
    padding: 5px 5px 5px 15px; /* å³è¾¹paddingå°ä¸€ç‚¹è®©æŒ‰é’®è´´è¾¹ */
    box-shadow: none;
}

/* è¾“å…¥æ¡†ï¼šé€æ˜ŽåŒ–ï¼ŒæŒ¤å ç©ºé—´ */
#videoInput {
    flex: 1; /* å æ®æ‰€æœ‰å‰©ä½™ç©ºé—´ï¼ŒæŠŠæŒ‰é’®æŒ¤åˆ°æœ€å³ */
    background: transparent;
    border: none;
    outline: none;
    height: 100%;
    color: #fff;
    font-size: 15px;
    padding: 0;
    margin-right: 10px;
}
#videoInput::placeholder {
    color: rgba(255,255,255,0.6);
}

/* å‘é€æŒ‰é’® (å°é£žæœº) */
.vc-send-circle {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2); /* æŒ‰é’®è‡ªå·±çš„å°åœ†åº• */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0; /* é˜²æ­¢è¢«æŒ¤åŽ‹ */
}
.vc-send-circle:active {
    background: rgba(255,255,255,0.4);
}
.vc-send-circle i {
    color: #fff;
    font-size: 16px;
    margin-left: -2px; 
    margin-top: 2px;
}

/* --- æ–°å¢žï¼šæ‹‰é»‘æŒ‰é’®æ ·å¼ --- */
.block-chat-btn {
    width: 100%;
    background: #2c2c2e; /* é»˜è®¤é»‘è‰²ï¼Œå’Œè‹¹æžœç³»ç»Ÿçš„è´¨æ„Ÿç±»ä¼¼ */
    color: #fff;
    padding: 14px;
    border-radius: 12px;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.2s;
    border: 1px solid rgba(0,0,0,0.1);
}

.block-chat-btn:active {
    transform: scale(0.98);
    opacity: 0.9;
}

/* å¤„äºŽæ‹‰é»‘çŠ¶æ€æ—¶çš„æŒ‰é’®æ ·å¼ï¼ˆå˜æˆæµ…è‰²+çº¢å­—ï¼‰ */
.block-chat-btn.blocked {
    background: #FFF2F2;
    color: #FF3B30;
    border: 1px solid #FFD6D6;
}

/* ========================================= */
/* â˜…â˜…â˜… å‘é€å¤±è´¥(è¢«æ‹‰é»‘)çš„çº¢è‰²æ„Ÿå¹å·æ ·å¼ â˜…â˜…â˜… */
/* ========================================= */
.msg-failed-icon {
    color: #ff3b30;
    font-size: 16px; /* â˜… æ”¹å°å­—å·ï¼ŒåŽŸæ¥æ˜¯ 20px */
    margin-right: 4px; /* â˜… ç¼©çŸ­ä¸Žæ—¶é—´æ–‡å­—çš„é—´è· */
    align-self: flex-end; /* â˜… è®©å®ƒè·Ÿæ°”æ³¡åº•éƒ¨å¯¹é½ï¼Œä¸è¦é£˜åœ¨ä¸Šé¢ */
    margin-bottom: 5px; /* â˜… é…åˆåº•éƒ¨å¯¹é½å¾®è°ƒä¸€ä¸‹é«˜åº¦ */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.msg-failed-icon i {
    background: #fff;
    border-radius: 50%;
    /* ç¼©å°ç™½è‰²å¤–åœˆçš„åŽšåº¦ */
    box-shadow: 0 0 0 1px #fff; 
}

/* ========================================= */
/* â˜…â˜…â˜… Security Quiz ç­”é¢˜å¼¹çª—æ ·å¼ â˜…â˜…â˜… */
/* ========================================= */
.quiz-card {
    background: #ffffff;
    width: 88%;
    max-width: 340px;
    border-radius: 4px; /* å‚è€ƒå›¾æ˜¯ç›´è§’åæ–¹æ­£çš„é£Žæ ¼ */
    padding: 30px 25px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#quiz-overlay.show .quiz-card {
    transform: scale(1);
}

.quiz-header {
    text-align: center;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 3px;
    color: #999;
    margin-bottom: 25px;
    font-family: Arial, sans-serif;
}

.quiz-question {
    font-size: 15px;
    color: #333;
    line-height: 1.6;
    margin-bottom: 25px;
    font-weight: 600;
    text-align: justify;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quiz-option {
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 2px; /* æ–¹æ­£é£Žæ ¼ */
    font-size: 14px;
    color: #444;
    cursor: pointer;
    line-height: 1.5;
    transition: all 0.2s ease;
    background: #fff;
}

.quiz-option:active {
    background: #f9f9f9;
    border-color: #ccc;
    transform: scale(0.98);
}

/* é”™è¯¯é€‰é¡¹é—ªçº¢åŠ¨ç”» */
@keyframes shakeError {
    0%, 100% { transform: translateX(0); border-color: #ff3b30; background: #fff2f2; color: #ff3b30;}
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
.quiz-option.error-shake {
    animation: shakeError 0.4s ease;
}

.quiz-close-btn {
    text-align: center;
    margin-top: 20px;
    font-size: 12px;
    color: #ccc;
    cursor: pointer;
    padding: 10px;
}
.quiz-close-btn:active { color: #999; }

/* ========================================= */
/* â˜…â˜…â˜… çº¿ä¸‹å‰§åœº (Offline RP) æ ·å¼é‡æž„ç‰ˆ â˜…â˜…â˜… */
/* ========================================= */

#offline-setup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 5200 !important;
    background: #ffffff;          /* ç™½è‰²èƒŒæ™¯ï¼Œè·Ÿæˆªå›¾ä¸€è‡´ */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateX(100%);  /* é»˜è®¤è—åœ¨å³è¾¹ */
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    padding-top: env(safe-area-inset-top, 0px);  /* é€‚é…åˆ˜æµ·å± */
    box-sizing: border-box;
}

#offline-setup-overlay.active {
    transform: translateX(0);
}

#offline-setup-overlay .api-header {
    flex-shrink: 0;   /* å¤´éƒ¨ä¸è¢«åŽ‹ç¼© */
}

#offline-setup-overlay .api-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); /* åº•éƒ¨å®‰å…¨åŒº */
}


#offline-chat-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;    /* æ–°å¢ž */
    bottom: 0;   /* æ–°å¢žï¼šç”¨ top+bottom ä»£æ›¿ height:100%ï¼Œæ›´å¯é  */
    width: 100%;
    height: 100%;
    z-index: var(--z-modal);
    background: rgba(0, 0, 0, 0.2); 
    backdrop-filter: blur(30px) brightness(0.45);
    -webkit-backdrop-filter: blur(30px) brightness(0.45);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}


#offline-chat-overlay.active {
    transform: translateY(0);
}

/* ä¸“å±žå£çº¸å±‚ï¼šå¦‚æžœä¸è®¾ç½®ï¼Œå°±æ˜¯é€æ˜Žçš„ï¼Œé ä¸Šé¢çš„ backdrop-filter é€åº• */
#offline-bg-layer {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    z-index: var(--z-negative);
    opacity: 0.8; /* å¦‚æžœæœ‰å£çº¸ï¼Œè®©å®ƒå’Œæ¯›çŽ»ç’ƒæ··åˆ */
}

.offline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: calc(10px + var(--safe-top)) 20px 10px 20px;
    color: #fff;
    z-index: var(--z-content);
}

.offline-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding: 20px 15px;
    padding-bottom: 40px;
    display: flex;
    flex-direction: column;
    gap: 25px; 
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    z-index: var(--z-content);
}
.offline-scroll-area::-webkit-scrollbar { display: none; }

.offline-msg-group {
    display: flex;
    flex-direction: column;
    gap: 8px; 
    width: 96%;
    align-self: center; 
}

.offline-meta-card {
    background: rgba(255, 255, 255, 0.08); 
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.offline-meta-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.offline-card-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.15);
}

.offline-name-col { display: flex; flex-direction: column; }
.offline-card-name { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 2px; }
.offline-card-time { font-size: 10px; color: rgba(255,255,255,0.4); }
.offline-meta-right { display: flex; align-items: center; gap: 5px; font-size: 11px; color: rgba(255,255,255,0.6); font-weight: 600; }
.offline-star-icon { color: #ff6b4a; font-size: 12px; }

.offline-content-card {
    background: rgba(255, 255, 255, 0.1); 
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.offline-deco-top { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-bottom: 12px; font-size: 10px; font-weight: 600; color: rgba(255,255,255,0.7); }
.offline-deco-btn { border: 1px solid rgba(255,255,255,0.4); padding: 3px 10px; border-radius: 12px; }

.offline-card-body {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.8;
    text-align: justify;
    white-space: pre-wrap;
    word-break: break-all;
    margin-bottom: 20px;
}

.offline-card-body em { color: #FFB7C5; font-style: normal; }

/* æŠ¥é”™çº¢å­—ä¸“å±žæ ·å¼ */
.offline-error-text {
    color: #ff4d4f !important;
    font-family: monospace;
    font-weight: 600;
}

.offline-deco-bottom { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: rgba(255,255,255,0.4); }

.offline-footer {
    padding: 8px 15px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    display: flex;
    align-items: flex-end;
    gap: 10px;
    z-index: var(--z-content);
    border-top: 1px solid rgba(255,255,255,0.05);
}

#offline-msg-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px; 
    padding: 8px 12px;   
    font-size: 14px;
    color: #fff;
    outline: none;
    height: 36px;            /* å¼ºåˆ¶åˆå§‹é«˜åº¦ï¼Œé˜²æ­¢ä¹±æ’‘å¤§ */
    min-height: 36px;    
    max-height: 100px;
    resize: none;
    font-family: inherit;
    line-height: 1.4;        /* å¾®è°ƒè¡Œé«˜ä½¿æ–‡å­—å±…ä¸­ */
    box-sizing: border-box;  /* æ ¸å¿ƒä¿®å¤ï¼šé˜²æ­¢å†…è¾¹è·æ’‘ç ´é«˜åº¦ */
}

.offline-send-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.1s;
    margin-bottom: 1px;
}
.offline-send-btn:active { transform: scale(0.9); }

/* â˜… æ ¸å¿ƒï¼šåŒå¡ç‰‡åŒ…è£¹ç»„ â˜… */
.offline-msg-group {
    display: flex;
    flex-direction: column;
    gap: 8px; /* å¤´å¡å’Œå†…å®¹å¡ä¹‹é—´çš„é—´éš™ */
    width: 96%;
    align-self: center; /* ç»Ÿä¸€å±…ä¸­æŽ’ç‰ˆ */
}

/* 1. é¡¶éƒ¨ä¿¡æ¯å¡ç‰‡ (Avatar, Name, Time, Star) */
.offline-meta-card {
    background: rgba(255, 255, 255, 0.06); 
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.offline-meta-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.offline-card-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.15);
}

.offline-name-col {
    display: flex;
    flex-direction: column;
}

.offline-card-name {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}

.offline-card-time {
    font-size: 10px;
    color: rgba(255,255,255,0.4);
}

.offline-meta-right {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    font-weight: 600;
}

.offline-star-icon {
    color: #ff6b4a; /* æ©˜çº¢è‰²å°æ˜Ÿæ˜Ÿ */
    font-size: 12px;
}

/* 2. åº•éƒ¨å†…å®¹å¡ç‰‡ (Text, Floor, Tokens) */
.offline-content-card {
    background: rgba(255, 255, 255, 0.08); 
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* å³ä¸Šè§’çš„è£…é¥°æŒ‰é’® (Show more, Follow) */
.offline-deco-top {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 10px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
}
.offline-deco-btn {
    border: 1px solid rgba(255,255,255,0.4);
    padding: 3px 10px;
    border-radius: 12px;
}

.offline-card-body {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.8;
    text-align: justify;
    white-space: pre-wrap;
    word-break: break-all;
    margin-bottom: 20px;
}

/* åŒ¹é…åŠ¨ä½œæå†™ (ç²‰è‰²) */
.offline-card-body em {
    color: #FFB7C5; 
    font-style: normal;
}

/* å‘ç”Ÿé”™è¯¯æ—¶çš„æ–‡å­—é¢œè‰² */
.offline-error-text {
    color: #ff4d4f !important;
    font-family: monospace;
}

/* åº•éƒ¨çŠ¶æ€æ  (Followers, Floor) */
.offline-deco-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: rgba(255,255,255,0.4);
}

/* åº•éƒ¨è¾“å…¥æ¡† (ç¼©å°ç‰ˆ) */
.offline-footer {
    padding: 10px 15px;
    padding-bottom: calc(15px + env(safe-area-inset-bottom));
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    display: flex;
    align-items: flex-end;
    gap: 12px;
    z-index: var(--z-content);
    border-top: 1px solid rgba(255,255,255,0.05);
}

#offline-msg-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px; /* åœ†è§’æ”¹å° */
    padding: 8px 12px;   /* å†…è¾¹è·æ”¹å° */
    font-size: 14px;
    color: #fff;
    outline: none;
    min-height: 36px;    /* é«˜åº¦æ”¹å° */
    max-height: 100px;
    resize: none;
    font-family: inherit;
    line-height: 1.5;
}

.offline-send-btn {
    width: 36px;  /* æŒ‰é’®æ”¹å° */
    height: 36px; /* æŒ‰é’®æ”¹å° */
    border-radius: 50%;
    background: #fff;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px; /* å›¾æ ‡æ”¹å° */
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.1s;
}
.offline-send-btn:active { transform: scale(0.9); }

/* --- çº¿ä¸‹éšè—æ¥¼å±‚ä¸Žç³»ç»Ÿæç¤º --- */
.offline-msg-group.hidden-floor .offline-content-card {
    padding: 10px 18px;
    background: rgba(0, 0, 0, 0.1);
    border: 1px dashed rgba(255,255,255,0.2);
}
.offline-msg-group.hidden-floor .offline-card-body {
    display: none; /* éšè—æ­£æ–‡ */
}
.offline-msg-group.hidden-floor .offline-deco-top {
    margin-bottom: 0;
    justify-content: center;
}
.offline-msg-group.hidden-floor .offline-deco-top::before {
    content: "è¯¥æ¥¼å±‚å·²è¢«éšè—ï¼Œä¸å†è®¡å…¥ä¸Šä¸‹æ–‡";
    color: #ff8e9e;
    font-size: 12px;
}
.offline-msg-group.hidden-floor .offline-deco-bottom {
    display: none;
}

/* ç³»ç»Ÿæ“ä½œæç¤ºå¡ç‰‡ */
.offline-msg-group.system-notice .offline-meta-card {
    display: none; /* éšè—å¤´åƒæ  */
}
.offline-msg-group.system-notice .offline-content-card {
    background: rgba(255, 255, 255, 0.85);
    color: #000;
    padding: 10px 15px;
    border-radius: 12px;
    text-align: center;
}
.offline-msg-group.system-notice .offline-card-body {
    color: #333;
    font-weight: 600;
    margin-bottom: 0;
    font-size: 13px;
}
.offline-msg-group.system-notice .offline-deco-top,
.offline-msg-group.system-notice .offline-deco-bottom {
    display: none;
}

/* ========================================= */
/* â˜…â˜…â˜… ä¸€èµ·å¬ (Listen Together) æ‚¬æµ®å¡ç‰‡æ ·å¼ â˜…â˜…â˜… */
/* ========================================= */
.lt-inline-card {
    position: absolute;
    top: 60px;
    left: 15px;
    right: 15px;
    z-index: var(--z-popover);
    background: rgba(245, 245, 247, 0.85);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1), inset 0 1px 2px rgba(255,255,255,0.9);
    padding: 15px; 
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: slideDownFade 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* æ”¾å¤§å¤´åƒã€æ‹‰å¼€é—´è· */
.lt-avatars-row { display: flex; justify-content: center; align-items: center; gap: 40px; width: 100%; position: relative; z-index: 2; }
.lt-avatar-box { position: relative; width: 70px; height: 70px; } /* å¤´åƒå˜å¤§ */
.lt-avatar-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.1); animation: spin 20s linear infinite; animation-play-state: paused; }
.playing .lt-avatar-img { animation-play-state: running; }

/* è¯­éŸ³æ³¢å½¢ */
.lt-wave-anim { display: flex; gap: 4px; height: 18px; align-items: center; }
.lt-wave-anim span { width: 3px; background: #666; border-radius: 2px; animation: wave 1s infinite ease-in-out; animation-play-state: paused; }
.playing .lt-wave-anim span { animation-play-state: running; }
.lt-wave-anim span:nth-child(1) { height: 10px; animation-delay: 0.1s;}
.lt-wave-anim span:nth-child(2) { height: 16px; animation-delay: 0.3s;}
.lt-wave-anim span:nth-child(3) { height: 12px; animation-delay: 0.5s;}
.lt-wave-anim span:nth-child(4) { height: 8px; animation-delay: 0.2s;}

/* è€³æœºçº¿æ‹‰é•¿ä¸‹ç§» */
.lt-connection-wrapper { position: absolute; top: 60px; left: 50%; transform: translateX(-50%); width: 170px; height: 80px; pointer-events: none; z-index: 1; }
.lt-curve-svg { width: 100%; height: 100%; overflow: visible; }

/* æŽ’ç‰ˆæ‹‰å¼€ã€å¢žåŠ æ­Œè¯ */
.lt-status-text { margin-top: 15px; font-size: 11px; color: #888; z-index: 2; letter-spacing: 0.5px; }
.lt-song-info { margin-top: 15px; display: flex; flex-direction: column; align-items: center; z-index: 2; gap: 4px; }
.lt-song-name { font-size: 18px; font-weight: 800; color: #333; text-align: center; }
.lt-artist { font-size: 12px; color: #888; text-align: center;  margin-top: 6px; }
.lt-lyric { font-size: 13px; color: #555; text-align: center; margin-top: 12px; font-weight: 500; min-height: 18px; }

.lt-progress-area { display: flex; align-items: center; width: 100%; gap: 10px; margin-top: 20px; margin-bottom: 20px; font-family: monospace; z-index: 2; }
.lt-time-current, .lt-time-total { font-size: 10px; color: #999; width: 30px; text-align: center; }
.lt-progress-bar { flex: 1; height: 4px; background: rgba(0,0,0,0.08); border-radius: 2px; position: relative; cursor: pointer; }
.lt-progress-fill { height: 100%; width: 0%; background: #333; border-radius: 2px; position: relative; }
.lt-progress-dot { position: absolute; right: -6px; top: -4px; width: 12px; height: 12px; background: #fff; border-radius: 50%; box-shadow: 0 2px 5px rgba(0,0,0,0.3); }

.lt-controls { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 0 15px; z-index: 2; }
.lt-btn-side { font-size: 18px; color: #666; cursor: pointer; padding: 5px; transition: color 0.2s;}
.lt-main-btns { display: flex; align-items: center; gap: 25px; }
.lt-btn-skip { font-size: 20px; color: #444; cursor: pointer; }
.lt-btn-skip:active, .lt-btn-side:active { opacity: 0.6; }
.lt-play-circle { width: 45px; height: 45px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; color: #333; cursor: pointer; transition: transform 0.1s; background: rgba(0,0,0,0.05); }
.lt-play-circle:active { transform: scale(0.9); background: rgba(0,0,0,0.1); }

/* --- å•æ›²å¾ªçŽ¯å›¾æ ‡ä¸­é—´åŠ ä¸ª 1 --- */
.lt-btn-side {
    position: relative; /* ä¸ºç»å¯¹å®šä½åšå‡†å¤‡ */
}
.lt-btn-side.single-loop::after {
    content: '1';
    position: absolute;
    font-size: 9px;
    font-family: Arial, sans-serif;
    font-weight: 900;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #666;
}

/* ========================================= */
/* â˜…â˜…â˜… è‹¹æžœåŽŸç”Ÿå°ç™½ç‚¹ (æ— è¾¹æ¡†Â·é™æ­¢Â·ç¼©å°ç‰ˆ) â˜…â˜…â˜… */
/* ========================================= */
#floating-cd {
    position: absolute;
    top: 70px;
    right: 15px; 
    width: 44px;  /* éšå½¢çš„è§¦æŽ§åŒºåŸŸï¼Œä¿ç•™è¶³å¤Ÿå¤§å°æ–¹ä¾¿æ‰‹æŒ‡æ‹–æ‹½ */
    height: 44px;
    background: transparent; /* åŽ»é™¤å¤–é¢çš„æ–¹å½¢é»‘æ¡† */
    z-index: 2050; 
    
    display: block; 
    cursor: pointer;
    opacity: 0.5; /* é—²ç½®æ—¶åŠé€æ˜Žï¼Œä¸æŒ¡è§†çº¿ */
    transition: opacity 0.3s ease, transform 0.1s; 
}

/* æ¿€æ´»æˆ–æ‹–æ‹½æ—¶çš„åé¦ˆ */
#floating-cd:active { 
    opacity: 1; 
    transform: scale(0.92); 
}

/* å½»åº•éšè—åŽŸæœ¬çš„ä¸“è¾‘å›¾ç‰‡ */
#floating-cd-cover {
    display: none !important;
}

/* çº¯åŒå¿ƒåœ†å±‚æ¬¡ (å®Œç¾Žè¿˜åŽŸä¸‰å±‚è´¨æ„Ÿå¹¶ç¼©å°) */
#floating-cd::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    
    width: 14px; /* æœ€é‡Œé¢çš„ç™½ç‚¹ç¼©å° */
    height: 14px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    
    /* åˆ©ç”¨é˜´å½±ç”»å‡ºå¤–é¢ä¸¤å±‚ã€‚æ”¹ä¸ºé»‘ç°è‰²ç³»ï¼Œä¿è¯æ²¡æœ‰é»‘æ¡†ä¹Ÿèƒ½çœ‹æ¸… */
    box-shadow: 
        0 0 0 5px rgba(0, 0, 0, 0.3),   /* ä¸­é—´çš„è¿‡æ¸¡å±‚ */
        0 0 0 10px rgba(0, 0, 0, 0.15); /* æœ€å¤–åœˆçš„æ·¡è‰²å±‚ */
    
    pointer-events: none;
}