/* ============================================
   Account System UI Components
   头像区、同步状态徽章（被存档管理器复用）、账户中心 stage
   ============================================ */

/* --- Account Avatar (shared across launcher + header) --- */
.account-avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--account-avatar-md);
  height: var(--account-avatar-md);
  border-radius: var(--account-avatar-radius);
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.account-avatar:hover {
  transform: scale(1.06);
}

.account-avatar--sm {
  width: var(--account-avatar-sm);
  height: var(--account-avatar-sm);
}

.account-avatar--lg {
  width: var(--account-avatar-lg);
  height: var(--account-avatar-lg);
}

.account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-avatar .material-icons,
.account-avatar .material-symbols-outlined {
  font-size: var(--text-display);
  color: color-mix(in srgb, var(--text-invert) 84%, transparent);
}

.account-avatar--sm .material-icons,
.account-avatar--sm .material-symbols-outlined {
  font-size: var(--text-title);
}

/* Avatar default guest background */
.account-avatar--guest {
  background: color-mix(in srgb, var(--account-badge-guest-bg) 78%, var(--surface-glass) 22%);
  border: 1.5px solid color-mix(in srgb, var(--text-invert) 18%, transparent);
}

/* Avatar signed-in state */
.account-avatar--signed-in {
  border: 1.5px solid color-mix(in srgb, var(--status-success) 48%, transparent);
}

/* Avatar premium border */
.account-avatar--premium {
  border: 2px solid color-mix(in srgb, var(--brand-accent-strong) 66%, transparent);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--brand-accent) 20%, transparent),
    var(--shadow-sm);
}

/* Online status dot */
.account-status-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 8px;
  height: 8px;
  border-radius: var(--radius-circle);
  background: var(--status-success);
  border: 1.5px solid var(--surface-main);
}

.account-status-dot--offline {
  background: var(--text-soft);
}

/* --- Account Badge (VIP/Pro chip) --- */
.account-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.04em;
  line-height: 1.5;
  white-space: nowrap;
}

.account-badge--guest {
  background: var(--account-badge-guest-bg);
  color: var(--account-badge-guest-text);
}

.account-badge--pro {
  background: var(--account-badge-pro-bg);
  color: var(--account-badge-pro-text);
  border: 1px solid var(--account-badge-pro-border);
}

/* --- Account Sync Status Badge（getSyncBadgeHtml 产出，存档管理器消费）--- */
.account-sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  line-height: 1.4;
  white-space: nowrap;
}

.account-sync-badge .material-symbols-outlined {
  font-size: var(--text-body);
}

.account-sync-badge--local {
  background: var(--account-sync-local-bg);
  color: var(--account-sync-local-text);
}

.account-sync-badge--ready {
  background: var(--account-sync-ready-bg);
  color: var(--account-sync-ready-text);
}

.account-sync-badge--synced {
  background: var(--account-sync-done-bg);
  color: var(--account-sync-done-text);
}

.account-sync-badge--conflict {
  background: var(--account-sync-conflict-bg);
  color: var(--account-sync-conflict-text);
}

.account-sync-time {
  margin-left: var(--space-xs);
  font-size: var(--text-caption);
  color: var(--text-soft);
}

/* ============================================
   账户中心 stage（Claude Design 方向 A · 创作者档案）
   渲染进 .stage-pane[data-stage-pane="account"] > #account-stage-host
   ============================================ */
.account-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface-page);
  overflow: hidden;
}
/* v3.7.10 Step 2：account-host 私有容器名已废，统一改用 .stage-pane / .stage-pane-side
   的命名容器 `stage`（见 app.css）。下方 @container stage (max-width: 480px) 规则
   会跟随 pane 自身宽度触发。 */

/* 设计稿的衬线识别（ACC_SERIF）：标题 / 大数字 / 名字 / 书名号 / 子页标题。
   = 项目 --font-narrative（Noto Serif SC），token 安全，还原设计排版气质 */
.acct-avatar__ch,
.acct-profile-name,
.acct-profile-bio,
.acct-stat__v,
.acct-row__title,
.acct-thumb__ch,
.acct-hero__num b,
.acct-model-row__badge,
.acct-model-row__rate b,
.acct-topup__total,
.acct-topup__badge-num,
.acct-topup__cta,
.acct-order-row__sign,
.acct-order-row__delta,
.acct-subpage__title,
.acct-sheet__title,
.acct-help-success__t,
.acct-kpi__v b,
.acct-rec-row__delta,
.acct-empty__t {
  font-family: var(--font-narrative);
}

/* ---- subtabs（世界卡 / 个人信息 / 算力余额）---- */
.acct-subtabs {
  display: flex;
  flex-shrink: 0;
  padding: 0 14px;
  background: var(--surface-page);
  border-bottom: 1px solid var(--border-soft);
}

.acct-subtab {
  position: relative;
  appearance: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 9px 14px 11px;
  font-size: var(--text-body-sm);
  font-weight: var(--weight-medium);
  letter-spacing: 0.04em;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color var(--transition-fast);
}

.acct-subtab.is-active {
  color: var(--text-main);
  font-weight: var(--weight-semibold);
}

.acct-subtab.is-active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand-accent);
}

/* ---- 滚动主体 ---- */
.acct-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: var(--surface-page);
}

.acct-pad {
  padding: 12px 14px;
}

/* ---- 通用卡片 / 行 ---- */
.acct-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.acct-card + .acct-card {
  margin-top: 10px;
}

.acct-section-title {
  padding: 0 4px;
  margin: 0 0 7px;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.16em;
  color: var(--text-muted);
}

.acct-section-title:not(:first-child) {
  margin-top: 16px;
}

.acct-section-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 2px 9px;
}

.acct-section-head__title {
  font-size: var(--text-body-sm);
  font-weight: var(--weight-bold);
  letter-spacing: 0.14em;
  color: var(--text-soft);
}

