@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;1,400&family=Noto+Sans+SC:wght@300;400&display=swap');
: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: rgba(255,255,255,0.30);
    --one-app-icon-border: 1px solid rgba(255,255,255,0.52);
    --one-app-icon-shadow: inset 0 1px 1px rgba(255,255,255,0.86), 0 4px 10px rgba(15,23,42,0.05);
    --one-app-icon-backdrop: blur(1px) saturate(1.08);
    --one-app-logo-color: #111111;
    --one-app-icon-radius: 26px;
    --one-app-label-color: #7D7D7D;
    --one-app-label-size: 11px;
    --one-app-label-weight: 400;
    --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);
    --one-quality-ink: #111111;
    --one-quality-soft-ink: #211F1C;
    --one-quality-muted: #7E7B74;
    --one-quality-faint: #B5B0A8;
    --one-quality-line: rgba(17,17,17,0.10);
    --one-quality-button: #111111;
    --one-quality-button-shadow: 0 12px 28px rgba(0,0,0,0.12);
    --one-visual-vw: 100vw;
    --one-visual-vh: 100svh;
    --one-layout-vw: 100vw;
    --one-layout-vh: 100svh;
    --one-shell-lock-width: 100vw;
    --one-shell-lock-height: 100svh;
    --one-visual-offset-top: 0px;
    --one-visual-offset-left: 0px;
    --one-visual-bottom-gap: 0px;
    --one-desktop-top-gap: max(28px, calc(env(safe-area-inset-top) + 12px));
    --chat-composer-bottom-gap: 20px;
}
* {
        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;
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    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;
        overflow: hidden;
    }

    #slider {
        display: flex;
        width: 200vw;
        height: 100%;
        transition: transform 0.52s cubic-bezier(0.16, 1, 0.3, 1);
        will-change: transform;
        touch-action: pan-y pinch-zoom;
        user-select: none;
        -webkit-user-select: none;
    }

    .page {
        width: 100vw;
        height: 100%;
        padding: var(--one-desktop-top-gap) 24px 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        flex: 0 0 100vw;
    }

    /* Desktop Grid System */
    .desktop-grid {
        --one-desktop-app-cell-width: 64px;
        --one-desktop-app-cell-height: 78px;
        --one-desktop-icon-size: 50px;
        --one-desktop-logo-frame-size: 32px;
        --one-desktop-logo-size: 23px;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        grid-auto-rows: 78px;
        column-gap: 18px;
        row-gap: 28px;
        width: 100%;
        padding: 0 4px;
        justify-items: center;
        align-items: start;
    }

    /* 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: #111111;
        margin-bottom: 8px;
    }
    .wn-line {
        width: 24px;
        height: 1px;
        background: #d0d4db;
        margin-bottom: 10px;
    }
    .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 {
        width: var(--one-desktop-app-cell-width, 64px);
        min-height: var(--one-desktop-app-cell-height, 78px);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        justify-self: center;
        align-self: start;
        cursor: pointer;
        transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1);
    }
    
    .app:active {
        transform: scale(0.9);
    }

    /* =========================================================
       极致质感：高通透白调渐变磨砂玻璃方圆图标基底
       ========================================================= */
    .icon-box {
        width: var(--one-desktop-icon-size, 56px);
        height: var(--one-desktop-icon-size, 56px);
        flex: 0 0 var(--one-desktop-icon-size, 56px);
        aspect-ratio: 1 / 1;
        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: grid;
        place-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;
    }

    /* v345 desktop icon glass sheen */
    .icon-box::before {
        content: '';
        position: absolute;
        inset: 1px;
        border-radius: inherit;
        pointer-events: none;
        background: linear-gradient(180deg, rgba(255,255,255,0.28), rgba(255,255,255,0.04) 42%, rgba(255,255,255,0));
    }

    .icon-logo-frame {
        width: var(--one-desktop-logo-frame-size, 34px);
        height: var(--one-desktop-logo-frame-size, 34px);
        display: grid;
        place-items: center;
        position: relative;
        z-index: 1;
        min-width: 0;
        min-height: 0;
    }

    /* =========================================================
       全官方Logo + 极简温柔灰阶
       ========================================================= */
    .icon-box svg {
        width: var(--one-desktop-logo-size, 23px);
        height: var(--one-desktop-logo-size, 23px);
        color: var(--one-app-logo-color, #0F172A);
        fill: none;
        stroke: currentColor;
        stroke-width: 1.5;
        stroke-linecap: round;
        stroke-linejoin: round;
        display: block;
        overflow: visible;
        transform-origin: 50% 50%;
        filter: none;
        -webkit-filter: none;
        text-shadow: none;
        box-shadow: none;
    }
    .icon-box svg * {
        filter: none;
        -webkit-filter: none;
        text-shadow: none;
        box-shadow: none;
    }
    .icon-logo-frame svg.app-icon {
        width: var(--one-desktop-logo-size, 28px);
        height: var(--one-desktop-logo-size, 28px);
        max-width: 100%;
        max-height: 100%;
    }
    .icon-logo-frame img.app-custom-logo {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: contain;
        object-position: center;
    }
    /* v331：图标外层、底座、logo 统一等宽等高；不再按单个图标改尺寸。 */
    .icon-heart,
    .icon-find,
    .icon-camera,
    .icon-cart,
    .icon-douyin,
    .icon-x,
    .icon-music,
    .icon-game,
    .icon-guide,
    .icon-books,
    .icon-memory,
    .icon-worldbook,
    .icon-meet,
    .icon-sink,
    .icon-phone,
    .icon-message,
    .icon-chat,
    .icon-settings { transform: none; }

    .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(112px + env(safe-area-inset-bottom));
        left: 0;
        right: 0;
        display: flex;
        justify-content: center;
        gap: 10px;
        z-index: 10;
        pointer-events: auto;
    }

    .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);
    }


    .desktop-search-capsule {
        position: absolute;
        left: 50%;
        bottom: calc(130px + env(safe-area-inset-bottom));
        width: min(156px, calc(100% - 128px));
        height: 24px;
        transform: translateX(-50%);
        z-index: 11;
        display: grid;
        grid-template-columns: 15px minmax(0, 1fr) auto;
        align-items: center;
        gap: 5px;
        padding: 0 8px;
        border-radius: 999px;
        border: 1px solid rgba(255,255,255,0.54);
        background: rgba(255,255,255,0.28);
        box-shadow:
            0 8px 20px rgba(120,130,140,0.055),
            inset 0 1px 1px rgba(255,255,255,0.72);
        backdrop-filter: blur(16px) saturate(118%);
        -webkit-backdrop-filter: blur(16px) saturate(118%);
        color: rgba(73,77,84,0.66);
        pointer-events: auto;
    }

    .desktop-search-capsule svg {
        width: 12px;
        height: 12px;
        stroke: currentColor;
        stroke-width: 1.45;
        fill: none;
        stroke-linecap: round;
        stroke-linejoin: round;
        opacity: 0.72;
    }

    .desktop-search-capsule input {
        min-width: 0;
        width: 100%;
        height: 24px;
        border: 0;
        outline: 0;
        background: transparent;
        color: #4A4E59;
        caret-color: #4A4E59;
        font-size: 11px;
        line-height: 24px;
        letter-spacing: 0.06em;
        font-family: "PingFang SC", "Helvetica Neue", system-ui, sans-serif;
        user-select: text;
        -webkit-user-select: text;
    }

    .desktop-search-capsule input::placeholder {
        color: rgba(111,118,128,0.62);
        opacity: 1;
    }

    .desktop-search-capsule > span {
        font-size: 8px;
        line-height: 1;
        letter-spacing: 0.12em;
        color: rgba(111,118,128,0.42);
        font-family: "PingFang SC", "Helvetica Neue", system-ui, sans-serif;
    }

    .desktop-search-capsule:focus-within {
        background: rgba(255,255,255,0.38);
        border-color: rgba(255,255,255,0.70);
        box-shadow:
            0 10px 24px rgba(120,130,140,0.07),
            inset 0 1px 1px rgba(255,255,255,0.84);
    }

    /* 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;
        top: 0;
        left: 0;
        right: 0;
        bottom: auto;
        min-height: 0;
        height: var(--one-shell-lock-height, var(--one-layout-vh, 100svh));
        background: rgba(30, 30, 35, 0.4); 
        z-index: 10000;
        display: none;
        justify-content: center;
        align-items: center;
        padding: max(24px, calc(env(safe-area-inset-top) + 18px)) 24px max(24px, calc(env(safe-area-inset-bottom) + 18px), calc(var(--one-visual-bottom-gap, 0px) + 18px));
        opacity: 0;
        transition: opacity 0.24s ease;
    }
    .modal-overlay.show {
        opacity: 1;
    }
    .modal-box {
        position: relative;
        width: 100%;
        max-width: 320px;
        max-height: calc(var(--one-shell-lock-height, var(--one-layout-vh, 100svh)) - max(48px, calc(env(safe-area-inset-top) + env(safe-area-inset-bottom) + 36px)));
        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;
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
        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, .chat-stock-ask-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: 16px;
        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: 16px;
        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[data-count]:not([data-count=""])::before {
        content: attr(data-count);
        position: absolute;
        right: 10px;
        bottom: 9px;
        z-index: 1;
        padding: 4px 8px;
        border-radius: 999px;
        background: rgba(255,255,255,0.76);
        color: #4a4e59;
        font-size: 11px;
        letter-spacing: 0.02em;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
    .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;
        top: 0;
        left: 0;
        right: 0;
        bottom: auto;
        min-height: 0;
        height: var(--one-shell-lock-height, var(--one-layout-vh, 100svh));
        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.035em;
        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(24px, 6.8vw, 29px);
        line-height: 1.04;
        letter-spacing: -0.025em;
        font-weight: 400;
        font-style: italic;
        color: var(--one-quality-soft-ink, #211F1C);
        cursor: pointer;
        text-shadow: none;
    }
    .settings-app-title:active,
    .settings-subpage-title:active { opacity: 0.58; }
    .settings-volume { display: none; }

    .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: 20px;
        line-height: 1.14;
        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-logout-zone {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        padding: 6px 0 22px;
    }
    .settings-logout-btn {
        width: max-content;
        min-width: 0;
        min-height: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: rgba(52, 57, 65, 0.60);
        font-size: 12px;
        line-height: 1.2;
        letter-spacing: 0.08em;
        font-weight: 400;
        box-shadow: none;
        text-decoration: none;
    }
    .settings-logout-btn:active {
        transform: translateY(1px);
        color: rgba(52, 57, 65, 0.86);
        background: transparent;
    }

    /* 子页面 */
    .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(24px, 6.8vw, 29px);
        margin-top: 16px;
    
        line-height: 1.04;
        letter-spacing: -0.025em;
        color: var(--one-quality-soft-ink, #211F1C);}
    .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: 16px;
        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: 16px;
        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: -6px;
        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; }
    .modal-schedule-form {
        margin-top: 14px;
        display: flex;
        flex-direction: column;
        gap: 12px;
        max-height: min(58vh, 520px);
        overflow-y: auto;
        padding-right: 1px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .modal-schedule-form::-webkit-scrollbar { display: none; width: 0; height: 0; }
    .modal-schedule-form .settings-field-textarea {
        min-height: 96px;
        resize: vertical;
    }
    .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: var(--one-shell-stage-center-x, 50%);
        top: var(--one-shell-stage-center-y, 50%);
        width: var(--one-shell-frame-width, 414px);
        height: var(--one-shell-frame-height, 868px);
        transform: translate(-50%, -50%);
        z-index: 9950;
        pointer-events: none;
        display: none;
        box-sizing: border-box;
        border: max(1.2px, calc(var(--one-shell-scale, 1) * 1.5px)) solid rgba(52, 57, 65, 0.16);
        border-radius: calc(var(--one-shell-scale, 1) * 34px);
        background: transparent;
        box-shadow:
            0 14px 32px rgba(28, 34, 40, 0.10),
            0 2px 8px rgba(28, 34, 40, 0.06),
            inset 0 0 0 1px rgba(255, 255, 255, 0.72);
    }
    .phone-shell-frame::before {
        content: '';
        position: absolute;
        top: calc(var(--one-shell-scale, 1) * 7px);
        left: 50%;
        width: calc(var(--one-shell-scale, 1) * 44px);
        height: max(3px, calc(var(--one-shell-scale, 1) * 4px));
        transform: translateX(-50%);
        border-radius: 999px;
        background: rgba(42, 45, 52, 0.16);
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.58);
    }
    .phone-shell-frame::after {
        content: '';
        position: absolute;
        right: calc(var(--one-shell-scale, 1) * -3px);
        top: 31%;
        width: max(2px, calc(var(--one-shell-scale, 1) * 2px));
        height: calc(var(--one-shell-scale, 1) * 52px);
        border-radius: 999px;
        background: rgba(52, 57, 65, 0.14);
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.62);
    }
    body.show-phone-shell {
        background-color: #FFFFFF;
        background-image: none;
    }
    body.show-phone-shell::before {
        content: 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: var(--one-shell-stage-center-x, 50%);
        top: var(--one-shell-stage-center-y, 50%);
        right: auto;
        bottom: auto;
        width: var(--one-shell-base-width, 390px);
        height: var(--one-shell-base-height, 912px);
        transform: translate(-50%, -50%) scale(var(--one-shell-content-scale, 1));
        transform-origin: center center;
        border-radius: 34px;
        overflow: hidden;
        isolation: isolate;
    }
    body.show-phone-shell #desktop {
        background-color: transparent;
        background-image: none;
        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-content-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-image: none;
    }
    .icon-box.custom-icon .icon-logo-frame {
        width: 100%;
        height: 100%;
        border-radius: inherit;
        overflow: hidden;
    }
    .icon-box.custom-icon svg { display: none; }
    .icon-box.custom-icon .app-custom-logo {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: inherit;
    }

    @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: 20px; 
        line-height: 1.14;}
        .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: 16px;
        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;
        top: 0;
        left: 0;
        right: 0;
        bottom: auto;
        min-height: 0;
        height: var(--one-shell-lock-height, var(--one-layout-vh, 100svh));
        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-size: 10.5px;
        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.015em;
        color: var(--wb-ink);
    
        font-size: 22px;
        line-height: 1.05;}
    .wb-library-title {
        font-size: 30px;
        line-height: 1.04;
        margin: 0;
    
        letter-spacing: -0.025em;}
    .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: 16px;
        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(20px, 6.2vw, 24px);
        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(24px, 6.8vw, 29px);
        line-height: 1.04;
        margin: 0 0 16px;
        word-break: break-word;
    
        letter-spacing: -0.025em;}
    .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-memory-rules-card {
        margin: 18px 0 0;
        padding: 16px 0 0;
        border-top: 1px solid rgba(36, 40, 42, 0.1);
    }
    .wb-memory-rules-head {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 12px;
    }
    .wb-memory-rules-dot {
        width: 5px;
        height: 5px;
        border-radius: 999px;
        background: #1F2224;
        margin-top: 7px;
        opacity: 0.76;
        flex: 0 0 auto;
    }
    .wb-memory-rules-head strong {
        display: block;
        font-size: 12px;
        letter-spacing: 0.08em;
        color: #2D302F;
        font-weight: 600;
    }
    .wb-memory-rules-head small {
        display: block;
        margin-top: 4px;
        font-size: 11px;
        line-height: 1.6;
        color: #858A88;
    }
    .wb-memory-rule-list {
        display: grid;
        gap: 8px;
    }
    .wb-memory-rule-list p {
        margin: 0;
        padding: 10px 12px;
        border-radius: 16px;
        background: rgba(246, 247, 247, 0.78);
        border: 1px solid rgba(35, 39, 42, 0.06);
        color: #565B59;
        font-size: 12px;
        line-height: 1.7;
    }
    .wb-settings-card {
        display: none;
        margin: 0 0 19px;
        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: 16px;
        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(26px, 7vw, 31px);
        line-height: 1.04;
        margin-bottom: 14px;
        color: #282825;
    
        letter-spacing: -0.02em;}
    .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: flex-end;
        justify-content: space-between;
        gap: 16px;
        margin: 0 0 16px;
        opacity: 0.52;
        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;
        padding-bottom: 5px;
    }
    .wb-inject-options {
        display: inline-flex;
        align-items: flex-end;
        justify-content: flex-end;
        gap: 18px;
        width: auto;
        border: 0;
        background: transparent;
    }
    .wb-inject-options button {
        position: relative;
        height: auto;
        border: 0;
        border-radius: 0;
        padding: 0 0 5px;
        background: transparent;
        color: #8B8780;
        font-size: 12px;
        line-height: 1;
        letter-spacing: 0.11em;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    .wb-inject-options button::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 1px;
        background: currentColor;
        opacity: 0.24;
        transform: scaleX(0.42);
        transform-origin: left center;
        transition: opacity 0.18s ease, transform 0.18s ease;
    }
    .wb-inject-options button + button { border-left: 0; }
    .wb-inject-options button.active {
        background: transparent;
        color: #20211F;
    }
    .wb-inject-options button.active::after { opacity: 0.82; transform: scaleX(1); }
    .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: 16px; padding: 4px 0 7px; }
    .wb-entry-body {
        width: 100%;
        min-height: 46vh;
        border: 0;
        outline: 0;
        resize: vertical;
        background: transparent;
        color: #3B3934;
        font-size: 16px;
        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: 22px; line-height: 1.05; margin: 0 0 8px; 
        letter-spacing: -0.015em;}
    .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: 320px; }
    .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: clamp(20px, 6.2vw, 24px); margin-top: 38px; 
        line-height: 1.08;}
        .wb-detail-title, .wb-entry-title-input { font-size: 30px; }
    }


    /* 记忆 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(42px, calc(env(safe-area-inset-bottom) + 28px));
        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: 30px;
        line-height: 1.02;
        letter-spacing: -0.035em;
        font-style: italic;
        font-weight: 400;
        color: var(--one-quality-soft-ink, #211F1C);
        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: hidden;
        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-size: 10.5px;
        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 0;
        min-height: 0;
        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(164px, calc(env(safe-area-inset-bottom) + 128px)) 0;
        scroll-padding-bottom: max(164px, calc(env(safe-area-inset-bottom) + 128px));
        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: 12px;
        height: 12px;
        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.035em;
        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: var(--one-shell-lock-height, var(--one-layout-vh, 100svh));
        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-size: 10.5px;
        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: 16px;
        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;
        top: 0;
        left: 0;
        right: 0;
        bottom: auto;
        min-height: 0;
        height: var(--one-shell-lock-height, var(--one-layout-vh, 100svh));
        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: 30px;
        line-height: 1.02;
        letter-spacing: -0.035em;
        font-style: italic;
        font-weight: 400;
        color: var(--one-quality-soft-ink, #211F1C);
        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: 16px;
        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: var(--one-auth-button-top-gap);
        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.035em;
        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: 25px;
        line-height: 1.08;
        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: var(--one-quality-button, #111111);
        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;
        top: 0;
        left: 0;
        right: 0;
        bottom: auto;
        min-height: 0;
        height: var(--one-shell-lock-height, var(--one-layout-vh, 100svh));
        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: none; }
    @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: 30px;
        line-height: 1.02;
        letter-spacing: -0.035em;
        font-style: italic;
        font-weight: 400;
        color: var(--one-quality-soft-ink, #211F1C);
    }
    .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;
    }

/* v329 title normalization */
.settings-app-kicker, .settings-section-label, .settings-entry-subtitle, .messages-subtitle, .wb-library-subtitle, .memory-title-button em {
    text-transform: uppercase;
    letter-spacing: 0.14em;
}
.settings-app-title, .settings-subpage-title, .messages-title, .chat-title-news, .wb-library-title, .memory-title-button span {
    font-size: 30px;
}


