/* Shared profile controls. Mobile inherits the active Me sheet palette. */
.account-profile-form, .account-profile-photo { display:flex; flex-direction:column; gap:12px; min-width:0; }
.account-profile-form + .account-profile-form { margin-top:24px; padding-top:20px; border-top:1px solid var(--mdr-line, #e2e8f0); }
.account-profile-form h3 { margin:0 0 4px; font-size:15px; font-weight:600; }
.account-profile-form label { display:flex; flex-direction:column; gap:7px; font-size:13px; }
.account-profile-form input { box-sizing:border-box; width:100%; min-height:42px; padding:10px 12px; border:1px solid var(--mdr-line, #cbd5e1); border-radius:10px; background:var(--mdr-bg, var(--surface, #fff)); color:inherit; font:inherit; font-size:16px; }
.account-profile-form input:focus-visible { outline:2px solid var(--mdr-accent, #6366f1); outline-offset:2px; }
.account-profile-save, .account-profile-photo button { width:fit-content; min-height:40px; padding:9px 15px; border:0; border-radius:10px; color:#fff; background:var(--mdr-accent, #6366f1); font:inherit; font-size:14px; cursor:pointer; }
.account-profile-save:disabled, .account-profile-photo button:disabled { opacity:.5; cursor:default; }
.account-profile-status { font-size:13px; line-height:1.5; overflow-wrap:anywhere; }
.account-profile-status:empty { display:none; }
.account-profile-status.is-error { color:var(--mdr-red, #dc2626); }
.account-profile-hint { font-size:12px; line-height:1.5; color:var(--mdr-dim, #64748b); }
.account-profile-account { display:flex; align-items:center; justify-content:space-between; gap:16px; width:100%; min-height:56px; padding:12px 0; border:0; border-bottom:1px solid var(--mdr-line, #e2e8f0); background:transparent; color:inherit; text-align:left; font:inherit; cursor:pointer; }
.account-profile-account strong, .account-profile-account small { display:block; overflow-wrap:anywhere; }
.account-profile-account small { margin-top:4px; opacity:.65; }
.account-profile-account[aria-current] { opacity:.65; cursor:default; }
.account-profile-account + .account-profile-save { margin-top:16px; }
.account-profile-photo { flex-direction:row; flex-wrap:wrap; gap:8px; }
.account-profile-photo .account-profile-status { flex-basis:100%; }
.account-profile-photo [data-photo-remove] { color:inherit; background:transparent; border:1px solid var(--mdr-line, #cbd5e1); }
.acct-avatar img, .sidebar-account-avatar img { display:block; width:100%; height:100%; border-radius:inherit; object-fit:cover; }
.mdr-me-inline { padding:10px 20px 20px 52px; }
.mdr-me-inline[hidden] { display:none; }
.mdr-me-inline .mdr-me-pick-item { min-height:48px; }
.mdr-me-row[aria-expanded="true"] .mdr-me-chev { transform:rotate(90deg); }
.mdr-me-inline .account-profile-form { padding-top:8px; }
body[data-mstyle="stocks"] .acct-switch-veil { position:fixed; inset:0; display:flex; align-items:center; justify-content:center; background:rgba(0,0,0,.32); backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); }
body[data-mstyle="stocks"] .acct-switch-veil[hidden] { display:none; }
body[data-mstyle="stocks"] .acct-switch-card { padding:24px; border-radius:20px; color:var(--mdr-text,#fff); background:var(--mdr-bg,#18181b); }
@media (max-width:400px) { .mdr-me-inline { padding-left:20px; } }

/* ==================== 桌面「我的资料」弹窗 · 模版 2(js/account-profile-desktop.js,2026-10-04) ====================
   样稿 design-explorations/account-profile/template-2.html 的 .ap2-* 原样搬过来,改名 .apd-*,只挂在
   uiModal({ className:'apd' }) 这一张弹窗下;上面手机那几条 .account-profile-* 不受影响。
   定高:ui-modal height 508 = 63 头 + 380 正文 + 65 脚;任何状态、任何语言都一样高、不滚动。 */
.apd { --apd-hint: color-mix(in srgb, var(--ink-secondary) 72%, var(--ink-muted)); --apd-side-w: 208px; --apd-fbtn-w: 120px; }
.apd button { font-family: var(--font-sans); }
.apd button:active { transform: none; }                       /* 弹窗里按下不缩放:点什么都不动 */
.apd.is-locked .ds-modal-close { opacity: .4; pointer-events: none; }
.apd .ds-modal-body.apd-modal-body { flex: 1 1 auto; min-height: 0; padding: 0; overflow: hidden; display: flex; }
.apd-body { flex: 1; min-width: 0; display: flex; }

/* 左栏:身份 + 三项竖向导航 + 底部一行「切换账号在哪」 */
.apd-side { flex: none; width: var(--apd-side-w); background: var(--surface-dim); border-right: 1px solid var(--border); padding: 20px 12px; display: flex; flex-direction: column; min-height: 0; }
.apd-id { flex: none; padding: 0 8px 18px; min-width: 0; }
.apd-id .apd-av { display: flex; }
/* 头像:中性浅灰底 + 细边 + 灰字(不用深色实心圆,不用渐变) */
.apd-av { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--surface-muted); box-shadow: inset 0 0 0 1px var(--border); color: var(--ink-secondary); font-weight: 600; line-height: 1; overflow: hidden; user-select: none; }
.apd-av img { display: block; width: 100%; height: 100%; object-fit: cover; }
.apd-av--48 { width: 48px; height: 48px; font-size: 19px; }
.apd-id-name { margin-top: 10px; font-size: 14px; font-weight: 600; line-height: 20px; height: 20px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.apd-id-sub { font-size: 12px; line-height: 17px; height: 17px; color: var(--apd-hint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.apd-nav { flex: none; display: flex; flex-direction: column; gap: 2px; }
.apd-nav-item { display: flex; align-items: center; gap: 8px; width: 100%; height: 32px; margin: 0; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-secondary); font-size: 13px; font-weight: 500; line-height: 1; text-align: left; cursor: pointer; }
.apd-nav-item:hover { background: color-mix(in srgb, var(--ink) 4%, transparent); color: var(--ink); }
.apd-nav-item.is-on, .apd-nav-item.is-on:hover { background: color-mix(in srgb, var(--ink) 7.5%, transparent); color: var(--ink); }
.apd-nav-item:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.apd-nav-ic { flex: none; display: inline-flex; color: var(--ink-muted); }
.apd-nav-item.is-on .apd-nav-ic { color: var(--brand); }
.apd-nav-lbl { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 18px; }
.apd-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: transparent; }   /* 位置常驻,只换颜色 */
.apd-dot.is-draft { background: var(--ink-muted); }
.apd-dot.is-err { background: var(--danger-accent); }
.apd-nav-item:disabled { cursor: not-allowed; }
.apd-nav-item:disabled:not(.is-on) { opacity: .45; }
.apd-nav-item:disabled:hover:not(.is-on) { background: transparent; color: var(--ink-secondary); }
.apd-side-note { flex: none; margin-top: auto; height: 64px; padding: 12px 8px 0; border-top: 1px solid var(--border); font-size: 12px; line-height: 17px; color: var(--apd-hint); }
.apd-side-note-txt { display: block; max-height: 51px; overflow: hidden; }

/* 右侧内容区:三页同一个固定框 */
.apd-main { position: relative; flex: 1; min-width: 0; }
.apd-pane { position: absolute; inset: 0; padding: 20px 24px; display: flex; flex-direction: column; overflow: hidden; }
.apd-pane[hidden] { display: none; }
/* 视口矮于 578(88vh < 508)时弹窗被压扁:只在这种情况下让面板自己能滚到最后一格;1280×720 不触发 */
@media (max-height: 578px) { .apd-pane { overflow-y: auto; } }
.apd-pane-head { flex: none; margin-bottom: 18px; }
.apd-pane-title { display: flex; align-items: center; height: 20px; margin: 0; font-size: 15px; font-weight: 600; line-height: 20px; color: var(--ink); overflow: hidden; }
.apd-pane-title > span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.apd-pane-sub { margin: 0; height: 18px; font-size: 12.5px; line-height: 18px; color: var(--apd-hint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 字段:标签 18 + 6 + 输入 36 + 4 + 预留提示位(1 行 17 / 2 行 34),提示位高度永远不变 */
.apd-field { flex: none; display: flex; flex-direction: column; min-width: 0; }
.apd-field + .apd-field { margin-top: 12px; }
.apd-label { display: block; margin: 0 0 6px; font-size: 12.5px; font-weight: 600; line-height: 18px; color: var(--ink-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.apd-input { display: block; box-sizing: border-box; width: 100%; height: 36px; margin: 0; padding: 0 12px; font: inherit; font-size: 14px; line-height: normal; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: none; outline: none; transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease; }
.apd-input:hover:not(:disabled):not(:focus):not(.is-error) { border-color: var(--ink-faint); }
.apd-input::placeholder { color: var(--ink-muted); opacity: 1; }
.apd-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); outline: none; }
.apd-input.is-error { border-color: var(--danger-accent); }
.apd-input.is-error:focus { border-color: var(--danger-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger-accent) 16%, transparent); }
.apd-input:disabled { background: var(--surface-dim); color: var(--ink-muted); cursor: not-allowed; }
.apd-msg { flex: none; height: 17px; margin-top: 4px; font-size: 12px; line-height: 17px; color: var(--apd-hint); overflow: hidden; }
.apd-msg.is-2 { height: 34px; }
.apd-msg.is-err { color: var(--danger-text); font-weight: 500; }
.apd-msg.is-ok { color: var(--success-text); font-weight: 500; }

/* 头像这一格:两颗定宽小键(没照片时「移除」置灰不隐藏,悬停说原因;同位同宽,加删头像时不跳) */
.apd-photo-row { display: flex; align-items: center; gap: 8px; height: 28px; }
.apd-pbtn { width: 152px; padding: 0 10px !important; overflow: hidden; white-space: nowrap; }
.apd-pbtn > span { min-width: 0; line-height: 16px; overflow: hidden; text-overflow: ellipsis; }
.apd-pbtn.btn--ghost { color: var(--ink-secondary); }

/* 页脚:左 = 固定的状态位;右 = 两颗定宽键 */
.apd .ds-modal-footer { gap: 10px; }
.apd-foot { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.apd-status { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; height: 20px; font-size: 12.5px; font-weight: 500; line-height: 20px; color: var(--ink-secondary); overflow: hidden; }
.apd-status-ic { flex: none; display: inline-flex; }
.apd-status-ic:empty { display: none; }
.apd-status-txt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.apd-status.is-ok { color: var(--success-text); }
.apd-status.is-err { color: var(--danger-text); }
.apd-status.is-warn, .apd-status.is-ask { color: var(--ink); }
.apd-status.is-warn .apd-status-ic, .apd-status.is-ask .apd-status-ic { color: var(--warning-accent); }
.apd-status.is-busy { color: var(--ink-muted); font-weight: 400; }
.apd-fbtn { flex: none; width: var(--apd-fbtn-w); padding: 0 8px !important; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
