.chat-ta-diary-note-paper[hidden] {
    display: none;
}
.chat-ta-diary-note-paper p {
    padding-left: 12px;
}
.chat-ta-diary-entry-note-paper,
.chat-ta-diary-entry-note-paper *,
.chat-ta-diary-note-paper,
.chat-ta-diary-note-paper * {
    border-radius: 0;
}
/* v158 end */


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

/* v161 · Ta settings modal now follows the same global centered modal geometry. */
.memory-settings-modal {
    width: auto;
    min-height: auto;
    padding: 24px;
    background: rgba(30, 30, 35, 0.40);
}
.memory-settings-dialog {
    width: 100%;
    max-width: 318px;
    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)));
    border-radius: 22px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}
.memory-settings-dialog .modal-content {
    max-height: calc(var(--one-shell-lock-height, var(--one-layout-vh, 100svh)) - max(98px, calc(env(safe-area-inset-top) + env(safe-area-inset-bottom) + 86px)));
    padding: 24px 20px max(24px, calc(var(--one-visual-bottom-gap, 0px) + 20px));
}


    .memory-unified-panel {
        margin-top: 14px;
        padding-top: 14px;
        border-top: 1px solid rgba(74,78,89,0.08);
    }
    .memory-unified-grid {
        display: grid;
        gap: 8px;
        margin-top: 10px;
    }
    .memory-unified-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 10px 0;
        border-bottom: 1px solid rgba(74,78,89,0.07);
    }
    .memory-unified-row strong {
        display: block;
        color: #3B4048;
        font-size: 12px;
        letter-spacing: 0.08em;
        font-weight: 500;
    }
    .memory-unified-row span {
        display: block;
        margin-top: 4px;
        color: #8C95A3;
        font-size: 11px;
        line-height: 1.45;
        letter-spacing: 0.04em;
    }
    .memory-unified-badge {
        flex: 0 0 auto;
        min-width: 68px;
        padding: 5px 8px;
        border-radius: 0;
        background: rgba(246,247,248,0.88);
        color: #6E7682;
        font-size: 10.5px;
        line-height: 1;
        text-align: center;
        letter-spacing: 0.04em;
        font-weight: 500;
    }
    .memory-unified-badge.is-healthy { color: #52665E; background: rgba(243,248,245,0.86); }
    .memory-unified-badge.is-dirty,
    .memory-unified-badge.is-rebuilding { color: #786A4E; background: rgba(250,247,239,0.88); }
    .memory-unified-badge.is-degraded,
    .memory-unified-badge.is-failed { color: #7A4A4A; background: rgba(250,244,241,0.86); }
    .memory-unified-badge.is-empty { color: #8C95A3; background: rgba(247,248,249,0.82); }
    .memory-unified-detail {
        margin-top: 10px;
        padding: 10px 0 12px;
        max-height: min(32vh, 240px);
        overflow-y: auto;
        color: #6C747F;
        font-size: 11px;
        line-height: 1.65;
        letter-spacing: 0.035em;
        border-top: 1px solid rgba(74,78,89,0.06);
        word-break: break-word;
        white-space: pre-wrap;
        user-select: text;
        -webkit-user-select: text;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
    }
    .memory-unified-actions { margin-top: 12px; grid-template-columns: 1fr; }


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


/* v211: ChatStyle is a native chat view; external studio layer removed. */

/* v202/v321 · appearance icons/status bar/shell refinement
   v321：手机壳外层不再跟随键盘 dVH 收缩；键盘只改变输入栏 bottom gap。 */
html.one-force-fullscreen-root,
html.one-force-fullscreen-root body {
    width: 100%;
    height: var(--one-shell-lock-height, var(--one-layout-vh, 100svh));
    min-height: var(--one-shell-lock-height, var(--one-layout-vh, 100svh));
    max-height: var(--one-shell-lock-height, var(--one-layout-vh, 100svh));
    overflow: hidden;
    overscroll-behavior: none;
}
html.one-force-fullscreen-root body.one-force-fullscreen-body {
    position: fixed;
    inset: 0;
    min-width: var(--one-shell-lock-width, 100vw);
    max-width: var(--one-shell-lock-width, 100vw);
    min-height: var(--one-shell-lock-height, var(--one-layout-vh, 100svh));
    max-height: var(--one-shell-lock-height, var(--one-layout-vh, 100svh));
}
html.one-force-fullscreen-root.one-viewport-keyboard,
html.one-force-fullscreen-root.one-viewport-keyboard body,
html.one-force-fullscreen-root.one-viewport-keyboard body.one-force-fullscreen-body {
    height: var(--one-shell-lock-height, var(--one-layout-vh, 100svh));
    min-height: var(--one-shell-lock-height, var(--one-layout-vh, 100svh));
    max-height: var(--one-shell-lock-height, var(--one-layout-vh, 100svh));
}
html.one-layout-scroll-locked,
html.one-layout-scroll-locked body {
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: manipulation;
    scroll-behavior: auto;
}
html.one-layout-scroll-locked body.one-force-fullscreen-body {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
}
html.one-layout-scroll-locked body.one-phone-app-open #desktop,
html.one-layout-scroll-locked body.one-chat-app-visible #desktop,
html.one-layout-scroll-locked.one-chat-app-visible body #desktop,
html.one-layout-scroll-locked body.one-chat-output-rendering #desktop {
    visibility: hidden;
    pointer-events: none;
}
html.one-force-fullscreen-root #desktop,
html.one-force-fullscreen-root #slider,
html.one-force-fullscreen-root .page {
    height: var(--one-shell-lock-height, var(--one-layout-vh, 100svh));
    min-height: var(--one-shell-lock-height, var(--one-layout-vh, 100svh));
    max-height: var(--one-shell-lock-height, var(--one-layout-vh, 100svh));
}
html.one-force-fullscreen-root :where(.settings-app-page, .worldbook-app-page, .memory-app-page, .chat-app-page, .messages-app-page, .phone-app-page, .modal-overlay) {
    max-height: var(--one-shell-lock-height, var(--one-layout-vh, 100svh));
}
html.one-force-fullscreen-root.one-viewport-keyboard :where(.settings-app-page, .worldbook-app-page, .memory-app-page, .messages-app-page, .phone-app-page, .modal-overlay) {
    max-height: var(--one-shell-lock-height, var(--one-layout-vh, 100svh));
}
html.one-force-fullscreen-root.one-viewport-keyboard body:not(.show-phone-shell) .chat-app-page {
    top: 0;
    height: var(--one-shell-lock-height, var(--one-layout-vh, 100svh));
    min-height: var(--one-shell-lock-height, var(--one-layout-vh, 100svh));
    max-height: var(--one-shell-lock-height, var(--one-layout-vh, 100svh));
}
html.one-force-fullscreen-root.one-viewport-keyboard body.show-phone-shell .chat-app-page {
    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);
    min-height: 0;
    max-height: var(--one-shell-base-height, 912px);
    transform: translate(-50%, -50%) scale(var(--one-shell-scale, 1));
    transform-origin: center center;
}
html.one-force-fullscreen-root.one-viewport-keyboard .chat-thread-view.active .chat-thread-messages {
    padding-bottom: max(96px, calc(var(--one-visual-bottom-gap, 0px) + env(safe-area-inset-bottom) + 88px));
}
body.one-phone-app-open #desktop {
    pointer-events: none;
}
.one-statusbar-host {
    position: fixed;
    left: var(--one-statusbar-surface-left, 0px);
    top: var(--one-statusbar-surface-top, 0px);
    width: var(--one-statusbar-surface-width, 100vw);
    height: var(--one-statusbar-surface-height, var(--one-shell-lock-height, var(--one-layout-vh, 100svh)));
    z-index: 30040;
    pointer-events: none;
    overflow: hidden;
    border-radius: var(--one-statusbar-surface-radius, 0px);
    contain: layout paint style;
}
.one-statusbar-host::before,
.one-statusbar-host::after {
    position: absolute;
    top: var(--one-statusbar-inner-top, max(12px, env(safe-area-inset-top)));
    height: var(--one-statusbar-inner-height, 24px);
    line-height: var(--one-statusbar-inner-height, 24px);
    color: rgba(34, 35, 38, 0.84);
    pointer-events: none;
    text-shadow: 0 1px 10px rgba(255, 255, 255, 0.74);
}
.one-statusbar-host::before {
    content: var(--one-statusbar-time, "12:00");
    left: var(--one-statusbar-inner-left, 28px);
    font-size: var(--one-statusbar-font-size, 12.5px);
    font-weight: 700;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
}
.one-statusbar-host::after {
    content: '';
    right: var(--one-statusbar-inner-right, 26px);
    width: var(--one-statusbar-icon-width, 82px);
    height: var(--one-statusbar-icon-height, 24px);
    background-image: var(--one-statusbar-icons);
    background-repeat: no-repeat;
    background-position: right center;
    background-size: contain;
}
body.show-phone-shell.one-statusbar-on .phone-shell-frame::before {
    opacity: 0.34;
}
.settings-appearance-category-list {
    display: grid;
    gap: 12px;
}
.settings-appearance-category {
    width: 100%;
    display: grid;
    grid-template-columns: 42px 1fr 20px;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    border: 0;
    border-top: 1px solid rgba(74, 78, 89, 0.10);
    border-bottom: 1px solid rgba(255, 255, 255, 0.62);
    background: transparent;
    color: #34363A;
    text-align: left;
}
.settings-appearance-category-num {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
    color: rgba(52, 54, 58, 0.28);
    font-style: italic;
}
.settings-appearance-category-copy {
    display: grid;
    gap: 4px;
}
.settings-appearance-category-copy strong {
    font-size: 14px;
    font-weight: 650;
    letter-spacing: 0.04em;
}
.settings-appearance-category-copy em {
    font-size: 9px;
    font-style: normal;
    letter-spacing: 0.16em;
    color: rgba(52, 54, 58, 0.42);
}
.settings-appearance-category-copy small {
    font-size: 11px;
    line-height: 1.55;
    color: rgba(52, 54, 58, 0.58);
}
.settings-appearance-category-arrow {
    justify-self: end;
    font-size: 16px;
    color: rgba(52, 54, 58, 0.48);
}

.settings-form-stack:is([data-panel="appearance-catalog"], [data-panel^="appearance-"]) {
    --appearance-ink: var(--chat-ink, #343941);
    --appearance-muted: var(--chat-muted, #8C95A3);
    --appearance-line: var(--chat-line, rgba(117,124,135,0.20));
    --appearance-line-strong: var(--chat-line-strong, rgba(74,78,89,0.34));
    counter-reset: appearance-section;
    gap: 0;
}
.settings-form-stack:is([data-panel="appearance-catalog"], [data-panel^="appearance-"]) > :where(.settings-field, .settings-switch-line, .settings-live-note) {
    counter-increment: appearance-section;
    position: relative;
    margin: 0;
    padding: 23px 0 25px;
    padding-left: 0;
    border: 0;
    border-top: 1px solid var(--appearance-line);
    border-bottom: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}
.settings-form-stack:is([data-panel="appearance-catalog"], [data-panel^="appearance-"]) > :where(.settings-field, .settings-switch-line, .settings-live-note)::before {
    content: counter(appearance-section, decimal-leading-zero);
    position: absolute;
    right: 0;
    top: 22px;
    left: auto;
    color: rgba(52,57,65,0.34);
    font-family: "Courier New", Courier, monospace;
    font-size: 10px;
    line-height: 1;
    letter-spacing: 0.14em;
}
.settings-form-stack:is([data-panel="appearance-catalog"], [data-panel^="appearance-"]) .settings-field-label,
.settings-form-stack:is([data-panel="appearance-catalog"], [data-panel^="appearance-"]) .settings-switch-text span {
    color: var(--appearance-muted);
    font-family: "Courier New", Courier, monospace;
    font-size: 10px;
    line-height: 1;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.settings-form-stack:is([data-panel="appearance-catalog"], [data-panel^="appearance-"]) .settings-switch-text strong {
    color: var(--appearance-ink);
    font-size: 15px;
    line-height: 1.18;
    font-weight: 500;
    letter-spacing: 0.035em;
}
.settings-form-stack:is([data-panel="appearance-catalog"], [data-panel^="appearance-"]) .settings-field-input,
.settings-form-stack:is([data-panel="appearance-catalog"], [data-panel^="appearance-"]) .settings-field-select,
.settings-form-stack:is([data-panel="appearance-catalog"], [data-panel^="appearance-"]) .settings-field-textarea {
    border: 0;
    border-bottom: 1px solid var(--appearance-line);
    border-radius: 0;
    background: transparent;
    color: var(--appearance-ink);
    padding: 10px 0 11px;
    box-shadow: none;
}
.settings-form-stack:is([data-panel="appearance-catalog"], [data-panel^="appearance-"]) .settings-field-textarea {
    min-height: 172px;
    line-height: 1.62;
    resize: vertical;
}
.settings-form-stack:is([data-panel="appearance-catalog"], [data-panel^="appearance-"]) .settings-field-input:focus,
.settings-form-stack:is([data-panel="appearance-catalog"], [data-panel^="appearance-"]) .settings-field-select:focus,
.settings-form-stack:is([data-panel="appearance-catalog"], [data-panel^="appearance-"]) .settings-field-textarea:focus {
    border-bottom-color: var(--appearance-line-strong);
    background: transparent;
    box-shadow: none;
}
.settings-form-stack:is([data-panel="appearance-catalog"], [data-panel^="appearance-"]) .settings-preview-box,
.settings-form-stack:is([data-panel="appearance-catalog"], [data-panel^="appearance-"]) .settings-font-preview {
    border: 0;
    border-top: 1px solid rgba(117,124,135,0.16);
    border-bottom: 1px solid rgba(117,124,135,0.16);
    border-radius: 0;
    background-color: transparent;
    box-shadow: none;
}
.settings-form-stack:is([data-panel="appearance-catalog"], [data-panel^="appearance-"]) .settings-action-row {
    margin-top: 14px;
}
.settings-form-stack:is([data-panel="appearance-catalog"], [data-panel^="appearance-"]) :where(.settings-thin-button, .settings-ghost-button, .settings-primary-button) {
    border-radius: 0;
}
.settings-appearance-back.settings-thin-button {
    flex: 0 0 auto;
    width: max-content;
    min-height: 0;
    align-self: flex-start;
    margin: 0 0 12px;
    padding: 8px 0 7px;
    border: 0;
    border-bottom: 1px solid rgba(52,57,65,0.48);
    background: transparent;
    color: #5B606A;
    font-family: "Courier New", Courier, monospace;
    font-size: 11px;
    line-height: 1;
    letter-spacing: 0.12em;
    text-align: left;
    box-shadow: none;
}
.settings-appearance-category-list {
    gap: 0;
}
.settings-appearance-category {
    position: relative;
    grid-template-columns: minmax(0, 1fr) 22px;
    padding: 24px 0 24px;
    border-top: 1px solid var(--appearance-line, rgba(117,124,135,0.20));
    border-bottom: 0;
}
.settings-appearance-category::before {
    content: attr(data-appearance-no);
    position: absolute;
    right: 0;
    top: 23px;
    color: rgba(52,57,65,0.34);
    font-family: "Courier New", Courier, monospace;
    font-size: 10px;
    line-height: 1;
    letter-spacing: 0.14em;
}
.settings-appearance-category-num {
    display: none;
}
.settings-appearance-category-copy {
    padding-right: 54px;
}
.settings-appearance-category-copy strong {
    color: var(--appearance-ink, #343941);
    font-size: 15px;
    line-height: 1.18;
    font-weight: 500;
    letter-spacing: 0.035em;
}
.settings-appearance-category-copy em {
    order: -1;
    color: var(--appearance-muted, #8C95A3);
    font-family: "Courier New", Courier, monospace;
    font-size: 10px;
    line-height: 1;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.settings-appearance-category-copy small {
    color: #747D88;
    font-size: 11px;
    line-height: 1.74;
    letter-spacing: 0.03em;
}
.settings-appearance-category-arrow {
    color: rgba(52,54,58,0.48);
    align-self: center;
}
.settings-form-stack[data-panel="appearance-icons"] .settings-app-editor-list {
    margin-top: 18px;
}
.settings-appearance-category:active {
    opacity: 0.72;
}
.settings-appearance-back {
    width: 100%;
    margin-bottom: 2px;
}

/* v242 · chat push banner and draggable mini chat window */
.one-chat-push-banner {
    position: fixed;
    z-index: 26000;
    top: calc(env(safe-area-inset-top, 0px) + 10px);
    left: 50%;
    width: min(420px, calc(100vw - 28px));
    min-height: 66px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 26px;
    align-items: center;
    gap: 10px;
    padding: 10px 10px 10px 12px;
    border: 1px solid rgba(180, 185, 190, 0.32);
    border-radius: 28px;
    background: linear-gradient(145deg, rgba(255,255,255,0.94), rgba(248,249,249,0.86));
    box-shadow: 0 18px 42px rgba(92, 98, 105, 0.14), inset 0 1px 0 rgba(255,255,255,0.96);
    backdrop-filter: blur(22px) saturate(1.08);
    -webkit-backdrop-filter: blur(22px) saturate(1.08);
    color: #3f444a;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, calc(-118% + var(--one-push-drag-y, 0px))) scale(0.985);
    transition: transform 220ms ease, opacity 180ms ease;
    touch-action: none;
    user-select: none;
}
.one-chat-push-banner.show {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, var(--one-push-drag-y, 0px)) scale(1);
}
.one-chat-push-banner.is-dragging { transition: opacity 120ms ease; }
.one-chat-push-avatar,
.one-mini-chat-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: rgba(246, 247, 247, 0.98);
    background-position: center;
    background-size: cover;
    border: 1px solid rgba(210, 214, 218, 0.72);
    color: #9a9fa5;
    font-size: 11px;
    letter-spacing: 0.08em;
    font-style: italic;
}
.one-chat-push-avatar.has-image,
.one-mini-chat-avatar.has-image { color: transparent; }
.one-chat-push-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.one-chat-push-copy strong {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 650;
    color: #3b3f45;
}
.one-chat-push-copy span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    line-height: 1.35;
    color: rgba(70, 75, 82, 0.72);
}
.one-chat-push-copy em {
    font-size: 9px;
    line-height: 1;
    font-style: normal;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(120, 126, 132, 0.62);
}
.one-chat-push-close {
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(235, 237, 239, 0.72);
    color: rgba(70, 75, 80, 0.62);
    font-size: 17px;
    line-height: 1;
}
.one-mini-chat-window {
    position: fixed;
    z-index: 25990;
    left: 50%;
    top: 86px;
    width: min(360px, calc(100vw - 32px));
    height: min(520px, calc(100vh - 128px));
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    border: 1px solid rgba(176, 182, 188, 0.34);
    border-radius: 30px;
    background: linear-gradient(160deg, rgba(255,255,255,0.95), rgba(248,250,250,0.9));
    box-shadow: 0 26px 70px rgba(80, 86, 92, 0.2), inset 0 1px 0 rgba(255,255,255,0.92);
    backdrop-filter: blur(24px) saturate(1.06);
    -webkit-backdrop-filter: blur(24px) saturate(1.06);
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) scale(0.96);
    transition: opacity 160ms ease, transform 180ms ease;
    resize: none;
    contain: layout paint style;
}
.one-mini-chat-window.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) scale(1);
}
.one-mini-chat-window.show[style*="transform: none"] { transform: none; }
.one-mini-chat-window.is-moving,
.one-mini-chat-window.is-resizing {
    transition: none;
    will-change: left, top, width, height;
}
.one-mini-chat-window.is-resizing .one-mini-chat-messages,
.one-mini-chat-window.is-moving .one-mini-chat-messages {
    pointer-events: none;
}
.one-mini-chat-head {
    min-height: 62px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    padding: 12px 12px 9px;
    border-bottom: 1px solid rgba(210, 214, 218, 0.38);
    cursor: grab;
    touch-action: none;
}
.one-mini-chat-window.is-moving .one-mini-chat-head { cursor: grabbing; }
.one-mini-chat-title {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.one-mini-chat-title strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    color: #3f444a;
}
.one-mini-chat-title span {
    font-size: 9px;
    letter-spacing: 0.14em;
    color: rgba(128, 135, 142, 0.7);
    text-transform: uppercase;
}
.one-mini-chat-open,
.one-mini-chat-close {
    height: 28px;
    border: 1px solid rgba(198, 203, 208, 0.42);
    background: rgba(255,255,255,0.68);
    color: rgba(62, 68, 75, 0.72);
    font-size: 11px;
    border-radius: 999px;
    padding: 0 10px;
}
.one-mini-chat-close {
    width: 28px;
    padding: 0;
    font-size: 17px;
    line-height: 1;
}
.one-mini-chat-messages {
    --chat-bubble-me: #000;
    --chat-bubble-ta: #ffffff;
    --chat-text-me: #ffffff;
    --chat-text-ta: #000000;
    --chat-bubble-radius-ta: 18px;
    --chat-bubble-radius-me: 18px;
    --chat-thread-font-size: 12px;
    --chat-avatar-display-ta: none;
    --chat-avatar-display-me: none;
    --chat-avatar-frame-display: none;
    min-height: 0;
    overflow: auto;
    padding: 14px 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    -webkit-overflow-scrolling: touch;
}
.one-mini-chat-line.chat-thread-row {
    flex: 0 0 auto;
    width: 100%;
    padding: 0;
}
.one-mini-chat-line.chat-thread-row.is-system {
    justify-content: center;
}
.one-mini-chat-messages .chat-thread-msg-stack {
    max-width: min(82%, calc(22em + 24px));
}
.one-mini-chat-messages .chat-thread-line {
    max-width: 100%;
}
.one-mini-chat-messages .chat-thread-bubble.is-text {
    max-width: 100%;
}
.one-mini-chat-messages .chat-thread-time {
    display: none;
}
.one-mini-chat-empty {
    margin: auto;
    font-size: 12px;
    letter-spacing: 0.08em;
    color: rgba(120, 126, 132, 0.68);
}
.one-mini-chat-foot {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px 10px;
    border-top: 1px solid rgba(210, 214, 218, 0.34);
    color: rgba(118, 125, 132, 0.7);
    font-size: 10px;
    letter-spacing: 0.08em;
}
.one-mini-chat-composer {
    width: 100%;
    min-height: 40px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 8px;
    padding: 4px 4px 4px 12px;
    border: 1px solid rgba(194, 200, 206, 0.36);
    border-radius: var(--chat-mini-input-radius, 22px);
    background: var(--chat-mini-input-bg, rgba(255, 255, 255, 0.72));
    color: var(--chat-mini-input-text, rgba(48, 53, 59, 0.92));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.84);
}
.one-mini-chat-composer textarea {
    width: 100%;
    min-height: 36px;
    max-height: 82px;
    resize: none;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--chat-mini-input-text, rgba(48, 53, 59, 0.92));
    font-size: max(16px, var(--chat-thread-font-size, 12px));
    line-height: 1.42;
    padding: 9px 0 7px;
    overflow: hidden;
    user-select: text;
    -webkit-user-select: text;
}
.one-mini-chat-composer textarea::placeholder { color: var(--chat-mini-input-text, rgba(48, 53, 59, 0.92)); opacity: 0.54; }
.one-mini-chat-composer button {
    min-width: 52px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: var(--chat-mini-input-send-bg, rgba(32, 35, 39, 0.92));
    color: var(--chat-mini-input-send-text, rgba(255,255,255,0.94));
    font-size: 11px;
    letter-spacing: 0.04em;
    padding: 0 12px;
}
.one-mini-chat-typing-bubble {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 42px;
    min-height: 28px;
    padding: 9px 12px;
}
.one-mini-chat-typing-bubble span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.32;
    animation: one-mini-chat-dot 1.2s ease-in-out infinite;
}
.one-mini-chat-typing-bubble span:nth-child(2) { animation-delay: 0.16s; }
.one-mini-chat-typing-bubble span:nth-child(3) { animation-delay: 0.32s; }
@keyframes one-mini-chat-dot {
    0%, 72%, 100% { transform: translateY(0); opacity: 0.28; }
    36% { transform: translateY(-3px); opacity: 0.78; }
}
.one-mini-chat-resizer {
    position: absolute;
    right: 7px;
    bottom: 7px;
    width: 22px;
    height: 22px;
    cursor: nwse-resize;
    touch-action: none;
}
.one-mini-chat-resizer::before,
.one-mini-chat-resizer::after {
    content: "";
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 11px;
    height: 1px;
    background: rgba(150, 156, 162, 0.58);
    transform: rotate(-45deg);
    transform-origin: right center;
}
.one-mini-chat-resizer::after {
    width: 7px;
    bottom: 9px;
}
@media (max-width: 520px) {
    .one-chat-push-banner {
        width: calc(100vw - 24px);
        border-radius: 24px;
    }
    .one-mini-chat-window {
        width: calc(100vw - 28px);
        height: min(500px, calc(100vh - 116px));
        border-radius: 28px;
    }
}