.acct-section-head__sub {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* 强调副标：与 title 等大、红色。用于「计费单价 · 1元=1000沙粒」这种价格挂钩展示 */
.acct-section-head__sub--accent {
  font-size: var(--text-body-sm);
  font-weight: var(--weight-bold);
  color: var(--status-danger);
}

.acct-section-head__spacer {
  flex: 1;
}

.acct-link-btn {
  appearance: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.acct-link-btn .material-symbols-outlined {
  font-size: var(--text-body);
}

/* ---- 段控（segmented）---- */
.acct-seg {
  display: flex;
  padding: 3px;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  box-shadow: var(--shadow-inset);
}

.acct-seg__btn {
  flex: 1;
  appearance: none;
  border: none;
  cursor: pointer;
  padding: 7px 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-soft);
  font-size: var(--text-body-sm);
  font-weight: var(--weight-medium);
  letter-spacing: 0.06em;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.acct-seg__btn.is-active {
  background: var(--text-main);
  color: var(--text-invert);
  font-weight: var(--weight-semibold);
}

/* ---- 概览三联 / 四联 ---- */
.acct-stat-row {
  display: flex;
  background: var(--surface-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 11px 0;
  margin-bottom: 12px;
}

.acct-stat {
  flex: 1;
  text-align: center;
  border-right: 1px solid var(--border-soft);
}

.acct-stat:last-child {
  border-right: none;
}

.acct-stat__v {
  font-size: var(--text-title);
  font-weight: var(--weight-semibold);
  color: var(--text-main);
}

.acct-stat__l {
  margin-top: 2px;
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.acct-stats4 {
  display: flex;
  margin-top: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

/* ---- 新建世界卡 ---- */
.acct-new-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 13px;
  margin-bottom: 10px;
  background: var(--surface-elevated);
  border: 1px dashed color-mix(in srgb, var(--brand-accent) 40%, transparent);
  border-radius: var(--radius-lg);
  color: var(--brand-accent);
  cursor: pointer;
  width: 100%;
  text-align: left;
  font: inherit;
}

.acct-new-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--brand-accent) 14%, transparent);
}

.acct-new-card__label {
  flex: 1;
  font-size: var(--text-body-sm);
  font-weight: var(--weight-semibold);
}

/* ---- 缩略色块（mock 装饰，tone 走品牌 token 轮转）---- */
.acct-thumb {
  position: relative;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 4px;
}

/* 设计稿缩略图 45° 斜纹（仅大尺寸；记录行小缩略图无纹理）*/
.acct-thumb:not(.acct-thumb--sm)::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    color-mix(in srgb, var(--surface-page) 65%, transparent) 0 1px,
    transparent 1px 6px
  );
  opacity: 0.25;
  pointer-events: none;
}

.acct-thumb--sm {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-xs);
  align-items: center;
  justify-content: center;
  padding: 0;
}

.acct-thumb__ch {
  position: relative;
  font-weight: var(--weight-bold);
  letter-spacing: 0.06em;
  color: var(--text-invert);
  font-size: var(--text-body-sm);
}

.acct-tone-1 { background: linear-gradient(135deg, var(--brand-primary), color-mix(in srgb, var(--brand-primary) 60%, transparent)); }
.acct-tone-2 { background: linear-gradient(135deg, var(--brand-accent), color-mix(in srgb, var(--brand-accent) 60%, transparent)); }
.acct-tone-3 { background: linear-gradient(135deg, var(--brand-purple), color-mix(in srgb, var(--brand-purple) 60%, transparent)); }
.acct-tone-4 { background: linear-gradient(135deg, var(--status-success), color-mix(in srgb, var(--status-success) 60%, transparent)); }
.acct-tone-5 { background: linear-gradient(135deg, var(--status-warning), color-mix(in srgb, var(--status-warning) 60%, transparent)); }
.acct-tone-6 { background: linear-gradient(135deg, var(--brand-secondary), color-mix(in srgb, var(--brand-secondary) 60%, transparent)); }
.acct-tone-7 { background: linear-gradient(135deg, var(--brand-brown), color-mix(in srgb, var(--brand-brown) 60%, transparent)); }

/* ---- 列表行：已发布 / 已购买 ---- */
.acct-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--border-soft);
}

.acct-row:last-child {
  border-bottom: none;
}

.acct-row__main {
  flex: 1;
  min-width: 0;
}

.acct-row__titleline {
  display: flex;
  align-items: center;
  gap: 6px;
}

.acct-row__title {
  font-weight: var(--weight-semibold);
  font-size: var(--text-body);
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acct-pill {
  flex-shrink: 0;
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.08em;
}

.acct-pill--ok { color: var(--status-success); background: color-mix(in srgb, var(--status-success) 14%, transparent); }
.acct-pill--draft { color: var(--status-warning); background: color-mix(in srgb, var(--status-warning) 16%, transparent); }
.acct-pill--off { color: var(--text-muted); background: var(--surface-soft); }
.acct-pill--accent { color: var(--brand-accent); background: color-mix(in srgb, var(--brand-accent) 14%, transparent); }

.acct-row__meta {
  margin-top: 2px;
  font-size: var(--text-xs);
  color: var(--text-muted);
  display: flex;
  gap: 8px;
}

.acct-row__stats {
  margin-top: 4px;
  font-size: var(--text-xs);
  color: var(--text-soft);
  display: flex;
  gap: 11px;
}

.acct-row__stats .is-like {
  color: var(--brand-accent);
}

.acct-icon-btn {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--text-soft);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.acct-icon-btn .material-symbols-outlined {
  font-size: var(--text-body);
}

.acct-progress {
  margin-top: 6px;
  height: 3px;
  border-radius: 2px;
  background: var(--surface-soft);
  overflow: hidden;
}

.acct-progress__fill {
  height: 100%;
  border-radius: 2px;
  background: var(--brand-accent);
}

.acct-progress__fill--done {
  background: var(--status-success);
}

.acct-progress-label {
  margin-top: 3px;
  font-size: var(--text-xs);
  color: var(--text-soft);
}

.acct-cta-sm {
  flex-shrink: 0;
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  background: var(--surface-elevated);
  color: var(--text-soft);
  border: 1px solid var(--border-medium);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  white-space: nowrap;
}

.acct-cta-sm--accent {
  background: var(--brand-accent);
  color: var(--text-invert);
  border-color: transparent;
}

.acct-foot-link {
  text-align: center;
  padding: 12px 0 4px;
  font-size: var(--text-body-sm);
  color: var(--text-soft);
  letter-spacing: 0.04em;
}

.acct-foot-ver {
  text-align: center;
  padding: 18px 0 8px;
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

/* ---- 个人信息：banner + 头像 + 资料 ---- */
.acct-banner {
  position: relative;
  height: 124px;
  overflow: hidden;
  background:
    repeating-linear-gradient(125deg, color-mix(in srgb, var(--text-invert) 12%, transparent) 0 1px, transparent 1px 14px),
    linear-gradient(135deg, var(--status-success) 0%, var(--text-main) 60%, var(--brand-accent) 130%);
}

.acct-banner__edit {
  position: absolute;
  right: 12px;
  top: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--text-invert) 18%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--text-invert);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  border: none;
  cursor: pointer;
}

