/*
 * 方案 D「Talky Glass · 液态玻璃」外壳样式（web-shell）：登录 / 注册、整体布局与导航、会话列表、联系人、群组、
 * 群资料 / 群管理、我的 / 设置 / 外观 / 隐私，以及通用弹窗、底部弹层、按钮、输入框、开关、提示条。
 * 只用 play-tokens.css 的 --pf-* 变量（深色、8 种强调色、降低透明度自动跟随）。
 * 选择器统一以 html[data-theme] 开头：与 theme-dark.css / appearance.css 的 html[data-theme="dark"] .x 同级，排在后面所以生效。
 * 设计稿：TalkyMobile/docs/ui-redesign/v2/parts/set-d.html（.scr-d）。
 *
 * 玻璃件两种：
 *  - 悬浮控件（顶部玻璃按钮、底栏、搜索圆钮、语言胶囊、弹出菜单）用实时模糊 blur(20px)；
 *  - 大面积卡片 / 列表 / 设置格用 --pf-glass2 静态玻璃（不模糊），手机浏览器滚动不卡。
 * 高光描边、顶部光泽都是 ::before / ::after 伪元素，一律 pointer-events: none，不挡点击。
 */

/* ───────────── 令牌补充 ───────────── */
:root {
  --pfs-pri-t: var(--pf-on-pri-c);
  --pfs-fade: rgba(243,245,250,.94);
  --pfs-fade2: rgba(243,245,250,.985);
  --pfs-sw-off: rgba(120,128,150,.26);
  --pfs-knob: #FFFFFF;
  --pfs-av-brand: #FFFFFF;
  --pfs-hl: color-mix(in srgb, var(--pf-pri) 14%, transparent);
  --pfs-pri-line: color-mix(in srgb, var(--pf-pri) 38%, transparent);
  --pfs-candy: linear-gradient(160deg, color-mix(in srgb, var(--pf-pri) 70%, #fff) 0%, var(--pf-pri) 60%, color-mix(in srgb, var(--pf-pri) 78%, #5A4BFF));
  --pfs-candy-sh: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -1px 0 rgba(0,0,0,.08), 0 3px 8px -3px color-mix(in srgb, var(--pf-pri) 70%, transparent);
  --pfs-cta-sh: inset 0 1px 0 rgba(255,255,255,.45), inset 0 -2px 6px rgba(40,20,160,.25), 0 14px 28px -12px color-mix(in srgb, var(--pf-out-m) 75%, transparent);
  --pfs-head: calc(max(10px, env(safe-area-inset-top)) + 42px + 50px);
  --pfs-nav-bottom: max(18px, env(safe-area-inset-bottom));
  --pfs-nav-space: calc(62px + var(--pfs-nav-bottom) + 18px);
  --pfs-blobs: radial-gradient(230px 200px at -4% 6%, var(--pf-blob-a), transparent 72%),
    radial-gradient(250px 230px at 108% 22%, var(--pf-blob-b), transparent 72%),
    radial-gradient(260px 220px at 10% 104%, var(--pf-blob-c), transparent 72%),
    radial-gradient(220px 200px at 104% 96%, var(--pf-blob-a), transparent 72%);
  --pfs-blobs-hero: radial-gradient(300px 260px at 0% 10%, var(--pf-blob-a), transparent 72%),
    radial-gradient(300px 280px at 104% 30%, var(--pf-blob-b), transparent 72%),
    radial-gradient(320px 260px at 30% 100%, var(--pf-blob-c), transparent 74%);
}
html[data-theme="dark"] {
  --pfs-fade: rgba(0,0,0,.88);
  --pfs-fade2: rgba(0,0,0,.97);
  --pfs-sw-off: rgba(120,128,150,.34);
  --pfs-knob: #F5F6FA;
  --pfs-av-brand: #1C1E28;
  --pfs-hl: color-mix(in srgb, var(--pf-pri) 22%, transparent);
  --pfs-pri-line: color-mix(in srgb, var(--pf-pri) 50%, transparent);
}

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* ───────────── 玻璃材质 ───────────── */
/* 悬浮控件：半透明 + 背景模糊 + 顶部内高光 + 投影 */
html[data-theme]:root :where(
  .main-view:not(.is-chat) .app-header .icon-button,
  .main-view:not(.is-chat) .header-glass-group,
  .bottom-nav-bar, .nav-search, .language-trigger, .nav-fab-menu,
  .modal-close, #modal-header-action .icon-button, .remembered-account-menu
) {
  position: relative;
  isolation: isolate;
  border: 0;
  color: var(--pf-fg);
  background: var(--pf-glass);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  backdrop-filter: blur(20px) saturate(1.6);
  box-shadow: var(--pf-glass-in), var(--pf-glass-sh);
}
/* 静态玻璃：卡片、设置格、列表块（不做实时模糊） */
html[data-theme]:root :where(
  .chat-folder-tab:not(.is-active), .chat-pin-card .conversation-row, .contact-search-pill, .contact-tile, .contact-letter-index,
  .friend-request-row, .profile-card, .profile-appearance-card, .web-accounts-card, .settings-tile, .settings-menu-card,
  .detail-list:not(.group-info-settings-grid), .detail-profile, .detail-action-stack:not(.group-info-danger-zone),
  .group-info-quick, .group-info-pinned, .group-info-members, .group-info-media-tabs, .group-info-settings-grid > .detail-row,
  .group-info-danger-zone .group-info-clear, .ga-section, .menu-card, .confirm-card
) {
  position: relative;
  isolation: isolate;
  border: 0;
  background: var(--pf-glass2);
  box-shadow: var(--pf-glass-in), var(--pf-glass-sh);
}
/* 高光描边（渐变 1px 边，mask 抠出中间）和顶部光泽 */
html[data-theme]:root :where(
  .main-view:not(.is-chat) .app-header .icon-button, .main-view:not(.is-chat) .header-glass-group,
  .bottom-nav-bar, .nav-search, .language-trigger, .nav-fab-menu, .modal-close, #modal-header-action .icon-button,
  .chat-folder-tab:not(.is-active), .chat-pin-card .conversation-row, .contact-search-pill, .contact-tile, .contact-letter-index,
  .friend-request-row, .profile-card, .profile-appearance-card, .web-accounts-card, .settings-tile, .settings-menu-card,
  .detail-list:not(.group-info-settings-grid), .detail-profile, .detail-action-stack:not(.group-info-danger-zone),
  .group-info-quick, .group-info-pinned, .group-info-members, .group-info-media-tabs, .group-info-settings-grid > .detail-row,
  .group-info-danger-zone .group-info-clear, .ga-section, .menu-card, .confirm-card
)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  padding: 1px;
  border-radius: inherit;
  background: var(--pf-rim);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
html[data-theme]:root :where(
  .main-view:not(.is-chat) .app-header .icon-button, .main-view:not(.is-chat) .header-glass-group,
  .bottom-nav-bar, .nav-search, .language-trigger, .modal-close, #modal-header-action .icon-button,
  .contact-tile, .profile-card, .settings-tile, .group-info-quick
)::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--pf-sheen);
  pointer-events: none;
}