/* Chat Style native view · v211 removes external studio layer. */
.chat-app-page.chat-style-open .chat-bottom-dock,
.chat-style-native-view.active ~ .chat-bottom-dock { display: none; }
.chat-style-native-view {
    padding: 0;
    overflow-y: auto;
    background: #fff;
    --studio-ink: #1f2328;
    --studio-muted: rgba(31, 35, 40, 0.52);
    --studio-soft: rgba(31, 35, 40, 0.08);
    --studio-line: rgba(31, 35, 40, 0.12);
    --studio-paper: #fffefd;
    --chat-bubble-ta: #ffffff;
    --chat-text-ta: #1f1f1f;
    --chat-bubble-me: #111111;
    --chat-text-me: #ffffff;
    --chat-bubble-radius-ta: 16px;
    --chat-bubble-radius-me: 16px;
    --chat-thread-font-size: 12px;
    --chat-avatar-display-ta: inline-flex;
    --chat-avatar-display-me: inline-flex;
    --chat-avatar-frame-display: block;
    --chat-avatar-ta-scale: 1;
    --chat-avatar-ta-x: 0px;
    --chat-avatar-ta-y: 0px;
    --chat-avatar-ta-rotate: 0deg;
    --chat-avatar-me-scale: 1;
    --chat-avatar-me-x: 0px;
    --chat-avatar-me-y: 0px;
    --chat-avatar-me-rotate: 0deg;
}
.chat-style-native-view button,
.chat-style-native-view input,
.chat-style-native-view select,
.chat-style-native-view textarea { font: inherit; }
.chat-style-native-view .chat-style-studio {
    min-height: 100%;
    padding: max(22px, env(safe-area-inset-top)) 18px max(32px, calc(env(safe-area-inset-bottom) + var(--one-visual-bottom-gap, 0px) + 20px));
    background: radial-gradient(circle at 18% 0%, rgba(230,235,235,.55), transparent 30%), linear-gradient(180deg, #fff 0%, #fbfaf7 100%);
    color: var(--studio-ink);
}
.chat-style-native-view .chat-style-topbar { display: grid; grid-template-columns: 68px 1fr 76px; align-items: start; gap: 10px; max-width: 760px; margin: 0 auto 18px; }
.chat-style-native-view .chat-style-back,
.chat-style-native-view .chat-style-apply { border: 0; background: transparent; color: #111; padding: 7px 0; font-size: 11px; line-height: 1; letter-spacing: .14em; text-decoration: underline; text-underline-offset: 4px; }
.chat-style-native-view .chat-style-apply { justify-self: end; width: auto; min-width: 62px; height: 30px; padding: 0 12px; color: #fff; background: #111; text-decoration: none; letter-spacing: .08em; }
.chat-style-native-view .chat-style-title-copy { text-align: center; }
.chat-style-native-view .chat-style-title-copy h1 { margin: 0; font-family: Georgia, "Times New Roman", "Songti SC", serif; font-size: 20px; line-height: 1.1; font-style: italic; letter-spacing: -.03em; }
.chat-style-native-view .chat-style-title-copy p { margin: 5px 0 0; color: var(--studio-muted); font-size: 11px; letter-spacing: .02em; }
.chat-style-native-view .chat-style-preview-panel,
.chat-style-native-view .chat-style-workbench { max-width: 760px; margin: 0 auto; }
.chat-style-native-view .chat-style-preview-panel { position: sticky; top: 0; z-index: 8; padding: 10px 0 12px; border-top: 1px solid var(--studio-line); border-bottom: 1px solid var(--studio-line); background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(251,250,247,.94)); }
.chat-style-native-view .chat-style-preview { position: relative; height: 286px; overflow: hidden; background: rgba(250,249,246,.86); isolation: isolate; }
.chat-style-native-view .chat-thread-bg { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.chat-style-native-view .chat-style-preview::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(248,247,244,.82)); pointer-events: none; }
.chat-style-native-view .chat-thread-messages { position: absolute; inset: 0; overflow: hidden; padding: 16px 13px; display: flex; flex-direction: column; justify-content: center; gap: 12px; z-index: 2; }
.chat-style-native-view .chat-thread-row { width: 100%; display: flex; align-items: flex-end; gap: 7px; flex: 0 0 auto; min-width: 0; overflow: visible; }
.chat-style-native-view .chat-thread-row.is-me { justify-content: flex-start; flex-direction: row-reverse; padding-left: 8px; padding-right: 0; box-sizing: border-box; }
.chat-style-native-view .chat-thread-row.is-ta { justify-content: flex-start; flex-direction: row; padding-left: 0; padding-right: 0; box-sizing: border-box; }
.chat-style-native-view .chat-thread-message-avatar { width: 45px; height: 45px; flex: 0 0 45px; box-sizing: border-box; border-radius: 50%; overflow: visible; background: #EEF1F3; color: rgba(52,57,65,.48); display: inline-flex; align-items: center; justify-content: center; font-family: Georgia, "Times New Roman", "Songti SC", serif; font-size: 11px; font-style: italic; line-height: 1; box-shadow: none; border: 0; position: relative; }
.chat-style-native-view .chat-thread-row.is-ta .chat-thread-message-avatar { display: var(--chat-avatar-display-ta); }
.chat-style-native-view .chat-thread-row.is-me .chat-thread-message-avatar { display: var(--chat-avatar-display-me); }
.chat-style-native-view .chat-thread-message-avatar.has-image { color: transparent; }
.chat-style-native-view .chat-thread-message-avatar .avatar-img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; opacity: 0; transform-origin: center; pointer-events: none; }
.chat-style-native-view .chat-thread-message-avatar.has-image .avatar-img { opacity: 1; }
.chat-style-native-view .chat-thread-row.is-ta .chat-thread-message-avatar .avatar-img { transform-origin: left center; transform: translate(var(--chat-avatar-ta-x), var(--chat-avatar-ta-y)) scale(var(--chat-avatar-ta-scale)) rotate(var(--chat-avatar-ta-rotate)); }
.chat-style-native-view .chat-thread-row.is-me .chat-thread-message-avatar .avatar-img { transform-origin: right center; transform: translate(var(--chat-avatar-me-x), var(--chat-avatar-me-y)) scale(var(--chat-avatar-me-scale)) rotate(var(--chat-avatar-me-rotate)); }
.chat-style-native-view .chat-thread-message-avatar .avatar-fallback { position: relative; z-index: 1; color: rgba(52,57,65,.48); }
.chat-style-native-view .chat-thread-message-avatar.has-image .avatar-fallback { opacity: 0; }
.chat-style-native-view .chat-thread-message-avatar .avatar-frame { position: absolute; inset: -3px; z-index: 2; display: var(--chat-avatar-frame-display); border-radius: 50%; pointer-events: none; border: 1px solid rgba(255,255,255,.70); }
.chat-style-native-view .chat-thread-message-avatar .avatar-frame.chat-avatar-frame--mist-film { inset: -4px; border-color: rgba(180,187,188,.48); box-shadow: 0 0 0 1px rgba(255,255,255,.82) inset; }
.chat-style-native-view .chat-thread-message-avatar .avatar-frame.chat-avatar-frame--pearl-line { inset: -5px; border-color: rgba(238,232,220,.90); box-shadow: 0 0 0 1px rgba(173,165,152,.24); }
.chat-style-native-view .chat-thread-message-avatar .avatar-frame.chat-avatar-frame--rain-glass { inset: -5px; border-color: rgba(166,177,183,.40); backdrop-filter: blur(1px); }
.chat-style-native-view .chat-thread-message-avatar .avatar-frame.chat-avatar-frame--soft-lace { inset: -5px; border-style: dotted; border-color: rgba(196,188,178,.64); }
.chat-style-native-view .chat-thread-message-avatar .avatar-frame.chat-avatar-frame--black-ribbon { inset: -4px; border-color: rgba(20,20,20,.74); }
.chat-style-native-view .chat-thread-message-avatar .avatar-frame.chat-avatar-frame--black-ribbon::after { content: ''; position: absolute; left: 50%; bottom: -3px; width: 11px; height: 5px; border-top: 1px solid rgba(20,20,20,.62); transform: translateX(-50%); }
.chat-style-native-view .chat-thread-msg-stack { max-width: min(calc(100% - 52px), calc(22em + 24px)); display: flex; flex-direction: column; gap: 0; overflow: visible; min-width: 0; }
.chat-style-native-view .chat-thread-row.is-me .chat-thread-msg-stack { align-items: flex-end; }
.chat-style-native-view .chat-thread-row.is-ta .chat-thread-msg-stack { align-items: flex-start; }
.chat-style-native-view .chat-thread-line { position: relative; max-width: min(100%, calc(22em + 24px)); display: flex; align-items: flex-end; gap: 5px; overflow: visible; }
.chat-style-native-view .chat-thread-row.is-me .chat-thread-line { justify-content: flex-end; flex-direction: row; }
.chat-style-native-view .chat-thread-row.is-ta .chat-thread-line { justify-content: flex-start; flex-direction: row; }
.chat-style-native-view .chat-thread-bubble { position: relative; max-width: 100%; min-width: 0; padding: 9px 12px; border-radius: var(--chat-bubble-radius-ta); font-size: var(--chat-thread-font-size); line-height: 1.55; letter-spacing: .01em; word-break: break-word; white-space: pre-wrap; box-shadow: none; }
.chat-style-native-view .chat-thread-row.is-ta .chat-thread-bubble { background: var(--chat-bubble-ta); color: var(--chat-text-ta); border-radius: var(--chat-bubble-radius-ta); }
.chat-style-native-view .chat-thread-row.is-me .chat-thread-bubble { background: var(--chat-bubble-me); color: var(--chat-text-me); border-radius: var(--chat-bubble-radius-me); }
.chat-style-native-view .chat-thread-bubble.is-schedule-forward-card,
.chat-style-native-view .chat-thread-bubble.is-diary-forward-card,
.chat-style-native-view .chat-thread-bubble.is-stock-inquiry-card,
.chat-style-native-view .chat-thread-bubble.is-transfer-card,
.chat-style-native-view .chat-thread-bubble.is-redpacket-card,
.chat-style-native-view .chat-thread-bubble.is-card { padding: 0; background: transparent; box-shadow: none; border-radius: 0; }
.chat-style-native-view .chat-thread-bubble.is-schedule-forward-card::before,
.chat-style-native-view .chat-thread-bubble.is-schedule-forward-card::after,
.chat-style-native-view .chat-thread-bubble.is-diary-forward-card::before,
.chat-style-native-view .chat-thread-bubble.is-diary-forward-card::after,
.chat-style-native-view .chat-thread-bubble.is-stock-inquiry-card::before,
.chat-style-native-view .chat-thread-bubble.is-stock-inquiry-card::after,
.chat-style-native-view .chat-thread-bubble.is-transfer-card::before,
.chat-style-native-view .chat-thread-bubble.is-transfer-card::after,
.chat-style-native-view .chat-thread-bubble.is-redpacket-card::before,
.chat-style-native-view .chat-thread-bubble.is-redpacket-card::after,
.chat-style-native-view .chat-thread-bubble.is-card::before,
.chat-style-native-view .chat-thread-bubble.is-card::after { content: none; display: none; }
.chat-style-native-view .chat-thread-time { flex: 0 0 auto; color: rgba(31,35,40,.32); font-size: 8px; line-height: 1; letter-spacing: .05em; padding: 0 1px 3px; pointer-events: none; }
.chat-style-native-view .chat-style-preview-topbar { display: none; }
.chat-style-native-view .chat-style-preview-messages { top: 0; bottom: 0; }
.chat-style-native-view .chat-style-preview-composer { display: none; }
.chat-style-native-view .chat-style-workbench { display: grid; gap: 14px; padding: 14px 0 28px; }
.chat-style-native-view .chat-style-category-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; border-bottom: 1px solid var(--studio-line); padding: 0 0 12px; }
.chat-style-native-view .chat-style-category-tab { min-height: 34px; border: 0; border-bottom: 1px solid rgba(31,35,40,.20); border-radius: 0; background: transparent; color: rgba(31,35,40,.46); font-size: 11px; letter-spacing: .12em; }
.chat-style-native-view .chat-style-category-tab.active { color: #111; border-bottom-color: #111; }
.chat-style-native-view .chat-style-section[data-style-panel] { display: none; }
.chat-style-native-view .chat-style-section[data-style-panel].active { display: block; }
.chat-style-native-view .chat-style-section { border-bottom: 1px solid var(--studio-line); padding: 0 0 18px; }
.chat-style-native-view .chat-style-section-head { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; margin: 0 0 14px; }
.chat-style-native-view .chat-style-section-head > span { color: rgba(31,35,40,.34); font-family: Georgia, "Times New Roman", serif; font-size: 12px; line-height: 1.2; }
.chat-style-native-view .chat-style-section-head h2 { margin: 0; font-family: Georgia, "Times New Roman", "Songti SC", serif; font-size: 18px; line-height: 1.12; font-style: italic; letter-spacing: -.02em; }
.chat-style-native-view .chat-style-section-head p { margin: 5px 0 0; color: var(--studio-muted); font-size: 11px; line-height: 1.55; }
.chat-style-native-view .chat-style-toggle-row,
.chat-style-native-view .chat-style-avatar-grid,
.chat-style-native-view .chat-style-bubble-grid,
.chat-style-native-view .chat-style-template-actions { display: grid; gap: 10px; }
.chat-style-native-view .chat-style-toggle-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chat-style-native-view .chat-style-avatar-grid,
.chat-style-native-view .chat-style-bubble-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.chat-style-native-view .chat-style-bubble-grid article:last-child { grid-column: 1 / -1; }
.chat-style-native-view .chat-style-person-panel,
.chat-style-native-view .chat-style-bubble-grid article { border: 1px solid var(--studio-line); background: rgba(255,255,255,.66); padding: 12px; }
.chat-style-native-view .chat-style-person-panel header,
.chat-style-native-view .chat-style-bubble-grid header { display: grid; gap: 3px; margin: 0 0 10px; }
.chat-style-native-view .chat-style-person-panel strong,
.chat-style-native-view .chat-style-bubble-grid strong { font-size: 12px; letter-spacing: .04em; }
.chat-style-native-view .chat-style-person-panel span,
.chat-style-native-view .chat-style-bubble-grid span,
.chat-style-native-view .chat-style-toggle-row label,
.chat-style-native-view .chat-style-css-field span { color: var(--studio-muted); font-size: 10px; line-height: 1.4; letter-spacing: .04em; }
.chat-style-native-view .chat-style-person-panel label,
.chat-style-native-view .chat-style-bubble-grid label,
.chat-style-native-view .chat-style-css-field { display: grid; gap: 6px; margin-top: 9px; }
.chat-style-native-view .chat-style-person-panel select,
.chat-style-native-view .chat-style-bubble-grid input,
.chat-style-native-view .chat-style-css-field textarea { width: 100%; border: 0; border-bottom: 1px solid var(--studio-line); border-radius: 0; background: transparent; color: var(--studio-ink); padding: 7px 0; outline: 0; }
.chat-style-native-view .chat-style-bubble-grid input[type="color"] { height: 34px; padding: 0; border: 1px solid var(--studio-line); background: #fff; }
.chat-style-native-view .chat-style-css-field textarea { min-height: 118px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 16px; line-height: 1.55; }
.chat-style-native-view .chat-style-range-grid { display: grid; gap: 8px; margin-top: 10px; }
.chat-style-native-view .chat-style-range-control span { display: flex; justify-content: space-between; gap: 8px; }
.chat-style-native-view .chat-style-range-control em { color: #111; font-style: normal; }
.chat-style-native-view .chat-style-template-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 10px; }
.chat-style-native-view .chat-style-thin { min-height: 34px; border: 1px solid var(--studio-line); background: transparent; color: var(--studio-ink); font-size: 10px; letter-spacing: .08em; }
.chat-style-native-view .chat-style-toast { position: fixed; left: 50%; bottom: max(24px, calc(env(safe-area-inset-bottom) + var(--one-visual-bottom-gap, 0px) + 16px)); z-index: 40; transform: translate(-50%, 12px); opacity: 0; pointer-events: none; min-width: 120px; max-width: min(78vw, 280px); padding: 9px 14px; background: rgba(20,20,20,.86); color: #fff; text-align: center; font-size: 11px; letter-spacing: .04em; transition: opacity .18s ease, transform .18s ease; }
.chat-style-native-view .chat-style-toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 520px) {
    .chat-style-native-view .chat-style-toggle-row,
    .chat-style-native-view .chat-style-avatar-grid,
    .chat-style-native-view .chat-style-bubble-grid { grid-template-columns: 1fr; }
    .chat-style-native-view .chat-style-topbar { grid-template-columns: 56px 1fr 64px; }
    .chat-style-native-view .chat-style-preview { height: 286px; }
    .chat-style-native-view .chat-style-category-tabs { grid-template-columns: repeat(3, minmax(86px, 1fr)); overflow-x: auto; }
}


/* v229 · memory settings: user-facing control panel, no internal code labels. */
.memory-settings-intro {
    margin: 8px 0 14px;
    color: rgba(78, 84, 94, 0.72);
    font-size: 11px;
    line-height: 1.65;
    letter-spacing: 0.04em;
}
.memory-setting-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(74, 78, 89, 0.07);
    cursor: pointer;
}
.memory-setting-switch input,
.memory-setting-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.memory-setting-switch i {
    position: relative;
    width: 38px;
    height: 22px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: rgba(217, 220, 224, 0.78);
    box-shadow: inset 0 0 0 1px rgba(92, 96, 103, 0.08);
    transition: background 0.2s ease, box-shadow 0.2s ease;
}
.memory-setting-switch i::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    transition: transform 0.2s ease;
}
.memory-setting-switch input:checked + i {
    background: rgba(47, 51, 57, 0.86);
    box-shadow: inset 0 0 0 1px rgba(20, 22, 26, 0.08);
}
.memory-setting-switch input:checked + i::after {
    transform: translateX(16px);
}
.memory-setting-source-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}
.memory-setting-chip {
    position: relative;
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(248, 249, 250, 0.76);
    border: 1px solid rgba(70, 74, 82, 0.08);
    color: rgba(92, 99, 109, 0.74);
    font-size: 11px;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.memory-setting-chip input:checked + span {
    color: rgba(35, 39, 46, 0.92);
}
.memory-setting-chip:has(input:checked) {
    background: rgba(244, 245, 246, 0.96);
    border-color: rgba(42, 46, 52, 0.18);
}
.memory-setting-chip.is-wide {
    grid-column: 1 / -1;
}
.memory-setting-source-head {
    margin-top: 6px;
}
.memory-setting-chip-static {
    cursor: default;
    color: rgba(35, 39, 46, 0.88);
    background: rgba(244, 245, 246, 0.92);
    border-color: rgba(42, 46, 52, 0.14);
}
.memory-setting-chip-static span {
    color: rgba(35, 39, 46, 0.88);
}

.memory-source-overview {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}
.memory-source-pill {
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(245, 246, 247, 0.92);
    color: rgba(54, 59, 68, 0.76);
    font-size: 10.5px;
    line-height: 1;
    letter-spacing: 0.04em;
}
.memory-source-pill.is-off {
    color: rgba(143, 148, 156, 0.74);
    background: rgba(245, 246, 247, 0.52);
}
.memory-unified-actions button[data-memory-unified-action="manual"] {
    color: rgba(23, 26, 31, 0.92);
    background: rgba(250, 250, 251, 0.9);
}

/* v230 · memory maturity: archive inbox, user actions, worldbook always connected. */
.memory-worldbook-link-row {
    display: grid;
    gap: 5px;
    padding: 12px 2px 14px;
    border-bottom: 1px solid rgba(40, 46, 50, 0.08);
}
.memory-worldbook-link-row strong {
    color: rgba(30,34,37,.82);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .05em;
}
.memory-worldbook-link-row span {
    color: rgba(30,34,37,.46);
    font-size: 11px;
    line-height: 1.58;
    letter-spacing: .03em;
}
.memory-entry-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 7px;
    margin-top: 11px;
}
.memory-entry-actions button,
.memory-queue-actions button,
.memory-conflict-actions button {
    min-height: 25px;
    padding: 0 9px;
    border-radius: 999px;
    border: 1px solid rgba(48,49,55,.12);
    background: rgba(255,255,255,.62);
    color: rgba(45,49,56,.78);
    font-size: 10px;
    line-height: 1;
    letter-spacing: .05em;
}
.memory-entry-actions button:first-child,
.memory-conflict-actions button[data-memory-conflict-action="merge"] {
    color: rgba(23,26,31,.92);
    background: rgba(250,250,251,.9);
}
.memory-timeline-body em {
    display: block;
    margin-top: 8px;
    color: rgba(101,108,116,.62);
    font-size: 10px;
    line-height: 1.45;
    letter-spacing: .04em;
    font-style: normal;
}
.memory-queue-item .memory-timeline-body strong,
.memory-conflict-item .memory-timeline-body strong {
    color: rgba(42,45,52,.88);
}
.memory-group-tabs button {
    font-size: 10.5px;
}