.acct-banner__edit .material-symbols-outlined {
  font-size: var(--text-body);
}

.acct-profile-wrap {
  padding: 0 16px;
  margin-top: -38px;
}

.acct-avatar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  border-radius: var(--radius-circle);
  overflow: hidden;
  color: var(--text-invert);
  font-weight: var(--weight-bold);
  letter-spacing: 0.06em;
  background: linear-gradient(140deg, var(--status-success) 0%, var(--status-warning) 60%, var(--brand-accent) 100%);
  box-shadow: 0 0 0 3px var(--surface-elevated), var(--shadow-md);
}

.acct-avatar__ch {
  position: relative;
  z-index: 1;
  font-size: 32px;
}

.acct-avatar--sheet {
  width: 60px;
  height: 60px;
}

.acct-avatar--sheet .acct-avatar__ch {
  font-size: 25px;
}

.acct-profile-name {
  font-size: var(--text-heading);
  font-weight: var(--weight-semibold);
  color: var(--text-main);
  margin-top: 10px;
}

.acct-profile-sub {
  margin-top: 1px;
  font-size: var(--text-body-sm);
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.acct-profile-bio {
  margin-top: 7px;
  font-size: var(--text-body-sm);
  color: var(--text-soft);
  line-height: 1.55;
}

/* ---- 设置列表行 ---- */
.acct-setting-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  width: 100%;
  text-align: left;
  background: transparent;
  border-left: none;
  border-right: none;
  border-top: none;
  font: inherit;
}

.acct-setting-row:last-child {
  border-bottom: none;
}

.acct-setting-row__icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-soft);
  color: var(--text-soft);
}

.acct-setting-row__icon .material-symbols-outlined {
  font-size: var(--text-body);
}

.acct-setting-row__icon--ok { background: color-mix(in srgb, var(--status-success) 14%, transparent); color: var(--status-success); }
.acct-setting-row__icon--accent { background: color-mix(in srgb, var(--brand-accent) 14%, transparent); color: var(--brand-accent); }
.acct-setting-row__icon--danger { background: color-mix(in srgb, var(--status-danger) 14%, transparent); color: var(--status-danger); }

.acct-setting-row__label {
  flex: 1;
  font-size: var(--text-body);
  font-weight: var(--weight-medium);
  color: var(--text-main);
}

.acct-setting-row--danger .acct-setting-row__label {
  color: var(--status-danger);
}

.acct-setting-row__value {
  font-size: var(--text-body-sm);
  color: var(--text-muted);
}

.acct-setting-row__chev {
  color: var(--text-muted);
  display: flex;
}

.acct-setting-row__chev .material-symbols-outlined {
  font-size: var(--text-body);
}

/* ---- 余额 hero ---- */
.acct-hero {
  position: relative;
  overflow: hidden;
  background: var(--surface-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  padding: 18px 18px 16px;
}

.acct-hero__hg {
  position: absolute;
  right: -10px;
  top: -10px;
  bottom: -10px;
  width: 200px;
  opacity: 0.32;
  pointer-events: none;
  display: flex;
  align-items: center;
  z-index: 0;
}

.acct-hero__hg svg {
  display: block;
  width: 100%;
  height: auto;
}

/* 沙漏：玻璃壳 + 按余额比例填充的沙（token 安全，无硬编码色）*/
.acct-hg-bulb {
  fill: var(--surface-soft);
  stroke: var(--text-main);
  stroke-width: 3;
  stroke-linejoin: round;
}

.acct-hg-sand {
  fill: var(--status-warning);
}

.acct-hg-sand--b {
  fill: var(--brand-accent);
  opacity: 0.85;
}

.acct-hg-cap {
  stroke: var(--text-main);
  stroke-width: 3.5;
  stroke-linecap: round;
}

/* hero 散落沙粒 */
.acct-hero__dots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.acct-hero__dots .d-gold {
  fill: var(--status-warning);
}

.acct-hero__dots .d-ochre {
  fill: var(--brand-accent);
}

.acct-hero__body {
  position: relative;
  z-index: 2;
  width: 62%;
}

.acct-hero__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.22em;
  color: var(--text-muted);
}

.acct-hero__num {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 8px;
}

.acct-hero__num b {
  font-size: 50px;
  font-weight: var(--weight-semibold);
  color: var(--text-main);
  line-height: 1;
}

.acct-hero__num span {
  font-size: var(--text-subtitle);
  color: var(--text-muted);
  font-weight: var(--weight-medium);
}

.acct-hero__hint {
  margin-top: 8px;
  font-size: var(--text-body-sm);
  color: var(--text-muted);
}

.acct-hero__cta {
  position: relative;
  z-index: 2;
  margin-top: 16px;
  width: 100%;
  padding: 11px 0;
  border: none;
  border-radius: var(--radius-md);
  background: var(--text-main);
  color: var(--text-invert);
  font-size: var(--text-body);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.3em;
  cursor: pointer;
}

/* ---- 模型兑换率行 ---- */
.acct-model-row {
  position: relative; /* 让 rate-caption 绝对定位有锚 */
  display: flex;
  align-items: flex-start; /* 主区顶端对齐 → 名字往上一点点（不再竖向居中于较高的价格列）*/
  gap: 13px;
  padding: 16px 14px;
  border-bottom: 1px solid var(--border-soft);
}

.acct-model-row:last-child {
  border-bottom: none;
}

/* 「计费单价」只是价格展示，整行不可点（无 :hover、无 cursor、无 active 态）。
   选模型走 设置 · API 设置。 */

.acct-model-row__badge {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--weight-bold);
  background: var(--surface-soft);
  color: var(--text-soft);
}

/* provider logo（同 chat AI 头像那套：白底 + 居中 SVG）。
   ../assets/logos/<provider>.svg —— 已有 deepseek/anthropic/openai/gemini/grok/siliconflow 全套。 */
.acct-model-row__badge[data-provider] {
  background-color: var(--text-invert);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 68%;
  color: transparent;
  font-size: 0;
}