/* ───────────── 头像：设计稿的渐变色（统一正圆，带一点内高光） ───────────── */
html[data-theme] .avatar { border-radius: 50%; color: #fff; background: linear-gradient(140deg, #FFB79C, #FF5F86); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -6px 12px -6px rgba(0,0,0,.18); font-family: var(--pf-font); font-weight: 700; text-transform: none; -webkit-mask: none; mask: none; }
html[data-theme] .avatar.blue, html[data-theme] .group-avatar-member.blue { background: linear-gradient(140deg, #5CD2FF, #3A74FF); }
html[data-theme] .avatar.green, html[data-theme] .group-avatar-member.green { background: linear-gradient(140deg, #74E8B8, #12B57E); }
html[data-theme] .avatar.gold, html[data-theme] .group-avatar-member.gold { color: #fff; background: linear-gradient(140deg, #FFD27E, #FF8640); }
html[data-theme] .avatar.purple, html[data-theme] .group-avatar-member.purple { background: linear-gradient(140deg, #B39CFF, #6A48FF); }
html[data-theme] .avatar.has-image, html[data-theme] .avatar:has(> .avatar-image) { background: var(--pf-sf2); }
html[data-theme] .avatar[data-shape], html[data-theme] .avatar.group-avatar { border-radius: 50%; -webkit-mask: none; mask: none; }
html[data-theme] .avatar.saved-messages-avatar { color: #fff; background: linear-gradient(140deg, #5CD2FF, #3A74FF); }
html[data-theme] .avatar.saved-messages-avatar svg { width: 46%; height: 46%; fill: currentColor; fill-opacity: .25; stroke-width: 2.1; }
html[data-theme] .avatar[data-shape="official"]:not(.has-image) { color: var(--pf-pri); background: var(--pfs-av-brand); box-shadow: inset 0 0 0 .5px var(--pf-line2), 0 2px 6px -2px rgba(30,44,100,.2); }
html[data-theme] .group-avatar { gap: 1.5px; overflow: hidden; background: var(--pf-sf2); }
html[data-theme] .group-avatar-member { font-weight: 700; }
/* 在线绿点：底色描边 + 呼吸光圈 */
html[data-theme] .presence { width: 14px; height: 14px; inset-inline-end: 0; inset-block-end: 0; border: 2.5px solid var(--pfs-ring, var(--pf-bg)); border-radius: 50%; background: var(--pf-min); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pf-min) 18%, transparent); }
html[data-theme] .presence::after { content: ""; position: absolute; inset: -7px; border: 1.5px solid color-mix(in srgb, var(--pf-min) 28%, transparent); border-radius: 50%; pointer-events: none; }

/* 身份标识：官方蓝 V、VIP 金色糖片 */
html[data-theme] .official-account-badge { width: 16px; height: 16px; color: var(--pf-vblue); }
html[data-theme] .official-account-badge svg { width: 16px; height: 16px; }
html[data-theme] .vip-level-badge { min-width: 0; height: 16px; padding: 0 5px 0 4px; border-radius: 6px; color: #6A4200; background: linear-gradient(135deg, #FFE9A8, #F5B73A); box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 1px 2px rgba(150,96,0,.25); font: 800 9.5px/16px var(--pf-display); letter-spacing: .02em; }

/* ───────────── 页面底色、外框 ───────────── */
html[data-theme] { background: var(--pf-bg); }
html[data-theme] body { color: var(--pf-fg); background: var(--pfs-blobs-hero), var(--pf-bg); background-attachment: fixed; font-family: var(--pf-font); letter-spacing: -.003em; -webkit-font-smoothing: antialiased; }
html[data-theme] .site-backdrop { display: none; }
html[data-theme] .app-shell { border: 0; border-radius: 32px; background: var(--pf-bg); box-shadow: var(--pf-sh3), inset 0 0 0 .5px var(--pf-line2); }
html[data-theme] .content-scroll { scrollbar-color: var(--pf-sf3) transparent; }
html[data-theme] button:focus-visible, html[data-theme] input:focus-visible, html[data-theme] textarea:focus-visible { outline: 3px solid color-mix(in srgb, var(--pf-pri) 35%, transparent); outline-offset: 2px; }

/* ───────────── 通用按钮 ───────────── */
html[data-theme] .primary-button, html[data-theme] .secondary-button { min-height: 50px; padding: 0 22px; border-radius: 999px; font-size: 15.5px; font-weight: 700; }
html[data-theme] .primary-button { position: relative; color: #fff; background: var(--pf-out); box-shadow: var(--pfs-cta-sh); }
html[data-theme] .primary-button::after { content: ""; position: absolute; inset-inline: 14%; inset-block-start: 3px; height: min(40%, 20px); border-radius: 20px; background: linear-gradient(rgba(255,255,255,.32), rgba(255,255,255,0)); pointer-events: none; }
html[data-theme] .primary-button:hover { background: var(--pf-out); box-shadow: var(--pfs-cta-sh); filter: brightness(1.04); transform: none; }
html[data-theme] .primary-button:active { filter: brightness(.97); transform: scale(.98); }
html[data-theme] .secondary-button { color: var(--pfs-pri-t); background: var(--pf-pri-c); box-shadow: none; }
html[data-theme] .secondary-button:hover { background: color-mix(in srgb, var(--pf-pri-c) 80%, var(--pf-pri)); }
html[data-theme] .secondary-button.danger, html[data-theme] .secondary-button.compact.danger { color: var(--pf-dan); background: var(--pf-dan-c); }
html[data-theme] .primary-button.compact, html[data-theme] .secondary-button.compact { min-height: 44px; border-radius: 999px; }
html[data-theme] .primary-button.mini, html[data-theme] .secondary-button.mini { min-height: 30px; padding: 0 12px; border-radius: 999px; font-size: 12px; }
html[data-theme] .primary-button.mini::after { display: none; }
html[data-theme] .icon-button { width: 42px; height: 42px; border-radius: 50%; color: var(--pf-fg); }
html[data-theme] .icon-button:hover { color: var(--pfs-pri-t); background: var(--pf-pri-c); }
html[data-theme] .icon-button svg { width: 22px; height: 22px; }
html[data-theme] .chevron { color: var(--pf-fg3); }

/* ───────────── 输入框 ───────────── */
html[data-theme] .text-input, html[data-theme] .text-area { padding: 13px 16px; border: 0; border-radius: 16px; color: var(--pf-fg); background: var(--pf-glass2); box-shadow: inset 0 0 0 .5px var(--pf-line2); }
html[data-theme] .text-input:focus, html[data-theme] .text-area:focus { border: 0; background: var(--pf-sf); box-shadow: inset 0 0 0 2px var(--pf-pri); }
html[data-theme] .text-input::placeholder, html[data-theme] .text-area::placeholder { color: var(--pf-fg3); }
html[data-theme] .field-group > label { color: var(--pf-fg2); font-size: 12px; font-weight: 700; }
html[data-theme] .form-help, html[data-theme] .form-hint, html[data-theme] .settings-hint { color: var(--pf-fg3); }
html[data-theme] .search-box { height: 44px; border: 0; border-radius: 22px; color: var(--pf-fg3); background: var(--pf-glass2); box-shadow: inset 0 0 0 .5px var(--pf-line2); }
html[data-theme] .search-box svg { color: var(--pf-fg2); }
html[data-theme] .search-box input::placeholder { color: var(--pf-fg3); }

/* ───────────── 开关（绿色玻璃开关） ───────────── */
html[data-theme] .switch-control { flex: 0 0 40px; width: 40px; height: 24px; border: 0; border-radius: 12px; background: var(--pfs-sw-off); box-shadow: inset 0 1px 2px rgba(0,0,0,.06); transition: background-color .2s var(--pf-spring); }
html[data-theme] .switch-control::after { width: 20px; height: 20px; inset-block-start: 2px; inset-inline-start: 2px; border-radius: 50%; background: var(--pfs-knob); box-shadow: 0 2px 4px rgba(0,0,0,.2), inset 0 1px 0 rgba(255,255,255,.9); transition: inset-inline-start .25s var(--pf-spring); }
html[data-theme] .detail-toggle input:checked + .switch-control, html[data-theme] .settings-toggle-row input:checked + .switch-control, html[data-theme] .ap-toggle input:checked + .switch-control, html[data-theme] input:checked + .switch-control { border: 0; background: var(--pf-min); box-shadow: inset 0 1px 2px rgba(0,0,0,.08); }
html[data-theme] .detail-toggle input:checked + .switch-control::after, html[data-theme] .settings-toggle-row input:checked + .switch-control::after, html[data-theme] .ap-toggle input:checked + .switch-control::after, html[data-theme] input:checked + .switch-control::after { width: 20px; height: 20px; inset-block-start: 2px; inset-inline-start: 18px; background: var(--pfs-knob); }
html[data-theme] input:disabled + .switch-control { opacity: .5; }

/* ───────────── 弹窗 / 底部弹层 / 确认框 / 提示条 ───────────── */
html[data-theme] .modal-scrim { background: var(--pf-scrim); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); }
html[data-theme] .modal-card { border: 0; border-radius: 30px; color: var(--pf-fg); background: var(--pfs-blobs), var(--pf-bg); box-shadow: var(--pf-sh3), inset 0 0 0 .5px var(--pf-line2); animation: pfSheetIn .32s var(--pf-spring) both; }
@keyframes pfSheetIn { from { transform: translateY(24px); } to { transform: none; } }
html[data-theme] .modal-header { position: relative; grid-template-columns: 52px 1fr 52px; border: 0; background: transparent; }
html[data-theme] .modal-header h2 { font: 800 17px/1.3 var(--pf-font); letter-spacing: -.01em; }
html[data-theme] .modal-close, html[data-theme] #modal-header-action .icon-button { width: 42px; height: 42px; border-radius: 50%; }
html[data-theme] .modal-close:hover, html[data-theme] #modal-header-action .icon-button:hover { color: var(--pfs-pri-t); background: var(--pf-glass); }
html[data-theme] .modal-close svg { width: 22px; height: 22px; }
html[data-theme] .modal-footer { border: 0; background: transparent; }
html[data-theme] .modal-card.details-modal { background: var(--pfs-blobs-hero), var(--pf-bg); }
html[data-theme] .details-modal .modal-header { background: linear-gradient(var(--pfs-fade) 0%, var(--pfs-fade) 60%, transparent); }
html[data-theme] .details-modal .modal-body { background: transparent; }
html[data-theme] .confirm-card { border-radius: 26px; color: var(--pf-fg); background: var(--pf-glass2); -webkit-backdrop-filter: blur(24px) saturate(1.6); backdrop-filter: blur(24px) saturate(1.6); box-shadow: var(--pf-glass-in), var(--pf-sh3); }
html[data-theme] .confirm-icon { border-radius: 50%; color: var(--pf-dan); background: var(--pf-dan-c); }
html[data-theme] .confirm-card h2 { font: 800 19px/1.3 var(--pf-font); }
html[data-theme] .confirm-card p { color: var(--pf-fg2); }
html[data-theme] .confirm-option { border: 0; border-radius: 16px; color: var(--pf-fg); background: var(--pf-glass2); box-shadow: inset 0 0 0 .5px var(--pf-line2); }
html[data-theme] .confirm-option input { accent-color: var(--pf-pri); }
html[data-theme] .confirm-actions .primary-button { color: #fff; background: var(--pf-dan); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 10px 20px -12px var(--pf-dan); }
html[data-theme] .toast { border: 0; border-radius: 20px; color: var(--pf-bg); background: color-mix(in srgb, var(--pf-fg) 92%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: var(--pf-sh3); font-weight: 600; }
html[data-theme] .toast.success svg { color: var(--pf-min); }
html[data-theme] .toast.error svg { color: var(--pf-cor); }
html[data-theme] .language-option { border: 0; border-radius: 16px; color: var(--pf-fg); background: var(--pf-glass2); box-shadow: inset 0 0 0 .5px var(--pf-line); }
html[data-theme] .language-option:hover { background: var(--pf-sf); }
html[data-theme] .language-option.is-selected { color: var(--pfs-pri-t); background: var(--pfs-hl); box-shadow: inset 0 0 0 1px var(--pfs-pri-line); }
html[data-theme] .member-option { border: 0; border-radius: 16px; background: var(--pf-glass2); box-shadow: inset 0 0 0 .5px var(--pf-line); }
html[data-theme] .member-check { border-color: var(--pf-fg3); border-radius: 50%; }
html[data-theme] .member-option input:checked ~ .member-check { border-color: var(--pf-pri); color: #fff; background: var(--pf-pri); }
html[data-theme] .chat-folder-manage-row { border: 0; border-radius: 18px; background: var(--pf-glass2); box-shadow: var(--pf-glass-in), var(--pf-glass-sh); }
html[data-theme] .chat-folder-manage-main > svg { color: var(--pfs-pri-t); }

/* ───────────── 登录 / 注册（图 1） ───────────── */
html[data-theme] .auth-view { background: var(--pfs-blobs-hero), var(--pf-bg); }
html[data-theme] .auth-topbar { justify-content: flex-end; padding: max(14px, env(safe-area-inset-top)) 16px 0; }
html[data-theme] .auth-topbar .brand { display: none; }
html[data-theme] .language-trigger { height: 34px; min-height: 34px; gap: 5px; padding: 0 10px 0 11px; border-radius: 17px; font-size: 13px; font-weight: 500; }
html[data-theme] .language-trigger svg { width: 16px; height: 16px; color: var(--pf-fg); }
html[data-theme] .language-trigger .language-chevron { width: 14px; height: 14px; color: var(--pf-fg2); }
html[data-theme] .language-trigger .current-language-flag { display: none; }
html[data-theme] .auth-content { width: min(100%, 420px); padding: 0 22px 36px; }
html[data-theme] .auth-hero { display: flex; width: 100%; height: auto; flex-direction: column; align-items: center; margin: 34px auto 0; }
html[data-theme] .auth-logo { position: relative; display: grid; width: 96px; height: 96px; place-items: center; border-radius: 30px; background: var(--pf-glass); -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6); box-shadow: var(--pf-glass-in), var(--pf-glass-sh), inset 0 0 0 .5px rgba(255,255,255,.6); }
html[data-theme="dark"] .auth-logo { box-shadow: var(--pf-glass-in), var(--pf-glass-sh), inset 0 0 0 .5px rgba(255,255,255,.12); }
html[data-theme] .auth-logo-face { position: relative; display: block; width: 64px; height: 60px; }
html[data-theme] .auth-logo-back { position: absolute; right: 0; top: 0; width: 32px; height: 28px; border-radius: 13px 13px 4px 13px; background: linear-gradient(140deg, #FFC98C, #FF7C9C); }
html[data-theme] .auth-logo-front { position: absolute; left: 0; bottom: 0; width: 54px; height: 48px; border-radius: 21px 21px 21px 6px; background: linear-gradient(140deg, #45C8FF, #4E63FF 56%, #7B4DFF); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 6px 14px -6px rgba(60,80,255,.6); }
html[data-theme] .auth-logo-front::before { content: ""; position: absolute; left: 16px; top: 15px; width: 5px; height: 7px; border-radius: 3px; background: #fff; box-shadow: 16px 0 0 #fff; }
html[data-theme] .auth-logo-front::after { content: ""; position: absolute; left: 15px; top: 24px; width: 24px; height: 11px; box-sizing: border-box; border: 3.2px solid #fff; border-top: 0; border-radius: 0 0 14px 14px; }
html[data-theme] .auth-wordmark { position: static; margin-top: 18px; color: var(--pf-fg); font: 800 40px/1 var(--pf-display); letter-spacing: -.045em; text-align: center; }
html[data-theme] .auth-heading { margin: 9px 0 30px; text-align: center; }
html[data-theme] .auth-heading .eyebrow { display: none; }
html[data-theme] .auth-heading h1, html[data-theme][data-accent] .auth-heading h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
html[data-theme] .auth-heading p { margin: 0; color: var(--pf-fg2); font-size: 15px; letter-spacing: .02em; }
html[data-theme] .auth-form { gap: 0; }
/* 账号 + 密码（注册时四项）合成一张玻璃卡，中间细线分隔 */
html[data-theme] .input-field { position: relative; min-height: 60px; gap: 12px; padding: 0 8px 0 16px; border: 0; border-radius: 0; color: var(--pf-fg2); background: var(--pf-glass2); box-shadow: inset 0 1px 0 rgba(255,255,255,.5); transition: background-color .2s, box-shadow .2s; }
html[data-theme="dark"] .input-field { box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
html[data-theme] :is(#login-account-picker, #register-form > .auth-field:first-child) .input-field { border-radius: 24px 24px 0 0; box-shadow: var(--pf-glass-in), 0 -6px 18px -14px rgba(30,44,100,.3); }
html[data-theme] :is(#login-credentials-field, #register-form > .auth-field[data-register-field="confirm"]) .input-field { border-radius: 0 0 24px 24px; box-shadow: inset 0 -1px 0 rgba(255,255,255,.35), var(--pf-glass-sh); }
html[data-theme] :is(#login-credentials-field, #register-form > .auth-field:not(:first-child)) .input-field::before { content: ""; position: absolute; inset-inline: 16px; inset-block-start: 0; height: .5px; background: var(--pf-line2); pointer-events: none; }
html[data-theme] .input-field:focus-within, html[data-theme][data-accent] .input-field:focus-within { border: 0; background: var(--pf-sf); }
html[data-theme] .input-field > svg { width: 20px; height: 20px; color: var(--pf-fg2); }
html[data-theme] .input-field:focus-within > svg { color: var(--pf-pri); }
html[data-theme] .input-field input { padding: 18px 0; color: var(--pf-fg); font-size: 16px; font-weight: 700; caret-color: var(--pf-pri); }
html[data-theme] .input-field input[type="password"] { letter-spacing: .14em; }
html[data-theme] .input-field input::placeholder { color: var(--pf-fg3); font-weight: 500; letter-spacing: 0; }
html[data-theme] .auth-field.has-error .input-field { background: color-mix(in srgb, var(--pf-dan-c) 60%, var(--pf-glass2)); }
html[data-theme] .auth-field.has-error .input-field > svg { color: var(--pf-dan); }
html[data-theme] .field-error, html[data-theme] .auth-form .login-error { margin: 6px 14px 4px; color: var(--pf-dan); }
html[data-theme] .password-toggle, html[data-theme] .remembered-account-toggle { width: 40px; height: 40px; flex-basis: 40px; border-radius: 50%; color: var(--pf-fg2); background: transparent; }
html[data-theme] .password-toggle:hover, html[data-theme] .remembered-account-toggle:hover { color: var(--pfs-pri-t); background: var(--pf-pri-c); }
html[data-theme] .remembered-account-menu { border-radius: 20px; background: var(--pf-glass2); }
html[data-theme] .remembered-account-option { border-radius: 14px; color: var(--pf-fg); }
html[data-theme] .remembered-account-option:hover, html[data-theme] .remembered-account-option:focus-visible { color: var(--pfs-pri-t); background: var(--pfs-hl); }
html[data-theme] .forgot-password-row { margin: 12px 4px 0; }
html[data-theme] .forgot-password-row button { color: var(--pfs-pri-t); font-size: 13.5px; font-weight: 700; }
html[data-theme] .auth-form > .primary-button { height: 56px; min-height: 56px; margin-top: 22px; border-radius: 28px; font-size: 17px; letter-spacing: .06em; }
html[data-theme] #register-form > .primary-button { margin-top: 22px; }
html[data-theme] .privacy-consent { order: 10; justify-content: center; margin-top: 16px; padding: 0 4px; color: var(--pf-fg3); font-size: 12px; }
html[data-theme] .privacy-consent input { width: 15px; height: 15px; flex-basis: 15px; margin-top: 2px; accent-color: var(--pf-pri); }
html[data-theme] .privacy-consent-copy a { color: var(--pf-fg2); font-weight: 700; }
html[data-theme] .auth-switch { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 18px 0 0; color: var(--pf-fg2); font-size: 14px; }
html[data-theme] .auth-switch button { padding: 2px 4px; border-radius: 8px; color: var(--pf-fg); background: transparent; font-size: 14px; font-weight: 700; }
html[data-theme] .auth-switch button:hover { color: var(--pfs-pri-t); }
html[data-theme] .web-account-adding { border-radius: 18px; color: var(--pfs-pri-t); background: var(--pfs-hl); }

/* ───────────── 主界面：一级页（消息 / 好友 / 群聊 / 我的）背景光斑 + 悬浮顶部玻璃件 ───────────── */
html[data-theme] .main-view { background: var(--pfs-blobs), var(--pf-bg); }
html[data-theme] .main-view:not(.is-chat):not(.is-subpage) { grid-template-rows: minmax(0, 1fr); }
html[data-theme] .main-view:not(.is-chat):not(.is-subpage) > .page-content { grid-area: 1 / 1; }
/* 顶部：左右悬浮玻璃按钮 + 32 号大标题；底色只是一层渐隐，滚动内容从下面穿过。整层不接收点击，只有按钮接收。 */
html[data-theme] .main-view:not(.is-chat):not(.is-subpage) .app-header {
  position: relative; z-index: 7; grid-area: 1 / 1; align-self: start;
  display: grid; height: var(--pfs-head); grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: 42px 50px; align-content: start; gap: 0 8px;
  padding: max(10px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left));
  border: 0; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; isolation: isolate;
  pointer-events: none;
}
/* 顶部渐隐放在伪元素上（只给底色加遮罩，按钮和标题不受影响）；整条宽度叠在滚动列表上，用静态半透明，不做实时模糊。 */
html[data-theme] .main-view:not(.is-chat):not(.is-subpage) .app-header::before {
  content: ""; position: absolute; inset: 0 0 -14px; z-index: -1;
  background: linear-gradient(var(--pf-bg) 0%, color-mix(in srgb, var(--pf-bg) 50%, var(--pfs-fade)) 50%, transparent);
  -webkit-mask: linear-gradient(#000 55%, transparent); mask: linear-gradient(#000 55%, transparent);
  pointer-events: none;
}
html[data-theme] .main-view:not(.is-chat):not(.is-subpage) .app-header :is(button, a, .nav-fab-menu) { pointer-events: auto; }
html[data-theme] .main-view:not(.is-chat):not(.is-subpage) .header-start { grid-row: 1; grid-column: 1; display: flex; }
html[data-theme] .main-view:not(.is-chat):not(.is-subpage) .header-actions { position: relative; grid-row: 1; grid-column: 3; display: flex; gap: 8px; }
html[data-theme] .main-view:not(.is-chat):not(.is-subpage) .header-title-wrap { grid-row: 2; grid-column: 1 / -1; display: flex; min-width: 0; align-items: baseline; gap: 8px; padding: 6px 6px 0; text-align: start; }
html[data-theme] .main-view:not(.is-chat):not(.is-subpage) .header-title-wrap h1 { min-width: 0; color: var(--pf-fg); font: 800 32px/42px var(--pf-display); letter-spacing: -.025em; }
html[data-theme] .main-view:not(.is-chat):not(.is-subpage) .header-subtitle { flex: none; margin: 0; color: var(--pf-fg3); font: 700 14px/1 var(--pf-display); }
/* 圆形玻璃钮（42），多个按钮合成一枚胶囊 */
html[data-theme] .main-view:not(.is-chat):not(.is-subpage) .app-header .icon-button { width: 42px; height: 42px; flex: none; border-radius: 50%; color: var(--pf-fg); }
html[data-theme] .main-view:not(.is-chat):not(.is-subpage) .header-glass-group { display: inline-flex; height: 42px; align-items: center; padding: 0 2px; border-radius: 21px; }
html[data-theme] .main-view:not(.is-chat):not(.is-subpage) .header-glass-group .icon-button { width: 38px; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
html[data-theme] .main-view:not(.is-chat):not(.is-subpage) .header-glass-group .icon-button::before,
html[data-theme] .main-view:not(.is-chat):not(.is-subpage) .header-glass-group .icon-button::after { display: none; }
html[data-theme] .main-view:not(.is-chat):not(.is-subpage) .header-glass-group:has(> .icon-button:only-child) { padding: 0; }
html[data-theme] .main-view:not(.is-chat):not(.is-subpage) .header-glass-group > .icon-button:only-child { width: 42px; }
html[data-theme] .main-view:not(.is-chat):not(.is-subpage) .app-header .icon-button:hover { color: var(--pfs-pri-t); }
html[data-theme] .main-view:not(.is-chat):not(.is-subpage) .app-header .icon-button:active { transform: scale(.94); }
html[data-theme] .main-view .header-start .header-self-avatar { padding: 0; }
html[data-theme] .header-self-avatar .avatar { width: 34px; height: 34px; flex-basis: 34px; font-size: 13px; }
html[data-theme] .header-self-avatar .presence { display: none; }
/* 写信菜单：226 宽玻璃卡，44 高一行 */
html[data-theme] .nav-fab-menu { position: absolute; inset-inline-end: 0; inset-block-start: calc(100% + 8px); z-index: 9; display: grid; width: 226px; overflow: hidden; padding: 0; border-radius: 22px; animation: pfMenuIn .26s var(--pf-bounce) both; transform-origin: top right; }
html[data-theme] .nav-fab-menu[hidden] { display: none; }
html[data-theme] .nav-fab-menu-item { display: flex; height: 44px; align-items: center; gap: 12px; padding: 0 16px; color: var(--pf-fg); background: transparent; font-size: 15.5px; font-weight: 500; text-align: start; white-space: nowrap; }
html[data-theme] .nav-fab-menu-item + .nav-fab-menu-item { box-shadow: inset 0 .5px 0 var(--pf-line); }
html[data-theme] .nav-fab-menu-item:hover { background: var(--pfs-hl); }
html[data-theme] .nav-fab-menu-item svg { width: 20px; height: 20px; }
@keyframes pfMenuIn { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
/* 内容从顶部玻璃件下面滚过 */
html[data-theme] .main-view:not(.is-chat):not(.is-subpage) .content-inner,
html[data-theme] .main-view:not(.is-chat):not(.is-subpage) .page-content > .empty-state { padding-block-start: calc(var(--pfs-head) + 2px); padding-block-end: calc(var(--pfs-nav-space) + 18px); }
html[data-theme] .main-view:not(.is-chat):not(.is-subpage) .page-content > .empty-state { height: 100%; }
/* 「我的」页没有顶部件，名片就是页头 */
html[data-theme] .main-view[data-active-tab="profile"]:not(.is-chat):not(.is-subpage) .app-header { visibility: hidden; }
html[data-theme] .main-view:not(.is-chat):not(.is-subpage) .profile-wrap { padding-block-end: calc(var(--pfs-nav-space) + 18px); }

/* 二级页（添加好友、通话记录）：左上玻璃返回钮 + 居中标题 */
html[data-theme] .main-view.is-subpage .app-header { grid-template-columns: 96px minmax(0, 1fr) 96px; border: 0; background: linear-gradient(var(--pfs-fade), var(--pfs-fade) 60%, transparent); -webkit-backdrop-filter: none; backdrop-filter: none; }
html[data-theme] .main-view.is-subpage .header-title-wrap h1 { font: 800 17px/1.3 var(--pf-font); letter-spacing: -.01em; }
html[data-theme] .main-view.is-subpage .app-header .icon-button { position: relative; isolation: isolate; color: var(--pf-fg); background: var(--pf-glass); -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6); box-shadow: var(--pf-glass-in), var(--pf-glass-sh); }
html[data-theme] .main-view.is-subpage .page-content { background: transparent; }

/* 添加好友页：玻璃搜索框 */
html[data-theme] .add-friend-page { background: transparent; }
html[data-theme] .add-friend-searchbar { gap: 10px; padding: 8px 16px 10px; border: 0; background: transparent; }
html[data-theme] .add-friend-searchbox { height: 44px; gap: 8px; padding: 0 14px; border: 0; border-radius: 22px; color: var(--pf-fg2); background: var(--pf-glass2); box-shadow: var(--pf-glass-in), var(--pf-glass-sh); }
html[data-theme] .add-friend-searchbox:focus-within, html[data-theme][data-accent] .add-friend-searchbox:focus-within { border: 0; background: var(--pf-sf); box-shadow: inset 0 0 0 2px var(--pf-pri), var(--pf-glass-sh); }
html[data-theme] .add-friend-searchbox input::placeholder { color: var(--pf-fg3); }
html[data-theme] .add-friend-cancel { color: var(--pfs-pri-t); font-weight: 700; }
html[data-theme] .add-friend-results { height: calc(100% - 62px); padding: 6px 16px calc(24px + env(safe-area-inset-bottom)); }
html[data-theme] .add-friend-result-list { border: 0; border-radius: 20px; background: var(--pf-glass2); box-shadow: var(--pf-glass-in), var(--pf-glass-sh); }
html[data-theme] .add-friend-result + .add-friend-result { border: 0; box-shadow: inset 0 .5px 0 var(--pf-line); }
html[data-theme] .add-friend-empty strong { color: var(--pf-fg); }
html[data-theme] .add-friend-empty, html[data-theme] .add-friend-empty > svg { color: var(--pf-fg3); }
/* 搜索框里的输入框不再单独画焦点框，外框已经高亮 */
html[data-theme] :is(.search-box, .input-field, .add-friend-searchbox, .search-panel-box) input:focus-visible { outline: none; }

/* ───────────── 悬浮玻璃胶囊底栏 + 独立搜索圆钮 ───────────── */
html[data-theme] .main-view:not(.is-chat):not(.is-subpage) .bottom-nav {
  position: absolute; inset-inline: 0; inset-block-end: 0; z-index: 8; display: flex; align-items: flex-end; gap: 10px;
  padding: 64px max(14px, env(safe-area-inset-right)) var(--pfs-nav-bottom) max(14px, env(safe-area-inset-left));
  border: 0; background: linear-gradient(transparent, var(--pfs-fade) 46%, var(--pfs-fade2) 78%);
  -webkit-backdrop-filter: none; backdrop-filter: none; pointer-events: none;
}
html[data-theme] .bottom-nav-bar { display: flex; min-width: 0; height: 62px; flex: 1; align-items: stretch; gap: 0; padding: 4px; border-radius: 31px; pointer-events: auto; }
html[data-theme] .nav-item { position: relative; display: flex; min-width: 0; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0 2px; border-radius: 27px; color: var(--pf-fg); background: transparent; font-size: 10.5px; font-weight: 700; transition: background-color .25s var(--pf-spring), color .2s, box-shadow .25s; }
html[data-theme] .nav-item svg { width: 24px; height: 24px; stroke-width: 1.8; }
html[data-theme] .nav-item > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-theme] .nav-item::before, html[data-theme] .nav-item.is-active::before { display: none; }
html[data-theme] .nav-item.is-active { color: var(--pf-pri); background: var(--pf-lens); box-shadow: var(--pf-lens-sh); }
html[data-theme] .nav-item.is-active svg { stroke-width: 2.2; }
html[data-theme] .nav-item:not(.is-active):hover { color: var(--pfs-pri-t); }
html[data-theme] .nav-notice { position: absolute; inset-block-start: 3px; inset-inline-start: 50%; min-width: 18px; height: 18px; margin-inline-start: 5px; padding: 0 5px; border: 0; border-radius: 9px; color: #fff; background: var(--pfs-candy); box-shadow: var(--pfs-candy-sh); font: 800 10.5px/18px var(--pf-display); text-align: center; }
html[data-theme] .nav-fab-slot { position: relative; flex: none; pointer-events: auto; }
html[data-theme] .nav-fab-slot[hidden] { display: none; }
html[data-theme] .nav-search { display: grid; width: 62px; height: 62px; place-items: center; border-radius: 50%; transition: transform .25s var(--pf-spring); }
html[data-theme] .nav-search svg { width: 25px; height: 25px; stroke-width: 2.1; }
html[data-theme] .nav-search:hover { color: var(--pfs-pri-t); }
html[data-theme] .nav-search:active { transform: scale(.95); }

/* ───────────── 列表通用 ───────────── */
html[data-theme] .content-inner { padding: 0 16px 28px; }
html[data-theme] .section-caption { display: flex; align-items: baseline; gap: 8px; margin: 14px 4px 4px; color: var(--pf-fg2); font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: none; }
html[data-theme] .section-caption span:last-child { color: var(--pf-fg3); font-size: 11.5px; font-weight: 700; letter-spacing: 0; }
html[data-theme] .list-card { overflow: visible; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
html[data-theme] .conversation-row, html[data-theme] .contact-row, html[data-theme] .group-row { min-height: 68px; gap: 12px; margin-inline: -8px; padding: 0 8px; border: 0; border-radius: 18px; }
html[data-theme] .conversation-row + .conversation-row, html[data-theme] .contact-row + .contact-row, html[data-theme] .group-row + .group-row, html[data-theme] .friend-request-row + .friend-request-row { border: 0; }
html[data-theme] .conversation-row:hover, html[data-theme] .contact-row:hover, html[data-theme] .group-row:hover { background: color-mix(in srgb, var(--pf-glass2) 70%, transparent); }
/* 0.5px 细分隔线从文字起，不穿过头像 */
html[data-theme] :is(.chat-list-card .conversation-row, .group-list-card .group-row, .contact-list-card .contact-row) .row-main { align-self: stretch; display: flex; flex-direction: column; justify-content: center; box-shadow: inset 0 -.5px 0 var(--pf-line); }
html[data-theme] :is(.chat-list-card .conversation-row:last-child, .group-list-card .group-row:last-child) .row-main { box-shadow: none; }
html[data-theme] .row-title { color: var(--pf-fg); font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
html[data-theme] .row-title-line { gap: 5px; }
html[data-theme] .row-title-identity { gap: 5px; }
html[data-theme] .row-time { color: var(--pf-fg3); font-size: 12.5px; font-weight: 500; }
html[data-theme] .row-preview { gap: 5px; margin-top: 4px; color: var(--pf-fg2); font-size: 14px; }
html[data-theme] .row-preview > span:first-child { min-width: 0; flex: 1; }
html[data-theme] .chevron svg { width: 16px; height: 16px; }
html[data-theme] .status-pill { color: var(--pf-min); font-size: 12.5px; font-weight: 700; }
html[data-theme] .status-pill::before { display: none; }
html[data-theme] .empty-illustration { border: 0; border-radius: 30px; color: var(--pf-pri); background: var(--pf-glass2); box-shadow: var(--pf-glass-in), var(--pf-glass-sh); }
html[data-theme] .empty-state h2 { font: 800 20px/1.3 var(--pf-font); letter-spacing: -.01em; }
html[data-theme] .empty-state p { color: var(--pf-fg2); }
html[data-theme] .friend-request-row { gap: 12px; margin-block-end: 7px; padding: 12px; border-radius: 20px; }
html[data-theme] .request-list { margin-block-end: 6px; }

/* ───────────── 会话列表（图 2） ───────────── */
html[data-theme] .chat-folder-bar { gap: 6px; margin: 4px -16px 0; padding: 0 16px; }
html[data-theme] .chat-folder-tabs { gap: 6px; padding: 6px 2px 10px; scrollbar-width: none; }
html[data-theme] .chat-folder-tabs::-webkit-scrollbar { display: none; }
html[data-theme] .chat-folder-tab { height: 32px; min-height: 32px; flex: none; gap: 5px; padding: 0 11px; border: 0; border-radius: 16px; color: var(--pf-fg); font-size: 14px; font-weight: 700; transition: background-color .2s, color .2s; }
html[data-theme] .chat-folder-tab:hover, html[data-theme][data-accent] .chat-folder-tab:hover { border: 0; color: var(--pfs-pri-t); }
html[data-theme] .chat-folder-tab.is-active, html[data-theme] .chat-folder-tab.is-active:hover { position: relative; border: 0; color: var(--pf-chip-on-fg); background: var(--pf-chip-on); box-shadow: 0 6px 14px -8px rgba(0,0,0,.5); }
html[data-theme] .chat-folder-count { color: var(--pf-fg2); font: 700 12px/1 var(--pf-display); }
html[data-theme] .chat-folder-tab.is-active .chat-folder-count { color: var(--pf-chip-on-fg); opacity: .62; }
html[data-theme] .chat-folder-manage { width: 32px; flex: 0 0 32px; align-self: flex-start; margin-top: 6px; padding: 0; border-radius: 50%; color: var(--pf-fg2); }
html[data-theme] .chat-folder-manage svg { width: 17px; height: 17px; }
/* 置顶：两格并排玻璃卡 */
html[data-theme] .chat-pin-card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 4px 0 4px; }
html[data-theme] .chat-pin-card .conversation-row { min-height: 62px; height: auto; gap: 9px; margin: 0; padding: 10px 10px; border-radius: 20px; --pfs-ring: var(--pf-glass2); }
html[data-theme] .chat-pin-card .conversation-row:hover { background: var(--pf-sf); }
html[data-theme] .chat-pin-card .conversation-row .avatar { width: 40px; height: 40px; flex-basis: 40px; font-size: 15px; }
html[data-theme] .chat-pin-card .conversation-row .row-main { min-width: 0; }
html[data-theme] .chat-pin-card .conversation-row .row-title { font-size: 14px; }
html[data-theme] .chat-pin-card .conversation-row .row-time { display: none; }
html[data-theme] .chat-pin-card .conversation-row .row-title-line { height: auto; }
html[data-theme] .chat-pin-card .conversation-row .row-preview { height: auto; margin-top: 2px; font-size: 12px; }
html[data-theme] .chat-pin-card .conversation-row .row-meta .pin-indicator { display: none; }
html[data-theme] .chat-pin-card .conversation-row .unread-badge { min-width: 18px; height: 18px; padding: 0 5px; font-size: 10.5px; line-height: 18px; }
html[data-theme] .row-avatar-wrap { position: relative; display: inline-grid; flex: none; }
html[data-theme] .row-pin-badge { position: absolute; inset-inline-end: -4px; inset-block-end: -3px; display: grid; width: 18px; height: 18px; place-items: center; border-radius: 50%; color: var(--pf-fg2); background: var(--pf-glass2); box-shadow: 0 0 0 1.5px var(--pf-bg), 0 2px 4px rgba(0,0,0,.12); }
html[data-theme] .row-pin-badge svg { width: 11px; height: 11px; stroke-width: 2.3; }
/* 已归档：图标列与头像对齐，后面跟细线 */
html[data-theme] .chat-archive-row { display: flex; width: 100%; height: 44px; align-items: center; gap: 12px; margin-top: 6px; padding: 0; border-radius: 0; color: var(--pf-fg); background: transparent; font-size: 15px; text-align: start; box-shadow: inset 0 -.5px 0 var(--pf-line); }
html[data-theme] .chat-archive-row:hover { color: var(--pfs-pri-t); }
html[data-theme] .chat-archive-tile { display: grid; width: 52px; height: 44px; flex: none; place-items: center; margin: 0; border-radius: 0; color: var(--pf-fg2); background: transparent; }
html[data-theme] .chat-archive-tile svg { width: 21px; height: 21px; }
html[data-theme] .chat-archive-row b { color: inherit; font-weight: 700; }
html[data-theme] .chat-archive-count { margin-inline-start: auto; color: var(--pf-fg2); font-size: 13px; font-weight: 500; }
html[data-theme] .chat-archive-row .chevron { display: grid; color: var(--pf-fg3); }
/* 会话行：68 高、52 正圆头像 */
html[data-theme] .conversation-row .row-title-line { height: 21px; }
html[data-theme] .conversation-row .row-preview { height: 21px; }
html[data-theme] .conversation-row.has-unread .row-time { color: var(--pfs-pri-t); font-weight: 700; }
html[data-theme] .row-preview-sender { color: var(--pf-fg); font-style: normal; font-weight: 500; }
html[data-theme] .draft-preview-label { color: var(--pf-dan); font-weight: 700; }
html[data-theme] .conversation-row .row-meta { display: flex; flex: none; align-items: center; gap: 4px; }
html[data-theme] .mute-indicator { width: 14px; flex: 0 0 14px; color: var(--pf-fg3); }
html[data-theme] .mute-indicator svg { width: 14px; height: 14px; stroke-width: 2.2; }
html[data-theme] .pin-indicator { color: var(--pf-fg3); }
html[data-theme] .pin-indicator svg { width: 16px; height: 16px; }
/* 未读角标、@ 角标：带内高光的玻璃糖果 */
html[data-theme] .mention-list-indicator { display: grid; width: 21px; height: 21px; flex: 0 0 21px; place-items: center; border-radius: 50%; color: #fff; background: var(--pfs-candy); box-shadow: var(--pfs-candy-sh); }
html[data-theme] .mention-list-indicator svg { width: 13px; height: 13px; stroke-width: 2.6; }
html[data-theme] .conversation-row .unread-badge { min-width: 21px; height: 21px; padding: 0 6px; border-radius: 11px; color: #fff; background: var(--pfs-candy); box-shadow: var(--pfs-candy-sh); font: 800 11.5px/21px var(--pf-display); }
html[data-theme] .conversation-row.is-muted .unread-badge { color: #fff; background: var(--pf-mute); box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }

/* 会话长按 / 右键菜单：226 宽玻璃卡，44 高一行，危险操作前隔一条 7px 色带 */
html[data-theme] .conversation-action-layer .message-action-scrim { background: var(--pf-scrim); -webkit-backdrop-filter: blur(12px) saturate(1.3); backdrop-filter: blur(12px) saturate(1.3); }
html[data-theme] .conversation-action-menu { width: 226px; padding: 0; overflow: hidden; border: 0; border-radius: 22px; color: var(--pf-fg); background: var(--pf-glass2); -webkit-backdrop-filter: blur(24px) saturate(1.6); backdrop-filter: blur(24px) saturate(1.6); box-shadow: var(--pf-glass-in), var(--pf-sh3); }
html[data-theme] .conversation-action-menu .message-action-item { min-height: 44px; gap: 12px; padding: 0 16px; border: 0; color: var(--pf-fg); background: transparent; font-size: 15.5px; font-weight: 500; }
html[data-theme] .conversation-action-menu .message-action-item + .message-action-item { box-shadow: inset 0 .5px 0 var(--pf-line); }
html[data-theme] .conversation-action-menu .message-action-item:not(.danger) + .message-action-item.danger { border-top: 7px solid color-mix(in srgb, var(--pf-fg) 6%, transparent); box-shadow: none; }
html[data-theme] .conversation-action-menu .message-action-item svg { width: 20px; height: 20px; flex-basis: 20px; color: var(--pf-fg); }
html[data-theme] .conversation-action-menu .message-action-item:hover, html[data-theme] .conversation-action-menu .message-action-item:focus-visible { background: var(--pfs-hl); }
html[data-theme] .conversation-action-menu .message-action-item.danger, html[data-theme] .conversation-action-menu .message-action-item.danger svg { color: var(--pf-dan); }

/* ───────────── 联系人（图 5） ───────────── */
html[data-theme] .contact-search-pill { display: flex; width: 100%; height: 40px; align-items: center; gap: 8px; margin-top: 8px; padding: 0 14px; border-radius: 20px; color: var(--pf-fg3); font-size: 15px; text-align: start; }
html[data-theme] .contact-search-pill svg { width: 19px; height: 19px; flex: none; color: var(--pf-fg2); }
html[data-theme] .contact-search-pill span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-theme] .contact-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0 2px; }
html[data-theme] .contact-tile { display: flex; height: 64px; min-width: 0; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 0 6px; border-radius: 20px; color: var(--pf-fg); text-align: center; }
html[data-theme] .contact-tile b { max-width: 100%; overflow: hidden; font-size: 13px; font-weight: 700; line-height: 17px; text-overflow: ellipsis; white-space: nowrap; }
html[data-theme] .contact-tile-icon { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 10px !important; color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.35); -webkit-mask: none !important; mask: none !important; }
html[data-theme] .contact-tile-icon svg { width: 17px; height: 17px; stroke-width: 2.2; }
html[data-theme] .contact-tile.is-coral .contact-tile-icon { background: linear-gradient(150deg, #FFC37A, #FF8436); }
html[data-theme] .contact-tile.is-mint .contact-tile-icon { background: linear-gradient(150deg, #5BC0FF, #2F6BFF); }
html[data-theme] .contact-tile.is-lemon .contact-tile-icon { background: linear-gradient(150deg, #B49CFF, #6B48F5); }
html[data-theme] .contact-tile:hover { color: var(--pfs-pri-t); }
html[data-theme] .contact-tile:active { transform: scale(.97); }
html[data-theme] .contact-tile-badge { position: absolute; inset-block-start: 4px; inset-inline-start: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; color: #fff; background: var(--pfs-candy); box-shadow: var(--pfs-candy-sh); font: 800 10.5px/18px var(--pf-display); font-style: normal; text-align: center; }
html[data-theme] .contacts-page .section-caption { margin-top: 12px; }
html[data-theme] .contact-online-strip { display: flex; gap: 4px; margin: 0 -16px; padding: 4px 12px 2px; overflow-x: auto; scrollbar-width: none; --pfs-ring: var(--pf-bg); }
html[data-theme] .contact-online-strip::-webkit-scrollbar { display: none; }
html[data-theme] .contact-online-item { display: flex; width: 64px; flex: none; flex-direction: column; align-items: center; gap: 5px; padding: 4px 0; border-radius: 16px; color: var(--pf-fg2); background: transparent; font-size: 11.5px; font-weight: 500; }
html[data-theme] .contact-online-item .avatar { width: 46px; height: 46px; flex-basis: 46px; font-size: 17px; }
html[data-theme] .contact-online-item .presence { width: 13px; height: 13px; }
html[data-theme] .contact-online-item > span { max-width: 60px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 字母分组 + 右侧玻璃索引（滚动时停在原地） */
html[data-theme] .contact-az { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 20px; gap: 0 6px; align-items: start; }
html[data-theme] .contact-az > .contact-list-card { grid-row: 1; grid-column: 1; padding: 0; }
html[data-theme] .contact-az > .contact-letter-index { position: sticky; inset-block-start: calc(var(--pfs-head) + 12px); grid-row: 1; grid-column: 2; z-index: 2; display: flex; width: 20px; flex-direction: column; align-items: center; gap: 1px; padding: 7px 0; border-radius: 10px; margin-inline-end: -10px; }
html[data-theme] .contact-letter-index button { width: 16px; height: 13px; padding: 0; border-radius: 50%; color: var(--pf-fg2); background: transparent; font: 700 9.5px/13px var(--pf-display); }
html[data-theme] .contact-letter-index button:hover, html[data-theme] .contact-letter-index button:focus-visible { width: 15px; height: 15px; color: #fff; background: var(--pf-pri); font-size: 9px; line-height: 15px; }
html[data-theme] .contact-letter-head { display: flex; height: 24px; align-items: flex-end; margin-top: 6px; padding: 0 4px; color: var(--pf-fg2); font: 800 12.5px/1 var(--pf-display); letter-spacing: .04em; scroll-margin-top: calc(var(--pfs-head) + 4px); }
html[data-theme] .contact-list-card .contact-row { min-height: 56px; }
html[data-theme] .contact-row .avatar { width: 42px; height: 42px; flex-basis: 42px; font-size: 15px; }
html[data-theme] .contact-row .presence { width: 13px; height: 13px; }
html[data-theme] .contact-row .row-title { font-size: 15.5px; }
html[data-theme] .contact-row .row-preview { margin-top: 2px; color: var(--pf-fg2); font-size: 12.5px; }
html[data-theme] .contact-list-card .contact-row .chevron, html[data-theme] .group-row .chevron { display: none; }
html[data-theme] .contact-list-card .contact-row:has(+ .contact-letter-head) .row-main, html[data-theme] .contact-list-card .contact-row:last-child .row-main { box-shadow: none; }
html[data-theme] .contact-letter { display: none; }

/* ───────────── 群聊列表 ───────────── */
html[data-theme] .group-row .row-preview { color: var(--pf-fg2); font-size: 13px; }

/* ───────────── 我的 / 设置（图 7） ───────────── */
html[data-theme] .profile-wrap { display: flex; flex-direction: column; gap: 7px; padding: max(12px, env(safe-area-inset-top)) 14px 28px; }
html[data-theme] .profile-card { display: block; overflow: hidden; padding: 12px 12px 0; border-radius: 26px; color: var(--pf-fg); }
html[data-theme] .profile-card-row { display: flex; min-width: 0; align-items: center; gap: 12px; }
html[data-theme] .profile-avatar-button, html[data-theme] .profile-avatar-wrap { flex: 0 0 62px; width: 62px; height: 62px; display: grid; place-items: center; }
html[data-theme] .profile-avatar { width: 58px; height: 58px; flex-basis: 58px; background: linear-gradient(140deg, #49C4FF, #4D5CFF 58%, #8A57FF); box-shadow: 0 0 0 2.5px var(--pf-bg), 0 0 0 4.5px var(--pf-pri), inset 0 1px 0 rgba(255,255,255,.35); font-size: 22px; }
html[data-theme] .profile-card:has(.vip-level-badge) .profile-avatar { box-shadow: 0 0 0 2.5px var(--pf-bg), 0 0 0 4.5px #F5B73A, inset 0 1px 0 rgba(255,255,255,.35); }
html[data-theme] .profile-card .presence { display: none; }
html[data-theme] .profile-card .camera-dot { width: 22px; height: 22px; inset-inline-end: -1px; inset-block-end: -1px; border: 2px solid var(--pf-bg); color: #fff; background: var(--pf-pri); }
html[data-theme] .profile-card .camera-dot svg { width: 11px; height: 11px; }
html[data-theme] .profile-info { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 1px; line-height: 1.3; }
html[data-theme] .profile-name-line { display: flex; min-width: 0; align-items: center; gap: 6px; padding: 0; color: var(--pf-fg); background: transparent; text-align: start; }
html[data-theme] .profile-name { overflow: hidden; color: var(--pf-fg); font-size: 19px; font-weight: 800; letter-spacing: -.01em; line-height: 24px; text-overflow: ellipsis; white-space: nowrap; }
html[data-theme] .profile-card .official-account-badge { color: var(--pf-vblue); }
html[data-theme] .profile-handle-line { display: flex; min-width: 0; max-width: 100%; flex-wrap: wrap; align-items: center; column-gap: 1px; }
html[data-theme] .profile-handle-line .profile-copy-field + .profile-copy-field::before { content: "·"; margin-inline-end: 3px; opacity: .8; }
html[data-theme] .profile-copy-field, html[data-theme] .profile-signature { margin: 0; padding: 0 2px; border-radius: 6px; color: var(--pf-fg2); background: transparent; font-size: 12.5px; font-variant-numeric: tabular-nums; }
html[data-theme] .profile-copy-field:hover, html[data-theme] .profile-copy-field:focus-visible, html[data-theme] .profile-signature:hover { color: var(--pfs-pri-t); background: var(--pfs-hl); }
html[data-theme] .profile-copy-field svg { width: 12px; height: 12px; opacity: .55; }
html[data-theme] .profile-signature { display: block; width: auto; max-width: 100%; margin-top: 1px; overflow: hidden; font-size: 12px; text-align: start; text-overflow: ellipsis; white-space: nowrap; -webkit-line-clamp: unset; }
html[data-theme] .profile-card-actions { display: flex; width: auto; height: auto; flex: none; flex-direction: row; align-self: center; gap: 4px; }
html[data-theme] .profile-card-actions .profile-chevron-button { width: 30px; height: 36px; flex-basis: 30px; border-radius: 12px; color: var(--pf-fg3); background: transparent; }
html[data-theme] .profile-card-actions .profile-chevron-button:hover { color: var(--pfs-pri-t); background: var(--pfs-hl); }
html[data-theme] .profile-stats { display: flex; height: 42px; align-items: center; gap: 4px; margin-top: 11px; box-shadow: inset 0 .5px 0 var(--pf-line2); }
html[data-theme] .profile-stat { display: inline-flex; min-width: 0; flex: 1; align-items: baseline; justify-content: center; gap: 4px; padding: 4px 6px; border-radius: 12px; color: var(--pf-fg2); background: transparent; font-size: 12.5px; }
html[data-theme] .profile-stat:hover { color: var(--pfs-pri-t); background: var(--pfs-hl); }
html[data-theme] .profile-stat b { color: var(--pf-fg); font: 800 15px/1 var(--pf-display); font-variant-numeric: tabular-nums; }
html[data-theme] .profile-stat span { font-size: 12px; font-weight: 500; }
/* 外观卡：强调色色板 + 浅 / 深 / 跟随系统分段（选中是透镜） */
html[data-theme] .profile-appearance-card { display: grid; gap: 10px; margin: 0; padding: 10px 10px 10px; border-radius: 20px; }
html[data-theme] .profile-accent-head { display: flex; align-items: center; gap: 4px; padding: 0 4px; color: var(--pf-fg3); }
html[data-theme] .profile-accent-head > svg { width: 16px; height: 16px; flex: none; }
html[data-theme] .profile-appearance-copy { display: flex; min-width: 0; flex: 1; align-items: baseline; gap: 8px; padding: 0; color: var(--pf-fg); background: transparent; text-align: start; }
html[data-theme] .profile-appearance-copy b { font-size: 13.5px; font-weight: 700; line-height: 18px; }
html[data-theme] .profile-appearance-copy span { color: var(--pf-fg2); font-size: 11.5px; line-height: 15px; }
html[data-theme] .profile-accent-dots { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 0 4px; }
html[data-theme] .profile-accent-dot { display: grid; width: 26px; height: 26px; flex: none; place-items: center; padding: 0; border-radius: 50%; color: #fff; background: var(--c); box-shadow: inset 0 1px 0 rgba(255,255,255,.35); transition: box-shadow .2s; }
html[data-theme] .profile-accent-dot svg { width: 14px; height: 14px; stroke-width: 3; opacity: 0; }
html[data-theme] .profile-accent-dot.is-selected { box-shadow: 0 0 0 2px var(--pf-bg), 0 0 0 4px var(--c), inset 0 1px 0 rgba(255,255,255,.35); }
html[data-theme] .profile-accent-dot.is-selected svg { opacity: 1; }
html[data-theme] .profile-theme-options { display: flex; gap: 0; padding: 3px; border-radius: 19px; background: color-mix(in srgb, var(--pf-sf3) 60%, transparent); }
html[data-theme] .profile-theme-option { display: flex; min-width: 0; height: 32px; flex: 1; align-items: center; justify-content: center; gap: 5px; padding: 0 6px; border-radius: 16px; color: var(--pf-fg2); background: transparent; font-size: 12.5px; font-weight: 700; transition: background-color .2s, color .2s; }
html[data-theme] .profile-theme-option.is-selected { color: var(--pf-pri); background: var(--pf-lens); box-shadow: var(--pf-lens-sh); }
html[data-theme] .profile-theme-option svg { width: 15px; height: 15px; flex: none; }
html[data-theme] .profile-theme-option span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-theme] .profile-grid-caption { height: 19px; margin: 4px 6px 0; padding: 0; color: var(--pf-fg2); font-size: 11.5px; font-weight: 800; letter-spacing: .06em; line-height: 15px; }
/* 两列玻璃设置格（「我的」、群资料共用）：彩色渐变圆角方块图标 */
html[data-theme] .settings-grid, html[data-theme] .group-info-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
html[data-theme] .settings-grid:empty { display: none; }
html[data-theme] .settings-tile { display: flex; min-width: 0; min-height: 46px; align-items: center; gap: 7px; margin: 0; padding: 8px 9px; border-radius: 16px; color: var(--pf-fg); font-weight: 400; text-align: start; }
html[data-theme] .settings-tile:hover { background: var(--pf-sf); }
html[data-theme] .settings-tile:active { transform: scale(.98); }
html[data-theme] .settings-tile.is-wide { grid-column: 1 / -1; }
html[data-theme] .settings-tile-icon { display: grid; width: 28px; height: 28px; flex: none; place-items: center; border-radius: 9px !important; color: #fff; background: linear-gradient(150deg, #5BC0FF, #2F6BFF); box-shadow: inset 0 1px 0 rgba(255,255,255,.35); -webkit-mask: none !important; mask: none !important; }
html[data-theme] .settings-tile-icon svg { width: 16px; height: 16px; stroke-width: 2.2; }
html[data-theme] .settings-tile-icon.tone-1 { background: linear-gradient(150deg, #5BC0FF, #2F6BFF); }
html[data-theme] .settings-tile-icon.tone-2 { background: linear-gradient(150deg, #B49CFF, #6B48F5); }
html[data-theme] .settings-tile-icon.tone-3 { background: linear-gradient(150deg, #FFC37A, #FF8436); }
html[data-theme] .settings-tile-icon.tone-4 { background: linear-gradient(150deg, #FF9AA8, #F0435E); }
html[data-theme] .settings-tile-icon.tone-5 { background: linear-gradient(150deg, #6EE5C0, #12A97B); }
html[data-theme] .settings-tile-icon.tone-6 { background: linear-gradient(150deg, #9AA3B6, #59627A); }
html[data-theme] .settings-tile-icon.tone-7 { background: linear-gradient(150deg, #6FE3F5, #0E9DC0); }
html[data-theme] .settings-tile-icon.tone-8 { background: linear-gradient(150deg, #F7A6D8, #D2449A); }
html[data-theme] .settings-tile-copy { display: grid; min-width: 0; flex: 1; line-height: 1.22; }
html[data-theme] .settings-tile-copy strong { overflow: hidden; font-size: 13.5px; font-weight: 700; line-height: 17px; text-overflow: ellipsis; white-space: nowrap; }
html[data-theme] .settings-tile-copy small, html[data-theme] .settings-tile-copy .menu-value { display: flex; max-width: 100%; overflow: hidden; color: var(--pf-fg2); font-size: 11.5px; line-height: 15px; text-overflow: ellipsis; white-space: nowrap; }
html[data-theme] .settings-tile-copy small.is-on { color: var(--pf-min); font-weight: 700; }
html[data-theme] .settings-tile-copy .current-language-flag { display: none; }
/* 退出登录：整行玻璃，红字居中 */
html[data-theme] .logout-button.settings-tile { min-height: 44px; justify-content: center; gap: 7px; margin-top: 2px; border-radius: 22px; color: var(--pf-dan); }
html[data-theme] .logout-button.settings-tile:hover { background: var(--pf-sf); }
html[data-theme] .logout-button .settings-tile-icon { width: auto; height: auto; color: var(--pf-dan); background: transparent !important; box-shadow: none; }
html[data-theme] .logout-button .settings-tile-icon svg { width: 18px; height: 18px; }
html[data-theme] .logout-button .settings-tile-copy { flex: none; }
html[data-theme] .logout-button .settings-tile-copy strong { color: var(--pf-dan); font-size: 15px; }
html[data-theme] .logout-button .settings-tile-copy small { display: none; }
/* 网页多开账号卡 */
html[data-theme] .menu-card { overflow: hidden; margin-top: 0; border-radius: 20px; }
html[data-theme] .menu-item { min-height: 50px; gap: 10px; padding: 0 12px; color: var(--pf-fg); }
html[data-theme] .menu-item + .menu-item { border: 0; box-shadow: inset 0 .5px 0 var(--pf-line); }
html[data-theme] .menu-icon { display: grid; width: 28px; height: 28px; flex-basis: 28px; place-items: center; border-radius: 9px; color: #fff; background: linear-gradient(150deg, #5BC0FF, #2F6BFF); box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
html[data-theme] .menu-label { font-weight: 700; }
html[data-theme] .menu-value { color: var(--pf-fg2); }
html[data-theme] .web-accounts-title { padding: 10px 14px 2px; color: var(--pf-fg2); font-size: 11.5px; font-weight: 800; letter-spacing: .06em; }
html[data-theme] .web-account-row { border: 0; }
html[data-theme] .web-account-main { min-height: 50px; gap: 8px; padding: 0 12px; }
html[data-theme] .web-account-avatar { width: 32px; height: 32px; flex-basis: 32px; font-size: 13px; }
html[data-theme] .web-account-name strong { font-weight: 700; }
html[data-theme] .web-account-name small { color: var(--pf-fg2); }
html[data-theme] .web-account-current, html[data-theme][data-accent] .web-account-current { height: 26px; padding: 0 10px; border-radius: 13px; color: var(--pfs-pri-t); background: var(--pfs-hl); font-size: 12px; font-weight: 700; line-height: 26px; }
html[data-theme] .web-account-unread { color: #fff; background: var(--pfs-candy); box-shadow: var(--pfs-candy-sh); font: 800 11.5px/18px var(--pf-display); }
html[data-theme] .web-account-remove { width: 30px; height: 30px; border-radius: 50%; color: var(--pf-fg2); background: color-mix(in srgb, var(--pf-sf3) 60%, transparent); }
html[data-theme] .web-account-remove:hover { color: var(--pf-dan); background: var(--pf-dan-c); }
html[data-theme] .web-account-add .menu-icon { color: var(--pf-fg2); background: color-mix(in srgb, var(--pf-sf3) 70%, transparent); box-shadow: none; font-size: 18px; font-weight: 500; }
html[data-theme] .logout-button:not(.settings-tile) { border: 0; border-radius: 999px; color: var(--pf-dan); background: var(--pf-dan-c); }

/* 设置弹窗（profile.js）、隐私与安全（privacy-settings.js）等：iOS 式分组玻璃卡 + 彩色方块图标 */
html[data-theme] .settings-menu-card { display: grid; gap: 0; overflow: hidden; border-radius: 20px; }
html[data-theme] .settings-menu-row { min-height: 52px; gap: 10px; padding: 8px 12px; border: 0; border-radius: 0; color: var(--pf-fg); background: transparent; }
html[data-theme] .settings-menu-row + .settings-menu-row { border: 0; box-shadow: inset 0 .5px 0 var(--pf-line); }
html[data-theme] .settings-menu-row:hover { background: color-mix(in srgb, var(--pf-sf) 70%, transparent); }
html[data-theme] .settings-menu-row .menu-icon { color: #fff; }
html[data-theme] .settings-menu-row:nth-child(8n+1) .menu-icon { background: linear-gradient(150deg, #5BC0FF, #2F6BFF); }
html[data-theme] .settings-menu-row:nth-child(8n+2) .menu-icon { background: linear-gradient(150deg, #FF9AA8, #F0435E); }
html[data-theme] .settings-menu-row:nth-child(8n+3) .menu-icon { background: linear-gradient(150deg, #FFC37A, #FF8436); }
html[data-theme] .settings-menu-row:nth-child(8n+4) .menu-icon { background: linear-gradient(150deg, #6FE3F5, #0E9DC0); }
html[data-theme] .settings-menu-row:nth-child(8n+5) .menu-icon { background: linear-gradient(150deg, #9AA3B6, #59627A); }
html[data-theme] .settings-menu-row:nth-child(8n+6) .menu-icon { background: linear-gradient(150deg, #B49CFF, #6B48F5); }
html[data-theme] .settings-menu-row:nth-child(8n+7) .menu-icon { background: linear-gradient(150deg, #6EE5C0, #12A97B); }
html[data-theme] .settings-menu-row:nth-child(8n) .menu-icon { background: linear-gradient(150deg, #F7A6D8, #D2449A); }
html[data-theme] .settings-menu-label, html[data-theme] .settings-menu-copy strong { font-weight: 700; }
html[data-theme] .settings-menu-copy small { color: var(--pf-fg2); }
html[data-theme] .settings-toggle-row.is-disabled:hover { background: transparent; }
html[data-theme] .settings-version { color: var(--pf-fg3); }

/* ───────────── 资料页（联系人详情等） ───────────── */
html[data-theme] .details-page { padding: 0 14px 28px; }
html[data-theme] .detail-list { overflow: hidden; margin-top: 8px; border-radius: 20px; }
html[data-theme] .detail-row, html[data-theme] .detail-primary-action, html[data-theme] .detail-danger-action, html[data-theme] .group-detail-summary { border: 0; color: var(--pf-fg); background: transparent; }
html[data-theme] .detail-list:not(.group-info-settings-grid) > .detail-row + .detail-row, html[data-theme] .detail-action-stack:not(.group-info-danger-zone) > * + * { box-shadow: inset 0 .5px 0 var(--pf-line); }
html[data-theme] .detail-row { min-height: 50px; padding: 10px 14px; }
html[data-theme] .detail-row > span { font-weight: 700; }
html[data-theme] .detail-row > strong { color: var(--pf-fg2); font-weight: 500; }
html[data-theme] .detail-row > i:not(.switch-control) { color: var(--pf-fg3); }
html[data-theme] .detail-row.danger > span { color: var(--pf-dan); }
html[data-theme] .detail-profile { margin-top: 4px; border-radius: 26px; }
html[data-theme] .detail-action-stack { overflow: hidden; margin-top: 8px; border-radius: 20px; }
html[data-theme] .detail-primary-action { color: var(--pfs-pri-t); font-weight: 700; }
html[data-theme] .detail-danger-action { color: var(--pf-dan); font-weight: 700; }
html[data-theme] .camera-dot { border-color: var(--pf-bg); background: var(--pf-pri); color: #fff; }

/* ───────────── 群资料（图 6） ───────────── */
/* 顶部只留左右两个悬浮玻璃钮（返回 / 编辑），标题隐藏，大头像居中 */
html[data-theme] #modal[data-modal-key="groupDetails"] .details-modal .modal-header { position: absolute; z-index: 4; inset-inline: 0; inset-block-start: 0; height: auto; min-height: 0; padding: calc(10px + env(safe-area-inset-top)) 14px 0; background: transparent; pointer-events: none; }
html[data-theme] #modal[data-modal-key="groupDetails"] .modal-header h2 { visibility: hidden; }
html[data-theme] #modal[data-modal-key="groupDetails"] .modal-header button { pointer-events: auto; }
html[data-theme] #modal[data-modal-key="groupDetails"] #modal-header-action { display: flex; justify-content: flex-end; }
html[data-theme] .group-info-edit { color: var(--pf-fg); }
html[data-theme] .group-info-page .group-detail-summary { display: flex; flex-direction: column; align-items: center; gap: 0; margin: 0 -14px; padding: calc(12px + env(safe-area-inset-top)) 64px 4px; background: transparent; text-align: center; }
html[data-theme] .group-detail-avatar-button { flex: none; width: 60px; height: 60px; border-radius: 50%; }
html[data-theme] .avatar.detail-group-avatar { width: 60px; height: 60px; flex-basis: 60px; font-size: 22px; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 10px 22px -10px rgba(255,100,60,.8); }
html[data-theme] .group-detail-avatar-button .camera-dot { width: 22px; height: 22px; inset-inline-end: -3px; inset-block-end: -3px; border-width: 2px; }
html[data-theme] .group-detail-avatar-button .camera-dot svg { width: 11px; height: 11px; }
html[data-theme] .group-detail-summary-copy { display: flex; min-width: 0; max-width: 100%; flex-direction: column; align-items: center; gap: 2px; margin-top: 8px; }
html[data-theme] .group-detail-summary-copy strong { max-width: 100%; overflow: hidden; font-size: 21px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
html[data-theme] .group-info-page .group-detail-status, html[data-theme] .group-detail-summary-copy span { color: var(--pf-fg2); font-size: 13px; }
html[data-theme] .group-public-id-copy { margin: 0; padding: 0 4px; border-radius: 6px; color: var(--pf-fg2); background: transparent; font-size: 13px; }
html[data-theme] .group-public-id-copy:hover { color: var(--pfs-pri-t); background: var(--pfs-hl); }
html[data-theme] .group-public-id-copy span { font-variant-numeric: tabular-nums; }
/* 四个玻璃快捷按钮 */
html[data-theme] .group-info-quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
html[data-theme] .group-info-quick { display: flex; min-width: 0; height: 52px; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 0 4px; border-radius: 18px; color: var(--pfs-pri-t); font-size: 12px; font-weight: 700; }
html[data-theme] .group-info-quick svg { width: 21px; height: 21px; stroke-width: 2; color: currentColor; }
html[data-theme] .group-info-quick span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-theme] .group-info-quick:hover { background: var(--pf-sf); }
html[data-theme] .group-info-quick:active { transform: scale(.97); }
/* 置顶消息卡（同设计稿「群公告」） */
html[data-theme] .group-info-pinned { display: grid; width: 100%; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 2px 6px; margin-top: 7px; padding: 10px 13px; border-radius: 20px; color: var(--pf-fg); text-align: start; }
html[data-theme] .group-info-pinned-icon { display: grid; width: auto; height: auto; place-items: center; border-radius: 0 !important; color: var(--pfs-pri-t); background: transparent; -webkit-mask: none !important; mask: none !important; }
html[data-theme] .group-info-pinned-icon svg { width: 15px; height: 15px; }
html[data-theme] .group-info-pinned-copy { display: grid; min-width: 0; }
html[data-theme] .group-info-pinned-copy b { color: var(--pf-fg2); font-size: 12px; font-weight: 800; line-height: 16px; }
html[data-theme] .group-info-pinned-copy span { overflow: hidden; color: var(--pf-fg); font-size: 13.5px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
html[data-theme] .group-info-pinned > svg { width: 16px; height: 16px; flex: none; color: var(--pf-fg3); }
/* 成员卡：人数 + 叠放头像 + 添加 / 移除 */
html[data-theme] .group-info-members { display: flex; min-height: 54px; align-items: center; gap: 10px; margin-top: 7px; padding: 6px 10px 6px 13px; border-radius: 20px; --pfs-ring: var(--pf-glass2); }
html[data-theme] .group-info-member-count { display: flex; min-width: 0; flex: 1; align-items: baseline; gap: 4px; padding: 6px 0; border-radius: 10px; color: var(--pf-fg); background: transparent; text-align: start; }
html[data-theme] .group-info-member-count b { font: 800 15px/1.2 var(--pf-display); font-variant-numeric: tabular-nums; }
html[data-theme] .group-info-member-count span { color: var(--pf-fg); font-size: 14.5px; font-weight: 700; }
html[data-theme] .group-info-member-count > strong { display: none; }
html[data-theme] .group-info-member-tiles { display: flex; min-width: 0; flex: none; justify-content: flex-end; gap: 0; overflow: visible; }
html[data-theme] .group-info-member-tile { position: relative; display: flex; width: auto; flex: none; flex-direction: column; align-items: center; gap: 0; margin-inline-start: -9px; padding: 0; border-radius: 50%; color: var(--pf-fg2); background: transparent; }
html[data-theme] .group-info-member-tile:first-child { margin-inline-start: 0; }
html[data-theme] .group-info-member-tile .avatar { width: 30px; height: 30px; flex-basis: 30px; font-size: 11px; box-shadow: 0 0 0 2px var(--pf-bg), inset 0 1px 0 rgba(255,255,255,.35); }
html[data-theme] .group-info-member-tile .presence { display: none; }
html[data-theme] .group-info-member-tile em { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
html[data-theme] .group-member-role-tag { position: absolute; inset-block-start: -6px; left: 50%; max-width: 40px; overflow: hidden; height: 12px; padding: 0 3px; border-radius: 6px; font-size: 8px; font-weight: 800; line-height: 12px; text-overflow: ellipsis; white-space: nowrap; transform: translateX(-50%); box-shadow: 0 0 0 1.5px var(--pf-bg); }
html[data-theme] .group-member-role-tag.is-owner { color: #6A4200; background: linear-gradient(135deg, #FFE9A8, #F5B73A); }
html[data-theme] .group-member-role-tag.is-admin { color: #fff; background: var(--pf-pri); }
html[data-theme] .group-info-member-tile.is-tool { margin-inline-start: 6px; }
html[data-theme] .group-info-member-tile.is-tool .group-info-member-icon { display: grid; width: 30px; height: 30px; flex: none; place-items: center; border: 0; border-radius: 50%; color: #fff; background: var(--pf-pri); box-shadow: 0 0 0 2px var(--pf-bg), inset 0 1px 0 rgba(255,255,255,.35); }
html[data-theme] .group-info-member-tile.is-tool.is-danger { margin-inline-start: 4px; }
html[data-theme] .group-info-member-tile.is-tool.is-danger .group-info-member-icon { color: var(--pf-dan); background: var(--pf-dan-c); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pf-dan) 30%, transparent); }
html[data-theme] .group-info-member-icon svg { width: 15px; height: 15px; stroke-width: 2.6; }
/* 共享媒体：一张玻璃卡里四个小胶囊 */
html[data-theme] .group-info-section-title { margin: 10px 6px 0; padding: 0; color: var(--pf-fg2); font-size: 11.5px; font-weight: 800; letter-spacing: .06em; }
html[data-theme] .group-info-media-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin: 6px 0 0; padding: 8px; border-radius: 20px; }
html[data-theme] .group-info-media-tab { display: flex; min-width: 0; height: 32px; flex-direction: row; align-items: center; justify-content: center; gap: 4px; padding: 0 6px; border-radius: 10px; color: var(--pf-fg2); background: var(--pf-glass2); box-shadow: inset 0 0 0 .5px var(--pf-line); font-size: 12px; font-weight: 700; }
html[data-theme] .group-info-media-tab svg { width: 15px; height: 15px; flex: none; stroke-width: 2.1; color: var(--pfs-pri-t); }
html[data-theme] .group-info-media-tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-theme] .group-info-media-tab:hover { color: var(--pfs-pri-t); background: var(--pf-sf); }
/* 设置网格里的 detail-row：彩色方块图标 + 标题 / 当前值两行 + 右侧绿色开关 */
html[data-theme] .group-info-settings-grid { overflow: visible; margin: 6px 0 0; border-radius: 0; background: transparent; box-shadow: none; }
html[data-theme] .group-info-settings-grid > .detail-row { display: grid; min-width: 0; min-height: 46px; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto auto; align-content: center; align-items: center; gap: 0 7px; padding: 8px 9px; border-radius: 16px; box-shadow: var(--pf-glass-in), var(--pf-glass-sh); }
html[data-theme] .group-info-settings-grid > .detail-row:hover { background: var(--pf-sf); }
html[data-theme] .group-info-settings-grid > .detail-row > .settings-tile-icon { grid-row: 1 / 3; grid-column: 1; }
html[data-theme] .group-info-settings-grid > .detail-row > span { grid-row: 1; grid-column: 2; overflow: hidden; font-size: 13.5px; font-weight: 700; line-height: 17px; text-overflow: ellipsis; white-space: nowrap; }
html[data-theme] .group-info-settings-grid > .detail-row:not(:has(> strong)) > span { grid-row: 1 / 3; }
html[data-theme] .group-info-settings-grid > .detail-row > strong { grid-row: 2; grid-column: 2; max-width: none; overflow: hidden; color: var(--pf-fg2); font-size: 11.5px; font-weight: 400; line-height: 15px; text-overflow: ellipsis; white-space: nowrap; }
html[data-theme] .group-info-settings-grid > .detail-row > i:not(.switch-control) { display: none; }
html[data-theme] .group-info-settings-grid > .detail-row > .switch-control { grid-row: 1 / 3; grid-column: 3; flex-basis: 36px; width: 36px; height: 22px; }
html[data-theme] .group-info-settings-grid > .detail-row > .switch-control::after { width: 18px; height: 18px; }
html[data-theme] .group-info-settings-grid > .detail-row > input:checked + .switch-control::after { inset-inline-start: 16px; width: 18px; height: 18px; }
html[data-theme] .group-info-settings-grid > .detail-row > input { position: absolute; opacity: 0; pointer-events: none; }
html[data-theme] .group-info-settings-grid > .detail-row:not(.grid-row) { padding-inline-start: 13px; }
html[data-theme] .group-info-settings-grid > .detail-row:not(.grid-row) > span { grid-column: 1 / 3; }
html[data-theme] .group-info-settings-grid > .detail-row:not(.grid-row) > strong { grid-column: 1 / 3; }
html[data-theme] .group-info-settings-grid > .safety-report-row { grid-column: 1 / -1; }
/* 底部：清空聊天记录（玻璃红字）/ 退出群聊（实心红） */
html[data-theme] .group-info-danger-zone { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; overflow: visible; border-radius: 0; background: transparent; box-shadow: none; }
html[data-theme] .group-info-danger-zone > button { display: flex; min-width: 0; min-height: 46px; height: 46px; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; border: 0; border-radius: 23px; font-size: 14.5px; font-weight: 700; }
html[data-theme] .group-info-danger-zone > * + * { box-shadow: none; }
html[data-theme] .group-info-danger-zone > button > span { min-width: 0; flex: none; overflow: hidden; color: inherit; text-overflow: ellipsis; white-space: nowrap; }
html[data-theme] .group-info-danger-zone > button svg { width: 18px; height: 18px; flex: none; stroke-width: 2.1; }
html[data-theme] .group-info-danger-zone .group-info-clear { color: var(--pf-dan); }
html[data-theme] .group-info-danger-zone .group-info-clear > span { color: var(--pf-dan); }
html[data-theme] .group-info-danger-zone .detail-danger-action { color: #fff; background: var(--pf-dan); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 10px 20px -12px var(--pf-dan); }

/* 群管理（group-admin.js）各子页：分组玻璃卡 */
html[data-theme] .ga-section, html[data-theme] .group-info-members.ga-section { display: block; margin-top: 8px; overflow: hidden; padding: 0; border-radius: 20px; }
html[data-theme] .ga-section > .group-info-section-title { margin: 12px 14px 4px; }
html[data-theme] .ga-page .detail-row { color: var(--pf-fg); background: transparent; }
html[data-theme] .ga-section > .detail-row + .detail-row { box-shadow: inset 0 .5px 0 var(--pf-line); }
html[data-theme] .ga-row-icon { display: grid; width: 28px; height: 28px; flex: none; place-items: center; border-radius: 9px; color: #fff; background: linear-gradient(150deg, #5BC0FF, #2F6BFF); box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
html[data-theme] .ga-row-icon svg { width: 16px; height: 16px; stroke-width: 2.2; }
html[data-theme] .ga-section:nth-of-type(3n+2) .ga-row-icon { background: linear-gradient(150deg, #6EE5C0, #12A97B); }
html[data-theme] .ga-section:nth-of-type(3n) .ga-row-icon { background: linear-gradient(150deg, #B49CFF, #6B48F5); }
html[data-theme] .group-info-member-row { border: 0; background: transparent; }
html[data-theme] .group-info-member-row + .group-info-member-row { box-shadow: inset 0 .5px 0 var(--pf-line); }
html[data-theme] .group-info-member-row:hover { background: color-mix(in srgb, var(--pf-sf) 70%, transparent); }
html[data-theme] .group-member-role { padding: 1px 6px; border-radius: 6px; color: var(--pfs-pri-t); background: var(--pf-pri-c); font-size: 10.5px; font-style: normal; font-weight: 700; }
html[data-theme] .group-info-member-copy small.is-online { color: var(--pf-min); font-weight: 700; }
html[data-theme] .member-tile .avatar { border-radius: 50%; }

/* ───────────── 手机宽度：底部弹层（顶部 32 圆角 + 拖动把手） ───────────── */
@media (max-width: 600px), (max-width: 920px) and (max-height: 600px) and (orientation: landscape) {
  html[data-theme] .app-shell { border-radius: 0; box-shadow: none; }
  html[data-theme] .modal-card { border-radius: 32px 32px 0 0; }
  html[data-theme] .modal-card:not(.details-modal) .modal-header::before { content: ""; position: absolute; inset-block-start: 6px; left: 50%; width: 36px; height: 5px; margin-left: -18px; border-radius: 3px; background: var(--pf-fg3); opacity: .45; pointer-events: none; }
  html[data-theme] .modal-card.details-modal { border-radius: 0; }
}

/* 矮屏：登录页图标缩小 */
@media (max-height: 740px) {
  html[data-theme] .auth-hero { margin-top: 12px; }
  html[data-theme] .auth-logo { width: 76px; height: 76px; border-radius: 24px; }
  html[data-theme] .auth-logo-face { transform: scale(.8); }
  html[data-theme] .auth-wordmark { margin-top: 12px; font-size: 34px; }
  html[data-theme] .auth-heading { margin: 6px 0 20px; }
}
@media (max-height: 620px) {
  html[data-theme] .auth-logo { display: none; }
  html[data-theme] .auth-wordmark { margin-top: 0; }
}

/* 电脑宽度：保持现有的居中单栏卡片，只换 D 的视觉；外框四角 32，背后是光斑。 */
@media (min-width: 601px) {
  html[data-theme] .app-shell { border-radius: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  html[data-theme] .nav-fab-menu, html[data-theme] .modal-card { animation: none; }
}

/* 群管理页的保存按钮在右上角（✓），用主色突出；底部按钮区在详情弹窗里是隐藏的。 */
html[data-theme] #modal-header-action .ga-save-button { color: var(--pf-on-pri); background: var(--pf-out); box-shadow: var(--pf-glass-sh); }
html[data-theme] #modal-header-action .ga-save-button svg { width: 22px; height: 22px; stroke-width: 2.4; }
html[data-theme] #modal-header-action .ga-save-button:disabled { opacity: .5; }


/* 置顶会话拖动排序（modules/pin-reorder.js）：长按浮起、拖动时的浮起卡片和插入位置占位。 */
.chat-pin-card .conversation-row.is-pinned, .conversation-row.is-pinned { -webkit-touch-callout: none; }
html.is-pin-reordering, html.is-pin-reordering * { cursor: grabbing !important; -webkit-user-select: none !important; user-select: none !important; }
.conversation-row.is-reorder-lifted { z-index: 2; transform: scale(1.03); box-shadow: 0 14px 30px -14px rgba(0,0,0,.45); transition: transform .16s ease, box-shadow .16s ease; }
.conversation-row.pin-reorder-ghost {
  position: fixed !important; z-index: 80; margin: 0 !important; pointer-events: none; will-change: transform;
  border-radius: 20px; background: var(--pf-sf, #fff) !important; opacity: .97;
  box-shadow: 0 22px 44px -16px rgba(0,0,0,.5), 0 0 0 1.5px color-mix(in srgb, var(--pf-pri, #2b6bff) 55%, transparent) !important;
  transition: none !important;
}
.conversation-row.is-reorder-placeholder { background: color-mix(in srgb, var(--pf-pri, #2b6bff) 10%, transparent) !important; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--pf-pri, #2b6bff) 60%, transparent) !important; border-radius: 20px; }
.conversation-row.is-reorder-placeholder > *, .conversation-row.is-reorder-placeholder::before { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .conversation-row.is-reorder-lifted { transition: none; }
}