/* v231 · reference maturity: advanced controls are folded, candidate/recall groups are user-facing. */
.memory-settings-advanced {
    padding: 10px 2px 0;
    border-top: 1px solid rgba(40, 46, 50, 0.06);
}
.memory-settings-advanced > summary {
    cursor: pointer;
    color: rgba(30, 34, 37, 0.52);
    font-size: 11px;
    letter-spacing: 0.08em;
    list-style: none;
}
.memory-settings-advanced > summary::-webkit-details-marker { display: none; }
.memory-settings-advanced > summary::after {
    content: '展开';
    float: right;
    color: rgba(30, 34, 37, 0.34);
}
.memory-settings-advanced[open] > summary::after { content: '收起'; }
.memory-timeline-item .memory-timeline-body strong {
    word-break: keep-all;
}

.memory-filter-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    margin-top: 10px;
}
.memory-filter-row select,
.memory-manual-select {
    width: 100%;
    height: 34px;
    border: 1px solid rgba(18, 18, 18, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    color: rgba(20, 20, 20, 0.82);
    font-size: 16px;
    letter-spacing: .04em;
    padding: 0 10px;
    outline: none;
    backdrop-filter: blur(14px);
}
.memory-manual-modal {
    align-items: center;
    justify-content: center;
}
.memory-manual-dialog {
    width: min(92vw, 430px);
}
.memory-manual-textarea {
    min-height: 120px;
    resize: vertical;
}
.memory-manual-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.memory-manual-grid .memory-setting-control:first-child {
    grid-column: 1 / -1;
}
.memory-manual-switches {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}
@media (max-width: 520px) {
    .memory-filter-row,
    .memory-manual-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* WorldBook derived memory rules */
    .wb-derived-rules {
        margin: 18px 0 22px;
        padding: 16px 0 4px;
        border-top: 1px solid rgba(34,35,34,0.10);
        border-bottom: 1px solid rgba(34,35,34,0.08);
    }
    .wb-derived-head {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 10px;
    }
    .wb-derived-list {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    .wb-derived-rule-card {
        padding: 12px 2px 14px;
        border-top: 1px solid rgba(34,35,34,0.08);
    }
    .wb-derived-rule-card:first-child { border-top: 0; }
    .wb-derived-rule-card strong {
        display: block;
        margin-bottom: 7px;
        color: #282825;
        font-size: 15px;
        letter-spacing: 0.05em;
        font-weight: 500;
    }
    .wb-derived-rule-card p {
        margin: 0;
        color: #4D4A44;
        font-size: 13px;
        line-height: 1.68;
    }
    .wb-derived-rule-card em {
        display: block;
        margin-top: 8px;
        color: #8B867D;
        font-size: 11px;
        line-height: 1.45;
        font-style: normal;
        letter-spacing: 0.08em;
    }
    .wb-derived-empty {
        padding: 14px 2px 16px;
        color: #8B867D;
        font-size: 13px;
        line-height: 1.7;
    }

.chat-avatar-setting-list {
    margin: -6px 0 0;
}

/* v237: 头像框只作用于 Ta，Me 头像不渲染头像框 */
.chat-thread-row.is-me .chat-thread-message-avatar .avatar-frame,
.chat-message-row.is-me .chat-thread-message-avatar .avatar-frame,
.chat-style-native-view .chat-thread-row.is-me .chat-thread-message-avatar .avatar-frame,
.chat-style-native-view .chat-message-row.is-me .chat-thread-message-avatar .avatar-frame {
    display: none;
}

.chat-avatar-library-head {
    margin-bottom: 24px;
}
.chat-avatar-library-head {
    position: relative;
    padding-right: 98px;
}
.chat-avatar-library-actions {
    position: absolute;
    top: 2px;
    right: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.chat-avatar-library-icon-btn {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.82);
    color: rgba(36,39,45,0.86);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    box-shadow: inset 0 0 0 1px rgba(47,51,58,0.055), 0 10px 24px rgba(47,51,58,0.075);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.chat-avatar-library-icon-btn.is-managing,
.chat-avatar-library-icon-btn:active {
    background: rgba(47,51,58,0.90);
    color: #fff;
    transform: translateY(1px);
}
.chat-avatar-library-icon-btn[data-avatar-library-action="manage"] {
    font-size: 15px;
}
.chat-avatar-library-file-input {
    display: none;
}
.chat-avatar-library-tabs-block {
    padding-top: 10px;
    margin-bottom: 26px;
}
.chat-avatar-library-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 5px;
    border-radius: 999px;
    background: rgba(47, 51, 58, 0.045);
    box-shadow: inset 0 0 0 1px rgba(47, 51, 58, 0.055);
}
.chat-avatar-library-tabs button {
    border: 0;
    height: 38px;
    border-radius: 999px;
    background: transparent;
    color: rgba(47,51,58,0.44);
    font-size: 13px;
    letter-spacing: 0.04em;
    font-weight: 600;
}
.chat-avatar-library-tabs button.is-active {
    background: rgba(255,255,255,0.82);
    color: #30353C;
    box-shadow: 0 10px 24px rgba(47,51,58,0.07), inset 0 0 0 1px rgba(255,255,255,0.84);
}
.chat-avatar-library-panel {
    display: none;
}
.chat-avatar-library-panel.is-active {
    display: block;
}
.chat-avatar-library-editor-field {
    margin: 0 0 18px;
}
.chat-avatar-library-editor-field textarea {
    min-height: 88px;
}

.chat-avatar-mood-policy {
    display: grid;
    gap: 12px;
    margin: -2px 0 18px;
    padding: 14px;
    border-radius: 24px;
    background: rgba(255,255,255,0.52);
    box-shadow: inset 0 0 0 1px rgba(47,51,58,0.055), 0 12px 28px rgba(60,55,48,0.045);
}
.chat-avatar-mood-policy-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.chat-avatar-mood-policy-head strong {
    display: block;
    color: #30353C;
    font-size: 13px;
    font-weight: 650;
    letter-spacing: 0.03em;
}
.chat-avatar-mood-policy-head span {
    display: block;
    margin-top: 4px;
    color: rgba(47,51,58,0.44);
    font-size: 11px;
    line-height: 1.55;
}
.chat-avatar-mood-range {
    margin: 0;
}
.chat-avatar-card-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
    color: rgba(47,51,58,0.50);
    font-size: 11px;
    line-height: 1.35;
    letter-spacing: 0.03em;
}
.chat-avatar-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.chat-avatar-card-tags i {
    display: inline-flex;
    align-items: center;
    min-height: 19px;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(47,51,58,0.055);
    color: rgba(47,51,58,0.48);
    font-size: 9px;
    font-style: normal;
    letter-spacing: 0.05em;
}

.chat-avatar-library-managebar {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 999px;
    background: rgba(47,51,58,0.055);
    box-shadow: inset 0 0 0 1px rgba(47,51,58,0.045);
}
.chat-avatar-library-managebar.is-active {
    display: flex;
}
.chat-avatar-library-managebar span {
    color: rgba(47,51,58,0.56);
    font-size: 11px;
    letter-spacing: 0.04em;
}
.chat-avatar-library-managebar button {
    border: 0;
    height: 30px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(47,51,58,0.88);
    color: #fff;
    font-size: 11px;
    letter-spacing: 0.08em;
}
.chat-avatar-library-managebar button:disabled {
    opacity: 0.36;
}
.chat-avatar-library-summary {
    margin: 6px 0 14px;
    color: rgba(47,51,58,0.36);
    font-family: "Courier New", monospace;
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.chat-avatar-library-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.chat-avatar-card {
    position: relative;
    display: grid;
    gap: 12px;
    padding: 13px;
    border-radius: 26px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.76), rgba(255,255,255,0.34)),
        rgba(244, 242, 238, 0.62);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.82), 0 12px 30px rgba(60,55,48,0.055);
    overflow: hidden;
}
.chat-avatar-card.is-manageable {
    cursor: pointer;
}
.chat-avatar-card.is-selected {
    box-shadow: inset 0 0 0 1.5px rgba(47,51,58,0.48), 0 14px 32px rgba(47,51,58,0.10);
}
.chat-avatar-card-select {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255,255,255,0.88);
    box-shadow: inset 0 0 0 1px rgba(47,51,58,0.16);
    z-index: 2;
}
.chat-avatar-card.is-selected .chat-avatar-card-select {
    background: #25282E;
    box-shadow: none;
}
.chat-avatar-card.is-selected .chat-avatar-card-select::after {
    content: '';
    position: absolute;
    left: 8px;
    top: 5px;
    width: 6px;
    height: 10px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(42deg);
}
.chat-avatar-card::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 12px;
    width: 20px;
    height: 1px;
    background: rgba(47,51,58,0.12);
    transform: rotate(-12deg);
}
.chat-avatar-card-image {
    width: 76px;
    height: 76px;
    margin: 0 auto;
    border-radius: 50%;
    background: rgba(232,233,230,0.8) center / cover no-repeat;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.82), 0 10px 24px rgba(47,51,58,0.08);
}
.chat-avatar-couple-preview {
    display: grid;
    grid-template-columns: 68px minmax(24px, 1fr) 68px;
    align-items: center;
    gap: 4px;
    min-height: 78px;
}
.chat-avatar-couple-preview span {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: rgba(232,233,230,0.8) center / cover no-repeat;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.82), 0 10px 24px rgba(47,51,58,0.08);
}
.chat-avatar-couple-preview span:last-child {
    justify-self: end;
}
.chat-avatar-couple-preview i {
    display: block;
    width: 100%;
    height: 24px;
    background: center / 100% 100% no-repeat;
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%20120%2024%27%20fill%3D%27none%27%3E%3Cpath%20d%3D%27M2%2012H43L47%2012L50%207L54%2017L58%2012L62%208L66%2016L70%2012L74%209L78%2015L81%2012H118%27%20stroke%3D%27%232f333a%27%20stroke-opacity%3D%27.26%27%20stroke-width%3D%271.7%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%2F%3E%3C%2Fsvg%3E");
}
.chat-avatar-import-modal-box {
    width: min(560px, calc(100vw - 28px));
}
.chat-avatar-import-modal-content {
    display: grid;
    gap: 14px;
}
.chat-avatar-import-copy {
    line-height: 1.65;
}
.chat-avatar-import-batch {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
}
.chat-avatar-import-batch-field {
    display: grid;
    gap: 6px;
}
.chat-avatar-import-batch-field span,
.chat-avatar-import-desc-field span {
    color: rgba(47,51,58,0.46);
    font-size: 11px;
    letter-spacing: 0.06em;
}
.chat-avatar-import-batch-apply {
    border: 0;
    height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(47,51,58,0.88);
    color: #fff;
    font-size: 12px;
    letter-spacing: 0.08em;
}
.chat-avatar-import-pair-list {
    display: grid;
    gap: 12px;
    max-height: min(58vh, 560px);
    overflow: auto;
    padding-right: 2px;
}
.chat-avatar-import-pair-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(255,255,255,0.78), rgba(255,255,255,0.42)), rgba(244,242,238,0.7);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.82), 0 12px 28px rgba(60,55,48,0.05);
}
.chat-avatar-import-pair-head,
.chat-avatar-import-side-names {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.chat-avatar-import-pair-head strong {
    color: #30353C;
    font-size: 13px;
}
.chat-avatar-import-pair-head span,
.chat-avatar-import-side-names span {
    color: rgba(47,51,58,0.4);
    font-size: 10px;
    letter-spacing: 0.06em;
}
.chat-avatar-import-side-names span:last-child {
    text-align: right;
}
.chat-avatar-couple-preview.is-import {
    min-height: 74px;
}
.chat-avatar-import-role-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.chat-avatar-import-role-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(47,51,58,0.055);
    box-shadow: inset 0 0 0 1px rgba(47,51,58,0.045);
}
.chat-avatar-import-role-group button {
    border: 0;
    height: 32px;
    border-radius: 999px;
    background: transparent;
    color: rgba(47,51,58,0.44);
    font-size: 11px;
    letter-spacing: 0.08em;
}
.chat-avatar-import-role-group button.is-active {
    background: rgba(47,51,58,0.88);
    color: #fff;
    box-shadow: 0 8px 18px rgba(47,51,58,0.12);
}
.chat-avatar-import-desc-field {
    display: grid;
    gap: 6px;
}
.chat-avatar-card-copy {
    display: grid;
    gap: 5px;
    min-width: 0;
}
.chat-avatar-card-copy strong {
    color: #333941;
    font-size: 13px;
    line-height: 1.28;
    font-weight: 650;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chat-avatar-card-copy span {
    color: rgba(47,51,58,0.38);
    font-size: 10px;
    line-height: 1.35;
    letter-spacing: 0.07em;
}
.chat-avatar-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.chat-avatar-card-actions button {
    border: 0;
    min-width: 46px;
    height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(47,51,58,0.88);
    color: #fff;
    font-size: 11px;
    letter-spacing: 0.08em;
    box-shadow: 0 8px 18px rgba(47,51,58,0.12);
}
.chat-avatar-library-empty {
    margin-top: 14px;
    padding: 24px 18px;
    border-radius: 26px;
    background: rgba(255,255,255,0.46);
    color: rgba(47,51,58,0.42);
    font-size: 12px;
    line-height: 1.7;
    text-align: center;
    box-shadow: inset 0 0 0 1px rgba(47,51,58,0.05);
}
@media (max-width: 360px) {
    .chat-avatar-library-grid { grid-template-columns: 1fr; }
    .chat-avatar-card-image { width: 72px; height: 72px; }
}


/* One Phone account auth gate · v267 Cloudflare auth stable session / no stale lock freeze */
html.one-auth-locked,
body.one-auth-locked {
    overflow: hidden;
}
body.one-auth-locked #desktop,
body.one-auth-locked .messages-app-page,
body.one-auth-locked .chat-app-page,
body.one-auth-locked .settings-app-page,
body.one-auth-locked .worldbook-app-page,
body.one-auth-locked .memory-app-page,
body.one-auth-locked .phone-app-page {
    pointer-events: none;
}
/* v267: 登录后若旧 class 因缓存/脚本异常短暂残留，不再让桌面永久卡死；真正未登录由 Cloudflare middleware 与登录遮罩保护。 */
body.one-auth-locked #desktop,
body.one-auth-locked .messages-app-page,
body.one-auth-locked .chat-app-page,
body.one-auth-locked .settings-app-page,
body.one-auth-locked .worldbook-app-page,
body.one-auth-locked .memory-app-page,
body.one-auth-locked .phone-app-page {
    pointer-events: auto;
}
.one-auth-page.show {
    pointer-events: auto;
}
.one-auth-page {
    --one-auth-primary-height: 45px;
    --one-auth-field-gap: 12px;
    --one-auth-field-inner-gap: 6px;
    --one-auth-field-pad-bottom: 8px;
    --one-auth-button-top-gap: 0px;
    --one-auth-link-top-gap: 0px;
    position: fixed;
    inset: 0;
    z-index: 30000;
    display: none;
    place-items: center;
    padding: max(22px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
    background: #f8f5ef;
    color: rgba(35,33,30,0.90);
    overflow: hidden;
}
.one-auth-page.show { display: grid; }
.one-auth-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(180deg, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0.26) 38%, rgba(248,244,237,0.68) 74%, rgba(248,244,237,0.92) 100%),
        url('PWA/icons/icon-512.png');
    background-size: cover;
    background-position: center top;
    transform: scale(1.012);
    transform-origin: center;
    filter: saturate(0.82) brightness(1.055);
}
.one-auth-page::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(255,255,255,0.42), rgba(255,255,255,0.08) 32%, rgba(255,255,255,0.28)),
        radial-gradient(circle at 50% 39%, rgba(255,255,255,0.50), rgba(255,255,255,0) 42%),
        linear-gradient(180deg, rgba(64,58,50,0.018), rgba(64,58,50,0.042));
}
.one-auth-bg-grain {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.13;
    background-image:
        linear-gradient(120deg, rgba(63,57,49,0.036) 0 1px, transparent 1px 12px),
        linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0));
    mask-image: linear-gradient(180deg, rgba(0,0,0,0.18), rgba(0,0,0,0.05) 52%, rgba(0,0,0,0.16));
}
.one-auth-shell {
    position: relative;
    z-index: 1;
    width: min(336px, 100%);
    display: grid;
    gap: 14px;
    max-height: calc(100svh - 48px);
    overflow: visible;
}
.one-auth-mark {
    justify-self: center;
    display: none;
}
.one-auth-card {
    position: relative;
    padding: 21px 30px 24px;
    border: 0;
    border-top: 1px solid rgba(67,61,53,0.16);
    border-bottom: 1px solid rgba(67,61,53,0.13);
    border-left: 1px solid rgba(67,61,53,0.048);
    border-right: 1px solid rgba(255,255,255,0.34);
    border-radius: 0;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.50), rgba(255,255,255,0.34)),
        radial-gradient(circle at 50% -10%, rgba(255,255,255,0.70), rgba(255,255,255,0) 54%),
        linear-gradient(120deg, rgba(64,58,50,0.026) 0 1px, transparent 1px 11px);
    box-shadow:
        0 28px 72px rgba(75,66,56,0.12),
        0 1px 0 rgba(255,255,255,0.50) inset,
        0 -1px 0 rgba(70,62,52,0.040) inset;
    backdrop-filter: blur(22px) saturate(0.96);
    -webkit-backdrop-filter: blur(22px) saturate(0.96);
    overflow: visible;
}
.one-auth-card::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(255,255,255,0.26), rgba(255,255,255,0.02) 34%, rgba(255,255,255,0.18)),
        linear-gradient(180deg, rgba(54,48,40,0.028), rgba(54,48,40,0) 19%, rgba(54,48,40,0.030) 100%);
    opacity: 0.72;
}
.one-auth-card::after {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    top: 10px;
    bottom: 10px;
    border-left: 1px solid rgba(78,70,60,0.045);
    border-right: 1px solid rgba(255,255,255,0.26);
    pointer-events: none;
}
.one-auth-card > * {
    position: relative;
    z-index: 1;
}
.one-auth-ornament {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 0 7px;
    padding-bottom: 7px;
    color: rgba(100,92,80,0.28);
}
.one-auth-ornament::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(91,83,72,0.22), transparent);
}
.one-auth-ornament span {
    width: 24px;
    height: 1px;
    background: currentColor;
    opacity: 0.30;
}
.one-auth-ornament i {
    width: 4px;
    height: 4px;
    border: 1px solid currentColor;
    transform: rotate(45deg);
}
.one-auth-ornament-lower {
    margin: 0 0 16px;
    padding-bottom: 0;
    color: rgba(100,92,80,0.26);
}
.one-auth-ornament-lower::after {
    content: none;
}
.one-auth-ornament-lower span {
    width: 24px;
    opacity: 0.30;
}
.one-auth-ornament-lower i {
    width: 4px;
    height: 4px;
}
.one-auth-ornament-bottom {
    margin: 20px 0 0;
    padding: 15px 0 0;
    color: rgba(100,92,80,0.26);
}
.one-auth-ornament-bottom::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(91,83,72,0.19), transparent);
}
.one-auth-ornament-bottom::after {
    content: none;
}
.one-auth-ornament-bottom span {
    width: 26px;
    opacity: 0.30;
}
.one-auth-ornament-bottom i {
    width: 4px;
    height: 4px;
}
.one-auth-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.one-auth-kicker {
    display: none;
}
.one-auth-head h1 {
    margin: 0;
    font-family: "Songti SC", "Noto Serif SC", "STSong", "SimSun", serif;
    font-size: 27px;
    line-height: 1.18;
    font-weight: 300;
    letter-spacing: 0.20em;
    text-indent: 0.20em;
    color: rgba(30,28,25,0.90);
    text-shadow: 0 10px 26px rgba(105,96,84,0.13);
}
.one-auth-head p:not(.one-auth-kicker) {
    width: min(260px, 92%);
    margin: 9px auto 0;
    color: rgba(82,76,67,0.48);
    font-size: 9px;
    line-height: 1.55;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}
