/* 设置 / 美化 / 背景库 / 自定义 CSS / 数据概览（原 index.html 第 1393-1911 行） */

/* ============ 设置页 ============ */
.settings-view{ background:var(--bg); }
.set-top{ padding:calc(var(--head-top) + 6px) 20px 2px; }
.set-top h1{ font-size:24px; font-weight:700; margin:0; }
.set-group{ margin-top:18px; }
.set-group-title{
  font-size:12px; color:var(--gray-2);
  margin:0 0 6px 16px;
}
.set-card{
  background:var(--bg);
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 1px 0 var(--hairline), 0 0 0 1px var(--hairline);
}
.set-row{
  display:flex; align-items:center; gap:12px;
  width:100%; height:58px;
  padding:0 16px;
  border:none; background:transparent;
  font-family:inherit; font-size:15px; color:var(--ink);
  cursor:pointer;
  border-bottom:1px solid var(--hairline);
  transition:background .15s;
}
.set-row:last-child{ border-bottom:none; }
.set-row:active{ background:var(--fill); }
.set-icon{
  flex:0 0 auto;
  width:32px; height:32px; border-radius:9px;
  background:var(--fill); color:var(--ink);
  display:flex; align-items:center; justify-content:center;
}
.set-icon svg{
  width:17px; height:17px;
  fill:none; stroke:currentColor;
  stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round;
}
.set-label{ flex:1; text-align:left; }
.set-chev{
  flex:0 0 auto;
  width:16px; height:16px;
  color:var(--gray-2);
  fill:none; stroke:currentColor;
  stroke-width:2; stroke-linecap:round; stroke-linejoin:round;
}
.head-spacer{ width:44px; flex:0 0 auto; }
/* 设置页顶部：账号（iCloud 式） */
.acct-card{
  display:flex; align-items:center; gap:14px;
  width:100%; padding:16px;
  margin-top:14px;
  border:none; text-align:left;
  background:var(--bg); color:var(--ink);
  font-family:inherit; cursor:pointer;
  border-radius:18px;
  box-shadow:0 1px 0 var(--hairline), 0 0 0 1px var(--hairline);
  transition:background .15s;
}
.acct-card:active{ background:var(--fill); }
.acct-avatar{
  flex:0 0 auto;
  width:60px; height:60px; border-radius:50%;
  object-fit:cover; background:var(--fill);
  box-shadow:0 2px 8px rgba(0,0,0,.12);
}
.acct-text{ flex:1; min-width:0; }
.acct-name{
  font-size:18px; font-weight:600;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.acct-sub{
  font-size:12.5px; color:var(--gray-2); margin-top:3px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.acct-quick{
  display:flex; gap:10px;
  margin-top:12px;
}
.acct-quick-btn{
  flex:1;
  display:flex; flex-direction:column; align-items:center; gap:7px;
  padding:13px 6px 11px;
  border:none; background:var(--bg); color:var(--ink);
  font-family:inherit; font-size:12.5px;
  border-radius:16px; cursor:pointer;
  box-shadow:0 1px 0 var(--hairline), 0 0 0 1px var(--hairline);
  transition:background .15s, transform .18s var(--spring);
}
.acct-quick-btn:active{ background:var(--fill); transform:scale(.96); }
.acct-quick-btn svg{
  width:22px; height:22px;
  fill:none; stroke:currentColor;
  stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round;
}
.acct-quick-btn.dim{ color:var(--gray-2); }
/* 账户页 */
.acct-avatar-wrap{ position:relative; cursor:pointer; }
.acct-avatar-wrap img{ background:var(--fill); }
.acct-avatar-edit{
  position:absolute; right:-2px; bottom:-2px;
  width:30px; height:30px; border-radius:50%;
  background:var(--ink); color:#fff;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 0 0 3px var(--bg);
}
.acct-avatar-edit svg{
  width:14px; height:14px;
  fill:none; stroke:currentColor;
  stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round;
}
.acct-dev-row{
  display:flex; align-items:center; gap:12px;
  padding:12px 16px;
}
.acct-dev-row + .acct-dev-row{ box-shadow:inset 0 1px 0 rgba(11,11,15,.05); }
.acct-dev-row svg{
  flex:0 0 auto; width:20px; height:20px;
  fill:none; stroke:var(--ink);
  stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round;
}
.acct-dev-main{ flex:1; min-width:0; }
.acct-dev-main b{ display:block; font-size:14px; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.acct-dev-main span{ display:block; font-size:11.5px; color:var(--gray-2); margin-top:2px; }
.acct-dev-tag{
  flex:0 0 auto;
  font-size:11px; padding:3px 8px; border-radius:999px;
  background:var(--primary); color:var(--ink);
}
.acct-dev-del{
  flex:0 0 auto;
  width:26px; height:26px; border:none; border-radius:50%;
  background:transparent; color:var(--gray-2);
  font-size:16px; line-height:1; cursor:pointer;
}
.acct-dev-empty{ padding:8px 16px 14px; font-size:12px; color:var(--gray-3); }
/* GitHub 云备份 */
.gh-form{ padding:10px 16px 0; display:flex; flex-direction:column; gap:8px; }
.gh-form .pad-input{ background:var(--bg); font-size:13.5px; padding:11px 14px; border-radius:13px; }
.gh-actions{
  display:flex; gap:8px; flex-wrap:wrap;
  padding:4px 16px 14px;
}
.gh-actions .mem-btn{ flex:1; white-space:nowrap; text-align:center; }
/* 心声弹窗 */
.heart-head{
  display:flex; align-items:center; gap:12px;
  padding:0 22px 6px;
}
.heart-avatar{
  width:48px; height:48px; border-radius:50%;
  object-fit:cover; background:var(--fill); flex:0 0 auto;
}
.heart-avatar-initial{
  width:48px; height:48px; border-radius:50%;
  background:var(--fill); color:var(--ink);
  display:flex; align-items:center; justify-content:center;
  font-size:18px; font-weight:600; flex:0 0 auto;
}
.heart-name{ font-size:16px; font-weight:600; }
.heart-sub{ font-size:12px; color:var(--gray-2); margin-top:2px; }
.heart-block{
  margin:10px 22px 0;
  padding:12px 14px;
  background:var(--fill);
  border-radius:16px;
}
.heart-label{ font-size:11.5px; color:var(--gray-2); margin-bottom:5px; }
.heart-text{ font-size:14px; line-height:1.6; color:var(--ink); white-space:pre-wrap; word-break:break-word; }
.heart-fav-row{ display:flex; align-items:center; gap:10px; }
.heart-fav-bar{
  flex:1; height:8px; border-radius:4px;
  background:rgba(11,11,15,.08); overflow:hidden;
}
.heart-fav-bar i{
  display:block; height:100%; border-radius:4px;
  background:linear-gradient(90deg, #ff8fa3, #ff375f);
  transition:width .5s var(--spring);
}
.heart-fav-num{ font-size:15px; font-weight:600; font-variant-numeric:tabular-nums; min-width:34px; text-align:right; }
.heart-loading{ text-align:center; font-size:13px; color:var(--gray-2); padding:18px 0 8px; }
.save-btn.ghost{
  background:var(--bg);
  color:var(--ink);
  border:1px solid var(--gray-3);
  margin-top:12px;
}
.save-btn.ghost:active{ background:var(--fill); }
/* 滑块 */
.set-slider-wrap{
  flex:1; display:flex; align-items:center; gap:12px;
}
.set-slider-wrap input[type="range"]{
  flex:1; min-width:0;
  -webkit-appearance:none; appearance:none;
  height:4px; border-radius:999px;
  background:var(--gray-3);
  outline:none;
}
.set-slider-wrap input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance:none;
  width:24px; height:24px; border-radius:50%;
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  box-shadow:0 2px 8px rgba(0,0,0,.18);
  cursor:pointer;
}
.set-slider-wrap input[type="range"]::-moz-range-thumb{
  width:22px; height:22px; border-radius:50%;
  background:#fff; border:1px solid rgba(0,0,0,.08);
  box-shadow:0 2px 8px rgba(0,0,0,.18);
  cursor:pointer;
}
.set-slider-val{
  flex:0 0 auto;
  min-width:44px; text-align:right;
  font-size:13px; color:var(--gray-1);
  font-variant-numeric:tabular-nums;
}
/* 数量步进器 */
.stepper{ flex:1; display:flex; align-items:center; justify-content:flex-end; gap:12px; }
.step-btn{
  width:30px; height:30px; border-radius:50%;
  border:1px solid var(--gray-3);
  background:var(--bg); color:var(--ink);
  font-size:16px; line-height:1;
  cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  transition:background .15s, transform .15s var(--spring);
}
.step-btn:active{ background:var(--fill); transform:scale(.9); }
.step-val{
  min-width:20px; text-align:center;
  font-size:15px; font-weight:600;
  font-variant-numeric:tabular-nums;
}
/* 备份说明卡 */
.backup-card{
  background:var(--fill);
  border-radius:18px;
  padding:16px 18px;
  margin-bottom:4px;
}
.backup-title{ font-size:14px; font-weight:600; margin:0 0 6px; }
.backup-desc{ font-size:13px; color:var(--gray-1); line-height:1.7; margin:0; }
/* 预设列表 */
.set-sub-title{
  font-size:12px; color:var(--gray-2);
  margin:18px 0 6px 2px;
}
.preset-list{
  background:var(--bg);
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 1px 0 var(--hairline), 0 0 0 1px var(--hairline);
}
.preset-row{
  display:flex; align-items:center; gap:10px;
  min-height:52px;
  padding:0 8px 0 16px;
  border-bottom:1px solid var(--hairline);
}
.preset-row:last-child{ border-bottom:none; }
.preset-name{
  flex:1; min-width:0;
  border:none; background:transparent;
  font-family:inherit; font-size:14.5px; font-weight:600;
  color:var(--ink); text-align:left;
  padding:8px 0;
  cursor:pointer;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.preset-name:hover{ color:var(--gray-1); }
.preset-sub{
  flex:0 0 auto;
  font-size:12px; color:var(--gray-2);
  max-width:120px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.preset-del{
  flex:0 0 auto;
  border:none; background:transparent;
  font-family:inherit; font-size:13px;
  color:var(--danger);
  padding:8px 12px;
  cursor:pointer;
  border-radius:10px;
  transition:background .15s;
}
.preset-del:hover{ background:rgba(255,59,48,.08); }
.preset-empty{
  font-size:12px; color:var(--gray-3);
  margin:8px 0 0 4px;
}
/* 生图：服务商切换、梯子提醒、提示词 */
.img-conn{ margin-top:14px; }
.img-conn.hidden{ display:none; }
.novelai-warn{
  display:flex; align-items:center; gap:8px;
  margin-top:14px;
  background:rgba(255,59,48,.07);
  border-radius:14px;
  padding:12px 14px;
  font-size:12.5px; line-height:1.6;
  color:var(--danger);
}
.novelai-warn.hidden{ display:none; }
.novelai-warn svg{
  flex:0 0 auto;
  width:18px; height:18px;
  fill:none; stroke:currentColor;
  stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round;
}
.field-prompt{ align-items:flex-start; }
.field-prompt label{ padding-top:12px; }
.prompt-textarea{
  flex:1; min-width:0; min-height:84px;
  border:none; outline:none; resize:vertical;
  background:var(--fill);
  border-radius:12px;
  padding:12px;
  font-family:inherit; font-size:13.5px; line-height:1.7;
  color:var(--ink);
}
.prompt-textarea::placeholder{ color:var(--gray-3); }
/* 模型拉取 */
.model-row{
  flex:1; min-width:0;
  display:flex; align-items:center; gap:8px;
}
.model-row input{
  flex:1; min-width:0;
  border:none; outline:none; background:transparent;
  font-family:inherit; font-size:14px;
  color:var(--ink);
  padding:14px 0;
}
.model-row input::placeholder{ color:var(--gray-3); }
.model-fetch{
  flex:0 0 auto;
  border:none; background:var(--fill);
  border-radius:10px;
  padding:7px 14px;
  font-family:inherit; font-size:13px;
  color:var(--gray-1);
  cursor:pointer;
  transition:background .15s,color .15s;
}
.model-fetch:hover{ background:var(--primary); color:var(--ink); }
.model-pills{
  display:flex; flex-wrap:wrap; gap:8px;
  padding:2px 16px 12px;
  background:var(--bg);
  border-radius:0 0 18px 18px;
  margin-top:-2px;
  box-shadow:0 1px 0 var(--hairline), 0 0 0 1px var(--hairline);
}
.model-pill{
  border:none; background:var(--fill);
  border-radius:999px;
  padding:6px 13px;
  font-family:inherit; font-size:12.5px;
  color:var(--gray-1);
  cursor:pointer;
  transition:background .15s,color .15s;
  max-width:100%;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.model-pill:hover{ background:var(--primary); color:var(--ink); }
.model-pill.active{ background:var(--primary); color:var(--ink); font-weight:600; }

/* ============ 美化页：颜色 / 数值 ============ */
.skin-note{
  margin:14px 4px 0;
  font-size:12.5px; color:var(--gray-2);
  line-height:1.7;
}
.field-color .skin-color{
  flex:0 0 auto;
  width:52px; height:32px;
  padding:0; border:1px solid var(--hairline);
  border-radius:10px;
  background:var(--bg);
  cursor:pointer;
}
.field-color .skin-color::-webkit-color-swatch-wrapper{ padding:3px; }
.field-color .skin-color::-webkit-color-swatch{ border:none; border-radius:7px; }
.field-color .skin-hex{
  flex:0 0 auto;
  width:78px;
  font-family:var(--font-num); font-size:12.5px;
  color:var(--gray-1); text-align:right;
  font-variant-numeric:tabular-nums;
}
.skin-preview{
  margin-top:18px;
  border-radius:20px;
  padding:16px;
  background:var(--fill);
}
.skin-preview-title{
  font-size:11px; font-weight:600; letter-spacing:.1em;
  color:var(--gray-2); margin:0 0 10px 2px;
}
.skin-bubbles{ display:flex; flex-direction:column; gap:10px; }
.skin-bubble{
  max-width:78%;
  padding:11px 14px;
  font-size:14px; line-height:1.6;
}
.skin-bubble.peer{ align-self:flex-start; }
.skin-bubble.mine{ align-self:flex-end; }

/* ============ 小组件美化 ============ */
.widget-preview{
  position:relative;
  height:132px; margin-top:10px;
  border-radius:16px; background:var(--fill);
  display:flex; align-items:center; justify-content:center;
  overflow:hidden;
  box-shadow:0 0 0 1px var(--hairline);
}
.widget-preview img{ display:none; width:100%; height:100%; object-fit:contain; }
.widget-preview span{ font-size:12.5px; color:var(--gray-2); }
.widget-preview.has-img img{ display:block; }
.widget-preview.has-img span{ display:none; }
.widget-slots{
  display:grid; grid-template-columns:repeat(3, 1fr);
  gap:10px; margin-top:10px;
}
.widget-slot{ display:flex; flex-direction:column; align-items:center; gap:8px; }
.widget-slot-pic{
  width:100%; aspect-ratio:2/3;
  border-radius:12px; background:var(--fill);
  overflow:hidden;
  box-shadow:0 0 0 1px var(--hairline);
}
.widget-slot-pic img{ display:block; width:100%; height:100%; object-fit:cover; }
.widget-slot-acts{ display:flex; gap:6px; }
/* 选择小组件 */
.wg-picker{
  display:grid; grid-template-columns:repeat(2, 1fr);
  gap:8px; margin-top:10px;
}
.wg-pick{
  display:flex; flex-direction:column; align-items:flex-start; gap:2px;
  padding:10px 12px;
  border:none; border-radius:14px;
  background:var(--fill); color:var(--ink);
  font-family:inherit; text-align:left; cursor:pointer;
  box-shadow:0 0 0 1px var(--hairline);
  transition:transform .18s var(--spring), box-shadow .18s;
}
.wg-pick b{ font-size:13.5px; font-weight:600; }
.wg-pick span{ font-size:11px; color:var(--gray-2); }
.wg-pick.on{ box-shadow:0 0 0 2px var(--ink); }
.wg-pick:active{ transform:scale(.97); }
/* 内容替换 */
.wg-editor{ display:none; }
.wg-editor.show{ display:block; }
.wg-fields{ display:flex; flex-direction:column; gap:8px; margin-top:10px; }
.wg-field{ display:flex; align-items:center; gap:10px; }
.wg-field label{ flex:0 0 84px; font-size:12.5px; color:var(--gray-1); }
.wg-field input{
  flex:1; min-width:0; height:34px; padding:0 12px;
  border:none; border-radius:10px;
  background:var(--fill); color:var(--ink);
  font-family:inherit; font-size:13px; outline:none;
}
.wg-imgs{
  display:grid; grid-template-columns:repeat(3, 1fr);
  gap:10px; margin-top:10px;
}
.wg-img{ display:flex; flex-direction:column; align-items:center; gap:6px; }
.wg-img-pic{
  width:48px; height:48px; border-radius:12px;
  background:var(--fill); overflow:hidden;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 0 0 1px var(--hairline);
  font-size:11px; color:var(--gray-3);
}
.wg-img-pic img{ display:block; width:100%; height:100%; object-fit:cover; }
.wg-img-name{ font-size:11px; color:var(--gray-1); text-align:center; }
.wg-img-acts{ display:flex; gap:4px; }

/* ============ 图片编辑器（裁剪 / 旋转 / 缩放） ============ */
.img-ed-backdrop{ z-index:96; }
.img-ed-card{ max-width:340px; padding-bottom:16px; }
.img-ed-stage{
  position:relative;
  height:240px; margin:12px 16px 0;
  border-radius:16px; overflow:hidden;
  background:#1A1A1F;
  touch-action:none;
  cursor:grab;
}
.img-ed-stage:active{ cursor:grabbing; }
.img-ed-stage canvas{ display:block; }
.img-ed-tools{
  display:flex; align-items:center; gap:10px;
  padding:14px 20px 0;
}
.img-ed-tools input[type=range]{ flex:1; min-width:0; accent-color:var(--ink); }
.img-ed-btn{
  flex:0 0 auto; width:36px; height:36px;
  border:none; border-radius:50%;
  background:var(--fill); color:var(--ink);
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
}
.img-ed-btn:active{ transform:scale(.94); }
.img-ed-btn svg{ width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.img-ed-acts{ display:flex; gap:8px; padding:14px 20px 0; }
.img-ed-acts .tsb-btn{ flex:1; height:38px; }
.img-ed-acts .tsb-btn.primary{ background:var(--ink); color:#fff; }

/* ============ 背景库（主页 / 聊天共用） ============ */
.bg-actions{
  display:flex; gap:10px;
  margin-top:12px;
}
.bg-actions .save-btn{ margin-top:0; height:44px; border-radius:20px; font-size:14px; }
.bg-grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:8px;
  margin-top:12px;
}
.bg-cell{
  position:relative;
  padding:0; border:none;
  height:82px;
  border-radius:14px;
  overflow:hidden;
  background:var(--fill);
  cursor:pointer;
  box-shadow:0 0 0 1px var(--hairline);
}
.bg-cell img{ width:100%; height:100%; object-fit:cover; display:block; }
.bg-cell.on{ box-shadow:0 0 0 2px var(--ink); }
.bg-cell-del{
  position:absolute; top:4px; right:4px;
  width:22px; height:22px;
  border:none; border-radius:50%;
  background:rgba(11,11,15,.55); color:#fff;
  font-size:13px; line-height:1;
  cursor:pointer;
  display:flex; align-items:center; justify-content:center;
}
.bg-empty{
  font-size:12px; color:var(--gray-3);
  margin:10px 0 0 2px;
}
.bg-empty[hidden]{ display:none; }
/* ============ 美化：线上 / 线下 分页 ============ */
.skin-switch{ margin:4px 0 14px; }
.skin-pane{ display:none; }
.skin-pane.on{ display:block; }
/* ============ 表情库 / 头像库 ============ */
.lib-groups{
  display:flex; gap:8px; flex-wrap:wrap;
  margin-bottom:12px;
}
.lib-groups button{
  height:32px; padding:0 14px;
  border:none; border-radius:16px;
  background:var(--fill); color:var(--ink);
  font-size:13px; font-family:inherit; cursor:pointer;
}
.lib-groups button.on{ background:var(--ink); color:#fff; }
.lib-groups button[data-sg-new]{ color:var(--gray-1); }
.lib-actions{ display:flex; gap:10px; margin-top:10px; }
.lib-actions .save-btn{ margin-top:0; height:44px; border-radius:20px; font-size:14px; flex:1; }
.lib-grid{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:8px;
  margin-top:12px;
}
.lib-grid .sticker-cell, .av-cell{
  position:relative;
  aspect-ratio:1;
  border:none; padding:0;
  border-radius:14px; overflow:hidden;
  background:var(--fill);
  box-shadow:0 0 0 1px var(--hairline);
  cursor:pointer;
}
.lib-grid .sticker-cell img, .av-cell img{ width:100%; height:100%; object-fit:cover; display:block; }
.av-cell .av-desc{
  position:absolute; left:0; right:0; bottom:0;
  padding:3px 6px;
  font-size:10px; line-height:1.3; color:#fff;
  background:linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.55));
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  text-align:left;
}
.av-del{
  position:absolute; top:4px; right:4px;
  width:22px; height:22px;
  border:none; border-radius:50%;
  background:rgba(11,11,15,.55); color:#fff;
  font-size:13px; line-height:1;
  cursor:pointer;
  display:flex; align-items:center; justify-content:center;
}
.av-pairs{ display:flex; flex-direction:column; gap:10px; margin-top:12px; }
.av-pair{
  display:flex; align-items:center; gap:10px;
  padding:10px 12px;
  border-radius:18px;
  background:var(--fill);
}
.av-pair .av-cell{ width:64px; flex:0 0 auto; }
.av-pair-heart{ font-size:16px; color:var(--gray-2); }
.av-pair-word{ flex:1; min-width:0; font-size:12px; color:var(--gray-1); line-height:1.5; }
.av-pair-word b{ display:block; font-size:13px; color:var(--ink); }
.av-pair-acts{ display:flex; flex-direction:column; gap:6px; }
.av-pair-acts button{
  height:30px; padding:0 12px;
  border:none; border-radius:15px;
  background:#fff; color:var(--ink);
  font-size:12px; font-family:inherit; cursor:pointer;
  box-shadow:0 0 0 1px var(--hairline);
}
.av-pair-acts button.danger{ color:var(--danger); }
/* ============ 自定义 CSS ============ */
.css-area{
  width:100%; min-height:150px;
  margin-top:12px;
  border:none; outline:none; resize:vertical;
  background:var(--fill);
  border-radius:16px;
  padding:14px 16px;
  font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size:12.5px; line-height:1.7;
  color:var(--ink);
}
.css-area::placeholder{ color:var(--gray-3); }
.css-row{
  display:flex; gap:10px;
  margin-top:12px;
}
.css-row .save-btn{ margin-top:0; height:44px; border-radius:20px; font-size:14px; }

/* ============ 数据概览 ============ */
.usage-hero{
  background:var(--fill);
  border-radius:22px;
  padding:20px 20px 18px;
  text-align:center;
}
.usage-total{
  font-family:var(--font-num);
  font-size:34px; font-weight:600;
  letter-spacing:-.02em;
  font-variant-numeric:tabular-nums;
}
.usage-total-sub{
  font-size:12px; color:var(--gray-2);
  margin:6px 0 0;
}
.usage-bar{
  display:flex; gap:2px;
  height:10px; margin-top:16px;
  border-radius:999px;
  overflow:hidden;
  background:rgba(11,11,15,.06);
}
.usage-seg{ height:100%; min-width:2px; }
.usage-list{
  margin-top:16px;
  background:var(--bg);
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 1px 0 var(--hairline), 0 0 0 1px var(--hairline);
}
.usage-row{
  display:flex; align-items:center; gap:10px;
  padding:13px 16px;
  border-bottom:1px solid var(--hairline);
}
.usage-row:last-child{ border-bottom:none; }
.usage-dot{
  flex:0 0 auto;
  width:10px; height:10px; border-radius:50%;
}
.usage-name{ flex:1; min-width:0; font-size:14px; }
.usage-name span{
  display:block;
  font-size:11.5px; color:var(--gray-2); margin-top:2px;
}
.usage-size{
  flex:0 0 auto;
  font-size:13px; color:var(--gray-1);
  font-variant-numeric:tabular-nums;
}

/* ============ 危险操作（恢复出厂设置） ============ */
.danger-card{
  margin-top:26px;
  background:rgba(255,59,48,.06);
  border-radius:18px;
  padding:16px 18px;
}
.danger-title{
  margin:0 0 6px;
  font-size:14px; font-weight:600; color:var(--danger);
}
.danger-desc{
  margin:0;
  font-size:12.5px; color:var(--gray-1); line-height:1.7;
}
.save-btn.danger{
  margin-top:12px;
  background:var(--danger); color:#fff;
}

/* ============ 会话行：置顶 / 长按面板 ============ */
.chat-row.pinned{
  margin:4px 12px;
  padding:10px 12px;
  border-top:none;
  border-radius:20px;
  background:var(--fill);
}
.chat-row.pinned:hover{ background:rgba(11,11,15,.07); }
.chat-row.pinned + .chat-row:not(.pinned){ border-top:none; }
.pin-flag{
  flex:0 0 auto;
  width:14px; height:14px;
  margin-right:auto;
  align-self:center;
  fill:none; stroke:var(--gray-2);
  stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round;
}
.row-top .row-name{ flex:0 1 auto; }
.sheet-item.danger .sheet-item-name{ color:var(--danger); }
.sheet-sub-note{
  padding:4px 22px 0;
  font-size:11.5px; color:var(--gray-3); line-height:1.6;
}
