.settings-body{padding:12px 0 24px;background:var(--ref-bg);color:var(--ref-text)}
.settings-avatar-button{display:block;flex-shrink:0;min-width:44px;min-height:44px;padding:0;border:0;border-radius:8px;background:transparent;color:inherit;cursor:pointer}.settings-avatar-button:focus{outline:none}.settings-avatar-button:focus-visible{outline:2px solid var(--ref-accent-ink);outline-offset:3px}
.settings-group{margin:0 0 12px}.settings-group-title{margin:0;padding:10px 18px 7px;font-size:13px;font-weight:500;color:var(--ref-accent-ink)}
.settings-group-rows{background:var(--ref-panel)}
.settings-row{width:100%;min-height:56px;padding:14px 18px;display:flex;align-items:center;gap:13px;text-align:left;background:var(--ref-panel);color:var(--ref-text);border-bottom:1px solid var(--ref-line);line-height:1.4}
.settings-row:last-child{border-bottom:0}.settings-row:hover{background:var(--ref-hover)}.settings-readonly{cursor:default}.settings-readonly:hover{background:var(--ref-panel)}
.settings-row-copy{display:flex;flex:1;min-width:0;flex-direction:column;gap:4px}.settings-row-copy strong{font-weight:400;font-size:16px;overflow:hidden;text-overflow:ellipsis}.settings-row-copy small{font-size:12px;color:var(--ref-secondary);line-height:1.5}
.settings-value{font-size:14px;color:var(--ref-secondary);max-width:49%;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.settings-chevron{color:var(--ref-secondary);font-size:23px;line-height:1;flex-shrink:0}
.settings-icon{display:flex;align-items:center;justify-content:center;width:28px;height:28px;flex-shrink:0;color:var(--ref-accent-ink)}.settings-icon svg{width:23px;height:23px}
.settings-danger{color:var(--ref-danger)}.settings-danger .settings-icon,.settings-danger .settings-value{color:inherit}
.settings-control{border-bottom:1px solid var(--ref-line)}.settings-control:last-child{border:0}.settings-control .settings-row{border:0}.settings-switch-track{width:50px;height:30px;flex-shrink:0;border-radius:20px;background:var(--ref-line);padding:2px;transition:background .15s}.settings-switch-thumb{display:block;width:26px;height:26px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0003;transition:transform .15s}.settings-switch[aria-checked=true] .settings-switch-track{background:var(--ref-action)}.settings-switch[aria-checked=true] .settings-switch-thumb{transform:translateX(20px)}
.settings-switch[data-saving=true]{cursor:progress}.settings-switch[data-saving=true] .settings-switch-track{opacity:.65}
.settings-error{color:var(--ref-danger);font-size:13px;line-height:1.5;padding:0 18px 12px;white-space:pre-wrap}.settings-error:empty{display:none}
.settings-load-error{margin:0 12px 12px;padding:10px;background:var(--ref-panel);border:1px solid var(--ref-danger);border-radius:8px}.settings-load-error .ref-info{padding:2px 5px}.settings-retry{min-height:44px;padding:8px;color:var(--ref-accent-ink);background:none;font-size:14px}
.settings-header-done{background:var(--ref-action);color:var(--ref-on-action);padding:8px 14px;border-radius:5px;min-height:36px;font-size:14px;flex-shrink:0}
.settings-profile{padding:26px 20px;display:flex;gap:15px;align-items:center;background:var(--ref-panel);margin-bottom:12px}.settings-profile .settings-profile-avatar{width:64px;height:64px;font-size:27px}.settings-profile-copy{flex:1;min-width:0}.settings-profile-copy h2{font-size:22px;font-weight:600;line-height:1.4;overflow-wrap:anywhere}.settings-profile-copy p{font-size:13px;color:var(--ref-secondary);margin-top:7px}.settings-profile .ref-icon{flex-shrink:0}.settings-profile.is-centered{flex-direction:column;text-align:center;padding:28px 20px}.settings-profile.is-centered .settings-profile-avatar{width:88px;height:88px;font-size:36px}.settings-profile.is-centered .settings-profile-copy p{font-size:14px}
.settings-theme-radio{width:100%;min-height:60px;display:flex;align-items:center;justify-content:space-between;padding:16px 20px;background:var(--ref-panel);color:var(--ref-text);font-size:16px;border-bottom:1px solid var(--ref-line)}.settings-radio-mark{min-width:28px;text-align:center;font-weight:600;font-size:22px;color:var(--ref-accent-ink)}
.settings-font-card{padding:18px;background:var(--ref-panel)}.settings-font-preview{padding:18px;border-radius:12px;line-height:1.6;background:var(--ref-chat-bg);font-size:16px}.settings-font-preview>p{font-size:13px;color:var(--ref-secondary);margin-bottom:12px}.settings-preview-bubble{padding:10px 13px;background:var(--ref-incoming);border-radius:11px;max-width:86%;color:var(--ref-text);white-space:pre-wrap;line-height:1.6}.settings-preview-bubble.own{background:var(--ref-outgoing);color:var(--ref-outgoing-text);align-self:flex-end;margin-left:auto}
.settings-slider-label{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:18px;margin-top:25px;font-size:15px}.settings-slider-label output{font-weight:600;font-size:18px;color:var(--ref-accent-ink)}.settings-slider-label input[type=range]{width:100%;height:44px;padding:0;background:transparent!important;accent-color:var(--ref-action)}
.settings-wallpapers{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:18px}.settings-wallpaper-card{display:flex;flex-direction:column;gap:12px;padding:10px;background:var(--ref-panel);border:2px solid transparent;border-radius:12px;color:var(--ref-text);font-size:14px}.settings-wallpaper-card[aria-pressed=true]{border-color:var(--ref-accent-ink)}.settings-wallpaper-sample{display:flex;flex-direction:column;gap:12px;width:100%;min-height:170px;padding:16px 8px;border-radius:6px;background:var(--ref-chat-bg);background-image:radial-gradient(var(--ref-line) 1px,transparent 1px);background-size:12px 12px}.settings-wallpaper-sample.plain{background:var(--ref-plain-bg,var(--ref-field));background-image:none}.settings-wallpaper-sample span{padding:7px 8px;border-radius:6px;background:var(--ref-incoming);font-size:11px;color:var(--ref-text);align-self:flex-start}.settings-wallpaper-sample span+span{background:var(--ref-outgoing);color:var(--ref-outgoing-text);align-self:flex-end}
.settings-about-brand{display:flex;flex-direction:column;align-items:center;gap:18px;padding:32px 18px}.settings-about-brand h2{font-weight:500;font-size:22px}.settings-about-symbol{display:flex;align-items:center;justify-content:center;width:72px;height:72px;border-radius:18px;background:var(--ref-action);color:var(--ref-on-action);font-size:38px}.settings-layout-label{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:15px 18px;font-size:15px}.settings-layout-label select{width:155px;padding:12px;border:1px solid var(--ref-line);border-radius:8px}
:root[data-client-variant=wechat] .settings-group-title{color:var(--ref-secondary)}
:root[data-client-variant=wechat] .wechat-me-card{padding:26px 24px 34px;margin-top:0;margin-bottom:12px}.wechat-me-card .settings-profile-avatar{width:64px;height:64px;border-radius:9px}.wechat-me-card .settings-profile-copy h2{font-size:23px}
:root[data-client-variant=wechat][data-settings-page=wx-me] .ref-page-head{height:36px;min-height:36px;background:var(--ref-panel)}
:root[data-client-variant=wechat][data-settings-page=wx-me] .ref-page-head h1{visibility:hidden}
:root[data-client-variant=wechat][data-settings-page^=wx-]:not([data-settings-page=wx-me]) .ref-tabs{display:none}
:root[data-client-variant=wechat][data-settings-page^=wx-]:not([data-settings-page=wx-me]) .ref-screen{bottom:0}
:root[data-client-variant=wechat] .ref-page-head:has(.settings-back) h1{text-align:center;padding-right:44px;font-size:17px;font-weight:500}
:root[data-client-variant=wechat] .ref-page-head:has(.settings-header-done) h1{padding-right:0}
:root[data-client-variant=wechat] .settings-row-copy small{font-size:13px}
:root[data-client-variant=telegram] .settings-body{padding:12px 12px 24px}
:root[data-client-variant=telegram] .settings-group{margin:0 0 16px}.settings-group-rows{overflow:hidden}
:root[data-client-variant=telegram] .settings-group-rows{border-radius:13px}
:root[data-client-variant=telegram] .settings-row{padding:13px 16px;min-height:60px}
:root[data-client-variant=telegram] .settings-row-copy strong{font-weight:500;font-size:16px}
:root[data-client-variant=telegram] .settings-row-copy small{font-size:12px;line-height:1.45}
:root[data-client-variant=telegram] .settings-icon{width:35px;height:35px;border-radius:10px;color:#fff;background:#4a93d8}.settings-icon.tone-orange{background:linear-gradient(#f5a244,#d67525)}.settings-icon.tone-green{background:linear-gradient(#65bb73,#369747)}.settings-icon.tone-red{background:linear-gradient(#ee6d71,#d8434a)}.settings-icon.tone-cyan{background:linear-gradient(#56b8d5,#2c97b9)}.settings-icon.tone-blue{background:linear-gradient(#55a4eb,#337fc4)}
:root[data-client-variant=telegram] .settings-profile{margin:0 0 16px;border-radius:15px;padding:22px 18px}.settings-profile .ref-icon{color:var(--ref-accent-ink)}
:root[data-client-variant=telegram] .settings-profile .settings-profile-avatar{border-radius:50%}
:root[data-client-variant=telegram] .settings-switch-track{height:24px;width:42px;padding:2px}.settings-switch-thumb{will-change:transform}
:root[data-client-variant=telegram] .settings-switch-thumb{height:20px;width:20px}
:root[data-client-variant=telegram] .settings-switch[aria-checked=true] .settings-switch-thumb{transform:translateX(18px)}
.telegram-theme-preview{display:flex;flex-direction:column;gap:12px;background:var(--ref-chat-bg);border-radius:14px;padding:20px 14px;margin-bottom:16px;font-size:14px}
.telegram-theme-cards{display:grid;grid-template-columns:1fr 1fr;gap:15px;padding:16px}.telegram-theme-card{display:flex;flex-direction:column;gap:10px;border-radius:10px;background:none;color:var(--ref-text);padding:4px;border:2px solid transparent;font-size:14px}.telegram-theme-card[aria-pressed=true]{border-color:var(--ref-accent-ink)}.theme-card-art{height:105px;width:100%;border-radius:6px;padding:16px 12px;display:flex;flex-direction:column;gap:12px;background:#dce7df}.theme-card-art.dark{background:#0e1621}.theme-card-art i{display:block;width:72%;height:20px;border-radius:6px;background:#fff}.theme-card-art i+i{align-self:flex-end;background:#d8f5c5}.theme-card-art.dark i{background:#223346}.theme-card-art.dark i+i{background:#2b5278}
:root[data-client-variant=telegram][data-settings-page^=tg-]:not([data-settings-page=tg-settings]):not([data-settings-page=tg-profile]) .ref-tabs{display:none}
:root[data-client-variant=telegram][data-settings-page^=tg-]:not([data-settings-page=tg-settings]):not([data-settings-page=tg-profile]) .ref-screen{bottom:0}
:root[data-client-variant=telegram] .settings-group-title{padding:4px 6px 9px;font-size:14px;font-weight:500}
:root[data-client-variant=telegram] .ref-page-head:has(.settings-back) h1{font-size:20px;font-weight:500}
:root[data-client-variant]{--ref-plain-bg:#f8f8f8}:root[data-client-variant=telegram]{--ref-plain-bg:#eef3f7}:root[data-client-variant=wechat][data-theme=dark]{--ref-plain-bg:#1c1c1c}:root[data-client-variant=telegram][data-theme=dark]{--ref-plain-bg:#18232f}
:root[data-client-variant][data-wallpaper=plain] .message-view{background:var(--ref-plain-bg);background-image:none}
@media(max-height:400px){.settings-body{padding-top:5px}.settings-row{min-height:48px;padding-block:10px}.settings-profile{padding-block:14px}.settings-wallpaper-sample{min-height:90px}}

.settings-permission-actions{display:flex;flex-wrap:wrap;gap:10px;padding:14px 16px}
.settings-permission-actions .settings-retry{margin:0;min-height:44px;padding:10px 14px;background:var(--ref-panel);color:var(--ref-accent-ink);border:1px solid var(--ref-line);border-radius:6px}
.settings-permission-actions .settings-retry:disabled{opacity:.5}

/* Image backgrounds never contain data URLs or remote URLs; the runtime owns one Blob URL. */
:root[data-client-variant][data-wallpaper=image] .message-view{background-image:var(--ref-wallpaper-image);background-size:cover;background-position:center;background-repeat:no-repeat}
.settings-wallpaper-image small{color:var(--ref-secondary)}.settings-wallpaper-sample.image{align-items:center;justify-content:center;background:var(--ref-field);background-image:none}.settings-wallpaper-sample.image>svg{width:48px;height:48px;color:var(--ref-accent-ink)}
.settings-contact-code .ref-sheet-body{display:flex;flex-direction:column;align-items:center;gap:12px;padding:20px}.settings-contact-code svg[role=img]{display:block;width:min(260px,100%);height:auto;aspect-ratio:1;background:#fff}.settings-contact-code h3{font-size:20px}.settings-contact-link{width:100%;padding:10px;border:0;background:var(--ref-field);color:var(--ref-text);font-size:12px}
.settings-device-row{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:16px;background:var(--ref-panel);color:var(--ref-text)}.settings-device-row select{flex:1;min-width:160px;max-width:100%;padding:10px;border:0;background:var(--ref-field);color:var(--ref-text)}.settings-device-row small{width:100%;color:var(--ref-secondary)}.settings-camera-preview{display:block;width:calc(100% - 32px);max-height:300px;margin:16px;object-fit:contain;background:#111;border-radius:6px}.settings-mic-meter{width:calc(100% - 32px);height:20px;margin:16px;accent-color:var(--ref-action)}
