/* ============================================================
   时光杂货店 · 手机端控制台样式
   设计约束：单列布局，最大宽度 430px，主色 #1677ff
   ============================================================ */

:root {
  --primary: #1677ff;
  --primary-600: #0f66e6;
  --primary-050: #e8f1ff;
  --ink: #111a2b;
  --ink-2: #4a5568;
  --ink-3: #8a94a6;
  --line: #e9edf3;
  --bg: #f3f5f9;
  --card: #ffffff;
  --danger: #e5484d;
  --ok: #18a058;
  --radius: 14px;
  --tab-h: 56px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --app-max: 430px;
}

@media (min-width: 900px) {
  :root { --app-max: 1120px; }
  body[data-route="home"] .view {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: start;
  }
  body[data-route="home"] .status,
  body[data-route="home"] .logs { grid-column: 1 / -1; }
  #setBody {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: start;
  }
  #setEmpty, #taskCard { grid-column: 1 / -1; }
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: #e7ebf2;
  color: var(--ink);
  font-family: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  overscroll-behavior-y: none;
  min-height: 100vh;
}

button, input, select, textarea { font: inherit; color: inherit; }

a { color: var(--primary); }

.noscript {
  max-width: var(--app-max);
  margin: 24px auto;
  padding: 14px;
  background: #fff;
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--ink-2);
  text-align: center;
}

.app {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--app-max);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  box-shadow: 0 0 0 1px rgba(16, 24, 40, .04);
}

@media (min-width: 480px) {
  .app { box-shadow: 0 24px 60px rgba(16, 24, 40, .14); }
}

/* ---------- 顶栏 ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(var(--safe-t) + 10px) 14px 10px;
  background: rgba(255, 255, 255, .93);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(1.6) blur(12px);
  backdrop-filter: saturate(1.6) blur(12px);
}

.topbar__main { display: flex; align-items: center; gap: 10px; min-width: 0; }

.topbar__brand {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(140deg, #4d95ff, var(--primary));
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.topbar__text { min-width: 0; }

.topbar__title { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.2; }

.topbar__sub {
  margin: 2px 0 0;
  max-width: 190px;
  font-size: 11px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.iconbtn {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  font-size: 12px;
  cursor: pointer;
}
.iconbtn:active { background: #f3f5f9; }

/* ---------- 内容区 ---------- */

.view { flex: 1; padding: 12px 12px calc(var(--tab-h) + var(--safe-b) + 24px); }
body[data-route="login"] .view { padding: 0; }
body[data-route="setting"] .view { padding-bottom: calc(var(--tab-h) + var(--safe-b) + 80px); }

.card {
  margin-bottom: 12px;
  padding: 14px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 0 0 1px rgba(16, 24, 40, .03);
}

.card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.card__title { margin: 0; font-size: 14px; font-weight: 600; }
.card__hint { font-size: 11px; color: var(--ink-3); text-align: right; }

/* ---------- 状态卡 ---------- */

.status__top { display: flex; align-items: center; gap: 10px; }

.dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c3cad6;
  box-shadow: 0 0 0 4px rgba(195, 202, 214, .25);
}
.dot--on { background: var(--ok); box-shadow: 0 0 0 4px rgba(24, 160, 88, .16); animation: pulse 1.9s ease-in-out infinite; }
.dot--off { background: #c3cad6; box-shadow: 0 0 0 4px rgba(195, 202, 214, .25); }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

.status__text { flex: 1 1 auto; min-width: 0; }
.status__title { font-size: 15px; font-weight: 600; line-height: 1.25; }
.status__sub { margin-top: 2px; font-size: 12px; color: var(--ink-3); word-break: break-word; }
.status__time { display: block; margin-top: 10px; font-size: 11px; color: var(--ink-3); }

.kv {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.kv__row { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.kv__row dt { font-size: 11px; color: var(--ink-3); }
.kv__row dd { margin: 0; font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 表单 ---------- */

.field { margin-bottom: 12px; }
.field:last-child { margin-bottom: 0; }
.field__label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 500; color: var(--ink-2); }

.field__wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field__wrap:focus-within { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(22, 119, 255, .12); }

.field__input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 15px;
  color: var(--ink);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
select.field__input { height: 44px; color: var(--ink); }
.field__input::placeholder { color: #b3bccb; }

.field__suffix {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: var(--primary-050);
  color: var(--primary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.field__suffix:active { transform: scale(.97); }

.field__note { margin: 6px 2px 0; font-size: 11px; color: var(--ink-3); }
.field__note:empty { display: none; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.actions .btn { flex: 1 1 auto; min-width: 132px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 46px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .12s, background .15s, opacity .15s;
  appearance: none;
  -webkit-appearance: none;
}
.btn:active { transform: scale(.985); }
.btn[disabled] { opacity: .55; cursor: default; transform: none; }

.btn--primary { background: var(--primary); color: #fff; box-shadow: 0 6px 14px rgba(22, 119, 255, .22); }
.btn--primary:active { background: var(--primary-600); }
.btn--outline { background: #fff; border-color: var(--line); color: var(--ink); }
.btn--danger { background: rgba(229, 72, 77, .07); border-color: rgba(229, 72, 77, .34); color: var(--danger); }
.btn--ghost { background: #f2f5fa; color: var(--ink-2); }
.btn--block { width: 100%; }
.btn--sm { height: 36px; padding: 0 14px; border-radius: 10px; font-size: 13px; font-weight: 500; }
.btn.is-busy { opacity: .8; cursor: progress; }

/* ---------- 日志 ---------- */

.logs__tools { display: flex; gap: 6px; }

.chipbtn {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.chipbtn.is-on { background: var(--primary-050); border-color: rgba(22, 119, 255, .3); color: var(--primary); }

.log {
  max-height: 280px;
  overflow: auto;
  padding: 10px 10px 12px;
  border-radius: 12px;
  background: #0e1726;
  color: #c7d2e3;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  font-size: 11.5px;
  line-height: 1.55;
  -webkit-overflow-scrolling: touch;
}
.log__line { display: flex; gap: 8px; padding: 1px 0; white-space: pre-wrap; word-break: break-word; }
.log__ts { flex: 0 0 auto; color: #6d7d95; }
.log__msg { flex: 1 1 auto; min-width: 0; }
.log__line--error { color: #ff8a8a; }
.log__line--warn { color: #ffca7a; }
.log__line--debug { color: #7d8ba1; }
.log__line--info { color: #9fd4ff; }
.log__empty { padding: 18px 0; text-align: center; color: #6d7d95; }
.log__empty--err { color: #ff8a8a; }

/* ---------- 设置：工具条 ---------- */

.toolbar { margin-bottom: 12px; }

.search__input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-size: 14px;
  outline: none;
}
.search__input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(22, 119, 255, .12); }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 2px 2px;
}
.chip { min-height: 44px; }

.chip {
  flex: 0 0 auto;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  font-size: 13px;
  cursor: pointer;
}
.chip.is-on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 500; }

.toolbar__meta { margin: 8px 2px 0; font-size: 11px; color: var(--ink-3); }

/* ---------- 设置：分类分组 ---------- */

.group {
  margin-bottom: 12px;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 0 0 1px rgba(16, 24, 40, .03);
}

.group__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #fbfcfe, #f5f8fd);
  border-bottom: 1px solid var(--line);
}
.group__title { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink); }
.group__count { padding: 1px 8px; border-radius: 999px; background: var(--primary-050); color: var(--primary); font-size: 11px; }
.group__acts { display: flex; gap: 6px; margin-left: auto; }

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 11px 14px;
  border-bottom: 1px solid #f2f5fa;
}
.row:last-child { border-bottom: 0; }

.row__main { display: flex; flex: 1 1 auto; flex-direction: column; gap: 3px; min-width: 0; }
.row__name { font-size: 14px; line-height: 1.3; color: var(--ink); word-break: break-word; }
.row__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.badge { padding: 1px 5px; border-radius: 5px; background: var(--primary-050); color: var(--primary); font-size: 10px; line-height: 1.5; }
.row__id { color: #a6b0c2; font-size: 10px; font-family: ui-monospace, Menlo, Consolas, monospace; }

.row--field { align-items: flex-start; }
.row--field .row__main { padding-top: 3px; }

.switch {
  position: relative;
  flex: 0 0 auto;
  width: 52px;
  height: 32px;
  margin: 0;
  border: 0;
  border-radius: 999px;
  background: #dfe5ee;
  cursor: pointer;
  transition: background .18s ease;
  appearance: none;
  -webkit-appearance: none;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .25);
  transition: transform .18s cubic-bezier(.3, .8, .3, 1);
}
.switch:checked { background: var(--primary); }
.switch:checked::after { transform: translateX(20px); }
.switch:focus-visible { outline: 2px solid rgba(22, 119, 255, .5); outline-offset: 2px; }

.num, .txt {
  flex: 0 0 auto;
  width: 112px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7f9fc;
  color: var(--ink);
  font-size: 13px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
.num { text-align: right; }
.txt { text-align: left; }
.num:focus, .txt:focus { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(22, 119, 255, .12); }

.row__ctrl--range { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.range { width: 104px; accent-color: var(--primary); }
.row__out { min-width: 26px; color: var(--ink-2); font-size: 11px; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- 设置：保存条 ---------- */

.savebar {
  position: fixed;
  right: 0;
  bottom: calc(var(--tab-h) + var(--safe-b));
  left: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: var(--app-max);
  margin: 0 auto;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.savebar.is-dirty { box-shadow: 0 -6px 18px rgba(16, 24, 40, .08); }
.savebar__text { flex: 1 1 auto; font-size: 12px; color: var(--ink-3); }
.savebar.is-dirty .savebar__text { color: var(--primary); font-weight: 500; }

/* ---------- 设置：任务映射 ---------- */

.tm__group { padding: 10px 0 4px; border-top: 1px solid var(--line); }
.tm__group:first-of-type { border-top: 0; }

.tm__gs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.tm__gs::-webkit-details-marker { display: none; }
.tm__gs::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: 2px;
  border-right: 1.5px solid var(--ink-3);
  border-bottom: 1.5px solid var(--ink-3);
  transform: rotate(-45deg);
  transition: transform .15s;
}
details[open] > .tm__gs::before { transform: rotate(45deg); }
.tm__gc { margin-left: auto; color: var(--ink-3); font-size: 11px; font-weight: 400; }

.tm__row { padding: 8px 0; border-bottom: 1px dashed #f2f5fa; }
.tm__row:last-child { border-bottom: 0; }
.tm__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tm__label { font-size: 13px; color: var(--ink); }
.tm__key { padding: 1px 5px; border-radius: 5px; background: var(--primary-050); color: var(--primary); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; }

.tm__flags, .tm__names { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.tag { padding: 1px 5px; border: 0; border-radius: 5px; background: #f2f5fa; color: var(--ink-2); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 10px; }
.tag--soft { background: #f5f8fd; color: #93a0b4; }
.tm__names--empty { color: #b6bfcd; font-size: 11px; }

.empty { padding: 24px 0; text-align: center; font-size: 13px; color: var(--ink-3); }

/* ---------- 设置页小卡片 ---------- */
.tabhead {
  grid-column: 1 / -1;
  margin: 14px 2px 8px;
  padding: 6px 12px;
  border-left: 4px solid var(--primary);
  background: #eef4ff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #1c2b3a;
}
.row--sect {
  padding: 10px 12px 4px;
  font-size: 12px;
  color: #8c8c8c;
  border-bottom: 1px solid #f0f1f3;
}
.row--switch .row__pair {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}
.row--switch .row__pair .switch { flex: 0 0 auto; }
.row__aux {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.row__auxlabel { font-size: 12px; color: #595959; white-space: nowrap; }
.row__aux .num, .row__aux .txt { width: 76px; height: 32px; padding: 0 8px; }

/* ---------- 设置页（1:1 桌面版式） ---------- */
body[data-route="setting"] .setbar {
  position: sticky; top: 0; z-index: 6; background: #fff;
  padding: 10px 14px; border-bottom: 1px solid #e8eaee;
}
body[data-route="setting"] .tb {
  display: inline-block; padding: 7px 20px; margin-right: 8px; font-size: 13px;
  color: #444; background: #f0f1f3; border-radius: 999px; border: 0; cursor: pointer;
}
body[data-route="setting"] .tb.on { background: var(--primary); color: #fff; font-weight: 700; }
body[data-route="setting"] .card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
  box-shadow: 0 1px 3px rgba(16,24,40,.05); margin-bottom: 14px; overflow: hidden;
}
body[data-route="setting"] .card__head {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  border-bottom: 1px solid #f0f1f3; cursor: pointer; user-select: none;
}
body[data-route="setting"] .card__bar { width: 4px; height: 16px; background: var(--primary); border-radius: 2px; }
body[data-route="setting"] .card__title { font-size: 14px; font-weight: 700; color: #1c2b3a; flex: 1; }
body[data-route="setting"] .card__all {
  font-size: 12px; color: #555; display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
}
body[data-route="setting"] .card__fold {
  border: 0; background: #f5f6f8; cursor: pointer; color: #666; font-size: 12px;
  padding: 3px 8px; border-radius: 6px;
}
body[data-route="setting"] .card.collapsed .card__body { display: none; }
body[data-route="setting"] .row {
  display: flex; align-items: center; gap: 9px; padding: 9px 14px;
  border-bottom: 1px solid #f4f5f7; min-height: 40px;
}
body[data-route="setting"] .row--child { padding-left: 36px; background: #fcfdff; }
body[data-route="setting"] .reconnectrow input[type="number"] { width: 110px; }
body[data-route="setting"] .reconnectrow select { width: 100px; min-width: 100px; }
body[data-route="setting"] .row input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--primary); flex: 0 0 auto;
}
body[data-route="setting"] .row__name { font-size: 13.5px; color: #1f1f1f; }
body[data-route="setting"] .row__q {
  color: #9aa3ad; font-size: 12px; cursor: help; border: 0; background: none; padding: 0 2px;
}
body[data-route="setting"] .row__extra {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
}
body[data-route="setting"] .row__extralabel { font-size: 12px; color: #595959; white-space: nowrap; }
body[data-route="setting"] .row input[type="text"], body[data-route="setting"] .row input[type="number"],
body[data-route="setting"] .row select {
  width: 96px; height: 30px; border: 1px solid #d9d9d9; border-radius: 7px; padding: 0 8px;
  font-size: 13px; background: #fff;
}
body[data-route="setting"] .row select { width: auto; min-width: 96px; }
body[data-route="setting"] .sect {
  padding: 10px 14px 4px; font-size: 12px; color: #8c8c8c;
}
body[data-route="setting"] .grid2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px;
}
body[data-route="setting"] .grid2 > div { min-width: 0; }
body[data-route="setting"] .widerow input[type="text"],
body[data-route="setting"] .widerow input[type="number"],
body[data-route="setting"] .widerow select { width: 240px; }
body[data-route="setting"] .row__picknote {
  font-size: 12px; color: #595959; white-space: nowrap;
  max-width: 220px; overflow: hidden; text-overflow: ellipsis; display: inline-block;
}
body[data-route="setting"] .logchip {
  border: 0; background: #f0f4ff; color: var(--primary); font-size: 12px;
  padding: 3px 10px; border-radius: 6px; cursor: pointer;
}
body[data-route="setting"] .logarea {
  margin: 8px 12px 10px; border-radius: 8px; overflow: hidden; border: 1px solid #e2e6eb;
}
body[data-route="setting"] .logarea__head {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px;
  background: #f0f1f3; font-size: 12px; color: #555;
}
body[data-route="setting"] .logarea__head b { color: #333; }
body[data-route="setting"] .logarea__body {
  background: #10151b; color: #d5dbe2; font-family: Consolas, "Courier New", monospace;
  font-size: 12px; line-height: 1.75; padding: 8px 10px; max-height: 220px;
  overflow-y: auto; white-space: pre-wrap; word-break: break-all;
}
body[data-route="setting"] .logarea__body .ln { padding: 0; border: 0; min-height: 0; }
body[data-route="setting"] .logarea__foot {
  display: flex; gap: 10px; padding: 5px 10px; background: #f0f1f3;
  font-size: 11px; color: #777;
}
body[data-route="setting"] .shopeditor__loading {
  padding: 14px; font-size: 13px; color: #999;
}
body[data-route="setting"] .shopcard__tip {
  padding: 8px 12px; font-size: 12px; color: #8c8c8c; line-height: 1.6;
  border-bottom: 1px solid #f0f1f3;
}
body[data-route="setting"] .shopcard__cols { display: flex; align-items: flex-start; }
body[data-route="setting"] .shoplist {
  width: 150px; flex: 0 0 auto; border-right: 1px solid #eef0f2;
}
body[data-route="setting"] .shoplist__title {
  font-size: 12px; font-weight: 700; color: #333; padding: 8px 12px 4px;
}
body[data-route="setting"] .shopitem {
  display: block; width: 100%; text-align: left; border: 0; background: none;
  padding: 8px 12px; font-size: 13px; color: #333; cursor: pointer;
}
body[data-route="setting"] .shopitem.on {
  background: #e8f0ff; color: var(--primary); font-weight: 700;
}
body[data-route="setting"] .goodszone {
  flex: 1; min-width: 0; padding: 8px 12px 12px;
}
body[data-route="setting"] .goodszone__title {
  font-size: 12px; font-weight: 700; color: var(--primary); background: #e8f0ff;
  padding: 5px 10px; border-radius: 6px; margin: 6px 0;
}
body[data-route="setting"] .goodszone__sub {
  font-size: 12px; color: #555; padding: 6px 2px 2px; font-weight: 700;
}
body[data-route="setting"] .grow {
  display: flex; align-items: center; gap: 8px; padding: 7px 6px;
  border-bottom: 1px solid #f4f5f7;
}
body[data-route="setting"] .grow.picked { background: #f0f7ff; }
body[data-route="setting"] .grow__name {
  font-size: 13px; color: #1f1f1f; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
body[data-route="setting"] .grow__meta {
  font-size: 11px; color: #8c8c8c; white-space: nowrap;
}
body[data-route="setting"] .grow__tag {
  font-size: 10px; color: #fa8c16; border: 1px solid #ffd591;
  background: #fff7e6; padding: 1px 5px; border-radius: 4px; white-space: nowrap;
}
body[data-route="setting"] .grow input[type="number"] {
  width: 64px; height: 28px; border: 1px solid #d9d9d9; border-radius: 6px;
  padding: 0 6px; font-size: 13px;
}
body[data-route="setting"] .pickbtn {
  border: 1px solid #b5b5b5; background: #e8e8e8; border-radius: 3px;
  padding: 3px 10px; font-size: 12px; cursor: pointer;
}
body[data-route="setting"] .vermark {
  margin-left: auto; font-size: 11px; color: #8c8c8c;
  background: #f0f1f3; padding: 3px 8px; border-radius: 6px;
}
body[data-route="setting"] .emptynote {
  padding: 26px; text-align: center; color: #999; font-size: 13px;
  background: #fff; border: 1px dashed #d9d9d9; border-radius: 12px;
}
.tip {
  position: fixed; z-index: 99; max-width: 320px; padding: 7px 10px;
  background: #333c46; color: #fff; font-size: 12px; border-radius: 6px;
  pointer-events: none; display: none; box-shadow: 0 4px 14px rgba(0,0,0,.3);
}

/* ---------- 模块日志弹出窗 ---------- */
.popmask {
  position: fixed; inset: 0; z-index: 95; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
}
.popmask.hidden { display: none; }
.poplog {
  width: min(880px, 94vw); max-height: 84vh; background: #fff; border-radius: 14px;
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 18px 50px rgba(0,0,0,.35);
}
.poplog__head { display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  border-bottom: 1px solid #eef0f2; }
.poplog__head b { font-size: 15px; flex: 1; }
.poplog__meta { font-size: 12px; color: #888; }
.poplog__x { border: 0; background: #f0f1f3; border-radius: 8px; padding: 4px 10px;
  cursor: pointer; font-size: 13px; }
.poplog__body { overflow-y: auto; }
.poplog .logarea { margin: 12px 16px 14px; border: 0; }
.poplog .logarea__body { max-height: 64vh; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
@media (max-width: 768px) {
  .poplog__meta { display: none; }
}

/* ---------- 手机适配（窄屏自动切手机版式，桌面不变） ---------- */
@media (max-width: 768px) {
  /* 设置页页签：方案A 一行小胶囊（全部可见，超宽保险可滑动） */
  body[data-route="setting"] .setbar {
    display: flex; align-items: center; gap: 5px;
    overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch;
    padding: 8px;
  }
  body[data-route="setting"] .setbar .tb {
    flex: 0 0 auto; font-size: 12px; padding: 6px 9px; border-radius: 999px;
  }
  body[data-route="setting"] .setbar .vermark {
    flex: 0 0 auto; margin-left: auto; font-size: 10px; padding: 2px 6px;
  }

  /* 行内不挤压：名称占剩余宽度正常横排，输入框自动收缩 */
  body[data-route="setting"] .row { flex-wrap: nowrap; }
  body[data-route="setting"] .row__name {
    flex: 1 1 auto; min-width: 0; overflow-wrap: break-word; word-break: normal;
  }
  body[data-route="setting"] .row__extra { flex: 0 0 auto; max-width: 58vw; }
  body[data-route="setting"] .row input[type="text"],
  body[data-route="setting"] .row input[type="number"],
  body[data-route="setting"] .row select { max-width: 34vw; }

  /* 两列格子变一列 */
  body[data-route="setting"] .grid2 { grid-template-columns: 1fr; }

  /* 宽输入框（安全词等）不超过屏宽 */
  body[data-route="setting"] .widerow input[type="text"],
  body[data-route="setting"] .widerow input[type="number"] {
    width: 100% !important; max-width: 100%; box-sizing: border-box;
  }

  /* 日志区高度收一点 */
  body[data-route="setting"] .logarea__body { max-height: 150px; }

  /* 弹窗（挑选噗噗等）不超出屏宽 */
  body[data-route="setting"] .modal__panel,
  body[data-route="setting"] #modal .modal__panel { max-width: 92vw; }

  /* 主页表单输入框不超出 */
  body[data-route="home"] .field input, body[data-route="home"] .field select {
    max-width: 100%; box-sizing: border-box;
  }
}


/* ---------- 主页：桌面同款“游戏登录”（方案A） ---------- */

@media (min-width: 900px) {
  body[data-route="home"] .login-card { grid-column: 1 / -1; }
}

.seg {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding-left: 16px;
  border-bottom: 1px solid var(--line);
}
.seg__label {
  width: 86px;
  flex: 0 0 auto;
  font-size: 14px;
  color: var(--ink);
}
.seg__field {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  padding: 8px 16px 8px 0;
  flex-wrap: wrap;
}
.seginput {
  width: 250px;
  max-width: 100%;
  height: 40px;
  padding: 0 11px;
  border: 1px solid #d9dce3;
  border-radius: 9px;
  background: #fff;
  font-size: 13.5px;
}
.seginput:focus {
  outline: 0;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 119, 255, .12);
}
.seginput--num { width: 84px; }
.seginput--unit { width: 76px; }
.seg__suffix {
  border: 0;
  background: var(--primary-050);
  color: var(--primary);
  font-size: 12.5px;
  padding: 8px 13px;
  border-radius: 8px;
  cursor: pointer;
}
.seg__suffix:active { transform: scale(.97); }
.seg__hint { font-size: 11.5px; color: var(--ink-3); }
.seg__note {
  margin: 4px 16px 8px;
  font-size: 11px;
  color: var(--ink-3);
}
.seg__note:empty { display: none; }

.chk {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-2);
  user-select: none;
}
.chk input { width: 16px; height: 16px; accent-color: var(--primary); }

.cfgblock { background: #fff9e7; border-top: 1px solid var(--line); }
.cfgblock__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  flex-wrap: wrap;
}
.cfgblock__label { font-size: 13.5px; color: var(--ink); }
.cfgbtn {
  border: 0;
  background: #fff;
  color: var(--ink);
  font-size: 12.5px;
  padding: 8px 15px;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: pointer;
}
.cfgbtn:active { transform: scale(.97); }
.cfgbtn--primary { background: var(--primary); color: #fff; box-shadow: none; }
.cfgblock__note { flex-basis: 100%; font-size: 11.5px; color: var(--ink-3); }

.btn--red { background: #ff4d4f; color: #fff; box-shadow: 0 6px 14px rgba(255, 77, 79, .22); }
.btn--red:active { background: #f03d3f; }

.profpick { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow: auto; }
.profpick button {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  cursor: pointer;
}
.profpick button span { font-size: 11px; color: var(--ink-3); }

@media (max-width: 768px) {
  .seg {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 14px 0;
  }
  .seg__label { width: auto; margin-bottom: 6px; font-size: 12.5px; color: var(--ink-2); }
  .seg__field { padding: 0 0 12px; }
  .seginput { width: 100%; }
  .seginput--num { width: 96px; flex: 0 0 auto; }
  .seginput--unit { width: 84px; flex: 0 0 auto; }
  .seg__hint { flex-basis: 100%; }
  .seg__note { margin: 2px 14px 8px; }
  .cfgblock__row { padding: 10px 14px; }
  .cfgbtn { flex: 1 1 auto; }
  .actions { flex-direction: column; }
  .actions .btn { width: 100%; min-width: 0; }
}

/* ---------- 登录（哆啦A梦主题） ---------- */

.login {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 24px;
  overflow: hidden;
  background: linear-gradient(165deg, #8ed8ff 0%, #38a8ef 48%, #0f7fce 100%);
}
.login__cloud {
  position: absolute;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .8);
  pointer-events: none;
}
.login__cloud::before,
.login__cloud::after {
  content: '';
  position: absolute;
  background: inherit;
  border-radius: 50%;
}
.login__cloud::before { width: 34px; height: 34px; left: 16%; top: -18px; }
.login__cloud::after { width: 24px; height: 24px; right: 14%; top: -12px; }
.login__cloud--a { width: 150px; left: 6%; top: 14%; opacity: .9; }
.login__cloud--b { width: 110px; right: 8%; top: 10%; opacity: .75; }
.login__cloud--c { width: 170px; left: 18%; bottom: 9%; opacity: .65; }
.login__cloud--d { width: 90px; right: 20%; bottom: 16%; opacity: .7; }

.login__stage {
  position: absolute;
  z-index: 2;
  left: calc(50% - 430px);
  top: calc(50% + 48px);
  display: flex;
  justify-content: center;
}
.login__mascot {
  width: 310px;
  height: auto;
  filter: drop-shadow(0 18px 24px rgba(7, 56, 96, .35));
}

.login__card {
  position: relative;
  z-index: 1;
  width: 392px;
  max-width: 94vw;
  padding: 32px 32px 28px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(8, 48, 84, .35);
  transform: translateX(48px);
}
.login__sub { margin: 0 0 22px; text-align: center; font-size: 13px; color: #8d9aa9; }

.login__field { position: relative; margin-bottom: 16px; }
.login__field .field__input {
  width: 100%;
  height: 45px;
  padding: 0 44px 0 14px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  background: #fff;
  font-size: 16px;
  color: rgba(0, 0, 0, .88);
}
.login__field .field__input:focus {
  border-color: #38a8ef;
  outline: none;
  box-shadow: 0 0 0 3px rgba(56, 168, 239, .16);
}
.login__field:last-of-type { margin-bottom: 8px; }
.login__field .field__input:placeholder-shown + .login__eye { color: #c2cad4; }

.login__eye {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #b1b9c4;
  cursor: pointer;
}
.login__eye:hover { color: #38a8ef; background: #f0f8ff; }
.login__eye svg { width: 20px; height: 20px; }

.login__btn {
  width: 100%;
  height: 50px;
  margin-top: 6px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #ff6f63, #ef4b43);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 8px;
  text-indent: 8px;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(239, 75, 67, .35);
}
.login__btn:active { transform: scale(.99); }
.login__btn[disabled] { opacity: .7; cursor: progress; }
.login__foot { margin: 16px 0 0; text-align: center; font-size: 11px; color: #aab3c2; }

@media (max-width: 1000px) {
  .login { flex-direction: column; padding: 26px 16px 42px; }
  .login__stage { position: static; margin-bottom: -6px; }
  .login__mascot { width: min(58vw, 250px); }
  .login__card { transform: none; width: 100%; max-width: 420px; }
}

.formerr {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(229, 72, 77, .08);
  color: var(--danger);
  font-size: 12px;
}

/* ---------- 启动/加载/错误 ---------- */

.boot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 60vh;
  padding: 24px 16px;
  text-align: center;
}
.boot__title { margin: 0; font-size: 15px; font-weight: 600; }
.boot__text { margin: 0; max-width: 290px; font-size: 12px; line-height: 1.6; color: var(--ink-3); }
.boot__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(229, 72, 77, .1);
  color: var(--danger);
  font-size: 20px;
  font-weight: 700;
}

.spinner {
  width: 26px;
  height: 26px;
  border: 2.5px solid rgba(22, 119, 255, .2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 底部导航 ---------- */

.tabbar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  display: flex;
  max-width: var(--app-max);
  height: calc(var(--tab-h) + var(--safe-b));
  margin: 0 auto;
  padding-bottom: var(--safe-b);
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.tab {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding-top: 4px;
  color: var(--ink-3);
  font-size: 11px;
  text-decoration: none;
}
.tab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tab.is-active { color: var(--primary); font-weight: 500; }

/* ---------- 提示条 ---------- */

.toast {
  position: fixed;
  bottom: calc(var(--tab-h) + var(--safe-b) + 20px);
  left: 50%;
  z-index: 40;
  max-width: min(360px, 86vw);
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(17, 26, 43, .92);
  color: #fff;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity .18s, transform .18s;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast--error { background: rgba(198, 40, 40, .95); }
.toast--ok { background: rgba(15, 138, 74, .95); }

/* ---------- 确认弹窗 ---------- */

.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; }
.modal__mask { position: absolute; inset: 0; background: rgba(15, 23, 42, .45); opacity: 0; transition: opacity .18s; }
.modal.is-on .modal__mask { opacity: 1; }
.modal__panel {
  position: relative;
  width: 100%;
  max-width: 320px;
  padding: 18px;
  border-radius: 16px;
  background: #fff;
  opacity: 0;
  transform: scale(.96);
  transition: transform .18s, opacity .18s;
}
.modal.is-on .modal__panel { opacity: 1; transform: scale(1); }
.modal__title { margin: 0 0 8px; font-size: 16px; font-weight: 600; }
.modal__body { margin: 0 0 16px; color: var(--ink-2); font-size: 13px; line-height: 1.6; }
.modal__actions { display: flex; gap: 10px; }
.modal__actions .btn { flex: 1 1 0; height: 42px; font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- 顶栏（方案B：白底 + 站立哆啦） ---------- */
.topbar {
  background: #fff;
  border-bottom: 1px solid #e6ecf5;
  box-shadow: 0 2px 10px rgba(30, 60, 110, .07);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  padding: calc(var(--safe-t) + 6px) 14px 8px;
}
.topbar__mascot {
  height: 54px;
  width: auto;
  flex: 0 0 auto;
  object-fit: contain;
  margin: -6px 0 -8px;
  filter: drop-shadow(0 3px 4px rgba(30, 60, 110, .18));
}
.topbar__title { color: #12325c; font-weight: 700; }
.topbar__sub { color: #7d8aa0; max-width: 220px; }
#btnLogout.iconbtn {
  min-height: 36px;
  padding: 0 18px;
  border-color: transparent;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(22, 119, 255, .26);
}
#btnLogout.iconbtn:active { background: var(--primary-600); }
@media (max-width: 768px) {
  .topbar { padding: calc(var(--safe-t) + 5px) 10px 6px; }
  .topbar__mascot { height: 44px; margin: -4px 0 -6px; }
  .topbar__title { font-size: 15px; }
  .topbar__sub { font-size: 10px; max-width: 168px; }
  #btnLogout.iconbtn { min-height: 34px; padding: 0 14px; font-size: 12.5px; }
}

/* 一行里有两个输入的数值行（卡29攒水滴：攒够 + 保留水滴） */
body[data-route="setting"] .row.multirow { flex-wrap: nowrap; }
body[data-route="setting"] .row.multirow .row__name { flex: 1 1 auto; min-width: 0; white-space: nowrap; }
body[data-route="setting"] .row.multirow .row__extra {
  flex: 0 1 auto; flex-wrap: wrap; justify-content: flex-end; min-width: 0;
}
body[data-route="setting"] .row.multirow .row__extra input[type="number"] { width: 84px; }
@media (max-width: 768px) {
  body[data-route="setting"] .row.multirow { flex-wrap: wrap; }
  body[data-route="setting"] .row.multirow .row__name { flex: 1 1 100%; margin-bottom: 4px; }
  body[data-route="setting"] .row.multirow .row__extra { flex: 1 1 100%; justify-content: flex-start; max-width: 100%; }
  body[data-route="setting"] .row.multirow .row__extra input[type="number"] { width: 84px; max-width: 30vw; }
}

/* 名单弹窗里的纯文本行 */
.profpick__item { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font-size: 13px; color: var(--ink); }

/* ---------- 矩阵行（人才管理：类型 / 卸任 / 委任） ---------- */
body[data-route="setting"] .mrow {
  display: grid; grid-template-columns: 72px 1fr 1fr; align-items: center;
  gap: 8px; padding: 8px 14px; border-bottom: 1px solid #f4f5f7;
}
body[data-route="setting"] .mrow--head { padding-top: 10px; padding-bottom: 6px; }
body[data-route="setting"] .mrow--head .mrow__cell { font-size: 11.5px; color: #8c8c8c; }
body[data-route="setting"] .mrow:last-child { border-bottom: 0; }
body[data-route="setting"] .mrow__label { font-size: 13px; font-weight: 600; color: #12325c; }
body[data-route="setting"] .mrow__cell { display: flex; align-items: center; gap: 7px; font-size: 13px; color: #1f1f1f; }
body[data-route="setting"] .mrow__cell input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); margin: 0; }
@media (max-width: 768px) {
  body[data-route="setting"] .mrow { grid-template-columns: 58px 1fr 1fr; padding: 8px 10px; gap: 6px; }
}

/* ---------- 活动页：已开启 / 未开启 自动分组 ---------- */
body[data-route="setting"] .actgroup {
  display: flex; align-items: center; gap: 8px; margin: 14px 4px 8px;
  font-size: 12.5px; color: #5b6674;
}
body[data-route="setting"] .actgroup:first-child { margin-top: 0; }
body[data-route="setting"] .actgroup--btn {
  width: calc(100% - 8px); border: 0; background: none; padding: 0; cursor: pointer;
  font: inherit; color: inherit; text-align: left;
}
body[data-route="setting"] .actgroup__dot {
  width: 8px; height: 8px; border-radius: 50%; background: #18a058; flex: 0 0 auto;
}
body[data-route="setting"] .actgroup__n {
  background: #e9eef7; color: #4a6a97; border-radius: 999px; padding: 1px 8px; font-size: 11px;
}
body[data-route="setting"] .actgroup__line { flex: 1; height: 1px; background: #dde2ea; }
body[data-route="setting"] .actgroup__fold { color: #8a94a6; font-size: 12px; }
body[data-route="setting"] .card__dot {
  width: 7px; height: 7px; border-radius: 50%; background: #18a058; flex: 0 0 auto;
}
body[data-route="setting"] .actoff.hidden { display: none; }
body[data-route="setting"] .cwblock { padding: 2px 6px 4px; }
body[data-route="setting"] .cwline {
  display: flex; align-items: center; gap: 10px; flex-wrap: nowrap;
  padding: 9px 4px; border-bottom: 1px solid #F0F2F5;
}
body[data-route="setting"] .cwline:last-child { border-bottom: 0; }
body[data-route="setting"] .cwline > .cwitem:first-child { flex: 1 1 auto; min-width: 0; }
body[data-route="setting"] .cwitem {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #1F2329;
  white-space: nowrap;
}
@media (max-width: 720px) {
  body[data-route="setting"] .cwline { flex-wrap: wrap; }
}
body[data-route="setting"] .cwitem__lab { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 400; }
body[data-route="setting"] .cwitem--plain { gap: 4px; }
body[data-route="setting"] .cwlb { color: #595959; font-size: 12.5px; }
body[data-route="setting"] .cwnum { width: 68px; }
body[data-route="setting"] .actsub {
  grid-column: 1 / -1; margin: 12px 4px 2px; font-size: 12.5px; color: #5b6674;
}
body[data-route="setting"] .actsub:first-child { margin-top: 2px; }

/* 活动分组：标题和整组都横跨两列，组内卡片同样两列 */
body[data-route="setting"] .actgroup { grid-column: 1 / -1; }
body[data-route="setting"] .actoff {
  grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
body[data-route="setting"] .actoff.hidden { display: none; }
@media (max-width: 768px) {
  body[data-route="setting"] .actoff { grid-template-columns: 1fr; }
}

/* ---------- 购物清单方案B：商店 + 已选清单 ---------- */
body[data-route="setting"] .card[data-card="购物"] { grid-column: 1 / -1; }
.shopcard--b { padding: 14px 16px 16px; }
.shopcard__sum { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0 12px; }
.pillsum { background: #eef6ff; color: #1677ff; border-radius: 999px; padding: 4px 12px; font-size: 12.5px; }
.pillsum--gold { background: #fff7e6; color: #b26a00; }
.shopcard__note { font-size: 11.5px; color: #8c8c8c; }
.sumclear { margin-left: auto; border: 1px solid rgba(229,72,77,.3); background: rgba(229,72,77,.07); color: #d9363e; border-radius: 8px; padding: 5px 12px; font-size: 12px; cursor: pointer; }
body[data-route="setting"] .shopcard__cols { display: grid; grid-template-columns: 190px 1fr; gap: 16px; }
.shopcard--b .shopitem { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.shopitem__n { background: #1677ff; color: #fff; border-radius: 999px; font-size: 11px; padding: 0 7px; margin-left: 8px; }
.shopitem--add { color: #1677ff; border: 1px dashed #a9c7ff; background: #f4f9ff; margin-top: 8px; }
.cartzone { min-width: 0; }
.cartempty { border: 1px dashed #d9dce3; border-radius: 10px; padding: 18px; text-align: center; font-size: 12.5px; color: #8c8c8c; }
.cartgroup { border: 1px solid #eef0f3; border-radius: 10px; margin-bottom: 12px; overflow: hidden; }
.cartgroup__head { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: #fafbfd; border-bottom: 1px solid #f4f5f7; font-size: 13px; }
.cartgroup__sub { margin-left: auto; font-size: 12px; color: #b26a00; }
.cartrow { display: grid; grid-template-columns: 1fr 150px 128px 96px 52px; align-items: center; gap: 8px; padding: 7px 12px; border-bottom: 1px solid #f4f5f7; font-size: 13px; }
.cartrow:last-child { border-bottom: 0; }
.cartrow__price { font-size: 12px; color: #8a94a6; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cartrow__qty { display: flex; align-items: center; gap: 4px; }
.sqbtn { width: 26px; height: 28px; border: 1px solid #d9dce3; background: #fff; border-radius: 7px; cursor: pointer; font-size: 14px; color: #4a5568; }
.cartrow__qty input { width: 52px; height: 28px; text-align: center; border: 1px solid #d9dce3; border-radius: 7px; font-size: 13px; }
.cartrow__cost { font-size: 12px; color: #b26a00; text-align: right; }
.cartrow__del { border: 0; background: none; color: #d9363e; font-size: 12px; cursor: pointer; }
.grow__tag--rise { background: #fff1f0; color: #d9363e; }
.addshop__find { width: 100%; height: 34px; border: 1px solid #d9dce3; border-radius: 8px; padding: 0 10px; font-size: 13px; margin-bottom: 10px; }
.addshop__tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.addtab { font-size: 12px; padding: 5px 11px; border-radius: 999px; border: 1px solid #d9dce3; background: #fff; color: #454f5b; cursor: pointer; }
.addtab.on { background: #1677ff; border-color: #1677ff; color: #fff; }
.addshop__list { max-height: 46vh; overflow-y: auto; border: 1px solid #eef0f3; border-radius: 10px; }
.addrow { display: grid; grid-template-columns: 1fr 96px auto auto 66px 34px; align-items: center; gap: 8px; padding: 7px 10px; border-bottom: 1px solid #f4f5f7; font-size: 13px; }
.addrow:last-child { border-bottom: 0; }
.addrow__price { font-size: 12px; color: #8a94a6; }
.addrow__q { font-size: 11.5px; color: #8c8c8c; text-align: right; }
.addplus { width: 30px; height: 28px; border: 0; border-radius: 7px; background: #1677ff; color: #fff; font-size: 15px; cursor: pointer; }
.addshop__empty { padding: 16px; text-align: center; font-size: 12.5px; color: #8c8c8c; }
@media (max-width: 768px) {
  body[data-route="setting"] .shopcard__cols { grid-template-columns: 1fr; }
  .shoplist { display: flex; overflow-x: auto; gap: 6px; border: 0; }
  .shopitem { flex: 0 0 auto; border: 1px solid #eef0f3; border-radius: 999px; padding: 6px 12px; }
  .shopitem--add { margin-top: 0; }
  .cartrow { grid-template-columns: 1fr 110px 92px 44px; }
  .cartrow__cost { display: none; }
  .addrow { grid-template-columns: 1fr 78px 62px 30px; }
  .addrow__price, .addrow__q { display: none; }
}


/* ---------- 购物三栏（商店 / 商品 / 已选清单） ---------- */
body[data-route="setting"] .shopcard__cols.three { grid-template-columns: 170px 1fr 300px; }
.goodszone2 { min-width: 0; border: 1px solid #eef0f3; border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.goodszone2__head { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #fafbfd; border-bottom: 1px solid #f4f5f7; }
.goodszone2__head b { font-size: 13px; }
.shopfind { margin-left: auto; width: 160px; height: 30px; border: 1px solid #d9dce3; border-radius: 8px; padding: 0 9px; font-size: 12.5px; }
.goodslist { max-height: 44vh; overflow-y: auto; }
.grow2 { display: grid; grid-template-columns: 1fr 92px auto auto 112px; align-items: center; gap: 8px; padding: 7px 12px; border-bottom: 1px solid #f4f5f7; font-size: 13px; }
.grow2:last-child { border-bottom: 0; }
.grow2.picked { background: #f6fbff; }
.grow2__price { font-size: 12px; color: #8a94a6; }
.grow2 .cartrow__qty input { width: 46px; }
@media (max-width: 768px) {
  body[data-route="setting"] .shopcard__cols.three { grid-template-columns: 1fr; }
  .goodslist { max-height: 38vh; }
  .grow2 { grid-template-columns: 1fr 74px 100px; }
  .grow2__price, .grow2 .grow__tag { display: none; }
  .shopfind { width: 120px; }
}

/* 三栏购物：清单栏放宽 + 清单行改弹性布局（名字不竖排、按钮不被切） */
body[data-route="setting"] .shopcard__cols.three { grid-template-columns: 168px 1fr 330px; }
.shopcard--b .cartrow {
  display: flex; align-items: center; gap: 8px;
  grid-template-columns: none;
}
.shopcard--b .cartrow__name {
  flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.shopcard--b .cartrow__price { flex: 0 0 auto; font-size: 11.5px; }
.shopcard--b .cartrow__cost { display: none; }
.shopcard--b .cartrow__del { flex: 0 0 auto; }
.grow2 { grid-template-columns: 1fr 82px auto auto 108px; }
.grow2 .cartrow__qty input { width: 44px; }
@media (max-width: 768px) {
  body[data-route="setting"] .shopcard__cols.three { grid-template-columns: 1fr; }
  .shopcard--b .cartrow { display: flex; }
}

/* 数量框：去掉浏览器自带的上下小箭头，30 这种两位数才不会被挤掉 */
.grow2 input[type="number"], .cartrow__qty input {
  -moz-appearance: textfield; appearance: textfield;
}
.grow2 input[type="number"]::-webkit-outer-spin-button,
.grow2 input[type="number"]::-webkit-inner-spin-button,
.cartrow__qty input::-webkit-outer-spin-button,
.cartrow__qty input::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}
.grow2 .cartrow__qty input { width: 54px; }

/* ---------- 手机端悬浮购物车 + 底部抽屉 ---------- */
.shopfab { display: none; }
.shopsheet { display: none; }
@media (max-width: 768px) {
  body[data-route="setting"] .cartzone { display: none; }
  .shopfab {
    display: flex; position: fixed; right: 14px;
    bottom: calc(var(--tab-h) + var(--safe-b) + 74px);
    z-index: 30; width: 54px; height: 54px; border-radius: 50%;
    align-items: center; justify-content: center; font-size: 21px;
    background: var(--primary); color: #fff; border: 0;
    box-shadow: 0 8px 20px rgba(22, 119, 255, .4); cursor: pointer;
  }
  .shopfab__n {
    position: absolute; top: -3px; right: -3px; background: #ff4d4f; color: #fff;
    border-radius: 999px; font-size: 10px; padding: 1px 6px; line-height: 1.5;
  }
  .shopsheet { display: none; position: fixed; inset: 0; z-index: 60; }
  .shopsheet.open { display: block; }
  .shopsheet__mask { position: absolute; inset: 0; background: rgba(0, 0, 0, .4); }
  .shopsheet__panel {
    position: absolute; left: 0; right: 0; bottom: 0; background: #fff;
    border-radius: 16px 16px 0 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, .18);
    padding: 8px 14px calc(var(--safe-b) + 14px); max-height: 72vh; display: flex; flex-direction: column;
  }
  .shopsheet__grab { width: 40px; height: 4px; border-radius: 2px; background: #e2e6eb; margin: 4px auto 8px; flex: 0 0 auto; }
  .shopsheet__head { display: flex; align-items: center; gap: 10px; font-size: 13px; flex: 0 0 auto; }
  .shopsheet__head b { font-size: 14px; }
  .shopsheet__head span { color: #b26a00; font-size: 12px; }
  .shopsheet__head em { margin-left: auto; font-style: normal; font-size: 12px; color: #1677ff; }
  .shopsheet__body { overflow-y: auto; margin-top: 8px; }
  .shopsheet__body .cartgroup { margin-bottom: 10px; }
}

/* ---------- 手机端购物：商店横滑胶囊 + 商品两列（名+数量） ---------- */
@media (max-width: 768px) {
  body[data-route="setting"] .shopcard--b .shoplist {
    display: flex !important; overflow-x: auto; gap: 6px;
    border: 0; border-radius: 0; padding: 2px 0 6px;
  }
  body[data-route="setting"] .shopcard--b .shopitem {
    width: auto !important; flex: 0 0 auto !important;
    border: 1px solid #eef0f3; border-radius: 999px;
    padding: 6px 12px; justify-content: flex-start;
  }
  body[data-route="setting"] .shopcard--b .shopitem__n { margin-left: 6px; }
  body[data-route="setting"] .goodszone2 { margin-top: 8px; }
  body[data-route="setting"] .grow2 {
    display: flex !important; align-items: center; gap: 8px;
    grid-template-columns: none !important;
  }
  body[data-route="setting"] .grow2__cell { flex: 1 1 auto; min-width: 0; }
  body[data-route="setting"] .grow2__name {
    display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  body[data-route="setting"] .grow2__meta {
    display: block; font-size: 11px; color: #8a94a6; margin-top: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  body[data-route="setting"] .grow2__price,
  body[data-route="setting"] .grow2 .grow__tag { display: none !important; }
  body[data-route="setting"] .grow2 .cartrow__qty { flex: 0 0 auto; }
  body[data-route="setting"] .grow2 .cartrow__qty input { width: 46px; }
}
/* 桌面隐藏手机用的第二行说明 */
.grow2__cell { min-width: 0; }
.grow2__meta { display: none; }

/* ---------- 限购类型分色 + 手机吸底汇总条 ---------- */
.grow__tag--day { background: #fff7e6; color: #b26a00; }
.grow__tag--week { background: #e8f7ee; color: #1a7f4b; }
.grow__tag--month { background: #eef2ff; color: #4054b2; }
.grow__tag--term { background: #f3f4f6; color: #5b6674; }

.shopbar { display: none; }
@media (max-width: 768px) {
  .shopbar {
    display: flex; position: fixed; left: 0; right: 0;
    bottom: calc(var(--tab-h) + var(--safe-b) + 56px);
    z-index: 16; align-items: center; gap: 10px; padding: 9px 12px;
    background: #fff; border-top: 1px solid #e6ecf5;
    box-shadow: 0 -4px 14px rgba(30, 60, 110, .08);
  }
  .shopbar[hidden] { display: none !important; }
  .shopbar__txt {
    flex: 1 1 auto; min-width: 0; font-size: 12.5px; color: #b26a00; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .shopbar__btn {
    flex: 0 0 auto; background: var(--primary); color: #fff; border: 0;
    border-radius: 999px; padding: 8px 16px; font-size: 12.5px; font-weight: 600;
  }
}

/* 清单行：去掉重复的单价列，给名字和限购标签留空间 */
.shopcard--b .cartrow__price { display: none; }
.shopcard--b .cartrow__name .grow__tag { margin-left: 6px; }

/* 限购类型颜色（压过基础 .grow__tag 的黄色） */
body[data-route="setting"] .grow__tag--day { background: #fff7e6 !important; color: #b26a00 !important; }
body[data-route="setting"] .grow__tag--week { background: #e8f7ee !important; color: #1a7f4b !important; }
body[data-route="setting"] .grow__tag--month { background: #eef2ff !important; color: #4054b2 !important; }
body[data-route="setting"] .grow__tag--term { background: #f3f4f6 !important; color: #5b6674 !important; }

/* 购物商品行：限购/涨价各占固定格，同名多档不把后面的数量框挤歪 */
body[data-route="setting"] .grow2 { grid-template-columns: 1fr 84px 138px 96px 108px; }
.grow2__tags { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-width: 0; }
.grow2__rise { display: flex; align-items: center; }
@media (max-width: 768px) {
  body[data-route="setting"] .grow2__tags,
  body[data-route="setting"] .grow2__rise { display: none !important; }
}

/* 商品行列宽再收一收：名字列至少 96px，标签不换行，数量列对齐 */
body[data-route="setting"] .grow2 {
  grid-template-columns: minmax(96px, 1fr) 72px 116px 86px 104px;
  gap: 6px;
}
body[data-route="setting"] .grow2__name,
.grow2__name {
  display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.grow2__tags { flex-wrap: nowrap; overflow: hidden; }
.grow2__rise .grow__tag { font-size: 10.5px; padding: 0 5px; white-space: nowrap; }

/* 价格列只放数字，收紧列宽不再换行 */
body[data-route="setting"] .grow2 {
  grid-template-columns: minmax(96px, 1fr) 56px 124px 86px 104px;
}
.grow2__price { white-space: nowrap; }

/* 再收一点，去掉横向滚动条 */
body[data-route="setting"] .grow2 {
  grid-template-columns: minmax(96px, 1fr) 52px 112px 80px 100px;
  gap: 5px;
}
body[data-route="setting"] .grow2 .cartrow__qty input { width: 42px; }
body[data-route="setting"] .grow2 .sqbtn { width: 24px; }

/* ---------- 手机购物：短说明、商店胶囊换行全显示、meta 带彩色档位 ---------- */
.tipshort { display: none; }
.grow2__metatags { display: inline-flex; flex-wrap: wrap; gap: 4px; vertical-align: middle; margin: 0 2px; }
.grow2__meta .grow__tag { font-size: 10px; padding: 0 5px; }
@media (max-width: 768px) {
  .shopcard__tip .tiplong { display: none; }
  .shopcard__tip .tipshort { display: inline; }
  body[data-route="setting"] .shopcard--b .shoplist {
    display: flex !important; flex-wrap: wrap !important; overflow: visible !important;
    gap: 6px; border: 0; padding: 2px 0 6px;
  }
  body[data-route="setting"] .shopcard--b .shopitem {
    width: auto !important; flex: 0 0 auto !important; white-space: nowrap;
    border: 1px solid #eef0f3; border-radius: 999px; padding: 5px 10px; font-size: 12px;
    justify-content: flex-start;
  }
  body[data-route="setting"] .grow2__meta { display: block; font-size: 11px; color: #8a94a6; margin-top: 2px; }
}

/* 手机端 meta 里的彩色档位标签要显示（上面有隐藏 .grow2 .grow__tag 的规则） */
@media (max-width: 768px) {
  body[data-route="setting"] .grow2__meta .grow__tag { display: inline-block !important; }
  body[data-route="setting"] .grow2__meta .grow__tag.grow__tag--rise { display: inline-block !important; }
}

/* 手机商店胶囊：用短名、缩小间距，尽量少占行；商品列表不再单独滚动 */
.shopitem__short { display: none; }
@media (max-width: 768px) {
  body[data-route="setting"] .shopcard--b .shopitem__long { display: none; }
  body[data-route="setting"] .shopcard--b .shopitem__short { display: inline; }
  body[data-route="setting"] .shopcard--b .shopitem {
    padding: 4px 9px !important; font-size: 11.5px !important; gap: 4px;
  }
  body[data-route="setting"] .shopcard--b .shopitem__n { margin-left: 4px; font-size: 10px; padding: 0 6px; }
  body[data-route="setting"] .goodslist { max-height: none !important; overflow: visible !important; }
}

/* 手机三栏必须真的变一列（后面的桌面列宽规则会覆盖，这里用 !important 压住） */
@media (max-width: 768px) {
  body[data-route="setting"] .shopcard__cols,
  body[data-route="setting"] .shopcard__cols.three {
    grid-template-columns: 1fr !important;
  }
  body[data-route="setting"] .shopcard--b .shoplist { width: 100%; }
}

/* 手机商品说明行允许换行，档位标签不能被省略号吃掉（致富经/零件这类两档的） */
@media (max-width: 768px) {
  body[data-route="setting"] .grow2__meta {
    white-space: normal !important; overflow: visible !important; text-overflow: clip !important;
  }
  body[data-route="setting"] .grow2__metatags { display: inline-flex; flex-wrap: wrap; }
}

/* ---------- 右下角三钮：搜索 / 配置复制 / 保存勾选 ---------- */
.setting-fab {
  position: fixed; right: 16px; bottom: calc(var(--tab-h) + var(--safe-b) + 64px);
  z-index: 18; display: flex; flex-direction: column; gap: 10px;
}
.sfab {
  width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center;
  font-size: 18px; box-shadow: 0 8px 18px rgba(30, 60, 110, .2); cursor: pointer; position: relative;
}
.sfab--search { background: #fff; color: #333; border: 1px solid #e5e7eb; }
.sfab--copy { background: #3aa9ee; color: #fff; }
.sfab--save { background: linear-gradient(140deg, #b45cff, #ff5cc8); color: #fff; }
.sfab--save.has-dirty::after {
  content: ""; position: absolute; top: 3px; right: 3px; width: 9px; height: 9px;
  border-radius: 50%; background: #ff4d4f; border: 1px solid #fff;
}
@media (max-width: 768px) {
  .setting-fab { right: 12px; bottom: calc(var(--tab-h) + var(--safe-b) + 122px); gap: 8px; }
  .sfab { width: 40px; height: 40px; font-size: 16px; }
}
.card.flash { box-shadow: 0 0 0 3px rgba(22, 119, 255, .35); }
.searchinput {
  width: 100%; height: 38px; border: 1px solid #d9dce3; border-radius: 10px;
  padding: 0 12px; font-size: 13.5px; margin-bottom: 10px;
}
.searchlist { max-height: 50vh; overflow-y: auto; }
.searchrow {
  width: 100%; text-align: left; border: 0; background: #fff; border-bottom: 1px solid #f4f5f7;
  padding: 9px 10px; display: flex; flex-direction: column; gap: 2px; cursor: pointer;
}
.searchrow b { font-size: 13.5px; }
.searchrow span { font-size: 11.5px; color: #8a94a6; }
.searchempty { padding: 16px; text-align: center; color: #8c8c8c; font-size: 12.5px; }
.copytabs { display: flex; border: 1px solid #eef0f2; border-radius: 10px; overflow: hidden; margin-bottom: 12px; }
.copytabs button { flex: 1; border: 0; background: #fafbfd; padding: 9px 0; font-size: 12.5px; color: #454f5b; cursor: pointer; }
.copytabs button.on { background: #fff; color: #1677ff; font-weight: 600; box-shadow: inset 0 -2px 0 #1677ff; }
.copynote { font-size: 12.5px; margin: 0 0 8px; }
.copynote span { display: block; color: #d9363e; font-size: 11.5px; margin-top: 2px; }
.copyselect { width: 100%; height: 36px; border: 1px solid #d9dce3; border-radius: 9px; padding: 0 10px; font-size: 13px; background: #fff; }
.copyrow { display: flex; justify-content: flex-end; margin-top: 10px; }
.copycur { margin: 10px 0 0; font-size: 11.5px; color: #8a94a6; }

/* 配置复制：档案列表 */
.copylist { border: 1px solid #eef0f2; border-radius: 10px; max-height: 44vh; overflow-y: auto; }
.copylist__row {
  display: flex; align-items: center; gap: 8px; padding: 9px 10px;
  border-bottom: 1px solid #f6f7f9; cursor: pointer;
}
.copylist__row:last-child { border-bottom: 0; }
.copylist__row.sel { background: #f0f7ff; box-shadow: inset 3px 0 0 #1677ff; }
.copylist__row.is-cur { opacity: .85; }
.copylist__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.copylist__main b { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.copylist__main em { font-style: normal; font-size: 11px; color: #8a94a6; }
.copylist__del {
  flex: 0 0 auto; border: 1px solid rgba(229,72,77,.3); background: rgba(229,72,77,.07);
  color: #d9363e; border-radius: 7px; padding: 3px 8px; font-size: 11px; cursor: pointer;
}

/* 配置复制：空档案提示 */
.copyempty {
  border: 1px dashed #d9dce3; border-radius: 10px; padding: 14px 12px;
  text-align: center; font-size: 12.5px; color: #8c8c8c; line-height: 1.6;
}

/* ---------- 多账号首页 / 底部栏 首页·我的·中间快捷 ---------- */
.acctwrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-bottom: 12px; }
.acct { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 12px 14px; text-align: left; }
.acct__head { display: flex; align-items: center; gap: 8px; }
.acct__icon { width: 26px; height: 26px; border-radius: 7px; background: #ff4d4f; color: #fff; display: grid; place-items: center; font-size: 12px; flex: 0 0 auto; }
.acct__name { flex: 1; font-size: 14.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct__more { border: 0; background: none; color: #8c8c8c; font-size: 16px; cursor: pointer; padding: 0 2px; }
.acct__meta { display: flex; align-items: center; gap: 10px; margin: 8px 0 10px; font-size: 12.5px; color: #5b6674; flex-wrap: wrap; }
.acct__state { display: inline-flex; align-items: center; gap: 5px; }
.acct__state .dot { width: 8px; height: 8px; border-radius: 50%; background: #ff4d4f; }
.acct__state .dot--on { background: #18a058; }
.acct__bar { display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid #f4f5f7; padding-top: 10px; }
.abtn { border: 1px solid #e5e7eb; background: #f7f8fa; color: #454f5b; border-radius: 8px; padding: 5px 12px; font-size: 12px; cursor: pointer; }
.abtn--blue { background: var(--primary); border-color: var(--primary); color: #fff; }
.acct--add { border: 1px dashed #a9c7ff; background: #f4f9ff; color: #1677ff; display: grid; place-items: center; min-height: 96px; font-size: 13.5px; cursor: pointer; }
.acctform label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: #5b6674; margin-bottom: 10px; }
.acctform input { height: 38px; border: 1px solid #d9dce3; border-radius: 9px; padding: 0 10px; font-size: 13px; }
.acctform input:disabled { background: #f5f7fa; color: #8a94a6; }
.acctform__ok { display: flex; justify-content: flex-end; }
.acctmenu { display: flex; flex-direction: column; }
.acctmenu button { text-align: left; border: 0; background: #fff; border-bottom: 1px solid #f4f5f7; padding: 11px 6px; font-size: 13px; cursor: pointer; }
.acctmenu button:last-child { border-bottom: 0; }
.acctmenu button.danger { color: #d9363e; }
.mine__head { display: flex; align-items: center; gap: 10px; padding: 16px 14px; }
.mine__avatar { width: 46px; height: 46px; border-radius: 50%; background: #e8f1ff; display: grid; place-items: center; font-size: 22px; }
.mine__head b { font-size: 15px; display: block; }
.mine__head span { font-size: 11.5px; color: #8a94a6; }
.mine__list { padding: 0; overflow: hidden; }
.mine__row { display: flex; justify-content: space-between; padding: 12px 14px; font-size: 13px; border-bottom: 1px solid #f7f8fa; }
.mine__row:last-child { border-bottom: 0; }
.mine__row em { font-style: normal; color: #8a94a6; font-size: 12px; }
.tab--center {
  width: 54px; height: 54px; margin-top: -24px; border-radius: 50%;
  background: var(--primary); color: #fff; border: 4px solid #fff; border-left: 0;
  display: grid; place-items: center; box-shadow: 0 8px 18px rgba(22,119,255,.35);
  align-self: flex-start; padding: 0; cursor: pointer;
}
.tab--center svg { width: 24px; height: 24px; stroke: #fff; fill: none; stroke-width: 1.6; }

/* 多账号首页排版修正：卡片固定宽、中间按钮不被拉长 */
.acctwrap { grid-template-columns: repeat(auto-fill, minmax(300px, 340px)); justify-content: start; }
.tab--center { flex: 0 0 auto !important; width: 54px; height: 54px; }
.tabbar { justify-content: space-around; }

/* ---------- 托管：首页方案1 / 到期 ---------- */
body[data-route="home"] .topbar,
body[data-route="mine"] .topbar { display: none !important; }
@media (min-width: 900px) {
  body[data-route="home"] .view {
    display: block;
    grid-template-columns: none;
  }
}
.acct { border-color: #f0c4c4; }
.acct.is-off { border-color: #e9edf3; }
.acct__meta { display: block; line-height: 1.9; }
.acct__exp { color: #d9363e; }
.acct__bar .dot {
  width: 8px; height: 8px; border-radius: 50%; background: #ff4d4f;
  display: inline-block; flex: 0 0 auto; align-self: center;
}
.acct__bar .dot--on { background: #18a058; }
.warnbar {
  background: #fff7e6; color: #ad6800; border-radius: 12px;
  padding: 10px 12px; font-size: 12.5px; margin: 0 0 12px;
}
.warnbar--bad { background: #fff1f0; color: #d9363e; }
.mine__row em.is-bad { color: #d9363e; }
.mine .actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 14px; }

/* 人才 / 艺人总览（查看全部） */
.roster-loading { padding: 18px 4px; color: #8c8c8c; text-align: center; font-size: 13px; }
.roster-head { padding: 2px 2px 10px; color: #4a4a4a; font-size: 13px; border-bottom: 1px solid #eef0f3; }
.roster-head b { color: #1677ff; font-weight: 600; }
.roster-list { max-height: 52vh; overflow: auto; margin: 6px 0 2px; }
.roster-row { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid #f2f4f7; }
.roster-row__idx { width: 26px; flex: 0 0 26px; color: #b0b4bb; font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.roster-row__name { flex: 1 1 auto; color: #1f1f1f; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roster-row__value { flex: 0 0 auto; color: #1677ff; font-size: 13px; font-variant-numeric: tabular-nums; }
.roster-empty { padding: 18px 6px 6px; text-align: center; }
.roster-empty__title { color: #1f1f1f; font-size: 15px; margin: 0 0 6px; }
.roster-empty__tip { color: #8c8c8c; font-size: 13px; margin: 0 0 14px; }
.roster-note { margin: 14px 0 0; color: #8c8c8c; font-size: 12px; text-align: center; }
.roster-foot { padding-top: 12px; text-align: center; }
.pickbtn--roster { display: inline-flex; align-items: center; gap: 5px; }
.pickbtn__eye { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; }

/* 选择人才 / 艺人（弹窗勾选） */
.rp-search { width: 100%; border: 1px solid #e3e6ec; border-radius: 9px; padding: 8px 10px; font-size: 13px; background: #fafbfc; margin: 0 0 8px; }
.rp-list { max-height: 50vh; overflow: auto; }
.rp-row { display: flex; align-items: center; gap: 8px; padding: 9px 4px; border-bottom: 1px solid #f2f4f7; font-size: 13.5px; cursor: pointer; }
.rp-row input { width: 16px; height: 16px; }
.rp-name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-tag { font-size: 11px; border-radius: 4px; padding: 1px 5px; background: #eef4ff; color: #1c5fd6; }
.rp-tag--1 { background: #e8f6ee; color: #1a7f45; }
.rp-tag--2 { background: #fff2e8; color: #c25a00; }
.rp-tag--3 { background: #e8f1ff; color: #1c5fd6; }
.rp-tag--4 { background: #f4ecff; color: #6b3fd4; }
.rp-val { flex: 0 0 auto; color: #1677ff; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.rp-count { padding: 10px 2px 0; color: #8c8c8c; font-size: 12px; text-align: right; }

/* 商战：我的队伍 */
.teams { padding: 2px 12px 8px; }
.teams__empty { color: #b0b4bb; font-size: 12.5px; padding: 4px 2px 8px; }
.teams__row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid #f2f4f7; }
.teams__row b { flex: 0 0 52px; font-size: 12.5px; color: #4a4a4a; }
.teams__names { flex: 1 1 auto; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.teams__del { border: 0; background: transparent; color: #b0b4bb; font-size: 13px; padding: 4px 2px; }
.teams__add { margin-top: 8px; border: 1px dashed #cfd6e0; background: #fff; color: #1677ff; border-radius: 8px; padding: 6px 10px; font-size: 12.5px; }

/* 编队艺人 */
.mlist__label { color: #4a4a4a; font-size: 12.5px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: 6px; }

/* 一行两个勾（中级/高级建设这种） */
.row__picks { display: inline-flex; align-items: center; gap: 14px; margin-right: 10px; }
.row__pick { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: #1f1f1f; }

/* 编队：队伍小卡 + 成员标签 */
.team { border: 1px solid #eef1f5; border-radius: 10px; padding: 8px 10px; margin: 8px 0; background: #fbfcfe; }
.team__head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.team__head b { font-size: 13px; }
.team__cnt { color: #8c8c8c; font-size: 11.5px; }
.team__ops { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.chip { display: inline-flex; align-items: center; gap: 5px; background: #e8f1ff; color: #1c5fd6; border-radius: 999px; padding: 3px 8px; font-size: 12px; }
.chip i { font-style: normal; color: #7fa7e8; cursor: pointer; }
.teams__foot { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.teams__count { color: #8c8c8c; font-size: 11.5px; }
.mlist__chips { max-width: 230px; margin-top: 0; justify-content: flex-end; }
.mlist__count { color: #8c8c8c; font-size: 11.5px; margin-right: 8px; }
.rp-row.is-dis { color: #b0b4bb; background: #fafbfc; }
.rp-row.is-dis input { pointer-events: none; }
.rp-tag--ex { background: #f2f4f7; color: #8c8c8c; }

/* 公会副业三行：收紧下拉宽度和标签，避免 widerow 把下拉拉成 240px */
body[data-route="setting"] .tradeblock { flex-wrap: wrap; align-items: center; }
body[data-route="setting"] .tradeblock .row__pick { min-width: 64px; white-space: nowrap; flex: 0 0 auto; }
body[data-route="setting"] .tradeblock select {
  width: auto !important;
  min-width: 0 !important;
  max-width: 120px !important;
}
body[data-route="setting"] .tradeblock input[type="time"] { width: 104px; flex: 0 0 auto; }
body[data-route="setting"] .tradeblock input[type="number"] { width: 78px !important; flex: 0 0 auto; }
body[data-route="setting"] .tradeblock .row__extralabel {
  max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 公会副业：大标题 + 四列对齐 */
body[data-route="setting"] .tradeblock__hdr {
  display: flex; align-items: center; gap: 8px; margin: 16px 0 0;
  padding-top: 14px; border-top: 1px solid #EAECF0;
}
body[data-route="setting"] .tradeblock__hdr .bar {
  width: 4px; height: 20px; background: #2F6BFF; border-radius: 2px;
}
body[data-route="setting"] .tradeblock__hdr .name {
  font-size: 17px; font-weight: 700; color: #1F2329;
}
body[data-route="setting"] .tradeblock__hdr .tag {
  font-size: 11px; color: #12B76A; background: #ECFDF3;
  border-radius: 4px; padding: 2px 6px;
}
body[data-route="setting"] .tradeblock__hdr .muted {
  margin-left: auto; font-size: 12px; color: #98A2B3;
}
body[data-route="setting"] .tradegrid {
  display: grid; grid-template-columns: 88px 108px minmax(0, 1fr) auto;
  gap: 8px 10px; align-items: center; padding: 10px 0;
  border-bottom: 1px solid #F2F4F7;
}
body[data-route="setting"] .tradegrid > .tglabel {
  display: flex; align-items: center; gap: 8px; font-size: 13px;
  font-weight: 600; color: #344054; white-space: nowrap;
}
body[data-route="setting"] .tradegrid input[type="checkbox"] { margin: 0; }
body[data-route="setting"] .tradegrid input[type="time"] { width: 104px; }
body[data-route="setting"] .tradegrid input[type="number"] {
  width: 78px !important; text-align: right;
}
body[data-route="setting"] .tradegrid select {
  width: auto !important; min-width: 0 !important; max-width: 130px !important;
}
body[data-route="setting"] .tradegrid .tgt { display: flex; align-items: center; }
body[data-route="setting"] .tradegrid .tgm {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0;
}
body[data-route="setting"] .tradegrid .tgr {
  display: flex; align-items: center; gap: 4px; justify-self: end;
}
body[data-route="setting"] .tradegrid .row__extralabel {
  max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
body[data-route="setting"] .tradegrid--claim { grid-template-columns: 88px 1fr; }
body[data-route="setting"] .tradegrid--claim .tgspan { grid-column: 2 / span 3; }

/* 县城页：卡片一列排下来（公会也能占满整行） */
body[data-route="setting"] #setBody[data-tab="县城"] {
  grid-template-columns: 1fr;
}

/* 账号卡片状态（方案 B）：运行中浅绿卡片 + 状态标签 + 启动绿/停止红 */
.acct.is-running {
  border-color: #12B76A !important;
  background: #F6FEF9;
}
.acct__pill {
  flex: 0 0 auto; font-size: 11px; font-weight: 700;
  border-radius: 20px; padding: 3px 8px; white-space: nowrap;
}
.acct__pill.on { background: #ECFDF3; color: #12B76A; }
.acct__pill.off { background: #F2F4F7; color: #98A2B3; }
.abtn--start {
  background: #12B76A !important; border-color: #12B76A !important;
  color: #fff !important; font-weight: 600;
}
.abtn--stop {
  background: #F04438 !important; border-color: #F04438 !important;
  color: #fff !important; font-weight: 600;
}

/* 保存后的两条提示：电脑/手机都居中显示 */
.savenotice {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 9999; display: flex; flex-direction: column; align-items: center;
  gap: 8px; max-width: 92vw; pointer-events: none;
  opacity: 0; transition: opacity .18s ease;
}
.savenotice.is-on { opacity: 1; }
.savenotice__item {
  display: flex; align-items: center; gap: 8px;
  background: #fff; color: #1F2329; border-radius: 10px;
  padding: 10px 16px; font-size: 14px; line-height: 1.4;
  box-shadow: 0 8px 28px rgba(16, 24, 40, .14);
  border: 1px solid #EAECF0; max-width: 92vw;
}
.savenotice__item.warn { color: #B54708; }
.savenotice__ico {
  width: 18px; height: 18px; border-radius: 50%; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
}
.savenotice__item.ok .savenotice__ico { background: #12B76A; }
.savenotice__item.ok .savenotice__ico::before { content: "✓"; }
.savenotice__item.warn .savenotice__ico { background: #F79009; }
.savenotice__item.warn .savenotice__ico::before { content: "!"; }
@media (max-width: 640px) {
  .savenotice { top: 10px; width: 92vw; }
  .savenotice__item { font-size: 13px; padding: 9px 12px; }
}
/* 公告弹窗：登录进首页时按 notice.json 的内容弹一次（A 款：紧凑卡片，手机/电脑自适应） */
.noticepop {
  position: fixed; top: 70px; left: 50%;
  transform: translate(-50%, -8px);
  width: min(92vw, 320px);
  background: #fff; border-radius: 11px;
  box-shadow: 0 10px 26px rgba(20, 30, 60, .20);
  padding: 0 0 12px; overflow: hidden;
  z-index: 80; opacity: 0;
  transition: opacity .18s ease, transform .18s ease;
}
.noticepop.is-in { opacity: 1; transform: translate(-50%, 0); }
.noticepop__head {
  display: flex; align-items: center; gap: 6px;
  margin: 0 0 10px; padding: 9px 34px 9px 12px;
  background: linear-gradient(135deg, #2f6fed, #5b8bff);
  color: #fff; position: relative;
}
.noticepop__ico { font-size: 15px; line-height: 1; }
.noticepop__title { font-size: 14px; font-weight: 700; color: #fff; }
.noticepop__x {
  position: absolute; top: 3px; right: 8px;
  border: 0; background: transparent;
  font-size: 18px; line-height: 1; color: #fff; opacity: .9;
  cursor: pointer; padding: 4px 6px;
}
.noticepop__heading { font-size: 15px; font-weight: 700; color: #16233c; margin: 0 12px 6px; }
.noticepop__line {
  font-size: 13.5px; line-height: 1.55; color: #2a3040;
  margin: 0 12px 4px; padding-left: 12px; position: relative;
}
.noticepop__line::before {
  content: "●"; position: absolute; left: 0; top: 5px;
  color: #5b8bff; font-size: 8px; line-height: 1;
}
.noticepop__line:last-child { margin-bottom: 0; }
/* 电脑：稍宽一点、字稍大，位置下移避开顶栏 */
@media (min-width: 900px) {
  .noticepop { top: 84px; width: 340px; }
  .noticepop__heading { font-size: 16px; }
  .noticepop__line { font-size: 14px; }
}
/* 手机小屏：贴近顶栏 */
@media (max-width: 480px) {
  .noticepop { top: 56px; }
}