.one-auth-panel-stack {
    position: relative;
    display: grid;
    margin-top: 29px;
    height: var(--one-auth-panel-height, 255px);
    min-height: 0;
    overflow: visible;
    transition: height 0.34s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: height;
}
.one-auth-form {
    grid-area: 1 / 1;
    display: grid;
    align-self: start;
    align-content: start;
    gap: var(--one-auth-field-gap);
    margin-top: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(0, 9px, 0) scale(0.995);
    filter: blur(0.8px);
    transition:
        opacity 0.22s ease,
        transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.24s ease,
        visibility 0s linear 0.24s;
}
.one-auth-form.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
    transition:
        opacity 0.26s ease 0.08s,
        transform 0.38s cubic-bezier(0.22, 1, 0.36, 1) 0.04s,
        filter 0.28s ease 0.06s,
        visibility 0s linear 0s;
}
.one-auth-form.is-leaving {
    opacity: 0;
    visibility: visible;
    transform: translate3d(0, -5px, 0) scale(0.998);
    filter: blur(0.5px);
    transition:
        opacity 0.18s ease,
        transform 0.24s ease,
        filter 0.18s ease,
        visibility 0s linear 0.20s;
}
.one-auth-page.is-switching .one-auth-head h1,
.one-auth-page.is-switching .one-auth-head p:not(.one-auth-kicker) {
    animation: oneAuthHeadSoftSwitch 0.28s ease both;
}
@keyframes oneAuthHeadSoftSwitch {
    0% { opacity: 0.78; transform: translateY(2px); }
    100% { opacity: 1; transform: translateY(0); }
}
.one-auth-field {
    position: relative;
    display: grid;
    gap: var(--one-auth-field-inner-gap);
    padding: 0 0 var(--one-auth-field-pad-bottom);
    border: 0;
    border-bottom: 1px solid rgba(57,52,45,0.22);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.one-auth-field::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(0,0,0,0), rgba(0,0,0,0.20) 20%, rgba(0,0,0,0.84) 50%, rgba(0,0,0,0.20) 80%, rgba(0,0,0,0));
    opacity: 0;
    transform: scaleX(0.16);
    transform-origin: center;
    transition: opacity 0.26s ease, transform 0.44s cubic-bezier(0.19, 1, 0.22, 1);
}
.one-auth-field span {
    color: rgba(82,76,67,0.46);
    font-size: 9px;
    line-height: 1;
    letter-spacing: 0.17em;
    text-transform: uppercase;
}
.one-auth-field input {
    width: 100%;
    border: 0;
    outline: none;
    background: transparent;
    color: rgba(28,26,23,0.92);
    font-size: 16px;
    line-height: 1.42;
    padding: 0;
    user-select: text;
    -webkit-user-select: text;
}
.one-auth-field:focus-within {
    border-bottom-color: rgba(57,52,45,0.13);
}
.one-auth-field:focus-within::after {
    opacity: 1;
    transform: scaleX(1);
}
.one-auth-field input::placeholder { color: rgba(108,101,90,0.36); }
.one-auth-field-with-cancel {
    margin-bottom: 12px;
}
.one-auth-last-field {
    margin-bottom: calc(25px - var(--one-auth-field-gap));
}
.one-auth-cancel-account {
    position: absolute;
    right: 0;
    bottom: -18px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: rgba(45,42,37,0.38);
    font-size: 10px;
    line-height: 1;
    letter-spacing: 0.12em;
    padding: 0;
    cursor: pointer;
}
.one-auth-cancel-account:active {
    transform: translateY(1px);
    color: rgba(24,22,20,0.56);
}

.one-auth-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: var(--one-auth-primary-height);
    min-height: var(--one-auth-primary-height);
    max-height: var(--one-auth-primary-height);
    padding: 0;
    box-sizing: border-box;
    border: 0;
    border-radius: 0;
    background: #000;
    color: rgba(255,255,255,0.96);
    font-size: 13px;
    line-height: 1;
    letter-spacing: 0.18em;
    box-shadow: none;
    cursor: pointer;
    margin-top: var(--one-auth-button-top-gap);
    appearance: none;
    -webkit-appearance: none;
    flex: 0 0 auto;
}
.one-auth-primary:active,
.settings-logout-btn:active { transform: translateY(1px); }
.one-auth-link-row {
    min-height: 16px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin: var(--one-auth-link-top-gap) 0 0;
    color: rgba(82,76,67,0.44);
}
.one-auth-link-row button {
    border: 0;
    background: transparent;
    color: rgba(45,42,37,0.55);
    font-size: 11px;
    line-height: 1;
    letter-spacing: 0.08em;
    padding: 4px 0;
    cursor: pointer;
}
.one-auth-link-row em {
    width: 1px;
    height: 10px;
    background: rgba(82,76,67,0.19);
}
.one-auth-admin-row {
    margin-top: -6px;
    gap: 0;
}
.one-auth-admin-row .one-auth-admin-link {
    border: 0;
    background: transparent;
    color: rgba(45,42,37,0.44);
    font-size: 10.5px;
    line-height: 1;
    letter-spacing: 0.12em;
    padding: 5px 0;
    cursor: pointer;
}
.one-auth-admin-row .one-auth-admin-link:active {
    transform: translateY(1px);
}
.one-auth-note {
    margin: 0;
    text-align: center;
    color: rgba(82,76,67,0.38);
    font-size: 10px;
    line-height: 1;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
@media (max-height: 720px) {
    .one-auth-page { place-items: center; padding-top: 18px; }
    .one-auth-page::before { opacity: 0.60; }
    .one-auth-card { padding: 18px 25px 20px; }
    .one-auth-panel-stack { margin-top: 23px; }
    .one-auth-page { --one-auth-field-gap: 10px; --one-auth-field-inner-gap: 5px; --one-auth-field-pad-bottom: 7px; --one-auth-button-top-gap: 0px; --one-auth-link-top-gap: 0px; }
    .one-auth-form { gap: var(--one-auth-field-gap); }
    .one-auth-ornament { margin-bottom: 7px; padding-bottom: 7px; }
    .one-auth-ornament-lower { margin-bottom: 15px; padding-bottom: 0; }
    .one-auth-ornament-bottom { margin-top: 15px; }
}

/* Chat page / project title scale alignment with reference · v244 */
.chat-title-news,
.chat-assets-title,
.chat-bankcard-title,
.chat-stock-title,
.chat-sticker-title,
.chat-mask-preset-title,
.chat-ta-subpage-title strong,
.chat-setting-title strong,
.chat-ta-form-title-copy h1,
.chat-style-native-view .chat-style-title-copy h1 {
    font-size: clamp(20px, 5.6vw, 24px);
    line-height: 1.05;
    letter-spacing: -0.028em;
}
.chat-date-line,
.chat-assets-subtitle,
.chat-sticker-subtitle,
.chat-mask-preset-subtitle,
.chat-setting-head p,
.chat-ta-form-title-copy p,
.chat-style-native-view .chat-style-title-copy p {
    font-size: 10.5px;
    line-height: 1.62;
}
.chat-assets-kicker,
.chat-sticker-kicker,
.chat-ta-subpage-title span,
.chat-setting-title span {
    font-size: 8.8px;
    letter-spacing: 0.18em;
}

/* v266 · account permission entries */
.one-admin-only,
.one-author-only {
    display: none;
}
body.one-auth-role-admin .one-admin-only,
body.one-auth-role-author .one-admin-only,
body.one-auth-role-author .one-author-only {
    display: grid;
}
.settings-auth-card {
    border-top: 1px solid var(--settings-line);
    border-bottom: 1px solid var(--settings-line);
    padding: 16px 0;
    display: grid;
    gap: 13px;
}
.settings-auth-card-title {
    font-size: 14px;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: var(--settings-ink-deep);
}
.settings-auth-code-output {
    min-height: 44px;
    border-top: 1px solid var(--settings-line);
    border-bottom: 1px solid var(--settings-line);
    padding: 10px 0;
    display: grid;
    gap: 3px;
    color: var(--settings-muted);
    font-size: 12px;
}
.settings-auth-code-output strong {
    font-size: 15px;
    color: var(--settings-ink);
    letter-spacing: 0.08em;
    word-break: break-all;
}
.settings-auth-code-output span {
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--settings-muted);
}
.settings-auth-results {
    display: grid;
    gap: 12px;
}
.settings-auth-result-card {
    display: grid;
    gap: 10px;
    padding: 12px 0;
    border-top: 1px solid var(--settings-line);
    border-bottom: 1px solid var(--settings-line);
}
.settings-auth-result-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}
.settings-auth-result-head strong {
    font-size: 15px;
    color: var(--settings-ink);
    letter-spacing: 0.06em;
}
.settings-auth-result-head span {
    font-size: 11px;
    color: var(--settings-muted);
    white-space: nowrap;
}
.settings-auth-result-grid {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 6px 10px;
    font-size: 12px;
    color: var(--settings-muted);
}
.settings-auth-result-grid b {
    color: var(--settings-ink-deep);
    font-weight: 500;
    word-break: break-all;
}
.settings-auth-revoke {
    width: 100%;
    margin-top: 2px;
}

/* v276: dynamic cover, payment modal, chat-style controls and tool icon polish */
.chat-dyn-hero.has-custom-cover::before,
.chat-dyn-hero:has(.chat-dyn-hero-bg.has-image)::before {
    content: none;
    display: none;
}
.chat-pay-send-dialog,
.chat-pay-status-dialog {
    background: #ffffff;
    border-radius: 22px;
    overflow: hidden;
}
.chat-pay-send-content {
    padding: 24px 20px 20px;
    gap: 16px;
}
.chat-pay-send-field {
    gap: 8px;
}
.chat-pay-send-field span {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 11px;
    line-height: 1.2;
    letter-spacing: 0.08em;
    color: rgba(52, 56, 65, 0.48);
    text-transform: uppercase;
}
.chat-pay-send-input,
.chat-pay-send-textarea,
.chat-pay-method-select {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 14px;
    border-radius: 14px;
    border: 1px solid transparent;
    background-color: #FAFBFC;
    color: #5d636e;
    font-size: 16px;
    outline: none;
    box-shadow: none;
    transition: background 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}
.chat-pay-send-input:focus,
.chat-pay-send-textarea:focus,
.chat-pay-method-select:focus {
    background-color: #ffffff;
    border-color: rgba(17, 17, 17, 0.42);
    box-shadow: 0 4px 12px rgba(17, 17, 17, 0.055);
}
.chat-pay-method-select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 36px;
    background-image: linear-gradient(45deg, transparent 50%, #9aa0ab 50%), linear-gradient(135deg, #9aa0ab 50%, transparent 50%);
    background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}
.chat-style-native-view .chat-style-category-tabs {
    display: flex;
    gap: 18px;
    border-bottom: 1px solid rgba(31, 35, 40, 0.10);
    padding: 0 2px 6px;
}
.chat-style-native-view .chat-style-category-tab {
    flex: 0 0 auto;
    min-height: 30px;
    border: 0;
    border-bottom: 1px solid transparent;
    border-radius: 0;
    padding: 0 1px 7px;
    background: transparent;
    color: rgba(31, 35, 40, 0.45);
    font-size: 11px;
    letter-spacing: 0.12em;
}
.chat-style-native-view .chat-style-category-tab.active {
    color: #111111;
    border-bottom-color: #111111;
}
.chat-style-native-view .chat-style-section {
    border-bottom: 1px solid rgba(31, 35, 40, 0.08);
    padding: 0 0 14px;
}
.chat-style-native-view .chat-style-section-head {
    margin-bottom: 12px;
}
.chat-style-native-view .chat-style-section-head::after {
    content: '';
    display: block;
    grid-column: 2;
    width: 44px;
    height: 1px;
    margin-top: 9px;
    background: rgba(31, 35, 40, 0.12);
}
.chat-style-native-view .chat-style-toggle-row label,
.chat-style-native-view .chat-style-person-panel label,
.chat-style-native-view .chat-style-bubble-grid label {
    display: grid;
    gap: 7px;
}
.chat-style-native-view .chat-style-toggle-row select,
.chat-style-native-view .chat-style-person-panel select,
.chat-style-native-view .chat-style-bubble-grid input,
.chat-style-native-view .chat-style-css-field textarea {
    width: 100%;
    box-sizing: border-box;
}
.chat-style-native-view .chat-style-frame-upload-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 10px 0 2px;
}
.chat-style-native-view .chat-style-frame-upload-row .chat-style-thin {
    min-height: 34px;
}
.chat-avatar-frame--none {
    display: none;
}
.avatar-frame.chat-avatar-frame--custom-image {
    inset: -9px;
    border: 0;
    border-radius: 0;
    background-color: transparent;
    box-shadow: none;
    pointer-events: none;
}
.avatar-frame.chat-avatar-frame--custom-image::before,
.avatar-frame.chat-avatar-frame--custom-image::after,
.chat-avatar-frame--none::before,
.chat-avatar-frame--none::after {
    content: none;
    display: none;
}
.chat-thread-tool-icon .chat-tool-watch {
    width: 22px;
    height: 22px;
    display: block;
}
.chat-thread-tool[data-thread-tool="一起看"] .chat-thread-tool-icon {
    background: #ffffff;
    border: 1px solid rgba(52, 57, 65, 0.08);
    box-shadow: 0 3px 8px rgba(76, 72, 64, 0.032), 0 1px 0 rgba(255,255,255,0.86) inset;
    color: #000000;
}

/* v292 · 心声面板：HTML 卡片 + 生成快照 + 内嵌历史标签 */
.chat-heart-modal {
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(38, 42, 48, 0.18);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}
.chat-heart-dialog {
    width: min(380px, calc(100vw - 28px));
    max-height: min(92vh, 760px);
    padding: 0;
    overflow: visible;
    border-radius: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}
