/* ============================================================
   网页端其他页面重构（web/pages-redesign.css）
   目标：让 阅读 / 词库 / 商城 / 设置 四页与首页同一套「惊艳」语言。
   原则：
   1) 每页仍是独立视图（.view 切换，不改变 app 的视图模型）；
   2) 每页顶部一个「记忆点」hero —— 墨绿深色面板 + 巨号衬线数字 + 细线 kicker；
   3) 只用 CSS：不改 HTML 结构、不改 JS 绑定、不新增取数逻辑。
      hero 的数字/信息来自页面里已经存在的真实 DOM（如 #dictCount、#genTop 的按钮、
      商城 #shopPointsNum），用 CSS 重新排布进 hero 区域；
   4) 所有颜色/字体走首页令牌（--font-disp / --brand / --ink / --card ...），
      因此与 7 套皮肤 × 明暗双轴天然兼容。
   ============================================================ */

/* ---------------- 公共：页面外壳 + 标题（衬线大字 + 细线 kicker） ---------------- */
#view-read, #view-dict, #view-search, #view-settings, #view-shop {
  max-width: 1080px; margin: 0 auto; overflow-x: clip;
}
#view-read.view.active, #view-dict.view.active, #view-search.view.active,
#view-settings.view.active, #view-shop.view.active {
  animation: pgIn .32s var(--ease-out) both;
}
@keyframes pgIn { from { opacity: 0; transform: translate3d(0, 8px, 0); } to { opacity: 1; transform: none; } }

/* 页面标题：衬线大字 + 细线 kicker（伪元素生成，不改 HTML） */
#view-read::before, #view-dict::before, #view-settings::before, #view-shop::before, #view-search::before {
  display: block; font-family: var(--font-disp); font-weight: 500; letter-spacing: -.02em;
  font-size: clamp(34px, 4.4vw, 52px); line-height: 1.1; color: var(--ink);
  margin: 6px 0 20px; padding-top: 22px; position: relative;
}
#view-read::before { content: "阅读"; }
#view-dict::before { content: "词库"; }
#view-settings::before { content: "设置"; }
#view-shop::before { content: "商城"; }
#view-search::before { content: "查词"; }
/* 标题前的小细线（kicker 规则线） */
#view-read::before, #view-dict::before, #view-settings::before, #view-shop::before, #view-search::before {
  background: linear-gradient(var(--brand), var(--brand)) left 6px / 34px 1px no-repeat;
  padding-left: 0;
}

/* ---------------- 卡片 & 按钮 & chips 统一 ---------------- */
#view-read .card, #view-dict .card, #view-search .card, #view-settings .card, #view-shop .card {
  border: 1px solid var(--card-line); border-radius: var(--r-card);
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
#view-read .btn, #view-dict .btn, #view-search .btn, #view-settings .btn, #view-shop .btn {
  border-radius: 999px; letter-spacing: .03em;
}
#view-read .btn.primary, #view-dict .btn.primary, #view-settings .btn.primary, #view-shop .btn.primary {
  background: var(--ink); color: var(--bg); border-color: var(--ink);
}
#view-read .btn.ghost, #view-dict .btn.ghost, #view-settings .btn.ghost, #view-shop .btn.ghost {
  border: 1px solid var(--line); background: transparent;
}
#view-read .chip, #view-dict .chip, #view-shop .chip, #view-search .chip {
  border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink2);
  transition: color .2s, border-color .2s, background .2s;
}
#view-read .chip.active, #view-dict .chip.active, #view-shop .chip.active {
  color: var(--ink); border-color: var(--brand); background: var(--brand-soft);
}

/* ============================================================
   阅读：顶部 hero = #genTop 操作区（衬线大标题由 ::before 提供）
   ============================================================ */
#view-read .gen-top {
  position: relative; overflow: hidden; text-align: left;
  background: linear-gradient(160deg, #1f3a33, #14201c);
  border: 1px solid rgba(168, 203, 189, .18); border-radius: var(--r-card);
  color: #f3efe6; padding: 30px 34px 28px;
  box-shadow: 0 1px 2px rgba(13, 17, 15, .08), 0 16px 32px -24px rgba(13, 17, 15, .35);
  margin-bottom: 22px;
}
#view-read .gen-top::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: none;
}
#view-read .gen-top > * { position: relative; }
/* 指南「?」：放在 .gen-bar 独占一行，不再绝对定位压住按钮；
   深墨绿 hero 底上用浅色描边 + 薄荷绿光圈，亮暗主题都醒目。 */