/* v365 · shell fit + preserve original desktop glass surfaces */
.one-desktop-tuned .one-widget-surface {
    background: rgba(255,255,255,0.20);
    border-color: rgba(255,255,255,0.40);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 24px rgba(255,255,255,0.12);
}
.one-desktop-tuned .one-widget-surface::before,
.one-desktop-tuned .one-widget-surface::after,
.one-desktop-tuned .one-desktop-search::before,
.one-desktop-tuned .one-desktop-dock::before {
    content: none;
    display: none;
}
.one-desktop-tuned .one-desktop-dock {
    background: rgba(255,255,255,0.20);
    border-color: rgba(255,255,255,0.45);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    box-shadow: 0 12px 32px rgba(255,255,255,0.18);
}
.one-desktop-tuned .one-desktop-search {
    background: rgba(255,255,255,0.20);
    border-color: rgba(255,255,255,0.45);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(255,255,255,0.08);
}
body.show-phone-shell #desktop {
    background-color: transparent;
}


/* v366 · glass surface cleanup: no internal gradients or pseudo highlight layers */
.one-desktop-tuned .one-app-icon {
    background: var(--one-app-icon-bg, rgba(255,255,255,0.28));
    border: var(--one-app-icon-border, 1px solid rgba(255,255,255,0.74));
    box-shadow: var(--one-app-icon-shadow, 0 6px 18px -12px rgba(31,35,42,0.26));
    -webkit-backdrop-filter: var(--one-app-icon-backdrop, blur(12px) saturate(1.02));
    backdrop-filter: var(--one-app-icon-backdrop, blur(12px) saturate(1.02));
}
.one-desktop-tuned .one-app-icon::before,
.one-desktop-tuned .one-app-icon::after,
.one-desktop-tuned .one-widget-surface::before,
.one-desktop-tuned .one-widget-surface::after,
.one-desktop-tuned .one-desktop-search::before,
.one-desktop-tuned .one-desktop-search::after,
.one-desktop-tuned .one-desktop-dock::before,
.one-desktop-tuned .one-desktop-dock::after {
    content: none;
    display: none;
    background: none;
}
.one-desktop-tuned .one-widget-surface,
.one-desktop-tuned .one-desktop-search,
.one-desktop-tuned .one-desktop-dock {
    background: rgba(255,255,255,0.20);
    border-color: rgba(255,255,255,0.58);
    -webkit-backdrop-filter: blur(12px) saturate(1.02);
    backdrop-filter: blur(12px) saturate(1.02);
    box-shadow: 0 12px 30px -20px rgba(31,35,42,0.22);
}
body.show-phone-shell .phone-shell-frame {
    background: transparent;
    border-color: rgba(52, 57, 65, 0.16);
    box-shadow: 0 14px 32px rgba(28,34,40,0.10), 0 2px 8px rgba(28,34,40,0.06), inset 0 0 0 1px rgba(255,255,255,0.72);
}
body.show-phone-shell :where(#desktop, .settings-app-page, .worldbook-app-page, .chat-app-page, .messages-app-page, .phone-app-page) {
    border-radius: 34px;
}

/* v368 · shell desktop viewport parity with app pages */
body.show-phone-shell #onePhoneDesktopHost {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border-radius: inherit;
    background-color: transparent;
}
body.show-phone-shell #desktop {
    background-color: transparent;
    background-image: none;
}