.chat-heart-dialog::before,
.chat-heart-dialog::after { content: none; display: none; }
.chat-heart-panel-mount {
    --page-bg: #FFFFFF;
    --card-bg: #FFFFFF;
    --text-main: #2D2D2D;
    --text-sub: #707070;
    --text-light: #9C9C9C;
    --sage-green: #5A5A5A;
    --divider-color: #E6E6E6;
    margin: 0 auto;
    padding: 40px 0 160px 0;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: transparent;
    font-family: -apple-system, 'Noto Sans SC', sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow: visible;
}
.chat-heart-panel-mount .card-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
}
.chat-heart-panel-mount .aesthetic-card {
    width: min(340px, calc(100vw - 44px));
    background-color: var(--card-bg);
    border-radius: 35px;
    padding: 32px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 36px;
    position: relative;
    z-index: 2;
}
.chat-heart-panel-mount .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.chat-heart-panel-mount .profile {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.chat-heart-panel-mount .avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(120, 132, 112, 0.1);
    background-color: #FAF6EE;
    flex-shrink: 0;
}
.chat-heart-panel-mount .avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.chat-heart-panel-mount .meta-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.chat-heart-panel-mount .user-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.05em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 155px;
}
.chat-heart-panel-mount .project-tag {
    font-size: 10px;
    color: var(--text-sub);
    font-weight: 300;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 155px;
}
.chat-heart-panel-mount .heart-rate-journal {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
}
.chat-heart-panel-mount .bpm-display {
    display: flex;
    align-items: baseline;
    color: var(--text-main);
}
.chat-heart-panel-mount .bpm-val {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 39px;
    font-weight: 500;
    font-style: italic;
    line-height: 1;
}
.chat-heart-panel-mount .bpm-unit {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 11px;
    font-style: italic;
    color: var(--text-sub);
    margin-left: 2px;
}
.chat-heart-panel-mount .weather-display {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: var(--text-sub);
    margin-top: 4px;
    font-family: -apple-system, sans-serif;
    line-height: 1;
    white-space: nowrap;
    max-width: 118px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chat-heart-panel-mount .weather-emoji {
    font-size: 11px;
    color: var(--text-main);
    display: inline-block;
    flex: 0 0 auto;
}
.chat-heart-panel-mount .weather-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chat-heart-panel-mount .quote-content {
    display: flex;
    flex-direction: column;
    gap: 36px;
}
.chat-heart-panel-mount .section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--text-light);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
    width: 100%;
}
.chat-heart-panel-mount .section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: var(--divider-color);
    opacity: 0.8;
}
.chat-heart-panel-mount .quote-text {
    font-size: 14px;
    line-height: 1.85;
    color: var(--text-main);
    font-weight: 300;
    letter-spacing: 0.05em;
    margin: 0;
    text-align: justify;
    position: relative;
    z-index: 1;
}
.chat-heart-panel-mount .dark-text {
    color: var(--text-sub);
    font-style: italic;
}
.chat-heart-panel-mount .footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0;
    font-size: 10px;
    color: var(--text-sub);
    letter-spacing: 0.05em;
    gap: 12px;
}
.chat-heart-panel-mount .price-text {
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-weight: 500;
    font-size: 15px;
    color: var(--text-main);
    letter-spacing: 0.02em;
    flex: 0 0 auto;
}
.chat-heart-panel-mount .card-decor-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 8px;
    letter-spacing: 0.18em;
    color: var(--text-light);
    padding-bottom: 4px;
    margin-bottom: -16px;
}
.chat-heart-panel-mount .decor-sep {
    font-size: 8px;
    color: var(--text-light);
    opacity: 0.6;
}
.chat-heart-panel-mount .voice-section { position: relative; }
.chat-heart-panel-mount .voice-section::before {
    content: "“";
    position: absolute;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 68px;
    color: var(--divider-color);
    opacity: 0.25;
    top: -24px;
    left: -24px;
    pointer-events: none;
    line-height: 1;
}
.chat-heart-panel-mount .shadow-section { position: relative; }
.chat-heart-panel-mount .shadow-section::after {
    content: "”";
    position: absolute;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 68px;
    color: var(--divider-color);
    opacity: 0.25;
    bottom: -34px;
    right: -24px;
    pointer-events: none;
    line-height: 1;
}
.chat-heart-panel-mount .decor-barcode-section {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.45;
    min-width: 0;
}
.chat-heart-panel-mount .barcode-lines {
    display: flex;
    gap: 1.5px;
    height: 9px;
    align-items: center;
    flex: 0 0 auto;
}
.chat-heart-panel-mount .barcode-lines span {
    width: 1px;
    height: 100%;
    background-color: var(--text-light);
    display: inline-block;
}
.chat-heart-panel-mount .barcode-lines span:nth-child(2n) { width: 1.5px; }
.chat-heart-panel-mount .barcode-lines span:nth-child(3n) { width: 0.5px; }
.chat-heart-panel-mount .barcode-lines span:nth-child(5n) { width: 2px; }
.chat-heart-panel-mount .barcode-text {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 7px;
    letter-spacing: 0.15em;
    color: var(--text-light);
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chat-heart-panel-mount .exquisite-pendant {
    position: absolute;
    bottom: -130px;
    right: 42px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform-origin: top center;
    animation: gentle-sway 4.5s ease-in-out infinite alternate;
    z-index: 1;
}
.chat-heart-panel-mount .pendant-string {
    width: 1px;
    height: 50px;
    background-color: var(--text-sub);
    opacity: 0.6;
}
.chat-heart-panel-mount .pendant-body {
    background-color: var(--card-bg);
    border: 1px solid var(--text-main);
    border-radius: 0;
    width: 32px;
    height: 95px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    box-sizing: border-box;
    padding: 8px 0;
}
.chat-heart-panel-mount .pendant-body:hover {
    transform: translateY(3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.chat-heart-panel-mount .pendant-text {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: var(--text-main);
    writing-mode: vertical-rl;
    text-transform: uppercase;
    white-space: nowrap;
    transform: rotate(180deg);
}
.chat-heart-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 0 16px 12px;
}
.chat-heart-actions .chat-heart-refresh,
.chat-heart-actions .chat-heart-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    min-height: 34px;
    border: 1px solid rgba(112,112,112,0.16);
    border-radius: 999px;
    padding: 0 14px;
    background: #FFFFFF;
    color: #5A5A5A;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .08em;
    box-shadow: none;
}
.chat-heart-actions .chat-heart-refresh { color: #2D2D2D; }
.chat-heart-history {
    display: grid;
    gap: 8px;
    max-height: 130px;
    overflow-y: auto;
    margin: 0 16px 16px;
    padding-right: 2px;
    scrollbar-width: none;
}
.chat-heart-history::-webkit-scrollbar { display: none; }
.chat-heart-history-item {
    display: grid;
    grid-template-columns: 42px minmax(0,1fr) 46px;
    gap: 8px;
    align-items: start;
    border: 1px solid rgba(112,112,112,0.10);
    border-radius: 16px;
    background: #FFFFFF;
    padding: 10px 11px;
}
.chat-heart-history-item span {
    margin: 0;
    color: #9C9C9C;
    font-family: "Courier New", Courier, monospace;
    font-size: 9px;
}
.chat-heart-history-item strong {
    margin: 0;
    color: #707070;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 400;
}
.chat-heart-history-item p,
.chat-heart-history-empty {
    grid-column: 2 / 3;
    margin: 0;
    color: #707070;
    font-size: 11px;
    line-height: 1.48;
}
.chat-heart-history-item em {
    color: #9C9C9C;
    font-style: normal;
    font-size: 10px;
    text-align: right;
}
@keyframes gentle-sway {
    0% { transform: rotate(-3deg); }
    100% { transform: rotate(3deg); }
}
@media (max-width: 360px) {
    .chat-heart-modal { padding-left: 12px; padding-right: 12px; }
    .chat-heart-panel-mount .aesthetic-card { padding: 28px 24px; gap: 32px; }
    .chat-heart-panel-mount .project-tag,
    .chat-heart-panel-mount .user-name { max-width: 128px; }
    .chat-heart-panel-mount .weather-display { max-width: 102px; }
    .chat-heart-panel-mount .exquisite-pendant { right: 34px; }
}

/* v282 · 登录锁身份 / 拉黑失败气泡 / 虚拟会话占用 */
.chat-thread-input {
    font-size: 16px;
}
.chat-thread-soft-card {
    width: min(92%, 320px);
    margin: 10px auto 12px;
    padding: 13px 14px;
    border-radius: 20px;
    border: 1px solid rgba(170, 176, 184, 0.22);
    background: rgba(255, 255, 255, 0.56);
    box-shadow: 0 12px 30px rgba(88, 96, 106, 0.055), inset 0 1px 0 rgba(255,255,255,0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: #5d646e;
}
.chat-thread-soft-card-copy {
    display: grid;
    gap: 5px;
    text-align: left;
}
.chat-thread-soft-card-copy strong {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: #414851;
}
.chat-thread-soft-card-copy span {
    font-size: 11px;
    line-height: 1.6;
    color: #858c96;
}
.chat-thread-soft-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}
.chat-thread-soft-card-actions button {
    min-width: 64px;
    height: 30px;
    border: 0;
    border-radius: 999px;
    padding: 0 12px;
    background: rgba(236, 238, 241, 0.86);
    color: #737b86;
    font-size: 12px;
    letter-spacing: 0.02em;
    appearance: none;
    -webkit-appearance: none;
}
.chat-thread-soft-card-actions button.is-primary {
    background: rgba(34, 36, 40, 0.92);
    color: rgba(255,255,255,0.92);
}
.chat-thread-soft-card.chat-virtual-login-card {
    border-color: rgba(130, 140, 150, 0.24);
    background: rgba(248, 250, 251, 0.66);
}
.chat-thread-row.is-blocked-attempt .chat-thread-message-avatar {
    opacity: 0.64;
}
.chat-thread-bubble.is-delivery-failed {
    position: relative;
    border: 1px solid rgba(176, 92, 86, 0.16);
    box-shadow: 0 10px 24px rgba(130, 84, 80, 0.04);
}
.chat-thread-failure-badge {
    position: absolute;
    top: -9px;
    right: -7px;
    z-index: 2;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: rgba(178, 78, 72, 0.12);
    border: 1px solid rgba(178, 78, 72, 0.22);
    color: #9b5752;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    font-family: Georgia, "Times New Roman", serif;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.chat-thread-row.is-system .chat-thread-bubble.is-system-text {
    max-width: 82%;
    opacity: 0.78;
}


/* Chat APP：账号查记录 / 代登录回放卡片 */
.chat-thread-record-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 220px;
    height: 120px;
    padding: 14px 15px 12px;
    border: 1px solid rgba(88, 70, 62, 0.12);
    border-radius: 14px;
    background:
        linear-gradient(145deg, rgba(255,255,255,0.78), rgba(239,232,224,0.58)),
        radial-gradient(circle at 88% 18%, rgba(129, 95, 79, 0.12), transparent 38%);
    box-shadow: 0 12px 28px rgba(46, 39, 34, 0.10), inset 0 1px 0 rgba(255,255,255,0.72);
    color: #3A332D;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.chat-thread-record-card::after {
    content: "";
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(69, 56, 49, 0.10);
    border-radius: 50%;
    background: rgba(255,255,255,0.32);
}
.chat-thread-record-eyebrow {
    position: relative;
    z-index: 1;
    font-size: 9px;
    letter-spacing: 0.18em;
    color: rgba(58, 51, 45, 0.48);
    text-transform: uppercase;
}
.chat-thread-record-title {
    position: relative;
    z-index: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.38;
    font-weight: 650;
    color: #2F2924;
}
.chat-thread-record-excerpt {
    position: relative;
    z-index: 1;
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 164px;
    font-size: 12px;
    color: rgba(49, 43, 38, 0.62);
}
.chat-thread-record-foot {
    position: relative;
    z-index: 1;
    font-size: 10px;
    color: rgba(49, 43, 38, 0.42);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.chat-thread-bubble.is-account-impersonation-card .chat-thread-record-card {
    background:
        linear-gradient(145deg, rgba(255,255,255,0.80), rgba(232,226,220,0.64)),
        radial-gradient(circle at 90% 15%, rgba(112, 72, 69, 0.15), transparent 40%);
}
.chat-record-detail-view {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    background:
        radial-gradient(circle at 12% 4%, rgba(255,255,255,0.72), transparent 32%),
        linear-gradient(180deg, rgba(246,242,237,0.96), rgba(236,230,224,0.92));
    color: #292520;
    overflow: hidden;
}
.chat-record-detail-view.active {
    display: flex;
}
.chat-record-detail-topbar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 66px;
    padding: 18px 18px 10px;
    background: transparent;
    border-bottom: 0;
}
.chat-record-detail-back {
    border: 0;
    border-radius: 0;
    background: transparent;
    color: rgba(39, 34, 30, 0.86);
    font-size: 13px;
    letter-spacing: 0.12em;
    text-decoration: underline;
    text-underline-offset: 5px;
    cursor: pointer;
}
.chat-record-detail-title {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 15px;
    font-weight: 650;
    text-align: center;
    transform: translateX(-26px);
}
.chat-record-detail-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px 18px 28px;
    overflow-y: auto;
    scrollbar-width: none;
}
.chat-record-detail-body::-webkit-scrollbar { display: none; }
.chat-record-detail-summary {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 15px;
    border: 1px solid rgba(69, 58, 50, 0.10);
    border-radius: 18px;
    background: rgba(255,255,255,0.48);
    box-shadow: 0 10px 24px rgba(39, 33, 28, 0.06);
}
.chat-record-detail-summary span {
    font-size: 10px;
    letter-spacing: 0.16em;
    color: rgba(43, 37, 32, 0.42);
}
.chat-record-detail-summary strong {
    font-size: 15px;
    color: #2F2924;
}
.chat-record-detail-summary p {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
    color: rgba(47, 41, 36, 0.58);
}
.chat-record-detail-line {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: flex-start;
    gap: 10px;
    text-align: left;
}
.chat-record-detail-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(62, 51, 44, 0.10);
    background: rgba(255,255,255,0.54);
    color: rgba(47, 41, 36, 0.48);
    font-size: 10px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}
.chat-record-detail-content {
    min-width: 0;
    padding: 10px 12px 11px;
    border-radius: 15px;
    background: rgba(255,255,255,0.62);
    border: 1px solid rgba(63, 53, 46, 0.08);
    box-shadow: 0 8px 20px rgba(39, 33, 28, 0.05);
}
.chat-record-detail-line.is-user .chat-record-detail-content {
    background: rgba(247, 242, 236, 0.74);
}
.chat-record-detail-meta {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 5px;
}
.chat-record-detail-meta strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 12px;
    color: #2F2924;
}
.chat-record-detail-meta span {
    flex: none;
    font-size: 10px;
    color: rgba(47, 41, 36, 0.38);
}
.chat-record-detail-content p {
    margin: 0;
    font-size: 13px;
    line-height: 1.58;
    color: rgba(37, 32, 28, 0.78);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.chat-record-detail-empty {
    margin: auto;
    font-size: 13px;
    color: rgba(43, 37, 32, 0.45);
}


/* v286: 登录锁本地缓存优先，修复聊天入口重复跳登录 */
.chat-abnormal-login-panel {
    position: absolute;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 18px;
    background: rgba(35, 31, 28, 0.18);
    opacity: 0;
    pointer-events: auto;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: opacity 180ms ease;
}
.chat-abnormal-login-panel.show {
    opacity: 1;
}
.chat-abnormal-login-sheet {
    width: min(100%, 328px);
    display: flex;
    flex-direction: column;
    gap: 13px;
    padding: 20px 18px 16px;
    border-radius: 28px;
    border: 1px solid rgba(68, 57, 50, 0.12);
    background: rgba(247, 243, 238, 0.82);
    box-shadow: 0 24px 60px rgba(36, 30, 25, 0.18);
    transform: translateY(16px) scale(0.985);
    transition: transform 220ms cubic-bezier(.2,.8,.2,1);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}
.chat-abnormal-login-panel.show .chat-abnormal-login-sheet {
    transform: translateY(0) scale(1);
}
.chat-abnormal-login-eyebrow {
    align-self: flex-start;
    font-size: 10px;
    letter-spacing: 0.2em;
    color: rgba(45, 39, 34, 0.42);
}
.chat-abnormal-login-title {
    font-size: 20px;
    line-height: 1.2;
    font-weight: 680;
    color: #2E2924;
}
.chat-abnormal-login-desc,
.chat-abnormal-login-warning {
    margin: 0;
    font-size: 13px;
    line-height: 1.65;
    color: rgba(46, 40, 35, 0.64);
}
.chat-abnormal-login-identity {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 20px;
    border: 1px solid rgba(61, 51, 44, 0.09);
    background: rgba(255, 255, 255, 0.46);
}
.chat-abnormal-login-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(54, 45, 39, 0.10);
    background: rgba(255,255,255,0.66);
    background-size: cover;
    background-position: center;
    color: rgba(46, 40, 35, 0.46);
    font-size: 11px;
}
.chat-abnormal-login-identity b,
.chat-abnormal-login-identity span,
.chat-abnormal-login-identity em {
    display: block;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.chat-abnormal-login-identity b {
    font-size: 14px;
    color: #2E2924;
}
.chat-abnormal-login-identity span,
.chat-abnormal-login-identity em {
    margin-top: 3px;
    font-size: 11px;
    font-style: normal;
    color: rgba(46, 40, 35, 0.48);
}
.chat-abnormal-login-warning {
    padding: 11px 12px;
    border-radius: 16px;
    background: rgba(119, 70, 64, 0.08);
    color: rgba(91, 53, 48, 0.68);
}
.chat-abnormal-login-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding-top: 2px;
}
.chat-abnormal-login-actions button {
    min-height: 42px;
    border: 1px solid rgba(55, 47, 42, 0.10);
    border-radius: 999px;
    background: rgba(255,255,255,0.52);
    color: rgba(43, 37, 32, 0.74);
    font-size: 14px;
    cursor: pointer;
}
.chat-abnormal-login-actions button.is-primary {
    background: rgba(39, 34, 30, 0.88);
    color: rgba(255, 252, 248, 0.94);
}
.chat-account-security-view {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    background:
        radial-gradient(circle at 18% 0%, rgba(255,255,255,0.72), transparent 34%),
        linear-gradient(180deg, rgba(248,247,243,0.98) 0%, rgba(241,239,234,0.96) 52%, rgba(232,236,237,0.96) 100%);
    color: rgba(41, 37, 33, 0.92);
    overflow: hidden;
}
.chat-account-security-view.active {
    display: flex;
}
.chat-account-security-topbar {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 72px;
    align-items: center;
    min-height: 72px;
    padding: max(18px, env(safe-area-inset-top)) 22px 8px;
    background: transparent;
    border-bottom: 0;
}
.chat-account-security-back {
    justify-self: start;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: rgba(52, 47, 42, 0.76);
    font-size: 12px;
    letter-spacing: 0.14em;
    text-decoration: underline;
    text-underline-offset: 5px;
    cursor: pointer;
}
.chat-account-security-title {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-family: var(--serif-font, Georgia, serif);
    font-size: 21px;
    font-style: italic;
    font-weight: 520;
    letter-spacing: 0.03em;
    text-align: center;
    color: rgba(45, 40, 35, 0.9);
}
.chat-account-security-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 10px 24px max(34px, env(safe-area-inset-bottom));
    overflow-y: auto;
    scrollbar-width: none;
}
.chat-account-security-body::-webkit-scrollbar { display: none; }
.chat-account-security-summary,
.chat-account-security-card,
.chat-account-security-empty {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.chat-account-security-summary {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 10px 0 21px;
    border-bottom: 1px solid rgba(70, 63, 56, 0.14);
}
.chat-account-security-summary span {
    font-size: 9px;
    letter-spacing: 0.2em;
    color: rgba(65, 58, 51, 0.42);
}
.chat-account-security-summary strong {
    font-family: var(--serif-font, Georgia, serif);
    font-size: 19px;
    font-style: italic;
    font-weight: 520;
    color: rgba(43, 38, 34, 0.9);
}
.chat-account-security-summary p,
.chat-account-security-card p {
    margin: 0;
    font-size: 12px;
    line-height: 1.72;
    color: rgba(56, 50, 44, 0.58);
}
.chat-account-security-empty {
    padding: 24px 0;
    border-bottom: 1px solid rgba(70, 63, 56, 0.10);
    font-size: 12px;
    line-height: 1.7;
    color: rgba(63, 56, 50, 0.46);
    text-align: left;
}
.chat-account-security-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 17px 0 18px;
    border-bottom: 1px solid rgba(70, 63, 56, 0.11);
}
.chat-account-security-card.is-forced_success {
    background: transparent;
    border-color: rgba(116, 70, 63, 0.24);
}
.chat-account-security-card-head {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
}
.chat-account-security-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(65, 58, 51, 0.12);
    background: rgba(255,255,255,0.38);
    background-size: cover;
    background-position: center;
    color: rgba(54, 49, 44, 0.44);
    font-size: 11px;
}
.chat-account-security-card-head strong,
.chat-account-security-card-head span {
    display: block;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.chat-account-security-card-head strong {
    font-size: 13px;
    font-weight: 500;
    color: rgba(43, 38, 34, 0.9);
}
.chat-account-security-card-head span {
    margin-top: 4px;
    font-size: 10px;
    color: rgba(56, 50, 44, 0.44);
}
.chat-account-security-card-head em {
    padding: 0 0 3px;
    border-radius: 0;
    border-bottom: 1px solid rgba(63, 56, 50, 0.28);
    background: transparent;
    color: rgba(52, 46, 41, 0.64);
    font-style: normal;
    font-size: 10px;
    letter-spacing: 0.08em;
    white-space: nowrap;
}
.chat-account-security-card.is-forced_success .chat-account-security-card-head em {
    background: transparent;
    border-color: rgba(116, 70, 63, 0.38);
    color: rgba(101, 54, 48, 0.76);
}
.chat-account-security-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
}
.chat-account-security-meta span {
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: rgba(56, 50, 44, 0.42);
    font-size: 10px;
    letter-spacing: 0.04em;
}
.chat-app-page.account-security-open .chat-bottom-dock,
.chat-account-security-view.active ~ .chat-bottom-dock { display: none; }