#view-read .gen-bar { margin-bottom: 16px; }
#view-read .gen-bar-title { color: rgba(243, 239, 230, .55); }
#view-read .guide-q {
  background: transparent; border-color: rgba(243, 239, 230, .30); color: #f3efe6;
}
#view-read .guide-q:hover { color: #fff; border-color: #f3efe6; }
#view-read .guide-q.glowing {
  color: #f3efe6; border-color: #a8cbbd; border-width: 2px;
  animation: guideGlowWeb 1.8s ease-in-out infinite;
}
@keyframes guideGlowWeb {
  0%   { box-shadow: 0 0 0 0 #a8cbbd; transform: scale(1); }
  60%  { box-shadow: 0 0 0 12px transparent; transform: scale(1.1); }
  100% { box-shadow: 0 0 0 0 #a8cbbd; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  #view-read .guide-q.glowing { animation: none; box-shadow: 0 0 0 4px #a8cbbd; }
}
#view-read .gen-btns { display: flex; gap: 12px; flex-wrap: wrap; }
#view-read .gen-top .btn.primary {
  background: #f3efe6; color: #0d110f; border: 0; box-shadow: none;
  padding: 13px 32px; font-size: 15px;
}
#view-read .gen-top .btn.primary:hover { box-shadow: none; background: #fffdf8; }
#view-read .gen-top .btn.ghost {
  background: transparent; color: #f3efe6; border: 1px solid rgba(243, 239, 230, .25);
}
#view-read .gen-hint { margin-top: 14px; font-size: 13px; color: #b9b5aa; }
#view-read .gen-hint:empty { display: none; }

/* 阅读列表：卡片化，衬线标题 + 元信息细字 */
#view-read .read-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 18px; }
#view-read .art-row { margin-bottom: 0; }
#view-read .art-item {
  border: 1px solid var(--card-line); border-radius: var(--r-card);
  background: var(--card); box-shadow: var(--shadow);
  padding: 22px 24px; transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out), border-color .2s;
}
#view-read .art-item:hover { box-shadow: var(--shadow-lift); border-color: color-mix(in srgb, var(--brand) 35%, transparent); }
#view-read .art-item .t {
  font-family: var(--font-disp); font-weight: 500; font-size: 22px; line-height: 1.3;
  letter-spacing: -.01em; color: var(--ink); padding-right: 30px;
}
#view-read .art-item .m {
  color: var(--ink3); font-size: 12px; letter-spacing: .06em;
  border-top: 1px solid var(--line); padding-top: 12px; margin-top: 14px;
}
#view-read .art-item .m .ok { color: var(--green); }
#view-read .art-item .m .warn { color: var(--red); font-weight: 700; }
#view-read .art-tag-novel { color: var(--violet); }

/* 文章详情页：衬线大标题 + 舒适正文 */
#view-read .article h2 { font-family: var(--font-disp); font-size: clamp(26px, 3vw, 36px); line-height: 1.25; font-weight: 500; }
#view-read .art-text { font-family: var(--font-disp); font-size: 19px; line-height: 1.9; }
#view-read h3 { font-family: var(--font-disp); font-weight: 500; font-size: 22px; }

/* ============================================================
   词库：hero 承载「当前词书 + 真实词数」
   真实 DOM：#bookChips / .dict-bar / #dictCount / #dictList
   做法：把 #dictCount（真实「共 N 个单词」）用 CSS 提升为 hero 大字。
   ============================================================ */
#view-dict { position: relative; }
#view-dict #bookChips { margin: 2px 0 16px; }
#view-dict #bookChips .chip { font-size: 12.5px; padding: 7px 13px; }
#view-dict #bookChips .chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* 词数 hero：深色面板包住 .dict-count */
#view-dict .dict-count {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, #1f3a33, #14201c);
  border: 1px solid rgba(168, 203, 189, .18); border-radius: var(--r-card);
  color: #f3efe6; box-shadow: 0 1px 2px rgba(13, 17, 15, .08), 0 16px 32px -24px rgba(13, 17, 15, .35);
  padding: 26px 32px; margin: 0 0 18px;
  font-family: var(--font-disp); font-weight: 500; letter-spacing: -.01em;
  font-size: clamp(20px, 2.6vw, 30px); color: #f3efe6;
}
#view-dict .dict-count::before {
  content: "当前词书"; display: block; font-family: inherit; font-weight: 400;
  font-size: 12px; letter-spacing: .08em; color: #a8cbbd;
  margin-bottom: 10px;
}
#view-dict .dict-count::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: none;
}
#view-dict .dict-count:empty { display: none; }