.acct-model-row__badge[data-provider='deepseek'] {
  background-image: url('../assets/logos/deepseek.svg');
}
.acct-model-row__badge[data-provider='anthropic'] {
  background-image: url('../assets/logos/anthropic.svg');
}
.acct-model-row__badge[data-provider='openai'] {
  background-image: url('../assets/logos/openai.svg');
}
.acct-model-row__badge[data-provider='gemini'] {
  background-image: url('../assets/logos/gemini.svg');
}
.acct-model-row__badge[data-provider='grok'] {
  background-image: url('../assets/logos/grok.svg');
}
.acct-model-row__badge[data-provider='siliconflow'] {
  background-image: url('../assets/logos/siliconflow.svg');
}

.acct-model-row__main {
  flex: 1;
  min-width: 0;
}

.acct-model-row__nameline {
  display: flex;
  align-items: center;
  gap: 6px;
}

.acct-model-row__name {
  font-size: var(--text-body);
  font-weight: var(--weight-medium);
  color: var(--text-main);
}

/* 末位变体（V4 Pro 的 Pro / V4 Flash 的 Flash）单独加重，把档位读出来 */
.acct-model-row__name-variant {
  font-weight: var(--weight-bold);
}

/* 桌面端：模型名 + 描述稍微大一点（手机端紧不动） */
@media (min-width: 481px) {
  .acct-model-row__name {
    font-size: var(--text-subtitle);
  }
  .acct-model-row__note {
    margin-top: 4px;
    font-size: var(--text-body-sm);
  }
}

.acct-tier-chip {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.06em;
  padding: 1px 5px;
  border-radius: var(--radius-xs);
  color: var(--text-soft);
  background: var(--surface-soft);
}

.acct-now-chip {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.1em;
  color: var(--text-invert);
  background: var(--brand-primary);
  padding: 1px 6px;
  border-radius: var(--radius-xs);
}

.acct-model-row__note {
  margin-top: 2px;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.acct-model-row__rate {
  text-align: right;
  flex-shrink: 0;
}

.acct-model-row__rate b {
  font-size: var(--text-subtitle);
  font-weight: var(--weight-semibold);
  color: var(--text-main);
  line-height: 1;
}

.acct-model-row__rate b span {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: var(--weight-medium);
  margin-left: 1px;
}

.acct-model-row__rate small {
  display: block;
  margin-top: 2px;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* 单价表（输入 / 命中 / 输出）—— 3 列 grid，display:contents 拍平让 ¥ 和沙粒数自动跨行对齐 */
.acct-model-row__rate--dual {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: baseline;
  column-gap: 14px;
  row-gap: 9px;
  min-width: 220px;
  padding-left: 14px;
  border-left: 1px solid var(--border-soft);
}

/* 表头 caption：桌面端贴左下角（在描述下方），手机端贴右上角（媒体查询覆盖） */
.acct-model-row__rate-caption {
  position: absolute;
  bottom: 16px; /* 跟 .acct-model-row padding-bottom 一致 */
  left: 63px; /* row padding-left 14 + badge 36 + gap 13 = 对齐主区左边缘 */
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  pointer-events: none; /* 不挡下方任何点击区域 */
}

/* 拍平：让 lbl / b / sand / save 直接成为外层 grid 项，列对齐才生效 */
.acct-model-row__rate-line,
.acct-model-row__rate-line > .acct-model-row__rate-val {
  display: contents;
}

/* 列 1：标签 —— 深色 + semibold，不再是小灰字 */
.acct-model-row__rate-lbl {
  grid-column: 1;
  font-size: var(--text-body-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-main);
  letter-spacing: 0.04em;
}

/* 列 2：¥ 价格 —— 主视觉，跨行 ¥ 自动对齐 */
.acct-model-row__rate-line > .acct-model-row__rate-val > b {
  grid-column: 2;
  justify-self: start;
  font-size: var(--text-subtitle);
  font-weight: var(--weight-semibold);
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: 0.005em;
}

/* 列 3：沙粒副值 —— 副视觉、灰字，跨行数字也对齐 */
.acct-model-row__rate-sand {
  grid-column: 3;
  justify-self: start;
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}


/* ───── 窄屏：价格表堆到主区底下、全宽展开 ─────
   v3.7.10：@media → @container stage（基于 stage-pane 容器宽度），
   原效果在手机端不变，新增桌面侧栏（380px）也命中。 */
@container stage (max-width: 480px) {
  .acct-model-row {
    flex-wrap: wrap;
    padding: 14px 13px;
    column-gap: 11px;
    row-gap: 10px;
    align-items: flex-start;
  }
  .acct-model-row__main {
    min-width: 0;
  }
  /* 价格表占第二行、全卡宽。手机端去掉 49px 主区对齐 indent —— 改用整行全宽，
     3 栏（输入/输出/缓存）每栏分到更多横向空间，¥0.025 + 沙粒注释也能舒舒服服一行。 */
  .acct-model-row__rate--dual {
    flex-basis: 100%;
    min-width: 0;
    padding-left: 0;
    padding-top: 12px;
    border-left: none;
    border-top: 1px solid var(--border-soft);
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 12px;
    row-gap: 0;
    align-items: start;
  }
  /* 桌面端 rate-line / val 是 display:contents 拍平进外层 grid 的；
     手机端反过来——它们各自变 flex column，自己内部堆 label / ¥ / 沙粒 */
  .acct-model-row__rate-line {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
  /* ¥价 与 沙粒数 同行 ——「¥4 4,000 沙粒」，沙粒像 ¥4 后面跟的小注释而非另起一行 */
  .acct-model-row__rate-line > .acct-model-row__rate-val {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 5px;
  }
  /* 撤销桌面那套 grid-column 锚点（手机端 flex 里它们已经各归各位） */
  .acct-model-row__rate-lbl,
  .acct-model-row__rate-line > .acct-model-row__rate-val > b,
  .acct-model-row__rate-sand {
    grid-column: auto;
    justify-self: auto;
  }
  /* 手机端 3 栏布局里，标签是「栏标题」要更醒目 */
  .acct-model-row__rate-lbl {
    font-size: var(--text-body);
  }
  /* 名字行允许换行，避免 chip 被挤出去 */
  .acct-model-row__nameline {
    flex-wrap: wrap;
    row-gap: 4px;
  }
  /* 窄屏 caption 改贴右上角（覆盖桌面默认的 bottom-left） */
  .acct-model-row__rate-caption {
    top: 14px;
    right: 13px;
    bottom: auto;
    left: auto;
  }
}

.acct-note {
  margin-top: 8px;
  padding: 0 2px;
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.55;
}

.acct-note b {
  color: var(--brand-primary);
  font-weight: var(--weight-semibold);
}

/* 内联超链接（在 .acct-note 文本里 inline）—— 跟 .acct-note b 同蓝、带 hover 反馈。
   用 <button> 出于无障碍：Enter/Space 也能触发；这些 reset 把按钮还原成 inline 文本观感。 */
.acct-note-link {
  appearance: none;
  background: transparent;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--brand-primary);
  font-weight: var(--weight-semibold);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--brand-primary) 35%, transparent);
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.acct-note-link:hover {
  color: var(--brand-primary-strong, var(--brand-primary));
  border-bottom-color: var(--brand-primary);
}

.acct-note-link:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* 充值区·手机端微信支付提示 —— 仅真·触屏设备显示。
   Stripe 收银页的微信支付只给二维码：手机上自己扫不了自己屏，截图走「相册识别」又被微信封死（防诈骗）。
   故在手机上提示改用支付宝。门控走 (hover:none)+(pointer:coarse)（真·触屏），不是 pane 宽度——
   桌面把账户中心收进 380px 侧栏时仍是 fine pointer，不显示（那里能拿另一台手机扫桌面二维码，没问题）。 */
.acct-topup-wechat-hint {
  display: none;
  align-items: flex-start;
  gap: 7px;
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--brand-primary) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand-primary) 16%, transparent);
}