.chat-thread-failure-badge {
    font-family: ui-serif, Georgia, serif;
    line-height: 1;
}

/* v292 · 心声面板交互：历史标签内嵌到 HTML 卡片，左右箭头复用记忆页圆形箭头；关闭只走外部遮罩 */
.chat-heart-actions,
.chat-heart-refresh,
.chat-heart-close {
    display: none;
}
.chat-heart-history[hidden] {
    display: none;
}
.chat-heart-panel-mount .voice-history-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: -24px 0 -18px;
    padding: 1px 0 2px;
    overflow-x: auto;
    scrollbar-width: none;
}
.chat-heart-panel-mount .voice-history-tabs::-webkit-scrollbar {
    display: none;
}
.chat-heart-panel-mount .voice-history-tab {
    flex: 0 0 auto;
    height: 24px;
    padding: 0 10px;
    border: 1px solid var(--divider-color);
    border-radius: 999px;
    background: #FFFFFF;
    color: var(--text-light);
    font-size: 9px;
    line-height: 22px;
    letter-spacing: 0.12em;
    font-family: "Courier New", Courier, monospace;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.82);
}
.chat-heart-panel-mount .voice-history-tab.is-active {
    color: var(--text-main);
    border-color: rgba(45,45,45,0.34);
    background: #FFFFFF;
}
.chat-heart-panel-mount .voice-history-tab:active {
    transform: translateY(1px);
}
.chat-heart-panel-mount .chat-heart-nav {
    position: absolute;
    top: 50%;
    z-index: 5;
    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);
}
.chat-heart-panel-mount .chat-heart-nav::before {
    content: '';
    width: 8px;
    height: 8px;
    border-top: 1.7px solid currentColor;
    border-right: 1.7px solid currentColor;
}
.chat-heart-panel-mount .chat-heart-nav.is-prev { left: -18px; }
.chat-heart-panel-mount .chat-heart-nav.is-next { right: -18px; }
.chat-heart-panel-mount .chat-heart-nav.is-prev::before { transform: translateX(1px) rotate(-135deg); }
.chat-heart-panel-mount .chat-heart-nav.is-next::before { transform: translateX(-1px) rotate(45deg); }
.chat-heart-panel-mount .chat-heart-nav:active { transform: translateY(1px); }
.chat-heart-panel-mount .chat-heart-nav:disabled {
    opacity: 0.34;
    cursor: default;
}
.chat-heart-panel-mount > .chat-heart-history-empty {
    min-width: 230px;
    padding: 18px 20px;
    border-radius: 24px;
    background: #FFFFFF;
    color: #707070;
    text-align: center;
    font-size: 12px;
    letter-spacing: 0.08em;
}
@media (max-width: 380px) {
    .chat-heart-panel-mount .chat-heart-nav {
        width: 38px;
        height: 38px;
        margin-top: -19px;
    }
    .chat-heart-panel-mount .chat-heart-nav.is-prev { left: -9px; }
    .chat-heart-panel-mount .chat-heart-nav.is-next { right: -9px; }
}


    /* One Phone 联机：搜索添加账号，复用全局纸面弹窗，不用突兀新样式 */
    .chat-online-search-modal { display: none; align-items: center; justify-content: center; padding: 22px; }
    .chat-online-search-modal.show { display: flex; }
    .chat-online-search-dialog { width: min(86vw, 392px); border-radius: 28px; overflow: hidden; background: rgba(252,253,253,.96); border: 1px solid rgba(210,218,224,.72); box-shadow: 0 18px 50px rgba(116,128,140,.18); }
    .chat-online-search-dialog .modal-content { padding: 24px 22px 16px; }
    .chat-online-search-kicker { font-size: 10px; letter-spacing: .24em; color: #9aa7ae; text-transform: uppercase; margin-bottom: 8px; }
    .chat-online-search-title { font-size: 20px; line-height: 1.2; font-weight: 700; color: #2a3238; letter-spacing: .04em; }
    .chat-online-search-copy { margin: 8px 0 18px; font-size: 12px; line-height: 1.75; color: #88939a; }
    .chat-online-search-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; margin-bottom: 14px; }
    .chat-online-search-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
    .chat-online-search-field span { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: #a0abb2; }
    .chat-online-search-field input { width: 100%; height: 42px; border: 1px solid rgba(214,222,226,.86); border-radius: 16px; background: rgba(255,255,255,.86); color: #2f3940; font-size: 14px; padding: 0 14px; outline: none; box-sizing: border-box; }
    .chat-online-search-field input:focus { border-color: rgba(157,172,181,.95); box-shadow: 0 0 0 3px rgba(159,176,184,.13); }
    .chat-online-search-submit { height: 42px; padding: 0 16px; border: 0; border-radius: 16px; background: #2f3940; color: #fff; font-size: 12px; letter-spacing: .08em; font-weight: 700; }
    .chat-online-search-submit:disabled { opacity: .55; }
    .chat-online-search-result { display: flex; flex-direction: column; gap: 10px; max-height: min(42vh, 320px); overflow: auto; padding-right: 2px; }
    .chat-online-search-empty { min-height: 92px; display: flex; align-items: center; justify-content: center; text-align: center; border: 1px dashed rgba(204,214,220,.88); border-radius: 20px; color: #9aa5ad; font-size: 12px; line-height: 1.7; background: rgba(248,250,251,.72); padding: 14px; }
    .chat-online-account-card { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 12px; border-radius: 20px; background: rgba(255,255,255,.88); border: 1px solid rgba(218,225,229,.72); }
    .chat-online-account-avatar { width: 44px; height: 44px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: linear-gradient(145deg, rgba(232,237,239,.9), rgba(250,251,252,.9)); color: #6d7a82; font-size: 12px; font-weight: 700; letter-spacing: .08em; overflow: hidden; background-size: cover; background-position: center; }
    .chat-online-account-main { min-width: 0; }
    .chat-online-account-main strong { display: block; color: #303940; font-size: 14px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
    .chat-online-account-main span { display: block; margin-top: 3px; color: #8d989f; font-size: 11px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
    .chat-online-account-main small { display: inline-flex; margin-top: 6px; padding: 2px 7px; border-radius: 999px; background: rgba(233,238,241,.86); color: #7d8990; font-size: 10px; letter-spacing: .08em; }
    .chat-online-account-add { height: 34px; padding: 0 12px; border: 0; border-radius: 13px; background: #2f3940; color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; }
    .chat-online-account-add.is-added { background: rgba(214,222,226,.9); color: #78858c; }
    .chat-contact-card[data-contact-type="online_account"] .chat-contact-avatar { color: #6c7a82; }
    .chat-contact-card[data-contact-type="online_account"] .chat-contact-group { color: #6f7d85; }

/* v303 · Assets phone recharge + travel placeholder */
.chat-assets-sub-balance {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    margin: 8px 0 18px;
    color: rgba(72, 80, 86, .68);
    font-size: 12px;
    letter-spacing: .08em;
}
.chat-assets-sub-balance strong {
    color: rgba(41, 48, 53, .82);
    font-weight: 600;
}
.chat-assets-sub-balance em {
    font-style: normal;
}
.chat-phone-recharge-view,
.chat-travel-view {
    min-height: 100%;
    padding: 18px 18px 26px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: radial-gradient(circle at 50% -18%, rgba(210, 219, 219, .38), transparent 42%), rgba(246, 244, 239, .76);
}
.chat-phone-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 20px;
}
.chat-phone-shell,
.chat-phone-records,
.chat-travel-empty-state {
    position: relative;
    overflow: hidden;
    padding: 18px;
    border-radius: 28px;
    background: rgba(255, 255, 252, .52);
    border: 1px solid rgba(106, 116, 112, .12);
    box-shadow: 0 18px 42px rgba(66, 72, 72, .07);
    backdrop-filter: blur(18px);
}
.chat-phone-shell::before,
.chat-travel-empty-state::before {
    content: '';
    position: absolute;
    inset: 0 22px auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(109, 122, 119, .2), transparent);
}
.chat-phone-balance-panel {
    display: grid;
    gap: 8px;
    padding: 4px 2px 16px;
}
.chat-phone-balance-panel span,
.chat-phone-custom span {
    font-size: 11px;
    letter-spacing: .16em;
    color: rgba(72, 80, 86, .52);
    text-transform: uppercase;
}
.chat-phone-balance-panel strong {
    font-size: 34px;
    line-height: 1;
    font-weight: 500;
    color: rgba(42, 48, 50, .88);
}
.chat-phone-balance-panel em {
    font-style: normal;
}
.chat-phone-balance-panel p {
    margin: 0;
    color: rgba(64, 70, 72, .58);
    font-size: 12px;
    line-height: 1.7;
}
.chat-phone-recipient-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    margin: 4px 0 16px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(126, 137, 132, .09);
}
.chat-phone-recipient {
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(58, 65, 66, .6);
    font-size: 13px;
    padding: 9px 10px;
    cursor: pointer;
}
.chat-phone-recipient.is-active {
    background: rgba(255, 255, 252, .72);
    color: rgba(42, 49, 49, .86);
    box-shadow: inset 0 0 0 1px rgba(100, 112, 108, .1);
}
.chat-phone-char-picker {
    display: none;
    margin: -2px 0 16px;
}
.chat-phone-char-picker.show {
    display: block;
}
.chat-phone-char-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 0 8px;
    scrollbar-width: none;
}
.chat-phone-char-list::-webkit-scrollbar { display: none; }
.chat-phone-char-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    padding: 8px 11px 8px 8px;
    background: rgba(255, 255, 252, .5);
    color: rgba(48, 55, 56, .74);
    box-shadow: inset 0 0 0 1px rgba(103, 113, 110, .12);
}
.chat-phone-char-chip.is-active {
    background: rgba(221, 226, 220, .54);
    color: rgba(35, 42, 43, .9);
}
.chat-phone-char-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(118, 128, 124, .16);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    overflow: hidden;
}
.chat-phone-char-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.chat-phone-char-empty,
.chat-phone-record-empty {
    color: rgba(66, 72, 72, .52);
    font-size: 12px;
    padding: 8px 2px;
}
.chat-phone-amount-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}
.chat-phone-amount-chip {
    border: 0;
    border-radius: 18px;
    padding: 12px 6px;
    background: rgba(255, 255, 252, .45);
    color: rgba(49, 56, 57, .65);
    font-size: 14px;
    box-shadow: inset 0 0 0 1px rgba(100, 110, 106, .11);
}
.chat-phone-amount-chip::before {
    content: '¥';
    margin-right: 2px;
    color: rgba(88, 100, 98, .5);
}
.chat-phone-amount-chip.is-active {
    background: rgba(214, 221, 216, .58);
    color: rgba(35, 42, 43, .88);
}
.chat-phone-custom {
    display: grid;
    gap: 8px;
    margin: 4px 0 14px;
}
.chat-phone-custom input {
    width: 100%;
    border: 0;
    border-radius: 20px;
    background: rgba(255, 255, 252, .48);
    color: rgba(41, 48, 50, .88);
    padding: 13px 14px;
    font-size: 15px;
    outline: none;
    box-shadow: inset 0 0 0 1px rgba(99, 111, 107, .12);
}
.chat-phone-submit {
    width: 100%;
    border: 0;
    border-radius: 999px;
    padding: 13px 16px;
    background: rgba(54, 66, 67, .82);
    color: rgba(255, 255, 252, .94);
    font-size: 14px;
    letter-spacing: .08em;
}
.chat-phone-records {
    margin-top: 16px;
    padding: 16px;
}
.chat-phone-record-list {
    display: grid;
    gap: 10px;
}
.chat-phone-record {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 12px 4px;
    border-bottom: 1px solid rgba(98, 109, 106, .1);
}
.chat-phone-record:last-child { border-bottom: 0; }
.chat-phone-record strong {
    font-weight: 500;
    color: rgba(39, 47, 48, .86);
}
.chat-phone-record p {
    margin: 4px 0 0;
    color: rgba(65, 72, 73, .52);
    font-size: 12px;
    line-height: 1.55;
}
.chat-phone-record time {
    color: rgba(76, 85, 84, .42);
    font-size: 11px;
}
.chat-phone-record-amount {
    align-self: center;
    font-size: 14px;
    color: rgba(39, 47, 48, .78);
}
.chat-phone-record-amount.is-out { color: rgba(105, 71, 65, .78); }
.chat-phone-record-amount.is-in { color: rgba(55, 84, 74, .78); }
.chat-travel-empty-state {
    min-height: 58vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 12px;
}
.chat-travel-empty-icon {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(230, 234, 229, .58);
    color: rgba(53, 62, 62, .72);
}
.chat-travel-empty-icon svg {
    width: 34px;
    height: 34px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.chat-travel-empty-state h3 {
    margin: 0;
    max-width: 240px;
    font-weight: 500;
    color: rgba(38, 47, 48, .88);
    line-height: 1.5;
}
.chat-travel-empty-state p {
    margin: 0;
    max-width: 270px;
    color: rgba(64, 72, 72, .56);
    font-size: 12px;
    line-height: 1.8;
}
@media (max-width: 420px) {
    .chat-phone-recharge-view,
    .chat-travel-view { padding: 16px 14px 24px; }
    .chat-phone-shell,
    .chat-phone-records,
    .chat-travel-empty-state { border-radius: 24px; padding: 16px; }
    .chat-phone-balance-panel strong { font-size: 30px; }
    .chat-phone-amount-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* v308 联机弹窗：回归全局弹窗骨架，去掉全屏页与黑色按钮 */
.chat-online-search-modal,
.chat-online-verify-modal {
    z-index: 13000;
    align-items: center;
    justify-content: 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));
    background: rgba(30, 30, 35, 0.4);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.chat-online-search-modal.show,
.chat-online-verify-modal.show { display: flex; opacity: 1; }
.chat-online-search-dialog,
.chat-online-verify-dialog {
    width: 100%;
    max-width: 320px;
    min-height: 0;
    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)));
    border-radius: 22px;
    border: 0;
    background: #ffffff;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}
.chat-online-search-dialog .modal-content,
.chat-online-verify-dialog .modal-content {
    padding: 24px 20px 18px;
    gap: 14px;
}
.chat-online-search-kicker {
    margin: 0;
    text-align: center;
    font-size: 9.5px;
    letter-spacing: .22em;
    color: #a3abb3;
    text-transform: uppercase;
}
.chat-online-search-title {
    margin: 0;
    text-align: center;
    font-family: Georgia, 'Times New Roman', 'Songti SC', serif;
    font-size: 18px;
    line-height: 1.15;
    font-style: italic;
    font-weight: 400;
    letter-spacing: .04em;
    color: #454a53;
}
.chat-online-search-copy {
    margin: 0;
    text-align: center;
    font-size: 11.5px;
    line-height: 1.72;
    color: #8f98a2;
}
.chat-online-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
    margin: 2px 0 0;
    padding: 0 0 12px;
    border-bottom: 1px solid #eef0f3;
}
.chat-online-search-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.chat-online-search-field span {
    font-size: 9.5px;
    letter-spacing: .16em;
    color: #a3abb3;
    text-transform: uppercase;
}
.chat-online-search-field input {
    width: 100%;
    height: 38px;
    border: 0;
    border-bottom: 1px solid rgba(154, 164, 174, .38);
    border-radius: 0;
    background: transparent;
    color: #343941;
    font-size: 14px;
    padding: 0 1px;
    outline: none;
    box-shadow: none;
}
.chat-online-search-field input:focus { border-color: rgba(84, 96, 108, .66); box-shadow: none; }
.chat-online-search-submit {
    height: 38px;
    min-width: 46px;
    padding: 0 1px;
    border: 0;
    border-bottom: 1px solid rgba(154, 164, 174, .44);
    border-radius: 0;
    background: transparent;
    color: #58626e;
    font-size: 10.5px;
    letter-spacing: .14em;
    font-weight: 400;
    text-transform: uppercase;
}
.chat-online-search-submit::before { content: none; }
.chat-online-search-submit:disabled { opacity: .45; }
.chat-online-search-result,
.chat-online-verify-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-height: min(42vh, 320px);
    overflow: auto;
    padding-right: 0;
    border-top: 1px solid #f0f2f5;
}
.chat-online-search-empty,
.chat-online-verify-empty {
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 0;
    border-bottom: 1px solid #f0f2f5;
    border-radius: 0;
    background: transparent;
    color: #98a1aa;
    font-size: 12px;
    line-height: 1.7;
    padding: 14px 8px;
}
.chat-online-account-card,
.chat-online-verify-card {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 13px 0;
    border: 0;
    border-bottom: 1px solid #f0f2f5;
    border-radius: 0;
    background: transparent;
}
.chat-online-account-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(231, 235, 238, .72);
    color: #69737f;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: .08em;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    position: relative;
}
.chat-online-account-avatar::after {
    content: '';
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(116, 136, 128, .72);
    box-shadow: 0 0 0 2px #fff;
}
.chat-online-account-main,
.chat-online-verify-main { min-width: 0; }
.chat-online-account-main strong,
.chat-online-verify-main strong {
    display: block;
    color: #343941;
    font-size: 13.5px;
    line-height: 1.2;
    font-weight: 400;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.chat-online-account-main span,
.chat-online-verify-main span {
    display: block;
    margin-top: 4px;
    color: #909aa4;
    font-size: 10.5px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.chat-online-account-main small,
.chat-online-verify-main small {
    display: block;
    margin-top: 5px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #a8afb7;
    font-size: 9px;
    letter-spacing: .14em;
}
.chat-online-account-add,
.chat-online-verify-action {
    height: 28px;
    min-width: 36px;
    padding: 0 1px 2px;
    border: 0;
    border-bottom: 1px solid rgba(154, 164, 174, .45);
    border-radius: 0;
    background: transparent;
    color: #58626e;
    font-size: 11px;
    line-height: 1;
    font-weight: 400;
    white-space: nowrap;
}
.chat-online-account-add::before { content: none; }
.chat-online-account-add.is-added {
    background: transparent;
    color: #9aa3ac;
    border-bottom-color: transparent;
}
.chat-online-account-add.is-added::before { content: none; }
.chat-online-verify-summary {
    text-align: center;
    font-size: 10px;
    letter-spacing: .14em;
    color: #9ba3ad;
    padding: 2px 0 8px;
    border-bottom: 1px solid #f0f2f5;
}
.chat-online-verify-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #9aa3ac;
    font-size: 11px;
    white-space: nowrap;
}
.chat-online-verify-action.is-primary { color: #3f4b55; border-bottom-color: rgba(92, 108, 118, .58); }
.chat-online-verify-action:active,
.chat-online-account-add:active,
.chat-online-search-submit:active { opacity: .62; background: transparent; transform: none; }
@media (max-width: 380px) {
    .chat-online-search-form { grid-template-columns: 1fr; gap: 8px; }
    .chat-online-search-submit { justify-self: end; }
    .chat-online-account-card,
    .chat-online-verify-card { grid-template-columns: 34px minmax(0, 1fr); }
    .chat-online-account-add,
    .chat-online-verify-actions { grid-column: 2; justify-self: start; }
}

/* v309 · 联机 UI 质检返工：纸面全局弹窗、无黑实心按钮、无油腻圆角卡片 */
.chat-online-search-modal,
.chat-online-verify-modal {
    background: rgba(35, 36, 40, 0.26);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    padding: max(22px, calc(env(safe-area-inset-top) + 16px)) 22px max(22px, calc(env(safe-area-inset-bottom) + 16px), calc(var(--one-visual-bottom-gap, 0px) + 16px));
}
.chat-online-search-dialog,
.chat-online-verify-dialog {
    max-width: 334px;
    border-radius: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, 0)) top / 100% 64px no-repeat,
        #fcfbf7;
    border: 1px solid rgba(215, 213, 206, .72);
    box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 18px 34px rgba(34, 37, 42, .08);
    clip-path: polygon(0 0, calc(100% - 13px) 0, 100% 13px, 100% 100%, 13px 100%, 0 calc(100% - 13px));
}
.chat-online-search-dialog::before,
.chat-online-verify-dialog::before {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(90deg, rgba(64, 63, 68, .72), rgba(64, 63, 68, .18));
}
.chat-online-search-dialog .modal-content,
.chat-online-verify-dialog .modal-content {
    padding: 22px 22px 16px;
    gap: 12px;
}
.chat-online-search-kicker {
    text-align: left;
    color: rgba(64, 63, 68, .42);
    font-size: 9px;
    letter-spacing: .24em;
}
.chat-online-search-title {
    text-align: left;
    color: #403f44;
    font-size: 19px;
    letter-spacing: .03em;
}
.chat-online-search-copy {
    text-align: left;
    color: rgba(64, 63, 68, .58);
    font-size: 11.5px;
    line-height: 1.8;
}
.chat-online-search-form {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    padding: 6px 0 14px;
    border-bottom-color: rgba(64, 63, 68, .12);
}
.chat-online-search-field span {
    color: rgba(64, 63, 68, .42);
    letter-spacing: .18em;
}
.chat-online-search-field input {
    height: 40px;
    border-bottom-color: rgba(64, 63, 68, .20);
    color: #403f44;
    font-size: 13.5px;
}
.chat-online-search-field input::placeholder { color: rgba(64, 63, 68, .30); }
.chat-online-search-field input:focus { border-color: rgba(64, 63, 68, .52); }
.chat-online-search-submit,
.chat-online-account-add,
.chat-online-verify-action,
.chat-online-search-dialog .modal-actions button,
.chat-online-verify-dialog .modal-actions button {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    color: rgba(64, 63, 68, .72);
    font-weight: 400;
}
.chat-online-search-submit {
    min-width: 48px;
    height: 40px;
    border-bottom: 1px solid rgba(64, 63, 68, .24);
    padding: 0 0 2px;
    font-size: 10px;
    letter-spacing: .18em;
}
.chat-online-search-result,
.chat-online-verify-list {
    max-height: min(46vh, 340px);
    border-top: 0;
}
.chat-online-search-empty,
.chat-online-verify-empty {
    min-height: 98px;
    justify-content: flex-start;
    text-align: left;
    border-bottom-color: rgba(64, 63, 68, .10);
    color: rgba(64, 63, 68, .44);
    padding: 18px 0;
}
.chat-online-account-card,
.chat-online-verify-card {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 14px 0;
    border-bottom-color: rgba(64, 63, 68, .10);
}
.chat-online-account-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(64, 63, 68, .07);
    color: rgba(64, 63, 68, .70);
    font-family: Georgia, 'Times New Roman', 'Songti SC', serif;
    font-size: 12px;
    letter-spacing: .06em;
}
.chat-online-account-avatar::after {
    width: 6px;
    height: 6px;
    background: rgba(92, 111, 101, .70);
    box-shadow: 0 0 0 2px #fcfbf7;
}
.chat-online-account-main strong,
.chat-online-verify-main strong {
    color: #403f44;
    font-size: 13px;
    font-weight: 400;
}
.chat-online-account-main span,
.chat-online-verify-main span {
    color: rgba(64, 63, 68, .46);
    font-size: 10.5px;
}
.chat-online-account-main small,
.chat-online-verify-main small {
    color: rgba(64, 63, 68, .38);
    font-size: 8.5px;
    letter-spacing: .18em;
}
.chat-online-account-add,
.chat-online-verify-action {
    min-width: 34px;
    height: 26px;
    padding: 0 0 2px;
    border: 0;
    border-bottom: 1px solid rgba(64, 63, 68, .24);
    font-size: 10.5px;
    letter-spacing: .08em;
}
.chat-online-account-add.is-added {
    color: rgba(64, 63, 68, .36);
    border-bottom-color: transparent;
}
.chat-online-verify-summary {
    text-align: left;
    color: rgba(64, 63, 68, .46);
    border-bottom-color: rgba(64, 63, 68, .10);
    padding: 0 0 10px;
}
.chat-online-verify-actions { gap: 12px; }
.chat-online-verify-action.is-primary {
    color: #403f44;
    border-bottom-color: rgba(64, 63, 68, .44);
}
.chat-online-search-dialog .modal-actions,
.chat-online-verify-dialog .modal-actions {
    height: 48px;
    border-top: 1px solid rgba(64, 63, 68, .12);
    background: rgba(252, 251, 247, .86);
}
.chat-online-search-dialog .modal-actions button,
.chat-online-verify-dialog .modal-actions button {
    font-size: 12px;
    letter-spacing: .18em;
    color: rgba(64, 63, 68, .48);
}
.chat-online-search-dialog .modal-actions .btn-cancel,
.chat-online-verify-dialog .modal-actions .btn-cancel {
    border-right-color: rgba(64, 63, 68, .10);
}
.chat-online-verify-dialog .modal-actions .btn-save {
    color: rgba(64, 63, 68, .74);
}
.chat-online-search-submit:active,
.chat-online-account-add:active,
.chat-online-verify-action:active,
.chat-online-search-dialog .modal-actions button:active,
.chat-online-verify-dialog .modal-actions button:active {
    background: transparent;
    color: #403f44;
    opacity: .64;
    transform: none;
}
.chat-refresh-btn.has-online-verify::after {
    content: attr(data-online-verify-count);
    position: absolute;
    top: 3px;
    right: 3px;
    min-width: 12px;
    height: 12px;
    padding: 0 3px;
    border-radius: 999px;
    background: rgba(174, 120, 112, .88);
    color: #fffdf9;
    font-size: 8px;
    line-height: 12px;
    text-align: center;
    box-shadow: 0 0 0 2px rgba(252, 251, 247, .9);
}
@media (max-width: 380px) {
    .chat-online-search-dialog,
    .chat-online-verify-dialog { max-width: 316px; }
    .chat-online-search-form { grid-template-columns: 1fr; gap: 10px; }
    .chat-online-search-submit { justify-self: start; }
}
.chat-refresh-btn { position: relative; }

/* v310 · Anonymous chat page: black in-thread mode, no external app shell */
.chat-app-page.anonymous-open .chat-bottom-dock,
.chat-anonymous-view.active ~ .chat-bottom-dock {
    display: none;
}
.chat-anonymous-view {
    --anon-ink: rgba(244, 241, 235, 0.94);
    --anon-muted: rgba(244, 241, 235, 0.52);
    --anon-line: rgba(244, 241, 235, 0.14);
    --anon-line-soft: rgba(244, 241, 235, 0.08);
    --anon-paper: rgba(18, 18, 20, 0.62);
    padding: 0;
    overflow: hidden;
    color: var(--anon-ink);
    background:
        radial-gradient(circle at 16% 8%, rgba(90, 88, 94, 0.28), transparent 34%),
        radial-gradient(circle at 88% 78%, rgba(72, 58, 68, 0.26), transparent 42%),
        linear-gradient(150deg, #050506 0%, #111116 52%, #050506 100%);
    isolation: isolate;
}
.chat-anonymous-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px),
        radial-gradient(circle, rgba(255,255,255,0.05) 0 0.55px, transparent 0.68px);
    background-size: 52px 52px, 52px 52px, 16px 16px;
    opacity: 0.46;
}
.chat-anonymous-topbar {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    gap: 14px;
    align-items: center;
    padding: max(18px, calc(env(safe-area-inset-top) + 12px)) 20px 12px;
    background: linear-gradient(180deg, rgba(5,5,6,0.94), rgba(5,5,6,0.60) 74%, transparent);
}
.chat-anonymous-back,
.chat-anonymous-send {
    border: 1px solid var(--anon-line);
    border-radius: 50%;
    background: rgba(255,255,255,0.035);
    color: var(--anon-ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    appearance: none;
    -webkit-appearance: none;
}
.chat-anonymous-back {
    width: 42px;
    height: 42px;
}
.chat-anonymous-back svg,
.chat-anonymous-send svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 1.7;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.chat-anonymous-headcopy { min-width: 0; }
.chat-anonymous-kicker {
    font-family: "Courier New", Courier, monospace;
    font-size: 9px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(244,241,235,0.42);
}
.chat-anonymous-headcopy h1 {
    margin: 4px 0 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: Georgia, "Times New Roman", "Songti SC", serif;
    font-size: 24px;
    line-height: 1.06;
    font-weight: 400;
    font-style: italic;
    letter-spacing: -0.035em;
    color: var(--anon-ink);
}
.chat-anonymous-headcopy p {
    margin: 6px 0 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    line-height: 1.2;
    letter-spacing: 0.08em;
    color: var(--anon-muted);
}
.chat-anonymous-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--anon-line);
    background: rgba(255,255,255,0.07);
    background-size: cover;
    background-position: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(244,241,235,0.46);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 12px;
    font-style: italic;
}
.chat-anonymous-avatar.has-image { color: transparent; }
.chat-anonymous-identity {
    position: absolute;
    left: 18px;
    right: 18px;
    top: max(96px, calc(env(safe-area-inset-top) + 90px));
    z-index: 4;
    display: grid;
    gap: 12px;
}
.chat-anonymous-mode-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    border-top: 1px solid var(--anon-line-soft);
    border-bottom: 1px solid var(--anon-line-soft);
    background: rgba(10,10,12,0.38);
    backdrop-filter: blur(16px);
}
.chat-anonymous-mode-tabs button {
    min-height: 44px;
    border: 0;
    border-right: 1px solid var(--anon-line-soft);
    background: transparent;
    color: rgba(244,241,235,0.56);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3px;
    appearance: none;
    -webkit-appearance: none;
}
.chat-anonymous-mode-tabs button:last-child { border-right: 0; }
.chat-anonymous-mode-tabs button span {
    font-size: 12px;
    letter-spacing: 0.08em;
}
.chat-anonymous-mode-tabs button i {
    font-style: normal;
    font-family: "Courier New", Courier, monospace;
    font-size: 8px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    opacity: 0.58;
}
.chat-anonymous-mode-tabs button.active {
    color: var(--anon-ink);
    background: linear-gradient(180deg, rgba(255,255,255,0.085), rgba(255,255,255,0.018));
}
.chat-anonymous-alias-field {
    display: grid;
    gap: 6px;
    transition: opacity 0.18s ease, transform 0.18s ease;
}
.chat-anonymous-alias-field span {
    font-family: "Courier New", Courier, monospace;
    font-size: 8px;
    letter-spacing: 0.22em;
    color: rgba(244,241,235,0.36);
}
.chat-anonymous-alias-field input {
    width: 100%;
    height: 38px;
    border: 0;
    border-bottom: 1px solid var(--anon-line);
    border-radius: 0;
    background: transparent;
    color: var(--anon-ink);
    font-size: 13px;
    letter-spacing: 0.04em;
    outline: 0;
}
.chat-anonymous-view:not(.is-custom-mode) .chat-anonymous-alias-field {
    opacity: 0.36;
}
.chat-anonymous-view:not(.is-custom-mode) .chat-anonymous-alias-field input {
    pointer-events: none;
}
.chat-anonymous-messages {
    position: absolute;
    left: 0;
    right: 0;
    top: max(184px, calc(env(safe-area-inset-top) + 178px));
    bottom: max(84px, calc(env(safe-area-inset-bottom) + 76px));
    z-index: 2;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: none;
}
.chat-anonymous-messages::-webkit-scrollbar { display: none; }
.chat-anonymous-empty {
    margin: auto;
    max-width: 260px;
    text-align: center;
    color: rgba(244,241,235,0.42);
    font-size: 12px;
    line-height: 1.8;
    letter-spacing: 0.08em;
}
.chat-anonymous-row {
    display: flex;
    gap: 9px;
    align-items: flex-end;
}
.chat-anonymous-row.is-me {
    justify-content: flex-end;
}
.chat-anonymous-row.is-ta {
    justify-content: flex-start;
}
.chat-anonymous-mini-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--anon-line-soft);
    background: rgba(255,255,255,0.05);
    background-size: cover;
    background-position: center;
    flex: 0 0 auto;
    color: rgba(244,241,235,0.38);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.chat-anonymous-mini-avatar.has-image { color: transparent; }