/* 搜索框 + 筛选：胶囊 + 细线 */
#view-dict .dict-bar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
#view-dict .dict-search-wrap input {
  border-radius: 999px; border: 1px solid var(--line); background: var(--card); padding: 13px 20px;
  font-family: inherit; color: var(--ink); width: 100%;
}
#view-dict .dict-search-wrap input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }

/* 词条行：衬线单词 + 状态胶囊 */
#view-dict .dict-list { border-top: 1px solid var(--line); }
#view-dict .dict-item { border-bottom: 1px solid var(--line); }
#view-dict .dict-item .row1 { padding: 16px 4px; }
#view-dict .dict-item .dw { font-family: var(--font-disp); font-weight: 500; font-size: 21px; color: var(--ink); }
#view-dict .dict-item .dp { font-size: 12.5px; color: var(--ink3); }
#view-dict .dict-item .dt { font-size: 14px; color: var(--ink2); }
#view-dict .dict-item .ds { font-size: 11px; letter-spacing: .1em; padding: 3px 10px; }
#view-dict .pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; }
#view-dict .pager .btn { border-radius: 999px; }

/* 查词页：结果卡统一 */
#view-search .search-head b { font-family: var(--font-disp); font-weight: 500; font-size: 26px; }
#view-search .dict-item { border-bottom: 1px solid var(--line); }
#view-search .dict-item .dw { font-family: var(--font-disp); font-size: 20px; }

/* ============================================================
   商城：hero = 积分横幅（.shop-header 内的 .shop-user-banner）
   真实 DOM：#shopPointsNum（真实积分）、#shopDailyNum 等
   ============================================================ */
#view-shop .shop-header {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, #1f3a33, #14201c);
  border: 1px solid rgba(168, 203, 189, .18); border-radius: var(--r-card);
  color: #f3efe6; box-shadow: 0 1px 2px rgba(13, 17, 15, .08), 0 16px 32px -24px rgba(13, 17, 15, .35);
  padding: 26px 30px; margin-bottom: 18px; gap: 14px;
}
#view-shop .shop-header::before {
  content: "可用积分"; position: absolute; top: 22px; left: 30px;
  font-size: 12px; letter-spacing: .08em; color: #a8cbbd;
}
#view-shop .shop-header::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: none;
}
#view-shop .shop-header > * { position: relative; z-index: 1; }
#view-shop .shop-user-banner { padding-top: 26px; }
#view-shop .sub-name { color: #f3efe6; font-family: var(--font-disp); font-weight: 500; font-size: 18px; }
#view-shop .sub-points {
  font-family: var(--font-disp); font-weight: 500; font-size: clamp(48px, 6vw, 72px);
  line-height: 1; letter-spacing: -.03em; color: #e3a27a;
}
#view-shop .sub-coin { font-size: 22px; }
#view-shop .sub-label, #view-shop .sub-daily-label, #view-shop .sub-daily-cap { color: #b9b5aa; }
#view-shop .sub-daily-val { color: #a8cbbd; }
#view-shop .sub-daily-art { background: rgba(243, 239, 230, .08); border-color: rgba(243, 239, 230, .16); color: #d7d3c9; }
#view-shop .sub-daily-bar { background: rgba(243, 239, 230, .14); max-width: 220px; }
#view-shop .shop-rules-bar { border-top: 1px dashed rgba(243, 239, 230, .18); color: #b9b5aa; }
#view-shop .shop-rules-bar b { color: #e3a27a; }
#view-shop .shop-header .btn.small.ghost { color: #f3efe6; border-color: rgba(243, 239, 230, .25); }

/* 分类导航：胶囊 */
#view-shop .shop-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
#view-shop .snav-btn {
  border-radius: 999px; border: 1px solid var(--line); background: transparent;
  color: var(--ink2); padding: 8px 18px; font-size: 13px; letter-spacing: .04em;
  transition: color .2s, border-color .2s, background .2s;
}
#view-shop .snav-btn.active { color: var(--ink); border-color: var(--brand); background: var(--brand-soft); }

