:root {
    --one-global-font-family: system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
    --one-font-scale: 1;
    --one-ui-font-weight: 500;
    --one-app-icon-bg-color: #FFFFFF;
    --one-app-icon-bg: linear-gradient(135deg, rgba(255,255,255,0.72), rgba(255,255,255,0.36));
    --one-app-icon-border: 1px solid rgba(255,255,255,0.62);
    --one-app-icon-shadow: 0 8px 24px rgba(120,130,140,0.04), inset 0 2px 4px rgba(255,255,255,0.8);
    --one-app-icon-backdrop: blur(8px) saturate(1.08);
    --one-app-logo-color: #A8A8A8;
    --one-app-icon-radius: 17px;
    --one-app-label-color: #7D7D7D;
    --one-app-label-size: 11px;
    --one-app-label-weight: 500;
    --one-range-track-bg: linear-gradient(90deg, rgba(150,150,150,0.72), rgba(181,199,211,0.72));
    --one-range-thumb-bg: #000;
    --one-range-thumb-border: 1px solid rgba(252,251,247,0.78);
}
* {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
        -webkit-tap-highlight-color: transparent;
        user-select: none;
        -webkit-user-select: none;
        outline: none;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    *::-webkit-scrollbar {
        width: 0;
        height: 0;
        display: none;
    }

    html, body {
        width: 100%;
        height: 100%;
        overflow: hidden;
        background-color: #f5f4f6;
        font-family: var(--one-global-font-family, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif);
        touch-action: none;
        overscroll-behavior: none;
    }

    body {
        min-height: 100svh;
        background-image: 
            radial-gradient(circle at 15% 10%, rgba(245, 245, 245, 0.9) 0%, transparent 40%),
            radial-gradient(circle at 85% 85%, rgba(230, 238, 242, 0.9) 0%, transparent 45%),
            linear-gradient(135deg, #fdfcfb 0%, #f0efed 100%);
    }

    /* Noise Texture */
    body::after {
        content: '';
        position: absolute;
        inset: 0;
        background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
        opacity: 0.04;
        pointer-events: none;
        z-index: 999;
        mix-blend-mode: multiply;
    }

    #desktop {
        width: 100%;
        height: 100%;
        position: relative;
    }

    #slider {
        display: flex;
        width: 200vw;
        height: 100%;
        transition: transform 0.4s cubic-bezier(0.25, 1, 0.3, 1);
        will-change: transform;
    }

    .page {
        width: 100vw;
        height: 100%;
        padding: max(50px, env(safe-area-inset-top)) 24px 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* Desktop Grid System */
    .desktop-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        grid-auto-rows: 72px;
        column-gap: 18px;
        row-gap: 28px;
        width: 100%;
        padding: 0 4px;
    }

    /* Widget Base Styles */
    .widget {
        background: rgba(255, 255, 255, 0.45);
        border: 1px solid rgba(255, 255, 255, 0.6);
        border-radius: 28px;
        box-shadow: 0 8px 24px rgba(120, 130, 140, 0.04), inset 0 2px 4px rgba(255, 255, 255, 0.8);
        position: relative;
        overflow: hidden;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        margin: 0;
    }

    .widget-4x2 {
        grid-column: span 4;
        grid-row: span 2;
    }

    .widget-2x2 {
        grid-column: span 2;
        grid-row: span 2;
    }

    .widget-2x1 {
        grid-column: span 2;
        grid-row: span 1;
    }

    /* Explicit Positioning Classes */
    .pos-top-full { grid-column: 1 / span 4; grid-row: 1 / span 2; }
    .pos-mid-left { grid-column: 1 / span 2; grid-row: 3 / span 2; }
    .pos-bot-right { grid-column: 3 / span 2; grid-row: 5 / span 2; }
    .pos-p2-status { grid-column: 3 / span 2; grid-row: 4; }

    /* Page 1 Widget: Today (4x2) */
    .widget-today {
        display: flex;
        flex-direction: row;
        padding: 16px;
        gap: 16px;
    }
    .wt-tape {
        position: absolute;
        top: -4px;
        left: 40px;
        width: 38px;
        height: 14px;
        background: rgba(255, 255, 255, 0.5);
        border: 1px solid rgba(255, 255, 255, 0.7);
        box-shadow: 0 2px 4px rgba(0,0,0,0.02);
        transform: rotate(-3deg);
        z-index: 5;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }
    .wt-photo {
        width: 108px;
        height: 100%;
        border-radius: 18px;
        background: linear-gradient(120deg, #e4ebf0 0%, #EEEEEE 100%);
        border: 1px solid rgba(255, 255, 255, 0.8);
        position: relative;
        box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.5);
        overflow: hidden;
    }
    .wt-photo::after {
        content: '';
        position: absolute;
        inset: 4px;
        border: 1px dashed rgba(160, 165, 175, 0.3);
        border-radius: 14px;
    }
    .wt-photo-tag {
        position: absolute;
        bottom: 8px;
        right: 8px;
        font-size: 7px;
        color: #fff;
        background: rgba(150, 155, 165, 0.6);
        padding: 2px 4px;
        border-radius: 4px;
        letter-spacing: 1px;
        z-index: 2;
    }
    .wt-info {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        position: relative;
    }
    .wt-top-right {
        position: absolute;
        top: 0px;
        right: 0px;
        width: 14px;
        height: 14px;
    }
    .wt-top-right svg {
        width: 100%;
        height: 100%;
        stroke: #B7B7B7;
        stroke-width: 0.8;
        fill: none;
    }
    .wt-top-right, .wm-top, .wn-tr-deco {
        cursor: pointer;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    .wt-top-right { z-index: 22; }
    .wm-top { position: relative; z-index: 22; }
    .wn-tr-deco { z-index: 22; }
    .wt-date {
        font-size: 10px;
        letter-spacing: 1px;
        color: #A0A0A0;
        text-transform: uppercase;
        margin-bottom: 4px;
        font-family: "Georgia", serif;
        display: flex;
        align-items: center;
        gap: 6px;
    }
    .wt-date::before {
        content: '';
        display: inline-block;
        width: 4px;
        height: 4px;
        background: #9A9A9A;
        border-radius: 50%;
    }
    .wt-title {
        font-size: 19px;
        color: #505050;
        font-family: "Georgia", serif;
        font-style: italic;
        margin-bottom: 8px;
    }
    .wt-line {
        width: 24px;
        height: 1px;
        background: #d0d4db;
        margin-bottom: 10px;
    }
    .wt-desc {
        font-size: 11px;
        line-height: 1.6;
        color: #828282;
    }
    .wt-bottom-deco {
        position: absolute;
        bottom: 0px;
        right: 0px;
        display: flex;
        align-items: center;
        gap: 4px;
    }
    .wt-bd-text {
        font-size: 8.5px;
        color: #B7B7B7;
        letter-spacing: 1px;
        font-family: "Courier New", Courier, monospace;
    }
    .wt-bd-dots {
        display: flex;
        gap: 3px;
    }
    .wt-bd-dots i {
        display: inline-block;
        width: 3px;
        height: 3px;
        background: #d0d4db;
        border-radius: 50%;
    }

    /* Page 1 Widget: Mood (2x2) */
    .widget-mood {
        padding: 16px;
        display: flex;
        flex-direction: column;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, rgba(248, 245, 242, 0.4) 100%);
        position: relative;
    }
    .wm-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    .wm-top {
        display: flex;
        align-items: baseline;
        gap: 7px;
    }
    .wm-day {
        font-size: 28px;
        font-family: "Georgia", serif;
        color: #505050;
        line-height: 1;
    }
    .wm-month {
        display: none;
    }
    .wm-avatar {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: #F2F3F4;
        border: 2px solid rgba(255, 255, 255, 0.92);
        box-shadow: 0 4px 12px rgba(120, 130, 140, 0.06);
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
        overflow: hidden;
    }
    .wm-avatar::after {
        content: 'Me';
        position: absolute;
        inset: 0;
        background: #F3F4F5;
        color: #C4C4C4;
        display: flex;
        align-items: center;
        justify-content: center;
        font-family: Georgia, "Times New Roman", serif;
        font-size: 13px;
        font-style: italic;
        letter-spacing: 0.06em;
        opacity: 1;
    }
    .wm-avatar svg {
        display: none;
    }
    .wm-body {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-evenly;
        margin-top: 12px;
    }
    .wm-line-text {
        font-size: 11px;
        color: #828282;
        font-family: "Georgia", serif;
        font-style: italic;
        line-height: 1.2;
    }
    .wm-dash {
        width: 100%;
        height: 1px;
        border-top: 1px dashed rgba(180, 185, 195, 0.6);
    }

    /* Page 1 Widget: Notes (2x2) */
    .widget-notes {
        padding: 18px 16px;
        display: flex;
        flex-direction: column;
        background: linear-gradient(145deg, rgba(255, 255, 255, 0.6) 0%, rgba(248, 245, 242, 0.4) 100%);
        position: relative;
    }
    
    .wn-tr-deco {
        position: absolute;
        top: 18px;
        right: 16px;
        width: 14px;
        height: 14px;
    }
    .wn-tr-deco svg {
        width: 100%;
        height: 100%;
    }

    .wn-header {
        font-size: 9px;
        letter-spacing: 1.5px;
        color: #A8A8A8;
        margin-bottom: 8px;
    }
    .wn-line {
        width: 24px;
        height: 1px;
        background: #d0d4db;
        margin-bottom: 12px;
    }
    .wn-text {
        font-size: 11px;
        line-height: 1.6;
        color: #828282;
    }
    
    .wn-bot-deco {
        margin-top: auto;
        position: relative;
        width: 100%;
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
    }
    .wn-signature {
        font-family: "Georgia", serif;
        font-style: italic;
        font-size: 15px;
        color: #A0A0A0;
        letter-spacing: 0.5px;
        padding-bottom: 6px;
    }
    .wn-graphic {
        width: 58px;
        height: 52px;
        position: relative;
        margin-right: -4px;
        margin-bottom: -2px;
        top: 15px;
    }
    .wn-graphic svg {
        width: 100%;
        height: 100%;
        position: relative;
        z-index: 2;
        overflow: visible;
    }
    .wn-glow {
        position: absolute;
        inset: 0;
        background: radial-gradient(circle at center, rgba(216,156,169,0.15) 0%, rgba(255,255,255,0) 65%);
        z-index: 1;
    }

    /* Page 2 Widget: Archive (4x2) */
    .widget-archive {
        padding: 20px 24px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    .wa-label,
    .ws-label {
        cursor: pointer;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    .wa-label:active,
    .ws-label:active {
        opacity: 0.58;
    }
    .wa-spin {
        animation: wa-spin 38s linear infinite;
        transform-box: fill-box;
        transform-origin: center;
        will-change: transform;
    }
    .wa-spin-rev {
        animation: wa-spin-rev 28s linear infinite;
        transform-box: fill-box;
        transform-origin: center;
        will-change: transform;
    }
    .widget-archive.motion-paused .wa-deco-layer .wa-spin,
    .widget-archive.motion-paused .wa-deco-layer .wa-spin-rev {
        animation-play-state: paused;
    }
    
    @keyframes wa-breathe {
        0% { transform: scale(0.9); opacity: 0.8; }
        100% { transform: scale(1.1); opacity: 1; }
    }
    @keyframes wa-spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }
    @keyframes wa-spin-rev {
        0% { transform: rotate(360deg); }
        100% { transform: rotate(0deg); }
    }

    .wa-deco-layer {
        position: absolute;
        inset: 0;
        pointer-events: none;
        overflow: hidden;
        z-index: 0;
    }
    .wa-header, .wa-body {
        position: relative;
        z-index: 1;
    }

    .wa-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-bottom: 10px;
    }
    .wa-label {
        font-size: 10px;
        letter-spacing: 1.5px;
        color: #959595;
    }
    .wa-num {
        font-size: 10px;
        font-family: "Courier New", Courier, monospace;
        color: #B7B7B7;
    }
    .wa-body {
        display: flex;
        align-items: center;
        gap: 16px;
        margin-top: 12px;
    }
    .wa-circle {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        border: 1px solid #d8dee6;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.6);
        position: relative;
        overflow: hidden;
    }
    .wa-circle::after {
        content: '';
        width: 28px;
        height: 28px;
        border-radius: 50%;
        background: rgba(220, 226, 232, 0.4);
    }
    .wa-stats {
        display: flex;
        flex-direction: column;
        gap: 7px;
    }
    .wa-stat {
        font-size: 11px;
        color: #727272;
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .wa-stat span.wa-dot-1 {
        display: inline-block;
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #b5c7d3;
    }
    .wa-stat span.wa-dot-2 {
        display: inline-block;
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: #C9C9C9;
    }

    /* Page 2 Widget: Status (2x1) -> Battery Capsule */
    .widget-status {
        padding: 0 16px 0 20px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        border-radius: 36px;
    }
    .ws-left {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    .ws-label {
        font-size: 9px;
        letter-spacing: 1px;
        color: #959595;
        text-transform: uppercase;
    }
    .ws-val {
        font-size: 13px;
        color: #636363;
        font-weight: 600;
        font-family: "Courier New", Courier, monospace;
    }
    
    .ws-battery-ring {
        width: 44px; 
        height: 44px;
        border-radius: 50%;
        background: transparent;
        box-shadow: none;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        overflow: hidden;
        transition: background-image 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
    }
    .ws-battery-ring.is-contact-avatar {
        background-color: rgba(255, 255, 255, 0.72);
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        border: 1px solid rgba(255, 255, 255, 0.92);
        box-shadow: 0 4px 12px rgba(120, 130, 140, 0.08);
        color: #8b929d;
        font-size: 10px;
        letter-spacing: 0.04em;
    }
    .ws-battery-ring.is-contact-avatar::after {
        content: attr(data-avatar-label);
        position: relative;
        z-index: 2;
    }
    .ws-battery-ring.is-contact-avatar.has-image::after {
        content: '';
    }
    .ws-battery-ring.is-contact-avatar .bat-svg,
    .ws-battery-ring.is-contact-avatar .bat-icon-center {
        display: none;
    }
    .bat-svg {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        overflow: visible;
    }
    .bat-icon-center {
        position: relative;
        z-index: 2;
        width: 20px; 
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .bat-icon-center svg {
        width: 100%;
        height: 100%;
        overflow: visible;
    }

    /* App Styles */
    .app {
        display: flex;
        flex-direction: column;
        align-items: center;
        cursor: pointer;
        transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1);
        justify-content: flex-end;
    }
    
    .app:active {
        transform: scale(0.9);
    }

    /* =========================================================
       极致质感：高通透白调渐变磨砂玻璃方圆图标基底
       ========================================================= */
    .icon-box {
        width: 56px; 
        height: 56px;
        border-radius: var(--one-app-icon-radius, 17px); /* 保持应用方圆比例 */
        background: var(--one-app-icon-bg, rgba(255, 255, 255, 0.45));
        border: var(--one-app-icon-border, 1px solid rgba(255, 255, 255, 0.6));
        box-shadow: var(--one-app-icon-shadow, 0 8px 24px rgba(120, 130, 140, 0.04), inset 0 2px 4px rgba(255, 255, 255, 0.8));
        display: flex;
        justify-content: center;
        align-items: center;
        backdrop-filter: var(--one-app-icon-backdrop, blur(8px));
        -webkit-backdrop-filter: var(--one-app-icon-backdrop, blur(8px));
        position: relative;
        overflow: hidden;
    }

    /* =========================================================
       全官方Logo + 极简温柔灰阶
       ========================================================= */
    .icon-box svg {
        width: 27px;
        height: 27px;
        fill: var(--one-app-logo-color, #A8A8A8); /* 0饱和度浅灰 */
        stroke: none; 
        display: block;
        overflow: visible;
        transform-origin: 50% 50%;
    }
    .icon-box svg.app-icon {
        width: var(--logo-size, 27px);
        height: var(--logo-size, 27px);
    }
    /* 按抖音图标的视觉体量校准：不是统一实际 px，而是统一最终观感 */
    .icon-heart { --logo-size: 31px; }
    .icon-find { --logo-size: 33.6px; }
    .icon-camera { --logo-size: 31px; }
    .icon-cart { --logo-size: 32.55px; }
    .icon-douyin { --logo-size: 27px; }
    .icon-x { --logo-size: 30px; }
    .icon-music { --logo-size: 36px; }
    .icon-game { --logo-size: 34px; }
    .icon-guide { --logo-size: 41px; transform: translate(-1px, 1px); }
    .icon-books { --logo-size: 30.45px; }
    .icon-memory { --logo-size: 35px; }
    .icon-worldbook { --logo-size: 33px; }
    .icon-meet { --logo-size: 37.8px; }
    .icon-sink { --logo-size: 35px; }
    .icon-phone { --logo-size: 36px; }
    .icon-message { --logo-size: 32px; }
    .icon-chat { --logo-size: 35.8px; }
    .icon-settings { --logo-size: 34.28px; }

    .app-label {
        font-size: var(--one-app-label-size, 11px);
        color: var(--one-app-label-color, #7D7D7D);
        margin-top: 6px;
        font-weight: var(--one-app-label-weight, 500);
        text-shadow: none;
        white-space: nowrap;
    }

    /* Pagination */
    .pagination {
        position: absolute;
        bottom: calc(110px + env(safe-area-inset-bottom));
        left: 0;
        right: 0;
        display: flex;
        justify-content: center;
        gap: 10px;
        z-index: 10;
    }

    .dot {
        width: 5px;
        height: 5px;
        border-radius: 50%;
        background: rgba(140, 150, 160, 0.3);
        transition: background 0.3s;
        cursor: pointer;
    }
    
    .dot::before {
        content: '';
        position: absolute;
        padding: 10px;
        transform: translate(-10px, -10px);
    }

    .dot.active {
        background: rgba(100, 110, 120, 0.7);
    }

    /* Dock */
    .dock-container {
        position: absolute;
        bottom: max(20px, env(safe-area-inset-bottom));
        left: 20px;
        right: 20px;
        height: 76px;
        border-radius: 32px;
        background: rgba(255, 255, 255, 0.25);
        border: 1px solid rgba(255, 255, 255, 0.5);
        box-shadow: 0 10px 30px rgba(120, 130, 140, 0.06), inset 0 1px 2px rgba(255, 255, 255, 0.6);
        backdrop-filter: blur(16px) saturate(120%);
        -webkit-backdrop-filter: blur(16px) saturate(120%);
        display: flex;
        justify-content: space-around;
        align-items: center;
        padding: 0 12px;
        z-index: 10;
    }

    .dock-app {
        margin: 0;
        justify-content: center;
    }
    .dock-app .app-label {
        display: none;
    }

    /* 可编辑功能 CSS */
    .editable-text {
        width: fit-content;
        max-width: 100%;
        cursor: pointer;
        transition: opacity 0.2s;
        position: relative;
        z-index: 10;
    }
    .editable-text:active {
        opacity: 0.5;
    }
    .line-clamp {
        display: block;
        white-space: nowrap;
        width: fit-content;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .editable-img {
        cursor: pointer;
        transition: opacity 0.2s;
        position: relative;
        z-index: 10;
    }
    .editable-img:active {
        opacity: 0.8;
    }
    .editable-img.has-image {
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }
    .wt-photo.has-image::after { display: none; }
    .wm-avatar.has-image::after, .wm-avatar.has-image svg { display: none; }
    .wa-circle.has-image::after { display: none; }

    /* 全局组件修改弹窗 */
    .modal-overlay {
        position: fixed;
        inset: 0;
        background: rgba(30, 30, 35, 0.4); 
        z-index: 10000;
        display: none;
        justify-content: center;
        align-items: center;
        padding: 24px;
        opacity: 0;
        transition: opacity 0.24s ease;
    }
    .modal-overlay.show {
        opacity: 1;
    }
    .modal-box {
        position: relative;
        width: 100%;
        max-width: 296px;
        max-height: calc(100dvh - 48px);
        background: #ffffff;
        border-radius: 22px;
        display: flex;
        flex-direction: column;
        box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
        overflow: hidden;
        transform: translateY(10px) scale(0.98);
        transition: transform 0.26s cubic-bezier(0.22, 0.74, 0.22, 1), opacity 0.22s ease;
    }
    .modal-overlay.show .modal-box {
        transform: translateY(0) scale(1);
    }
    .modal-box::after {
        content: 'MODEL';
        position: absolute;
        right: 9px;
        top: 50%;
        z-index: 3;
        transform: translateY(-50%) rotate(90deg);
        transform-origin: center;
        pointer-events: none;
        font-family: "Courier New", Courier, monospace;
        font-size: 8px;
        line-height: 1;
        letter-spacing: 0.22em;
        color: rgba(52, 56, 65, 0.105);
        white-space: nowrap;
    }
    
    .modal-content {
        position: relative;
        z-index: 2;
        padding: 24px 20px 20px;
        display: flex;
        flex-direction: column;
        gap: 16px;
        overflow-y: auto;
        scrollbar-width: none;
    }
    .modal-content::-webkit-scrollbar { display: none; }


    /* 全局弹窗不加粗 */
    .modal-overlay :where(h1, h2, h3, h4, p, div, em, strong, b, button, label, span, input, textarea, select, .modal-title, .chat-choice-copy strong, .chat-news-start-copy strong, .chat-news-char-head strong) {
        font-weight: 400;
    }
    .modal-overlay :where(.fas, .fa-solid, .fa-regular) {
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
    }
    .modal-title {
        position: relative;
        padding-bottom: 0;
        font-family: "Georgia", serif;
        font-size: 16px;
        color: #343941;
        text-align: center;
        font-style: italic;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        margin-bottom: 0;
    }
    .modal-input {
        width: 100%;
        padding: 14px 14px;
        border-radius: 14px;
        border: 1px solid transparent;
        background: #FAFBFC;
        font-size: 13px;
        color: #5d636e;
        outline: none;
        transition: all 0.3s ease;
        box-sizing: border-box;
    }
    .modal-input::placeholder {
        color: #aeb4be;
        font-family: system-ui, sans-serif;
    }
    .modal-input:focus {
        background: #ffffff;
        border-color: rgba(17, 17, 17, 0.42);
        box-shadow: 0 4px 12px rgba(17, 17, 17, 0.055);
    }
    .modal-textarea {
        min-height: 168px;
        max-height: 46vh;
        resize: vertical;
        line-height: 1.65;
        white-space: pre-wrap;
    }

    .modal-copy {
        width: 100%;
        padding: 0 2px;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: #6F7682;
        font-size: 13px;
        line-height: 1.75;
        text-align: center;
        white-space: pre-wrap;
        word-break: break-word;
        box-shadow: none;
    }

    .modal-choice-list {
        display: grid;
        gap: 0;
        width: 100%;
    }
    .modal-choice-action {
        width: 100%;
        min-height: 46px;
        border: 0;
        border-bottom: 1px solid rgba(150, 158, 168, 0.24);
        border-radius: 0;
        padding: 0 14px;
        background: transparent;
        color: #343941;
        font-size: 13px;
        line-height: 1.2;
        text-align: center;
        letter-spacing: 0.02em;
        appearance: none;
        -webkit-appearance: none;
    }
    .modal-choice-action.is-primary {
        background: linear-gradient(90deg, rgba(181, 199, 211, 0.18), rgba(181, 199, 211, 0.08));
        color: #111111;
    }
    .modal-choice-action.is-danger {
        background: transparent;
        color: #A84540;
    }
    .modal-choice-action:active {
        transform: none;
        opacity: 1;
        background: rgba(181, 199, 211, 0.16);
    }

    .chat-global-css-btn {
        appearance: none;
        -webkit-appearance: none;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    .chat-me-follow-avatar-dialog {
        max-width: 326px;
        border-radius: 22px;
        background: #ffffff;
    }
    .chat-me-follow-avatar-copy {
        color: #87909D;
        font-size: 11px;
        line-height: 1.62;
        letter-spacing: 0.04em;
        text-align: center;
        margin-top: -8px;
    }
    .chat-me-follow-avatar-form {
        display: grid;
        gap: 10px;
    }
    .chat-me-follow-avatar-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 92px;
        align-items: end;
        gap: 8px;
    }
    .chat-me-follow-avatar-field {
        display: grid;
        gap: 7px;
    }
    .chat-me-follow-avatar-field span {
        color: #A0A7B1;
        font-family: "Courier New", Courier, monospace;
        font-size: 9px;
        line-height: 1;
        letter-spacing: 0.16em;
    }
    .chat-me-follow-avatar-input {
        min-height: 39px;
        border-radius: 12px;
        background: #F5F6F8;
        color: #4F5864;
        font-size: 12px;
        padding: 10px 11px;
    }
    .chat-me-follow-file-btn {
        min-height: 39px;
        border-radius: 12px;
        font-size: 11px;
        letter-spacing: 0.08em;
        padding: 0 8px;
    }

    .capsule-tabs {
        display: flex;
        background: #f0f2f5;
        border-radius: 12px;
        padding: 3px;
        position: relative;
    }
    .tab-btn {
        flex: 1;
        text-align: center;
        padding: 8px 0;
        font-size: 13px;
        font-weight: 500;
        color: #8c95a3;
        border-radius: 10px;
        cursor: pointer;
        transition: all 0.25s ease;
        position: relative;
        z-index: 2;
    }
    .tab-btn.active {
        color: #000000;
        background: #ffffff;
        box-shadow: 0 2px 10px rgba(17, 17, 17, 0.07);
    }

    .file-upload-box {
        display: block;
        width: 100%;
        position: relative;
        cursor: pointer;
    }
    .file-upload-placeholder {
        padding: 24px 0;
        text-align: center;
        background: #f6f6f6;
        border: 1px dashed #bdbdbd;
        border-radius: 14px;
        color: #4f4f4f;
        font-size: 13px;
        font-weight: 500;
        transition: background 0.2s, border-color 0.2s, color 0.2s;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    .file-upload-placeholder svg {
        width: 22px;
        height: 22px;
        stroke: #111111;
        stroke-width: 1.5;
        fill: none;
        opacity: 0.8;
    }
    .file-upload-box:active .file-upload-placeholder {
        background: #eeeeee;
        border-color: #111111;
        color: #111111;
    }

    .image-preview {
        width: 100%;
        height: 120px;
        border-radius: 14px;
        background-color: #f5f5f5;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        border: 1px solid #dedede;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
        position: relative;
    }
    .image-preview::after {
        content: '点击更换';
        position: absolute;
        inset: 0;
        background: rgba(255,255,255,0.74);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        color: #7a828f;
        font-weight: 500;
        opacity: 0;
        transition: opacity 0.2s;
        border-radius: 14px;
    }
    .image-preview:active::after {
        opacity: 1;
    }

    .modal-actions {
        display: flex;
        width: 100%;
        height: 50px;
        border-top: 1px solid rgba(52, 56, 65, 0.14);
    }
    .modal-actions button {
        flex: 1;
        border: none;
        background: transparent;
        font-size: 15px;
        font-family: system-ui, -apple-system, sans-serif;
        font-weight: 400;
        cursor: pointer;
        transition: background 0.2s;
    }
    .modal-actions button:active {
        background: #f4f5f8;
    }
    .modal-actions .btn-cancel {
        color: #9aa0ab;
        border-right: 1px solid rgba(52, 56, 65, 0.14);
    }
    .btn-save {
        color: #000;
        font-weight: 400;
        letter-spacing: 0.08em;
    }

    /* Settings APP：dock 第一个图标进入的独立页面 */
    .settings-app-page {
        --settings-paper: #FCFBF7;
        --settings-ink: #000;
        --settings-ink-deep: #343941;
        --settings-muted: #87909D;
        --settings-faint: #B8BEC7;
        --settings-line: rgba(150, 158, 168, 0.28);
        --settings-line-strong: rgba(92, 99, 110, 0.38);
        --settings-rose: #9A9A9A;
        --settings-blue: #B5C7D3;
        --settings-green: #7CA58E;
        --settings-red: #8E8E8E;
        position: fixed;
        inset: 0;
        z-index: 9000;
        color: var(--settings-ink);
        background-color: var(--settings-paper);
        background-image:
            radial-gradient(circle at 12% 18%, rgba(245, 245, 245, 0.72) 0%, rgba(245, 245, 245, 0.28) 30%, rgba(245, 245, 245, 0) 56%),
            radial-gradient(circle at 88% 76%, rgba(230, 238, 242, 0.78) 0%, rgba(230, 238, 242, 0.34) 32%, rgba(230, 238, 242, 0) 60%),
            linear-gradient(135deg, #FCFBF7 0%, #F8F4EF 100%);
        display: flex;
        flex-direction: column;
        opacity: 0;
        pointer-events: none;
        transform: none;
        transition: none;
        overflow: hidden;
        border-radius: 0;
        box-shadow: none;
        isolation: isolate;
    }
    .settings-app-page::before {
        content: '';
        position: absolute;
        inset: 0;
        z-index: 0;
        pointer-events: none;
        background-image:
            radial-gradient(circle, rgba(74, 78, 89, 0.032) 0 0.58px, transparent 0.68px),
            linear-gradient(rgba(120, 130, 140, 0.022) 1px, transparent 1px),
            linear-gradient(90deg, rgba(120, 130, 140, 0.016) 1px, transparent 1px);
        background-size: 12px 12px, 42px 42px, 42px 42px;
        opacity: 0.52;
    }
     .settings-app-page::after {
        content: none;
        position: absolute;
        right: -18px;
        top: max(108px, 14vh);
        z-index: 1;
        pointer-events: none;
        font-family: Georgia, "Times New Roman", serif;
        font-size: clamp(48px, 17vw, 74px);
        line-height: 0.9;
        letter-spacing: -0.08em;
        font-style: italic;
        color: rgba(52, 57, 65, 0.052);
        transform: rotate(-6deg);
        white-space: nowrap;
    }
    .settings-app-page.is-detail::after {
        content: attr(data-detail-no);
        right: 13px;
        top: max(76px, 9vh);
        font-family: "Courier New", Courier, monospace;
        font-size: clamp(72px, 24vw, 116px);
        line-height: 0.82;
        letter-spacing: -0.12em;
        font-style: normal;
        color: rgba(52, 57, 65, 0.045);
        transform: rotate(0deg);
    }
    .settings-app-page.show {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }
    .settings-app-inner {
        position: relative;
        z-index: 2;
        width: 100%;
        height: 100%;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
        scrollbar-width: none;
        background: transparent;
    }
    .settings-app-inner::-webkit-scrollbar { display: none; }
    .settings-app-page input,
    .settings-app-page textarea,
    .settings-app-page select {
        user-select: text;
        -webkit-user-select: text;
    }
    .settings-app-page button,
    .settings-app-page input,
    .settings-app-page textarea,
    .settings-app-page select {
        font-family: inherit;
    }

    /* 标题是页面内容，不是导航栏 */
    .settings-app-head {
        position: relative;
        z-index: 2;
        padding: max(38px, calc(env(safe-area-inset-top) + 22px)) 24px 0;
        background: transparent;
        border: 0;
        box-shadow: none;
        overflow: visible;
    }
    .settings-app-head::before,
    .settings-app-head::after { content: none; }
    .settings-head-top {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        margin-bottom: 10px;
    }
    .settings-app-kicker,
    .settings-section-label,
    .settings-search-state,
    .settings-entry-subtitle,
    .settings-detail-label,
    .settings-field-label,
    .settings-mini-label {
        font-size: 10px;
        line-height: 1;
        letter-spacing: 0.2em;
        text-transform: uppercase;
        color: var(--settings-muted);
    }
    .settings-app-kicker {
        color: #7F8791;
        letter-spacing: 0.24em;
    }
    .settings-title-row {
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        gap: 18px;
    }
    .settings-app-title,
    .settings-subpage-title {
        display: inline-flex;
        align-items: center;
        font-family: Georgia, "Times New Roman", "Songti SC", serif;
        font-size: clamp(34px, 10vw, 40px);
        line-height: 0.94;
        letter-spacing: -0.06em;
        font-weight: 400;
        font-style: italic;
        color: var(--settings-ink-deep);
        cursor: pointer;
        text-shadow: none;
    }
    .settings-app-title:active,
    .settings-subpage-title:active { opacity: 0.58; }
    .settings-volume {
        font-family: "Courier New", Courier, monospace;
        font-size: 10px;
        letter-spacing: 0.18em;
        color: #9CA3AF;
        padding-bottom: 3px;
        white-space: nowrap;
    }

    .settings-content {
        position: relative;
        z-index: 2;
        padding: 6px 22px max(88px, calc(env(safe-area-inset-bottom) + 72px));
        background: transparent;
    }
    .settings-content::before,
    .settings-content::after { content: none; }
    .settings-home-content.is-hidden { display: none; }
    .settings-app-page.is-detail .settings-app-head {
        display: none;
    }
    .settings-app-page.is-detail .settings-content {
        padding-top: max(34px, calc(env(safe-area-inset-top) + 18px));
    }

    /* 直接使用第二页上方组件内部同款动效元素与节奏 */
    .settings-archive-motion {
        position: relative;
        z-index: 5;
        height: 68px;
        margin: -2px -8px 8px 58px;
        overflow: visible;
        pointer-events: none;
    }
    .settings-archive-motion .wa-deco-layer {
        position: absolute;
        inset: -4px -6px -4px 24px;
        z-index: 6;
        opacity: 1;
        overflow: visible;
        transform: scale(1.12);
        transform-origin: right center;
    }
    .settings-archive-motion svg {
        width: 100%;
        height: 100%;
        overflow: visible;
        display: block;
    }

    .settings-search-wrap {
        position: relative;
        margin-bottom: 12px;
    }
    .settings-search-wrap::before { content: none; }
    .settings-search-wrap::after {
        content: '';
        position: absolute;
        left: 52px;
        right: 42px;
        bottom: -5px;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(150,150,150,0.30), rgba(181,199,211,0.30), transparent);
        transform-origin: left center;
        pointer-events: none;
    }
    .settings-search-line {
        position: relative;
        z-index: 1;
        min-height: 44px;
        border-top: 1px solid rgba(74,78,89,0.20);
        border-bottom: 1px solid rgba(150,158,168,0.22);
        background: transparent;
        display: grid;
        grid-template-columns: 8px auto minmax(36px, 1fr) auto;
        align-items: center;
        gap: 9px;
    }
    .settings-online-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--settings-green);
        box-shadow: 0 0 0 4px rgba(124,165,142,0.10);
    }
    .settings-scan-rule {
        height: 1px;
        background: linear-gradient(90deg, rgba(150,150,150,0.48), rgba(181,199,211,0.52));
        min-width: 48px;
        position: relative;
        overflow: hidden;
    }
    .settings-scan-rule::after {
        content: '';
        position: absolute;
        top: -2px;
        left: -32%;
        width: 34%;
        height: 5px;
        background: linear-gradient(90deg, transparent, rgba(252,251,247,0.72), transparent);
    }
    .settings-search-label {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        font-size: 10px;
        line-height: 1;
        letter-spacing: 0.18em;
        color: #000;
        white-space: nowrap;
        font-family: "Courier New", Courier, monospace;
    }
    .settings-search-label svg {
        width: 14px;
        height: 14px;
        stroke: currentColor;
        stroke-width: 1.2;
        fill: none;
        stroke-linecap: round;
    }
    .settings-search-input {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        border: 0;
        outline: none;
        background: transparent;
        color: transparent;
        caret-color: #000;
        font-size: 16px;
        opacity: 0.02;
        z-index: 2;
    }
    .settings-filter-row {
        min-height: 0;
        margin-top: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        opacity: 0;
        transform: translateY(-4px);
        pointer-events: none;
        transition: opacity 0.2s ease, transform 0.2s ease, margin-top 0.2s ease;
    }
    .settings-filter-row.show {
        min-height: 24px;
        margin-top: 16px;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
    .settings-filter-text {
        font-size: 11px;
        color: #757D88;
        letter-spacing: 0.08em;
        font-family: "Courier New", Courier, monospace;
    }
    .settings-filter-clear {
        border: 0;
        border-bottom: 1px solid rgba(74,78,89,0.58);
        background: transparent;
        color: #000;
        font-size: 10px;
        letter-spacing: 0.16em;
        font-family: "Courier New", Courier, monospace;
        cursor: pointer;
        padding: 2px 0;
    }
    .settings-section-label {
        margin: 0 0 10px;
        color: #8C95A3;
        line-height: 1.55;
    }
    .settings-entry-list {
        border-top: 1px solid rgba(74,78,89,0.34);
        display: flex;
        flex-direction: column;
    }
    .settings-entry {
        position: relative;
        min-height: 76px;
        display: grid;
        grid-template-columns: 50px minmax(0, 1fr) 30px;
        align-items: center;
        gap: 20px;
        padding: 14px 10px 16px 12px;
        border-bottom: 1px solid rgba(150,158,168,0.28);
        color: var(--settings-ink);
        text-decoration: none;
        cursor: pointer;
        background: transparent;
        overflow: hidden;
    }
    .settings-entry::before {
        content: none;
        display: none;
    }
    .settings-entry::after {
        content: '';
        position: absolute;
        inset: 8px 0;
        background: linear-gradient(90deg, rgba(150,150,150,0.04), transparent 62%);
        opacity: 0;
        transform: translateX(-8px);
        transition: opacity 0.24s ease, transform 0.24s ease;
        pointer-events: none;
    }
    .settings-entry:hover::before,
    .settings-entry:focus-visible::before,
    .settings-entry:active::before { content: none; }
    .settings-entry:hover::after,
    .settings-entry:focus-visible::after,
    .settings-entry:active::after {
        opacity: 1;
        transform: translateX(0);
    }
    .settings-entry:hover .settings-entry-copy,
    .settings-entry:focus-visible .settings-entry-copy,
    .settings-entry:active .settings-entry-copy { transform: none; }
    .settings-entry:hover .settings-entry-num,
    .settings-entry:focus-visible .settings-entry-num,
    .settings-entry:active .settings-entry-num { color: #343941; }
    .settings-entry:hover .settings-entry-arrow,
    .settings-entry:focus-visible .settings-entry-arrow,
    .settings-entry:active .settings-entry-arrow {
        opacity: 1;
        transform: translateX(0) rotate(45deg);
    }
    .settings-entry-num {
        display: block;
        align-self: start;
        padding-top: 5px;
        font-family: "Courier New", Courier, monospace;
        font-size: 11px;
        line-height: 1;
        letter-spacing: 0.06em;
        color: #9AA2AF;
        position: relative;
        z-index: 1;
    }
    .settings-entry-copy {
        min-width: 0;
        transition: transform 0.24s ease;
        position: relative;
        z-index: 1;
    }
    .settings-entry-title {
        display: block;
        font-family: Georgia, "Times New Roman", "Songti SC", serif;
        font-size: 25px;
        line-height: 1.05;
        font-weight: 400;
        font-style: italic;
        letter-spacing: -0.04em;
        color: var(--settings-ink-deep);
        margin-bottom: 6px;
    }
    .settings-entry-subtitle {
        display: block;
        color: #AAB0BA;
        letter-spacing: 0.18em;
    }
    .settings-entry-arrow {
        justify-self: end;
        width: 10px;
        height: 10px;
        opacity: 0.34;
        transform: translateX(-2px) rotate(45deg);
        transition: opacity 0.22s ease, transform 0.22s ease;
        border-top: 1.4px solid currentColor;
        border-right: 1.4px solid currentColor;
        color: #000;
        font-size: 0;
        line-height: 0;
        position: relative;
        z-index: 1;
    }
    .settings-empty-state {
        display: none;
        padding: 32px 0;
        border-bottom: 1px solid rgba(184,188,196,0.34);
        color: #9CA3AF;
        font-size: 11px;
        letter-spacing: 0.14em;
        text-transform: uppercase;
    }
    .settings-empty-state.show { display: block; }

    /* 子页面 */
    .settings-detail-panel {
        display: none;
        position: relative;
        z-index: 2;
        padding-top: 4px;
    }
    .settings-detail-panel.show { display: block; }
    .settings-subpage-head {
        padding-bottom: 28px;
        border-bottom: 1px solid rgba(150,158,168,0.24);
        margin-bottom: 28px;
    }
    .settings-subpage-title {
        font-size: clamp(32px, 9.2vw, 38px);
        margin-top: 16px;
    }
    .settings-form-stack {
        display: flex;
        flex-direction: column;
        gap: 26px;
    }
    .settings-field {
        position: relative;
        border-bottom: 1px solid rgba(150,158,168,0.25);
        padding-top: 4px;
        padding-bottom: 18px;
    }

    .settings-form-stack {
        counter-reset: settings-detail-item;
    }
    .settings-form-stack > .settings-field,
    .settings-form-stack > .settings-switch-line,
    .settings-form-stack > .settings-storage-card,
    .settings-form-stack > .settings-github-box {
        counter-increment: settings-detail-item;
        padding-left: 42px;
    }
    .settings-form-stack > .settings-field::before,
    .settings-form-stack > .settings-switch-line::before,
    .settings-form-stack > .settings-storage-card::before,
    .settings-form-stack > .settings-github-box::before {
        content: counter(settings-detail-item, decimal-leading-zero);
        position: absolute;
        left: 0;
        top: 8px;
        font-family: "Courier New", Courier, monospace;
        font-size: 11px;
        line-height: 1;
        letter-spacing: 0.08em;
        color: #9AA2AF;
    }
    .settings-form-stack > .settings-switch-line::before { top: 21px; }
    .settings-form-stack > .settings-storage-card,
    .settings-form-stack > .settings-github-box { position: relative; }
    .settings-form-stack > .settings-storage-card::before,
    .settings-form-stack > .settings-github-box::before { top: 6px; }
    .settings-field-label {
        display: block;
        margin-bottom: 14px;
        color: #8C95A3;
        line-height: 1.55;
    }
    .settings-field-input,
    .settings-field-select,
    .settings-field-textarea {
        width: 100%;
        border: 0;
        outline: 0;
        background: transparent;
        color: #424852;
        font-size: 15px;
        line-height: 1.45;
        padding: 0 0 4px;
        border-radius: 0;
    }
    .settings-field-textarea {
        min-height: 156px;
        resize: vertical;
        border: 1px solid rgba(150,158,168,0.22);
        padding: 14px;
        background: transparent;
    }
    .settings-field-input::placeholder,
    .settings-field-textarea::placeholder { color: #B0B6C0; }
    .settings-inline-row,
    .settings-preset-row,
    .settings-action-row,
    .settings-two-col {
        display: flex;
        align-items: center;
        gap: 12px;
    }
    .settings-two-col > * { flex: 1; min-width: 0; }
    .settings-preset-row .settings-field-select { flex: 1; }
    .settings-icon-button,
    .settings-thin-button,
    .settings-primary-button,
    .settings-ghost-button {
        border: 1px solid rgba(150,158,168,0.32);
        background: transparent;
        color: #000;
        min-height: 54px;
        padding: 0 15px;
        cursor: pointer;
        transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
    }
    .settings-icon-button {
        width: 42px;
        min-width: 42px;
        padding: 0;
        display: inline-flex;
        justify-content: center;
        align-items: center;
    }
    .settings-icon-button svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.4; fill: none; }
    .settings-primary-button {
        flex: 1;
        background: #000;
        border-color: #000;
        color: #FCFBF7;
        letter-spacing: 0.16em;
        font-size: 11px;
    }
    .settings-ghost-button,
    .settings-thin-button {
        flex: 1;
        letter-spacing: 0.14em;
        font-size: 11px;
    }
    .settings-icon-button:active,
    .settings-thin-button:active,
    .settings-primary-button:active,
    .settings-ghost-button:active { transform: translateY(1px); }
    .settings-model-row { display: grid; grid-template-columns: minmax(0, 1fr) 42px; gap: 12px; }
    .settings-range-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 14px;
    }
    .settings-range-value {
        font-family: "Courier New", Courier, monospace;
        color: #000;
        font-size: 12px;
        letter-spacing: 0.12em;
    }
    .settings-range,
    .one-global-range {
        width: 100%;
        appearance: none;
        -webkit-appearance: none;
        height: 18px;
        background: transparent;
        outline: none;
    }
    .settings-range::-webkit-slider-runnable-track,
    .one-global-range::-webkit-slider-runnable-track {
        height: 2px;
        background: var(--one-range-track-bg, linear-gradient(90deg, rgba(150,150,150,0.72), rgba(181,199,211,0.72)));
        border-radius: 999px;
    }
    .settings-range::-webkit-slider-thumb,
    .one-global-range::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 26px;
        height: 12px;
        margin-top: -4px;
        border-radius: 6px;
        background: var(--one-range-thumb-bg, #000);
        border: var(--one-range-thumb-border, 1px solid rgba(252,251,247,0.78));
        box-shadow: none;
    }
    .settings-range::-moz-range-track,
    .one-global-range::-moz-range-track {
        height: 2px;
        background: var(--one-range-track-bg, linear-gradient(90deg, rgba(150,150,150,0.72), rgba(181,199,211,0.72)));
    }
    .settings-range::-moz-range-thumb,
    .one-global-range::-moz-range-thumb {
        width: 22px;
        height: 10px;
        border-radius: 6px;
        background: var(--one-range-thumb-bg, #000);
        border: var(--one-range-thumb-border, 1px solid rgba(252,251,247,0.78));
    }
    .settings-segmented {
        display: grid;
        grid-template-columns: 1fr 1fr;
        border-top: 1px solid rgba(150,158,168,0.28);
        border-bottom: 1px solid rgba(150,158,168,0.28);
    }
    .settings-segmented button {
        height: 48px;
        border: 0;
        background: transparent;
        color: #87909D;
        letter-spacing: 0.16em;
        font-size: 11px;
        cursor: pointer;
    }
    .settings-segmented button + button { border-left: 1px solid rgba(150,158,168,0.22); }
    .settings-segmented button.active { color: #343941; background: rgba(150,150,150,0.07); }
    .settings-switch-line {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 54px;
        border-top: 1px solid rgba(150,158,168,0.24);
        border-bottom: 1px solid rgba(150,158,168,0.24);
    }
    .settings-switch-line + .settings-switch-line { border-top: 0; }
    .settings-switch-text strong {
        display: block;
        font-size: 16px;
        color: #000;
        font-weight: 500;
        margin-bottom: 5px;
    }
    .settings-switch-text span { font-size: 11px; color: #9CA3AF; letter-spacing: 0.08em; }
    .settings-switch {
        position: relative;
        width: 48px;
        height: 26px;
        flex: 0 0 auto;
    }
    .settings-switch input { opacity: 0; position: absolute; inset: 0; }
    .settings-switch i {
        position: absolute;
        inset: 0;
        border: 1px solid rgba(150,158,168,0.44);
        background: rgba(252,251,247,0.52);
        border-radius: 999px;
        transition: background 0.18s ease, border-color 0.18s ease;
    }
    .settings-switch i::after {
        content: '';
        position: absolute;
        width: 20px;
        height: 20px;
        left: 3px;
        top: 3px;
        border-radius: 50%;
        background: #AAB0BA;
        transition: transform 0.18s ease, background 0.18s ease;
    }
    .settings-switch input:checked + i,
    .settings-switch.is-on i { border-color: rgba(74,78,89,0.48); background: rgba(181,199,211,0.22); }
    .settings-switch input:checked + i::after,
    .settings-switch.is-on i::after { transform: translateX(22px); background: #000; }
    .settings-status-line {
        margin-top: 12px;
        font-size: 11px;
        color: #87909D;
        line-height: 1.6;
    }
    .settings-preview-box {
        min-height: 118px;
        border: 1px solid rgba(150,158,168,0.25);
        background:
            radial-gradient(circle at 16% 18%, rgba(245,245,245,0.68), transparent 48%),
            radial-gradient(circle at 86% 76%, rgba(230,238,242,0.70), transparent 52%),
            #FCFBF7;
        margin-bottom: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #8C95A3;
        font-size: 11px;
        letter-spacing: 0.16em;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }
    .settings-font-preview {
        min-height: 118px;
        border: 1px solid rgba(150,158,168,0.25);
        padding: 20px;
        color: #000;
        background: rgba(252,251,247,0.48);
    }
    .settings-font-preview strong {
        display: block;
        font-family: Georgia, "Times New Roman", serif;
        font-size: 26px;
        font-style: italic;
        font-weight: 400;
        margin-bottom: 8px;
    }
    .settings-font-preview span { font-size: 11px; letter-spacing: 0.18em; color: #9CA3AF; }
    .settings-app-editor-list { display: flex; flex-direction: column; gap: 14px; }
    .settings-app-editor-main { min-width: 0; }
    .settings-app-editor-row {
        display: grid;
        grid-template-columns: 40px minmax(0, 1fr) auto;
        gap: 12px;
        align-items: center;
        padding: 14px 0;
        border-bottom: 1px solid rgba(150,158,168,0.22);
    }
    .settings-app-editor-icon {
        width: 38px;
        height: 38px;
        border: 1px solid rgba(150,158,168,0.22);
        background-size: contain;
        background-position: center;
        background-repeat: no-repeat;
    }
    .settings-app-editor-main .settings-field-input {
        padding-bottom: 0;
    }
    .settings-app-editor-color {
        width: 32px;
        height: 32px;
        border: 1px solid rgba(150,158,168,0.24);
        border-radius: 999px;
        padding: 0;
        background: transparent;
        appearance: none;
        -webkit-appearance: none;
    }
    .settings-app-editor-color::-webkit-color-swatch-wrapper { padding: 3px; }
    .settings-app-editor-color::-webkit-color-swatch { border: 0; border-radius: 999px; }
    .settings-app-editor-color::-moz-color-swatch { border: 0; border-radius: 999px; }
    .settings-app-editor-actions { display: flex; gap: 10px; }
    .settings-app-editor-actions button { min-height: 34px; padding: 0 10px; font-size: 10px; }
    .settings-storage-card {
        display: grid;
        grid-template-columns: 128px minmax(0, 1fr);
        gap: 22px;
        align-items: center;
        padding-bottom: 24px;
        border-bottom: 1px solid rgba(150,158,168,0.25);
    }
    .settings-storage-ring {
        width: 128px;
        height: 128px;
        border-radius: 50%;
        background: conic-gradient(#9A9A9A 0 18%, #B5C7D3 18% 48%, #C8D2E0 48% 68%, #E5E5E5 68% 100%);
        position: relative;
    }
    .settings-storage-ring::after {
        content: attr(data-percent);
        position: absolute;
        inset: 18px;
        border-radius: 50%;
        background: #FCFBF7;
        display: flex;
        align-items: center;
        justify-content: center;
        font-family: "Courier New", Courier, monospace;
        font-size: 19px;
        color: #000;
    }
    .settings-storage-legend { display: flex; flex-direction: column; gap: 10px; font-size: 12px; color: #757D88; }
    .settings-storage-legend i { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; }
    .settings-disclaimer {
        font-size: 13px;
        line-height: 2.05;
        color: #000;
        letter-spacing: 0.02em;
        white-space: pre-wrap;
    }

    .settings-danger-button {
        width: 100%;
        min-height: 48px;
        border: 1px solid rgba(142, 142, 142, 0.62);
        background: #202020;
        color: #FCFBF7;
        letter-spacing: 0.18em;
        font-size: 11px;
        cursor: pointer;
        margin-top: 6px;
        box-shadow: 0 12px 26px rgba(32, 32, 32, 0.10);
        transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
    }
    .settings-danger-button:active { transform: translateY(1px); background: #151515; }
    .settings-danger-note {
        font-size: 11px;
        line-height: 1.7;
        letter-spacing: 0.06em;
        color: #777777;
        margin-top: -8px;
    }
    .settings-disclaimer-modal { z-index: 15000; }
    .settings-disclaimer-modal.show { display: flex; opacity: 1; }
    .settings-disclaimer-dialog {
        max-height: min(78vh, 620px);
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
    .settings-disclaimer-dialog::before,
    .settings-disclaimer-dialog::after { content: none; display: none; }
    .settings-disclaimer-modal-head { padding: 0; }
    .settings-disclaimer-dialog .modal-content {
        position: relative;
    }
    .settings-disclaimer-dialog .modal-content::after {
        content: '';
        position: absolute;
        left: 20px;
        right: 20px;
        bottom: 0;
        height: 72px;
        pointer-events: none;
        z-index: 3;
        opacity: 1;
        transition: opacity 0.22s ease;
        background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,0.92) 58%, #ffffff 100%);
    }
    .settings-disclaimer-modal.is-scroll-complete .settings-disclaimer-dialog .modal-content::after {
        opacity: 0;
    }
    .settings-disclaimer-meta {
        margin-top: 8px;
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 12px;
    }
    .settings-disclaimer-kicker {
        font-size: 9px;
        letter-spacing: 0.18em;
        text-transform: uppercase;
        color: #87909D;
        margin: 0;
        min-width: 0;
    }
    .settings-disclaimer-title {
        font-family: Georgia, "Times New Roman", "Songti SC", serif;
        font-size: 17px;
        line-height: 1.1;
        font-style: italic;
        font-weight: 400;
        letter-spacing: 0.04em;
        color: #000;
        text-align: left;
        align-self: flex-start;
        width: 100%;
    }
    .settings-disclaimer-vol {
        position: static;
        flex: 0 0 auto;
        font-family: "Courier New", Courier, monospace;
        font-size: 9px;
        letter-spacing: 0.14em;
        color: #AAB0BA;
        white-space: nowrap;
    }
    .settings-disclaimer-scroll {
        max-height: min(46vh, 360px);
        overflow-y: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        color: #000;
        font-size: 12px;
        line-height: 1.82;
        letter-spacing: 0.02em;
        white-space: normal;
        flex: 1 1 auto;
        padding-bottom: 34px;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }
    .settings-disclaimer-scroll p { margin: 0 0 14px; }
    .settings-disclaimer-scroll p:last-child { margin-bottom: 0; }
    .settings-disclaimer-mark {
        color: #2E323A;
        font-weight: 600;
    }
    .settings-disclaimer-ban {
        display: block;
        margin-top: 2px;
        color: #2E323A;
        font-weight: 600;
    }
    .settings-disclaimer-scroll::-webkit-scrollbar { display: none; width: 0; height: 0; }
    .settings-disclaimer-confirm { width: 100%; }
    .settings-disclaimer-confirm:disabled {
        color: #B6BDC7;
        opacity: 0.48;
        cursor: not-allowed;
        background: transparent;
    }
    .settings-disclaimer-confirm .settings-disclaimer-arrow { display: none; }

    #desktopDialogModal { z-index: 18000; }

    .modal-chat-beauty-form {
        margin-top: 14px;
        display: flex;
        flex-direction: column;
        gap: 14px;
        max-height: min(58vh, 520px);
        overflow-y: auto;
        padding-right: 1px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .modal-chat-beauty-form::-webkit-scrollbar { display: none; width: 0; height: 0; }
    .offline-preset-row {
        align-items: stretch;
        gap: 8px;
    }
    .offline-preset-row .settings-field-select {
        min-height: 44px;
    }
    .modal-choice-icon {
        width: 44px;
        min-width: 44px;
        min-height: 44px;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 44px;
    }
    .modal-choice-svg {
        width: 18px;
        height: 18px;
        stroke: currentColor;
        stroke-width: 1.4;
        fill: none;
    }
    .offline-wallpaper-actions,
    .offline-css-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .offline-view-grid {
        align-items: stretch;
    }
    .offline-view-field .settings-field-label {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 8px;
        margin-bottom: 8px;
    }
    .offline-view-field .settings-field-label b {
        color: #69717D;
        font-size: 10px;
        line-height: 1;
        letter-spacing: 0.13em;
        font-weight: 600;
    }
    .offline-view-field .settings-field-label small {
        color: #A0A7B1;
        font-size: 10px;
        line-height: 1;
        letter-spacing: 0.04em;
        white-space: nowrap;
    }
    .chat-beauty-preview {
        border-radius: 24px;
        background:
            radial-gradient(circle at 12% 10%, rgba(236, 239, 243, 0.68), transparent 36%),
            linear-gradient(180deg, #FFFEFB 0%, #F7F5F1 100%);
        padding: 16px 14px;
        display: grid;
        gap: 10px;
        box-shadow: inset 0 0 0 1px rgba(52,57,65,0.05);
    }
    .chat-beauty-mini-row {
        display: flex;
        align-items: flex-end;
        gap: 8px;
    }
    .chat-beauty-mini-row.is-me {
        flex-direction: row-reverse;
    }
    .chat-beauty-mini-avatar {
        width: 30px;
        height: 30px;
        border-radius: 50%;
        display: grid;
        place-items: center;
        flex: 0 0 30px;
        background: #EEF1F3;
        color: rgba(52,57,65,0.45);
        font-family: Georgia, "Times New Roman", serif;
        font-size: 10px;
        font-style: italic;
        border: 1px solid rgba(255,255,255,0.82);
    }
    .chat-beauty-mini-row p {
        margin: 0;
        max-width: 210px;
        min-height: 30px;
        padding: 7px 11px;
        border-radius: 16px;
        font-size: var(--chat-thread-font-size);
        line-height: 1.35;
        letter-spacing: 0.01em;
    }
    .chat-beauty-mini-row.is-ta p {
        background: var(--chat-bubble-ta);
        color: var(--chat-text-ta);
        border-bottom-left-radius: 6px;
    }
    .chat-beauty-mini-row.is-me p {
        background: var(--chat-bubble-me);
        color: var(--chat-text-me);
        border-bottom-right-radius: 6px;
    }
    .chat-beauty-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .chat-beauty-field {
        min-width: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 11px 12px;
        border-radius: 18px;
        background: #F7F8FB;
        box-shadow: inset 0 0 0 1px rgba(52,57,65,0.055);
        color: #4A4E59;
        font-size: 12px;
        line-height: 1.2;
    }
    .chat-beauty-field span {
        min-width: 0;
        color: rgba(52,57,65,0.68);
        font-size: 11px;
        letter-spacing: 0.04em;
    }
    .chat-beauty-field em {
        font-style: normal;
        color: rgba(52,57,65,0.42);
        font-family: "Courier New", Courier, monospace;
    }
    .chat-beauty-field input[type="color"] {
        width: 28px;
        height: 28px;
        flex: 0 0 28px;
        padding: 0;
        border: 0;
        border-radius: 50%;
        overflow: hidden;
        background: transparent;
    }
    .chat-beauty-field input[type="range"] {
        width: 100%;
        accent-color: #000;
    }
    .chat-beauty-field.is-range,
    .chat-beauty-field.is-block {
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 9px;
    }
    .chat-beauty-field textarea {
        width: 100%;
        min-height: 72px;
        resize: vertical;
        border: 0;
        outline: none;
        background: #ffffff;
        border-radius: 14px;
        padding: 10px;
        color: #343941;
        font: 11px/1.55 "Courier New", Courier, monospace;
        box-shadow: inset 0 0 0 1px rgba(52,57,65,0.06);
    }
    #chatBeautyCss { min-height: 116px; }
    .chat-beauty-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .chat-beauty-actions button {
        min-height: 42px;
        border: 0;
        border-radius: 16px;
        background: #F4F6F8;
        color: #000;
        font-size: 12px;
        letter-spacing: 0.04em;
        cursor: pointer;
        box-shadow: inset 0 0 0 1px rgba(52,57,65,0.045);
    }
    .chat-beauty-actions button:active { transform: translateY(1px); opacity: 0.72; }
    .chat-beauty-actions button:last-child { color: #9C4D54; }

    .settings-choice-modal { z-index: 12000; }
    .settings-choice-modal.show { display: flex; opacity: 1; }
    .settings-choice-box {
        max-height: min(74vh, 560px);
        overflow-y: auto;
        scrollbar-width: none;
    }
    .settings-choice-box::-webkit-scrollbar { display: none; }
    .settings-choice-title {
        font-family: Georgia, "Times New Roman", serif;
        font-size: 17px;
        font-style: italic;
        font-weight: 400;
        color: #000;
        text-align: center;
        margin-bottom: 14px;
    }
    .settings-choice-list { border-top: 1px solid rgba(240,242,245,1); }
    .settings-choice-item {
        width: 100%;
        min-height: 50px;
        border: 0;
        border-bottom: 1px solid #f0f2f5;
        background: transparent;
        display: flex;
        justify-content: space-between;
        align-items: center;
        color: #000;
        font-size: 13px;
        cursor: pointer;
        text-align: left;
    }
    .settings-choice-item span:last-child { color: #AAB0BA; font-family: "Courier New", Courier, monospace; font-size: 10px; }


    /* Unified System Toast: local ONE style, no external component copy. */
    .settings-toast,
    .wb-toast,
    .chat-toast {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 30000;
        min-width: 120px;
        max-width: min(72vw, 218px);
        min-height: 0;
        padding: 20px 25px;
        border-radius: 16px;
        display: none;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 10px;
        background: rgba(255, 255, 255, 0.92);
        color: #000;
        box-shadow: 0 5px 15px rgba(0,0,0,0.10);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        text-align: center;
        pointer-events: none;
    }
    .settings-toast.show,
    .wb-toast.show,
    .chat-toast.show {
        display: flex;
        animation: ios-toast-fade-in 0.2s ease-out;
    }
    .system-toast-icon {
        position: relative;
        width: 32px;
        height: 32px;
        flex: 0 0 32px;
        margin-bottom: 5px;
        color: #000;
    }
    .system-toast-text {
        display: block;
        max-width: 168px;
        color: #000;
        font-size: 15px;
        line-height: 1.36;
        font-weight: 500;
        letter-spacing: 0;
        word-break: break-word;
    }
    .settings-toast[data-state="loading"] .system-toast-icon,
    .wb-toast[data-state="loading"] .system-toast-icon,
    .chat-toast[data-state="loading"] .system-toast-icon {
        border-radius: 50%;
        border: 3px solid rgba(0,0,0,0.18);
        border-top-color: #000;
        animation: ios-toast-spin 0.78s linear infinite;
    }
    .settings-toast[data-state="success"] .system-toast-icon::before,
    .settings-toast[data-state="check"] .system-toast-icon::before,
    .wb-toast[data-state="success"] .system-toast-icon::before,
    .wb-toast[data-state="check"] .system-toast-icon::before,
    .chat-toast[data-state="success"] .system-toast-icon::before,
    .chat-toast[data-state="check"] .system-toast-icon::before {
        content: '';
        position: absolute;
        left: 9px;
        top: 2px;
        width: 13px;
        height: 24px;
        border-right: 5px solid currentColor;
        border-bottom: 5px solid currentColor;
        border-radius: 2px;
        transform: rotate(45deg);
        transform-origin: center;
    }
    .settings-toast[data-state="guide"] .system-toast-icon,
    .settings-toast[data-state="info"] .system-toast-icon,
    .wb-toast[data-state="guide"] .system-toast-icon,
    .wb-toast[data-state="info"] .system-toast-icon,
    .chat-toast[data-state="guide"] .system-toast-icon,
    .chat-toast[data-state="info"] .system-toast-icon {
        border-radius: 50%;
        border: 2px solid rgba(0,0,0,0.82);
    }
    .settings-toast[data-state="guide"] .system-toast-icon::before,
    .wb-toast[data-state="guide"] .system-toast-icon::before,
    .chat-toast[data-state="guide"] .system-toast-icon::before {
        content: '!';
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-family: system-ui, -apple-system, sans-serif;
        font-size: 23px;
        line-height: 1;
        font-weight: 700;
        color: currentColor;
    }
    .settings-toast[data-state="info"] .system-toast-icon::before,
    .wb-toast[data-state="info"] .system-toast-icon::before,
    .chat-toast[data-state="info"] .system-toast-icon::before {
        content: 'i';
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-family: Georgia, "Times New Roman", serif;
        font-size: 22px;
        line-height: 1;
        font-style: italic;
        font-weight: 700;
        color: currentColor;
    }
    .settings-toast[data-state="error"] .system-toast-icon::before,
    .settings-toast[data-state="error"] .system-toast-icon::after,
    .wb-toast[data-state="error"] .system-toast-icon::before,
    .wb-toast[data-state="error"] .system-toast-icon::after,
    .chat-toast[data-state="error"] .system-toast-icon::before,
    .chat-toast[data-state="error"] .system-toast-icon::after {
        content: '';
        position: absolute;
        left: 4px;
        top: 14px;
        width: 24px;
        height: 4px;
        border-radius: 999px;
        background: currentColor;
    }
    .settings-toast[data-state="error"] .system-toast-icon::before,
    .wb-toast[data-state="error"] .system-toast-icon::before,
    .chat-toast[data-state="error"] .system-toast-icon::before { transform: rotate(45deg); }
    .settings-toast[data-state="error"] .system-toast-icon::after,
    .wb-toast[data-state="error"] .system-toast-icon::after,
    .chat-toast[data-state="error"] .system-toast-icon::after { transform: rotate(-45deg); }
    @keyframes ios-toast-fade-in { from { opacity: 0; } to { opacity: 1; } }
    @keyframes ios-toast-spin { to { transform: rotate(360deg); } }
    .settings-deco-layer { display: none; }
    .phone-shell-frame {
        position: fixed;
        left: 50%;
        top: 50%;
        width: var(--one-shell-frame-width, 418px);
        height: var(--one-shell-frame-height, 872px);
        transform: translate(-50%, -50%);
        z-index: 9950;
        pointer-events: none;
        display: none;
        box-sizing: border-box;
        border: max(7px, calc(var(--one-shell-scale, 1) * 10px)) solid #FFFFFF;
        border-radius: calc(var(--one-shell-scale, 1) * 48px);
        background: transparent;
        box-shadow:
            inset 0 0 0 1px rgba(74, 78, 89, 0.08),
            inset 0 0 0 2px rgba(255, 255, 255, 0.9),
            0 18px 42px rgba(0, 0, 0, 0.34);
    }
    .phone-shell-frame::before {
        content: '';
        position: absolute;
        top: calc(var(--one-shell-scale, 1) * 10px);
        left: 50%;
        width: calc(var(--one-shell-scale, 1) * 54px);
        height: max(4px, calc(var(--one-shell-scale, 1) * 5px));
        transform: translateX(-50%);
        border-radius: 999px;
        background: rgba(74, 78, 89, 0.18);
        box-shadow: 0 0 0 1px rgba(255,255,255,0.72);
    }
    .phone-shell-frame::after {
        content: '';
        position: absolute;
        right: calc(var(--one-shell-scale, 1) * -13px);
        top: 30%;
        width: max(2px, calc(var(--one-shell-scale, 1) * 3px));
        height: calc(var(--one-shell-scale, 1) * 58px);
        border-radius: 999px;
        background: #FFFFFF;
        box-shadow: 0 0 0 1px rgba(74,78,89,0.06);
    }
    body.show-phone-shell {
        background: #111111;
        background-image: none;
    }
    body.show-phone-shell::before {
        content: '';
        position: fixed;
        inset: 0;
        z-index: -1;
        background: #111111;
        pointer-events: none;
    }
    body.show-phone-shell::after {
        opacity: 0;
    }
    body.show-phone-shell #desktop,
    body.show-phone-shell .settings-app-page,
    body.show-phone-shell .worldbook-app-page,
    body.show-phone-shell .chat-app-page,
    body.show-phone-shell .messages-app-page,
    body.show-phone-shell .phone-app-page {
        position: fixed;
        left: 50%;
        top: 50%;
        right: auto;
        bottom: auto;
        width: var(--one-shell-base-width, 390px);
        height: var(--one-shell-base-height, 844px);
        transform: translate(-50%, -50%) scale(var(--one-shell-scale, 1));
        transform-origin: center center;
        border-radius: calc(var(--one-shell-scale, 1) * 38px);
        overflow: hidden;
        isolation: isolate;
    }
    body.show-phone-shell #desktop {
        background-color: #f5f4f6;
        background-image:
            radial-gradient(circle at 15% 10%, rgba(248, 235, 238, 0.9) 0%, transparent 40%),
            radial-gradient(circle at 85% 85%, rgba(230, 238, 242, 0.9) 0%, transparent 45%),
            linear-gradient(135deg, #fdfcfb 0%, #f0efed 100%);
        transform: translate(-50%, -50%) scale(var(--one-shell-content-scale, 1));
    }
    body.show-phone-shell #slider { width: 200%; }
    body.show-phone-shell .page { width: 50%; flex: 0 0 50%; }
    body.show-phone-shell .settings-app-page.show,
    body.show-phone-shell .worldbook-app-page.show,
    body.show-phone-shell .chat-app-page.show,
    body.show-phone-shell .messages-app-page.show,
    body.show-phone-shell .phone-app-page.show {
        transform: translate(-50%, -50%) scale(var(--one-shell-scale, 1));
    }
    body.show-phone-shell .phone-shell-frame { display: block; }
    body.shell-switching #desktop,
    body.shell-switching #slider,
    body.shell-switching .settings-app-page,
    body.shell-switching .worldbook-app-page,
    body.shell-switching .chat-app-page,
    body.shell-switching .messages-app-page,
    body.shell-switching .phone-app-page,
    body.shell-switching .phone-shell-frame {
        transition: none;
    }
    .icon-box.custom-icon {
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
    }
    .icon-box.custom-icon svg { display: none; }

    @keyframes settings-scan {
        0%, 18% { transform: translateX(0); opacity: 0; }
        42% { opacity: 0.78; }
        72%, 100% { transform: translateX(420%); opacity: 0; }
    }
    @keyframes settings-thread-breathe {
        from { opacity: 0.34; transform: translateY(0) scaleX(0.96); }
        to { opacity: 0.74; transform: translateY(-2px) scaleX(1.02); }
    }

    @media (max-width: 360px) {
        .settings-app-head,
        .settings-content {
            padding-left: 20px;
            padding-right: 20px;
        }
        .settings-entry {
            grid-template-columns: 42px minmax(0, 1fr) 20px;
            gap: 14px;
        }
        .settings-entry-title { font-size: 22px; }
        .settings-storage-card { grid-template-columns: 1fr; }
    }

    @media (max-height: 700px) {
        .settings-app-head {
            padding-top: max(30px, calc(env(safe-area-inset-top) + 14px));
            padding-bottom: 0;
        }
        .settings-content { padding-top: 4px; }
        .settings-archive-motion { height: 64px; margin: -2px -8px 7px 54px; overflow: visible; }
        .settings-search-wrap { margin-bottom: 10px; }
        .settings-entry {
            min-height: 72px;
            padding-top: 13px;
            padding-bottom: 14px;
        }
    }


    .settings-app-foot { display: none; }
    .settings-endpoint-note {
        margin-top: 10px;
        font-size: 11px;
        line-height: 1.55;
        color: #8C95A3;
        letter-spacing: 0.08em;
    }
    .settings-github-box {
        border-top: 1px solid rgba(74,78,89,0.28);
        border-bottom: 1px solid rgba(150,158,168,0.26);
        padding: 22px 0 8px;
    }
    .settings-github-title {
        font-family: Georgia, "Times New Roman", "Songti SC", serif;
        font-size: 24px;
        line-height: 1.1;
        font-style: italic;
        color: #343941;
        margin-bottom: 18px;
    }
    .settings-github-status {
        min-height: 18px;
        font-size: 11px;
        line-height: 1.6;
        letter-spacing: 0.08em;
        color: #87909D;
        margin-top: 12px;
    }
    .settings-small-help {
        display: block;
        margin-top: 8px;
        font-size: 11px;
        line-height: 1.55;
        color: #9AA2AF;
        letter-spacing: 0.04em;
    }



    #settingsMenuSection .settings-section-label {
        margin-bottom: 14px;
    }
    #settingsMenuSection .settings-entry {
        min-height: 92px;
        padding-top: 22px;
        padding-bottom: 24px;
    }
    @media (max-height: 700px) {
        #settingsMenuSection .settings-entry {
            min-height: 88px;
            padding-top: 20px;
            padding-bottom: 22px;
        }
    }


    /* 世界书 APP：私人档案馆 / 世界观资料册 */
    .worldbook-app-page {
        --wb-paper: #FEFEFC;
        --wb-paper-deep: #FAFAF7;
        --wb-card: #FFFFFF;
        --wb-ink: #222322;
        --wb-muted: #747977;
        --wb-faint: #A9AAA6;
        --wb-line: rgba(34, 35, 34, 0.075);
        --wb-line-strong: rgba(34, 35, 34, 0.16);
        --wb-shadow: 0 16px 36px rgba(31, 34, 32, 0.055);
        position: fixed;
        inset: 0;
        z-index: 9100;
        display: flex;
        opacity: 0;
        pointer-events: none;
        color: var(--wb-ink);
        background-color: var(--wb-paper);
        background-image:
            radial-gradient(circle at 12% 8%, rgba(236, 239, 241, 0.28), transparent 42%),
            radial-gradient(circle at 88% 86%, rgba(239, 240, 244, 0.22), transparent 46%),
            linear-gradient(135deg, #FEFEFC 0%, #FAFAF7 100%);
        transform: translateY(10px);
        transition: opacity 0.26s ease, transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1);
        overflow: hidden;
        isolation: isolate;
    }
    .worldbook-app-page::before {
        content: '';
        position: absolute;
        inset: 0;
        pointer-events: none;
        background-image:
            radial-gradient(circle, rgba(34, 35, 34, 0.020) 0 0.48px, transparent 0.68px),
            linear-gradient(rgba(34, 35, 34, 0.010) 1px, transparent 1px),
            linear-gradient(90deg, rgba(34, 35, 34, 0.008) 1px, transparent 1px);
        background-size: 12px 12px, 46px 46px, 46px 46px;
        opacity: 0.22;
        z-index: 0;
    }
    .worldbook-app-page.show {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }
    .worldbook-app-page input,
    .worldbook-app-page textarea,
    .worldbook-app-page button {
        font-family: inherit;
    }
    .worldbook-app-page input,
    .worldbook-app-page textarea {
        user-select: text;
        -webkit-user-select: text;
    }
    .worldbook-inner {
        position: relative;
        z-index: 2;
        width: 100%;
        height: 100%;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
        scrollbar-width: none;
    }
    .worldbook-inner::-webkit-scrollbar,
    .wb-entry-body::-webkit-scrollbar,
    .modal-box::-webkit-scrollbar { display: none; }
    .worldbook-app-page.is-modal-open .worldbook-inner { overflow: hidden; }
    .wb-view {
        min-height: 100%;
        padding: max(34px, calc(env(safe-area-inset-top) + 18px)) 24px max(42px, calc(env(safe-area-inset-bottom) + 32px));
    }
    .wb-view[hidden] { display: none; }
    .wb-library-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 18px;
        margin-bottom: 24px;
    }
    .wb-title-tap {
        min-width: 0;
        cursor: pointer;
    }
    .wb-library-count-row { display: none; }
    .wb-title-count,
    .wb-mono,
    .wb-book-no,
    .wb-entry-meta,
    .wb-archive-mini,
    .wb-create-date,
    .wb-key-label {
        font-family: "Courier New", Courier, monospace;
        font-size: 10px;
        line-height: 1;
        letter-spacing: 0.18em;
        color: var(--wb-faint);
        text-transform: uppercase;
    }
    .wb-library-title,
    .wb-detail-title,
    .wb-entry-title-input,
    .wb-create-title,
    .wb-confirm-title {
        font-family: Georgia, "Times New Roman", "Songti SC", serif;
        font-weight: 400;
        font-style: italic;
        letter-spacing: -0.055em;
        color: var(--wb-ink);
    }
    .wb-library-title {
        font-size: clamp(32px, 9.2vw, 36px);
        line-height: 0.95;
        margin: 0;
    }
    .wb-library-subtitle {
        margin-top: 8px;
        font-size: 10px;
        letter-spacing: 0.24em;
        text-transform: uppercase;
        color: var(--wb-muted);
    }
    .wb-head-actions {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        padding-top: 5px;
        flex: 0 0 auto;
    }
    .wb-icon-btn,
    .wb-round-btn,
    .wb-back-btn,
    .wb-gear-btn,
    .wb-delete-icon {
        border: 0;
        background: rgba(255, 255, 255, 0.82);
        color: var(--wb-ink);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
        box-shadow: 0 8px 22px rgba(31, 34, 32, 0.055), inset 0 1px 0 rgba(255,255,255,0.72);
    }
    .wb-icon-btn { width: 38px; height: 38px; border-radius: 50%; }
    .wb-new-btn {
        font-size: 25px;
        font-weight: 300;
        line-height: 1;
        padding-bottom: 2px;
    }
    .wb-icon-btn svg,
    .wb-back-btn svg,
    .wb-gear-btn svg,
    .wb-delete-icon svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.45; fill: none; stroke-linecap: round; stroke-linejoin: round; }
    .wb-new-btn { background: #000; color: #FDFBF7; box-shadow: 0 10px 24px rgba(0,0,0,0.12); }
    .wb-icon-btn:active,
    .wb-round-btn:active,
    .wb-back-btn:active,
    .wb-gear-btn:active,
    .wb-delete-icon:active { transform: translateY(1px) scale(0.98); }
    .wb-search-panel {
        display: grid;
        grid-template-columns: 16px minmax(0, 1fr);
        align-items: center;
        gap: 10px;
        min-height: 42px;
        border-top: 1px solid rgba(34,35,34,0.105);
        border-bottom: 1px solid rgba(34,35,34,0.055);
        margin-bottom: 20px;
        opacity: 0;
        transform: translateY(-6px);
        pointer-events: none;
        max-height: 0;
        overflow: hidden;
        transition: opacity 0.22s ease, transform 0.22s ease, max-height 0.22s ease, margin-bottom 0.22s ease;
    }
    .wb-search-panel.show {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
        max-height: 54px;
        margin-bottom: 22px;
    }
    .wb-search-panel svg { width: 15px; height: 15px; stroke: var(--wb-muted); stroke-width: 1.4; fill: none; }
    .wb-search-panel input {
        width: 100%;
        border: 0;
        outline: 0;
        background: transparent;
        color: var(--wb-ink);
        font-size: 14px;
        letter-spacing: 0.02em;
    }
    .wb-library-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
        align-items: stretch;
    }
    .wb-book-card {
        min-height: 196px;
        border: 1px solid rgba(34,35,34,0.055);
        border-radius: 26px;
        padding: 18px 17px 17px;
        background: #FFFFFF;
        box-shadow: 0 18px 42px rgba(31, 34, 32, 0.060), inset 0 1px 0 rgba(255,255,255,0.92);
        display: flex;
        flex-direction: column;
        position: relative;
        overflow: hidden;
        cursor: pointer;
        transition: transform 0.22s ease, box-shadow 0.22s ease;
    }
    .wb-book-card:active { transform: translateY(-2px) scale(0.994); box-shadow: 0 24px 54px rgba(31, 34, 32, 0.13), inset 0 1px 0 rgba(255,255,255,0.86); }
    .wb-book-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        position: relative;
        z-index: 1;
    }
    .wb-link-count {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        color: #565753;
        font-size: 10px;
        letter-spacing: 0.08em;
    }
    .wb-link-count svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 1.4; }
    .wb-book-tone-dots,
    .wb-preview-tone-dots {
        display: inline-flex;
        align-items: center;
        gap: 5px;
    }
    .wb-book-tone-dots i,
    .wb-preview-tone-dots i {
        display: block;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--dot-tone, #E8D8D4);
        box-shadow: inset 0 0 0 1px rgba(38,38,38,0.035);
    }
    .wb-book-tone-dots i:nth-child(1) { background: var(--book-tone-1, var(--dot-tone, #D9C4BF)); }
    .wb-book-tone-dots i:nth-child(2) { background: var(--book-tone-2, var(--dot-tone, #E8D8D4)); }
    .wb-book-tone-dots i:nth-child(3) { background: var(--book-tone-3, var(--dot-tone, #F6EDEA)); }
    .wb-book-title {
        position: relative;
        z-index: 1;
        margin: 38px 0 24px;
        font-family: Georgia, "Times New Roman", "Songti SC", serif;
        font-size: clamp(22px, 7vw, 28px);
        line-height: 1.08;
        font-weight: 400;
        color: #282825;
        word-break: break-word;
    }
    .wb-book-bottom {
        position: relative;
        z-index: 1;
        margin-top: auto;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }
    .wb-card-count-cluster {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        color: #696A65;
        line-height: 1;
    }
    .wb-card-star {
        display: inline-block;
        font-size: 11px;
        line-height: 1;
        color: var(--book-tone-1, #D9C4BF);
        text-shadow: 0 0 9px color-mix(in srgb, var(--book-tone-1, #D9C4BF) 58%, transparent);
        transform: translateY(-0.5px);
    }
    .wb-entry-count { font-size: 10px; letter-spacing: 0.10em; color: #696A65; }
    .wb-enter-dot {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        border: 1px solid rgba(38, 38, 38, 0.24);
        background: rgba(255, 254, 250, 0.62);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.22s ease, background 0.22s ease;
        flex: 0 0 auto;
    }
    .wb-book-card:active .wb-enter-dot { transform: translate(2px, -2px); background: #fff; }
    .wb-enter-dot::before {
        content: '';
        width: 8px;
        height: 8px;
        border-left: 1.5px solid #202020;
        border-bottom: 1.5px solid #202020;
        transform: rotate(45deg) translate(1px, -1px);
    }
    .wb-empty-state {
        display: none;
        min-height: 58vh;
        align-items: center;
        justify-content: center;
        text-align: center;
        flex-direction: column;
        gap: 18px;
        border: 0;
        border-radius: 26px;
        background-image: none;
        background-size: auto;
        color: var(--wb-faint);
    }
    .wb-empty-state.show { display: flex; }
    .wb-empty-main { font-size: 14px; letter-spacing: 0.12em; }
    .wb-empty-sub { font-size: 12px; color: var(--wb-muted); line-height: 1.7; max-width: 240px; }
    .wb-black-pill,
    .wb-confirm-primary,
    .wb-create-submit {
        min-height: 44px;
        border: 0;
        border-radius: 999px;
        background: #000;
        color: #FDFBF7;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 0 6px 0 18px;
        font-size: 12px;
        letter-spacing: 0.12em;
        cursor: pointer;
        transition: opacity 0.18s ease, transform 0.18s ease, background 0.18s ease;
    }
    .wb-black-pill:active,
    .wb-confirm-primary:active,
    .wb-create-submit:active { transform: translateY(1px); }
    .wb-arrow-shell {
        width: 31px;
        height: 31px;
        border-radius: 50%;
        background: #FDFBF7;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 31px;
    }
    .wb-arrow-shell::before {
        content: '';
        width: 7px;
        height: 7px;
        border-top: 1.55px solid #111;
        border-right: 1.55px solid #111;
        transform: translateX(-1px) rotate(45deg);
    }
    .wb-create-submit:disabled {
        opacity: 0.34;
        cursor: not-allowed;
        transform: none;
    }
    .wb-detail-topbar,
    .wb-editor-topbar {
        display: grid;
        grid-template-columns: 42px minmax(0, 1fr) 42px;
        align-items: center;
        gap: 10px;
        margin-bottom: 20px;
    }
    .wb-back-btn,
    .wb-gear-btn,
    .wb-delete-icon {
        width: 38px;
        height: 38px;
        border-radius: 50%;
    }
    .wb-gear-btn.active { background: #000; color: #FDFBF7; border-color: #000; }
    .wb-detail-head {
        border-top: 1px solid rgba(34,35,34,0.105);
        border-bottom: 1px solid rgba(34,35,34,0.055);
        padding: 18px 0 24px;
        margin-bottom: 22px;
    }
    .wb-archive-line {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 14px;
    }
    .wb-archive-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #202020;
    }
    .wb-detail-title {
        font-size: clamp(32px, 9.6vw, 38px);
        line-height: 0.96;
        margin: 0 0 16px;
        word-break: break-word;
    }
    .wb-description-box {
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        padding: 0;
        font-size: 13px;
        line-height: 1.75;
        color: #5B5F5C;
        white-space: pre-wrap;
    }
    .wb-settings-card {
        display: none;
        margin: 0 0 24px;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        padding: 0;
    }
    .wb-settings-card.show { display: block; animation: wb-soft-up 0.28s ease both; }
    .wb-settings-title {
        font-size: 12px;
        letter-spacing: 0.16em;
        margin-bottom: 18px;
        color: #2B2B2B;
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }
    .wb-setting-dot,
    .wb-label-dot {
        display: inline-block;
        width: 5px;
        height: 5px;
        border-radius: 50%;
        background: #111;
        opacity: 0.88;
        flex: 0 0 auto;
    }
    .wb-label-dot {
        width: 4px;
        height: 4px;
        margin-right: 7px;
        transform: translateY(-1px);
    }
    .wb-field {
        display: block;
        margin-bottom: 14px;
    }
    .wb-field-label {
        display: block;
        font-size: 10px;
        line-height: 1;
        letter-spacing: 0.18em;
        color: var(--wb-muted);
        text-transform: uppercase;
        margin-bottom: 8px;
    }
    .wb-line-input,
    .wb-keyword-input,
    .wb-title-field {
        width: 100%;
        border: 0;
        border-bottom: 1px solid rgba(38,38,38,0.18);
        border-radius: 0;
        background: transparent;
        outline: none;
        color: var(--wb-ink);
        transition: border-color 0.18s ease;
    }
    .wb-line-input { font-size: 20px; padding: 1px 0 7px; font-family: Georgia, "Times New Roman", "Songti SC", serif; }
    .wb-line-input:focus,
    .wb-keyword-input:focus,
    .wb-title-field:focus { border-color: #111; }
    .wb-paper-textarea {
        width: 100%;
        min-height: 86px;
        border: 0;
        border-radius: 16px;
        outline: none;
        resize: vertical;
        background: rgba(248, 248, 246, 0.82);
        box-shadow: inset 0 0 0 1px rgba(34,35,34,0.055);
        padding: 12px;
        color: var(--wb-ink);
        font-size: 13px;
        line-height: 1.68;
        transition: box-shadow 0.18s ease, background 0.18s ease;
    }
    .wb-paper-textarea:focus { background: #fff; box-shadow: inset 0 0 0 1px rgba(34,35,34,0.20); }
    .wb-settings-card .wb-paper-textarea {
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        border-bottom: 1px solid rgba(38,38,38,0.14);
        padding: 8px 0 12px;
    }
    .wb-settings-card .wb-paper-textarea:focus {
        background: transparent;
        box-shadow: none;
        border-bottom-color: rgba(34,35,34,0.34);
    }
    .wb-contact-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
    .wb-contact-tag {
        min-height: 34px;
        border: 1px solid rgba(38,38,38,0.14);
        border-radius: 14px;
        background: rgba(255,255,255,0.45);
        color: #7B7770;
        display: inline-flex;
        align-items: center;
        gap: 7px;
        padding: 0 12px;
        font-size: 12px;
        cursor: pointer;
        transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
    }
    .wb-contact-tag svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 1.45; }
    .wb-contact-tag.active { background: #000; color: #FDFBF7; border-color: #000; }
    .wb-contact-tag:active { transform: translateY(1px); }
    .wb-contact-empty { color: var(--wb-faint); font-size: 12px; letter-spacing: 0.08em; }
    .wb-danger-text {
        width: 100%;
        min-height: 42px;
        border: 0;
        border-top: 1px solid rgba(126, 58, 58, 0.18);
        background: transparent;
        color: #777777;
        text-align: left;
        font-size: 12px;
        letter-spacing: 0.12em;
        cursor: pointer;
        margin-top: 4px;
        padding-top: 16px;
    }
    .wb-transfer-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin: 16px 0 10px;
    }
    .wb-transfer-button,
    .wb-danger-action {
        min-height: 42px;
        border-radius: 15px;
        border: 1px solid rgba(34,35,34,0.09);
        background: rgba(255,255,255,0.70);
        color: #4F514D;
        font-size: 12px;
        letter-spacing: 0.10em;
        font-weight: 400;
        cursor: pointer;
        transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    }
    .wb-transfer-button.is-primary {
        background: #000;
        border-color: #000;
        color: #FDFBF7;
    }
    .wb-danger-action {
        width: 100%;
        background: rgba(168, 76, 70, 0.10);
        border-color: rgba(168, 76, 70, 0.26);
        color: #9A4640;
    }
    .wb-transfer-button:active,
    .wb-danger-action:active { transform: translateY(1px); }
    .wb-directory-head {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        margin: 6px 0 14px;
    }
    .wb-directory-title {
        font-size: 16px;
        letter-spacing: 0.16em;
        color: #2D2C28;
    }
    .wb-entry-list {
        display: flex;
        flex-direction: column;
        gap: 0;
        border-top: 1px solid rgba(34,35,34,0.10);
    }
    .wb-entry-card {
        min-height: 86px;
        border: 0;
        border-bottom: 1px solid rgba(34,35,34,0.10);
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        display: grid;
        grid-template-columns: minmax(0, 1fr) 24px;
        align-items: center;
        gap: 12px;
        padding: 18px 2px;
        cursor: pointer;
        transition: transform 0.18s ease, background 0.18s ease;
    }
    .wb-entry-card:active { transform: translateY(1px); background: rgba(255,255,255,0.42); }
    .wb-entry-title {
        font-size: 19px;
        line-height: 1.25;
        color: #282825;
        margin-bottom: 8px;
    }
    .wb-entry-preview {
        font-size: 13px;
        line-height: 1.55;
        color: #827E75;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .wb-entry-arrow {
        width: 18px;
        height: 18px;
        border-top: 1.4px solid #5F5B52;
        border-right: 1.4px solid #5F5B52;
        transform: rotate(45deg);
        opacity: 0.58;
    }
    .wb-new-entry {
        width: 100%;
        min-height: 58px;
        margin-top: 16px;
        border: 1px dashed rgba(38,38,38,0.28);
        border-radius: 0;
        background: transparent;
        color: #8E8980;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        font-size: 13px;
        letter-spacing: 0.12em;
        cursor: pointer;
        transition: border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
        box-sizing: border-box;
    }
    .wb-new-entry:active { border-color: #111; color: #111; transform: translateY(1px); }
    .wb-editor-view {
        background-image: radial-gradient(circle, rgba(34,35,34,0.026) 0 0.52px, transparent 0.74px);
        background-size: 13px 13px;
    }
    .wb-editor-pill {
        justify-self: center;
        min-width: 88px;
        height: 30px;
        border: 0;
        border-radius: 999px;
        background: rgba(255,255,255,0.90);
        box-shadow: 0 8px 20px rgba(31, 34, 32, 0.052), inset 0 1px 0 rgba(255,255,255,0.80);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        font-size: 12px;
        letter-spacing: 0.14em;
        color: #4D514E;
    }
    .wb-editor-pill i {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #111;
        animation: wb-dot-breathe 1.8s ease-in-out infinite alternate;
    }
    .wb-delete-icon { color: #777777; justify-self: end; box-shadow: 0 8px 22px rgba(154,70,70,0.055), inset 0 1px 0 rgba(255,255,255,0.80); }
    .wb-entry-sheet {
        min-height: calc(100vh - max(34px, calc(env(safe-area-inset-top) + 18px)) - 92px);
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        padding: 0;
    }
    .wb-entry-title-input {
        width: 100%;
        border: 0;
        outline: 0;
        background: transparent;
        font-size: clamp(30px, 9vw, 36px);
        line-height: 1.03;
        margin-bottom: 14px;
        color: #282825;
    }
    .wb-trigger-card {
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        padding: 0;
        margin-bottom: 18px;
    }
    .wb-trigger-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 8px;
    }
    .wb-trigger-title { font-size: 14px; letter-spacing: 0.08em; color: #2D2B27; }
    .wb-trigger-desc { font-size: 12px; line-height: 1.65; color: #7E7970; margin-bottom: 14px; }
    .wb-inject-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin: 0 0 14px;
        opacity: 0.28;
        transition: opacity 0.18s ease;
    }
    .wb-trigger-card.is-enabled .wb-inject-row { opacity: 1; }
    .wb-inject-label {
        color: #8B8780;
        font-size: 11px;
        letter-spacing: 0.14em;
        white-space: nowrap;
    }
    .wb-inject-options {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        width: min(156px, 48vw);
        border: 1px solid rgba(34,35,34,0.14);
        background: rgba(255,255,255,0.52);
    }
    .wb-inject-options button {
        height: 30px;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: #7E7970;
        font-size: 12px;
        cursor: pointer;
    }
    .wb-inject-options button + button { border-left: 1px solid rgba(34,35,34,0.10); }
    .wb-inject-options button.active { background: #111; color: #FEFEFC; }
    .wb-switch {
        position: relative;
        width: 47px;
        height: 26px;
        flex: 0 0 auto;
    }
    .wb-switch input { position: absolute; inset: 0; opacity: 0; }
    .wb-switch i {
        position: absolute;
        inset: 0;
        border-radius: 999px;
        border: 0;
        background: rgba(248,248,246,0.92);
        box-shadow: inset 0 0 0 1px rgba(34,35,34,0.12);
        transition: background 0.18s ease, border-color 0.18s ease;
    }
    .wb-switch i::after {
        content: '';
        position: absolute;
        width: 18px;
        height: 18px;
        top: 3px;
        left: 3px;
        border-radius: 50%;
        background: #9D988E;
        transition: transform 0.18s ease, background 0.18s ease;
    }
    .wb-switch input:checked + i { background: #111; border-color: #111; }
    .wb-switch input:checked + i::after { transform: translateX(21px); background: #FDFBF7; }
    .wb-trigger-switch {
        position: relative;
        width: 50px;
        height: 28px;
        flex: 0 0 auto;
        display: inline-flex;
        cursor: pointer;
    }
    .wb-trigger-switch input { position: absolute; inset: 0; opacity: 0; }
    .wb-trigger-switch i {
        position: absolute;
        inset: 0;
        border-radius: 999px;
        border: 1px solid rgba(150,158,168,0.22);
        background: rgba(255,255,255,0.68);
        transition: background 0.18s ease, border-color 0.18s ease;
    }
    .wb-trigger-switch i::after {
        content: '';
        position: absolute;
        width: 20px;
        height: 20px;
        left: 3px;
        top: 3px;
        border-radius: 50%;
        background: #AAB0BA;
        transition: transform 0.18s ease, background 0.18s ease;
    }
    .wb-trigger-switch input:checked + i {
        border-color: rgba(74,78,89,0.48);
        background: rgba(181,199,211,0.22);
    }
    .wb-trigger-switch input:checked + i::after { transform: translateX(22px); background: #000; }
    .wb-keyword-row {
        display: grid;
        grid-template-columns: 22px minmax(0, 1fr);
        gap: 9px;
        align-items: center;
        opacity: 0.42;
        transition: opacity 0.18s ease;
        background: transparent;
        box-shadow: none;
        border: 0;
    }
    .wb-trigger-card.is-enabled .wb-keyword-row { opacity: 1; }
    .wb-keyword-row .wb-key-label {
        font-size: 18px;
        line-height: 1;
        letter-spacing: 0;
        color: #565752;
        transform: translateY(-1px);
    }
    .wb-keyword-input { font-size: 14px; padding: 4px 0 7px; }
    .wb-entry-body {
        width: 100%;
        min-height: 46vh;
        border: 0;
        outline: 0;
        resize: vertical;
        background: transparent;
        color: #3B3934;
        font-size: 15px;
        line-height: 1.85;
    }
    .wb-modal { z-index: 16000; }
    .wb-modal.show { display: flex; opacity: 1; }

    .wb-create-card {
        width: min(330px, calc(100vw - 38px));
        padding: 22px 20px 18px;
        border-radius: 28px;
        border: 1px solid rgba(150,158,168,0.18);
        background:
            radial-gradient(circle at 16% 18%, rgba(245,245,245,0.68), transparent 48%),
            radial-gradient(circle at 86% 76%, rgba(230,238,242,0.70), transparent 52%),
            #FCFBF7;
        box-shadow: 0 24px 70px rgba(31,34,32,0.16), inset 0 1px 0 rgba(255,255,255,0.84);
    }
    .wb-create-head {
        display: block;
        margin-bottom: 18px;
    }
    .wb-create-title { font-size: 27px; line-height: 1; margin: 0 0 8px; }
    .wb-close-btn { display: none; }
    .wb-field-label-inline {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }
    .wb-field-label-inline > span { display: inline-flex; align-items: center; min-width: 0; }
    .wb-spark-btn {
        width: 28px;
        height: 28px;
        border: 0;
        border-radius: 50%;
        background: transparent;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        cursor: pointer;
        transition: transform 0.16s ease, background 0.16s ease, opacity 0.16s ease;
    }
    .wb-spark-btn:active { transform: translateY(1px); background: rgba(119,126,136,0.12); }
    .wb-spark-btn span {
        width: 18px;
        height: 18px;
        display: block;
        background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23343740' d='M12 2.25c1.08 3.82 2.78 5.85 6.6 7.03-3.82 1.08-5.52 3.11-6.6 6.97-1.08-3.86-2.78-5.89-6.6-6.97 3.82-1.18 5.52-3.21 6.6-7.03Zm5.25 10.7c.45 1.58 1.12 2.42 2.7 2.88-1.58.45-2.25 1.3-2.7 2.88-.45-1.58-1.12-2.43-2.7-2.88 1.58-.46 2.25-1.3 2.7-2.88Z'/%3E%3C/svg%3E");
        opacity: 0.72;
    }
    .wb-spark-btn.is-loading span { animation: wb-dot-breathe 0.72s ease-in-out infinite alternate; }
    .wb-create-card .wb-paper-textarea-shell {
        position: relative;
        margin: 0 -2px;
    }
    .wb-create-card .wb-paper-textarea {
        min-height: 126px;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        padding: 18px 2px;
        resize: none;
        mask-image: linear-gradient(to bottom, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
        -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
    }
    .wb-create-card .wb-paper-textarea:focus { background: transparent; box-shadow: none; }
    .wb-tone-row {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        overflow: visible;
        max-width: 100%;
    }
    .wb-tone-chip {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        border: 1px solid rgba(38,38,38,0.10);
        background: var(--tone);
        cursor: pointer;
        position: relative;
        flex: 0 0 auto;
        transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
    }
    .wb-tone-chip.active {
        border-color: rgba(38,38,38,0.28);
        background: linear-gradient(rgba(38,38,38,0.035), rgba(38,38,38,0.035)), var(--tone);
        box-shadow: 0 0 0 3px rgba(38,38,38,0.038), inset 0 0 0 1px rgba(255,255,255,0.44);
    }
    .wb-tone-chip.active::before,
    .wb-tone-chip.active::after { content: none; }
    .wb-tone-custom {
        background: rgba(255,255,255,0.44);
        border-style: dashed;
        color: #6F6A63;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 19px;
        line-height: 1;
        font-weight: 300;
    }
    .wb-tone-custom::before,
    .wb-tone-custom::after { content: none; }
    .wb-create-preview {
        margin: 12px 0 16px;
        min-height: 118px;
        border-radius: 22px;
        border: 0;
        background: #FCFBF7;
        background:
            radial-gradient(circle at 16% 18%, color-mix(in srgb, var(--preview-tone-1, #D9C4BF) 20%, transparent), transparent 48%),
            radial-gradient(circle at 86% 76%, color-mix(in srgb, var(--preview-tone-2, #E8D8D4) 20%, transparent), transparent 52%),
            #FCFBF7;
        box-shadow: none;
        padding: 13px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    .wb-create-preview-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }
    .wb-create-preview strong {
        font-family: Georgia, "Times New Roman", "Songti SC", serif;
        font-size: 20px;
        line-height: 1.10;
        font-weight: 400;
        color: #282825;
    }
    .wb-create-submit { width: 100%; min-height: 46px; justify-content: space-between; padding-left: 20px; }
    .wb-confirm-dialog { max-width: 296px; }
    .wb-confirm-title { font-size: 17px; line-height: 1.12; margin: 0 0 10px; text-align: center; }
    .wb-confirm-copy { font-size: 13px; line-height: 1.75; color: #716D65; text-align: center; }
    /* Worldbook toast uses the shared centered system toast above. */
    @keyframes wb-soft-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
    @keyframes wb-modal-in { to { transform: translateY(0) scale(1); } }
    @keyframes wb-dot-breathe { from { opacity: 0.45; transform: scale(0.86); } to { opacity: 1; transform: scale(1.08); } }
    @media (max-width: 365px) {
        .wb-view { padding-left: 20px; padding-right: 20px; }
        .wb-library-grid { gap: 14px; }
        .wb-book-card { min-height: 174px; padding: 14px; border-radius: 20px; }
        .wb-book-title { font-size: 21px; margin-top: 38px; }
        .wb-detail-title, .wb-entry-title-input { font-size: 34px; }
    }


    /* 记忆 APP：复用世界书页面骨架，只补足管理台布局 */
    .memory-app-page {
        --wb-paper: #FFFFFF;
        --wb-paper-deep: #FFFFFF;
        --wb-ink: #343941;
        --wb-muted: #8C95A3;
        --wb-faint: #B8BEC7;
        --wb-line: rgba(117, 124, 135, 0.14);
        background-color: #FFFFFF;
        background-image:
            linear-gradient(180deg, #FFFFFF 0%, #FFFFFF 100%);
    }
    .memory-app-page::before {
        background-image:
            radial-gradient(circle, rgba(74,78,89,0.022) 0 0.62px, transparent 0.72px),
            linear-gradient(rgba(120,130,140,0.012) 1px, transparent 1px);
        background-size: 13px 13px, 44px 44px;
        opacity: 0.42;
    }
    .memory-view {
        position: relative;
        height: 100%;
        min-height: 0;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        padding: max(38px, calc(env(safe-area-inset-top) + 22px)) 24px max(156px, calc(env(safe-area-inset-bottom) + 132px));
        overflow: hidden;
    }
    .memory-view::before {
        content: none;
    }
    .memory-head {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
        justify-content: space-between;
        gap: 18px;
        padding-top: 4px;
        margin-bottom: 18px;
    }
    .memory-title-button {
        border: 0;
        padding: 0;
        margin: 0;
        min-width: 0;
        background: transparent;
        color: #2F333A;
        text-align: left;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        white-space: nowrap;
    }
    .memory-title-button span {
        font-family: Georgia, "Times New Roman", "Songti SC", serif;
        font-size: clamp(36px, 11vw, 46px);
        line-height: 0.9;
        letter-spacing: -0.08em;
        font-style: italic;
        font-weight: 400;
        color: #2F333A;
        white-space: nowrap;
    }
    .memory-title-button em {
        margin-top: 12px;
        color: var(--chat-muted, #8C95A3);
        font-family: "Courier New", Courier, monospace;
        font-size: 11px;
        line-height: 1;
        font-style: normal;
        letter-spacing: 0.16em;
        text-transform: uppercase;
    }
    .memory-head-actions {
        display: inline-flex;
        align-items: center;
        justify-content: flex-end;
        gap: 10px;
        padding-top: 0;
        flex: 0 0 auto;
    }
    .memory-round-btn {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        border: 1px solid var(--chat-line-strong, rgba(74,78,89,0.20));
        background: rgba(255,255,255,0.72);
        color: #4A4E59;
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.82);
    }
    .memory-round-btn svg {
        width: 17px;
        height: 17px;
        stroke-width: 1.7;
    }
    #memorySettingsBtn svg {
        width: 18px;
        height: 18px;
        stroke-width: 1.38;
        fill: none;
        stroke-linecap: round;
        stroke-linejoin: round;
    }
    .memory-search-panel {
        margin: 0 0 14px;
        transform-origin: top center;
        animation: wb-soft-up 0.22s ease both;
    }
    .memory-search-panel[hidden] { display: none; }
    .memory-subject-stage {
        position: relative;
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        isolation: isolate;
        overflow: visible;
    }
    .memory-subject-stage::before,
    .memory-console::before {
        content: 'One Phone';
        position: absolute;
        z-index: 0;
        pointer-events: none;
        font-family: Georgia, "Times New Roman", "Songti SC", serif;
        line-height: 0.88;
        letter-spacing: -0.04em;
        font-style: italic;
        white-space: nowrap;
        text-transform: none;
    }
    .memory-subject-stage::before {
        top: 12px;
        right: -52px;
        color: rgba(74, 78, 89, 0.08);
        font-size: clamp(36px, 11vw, 60px);
    }
    .memory-console::before {
        top: 26px;
        right: -28px;
        color: rgba(74, 78, 89, 0.065);
        font-size: clamp(34px, 10vw, 54px);
    }
    .memory-subject-stage > *,
    .memory-console > * {
        position: relative;
        z-index: 1;
    }
    .memory-subject-stage[hidden] { display: none; }
    .memory-subject-list {
        width: min(100%, 324px);
        min-height: 410px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0;
        overflow: visible;
        padding: 0;
        margin: 0 auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        touch-action: manipulation;
    }
    .memory-subject-list::-webkit-scrollbar { display: none; }
    .memory-subject-card {
        width: 306px;
        min-height: 410px;
        border: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 20px;
        text-align: center;
        background: transparent;
        color: #3E4145;
        box-shadow: none;
        cursor: pointer;
        transition: transform 0.22s ease, opacity 0.22s ease;
    }
    .memory-subject-card.active {
        transform: none;
    }
    .memory-subject-card:active { transform: translateY(1px); }
    .memory-subject-portrait {
        position: relative;
        width: 278px;
        height: 278px;
        display: block;
        margin: 0 auto;
    }
    .memory-subject-frame {
        position: absolute;
        inset: 0;
        border: 0;
        transform: rotate(6deg) translate(4px, 6px);
        transform-origin: center;
        background: #E7EAED;
        box-shadow: 0 10px 18px rgba(76,84,96,0.09), 0 1px 2px rgba(76,84,96,0.05);
    }
    .memory-subject-avatar,
    .memory-hero-avatar {
        --memory-placeholder-size: 24px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background:
            radial-gradient(circle at 28% 22%, rgba(255,255,255,0.72), transparent 36%),
            linear-gradient(145deg, #F3F4F5 0%, #ECEFF2 100%);
        color: #C1C5CA;
        background-size: cover;
        background-position: center;
        font-family: Georgia, "Times New Roman", serif;
        font-style: italic;
        font-weight: 400;
        font-size: var(--memory-placeholder-size);
        line-height: 1;
        letter-spacing: 0.06em;
        text-align: center;
        overflow: hidden;
    }
    .memory-subject-avatar {
        position: absolute;
        inset: 0;
        width: 278px;
        height: 278px;
        border: 0;
        transform: rotate(-6deg);
        transform-origin: center;
        border-radius: 0;
        box-shadow: 0 18px 34px rgba(76,84,96,0.10);
        --memory-placeholder-size: 25px;
    }
    .memory-hero-avatar { width: 60px; height: 60px; border-radius: 50%; --memory-placeholder-size: 24px; }
    .memory-subject-avatar.has-image,
    .memory-hero-avatar.has-image,
    .memory-polaroid i.has-image { color: transparent; }
    .memory-subject-copy,
    .memory-subject-label {
        width: 100%;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }
    .memory-subject-copy strong,
    .memory-subject-label strong {
        max-width: none;
        overflow: visible;
        text-overflow: clip;
        white-space: nowrap;
        color: #17191C;
        font-size: 21px;
        line-height: 1;
        font-weight: 600;
        letter-spacing: 0.035em;
    }
    .memory-subject-copy em,
    .memory-subject-label em {
        max-width: none;
        overflow: visible;
        text-overflow: clip;
        white-space: nowrap;
        color: #5E646A;
        font-family: "Courier New", Courier, monospace;
        font-size: 11.5px;
        line-height: 1;
        letter-spacing: 0.11em;
        font-style: normal;
    }
    .memory-subject-tag { display: none; }
    .memory-subject-nav {
        position: absolute;
        top: 50%;
        z-index: 3;
        width: 44px;
        height: 44px;
        margin-top: -22px;
        border: 1px solid var(--chat-line-strong, rgba(74,78,89,0.20));
        border-radius: 50%;
        background: rgba(255,255,255,0.72);
        color: #4A4E59;
        font-size: 0;
        line-height: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.82);
    }
    .memory-subject-nav::before {
        content: '';
        width: 8px;
        height: 8px;
        border-top: 1.7px solid currentColor;
        border-right: 1.7px solid currentColor;
    }
    .memory-subject-nav.is-prev { left: -18px; }
    .memory-subject-nav.is-next { right: -18px; }
    .memory-subject-nav.is-prev::before { transform: translateX(1px) rotate(-135deg); }
    .memory-subject-nav.is-next::before { transform: translateX(-1px) rotate(45deg); }
    .memory-subject-nav:active { transform: translateY(1px); }
    .memory-subject-nav:disabled { opacity: 0.34; cursor: default; }
    .memory-empty-state {
        position: absolute;
        left: 50%;
        top: 52%;
        transform: translate(-50%, -50%);
        width: min(72vw, 270px);
        margin-top: 0;
        min-height: auto;
        border: 0;
        border-radius: 0;
        background: transparent;
        background-image: none;
        box-shadow: none;
        gap: 0;
        padding: 0;
        text-align: center;
        color: #8C95A3;
        font-size: 13px;
        line-height: 1.82;
        letter-spacing: 0.08em;
        pointer-events: none;
    }
    .memory-empty-state .wb-empty-main {
        display: block;
        margin-bottom: 8px;
        font-family: Georgia, "Times New Roman", "Songti SC", serif;
        color: #565D67;
        font-size: 26px;
        line-height: 1;
        font-style: italic;
        font-weight: 400;
        letter-spacing: -0.04em;
    }
    .memory-empty-state .wb-empty-sub {
        display: block;
        max-width: none;
        color: #A0A7B0;
        font-size: 12px;
        line-height: 1.82;
        letter-spacing: 0.10em;
    }
    .memory-empty-state[style*="none"] { pointer-events: none; }
    .memory-console {
        position: relative;
        display: flex;
        flex: 1 1 auto;
        min-height: 0;
        flex-direction: column;
        gap: 24px;
        height: auto;
        animation: wb-soft-up 0.32s ease both;
        overflow: visible;
        isolation: isolate;
    }
    .memory-console[hidden] { display: none; }
    .memory-profile-card,
    .memory-feature-card,
    .memory-recall-card,
    .memory-paper-block {
        border: 0;
        background: rgba(255,255,255,0.62);
        box-shadow: 0 14px 32px rgba(48,49,55,0.045), inset 0 1px 0 rgba(255,255,255,0.72);
    }
    .memory-profile-card {
        min-height: 214px;
        display: grid;
        grid-template-columns: 160px minmax(0, 1fr);
        grid-template-rows: 160px auto;
        align-items: start;
        column-gap: 22px;
        row-gap: 10px;
        padding: 8px 0 28px;
        background: transparent;
        box-shadow: none;
        flex: 0 0 auto;
    }
    .memory-pair-left {
        min-width: 0;
        display: contents;
    }
    .memory-polaroid-stack {
        position: relative;
        grid-column: 1;
        grid-row: 1;
        width: 160px;
        height: 160px;
        margin-top: 2px;
        margin-left: -2px;
        justify-self: start;
        cursor: pointer;
    }
    .memory-polaroid {
        position: absolute;
        width: 98px;
        height: 122px;
        padding: 7px 7px 22px;
        background: #FFFFFF;
        border: 0;
        box-shadow: 0 14px 24px rgba(76,84,96,0.075);
        transition: left 0.28s cubic-bezier(0.22, 1, 0.36, 1), top 0.28s cubic-bezier(0.22, 1, 0.36, 1), transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), z-index 0s linear 0.14s;
    }
    .memory-polaroid.is-user {
        left: 0;
        top: 18px;
        transform: rotate(-6deg);
        z-index: 1;
    }
    .memory-polaroid.is-char {
        left: 62px;
        top: 12px;
        transform: rotate(5deg);
        z-index: 2;
    }
    .memory-polaroid-stack.is-swapped .memory-polaroid.is-user {
        left: 62px;
        top: 12px;
        transform: rotate(5deg);
        z-index: 2;
    }
    .memory-polaroid-stack.is-swapped .memory-polaroid.is-char {
        left: 0;
        top: 18px;
        transform: rotate(-6deg);
        z-index: 1;
    }
    .memory-polaroid i {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        background:
            radial-gradient(circle at 28% 22%, rgba(255,255,255,0.72), transparent 36%),
            linear-gradient(145deg, #F3F4F5 0%, #ECEFF2 100%);
        background-size: cover;
        background-position: center;
        color: #C1C5CA;
        font-family: Georgia, "Times New Roman", serif;
        font-style: italic;
        font-weight: 400;
        font-size: 24px;
        line-height: 1;
        letter-spacing: 0.06em;
        text-align: center;
    }
    .memory-pair-copy {
        grid-column: 2;
        grid-row: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        justify-content: center;
        align-self: center;
        gap: 10px;
        padding-top: 4px;
        padding-bottom: 0;
        text-align: right;
    }
    .memory-pair-copy strong {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: #111316;
        font-size: 18px;
        line-height: 1.06;
        font-weight: 500;
        letter-spacing: 0.03em;
        text-align: right;
    }
    .memory-pair-copy .memory-pair-amp {
        display: inline-block;
        padding: 0 0.24em;
        color: #93999E;
        font-size: 16px;
        line-height: 1;
        font-weight: 400;
    }
    .memory-pair-copy span {
        max-width: none;
        overflow: visible;
        text-overflow: clip;
        white-space: nowrap;
        color: #8B9092;
        font-family: "Courier New", Courier, monospace;
        font-size: 10px;
        line-height: 1;
        letter-spacing: 0.12em;
        text-align: right;
    }
    .memory-pair-copy span:empty {
        display: none;
    }
    .memory-pair-copy .memory-pair-note {
        max-width: 176px;
        white-space: normal;
        color: #7E8488;
        font-family: "PingFang SC", "Helvetica Neue", sans-serif;
        font-size: 10.5px;
        line-height: 1.58;
        letter-spacing: 0.05em;
        cursor: pointer;
    }
    .memory-pair-copy .memory-pair-note:active {
        opacity: 0.65;
    }
    .memory-pair-count {
        grid-column: 1;
        grid-row: 2;
        justify-self: start;
        align-self: start;
        max-width: 160px;
        padding-top: 6px;
        color: #777C7E;
        font-size: 11px;
        line-height: 1.62;
        letter-spacing: 0.04em;
        text-align: left;
        white-space: nowrap;
        padding-bottom: 0;
    }
    .memory-pair-count strong,
    .memory-pair-count mark {
        padding: 0 2px;
        background: transparent;
        color: #303137;
        font-family: Georgia, "Times New Roman", serif;
        font-size: 19px;
        line-height: 1;
        font-weight: 400;
    }
    .memory-pair-count mark {
        color: #303740;
        box-shadow: inset 0 -5px 0 rgba(181,199,211,0.42);
    }
    .memory-group-tabs {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 18px;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 6px 0 20px;
        margin: 2px 0 4px;
        flex: 0 0 auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .memory-group-tabs::-webkit-scrollbar { display: none; }
    .memory-group-tabs::after {
        content: none;
    }
    .memory-group-tabs button {
        min-height: 26px;
        border: 0;
        padding: 0 3px;
        background: transparent;
        color: #96999A;
        font-size: 11px;
        line-height: 1;
        letter-spacing: 0.07em;
        cursor: pointer;
        position: relative;
        white-space: nowrap;
    }
    .memory-group-tabs button.active {
        color: #303137;
    }
    .memory-group-tabs button.active::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: -3px;
        height: 1px;
        background: #303137;
        box-shadow: 0 0 0 1px rgba(255,255,255,0.78);
    }
    .memory-timeline-panel {
        position: relative;
        flex: 1 1 auto;
        min-height: 140px;
        overflow: hidden;
        margin-left: 0;
        width: 100%;
        -webkit-mask-image: linear-gradient(to bottom, transparent 0, rgba(0,0,0,0.68) 8px, #000 18px, #000 100%);
        mask-image: linear-gradient(to bottom, transparent 0, rgba(0,0,0,0.68) 8px, #000 18px, #000 100%);
    }
    .memory-timeline-panel::before,
    .memory-timeline-panel::after {
        content: none;
    }
    .memory-timeline-list {
        height: 100%;
        overflow-y: auto;
        padding: 13px 0 max(196px, calc(env(safe-area-inset-bottom) + 164px)) 0;
        scroll-padding-bottom: max(196px, calc(env(safe-area-inset-bottom) + 164px));
        box-sizing: border-box;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
    }
    .memory-timeline-list::-webkit-scrollbar { display: none; }
    .memory-timeline-item {
        position: relative;
        display: grid;
        grid-template-columns: 72px minmax(0, 1fr);
        gap: 4px;
        min-height: 96px;
        border: 0;
        padding: 0 0 22px;
        margin: 0;
        background: transparent;
        color: #3D4145;
        text-align: left;
        cursor: pointer;
    }
    .memory-timeline-item::before {
        content: '';
        position: absolute;
        left: 66px;
        top: 2px;
        bottom: 0;
        width: 1px;
        background: linear-gradient(to bottom, rgba(48,49,55,0.26), rgba(48,49,55,0.05));
    }
    .memory-timeline-item::after {
        content: '';
        position: absolute;
        left: 62px;
        top: 7px;
        width: 8px;
        height: 8px;
        border: 1px solid rgba(48,49,55,0.38);
        background: rgba(255,255,255,0.98);
        transform: rotate(45deg);
    }
    .memory-timeline-time {
        position: relative;
        display: block;
        min-height: 34px;
        min-width: 82px;
        padding-top: 0;
        padding-left: 0;
        color: #8B9092;
        font-family: "Courier New", Courier, monospace;
        line-height: 1;
        letter-spacing: 0;
        text-align: left;
        word-break: normal;
        white-space: nowrap;
        width: 82px;
        overflow: visible;
    }
    .memory-time-year {
        display: block;
        font-size: 11.2px;
        color: #666C71;
        letter-spacing: 0;
        transform: none;
    }
    .memory-time-day {
        display: block;
        margin-top: 4px;
        padding-left: 12px;
        font-size: 8.8px;
        color: #A1A6AA;
        letter-spacing: 0.06em;
    }
    .memory-timeline-body {
        min-width: 0;
        padding: 0 3px 18px 0;
        border-bottom: 0;
    }
    .memory-timeline-body strong {
        display: block;
        color: #33373A;
        font-size: 13px;
        line-height: 1;
        font-weight: 500;
        letter-spacing: 0.08em;
        margin-bottom: 9px;
    }
    .memory-timeline-body p {
        margin: 0;
        color: #71787B;
        font-size: 11.5px;
        line-height: 1.78;
        letter-spacing: 0.035em;
        white-space: pre-wrap;
        word-break: break-word;
    }
    .memory-timeline-item.active .memory-timeline-body {
        border-bottom: 1px solid rgba(48,49,55,0.18);
    }
    .memory-timeline-item.active::after {
        background: #303137;
    }
    .memory-timeline-actions {
        position: absolute;
        right: 2px;
        bottom: 10px;
        display: none;
        align-items: center;
        gap: 8px;
    }
    .memory-timeline-item.active .memory-timeline-actions { display: flex; }
    .memory-timeline-actions button {
        width: 26px;
        height: 26px;
        border: 1px solid rgba(48,49,55,0.13);
        border-radius: 50%;
        background: rgba(255,255,255,0.55);
        color: #565B5E;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }
    .memory-timeline-actions svg {
        width: 13px;
        height: 13px;
        stroke-width: 1.35;
    }
    .memory-timeline-edit {
        width: 100%;
        min-height: 94px;
        border: 0;
        border-bottom: 1px solid rgba(48,49,55,0.16);
        outline: 0;
        resize: vertical;
        background: rgba(255,255,255,0.32);
        color: #3D4145;
        font-size: 12px;
        line-height: 1.72;
        letter-spacing: 0.03em;
        padding: 6px 4px;
        user-select: text;
        -webkit-user-select: text;
    }
    .memory-console.is-editing-timeline {
        gap: 0;
        flex: 1 1 auto;
        min-height: 0;
        height: auto;
    }
    .memory-console.is-editing-timeline .memory-profile-card,
    .memory-console.is-editing-timeline .memory-group-tabs,
    .memory-console.is-editing-timeline .memory-settings-panel {
        display: none;
    }
    .memory-app-page.is-editing-timeline .memory-head {
        display: none;
    }
    .memory-console.is-editing-timeline .memory-timeline-panel {
        margin-left: 0;
        width: 100%;
        -webkit-mask-image: none;
        mask-image: none;
    }
    .memory-console.is-editing-timeline::before {
        content: none;
    }
    .memory-console.is-editing-timeline .memory-timeline-list {
        padding: 0;
    }
    .memory-timeline-edit-page {
        min-height: 100%;
        display: flex;
        flex-direction: column;
        gap: 18px;
        padding: 8px 0 18px;
        animation: wb-soft-up 0.24s ease both;
    }
    .memory-timeline-edit-head {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
        gap: 14px;
        padding-top: 4px;
        padding-bottom: 14px;
        border-bottom: 0;
    }
    .memory-timeline-edit-head button {
        width: 44px;
        height: 44px;
        border: 1px solid var(--chat-line-strong, rgba(48,49,55,0.12));
        border-radius: 50%;
        background: rgba(255,255,255,0.72);
        color: #4A4E59;
        font-size: 28px;
        line-height: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.82);
        cursor: pointer;
        align-self: end;
        margin-top: 0;
    }
    .memory-timeline-edit-head div {
        min-width: 0;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        text-align: left;
    }
    .memory-timeline-edit-head span {
        order: 2;
        width: 100%;
        margin-top: 10px;
        color: var(--chat-muted, #8C95A3);
        font-family: "Courier New", Courier, monospace;
        font-size: 11px;
        line-height: 1;
        letter-spacing: 0.16em;
        text-align: left;
    }
    .memory-timeline-edit-head strong {
        order: 1;
        width: 100%;
        color: #2F333A;
        font-family: Georgia, "Times New Roman", "Songti SC", serif;
        font-size: clamp(30px, 9vw, 38px);
        line-height: 0.95;
        font-style: italic;
        font-weight: 400;
        letter-spacing: -0.08em;
        text-align: left;
    }
    .memory-timeline-edit.is-page {
        flex: 1 1 auto;
        min-height: 220px;
        border: 0;
        border-radius: 0;
        padding: 0 0 12px;
        background: transparent;
        box-shadow: none;
    }
    .memory-timeline-edit-actions {
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    .memory-timeline-edit-actions button {
        position: relative;
        min-height: 52px;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: #4B5053;
        font-size: 12px;
        letter-spacing: 0.10em;
        cursor: pointer;
        text-align: center;
        padding: 0 2px;
        overflow: hidden;
    }
    .memory-timeline-edit-actions button::before,
    .memory-timeline-edit-actions button::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 1px;
    }
    .memory-timeline-edit-actions button::before {
        background: rgba(48,49,55,0.14);
    }
    .memory-timeline-edit-actions button::after {
        right: auto;
        width: 100%;
        background: rgba(48,49,55,0.42);
        transform: scaleX(0);
        transform-origin: left center;
        transition: transform 0.24s ease, background-color 0.24s ease;
    }
    .memory-timeline-edit-actions button:active::after,
    .memory-timeline-edit-actions button:focus-visible::after {
        transform: scaleX(1);
    }
    .memory-timeline-edit-actions button:last-child {
        color: #C95C5C;
    }
    .memory-timeline-edit-actions button:last-child::after {
        background: rgba(201,92,92,0.78);
    }
    .memory-timeline-empty {
        width: min(72vw, 270px);
        margin: 68px auto 0;
        padding: 0;
        color: #A0A7B0;
        text-align: center;
        font-size: 12px;
        line-height: 1.82;
        letter-spacing: 0.10em;
    }
    .memory-timeline-empty::first-line {
        font-family: Georgia, "Times New Roman", "Songti SC", serif;
        color: #565D67;
        font-size: 26px;
        line-height: 1;
        font-style: italic;
        font-weight: 400;
        letter-spacing: -0.04em;
    }
    .memory-feature-card,
    .memory-recall-card { padding: 17px; }
    .memory-feature-card {
        max-height: 270px;
        overflow-y: auto;
        scrollbar-width: none;
    }
    .memory-feature-card::-webkit-scrollbar { display: none; }
    .memory-settings-panel[hidden] { display: none; }

    .memory-settings-modal {
        position: fixed;
        inset: 0;
        width: 100vw;
        min-height: 100dvh;
        z-index: 30000;
        display: none;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        padding: max(22px, env(safe-area-inset-top)) 24px max(126px, calc(env(safe-area-inset-bottom) + 96px));
        background: rgba(30, 30, 35, 0.34);
        pointer-events: none;
    }
    .memory-settings-modal.show {
        display: flex;
        opacity: 1;
        pointer-events: auto;
    }
    .memory-settings-dialog {
        width: min(328px, calc(100vw - 48px));
        max-width: 328px;
        max-height: min(74dvh, 560px);
        border-radius: 22px;
        background: #FFFFFF;
    }
    .memory-settings-dialog .modal-content {
        max-height: min(54dvh, 392px);
        padding: 24px 20px 18px;
        gap: 18px;
    }
    .memory-settings-title {
        margin: 0;
    }
    .memory-settings-modal .memory-settings-panel {
        display: block;
        max-height: none;
        overflow: visible;
        padding: 0;
        background: transparent;
        box-shadow: none;
    }
    .memory-settings-modal .memory-feature-grid,
    .memory-settings-modal .memory-quality-panel,
    .memory-settings-modal .memory-action-strip {
        width: 100%;
    }
    .memory-section-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 14px;
    }
    .memory-section-head h3 {
        margin: 6px 0 0;
        color: #34373C;
        font-size: 17px;
        line-height: 1;
        font-weight: 500;
        letter-spacing: 0.06em;
    }
    .memory-section-head em {
        color: #AAA7A0;
        font-size: 10px;
        line-height: 1;
        letter-spacing: 0.12em;
        font-style: normal;
        white-space: nowrap;
        padding-top: 3px;
    }
    .memory-feature-grid {
        display: flex;
        flex-direction: column;
        gap: 0;
        border-top: 1px solid rgba(48,49,55,0.08);
    }
    .memory-feature-row {
        min-height: 58px;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 12px;
        border-bottom: 1px solid rgba(48,49,55,0.08);
    }
    .memory-feature-row.is-disabled { opacity: 0.42; }
    .memory-feature-row strong {
        display: block;
        color: #3C4045;
        font-size: 13px;
        line-height: 1.1;
        letter-spacing: 0.05em;
        margin-bottom: 6px;
    }
    .memory-feature-row span {
        display: block;
        color: #8A9094;
        font-size: 10.5px;
        line-height: 1.45;
        letter-spacing: 0.03em;
    }
    .memory-dimension-list {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 15px;
    }
    .memory-dimension-row {
        display: grid;
        grid-template-columns: 58px minmax(0, 1fr) 30px;
        align-items: center;
        gap: 10px;
    }
    .memory-dimension-row span { display: flex; flex-direction: column; gap: 4px; }
    .memory-dimension-row strong {
        color: #41464A;
        font-size: 12px;
        line-height: 1;
        font-weight: 500;
    }
    .memory-dimension-row em {
        color: #A6A9AA;
        font-size: 9px;
        line-height: 1;
        font-style: normal;
    }
    .memory-dimension-row input {
        width: 100%;
        accent-color: #303137;
    }
    .memory-dimension-row b {
        color: #6F7578;
        font-family: "Courier New", Courier, monospace;
        font-size: 10px;
        line-height: 1;
        font-weight: 400;
        text-align: right;
    }

    .memory-quality-panel {
        margin-top: 18px;
        padding-top: 2px;
        border-top: 1px solid rgba(48,49,55,0.08);
    }
    .memory-quality-head em {
        font-style: normal;
        color: #8A9094;
        letter-spacing: 0.12em;
        text-transform: uppercase;
    }
    .memory-quality-grid {
        display: flex;
        flex-direction: column;
        gap: 0;
        margin-top: 4px;
        border-top: 1px solid rgba(48,49,55,0.06);
    }
    .memory-quality-row {
        min-height: 46px;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 12px;
        border-bottom: 1px solid rgba(48,49,55,0.06);
    }
    .memory-quality-row strong {
        display: block;
        color: #3C4045;
        font-size: 12px;
        line-height: 1.1;
        letter-spacing: 0.06em;
        margin-bottom: 5px;
    }
    .memory-quality-row span {
        display: block;
        color: #8A9094;
        font-size: 10px;
        line-height: 1.45;
        letter-spacing: 0.03em;
    }
    .memory-quality-badge {
        min-width: 66px;
        text-align: center;
        font-family: "Courier New", Courier, monospace;
        font-size: 9px;
        line-height: 1;
        letter-spacing: 0.08em;
        color: #60666A;
        background: rgba(255,255,255,0.72);
        box-shadow: inset 0 0 0 1px rgba(48,49,55,0.08);
        padding: 7px 8px;
    }
    .memory-quality-badge.is-failed { color: #7A4A4A; background: rgba(250,244,241,0.86); }
    .memory-quality-badge.is-warning { color: #786A4E; background: rgba(250,247,239,0.88); }
    .memory-quality-badge.is-passed { color: #52665E; background: rgba(243,248,245,0.86); }
    .memory-quality-actions { margin-top: 13px; }

    .memory-quality-detail {
        margin-top: 10px;
        padding: 12px 0 2px;
        border-top: 1px solid rgba(48,49,55,0.06);
        color: #6F777D;
        font-size: 11px;
        line-height: 1.7;
        letter-spacing: 0.04em;
    }
    .memory-quality-detail details {
        padding: 8px 0;
        border-bottom: 1px solid rgba(48,49,55,0.05);
    }
    .memory-quality-detail summary {
        cursor: pointer;
        color: #45494E;
        font-size: 11px;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }
    .memory-quality-detail p,
    .memory-quality-detail ul {
        margin: 8px 0 0;
        padding-left: 0;
    }
    .memory-quality-detail li {
        list-style: none;
        margin: 5px 0;
        color: #7D858A;
    }
    .memory-quality-actions button[aria-busy="true"] {
        opacity: 0.62;
        cursor: progress;
    }


    .memory-action-strip {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
        margin-top: 16px;
    }
    .memory-action-strip button {
        min-height: 40px;
        border: 0;
        border-radius: 0;
        background: #303137;
        color: #FCFBF7;
        font-size: 12px;
        line-height: 1;
        letter-spacing: 0.08em;
        box-shadow: 0 10px 20px rgba(48,49,55,0.10);
        cursor: pointer;
    }
    .memory-action-strip button:nth-child(2n) {
        background: rgba(255,255,255,0.82);
        color: #4F5559;
        box-shadow: inset 0 0 0 1px rgba(48,49,55,0.07), 0 9px 20px rgba(48,49,55,0.045);
    }
    .memory-action-strip button:active { transform: translateY(1px); }
    .memory-editor-grid { display: none; }
    .memory-paper-block {
        overflow: hidden;
        padding: 15px;
    }
    .memory-paper-block textarea {
        width: 100%;
        min-height: 132px;
        border: 0;
        outline: 0;
        resize: vertical;
        background: transparent;
        color: #3D4145;
        font-size: 13px;
        line-height: 1.78;
        user-select: text;
        -webkit-user-select: text;
    }
    .memory-recall-list {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    .memory-recall-item {
        padding: 13px 0;
        border-top: 1px solid rgba(48,49,55,0.08);
    }
    .memory-recall-item:first-child { border-top: 0; padding-top: 0; }
    .memory-recall-item strong {
        display: block;
        color: #3D4246;
        font-size: 13px;
        line-height: 1;
        letter-spacing: 0.08em;
        margin-bottom: 8px;
    }
    .memory-recall-item p,
    .memory-recall-empty {
        margin: 0;
        color: #A0A7B0;
        font-size: 12px;
        line-height: 1.82;
        letter-spacing: 0.10em;
        text-align: center;
        font-weight: 400;
    }
    @media (max-width: 390px) {
        .memory-profile-card { grid-template-columns: 136px minmax(0, 1fr); grid-template-rows: 136px auto; gap: 10px 14px; padding-bottom: 24px; }
        .memory-polaroid-stack { width: 136px; height: 136px; margin-top: 2px; }
        .memory-pair-copy { grid-row: 1; justify-content: center; align-self: center; padding-top: 2px; padding-bottom: 0; }
        .memory-pair-count { justify-self: end; max-width: 176px; text-align: right; padding-top: 4px; padding-bottom: 0; }
        .memory-pair-copy strong { font-size: 15px; }
        .memory-pair-copy span { font-size: 9px; letter-spacing: 0.08em; }
        .memory-console { height: auto; }
    }




    /* One Phone global circular icon button */
    .one-round-icon-action {
        width: var(--one-round-icon-size, 44px);
        height: var(--one-round-icon-size, 44px);
        border-radius: 50%;
        border: 1px solid var(--one-round-icon-border, rgba(150,158,168,0.24));
        background: var(--one-round-icon-bg, rgba(255,255,255,0.62));
        color: var(--one-round-icon-color, #4A4E59);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.82);
        cursor: pointer;
        appearance: none;
        -webkit-appearance: none;
        -webkit-tap-highlight-color: transparent;
    }
    .one-round-icon-action svg {
        width: var(--one-round-icon-svg-size, 18px);
        height: var(--one-round-icon-svg-size, 18px);
        stroke: currentColor;
        stroke-width: 1.55;
        fill: none;
        stroke-linecap: round;
        stroke-linejoin: round;
    }
    .one-round-icon-action:active { transform: scale(0.94); }

    /* Messages APP：Ta 的来信箱，不复制聊天输入框 */
    .messages-app-page {
        --messages-paper: #FCFBF7;
        --messages-ink: #343941;
        --messages-muted: #8D96A2;
        --messages-line: rgba(117, 124, 135, 0.18);
        --messages-line-strong: rgba(74, 78, 89, 0.28);
        --messages-blue: #B5C7D3;
        --messages-sage: #B8C9BC;
        position: fixed;
        inset: 0;
        z-index: 9000;
        overflow: hidden;
        background-color: var(--messages-paper);
        background-image:
            radial-gradient(circle at 18% 12%, rgba(255,255,255,0.82) 0%, rgba(255,255,255,0.28) 30%, transparent 58%),
            radial-gradient(circle at 88% 78%, rgba(225,235,240,0.72) 0%, rgba(225,235,240,0.24) 34%, transparent 62%),
            linear-gradient(138deg, #FCFBF7 0%, #F6F1EA 100%);
        color: var(--messages-ink);
        opacity: 0;
        pointer-events: none;
        transform: translateY(10px);
        transition: opacity 0.26s ease, transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
        isolation: isolate;
    }
    .messages-app-page::before {
        content: '';
        position: absolute;
        inset: 0;
        z-index: 0;
        pointer-events: none;
        background-image:
            radial-gradient(circle, rgba(74,78,89,0.026) 0 0.62px, transparent 0.72px),
            linear-gradient(rgba(120,130,140,0.016) 1px, transparent 1px);
        background-size: 13px 13px, 46px 46px;
        opacity: 0.62;
    }
    .messages-app-page.show {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }
    .messages-head {
        position: relative;
        z-index: 2;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
        gap: 18px;
        padding: max(38px, calc(env(safe-area-inset-top) + 22px)) 24px 0;
    }
    .messages-title {
        border: 0;
        background: transparent;
        padding: 0;
        font-family: Georgia, "Times New Roman", "Songti SC", serif;
        font-size: clamp(36px, 11vw, 48px);
        line-height: 0.92;
        letter-spacing: -0.08em;
        font-style: italic;
        font-weight: 400;
        color: #2F333A;
        cursor: pointer;
        appearance: none;
        -webkit-appearance: none;
    }
    .messages-subtitle {
        margin-top: 12px;
        font-size: 12px;
        line-height: 1.6;
        letter-spacing: 0.08em;
        color: var(--messages-muted);
    }
    .messages-refresh {
        --one-round-icon-size: 44px;
        --one-round-icon-border: var(--messages-line-strong);
        --one-round-icon-bg: rgba(255,255,255,0.62);
    }
    .messages-refresh:active { background: rgba(235,238,242,0.7); }
    .messages-search {
        position: relative;
        z-index: 2;
        margin: 18px 24px 0;
        height: 42px;
        border-radius: 999px;
        border: 1px solid rgba(150,158,168,0.22);
        background: rgba(255,255,255,0.62);
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 0 14px;
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.78);
    }
    .messages-search svg {
        width: 17px;
        height: 17px;
        stroke: #98A0AA;
        stroke-width: 1.6;
        fill: none;
        stroke-linecap: round;
        stroke-linejoin: round;
        flex: 0 0 auto;
    }
    .messages-search input {
        flex: 1;
        min-width: 0;
        height: 100%;
        border: 0;
        outline: 0;
        background: transparent;
        color: #3C4149;
        font-size: 13px;
        user-select: text;
        -webkit-user-select: text;
    }
    .messages-list {
        position: relative;
        z-index: 2;
        height: calc(100svh - max(38px, calc(env(safe-area-inset-top) + 22px)) - 124px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
        scrollbar-width: none;
        padding: 18px 18px max(48px, calc(env(safe-area-inset-bottom) + 34px));
    }
    .messages-list::-webkit-scrollbar { display: none; }
    .messages-row {
        width: 100%;
        min-height: 74px;
        border: 0;
        border-radius: 26px;
        background: rgba(255,255,255,0.54);
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.82), 0 10px 28px rgba(76,72,64,0.045);
        display: grid;
        grid-template-columns: 50px minmax(0, 1fr) auto;
        align-items: center;
        gap: 13px;
        padding: 12px 13px;
        margin-bottom: 10px;
        text-align: left;
        color: inherit;
        cursor: pointer;
        appearance: none;
        -webkit-appearance: none;
    }
    .messages-row:active { transform: scale(0.988); }
    .messages-avatar,
    .messages-detail-avatar {
        width: 50px;
        height: 50px;
        border-radius: 18px;
        background: linear-gradient(145deg, rgba(226,232,236,0.88), rgba(255,255,255,0.62));
        border: 1px solid rgba(255,255,255,0.72);
        display: grid;
        place-items: center;
        color: #7C8792;
        font-family: Georgia, "Times New Roman", serif;
        font-style: italic;
        font-size: 15px;
        overflow: hidden;
        background-size: cover;
        background-position: center;
        flex: 0 0 auto;
    }
    .messages-copy { min-width: 0; }
    .messages-name-line {
        display: flex;
        align-items: center;
        gap: 8px;
        min-width: 0;
    }
    .messages-name {
        color: #343941;
        font-size: 15px;
        font-weight: 600;
        letter-spacing: 0.02em;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .messages-unread-dot {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: #9EB4C1;
        flex: 0 0 auto;
        opacity: 0;
    }
    .messages-row.is-unread .messages-unread-dot { opacity: 1; }
    .messages-preview {
        margin-top: 5px;
        color: #87909D;
        font-size: 12px;
        line-height: 1.45;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .messages-side {
        align-self: stretch;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        justify-content: space-between;
        gap: 8px;
    }
    .messages-time {
        font-size: 10px;
        color: #A2A9B2;
        letter-spacing: 0.08em;
        white-space: nowrap;
    }
    .messages-tag,
    .messages-letter-label {
        border-radius: 999px;
        background: rgba(181,199,211,0.28);
        color: #647480;
        font-size: 10px;
        letter-spacing: 0.08em;
        line-height: 1;
        padding: 6px 8px;
        white-space: nowrap;
    }
    .messages-tag[data-kind="system"] { background: rgba(184,188,196,0.24); color: #777F89; }
    .messages-tag[data-kind="notice"] { background: rgba(216,185,190,0.22); color: #8B6D73; }
    .messages-tag[data-kind="echo"] { background: rgba(184,201,188,0.26); color: #667A6C; }
    .messages-empty {
        position: absolute;
        z-index: 2;
        left: 50%;
        top: 52%;
        transform: translate(-50%, -50%);
        width: min(72vw, 270px);
        text-align: center;
        color: #8C95A3;
        font-size: 13px;
        letter-spacing: 0.08em;
        line-height: 1.82;
        pointer-events: none;
        display: none;
    }
    .messages-empty.show { display: block; }
    .messages-empty strong {
        display: block;
        margin-bottom: 8px;
        font-family: Georgia, "Times New Roman", "Songti SC", serif;
        font-size: 26px;
        line-height: 1;
        font-style: italic;
        font-weight: 400;
        letter-spacing: -0.04em;
        color: #565D67;
    }
    .messages-empty span { display: block; }
    .messages-detail {
        position: absolute;
        inset: 0;
        z-index: 5;
        background: rgba(252,251,247,0.96);
        background-image: linear-gradient(145deg, rgba(255,255,255,0.86), rgba(246,241,234,0.92));
        opacity: 0;
        pointer-events: none;
        transform: translateX(18px);
        transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
        display: flex;
        flex-direction: column;
        padding: max(34px, calc(env(safe-area-inset-top) + 18px)) 22px max(34px, calc(env(safe-area-inset-bottom) + 24px));
    }
    .messages-detail.show {
        opacity: 1;
        pointer-events: auto;
        transform: translateX(0);
    }
    .messages-detail-head {
        display: grid;
        grid-template-columns: 42px 52px minmax(0, 1fr);
        align-items: center;
        gap: 10px;
        margin-bottom: 28px;
    }
    .messages-detail-back {
        width: 40px;
        height: 40px;
        border: 1px solid rgba(150,158,168,0.24);
        border-radius: 50%;
        background: rgba(255,255,255,0.56);
        display: grid;
        place-items: center;
        color: #4A4E59;
        cursor: pointer;
        appearance: none;
        -webkit-appearance: none;
    }
    .messages-detail-back svg {
        width: 18px;
        height: 18px;
        stroke: currentColor;
        stroke-width: 1.7;
        fill: none;
        stroke-linecap: round;
        stroke-linejoin: round;
    }
    .messages-detail-person { min-width: 0; }
    .messages-detail-name {
        font-size: 18px;
        font-weight: 650;
        color: #343941;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
    .messages-detail-meta {
        margin-top: 4px;
        font-size: 10px;
        letter-spacing: 0.14em;
        color: #9AA2AD;
        text-transform: uppercase;
    }
    .messages-letter-card {
        position: relative;
        border-radius: 34px;
        background:
            linear-gradient(90deg, rgba(184,151,137,0.16) 0 1px, transparent 1px 100%) 31px 0 / 32px 100% no-repeat,
            repeating-linear-gradient(to bottom, transparent 0 29px, rgba(117,124,135,0.105) 30px, transparent 31px),
            rgba(255,255,255,0.66);
        border: 1px solid rgba(255,255,255,0.74);
        box-shadow: 0 18px 46px rgba(76,72,64,0.06), inset 0 1px 0 rgba(255,255,255,0.86);
        padding: 30px 24px 26px;
        min-height: 282px;
        display: flex;
        flex-direction: column;
        gap: 16px;
        overflow: hidden;
    }
    .messages-letter-card::before {
        content: '';
        position: absolute;
        left: 24px;
        right: 24px;
        top: 0;
        height: 10px;
        border-radius: 0 0 14px 14px;
        background: rgba(181,199,211,0.26);
    }
    .messages-letter-card::after {
        content: 'LETTER';
        position: absolute;
        right: 18px;
        bottom: 14px;
        z-index: 0;
        font-family: Georgia, "Times New Roman", serif;
        font-size: 52px;
        line-height: 1;
        font-style: italic;
        letter-spacing: -0.08em;
        color: rgba(52,57,65,0.035);
        pointer-events: none;
    }
    .messages-letter-card > * { position: relative; z-index: 1; }
    .messages-letter-card h2 {
        margin: 0;
        font-family: Georgia, "Times New Roman", "Songti SC", serif;
        font-size: 27px;
        line-height: 1.05;
        font-style: italic;
        font-weight: 400;
        letter-spacing: -0.04em;
        color: #343941;
    }
    .messages-letter-body {
        margin: 0;
        color: #626B76;
        font-size: 14px;
        line-height: 1.92;
        white-space: pre-wrap;
        word-break: break-word;
    }
    .messages-letter-mark { border-radius: 7px; padding: 0 0.08em; }
    .messages-letter-mark.is-underline {
        text-decoration-line: underline;
        text-decoration-thickness: 0.42em;
        text-decoration-color: rgba(214,205,146,0.38);
        text-underline-offset: -0.15em;
        text-decoration-skip-ink: none;
    }
    .messages-letter-mark.is-highlight {
        background: linear-gradient(180deg, transparent 48%, rgba(214,205,146,0.34) 48% 88%, transparent 88%);
    }
    .messages-redaction {
        position: relative;
        display: inline-flex;
        align-items: center;
        min-height: 1.32em;
        border: 0;
        border-radius: 7px;
        padding: 0 0.34em;
        background: rgba(47,51,58,0.92);
        color: transparent;
        cursor: pointer;
        font: inherit;
        letter-spacing: 0.02em;
        vertical-align: baseline;
        appearance: none;
        -webkit-appearance: none;
    }
    .messages-redaction::after {
        content: '轻点揭开';
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        color: rgba(255,255,255,0.58);
        font-size: 9px;
        letter-spacing: 0.12em;
        white-space: nowrap;
        pointer-events: none;
    }
    .messages-redaction.is-revealed {
        background: rgba(214,205,146,0.22);
        color: #4F5660;
    }
    .messages-redaction.is-revealed::after { content: ''; }
    .messages-letter-card time {
        margin-top: auto;
        color: #A2A9B2;
        font-size: 11px;
        letter-spacing: 0.12em;
        text-transform: uppercase;
    }
    .messages-detail-actions {
        margin-top: auto;
        display: grid;
        grid-template-columns: 1fr 1.2fr;
        gap: 12px;
        padding-top: 20px;
    }
    .messages-primary-action,
    .messages-secondary-action {
        height: 48px;
        border-radius: 999px;
        border: 1px solid rgba(74,78,89,0.24);
        font-size: 13px;
        letter-spacing: 0.06em;
        cursor: pointer;
        appearance: none;
        -webkit-appearance: none;
    }
    .messages-primary-action {
        background: #343941;
        color: #fff;
    }
    .messages-secondary-action {
        background: rgba(255,255,255,0.62);
        color: #4A4E59;
    }
    .messages-toast { z-index: 9500; }

    /* Chat APP：dock 第二个图标进入的独立通信页面 */
    .chat-app-page {
        --chat-paper: #FCFBF7;
        --chat-paper-2: #F7F3EC;
        --chat-ink: #343941;
        --chat-muted: #8C95A3;
        --chat-soft: #B8BEC7;
        --chat-line: rgba(117, 124, 135, 0.20);
        --chat-line-strong: rgba(74, 78, 89, 0.34);
        --chat-blue: #B5C7D3;
        --chat-sage: #AFC5B7;
        --chat-rose: #D8B9BE;
        --chat-shadow: 0 18px 46px rgba(76, 72, 64, 0.08);
        position: fixed;
        inset: 0;
        z-index: 9000;
        overflow: hidden;
        background-color: var(--chat-paper);
        background-image:
            radial-gradient(circle at 16% 14%, rgba(255,255,255,0.82) 0%, rgba(255,255,255,0.24) 32%, transparent 58%),
            radial-gradient(circle at 92% 76%, rgba(226,236,242,0.84) 0%, rgba(226,236,242,0.22) 34%, transparent 62%),
            linear-gradient(138deg, #FCFBF7 0%, #F6F1EA 100%);
        color: var(--chat-ink);
        opacity: 0;
        pointer-events: none;
        transform: translateY(10px);
        transition: opacity 0.26s ease, transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
        isolation: isolate;
    }
    .chat-app-page::before {
        content: '';
        position: absolute;
        inset: 0;
        z-index: 0;
        pointer-events: none;
        background-image:
            radial-gradient(circle, rgba(74,78,89,0.028) 0 0.62px, transparent 0.72px),
            linear-gradient(rgba(120,130,140,0.018) 1px, transparent 1px);
        background-size: 13px 13px, 44px 44px;
        opacity: 0.64;
    }
    .chat-app-page.show {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }
    .chat-app-page.offline-open {
        background-color: #FCFBF7;
        background-image:
            radial-gradient(circle at 12% 18%, rgba(245,245,245,0.72) 0%, rgba(245,245,245,0.22) 32%, transparent 58%),
            radial-gradient(circle at 88% 76%, rgba(230,238,242,0.72) 0%, rgba(230,238,242,0.30) 34%, transparent 62%),
            linear-gradient(135deg, #FCFBF7 0%, #F8F4EF 100%);
    }
    .chat-app-page.offline-open::before {
        content: none;
        display: none;
        background: none;
        opacity: 0;
    }
    .chat-app-page input,
    .chat-app-page textarea {
        user-select: text;
        -webkit-user-select: text;
        font-family: inherit;
    }

    .chat-app-page button,
    .modal-overlay button,
    #desktopDialogModal button {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    .chat-view {
        position: absolute;
        inset: 0;
        z-index: 1;
        display: none;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
        scrollbar-width: none;
        padding: max(38px, calc(env(safe-area-inset-top) + 22px)) 24px max(112px, calc(env(safe-area-inset-bottom) + 106px));
    }
    .chat-view::-webkit-scrollbar { display: none; }
    .chat-view.active { display: block; animation: chat-soft-enter 0.28s ease both; }
    @keyframes chat-soft-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

    .chat-news-head {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
        gap: 18px;
        padding-top: 4px;
    }
    .chat-title-news {
        font-family: Georgia, "Times New Roman", "Songti SC", serif;
        font-size: clamp(36px, 11vw, 46px);
        line-height: 0.9;
        letter-spacing: -0.08em;
        font-style: italic;
        font-weight: 400;
        color: #2F333A;
    }
    .chat-date-line {
        margin-top: 12px;
        font-family: "Courier New", Courier, monospace;
        font-size: 11px;
        letter-spacing: 0.16em;
        color: var(--chat-muted);
    }
    .chat-news-tools {
        display: inline-flex;
        align-items: center;
        justify-content: flex-end;
        gap: 10px;
    }
    .chat-random-btn,
    .chat-news-plus-btn {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        border: 1px solid var(--chat-line-strong);
        background: rgba(255,255,255,0.72);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #4A4E59;
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.82);
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        appearance: none;
        -webkit-appearance: none;
    }
    .chat-news-plus-btn {
        width: 44px;
        height: 44px;
        margin-bottom: 0;
        background: rgba(255,255,255,0.38);
        color: #343941;
    }
    .chat-random-btn svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
    .chat-news-plus-btn svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.7; fill: none; stroke-linecap: round; stroke-linejoin: round; }
    .chat-random-btn:active,
    .chat-news-plus-btn:active { transform: scale(0.94); background: rgba(235,238,242,0.7); }

    .chat-empty {
        position: absolute;
        left: 50%;
        top: 52%;
        transform: translate(-50%, -50%);
        width: min(72vw, 270px);
        text-align: center;
        color: #8C95A3;
        font-size: 13px;
        letter-spacing: 0.08em;
        line-height: 1.82;
        background: transparent;
        border: 0;
        box-shadow: none;
        pointer-events: none;
    }
    .chat-empty strong {
        display: block;
        margin-bottom: 8px;
        font-family: Georgia, "Times New Roman", "Songti SC", serif;
        font-size: 26px;
        line-height: 1;
        font-style: italic;
        font-weight: 400;
        letter-spacing: -0.04em;
        color: #565D67;
    }
    .chat-empty span { display: block; font-size: 12px; color: #A0A7B0; letter-spacing: 0.10em; }

    .chat-news-list {
        margin-top: 26px;
        display: grid;
        gap: 10px;
        padding-bottom: 18px;
    }
    .chat-news-card {
        width: 100%;
        min-height: 72px;
        border: 0;
        border-radius: 22px;
        background: rgba(255,255,255,0.48);
        color: #343941;
        display: grid;
        grid-template-columns: 46px minmax(0, 1fr) auto;
        align-items: center;
        gap: 12px;
        padding: 12px 14px;
        text-align: left;
        box-shadow: inset 0 0 0 1px rgba(255,255,255,0.70), 0 10px 24px rgba(76,72,64,0.045);
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    .chat-news-card:active { transform: translateY(1px); opacity: 0.78; }
    .chat-news-avatar {
        width: 46px;
        height: 46px;
        border-radius: 50%;
        background: #EEF1F3;
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: rgba(52,57,65,0.44);
        font-family: Georgia, "Times New Roman", serif;
        font-size: 12px;
        font-style: italic;
    }
    .chat-news-avatar.is-group { border-radius: 17px; }
    .chat-news-copy { min-width: 0; display: flex; flex-direction: column; gap: 7px; }
    .chat-news-copy strong {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 15px;
        line-height: 1.1;
        font-weight: 620;
        color: #303640;
    }
    .chat-news-copy span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 12px;
        line-height: 1.15;
        color: #7E8792;
    }
    .chat-news-time {
        align-self: start;
        padding-top: 2px;
        font-family: "Courier New", Courier, monospace;
        font-size: 9px;
        letter-spacing: 0.08em;
        color: #ADB3BC;
        white-space: nowrap;
    }


    .chat-npc-view .chat-empty { display: none; }
    .chat-npc-view .chat-empty.show { display: block; }
    .chat-npc-view .chat-contact-card { min-height: 242px; }
    .chat-npc-view .chat-contact-card::after { bottom: 66px; }
    .chat-npc-view .chat-contact-info {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        min-height: 62px;
    }
    .chat-npc-view .chat-contact-avatar,
    .chat-contact-card[data-contact-type="npc"] .chat-contact-avatar {
        width: 58px;
        height: 58px;
        border-radius: 50%;
        background:
            linear-gradient(180deg, rgba(255,255,255,0.84), rgba(255,255,255,0.26)),
            #F0F2EE;
        box-shadow:
            inset 0 0 0 1px rgba(255,255,255,0.88),
            0 12px 28px rgba(80,75,67,0.08);
        color: rgba(63,75,82,0.45);
        font-size: 14px;
    }
    .chat-npc-view .chat-contact-name { min-width: 0; }
    .chat-npc-view .chat-contact-note {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        min-height: 35px;
    }
    .chat-npc-view #chatNpcEmpty {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        width: 100%;
        margin: 18px 0 0;
        padding: 10px 0 2px;
    }
    .chat-npc-view #chatNpcEmpty strong { margin-bottom: 10px; }
    .chat-npc-view #chatNpcList.has-items + #chatNpcEmpty { display: none; }
    #chatNpcGenerateBtn:disabled {
        opacity: 0.46;
        pointer-events: none;
    }

        .chat-ta-wrap {
        padding-top: 0;
        margin: -4px -24px 0;
        background: transparent;
    }
    .chat-browser-tabs {
        position: relative;
        min-height: 42px;
        height: 42px;
        display: flex;
        align-items: flex-end;
        gap: 4px;
        padding: 6px 8px 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        overflow-x: auto;
        overflow-y: visible;
        scrollbar-width: none;
        box-shadow: none;
        z-index: 5;
        --chat-tab-active-bg: #ffffff;
        --chat-tab-rest-bg: transparent;
        --chat-tab-rest-hover: transparent;
        --chat-tab-ink: #4f5964;
        --chat-tab-muted: #68717c;
    }
    .chat-browser-tabs::-webkit-scrollbar { display: none; }
    .chat-browser-tabs::before { content: none; }
    .chat-tabs-dropdown {
        position: relative;
        z-index: 4;
        width: 28px;
        height: 28px;
        margin: 0 2px 5px 0;
        border: 0;
        border-radius: 999px;
        background: transparent;
        color: #5f6873;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 28px;
        cursor: pointer;
        box-shadow: none;
        -webkit-tap-highlight-color: transparent;
        appearance: none;
        -webkit-appearance: none;
        outline: none;
        transition: background 0.18s ease, color 0.18s ease, opacity 0.18s ease;
    }
    .chat-tabs-dropdown::after { content: none; }
    .chat-tabs-dropdown:active { opacity: 0.72; background: transparent; transform: none; }
    .chat-tabs-dropdown svg {
        position: relative;
        z-index: 1;
        width: 15px;
        height: 15px;
        stroke: currentColor;
        stroke-width: 1.75;
        fill: none;
        stroke-linecap: round;
        stroke-linejoin: round;
        vector-effect: non-scaling-stroke;
    }
    .chat-browser-tab {
        position: relative;
        z-index: 2;
        height: 36px;
        min-width: 120px;
        max-width: 200px;
        margin: 0;
        padding: 0 30px 0 13px;
        display: inline-flex;
        align-items: center;
        border-radius: 10px 10px 0 0;
        border: 0;
        background: var(--chat-tab-rest-bg);
        color: var(--chat-tab-muted);
        font-size: 12px;
        font-weight: 500;
        letter-spacing: 0.02em;
        box-shadow: none;
        cursor: pointer;
        appearance: none;
        -webkit-appearance: none;
        -webkit-tap-highlight-color: transparent;
        flex: 0 1 auto;
        align-self: flex-end;
        overflow: visible;
        outline: none;
        user-select: none;
        transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
    }
    .chat-browser-tab:not(.active):hover { background: var(--chat-tab-rest-hover); }
    .chat-browser-tab:not(.active)::before { content: none; }
    .chat-browser-tab:not(.active)::after { content: none; }
    .chat-browser-tabs > .chat-browser-tab:first-of-type::before { content: none; }
    .chat-browser-tab-label {
        position: relative;
        z-index: 2;
        min-width: 0;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        line-height: 1;
    }
    .chat-browser-tab.active {
        z-index: 8;
        background: var(--chat-tab-active-bg);
        color: #28313b;
        box-shadow: 0 -1px 8px rgba(60, 66, 76, 0.06);
    }
    .chat-browser-tab.active::before,
    .chat-browser-tab.active::after {
        content: '';
        position: absolute;
        bottom: 0;
        width: 8px;
        height: 8px;
        background: transparent;
        pointer-events: none;
    }
    .chat-browser-tab.active::before {
        left: -8px;
        border-radius: 0 0 8px 0;
        box-shadow: 2px 2px 0 0 var(--chat-tab-active-bg);
    }
    .chat-browser-tab.active::after {
        right: -8px;
        border-radius: 0 0 0 8px;
        box-shadow: -2px 2px 0 0 var(--chat-tab-active-bg);
    }
    .chat-browser-tab:active { opacity: 0.72; transform: none; }
    .chat-browser-tab-close {
        position: absolute;
        z-index: 3;
        right: 10px;
        top: 50%;
        width: 14px;
        height: 14px;
        transform: translateY(-50%);
        border-radius: 50%;
        opacity: 0.42;
        transition: opacity 0.18s ease, background 0.18s ease;
    }
    .chat-browser-tab:hover .chat-browser-tab-close { opacity: 0.74; }
    .chat-browser-tab-close::before,
    .chat-browser-tab-close::after {
        content: '';
        position: absolute;
        left: 3.25px;
        top: 6.25px;
        width: 7.5px;
        height: 1px;
        border-radius: 999px;
        background: #69737f;
    }
    .chat-browser-tab-close::before { transform: rotate(45deg); }
    .chat-browser-tab-close::after { transform: rotate(-45deg); }
    .chat-browser-add {
        position: relative;
        z-index: 3;
        width: 28px;
        height: 36px;
        margin-left: 4px;
        margin-bottom: 0;
        padding: 0;
        border: 0;
        border-radius: 999px 999px 0 0;
        background: transparent;
        color: #4f5964;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        appearance: none;
        -webkit-appearance: none;
        flex: 0 0 28px;
        box-shadow: none;
        outline: none;
        transition: opacity 0.18s ease, background 0.18s ease;
    }
    .chat-browser-add::before,
    .chat-browser-add::after { content: none; }
    .chat-browser-add:active { opacity: 0.58; background: transparent; transform: none; }
    .chat-browser-add svg {
        width: 18px;
        height: 18px;
        stroke: currentColor;
        stroke-width: 1.85;
        fill: none;
        stroke-linecap: round;
        stroke-linejoin: round;
        vector-effect: non-scaling-stroke;
    }
    .chat-browser-bar {
        min-height: 44px;
        display: grid;
        grid-template-columns: 30px 30px 30px minmax(0, 1fr) 30px;
        align-items: center;
        gap: 7px;
        padding: 8px 9px;
        border-radius: 0;
        border: 0;
        border-bottom: 1px solid rgba(210, 215, 221, 0.88);
        background: #ffffff;
        box-shadow: 0 1px 4px rgba(72, 80, 90, 0.08);
        position: relative;
        z-index: 2;
    }
    .chat-browser-btn {
        width: 30px;
        height: 30px;
        padding: 0;
        border: 0;
        background: transparent;
        color: #67717e;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        border-radius: 999px;
        -webkit-tap-highlight-color: transparent;
        appearance: none;
        -webkit-appearance: none;
        box-shadow: none;
        outline: none;
        transition: background 0.18s ease, opacity 0.18s ease, color 0.18s ease;
    }
    .chat-browser-back { transform: none; color: #5b6470; }
    .chat-browser-forward { color: #7b8490; opacity: 1; }
    .chat-refresh-btn {
        width: 30px;
        height: 30px;
        padding: 0;
        border: 0;
        border-radius: 999px;
        background: transparent;
        box-shadow: none;
        color: #69737f;
        appearance: none;
        -webkit-appearance: none;
        outline: none;
    }
    .chat-browser-btn:hover,
    .chat-refresh-btn:hover { background: #f3f4f6; }
    .chat-browser-btn:active,
    .chat-refresh-btn:active { background: #eef0f2; opacity: 0.76; transform: none; }
    .chat-browser-btn:focus,
    .chat-refresh-btn:focus { outline: none; }
    .chat-browser-btn svg,
    .chat-more-btn svg,
    .chat-refresh-btn svg {
        width: 18px;
        height: 18px;
        min-width: 18px;
        min-height: 18px;
        overflow: visible;
        stroke: currentColor;
        stroke-width: 2;
        fill: none;
        stroke-linecap: round;
        stroke-linejoin: round;
        flex: 0 0 20px;
        vector-effect: non-scaling-stroke;
    }
    .chat-refresh-btn svg {
        width: 17px;
        height: 17px;
        min-width: 17px;
        min-height: 17px;
        stroke-width: 2;
    }
    .chat-url-field {
        width: 100%;
        min-width: 0;
        height: 31px;
        border-radius: 999px;
        background: #f1f3f4;
        border: 1px solid transparent;
        box-shadow: none;
        display: flex;
        align-items: center;
        padding: 0 13px 0 31px;
        color: #535d69;
        font-size: 12px;
        letter-spacing: 0.03em;
        overflow: hidden;
        white-space: nowrap;
        cursor: text;
        outline: none;
        user-select: text;
        -webkit-user-select: text;
        caret-color: #4a4e59;
        box-sizing: border-box;
        appearance: none;
        -webkit-appearance: none;
        background-image:
            radial-gradient(circle at 14px 50%, #afc5b7 0 3.5px, transparent 4px),
            radial-gradient(circle at 14px 50%, rgba(175, 197, 183, 0.16) 0 7px, transparent 7.5px);
        background-repeat: no-repeat;
        transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    }
    .chat-url-field::placeholder {
        color: #9aa3af;
        opacity: 1;
    }
    .chat-url-field::-webkit-search-decoration,
    .chat-url-field::-webkit-search-cancel-button,
    .chat-url-field::-webkit-search-results-button,
    .chat-url-field::-webkit-search-results-decoration { display: none; }
    .chat-url-field:focus {
        background-color: transparent;
        border-color: rgba(190, 198, 207, 0.88);
        box-shadow: none;
    }
    .chat-url-field::before { content: none; }
    .chat-more-btn { color: #525c68; }

    .chat-contact-zone {
        position: relative;
        min-height: 420px;
        padding: 24px 18px 112px;
    }
    .chat-contact-list {
        display: none;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        align-items: stretch;
        width: calc(100% + 48px);
        margin-left: -24px;
        margin-right: -24px;
    }
    .chat-contact-list.has-items { display: grid; }
    .chat-contact-card {
        position: relative;
        min-height: 194px;
        padding: 17px;
        width: 100%;
        box-sizing: border-box;
        border-radius: 31px;
        border: 1px solid rgba(188, 195, 204, 0.26);
        background: #fffdf8;
        box-shadow:
            0 14px 31px rgba(72, 80, 90, 0.055),
            inset 0 1px 0 rgba(255, 255, 255, 0.86);
        display: flex;
        flex-direction: column;
        gap: 12px;
        font: inherit;
        text-align: left;
        cursor: pointer;
        overflow: hidden;
        -webkit-tap-highlight-color: transparent;
        transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
    }
    .chat-contact-card:active {
        transform: translateY(1px);
        border-color: rgba(174, 182, 193, 0.42);
        box-shadow: 0 10px 24px rgba(72, 80, 90, 0.055), inset 0 1px 0 rgba(255, 255, 255, 0.86);
    }
    .chat-contact-card::before {
        content: '';
        position: absolute;
        right: 17px;
        bottom: 17px;
        width: 41px;
        height: 41px;
        border-radius: 50%;
        border: 1px dashed rgba(154, 160, 171, 0.26);
        opacity: 0.72;
        pointer-events: none;
    }
    .chat-contact-card::after {
        content: '';
        position: absolute;
        left: 17px;
        right: 17px;
        bottom: 61px;
        border-top: 1px dashed rgba(180, 185, 195, 0.38);
        pointer-events: none;
    }
    .chat-contact-top {
        position: relative;
        z-index: 1;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        min-height: 28px;
    }
    .chat-contact-tag {
        font-family: "Courier New", Courier, monospace;
        font-size: 11px;
        line-height: 1;
        letter-spacing: 0.14em;
        color: #a0a7b1;
        white-space: nowrap;
    }
    .chat-contact-arrow {
        position: relative;
        width: 28px;
        height: 28px;
        border: 1px solid rgba(204, 210, 218, 0.74);
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.94);
        box-shadow: 0 5px 12px rgba(76, 84, 96, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.96);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #8f98a4;
        flex: 0 0 auto;
        padding: 0;
        font: inherit;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
    }
    .chat-contact-arrow:active {
        background: #e2e5ea;
        color: #68717e;
        transform: translateY(1px);
        box-shadow: inset 0 1px 2px rgba(95, 104, 116, 0.10);
    }
    .chat-contact-arrow::before {
        content: '';
        width: 6px;
        height: 6px;
        border-top: 1.4px solid currentColor;
        border-right: 1.4px solid currentColor;
        transform: translateX(-1px) rotate(45deg);
    }
    .chat-contact-avatar {
        position: relative;
        z-index: 1;
        width: 62px;
        height: 62px;
        border-radius: 22px;
        background: #f1f2f3;
        border: 2px solid rgba(255, 255, 255, 0.92);
        box-shadow:
            0 7px 16px rgba(104, 112, 124, 0.075),
            inset 0 0 0 1px rgba(190, 197, 207, 0.16);
        display: flex;
        align-items: center;
        justify-content: center;
        color: #b7bdc6;
        font-family: Georgia, "Times New Roman", serif;
        font-style: italic;
        font-size: 17px;
        letter-spacing: 0.05em;
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
        overflow: hidden;
        flex: 0 0 auto;
    }
    .chat-contact-avatar.has-image { color: transparent; }
    .chat-contact-avatar.is-group { border-radius: 20px; }
    .chat-contact-info {
        position: relative;
        z-index: 1;
        min-width: 0;
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        gap: 7px;
    }
    .chat-contact-name {
        font-family: Georgia, "Times New Roman", "Songti SC", serif;
        font-size: 19px;
        line-height: 1.12;
        font-style: italic;
        letter-spacing: -0.02em;
        color: #3f4751;
        margin: 0;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .chat-contact-note {
        font-size: 12px;
        line-height: 1.45;
        color: #8d96a2;
        letter-spacing: 0.04em;
        max-width: 100%;
        overflow: hidden;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        min-height: 35px;
        white-space: normal;
        word-break: break-word;
    }
    .chat-contact-meta {
        position: relative;
        z-index: 1;
        min-height: 26px;
        margin-top: auto;
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        gap: 10px;
        color: #a5acb6;
    }
    .chat-contact-group {
        min-width: 0;
        max-width: calc(100% - 34px);
        display: inline-flex;
        align-items: center;
        gap: 7px;
        font-size: 11px;
        line-height: 1;
        letter-spacing: 0.12em;
        color: #8d96a2;
        text-transform: uppercase;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .chat-contact-group::before {
        content: '';
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #b5c7d3;
        box-shadow: 0 0 0 3px rgba(181, 199, 211, 0.15);
        flex: 0 0 auto;
    }
    .chat-contact-mini-mark {
        width: 26px;
        height: 12px;
        border-radius: 999px;
        border: 1px solid rgba(154, 160, 171, 0.24);
        flex: 0 0 auto;
    }
    @media (max-width: 340px) {
        .chat-contact-list { gap: 10px; width: calc(100% + 40px); margin-left: -20px; margin-right: -20px; }
        .chat-contact-card { min-height: 182px; padding: 15px; border-radius: 28px; }
        .chat-contact-avatar { width: 58px; height: 58px; border-radius: 20px; }
        .chat-contact-name { font-size: 19px; }
        .chat-contact-note { font-size: 11px; }
    }

    .chat-ta-profile-view {
        padding: max(38px, calc(env(safe-area-inset-top) + 22px)) 22px max(42px, calc(env(safe-area-inset-bottom) + 34px));
        background: transparent;
    }
    .chat-app-page.ta-profile-open .chat-bottom-dock,
    .chat-ta-profile-view.active ~ .chat-bottom-dock {
        display: none;
    }
    .chat-ta-profile-hero {
        position: relative;
        min-height: 266px;
        margin: 0 0 18px;
        border-radius: 32px;
        overflow: visible;
        border: 0;
        background: transparent;
        box-shadow: none;
        isolation: isolate;
    }
    .chat-ta-profile-hero::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: -1px;
        z-index: 1;
        height: 76%;
        pointer-events: none;
        border-radius: 0 0 32px 32px;
        background: linear-gradient(180deg, rgba(252,251,247,0) 0%, rgba(252,251,247,0.05) 30%, rgba(252,251,247,0.42) 66%, var(--chat-paper) 100%);
    }
    .chat-ta-profile-bg {
        position: absolute;
        inset: 0;
        border-radius: inherit;
        overflow: hidden;
        background-image:
            radial-gradient(circle at 18% 16%, rgba(255,255,255,0.86) 0%, rgba(255,255,255,0.24) 32%, transparent 58%),
            radial-gradient(circle at 84% 18%, rgba(217,226,232,0.84) 0%, rgba(217,226,232,0.17) 31%, transparent 60%),
            linear-gradient(135deg, #e9edf1 0%, #f6eee8 62%, #fffdf8 100%);
        -webkit-mask-image: linear-gradient(to bottom, #000 66%, rgba(0,0,0,0.62) 78%, transparent 100%);
        mask-image: linear-gradient(to bottom, #000 66%, rgba(0,0,0,0.62) 78%, transparent 100%);
    }
    .chat-ta-profile-bg::before {
        content: '';
        position: absolute;
        inset: 0;
        opacity: 0.34;
        background-image:
            linear-gradient(rgba(128, 137, 148, 0.052) 1px, transparent 1px),
            linear-gradient(90deg, rgba(128, 137, 148, 0.042) 1px, transparent 1px);
        background-size: 24px 24px;
    }
    .chat-ta-profile-hero.has-custom-bg .chat-ta-profile-bg {
        background-image:
            linear-gradient(180deg, rgba(255,255,255,0.18) 0%, rgba(252,251,247,0.34) 58%, rgba(252,251,247,0.72) 100%),
            var(--ta-profile-bg-image);
        background-size: cover, cover;
        background-position: center, center;
        background-repeat: no-repeat, no-repeat;
    }
    .chat-ta-profile-star {
        position: absolute;
        z-index: 3;
        top: 26px;
        right: 20px;
        width: 38px;
        height: 38px;
        border-radius: 50%;
        border: 0;
        background: transparent;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        transition: background 0.16s ease, transform 0.16s ease;
    }
    .chat-ta-profile-star:active {
        background: rgba(119, 126, 136, 0.18);
        transform: translateY(1px);
    }
    .chat-ta-profile-star span {
        width: 20px;
        height: 20px;
        display: block;
        background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23ffffff' d='M12 2.25c1.08 3.82 2.78 5.85 6.6 7.03-3.82 1.08-5.52 3.11-6.6 6.97-1.08-3.86-2.78-5.89-6.6-6.97 3.82-1.18 5.52-3.21 6.6-7.03Zm5.25 10.7c.45 1.58 1.12 2.42 2.7 2.88-1.58.45-2.25 1.3-2.7 2.88-.45-1.58-1.12-2.43-2.7-2.88 1.58-.46 2.25-1.3 2.7-2.88Z'/%3E%3C/svg%3E");
        filter: drop-shadow(0 2px 10px rgba(92, 99, 110, 0.10));
        transform: translateY(-0.5px);
    }
    .chat-ta-profile-main {
        position: relative;
        z-index: 2;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: 16px;
        padding: 56px 20px 18px;
    }
    .chat-ta-profile-avatar-wrap {
        position: relative;
        width: 76px;
        height: 76px;
        flex: 0 0 auto;
    }
    .chat-ta-profile-avatar {
        position: relative;
        z-index: 2;
        width: 76px;
        height: 76px;
        border-radius: 24px;
        background: #eef0f2;
        border: 2px solid rgba(255,255,255,0.92);
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        color: #b4bbc4;
        font-family: Georgia, "Times New Roman", serif;
        font-size: 19px;
        font-style: italic;
        letter-spacing: 0.06em;
        box-shadow: 0 12px 24px rgba(82, 90, 102, 0.12), inset 0 0 0 1px rgba(184, 191, 201, 0.14);
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    .chat-ta-profile-avatar:active { opacity: 0.72; }
    .chat-ta-profile-avatar.has-image { color: transparent; }
    .chat-ta-profile-avatar-mark {
        position: absolute;
        z-index: 1;
        left: 0;
        bottom: 0;
        width: 76px;
        height: 76px;
        border-radius: 24px;
        border: 1.6px solid rgba(134, 145, 158, 0.30);
        box-shadow: 0 5px 14px rgba(96, 106, 118, 0.055);
        transform: translate(-2px, 2px) rotate(-10deg);
        transform-origin: left bottom;
        pointer-events: none;
    }
    .chat-ta-profile-copy { min-width: 0; align-self: center; padding-right: 42px; }
    .chat-ta-profile-name {
        margin: 0;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-family: Georgia, "Times New Roman", "Songti SC", serif;
        font-size: clamp(28px, 8.6vw, 39px);
        line-height: 0.98;
        letter-spacing: -0.075em;
        font-style: italic;
        font-weight: 400;
        color: #303740;
    }
    .chat-ta-profile-id {
        margin-top: 9px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-family: "Courier New", Courier, monospace;
        font-size: 10px;
        line-height: 1;
        letter-spacing: 0.13em;
        color: #8d96a2;
    }
    .chat-ta-profile-signature {
        position: absolute;
        z-index: 3;
        left: 20px;
        right: 20px;
        bottom: 20px;
        min-height: 44px;
        display: grid;
        grid-template-columns: minmax(0, 1fr) 34px;
        align-items: center;
        gap: 10px;
        padding: 6px 6px 6px 16px;
        border-radius: 999px;
        background: rgba(255,255,255,0.86);
        border: 0;
        color: #7f8996;
        box-shadow: 0 10px 22px rgba(76, 84, 96, 0.075), inset 0 1px 0 rgba(255,255,255,0.90);
        font-size: 12px;
        line-height: 1.35;
        letter-spacing: 0.04em;
    }
    .chat-ta-profile-signature > span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        cursor: pointer;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    .chat-ta-profile-arrow {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        border: 0;
        background: #f0f2f4;
        color: #626c78;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        cursor: pointer;
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.95);
        -webkit-tap-highlight-color: transparent;
        transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
    }
    .chat-ta-profile-arrow:active { background: #e2e5ea; color: #505a66; transform: translateY(1px); }
    .chat-ta-profile-arrow span {
        width: 8px;
        height: 8px;
        border-top: 1.5px solid currentColor;
        border-right: 1.5px solid currentColor;
        transform: translateX(-1px) rotate(45deg);
    }
    .chat-ta-profile-actions {
        display: flex;
        flex-direction: column;
        gap: 8px;
        background: transparent;
    }
    .chat-ta-profile-action-group,
    .chat-ta-profile-danger-stack {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding-top: 0;
        opacity: 1;
    }
    .chat-ta-profile-danger-stack { margin-top: 2px; opacity: 0.78; }
    .chat-ta-profile-row {
        position: relative;
        width: 100%;
        min-height: 46px;
        padding: 0 14px;
        border: 0;
        border-radius: 16px;
        background: rgba(255,255,255,0.42);
        color: #68717D;
        display: inline-flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        text-align: left;
        font: inherit;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        appearance: none;
        -webkit-appearance: none;
        box-shadow: inset 0 0 0 1px rgba(150,158,168,0.10);
    }
    .chat-ta-profile-row span {
        min-width: 0;
        font-size: 12px;
        line-height: 1.15;
        letter-spacing: 0.035em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .chat-ta-profile-row i {
        display: block;
        width: 7px;
        height: 7px;
        flex: 0 0 7px;
        border-top: 1.2px solid currentColor;
        border-right: 1.2px solid currentColor;
        transform: rotate(45deg);
        opacity: 0.32;
    }
    .chat-ta-profile-row:active { background: rgba(255,255,255,0.62); opacity: 0.72; }
    .chat-ta-profile-danger-stack .chat-ta-profile-row {
        width: 100%;
        min-height: 46px;
        justify-content: center;
        text-align: center;
        padding: 0 14px;
        border-radius: 16px;
        background: transparent;
        box-shadow: inset 0 0 0 1px rgba(150,158,168,0.14);
    }
    .chat-ta-profile-danger-stack .chat-ta-profile-row span { text-align: center; }
    .chat-ta-profile-danger-stack .chat-ta-profile-row i { display: none; }
    .chat-ta-profile-row.is-danger-soft span { color: #78686a; }
    .chat-ta-profile-row.is-danger span { color: #9c4d54; }
    @media (max-width: 340px) {
        .chat-ta-profile-view { padding-left: 18px; padding-right: 18px; }
        .chat-ta-profile-main { gap: 12px; padding-top: 52px; padding-left: 18px; padding-right: 18px; }
        .chat-ta-profile-avatar-wrap,
        .chat-ta-profile-avatar,
        .chat-ta-profile-avatar-mark { width: 68px; height: 68px; border-radius: 22px; }
        .chat-ta-profile-avatar-mark { transform: translate(-1px, 1px) rotate(-10deg); }
        .chat-ta-profile-copy { padding-right: 38px; }
        .chat-ta-profile-signature { left: 16px; right: 16px; }
    }

    .chat-dynamic-view {
        padding: 0 0 max(112px, calc(env(safe-area-inset-bottom) + 106px));
        background: #FCFBF7;
    }


    .chat-app-page.thread-open .chat-bottom-dock,
    .chat-thread-view.active ~ .chat-bottom-dock {
        display: none;
    }
    .chat-thread-view {
        --chat-bubble-me: #000;
        --chat-bubble-ta: #ffffff;
        --chat-text-me: #ffffff;
        --chat-text-ta: #000000;
        --chat-thread-font-size: 12px;
        padding: 0;
        overflow: hidden;
        color: var(--chat-ink);
        background: transparent;
        isolation: isolate;
    }
    .chat-thread-bg {
        position: absolute;
        inset: 0;
        z-index: -2;
        background: transparent;
        background-image: none;
        transform: none;
        pointer-events: none;
    }
    .chat-thread-view.has-custom-bg .chat-thread-bg {
        background-image: var(--chat-thread-bg-image);
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }
    .chat-thread-view::before {
        content: '';
        position: absolute;
        inset: 0;
        z-index: -1;
        pointer-events: none;
        background: transparent;
    }
    .chat-thread-topbar {
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        z-index: 6;
        height: 0;
        min-height: 0;
        padding: 0;
        display: block;
        overflow: visible;
        pointer-events: none;
        background: transparent;
        box-shadow: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
    .chat-thread-topbar::before,
    .chat-thread-topbar::after {
        content: none;
    }
    .chat-glass-btn {
        border: 0;
        background: #fff;
        color: rgba(31, 36, 42, 0.92);
        box-shadow: 0 10px 24px rgba(76, 72, 64, 0.08);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        appearance: none;
        -webkit-appearance: none;
        outline: none;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        pointer-events: auto;
        transition: transform 0.16s ease, background 0.16s ease, opacity 0.16s ease;
    }
    .chat-glass-btn:active { transform: scale(0.94); background: #F6F4EF; }
    .chat-thread-plus:active { background: #fff; }
    .chat-thread-back {
        position: absolute;
        left: 20px;
        top: max(24px, calc(env(safe-area-inset-top) + 20px));
        width: 44px;
        height: 44px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .chat-thread-back svg {
        width: 25px;
        height: 25px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.85;
        stroke-linecap: round;
        stroke-linejoin: round;
    }
    .chat-thread-identity {
        position: absolute;
        left: 0;
        right: 0;
        top: max(20px, calc(env(safe-area-inset-top) + 16px));
        transform: none;
        width: auto;
        min-width: 0;
        height: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 5px;
        pointer-events: none;
        text-align: center;
        color: var(--chat-ink);
        text-shadow: none;
    }
    .chat-thread-avatar {
        width: 44px;
        height: 44px;
        pointer-events: auto;
        border-radius: 50%;
        border: 0;
        background: rgba(235,242,244,0.86);
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
        box-shadow: 0 9px 20px rgba(76, 72, 64, 0.09);
        display: flex;
        align-items: center;
        justify-content: center;
        color: rgba(74,96,107,0.62);
        font-family: Georgia, "Times New Roman", serif;
        font-size: 14px;
        font-style: italic;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    .chat-thread-avatar:active { opacity: 0.76; }
    .chat-thread-avatar.has-image { color: transparent; }
    .chat-thread-avatar.is-group { border-radius: 18px; }
    .chat-thread-name {
        max-width: min(76vw, 260px);
        min-width: 0;
        box-sizing: content-box;
        padding: 0 0.12em;
        pointer-events: auto;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-family: Georgia, "Times New Roman", "Songti SC", serif;
        font-size: 15px;
        line-height: 1.1;
        font-style: italic;
        font-weight: 700;
        letter-spacing: -0.02em;
    }
    .chat-thread-name.is-typing {
        max-width: min(76vw, 260px);
        font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
        font-size: 12px;
        font-style: normal;
        font-weight: 500;
        letter-spacing: 0.01em;
        color: rgba(52, 57, 65, 0.58);
    }
    .chat-thread-actions {
        position: absolute;
        right: 20px;
        top: max(24px, calc(env(safe-area-inset-top) + 20px));
        justify-self: auto;
        height: 46px;
        min-width: 0;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 10px;
        overflow: visible;
        border-radius: 999px;
        border: 0;
        background: transparent;
        box-shadow: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        pointer-events: auto;
    }
    .chat-thread-actions .chat-glass-btn {
        width: 44px;
        height: 44px;
        border: 0;
        border-radius: 50%;
        background: #fff;
        box-shadow: 0 10px 24px rgba(76, 72, 64, 0.08);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
        text-align: center;
        vertical-align: middle;
    }
    .chat-thread-search svg {
        width: 23px;
        height: 23px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2.1;
        stroke-linecap: round;
        stroke-linejoin: round;
    }
    .chat-thread-more span,
    .chat-thread-more span::before,
    .chat-thread-more span::after {
        display: block;
        width: 4px;
        height: 4px;
        border-radius: 50%;
        background: currentColor;
    }
    .chat-thread-more {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .chat-thread-more span { position: relative; margin: 0; flex: 0 0 auto; }
    .chat-thread-more span::before,
    .chat-thread-more span::after { content: ''; position: absolute; left: 0; }
    .chat-thread-more span::before { top: -7px; }
    .chat-thread-more span::after { top: 7px; }
    .chat-thread-messages {
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
        z-index: 2;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: max(96px, calc(env(safe-area-inset-top) + 88px)) 12px max(96px, calc(env(safe-area-inset-bottom) + 88px)) 15px;
        display: flex;
        flex-direction: column;
        gap: 12px;
        background: transparent;
    }
    .chat-thread-messages::-webkit-scrollbar { display: none; }
    .chat-thread-date,
    .chat-thread-empty {
        align-self: center;
        margin: 4px 0 8px;
        color: rgba(52, 57, 65, 0.42);
        text-shadow: none;
        font-size: 13px;
        line-height: 1;
        letter-spacing: 0.05em;
    }
    .chat-thread-empty { margin-top: 24px; color: rgba(52, 57, 65, 0.36); font-size: 12px; }
    .chat-thread-fold-row {
        width: 100%;
        display: flex;
        justify-content: center;
        margin: 0 0 6px;
        flex: 0 0 auto;
    }
    .chat-thread-fold-toggle { cursor: pointer; }
    button.chat-thread-bubble.is-system-text {
        border: 0;
        appearance: none;
        -webkit-appearance: none;
        font-family: inherit;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    button.chat-thread-bubble.is-system-text:active { opacity: 0.68; }
    .chat-thread-row {
        width: 100%;
        display: flex;
        align-items: flex-end;
        gap: 7px;
        flex: 0 0 auto;
        min-width: 0;
        overflow: visible;
    }
    .chat-thread-row.is-me {
        justify-content: flex-start;
        flex-direction: row-reverse;
        padding-left: 8px;
        padding-right: 0;
        box-sizing: border-box;
    }
    .chat-thread-row.is-ta {
        justify-content: flex-start;
        flex-direction: row;
        padding-left: 0;
        padding-right: 0;
        box-sizing: border-box;
    }
    .chat-thread-message-avatar {
        width: 45px;
        height: 45px;
        flex: 0 0 45px;
        box-sizing: border-box;
        border-radius: 50%;
        overflow: hidden;
        background: #EEF1F3;
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
        color: rgba(52, 57, 65, 0.48);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-family: Georgia, "Times New Roman", "Songti SC", serif;
        font-size: 11px;
        font-style: italic;
        line-height: 1;
        box-shadow: none;
        border: 1px solid rgba(255,255,255,0.70);
    }
    .chat-thread-message-avatar.has-image {
        color: transparent;
    }
    .chat-thread-msg-stack {
        max-width: min(calc(100% - 52px), calc(22em + 24px));
        display: flex;
        flex-direction: column;
        gap: 0;
        overflow: visible;
        min-width: 0;
    }
    .chat-thread-row.is-me .chat-thread-msg-stack { align-items: flex-end; }
    .chat-thread-row.is-ta .chat-thread-msg-stack { align-items: flex-start; }
    .chat-thread-line {
        position: relative;
        max-width: min(100%, calc(22em + 24px));
        display: flex;
        align-items: flex-end;
        gap: 6px;
        min-width: 0;
        overflow: visible;
    }
    .chat-thread-row.is-me .chat-thread-line { justify-content: flex-end; }
    .chat-thread-row.is-ta .chat-thread-line { justify-content: flex-start; }
    .chat-thread-line .chat-thread-bubble {
        min-width: 0;
        max-width: 100%;
    }
    .chat-thread-bubble {
        max-width: 100%;
        min-height: 34px;
        box-sizing: border-box;
        padding: 7px 12px;
        border-radius: 18px;
        border: 0;
        background: var(--chat-bubble-ta);
        color: #000;
        text-shadow: none;
        box-shadow: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        font-size: var(--chat-thread-font-size);
        line-height: 1.34;
        letter-spacing: 0;
        white-space: pre-wrap;
        overflow-wrap: normal;
        word-break: normal;
        flex: 0 1 auto;
        position: relative;
        z-index: 1;
    }
    .chat-thread-bubble.is-text {
        width: fit-content;
        max-width: min(calc(22em + 24px), calc(100vw - 118px));
        display: inline-flex;
        align-items: center;
        justify-content: flex-start;
        text-align: left;
        white-space: pre;
        overflow-wrap: normal;
        word-break: keep-all;
    }
    .chat-thread-row.is-ta .chat-thread-bubble {
        background: var(--chat-bubble-ta);
        color: var(--chat-text-ta);
    }
    .chat-thread-row.is-me .chat-thread-bubble {
        background: var(--chat-bubble-me);
        color: var(--chat-text-me);
    }
    .chat-thread-row.is-ta .chat-thread-bubble::before {
        content: "";
        position: absolute;
        width: 12px;
        height: 15px;
        bottom: -15px;
        left: -7px;
        background: var(--chat-bubble-ta);
        clip-path: path("M 11,16 Q 10,0 1,1 Q 6.6,3 1,19 L 19,16");
        transform: rotate(19deg) scaleY(-1);
        transform-origin: top left;
        z-index: -1;
    }
    .chat-thread-row.is-me .chat-thread-bubble::after {
        content: "";
        position: absolute;
        width: 12px;
        height: 15px;
        bottom: -15px;
        right: 6px;
        background: var(--chat-bubble-me);
        clip-path: path("M 15,13 Q 12,0 2,2 Q 7,3 5,22 L 13,12");
        transform: rotate(-2deg) scale(-1);
        transform-origin: top right;
        z-index: -1;
    }
    .chat-thread-time {
        position: absolute;
        bottom: 1px;
        display: inline-flex;
        align-items: flex-end;
        color: rgba(52, 57, 65, 0.34);
        font-size: 10px;
        line-height: 1;
        text-shadow: none;
        white-space: nowrap;
        pointer-events: none;
        letter-spacing: 0.01em;
        flex: 0 0 auto;
        margin: 0;
        padding: 0;
    }
    .chat-thread-row.is-me .chat-thread-time { left: -33px; }
    .chat-thread-row.is-ta .chat-thread-time { right: -33px; }
    .chat-thread-bubble.is-sticker {
        width: 150px;
        height: 150px;
        padding: 0;
        overflow: hidden;
        border-radius: 14px;
        background: transparent;
        box-shadow: none;
    }
    .chat-thread-row.is-ta .chat-thread-bubble.is-sticker::before,
    .chat-thread-row.is-me .chat-thread-bubble.is-sticker::after { display: none; }
    .chat-thread-sticker-img {
        width: 150px;
        height: 150px;
        display: block;
        border-radius: 14px;
        object-fit: cover;
        background: #fff;
    }

    .chat-thread-bubble.is-photo-card,
    .chat-thread-bubble.is-image-card {
        width: 170px;
        height: 170px;
        min-height: 170px;
        padding: 0;
        overflow: hidden;
        border-radius: 15px;
        background: transparent;
        box-shadow: none;
    }
    .chat-thread-bubble.is-location-card {
        width: 180px;
        height: 140px;
        min-height: 140px;
        padding: 0;
        overflow: hidden;
        border-radius: 16px;
        background: transparent;
        box-shadow: none;
    }
    .chat-thread-row.is-ta .chat-thread-bubble.is-sticker,
    .chat-thread-row.is-me .chat-thread-bubble.is-sticker,
    .chat-thread-row.is-ta .chat-thread-bubble.is-photo-card,
    .chat-thread-row.is-me .chat-thread-bubble.is-photo-card,
    .chat-thread-row.is-ta .chat-thread-bubble.is-image-card,
    .chat-thread-row.is-me .chat-thread-bubble.is-image-card,
    .chat-thread-row.is-ta .chat-thread-bubble.is-location-card,
    .chat-thread-row.is-me .chat-thread-bubble.is-location-card,
    .chat-thread-row.is-ta .chat-thread-bubble.is-redpacket-card,
    .chat-thread-row.is-me .chat-thread-bubble.is-redpacket-card,
    .chat-thread-row.is-ta .chat-thread-bubble.is-transfer-card,
    .chat-thread-row.is-me .chat-thread-bubble.is-transfer-card,
    .chat-thread-row.is-ta .chat-thread-bubble.is-diary-forward-card,
    .chat-thread-row.is-me .chat-thread-bubble.is-diary-forward-card {
        background: transparent;
        color: inherit;
        padding: 0;
        border: 0;
        box-shadow: none;
        text-shadow: none;
    }
    .chat-thread-row.is-ta .chat-thread-bubble.is-photo-card::before,
    .chat-thread-row.is-ta .chat-thread-bubble.is-image-card::before,
    .chat-thread-row.is-ta .chat-thread-bubble.is-location-card::before,
    .chat-thread-row.is-ta .chat-thread-bubble.is-redpacket-card::before,
    .chat-thread-row.is-ta .chat-thread-bubble.is-transfer-card::before,
    .chat-thread-row.is-me .chat-thread-bubble.is-photo-card::after,
    .chat-thread-row.is-me .chat-thread-bubble.is-image-card::after,
    .chat-thread-row.is-me .chat-thread-bubble.is-location-card::after,
    .chat-thread-row.is-me .chat-thread-bubble.is-redpacket-card::after,
    .chat-thread-row.is-me .chat-thread-bubble.is-transfer-card::after,
    .chat-thread-row.is-ta .chat-thread-bubble.is-diary-forward-card::before,
    .chat-thread-row.is-me .chat-thread-bubble.is-diary-forward-card::after { content: none; display: none; }
    .chat-thread-media-card {
        position: relative;
        width: 170px;
        height: 170px;
        padding: 0;
        border: 0;
        border-radius: 15px;
        overflow: hidden;
        display: block;
        background: #F6F7F9;
        color: #000;
        appearance: none;
        -webkit-appearance: none;
        box-shadow: 0 10px 24px rgba(52, 57, 65, 0.09);
        -webkit-tap-highlight-color: transparent;
    }
    .chat-thread-media-card img {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
        border-radius: inherit;
    }
    .chat-thread-photo-front,
    .chat-thread-photo-back {
        position: absolute;
        inset: 0;
        display: block;
        border-radius: inherit;
        transition: opacity 0.22s ease;
    }
    .chat-thread-photo-front { opacity: 1; }
    .chat-thread-photo-back {
        opacity: 0;
        box-sizing: border-box;
        padding: 13px 12px;
        overflow-y: auto;
        overflow-x: hidden;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        background: #ffffff;
        color: #000;
        font-size: 12px;
        line-height: 1.48;
        letter-spacing: 0.03em;
        text-align: left;
        white-space: pre-wrap;
        overflow-wrap: anywhere;
        word-break: break-word;
    }
    .chat-thread-photo-back::-webkit-scrollbar { display: none; }
    .chat-thread-photo-card.is-flipped .chat-thread-photo-front { opacity: 0; }
    .chat-thread-photo-card.is-flipped .chat-thread-photo-back { opacity: 1; }
    .chat-thread-location-card {
        position: relative;
        width: 180px;
        height: 140px;
        box-sizing: border-box;
        border-radius: 18px;
        overflow: hidden;
        background: #fffaf3;
        color: #000;
        box-shadow: 0 13px 28px rgba(52, 57, 65, 0.105);
        border: 1px solid rgba(52,57,65,0.06);
        isolation: isolate;
    }
    .chat-thread-location-card::before {
        content: "";
        position: absolute;
        inset: 0;
        background:
            radial-gradient(circle at 16% 10%, rgba(255, 222, 225, 0.38), transparent 30px),
            radial-gradient(circle at 90% 4%, rgba(213, 229, 255, 0.44), transparent 34px);
        z-index: 0;
        pointer-events: none;
    }
    .chat-thread-location-card::after {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        border-radius: inherit;
        box-shadow: inset 0 0 0 1px rgba(255,255,255,0.70);
        z-index: 6;
    }
    .chat-thread-location-copy {
        position: relative;
        z-index: 5;
        height: 46px;
        box-sizing: border-box;
        padding: 9px 13px 5px;
        text-align: left;
        background: #ffffff;
        border-bottom: 1px solid rgba(52,57,65,0.045);
        backdrop-filter: none;
    }
    .chat-thread-location-name {
        color: #000;
        font-size: 12px;
        line-height: 1.16;
        font-weight: 650;
        letter-spacing: 0.01em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .chat-thread-location-detail {
        margin-top: 4px;
        color: rgba(52,57,65,0.48);
        font-size: 9.5px;
        line-height: 1.1;
        letter-spacing: 0.04em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .chat-thread-location-map {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 94px;
        overflow: hidden;
        background:
            linear-gradient(130deg, rgba(232,244,232,0.92) 0%, rgba(248,239,224,0.95) 45%, rgba(233,239,250,0.94) 100%);
    }
    .chat-thread-location-map::before {
        content: "";
        position: absolute;
        inset: 0;
        background-image:
            linear-gradient(rgba(255,255,255,0.52) 1px, transparent 1px),
            linear-gradient(90deg, rgba(255,255,255,0.48) 1px, transparent 1px);
        background-size: 16px 16px;
        opacity: 0.74;
        z-index: 0;
    }
    .chat-thread-location-map::after {
        content: "";
        position: absolute;
        inset: 0;
        background:
            radial-gradient(circle at 54% 43%, rgba(255,255,255,0.62), transparent 32px),
            linear-gradient(180deg, rgba(255,255,255,0.03), rgba(52,57,65,0.025));
        pointer-events: none;
        z-index: 5;
    }
    .chat-thread-map-block {
        position: absolute;
        display: block;
        border-radius: 10px;
        border: 1px solid rgba(255,255,255,0.72);
        box-shadow: 0 7px 16px rgba(52,57,65,0.045);
        z-index: 1;
    }
    .chat-thread-map-block.b1 { width: 48px; height: 25px; left: 8px; top: 8px; transform: rotate(-8deg); background: rgba(255, 219, 224, 0.74); }
    .chat-thread-map-block.b2 { width: 41px; height: 31px; right: 11px; top: 12px; transform: rotate(7deg); background: rgba(213, 227, 255, 0.78); }
    .chat-thread-map-block.b3 { width: 54px; height: 25px; left: 62px; bottom: 9px; transform: rotate(12deg); background: rgba(224, 240, 214, 0.78); }
    .chat-thread-map-block.b4 { width: 32px; height: 21px; left: 20px; bottom: 19px; transform: rotate(20deg); background: rgba(255, 239, 190, 0.76); }
    .chat-thread-map-block.b5 { width: 35px; height: 21px; right: 35px; bottom: 13px; transform: rotate(-13deg); background: rgba(232, 220, 246, 0.74); }
    .chat-thread-map-water {
        position: absolute;
        left: -16px;
        top: 56px;
        width: 216px;
        height: 19px;
        border-radius: 999px;
        background: linear-gradient(90deg, rgba(200, 225, 238, 0.48), rgba(213, 236, 231, 0.46));
        transform: rotate(-9deg);
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.42);
        z-index: 1;
    }
    .chat-thread-map-road {
        position: absolute;
        display: block;
        border-radius: 999px;
        background: rgba(255,252,246,0.96);
        box-shadow: 0 0 0 1px rgba(52,57,65,0.025), 0 4px 9px rgba(52,57,65,0.025);
        transform-origin: center;
        z-index: 2;
    }
    .chat-thread-map-road.r1 { width: 174px; height: 8px; left: -24px; top: 25px; transform: rotate(-17deg); }
    .chat-thread-map-road.r2 { width: 162px; height: 8px; right: -32px; bottom: 20px; transform: rotate(17deg); }
    .chat-thread-map-road.r3 { width: 100px; height: 7px; left: 62px; top: 47px; transform: rotate(69deg); opacity: 0.98; }
    .chat-thread-map-road.r4 { width: 88px; height: 6px; left: -1px; bottom: 15px; transform: rotate(-44deg); opacity: 0.90; }
    .chat-thread-map-road.r5 { width: 114px; height: 6px; left: 31px; top: 42px; transform: rotate(10deg); opacity: 0.74; }
    .chat-thread-map-route {
        position: absolute;
        left: 30px;
        top: 44px;
        width: 122px;
        height: 4px;
        border-radius: 999px;
        background: repeating-linear-gradient(90deg, rgba(252, 143, 134, 0.78) 0 8px, transparent 8px 13px);
        transform: rotate(8deg);
        z-index: 3;
        opacity: 0.88;
        box-shadow: 0 0 0 2px rgba(255,255,255,0.28);
    }
    .chat-thread-map-dot {
        position: absolute;
        width: 5px;
        height: 5px;
        border-radius: 50%;
        background: rgba(52,57,65,0.23);
        box-shadow: 0 0 0 4px rgba(255,255,255,0.54);
        z-index: 4;
    }
    .chat-thread-map-dot.p1 { left: 24px; top: 22px; }
    .chat-thread-map-dot.p2 { right: 27px; top: 50px; }
    .chat-thread-map-dot.p3 { left: 65px; bottom: 17px; }
    .chat-thread-map-dot.p4 { right: 53px; top: 19px; opacity: 0.72; }
    .chat-thread-map-label {
        position: absolute;
        left: 11px;
        bottom: 8px;
        z-index: 4;
        padding: 2px 6px;
        border-radius: 999px;
        background: rgba(255,255,255,0.76);
        color: rgba(52,57,65,0.38);
        font-size: 7px;
        line-height: 1.2;
        letter-spacing: 0.16em;
        box-shadow: 0 3px 8px rgba(52,57,65,0.035);
    }
    .chat-thread-location-pin {
        position: absolute;
        left: 50%;
        top: 50%;
        width: 18px;
        height: 18px;
        border-radius: 50% 50% 50% 0;
        background: #000;
        transform: translate(-50%, -45%) rotate(-45deg);
        box-shadow: 0 7px 16px rgba(52,57,65,0.25), 0 0 0 5px rgba(255,255,255,0.40), 0 0 0 9px rgba(255, 219, 224, 0.30);
        z-index: 5;
    }
    .chat-thread-location-pin::before {
        content: "";
        position: absolute;
        width: 7px;
        height: 7px;
        border-radius: 50%;
        left: 5.5px;
        top: 5.5px;
        background: #fffaf3;
    }
    .chat-image-preview-overlay {
        position: fixed;
        inset: 0;
        z-index: 10050;
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
        background: rgba(17, 18, 20, 0.72);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    .chat-image-preview-overlay.show {
        opacity: 1;
        pointer-events: auto;
    }
    .chat-image-preview-overlay img {
        display: block;
        max-width: min(92vw, 430px);
        max-height: min(86vh, 760px);
        width: auto;
        height: auto;
        object-fit: contain;
        border-radius: 18px;
        background: #fff;
        box-shadow: 0 26px 70px rgba(0,0,0,0.34);
        transform: translateY(12px) scale(0.985);
        opacity: 0;
        transition: transform 0.22s ease, opacity 0.22s ease;
    }
    .chat-image-preview-overlay.show img {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    .chat-thread-sticker-panel {
        position: absolute;
        left: 20px;
        right: 20px;
        bottom: max(86px, calc(env(safe-area-inset-bottom) + 76px));
        z-index: 9;
        box-sizing: border-box;
        padding: 12px;
        border-radius: 24px;
        border: 1px solid rgba(52, 57, 65, 0.08);
        background: rgba(248, 249, 251, 0.98);
        box-shadow: 0 6px 15px rgba(40, 44, 52, 0.035), 0 1px 0 rgba(255,255,255,0.86) inset;
        max-height: 292px;
        overflow: hidden;
        opacity: 0;
        transform: translateY(12px) scale(0.985);
        transform-origin: right bottom;
        pointer-events: none;
        transition: opacity 0.18s ease, transform 0.18s ease;
    }
    .chat-thread-sticker-panel.show {
        opacity: 1;
        transform: translateY(0) scale(1);
        pointer-events: auto;
    }
    .chat-thread-sticker-tabs {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        scrollbar-width: none;
        padding-bottom: 10px;
    }
    .chat-thread-sticker-tabs::-webkit-scrollbar { display: none; }
    .chat-thread-sticker-tab {
        flex: 0 0 auto;
        height: 28px;
        padding: 0 12px;
        border-radius: 999px;
        border: 1px solid rgba(52,57,65,0.08);
        background: #fff;
        color: rgba(52,57,65,0.66);
        font-size: 11px;
        line-height: 1;
        appearance: none;
        -webkit-appearance: none;
    }
    .chat-thread-sticker-tab.active {
        background: #000;
        border-color: #000;
        color: #fff;
    }
    .chat-thread-sticker-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 10px;
        max-height: 214px;
        overflow-y: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .chat-thread-sticker-grid::-webkit-scrollbar { display: none; }
    .chat-thread-sticker-item {
        width: 100%;
        min-height: 84px;
        border: 0;
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 3px 8px rgba(76, 72, 64, 0.028);
        overflow: hidden;
        padding: 6px 5px 7px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 5px;
        appearance: none;
        -webkit-appearance: none;
    }
    .chat-thread-sticker-item img {
        width: 52px;
        height: 52px;
        flex: 0 0 52px;
        display: block;
        object-fit: cover;
        border-radius: 11px;
        background: #f7f6f1;
    }
    .chat-thread-sticker-desc {
        width: 100%;
        min-height: 14px;
        color: rgba(52,57,65,0.58);
        font-size: 10px;
        line-height: 1.25;
        text-align: center;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        pointer-events: none;
    }
    .chat-thread-sticker-empty {
        display: none;
        padding: 26px 10px 28px;
        text-align: center;
        color: rgba(52,57,65,0.42);
        font-size: 12px;
        line-height: 1.6;
    }
    .chat-thread-sticker-empty.show { display: block; }
    .chat-thread-view.sticker-panel-open .chat-thread-messages {
        padding-bottom: max(328px, calc(env(safe-area-inset-bottom) + 318px));
    }
    .chat-thread-attach-panel {
        position: absolute;
        left: 20px;
        right: 20px;
        bottom: max(86px, calc(env(safe-area-inset-bottom) + 76px));
        z-index: 8;
        box-sizing: border-box;
        padding: 14px 14px 12px;
        border-radius: 28px;
        border: 1px solid rgba(52, 57, 65, 0.08);
        background: rgba(248, 249, 251, 0.98);
        box-shadow: 0 6px 15px rgba(40, 44, 52, 0.035), 0 1px 0 rgba(255,255,255,0.86) inset;
        height: 172px;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        scrollbar-width: none;
        opacity: 0;
        transform: translateY(12px) scale(0.985);
        transform-origin: left bottom;
        pointer-events: none;
        transition: opacity 0.18s ease, transform 0.18s ease;
    }
    .chat-thread-attach-panel::-webkit-scrollbar { display: none; }
    .chat-thread-attach-panel.show {
        opacity: 1;
        transform: translateY(0) scale(1);
        pointer-events: auto;
    }
    .chat-thread-attach-panel::before { content: none; display: none; }
    .chat-thread-attach-grid {
        position: relative;
        z-index: 1;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 14px 10px;
        align-content: start;
    }
    .chat-thread-tool {
        min-width: 0;
        border: 0;
        background: transparent;
        color: #000;
        padding: 0;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 7px;
        cursor: pointer;
        appearance: none;
        -webkit-appearance: none;
        outline: none;
        -webkit-tap-highlight-color: transparent;
    }
    .chat-thread-tool-icon {
        width: 48px;
        height: 48px;
        aspect-ratio: 1 / 1;
        flex: 0 0 48px;
        box-sizing: border-box;
        border-radius: 16px;
        background: #fff;
        border: 1px solid rgba(52, 57, 65, 0.08);
        box-shadow: 0 3px 8px rgba(76, 72, 64, 0.032), 0 1px 0 rgba(255,255,255,0.86) inset;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        transition: transform 0.16s ease, background 0.16s ease, opacity 0.16s ease;
    }
    .chat-thread-tool-icon svg {
        width: 22px;
        height: 22px;
        min-width: 22px;
        min-height: 22px;
        max-width: 22px;
        max-height: 22px;
        display: none;
        flex: 0 0 22px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.75;
        stroke-linecap: round;
        stroke-linejoin: round;
        overflow: visible;
        transform: none;
        transform-origin: center;
        shape-rendering: geometricPrecision;
        stroke-miterlimit: 10;
    }
    .chat-thread-tool-icon svg * {
        vector-effect: non-scaling-stroke;
    }

    .chat-thread-tool-icon i {
        width: 22px;
        height: 22px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        line-height: 1;
        color: #000;
        font-style: normal;
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        text-rendering: auto;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        transform: none;
    }
    .chat-thread-tool-label {
        display: block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: rgba(52, 57, 65, 0.64);
        font-size: 11px;
        line-height: 1;
        letter-spacing: 0.02em;
    }
    .chat-thread-tool:active .chat-thread-tool-icon {
        transform: translateY(1px) scale(0.96);
        background: #EEF0F3;
    }

    .chat-thread-plus.is-open {
        background: #fff;
        color: rgba(31, 36, 42, 0.92);
        transform: rotate(45deg);
    }
    .chat-thread-view.attach-open .chat-thread-messages {
        padding-bottom: max(218px, calc(env(safe-area-inset-bottom) + 208px));
    }
    .chat-thread-composer {
        position: absolute;
        left: 0;
        right: 0;
        bottom: max(8px, env(safe-area-inset-bottom));
        z-index: 7;
        min-height: 64px;
        padding: 8px 20px 8px;
        display: grid;
        grid-template-columns: 48px minmax(0, 1fr) 96px;
        align-items: end;
        gap: 10px;
        pointer-events: none;
        background: transparent;
        box-shadow: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
    .chat-thread-plus {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 28px;
        line-height: 1;
        font-weight: 300;
        color: rgba(31, 36, 42, 0.90);
    }
    .chat-thread-input {
        width: 100%;
        min-height: 44px;
        max-height: 92px;
        box-sizing: border-box;
        resize: none;
        overflow-y: hidden;
        border-radius: 999px;
        border: 0;
        background: #FFFFFF;
        color: rgba(31, 36, 42, 0.86);
        box-shadow: 0 9px 20px rgba(76, 72, 64, 0.055), inset 0 1px 0 rgba(255,255,255,0.95);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        padding: 11px 18px;
        outline: none;
        font-size: 15px;
        line-height: 1.42;
        pointer-events: auto;
        scrollbar-width: none;
    }
    .chat-thread-input::placeholder { color: rgba(52,57,65,0.42); }
    .chat-thread-input::-webkit-scrollbar { display: none; }
    .chat-thread-input.is-multiline { border-radius: 22px; }
    .chat-thread-sendbar {
        height: 44px;
        border-radius: 999px;
        border: 0;
        background: #000;
        display: grid;
        grid-template-columns: 48px 48px;
        align-items: center;
        overflow: hidden;
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        pointer-events: auto;
    }
    .chat-thread-emoji,
    .chat-thread-send {
        width: 48px;
        height: 44px;
        border: 0;
        background: transparent;
        color: #fff;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        appearance: none;
        -webkit-appearance: none;
    }
    .chat-thread-emoji svg {
        width: 27px;
        height: 27px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.75;
        stroke-linecap: round;
        stroke-linejoin: round;
    }
    .modal-round-action {
        width: 52px;
        min-width: 52px;
        height: 52px;
        grid-template-columns: 44px;
        border-radius: 50%;
        display: grid;
        place-items: center;
        padding: 4px;
        background: #FFFFFF;
        box-shadow: 0 10px 22px rgba(52,57,65,0.12), inset 0 1px 0 rgba(255,255,255,0.96);
    }
    .modal-round-action-icon {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        background: #111111;
        color: #FFFFFF;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .modal-media-form {
        gap: 12px;
    }
    .modal-media-field {
        position: relative;
        display: block;
        width: 100%;
    }
    .modal-media-field > span {
        display: block;
        margin: 0 0 8px;
        color: #8a909b;
        font-size: 10px;
        letter-spacing: 0.8px;
        text-transform: uppercase;
    }
    .modal-media-textarea {
        min-height: 132px;
        max-height: 30vh;
        resize: none;
        padding-bottom: 64px;
    }
    .modal-media-center-action {
        position: absolute;
        left: 50%;
        bottom: 12px;
        transform: translateX(-50%);
    }
    .modal-capture-action {
        margin: 0 auto;
    }
    .modal-capture-step audio {
        width: 100%;
        display: none;
    }
    .modal-camera-preview {
        width: 100%;
        height: min(42vh, 300px);
        border-radius: 18px;
        overflow: hidden;
        background: #111;
        position: relative;
        box-shadow: 0 14px 34px rgba(52,57,65,0.13);
    }
    .modal-camera-preview video,
    .modal-camera-preview img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    .modal-camera-preview img {
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.18s ease;
    }
    .modal-camera-preview img.show { opacity: 1; }
    .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; }
    .chat-thread-send.footer-btn-side {
        width: 36px;
        height: 36px;
        margin: auto;
        border-radius: 50%;
        background: #fff;
        color: #000;
        font-size: 17px;
        box-shadow: none;
    }
    .chat-thread-send .fas {
        font-size: 17px;
        line-height: 1;
        transform: none;
    }
    .chat-thread-emoji:active { background: rgba(255,255,255,0.14); }
    .chat-thread-send:active { background: #ECECEC; }
    @media (max-width: 360px) {
        .chat-thread-back { left: 18px; top: max(22px, calc(env(safe-area-inset-top) + 18px)); width: 44px; height: 44px; }
        .chat-thread-actions { right: 18px; top: max(22px, calc(env(safe-area-inset-top) + 18px)); height: 44px; gap: 7px; }
        .chat-thread-actions .chat-glass-btn { width: 44px; height: 44px; }
        .chat-thread-identity { top: max(18px, calc(env(safe-area-inset-top) + 14px)); width: auto; height: auto; gap: 5px; }
        .chat-thread-avatar { width: 44px; height: 44px; }
        .chat-thread-name { max-width: min(76vw, 240px); font-size: 14px; }
        .chat-thread-messages { top: 0; padding: max(92px, calc(env(safe-area-inset-top) + 84px)) 12px max(92px, calc(env(safe-area-inset-bottom) + 84px)) 15px; }
        .chat-thread-composer { grid-template-columns: 44px minmax(0, 1fr) 90px; gap: 10px; padding-left: 18px; padding-right: 18px; }
        .chat-thread-attach-panel { left: 18px; right: 18px; bottom: max(82px, calc(env(safe-area-inset-bottom) + 72px)); padding: 12px 12px; border-radius: 24px; height: 168px; }
        .chat-thread-attach-grid { gap: 12px 8px; }
        .chat-thread-tool-icon { width: 46px; height: 46px; flex-basis: 46px; border-radius: 16px; }
        .chat-thread-tool-icon svg { width: 22px; height: 22px; min-width: 22px; min-height: 22px; max-width: 22px; max-height: 22px; flex-basis: 22px; }
        .chat-thread-tool-icon i { width: 22px; height: 22px; font-size: 19px; font-family: "Font Awesome 6 Free"; font-weight: 900; }
        .chat-thread-tool-label { font-size: 10px; }
        .chat-thread-plus { width: 44px; height: 44px; }
        .chat-thread-sendbar { grid-template-columns: 45px 45px; }
        .chat-thread-emoji { width: 45px; }
        .chat-thread-send { width: 34px; height: 34px; }
    }

    .chat-dyn-hero {
        position: relative;
        min-height: 312px;
        padding: max(32px, calc(env(safe-area-inset-top) + 18px)) 24px 0;
        overflow: hidden;
        background: transparent;
    }
    .chat-dyn-hero::before {
        content: '';
        position: absolute;
        inset: 0;
        z-index: 1;
        opacity: 0.36;
        pointer-events: none;
        background-image:
            linear-gradient(120deg, transparent 0 44%, rgba(255,255,255,0.46) 44% 46%, transparent 46% 100%),
            linear-gradient(rgba(255,255,255,0.24) 1px, transparent 1px);
        background-size: 160px 160px, 38px 38px;
    }
    .chat-dyn-hero-bg {
        position: absolute;
        inset: 0;
        z-index: 0;
        background-image:
            linear-gradient(180deg, rgba(252,251,247,0) 0%, rgba(252,251,247,0.18) 58%, #FCFBF7 100%),
            radial-gradient(circle at 22% 28%, rgba(255,255,255,0.72) 0%, transparent 34%),
            radial-gradient(circle at 78% 22%, rgba(216,185,190,0.52) 0%, transparent 32%),
            linear-gradient(132deg, #DDE5EA 0%, #F1E7DF 54%, #F8F2EA 100%);
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    .chat-dyn-hero-bg.has-image {
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
    }
    .chat-dyn-hero-bg:active { opacity: 0.9; }
    .chat-dyn-profile {
        position: absolute;
        left: 24px;
        right: 24px;
        bottom: 18px;
        text-align: center;
        z-index: 2;
        color: #343941;
    }
    .chat-dyn-avatar {
        width: 96px;
        height: 96px;
        margin: 0 auto 14px;
        border-radius: 50%;
        background: #EFF1F2;
        border: 2px solid rgba(252,251,247,0.9);
        box-shadow: 0 16px 28px rgba(85,92,99,0.10), inset 0 0 0 1px rgba(255,255,255,0.66);
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
    }
    .chat-dyn-name {
        font-size: 17px;
        font-weight: 600;
        margin-bottom: 7px;
        letter-spacing: 0.02em;
    }
    .chat-dyn-signature {
        display: inline-block;
        border: 0;
        background: transparent;
        padding: 0;
        font-family: inherit;
        color: #7F8791;
        font-size: 12px;
        letter-spacing: 0.04em;
        cursor: pointer;
    }
    .chat-dyn-tabs {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: end;
        margin: 18px 24px 0;
        border-bottom: 1px solid rgba(150,158,168,0.20);
    }
    .chat-dyn-tab {
        position: relative;
        height: 48px;
        border: 0;
        background: transparent;
        color: #8C95A3;
        font-size: 13px;
        letter-spacing: 0.08em;
        cursor: pointer;
    }
    .chat-dyn-tab.active { color: #333940; }
    .chat-dyn-tab.active::after {
        content: '';
        position: absolute;
        left: 50%;
        bottom: -1px;
        width: 48px;
        height: 2px;
        transform: translateX(-50%);
        border-radius: 999px;
        background: #343941;
    }
    .chat-dyn-empty-wrap { position: relative; min-height: 280px; }

    .chat-me-view {
        padding-top: max(60px, calc(env(safe-area-inset-top) + 44px));
    }
    .chat-me-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        margin-bottom: 22px;
    }
    .chat-me-identity {
        min-width: 0;
        flex: 1 1 auto;
        display: flex;
        align-items: center;
        gap: 16px;
    }
    .chat-me-copy {
        min-width: 0;
        min-height: 84px;
        padding-top: 0;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
    }
    .chat-me-name {
        max-width: 168px;
        box-sizing: content-box;
        padding-right: 0.12em;
        margin-right: -0.06em;
        font-family: var(--one-global-font-family, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif);
        font-size: clamp(21px, 5.9vw, 25px);
        line-height: 1.04;
        font-style: normal;
        font-weight: 400;
        letter-spacing: -0.028em;
        color: #23272E;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .chat-me-signature {
        margin: 7px 0 0;
        max-width: 192px;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: #646B76;
        font-size: 12.5px;
        line-height: 1.32;
        font-weight: 400;
        letter-spacing: 0.018em;
        text-align: left;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
        appearance: none;
        -webkit-appearance: none;
    }
    .chat-me-follow-row {
        margin-top: 10px;
        display: flex;
        align-items: center;
        gap: 7px;
        min-width: 0;
        opacity: 1;
    }
    .chat-me-follow-avatars {
        display: inline-flex;
        align-items: center;
        padding-left: 0;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    .chat-me-follow-avatars i {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #6F7884;
        font-size: 7.2px;
        font-weight: 600;
        letter-spacing: -0.02em;
        width: 25px;
        height: 25px;
        margin-left: -8px;
        border-radius: 50%;
        background: #ECEFF2;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        border: 0;
        box-shadow: none;
        overflow: hidden;
        opacity: 1;
        filter: none;
        mix-blend-mode: normal;
    }
    .chat-me-follow-avatars i:first-child { margin-left: 0; }
    .chat-me-follow-avatars i:nth-child(2) { background-color: #F4F0EA; }
    .chat-me-follow-avatars i:nth-child(3) { background-color: #EEF1EA; font-size: 6.8px; }
    .chat-me-follow-avatars i.has-image {
        background-color: transparent;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        color: transparent;
        opacity: 1;
        filter: none;
        mix-blend-mode: normal;
    }
    .chat-me-follow-copy {
        min-width: 0;
        color: #777F89;
        font-size: 10px;
        line-height: 1;
        letter-spacing: 0.018em;
        white-space: nowrap;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    .chat-me-follow-avatars:active,
    .chat-me-follow-copy:active { opacity: 0.68; }

    .chat-me-avatar-frame {
        position: relative;
        flex: 0 0 84px;
        width: 84px;
        height: 84px;
        aspect-ratio: 1 / 1;
        border-radius: 50%;
        background: #F5F4F0;
        border: 1px solid rgba(255,255,255,0.82);
        box-shadow: 0 10px 22px rgba(90,98,108,0.08), inset 0 0 0 1px rgba(74,78,89,0.04);
        padding: 0;
        transform: none;
    }
    .chat-me-avatar-frame::before,
    .chat-me-avatar-frame::after {
        content: '';
        position: absolute;
        inset: -2px;
        box-sizing: border-box;
        border-radius: 50%;
        pointer-events: none;
        z-index: 1;
    }
    .chat-me-avatar-frame::before {
        border: 1px solid rgba(74,78,89,0.24);
    }
    .chat-me-avatar-frame::after {
        inset: 5px;
        border: 1px solid rgba(255,255,255,0.72);
    }
    .chat-me-avatar {
        position: relative;
        z-index: 2;
        width: 100%;
        height: 100%;
        border-radius: 50%;
        background: #EDEFF1;
        border: 0;
        box-shadow: none;
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
        transform: none;
        overflow: hidden;
    }
    .chat-me-avatar.has-image {
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }
    .chat-me-status-pill {
        flex: 0 0 auto;
        min-width: 78px;
        height: 32px;
        margin-top: 0;
        padding: 0 7px 0 12px;
        border: 0;
        border-radius: 999px;
        display: inline-flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        background: #171717;
        color: #FCFBF7;
        box-shadow: none;
        font-family: var(--one-global-font-family, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif);
        font-size: 12px;
        line-height: 1;
        font-weight: 600;
        letter-spacing: 0.04em;
        cursor: pointer;
        pointer-events: auto;
        -webkit-tap-highlight-color: transparent;
    }
    .chat-me-status-plus {
        position: relative;
        width: 20px;
        height: 20px;
        border-radius: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        box-shadow: none;
        flex: 0 0 20px;
    }
    .chat-me-status-plus::before,
    .chat-me-status-plus::after {
        content: '';
        position: absolute;
        left: 50%;
        top: 50%;
        width: 12px;
        height: 1.5px;
        border-radius: 999px;
        background: currentColor;
        transform: translate(-50%, -50%);
    }
    .chat-me-status-plus::after { transform: translate(-50%, -50%) rotate(90deg); }
    .chat-me-status-pill:active { transform: translateY(1px); opacity: 0.82; }

    .chat-me-poem {
        position: relative;
        margin: 10px 0 24px;
        padding: 26px 16px 16px;
        border-radius: 24px;
        background: rgba(255,255,255,0.64);
        border: 1px solid rgba(255,255,255,0.78);
        box-shadow: 0 14px 32px rgba(88,94,104,0.055);
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    .chat-me-poem::before {
        content: 'ONE';
        position: absolute;
        top: -10px;
        right: 4px;
        padding: 5px 7px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.18);
        border: 1px solid rgba(52, 57, 65, 0.035);
        color: rgba(52, 57, 65, 0.22);
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        opacity: 0.66;
        font-size: 8.5px;
        line-height: 1;
        font-weight: 650;
        letter-spacing: 0.12em;
        text-transform: uppercase;
    }
    .chat-me-poem-original {
        margin: 0;
        padding: 0;
        border-radius: 0;
        background: transparent;
        border: 0;
        white-space: pre-line;
        color: #333940;
        font-family: Georgia, "Times New Roman", "Songti SC", serif;
        font-size: clamp(14px, 3.85vw, 16px);
        line-height: 1.58;
        font-style: normal;
        font-weight: 400;
        letter-spacing: -0.018em;
    }
    .chat-me-translate-meta {
        align-self: flex-start;
        margin-top: 0;
        padding: 7px 11px;
        border-radius: 999px;
        background: rgba(255,255,255,0.76);
        border: 1px solid rgba(255,255,255,0.84);
        display: flex;
        align-items: center;
        gap: 8px;
        color: #848D99;
        font-size: 9.5px;
        line-height: 1.1;
        letter-spacing: 0.045em;
    }
    .chat-me-verify {
        position: relative;
        width: 13px;
        height: 13px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: #343941;
        box-shadow: inset 0 0 0 1px rgba(255,255,255,0.20);
    }
    .chat-me-verify::before {
        content: '';
        width: 5px;
        height: 3px;
        border-left: 1.3px solid #FCFBF7;
        border-bottom: 1.3px solid #FCFBF7;
        transform: rotate(-45deg) translate(0, -1px);
    }
    .chat-me-poem-translation {
        margin: 0;
        padding: 0;
        border-radius: 0;
        background: transparent;
        border: 0;
        white-space: pre-line;
        color: #68717D;
        font-size: 12px;
        line-height: 1.76;
        letter-spacing: 0.025em;
    }
    .chat-me-edit-copy {
        cursor: text;
        -webkit-tap-highlight-color: transparent;
        transition: opacity 0.18s ease;
    }
    .chat-me-edit-copy:active {
        opacity: 0.68;
    }

    .chat-preset-card {
        position: relative;
        min-height: 224px;
        border-radius: 30px;
        padding: 22px 20px 20px;
        margin: 0 0 28px;
        overflow: hidden;
        background:
            linear-gradient(135deg, rgba(255,255,255,0.72), rgba(246,244,239,0.62)),
            #FCFBF7;
        border: 1px solid rgba(255,255,255,0.68);
        box-shadow:
            0 12px 30px rgba(96,103,112,0.075),
            inset 0 1px 0 rgba(255,255,255,0.92);
    }
    .chat-preset-card::before {
        content: '';
        position: absolute;
        left: 20px;
        right: 20px;
        top: 18px;
        height: 1px;
        background: linear-gradient(90deg, rgba(74,78,89,0.24), rgba(181,199,211,0.22), transparent);
        pointer-events: none;
    }
    .chat-preset-card::after {
        content: 'PRESET';
        position: absolute;
        right: 18px;
        bottom: 18px;
        font-family: "Courier New", Courier, monospace;
        font-size: 10px;
        line-height: 1;
        letter-spacing: 0.22em;
        color: rgba(74,78,89,0.22);
        pointer-events: none;
    }
    .chat-preset-motion {
        position: absolute;
        right: -78px;
        top: 28px;
        width: 230px;
        height: 152px;
        opacity: 0.18;
        pointer-events: none;
        overflow: visible;
    }
    .chat-preset-motion g { transform-box: fill-box; transform-origin: center; }
    .chat-preset-edit-btn {
        position: absolute;
        top: 16px;
        right: 16px;
        z-index: 4;
        width: 34px;
        height: 34px;
        border-radius: 50%;
        border: 1px solid rgba(74,78,89,0.13);
        background: #FFFFFF;
        color: #4A4E59;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 8px 18px rgba(70,73,79,0.07), inset 0 1px 0 rgba(255,255,255,0.94);
        -webkit-tap-highlight-color: transparent;
    }
    .chat-preset-edit-btn svg {
        width: 15px;
        height: 15px;
        stroke: currentColor;
        stroke-width: 1.35;
        fill: none;
        stroke-linecap: round;
        stroke-linejoin: round;
    }
    .chat-preset-edit-btn:active { opacity: 0.62; transform: none; }
    .chat-preset-kicker {
        position: relative;
        z-index: 2;
        max-width: calc(100% - 58px);
        font-family: "Courier New", Courier, monospace;
        font-size: 9px;
        line-height: 1;
        letter-spacing: 0.22em;
        text-transform: uppercase;
        color: #8C95A3;
        margin: 20px 0 12px;
    }
    .chat-preset-title {
        position: relative;
        z-index: 2;
        max-width: min(238px, calc(100% - 36px));
        font-family: Georgia, "Times New Roman", "Songti SC", serif;
        font-size: clamp(24px, 7vw, 30px);
        line-height: 1.12;
        font-style: italic;
        font-weight: 400;
        letter-spacing: -0.045em;
        color: #343941;
    }
    .chat-preset-details {
        position: relative;
        z-index: 2;
        width: 100%;
        margin-top: 24px;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
        border: 0;
    }
    .chat-preset-row {
        min-height: 58px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 7px;
        padding: 0 10px;
        border: 1px solid rgba(150,158,168,0.13);
        border-radius: 18px;
        background: rgba(255,255,255,0.46);
        font-size: 11px;
        letter-spacing: 0.08em;
    }
    .chat-preset-row:last-child { border-bottom: 1px solid rgba(150,158,168,0.13); }
    .chat-preset-row span {
        color: #A0A7B0;
        font-family: "Courier New", Courier, monospace;
        font-size: 9px;
        line-height: 1;
        letter-spacing: 0.12em;
    }
    .chat-preset-row strong {
        color: #4A4E59;
        font-size: 11px;
        line-height: 1.12;
        font-weight: 500;
        white-space: normal;
    }
    .chat-preset-foot {
        position: relative;
        z-index: 2;
        margin-top: 18px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        color: #8C95A3;
        font-family: "Courier New", Courier, monospace;
        font-size: 10px;
        letter-spacing: 0.12em;
    }
    .chat-preset-line {
        flex: 1;
        height: 1px;
        background: linear-gradient(90deg, rgba(74,78,89,0.24), rgba(181,199,211,0.28), transparent);
    }

    .chat-me-tools {
        display: flex;
        flex-direction: column;
        gap: 0;
        margin-top: 4px;
        border-top: 1px solid rgba(150,158,168,0.16);
    }
    .chat-me-tool {
        position: relative;
        min-height: 62px;
        width: 100%;
        border: 0;
        border-bottom: 1px solid rgba(150,158,168,0.16);
        border-radius: 0;
        background: transparent;
        color: #68717D;
        display: grid;
        grid-template-columns: 34px minmax(0, 1fr) 18px;
        align-items: center;
        gap: 12px;
        padding: 13px 0 14px 10px;
        cursor: pointer;
        text-align: left;
        overflow: hidden;
        -webkit-tap-highlight-color: transparent;
    }
    .chat-me-tool::before {
        content: none;
        display: none;
    }
    .chat-me-tool::after {
        content: '';
        position: absolute;
        inset: 7px 0;
        background: linear-gradient(90deg, rgba(150,150,150,0.025), transparent 62%);
        opacity: 0;
        transform: translateX(-6px);
        transition: opacity 0.24s ease, transform 0.24s ease;
        pointer-events: none;
    }
    .chat-me-tool:hover::before,
    .chat-me-tool:focus-visible::before,
    .chat-me-tool:active::before { content: none; }
    .chat-me-tool:hover::after,
    .chat-me-tool:focus-visible::after,
    .chat-me-tool:active::after {
        opacity: 1;
        transform: translateX(0);
    }
    .chat-me-tool:hover .chat-me-tool-copy,
    .chat-me-tool:focus-visible .chat-me-tool-copy,
    .chat-me-tool:active .chat-me-tool-copy { transform: none; }
    .chat-me-tool:hover .chat-me-tool-num,
    .chat-me-tool:focus-visible .chat-me-tool-num,
    .chat-me-tool:active .chat-me-tool-num { color: #343941; }
    .chat-me-tool:hover .chat-me-tool-arrow,
    .chat-me-tool:focus-visible .chat-me-tool-arrow,
    .chat-me-tool:active .chat-me-tool-arrow {
        opacity: 0.72;
        transform: translateX(0) rotate(45deg);
    }
    .chat-me-tool-num {
        display: block;
        align-self: center;
        padding-top: 0;
        font-family: "Courier New", Courier, monospace;
        font-size: 9px;
        line-height: 1;
        letter-spacing: 0.08em;
        color: #B0B6C0;
        position: relative;
        z-index: 1;
    }
    .chat-me-tool-copy {
        min-width: 0;
        display: block;
        transition: transform 0.24s ease;
        position: relative;
        z-index: 1;
    }
    .chat-me-tool-title {
        display: block;
        font-family: Georgia, "Times New Roman", "Songti SC", serif;
        font-size: 17px;
        line-height: 1.08;
        font-weight: 400;
        font-style: italic;
        letter-spacing: -0.025em;
        color: #4F5864;
        margin-bottom: 4px;
    }
    .chat-me-tool-subtitle {
        display: block;
        color: #B4BAC4;
        font-family: "Courier New", Courier, monospace;
        font-size: 8.5px;
        line-height: 1;
        letter-spacing: 0.16em;
    }
    .chat-me-tool-arrow {
        justify-self: end;
        width: 7px;
        height: 7px;
        opacity: 0.28;
        transform: translateX(-3px) rotate(45deg);
        transition: opacity 0.22s ease, transform 0.22s ease;
        border-top: 1.2px solid currentColor;
        border-right: 1.2px solid currentColor;
        color: #8A93A0;
        font-size: 0;
        line-height: 0;
        position: relative;
        z-index: 1;
    }
    .chat-me-tool:active { transform: none; }
    .chat-me-name,
    .chat-me-id {
        -webkit-tap-highlight-color: transparent;
        cursor: pointer;
    }
    .chat-me-name:active,
    .chat-me-id:active { opacity: 0.66; }

    .chat-app-page.asset-open .chat-bottom-dock,
    .chat-assets-view.active ~ .chat-bottom-dock {
        display: none;
    }
    .chat-assets-view {
        padding: max(38px, calc(env(safe-area-inset-top) + 22px)) 24px max(40px, calc(env(safe-area-inset-bottom) + 30px));
        color: var(--chat-ink);
    }
    .chat-assets-head {
        padding: 6px 0 18px;
        border: 0;
        background: transparent;
    }
    .chat-assets-kicker {
        margin-bottom: 9px;
        font-family: "Courier New", Courier, monospace;
        font-size: 9px;
        line-height: 1;
        letter-spacing: 0.22em;
        color: #9AA2AD;
        text-transform: uppercase;
    }
    .chat-assets-title {
        margin: 0;
        display: inline-block;
        font-family: Georgia, "Times New Roman", "Songti SC", serif;
        font-size: clamp(36px, 10vw, 44px);
        line-height: 0.92;
        letter-spacing: -0.085em;
        font-style: italic;
        font-weight: 400;
        color: #2F333A;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    .chat-assets-title:active { opacity: 0.66; }
    .chat-assets-subtitle {
        max-width: 236px;
        margin: 13px 0 0;
        color: #8A93A0;
        font-size: 11px;
        line-height: 1.7;
        letter-spacing: 0.045em;
    }
    .chat-assets-panel {
        position: relative;
        min-height: 196px;
        box-sizing: border-box;
        margin-top: 16px;
        padding: 20px 20px 18px;
        border-radius: 30px;
        overflow: hidden;
        background:
            radial-gradient(circle at 14% 8%, rgba(255,255,255,0.88), transparent 42%),
            radial-gradient(circle at 88% 18%, rgba(213,229,255,0.38), transparent 46%),
            linear-gradient(138deg, #FFFFFF 0%, #F6F2EA 100%);
        border: 1px solid rgba(255,255,255,0.82);
        box-shadow: 0 16px 34px rgba(74,78,89,0.08), inset 0 1px 0 rgba(255,255,255,0.94);
        isolation: isolate;
    }
    .chat-assets-panel::before {
        content: '';
        position: absolute;
        left: 20px;
        right: 20px;
        top: 18px;
        height: 1px;
        background: linear-gradient(90deg, rgba(74,78,89,0.24), rgba(181,199,211,0.22), transparent);
        pointer-events: none;
    }
    .chat-assets-panel::after {
        content: 'ASSET';
        position: absolute;
        right: 18px;
        bottom: 18px;
        font-family: "Courier New", Courier, monospace;
        font-size: 10px;
        line-height: 1;
        letter-spacing: 0.22em;
        color: rgba(74,78,89,0.18);
        pointer-events: none;
    }
    .chat-assets-panel-top {
        position: relative;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        margin-top: 12px;
    }
    .chat-assets-chip,
    .chat-assets-panel-date {
        font-family: "Courier New", Courier, monospace;
        font-size: 9px;
        line-height: 1;
        letter-spacing: 0.18em;
        color: #9AA2AD;
    }
    .chat-assets-chip {
        min-height: 24px;
        padding: 0 10px;
        border-radius: 999px;
        display: inline-flex;
        align-items: center;
        background: rgba(255,255,255,0.62);
        box-shadow: inset 0 0 0 1px rgba(74,78,89,0.055);
    }
    .chat-assets-balance {
        position: relative;
        z-index: 2;
        display: flex;
        align-items: flex-start;
        gap: 6px;
        margin-top: 29px;
        color: #343941;
    }
    .chat-assets-currency {
        padding-top: 8px;
        font-family: Georgia, "Times New Roman", "Songti SC", serif;
        font-size: 19px;
        line-height: 1;
        color: #6E7682;
    }
    .chat-assets-balance strong {
        font-family: Georgia, "Times New Roman", "Songti SC", serif;
        font-size: clamp(44px, 12vw, 58px);
        line-height: 0.86;
        font-weight: 400;
        letter-spacing: -0.07em;
        font-style: italic;
    }
    .chat-assets-panel-copy {
        position: relative;
        z-index: 2;
        margin-top: 10px;
        color: #8A93A0;
        font-size: 11px;
        line-height: 1;
        letter-spacing: 0.12em;
    }
    .chat-assets-actions {
        position: absolute;
        z-index: 3;
        right: 18px;
        top: 74px;
        display: flex;
        flex-direction: column;
        gap: 9px;
    }
    .chat-assets-action {
        min-width: 58px;
        height: 28px;
        border: 0;
        border-radius: 999px;
        padding: 0 12px;
        background: rgba(255,255,255,0.58);
        color: #5E6772;
        font-size: 11px;
        line-height: 1;
        letter-spacing: 0.10em;
        box-shadow: inset 0 0 0 1px rgba(74,78,89,0.075);
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    .chat-assets-action.is-primary {
        background: rgba(52,57,65,0.86);
        color: #FFFFFF;
        box-shadow: none;
    }
    .chat-assets-action:active { transform: translateY(1px); }
    .chat-assets-shortcuts {
        margin: 18px -4px 0;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
    }
    .chat-assets-shortcut {
        min-width: 0;
        min-height: 78px;
        border: 0;
        border-radius: 0;
        padding: 0 2px;
        background: transparent;
        color: #68717D;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        font-size: 11px;
        line-height: 1.18;
        letter-spacing: 0.04em;
        text-align: center;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    .chat-assets-shortcut-icon {
        width: 48px;
        height: 48px;
        border-radius: 18px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background:
            linear-gradient(145deg, rgba(255,255,255,0.82), rgba(247,243,236,0.74));
        box-shadow: inset 0 0 0 1px rgba(74,78,89,0.065), 0 10px 20px rgba(74,78,89,0.055);
    }

    .chat-assets-shortcut[data-asset-action="quickpay"] .chat-assets-shortcut-icon {
        background: linear-gradient(145deg, rgba(255,255,255,0.86), rgba(242,242,242,0.78));
        box-shadow: inset 0 0 0 1px rgba(74,78,89,0.07), 0 10px 20px rgba(74,78,89,0.05);
    }

    .chat-assets-shortcut svg {
        width: 21px;
        height: 21px;
        stroke: #4F5864;
        stroke-width: 1.55;
        fill: none;
        stroke-linecap: round;
        stroke-linejoin: round;
    }
    .chat-assets-shortcut:active .chat-assets-shortcut-icon { transform: translateY(1px); }
    .chat-assets-bills {
        margin-top: 26px;
    }
    .chat-assets-bills-head {
        display: flex;
        align-items: end;
        justify-content: space-between;
        gap: 16px;
        padding-bottom: 13px;
        border-bottom: 1px solid rgba(150,158,168,0.16);
    }
    .chat-assets-bills-head h3 {
        margin: 0;
        font-family: Georgia, "Times New Roman", "Songti SC", serif;
        font-size: 22px;
        line-height: 1;
        font-style: italic;
        font-weight: 400;
        letter-spacing: -0.04em;
        color: #4F5864;
    }
    .chat-assets-bills-head span {
        color: #B4BAC4;
        font-family: "Courier New", Courier, monospace;
        font-size: 8.5px;
        line-height: 1;
        letter-spacing: 0.16em;
    }
    .chat-assets-bill-list {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding-top: 14px;
    }
    .chat-assets-bill-list:not(.has-bills) {
        display: none;
    }
    .chat-assets-bill-item {
        display: grid;
        grid-template-columns: 38px minmax(0, 1fr) auto;
        align-items: center;
        gap: 12px;
        min-height: 62px;
        padding: 12px 0;
        border-bottom: 1px solid rgba(150,158,168,0.12);
    }
    .chat-assets-bill-mark {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: #F4F5F6;
        box-shadow: inset 0 0 0 1px rgba(79,88,100,0.08);
    }
    .chat-assets-bill-mark span {
        color: #68717D;
        font-family: Georgia, "Times New Roman", serif;
        font-size: 15px;
        line-height: 1;
        font-style: italic;
    }
    .chat-assets-bill-copy {
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    .chat-assets-bill-line {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 10px;
        min-width: 0;
    }
    .chat-assets-bill-line strong {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: #3F4650;
        font-size: 13px;
        font-weight: 600;
        letter-spacing: 0.02em;
    }
    .chat-assets-bill-line time {
        flex-shrink: 0;
        color: #AEB5BE;
        font-family: "Courier New", Courier, monospace;
        font-size: 9px;
        letter-spacing: 0.05em;
    }
    .chat-assets-bill-copy p {
        margin: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: #9AA2AE;
        font-size: 11px;
        line-height: 1.2;
    }
    .chat-assets-bill-amount {
        color: #4E5661;
        font-family: Georgia, "Times New Roman", serif;
        font-size: 15px;
        line-height: 1;
        font-weight: 500;
        white-space: nowrap;
    }
    .chat-assets-bill-item.is-in .chat-assets-bill-amount { color: #556B5E; }
    .chat-assets-bill-item.is-out .chat-assets-bill-amount { color: #7A5D56; }
    .chat-assets-bill-item.is-in .chat-assets-bill-mark { background: #EEF4EF; }
    .chat-assets-bill-item.is-out .chat-assets-bill-mark { background: #F5F0ED; }
    .chat-assets-bill-empty {
        min-height: 160px;
        display: none;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
        color: #A3AAB5;
        text-align: center;
    }
    .chat-assets-bill-empty.show {
        display: flex;
    }
    .chat-assets-bill-empty strong {
        color: #7E8793;
        font-size: 14px;
        font-weight: 500;
        letter-spacing: 0.08em;
    }
    .chat-assets-bill-empty span {
        color: #B3BAC4;
        font-size: 11px;
        line-height: 1.5;
        letter-spacing: 0.05em;
    }



    .chat-pay-pass-modal {
        padding: 0;
        align-items: stretch;
        justify-content: flex-end;
        background: rgba(30, 30, 35, 0.32);
    }
    .chat-pay-pass-modal.show .chat-pay-pass-dialog {
        transform: none;
    }
    .chat-pay-pass-dialog {
        width: 100%;
        max-width: none;
        height: 100%;
        min-height: 100%;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        overflow: visible;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        pointer-events: none;
        transform: none;
    }
    .chat-pay-pass-content {
        width: 100%;
        min-height: 100%;
        padding: 0;
        display: grid;
        grid-template-rows: minmax(0, 1fr) auto;
        align-items: stretch;
        justify-items: center;
        gap: 0;
        pointer-events: none;
    }
    .chat-pay-pass-card {
        width: min(348px, calc(100% - 56px));
        min-height: 178px;
        box-sizing: border-box;
        margin: 0 auto;
        align-self: center;
        justify-self: center;
        padding: 27px 27px 25px;
        border-radius: 10px;
        background: #FFFFFF;
        box-shadow: 0 16px 36px rgba(31,34,40,0.11), inset 0 0 0 1px rgba(74,78,89,0.05);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 22px;
        pointer-events: auto;
    }
    .chat-pay-pass-title {
        font-family: Georgia, "Times New Roman", "Songti SC", serif;
        font-size: 20px;
        line-height: 1;
        letter-spacing: -0.01em;
        color: #343941;
        font-style: italic;
        font-weight: 400;
    }
    .chat-pay-pass-display {
        width: 100%;
        min-height: 76px;
        box-sizing: border-box;
        padding: 0;
        border-radius: 0;
        background: transparent;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 18px;
        box-shadow: none;
    }
    .chat-pay-pass-display > span {
        color: #7F8791;
        font-size: 13px;
        line-height: 1;
        letter-spacing: 0.14em;
    }
    .chat-pay-pass-dots {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        gap: 16px;
        width: min(256px, 100%);
        align-items: center;
        justify-items: center;
    }
    .chat-pay-pass-dots i {
        width: 18px;
        height: 18px;
        border-radius: 50%;
        box-sizing: border-box;
        background: transparent;
        border: 1px solid rgba(52,57,65,0.22);
        transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
    }
    .chat-pay-pass-dots i.is-filled {
        background: #343941;
        border-color: #343941;
        transform: scale(0.92);
    }
    .chat-pay-pass-keypad {
        width: 100%;
        box-sizing: border-box;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0;
        margin: 0;
        padding: 0 0 env(safe-area-inset-bottom);
        background: #EEF0F3;
        border-top: 1px solid rgba(74,78,89,0.12);
        pointer-events: auto;
    }
    .chat-pay-pass-keypad button {
        height: 58px;
        border: 0;
        border-right: 1px solid rgba(74,78,89,0.11);
        border-bottom: 1px solid rgba(74,78,89,0.11);
        border-radius: 0;
        background: #FFFFFF;
        color: #343941;
        font-family: Georgia, "Times New Roman", serif;
        font-size: 20px;
        line-height: 1;
        box-shadow: none;
        -webkit-tap-highlight-color: transparent;
        cursor: pointer;
    }
    .chat-pay-pass-keypad button:nth-child(3n) {
        border-right: 0;
    }
    .chat-pay-pass-keypad button:nth-child(n+10) {
        border-bottom: 0;
    }
    .chat-pay-pass-keypad button:active {
        transform: none;
        background: #F7F8FA;
    }
    .chat-pay-pass-keypad button.is-empty {
        background: #F5F6F8;
        box-shadow: none;
        pointer-events: none;
    }
    .chat-pay-pass-keypad button.is-delete {
        color: #6E7682;
        background: #F5F6F8;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .chat-pay-pass-keypad button.is-delete svg {
        width: 25px;
        height: 25px;
        display: block;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.7;
        stroke-linecap: round;
        stroke-linejoin: round;
    }
    .chat-pay-pass-actions {
        display: none;
    }

    .chat-quickpay-dialog {
        max-width: 296px;
        border-radius: 26px;
        background: #ffffff;
        box-shadow: 0 18px 54px rgba(31,34,40,0.15);
    }
    .chat-quickpay-content {
        padding: 25px 20px 20px;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    .chat-quickpay-kicker {
        text-align: center;
        color: #A0A7B1;
        font-family: "Courier New", Courier, monospace;
        font-size: 9px;
        line-height: 1;
        letter-spacing: 0.22em;
    }
    .chat-quickpay-title {
        text-align: center;
        font-family: Georgia, "Times New Roman", "Songti SC", serif;
        font-size: 20px;
        line-height: 1;
        letter-spacing: -0.03em;
        color: #343941;
        font-style: italic;
    }
    .chat-quickpay-copy {
        margin: 0 auto 4px;
        max-width: 210px;
        color: #87909D;
        font-size: 11px;
        line-height: 1.7;
        letter-spacing: 0.05em;
        text-align: center;
    }
    .chat-quickpay-switch {
        min-height: 64px;
        border: 0;
        border-radius: 18px;
        padding: 0 12px 0 16px;
        background: #F3F3F3;
        color: #4F5864;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        box-shadow: inset 0 0 0 1px rgba(74,78,89,0.07);
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    .chat-quickpay-switch-copy {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    .chat-quickpay-switch-copy strong {
        color: #343941;
        font-size: 14px;
        line-height: 1;
        letter-spacing: 0.04em;
    }
    .chat-quickpay-switch-copy em {
        color: #9AA2AD;
        font-size: 10px;
        line-height: 1;
        letter-spacing: 0.12em;
        font-style: normal;
    }
    .chat-quickpay-knob {
        position: relative;
        width: 50px;
        height: 28px;
        border-radius: 999px;
        background: #D9DEE5;
        transition: background 0.2s ease;
        flex: 0 0 auto;
    }
    .chat-quickpay-knob::before {
        content: '';
        position: absolute;
        width: 22px;
        height: 22px;
        border-radius: 50%;
        left: 3px;
        top: 3px;
        background: #ffffff;
        box-shadow: 0 4px 10px rgba(74,78,89,0.16);
        transition: transform 0.2s ease;
    }
    .chat-quickpay-switch.is-on .chat-quickpay-knob {
        background: #343941;
    }
    .chat-quickpay-switch.is-on .chat-quickpay-knob::before {
        transform: translateX(22px);
    }

    .chat-app-page.preset-open .chat-bottom-dock,
    .chat-mask-preset-view.active ~ .chat-bottom-dock {
        display: none;
    }
    .chat-mask-preset-view {
        padding: max(38px, calc(env(safe-area-inset-top) + 22px)) 24px max(40px, calc(env(safe-area-inset-bottom) + 30px));
        background: transparent;
        color: var(--chat-ink);
    }
    .chat-mask-preset-head {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
        gap: 16px;
        padding: 8px 0 26px;
        min-height: 98px;
        border: 0;
        background: transparent;
    }
    .chat-mask-preset-title-wrap {
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 9px;
    }
    .chat-mask-preset-title {
        margin: 0;
        width: fit-content;
        max-width: 100%;
        font-family: Georgia, "Times New Roman", "Songti SC", serif;
        font-size: clamp(32px, 9.2vw, 42px);
        line-height: 0.96;
        font-weight: 400;
        letter-spacing: -0.07em;
        color: var(--chat-ink);
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    .chat-mask-preset-title:active { opacity: 0.58; }
    .chat-mask-preset-subtitle {
        margin: 0;
        max-width: 210px;
        color: var(--chat-muted);
        font-size: 11px;
        line-height: 1.65;
        letter-spacing: 0.075em;
    }
    .chat-mask-preset-actions {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        padding-top: 0;
    }
    .chat-mask-preset-icon {
        width: 38px;
        height: 38px;
        padding: 0;
        border: 1px solid rgba(150,158,168,0.18);
        border-radius: 50%;
        background: rgba(255,255,255,0.72);
        color: #6F7782;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        box-shadow: 0 8px 18px rgba(74,78,89,0.065);
    }
    .chat-mask-preset-icon.is-manage {
        background: #111111;
        border-color: #111111;
        color: #ffffff;
        box-shadow: 0 10px 22px rgba(17,17,17,0.18);
    }
    .chat-mask-preset-icon svg {
        width: 18px;
        height: 18px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.55;
        stroke-linecap: round;
        stroke-linejoin: round;
    }
    .chat-mask-preset-icon.active,
    .chat-mask-preset-icon:active { opacity: 0.58; transform: none; }
    .chat-mask-preset-list {
        display: flex;
        flex-direction: column;
        gap: 0;
        border-top: 1px solid rgba(150,158,168,0.16);
    }
    .chat-mask-preset-card {
        position: relative;
        width: 100%;
        min-height: 82px;
        padding: 14px 0;
        border: 0;
        border-radius: 0;
        border-bottom: 1px solid rgba(150,158,168,0.16);
        background: transparent;
        display: grid;
        grid-template-columns: 44px 50px minmax(0, 1fr) 18px;
        align-items: center;
        gap: 12px;
        text-align: left;
        cursor: pointer;
        color: #5B6470;
        -webkit-tap-highlight-color: transparent;
    }
    .chat-mask-preset-card::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        width: 1px;
        height: 0;
        background: linear-gradient(180deg, rgba(150,150,150,0.48), rgba(181,199,211,0.48));
        transform: translateY(-50%);
        transition: height 0.22s ease;
    }
    .chat-mask-preset-card:active::before,
    .chat-mask-preset-list.manage .chat-mask-preset-card::before { height: calc(100% - 22px); }
    .chat-mask-preset-card-no {
        font-family: "Courier New", Courier, monospace;
        font-size: 9px;
        letter-spacing: 0.08em;
        color: #B0B6C0;
    }
    .chat-mask-preset-card-avatar {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background: #F2F3F4 center / cover no-repeat;
        color: #C1C5CA;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-family: Georgia, "Times New Roman", serif;
        font-size: 19px;
        font-style: italic;
        box-shadow: 0 7px 18px rgba(120, 130, 140, 0.08);
        overflow: hidden;
    }
    .chat-mask-preset-card-avatar.has-image { color: transparent; }
    .chat-mask-preset-card-copy {
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    .chat-mask-preset-card-copy strong {
        color: #414750;
        font-family: Georgia, "Times New Roman", "Songti SC", serif;
        font-size: 19px;
        line-height: 1.05;
        font-weight: 400;
        font-style: italic;
        letter-spacing: -0.025em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .chat-mask-preset-card-copy em {
        color: #8C95A3;
        font-size: 11px;
        line-height: 1.42;
        font-style: normal;
        letter-spacing: 0.035em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .chat-mask-preset-card-copy small {
        color: #B4BAC4;
        font-family: "Courier New", Courier, monospace;
        font-size: 8.5px;
        line-height: 1;
        letter-spacing: 0.12em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .chat-mask-preset-card-delete {
        position: relative;
        width: 8px;
        height: 8px;
        justify-self: end;
        opacity: 0.24;
        transform: rotate(45deg);
        border-top: 1.2px solid currentColor;
        border-right: 1.2px solid currentColor;
        color: #8A93A0;
    }
    .chat-mask-preset-list.manage .chat-mask-preset-card-delete {
        width: 12px;
        height: 12px;
        border: 0;
        opacity: 0.72;
        transform: none;
    }
    .chat-mask-preset-list.manage .chat-mask-preset-card-delete::before,
    .chat-mask-preset-list.manage .chat-mask-preset-card-delete::after {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        width: 12px;
        height: 1px;
        background: #9C5F5F;
        transform: rotate(45deg);
    }
    .chat-mask-preset-list.manage .chat-mask-preset-card-delete::after { transform: rotate(-45deg); }
    .chat-mask-preset-empty {
        min-height: 330px;
        display: none;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        text-align: center;
        color: var(--chat-muted);
        gap: 14px;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }
    .chat-mask-preset-empty::before {
        content: '';
        width: 32px;
        height: 1px;
        background: var(--chat-line-strong);
        opacity: 0.22;
    }
    .chat-mask-preset-empty.show { display: flex; }
    .chat-mask-preset-empty strong {
        color: var(--chat-ink);
        font-family: Georgia, "Times New Roman", "Songti SC", serif;
        font-size: 24px;
        line-height: 1.05;
        font-weight: 400;
        letter-spacing: -0.035em;
        opacity: 0.78;
    }
    .chat-mask-preset-empty span {
        max-width: 230px;
        color: var(--chat-muted);
        font-size: 11.5px;
        line-height: 1.88;
        letter-spacing: 0.055em;
        opacity: 0.82;
    }
    .chat-mask-preset-modal { z-index: 13000; letter-spacing: 0.12em; }
    .chat-mask-preset-dialog .modal-content { padding-top: 63px; }
    .chat-mask-preset-avatar::before { content: 'Me'; }

    .chat-app-page.sticker-open .chat-bottom-dock,
    .chat-sticker-view.active ~ .chat-bottom-dock {
        display: none;
    }
    .chat-sticker-view {
        padding: max(38px, calc(env(safe-area-inset-top) + 22px)) 24px max(40px, calc(env(safe-area-inset-bottom) + 30px));
        background: transparent;
        color: var(--chat-ink);
    }
    .chat-sticker-head {
        position: relative;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
        gap: 18px;
        min-height: 104px;
        padding: 8px 0 24px;
        margin-bottom: 8px;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        overflow: visible;
    }
    .chat-sticker-head::before,
    .chat-sticker-head::after { content: none; }
    .chat-sticker-head-copy {
        position: relative;
        z-index: 2;
        min-width: 0;
        padding-top: 0;
    }
    .chat-sticker-kicker {
        color: var(--chat-muted);
        font-family: "Courier New", Courier, monospace;
        font-size: 9px;
        line-height: 1;
        letter-spacing: 0.22em;
        text-transform: uppercase;
        margin-bottom: 18px;
        white-space: nowrap;
        opacity: 0.86;
    }
    .chat-sticker-title {
        width: fit-content;
        max-width: 100%;
        font-family: Georgia, "Times New Roman", "Songti SC", serif;
        font-size: clamp(32px, 9.6vw, 42px);
        line-height: 0.96;
        font-style: normal;
        font-weight: 400;
        letter-spacing: -0.075em;
        color: var(--chat-ink);
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    .chat-sticker-title:active { opacity: 0.58; }
    .chat-sticker-subtitle {
        max-width: 226px;
        margin: 18px 0 0;
        color: var(--chat-muted);
        font-size: 11.5px;
        line-height: 1.82;
        letter-spacing: 0.055em;
        opacity: 0.9;
    }
    .chat-sticker-stamp { display: none; }
    .chat-sticker-manage {
        position: relative;
        z-index: 3;
        align-self: start;
        min-height: 30px;
        padding: 0 1px;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: var(--chat-muted);
        font-size: 11px;
        letter-spacing: 0.16em;
        cursor: pointer;
        box-shadow: none;
        -webkit-tap-highlight-color: transparent;
    }
    .chat-sticker-manage::after {
        content: '';
        position: absolute;
        left: 1px;
        right: 1px;
        bottom: 3px;
        height: 1px;
        background: var(--chat-line-strong);
        opacity: 0.38;
    }
    .chat-sticker-manage:active,
    .chat-sticker-action:active,
    .chat-sticker-tab:active,
    .chat-sticker-card-actions button:active,
    .chat-sticker-select:active { opacity: 0.62; transform: none; }
    .chat-sticker-control {
        position: sticky;
        top: 0;
        z-index: 4;
        margin: 0 0 28px;
        padding: 0 0 18px;
        border: 0;
        border-radius: 0;
        background: linear-gradient(180deg, rgba(252,251,247,0.96), rgba(252,251,247,0.76));
        box-shadow: none;
    }
    .chat-sticker-tabs {
        position: relative;
        display: flex;
        gap: 22px;
        overflow-x: auto;
        scrollbar-width: none;
        padding: 0 0 14px;
        margin-bottom: 20px;
        border: 0;
    }
    .chat-sticker-tabs::-webkit-scrollbar { display: none; }
    .chat-sticker-tab {
        position: relative;
        flex: 0 0 auto;
        height: 24px;
        min-width: 0;
        border-radius: 0;
        border: 0;
        background: transparent;
        color: var(--chat-muted);
        padding: 0;
        font-size: 11px;
        letter-spacing: 0.12em;
        cursor: pointer;
        box-shadow: none;
        -webkit-tap-highlight-color: transparent;
        opacity: 0.82;
    }
    .chat-sticker-tab::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: -6px;
        height: 1px;
        background: var(--chat-line-strong);
        opacity: 0;
    }
    .chat-sticker-tab.active {
        background: transparent;
        color: var(--chat-ink);
        border-color: transparent;
        box-shadow: none;
        opacity: 1;
    }
    .chat-sticker-tab.active::after { opacity: 0.48; }
    .chat-sticker-toolbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: center;
        gap: 10px;
        margin: 0;
    }
    .chat-sticker-action {
        min-width: 0;
        min-height: 38px;
        padding: 0 13px;
        border: 0;
        border-radius: 999px;
        background: rgba(252,251,247,0.62);
        color: var(--chat-muted);
        font-size: 11px;
        letter-spacing: 0.12em;
        cursor: pointer;
        box-shadow: none;
        -webkit-tap-highlight-color: transparent;
    }
    .chat-sticker-action.primary {
        background: var(--chat-ink);
        border-color: transparent;
        color: var(--chat-paper);
        box-shadow: none;
    }
    #chatStickerAddGroupBtn,
    #chatStickerAddBtn {
        border-radius: 0;
    }
    .chat-sticker-action.is-manage-only { display: none; }
    .chat-app-page.sticker-manage .chat-sticker-action.is-manage-only { display: inline-flex; align-items: center; justify-content: center; }
    .chat-sticker-action.danger { color: #9C5F5F; background: rgba(252,251,247,0.52); }
    .chat-sticker-action:disabled {
        opacity: 0.36;
        cursor: default;
    }
    .chat-sticker-empty {
        position: relative;
        min-height: 330px;
        display: none;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        text-align: center;
        color: var(--chat-muted);
        gap: 14px;
        border-radius: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
        overflow: visible;
    }
    .chat-sticker-empty::before {
        content: '';
        width: 32px;
        height: 1px;
        border: 0;
        border-radius: 0;
        background: var(--chat-line-strong);
        opacity: 0.22;
        box-shadow: none;
        transform: none;
    }
    .chat-sticker-empty.show { display: flex; }
    .chat-sticker-empty strong {
        color: var(--chat-ink);
        font-family: Georgia, "Times New Roman", "Songti SC", serif;
        font-size: 24px;
        line-height: 1.05;
        font-style: normal;
        font-weight: 400;
        letter-spacing: -0.035em;
        opacity: 0.78;
    }
    .chat-sticker-empty span {
        max-width: 230px;
        color: var(--chat-muted);
        font-size: 11.5px;
        line-height: 1.88;
        letter-spacing: 0.055em;
        opacity: 0.82;
    }
    .chat-sticker-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 24px 12px;
        align-items: start;
    }
    .chat-sticker-card {
        position: relative;
        min-height: 0;
        border-radius: 0;
        padding: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
        overflow: visible;
        -webkit-tap-highlight-color: transparent;
    }
    .chat-sticker-card::before,
    .chat-sticker-card::after { content: none; }
    .chat-sticker-card-top { display: none; }
    .chat-sticker-card-top i { font-style: normal; }
    .chat-sticker-preview {
        position: relative;
        z-index: 1;
        width: 100%;
        aspect-ratio: 1 / 1;
        border-radius: 15px;
        border: 0;
        background: transparent;
        overflow: hidden;
        box-shadow: none;
    }
    .chat-sticker-img {
        width: 100%;
        height: 100%;
        border-radius: 15px;
        background: transparent center / contain no-repeat;
    }
    .chat-sticker-desc {
        position: relative;
        z-index: 2;
        margin: 8px 0 0;
        min-height: 28px;
        color: var(--chat-muted);
        font-size: 10px;
        line-height: 1.42;
        letter-spacing: 0.035em;
        text-align: center;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        opacity: 0.88;
    }
    .chat-sticker-select {
        display: none;
        position: absolute;
        z-index: 5;
        right: -2px;
        top: -4px;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        border: 1px solid var(--chat-line-strong);
        background: rgba(252,251,247,0.88);
        box-shadow: none;
        cursor: pointer;
    }
    .chat-sticker-grid.manage .chat-sticker-select { display: inline-flex; }
    .chat-sticker-card.selected .chat-sticker-select {
        background: var(--chat-ink);
        border-color: var(--chat-ink);
    }
    .chat-sticker-card.selected .chat-sticker-select::after {
        content: '';
        width: 6px;
        height: 3px;
        margin: 5px auto 0;
        border-left: 1px solid var(--chat-paper);
        border-bottom: 1px solid var(--chat-paper);
        transform: rotate(-45deg);
    }
    .chat-sticker-card.selected .chat-sticker-preview { opacity: 0.72; }
    .chat-sticker-card-actions {
        display: none;
        position: relative;
        z-index: 4;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 3px;
        margin-top: 8px;
        padding-top: 0;
        border-top: 0;
    }
    .chat-sticker-grid.manage .chat-sticker-card {
        min-height: 0;
        border-color: transparent;
        box-shadow: none;
    }
    .chat-sticker-grid.manage .chat-sticker-card-actions { display: grid; }
    .chat-sticker-card-actions button {
        min-width: 0;
        height: 22px;
        border-radius: 999px;
        border: 0;
        background: rgba(252,251,247,0.62);
        color: var(--chat-muted);
        font-size: 8.5px;
        letter-spacing: 0.02em;
        padding: 0;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    .chat-sticker-card-actions button[data-sticker-delete] { color: #9C5F5F; }
    .chat-sticker-modal {
        --chat-paper: #FCFBF7;
        --chat-ink: #343941;
        --chat-muted: #8C95A3;
        --chat-line-strong: rgba(74, 78, 89, 0.34);
    }
    .chat-sticker-modal .modal-box {
        max-width: 296px;
    }
    .chat-sticker-modal .modal-content {
        max-height: min(72vh, 560px);
        overflow-y: auto;
        scrollbar-width: none;
    }
    .chat-sticker-modal .modal-content::-webkit-scrollbar { display: none; }
    .chat-sticker-modal-copy {
        margin-top: -8px;
        font-size: 12px;
        line-height: 1.7;
    }
    .chat-sticker-field {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    .chat-sticker-group-select {
        appearance: none;
        -webkit-appearance: none;
        background-image: linear-gradient(45deg, transparent 50%, #9aa0ab 50%), linear-gradient(135deg, #9aa0ab 50%, transparent 50%);
        background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
        background-size: 5px 5px, 5px 5px;
        background-repeat: no-repeat;
        padding-right: 34px;
    }
    .chat-sticker-field span {
        color: var(--chat-muted);
        font-family: "Courier New", Courier, monospace;
        font-size: 9px;
        line-height: 1;
        letter-spacing: 0.18em;
    }
    .chat-sticker-input,
    .chat-sticker-textarea {
        width: 100%;
        box-sizing: border-box;
        color: #5d636e;
        user-select: text;
        -webkit-user-select: text;
    }
    .chat-sticker-textarea {
        min-height: 148px;
        resize: none;
        line-height: 1.68;
        font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    }

    .btn-danger.chat-contact-delete {
        color: #9C5F5F;
        background: transparent;
        border: 0;
        font-size: 15px;
        cursor: pointer;
    }
    .chat-contact-delete[hidden] { display: none; }
    .chat-contact-actions { gap: 0; }
    .chat-contact-action-spacer { display: none; }

    /* Chat APP：Ta 添加入口复用全局弹窗骨架，只保留必要表单结构 */
    .chat-choice-modal,
    .chat-news-start-modal,
    .chat-news-char-modal,
    .chat-contact-modal,
    .chat-group-modal,
    .chat-sticker-modal {
        z-index: 13000;
    }
    .chat-choice-modal.show,
    .chat-news-start-modal.show,
    .chat-news-char-modal.show,
    .chat-contact-modal.show,
    .chat-group-modal.show,
    .chat-sticker-modal.show {
        display: flex;
        opacity: 1;
    }

    /* 添加到 Ta：回到全局弹窗尺寸、圆角、分割线节奏 */
    .chat-choice-dialog {
        max-width: 296px;
        background: #ffffff;
        border-radius: 22px;
        box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
    }
    .chat-choice-dialog .modal-content {
        padding: 24px 20px 20px;
        gap: 18px;
    }
    .chat-choice-title {
        font-family: "Georgia", "Times New Roman", "Songti SC", serif;
        font-size: 17px;
        line-height: 1.12;
        font-style: italic;
        font-weight: 400;
        letter-spacing: 0.04em;
        color: #4a4e59;
        text-align: center;
        margin-bottom: 0;
    }
    .chat-choice-list {
        display: flex;
        flex-direction: column;
        border-top: 1px solid #f0f2f5;
        border-bottom: 1px solid #f0f2f5;
    }
    .chat-choice-item {
        width: 100%;
        min-height: 54px;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: #4a4e59;
        display: grid;
        grid-template-columns: 28px minmax(0, 1fr);
        align-items: center;
        gap: 14px;
        padding: 10px 2px;
        text-align: left;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    .chat-choice-item + .chat-choice-item { border-top: 1px solid #f0f2f5; }
    .chat-choice-item:active {
        background: transparent;
        transform: none;
    }
    .chat-choice-dialog .modal-actions button:active { background: transparent; }
    .chat-choice-mark {
        width: 28px;
        height: auto;
        border-radius: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        color: #a6adb7;
        position: relative;
        overflow: visible;
        font-family: "Courier New", Courier, monospace;
        font-size: 10px;
        line-height: 1;
        letter-spacing: 0.08em;
    }
    .chat-choice-mark::after { content: none; }
    .chat-choice-mark svg { display: none; }
    .chat-choice-copy strong {
        display: block;
        font-size: 14px;
        line-height: 1.1;
        font-weight: 600;
        color: #343941;
        margin-bottom: 5px;
    }
    .chat-choice-copy span {
        display: block;
        font-size: 10px;
        line-height: 1;
        letter-spacing: 0.16em;
        color: #9aa0ab;
        text-transform: uppercase;
    }

    .chat-news-start-dialog,
    .chat-news-char-dialog {
        max-width: 328px;
        background: #fffdf9;
        border-radius: 28px;
        overflow: hidden;
        box-shadow: 0 18px 54px rgba(67, 73, 83, 0.14);
    }
    .chat-news-start-dialog .modal-content,
    .chat-news-char-dialog .modal-content {
        padding: 24px 20px 20px;
        gap: 16px;
    }
    .chat-news-start-kicker,
    .chat-news-char-head span {
        display: block;
        margin-top: 4px;
        font-family: "Courier New", Courier, monospace;
        font-size: 10px;
        line-height: 1;
        letter-spacing: 0.18em;
        color: #9ca3af;
        text-align: center;
    }
    .chat-news-start-title,
    .chat-news-char-head strong {
        display: block;
        margin-top: 0;
        font-family: Georgia, "Times New Roman", "Songti SC", serif;
        font-size: 20px;
        line-height: 1.05;
        font-weight: 400;
        font-style: italic;
        letter-spacing: -0.035em;
        color: #343941;
        text-align: center;
    }
    .chat-news-start-options {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 4px;
    }
    .chat-news-start-card {
        min-height: 76px;
        border: 0;
        border-radius: 22px;
        padding: 14px 16px;
        background:
            radial-gradient(circle at 12% 18%, rgba(255,255,255,0.92), transparent 38%),
            linear-gradient(135deg, rgba(239,242,245,0.86), rgba(253,246,239,0.96));
        display: grid;
        grid-template-columns: 38px minmax(0, 1fr);
        align-items: center;
        gap: 12px;
        text-align: left;
        color: #343941;
        cursor: pointer;
        box-shadow: inset 0 0 0 1px rgba(255,255,255,0.72), 0 10px 22px rgba(73,79,90,0.05);
        -webkit-tap-highlight-color: transparent;
    }
    .chat-news-start-card:active { transform: translateY(1px); background: rgba(242,244,247,0.92); }
    .chat-news-start-no {
        width: 38px;
        height: 38px;
        border-radius: 14px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: rgba(255,255,255,0.62);
        color: #a2a9b3;
        font-family: "Courier New", Courier, monospace;
        font-size: 10px;
        letter-spacing: 0.08em;
    }
    .chat-news-start-copy strong {
        display: block;
        font-size: 15px;
        line-height: 1.1;
        font-weight: 600;
        color: #343941;
        margin-bottom: 7px;
    }
    .chat-news-start-copy em {
        display: block;
        font-style: normal;
        font-size: 11px;
        line-height: 1.35;
        letter-spacing: 0.04em;
        color: #89929e;
    }
    .chat-news-char-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        max-height: min(56vh, 356px);
        overflow-y: auto;
        overflow-x: hidden;
        padding: 2px 2px 6px;
        scrollbar-width: none;
        -ms-overflow-style: none;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }
    .chat-news-char-grid::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }
    .chat-news-char-card {
        position: relative;
        min-height: 166px;
        border: 0;
        border-radius: 24px;
        padding: 12px;
        background:
            linear-gradient(180deg, rgba(255,255,255,0.86), rgba(255,250,244,0.94)),
            radial-gradient(circle at 20% 12%, rgba(218,228,236,0.72), transparent 44%);
        color: #343941;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        text-align: left;
        cursor: pointer;
        box-shadow: inset 0 0 0 1px rgba(255,255,255,0.78), 0 12px 22px rgba(70,76,86,0.055);
        overflow: hidden;
        -webkit-tap-highlight-color: transparent;
    }
    .chat-news-char-card:active { transform: translateY(1px); opacity: 0.82; }
    .chat-news-char-no {
        position: absolute;
        top: 12px;
        right: 12px;
        font-family: "Courier New", Courier, monospace;
        font-size: 9px;
        letter-spacing: 0.08em;
        color: #b0b6c0;
    }
    .chat-news-char-avatar {
        width: 58px;
        height: 58px;
        border-radius: 19px;
        margin-bottom: 12px;
        background: #eef0f2;
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #b3bac4;
        font-family: Georgia, "Times New Roman", serif;
        font-size: 16px;
        font-style: italic;
        box-shadow: 0 9px 18px rgba(82,90,102,0.08), inset 0 0 0 1px rgba(255,255,255,0.78);
    }
    .chat-news-char-avatar.is-group { border-radius: 18px; }
    .chat-news-char-name {
        display: block;
        font-family: Georgia, "Times New Roman", "Songti SC", serif;
        font-size: 19px;
        line-height: 1.05;
        font-style: italic;
        font-weight: 400;
        letter-spacing: -0.04em;
        color: #303640;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-bottom: 7px;
    }
    .chat-news-char-note {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        min-height: 30px;
        color: #87909d;
        font-size: 11px;
        line-height: 1.42;
        letter-spacing: 0.03em;
    }
    .chat-news-char-meta {
        margin-top: auto;
        padding-top: 12px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        color: #a4abb5;
        font-family: "Courier New", Courier, monospace;
        font-size: 9px;
        letter-spacing: 0.09em;
    }
    .chat-news-char-meta i {
        width: 18px;
        height: 18px;
        border-radius: 50%;
        background: rgba(52,57,65,0.08);
        position: relative;
        flex: 0 0 auto;
    }
    .chat-news-char-meta i::after {
        content: '';
        position: absolute;
        left: 6px;
        top: 5px;
        width: 6px;
        height: 6px;
        border-top: 1.2px solid #6f7783;
        border-right: 1.2px solid #6f7783;
        transform: rotate(45deg);
    }
    .chat-news-char-empty {
        display: none;
        min-height: 142px;
        align-items: center;
        justify-content: center;
        text-align: center;
        color: #929aa6;
        font-size: 12px;
        letter-spacing: 0.04em;
    }
    .chat-news-char-empty.show { display: flex; }


    .chat-group-modal { z-index: 13000; }
    .chat-group-modal.show { display: flex; opacity: 1; }
    .chat-group-dialog {
        max-width: 296px;
        background: #ffffff;
        border-radius: 22px;
        box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
    }
    .chat-group-dialog .modal-content {
        padding: 24px 20px 18px;
        gap: 16px;
    }
    .chat-group-title {
        font-family: "Georgia", "Times New Roman", "Songti SC", serif;
        font-size: 17px;
        line-height: 1.12;
        font-style: italic;
        font-weight: 400;
        letter-spacing: 0.04em;
        color: #4a4e59;
        text-align: center;
    }
    .chat-group-field {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    .chat-group-field span {
        font-size: 10px;
        line-height: 1;
        letter-spacing: 0.18em;
        color: #9aa0ab;
        text-transform: uppercase;
    }
    .chat-group-input {
        width: 100%;
        min-height: 44px;
        border-radius: 14px;
        border: 1px solid transparent;
        background: #f4f5f8;
        color: #4a4e59;
        outline: none;
        padding: 0 14px;
        font-size: 13px;
        user-select: text;
        -webkit-user-select: text;
    }
    .chat-group-input:focus {
        background: transparent;
        border-color: rgba(17,17,17,0.34);
        box-shadow: none;
    }
    .chat-group-list {
        border-top: 1px solid #f0f2f5;
        border-bottom: 1px solid #f0f2f5;
    }
    .chat-group-row {
        min-height: 44px;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 12px;
        border-bottom: 1px solid #f0f2f5;
        color: #4a4e59;
        font-size: 13px;
    }
    .chat-group-row:last-child { border-bottom: 0; }
    .chat-group-row em {
        color: #AAB0BA;
        font-style: normal;
        font-family: "Courier New", Courier, monospace;
        font-size: 10px;
        letter-spacing: 0.12em;
    }
    .chat-group-delete {
        border: 0;
        background: transparent;
        color: #9aa0ab;
        font-size: 11px;
        letter-spacing: 0.12em;
        cursor: pointer;
        padding: 8px 0 8px 12px;
        -webkit-tap-highlight-color: transparent;
    }
    .chat-group-delete:active { opacity: 0.55; }

    /* 添加 / 编辑 Ta：全局纸面弹窗骨架 */
    .chat-contact-dialog {
        --chat-contact-paper: #ffffff;
        --chat-contact-field: #f4f5f8;
        --chat-contact-ink: #4a4e59;
        --chat-contact-muted: #9aa0ab;
        --chat-contact-line: #f0f2f5;
        max-width: 296px;
        max-height: min(78vh, 620px);
        margin-top: 38px;
        background: var(--chat-contact-paper);
        border-radius: 22px;
        box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
        position: relative;
        overflow: visible;
        display: flex;
        flex-direction: column;
    }
    .chat-contact-dialog::before { content: none; }
    .chat-contact-dialog .modal-content {
        padding: 63px 20px 18px;
        gap: 15px;
        overflow-y: auto;
        scrollbar-width: none;
        border-radius: 22px 22px 0 0;
        background: var(--chat-contact-paper);
        min-height: 0;
        flex: 1 1 auto;
    }
    .chat-contact-dialog .modal-content::-webkit-scrollbar { display: none; }

    /* 初始头像使用桌面第一页中间左侧组件头像占位逻辑：灰底 + Ta 文案 */
    .chat-contact-avatar-picker {
        width: 82px;
        height: 82px;
        min-width: 82px;
        min-height: 82px;
        margin: 0;
        border-radius: 50%;
        border: 0;
        box-sizing: border-box;
        background: #F2F3F4;
        box-shadow: 0 7px 18px rgba(120, 130, 140, 0.08);
        position: absolute;
        top: -41px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 3;
        flex: 0 0 82px;
        overflow: visible;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
    }
    .chat-contact-avatar-picker:active { opacity: 0.82; }
    .chat-contact-avatar-picker::before {
        content: 'Ta';
        position: absolute;
        inset: 0;
        border-radius: inherit;
        background: #F3F4F5;
        color: #C1C5CA;
        display: flex;
        align-items: center;
        justify-content: center;
        font-family: Georgia, "Times New Roman", serif;
        font-size: 25px;
        font-style: italic;
        letter-spacing: 0.06em;
        z-index: 2;
        overflow: hidden;
    }
    .chat-contact-avatar-picker.has-image::before { display: none; }
    .chat-contact-avatar-picker::after {
        content: '';
        position: absolute;
        inset: -3px;
        border-radius: inherit;
        border: 3px solid #ffffff;
        box-shadow: 0 -1px 0 rgba(74, 78, 89, 0.10);
        pointer-events: none;
        z-index: 4;
        clip-path: inset(0 0 50% 0);
    }
    .chat-contact-avatar-picker.is-group {
        border-radius: 28px;
    }
    .chat-contact-avatar-picker.is-group::before { content: '群'; font-size: 19px; font-style: normal; }
    .chat-contact-avatar-picker.chat-mask-preset-avatar::before { content: 'Me'; font-size: 25px; font-style: italic; }
    .chat-contact-form-note {
        margin: -1px 0 1px;
        text-align: center;
        font-size: 10px;
        line-height: 1;
        letter-spacing: 0.22em;
        color: #b0b6c0;
        font-family: "Courier New", Courier, monospace;
        text-transform: uppercase;
    }
    .chat-contact-field {
        display: flex;
        flex-direction: column;
        gap: 9px;
        padding: 0;
        border: 0;
    }
    .chat-contact-field + .chat-contact-field { padding-top: 1px; }
    .chat-contact-field span,
    .chat-contact-option-title {
        font-size: 10px;
        line-height: 1;
        letter-spacing: 0.18em;
        color: var(--chat-contact-muted);
        text-transform: uppercase;
    }
    .chat-contact-input,
    .chat-contact-textarea {
        width: 100%;
        border: 1px solid transparent;
        border-radius: 14px;
        background: var(--chat-contact-field);
        color: #4a4e59;
        outline: none;
        padding: 13px 14px;
        font-size: 13px;
        line-height: 1.45;
        user-select: text;
        -webkit-user-select: text;
        transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    }
    .chat-contact-textarea {
        min-height: 92px;
        resize: vertical;
    }
    .chat-contact-select {
        appearance: none;
        -webkit-appearance: none;
        background-image: linear-gradient(45deg, transparent 50%, #9aa0ab 50%), linear-gradient(135deg, #9aa0ab 50%, transparent 50%);
        background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
        background-size: 5px 5px, 5px 5px;
        background-repeat: no-repeat;
        padding-right: 34px;
    }
    .chat-contact-input.is-required-missing,
    .chat-contact-textarea.is-required-missing,
    .chat-contact-select.is-required-missing {
        border-color: #111111;
        background-color: #ffffff;
        box-shadow: 0 0 0 3px rgba(17,17,17,0.08);
    }
    .chat-contact-input::placeholder,
    .chat-contact-textarea::placeholder { color: #aeb4be; }
    .chat-contact-input:focus,
    .chat-contact-textarea:focus {
        background: transparent;
        border-color: rgba(17,17,17,0.34);
        box-shadow: none;
    }
    .chat-contact-checks,
    .chat-preset-options {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        padding-top: 1px;
    }
    .chat-preset-options .chat-contact-select {
        flex: 1 1 100%;
    }
    .chat-contact-chip,
    .chat-preset-chip {
        min-height: 32px;
        border: 1px solid #eef0f3;
        border-radius: 999px;
        background: #f8f8f8;
        color: #6b7280;
        padding: 0 12px;
        font-size: 11px;
        letter-spacing: 0.06em;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
    }
    .chat-contact-chip input,
    .chat-preset-chip input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }
    .chat-contact-chip:has(input:checked),
    .chat-preset-chip:has(input:checked) {
        background: #4a4e59;
        border-color: #4a4e59;
        color: #ffffff;
    }
    .chat-contact-option-empty {
        width: 100%;
        min-height: 32px;
        display: flex;
        align-items: center;
        color: #aeb4be;
        font-size: 11px;
        letter-spacing: 0.06em;
        line-height: 1.45;
    }
    .chat-contact-note-lines {
        margin-top: -2px;
        color: #aeb4be;
        font-size: 10px;
        line-height: 1.6;
        letter-spacing: 0.04em;
    }
    .chat-contact-import-line {
        display: none;
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        padding: 0 0 2px;
    }
    .chat-contact-modal.is-import-contact .chat-contact-import-line { display: grid; }
    .chat-contact-import-btn {
        min-height: 42px;
        border: 1px solid var(--chat-contact-line);
        border-radius: 14px;
        background: var(--chat-contact-field);
        color: var(--chat-contact-ink);
        font-size: 12px;
        letter-spacing: 0.12em;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    .chat-contact-import-btn:active { background: #ffffff; }
    .chat-contact-import-name {
        color: #aeb4be;
        font-size: 10px;
        line-height: 1.45;
        letter-spacing: 0.06em;
        text-align: center;
    }


    .chat-bottom-dock {
        position: absolute;
        left: 50%;
        bottom: max(18px, env(safe-area-inset-bottom));
        z-index: 5;
        width: min(294px, calc(100% - 48px));
        height: 70px;
        transform: translateX(-50%);
        border-radius: 999px;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        align-items: center;
        gap: 10px;
        padding: 8px;
        background: rgba(252,251,247,0.88);
        border: 1px solid rgba(255,255,255,0.72);
        box-shadow: 0 18px 42px rgba(70, 73, 79, 0.13), inset 0 1px 0 rgba(255,255,255,0.86);
    }
    .chat-dock-btn {
        width: 54px;
        height: 54px;
        justify-self: center;
        border: 0;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        color: #88919E;
        cursor: pointer;
        transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
    }
    .chat-dock-btn svg { width: 21px; height: 21px; stroke: currentColor; stroke-width: 1.55; fill: none; stroke-linecap: round; stroke-linejoin: round; }
    .chat-dock-dynamic-icon { overflow: visible; }
    .chat-dock-dynamic-icon path,
    .chat-dock-dynamic-icon circle { vector-effect: non-scaling-stroke; }
    .chat-dock-dynamic-icon path { stroke-width: 1.42; }
    .chat-dock-dynamic-icon circle { stroke-width: 1.36; }
    .chat-dock-btn.active {
        color: #2F333A;
        background: #FFFFFF;
        box-shadow: 0 8px 18px rgba(74,78,89,0.09), inset 0 0 0 1px rgba(255,255,255,0.9);
    }
    .chat-dock-btn:active { transform: scale(0.94); }
    /* 聊天提示统一复用设置页居中系统通知样式，避免另起一套黑色 toast。 */

    body.show-phone-shell .chat-app-page {
        left: 50%;
        top: 50%;
        right: auto;
        bottom: auto;
        width: var(--one-shell-base-width, 390px);
        height: var(--one-shell-base-height, 844px);
        border-radius: calc(var(--one-shell-scale, 1) * 38px);
        overflow: hidden;
        transform: translate(-50%, -48%) scale(var(--one-shell-scale, 1));
        transform-origin: center center;
    }
    body.show-phone-shell .chat-app-page.show { transform: translate(-50%, -50%) scale(var(--one-shell-scale, 1)); }
    body.shell-switching .chat-app-page { transition: none; }
    @media (max-width: 365px) {
        .chat-view { padding-left: 20px; padding-right: 20px; }
        .chat-browser-tab { min-width: 104px; max-width: 142px; }
        .chat-me-head { gap: 10px; }
        .chat-me-identity { gap: 12px; }
        .chat-me-avatar-frame { flex-basis: 76px; width: 76px; height: 76px; }
        .chat-me-copy { min-height: 76px; }
        .chat-me-name { max-width: 124px; padding-right: 0.12em; }
        .chat-me-signature { max-width: 136px; }
        .chat-me-follow-copy { font-size: 9px; }
        .chat-me-status-pill { min-width: 76px; height: 30px; margin-top: 0; padding: 0 7px 0 12px; gap: 7px; letter-spacing: 0.04em; }
        .chat-me-tools { margin-top: 4px; }
        .chat-me-tool { min-height: 58px; padding-top: 12px; padding-bottom: 13px; padding-left: 10px; grid-template-columns: 30px minmax(0, 1fr) 16px; gap: 10px; }
        .chat-me-tool-title { font-size: 16px; }
        .chat-me-tool-subtitle { font-size: 7.5px; letter-spacing: 0.14em; }
        .chat-assets-shortcuts { gap: 6px; }
        .chat-assets-shortcut-icon { width: 44px; height: 44px; border-radius: 16px; }
        .chat-assets-shortcut { font-size: 10px; }
        .chat-assets-actions { right: 16px; top: 76px; }
        .chat-assets-action { min-width: 62px; padding: 0 12px; }
    }

    /* 简讯页弹窗统一回全局弹窗骨架 */
    .chat-news-start-dialog,
    .chat-news-char-dialog {
        max-width: 296px;
        background: #ffffff;
        border-radius: 22px;
        box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
    }
    .chat-news-start-dialog .modal-content,
    .chat-news-char-dialog .modal-content {
        padding: 24px 20px 20px;
        gap: 12px;
    }
    .chat-news-start-title,
    .chat-news-char-head strong {
        font-family: "Georgia", "Times New Roman", "Songti SC", serif;
        font-size: 17px;
        line-height: 1.08;
        font-style: italic;
        font-weight: 400;
        letter-spacing: 0.02em;
        color: #4a4e59;
        text-align: center;
        margin-top: 0;
    }
    .chat-news-start-kicker,
    .chat-news-char-head span {
        display: block;
        margin-top: 3px;
        font-family: "Courier New", Courier, monospace;
        font-size: 9px;
        line-height: 1;
        font-style: normal;
        font-weight: 400;
        letter-spacing: 0.18em;
        color: #a4abb5;
        text-align: center;
        text-transform: uppercase;
    }
    .chat-news-start-card {
        min-height: 54px;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        border-top: 1px solid #f0f2f5;
        padding: 10px 2px;
    }
    .chat-news-start-card:last-child { border-bottom: 1px solid #f0f2f5; }
    .chat-news-start-no {
        width: 28px;
        height: auto;
        border-radius: 0;
        background: transparent;
        color: #a6adb7;
        justify-content: flex-start;
    }
    .chat-news-start-copy strong {
        font-size: 14px;
        line-height: 1.08;
        font-weight: 400;
        color: #343941;
        margin-bottom: 3px;
    }
    .chat-news-start-copy em { font-size: 9px; line-height: 1; letter-spacing: 0.14em; text-transform: uppercase; }
    .chat-news-char-card {
        background: #fff;
        border: 1px solid #f0f2f5;
        box-shadow: none;
    }
    .chat-news-char-avatar { box-shadow: none; }

/* ==========================================================================
   [ASSETS EXTENSION] 银行卡 / 充值提现 / 股市模拟
   ========================================================================== */
.chat-app-page.asset-open .chat-bottom-dock,
.chat-bankcard-view.active ~ .chat-bottom-dock,
.chat-stock-view.active ~ .chat-bottom-dock { display: none; }

.chat-assets-action.is-disabled {
    opacity: 0.38;
    filter: grayscale(1);
}

.chat-bankcard-view,
.chat-stock-view {
    padding: max(42px, calc(env(safe-area-inset-top) + 26px)) 24px max(40px, calc(env(safe-area-inset-bottom) + 30px));
    background: transparent;
    color: var(--chat-ink);
    overflow-y: auto;
}
.chat-bankcard-head,
.chat-stock-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 18px;
    padding: 6px 0 18px;
}
.chat-bankcard-title,
.chat-stock-title {
    margin: 0;
    display: inline-block;
    font-family: Georgia, "Times New Roman", "Songti SC", serif;
    font-size: clamp(36px, 10vw, 44px);
    line-height: 0.92;
    letter-spacing: -0.085em;
    font-style: italic;
    font-weight: 400;
    color: #2F333A;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.chat-bankcard-title:active,
.chat-stock-title:active { opacity: 0.66; }

.chat-bankcard-title-wrap,
.chat-stock-title-wrap {
    min-width: 0;
}
.chat-bankcard-title-wrap .chat-assets-kicker,
.chat-stock-title-wrap .chat-assets-kicker {
    margin: 10px 0 0;
}
.chat-bankcard-title-wrap .chat-assets-subtitle,
.chat-stock-title-wrap .chat-assets-subtitle {
    margin-top: 7px;
}
.chat-bankcard-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 24px;
    padding-right: 2px;
}
.chat-bankcard-icon {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: #ffffff;
    color: rgba(52,57,65,0.74);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px rgba(74,78,89,0.07), 0 10px 22px rgba(74,78,89,0.08);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.chat-bankcard-icon:first-child { background: #343941; color: #fff; }
.chat-bankcard-icon svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.chat-bankcard-icon:active { transform: translateY(1px); }
.chat-bankcard-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 6px;
}
.chat-bankcard-list:not(.has-cards) {
    display: none;
}
.chat-bankcard-list.has-cards {
    display: flex;
}
.chat-bankcard-empty {
    min-height: 260px;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #A3AAB5;
    text-align: left;
}
.chat-bankcard-empty.show { display: flex; }
.chat-bankcard-empty strong {
    color: #7E8793;
    font-size: 14px;
    letter-spacing: 0.08em;
}
.chat-bankcard-empty span {
    color: #B3BAC4;
    font-size: 11px;
    line-height: 1.5;
    letter-spacing: 0.05em;
}

/* One Phone 资产页纸感：细线账本、低饱和卡面、轻金属芯片 */
.chat-bankcard-list {
    display: flex;
    flex-direction: row;
    gap: 14px;
    margin: -6px -24px 0;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 46px;
    padding: 30px 46px 62px;
    -webkit-overflow-scrolling: touch;
}
.chat-bankcard-list:not(.has-cards) { display: none; }
.chat-bankcard-list.has-cards { display: flex; }
.chat-bank-card {
    flex: 0 0 min(336px, calc(100vw - 92px));
    width: min(336px, calc(100vw - 92px));
    height: 194px;
    border-radius: 18px;
    padding: 18px 18px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    scroll-snap-align: start;
    color: #2B2924;
    background:
        radial-gradient(circle at 1px 1px, rgba(29,28,26,0.045) 1px, transparent 1.2px) 0 0 / 13px 13px,
        linear-gradient(145deg, #FFFDF8 0%, #F6F1E8 100%);
    border: 0.5px solid rgba(188,163,127,0.46);
    box-shadow: 0 18px 38px rgba(76, 62, 45, 0.10), inset 0 1px 0 rgba(255,255,255,0.72);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    isolation: isolate;
}
.chat-bank-card:active { transform: scale(0.985); box-shadow: 0 10px 28px rgba(76, 62, 45, 0.10), inset 0 1px 0 rgba(255,255,255,0.72); }
.chat-bank-card::before,
.chat-bank-card::after {
    content: '';
    position: absolute;
    pointer-events: none;
    z-index: 0;
}
.chat-bank-card::before {
    inset: 12px;
    border: 0.5px solid rgba(188,163,127,0.34);
    border-radius: 12px;
}
.chat-bank-card::after {
    right: -38px;
    top: -42px;
    width: 156px;
    height: 156px;
    border-radius: 50%;
    border: 0.5px dashed rgba(188,163,127,0.42);
    opacity: 0.72;
}
.chat-bank-card > * { position: relative; z-index: 1; }
.chat-bank-card-seal {
    position: absolute;
    right: 18px;
    bottom: 16px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 0.5px solid rgba(188,163,127,0.42);
    display: grid;
    place-items: center;
    opacity: 0.56;
}
.chat-bank-card-seal span {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 0.5px dashed currentColor;
    opacity: 0.5;
}
.chat-bank-card-top,
.chat-bank-card-bottom,
.chat-bank-card-number-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
}
.chat-bank-card-bank {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.chat-bank-card-bank em,
.chat-bank-card-number-row span,
.chat-bank-card-balance span,
.chat-bank-card-mark {
    font-style: normal;
    font-family: "Courier New", Courier, monospace;
    font-size: 8.5px;
    line-height: 1;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: rgba(140,122,95,0.82);
}
.chat-bank-card-bank strong {
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: Georgia, "Times New Roman", "Songti SC", serif;
    font-size: 19px;
    line-height: 1;
    font-weight: 400;
    letter-spacing: -0.02em;
    color: currentColor;
}
.chat-bank-card-chip {
    width: 40px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(145deg, rgba(244,223,169,0.96), rgba(176,143,82,0.88));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.65), inset 0 -1px 0 rgba(86,67,38,0.18), 0 6px 16px rgba(86,67,38,0.12);
    position: relative;
    overflow: hidden;
    flex: 0 0 auto;
}
.chat-bank-card-chip::before,
.chat-bank-card-chip::after {
    content: '';
    position: absolute;
    background: rgba(86,67,38,0.18);
}
.chat-bank-card-chip::before { left: 0; right: 0; top: 50%; height: 0.5px; }
.chat-bank-card-chip::after { top: 0; bottom: 0; left: 50%; width: 0.5px; }
.chat-bank-card-chip i {
    position: absolute;
    inset: 6px 9px;
    border: 0.5px solid rgba(86,67,38,0.20);
    border-radius: 4px;
}
.chat-bank-card-number-row {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 8px;
    border-top: 0;
    border-bottom: 0;
    padding: 8px 0 9px;
    margin: 0;
    min-width: 0;
}
.chat-bank-card-number-row span {
    flex: 0 0 auto;
    max-width: 100%;
}
.chat-bank-card-number-row b,
.chat-bank-card-number {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
    text-overflow: clip;
    text-align: left;
    font-family: "Courier New", Courier, monospace;
    font-size: 15px;
    line-height: 1.22;
    font-weight: 400;
    letter-spacing: 0.075em;
    color: currentColor;
    text-shadow: none;
    white-space: normal;
    overflow-wrap: anywhere;
}
.chat-bank-card-balance {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}
.chat-bank-card-balance strong {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 24px;
    line-height: 0.95;
    letter-spacing: -0.055em;
    font-weight: 500;
    font-family: Georgia, "Times New Roman", "Songti SC", serif;
    color: currentColor;
}
.chat-bank-card-mark {
    align-self: flex-end;
    padding: 5px 7px;
    border: 0.5px solid rgba(188,163,127,0.42);
    background: rgba(255,255,255,0.32);
    color: rgba(140,122,95,0.78);
}
.chat-bank-card-delete {
    display: none;
    position: absolute;
    right: 18px;
    top: 18px;
    width: 58px;
    height: 26px;
    border: 0.5px solid rgba(188,163,127,0.52);
    border-radius: 999px;
    background: rgba(255,255,255,0.72);
    color: currentColor;
    font-size: 9px;
    letter-spacing: 0.14em;
    cursor: pointer;
    z-index: 3;
}
.chat-bankcard-view.is-manage .chat-bank-card-delete { display: block; }
.chat-bank-card.bk-black {
    color: #E7D4A8;
    background:
        radial-gradient(circle at 1px 1px, rgba(255,255,255,0.055) 1px, transparent 1.2px) 0 0 / 13px 13px,
        linear-gradient(145deg, #2D2B27 0%, #11100F 100%);
    border-color: rgba(188,163,127,0.50);
    box-shadow: 0 22px 44px rgba(17,16,15,0.20), inset 0 1px 0 rgba(255,255,255,0.08);
}
.chat-bank-card.bk-black .chat-bank-card-bank em,
.chat-bank-card.bk-black .chat-bank-card-number-row span,
.chat-bank-card.bk-black .chat-bank-card-balance span,
.chat-bank-card.bk-black .chat-bank-card-mark { color: rgba(231,212,168,0.66); }
.chat-bank-card.bk-black::before { border-color: rgba(231,212,168,0.28); }
.chat-bank-card.bk-platinum {
    color: #34312B;
    background:
        radial-gradient(circle at 1px 1px, rgba(29,28,26,0.04) 1px, transparent 1.2px) 0 0 / 13px 13px,
        linear-gradient(145deg, #FFFDF8 0%, #F2EDE2 100%);
}
.chat-bank-card.bk-gold {
    color: #4A3B25;
    background:
        radial-gradient(circle at 1px 1px, rgba(74,59,37,0.045) 1px, transparent 1.2px) 0 0 / 13px 13px,
        linear-gradient(145deg, #FBF0D9 0%, #E8D4AD 100%);
    border-color: rgba(168,126,59,0.40);
}
.chat-bank-card.bk-blue {
    color: #25303B;
    background:
        radial-gradient(circle at 1px 1px, rgba(37,48,59,0.045) 1px, transparent 1.2px) 0 0 / 13px 13px,
        linear-gradient(145deg, #F6F8F8 0%, #DDE7EA 100%);
    border-color: rgba(103,132,143,0.34);
}
.chat-bank-card.bk-cyber {
    color: #2F382F;
    background:
        radial-gradient(circle at 1px 1px, rgba(47,56,47,0.045) 1px, transparent 1.2px) 0 0 / 13px 13px,
        linear-gradient(145deg, #F8F7F1 0%, #DDE5D8 100%);
    border-color: rgba(116,135,108,0.34);
}

@media (max-width: 360px) {
    .chat-bankcard-list {
        margin-left: -18px;
        margin-right: -18px;
        padding-left: 36px;
        padding-right: 36px;
        scroll-padding-left: 36px;
    }
    .chat-bank-card {
        flex-basis: min(316px, calc(100vw - 72px));
        width: min(316px, calc(100vw - 72px));
    }
    .chat-bank-card-number-row b,
    .chat-bank-card-number {
        font-size: 13px;
        letter-spacing: 0.05em;
    }
}

.chat-bankcard-dialog,
.chat-asset-amount-dialog {
    max-width: 314px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}
.chat-bankcard-modal-copy,
.chat-asset-amount-copy {
    color: #87909D;
    font-size: 11px;
    line-height: 1.65;
    letter-spacing: 0.04em;
    text-align: center;
    margin-top: -8px;
}
.chat-bankcard-field {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}
.chat-bankcard-field span {
    color: #A0A7B1;
    font-family: "Courier New", Courier, monospace;
    font-size: 9px;
    line-height: 1;
    letter-spacing: 0.16em;
}
.chat-bankcard-input {
    border-radius: 12px;
    background: #F5F6F8;
    color: #4F5864;
    font-size: 13px;
    padding: 12px 12px;
}
.chat-bankcard-input:focus {
    border: 1px solid rgba(52,57,65,0.34);
    box-shadow: none;
}

.chat-stock-ticker {
    position: relative;
    min-height: 178px;
    margin-top: 6px;
    padding: 2px 0 0;
    border-radius: 0;
    overflow: visible;
    background: transparent;
    box-shadow: none;
    border: 0;
}
.chat-stock-ticker-top,
.chat-stock-section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
}
.chat-stock-ticker-top span,
.chat-stock-ticker-top em,
.chat-stock-section-head span {
    color: #A0A7B1;
    font-family: "Courier New", Courier, monospace;
    font-size: 9px;
    line-height: 1;
    letter-spacing: 0.18em;
    font-style: normal;
}
.chat-stock-index {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-top: 18px;
}
.chat-stock-index strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 48px;
    line-height: 0.9;
    letter-spacing: -0.06em;
    font-style: italic;
    color: #343941;
}
.chat-stock-index span,
.chat-stock-sheet-price span,
.chat-stock-project-delta {
    color: #B45F51;
    font-family: "Courier New", Courier, monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
}
.chat-stock-index span.is-down,
.chat-stock-sheet-price span.is-down,
.chat-stock-project-delta.is-down { color: #4E7E6B; }
.chat-stock-chart {
    width: 100%;
    height: 86px;
    margin-top: 8px;
    overflow: visible;
}
.chat-stock-chart path {
    fill: none;
    stroke: #343941;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.72;
}
.chat-stock-ticker-items {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 16px;
    margin-top: 12px;
    padding-top: 13px;
    border-top: 1px solid rgba(150,158,168,0.16);
}
.chat-stock-ticker-item {
    min-width: 0;
    padding: 10px 0 9px;
    border: 0;
    border-bottom: 1px solid rgba(150,158,168,0.12);
    background: transparent;
    color: #343941;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "name delta" "price price";
    align-items: end;
    column-gap: 10px;
    text-align: left;
    cursor: pointer;
}
.chat-stock-ticker-item span {
    grid-area: name;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #707984;
    font-size: 10px;
    line-height: 1;
    letter-spacing: 0.1em;
}
.chat-stock-ticker-item strong {
    grid-area: price;
    margin-top: 6px;
    color: #343941;
    font-family: "Courier New", Courier, monospace;
    font-size: 13px;
    line-height: 1;
    letter-spacing: 0.02em;
}
.chat-stock-ticker-item em {
    grid-area: delta;
    color: #B45F51;
    font-family: "Courier New", Courier, monospace;
    font-size: 10px;
    line-height: 1;
    letter-spacing: 0.06em;
    font-style: normal;
}
.chat-stock-ticker-item em.is-down { color: #4E7E6B; }
.chat-stock-ticker-item:active { opacity: 0.58; }
.chat-stock-events,
.chat-stock-projects { margin-top: 24px; }
.chat-stock-section-head {
    padding-bottom: 13px;
    border-bottom: 1px solid rgba(150,158,168,0.16);
}
.chat-stock-section-head h3 {
    margin: 0;
    font-family: Georgia, "Times New Roman", "Songti SC", serif;
    font-size: 22px;
    line-height: 1;
    font-style: italic;
    letter-spacing: -0.04em;
    color: #4F5864;
}
.chat-stock-event-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 14px;
}
.chat-stock-event {
    display: grid;
    grid-template-columns: 68px minmax(0,1fr);
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid rgba(150,158,168,0.12);
}
.chat-stock-event time {
    color: #B4BAC4;
    font-family: "Courier New", Courier, monospace;
    font-size: 9px;
    letter-spacing: 0.14em;
}
.chat-stock-event p {
    margin: 0;
    color: #68717D;
    font-size: 12px;
    line-height: 1.55;
    letter-spacing: 0.03em;
}
.chat-stock-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 15px;
}
.chat-stock-project {
    border: 0;
    border-radius: 0;
    padding: 14px 0;
    background: transparent;
    color: #4F5864;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid rgba(150,158,168,0.16);
    cursor: pointer;
    text-align: left;
}
.chat-stock-project h4 {
    margin: 0 0 6px;
    font-family: Georgia, "Times New Roman", "Songti SC", serif;
    font-size: 19px;
    line-height: 1;
    letter-spacing: -0.04em;
    font-style: italic;
    color: #343941;
}
.chat-stock-project p {
    margin: 0;
    color: #9AA2AD;
    font-size: 11px;
    line-height: 1;
    letter-spacing: 0.08em;
}
.chat-stock-project-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}
.chat-stock-project-price strong {
    color: #343941;
    font-family: "Courier New", Courier, monospace;
    font-size: 14px;
    line-height: 1;
}

.chat-bottom-sheet-modal {
    padding: 24px;
    align-items: center;
    justify-content: center;
    background: rgba(30, 30, 35, 0.4);
}
.chat-bottom-sheet {
    width: 100%;
    max-width: 296px;
    max-height: calc(100dvh - 48px);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
    transform: translateY(10px) scale(0.98);
    transition: transform 0.26s cubic-bezier(0.22, 0.74, 0.22, 1), opacity 0.22s ease;
    padding: 24px 20px 18px;
    overflow-y: auto;
}
.chat-bottom-sheet-modal.show .chat-bottom-sheet { transform: translateY(0) scale(1); }
.chat-bottom-sheet-grabber {
    display: none;
}
.chat-stock-sheet-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}
.chat-stock-sheet-head span {
    display: block;
    margin-bottom: 7px;
    color: #A0A7B1;
    font-family: "Courier New", Courier, monospace;
    font-size: 9px;
    line-height: 1;
    letter-spacing: 0.18em;
}
.chat-stock-sheet-head h3 {
    margin: 0;
    font-family: Georgia, "Times New Roman", "Songti SC", serif;
    font-size: 24px;
    line-height: 1.02;
    letter-spacing: -0.055em;
    font-style: italic;
    color: #343941;
}
.chat-stock-ask {
    height: 28px;
    padding: 0 10px 0 7px;
    border: 0;
    border-radius: 999px;
    background: #F4F5F8;
    color: rgba(52,57,65,0.64);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    letter-spacing: 0.08em;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(74,78,89,0.055);
}
.chat-stock-ask-mark {
    width: 16px;
    height: 16px;
    border: 1px solid rgba(52,57,65,0.20);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 16px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 10px;
    line-height: 1;
    font-style: italic;
}
.chat-stock-ask:active { opacity: 0.58; }
.chat-stock-sheet-body { padding-top: 20px; }
.chat-stock-sheet-price {
    display: flex;
    align-items: baseline;
    gap: 9px;
    margin-bottom: 18px;
}
.chat-stock-sheet-price strong {
    color: #343941;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 38px;
    line-height: 0.9;
    letter-spacing: -0.055em;
    font-style: italic;
}
.chat-stock-sheet-meta {
    padding: 14px 0;
    border-top: 1px solid rgba(150,158,168,0.16);
    border-bottom: 1px solid rgba(150,158,168,0.16);
}
.chat-stock-sheet-meta span,
.chat-stock-sheet-grid span {
    color: #A0A7B1;
    font-family: "Courier New", Courier, monospace;
    font-size: 9px;
    line-height: 1;
    letter-spacing: 0.16em;
}
.chat-stock-sheet-meta p {
    margin: 8px 0 0;
    color: #68717D;
    font-size: 12px;
    line-height: 1.65;
    letter-spacing: 0.03em;
}
.chat-stock-sheet-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding-top: 14px;
}
.chat-stock-sheet-grid div {
    min-height: 66px;
    padding: 13px 12px;
    border-radius: 18px;
    background: #F6F7F8;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.chat-stock-sheet-grid strong {
    color: #343941;
    font-family: "Courier New", Courier, monospace;
    font-size: 13px;
    line-height: 1;
}
.chat-stock-sheet-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}
.chat-stock-sheet-actions button {
    height: 46px;
    border: 0;
    border-radius: 0;
    background: #343941;
    color: #fff;
    font-size: 13px;
    letter-spacing: 0.12em;
    cursor: pointer;
}
.chat-stock-sheet-actions button + button {
    background: #F2F3F5;
    color: #4F5864;
}

/* Chat APP：红包 / 转账实装卡片与支付弹窗 */
.chat-thread-bubble.is-redpacket-card,
.chat-thread-bubble.is-transfer-card {
    width: 220px;
    height: 120px;
    min-height: 120px;
    padding: 0;
    overflow: hidden;
    border-radius: 14px;
    background: transparent;
    box-shadow: none;
}
.chat-thread-pay-card {
    position: relative;
    width: 220px;
    height: 120px;
    border: 0;
    border-radius: 14px;
    padding: 14px 15px 12px;
    box-sizing: border-box;
    overflow: hidden;
    appearance: none;
    -webkit-appearance: none;
    text-align: left;
    color: #000;
    background: #f7f1ed;
    box-shadow: 0 6px 14px rgba(52, 56, 65, 0.035);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.chat-thread-pay-card.is-transfer {
    background: #eef3f3;
    box-shadow: 0 6px 14px rgba(52, 56, 65, 0.032);
}
.chat-thread-pay-card::before {
    content: none;
}
.chat-thread-pay-card::after {
    content: '';
    position: absolute;
    z-index: 1;
    left: 15px;
    right: 15px;
    bottom: 28px;
    height: 1px;
    background: rgba(52, 56, 65, 0.095);
    transform: scaleY(0.7);
    transform-origin: center;
}
.chat-thread-pay-card.is-transfer::after {
    background: rgba(52, 56, 65, 0.085);
}
.chat-thread-pay-card:active { transform: translateY(1px); }
.chat-thread-pay-meta {
    position: absolute;
    z-index: 2;
    left: 15px;
    bottom: 11px;
    color: rgba(52, 56, 65, 0.38);
    font-family: "Courier New", Courier, monospace;
    font-size: 8.5px;
    line-height: 1;
    letter-spacing: 0.12em;
    text-transform: none;
}
.chat-thread-pay-title {
    position: relative;
    z-index: 2;
    margin-top: 2px;
    font-family: Georgia, "Times New Roman", "Songti SC", serif;
    font-size: 17px;
    line-height: 0.98;
    letter-spacing: -0.02em;
    color: #000;
    font-weight: 400;
}
.chat-thread-pay-money {
    position: relative;
    z-index: 2;
    margin-top: 7px;
    font-style: normal;
    font-size: 15px;
    line-height: 1;
    letter-spacing: 0.01em;
    color: rgba(52, 56, 65, 0.76);
}
.chat-thread-pay-desc {
    position: relative;
    z-index: 2;
    max-width: 150px;
    margin-top: 6px;
    color: rgba(52, 56, 65, 0.50);
    font-size: 10px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chat-thread-pay-foot {
    position: absolute;
    z-index: 2;
    right: 15px;
    bottom: 11px;
    max-width: 120px;
    color: rgba(52, 56, 65, 0.38);
    font-family: "Courier New", Courier, monospace;
    font-size: 8.5px;
    line-height: 1;
    letter-spacing: 0.12em;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: none;
}
.chat-thread-pay-icon {
    position: absolute;
    z-index: 1;
    right: -68px;
    top: -22px;
    width: 212px;
    height: 122px;
    border-radius: 0;
    border: 0;
    color: rgba(52,56,65,0.075);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 43px;
    font-weight: 700;
    font-style: italic;
    letter-spacing: -0.08em;
    line-height: 0.82;
    text-align: right;
    background: transparent;
    transform: rotate(-9deg);
}
.chat-redpacket-modal,
.chat-transfer-modal,
.chat-pay-status-modal { z-index: 10000; }
.chat-pay-send-dialog,
.chat-pay-status-dialog {
    max-width: 296px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}
.chat-pay-send-content { gap: 15px; }
.chat-pay-send-head {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 3px;
    text-align: left;
}
.chat-pay-send-head span,
.chat-pay-send-field span {
    font-family: "Courier New", Courier, monospace;
    font-size: 9px;
    line-height: 1;
    letter-spacing: 0.18em;
    color: rgba(52,57,65,0.45);
    text-transform: uppercase;
}
.chat-pay-send-head strong {
    font-family: Georgia, "Times New Roman", "Songti SC", serif;
    font-size: 24px;
    line-height: 0.96;
    letter-spacing: -0.03em;
    color: #000;
}
.chat-pay-send-head em {
    font-style: normal;
    font-size: 12px;
    line-height: 1.6;
    color: rgba(52,57,65,0.52);
}
.chat-pay-send-field {
    display: flex;
    flex-direction: column;
    gap: 9px;
}
.chat-pay-send-input,
.chat-pay-send-textarea {
    width: 100%;
    box-sizing: border-box;
    border-radius: 12px;
    background: #f6f4ef;
    color: #000;
    user-select: text;
    -webkit-user-select: text;
}
.chat-pay-send-textarea {
    min-height: 70px;
    resize: none;
    line-height: 1.58;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.chat-pay-send-dialog .btn-save.is-loading,
.chat-pay-send-dialog .btn-save:disabled {
    opacity: 0.48;
    pointer-events: none;
}
.chat-pay-method-select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 36px;
    background-image: linear-gradient(45deg, transparent 50%, #9aa0ab 50%), linear-gradient(135deg, #9aa0ab 50%, transparent 50%);
    background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}
.chat-pay-status-content { gap: 16px; }
.chat-pay-status-card {
    position: relative;
    min-height: 118px;
    border-radius: 16px;
    padding: 16px 17px;
    overflow: hidden;
    background: #f7f1ed;
    border: 0;
    color: #000;
}
.chat-pay-status-card.is-transfer {
    background: #eef3f3;
}
.chat-pay-status-card::after {
    content: none;
}
.chat-pay-status-card span {
    display: block;
    font-family: "Courier New", Courier, monospace;
    font-size: 9px;
    letter-spacing: 0.18em;
    color: rgba(52,57,65,0.46);
    text-transform: uppercase;
}
.chat-pay-status-card strong {
    display: block;
    margin-top: 14px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 21px;
    line-height: 0.96;
    color: #000;
}
.chat-pay-status-card em {
    display: block;
    margin-top: 8px;
    font-style: normal;
    font-size: 16px;
    color: rgba(52,57,65,0.78);
}
.chat-pay-status-lines {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid rgba(52,57,65,0.08);
}
.chat-pay-status-lines div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(52,57,65,0.06);
}

.chat-pay-status-lines div[hidden],
.chat-pay-status-lines div.is-hidden {
    display: none;
}
.chat-pay-status-lines span {
    color: rgba(52,57,65,0.42);
    font-family: "Courier New", Courier, monospace;
    font-size: 9px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    white-space: nowrap;
}
.chat-pay-status-lines strong {
    min-width: 0;
    max-width: 180px;
    color: rgba(52,57,65,0.74);
    font-size: 12px;
    line-height: 1.42;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chat-pay-pass-modal { z-index: 14000; }


/* Chat AI system / recall rows */
.chat-thread-row.is-system {
    justify-content: center;
    padding: 4px 0 6px;
}
.chat-thread-bubble.is-system-text {
    min-height: 0;
    max-width: 78%;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(52, 57, 65, 0.10);
    color: rgba(52, 57, 65, 0.52);
    font-size: 11px;
    line-height: 1.25;
    letter-spacing: 0.02em;
    text-align: center;
    box-shadow: none;
}
.chat-thread-bubble.is-system-text::before,
.chat-thread-bubble.is-system-text::after {
    display: none;
}

/* ============================================================
   CHAT BUBBLE QUICK ACTION BAR
   Source-level long-press toolbar for chat bubbles. Paper style,
   two horizontal pages, no glass / no emoji.
   ============================================================ */
.chat-thread-row {
    position: relative;
}
.chat-thread-row.is-quickbar-row::before,
.chat-thread-row.is-wallpaper-flash::before {
    content: '';
    position: absolute;
    left: -12px;
    right: -12px;
    top: -6px;
    bottom: -6px;
    z-index: 0;
    border-radius: 20px;
    background: rgba(52, 56, 65, 0.14);
    pointer-events: none;
    animation: chat-wallpaper-area-pulse 1.28s ease-in-out infinite;
}
.chat-thread-row > * {
    position: relative;
    z-index: 1;
}
@keyframes chat-wallpaper-area-pulse {
    0%, 100% { opacity: 0.18; }
    50% { opacity: 0.48; }
}
.chat-quickbar {
    position: fixed;
    left: 12px;
    top: 120px;
    width: min(330px, calc(100vw - 16px));
    min-height: 64px;
    z-index: 18000;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) 30px;
    align-items: center;
    gap: 3px;
    padding: 7px 8px;
    border-radius: 22px;
    background: #F8F9FB;
    color: #000;
    border: 1px solid rgba(52, 56, 65, 0.075);
    box-shadow: 0 16px 38px rgba(40, 44, 52, 0.13);
    opacity: 0;
    transform: translateY(8px) scale(0.98);
    pointer-events: none;
    transition: opacity .16s ease, transform .16s ease;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
.chat-quickbar.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.chat-quickbar::after,
.chat-quickbar.is-below::after {
    content: none;
    display: none;
}
.chat-quickbar-window {
    overflow: hidden;
    width: 100%;
    min-width: 0;
}
.chat-quickbar-track {
    width: 200%;
    display: flex;
    transition: transform .22s cubic-bezier(.22, .9, .24, 1);
    will-change: transform;
}
.chat-quickbar-page {
    width: 50%;
    flex: 0 0 50%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px;
}
.chat-quickbar button {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    margin: 0;
    padding: 0;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}
.chat-quickbar-page button {
    height: 48px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
    transition: background .16s ease, opacity .16s ease, transform .16s ease;
}
.chat-quickbar-page button:active,
.chat-quickbar-nav:active {
    transform: scale(0.96);
    background: rgba(52, 56, 65, 0.06);
}
.chat-quickbar-page button.is-disabled {
    opacity: .32;
    pointer-events: none;
}
.chat-quickbar-page button span {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 11px;
    line-height: 1;
    letter-spacing: .04em;
    font-weight: 650;
    color: rgba(52, 56, 65, .88);
}
.chat-quickbar-page button em {
    font-style: normal;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 9px;
    line-height: 1;
    letter-spacing: .10em;
    color: rgba(52, 56, 65, .50);
}
.chat-quickbar-nav {
    width: 30px;
    height: 48px;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 25px;
    line-height: 1;
    font-weight: 300;
    color: rgba(52, 56, 65, .62);
}
.chat-quickbar-dots {
    display: none;
}
.chat-thread-bubble.is-text.has-quote,
.chat-thread-bubble.has-quote {
    text-align: left;
    white-space: normal;
    min-width: 150px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 6px;
}
.chat-thread-quote-preview {
    width: 100%;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
    margin: 0;
    padding: 7px 9px 7px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.34);
    border-left: 2px solid rgba(52, 56, 65, .18);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.chat-thread-row.is-ta .chat-thread-quote-preview {
    background: rgba(52, 56, 65, 0.045);
}
.chat-thread-quote-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}
.chat-thread-quote-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 9px;
    line-height: 1;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(52, 56, 65, .58);
}
.chat-thread-quote-time {
    flex: 0 0 auto;
    font-family: "Courier New", monospace;
    font-size: 9px;
    line-height: 1;
    letter-spacing: .04em;
    color: rgba(52, 56, 65, .38);
}
.chat-thread-row.is-me .chat-thread-quote-name,
.chat-thread-row.is-me .chat-thread-quote-time,
.chat-thread-row.is-me .chat-thread-quote-text {
    color: rgba(255,255,255,.72);
}
.chat-thread-quote-text {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    line-height: 1.25;
    color: rgba(52, 56, 65, .58);
}
.chat-thread-text-content {
    display: block;
    width: 100%;
    white-space: pre;
    text-align: left;
    line-height: 1.34;
    transform: translateY(0.5px);
}


/* Real-time translation: original message + quiet inline translation */
.chat-thread-bubble.is-text.has-translation {
    min-width: 138px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 7px;
    white-space: normal;
}
.chat-thread-bubble.has-translation .chat-thread-text-content {
    white-space: pre;
}
.chat-thread-translation {
    display: block;
    width: 100%;
    margin-top: 1px;
    padding-top: 7px;
    border-top: 1px solid rgba(52, 56, 65, 0.10);
    color: rgba(52, 56, 65, 0.58);
    font-size: 11px;
    line-height: 1.46;
    letter-spacing: 0.02em;
    white-space: pre;
    text-align: left;
}
.chat-thread-translation::before {
    content: attr(data-lang);
    display: block;
    margin-bottom: 4px;
    color: rgba(52, 56, 65, 0.36);
    font-family: "Courier New", Courier, monospace;
    font-size: 8.5px;
    line-height: 1;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.chat-thread-row.is-me .chat-thread-translation {
    border-top-color: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.70);
}
.chat-thread-row.is-me .chat-thread-translation::before {
    color: rgba(255, 255, 255, 0.46);
}


/* Ta · Diary / Inner Voice：纸感资料页与心声面板，避免厚重渐变与油腻高光 */
.chat-ta-diary-view {
    padding: max(38px, calc(env(safe-area-inset-top) + 22px)) 22px max(42px, calc(env(safe-area-inset-bottom) + 34px));
    background: transparent;
    color: var(--chat-ink);
}
.chat-ta-subpage-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 16px;
    margin-bottom: 18px;
}
.chat-ta-subpage-title {
    border: 0;
    padding: 0;
    background: transparent;
    text-align: left;
    color: var(--chat-ink);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.chat-ta-subpage-title span,
.chat-heart-kicker,
.chat-ta-diary-card-kicker,
.chat-ta-diary-card-mark,
.chat-ta-diary-paper-top span,
.chat-thread-diary-forward-kicker,
.chat-thread-diary-forward-tail {
    display: block;
    font-family: "Courier New", Courier, monospace;
    font-size: 9px;
    line-height: 1;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(52,57,65,0.42);
    font-style: normal;
}
.chat-ta-subpage-title strong {
    display: block;
    margin-top: 8px;
    font-family: Georgia, "Times New Roman", "Songti SC", serif;
    font-size: clamp(32px, 9.6vw, 42px);
    line-height: 0.92;
    letter-spacing: -0.075em;
    font-style: italic;
    font-weight: 400;
    color: #303740;
}
.chat-ta-subpage-close {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(74,78,89,0.20);
    border-radius: 50%;
    background: rgba(255,255,255,0.58);
    color: #535c67;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.chat-ta-subpage-close span {
    width: 8px;
    height: 8px;
    border-left: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateX(1px) rotate(45deg);
}
.chat-ta-diary-entry-page,
.chat-ta-diary-detail-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.chat-ta-diary-entry-page[hidden],
.chat-ta-diary-detail-page[hidden] { display: none; }
.chat-ta-diary-hero {
    position: relative;
    padding: 18px 0 17px;
    border-top: 1px solid rgba(117,124,135,0.14);
    border-bottom: 1px solid rgba(117,124,135,0.14);
}
.chat-ta-diary-hero h2 {
    margin: 9px 0 0;
    font-family: Georgia, "Times New Roman", "Songti SC", serif;
    font-size: 29px;
    line-height: 0.98;
    letter-spacing: -0.055em;
    font-style: italic;
    font-weight: 400;
    color: #343941;
}
.chat-ta-diary-hero p {
    margin: 10px 0 0;
    max-width: 29em;
    color: rgba(52,57,65,0.56);
    font-size: 12px;
    line-height: 1.66;
    letter-spacing: 0.04em;
}
.chat-ta-diary-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}
.chat-ta-diary-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.chat-ta-diary-card {
    position: relative;
    border: 1px solid rgba(117,124,135,0.14);
    border-radius: 24px;
    background: rgba(255,255,255,0.52);
    box-shadow: 0 14px 34px rgba(60, 64, 73, 0.055);
    overflow: hidden;
}
.chat-ta-diary-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: linear-gradient(to bottom, rgba(190,174,154,0.56), rgba(219,210,198,0.12));
    pointer-events: none;
}
.chat-ta-diary-card-main {
    width: 100%;
    border: 0;
    padding: 15px 16px 14px 18px;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.chat-ta-diary-card-mark {
    margin-bottom: 12px;
    color: rgba(52,57,65,0.34);
}
.chat-ta-diary-card-head {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 14px;
    align-items: start;
}
.chat-ta-diary-card-head strong {
    display: block;
    margin: 7px 0 0;
    color: #343941;
    font-family: Georgia, "Times New Roman", "Songti SC", serif;
    font-size: 21px;
    line-height: 1.06;
    letter-spacing: -0.04em;
    font-style: italic;
    font-weight: 400;
}
.chat-ta-diary-card time,
.chat-ta-diary-paper-top time {
    color: rgba(52,57,65,0.40);
    font-family: "Courier New", Courier, monospace;
    font-size: 9px;
    line-height: 1.2;
    letter-spacing: 0.12em;
    text-align: right;
}
.chat-ta-diary-card-meta,
.chat-ta-diary-detail-meta,
.chat-thread-diary-forward-meta {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.chat-ta-diary-card-meta span,
.chat-ta-diary-detail-meta span,
.chat-thread-diary-forward-meta em {
    border: 1px solid rgba(117,124,135,0.12);
    border-radius: 999px;
    padding: 5px 8px;
    background: rgba(255,255,255,0.48);
    color: rgba(52,57,65,0.54);
    font-style: normal;
    font-size: 11px;
    line-height: 1;
    letter-spacing: 0.04em;
}
.chat-ta-diary-card-excerpt {
    display: block;
    margin: 12px 0 0;
    color: rgba(52,57,65,0.62);
    font-size: 12px;
    line-height: 1.68;
    letter-spacing: 0.025em;
}
.chat-ta-diary-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid rgba(117,124,135,0.10);
}
.chat-ta-diary-card-actions button {
    border: 0;
    border-right: 1px solid rgba(117,124,135,0.10);
    padding: 10px 8px 11px;
    background: rgba(255,255,255,0.26);
    color: rgba(52,57,65,0.58);
    font-size: 12px;
    letter-spacing: 0.08em;
}
.chat-ta-diary-card-actions button:last-child {
    border-right: 0;
    color: rgba(132,74,74,0.58);
}
.chat-ta-diary-list:not(.is-managing) .chat-ta-diary-card-actions button:last-child { display: none; }
.chat-ta-diary-list:not(.is-managing) .chat-ta-diary-card-actions { grid-template-columns: 1fr; }
.chat-ta-diary-empty {
    display: none;
    min-height: 220px;
    place-items: center;
    text-align: center;
    color: rgba(52,57,65,0.44);
    font-size: 12px;
    line-height: 1.7;
    letter-spacing: 0.06em;
}
.chat-ta-diary-empty.show { display: grid; }
.chat-ta-diary-detail-back {
    align-self: flex-start;
    border: 0;
    padding: 0;
    background: transparent;
    color: rgba(52,57,65,0.58);
    font-size: 12px;
    letter-spacing: 0.08em;
}
.chat-ta-diary-paper {
    position: relative;
    border: 1px solid rgba(117,124,135,0.15);
    border-radius: 28px;
    padding: 20px 18px 22px;
    background:
        linear-gradient(rgba(117,124,135,0.055) 1px, transparent 1px) 0 88px / 100% 32px,
        rgba(255,255,255,0.58);
    box-shadow: 0 16px 38px rgba(60, 64, 73, 0.065);
}
.chat-ta-diary-paper::after {
    content: "✧";
    position: absolute;
    right: 18px;
    bottom: 16px;
    color: rgba(52,57,65,0.16);
    font-size: 18px;
}
.chat-ta-diary-paper-top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}
.chat-ta-diary-paper h2 {
    margin: 18px 0 0;
    color: #303740;
    font-family: Georgia, "Times New Roman", "Songti SC", serif;
    font-size: 29px;
    line-height: 1.02;
    letter-spacing: -0.055em;
    font-style: italic;
    font-weight: 400;
}
.chat-ta-diary-detail-body {
    margin-top: 18px;
    color: rgba(52,57,65,0.72);
    font-size: 14px;
    line-height: 2.05;
    letter-spacing: 0.025em;
    white-space: pre-wrap;
}
.chat-ta-diary-detail-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}
.chat-ta-diary-detail-forward,
.chat-ta-diary-detail-delete,
.chat-ta-diary-manage {
    border: 1px solid rgba(117,124,135,0.15);
    border-radius: 999px;
    background: rgba(255,255,255,0.58);
    color: rgba(52,57,65,0.70);
    padding: 11px 14px;
    font-size: 12px;
    letter-spacing: 0.06em;
}
.chat-ta-diary-detail-delete {
    color: rgba(132,74,74,0.68);
}
.chat-ta-diary-manage.is-active {
    background: rgba(52,57,65,0.08);
}
.chat-heart-modal {
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(35, 38, 44, 0.22);
}
.chat-heart-dialog {
    width: min(356px, calc(100vw - 36px));
    max-height: min(80vh, 640px);
    overflow: hidden;
    border-radius: 30px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.72), rgba(255,255,255,0) 34%),
        linear-gradient(135deg, #FFFFFF 0%, #F7F9FC 100%);
    color: #343941;
    border: 1px solid rgba(117,124,135,0.14);
    box-shadow: 0 24px 58px rgba(49, 48, 45, 0.13);
    position: relative;
}
.chat-heart-dialog::before {
    content: "";
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(117,124,135,0.10);
    border-radius: 24px;
    pointer-events: none;
    z-index: 1;
}
.chat-heart-dialog::after {
    content: "PRIVATE · INNER";
    position: absolute;
    right: 24px;
    top: 22px;
    font-family: "Courier New", Courier, monospace;
    font-size: 8.5px;
    line-height: 1;
    letter-spacing: 0.18em;
    color: rgba(52,57,65,0.30);
    pointer-events: none;
    z-index: 2;
}
.chat-heart-content {
    position: relative;
    z-index: 2;
    padding: 23px 22px 20px 26px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: min(80vh, 640px);
    overflow-y: auto;
    scrollbar-width: none;
}
.chat-heart-content::-webkit-scrollbar { display: none; }
.chat-heart-content::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 93px;
    bottom: 28px;
    width: 1px;
    background: linear-gradient(180deg, rgba(160, 171, 188, 0), rgba(160, 171, 188, 0.28), rgba(160, 171, 188, 0));
    pointer-events: none;
}
.chat-heart-content::after {
    content: "";
    position: absolute;
    right: 23px;
    bottom: 20px;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(160, 171, 188, 0.14);
    border-radius: 50%;
    box-shadow: inset 0 0 0 7px rgba(160, 171, 188, 0.035);
    pointer-events: none;
}
.chat-heart-head {
    position: relative;
    display: grid;
    grid-template-columns: 60px minmax(0,1fr);
    align-items: center;
    gap: 14px;
    padding: 2px 68px 17px 0;
    border-bottom: 1px solid rgba(117,124,135,0.14);
}
.chat-heart-head::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -1px;
    width: 64px;
    height: 1px;
    background: rgba(52,57,65,0.36);
}
.chat-heart-avatar {
    width: 60px;
    height: 60px;
    border-radius: 22px;
    background: #edf0f2;
    background-size: cover;
    background-position: center;
    display: grid;
    place-items: center;
    color: rgba(52,57,65,0.42);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 15px;
    font-style: italic;
    border: 1px solid rgba(255,255,255,0.92);
    box-shadow: inset 0 0 0 1px rgba(117,124,135,0.08), 0 10px 20px rgba(76,72,64,0.07);
}
.chat-heart-avatar.has-image { color: transparent; }
.chat-heart-name {
    min-width: 0;
}
.chat-heart-name strong {
    display: block;
    margin-top: 7px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: Georgia, "Times New Roman", "Songti SC", serif;
    font-size: 24px;
    line-height: 1.02;
    letter-spacing: -0.058em;
    font-weight: 400;
    font-style: italic;
    color: #343941;
}
.chat-heart-name em {
    display: block;
    margin-top: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(52,57,65,0.50);
    font-style: normal;
    font-size: 11px;
    line-height: 1;
    letter-spacing: 0.045em;
}
.chat-heart-close { display: none; }
.chat-heart-note-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
.chat-heart-note {
    position: relative;
    padding: 14px 14px 14px 16px;
    border-bottom: 0;
    border-radius: 18px;
    background: rgba(248,250,253,0.88);
    box-shadow: inset 0 0 0 1px rgba(117,124,135,0.08);
}
.chat-heart-note:first-child { padding-top: 14px; }
.chat-heart-note:last-child { padding-bottom: 14px; }
.chat-heart-note::before {
    content: "";
    position: absolute;
    left: -9px;
    top: 18px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(146, 159, 181, 0.42);
    box-shadow: 0 0 0 4px rgba(146, 159, 181, 0.055);
}
.chat-heart-note strong {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(52,57,65,0.46);
    font-family: "Courier New", Courier, monospace;
    font-size: 9px;
    line-height: 1;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 400;
}
.chat-heart-note strong::after {
    content: "";
    height: 1px;
    flex: 1;
    background: rgba(117,124,135,0.10);
}
.chat-heart-note p {
    margin: 10px 0 0;
    color: rgba(52,57,65,0.72);
    font-size: 13px;
    line-height: 1.72;
    letter-spacing: 0.025em;
    white-space: pre-wrap;
}
.chat-heart-note-life {
    padding-right: 14px;
}
.chat-heart-life-grid {
    margin-top: 11px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}
.chat-heart-life-item {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 14px;
    background: #FFFFFF;
    box-shadow: inset 0 0 0 1px rgba(117,124,135,0.07);
}
.chat-heart-life-item span {
    color: rgba(52,57,65,0.42);
    font-family: "Courier New", Courier, monospace;
    font-size: 10px;
    line-height: 1.2;
    letter-spacing: 0.14em;
}
.chat-heart-life-item em {
    margin: 0;
    color: rgba(52,57,65,0.76);
    font-style: normal;
    font-size: 12px;
    line-height: 1.58;
    letter-spacing: 0.02em;
    white-space: pre-wrap;
    word-break: break-word;
}

.chat-ta-diary-generate {
    width: 100%;
    border: 0;
    border-radius: 999px;
    padding: 12px 16px;
    background: rgba(52,57,65,0.92);
    color: #fff;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.06em;
    box-shadow: 0 12px 28px rgba(52,57,65,0.12);
}
.chat-ta-diary-generate:disabled {
    opacity: 0.58;
    pointer-events: none;
}
.chat-thread-bubble.is-diary-forward-card {
    display: inline-flex;
    align-items: stretch;
    width: auto;
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    box-shadow: none;
    text-shadow: none;
    overflow: visible;
}
.chat-thread-diary-forward-card {
    position: relative;
    width: min(266px, 72vw);
    border: 1px solid rgba(117,124,135,0.14);
    border-radius: 18px;
    padding: 15px 16px 14px;
    background: linear-gradient(180deg, rgba(255,255,255,0.82), rgba(250,248,244,0.64));
    color: #343941;
    text-align: left;
    box-shadow: 0 14px 30px rgba(60,64,73,0.07);
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}
.chat-thread-diary-forward-card strong {
    display: block;
    margin-top: 9px;
    font-family: Georgia, "Times New Roman", "Songti SC", serif;
    font-size: 20px;
    line-height: 1.06;
    letter-spacing: -0.045em;
    font-style: italic;
    font-weight: 400;
}
.chat-thread-diary-forward-meta {
    margin-top: 10px;
}
.chat-thread-diary-forward-excerpt {
    display: block;
    margin-top: 11px;
    color: rgba(52,57,65,0.62);
    font-size: 12px;
    line-height: 1.62;
    letter-spacing: 0.025em;
}
.chat-thread-diary-forward-tail {
    margin-top: 13px;
    color: rgba(52,57,65,0.34);
}
.chat-thread-row.is-ta .chat-thread-bubble.is-diary-forward-card::before,
.chat-thread-row.is-me .chat-thread-bubble.is-diary-forward-card::after {
    content: none;
    display: none;
}
.chat-thread-diary-forward-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(117,124,135,0.22), transparent);
    pointer-events: none;
}

/* Ta · Schedule：清冷雨季行程页，采用原生结构化视图区，不叠加强制优先级 */
.chat-ta-schedule-view {
    padding: max(30px, calc(env(safe-area-inset-top) + 20px)) 22px max(30px, calc(env(safe-area-inset-bottom) + 28px));
    background: linear-gradient(180deg, #FBFCFD 0%, #F4F7F9 100%);
    color: #343941;
}
.chat-ta-schedule-shell {
    position: relative;
    max-width: 430px;
    min-height: 100%;
    margin: 0 auto;
    padding-bottom: 118px;
    box-sizing: border-box;
}
.chat-ta-schedule-mist {
    position: absolute;
    left: -22px;
    right: -22px;
    bottom: -30px;
    height: 42%;
    pointer-events: none;
    background:
        radial-gradient(circle at 18% 92%, rgba(168, 182, 193, .22), transparent 32%),
        radial-gradient(circle at 82% 72%, rgba(190, 204, 213, .26), transparent 38%),
        linear-gradient(180deg, transparent, rgba(222, 230, 235, .42));
    opacity: .78;
}
.chat-ta-schedule-top,
.chat-ta-schedule-season,
.chat-ta-schedule-divider,
.chat-ta-schedule-hero,
.chat-ta-schedule-week,
.chat-ta-schedule-split,
.chat-ta-schedule-month-row,
.chat-ta-schedule-scroll,
.chat-ta-schedule-float {
    position: relative;
    z-index: 1;
}
.chat-ta-schedule-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
}
.chat-ta-schedule-back {
    justify-self: start;
    border: 0;
    border-bottom: 1px solid rgba(52, 57, 65, .62);
    border-radius: 0;
    padding: 0 0 4px;
    background: transparent;
    color: rgba(42, 47, 55, .92);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 15px;
    line-height: 1;
    letter-spacing: .18em;
    font-weight: 400;
}
.chat-ta-schedule-search {
    width: min(172px, 44vw);
    height: 44px;
    border: 1px solid rgba(74, 80, 90, .18);
    border-radius: 999px;
    background: rgba(247, 249, 251, .74);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .68);
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 5px;
    color: rgba(42, 47, 55, .82);
}
.chat-ta-schedule-search-lens {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .96);
    display: grid;
    place-items: center;
    box-shadow: 0 6px 16px rgba(54, 61, 70, .08);
}
.chat-ta-schedule-search-lens svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}
.chat-ta-schedule-search-star {
    justify-self: end;
    width: 20px;
    height: 20px;
    color: rgba(42, 47, 55, .82);
}
.chat-ta-schedule-search-star svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}
.chat-ta-schedule-season {
    margin: 28px 0 0;
    display: flex;
    align-items: center;
    gap: 11px;
    color: rgba(52, 57, 65, .50);
    font-family: Georgia, "Times New Roman", "Songti SC", serif;
    font-size: 13px;
    line-height: 1.2;
    letter-spacing: .04em;
}
.chat-ta-schedule-season i {
    width: 1px;
    height: 20px;
    background: rgba(52, 57, 65, .36);
}
.chat-ta-schedule-divider {
    height: 1px;
    margin: 25px 0 28px;
    background: rgba(52, 57, 65, .40);
}
.chat-ta-schedule-hero {
    display: grid;
    grid-template-columns: 106px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
}
.chat-ta-schedule-directory-label {
    position: relative;
    display: inline-flex;
    min-width: 92px;
    height: 34px;
    align-items: center;
    padding: 0 12px;
    border: 1px solid rgba(52, 57, 65, .42);
    background: rgba(255, 255, 255, .32);
    color: rgba(42, 47, 55, .88);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 15px;
    letter-spacing: .08em;
}
.chat-ta-schedule-directory-label::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    width: 8px;
    height: 8px;
    border-left: 1px solid rgba(52, 57, 65, .42);
    border-bottom: 1px solid rgba(52, 57, 65, .42);
    background: rgba(246, 248, 250, .76);
    transform: translate(1px, -1px) rotate(45deg);
}
.chat-ta-schedule-directory-list {
    margin-top: 18px;
    display: grid;
    gap: 13px;
}
.chat-ta-schedule-directory-list span {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    color: rgba(52, 57, 65, .62);
    font-family: Georgia, "Times New Roman", "Songti SC", serif;
    font-size: 12px;
    line-height: 1;
    letter-spacing: .04em;
}
.chat-ta-schedule-directory-list svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: rgba(52, 57, 65, .76);
    stroke-width: 1.45;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.chat-ta-schedule-pair {
    justify-self: end;
    display: grid;
    grid-template-columns: 70px 38px 70px;
    align-items: center;
    gap: 8px;
    padding-top: 4px;
}
.chat-ta-schedule-avatar-wrap {
    display: grid;
    grid-template-rows: 70px auto;
    justify-items: center;
    gap: 10px;
    color: rgba(52, 57, 65, .82);
    font-family: Georgia, "Times New Roman", "Songti SC", serif;
    font-size: 17px;
    line-height: 1;
}
.chat-ta-schedule-avatar-wrap em {
    font-style: normal;
    font-weight: 400;
}
.chat-ta-schedule-avatar-ring {
    grid-area: 1 / 1;
    width: 70px;
    height: 70px;
    border: 1px solid rgba(52, 57, 65, .42);
    border-radius: 50%;
    box-sizing: border-box;
}
.chat-ta-schedule-avatar-core {
    grid-area: 1 / 1;
    align-self: center;
    justify-self: center;
    width: 58px;
    height: 58px;
    border: 0;
    border-radius: 50%;
    background: rgba(234, 239, 243, .92);
    background-size: cover;
    background-position: center;
    box-shadow: none;
    display: grid;
    place-items: center;
    color: rgba(52, 57, 65, .46);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 13px;
    overflow: hidden;
}
.chat-ta-schedule-avatar-core.has-image {
    color: transparent;
}
.chat-ta-schedule-heartline {
    width: 38px;
    height: 28px;
    fill: none;
    stroke: rgba(52, 57, 65, .44);
    stroke-width: 1.15;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.chat-ta-schedule-week {
    margin: 28px 0 0;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 3px;
    text-align: center;
}
.chat-ta-schedule-day {
    min-width: 0;
    display: grid;
    gap: 12px;
    color: rgba(52, 57, 65, .78);
    font-family: Georgia, "Times New Roman", "Songti SC", serif;
}
.chat-ta-schedule-day span:first-child {
    font-size: 15px;
    line-height: 1;
    letter-spacing: .10em;
}
.chat-ta-schedule-day span:last-child {
    color: rgba(52, 57, 65, .46);
    font-size: 14px;
    line-height: 1;
    letter-spacing: .08em;
}
.chat-ta-schedule-day.is-today span:first-child {
    color: rgba(35, 40, 48, .92);
}
.chat-ta-schedule-day.is-today span:last-child {
    color: rgba(35, 40, 48, .72);
}
.chat-ta-schedule-split,
.chat-ta-schedule-item-line {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    height: 1px;
}
.chat-ta-schedule-split {
    margin: 36px 0 14px;
}
.chat-ta-schedule-split::before,
.chat-ta-schedule-item-line::before {
    content: "";
    height: 1px;
    background: rgba(52, 57, 65, .48);
}
.chat-ta-schedule-split::after,
.chat-ta-schedule-item-line::after {
    content: "";
    height: 1px;
    background: repeating-linear-gradient(90deg, rgba(52, 57, 65, .42) 0 6px, transparent 6px 12px);
}
.chat-ta-schedule-month-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    color: rgba(52, 57, 65, .58);
    font-family: Georgia, "Times New Roman", "Songti SC", serif;
    font-size: 15px;
    line-height: 1;
    letter-spacing: .06em;
}
.chat-ta-schedule-scroll {
    margin-top: 30px;
}
.chat-ta-schedule-list {
    position: relative;
    display: grid;
    gap: 23px;
}
.chat-ta-schedule-list::before {
    content: "";
    position: absolute;
    left: 60px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(52, 57, 65, .28);
}
.chat-ta-schedule-item {
    position: relative;
    display: grid;
    grid-template-columns: 48px 25px minmax(0, 1fr);
    align-items: start;
    column-gap: 0;
}
.chat-ta-schedule-index {
    padding-top: 5px;
    color: rgba(42, 47, 55, .92);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 24px;
    line-height: 1;
    letter-spacing: .10em;
}
.chat-ta-schedule-node {
    position: relative;
    z-index: 1;
    justify-self: center;
    margin-top: 12px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(52, 57, 65, .70);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, .64);
}
.chat-ta-schedule-card {
    position: relative;
    min-width: 0;
    padding: 0 0 10px 13px;
    color: rgba(52, 57, 65, .70);
}
.chat-ta-schedule-card h3 {
    margin: 0;
    color: rgba(42, 47, 55, .94);
    font-family: "Songti SC", "Noto Serif SC", Georgia, serif;
    font-size: 17px;
    line-height: 1.32;
    letter-spacing: .06em;
    font-weight: 500;
}
.chat-ta-schedule-card p {
    margin: 9px 0 0;
    font-size: 12px;
    line-height: 1.52;
    letter-spacing: .045em;
}
.chat-ta-schedule-mood,
.chat-ta-schedule-place {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(52, 57, 65, .55);
    font-family: Georgia, "Times New Roman", "Songti SC", serif;
}
.chat-ta-schedule-mood-icon {
    width: 16px;
    height: 16px;
    display: inline-grid;
    place-items: center;
    color: rgba(52, 57, 65, .62);
}
.chat-ta-schedule-mood-icon::before {
    content: "";
    width: 9px;
    height: 9px;
    border: 1px solid currentColor;
    border-radius: 50%;
    box-shadow: inset 3px 0 0 rgba(52, 57, 65, .12);
}
.chat-ta-schedule-place svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    fill: none;
    stroke: rgba(52, 57, 65, .58);
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.chat-ta-schedule-desc {
    color: rgba(52, 57, 65, .64);
    font-family: "Songti SC", "Noto Serif SC", Georgia, serif;
}
.chat-ta-schedule-item-line {
    margin-top: 15px;
}
.chat-ta-schedule-select {
    position: absolute;
    right: 0;
    top: 2px;
    width: 22px;
    height: 22px;
    border: 1px solid rgba(52, 57, 65, .34);
    border-radius: 0;
    background: rgba(255, 255, 255, .48);
    color: rgba(42, 47, 55, .86);
    font-size: 14px;
    line-height: 1;
    display: grid;
    place-items: center;
}
.chat-ta-schedule-card.is-selecting {
    padding-right: 30px;
}
.chat-ta-schedule-card.is-selected .chat-ta-schedule-select {
    background: rgba(52, 57, 65, .86);
    color: #FFFFFF;
}
.chat-ta-schedule-empty {
    display: none;
    min-height: 210px;
    place-items: center;
    text-align: center;
    color: rgba(52, 57, 65, .42);
    font-size: 12px;
    line-height: 1.7;
    letter-spacing: .06em;
}
.chat-ta-schedule-empty.show {
    display: grid;
}
.chat-ta-schedule-float {
    position: absolute;
    right: -2px;
    bottom: 24px;
    display: grid;
    justify-items: end;
    gap: 12px;
    pointer-events: none;
}
.chat-ta-schedule-action-stack {
    display: grid;
    gap: 10px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .18s ease, transform .18s ease;
    pointer-events: none;
}
.chat-ta-schedule-float.is-open .chat-ta-schedule-action-stack {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.chat-ta-schedule-action-stack button {
    min-width: 116px;
    height: 37px;
    border: 1px solid rgba(74, 80, 90, .14);
    border-radius: 999px;
    padding: 0 13px 0 12px;
    background: rgba(255, 255, 255, .78);
    color: rgba(42, 47, 55, .76);
    box-shadow: 0 8px 20px rgba(43, 48, 56, .08);
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    font-size: 12px;
    line-height: 1;
    letter-spacing: .05em;
    font-weight: 400;
}
.chat-ta-schedule-action-stack svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: rgba(42, 47, 55, .76);
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.chat-ta-schedule-plus {
    pointer-events: auto;
    width: 74px;
    height: 74px;
    border: 1px solid rgba(42, 47, 55, .48);
    border-radius: 50%;
    background: rgba(255, 255, 255, .28);
    box-shadow: inset 0 0 0 10px rgba(255, 255, 255, .32);
    display: grid;
    place-items: center;
    color: rgba(42, 47, 55, .86);
}
.chat-ta-schedule-plus span,
.chat-ta-schedule-plus span::after {
    content: "";
    display: block;
    width: 26px;
    height: 1px;
    background: currentColor;
}
.chat-ta-schedule-plus span::after {
    transform: rotate(90deg);
}
.chat-ta-schedule-forward-card {
    position: relative;
    width: 220px;
    height: 112px;
    border: 1px solid rgba(117, 124, 135, .16);
    border-left: 3px solid rgba(52, 57, 65, .28);
    border-radius: 0;
    padding: 13px 14px 10px;
    box-sizing: border-box;
    background: linear-gradient(180deg, rgba(255, 255, 255, .82), rgba(242, 246, 248, .54));
    color: #343941;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}
.chat-thread-bubble.is-schedule-forward-card {
    display: inline-flex;
    width: auto;
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}
.chat-thread-row.is-ta .chat-thread-bubble.is-schedule-forward-card::before,
.chat-thread-row.is-me .chat-thread-bubble.is-schedule-forward-card::after {
    content: none;
    display: none;
}
.chat-ta-schedule-forward-card strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(42, 47, 55, .92);
    font-family: Georgia, "Times New Roman", "Songti SC", serif;
    font-size: 17px;
    line-height: 1.12;
    letter-spacing: -.04em;
    font-style: italic;
    font-weight: 400;
}
.chat-ta-schedule-forward-card span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: rgba(52, 57, 65, .58);
    font-size: 11px;
    line-height: 1.45;
    letter-spacing: .025em;
}
.chat-ta-schedule-forward-card em {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-top: 7px;
    border-top: 1px solid rgba(117, 124, 135, .12);
    color: rgba(52, 57, 65, .38);
    font-family: "Courier New", Courier, monospace;
    font-size: 8.5px;
    line-height: 1;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-style: normal;
}

.chat-ta-schedule-forward-card em i {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-style: normal;
}
@media (max-width: 360px) {
    .chat-ta-schedule-view { padding-left: 18px; padding-right: 18px; }
    .chat-ta-schedule-hero { grid-template-columns: 98px minmax(0, 1fr); gap: 8px; }
    .chat-ta-schedule-pair { grid-template-columns: 62px 28px 62px; gap: 5px; }
    .chat-ta-schedule-avatar-wrap { grid-template-rows: 62px auto; }
    .chat-ta-schedule-avatar-ring { width: 62px; height: 62px; }
    .chat-ta-schedule-avatar-core { width: 52px; height: 52px; }
    .chat-ta-schedule-heartline { width: 28px; }
    .chat-ta-schedule-directory-label { min-width: 84px; padding-left: 10px; padding-right: 10px; }
}


.chat-heart-refresh {
    align-self: center;
    border: 0;
    border-radius: 999px;
    padding: 8px 13px;
    background: rgba(255,255,255,0.78);
    color: #1f2937;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    box-shadow: 0 10px 26px rgba(31,41,55,0.12);
}
.chat-heart-refresh:disabled {
    opacity: 0.55;
    pointer-events: none;
}
.chat-heart-note-history {
    padding-bottom: 16px;
}
.chat-heart-history {
    display: grid;
    gap: 10px;
    margin-top: 2px;
}
.chat-heart-history-item {
    border: 1px solid rgba(117,124,135,0.12);
    border-radius: 16px;
    background: rgba(255,255,255,0.62);
    padding: 10px 12px;
}
.chat-heart-history-item span {
    display: block;
    font-size: 10px;
    color: rgba(31,41,55,0.48);
    margin-bottom: 4px;
}
.chat-heart-history-item strong {
    display: block;
    font-size: 12px;
    color: rgba(31,41,55,0.76);
    margin-bottom: 4px;
}
.chat-heart-history-item p,
.chat-heart-history-empty {
    margin: 0;
    font-size: 12px;
    line-height: 1.55;
    color: rgba(31,41,55,0.62);
}

@media (max-width: 340px) {
    .chat-heart-head { grid-template-columns: 52px minmax(0,1fr); padding-right: 46px; }
    .chat-heart-avatar { width: 52px; height: 52px; border-radius: 18px; }
    .chat-heart-dialog::after { right: 20px; }
}
.chat-quote-dock {
    grid-column: 2 / 3;
    width: 100%;
    min-width: 0;
    margin-bottom: -2px;
    padding: 7px 8px 7px 11px;
    border-radius: 15px;
    background: #F8F9FB;
    color: #000;
    border: 1px solid rgba(52, 56, 65, .08);
    box-shadow: 0 8px 18px rgba(40, 44, 52, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    pointer-events: auto;
}
.chat-quote-dock-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.chat-quote-dock-copy strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 9px;
    line-height: 1;
    letter-spacing: .12em;
    color: rgba(52, 56, 65, .62);
    text-transform: uppercase;
}
.chat-quote-dock-copy span {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 11px;
    line-height: 1.2;
    color: rgba(52, 56, 65, .64);
}
.chat-quote-dock-close {
    flex: 0 0 23px;
    width: 23px;
    height: 23px;
    border: 0;
    border-radius: 50%;
    background: #000;
    color: #fff;
    font-size: 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
@media (max-width: 360px) {
    .chat-quickbar { width: min(318px, calc(100vw - 16px)); }
    .chat-quickbar-page button span { font-size: 10px; }
    .chat-quickbar-page button em { font-size: 8px; }
}
.chat-thread-composer > .chat-thread-plus { grid-column: 1; grid-row: 2; }
.chat-thread-composer > .chat-thread-input { grid-column: 2; grid-row: 2; }
.chat-thread-composer > .chat-thread-sendbar { grid-column: 3; grid-row: 2; }
.chat-thread-composer > .chat-quote-dock { grid-column: 2; grid-row: 1; }

/* Chat thread settings · paper magazine surface */
.chat-app-page.thread-settings-open .chat-bottom-dock,
.chat-thread-settings-view.active ~ .chat-bottom-dock {
    display: none;
}
.chat-thread-settings-view {
    padding: max(38px, calc(env(safe-area-inset-top) + 22px)) 24px max(44px, calc(env(safe-area-inset-bottom) + 38px));
    background:
        radial-gradient(circle at 10% 3%, rgba(240, 233, 221, 0.20), transparent 24%),
        radial-gradient(circle at 88% 1%, rgba(221, 228, 233, 0.10), transparent 20%),
        linear-gradient(180deg, #FFFFFF 0%, #FCFBF9 76%, #F9F7F3 100%);
    color: #2F333A;
    overflow-x: hidden;
}
.chat-setting-head {
    margin: 0 0 32px;
    display: grid;
    gap: 10px;
}
.chat-setting-title {
    width: 100%;
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}
.chat-setting-title span {
    display: block;
    margin: 0 0 7px;
    color: rgba(47,51,58,0.30);
    font-family: "Courier New", monospace;
    font-size: 10px;
    line-height: 1;
    letter-spacing: 0.22em;
}
.chat-setting-title strong {
    display: block;
    font-family: Georgia, "Times New Roman", "Songti SC", serif;
    font-size: clamp(32px, 9.4vw, 42px);
    line-height: 0.96;
    font-style: italic;
    letter-spacing: -0.075em;
    font-weight: 400;
}
.chat-setting-head p {
    width: min(92%, 342px);
    margin: 0;
    color: rgba(47,51,58,0.44);
    font-size: 12px;
    line-height: 1.75;
    letter-spacing: 0.02em;
}
.chat-setting-block {
    position: relative;
    margin: 0 0 34px;
    padding: 22px 0 0;
    border-top: 1px solid rgba(47,51,58,0.07);
}
.chat-setting-block::before {
    content: '';
    position: absolute;
    left: 0;
    top: -1px;
    width: 44px;
    height: 1px;
    background: rgba(47,51,58,0.13);
}
.chat-setting-block-head {
    position: relative;
    display: block;
    margin: 0 0 18px;
    min-height: 56px;
}
.chat-setting-block-head > div {
    position: relative;
    z-index: 1;
}
.chat-setting-block-no {
    position: absolute;
    right: 0;
    top: -10px;
    z-index: 0;
    display: inline-flex;
    align-items: baseline;
    justify-content: flex-start;
    color: rgba(47,51,58,0.08);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 62px;
    line-height: 0.88;
    font-style: italic;
    letter-spacing: -0.08em;
    pointer-events: none;
    user-select: none;
}
.chat-setting-block-head strong {
    display: block;
    margin: 0 0 5px;
    color: #30353C;
    font-size: 12px;
    line-height: 1.2;
    letter-spacing: 0.16em;
    font-weight: 600;
}
.chat-setting-block-head p {
    margin: 0;
    color: rgba(47,51,58,0.42);
    font-size: 12px;
    line-height: 1.65;
}
.chat-setting-avatar-line {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 44px 1fr;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 10px 0 4px;
}
.chat-setting-avatar-card {
    border: 0;
    padding: 0;
    background: transparent;
    display: grid;
    place-items: center;
    gap: 10px;
    color: #333941;
}
.chat-setting-avatar {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.84), rgba(255,255,255,0.26)),
        #F0F2EE;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.88),
        0 12px 28px rgba(80,75,67,0.08);
    color: rgba(63,75,82,0.45);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 17px;
    font-style: italic;
}
.chat-setting-avatar.has-image { color: transparent; }
.chat-setting-avatar-card em {
    color: rgba(47,51,58,0.34);
    font-family: "Courier New", monospace;
    font-size: 9px;
    font-style: normal;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.chat-setting-link-mark {
    position: relative;
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chat-setting-link-mark::before {
    content: '';
    width: 38px;
    height: 1px;
    background: rgba(47,51,58,0.10);
}
.chat-setting-link-mark span,
.chat-setting-link-mark i {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: 1px solid rgba(47,51,58,0.12);
    background: #FFFFFF;
}
.chat-setting-link-mark span { left: 5px; }
.chat-setting-link-mark i { right: 5px; }
.chat-setting-inline-fields {
    display: grid;
    gap: 14px;
    margin-top: 24px;
}
.chat-setting-editors {
    display: grid;
    gap: 18px;
    padding-top: 2px;
}
.chat-setting-field {
    display: grid;
    gap: 9px;
}
.chat-setting-field > span,
.chat-setting-option-title {
    color: rgba(47,51,58,0.38);
    font-size: 11px;
    line-height: 1;
    letter-spacing: 0.12em;
}
.chat-setting-field input,
.chat-setting-field textarea,
.chat-setting-field select {
    width: 100%;
    border: 0;
    border-radius: 0;
    padding: 0 0 12px;
    background: transparent;
    border-bottom: 1px solid rgba(47,51,58,0.10);
    color: #2F333A;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.6;
    letter-spacing: 0.02em;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
}
.chat-setting-field textarea {
    min-height: 110px;
    resize: vertical;
}
.chat-setting-field input:focus,
.chat-setting-field textarea:focus,
.chat-setting-field select:focus {
    border-bottom-color: rgba(47,51,58,0.28);
}
.chat-setting-list {
    display: grid;
    counter-reset: chat-setting-row;
}
.chat-setting-row {
    min-height: 86px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    border-bottom: 1px solid rgba(47,51,58,0.07);
}
.chat-setting-row div {
    min-width: 0;
    display: grid;
    gap: 7px;
    padding: 16px 0;
}
.chat-setting-row div::before {
    counter-increment: chat-setting-row;
    content: counter(chat-setting-row, decimal-leading-zero);
    color: rgba(47,51,58,0.18);
    font-family: "Courier New", monospace;
    font-size: 10px;
    line-height: 1;
    letter-spacing: 0.18em;
}
.chat-setting-row strong {
    color: #333941;
    font-size: 15px;
    line-height: 1.16;
    font-weight: 650;
    letter-spacing: 0.01em;
}
.chat-setting-row span {
    color: rgba(47,51,58,0.42);
    font-size: 11px;
    line-height: 1.56;
}
.chat-setting-switch {
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}
.chat-setting-expand {
    display: none;
    padding: 18px 0 22px 0;
    border-bottom: 1px solid rgba(47,51,58,0.07);
    gap: 16px;
}
.chat-setting-expand.show { display: grid; }
.chat-setting-language-grid {
    grid-template-columns: 1fr 1fr;
    column-gap: 16px;
}
.chat-setting-list-summary {
    margin-bottom: 16px;
}
.chat-setting-run {
    border: 0;
    min-width: 58px;
    height: 32px;
    border-radius: 999px;
    padding: 0 16px;
    background: #3E434B;
    color: #FFFFFF;
    font-family: "Courier New", monospace;
    font-size: 10px;
    letter-spacing: 0.14em;
    box-shadow: 0 8px 18px rgba(47,51,58,0.12);
}
.chat-setting-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    padding-top: 2px;
}
.chat-setting-stats div {
    display: grid;
    gap: 8px;
    align-content: start;
    padding-top: 10px;
    border-top: 1px solid rgba(47,51,58,0.08);
}
.chat-setting-stats span {
    color: rgba(47,51,58,0.36);
    font-size: 10px;
    letter-spacing: 0.14em;
}
.chat-setting-stats strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 36px;
    line-height: 1;
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.06em;
    color: #30353C;
}
@media (max-width: 360px) {
    .chat-thread-settings-view { padding-left: 18px; padding-right: 18px; }
    .chat-setting-block-head { min-height: 50px; }
    .chat-setting-block-no { font-size: 52px; top: -8px; }
    .chat-setting-avatar { width: 74px; height: 74px; }
    .chat-setting-link-mark { height: 74px; }
    .chat-setting-language-grid,
    .chat-setting-stats { grid-template-columns: 1fr; }
}



.chat-pay-status-actions button[hidden] { display: none; }
.chat-pay-status-actions { gap: 0; }
.chat-pay-status-actions .btn-cancel,
.chat-pay-status-actions .btn-save { min-width: 0; }
.chat-thread-pay-card.is-done,
.chat-thread-pay-card.is-expired,
.chat-thread-pay-card.is-refunded {
    filter: saturate(0.58);
    opacity: 0.82;
}
.chat-thread-pay-card.is-done .chat-thread-pay-icon,
.chat-thread-pay-card.is-expired .chat-thread-pay-icon,
.chat-thread-pay-card.is-refunded .chat-thread-pay-icon {
    background: transparent;
    color: rgba(52,56,65,0.06);
}

/* Offline meet page · magazine paper scene */
.chat-app-page.offline-open .chat-bottom-dock,
.chat-offline-view.active ~ .chat-bottom-dock {
    display: none;
}
.chat-offline-view {
    padding: max(22px, calc(env(safe-area-inset-top) + 12px)) 20px max(92px, calc(env(safe-area-inset-bottom) + 82px));
    overflow: hidden;
    color: #2F333A;
    background: #FCFBF7;
}
.chat-offline-view::before {
    content: none;
    display: none;
}
.chat-offline-view.has-custom-bg {
    background-color: #FCFBF7;
    background-image: var(--chat-offline-bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.chat-offline-weather-layer {
    position: absolute;
    inset: 0;
    z-index: 12;
    overflow: hidden;
    pointer-events: none;
    contain: layout paint;
}
.chat-offline-weather-item {
    position: absolute;
    top: -9vh;
    pointer-events: none;
    will-change: transform, opacity;
}
.chat-offline-weather-item.is-snow {
    width: var(--size, 4px);
    height: var(--size, 4px);
    opacity: var(--alpha, 0.72);
    transform-origin: center center;
    animation: chatOfflineSnowFall var(--dur, 10s) linear var(--delay, 0s) infinite;
}
.chat-offline-weather-item.is-snowdot {
    border-radius: var(--snow-radius, 58% 42% 62% 38% / 48% 55% 45% 52%);
    background:
        radial-gradient(circle at 34% 28%, rgba(255,255,255,0.98) 0 18%, rgba(255,255,255,0.88) 19% 56%, rgba(255,255,255,0.70) 100%);
    box-shadow: 0 0 7px rgba(255,255,255,0.28);
}
.chat-offline-weather-item.is-snowflake {
    border-radius: 0;
    background: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--size, 13px);
    height: var(--size, 13px);
    font-size: var(--size, 13px);
    line-height: 1;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Symbol", "Noto Sans Symbols", sans-serif;
    font-weight: 400;
    text-shadow: 0 0 5px rgba(255,255,255,0.30);
}
.chat-offline-weather-item.is-rain {
    width: 1px;
    height: var(--len, 18px);
    border-radius: 999px;
    background: rgba(255,255,255,var(--alpha,0.74));
    transform: rotate(8deg);
    animation: chatOfflineRainFall var(--dur, 1.2s) linear var(--delay, 0s) infinite;
}
@keyframes chatOfflineSnowFall {
    0% { transform: translate3d(0, -8vh, 0) rotate(0deg); opacity: 0; }
    10% { opacity: var(--alpha, 0.82); }
    48% { transform: translate3d(var(--drift, 18px), 50vh, 0) rotate(calc(var(--spin, 90deg) * 0.52)); }
    100% { transform: translate3d(calc(var(--drift, 18px) * -0.45), 112vh, 0) rotate(var(--spin, 90deg)); opacity: 0; }
}
@keyframes chatOfflineRainFall {
    0% { transform: translate3d(0, -12vh, 0) rotate(8deg); opacity: 0; }
    12% { opacity: var(--alpha, 0.74); }
    100% { transform: translate3d(var(--drift, -12px), 112vh, 0) rotate(8deg); opacity: 0; }
}

.chat-app-page.offline-open .chat-offline-view {
    background-color: #FCFBF7;
}
.chat-app-page.offline-open .chat-offline-head,
.chat-app-page.offline-open .chat-offline-stage,
.chat-app-page.offline-open .chat-offline-timeline,
.chat-app-page.offline-open .chat-offline-composer {
    background-color: transparent;
    background-image: none;
    box-shadow: none;
    border: 0;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
.chat-app-page.offline-open::before,
.chat-app-page.offline-open .chat-offline-head::before,
.chat-app-page.offline-open .chat-offline-head::after,
.chat-app-page.offline-open .chat-offline-composer::before,
.chat-app-page.offline-open .chat-offline-composer::after,
.chat-app-page.offline-open .chat-offline-stage::before,
.chat-app-page.offline-open .chat-offline-stage::after {
    content: none;
    display: none;
}
.chat-offline-head {
    position: relative;
    z-index: 6;
    display: block;
    width: 100%;
    min-height: 106px;
    background: transparent;
}
.chat-offline-head::after {
    display: none;
    content: none;
}
.chat-offline-left {
    min-width: 0;
    display: grid;
    grid-template-columns: 153px minmax(0, 1fr);
    align-items: center;
    justify-content: start;
    gap: 10px;
    text-align: left;
    padding-top: 2px;
}
.chat-offline-left-controls { display: none; }
.chat-offline-day-ring {
    display: none;

    position: relative;
    z-index: 2;
    width: 90px;
    height: 90px;
    border: 0;
    border-radius: 50%;
    padding: 0;
    color: #343941;
    background: transparent;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    flex: 0 0 90px;
    justify-self: start;
    align-self: start;
}
.chat-offline-day-ring:active { transform: scale(0.97); }
.chat-offline-ring-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    transform: rotate(-90deg);
}
.chat-offline-ring-track,
.chat-offline-ring-progress {
    fill: none;
    stroke-width: 12;
}
.chat-offline-ring-track {
    stroke: rgba(52,57,65,0.10);
}
.chat-offline-ring-progress {
    stroke: #343941;
    stroke-linecap: round;
    stroke-dasharray: 0 100;
}
.chat-offline-ring-core {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: transparent;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 3px;
    box-shadow: none;
    position: relative;
    z-index: 1;
}
.chat-offline-ring-core strong {
    display: block;
    font-family: Georgia, "Times New Roman", "Songti SC", serif;
    font-size: 20px;
    line-height: 1;
    font-weight: 400;
    letter-spacing: -0.055em;
    color: #2F333A;
}
.chat-offline-ring-core em {
    display: block;
    font-style: normal;
    font-size: 9px;
    line-height: 1;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(52,57,65,0.46);
    white-space: nowrap;
}
.chat-offline-date-stack {
    min-width: 0;
    min-height: 0;
    height: 101px;
    display: grid;
    justify-items: end;
    align-content: end;
    align-self: center;
    gap: 4px;
    padding-top: 0;
    text-align: right;
}
.chat-offline-archive-title {
    display: block;
    max-width: 100%;
    color: #4a4e59;
    font-family: "Georgia", serif;
    font-size: 20px;
    line-height: 1.02;
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.035em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
}


.chat-offline-date-year,
.chat-offline-date-month,
.chat-offline-date-day {
    display: none;
}
.chat-offline-date-line {
    display: block;
    max-width: 100%;
    color: #2F333A;
    font-family: Georgia, "Times New Roman", "Songti SC", serif;
    font-size: 19px;
    line-height: 0.98;
    font-weight: 400;
    letter-spacing: -0.05em;
    white-space: nowrap;
}
.chat-offline-date-month,
.chat-offline-date-day {
    font-size: 16px;
    color: rgba(47,51,58,0.82);
}
.chat-offline-date-week {
    display: none;
    margin-bottom: 1px;
    max-width: 100%;
    margin-top: 0;
    color: rgba(52,57,65,0.54);
    font-family: Georgia, "Times New Roman", "Songti SC", serif;
    font-size: 15px;
    line-height: 1.08;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chat-offline-season-copy {
    display: block;
    max-width: 100%;
    margin-top: 0;
    color: #343941;
    font-size: 13px;
    line-height: 1.18;
    font-weight: 500;
    letter-spacing: 0.03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
}
.chat-offline-location {
    display: none;
    max-width: 100%;
    margin-top: 0;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    color: rgba(52,57,65,0.50);
    font-size: 11px;
    line-height: 1.08;
    letter-spacing: 0.03em;
    text-align: right;
}
.chat-offline-location svg {
    width: 13px;
    height: 13px;
    flex: 0 0 auto;
    fill: currentColor;
    stroke: none;
}
.chat-offline-location em {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-style: normal;
}
.chat-offline-person {
    position: relative;
    z-index: 2;
    min-width: 0;
    display: grid;
    justify-items: start;
    gap: 0;
    padding: 0;
}
.chat-offline-person::before {
    display: none;
    content: none;
}
.chat-offline-person-main {
    position: relative;
    width: 153px;
    height: 101px;
    min-width: 153px;
    max-width: 100%;
}
.chat-offline-person-main-button {
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}
.chat-offline-avatar {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 3;
    width: 101px;
    height: 101px;
    border-radius: 0;
    background: #E9EAEC;
    color: rgba(52,57,65,0.54);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: Georgia, "Times New Roman", "Songti SC", serif;
    font-size: 16px;
    line-height: 1;
    background-size: cover;
    background-position: center;
    box-shadow: 0 8px 18px rgba(76,72,64,0.06), 0 0 0 1px rgba(52,57,65,0.03);
    overflow: hidden;
}
.chat-offline-avatar.has-image { color: transparent; }
.chat-offline-vinyl {
    position: absolute;
    right: 0;
    top: 0;
    width: 101px;
    height: 101px;
    border-radius: 50%;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 50%, #E6DDCF 0 5%, #2B2F36 6% 9%, #050608 10% 12%, transparent 13%),
        repeating-radial-gradient(circle at 50% 50%, rgba(255,255,255,0.045) 0 1px, rgba(0,0,0,0.0) 1px 3px, rgba(255,255,255,0.025) 3px 4px, rgba(0,0,0,0.0) 4px 6px),
        conic-gradient(from 180deg at 50% 50%, #0B0C0F 0%, #1A1D23 11%, #050608 24%, #2B3037 36%, #07080B 49%, #181B21 62%, #040507 73%, #30343B 86%, #090A0D 100%);
    box-shadow: 0 10px 22px rgba(76,72,64,0.08), inset 0 0 0 1px rgba(255,255,255,0.06);
}
.chat-offline-vinyl::before {
    content: '';
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.07);
    box-shadow:
        inset 0 0 0 8px rgba(0,0,0,0.11),
        inset 0 0 0 16px rgba(255,255,255,0.03),
        inset 0 0 0 26px rgba(0,0,0,0.13);
}
.chat-offline-vinyl::after {
    content: '';
    position: absolute;
    left: 15px;
    top: 13px;
    width: 42px;
    height: 9px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255,255,255,0.0), rgba(255,255,255,0.22), rgba(255,255,255,0.0));
    filter: blur(0.2px);
    transform: rotate(-24deg);
}
.chat-offline-vinyl-groove,
.chat-offline-vinyl-label {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
}
.chat-offline-vinyl-groove {
    inset: 18px;
    border-radius: 50%;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.04),
        inset 0 0 0 10px rgba(0,0,0,0.08),
        inset 0 0 0 19px rgba(255,255,255,0.02);
    opacity: 0.88;
}
.chat-offline-vinyl-label {
    inset: 34px;
    background:
        radial-gradient(circle, #F6F0E5 0 18%, #DCCDB6 19% 54%, #AA9170 55% 64%, #2B2F36 65% 100%);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.10);
}
.chat-offline-accent-row,
.chat-offline-accent-swatch {
    display: none;
}
.chat-offline-mode-pill {
    margin-top: 4px;
    align-self: end;
    justify-self: end;
    width: auto;
    max-width: 100%;
    min-height: 31px;
    padding: 1px 2px;
    border-radius: 999px;
    background: #FFFFFF;
    box-shadow: 0 10px 22px rgba(76,72,64,0.045), inset 0 0 0 1px rgba(52,57,65,0.05);
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1px;
    overflow: visible;
    transition: box-shadow .24s ease;
}
.chat-offline-mode-pill button {
    position: relative;
    width: 29px;
    height: 29px;
    border-radius: 999px;
    border: 0;
    padding: 0;
    background: #FFFFFF;
    color: rgba(52,57,65,0.62);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: transform .18s ease, color .2s ease, background .2s ease, opacity .2s ease;
}
.chat-offline-mode-pill button::after {
    content: '';
    position: absolute;
    left: 50%;
    right: auto;
    bottom: 4px;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: rgba(52,57,65,0.28);
    opacity: 0;
    transform: translateX(-50%);
}
.chat-offline-mode-pill button.is-active {
    background: transparent;
    color: rgba(52,57,65,0.62);
}
.chat-offline-mode-pill button.is-active::after { opacity: 0.72; }
.chat-offline-mode-pill button[data-offline-mode="settings"],
.chat-offline-mode-pill button[data-offline-mode="star"],
.chat-offline-mode-pill button[data-offline-mode="snow"],
.chat-offline-mode-pill button[data-offline-mode="rain"],
.chat-offline-mode-pill button[data-offline-mode="music"] {
    color: rgba(52,57,65,0.62);
}
.chat-offline-mode-pill button:active {
    transform: translateY(1px) scale(0.94);
    background: transparent;
}
.chat-offline-mode-pill svg {
    width: 16px;
    height: 16px;
    display: block;
    overflow: visible;
    fill: currentColor;
    stroke: none;
    flex: 0 0 16px;
}
.chat-offline-stage {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    display: block;
    pointer-events: auto;
    background: transparent;
}
.chat-offline-scene-card,
.chat-offline-memory-card,
.chat-offline-note-card {
    border: 0;
    border-radius: 28px;
    background: rgba(255,255,255,0.76);
    box-shadow: 0 10px 25px rgba(76,72,64,0.045);
}
.chat-offline-scene-card {
    min-height: 132px;
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background-image:
        radial-gradient(circle at 84% 18%, rgba(216,226,241,0.24), transparent 28%),
        linear-gradient(148deg, rgba(255,255,255,0.94), rgba(247,248,251,0.92));
}
.chat-offline-kicker,
.chat-offline-note-card span {
    font-family: "Courier New", Courier, monospace;
    font-size: 10px;
    line-height: 1;
    letter-spacing: 0.18em;
    color: rgba(52,57,65,0.42);
    text-transform: uppercase;
}
.chat-offline-scene-card h2 {
    margin: 12px 0 8px;
    max-width: 278px;
    font-family: Georgia, "Times New Roman", "Songti SC", serif;
    font-size: clamp(25px, 7vw, 36px);
    line-height: 1.06;
    font-weight: 400;
    letter-spacing: -0.055em;
    color: #2F333A;
}
.chat-offline-scene-card p,
.chat-offline-note-card p {
    margin: 0;
    color: rgba(52,57,65,0.60);
    font-size: 13px;
    line-height: 1.64;
}
.chat-offline-memory-card {
    display: none;
}
.chat-offline-memory-head {
    display: none;
}
.chat-offline-memory-head span,
.chat-offline-memory-head em {
    display: none;
}
.chat-offline-memory-head em { letter-spacing: 0.12em; }
.chat-offline-timeline {
    position: relative;
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    padding: max(142px, calc(env(safe-area-inset-top) + 130px)) 0 max(120px, calc(env(safe-area-inset-bottom) + 104px));
    scroll-padding-top: max(142px, calc(env(safe-area-inset-top) + 130px));
    scroll-padding-bottom: max(120px, calc(env(safe-area-inset-bottom) + 104px));
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    background: transparent;
}

.chat-offline-load-more {
    width: calc(100% - 40px);
    margin: 0 auto 2px;
    min-height: 34px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(52,57,65,0.48);
    font-size: 11px;
    letter-spacing: 0.06em;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
}
.chat-offline-timeline::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}
.chat-offline-record {
    position: relative;
    width: min(340px, calc(100% - 40px));
    max-width: min(340px, calc(100% - 40px));
    min-height: max-content;
    height: auto;
    margin: 0 auto;
    padding: 18px 18px 18px;
    border-radius: 26px;
    background: rgba(255,255,255,0.88);
    box-shadow: 0 10px 24px rgba(76,72,64,0.07), inset 0 0 0 1px rgba(76,72,64,0.055);
    color: rgba(31,36,42,0.82);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-align: left;
    overflow: hidden;
    isolation: isolate;
    cursor: pointer;
    transition: transform .18s ease, opacity .18s ease, box-shadow .18s ease;
}
.chat-offline-record:active {
    transform: none;
    box-shadow: none;
}
.chat-offline-record.is-loading {
    pointer-events: none;
    opacity: .82;
}
.chat-offline-record.is-loading .chat-offline-record-text {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 34px;
    text-align: center;
}
.chat-offline-record.is-loading .chat-offline-typing-dot {
    flex: 0 0 auto;
}
.chat-offline-typing-dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    margin: 0 3px;
    border-radius: 50%;
    background: rgba(52,57,65,0.38);
    animation: chatOfflineTypingDot 1.15s ease-in-out infinite;
}
.chat-offline-typing-dot:nth-child(2) { animation-delay: .16s; }
.chat-offline-typing-dot:nth-child(3) { animation-delay: .32s; }
@keyframes chatOfflineTypingDot {
    0%, 100% { transform: translateY(0); opacity: .35; }
    45% { transform: translateY(-3px); opacity: .85; }
}
.chat-offline-record > * {
    position: relative;
    z-index: 1;
}

.chat-offline-record::before {
    content: '';
    display: none;
}
.chat-offline-record::after {
    content: attr(data-watermark);
    position: absolute;
    right: 18px;
    bottom: 28px;
    z-index: 0;
    color: rgba(52,57,65,0.016);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 34px;
    line-height: 1;
    font-style: italic;
    letter-spacing: -0.08em;
    pointer-events: none;
}
.chat-offline-record.is-me,
.chat-offline-record.is-ta {
    background: rgba(255,255,255,0.88);
}

.chat-offline-record-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 50%;
    background: #ECECEC;
    color: rgba(52,57,65,0.56);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: Georgia, "Times New Roman", "Songti SC", serif;
    font-size: 13px;
    line-height: 1;
    background-size: cover;
    background-position: center;
    box-shadow: 0 6px 16px rgba(76,72,64,0.06), inset 0 0 0 1px rgba(52,57,65,0.03);
    overflow: hidden;
}
.chat-offline-record-avatar.has-image { color: transparent; }
.chat-offline-record-name {
    display: block;
    margin: 0;
    color: #343941;
    font-size: 11px;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: 0.04em;
}
.chat-offline-record-time {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 1px 0 4px;
    color: rgba(52,57,65,0.44);
    font-size: 10px;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.chat-offline-record-time::before,
.chat-offline-record-time::after {
    content: none;
    display: none;
}
.chat-offline-record-time-block,
.chat-offline-record-floor-block {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.chat-offline-record-time-block::before,
.chat-offline-record-floor-block::after {
    content: '';
    width: 3px;
    height: 3px;
    border-radius: 1px;
    background: rgba(52,57,65,0.11);
    flex: 0 0 3px;
}
.chat-offline-record-time-divider {
    width: 12px;
    height: 1px;
    background: rgba(52,57,65,0.10);
    flex: 0 0 12px;
}
.chat-offline-record-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    flex: 1 1 auto;
    min-height: 36px;
    width: 100%;
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.72;
    word-break: break-word;
    overflow-wrap: anywhere;
    color: rgba(31,36,42,0.82);
    text-align: left;
    white-space: normal;
}

.chat-offline-record-lines {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 10px;
}

.chat-offline-record-line {
    position: static;
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    text-align: left;
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
}

.chat-offline-record-line.is-action {
    color: rgba(52,57,65,0.56);
    font-size: 12px;
    line-height: 1.74;
    font-family: Georgia, "Times New Roman", "Songti SC", serif;
    font-style: italic;
}

.chat-offline-record-line.is-speak {
    color: rgba(31,36,42,0.88);
    font-size: 13px;
    line-height: 1.74;
    font-weight: 500;
}

.chat-offline-record-line.is-text {
    color: rgba(31,36,42,0.78);
    font-size: 13px;
    line-height: 1.74;
}
.chat-offline-record-brand {
    position: relative;
    margin-top: 10px;
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(52,57,65,0.32);
    font-family: "Courier New", Courier, monospace;
    font-size: 10px;
    line-height: 1;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.chat-offline-record-brand::before,
.chat-offline-record-brand::after {
    content: '';
    display: inline-block;
    width: 22px;
    height: 4px;
    flex: 0 0 22px;
}
.chat-offline-record-brand::before {
    background:
        linear-gradient(90deg, rgba(52,57,65,0) 0%, rgba(52,57,65,0.08) 100%) left center / 14px 1px no-repeat,
        linear-gradient(rgba(52,57,65,0.11), rgba(52,57,65,0.11)) right center / 3px 3px no-repeat;
}
.chat-offline-record-brand::after {
    background:
        linear-gradient(rgba(52,57,65,0.11), rgba(52,57,65,0.11)) left center / 3px 3px no-repeat,
        linear-gradient(90deg, rgba(52,57,65,0.08) 0%, rgba(52,57,65,0) 100%) right center / 14px 1px no-repeat;
}




.chat-offline-empty {
    display: none;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 40px);
    text-align: center;
    padding: 16px 12px;
    color: rgba(52,57,65,0.42);
    font-size: 12px;
    line-height: 1.7;
}
.chat-offline-empty.show { display: block; }
.chat-thread-bubble.is-offline-memory {
    background: #FCFCFE;
    color: rgba(47,51,58,0.88);
    box-shadow: 0 7px 18px rgba(75,66,52,0.055), inset 0 0 0 1px rgba(80,72,60,0.04);
    border-radius: 16px;
    padding: 10px 12px;
}
.chat-thread-offline-card {
    width: min(220px, 58vw);
    display: grid;
    gap: 7px;
}
.chat-thread-offline-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-family: "Courier New", Courier, monospace;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(52,57,65,0.48);
}
.chat-thread-offline-text {
    font-size: 13px;
    line-height: 1.55;
    color: rgba(31,36,42,0.86);
    word-break: break-word;
}
.chat-thread-offline-place {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: rgba(52,57,65,0.44);
    font-size: 11px;
    line-height: 1.2;
}
.chat-thread-offline-place svg {
    width: 11px;
    height: 11px;
    fill: currentColor;
}
.chat-offline-note-card {
    padding: 15px 17px 17px;
}
.chat-offline-note-card p { margin-top: 8px; }
.chat-offline-composer {
    left: 0;
    right: 0;
    bottom: max(8px, env(safe-area-inset-bottom));
    grid-template-columns: minmax(0, 1fr) 96px;
    gap: 10px;
    padding: 8px 20px 8px;
    align-items: end;
}
.chat-offline-composer::before {
    content: none;
    display: none;
}
.chat-offline-composer > .chat-offline-input {
    grid-column: 1;
    grid-row: 2;
}
.chat-offline-composer > .chat-offline-sendbar {
    grid-column: 2;
    grid-row: 2;
}
.chat-offline-sendbar {
    height: 50px;
    pointer-events: auto;
    background: #000000;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}
.chat-offline-continue {
    color: #FFFFFF;
}
.chat-offline-continue svg {
    width: 24px;
    height: 24px;
    display: block;
    fill: currentColor;
    stroke: none;
}
.chat-offline-send.chat-thread-send.footer-btn-side {
    width: 40px;
    height: 40px;
    background: #FFFFFF;
    color: #000000;
}
.chat-offline-send.chat-thread-send.footer-btn-side .fas {
    font-size: 18px;
    line-height: 1;
    transform: none;
}
.chat-offline-send.chat-thread-send.footer-btn-side:active {
    background: #FFFFFF;
    transform: none;
    opacity: 0.82;
}
.chat-offline-input {
    min-height: 50px;
    max-height: 100px;
    padding: 14px 18px;
    font-size: 15px;
    line-height: 20px;
}
.chat-offline-input.is-multiline {
    border-radius: 22px;
    overflow-y: auto;
}
.chat-offline-input::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}
.chat-offline-brand {
    display: none;
}
@media (max-width: 360px) {
    .chat-offline-view { padding-left: 16px; padding-right: 16px; }
    .chat-offline-head { min-height: 100px; }
    .chat-offline-left { grid-template-columns: 131px minmax(0, 1fr); gap: 8px; align-items: center; }
    .chat-offline-date-stack { min-height: 0; height: 87px; justify-items: end; text-align: right; align-content: end; align-self: center; gap: 6px; }
    .chat-offline-location { display: none; }
    .chat-offline-mode-pill { justify-self: end; justify-content: flex-end; }
    .chat-offline-date-week { font-size: 14px; }
    .chat-offline-season-copy { font-size: 11px; line-height: 1.16; }
    .chat-offline-location { font-size: 10px; gap: 6px; }
    .chat-offline-person-main { width: 131px; min-width: 131px; height: 87px; }
    .chat-offline-avatar { width: 87px; height: 87px; top: 0; }
    .chat-offline-vinyl { width: 87px; height: 87px; }
    .chat-offline-vinyl-label { inset: 29px; }
    .chat-offline-mode-pill { width: auto; min-height: 29px; padding: 1px 2px; gap: 1px; }
    .chat-offline-mode-pill button { width: 25px; height: 27px; }
    .chat-offline-mode-pill svg { width: 15px; height: 15px; }
    .chat-offline-mode-pill .chat-offline-snow-svg { width: 15px; height: 15px; }
    .chat-offline-stage { left: 0; right: 0; top: 0; bottom: 0; }
    .chat-offline-timeline { padding-top: max(134px, calc(env(safe-area-inset-top) + 122px)); padding-bottom: max(108px, calc(env(safe-area-inset-bottom) + 92px)); scroll-padding-top: max(134px, calc(env(safe-area-inset-top) + 122px)); scroll-padding-bottom: max(108px, calc(env(safe-area-inset-bottom) + 92px)); }
    .chat-offline-scene-card { border-radius: 26px; padding: 20px 18px; min-height: 126px; }
    .chat-offline-timeline { gap: 22px; }
    .chat-offline-record { width: calc(100% - 40px); max-width: calc(100% - 40px); padding: 18px 18px 22px; border-radius: 26px; }
    .chat-offline-record-avatar { width: 38px; height: 38px; flex-basis: 38px; font-size: 12px; }
    .chat-offline-record-name { font-size: 10px; }
    .chat-offline-record-time { font-size: 9px; }
    .chat-offline-record-time-block,
    .chat-offline-record-floor-block { gap: 4px; }
    .chat-offline-record-time-block::before,
    .chat-offline-record-floor-block::after { width: 2px; height: 2px; flex-basis: 2px; }
    .chat-offline-record-time-divider { width: 8px; flex-basis: 8px; }
    .chat-offline-record-text { font-size: 12px; line-height: 1.58; }
    .chat-offline-composer { grid-template-columns: minmax(0, 1fr) 90px; gap: 10px; padding-left: 18px; padding-right: 18px; }
    .chat-offline-sendbar { height: 50px; grid-template-columns: 45px 45px; }
    .chat-offline-continue svg { width: 22px; height: 22px; }
}
/* Chat thread settings · paper magazine surface */
.chat-app-page.thread-settings-open .chat-bottom-dock,
.chat-thread-settings-view.active ~ .chat-bottom-dock {
    display: none;
}
.chat-thread-settings-view {
    padding: max(38px, calc(env(safe-area-inset-top) + 22px)) 24px max(44px, calc(env(safe-area-inset-bottom) + 38px));
    background:
        radial-gradient(circle at 10% 3%, rgba(240, 233, 221, 0.20), transparent 24%),
        radial-gradient(circle at 88% 1%, rgba(221, 228, 233, 0.10), transparent 20%),
        linear-gradient(180deg, #FFFFFF 0%, #FCFBF9 76%, #F9F7F3 100%);
    color: #2F333A;
    overflow-x: hidden;
}
.chat-setting-head {
    margin: 0 0 32px;
    display: grid;
    gap: 10px;
}
.chat-setting-title {
    width: 100%;
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}
.chat-setting-title span {
    display: block;
    margin: 0 0 7px;
    color: rgba(47,51,58,0.30);
    font-family: "Courier New", monospace;
    font-size: 10px;
    line-height: 1;
    letter-spacing: 0.22em;
}
.chat-setting-title strong {
    display: block;
    font-family: Georgia, "Times New Roman", "Songti SC", serif;
    font-size: clamp(32px, 9.4vw, 42px);
    line-height: 0.96;
    font-style: italic;
    letter-spacing: -0.075em;
    font-weight: 400;
}
.chat-setting-head p {
    width: min(92%, 342px);
    margin: 0;
    color: rgba(47,51,58,0.44);
    font-size: 12px;
    line-height: 1.75;
    letter-spacing: 0.02em;
}
.chat-setting-block {
    position: relative;
    margin: 0 0 34px;
    padding: 22px 0 0;
    border-top: 1px solid rgba(47,51,58,0.07);
}
.chat-setting-block::before {
    content: '';
    position: absolute;
    left: 0;
    top: -1px;
    width: 44px;
    height: 1px;
    background: rgba(47,51,58,0.13);
}
.chat-setting-block-head {
    position: relative;
    display: block;
    margin: 0 0 18px;
    min-height: 56px;
}
.chat-setting-block-head > div {
    position: relative;
    z-index: 1;
}
.chat-setting-block-no {
    position: absolute;
    right: 0;
    top: -10px;
    z-index: 0;
    display: inline-flex;
    align-items: baseline;
    justify-content: flex-start;
    color: rgba(47,51,58,0.08);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 62px;
    line-height: 0.88;
    font-style: italic;
    letter-spacing: -0.08em;
    pointer-events: none;
    user-select: none;
}
.chat-setting-block-head strong {
    display: block;
    margin: 0 0 5px;
    color: #30353C;
    font-size: 12px;
    line-height: 1.2;
    letter-spacing: 0.16em;
    font-weight: 600;
}
.chat-setting-block-head p {
    margin: 0;
    color: rgba(47,51,58,0.42);
    font-size: 12px;
    line-height: 1.65;
}
.chat-setting-avatar-line {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 44px 1fr;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 10px 0 4px;
}
.chat-setting-avatar-card {
    border: 0;
    padding: 0;
    background: transparent;
    display: grid;
    place-items: center;
    gap: 10px;
    color: #333941;
}
.chat-setting-avatar {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.84), rgba(255,255,255,0.26)),
        #F0F2EE;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.88),
        0 12px 28px rgba(80,75,67,0.08);
    color: rgba(63,75,82,0.45);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 17px;
    font-style: italic;
}
.chat-setting-avatar.has-image { color: transparent; }
.chat-setting-avatar-card em {
    color: rgba(47,51,58,0.34);
    font-family: "Courier New", monospace;
    font-size: 9px;
    font-style: normal;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.chat-setting-link-mark {
    position: relative;
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chat-setting-link-mark::before {
    content: '';
    width: 38px;
    height: 1px;
    background: rgba(47,51,58,0.10);
}
.chat-setting-link-mark span,
.chat-setting-link-mark i {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: 1px solid rgba(47,51,58,0.12);
    background: #FFFFFF;
}
.chat-setting-link-mark span { left: 5px; }
.chat-setting-link-mark i { right: 5px; }
.chat-setting-inline-fields {
    display: grid;
    gap: 14px;
    margin-top: 24px;
}
.chat-setting-editors {
    display: grid;
    gap: 18px;
    padding-top: 2px;
}
.chat-setting-field {
    display: grid;
    gap: 9px;
}
.chat-setting-field > span,
.chat-setting-option-title {
    color: rgba(47,51,58,0.38);
    font-size: 11px;
    line-height: 1;
    letter-spacing: 0.12em;
}
.chat-setting-field input,
.chat-setting-field textarea,
.chat-setting-field select {
    width: 100%;
    border: 0;
    border-radius: 0;
    padding: 0 0 12px;
    background: transparent;
    border-bottom: 1px solid rgba(47,51,58,0.10);
    color: #2F333A;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.6;
    letter-spacing: 0.02em;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
}
.chat-setting-field textarea {
    min-height: 110px;
    resize: vertical;
}
.chat-setting-field input:focus,
.chat-setting-field textarea:focus,
.chat-setting-field select:focus {
    border-bottom-color: rgba(47,51,58,0.28);
}
.chat-setting-list {
    display: grid;
    counter-reset: chat-setting-row;
}
.chat-setting-row {
    min-height: 86px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    border-bottom: 1px solid rgba(47,51,58,0.07);
}
.chat-setting-row div {
    min-width: 0;
    display: grid;
    gap: 7px;
    padding: 16px 0;
}
.chat-setting-row div::before {
    counter-increment: chat-setting-row;
    content: counter(chat-setting-row, decimal-leading-zero);
    color: rgba(47,51,58,0.18);
    font-family: "Courier New", monospace;
    font-size: 10px;
    line-height: 1;
    letter-spacing: 0.18em;
}
.chat-setting-row strong {
    color: #333941;
    font-size: 15px;
    line-height: 1.16;
    font-weight: 650;
    letter-spacing: 0.01em;
}
.chat-setting-row span {
    color: rgba(47,51,58,0.42);
    font-size: 11px;
    line-height: 1.56;
}
.chat-setting-switch {
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}
.chat-setting-expand {
    display: none;
    padding: 18px 0 22px 0;
    border-bottom: 1px solid rgba(47,51,58,0.07);
    gap: 16px;
}
.chat-setting-expand.show { display: grid; }
.chat-setting-language-grid {
    grid-template-columns: 1fr 1fr;
    column-gap: 16px;
}
.chat-setting-list-summary {
    margin-bottom: 16px;
}
.chat-setting-run {
    border: 0;
    min-width: 58px;
    height: 32px;
    border-radius: 999px;
    padding: 0 16px;
    background: #3E434B;
    color: #FFFFFF;
    font-family: "Courier New", monospace;
    font-size: 10px;
    letter-spacing: 0.14em;
    box-shadow: 0 8px 18px rgba(47,51,58,0.12);
}
.chat-setting-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    padding-top: 2px;
}
.chat-setting-stats div {
    display: grid;
    gap: 8px;
    align-content: start;
    padding-top: 10px;
    border-top: 1px solid rgba(47,51,58,0.08);
}
.chat-setting-stats span {
    color: rgba(47,51,58,0.36);
    font-size: 10px;
    letter-spacing: 0.14em;
}
.chat-setting-stats strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 36px;
    line-height: 1;
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.06em;
    color: #30353C;
}
@media (max-width: 360px) {
    .chat-thread-settings-view { padding-left: 18px; padding-right: 18px; }
    .chat-setting-block-head { min-height: 50px; }
    .chat-setting-block-no { font-size: 52px; top: -8px; }
    .chat-setting-avatar { width: 74px; height: 74px; }
    .chat-setting-link-mark { height: 74px; }
    .chat-setting-language-grid,
    .chat-setting-stats { grid-template-columns: 1fr; }
}

/* 拍一拍设置 */
.chat-setting-poke-grid {
    grid-template-columns: 1fr 1fr;
    column-gap: 16px;
}
@media (max-width: 360px) {
    .chat-setting-poke-grid {
        grid-template-columns: 1fr;
    }
}


    .chat-assets-bill-item {
        cursor: pointer;
        transition: opacity 0.18s ease, transform 0.18s ease;
    }
    .chat-assets-bill-item:active {
        opacity: 0.62;
        transform: translateY(1px);
    }
    .chat-bill-detail-dialog {
        max-width: min(360px, calc(100vw - 44px));
    }
    .chat-bill-detail-content {
        display: flex;
        flex-direction: column;
        gap: 18px;
    }
    .chat-bill-detail-head {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }
    .chat-bill-detail-head span {
        color: #A9B0BA;
        font-family: "Courier New", Courier, monospace;
        font-size: 9px;
        letter-spacing: 0.18em;
    }
    .chat-bill-detail-head strong {
        color: #424954;
        font-family: Georgia, "Times New Roman", "Songti SC", serif;
        font-size: 23px;
        font-weight: 400;
        line-height: 1.1;
        letter-spacing: -0.04em;
    }
    .chat-bill-detail-head em {
        color: #929AA6;
        font-size: 12px;
        line-height: 1.5;
        font-style: normal;
    }
    .chat-bill-detail-amount {
        align-self: flex-start;
        color: #4E5661;
        font-family: Georgia, "Times New Roman", serif;
        font-size: 28px;
        line-height: 1;
        font-weight: 400;
        letter-spacing: -0.04em;
    }
    .chat-bill-detail-amount.is-in { color: #556B5E; }
    .chat-bill-detail-amount.is-out { color: #7A5D56; }
    .chat-bill-detail-lines {
        display: flex;
        flex-direction: column;
        gap: 0;
        border-top: 1px solid rgba(150,158,168,0.14);
    }
    .chat-bill-detail-lines div {
        display: grid;
        grid-template-columns: 68px minmax(0, 1fr);
        gap: 14px;
        padding: 12px 0;
        border-bottom: 1px solid rgba(150,158,168,0.12);
        align-items: baseline;
    }
    .chat-bill-detail-lines span {
        color: #A5ADB8;
        font-size: 11px;
        letter-spacing: 0.08em;
    }
    .chat-bill-detail-lines strong {
        min-width: 0;
        color: #515A66;
        font-size: 12px;
        font-weight: 500;
        line-height: 1.45;
        text-align: right;
        overflow-wrap: anywhere;
    }


/* Phone APP：One Phone 电话应用的轻纸面、斜体大标题、底部切换导航 */
.phone-app-page {
    display: none;
    --phone-bg: #ffffff;
    --phone-card: #ffffff;
    --phone-ink: #1a1a1a;
    --phone-muted: rgba(26, 26, 26, 0.42);
    --phone-faint: rgba(26, 26, 26, 0.08);
    --phone-line: rgba(26, 26, 26, 0.08);
    --phone-soft: rgba(26, 26, 26, 0.035);
    --phone-soft-2: rgba(26, 26, 26, 0.055);
    position: fixed;
    inset: 0;
    z-index: 9010;
    overflow: hidden;
    height: 100svh;
    max-height: 100svh;
    background: #ffffff;
    color: var(--phone-ink);
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.26s ease, transform 0.32s cubic-bezier(0.19, 1, 0.22, 1);
    isolation: isolate;
    font-family: var(--phone-font-ui, ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Noto Sans SC", sans-serif);
}
.phone-app-page.show {
    display: block;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.phone-app-page button,
.phone-app-page input {
    font: inherit;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.phone-view {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-width: none;
    padding: max(48px, calc(env(safe-area-inset-top) + 34px)) 25px max(118px, calc(env(safe-area-inset-bottom) + 110px));
}
.phone-view::-webkit-scrollbar { display: none; }
.phone-view.active { display: block; }
.phone-view[data-phone-view="keypad"] {
    overflow: hidden;
    padding: 0 25px max(86px, calc(env(safe-area-inset-bottom) + 78px));
    background: #ffffff;
}
.phone-view[data-phone-view="keypad"].active { display: block; }
.phone-view[data-phone-view="keypad"] .phone-match-card:not(.show) {
    min-height: 0;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}
.phone-view-head { margin-bottom: 22px; }
.phone-view-head--split {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}
.phone-title-btn {
    display: block;
    border: 0;
    background: transparent;
    color: var(--phone-ink);
    padding: 0;
    margin: 0;
    font-size: 35px;
    line-height: 0.98;
    font-weight: 300;
    font-style: italic;
    letter-spacing: -0.08em;
    text-align: left;
    cursor: pointer;
}
.phone-title-meta {
    margin-top: 10px;
    color: var(--phone-muted);
    font-size: 10px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}
.phone-segment {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    border-bottom: 1px solid var(--phone-line);
    margin-bottom: 12px;
}
.phone-segment button {
    position: relative;
    border: 0;
    background: transparent;
    height: 38px;
    color: rgba(26,26,26,0.34);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
}
.phone-segment button.active { color: var(--phone-ink); }
.phone-segment button.active::after {
    content: '';
    position: absolute;
    left: 22%;
    right: 22%;
    bottom: -1px;
    height: 2px;
    border-radius: 999px;
    background: var(--phone-ink);
}
.phone-recents-list,
.phone-contact-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.phone-recent-row,
.phone-contact-row {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--phone-ink);
    min-height: 62px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(26,26,26,0.06);
    text-align: left;
}
.phone-row-icon,
.phone-contact-avatar,
.phone-call-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--phone-card);
    border: 1px solid rgba(26,26,26,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(26,26,26,0.42);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}
.phone-row-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.phone-row-icon.missed,
.phone-recent-row.missed .phone-row-name { color: #c7554f; }
.phone-row-main { min-width: 0; }
.phone-row-name {
    display: block;
    color: var(--phone-ink);
    font-size: 16px;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.phone-row-sub {
    display: block;
    margin-top: 5px;
    color: rgba(26,26,26,0.38);
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.phone-row-side {
    color: rgba(26,26,26,0.34);
    font-size: 11px;
    line-height: 1.3;
    text-align: right;
    letter-spacing: 0.04em;
}
.phone-contact-row { grid-template-columns: 44px minmax(0, 1fr) 44px; }
.phone-contact-call {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #1a1a1a;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.phone-contact-call svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 0;
}
.phone-search-wrap {
    height: 40px;
    border-radius: 999px;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(26,26,26,0.05);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    margin-bottom: 18px;
}
.phone-search-wrap svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    fill: none;
    stroke: rgba(26,26,26,0.32);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.phone-search-wrap input {
    width: 100%;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--phone-ink);
    font-size: 13px;
}
.phone-search-wrap input::placeholder { color: rgba(26,26,26,0.26); }
.phone-empty-state {
    display: none;
    min-height: 310px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    color: rgba(26,26,26,0.34);
    gap: 8px;
}
.phone-empty-state.show { display: flex; }
.phone-empty-state svg {
    width: 52px;
    height: 52px;
    fill: none;
    stroke: rgba(26,26,26,0.16);
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    margin-bottom: 8px;
}
.phone-empty-state strong {
    color: rgba(26,26,26,0.5);
    font-size: 16px;
    font-weight: 500;
}
.phone-empty-state span { font-size: 12px; }
.phone-keypad-stage {
    height: calc(100svh - max(72px, calc(env(safe-area-inset-bottom) + 62px)));
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 170px;
    padding-bottom: 18px;
    box-sizing: border-box;
}
.phone-match-card {
    min-height: 58px;
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--phone-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    margin-bottom: 10px;
}
.phone-match-card.show {
    min-height: 54px;
    opacity: 1;
    pointer-events: auto;
}
.phone-match-card strong {
    font-size: 19px;
    font-weight: 400;
    letter-spacing: -0.03em;
}
.phone-match-card span {
    margin-top: 4px;
    color: rgba(26,26,26,0.36);
    font-size: 12px;
}
.phone-number-display {
    min-height: 46px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--phone-ink);
    font-size: 28px;
    line-height: 1;
    font-weight: 300;
    letter-spacing: 0.04em;
    word-break: break-all;
}
.phone-number-display.is-placeholder {
    color: rgba(26,26,26,0.17);
    font-size: 21px;
    letter-spacing: 0.02em;
}
.phone-keypad-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 50px 34px;
    margin: 12px 22px 18px;
}
.phone-keypad-key {
    border: 0;
    background: transparent;
    height: 52px;
    color: var(--phone-ink);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    transition: background 0.16s ease, transform 0.16s ease;
}
.phone-keypad-key:active {
    background: rgba(255,255,255,0.62);
    transform: scale(0.96);
}
.phone-keypad-key strong {
    font-size: 29px;
    font-weight: 300;
    line-height: 0.92;
}
.phone-keypad-key span {
    margin-top: 7px;
    font-size: 8px;
    letter-spacing: 0.22em;
    color: rgba(26,26,26,0.28);
    min-height: 9px;
}
.phone-keypad-actions {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    justify-items: center;
    padding: 4px 40px 0;
}
.phone-call-main {
    width: 66px;
    height: 66px;
    border: 0;
    border-radius: 50%;
    background: #1a1a1a;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 16px 32px rgba(26,26,26,0.12);
    transition: transform 0.16s ease;
}
.phone-call-main:active { transform: scale(0.95); }
.phone-call-main svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 0;
}
.phone-delete-key {
    width: 42px;
    height: 42px;
    border: 0;
    background: transparent;
    color: rgba(26,26,26,0.36);
    opacity: 0;
    pointer-events: none;
}
.phone-delete-key.show {
    opacity: 1;
    pointer-events: auto;
}
.phone-delete-key svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.phone-bottom-nav {
    position: absolute;
    z-index: 3;
    left: 26px;
    right: 26px;
    bottom: max(20px, calc(env(safe-area-inset-bottom) + 18px));
    height: 38px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
    justify-items: center;
    pointer-events: auto;
    background: transparent;
}
.phone-bottom-nav button {
    position: relative;
    width: 42px;
    height: 38px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: rgba(26,26,26,0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.18s ease, transform 0.18s ease;
}
.phone-bottom-nav button::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0;
    transform: translateX(-50%) scale(0.65);
    transition: opacity 0.18s ease, transform 0.18s ease;
}
.phone-bottom-nav button.active {
    background: transparent;
    color: #1a1a1a;
    transform: none;
}
.phone-bottom-nav button.active::after {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}
.phone-bottom-nav svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.phone-voicemail-generate {
    border: 0;
    border-left: 1px solid rgba(26,26,26,0.12);
    background: transparent;
    color: rgba(26,26,26,0.52);
    margin-top: 4px;
    padding: 4px 0 4px 14px;
    font-size: 12px;
    letter-spacing: 0.08em;
    white-space: nowrap;
}
.phone-voicemail-generate:active { color: #1a1a1a; }
.phone-voicemail-card {
    margin-top: 42px;
    min-height: 250px;
    border-radius: 30px;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(26,26,26,0.05);
    padding: 28px 24px;
    color: var(--phone-ink);
}
.phone-tape-mark {
    height: 82px;
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(26,26,26,0.06), rgba(255,255,255,0.9));
    display: flex;
    align-items: center;
    justify-content: space-around;
    margin-bottom: 22px;
}
.phone-tape-mark span {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid rgba(26,26,26,0.08);
    box-shadow: inset 0 0 0 9px rgba(26,26,26,0.035);
}
.phone-voicemail-card strong {
    display: block;
    font-size: 22px;
    font-style: italic;
    font-weight: 300;
    margin-bottom: 10px;
}
.phone-voicemail-card p {
    margin: 0;
    color: rgba(26,26,26,0.42);
    font-size: 13px;
    line-height: 1.8;
}
.phone-call-layer {
    position: absolute;
    inset: 0;
    z-index: 8;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    color: var(--phone-ink);
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px);
    transition: opacity 0.24s ease, transform 0.34s cubic-bezier(0.19, 1, 0.22, 1);
}
.phone-call-layer.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.phone-call-layer::before,
.phone-call-topline span::before,
.phone-call-chat::before { content: none; display: none; }
.phone-call-topline {
    flex: 0 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: max(25px, calc(env(safe-area-inset-top) + 14px)) 22px 8px;
    color: rgba(26,26,26,0.34);
    font-size: 10px;
    letter-spacing: 0.26em;
    text-transform: uppercase;
}
.phone-call-topline span {
    display: inline;
    padding-left: 0;
}
.phone-call-topline button {
    width: 32px;
    min-width: 0;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: rgba(26,26,26,0.04);
    color: rgba(26,26,26,0.55);
    font-size: 20px;
    letter-spacing: 0;
    line-height: 1;
    text-transform: none;
}
.phone-call-identity {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-direction: column;
    margin: 0;
    padding: 14px 26px 12px;
    border: 0;
    text-align: center;
}
.phone-call-avatar {
    width: 108px;
    height: 108px;
    border-radius: 50%;
    font-size: 34px;
    background: #ffffff;
    color: rgba(26,26,26,0.16);
    margin: 0 0 18px;
    border: 1px solid rgba(26,26,26,0.04);
    box-shadow: none;
}
.phone-call-avatar.has-image {
    color: transparent;
    border-radius: 50%;
}
.phone-call-identity h2 {
    margin: 0 0 8px;
    max-width: 100%;
    color: var(--phone-ink);
    font-size: 38px;
    line-height: 0.98;
    font-style: italic;
    font-weight: 300;
    letter-spacing: -0.06em;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.phone-call-status {
    margin-top: 0;
    padding-left: 0;
    color: rgba(26,26,26,0.38);
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}
.phone-call-status::before { content: none; display: none; }
.phone-call-status.is-live::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #2fc76f;
    margin-right: 8px;
    vertical-align: 1px;
    animation: phonePulse 1.1s ease-in-out infinite;
}
@keyframes phonePulse {
    50% { opacity: .35; transform: scale(.78); }
}
.phone-call-chat {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 14px 26px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.phone-call-chat::-webkit-scrollbar { display: none; }
.phone-call-bubble {
    max-width: 86%;
    width: fit-content;
    border-radius: 18px;
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.58;
    word-break: break-word;
    box-shadow: none;
}
.phone-call-bubble.me {
    align-self: flex-end;
    background: #1a1a1a;
    color: #ffffff;
    border-bottom-right-radius: 6px;
}
.phone-call-bubble.ta,
.phone-call-bubble.system {
    align-self: flex-start;
    background: rgba(26,26,26,0.035);
    color: rgba(26,26,26,0.64);
    border: 0;
    border-bottom-left-radius: 6px;
}
.phone-call-bubble.system {
    align-self: center;
    max-width: 92%;
    background: transparent;
    color: rgba(26,26,26,0.38);
    font-size: 11px;
    text-align: center;
    letter-spacing: 0.04em;
}
.phone-call-typing {
    width: 58px;
    min-width: 0;
    display: flex;
    justify-content: center;
    gap: 5px;
    padding: 11px 15px;
    border-radius: 22px;
    background: #ffffff;
}
.phone-call-typing i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(26,26,26,0.36);
    animation: phoneBounce 1s infinite ease-in-out;
}
.phone-call-typing i:nth-child(2) { animation-delay: .15s; }
.phone-call-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes phoneBounce {
    50% { transform: translateY(-4px); opacity: .5; }
}
.phone-call-input {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 40px;
    align-items: center;
    gap: 10px;
    padding: 10px 28px 8px;
    opacity: 1;
}
.phone-call-input.show { display: grid; }
.phone-call-input.is-disabled { opacity: .52; }
.phone-call-input input {
    width: 100%;
    height: 46px;
    border: 0;
    border-radius: 18px;
    outline: none;
    background: rgba(26,26,26,0.035);
    color: var(--phone-ink);
    padding: 0 16px;
    box-shadow: none;
    font-size: 13px;
}
.phone-call-input input:disabled { color: rgba(26,26,26,0.28); }
.phone-call-send {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: #1a1a1a;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.phone-call-send:disabled {
    background: rgba(26,26,26,0.12);
    color: rgba(26,26,26,0.32);
}
.phone-call-send svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.phone-call-controls {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    gap: 24px;
    padding: 8px 32px max(30px, calc(env(safe-area-inset-bottom) + 18px));
}
.phone-call-side,
.phone-hangup {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: transparent;
    width: auto;
    height: auto;
    min-width: 0;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    justify-self: center;
    gap: 8px;
    color: rgba(26, 26, 26, 0.34);
    font-size: 10px;
    line-height: 1;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    box-shadow: none;
    outline: 0;
}
.phone-call-control-orb {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 999px;
    transition: transform .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.phone-call-side .phone-call-control-orb {
    width: 58px;
    height: 58px;
    background: rgba(26,26,26,0.035);
    color: #1a1a1a;
    border: 1px solid transparent;
}
.phone-hangup .phone-call-control-orb {
    width: 74px;
    height: 74px;
    background: #FF3B30;
    color: #ffffff;
    border: 0;
    box-shadow: 0 18px 32px rgba(255,59,48,0.20);
}
.phone-call-side:active .phone-call-control-orb,
.phone-hangup:active .phone-call-control-orb {
    transform: scale(0.95);
}
.phone-call-side.is-active .phone-call-control-orb,
.phone-call-side:active .phone-call-control-orb {
    background: #1a1a1a;
    color: #ffffff;
}
.phone-speaker.is-muted .phone-call-control-orb,
#phoneSpeaker.is-muted .phone-call-control-orb {
    color: rgba(26,26,26,0.35);
}
.phone-call-side svg,
.phone-hangup svg {
    box-sizing: border-box;
    display: block;
    padding: 0;
    margin: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    transform: none;
    color: currentColor;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.phone-call-side svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.5;
}
.phone-hangup svg {
    width: 30px;
    height: 30px;
    stroke-width: 2.2;
    transform: rotate(135deg);
}
.phone-call-control-label,
.phone-hangup span,
.phone-call-side span {
    color: rgba(26,26,26,0.30);
    font-size: 10px;
    line-height: 1;
    letter-spacing: 0.2em;
    white-space: nowrap;
}
.phone-detail-layer {
    position: absolute;
    inset: 0;
    z-index: 7;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    color: var(--phone-ink);
    opacity: 0;
    pointer-events: none;
    transform: translateX(18px);
    transition: opacity .22s ease, transform .28s cubic-bezier(.19, 1, .22, 1);
}
.phone-detail-layer.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}
.phone-detail-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: max(30px, calc(env(safe-area-inset-top) + 18px)) 24px 12px;
}
.phone-detail-back {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: rgba(26,26,26,0.04);
    color: rgba(26,26,26,0.62);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.phone-detail-back svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.phone-detail-head strong {
    display: block;
    font-size: 24px;
    font-weight: 300;
    font-style: italic;
    letter-spacing: -0.05em;
}
.phone-detail-head span {
    display: block;
    margin-top: 4px;
    color: rgba(26,26,26,0.34);
    font-size: 9px;
    letter-spacing: .24em;
}
.phone-detail-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 8px 25px max(24px, calc(env(safe-area-inset-bottom) + 18px));
    scrollbar-width: none;
}
.phone-detail-body::-webkit-scrollbar { display: none; }
.phone-detail-hero {
    text-align: center;
    padding: 14px 0 22px;
}
.phone-detail-avatar {
    width: 86px;
    height: 86px;
    margin: 0 auto 14px;
    border-radius: 28px;
    background: rgba(26,26,26,0.035);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(26,26,26,0.24);
    font-size: 28px;
}
.phone-detail-hero h3 {
    margin: 0;
    font-size: 32px;
    line-height: 1;
    font-weight: 300;
    font-style: italic;
    letter-spacing: -0.06em;
}
.phone-detail-hero p {
    margin: 9px 0 0;
    color: rgba(26,26,26,0.38);
    font-size: 12px;
    letter-spacing: .08em;
}
.phone-detail-card {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid rgba(26,26,26,0.08);
    border-bottom: 1px solid rgba(26,26,26,0.08);
    margin-bottom: 18px;
}
.phone-detail-card div {
    min-width: 0;
    padding: 14px 8px;
    text-align: center;
}
.phone-detail-card div + div { border-left: 1px solid rgba(26,26,26,0.06); }
.phone-detail-card span,
.phone-detail-summary span,
.phone-detail-transcript > span {
    display: block;
    color: rgba(26,26,26,0.34);
    font-size: 9px;
    letter-spacing: .24em;
}
.phone-detail-card strong {
    display: block;
    margin-top: 7px;
    color: rgba(26,26,26,0.72);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
}
.phone-detail-summary,
.phone-detail-transcript { margin-top: 16px; }
.phone-detail-summary p {
    margin: 10px 0 0;
    color: rgba(26,26,26,0.58);
    font-size: 13px;
    line-height: 1.75;
}
.phone-detail-line {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    align-items: flex-start;
}
.phone-detail-line.me { flex-direction: row-reverse; }
.phone-detail-line span {
    flex: 0 0 auto;
    color: rgba(26,26,26,0.32);
    font-size: 9px;
    letter-spacing: .18em;
    margin-top: 10px;
}
.phone-detail-line p {
    max-width: 74%;
    margin: 0;
    padding: 9px 12px;
    border-radius: 16px;
    background: rgba(26,26,26,0.035);
    color: rgba(26,26,26,0.62);
    font-size: 12px;
    line-height: 1.55;
}
.phone-detail-line.me p {
    background: #1a1a1a;
    color: #ffffff;
}
.phone-detail-empty {
    margin-top: 10px;
    color: rgba(26,26,26,0.34);
    font-size: 12px;
}
.phone-detail-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
}
.phone-detail-actions button {
    height: 42px;
    border: 0;
    border-radius: 18px;
    background: rgba(26,26,26,0.045);
    color: rgba(26,26,26,0.68);
    font-size: 12px;
    letter-spacing: .08em;
}
.phone-detail-actions button:first-child {
    background: #1a1a1a;
    color: #ffffff;
}
.phone-voicemail-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}
.phone-voicemail-item {
    border: 0;
    border-top: 1px solid rgba(26,26,26,0.07);
    background: transparent;
    text-align: left;
    padding: 13px 0 2px;
    color: var(--phone-ink);
}
.phone-voicemail-item span {
    display: inline-block;
    font-size: 15px;
    font-weight: 500;
}
.phone-voicemail-item em {
    float: right;
    color: rgba(26,26,26,0.34);
    font-size: 10px;
    font-style: normal;
    letter-spacing: .08em;
}
.phone-voicemail-item p {
    clear: both;
    margin: 8px 0 0;
    color: rgba(26,26,26,0.54);
    font-size: 12px;
    line-height: 1.65;
}
html.one-phone-app-open,
body.one-phone-app-open {
    overflow: hidden;
    overscroll-behavior: none;
}
body.show-phone-shell .phone-app-page {
    left: 50%;
    top: 50%;
    right: auto;
    bottom: auto;
    width: var(--one-shell-base-width, 390px);
    height: var(--one-shell-base-height, 844px);
    max-height: var(--one-shell-base-height, 844px);
    border-radius: calc(var(--one-shell-scale, 1) * 38px);
    overflow: hidden;
    transform: translate(-50%, -48%) scale(var(--one-shell-scale, 1));
    transform-origin: center center;
    background: #ffffff;
}
body.show-phone-shell .phone-app-page.show {
    transform: translate(-50%, -50%) scale(var(--one-shell-scale, 1));
}
body.show-phone-shell .phone-keypad-stage {
    height: calc(var(--one-shell-base-height, 844px) - 72px);
    padding-top: 170px;
}
body.show-phone-shell .phone-keypad-grid {
    gap: 50px 34px;
    margin: 12px 22px 18px;
}
body.show-phone-shell .phone-keypad-key {
    height: 52px;
    border-radius: 18px;
}
body.show-phone-shell .phone-bottom-nav { bottom: 18px; }
body.shell-switching .phone-app-page { transition: none; }
@media (max-height: 780px) {
    .phone-keypad-stage,
    body.show-phone-shell .phone-keypad-stage { padding-top: 128px; }
    .phone-keypad-grid,
    body.show-phone-shell .phone-keypad-grid { gap: 38px 28px; }
    .phone-keypad-key,
    body.show-phone-shell .phone-keypad-key { height: 48px; }
}
@media (max-height: 740px) {
    .phone-call-identity { padding-top: 12px; }
    .phone-call-avatar {
        width: 92px;
        height: 92px;
        margin-bottom: 14px;
    }
    .phone-call-identity h2 { font-size: 34px; }
    .phone-call-controls {
        gap: 28px;
        padding: 14px 30px max(28px, calc(env(safe-area-inset-bottom) + 22px));
    }
    .phone-call-side .phone-call-control-orb {
        width: 60px;
        height: 60px;
    }
    .phone-hangup .phone-call-control-orb {
        width: 74px;
        height: 74px;
    }
}
@media (max-height: 700px) {
    .phone-keypad-stage,
    body.show-phone-shell .phone-keypad-stage { padding-top: 94px; }
    .phone-keypad-grid,
    body.show-phone-shell .phone-keypad-grid { gap: 28px 24px; }
    .phone-keypad-key strong { font-size: 27px; }
    .phone-call-identity { padding-top: 22px; }
    .phone-call-avatar {
        width: 68px;
        height: 68px;
    }
    .phone-call-controls { padding-bottom: max(22px, calc(env(safe-area-inset-bottom) + 12px)); }
}
@media (max-width: 365px) {
    .phone-view { padding-left: 22px; padding-right: 22px; }
    .phone-title-btn { font-size: 32px; }
    .phone-call-identity h2 { font-size: 33px; }
    .phone-keypad-grid,
    body.show-phone-shell .phone-keypad-grid {
        gap: 50px 34px;
        margin-left: 4px;
        margin-right: 4px;
    }
    .phone-keypad-key,
    body.show-phone-shell .phone-keypad-key { height: 50px; }
    .phone-keypad-key strong { font-size: 28px; }
}


/* v86 detail polish: shorter quote bars, straight wallpaper flash, page-aware arrows, black user bubble, flipped sendbar */
.chat-thread-row.is-quickbar-row::before,
.chat-thread-row.is-wallpaper-flash::before {
    left: -14px;
    right: -14px;
    top: -6px;
    bottom: -6px;
    border-radius: 0;
    background: rgba(52, 56, 65, 0.14);
}
.chat-quickbar.is-page-first [data-chat-quick-nav="prev"],
.chat-quickbar.is-page-second [data-chat-quick-nav="next"] {
    visibility: hidden;
    pointer-events: none;
}
.chat-thread-bubble.is-text.has-quote,
.chat-thread-bubble.has-quote {
    min-width: 0;
    gap: 5px;
}
.chat-thread-quote-preview {
    width: auto;
    max-width: min(168px, calc(100vw - 148px));
    align-self: flex-start;
    padding: 6px 8px;
    border: 0;
    border-left: 0;
    outline: 0;
    box-shadow: none;
    border-radius: 8px;
    gap: 3px;
}
.chat-thread-quote-top { gap: 6px; }
.chat-thread-quote-time { display: none; }
.chat-thread-quote-text {
    max-width: 132px;
    font-size: 10.5px;
}
.chat-thread-row.is-me .chat-thread-quote-preview {
    background: rgba(255, 255, 255, 0.18);
}
.chat-thread-row.is-ta .chat-thread-quote-preview {
    background: rgba(52, 56, 65, 0.048);
}
.chat-quote-dock {
    width: min(218px, 100%);
    justify-self: start;
    border: 0;
    outline: 0;
    box-shadow: 0 7px 16px rgba(40, 44, 52, 0.075);
    padding: 6px 7px 6px 10px;
    border-radius: 13px;
}
.chat-quote-dock-copy span { max-width: 156px; }
.chat-thread-view {
    --chat-bubble-me: #000000;
}
.chat-thread-sendbar {
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08), inset 0 0 0 1px rgba(31, 36, 42, 0.055);
}
.chat-thread-emoji,
.chat-thread-send {
    color: #000000;
}
.chat-thread-send:active,
.chat-thread-emoji:active {
    background: rgba(0, 0, 0, 0.055);
}


/* v87 correction: quote fills bubble with left rule, restore sendbars, keep online me bubble pure black */
.chat-thread-view {
    --chat-bubble-me: #000000;
}
.chat-thread-bubble.is-text.has-quote,
.chat-thread-bubble.has-quote {
    align-items: stretch;
    min-width: min(168px, calc(100vw - 148px));
    gap: 5px;
}
.chat-thread-quote-preview {
    width: 100%;
    max-width: none;
    align-self: stretch;
    box-sizing: border-box;
    padding: 6px 8px 6px 9px;
    border: 0;
    border-left: 2px solid rgba(52, 56, 65, .24);
    outline: 0;
    box-shadow: none;
    border-radius: 8px;
    gap: 3px;
}
.chat-thread-row.is-me .chat-thread-quote-preview {
    background: rgba(255, 255, 255, 0.18);
    border-left-color: rgba(255, 255, 255, .48);
}
.chat-thread-row.is-ta .chat-thread-quote-preview {
    background: rgba(52, 56, 65, 0.048);
    border-left-color: rgba(52, 56, 65, .24);
}
.chat-thread-quote-text {
    max-width: 100%;
}
.chat-thread-composer:not(.chat-offline-composer) > .chat-thread-sendbar {
    background: #000;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}
.chat-thread-composer:not(.chat-offline-composer) > .chat-thread-sendbar .chat-thread-emoji {
    color: #ffffff;
}
.chat-thread-composer:not(.chat-offline-composer) > .chat-thread-sendbar .chat-thread-send.footer-btn-side {
    background: #ffffff;
    color: #000;
}
.chat-thread-composer:not(.chat-offline-composer) > .chat-thread-sendbar .chat-thread-emoji:active {
    background: rgba(255,255,255,0.14);
}
.chat-thread-composer:not(.chat-offline-composer) > .chat-thread-sendbar .chat-thread-send:active {
    background: #ECECEC;
}
.chat-offline-sendbar {
    background: #000000;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}
.chat-offline-continue {
    color: #FFFFFF;
}
.chat-offline-send.chat-thread-send.footer-btn-side {
    background: #FFFFFF;
    color: #000000;
}
.modal-round-action.chat-thread-sendbar {
    background: #FFFFFF;
    box-shadow: 0 10px 22px rgba(52,57,65,0.12), inset 0 1px 0 rgba(255,255,255,0.96);
}
.modal-round-action .modal-round-action-icon {
    background: #111111;
    color: #FFFFFF;
}

/* v88 correction: compact quick action bar only (previous “引用栏” feedback referred to this toolbar) */
.chat-quickbar {
    width: min(268px, calc(100vw - 56px));
    min-height: 44px;
    grid-template-columns: 20px minmax(0, 1fr) 20px;
    gap: 1px;
    padding: 5px 6px;
    border-radius: 17px;
    box-shadow: 0 10px 24px rgba(40, 44, 52, 0.105);
}
.chat-quickbar-page {
    gap: 1px;
}
.chat-quickbar-page button {
    height: 36px;
    border-radius: 11px;
    gap: 2px;
}
.chat-quickbar-page button span {
    font-size: 9.5px;
    line-height: 1;
    letter-spacing: .025em;
}
.chat-quickbar-page button em {
    font-size: 7px;
    line-height: 1;
    letter-spacing: .08em;
}
.chat-quickbar-nav {
    width: 20px;
    height: 36px;
    border-radius: 11px;
    font-size: 20px;
}
@media (max-width: 365px) {
    .chat-quickbar {
        width: min(256px, calc(100vw - 52px));
        padding-left: 5px;
        padding-right: 5px;
    }
    .chat-quickbar-page button span { font-size: 9px; }
    .chat-quickbar-page button em { font-size: 6.5px; }
}

/* v89 correction: shrink quick action bar shell only */
.chat-quickbar {
    width: min(246px, calc(100vw - 72px));
    min-height: 38px;
    grid-template-columns: 18px minmax(0, 1fr) 18px;
    gap: 0;
    padding: 3px 4px;
    border-radius: 14px;
    box-shadow: 0 8px 18px rgba(40, 44, 52, 0.09);
}
.chat-quickbar-page { gap: 0; }
.chat-quickbar-page button {
    height: 34px;
    border-radius: 9px;
}
.chat-quickbar-nav {
    width: 18px;
    height: 34px;
    border-radius: 9px;
    font-size: 18px;
}
@media (max-width: 365px) {
    .chat-quickbar {
        width: min(236px, calc(100vw - 68px));
        padding-left: 3px;
        padding-right: 3px;
    }
}

/* v99 correction: quote preview, quote input dock, watch icon, translation label */
.chat-thread-bubble.is-text.has-quote,
.chat-thread-bubble.has-quote {
    align-items: stretch;
    min-width: min(188px, calc(100vw - 138px));
    gap: 6px;
}
.chat-thread-quote-preview {
    width: 100%;
    max-width: none;
    align-self: stretch;
    box-sizing: border-box;
    margin: 0;
    padding: 7px 9px 7px 10px;
    border: 0;
    border-left: 2px solid rgba(52, 56, 65, .24);
    border-radius: 9px;
    box-shadow: none;
    background: rgba(52, 56, 65, 0.048);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.chat-thread-row.is-me .chat-thread-quote-preview {
    background: rgba(255, 255, 255, 0.18);
    border-left-color: rgba(255, 255, 255, .48);
}
.chat-thread-quote-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}
.chat-thread-quote-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 10px;
    line-height: 1.1;
    letter-spacing: 0;
    text-transform: none;
    font-weight: 700;
    color: rgba(52, 56, 65, .64);
}
.chat-thread-quote-time {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    max-width: 70px;
    font-family: "Courier New", monospace;
    font-size: 9px;
    line-height: 1;
    letter-spacing: .02em;
    font-weight: 400;
    color: rgba(52, 56, 65, .38);
    opacity: .92;
}
.chat-thread-quote-text {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    line-height: 1.25;
    font-weight: 400;
    color: rgba(52, 56, 65, .58);
}
.chat-thread-row.is-me .chat-thread-quote-name,
.chat-thread-row.is-me .chat-thread-quote-time,
.chat-thread-row.is-me .chat-thread-quote-text {
    color: rgba(255,255,255,.72);
}

.chat-thread-composer > .chat-quote-dock {
    grid-column: 1 / 4;
    grid-row: 1;
}
.chat-quote-dock {
    position: relative;
    width: 100%;
    min-width: 0;
    justify-self: stretch;
    align-self: stretch;
    margin: 0 0 -2px 0;
    padding: 8px 30px 8px 12px;
    border-radius: 15px;
    background: rgba(248, 249, 251, 0.96);
    color: #000;
    border: 1px solid rgba(52, 56, 65, .075);
    outline: 0;
    box-shadow: 0 7px 16px rgba(40, 44, 52, 0.075);
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    gap: 8px;
    box-sizing: border-box;
    pointer-events: auto;
}
.chat-quote-dock-copy {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.chat-quote-dock-head {
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}
.chat-quote-dock-copy strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 10px;
    line-height: 1.1;
    letter-spacing: 0;
    text-transform: none;
    font-weight: 700;
    color: rgba(52, 56, 65, .66);
}
.chat-quote-dock-time {
    flex: 0 0 auto;
    max-width: 76px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: "Courier New", monospace;
    font-style: normal;
    font-size: 9px;
    line-height: 1;
    letter-spacing: .02em;
    font-weight: 400;
    color: rgba(52, 56, 65, .38);
}
.chat-quote-dock-copy span {
    display: block;
    max-width: none;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 11px;
    line-height: 1.25;
    font-weight: 400;
    color: rgba(52, 56, 65, .64);
}
.chat-quote-dock-close {
    position: absolute;
    top: 5px;
    right: 6px;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    border: 0;
    border-radius: 50%;
    background: rgba(118, 118, 128, 0.18);
    color: rgba(52, 56, 65, 0.48);
    font-size: 13px;
    line-height: 1;
    font-weight: 400;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: none;
}
.chat-quote-dock-close:active {
    background: rgba(118, 118, 128, 0.26);
    color: rgba(52, 56, 65, 0.62);
}

.chat-thread-tool[data-thread-tool="一起看"] .chat-thread-tool-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(52, 57, 65, 0.08);
    box-shadow: 0 3px 8px rgba(76, 72, 64, 0.032), 0 1px 0 rgba(255,255,255,0.86) inset;
    color: #000;
}
.chat-watch-tv-icon {
    position: relative;
    width: 22px;
    height: 18px;
    display: inline-block;
    box-sizing: border-box;
    border: 1.8px solid currentColor;
    border-radius: 5px;
    color: #000;
    background: transparent;
    transform: none;
}
.chat-watch-tv-icon::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 8px;
    transform: translate(-50%, -50%);
    border-radius: 2px;
    background: currentColor;
}
.chat-watch-tv-icon::after {
    content: "";
    position: absolute;
    left: 5px;
    right: 5px;
    bottom: -5px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    opacity: .9;
}

.chat-thread-translation:not([data-lang])::before,
.chat-thread-translation[data-lang=""]::before,
.chat-thread-translation[data-lang="中文"]::before {
    display: none;
    content: none;
}


/* v100 correction: only fill the existing watch TV icon; quote-dock close sits half outside the top-right corner */
.chat-thread-composer {
    overflow: visible;
}
.chat-quote-dock {
    overflow: visible;
    padding: 8px 12px;
}
.chat-quote-dock-close {
    top: -9px;
    right: -9px;
    width: 18px;
    height: 18px;
    z-index: 3;
    background: rgba(118, 118, 128, 0.20);
    color: rgba(52, 56, 65, 0.46);
    opacity: 0.88;
}
.chat-thread-tool[data-thread-tool="一起看"] .chat-thread-tool-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 16px;
}
.chat-watch-tv-icon {
    position: relative;
    width: 24px;
    height: 18px;
    display: inline-block;
    border: 1.8px solid #000;
    border-radius: 6px;
    color: #000;
    box-sizing: border-box;
    background: transparent;
    transform: none;
}
.chat-watch-tv-icon::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 8px;
    transform: translate(-50%, -50%);
    border: 0;
    border-radius: 1px;
    background: currentColor;
}
.chat-watch-tv-icon::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    height: 9px;
    border-radius: 999px;
    background:
        radial-gradient(circle at 7px 2px, currentColor 0 2px, transparent 2.15px),
        radial-gradient(circle at 17px 2px, currentColor 0 2px, transparent 2.15px),
        linear-gradient(currentColor, currentColor) center 8px / 17px 2px no-repeat;
    opacity: 0.9;
}


/* One Phone global appearance control center */
:where(body, input, textarea, button, select) {
    font-family: var(--one-global-font-family, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif);
}
:where(.settings-app-page, .settings-app-page *, .worldbook-app-page, .worldbook-app-page *, .chat-app-page, .chat-app-page *, .phone-app-page, .phone-app-page *, .memory-app-page, .memory-app-page *, .onephone-app-module, .onephone-app-module *) {
    font-weight: var(--one-ui-font-weight, inherit);
}
.settings-app-editor-row {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: start;
}
.settings-app-editor-main {
    display: flex;
    flex-direction: column;
    gap: 9px;
    min-width: 0;
}
.settings-app-editor-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}
.settings-mini-control {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    color: #8C95A3;
    font-size: 9px;
    letter-spacing: 0.08em;
}
.settings-mini-control input[type="color"] {
    width: 100%;
    height: 28px;
    border: 1px solid rgba(150,158,168,0.22);
    border-radius: 999px;
    background: transparent;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
}
.settings-mini-control input[type="range"] {
    width: 100%;
}
.settings-app-editor-icon {
    border-radius: var(--one-app-icon-radius, 17px);
    background: var(--one-app-icon-bg, rgba(255,255,255,0.45));
    border: var(--one-app-icon-border, 1px solid rgba(255,255,255,0.62));
    box-shadow: var(--one-app-icon-shadow, 0 8px 24px rgba(120,130,140,0.04), inset 0 2px 4px rgba(255,255,255,0.8));
    backdrop-filter: var(--one-app-icon-backdrop, blur(8px));
    -webkit-backdrop-filter: var(--one-app-icon-backdrop, blur(8px));
    display: grid;
    place-items: center;
    overflow: hidden;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}
.settings-app-editor-icon svg {
    width: 21px;
    height: 21px;
    fill: var(--one-app-logo-color, #A8A8A8);
}
.settings-live-note {
    margin-top: 8px;
    color: #8C95A3;
    font-size: 11px;
    line-height: 1.7;
}


/* v135 refinement: settings detail number, icon editor spacing and placeholders */
.settings-icon-radius-control {
    margin-top: 28px;
    padding-top: 12px;
}
.settings-icon-radius-control .settings-range-top {
    margin-bottom: 14px;
}
.settings-app-editor-main {
    position: relative;
    padding-bottom: 7px;
}
.settings-app-editor-main::after {
    content: '';
    display: block;
    width: 4em;
    height: 1px;
    margin-top: 7px;
    background: rgba(150, 158, 168, 0.24);
}
.settings-app-editor-main .settings-field-input {
    padding-bottom: 0;
    font-weight: 400;
    color: #424852;
}
.settings-app-editor-main .settings-field-input::placeholder {
    color: #AAB0BA;
    opacity: 1;
    font-weight: 400;
}
.settings-app-editor-actions .settings-thin-button,
.settings-app-editor-main .settings-field-input {
    letter-spacing: 0.08em;
}

    .memory-dimension-list[hidden] { display: none; }

    #wbSettingToneRow .wb-tone-custom { display: none; }


/* v157 · Diary line-paper system: no rounded rectangles, no capsules */
.chat-ta-diary-view .chat-ta-subpage-close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.chat-ta-diary-view .chat-ta-subpage-close::before {
    content: "";
    position: absolute;
    inset: auto 0 5px 0;
    height: 1px;
    background: rgba(52,57,65,0.20);
}
.chat-ta-diary-card {
    position: relative;
    border: 0;
    border-top: 1px solid rgba(117,124,135,0.16);
    border-bottom: 1px solid rgba(117,124,135,0.10);
    border-radius: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.34), rgba(255,255,255,0.08));
    box-shadow: none;
    overflow: visible;
}
.chat-ta-diary-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 20px;
    width: 18px;
    height: 1px;
    background: rgba(52,57,65,0.34);
    pointer-events: none;
}
.chat-ta-diary-card::after {
    content: "";
    position: absolute;
    right: 0;
    top: 20px;
    width: 34%;
    height: 1px;
    background: linear-gradient(90deg, rgba(117,124,135,0.12), transparent);
    pointer-events: none;
}
.chat-ta-diary-card-main {
    padding: 16px 0 15px 28px;
    background: transparent;
}
.chat-ta-diary-card-mark {
    margin-bottom: 13px;
    color: rgba(52,57,65,0.32);
}
.chat-ta-diary-card-head strong {
    font-size: 22px;
    line-height: 1.04;
}
.chat-ta-diary-card-meta,
.chat-ta-diary-detail-meta,
.chat-thread-diary-forward-meta {
    margin-top: 11px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
}
.chat-ta-diary-card-meta span,
.chat-ta-diary-detail-meta span,
.chat-thread-diary-forward-meta em {
    border: 0;
    border-radius: 0;
    padding: 0 0 0 9px;
    background: transparent;
    box-shadow: none;
    color: rgba(52,57,65,0.52);
    border-left: 1px solid rgba(117,124,135,0.20);
    font-style: normal;
    font-size: 11px;
    line-height: 1.35;
    letter-spacing: 0.055em;
}
.chat-ta-diary-card-excerpt {
    margin: 12px 0 0;
    padding-right: 12px;
}
.chat-ta-diary-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid rgba(117,124,135,0.10);
    margin-left: 28px;
}
.chat-ta-diary-card-actions button {
    border: 0;
    border-right: 1px solid rgba(117,124,135,0.10);
    border-radius: 0;
    padding: 11px 8px 12px;
    background: transparent;
    color: rgba(52,57,65,0.58);
    box-shadow: none;
}
.chat-ta-diary-paper {
    position: relative;
    border: 0;
    border-top: 1px solid rgba(117,124,135,0.18);
    border-bottom: 1px solid rgba(117,124,135,0.12);
    border-radius: 0;
    padding: 21px 0 24px;
    background:
        linear-gradient(rgba(117,124,135,0.065) 1px, transparent 1px) 0 90px / 100% 32px,
        linear-gradient(180deg, rgba(255,255,255,0.42), rgba(255,255,255,0.10));
    box-shadow: none;
}
.chat-ta-diary-paper::before {
    content: "";
    position: absolute;
    left: 0;
    top: 21px;
    width: 26px;
    height: 1px;
    background: rgba(52,57,65,0.34);
}
.chat-ta-diary-paper::after {
    right: 2px;
    bottom: 16px;
}
.chat-ta-diary-paper-top,
.chat-ta-diary-paper h2,
.chat-ta-diary-detail-meta,
.chat-ta-diary-detail-body {
    padding-left: 28px;
    padding-right: 4px;
}
.chat-ta-diary-detail-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    border-top: 1px solid rgba(117,124,135,0.12);
}
.chat-ta-diary-detail-forward,
.chat-ta-diary-detail-delete,
.chat-ta-diary-manage,
.chat-ta-diary-generate {
    border: 0;
    border-bottom: 1px solid rgba(117,124,135,0.12);
    border-radius: 0;
    background: transparent;
    color: rgba(52,57,65,0.70);
    padding: 12px 4px;
    font-size: 12px;
    letter-spacing: 0.08em;
    box-shadow: none;
}
.chat-ta-diary-generate {
    width: 100%;
    border-top: 1px solid rgba(117,124,135,0.16);
    text-align: left;
}
.chat-ta-diary-manage {
    min-width: 56px;
    text-align: right;
}
.chat-ta-diary-manage.is-active {
    background: transparent;
    color: #303740;
    border-bottom-color: rgba(52,57,65,0.30);
}
.chat-thread-diary-forward-card {
    position: relative;
    width: min(212px, 58vw);
    min-height: 98px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid rgba(117,124,135,0.16);
    border-left: 3px solid rgba(52,57,65,0.28);
    border-radius: 0;
    padding: 10px 11px 9px 12px;
    background: linear-gradient(180deg, rgba(255,255,255,0.76), rgba(248,246,242,0.42));
    color: #343941;
    text-align: left;
    box-shadow: none;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}
.chat-thread-diary-forward-card::before {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    top: 0;
    height: 1px;
    background: rgba(52,57,65,0.18);
    pointer-events: none;
}
.chat-thread-diary-forward-card strong,
.chat-thread-diary-forward-title {
    display: block;
    margin: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: Georgia, "Times New Roman", "Songti SC", serif;
    font-size: 17px;
    line-height: 1.12;
    letter-spacing: -0.04em;
    font-style: italic;
    font-weight: 400;
}
.chat-thread-diary-forward-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 7px;
    color: rgba(52,57,65,0.58);
    font-size: 11px;
    line-height: 1.48;
    letter-spacing: 0.025em;
}
.chat-thread-diary-forward-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 9px;
    padding-top: 7px;
    border-top: 1px solid rgba(117,124,135,0.12);
    color: rgba(52,57,65,0.38);
    font-family: "Courier New", Courier, monospace;
    font-size: 8.5px;
    line-height: 1;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.chat-thread-diary-forward-foot em {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-style: normal;
}
.chat-thread-diary-forward-foot em:last-child {
    text-align: right;
}
.chat-thread-diary-forward-kicker,
.chat-thread-diary-forward-tail {
    display: none;
}

/* v157 end */


/* v157 final · Diary compact transfer card + square note detail */
.chat-ta-diary-view.is-detail-open .chat-ta-subpage-title {
    visibility: hidden;
    pointer-events: none;
}
.chat-ta-diary-view.is-detail-open .chat-ta-subpage-head {
    grid-template-columns: minmax(0, 1fr) auto;
    margin-bottom: 8px;
}
.chat-ta-diary-view .chat-ta-subpage-close,
.chat-ta-diary-detail-back,
.chat-ta-diary-generate,
.chat-ta-diary-manage,
.chat-ta-diary-detail-forward,
.chat-ta-diary-card,
.chat-ta-diary-card-main,
.chat-ta-diary-card-actions button,
.chat-ta-diary-detail-actions button,
.chat-thread-diary-forward-card {
    border-radius: 0;
    box-shadow: none;
}
.chat-ta-diary-card-meta span,
.chat-ta-diary-detail-meta span,
.chat-thread-diary-forward-meta em {
    border-radius: 0;
    background: transparent;
}
.chat-thread-row.is-ta .chat-thread-bubble.is-diary-forward-card,
.chat-thread-row.is-me .chat-thread-bubble.is-diary-forward-card {
    width: 220px;
    height: 120px;
    min-height: 120px;
    padding: 0;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
}
.chat-thread-diary-forward-card {
    position: relative;
    width: 220px;
    height: 120px;
    min-height: 120px;
    max-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    border: 1px solid rgba(117,124,135,0.16);
    border-left: 3px solid rgba(52,57,65,0.28);
    padding: 14px 15px 12px;
    box-sizing: border-box;
    background: linear-gradient(180deg, rgba(255,255,255,0.80), rgba(247,245,240,0.48));
    color: #343941;
    text-align: left;
    overflow: hidden;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.chat-thread-diary-forward-card::before {
    content: "";
    position: absolute;
    z-index: 1;
    left: 15px;
    right: 15px;
    bottom: 29px;
    top: auto;
    height: 1px;
    background: rgba(52,56,65,0.095);
    pointer-events: none;
}
.chat-thread-diary-forward-title {
    position: relative;
    z-index: 2;
    display: block;
    margin: 2px 0 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: Georgia, "Times New Roman", "Songti SC", serif;
    font-size: 17px;
    line-height: 0.98;
    letter-spacing: -0.04em;
    font-style: italic;
    font-weight: 400;
    color: #303740;
}
.chat-thread-diary-forward-excerpt {
    position: relative;
    z-index: 2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 10px;
    max-height: 35px;
    color: rgba(52,57,65,0.58);
    font-size: 11px;
    line-height: 1.56;
    letter-spacing: 0.025em;
}
.chat-thread-diary-forward-foot {
    position: absolute;
    z-index: 2;
    left: 15px;
    right: 15px;
    bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: rgba(52,57,65,0.40);
    font-family: "Courier New", Courier, monospace;
    font-size: 8.5px;
    line-height: 1;
    letter-spacing: 0.12em;
    text-transform: none;
}
.chat-thread-diary-forward-foot em {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-style: normal;
}
.chat-thread-diary-forward-foot em:last-child {
    text-align: right;
}
.chat-thread-diary-forward-kicker,
.chat-thread-diary-forward-tail {
    display: none;
}
.chat-ta-diary-detail-page {
    gap: 12px;
}
.chat-ta-diary-detail-back {
    align-self: flex-start;
    border: 0;
    border-bottom: 1px solid rgba(52,57,65,0.20);
    padding: 0 0 5px;
    background: transparent;
    color: rgba(52,57,65,0.58);
    font-size: 11px;
    letter-spacing: 0.12em;
}
.chat-ta-diary-paper {
    position: relative;
    border: 0;
    border-top: 1px solid rgba(52,57,65,0.20);
    border-bottom: 1px solid rgba(52,57,65,0.14);
    padding: 22px 0 26px;
    background:
        linear-gradient(90deg, rgba(52,57,65,0.16) 0 1px, transparent 1px) 21px 0 / 1px 100% no-repeat,
        linear-gradient(rgba(117,124,135,0.075) 1px, transparent 1px) 0 96px / 100% 31px,
        linear-gradient(180deg, rgba(255,255,255,0.56), rgba(255,255,255,0.10));
    box-shadow: none;
}
.chat-ta-diary-paper::before {
    content: "";
    position: absolute;
    left: 0;
    top: 26px;
    width: 32px;
    height: 1px;
    background: rgba(52,57,65,0.34);
    pointer-events: none;
}
.chat-ta-diary-paper::after {
    content: "✧";
    position: absolute;
    right: 2px;
    bottom: 14px;
    color: rgba(52,57,65,0.16);
    font-size: 17px;
}
.chat-ta-diary-note-pin {
    display: block;
    width: 24px;
    height: 1px;
    margin-top: 5px;
    background: rgba(52,57,65,0.28);
}
.chat-ta-diary-paper-top,
.chat-ta-diary-paper h2,
.chat-ta-diary-detail-meta,
.chat-ta-diary-detail-body {
    padding-left: 34px;
    padding-right: 4px;
}
.chat-ta-diary-paper-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.chat-ta-diary-paper h2 {
    margin: 17px 0 0;
    color: #303740;
    font-family: Georgia, "Times New Roman", "Songti SC", serif;
    font-size: 27px;
    line-height: 1.02;
    letter-spacing: -0.055em;
    font-style: italic;
    font-weight: 400;
}
.chat-ta-diary-detail-meta {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
}
.chat-ta-diary-detail-meta span {
    border: 0;
    border-left: 1px solid rgba(117,124,135,0.22);
    padding: 0 0 0 9px;
    color: rgba(52,57,65,0.50);
    font-style: normal;
    font-size: 11px;
    line-height: 1.35;
    letter-spacing: 0.055em;
}
.chat-ta-diary-detail-body {
    margin-top: 19px;
    color: rgba(52,57,65,0.74);
    font-size: 14px;
    line-height: 2.06;
    letter-spacing: 0.025em;
    white-space: normal;
}
.chat-ta-diary-detail-body p {
    margin: 0 0 14px;
}
.chat-ta-diary-underline {
    text-decoration-line: underline;
    text-decoration-thickness: 0.42em;
    text-underline-offset: -0.18em;
    text-decoration-color: rgba(207,196,177,0.46);
    text-decoration-skip-ink: none;
}
.chat-ta-diary-secret {
    display: block;
    width: min(238px, 74%);
    min-height: 30px;
    margin: 18px 0 2px;
    border: 0;
    border-radius: 0;
    padding: 6px 8px;
    background: #000;
    color: transparent;
    text-align: left;
    box-shadow: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}
.chat-ta-diary-secret span {
    color: transparent;
    font-size: 12px;
    line-height: 1.65;
    letter-spacing: 0.04em;
}
.chat-ta-diary-secret.is-revealed {
    width: auto;
    max-width: 100%;
    min-height: 0;
    border-left: 2px solid #000;
    padding: 1px 0 1px 12px;
    background: transparent;
}
.chat-ta-diary-secret.is-revealed span {
    color: rgba(52,57,65,0.72);
}

/* v157 final end */


/* v158 · Diary entry-page side-note paper */
.chat-ta-diary-view.is-detail-open .chat-ta-subpage-head {
    display: none;
}
.chat-ta-diary-entry-page {
    gap: 18px;
}
.chat-ta-diary-entry-note-paper,
.chat-ta-diary-note-paper {
    position: relative;
    display: block;
    border: 0;
    border-top: 1px solid rgba(52,57,65,0.20);
    border-bottom: 1px solid rgba(52,57,65,0.10);
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}
.chat-ta-diary-entry-note-paper {
    margin: 2px 0 4px 34px;
    padding: 15px 10px 12px 17px;
    background:
        linear-gradient(90deg, rgba(52,57,65,0.14) 0 1px, transparent 1px) 12px 0 / 1px 100% no-repeat,
        linear-gradient(rgba(117,124,135,0.055) 1px, transparent 1px) 0 20px / 100% 25px,
        linear-gradient(180deg, rgba(255,252,244,0.58), rgba(255,255,255,0.12));
    color: rgba(52,57,65,0.66);
}
.chat-ta-diary-entry-note-paper::before,
.chat-ta-diary-note-paper::before {
    content: "";
    position: absolute;
    left: 0;
    top: 14px;
    width: 22px;
    height: 1px;
    background: rgba(52,57,65,0.30);
    pointer-events: none;
}
.chat-ta-diary-entry-note-paper::after,
.chat-ta-diary-note-paper::after {
    content: "✧";
    position: absolute;
    right: 2px;
    bottom: 8px;
    color: rgba(52,57,65,0.12);
    font-size: 14px;
    line-height: 1;
    pointer-events: none;
}
.chat-ta-diary-entry-note-kicker {
    display: block;
    margin: 0 0 9px;
    color: rgba(52,57,65,0.28);
    font-family: "Courier New", Courier, monospace;
    font-size: 8px;
    line-height: 1;
    letter-spacing: 0.28em;
}
.chat-ta-diary-entry-note-paper strong {
    display: block;
    margin: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #303740;
    font-family: Georgia, "Times New Roman", "Songti SC", serif;
    font-size: 18px;
    line-height: 1.12;
    letter-spacing: -0.04em;
    font-style: italic;
    font-weight: 400;
}
.chat-ta-diary-entry-note-paper p,
.chat-ta-diary-note-paper p {
    margin: 9px 0 0;
    color: rgba(52,57,65,0.64);
    font-size: 12px;
    line-height: 1.82;
    letter-spacing: 0.04em;
}
.chat-ta-diary-entry-note-foot {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid rgba(117,124,135,0.10);
    color: rgba(52,57,65,0.34);
    font-family: "Courier New", Courier, monospace;
    font-size: 8.5px;
    line-height: 1;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}
.chat-ta-diary-entry-note-paper.is-empty {
    opacity: 0.72;
}
.chat-ta-diary-note-paper {
    margin: 20px 4px 0 34px;
    padding: 14px 14px 15px 16px;
    background:
        linear-gradient(90deg, rgba(52,57,65,0.12) 0 1px, transparent 1px) 13px 0 / 1px 100% no-repeat,
        linear-gradient(rgba(117,124,135,0.055) 1px, transparent 1px) 0 20px / 100% 24px,
        linear-gradient(180deg, rgba(255,252,244,0.62), rgba(255,255,255,0.20));
    color: rgba(52,57,65,0.68);
}
.chat-ta-diary-note-paper[hidden] {
    display: none;
}
.chat-ta-diary-note-paper p {
    padding-left: 12px;
}
.chat-ta-diary-entry-note-paper,
.chat-ta-diary-entry-note-paper *,
.chat-ta-diary-note-paper,
.chat-ta-diary-note-paper * {
    border-radius: 0;
}
/* v158 end */


/* v161 · Memory timeline keeps default list; edit/details use the global centered modal system. */
.memory-timeline-modal {
    z-index: 30020;
}
.memory-timeline-dialog {
    width: min(326px, calc(100vw - 48px));
    max-width: 326px;
}
.memory-timeline-dialog .modal-content {
    gap: 12px;
}
.memory-timeline-modal-subtitle {
    margin: -2px 0 2px;
    color: rgba(70, 76, 86, 0.48);
    font-family: "Courier New", Courier, monospace;
    font-size: 10px;
    letter-spacing: 0.16em;
}
.memory-timeline-dialog .memory-timeline-edit {
    min-height: 172px;
    max-height: min(42vh, 260px);
    border-radius: 0;
    border: 0;
    border-bottom: 1px solid rgba(52, 56, 65, 0.14);
    background: rgba(250, 251, 252, 0.72);
    box-shadow: none;
    line-height: 1.72;
}
.memory-timeline-danger-actions {
    height: 44px;
}
.memory-timeline-danger-actions .btn-save {
    color: #B86969;
}
.memory-console .memory-timeline-panel {
    display: block;
}

/* v161 · Ta settings modal now follows the same global centered modal geometry. */
.memory-settings-modal {
    width: auto;
    min-height: auto;
    padding: 24px;
    background: rgba(30, 30, 35, 0.40);
}
.memory-settings-dialog {
    width: 100%;
    max-width: 296px;
    max-height: calc(100dvh - 48px);
    border-radius: 22px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}
.memory-settings-dialog .modal-content {
    max-height: calc(100dvh - 98px);
    padding: 24px 20px 20px;
}


    .memory-unified-panel {
        margin-top: 14px;
        padding-top: 14px;
        border-top: 1px solid rgba(74,78,89,0.08);
    }
    .memory-unified-grid {
        display: grid;
        gap: 8px;
        margin-top: 10px;
    }
    .memory-unified-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 10px 0;
        border-bottom: 1px solid rgba(74,78,89,0.07);
    }
    .memory-unified-row strong {
        display: block;
        color: #3B4048;
        font-size: 12px;
        letter-spacing: 0.08em;
        font-weight: 500;
    }
    .memory-unified-row span {
        display: block;
        margin-top: 4px;
        color: #8C95A3;
        font-size: 11px;
        line-height: 1.45;
        letter-spacing: 0.04em;
    }
    .memory-unified-badge {
        flex: 0 0 auto;
        min-width: 68px;
        padding: 5px 8px;
        border-radius: 0;
        background: rgba(246,247,248,0.88);
        color: #6E7682;
        font-family: "Courier New", Courier, monospace;
        font-size: 10px;
        line-height: 1;
        text-align: center;
        letter-spacing: 0.08em;
        font-weight: 400;
    }
    .memory-unified-badge.is-healthy { color: #52665E; background: rgba(243,248,245,0.86); }
    .memory-unified-badge.is-dirty,
    .memory-unified-badge.is-rebuilding { color: #786A4E; background: rgba(250,247,239,0.88); }
    .memory-unified-badge.is-degraded,
    .memory-unified-badge.is-failed { color: #7A4A4A; background: rgba(250,244,241,0.86); }
    .memory-unified-badge.is-empty { color: #8C95A3; background: rgba(247,248,249,0.82); }
    .memory-unified-detail {
        margin-top: 10px;
        padding: 10px 0 0;
        color: #6C747F;
        font-size: 11px;
        line-height: 1.65;
        letter-spacing: 0.035em;
        border-top: 1px solid rgba(74,78,89,0.06);
        word-break: break-word;
    }
    .memory-unified-actions { margin-top: 12px; }


.memory-settings-control-list {
    display: grid;
    gap: 14px;
    margin: 14px 0 18px;
}
.memory-setting-control {
    display: grid;
    gap: 9px;
    padding: 12px 2px 14px;
    border-bottom: 1px solid rgba(40, 46, 50, 0.08);
}
.memory-setting-control-head {
    align-items: baseline;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}
.memory-setting-control-head b {
    color: rgba(30, 34, 37, 0.78);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.05em;
}
.memory-setting-control-head em {
    color: rgba(30, 34, 37, 0.42);
    font-size: 11px;
    font-style: italic;
    letter-spacing: 0.08em;
    white-space: nowrap;
}
.memory-settings-range {
    width: 100%;
    accent-color: #AEB8BD;
}
.memory-action-strip .memory-danger-action {
    color: rgba(96, 42, 42, 0.72);
}