.chat-anonymous-stack {
    max-width: min(72vw, 310px);
    display: grid;
    gap: 5px;
}
.chat-anonymous-row.is-me .chat-anonymous-stack { justify-items: end; }
.chat-anonymous-sender {
    font-family: "Courier New", Courier, monospace;
    font-size: 8px;
    letter-spacing: 0.16em;
    color: rgba(244,241,235,0.34);
    text-transform: uppercase;
}
.chat-anonymous-bubble {
    position: relative;
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--anon-line-soft);
    border-radius: 18px;
    background: rgba(255,255,255,0.052);
    color: rgba(244,241,235,0.90);
    font-size: 13px;
    line-height: 1.58;
    letter-spacing: 0.02em;
    word-break: break-word;
    box-shadow: none;
}
.chat-anonymous-row.is-me .chat-anonymous-bubble {
    background: rgba(244,241,235,0.90);
    color: #111116;
    border-color: rgba(244,241,235,0.18);
}
.chat-anonymous-time {
    font-family: "Courier New", Courier, monospace;
    font-size: 8px;
    letter-spacing: 0.12em;
    color: rgba(244,241,235,0.30);
}
.chat-anonymous-composer {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: max(14px, calc(env(safe-area-inset-bottom) + 12px));
    z-index: 6;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 10px;
    align-items: end;
    padding: 10px 0 0;
    border-top: 1px solid var(--anon-line-soft);
    background: linear-gradient(180deg, transparent, rgba(5,5,6,0.72) 24%, rgba(5,5,6,0.94));
}
.chat-anonymous-input {
    min-height: 44px;
    max-height: 108px;
    resize: none;
    border: 0;
    border-bottom: 1px solid var(--anon-line);
    border-radius: 0;
    background: transparent;
    color: var(--anon-ink);
    padding: 12px 4px 10px;
    font-size: 14px;
    line-height: 1.42;
    outline: 0;
}
.chat-anonymous-input::placeholder,
.chat-anonymous-alias-field input::placeholder {
    color: rgba(244,241,235,0.30);
}
.chat-anonymous-send {
    width: 44px;
    height: 44px;
    margin-bottom: 0;
}
.chat-anonymous-send:disabled {
    opacity: 0.36;
}
.chat-anonymous-send:active,
.chat-anonymous-back:active,
.chat-anonymous-mode-tabs button:active {
    opacity: 0.72;
    transform: translateY(1px);
}


/* v313 · 拉黑后消息发送失败徽章：红色外壳 + 白色感叹号 */
.chat-thread-bubble.is-delivery-failed {
    position: relative;
}
.chat-thread-bubble.is-delivery-failed .chat-thread-failure-badge,
.chat-thread-failure-badge {
    background: #c43f38;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.98);
    box-shadow: 0 0 0 2px rgba(196,63,56,0.14), 0 6px 16px rgba(150,50,45,0.18);
    font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 12px;
    font-weight: 800;
}

/* v322：APP 打开时桌面彻底隔离；键盘态只抬输入层，不再让桌面成为可见底图。 */
body.one-phone-app-open #desktop {
    visibility: hidden;
    pointer-events: none;
}
body.one-phone-app-open.show-phone-shell #desktop {
    visibility: hidden;
}
html.one-viewport-keyboard body.show-phone-shell .chat-app-page.show,
html.one-viewport-keyboard body.show-phone-shell .settings-app-page.show,
html.one-viewport-keyboard body.show-phone-shell .worldbook-app-page.show,
html.one-viewport-keyboard body.show-phone-shell .messages-app-page.show,
html.one-viewport-keyboard body.show-phone-shell .phone-app-page.show {
    transform: translate(-50%, -50%) scale(var(--one-shell-scale, 1));
}
html.one-viewport-keyboard .chat-app-page.show {
    opacity: 1;
    pointer-events: auto;
}
html.one-viewport-keyboard .chat-thread-view.active {
    background: transparent;
}


/* v323 · 键盘期间固定手机壳/APP surface 的中心点：不再用会随 visual viewport 收缩的 50% 重新居中。 */
html.one-viewport-keyboard body.show-phone-shell :where(#desktop, .settings-app-page, .worldbook-app-page, .memory-app-page, .chat-app-page, .messages-app-page, .phone-app-page, .phone-shell-frame) {
    left: var(--one-shell-stage-center-x, 50%);
    top: var(--one-shell-stage-center-y, 50%);
}
html.one-viewport-keyboard body.one-phone-app-open .chat-app-page.show {
    background-color: var(--chat-paper, #FCFBF7);
}
html.one-viewport-keyboard body.one-phone-app-open #desktop {
    visibility: hidden;
    pointer-events: none;
}

/* v324 · 键盘/输出期间聊天页自带不透明底板：即使 app-open class 被异步刷新，也不让桌面 dock 透到聊天线程下方。 */
html.one-viewport-keyboard .chat-app-page.show,
body.one-chat-output-rendering .chat-app-page.show,
.chat-app-page.show.thread-open {
    background-color: var(--chat-paper, #FCFBF7);
    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%);
}
html.one-viewport-keyboard .chat-thread-view.active,
body.one-chat-output-rendering .chat-thread-view.active,
.chat-app-page.show.thread-open .chat-thread-view.active {
    background-color: var(--chat-paper, #FCFBF7);
}
html.one-viewport-keyboard .chat-thread-view.active:not(.has-custom-bg)::before,
body.one-chat-output-rendering .chat-thread-view.active:not(.has-custom-bg)::before,
.chat-app-page.show.thread-open .chat-thread-view.active:not(.has-custom-bg)::before {
    background:
        radial-gradient(circle at 18% 12%, rgba(255,255,255,0.70) 0%, rgba(255,255,255,0.18) 36%, transparent 62%),
        radial-gradient(circle at 88% 82%, rgba(226,236,242,0.62) 0%, rgba(226,236,242,0.18) 36%, transparent 64%),
        linear-gradient(138deg, #FCFBF7 0%, #F6F1EA 100%);
    opacity: 1;
}
html.one-viewport-keyboard .chat-thread-view.active:not(.has-custom-bg) .chat-thread-bg,
body.one-chat-output-rendering .chat-thread-view.active:not(.has-custom-bg) .chat-thread-bg,
.chat-app-page.show.thread-open .chat-thread-view.active:not(.has-custom-bg) .chat-thread-bg {
    background-color: var(--chat-paper, #FCFBF7);
}
body.one-chat-output-rendering #desktop,
html.one-viewport-keyboard body.one-phone-app-open #desktop {
    visibility: hidden;
    pointer-events: none;
}
body.one-chat-output-rendering .chat-app-page.show,
html.one-viewport-keyboard .chat-app-page.show.thread-open {
    opacity: 1;
    pointer-events: auto;
    z-index: 9200;
}

/* v325 · 移动端输入聚焦根因修复：防止 focus zoom / 键盘 resize 把聊天页和桌面层重新暴露。 */
.chat-app-page :where(input, textarea, select),
.one-auth-page :where(input, textarea, select),
.modal-overlay :where(input, textarea, select) {
    font-size: max(16px, 1em);
}
body.one-chat-app-visible #desktop,
html.one-chat-app-visible body #desktop {
    visibility: hidden;
    pointer-events: none;
}
/* v347 · 底部导航不再被全局键盘/输出状态误伤。
   根因：one-editing / one-viewport-keyboard / one-chat-output-rendering 会在输入法收起、输出结束后短暂或异常滞留；
   旧规则直接隐藏 .chat-app-page.show 下的 .chat-bottom-dock，导致简讯 / Ta / 动态 / Me 根页面的底部导航消失。
   现在只在真正的聊天线程 / 匿名聊天输入场景隐藏，根页面导航始终由视图状态控制。 */
html.one-editing .chat-app-page.show.thread-open .chat-bottom-dock,
html.one-viewport-keyboard .chat-app-page.show.thread-open .chat-bottom-dock,
body.one-chat-output-rendering .chat-app-page.show.thread-open .chat-bottom-dock,
html.one-editing .chat-app-page.show.anonymous-open .chat-bottom-dock,
html.one-viewport-keyboard .chat-app-page.show.anonymous-open .chat-bottom-dock,
body.one-chat-output-rendering .chat-app-page.show.anonymous-open .chat-bottom-dock {
    display: none;
}
.chat-app-page.show:not(.thread-open):not(.anonymous-open):not(.asset-open):not(.ta-profile-open):not(.preset-open):not(.sticker-open):not(.chat-style-open):not(.offline-open):not(.thread-settings-open):not(.chat-record-detail-open):not(.account-security-open) > .chat-bottom-dock {
    display: grid;
}
html.one-editing .chat-app-page.show,
html.one-editing .chat-thread-view.active,
html.one-chat-app-visible .chat-app-page.show,
body.one-chat-output-rendering .chat-app-page.show {
    background-color: var(--chat-paper, #FCFBF7);
}


/* v326 · 键盘根因校正：手机壳模式不能让 fullscreen-keyboard 规则把聊天页 top 改回 0。
   证据：html.one-force-fullscreen-root 会常驻；弹键盘后 one-viewport-keyboard 同时存在。
   旧选择器 html.one-force-fullscreen-root.one-viewport-keyboard .chat-app-page 的 top:0 比 body.show-phone-shell .chat-app-page 更高优先级，
   导致手机壳内聊天页被 translate(-50%, -50%) 向上拉半屏，桌面/底部层露出。 */
html.one-force-fullscreen-root.one-viewport-keyboard body.show-phone-shell .chat-app-page.show,
html.one-force-fullscreen-root.one-editing body.show-phone-shell .chat-app-page.show,
html.one-force-fullscreen-root.one-chat-app-visible body.show-phone-shell .chat-app-page.show {
    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);
    min-height: 0;
    max-height: var(--one-shell-base-height, 912px);
    transform: translate(-50%, -50%) scale(var(--one-shell-scale, 1));
    transform-origin: center center;
}


/* v327 · 键盘/输出事务根因修复：运行时锁外层文档滚动，聊天输出事务显式持有聊天 surface。 */
html.one-force-fullscreen-root.one-layout-scroll-locked.one-viewport-keyboard body.show-phone-shell .chat-app-page.show,
html.one-force-fullscreen-root.one-layout-scroll-locked.one-editing body.show-phone-shell .chat-app-page.show,
html.one-force-fullscreen-root body.show-phone-shell.one-chat-output-rendering .chat-app-page.show {
    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);
    min-height: 0;
    max-height: var(--one-shell-base-height, 912px);
    transform: translate(-50%, -50%) scale(var(--one-shell-scale, 1));
    transform-origin: center center;
    opacity: 1;
    pointer-events: auto;
}