/* 商品卡：衬线名 + 衬线价格 */
#view-shop .shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
#view-shop .shop-card {
  border-radius: var(--r-card); background: var(--card); border: 1px solid var(--card-line);
  box-shadow: var(--shadow); transition: transform .2s var(--ease-out), box-shadow .8s;
}
#view-shop .shop-card:hover { box-shadow: var(--shadow-lift); border-color: color-mix(in srgb, var(--brand) 35%, transparent); }
#view-shop .shop-card-title { font-family: var(--font-disp); font-weight: 500; font-size: 18px; color: var(--ink); }
#view-shop .shop-card-desc { font-size: 12px; color: var(--ink2); }
#view-shop .shop-card-action .btn, #view-shop .shop-card-action button { border-radius: 999px; }
#view-shop .shop-card-badge { border-radius: 999px; letter-spacing: .08em; }

/* 横幅（活动 / 排行榜）：细线卡 */
#view-shop .shop-banner { border-radius: var(--r-item); }

/* ============================================================
   设置：左目录右流式工作台 + 衬线分组标题 + 纸感表单
   ============================================================ */
#view-settings.view.active {
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: wsFadeIn .22s var(--ease-out);
  transform: none;
  filter: none;
  will-change: auto;
}
@keyframes wsFadeIn { from { opacity: 0; } to { opacity: 1; } }
#view-settings::before { margin-bottom: 4px; }

#view-settings .ws-layout {
  display: grid;
  grid-template-columns: 184px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
#view-settings .ws-nav {
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#view-settings .ws-nav-item {
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--ink2);
  position: relative;
  transition: background-color .18s var(--ease-out), color .18s var(--ease-out);
}
#view-settings .ws-nav-item:hover {
  color: var(--ink);
  background: var(--soft);
}
#view-settings .ws-nav-item.active {
  background: var(--brand-soft);
  color: var(--ink);
  font-weight: 500;
}
#view-settings .ws-nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2.5px;
  border-radius: 999px;
  background: var(--brand);
}

#view-settings .ws-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

#view-settings .card {
  margin: 0;
  padding: 24px 28px;
  background: var(--card);
}
#view-settings .card h3 {
  font-family: var(--font-disp);
  font-weight: 500;
  font-size: 21px;
  letter-spacing: -.01em;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 8px;
}
#view-settings .ws-card-desc {
  margin: -2px 0 16px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink2);
}

#view-settings .ws-cell {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
#view-settings .ws-cell + .ws-grid-3,
#view-settings .ws-cell + .ws-grid-2 {
  margin-top: 16px;
}
#view-settings .ws-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
#view-settings .ws-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

#view-settings .field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 16px;
}
#view-settings .ws-cell > .field,
#view-settings .ws-grid-2 > .field,
#view-settings .ws-grid-3 > .field {
  margin-bottom: 0;
}
#view-settings .field > span {
  width: auto;
  font-size: 13px;
  color: var(--ink2);
  letter-spacing: .04em;
  line-height: 1.4;
}
#view-settings .field input:not([type="checkbox"]),
#view-settings .field select {
  flex: none;
  width: 100%;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  padding: 0 14px;
  font-family: inherit;
  font-size: 14.5px;
  box-sizing: border-box;
  transition: border-color .22s var(--ease-out), box-shadow .22s var(--ease-out);
}
html[data-client="web"] body #view-settings .field .vibe-sel-btn {
  height: 44px;
  min-height: 44px;
  border-radius: 12px;
}
#view-settings .field input[type="number"] {
  font-variant-numeric: tabular-nums;
}
#view-settings .field input:not([type="checkbox"]):focus,
#view-settings .field select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

#view-settings .field.ws-switch-row {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
}
#view-settings .field.ws-switch-box {
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg);
  min-height: 64px;
  transition: border-color .2s var(--ease-out);
}
#view-settings .field.ws-switch-box:hover {
  border-color: color-mix(in srgb, var(--brand) 32%, transparent);
}
#view-settings .ws-field-label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
#view-settings .ws-field-label > span {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.35;
}
#view-settings .ws-sub {
  font-size: 12px;
  color: var(--ink2);
  line-height: 1.45;
}
#view-settings .ws-switch-row .switch {
  flex-shrink: 0;
  margin-left: auto;
}

#view-settings .ws-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 20px 0 12px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}
#view-settings .ws-subhead > span {
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--ink2);
}
#view-settings .ws-badge-instant {
  font-style: normal;
  font-size: 11px;
  font-weight: 500;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 6px;
  padding: 2px 8px;
  line-height: 1.5;
}