.acct-topup-wechat-hint__icon {
  flex: none;
  font-size: 17px;
  line-height: 1.5;
  color: var(--brand-primary);
}

@media (hover: none) and (pointer: coarse) {
  .acct-topup-wechat-hint { display: flex; }
}

/* ---- 本月用量 ---- */
.acct-usage-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
}

.acct-usage-bar {
  display: flex;
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  background: var(--surface-soft);
}

.acct-usage-bar__seg {
  height: 100%;
}

.acct-usage-legend {
  margin-top: 11px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 12px;
}

.acct-usage-legend__item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--text-soft);
}

.acct-usage-legend__dot {
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  border-radius: 2px;
}

.acct-usage-legend__name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acct-usage-legend__v {
  color: var(--text-main);
  font-weight: var(--weight-semibold);
}

.acct-usage-legend__pct {
  color: var(--text-muted);
}

/* tone fills for usage segments / legend dots */
.acct-fill-1 { background: var(--brand-primary); }
.acct-fill-2 { background: var(--brand-accent); }
.acct-fill-3 { background: var(--brand-purple); }
.acct-fill-4 { background: var(--status-success); }
.acct-fill-5 { background: var(--status-warning); }
.acct-fill-6 { background: var(--brand-secondary); }
.acct-fill-7 { background: var(--brand-brown); }

/* ---- 充值套餐卡 ---- */
/* ──────── 充值套餐按钮（Claude Design C2 handoff · 2026-05-23）────────
   结构：[badge?] · [body: info(total+breakdown) ↔ cta]
   badge 浮在卡顶骑边，hover 时整卡轻抬、cta 变 brand-accent。 */
.acct-topup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 12px;
  row-gap: 18px; /* 给 badge 在卡顶突出 -10px 留垂直空间 */
}

.acct-topup {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 18px 18px 14px;
  border-radius: var(--radius-lg);
  background: var(--surface-elevated);
  border: 1px solid var(--border-soft);
  cursor: pointer;
  overflow: visible; /* badge 需要出血 */
  font: inherit;
  text-align: left;
  line-height: 1;
  color: var(--text-main);
  transition: transform 140ms ease, box-shadow 200ms ease, border-color 200ms ease;
  -webkit-tap-highlight-color: transparent;
}

.acct-topup * { line-height: 1.1; white-space: nowrap; }

.acct-topup:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: 3px;
}

/* badge：浮在卡顶右侧、只在有加赠时渲染 */
.acct-topup__badge {
  position: absolute;
  top: -10px;
  right: 16px;
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 5px 12px;
  background: var(--brand-accent);
  color: var(--text-invert);
  border-radius: 999px;
  box-shadow: 0 4px 10px -3px color-mix(in srgb, var(--brand-accent) 55%, transparent);
  transition: transform 200ms ease;
}

.acct-topup__badge::after {
  content: '';
  position: absolute;
  inset: 2px;
  border: 1px solid color-mix(in srgb, var(--text-invert) 30%, transparent);
  border-radius: 999px;
  pointer-events: none;
}

.acct-topup__badge-num {
  font-size: var(--text-body-lg);
  font-weight: var(--weight-bold);
}

.acct-topup__badge-label {
  font-size: var(--text-xs);
  opacity: 0.9;
  letter-spacing: 0.08em;
}

/* 主体行：info 在左 · cta 在右 */
.acct-topup__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.acct-topup__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  min-width: 0;
}

.acct-topup__total {
  font-size: var(--text-heading);
  font-weight: var(--weight-semibold);
  color: var(--text-main);
  letter-spacing: -0.01em;
  line-height: 1;
}

/* 「粒」单位后缀：用 UI 字体盖掉父级的衬线，小一档、淡灰 */
.acct-topup__total-unit {
  font-family: var(--font-ui);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  color: var(--text-muted);
  margin-left: 4px;
}

.acct-topup__breakdown {
  font-size: var(--text-caption);
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.acct-topup__cta {
  display: inline-flex;
  align-items: center;
  padding: 11px 16px;
  background: var(--text-main);
  color: var(--text-invert);
  border-radius: var(--radius-md);
  font-size: var(--text-heading);
  font-weight: var(--weight-semibold);
  transition: background 200ms ease;
}

/* hover / active */
.acct-topup:hover {
  border-color: var(--text-main);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -16px color-mix(in srgb, var(--text-main) 25%, transparent);
}
.acct-topup:hover .acct-topup__cta {
  background: var(--brand-accent);
}
.acct-topup:hover .acct-topup__badge {
  transform: rotate(-3deg) scale(1.04);
}
.acct-topup:active {
  transform: translateY(0);
}
.acct-topup:active .acct-topup__cta {
  background: color-mix(in srgb, var(--brand-accent), #000 12%);
}

/* 窄屏：六张并排太挤，切到单列让每张充分展开。v3.7.10：@media → @container stage */
@container stage (max-width: 480px) {
  .acct-topup-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- 兑换码 ---- */
.acct-redeem {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
}

.acct-redeem__icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--status-success) 14%, transparent);
  color: var(--status-success);
}