/* v328 · chat polish: frosted top controls, compact send capsule, anonymous surface, quickbar typography, live heart rate */
.chat-thread-view .chat-glass-btn,
.chat-thread-view .chat-thread-actions .chat-glass-btn,
.chat-thread-view .chat-thread-back {
    background: rgba(255, 255, 255, 0.58);
    color: rgba(31, 36, 42, 0.88);
    box-shadow: 0 12px 28px rgba(52, 57, 65, 0.10), inset 0 1px 0 rgba(255,255,255,0.74);
    -webkit-backdrop-filter: blur(18px) saturate(1.26);
    backdrop-filter: blur(18px) saturate(1.26);
}
.chat-thread-view .chat-glass-btn:active,
.chat-thread-view .chat-thread-actions .chat-glass-btn:active,
.chat-thread-view .chat-thread-back:active {
    background: rgba(255, 255, 255, 0.72);
}
.chat-thread-view .chat-thread-composer:not(.chat-offline-composer) {
    grid-template-columns: 48px minmax(0, 1fr) 91px;
    gap: 9px;
}
.chat-thread-view .chat-thread-composer:not(.chat-offline-composer) > .chat-thread-sendbar {
    width: 91px;
    grid-template-columns: 45px 46px;
}
.chat-thread-view .chat-thread-composer:not(.chat-offline-composer) > .chat-thread-sendbar .chat-thread-emoji {
    width: 45px;
}
.chat-thread-view .chat-thread-composer:not(.chat-offline-composer) > .chat-thread-sendbar .chat-thread-send {
    width: 46px;
}
.chat-thread-view .chat-thread-composer:not(.chat-offline-composer) > .chat-thread-sendbar .chat-thread-send.footer-btn-side {
    width: 34px;
    height: 34px;
}
.chat-quickbar {
    border: 0;
    background: rgba(248, 249, 251, 0.86);
    box-shadow: 0 12px 28px rgba(40, 44, 52, 0.11), inset 0 1px 0 rgba(255,255,255,0.72);
    -webkit-backdrop-filter: blur(16px) saturate(1.18);
    backdrop-filter: blur(16px) saturate(1.18);
}
.chat-quickbar-page button span {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.035em;
}
.chat-quickbar-page button em {
    font-size: 7.8px;
    font-weight: 400;
    letter-spacing: 0.09em;
}
.chat-quickbar-nav {
    font-weight: 300;
}
.chat-anonymous-view {
    --anon-ink: rgba(248, 245, 239, 0.95);
    --anon-muted: rgba(248, 245, 239, 0.50);
    --anon-line: rgba(248, 245, 239, 0.11);
    --anon-line-soft: rgba(248, 245, 239, 0.065);
    background:
        radial-gradient(circle at 16% 7%, rgba(130, 118, 126, 0.20), transparent 34%),
        radial-gradient(circle at 86% 82%, rgba(94, 72, 84, 0.19), transparent 42%),
        linear-gradient(155deg, #050506 0%, #101015 46%, #070708 100%);
}
.chat-anonymous-bg {
    background-size: 64px 64px, 64px 64px, 18px 18px;
    opacity: 0.32;
}
.chat-anonymous-topbar {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    gap: 12px;
    padding: max(16px, calc(env(safe-area-inset-top) + 10px)) 18px 14px;
    background: linear-gradient(180deg, rgba(5,5,6,0.82), rgba(5,5,6,0.38) 74%, transparent);
    -webkit-backdrop-filter: blur(14px) saturate(1.12);
    backdrop-filter: blur(14px) saturate(1.12);
}
.chat-anonymous-back,
.chat-anonymous-send,
.chat-anonymous-avatar {
    border: 0;
    background: rgba(255,255,255,0.07);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), 0 10px 24px rgba(0,0,0,0.12);
}
.chat-anonymous-back,
.chat-anonymous-avatar {
    width: 38px;
    height: 38px;
}
.chat-anonymous-headcopy h1 {
    font-size: 22px;
    letter-spacing: -0.03em;
}
.chat-anonymous-identity {
    left: 18px;
    right: 18px;
    top: max(92px, calc(env(safe-area-inset-top) + 86px));
    gap: 10px;
}
.chat-anonymous-mode-tabs {
    gap: 4px;
    padding: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,0.055);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.chat-anonymous-mode-tabs button {
    min-height: 38px;
    border-right: 0;
    border-radius: 999px;
}
.chat-anonymous-mode-tabs button span {
    font-size: 12.5px;
    font-weight: 400;
}
.chat-anonymous-mode-tabs button.active {
    background: rgba(248,245,239,0.13);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.10);
}
.chat-anonymous-alias-field input {
    height: 36px;
    border-bottom-color: rgba(248,245,239,0.14);
    font-size: 12.5px;
}
.chat-anonymous-messages {
    top: max(174px, calc(env(safe-area-inset-top) + 168px));
    bottom: max(78px, calc(env(safe-area-inset-bottom) + 70px));
    padding: 8px 18px 20px;
    gap: 10px;
}
.chat-anonymous-row {
    gap: 7px;
}
.chat-anonymous-mini-avatar {
    width: 24px;
    height: 24px;
    border: 0;
    background: rgba(255,255,255,0.055);
}
.chat-anonymous-stack {
    max-width: min(66vw, 276px);
    gap: 4px;
}
.chat-anonymous-bubble {
    padding: 8px 10px;
    border: 0;
    border-radius: 15px;
    background: rgba(255,255,255,0.060);
    font-size: 12.5px;
    line-height: 1.52;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.055);
}
.chat-anonymous-row.is-me .chat-anonymous-bubble {
    background: rgba(248,245,239,0.88);
    color: #101014;
}
.chat-anonymous-composer {
    left: 16px;
    right: 16px;
    bottom: max(12px, calc(env(safe-area-inset-bottom) + 10px));
    grid-template-columns: minmax(0, 1fr) 40px;
    gap: 8px;
    padding: 8px 0 0;
    border-top: 0;
    background: linear-gradient(180deg, transparent, rgba(5,5,6,0.76) 28%, rgba(5,5,6,0.94));
}
.chat-anonymous-input {
    min-height: 40px;
    padding: 10px 2px 9px;
    font-size: 13.5px;
    border-bottom-color: rgba(248,245,239,0.15);
}
.chat-anonymous-send {
    width: 40px;
    height: 40px;
}
.chat-heart-panel-mount .bpm-display {
    transform: scale(var(--live-heart-scale, 1));
    transform-origin: right bottom;
    transition: transform 260ms ease;
}
.chat-heart-panel-mount .bpm-val {
    transition: opacity 180ms ease;
}

/* v329 page title normalization: non-centered, non-phone pages use 30px titles and one English subtitle only. */
.chat-title-news,
.chat-assets-title,
.chat-bankcard-title,
.chat-stock-title,
.chat-sticker-title,
.chat-mask-preset-title,
.chat-ta-subpage-title strong,
.chat-setting-title strong,
.chat-ta-form-title-copy h1,
.chat-style-native-view .chat-style-title-copy h1,
.chat-anonymous-headcopy h1 {
    font-size: 30px;
    line-height: 1.04;
}
.chat-ta-form-title-copy p,
.chat-style-native-view .chat-style-title-copy p,
.chat-mask-preset-subtitle {
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

/* v359 · settings clarity pass: keep the page sparse, remove decorative arrows/ornaments, and give forms more air. */
.settings-app-page {
    background: #FCFBF7;
    background-image: none;
}
.settings-app-page::before,
.settings-app-page::after,
.settings-app-page.is-detail::after,
.settings-deco-layer,
.settings-archive-motion {
    content: none;
    display: none;
}
.settings-app-head {
    padding: max(44px, calc(env(safe-area-inset-top) + 26px)) 28px 0;
}
.settings-head-top {
    margin-bottom: 14px;
}
.settings-title-row {
    gap: 20px;
}
.settings-content {
    padding: 20px 28px max(96px, calc(env(safe-area-inset-bottom) + 80px));
}
.settings-app-page.is-detail .settings-content {
    padding-top: max(42px, calc(env(safe-area-inset-top) + 24px));
}
.settings-search-wrap {
    margin: 4px 0 26px;
}
.settings-search-wrap::after,
.settings-online-dot,
.settings-scan-rule,
.settings-search-state {
    content: none;
    display: none;
}
.settings-search-line {
    min-height: 46px;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0 2px;
    border-top: 1px solid rgba(74,78,89,0.12);
    border-bottom: 1px solid rgba(150,158,168,0.16);
}
.settings-search-label {
    justify-self: start;
    color: rgba(52,57,65,0.46);
    letter-spacing: 0.16em;
}
.settings-search-label svg {
    width: 13px;
    height: 13px;
    opacity: 0.72;
}
.settings-search-input {
    color: rgba(52,57,65,0.80);
    opacity: 1;
    padding: 0 0 0 32px;
}
.settings-section-label {
    margin: 0 0 16px;
}
.settings-entry-list {
    border-top-color: rgba(74,78,89,0.16);
}
.settings-entry {
    min-height: 84px;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 18px;
    padding: 20px 0 21px;
    border-bottom-color: rgba(150,158,168,0.18);
    overflow: visible;
}
.settings-entry::after,
.settings-entry-arrow {
    content: none;
    display: none;
}
.settings-entry-title {
    margin-bottom: 8px;
}
.settings-logout-zone {
    padding: 6px 0 22px;
}
.settings-detail-panel {
    padding-top: 0;
}
.settings-subpage-head {
    padding-bottom: 34px;
    margin-bottom: 36px;
    border-bottom-color: rgba(150,158,168,0.16);
}
.settings-subpage-title {
    margin-top: 18px;
}
.settings-form-stack {
    gap: 34px;
}
.settings-form-stack > .settings-field,
.settings-form-stack > .settings-switch-line,
.settings-form-stack > .settings-storage-card,
.settings-form-stack > .settings-github-box {
    padding-left: 0;
}
.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: none;
    display: none;
}
.settings-field {
    padding-top: 0;
    padding-bottom: 26px;
    border-bottom-color: rgba(150,158,168,0.16);
}
.settings-field-label {
    margin-bottom: 16px;
}
.settings-inline-row,
.settings-preset-row,
.settings-action-row,
.settings-two-col {
    gap: 14px;
}
.settings-switch-line {
    min-height: 64px;
    padding: 8px 0;
    border-top-color: rgba(150,158,168,0.16);
    border-bottom-color: rgba(150,158,168,0.16);
}
.settings-storage-card,
.settings-github-box {
    padding-bottom: 30px;
    border-bottom-color: rgba(150,158,168,0.16);
}
.settings-form-stack:is([data-panel="appearance-catalog"], [data-panel^="appearance-"]) {
    gap: 0;
}
.settings-form-stack:is([data-panel="appearance-catalog"], [data-panel^="appearance-"]) > :where(.settings-field, .settings-switch-line, .settings-live-note) {
    padding: 30px 0 32px;
    border-top-color: rgba(117,124,135,0.14);
}
.settings-form-stack:is([data-panel="appearance-catalog"], [data-panel^="appearance-"]) > :where(.settings-field, .settings-switch-line, .settings-live-note)::before,
.settings-appearance-category::before,
.settings-appearance-category-num,
.settings-appearance-category-arrow {
    content: none;
    display: none;
}
.settings-appearance-category-list {
    gap: 0;
}
.settings-appearance-category {
    grid-template-columns: minmax(0, 1fr);
    padding: 30px 0 32px;
    border-top-color: rgba(117,124,135,0.14);
}
.settings-appearance-category-copy {
    padding-right: 0;
    gap: 7px;
}
.settings-appearance-category-copy strong {
    font-size: 16px;
    line-height: 1.24;
}
.settings-appearance-category-copy em {
    font-size: 10px;
}
.settings-appearance-category-copy small {
    max-width: 30em;
    line-height: 1.82;
}
.settings-appearance-back.settings-thin-button,
.settings-appearance-back {
    width: max-content;
    margin: 0 0 26px;
    padding: 0 0 8px;
    border: 0;
    border-bottom: 1px solid rgba(52,57,65,0.20);
    background: transparent;
    box-shadow: none;
}
.settings-form-stack[data-panel="appearance-icons"] .settings-app-editor-list {
    margin-top: 24px;
}
.settings-app-editor-row {
    padding: 18px 0;
    border-bottom-color: rgba(150,158,168,0.16);
}

.settings-search-label {
    width: 20px;
    gap: 0;
    font-size: 0;
    letter-spacing: 0;
}
.settings-search-label svg {
    display: block;
}



/* v360 · settings/appearance cleanup and current-desktop connection */
.settings-field-input::placeholder,
.settings-field-textarea::placeholder,
.settings-search-input::placeholder,
.settings-app-editor-main .settings-field-input::placeholder,
.settings-app-page input::placeholder,
.settings-app-page textarea::placeholder {
    font-weight: 400;
    letter-spacing: 0.02em;
}
.settings-search-wrap {
    margin: 6px 0 28px;
}
.settings-search-wrap::after {
    content: '';
    display: block;
    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);
    pointer-events: none;
}
.settings-search-line {
    min-height: 44px;
    grid-template-columns: 8px auto minmax(36px, 1fr) auto;
    gap: 9px;
    padding: 0;
    border-top: 1px solid rgba(74,78,89,0.20);
    border-bottom: 1px solid rgba(150,158,168,0.22);
}
.settings-online-dot {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--settings-green, #7CA58E);
    box-shadow: 0 0 0 4px rgba(124,165,142,0.10);
}
.settings-scan-rule {
    display: block;
    height: 1px;
    min-width: 48px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, rgba(150,150,150,0.48), rgba(181,199,211,0.52));
}
.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);
    animation: settings-scan 2.8s ease-in-out infinite;
}
.settings-search-state {
    display: inline;
    font-size: 9px;
    line-height: 1;
    letter-spacing: 0.18em;
    color: rgba(52,57,65,0.42);
    font-family: "Courier New", Courier, monospace;
    white-space: nowrap;
}
.settings-search-label {
    display: inline-flex;
    justify-self: end;
    width: auto;
    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 {
    display: block;
    width: 14px;
    height: 14px;
    opacity: 1;
}
.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;
    padding: 0;
}
.settings-detail-label:empty {
    display: none;
}
.settings-detail-panel.is-appearance-subdetail .settings-subpage-head {
    padding-bottom: 22px;
    margin-bottom: 30px;
}
.settings-appearance-title-back {
    display: inline-flex;
    align-items: center;
    width: max-content;
    margin-top: 12px;
    padding: 0 0 5px;
    border: 0;
    border-bottom: 1px solid rgba(52,57,65,0.22);
    background: transparent;
    color: rgba(52,57,65,0.58);
    font-size: 11px;
    line-height: 1.2;
    letter-spacing: 0.12em;
    font-family: "Courier New", Courier, monospace;
    box-shadow: none;
}
.settings-appearance-title-back[hidden] {
    display: none;
}
.settings-appearance-category {
    grid-template-columns: minmax(0, 1fr);
}
.settings-appearance-category::before,
.settings-appearance-category-num,
.settings-appearance-category-arrow {
    content: none;
    display: none;
}
.settings-appearance-category-copy strong {
    font-weight: 400;
}
.settings-switch-text strong,
.settings-font-preview strong,
.settings-auth-code-output strong,
.settings-auth-account-head strong,
.settings-app-editor-main .settings-field-input {
    font-weight: 400;
}
.settings-global-css-preset-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
}
.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;
    box-shadow: none;
    color: rgba(52,57,65,0.60);
    font-size: 12px;
    line-height: 1.2;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-decoration: none;
}
.settings-logout-btn:active {
    transform: translateY(1px);
    background: transparent;
    color: rgba(52,57,65,0.86);
}
.one-desktop-tuned .one-app-item > span:not([style]),
.one-desktop-tuned [data-one-app-label],
.one-desktop-tuned .app-label {
    font-weight: var(--one-app-label-weight, 400);
}

/* v362 · appearance subpage: return below title, no underline; merged icon style with app icon editor */
.settings-detail-panel.is-appearance-subdetail .settings-subpage-head {
    padding-bottom: 24px;
    margin-bottom: 26px;
}
.settings-appearance-title-back {
    display: flex;
    align-items: center;
    width: max-content;
    margin-top: 14px;
    padding: 0;
    border: 0;
    border-bottom: 0;
    background: transparent;
    box-shadow: none;
    color: rgba(52,57,65,0.50);
    font-size: 11px;
    line-height: 1.25;
    font-weight: 400;
    letter-spacing: 0.10em;
    text-decoration: none;
}
.settings-appearance-title-back[hidden] {
    display: none;
}
.settings-form-stack[data-panel="appearance-app-icons"] .settings-icon-style-field {
    padding-top: 0;
}
.settings-form-stack[data-panel="appearance-app-icons"] .settings-app-icons-field {
    padding-top: 34px;
}
.settings-app-editor-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 22px;
}
.settings-app-editor-row {
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
}
.settings-app-editor-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--one-app-icon-radius, 17px);
    border: var(--one-app-icon-border, 1px solid rgba(255,255,255,0.54));
    background: var(--one-app-icon-bg, rgba(255,255,255,0.30));
    box-shadow: var(--one-app-icon-shadow, 0 6px 16px rgba(52,57,65,0.035));
    backdrop-filter: var(--one-app-icon-backdrop, blur(10px) saturate(1.08));
    -webkit-backdrop-filter: var(--one-app-icon-backdrop, blur(10px) saturate(1.08));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.settings-app-editor-icon svg {
    width: 21px;
    height: 21px;
    color: var(--one-app-logo-color, #111111);
}
.settings-app-editor-icon .icon-logo-frame {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.settings-app-editor-icon .app-custom-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.settings-app-editor-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}
.settings-app-editor-actions .settings-thin-button {
    width: auto;
    min-width: 42px;
    padding-left: 12px;
    padding-right: 12px;
}


/* v369 · settings logout belongs at the bottom center of directory */
.settings-logout-zone {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 28px 0 0;
    margin-top: 10px;
}
.settings-logout-btn {
    width: max-content;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: rgba(52,57,65,0.46);
    font-size: 12px;
    line-height: 1.2;
    font-weight: 400;
    letter-spacing: 0.10em;
    text-decoration: none;
}
.settings-logout-btn:active {
    transform: translateY(1px);
    background: transparent;
    color: rgba(52,57,65,0.76);
}