#view-settings .ws-app-only { display: none !important; }

#view-settings .card .btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
#view-settings .hint { font-size: 12.5px; color: var(--ink2); line-height: 1.7; }
#view-settings .card .hint.ws-hint-show { display: block; margin: 0 0 14px; }

/* 保存条：常态随流置放，发生未保存改动时浮底提示 */
#view-settings .ws-save-bar {
  position: static;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-radius: 16px;
  background: var(--card-solid);
  border: 1px solid var(--card-line);
  box-shadow: var(--shadow);
  transition: border-color .22s var(--ease-out), box-shadow .22s var(--ease-out);
}
#view-settings .ws-save-hint {
  font-size: 13px;
  color: var(--ink2);
  line-height: 1.45;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
#view-settings .ws-save-bar.is-dirty {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 20px;
  width: min(640px, calc(100vw - 140px));
  z-index: 40;
  padding: 12px 18px;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft), var(--shadow-lift);
}
#view-settings .ws-save-bar.is-dirty .ws-save-hint {
  color: var(--ink);
  font-weight: 500;
}
#view-settings .ws-save-bar.is-dirty .ws-save-hint::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  flex-shrink: 0;
}
#view-settings #btnSaveSettings {
  flex-shrink: 0;
  padding-inline: 24px;
}

/* 例句语音：2 列词库网格 */
#view-settings #voicePackCard .up-progress { margin-top: 14px; }
#view-settings .vp-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 0;
}
#view-settings #voicePackList > .hint {
  display: block;
  grid-column: 1 / -1;
  margin: 0;
}
#view-settings .vp-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 4px 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  transition: border-color .18s var(--ease-out), background-color .18s var(--ease-out);
}
#view-settings .vp-name {
  grid-column: 1;
  grid-row: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}
#view-settings .vp-state {
  grid-column: 1;
  grid-row: 2;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#view-settings .vp-act {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
}
#view-settings .vp-row-cur {
  border-color: color-mix(in srgb, var(--brand) 38%, transparent);
  background: var(--brand-soft);
}

/* 账号与同步 */
#view-settings .ws-acc-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
}
#view-settings .ws-acc-info {
  flex: 1 1 260px;
  min-width: 0;
}
#view-settings .ws-acc-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}
#view-settings .ws-acc-meta .hint {
  margin: 0;
  line-height: 1.55;
}
#view-settings #accStatus {
  color: var(--ink);
  font-weight: 500;
}
#view-settings .ws-acc-actions {
  margin-top: 2px;
  justify-content: flex-end;
  flex-shrink: 0;
}
#view-settings .ws-btn-reconnect {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--on-brand, #fff);
  font-weight: 500;
}
#view-settings #btnAccAdv.is-open {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--ink);
}
#view-settings .api-panel {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
#view-settings .api-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0;
}
#view-settings .api-preset {
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 500;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink2);
  cursor: pointer;
  transition: border-color .18s var(--ease-out), background-color .18s var(--ease-out), color .18s var(--ease-out);
}
#view-settings .api-preset:hover {
  border-color: color-mix(in srgb, var(--brand) 40%, transparent);
  color: var(--ink);
}
#view-settings .api-preset.active,
#view-settings .api-preset.on {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 500;
}
#view-settings .api-panel .ws-grid-2 .field { margin-bottom: 0; }
#view-settings .api-key-wrap { width: 100%; display: flex; align-items: center; gap: 8px; }
#view-settings .field .api-key-wrap input:not([type="checkbox"]) {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
}
#view-settings .api-eye {
  height: 44px;
  border-radius: 12px;
  padding: 0 14px;
  font-weight: 500;
  background: var(--bg);
}
#view-settings .api-panel .btn-row { margin-top: 2px; }
#view-settings .api-test-msg { margin-top: 0; }