.acct-redeem__main {
  flex: 1;
}

.acct-redeem__t {
  font-size: var(--text-body);
  font-weight: var(--weight-semibold);
  color: var(--text-main);
}

.acct-redeem__d {
  margin-top: 1px;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* 兑换码弹窗里的 input + paste 按钮（结构对齐 settings 里 API Key 那种），
   不复用 settings-tabs.css 那套 #settings-modal 作用域绑死的样式 */
.acct-redeem-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  margin-top: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  transition: border-color 180ms ease, background 180ms ease;
}

.acct-redeem-input-wrapper:focus-within {
  border-color: var(--brand-primary);
  background: var(--surface-elevated);
}

.acct-redeem-input-wrapper input {
  flex: 1;
  min-width: 0;
  padding: 11px 40px 11px 14px;
  border: none;
  background: transparent;
  color: var(--text-main);
  font: inherit;
  font-size: var(--text-body);
  outline: none;
}

.acct-redeem-paste-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 180ms, color 180ms, background 180ms, transform 120ms;
}

.acct-redeem-paste-btn:hover {
  opacity: 1;
  color: var(--brand-primary);
  background: color-mix(in srgb, var(--brand-primary) 10%, transparent);
}

.acct-redeem-paste-btn:active {
  transform: translateY(-50%) scale(0.9);
}

.acct-redeem-paste-btn--success {
  opacity: 1;
  color: var(--status-success);
}

.acct-redeem-paste-btn--success:hover {
  color: var(--status-success);
  background: color-mix(in srgb, var(--status-success) 12%, transparent);
}

.acct-redeem-paste-btn .material-symbols-outlined {
  font-size: 18px;
  line-height: 1;
}

/* ---- 订单行 ---- */
.acct-order-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border-bottom: 1px solid var(--border-soft);
}

.acct-order-row:last-child {
  border-bottom: none;
}

.acct-order-row__sign {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--weight-bold);
}

.acct-order-row__sign--in { background: color-mix(in srgb, var(--status-success) 14%, transparent); color: var(--status-success); }
.acct-order-row__sign--out { background: color-mix(in srgb, var(--brand-accent) 14%, transparent); color: var(--brand-accent); }

.acct-order-row__main {
  flex: 1;
  min-width: 0;
}

.acct-order-row__t {
  font-size: var(--text-body-sm);
  font-weight: var(--weight-medium);
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acct-order-row__d {
  margin-top: 1px;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.acct-order-row__delta {
  font-size: var(--text-body);
  font-weight: var(--weight-semibold);
}

.acct-order-row__delta--in { color: var(--status-success); }
.acct-order-row__delta--out { color: var(--status-danger); }

/* ---- 子页（账号与安全 / 帮助反馈 / 用量明细 / 编辑资料）---- */
.acct-subpage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface-page);
  overflow: hidden;
}

.acct-subpage__head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px 8px;
  background: var(--surface-page);
}

.acct-back-btn {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-circle);
  background: var(--surface-elevated);
  border: 1px solid var(--border-soft);
  color: var(--text-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.acct-back-btn .material-symbols-outlined {
  font-size: var(--text-subtitle);
}

.acct-subpage__title {
  flex: 1;
  text-align: center;
  font-size: var(--text-subtitle);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.06em;
  color: var(--text-main);
}

.acct-subpage__head-spacer {
  width: 34px;
  flex-shrink: 0;
}

.acct-subpage__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 0 24px;
}

/* form group / field（编辑资料 + 安全页共用）*/
.acct-fieldset {
  margin: 0 14px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.acct-field {
  padding: 10px 14px 11px;
  border-bottom: 1px solid var(--border-soft);
}

.acct-field:last-child {
  border-bottom: none;
}

.acct-field__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.acct-field__input,
.acct-field__textarea {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-main);
  font: inherit;
  font-size: var(--text-body);
  font-weight: var(--weight-medium);
  outline: none;
  padding: 0;
}

.acct-field__textarea {
  resize: none;
  min-height: 50px;
  line-height: 1.55;
}

/* 编辑资料 sheet：点“修改”解锁后的输入框给个品牌色下划线，与“查看态”区分 */
.acct-sheet .acct-field__input:not([readonly]),
.acct-sheet .acct-field__textarea:not([readonly]) {
  border-bottom: 1.5px solid var(--brand-primary);
  padding-bottom: 2px;
}

.acct-field__hint {
  margin-top: 4px;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.acct-field__row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.acct-code-send {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  font-size: var(--text-body-sm);
  font-weight: var(--weight-semibold);
  background: color-mix(in srgb, var(--brand-accent) 14%, transparent);
  color: var(--brand-accent);
}

.acct-code-send:disabled {
  background: var(--surface-soft);
  color: var(--text-muted);
  cursor: default;
}

.acct-account-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
}

.acct-account-row__icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--status-success) 14%, transparent);
  color: var(--status-success);
}

.acct-account-row__main {
  flex: 1;
  min-width: 0;
}

.acct-account-row__t {
  font-size: var(--text-body);
  font-weight: var(--weight-medium);
  color: var(--text-main);
}

.acct-account-row__d {
  margin-top: 2px;
  font-size: var(--text-body-sm);
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.acct-account-row__lock {
  flex-shrink: 0;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 3px 8px;
  background: var(--surface-soft);
  border-radius: var(--radius-xs);
}

.acct-cta-full {
  display: block;
  width: calc(100% - 28px);
  margin: 16px 14px 0;
  padding: 12px 0;
  border: none;
  border-radius: var(--radius-md);
  background: var(--text-main);
  color: var(--text-invert);
  font-size: var(--text-body);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.3em;
  cursor: pointer;
}

.acct-cta-full:disabled {
  background: var(--surface-soft);
  color: var(--text-muted);
  cursor: default;
  letter-spacing: 0.3em;
}

.acct-help-intro {
  padding: 8px 18px 12px;
  font-size: var(--text-body);
  line-height: 1.75;
  color: var(--text-soft);
}

.acct-help-box {
  margin: 0 14px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
}

.acct-help-box__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.16em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.acct-help-box__ta {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-main);
  font: inherit;
  font-size: var(--text-body);
  line-height: 1.75;
  resize: none;
  outline: none;
  min-height: 200px;
  padding: 0;
}

