/* Account settings use one surface for links, switches and selects. Keep this
   component independent from the older generic dialog-button card styling. */
dialog.account-settings-pane{box-sizing:border-box;width:min(560px,100vw);max-width:100vw;max-height:92dvh;padding:0;border:0;border-radius:14px;background:var(--canvas,#f2f3f7);color:var(--ink,#152333);overflow:auto;overscroll-behavior:contain}
.account-settings-pane::backdrop{background:#0006}
dialog.account-settings-pane>header{position:sticky;top:0;z-index:1;display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;gap:0;height:auto;min-height:72px;padding:12px 16px;background:var(--surface,#fff);border-bottom:1px solid var(--edge,#e4e6ea)}
dialog.account-settings-pane>header h2{margin:0;padding:0;text-align:center;font-size:19px;line-height:1.4;overflow-wrap:anywhere}
dialog.account-settings-pane>header button{display:grid;place-items:center;box-sizing:border-box;width:44px;min-width:44px;height:44px;min-height:44px;padding:0!important;margin:0;border:0!important;border-radius:10px;background:transparent!important;color:var(--ink,#152333)!important;line-height:1;cursor:pointer}
dialog.account-settings-pane>header button svg{display:block;width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.account-settings-pane h3{margin:0;padding:14px 20px;font-size:13px;font-weight:400;color:var(--quiet,#8b919b)}
dialog.account-settings-pane .settings-row{box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;min-height:60px;margin:0;padding:17px 20px!important;border:0!important;border-bottom:1px solid var(--edge,#e5e8ed)!important;border-radius:0!important;box-shadow:none;background:var(--surface,#fff)!important;color:var(--ink,#152333)!important;text-align:left;font:inherit;line-height:1.5;overflow-wrap:anywhere}
.settings-row>span{min-width:0}
.settings-row input[type=checkbox]{appearance:none;-webkit-appearance:none;position:relative;flex:0 0 46px;width:46px;height:28px;padding:0;margin:0;border:0;border-radius:16px;background:var(--switch-off,#ccd0d5);cursor:pointer}
.settings-row input[type=checkbox]:after{content:'';position:absolute;width:24px;height:24px;top:2px;left:2px;background:#fff;border-radius:50%;box-shadow:0 1px 3px #0002;transition:transform .12s}
.settings-row input:checked{background:var(--accent,#158af2)}
.settings-row input:checked:after{transform:translateX(18px)}
dialog.account-settings-pane :is(button,input,textarea,select):focus-visible{outline:2px solid var(--accent,#3675d7)!important;outline-offset:-3px}
.settings-row select{min-width:0;max-width:65%;background:var(--surface,#fff);color:inherit;border:1px solid var(--edge,#ddd);padding:8px}
.settings-entry{cursor:pointer}
.settings-entry:after{content:'›';flex:0 0 auto;color:var(--quiet,#88919b);font-size:20px;line-height:1}
.account-settings-pane .settings-description,.account-settings-pane .settings-notice{font-size:12px;color:var(--quiet,#88919b);line-height:1.7;padding:10px 20px;margin:0}
.settings-notice:empty{display:none}
dialog.account-settings-pane .settings-row.unavailable{color:var(--quiet,#88919b)!important}
.settings-row small{font-size:12px;color:var(--quiet);white-space:nowrap}
dialog.account-settings-pane .settings-entry.danger{color:var(--settings-danger,#c72f43)!important}
.settings-content>textarea,.settings-content>input{box-sizing:border-box;width:calc(100% - 32px);margin:16px;padding:12px;font:inherit;min-width:0}
.settings-content>textarea{min-height:120px}
.broadcast-choices{max-height:30dvh;overflow:auto}
.broadcast-choices label{display:flex;gap:12px;padding:10px 20px}
.broadcast-choices input{width:20px;height:20px}
dialog.account-settings-pane[aria-label="已读详情"] .settings-content{padding:16px 20px;line-height:1.7;overflow-wrap:anywhere}
:root[data-appearance=night] .account-settings-pane{--settings-danger:#ff91a0;--switch-off:#52647b}
@media(hover:hover){dialog.account-settings-pane .settings-entry:not(:disabled):hover,dialog.account-settings-pane>header button:hover{background:var(--soft,#f5f6fa)!important}}
dialog.account-settings-pane .settings-entry:not(:disabled):active,dialog.account-settings-pane>header button:active{background:var(--soft,#f5f6fa)!important}
@media(max-width:650px){dialog.account-settings-pane{width:100vw!important;max-width:100vw!important;height:100dvh;max-height:var(--mchat-viewport-height,100dvh)!important;border-radius:0;margin:0;padding:0}dialog.account-settings-pane>header{padding-top:max(12px,env(safe-area-inset-top));padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right))}.account-settings-pane .settings-content{padding-bottom:env(safe-area-inset-bottom,0px)}.account-settings-pane .settings-notice{padding-bottom:max(20px,env(safe-area-inset-bottom))}}
.message-read-state{font-size:13px!important;font-weight:700!important;line-height:1;padding:4px!important;border:0!important;background:transparent!important;color:#8e98a4!important;cursor:pointer}
.message-read-state.is-read{color:#168df4!important}
#chatPresence{font-size:10px;line-height:15px;color:var(--quiet)}#chatPresence:empty{display:none}
.message-alert-toast{position:fixed;left:50%;top:20px;transform:translateX(-50%);z-index:1000;max-width:90vw;padding:15px 24px;border:1px solid var(--edge);border-radius:12px;background:var(--surface);color:var(--ink);box-shadow:0 6px 30px #0003}.message-alert-toast[hidden]{display:none!important}
html[data-chat-font=small]{--chat-text-size:14px}html[data-chat-font=normal]{--chat-text-size:16px}html[data-chat-font=large]{--chat-text-size:19px}html[data-chat-font=extra]{--chat-text-size:22px}#realMessages .bubble,#historyResults article>div,#realText{font-size:var(--chat-text-size,16px)!important}