/* 数据管理区域：导入品牌卡片网格 + 导入步骤 + 危险重置 */
#view-settings .ws-data-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
#view-settings .iw-web-brand-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}
#view-settings .iw-web-brand-grid .iw-shanbay-hero-btn {
  border-radius: 14px;
  padding: 13px 14px;
  height: 100%;
  box-shadow: none;
}
#view-settings .iw-web-brand-grid .iw-sb-badge {
  font-weight: 600;
  border-radius: 11px;
}
#view-settings .iw-web-brand-grid .iw-sb-main b {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -.005em;
}
#view-settings .iw-web-brand-grid .iw-sb-main small {
  font-size: 12px;
  font-weight: 400;
}
#view-settings .iw-web-brand-grid .iw-sb-arrow {
  font-weight: 600;
}
:root[data-theme="dark"] #view-settings .iw-web-brand-grid .iw-shanbay-hero-btn {
  background: linear-gradient(135deg, rgba(20, 184, 138, .15), rgba(16, 185, 129, .05)), var(--card-solid);
}
:root[data-theme="dark"] #view-settings .iw-web-brand-grid .iw-hero-maimemo {
  background: linear-gradient(135deg, rgba(99, 102, 241, .16), rgba(79, 70, 229, .05)), var(--card-solid);
}
#view-settings .iw-card-steps {
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg);
}
#view-settings .iw-steps-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 10px;
}
#view-settings .iw-steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#view-settings .iw-steps-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink2);
}
#view-settings .iw-step-num {
  flex: 0 0 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
#view-settings .card.ws-danger-card,
#view-settings .card:has(#btnResetWords) {
  border-color: var(--red-soft);
}
#view-settings .ws-danger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}
#view-settings .ws-danger-info {
  flex: 1 1 auto;
  min-width: 0;
}
#view-settings .ws-danger-info .ws-card-desc {
  margin: 0;
}
#view-settings .ws-danger-act {
  flex-shrink: 0;
}
#view-settings .ws-btn-danger {
  background: var(--red-soft);
  color: var(--red);
  border: 1px solid color-mix(in srgb, var(--red) 22%, transparent);
  font-weight: 500;
}
#view-settings .ws-btn-danger:hover {
  background: color-mix(in srgb, var(--red) 16%, transparent);
  border-color: color-mix(in srgb, var(--red) 40%, transparent);
}

/* 风格网格：预览小样卡（隐藏保留兼容） */
#view-settings .style-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
#view-settings .style-opt {
  border: 1px solid var(--line); border-radius: 16px; padding: 14px;
  background: var(--card-solid); text-align: left; transition: border-color .2s, box-shadow .2s;
}
#view-settings .style-opt:hover { border-color: color-mix(in srgb, var(--brand) 40%, transparent); }
#view-settings .style-opt[aria-checked="true"], #view-settings .style-opt.on {
  border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
#view-settings .style-opt .so-n { font-size: 14px; color: var(--ink); font-weight: 600; }
#view-settings .style-opt .so-d { font-size: 11.5px; color: var(--ink2); line-height: 1.4; }

/* ---------------- 手机端 ---------------- */
@media (max-width: 899px) {
  #view-settings .ws-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  #view-settings .ws-nav {
    position: static;
    flex-direction: row;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 2px;
  }
  #view-settings .ws-nav::-webkit-scrollbar { display: none; }
  #view-settings .ws-nav-item {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 8px 14px;
    border: 1px solid var(--line);
    background: var(--card-solid);
  }
  #view-settings .ws-nav-item.active {
    border-color: var(--brand);
    background: var(--brand-soft);
  }
  #view-settings .ws-nav-item.active::before { display: none; }
  #view-settings .ws-save-bar.is-dirty {
    left: 14px;
    right: 14px;
    bottom: 20px;
    transform: none;
    width: auto;
    padding: 10px 14px;
    gap: 10px;
  }
  #view-settings .ws-save-bar.is-dirty .ws-save-hint {
    font-size: 12.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  #view-settings .ws-save-bar.is-dirty #btnSaveSettings {
    padding-inline: 18px;
  }
}
@media (max-width: 767px) {
  #view-settings .ws-save-bar.is-dirty {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 86px);
  }
  #view-read::before, #view-dict::before, #view-settings::before, #view-shop::before, #view-search::before { font-size: 32px; }
  #view-read .gen-top { padding: 24px 22px; }
  #view-read .read-list { grid-template-columns: 1fr; }
  #view-shop .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  #view-shop .sub-points { font-size: 46px; }
  #view-dict .dict-count { padding: 22px 24px; }
}
@media (max-width: 639px) {
  #view-settings .card { padding: 20px 18px; }
  #view-settings .ws-grid-3,
  #view-settings .ws-grid-2,
  #view-settings .vp-list,
  #view-settings .iw-web-brand-grid {
    grid-template-columns: 1fr;
  }
  #view-settings .ws-acc-head,
  #view-settings .ws-danger-row {
    flex-direction: column;
    align-items: stretch;
  }
  #view-settings .ws-acc-actions { justify-content: flex-start; }
  #view-settings .ws-save-bar {
    padding: 12px 14px;
    gap: 12px;
  }
}