.acct-help-box__foot {
  display: flex;
  align-items: center;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-soft);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.acct-help-box__foot .acct-help-box__spacer {
  flex: 1;
}

.acct-help-box__count.is-warn {
  color: var(--brand-accent);
}

.acct-help-success {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 30px;
  text-align: center;
}

.acct-help-success__icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--status-success) 14%, transparent);
  color: var(--status-success);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.acct-help-success__icon .material-symbols-outlined {
  font-size: 32px;
}

.acct-help-success__t {
  font-size: var(--text-heading);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.06em;
  color: var(--text-main);
  margin-bottom: 6px;
}

.acct-help-success__d {
  font-size: var(--text-body-sm);
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 260px;
}

.acct-help-success__actions {
  display: flex;
  gap: 8px;
  margin-top: 22px;
}

/* ---- 编辑资料 sheet ---- */
.acct-sheet-backdrop {
  position: absolute;
  inset: 0;
  z-index: 100;
  background: var(--overlay-40);
  opacity: 0;
  transition: opacity 280ms cubic-bezier(0.32, 0.72, 0, 1);
}

.acct-sheet-backdrop.is-open {
  opacity: 1;
}

.acct-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 101;
  height: calc(100% - 24px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface-page);
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  transform: translateY(102%);
  transition: transform 320ms cubic-bezier(0.32, 0.72, 0, 1);
}

.acct-sheet.is-open {
  transform: translateY(0);
}

.acct-sheet__handle {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 0 4px;
  flex-shrink: 0;
}

.acct-sheet__handle i {
  width: 38px;
  height: 4px;
  border-radius: 2px;
  background: var(--border-medium);
}

.acct-sheet__head {
  display: flex;
  align-items: center;
  padding: 6px 14px 10px;
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
}

.acct-sheet__cancel {
  appearance: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  font: inherit;
  font-size: var(--text-body-sm);
  color: var(--text-soft);
}

.acct-sheet__title {
  flex: 1;
  text-align: center;
  font-size: var(--text-subtitle);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.06em;
  color: var(--text-main);
}

.acct-sheet__save {
  padding: 5px 12px;
  border-radius: var(--radius-md);
  background: var(--text-main);
  color: var(--text-invert);
  border: none;
  cursor: pointer;
  font-size: var(--text-body-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.06em;
}

.acct-sheet__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 0 24px;
}

.acct-sheet-avatar-row {
  padding: 0 16px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.acct-sheet-avatar-row__btn {
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: var(--surface-elevated);
  color: var(--text-soft);
  border: 1px solid var(--border-medium);
  font-size: var(--text-body-sm);
  font-weight: var(--weight-semibold);
  cursor: pointer;
}

.acct-sheet-avatar-row__hint {
  margin-top: 5px;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.acct-cover-row {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 0;
}

.acct-cover {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
}

.acct-cover.is-current {
  border: 2.5px solid var(--text-main);
}

.acct-cover__check {
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-circle);
  background: var(--surface-elevated);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
}

.acct-cover--add {
  background: var(--surface-soft);
  border: 1px dashed var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: var(--text-subtitle);
}

.acct-uid {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono, ui-monospace, "SF Mono", Menlo, monospace);
  font-size: var(--text-xs);
  color: var(--text-muted);
  letter-spacing: 0.05em;
  cursor: pointer; /* 整行可点复制 */
}

/* 主资料页：接在 @用户名 · 加入于… 那行末尾的内联 UID 片段 */
.acct-uid-chip {
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--font-mono, ui-monospace, "SF Mono", Menlo, monospace);
  letter-spacing: 0.05em;
}
.acct-uid-chip .material-symbols-outlined {
  font-size: var(--text-body);
  opacity: 0.6;
  vertical-align: middle;
  margin-left: 3px;
}

.acct-uid .material-symbols-outlined {
  font-size: var(--text-body);
  opacity: 0.6;
}

/* ---- 用量明细：KPI + 月历热图 ---- */
.acct-kpi {
  margin: 0 14px 12px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  display: flex;
  gap: 8px;
}

.acct-kpi__col {
  flex: 1;
  min-width: 0;
}

.acct-kpi__col--wide {
  flex: 1.4;
}

.acct-kpi__div {
  width: 1px;
  background: var(--border-soft);
}