/* ---------------- 减少动态 ---------------- */
@media (prefers-reduced-motion: reduce) {
  #view-read.view.active, #view-dict.view.active, #view-search.view.active,
  #view-settings.view.active, #view-shop.view.active { animation: none; }
  #view-read .art-item, #view-shop .shop-card { transition: none; }
}

/* ---------- 打磨（11-11）---------- */
/* 切回已进过的页面（app.js show() 挂 .view-quiet）不再重播 0.8s 的整页入场动画 */
#view-read.view.active.view-quiet, #view-dict.view.active.view-quiet, #view-search.view.active.view-quiet,
#view-settings.view.active.view-quiet, #view-shop.view.active.view-quiet { animation: none; }
/* 词库：页面在纵向 flex 的 main 里带 margin: 0 auto，宽度按「内容最小宽度」算；
   窄屏上不换行的释义让它比屏幕宽出一截（右侧标签和状态被裁掉）。定成 100% 宽，释义超长时省略 */
#view-dict { width: 100%; }
#view-dict .dict-item .row1 { min-width: 0; }
#view-dict .dict-item .dt { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* 首次注册：网页端三步设置。沿用 App 内容，桌面集中在对话框内。 */
#intro.intro-web {
  align-items: center; justify-content: center; padding: 20px;
  background: color-mix(in srgb, var(--bg) 68%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.intro-web .intro-shell {
  display: flex; flex-direction: column; min-height: 0;
  width: min(720px, 100%); height: min(640px, calc(100dvh - 40px));
  padding: 24px 32px; background: var(--card-solid);
  border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow);
  transform: translateY(10px) scale(.985); opacity: 0;
  transition: transform .26s var(--ease-out), opacity .24s var(--ease-out);
}
.intro-web.on .intro-shell { transform: none; opacity: 1; }
.intro-web .intro-bar,
.intro-web .intro-foot,
.intro-web .intro-in { width: 100%; max-width: none; margin: 0; }
.intro-web .intro-bar {
  align-items: center; gap: 16px;
  padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.intro-web .intro-bar-left { display: flex; align-items: center; gap: 16px; min-width: 0; }
.intro-web .iq-step { font-size: 14px; font-weight: 600; flex-shrink: 0; }
.intro-web .intro-steps { display: flex; align-items: center; gap: 8px; min-width: 0; }
.intro-web .is-item {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--ink3); white-space: nowrap;
  transition: color .2s var(--ease);
}
.intro-web .is-item i {
  width: 18px; height: 18px; border-radius: 50%;
  display: inline-grid; place-items: center;
  font-style: normal; font-family: var(--font-num); font-size: 11px; font-weight: 600;
  background: var(--soft2); color: var(--ink2);
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.intro-web .is-sep { width: 18px; height: 1px; background: var(--line); flex-shrink: 0; }
.intro-web[data-step="0"] .is-item[data-s="0"],
.intro-web[data-step="1"] .is-item[data-s="1"],
.intro-web[data-step="2"] .is-item[data-s="2"] { color: var(--ink); font-weight: 600; }
.intro-web[data-step="0"] .is-item[data-s="0"] i,
.intro-web[data-step="1"] .is-item[data-s="1"] i,
.intro-web[data-step="2"] .is-item[data-s="2"] i { background: var(--brand); color: var(--on-brand); }
.intro-web[data-step="1"] .is-item[data-s="0"],
.intro-web[data-step="2"] .is-item[data-s="0"],
.intro-web[data-step="2"] .is-item[data-s="1"] { color: var(--brand); cursor: pointer; }
.intro-web[data-step="1"] .is-item[data-s="0"] i,
.intro-web[data-step="2"] .is-item[data-s="0"] i,
.intro-web[data-step="2"] .is-item[data-s="1"] i { background: var(--brand-soft); color: var(--brand); }
.intro-web .intro-skip { padding: 6px 12px; border-radius: 8px; font-size: 13px; cursor: pointer; }
.intro-web .intro-skip:hover { background: var(--soft); color: var(--ink); }
.intro-web .intro-view { width: 100%; margin-inline: 0; }
.intro-web .intro-pg { padding-inline: 0; }
.intro-web .intro-in { padding: 20px 6px 12px 2px; scrollbar-gutter: stable; }
.intro-web .intro-h { font-size: 26px; font-weight: 600; line-height: 1.3; }
.intro-web .intro-p { max-width: none; margin-top: 8px; font-size: 14px; line-height: 1.7; color: var(--ink2); }
.intro-web .iq-list {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px;
  margin-top: 18px; border-bottom: 0;
}
.intro-web .iq-opt {
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--soft); align-items: center; cursor: pointer;
  transition: border-color .18s var(--ease), background-color .18s var(--ease), box-shadow .18s var(--ease);
}
.intro-web .iq-opt:hover { border-color: color-mix(in srgb, var(--brand) 48%, transparent); background: var(--card-solid); }
.intro-web .iq-opt.sel {
  border-color: var(--brand); background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px var(--brand);
}
.intro-web .iq-opt b { font-size: 15px; min-width: 0; overflow-wrap: anywhere; }
.intro-web .iq-opt span { font-size: 13px; }
.intro-web .intro-chips {
  max-width: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px; margin-top: 20px;
}
.intro-web .intro-chip {
  height: 68px; border-radius: 12px; border: 1px solid var(--line); background: var(--soft);
  font-size: 20px; font-weight: 600; gap: 3px; cursor: pointer;
}
.intro-web .intro-chip i { display: block; font-size: 12px; color: var(--ink2); }
.intro-web .intro-chip.sel { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.intro-web .intro-chip.sel i { color: var(--on-brand); opacity: .88; }
.intro-web .intro-cap { margin-top: 20px; font-size: 12px; color: var(--ink2); }
.intro-web #introLoad {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
  margin-top: 12px; border: 0;
}
.intro-web #introLoad > div {
  flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft);
}
.intro-web #introLoad dt { font-size: 12px; color: var(--ink2); }
.intro-web #introLoad dd { font-size: 15px; font-weight: 600; text-align: left; }
.intro-web .intro-pg:last-child .intro-sum {
  margin-top: 18px; padding: 4px 18px;
  background: var(--soft); border: 1px solid var(--line); border-radius: 14px;
}
.intro-web .intro-pg:last-child .intro-sum > div { padding: 13px 0; border-bottom-color: var(--line); }
.intro-web .intro-pg:last-child .intro-sum > div:last-child { border-bottom: 0; }
.intro-web .intro-flow {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px;
}
.intro-web .if-card {
  padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card-solid);
  display: flex; flex-direction: column; gap: 5px;
}
.intro-web .if-card b { font-size: 13px; font-weight: 600; color: var(--ink); }
.intro-web .if-card span { font-size: 12px; line-height: 1.55; color: var(--ink2); }
.intro-web .intro-foot {
  flex-direction: row; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 16px; border-top: 1px solid var(--line);
}
.intro-web .iq-hint { text-align: left; font-size: 12px; color: var(--ink2); margin: 0; }
.intro-web .iq-acts { margin-left: auto; gap: 10px; }
.intro-web .intro-back {
  padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px;
  background: transparent; font-size: 14px; color: var(--ink2);
}
.intro-web .intro-back:hover { background: var(--soft); color: var(--ink); }
.intro-web .intro-go { flex: 0 0 auto; min-width: 132px; min-height: 44px; padding: 0 24px; font-size: 15px; }
@media (min-width: 601px) {
  .intro-web .iq-list > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  #intro.intro-web { padding: 12px; }
  .intro-web .intro-shell { height: calc(100dvh - 24px); padding: 18px 20px; border-radius: 20px; }
  .intro-web .intro-bar { padding-bottom: 12px; }
  .intro-web .intro-steps { display: none; }
  .intro-web .iq-list { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .intro-web .intro-chips { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .intro-web .intro-chip { height: 58px; font-size: 18px; }
  .intro-web #introLoad,
  .intro-web .intro-flow { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .intro-web #introLoad > div { flex-direction: row; align-items: center; justify-content: space-between; padding: 11px 14px; }
  .intro-web .intro-h { font-size: 22px; }
  .intro-web .intro-in { padding: 16px 2px 10px; }
  .intro-web .intro-foot { flex-direction: column; align-items: stretch; gap: 10px; padding-top: 12px; }
  .intro-web .iq-hint { text-align: center; }
  .intro-web .iq-acts { margin-left: 0; }
  .intro-web .intro-go { flex: 1 1 auto; min-height: 48px; }
}