.acct-kpi__k {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.acct-kpi__v {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 4px;
}

.acct-kpi__v b {
  font-size: var(--text-heading);
  font-weight: var(--weight-semibold);
  color: var(--text-main);
  line-height: 1;
}

.acct-kpi__v.is-sub b {
  font-size: var(--text-subtitle);
}

.acct-kpi__v span {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.acct-kpi__foot {
  margin-top: 4px;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.acct-kpi__foot b {
  color: var(--brand-accent);
  font-weight: var(--weight-semibold);
}

.acct-heat-card {
  margin: 0 14px 12px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 14px 14px 12px;
}

.acct-heat-week {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-bottom: 8px;
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 0.08em;
}

.acct-heat-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.acct-heat-cell {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-xs);
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  font: inherit;
  font-weight: var(--weight-semibold);
  color: var(--text-soft);
  background: var(--surface-soft);
}

.acct-heat-cell.is-selected,
.acct-heat-cell.is-today {
  border-color: var(--text-main);
}

.acct-heat-cell.lvl-1 { background: color-mix(in srgb, var(--status-warning) 28%, transparent); }
.acct-heat-cell.lvl-2 { background: color-mix(in srgb, var(--status-warning) 60%, transparent); }
.acct-heat-cell.lvl-3 { background: var(--status-warning); color: var(--text-invert); }
.acct-heat-cell.lvl-4 { background: var(--brand-accent); color: var(--text-invert); }

.acct-heat-cell__d {
  font-size: var(--text-xs);
  opacity: 0.85;
}

.acct-heat-cell__v {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
}

.acct-heat-legend {
  margin-top: 11px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.acct-heat-legend__sw {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-xs);
}

.acct-heat-legend__spacer {
  flex: 1;
}

.acct-empty {
  margin: 0 14px;
  background: var(--surface-elevated);
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  text-align: center;
}

.acct-empty__t {
  font-size: var(--text-body-sm);
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.acct-empty__d {
  margin-top: 4px;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.acct-rec-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-soft);
}

.acct-rec-row:last-child {
  border-bottom: none;
}

.acct-rec-row__main {
  flex: 1;
  min-width: 0;
}

.acct-rec-row__t {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: var(--text-body-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-main);
}

.acct-rec-row__t .is-sep {
  color: var(--text-muted);
  font-weight: var(--weight-regular);
}

.acct-rec-row__t .is-world {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.acct-rec-row__d {
  margin-top: 1px;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.acct-model-tag {
  display: inline-block;
  padding: 0 4px;
  border-radius: var(--radius-xs);
  font-weight: var(--weight-semibold);
  font-size: var(--text-xs);
  margin-right: 5px;
  background: var(--surface-soft);
  color: var(--text-soft);
}

.acct-rec-row__delta {
  font-size: var(--text-body-sm);
  font-weight: var(--weight-semibold);
  color: var(--status-danger);
}

/* ---- 选中日 head ---- */
.acct-day-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 9px;
  padding: 0 16px;
}

.acct-day-head__t {
  font-size: var(--text-body-sm);
  font-weight: var(--weight-bold);
  letter-spacing: 0.14em;
  color: var(--text-soft);
}

.acct-day-head__d {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ---- 游客态 gate ---- */
.acct-guest {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 22px;
  text-align: center;
  background: var(--surface-page);
}

.acct-guest__avatar {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-circle);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(140deg, var(--status-success) 0%, var(--status-warning) 60%, var(--brand-accent) 100%);
  color: var(--text-invert);
  margin-bottom: 16px;
}

.acct-guest__avatar .material-symbols-outlined {
  font-size: 38px;
}

.acct-guest__t {
  font-size: var(--text-heading);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.06em;
  color: var(--text-main);
}

.acct-guest__d {
  margin-top: 8px;
  font-size: var(--text-body-sm);
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 300px;
}

.acct-login-form {
  width: 100%;
  max-width: 320px;
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.acct-login-input {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  background: var(--surface-elevated);
  color: var(--text-main);
  font: inherit;
  font-size: var(--text-body);
  outline: none;
}

.acct-login-input:focus {
  border-color: var(--brand-primary);
}

.acct-login-error {
  font-size: var(--text-body-sm);
  color: var(--status-danger);
  text-align: left;
}

.acct-login-submit {
  width: 100%;
  padding: 11px 0;
  border: none;
  border-radius: var(--radius-md);
  background: var(--text-main);
  color: var(--text-invert);
  font-size: var(--text-body);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.06em;
  cursor: pointer;
}

.acct-login-submit:disabled {
  opacity: 0.6;
  cursor: default;
}

.acct-login-toggle,
.acct-login-guest-link {
  appearance: none;
  background: transparent;
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: var(--text-body-sm);
  color: var(--text-soft);
  padding: 4px;
}

.acct-login-guest-link {
  color: var(--text-muted);
  margin-top: 4px;
}

/* ---- 响应式：窄屏侧栏内不显示账户（已由 side placeholder 接管），
        桌面 >1150 主舞台 account stage 居中限宽，沿用手机稿观感 ---- */
.account-stage .acct-scroll > *,
.account-stage .acct-subtabs {
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* 子页 / 游客 gate 也走同一窄列，宽屏下与三个主视图对齐 */
.account-stage > .acct-subpage,
.account-stage > .acct-guest {
  width: 100%;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.account-stage .acct-banner {
  border-radius: 0;
}

/* ============================================
   充值流程模态（accountCenterUI 复用）
   ============================================ */
.account-recharge-backdrop {
  position: fixed;
  inset: 0;
  background: var(--overlay-50);
  z-index: calc(var(--z-modal) + 10);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--transition-base), visibility 0s linear var(--transition-base);
}
.account-recharge-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity var(--transition-base);
}
.account-recharge {
  max-width: 480px;
  width: 100%;
  padding: 24px;
}
.account-recharge-title {
  margin: 0 0 16px;
  font-size: var(--text-title);
  font-weight: var(--weight-semibold);
  color: var(--text-main);
}
.account-recharge-summary {
  margin: 0 0 16px;
  font-size: var(--text-display);
  font-weight: var(--weight-bold);
  color: var(--brand-primary);
  text-align: center;
}
.account-recharge-packs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.account-recharge-pack {
  position: relative;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  border: 1px solid var(--border-soft);
  cursor: pointer;
  text-align: center;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.account-recharge-pack:hover {
  background: color-mix(in srgb, var(--brand-primary) 8%, var(--surface-soft));
}
.account-recharge-pack.is-selected {
  border-color: var(--brand-primary);
  background: color-mix(in srgb, var(--brand-primary) 12%, var(--surface-soft));
}
.account-recharge-pack-badge {
  position: absolute;
  top: 6px;
  right: 8px;
  color: var(--status-warning);
  font-size: var(--text-caption);
}
.account-recharge-pack-amount {
  font-size: var(--text-heading);
  font-weight: var(--weight-bold);
  color: var(--text-main);
}
.account-recharge-pack-credits {
  font-size: var(--text-caption);
  color: var(--text-soft);
  margin-top: 2px;
}
.account-recharge-pack-label {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: 4px;
}
.account-recharge-methods {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.account-recharge-method {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.account-recharge-method:hover {
  background: color-mix(in srgb, var(--brand-primary) 6%, var(--surface-soft));
}
.account-recharge-method.is-selected {
  border-color: var(--brand-primary);
  background: color-mix(in srgb, var(--brand-primary) 10%, var(--surface-soft));
}
.account-recharge-method input[type='radio'] {
  margin: 0;
  accent-color: var(--brand-primary);
}
.account-recharge-method .material-symbols-outlined {
  color: var(--text-soft);
  font-size: var(--icon-size-md);
}
.account-recharge-qr {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 140px;
  margin: 0 auto 16px;
  background: var(--surface-soft);
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-tertiary);
}
.account-recharge-qr .material-symbols-outlined {
  font-size: 80px;
  opacity: 0.4;
}
.account-recharge-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* 简易 toast */
.account-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translate(-50%, 12px);
  background: var(--surface-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  font-size: var(--text-body-sm);
  color: var(--text-main);
  box-shadow: var(--shadow-md);
  z-index: var(--z-toast);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.account-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
