/* ============================================================
   小吃小喝 — 素白主题
   原则：纯白为底 · 1px 细边框代替阴影 · 单一系统字体 · 不用渐变
        动效只服务于反馈，不做装饰
   ============================================================ */

/* ---------- 令牌 ---------- */
:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;

  --maxw: 1080px;
  --ease: cubic-bezier(.2, 0, .2, 1);
}

/* 浅色（默认，纯白） */
:root,
:root[data-theme="light"] {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f7f7f8;
  --surface-3: #f1f1f3;
  --border: #e6e6ea;
  --border-strong: #d3d3d9;

  --ink: #18181b;
  --ink-2: #3f3f46;
  --muted: #71717a;
  --faint: #a1a1aa;

  --primary: #18181b;
  --primary-ink: #ffffff;
  --primary-hover: #2a2a2e;

  --accent: #a35a06;
  --accent-soft: #fdf6ec;

  --success: #15803d;
  --success-soft: #f0f9f2;
  --danger: #b3261e;
  --danger-soft: #fdf2f1;
  --warning: #9a5b06;
  --warning-soft: #fdf7ed;

  --shadow-modal: 0 12px 32px -12px rgba(24, 24, 27, .22);
  color-scheme: light;
}

/* 深色（中性灰，不做花哨） */
:root[data-theme="dark"] {
  --bg: #101012;
  --surface: #17171a;
  --surface-2: #1e1e22;
  --surface-3: #26262b;
  --border: #2b2b31;
  --border-strong: #3a3a42;

  --ink: #f4f4f5;
  --ink-2: #d4d4d8;
  --muted: #a1a1aa;
  --faint: #71717a;

  --primary: #f4f4f5;
  --primary-ink: #18181b;
  --primary-hover: #e4e4e7;

  --accent: #e3a951;
  --accent-soft: #241d10;

  --success: #4ade80;
  --success-soft: #14241a;
  --danger: #f87171;
  --danger-soft: #261618;
  --warning: #fbbf24;
  --warning-soft: #241d10;

  --shadow-modal: 0 12px 32px -12px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

/* 浏览器自带的 [hidden]{display:none} 属于 UA 样式表，优先级低于本文件里任何
   带 display 的规则（.btn 就是 inline-flex）。不补这一条的话，el.hidden = true
   对按钮之类的元素完全不生效。 */
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 600; }
p { margin: 0; }

.app-root { min-height: 100dvh; display: flex; flex-direction: column; }
.container { width: min(100% - 40px, var(--maxw)); margin-inline: auto; }
main { flex: 1; padding-block: 32px 64px; }

.muted { color: var(--muted); }
.tabular { font-variant-numeric: tabular-nums; }

/* 视图切换：只用极短的淡入，不做位移特效 */
.view { animation: fade .18s var(--ease) both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.page-head { margin-bottom: 24px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 20px; }
.page-head p { color: var(--muted); margin-top: 4px; }

/* ---------- 按钮 ---------- */
.btn {
  appearance: none; cursor: pointer; font-family: inherit; font-size: 13.5px; font-weight: 500;
  padding: 8px 14px; border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: background .15s var(--ease), border-color .15s var(--ease), opacity .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn:active { background: var(--surface-3); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.btn--primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.btn--primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn--primary:active { background: var(--primary); }

.btn--ghost { border-color: transparent; background: transparent; }
.btn--ghost:hover { background: var(--surface-2); }

.btn--danger { color: var(--danger); }
.btn--danger:hover { background: var(--danger-soft); border-color: var(--danger); }

.btn--sm { padding: 6px 11px; font-size: 13px; }
.btn--lg { padding: 10px 18px; font-size: 14px; }
.btn--icon { padding: 7px; }
.btn--block { width: 100%; }

.btn svg { flex: none; opacity: .75; }
.btn--primary svg { opacity: .9; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.card--pad { padding: 20px; }

/* ---------- 表单 ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
/* .field__title：一组按钮的小标题（没有输入框可关联，就不冒充 <label>），外观同 label */
.field > label, .field > .field__title { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--muted); }

.input, .textarea, .select {
  width: 100%; font-family: inherit; font-size: 14px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius); padding: 9px 11px;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--ink);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 10%, transparent);
}
.textarea {
  resize: vertical; min-height: 110px; line-height: 1.55;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px;
}

/* ---------- 标签 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--muted);
  /* 徽标一律整块走，宁可整个换到下一行，也绝不在内部断字 ——
     容器被挤窄时（手机上的账号头部尤其明显）会排成一列单字，完全读不了 */
  white-space: nowrap;
}
.badge--dot::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge--ok { color: var(--success); background: var(--success-soft); border-color: color-mix(in srgb, var(--success) 25%, transparent); }
.badge--warn { color: var(--warning); background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 25%, transparent); }
.badge--bad { color: var(--danger); background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.badge--brand { color: var(--accent); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 25%, transparent); }

/* ---------- 顶栏 ---------- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30; }
.topbar__inner { display: flex; align-items: center; gap: 14px; height: 56px; }
.topbar__spacer { flex: 1; }

.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand__mark {
  flex: none; width: 28px; height: 28px; border-radius: var(--radius-sm);
  display: grid; place-items: center;
  background: var(--primary); color: var(--primary-ink);
}
.brand__name { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.navlink {
  color: var(--muted); text-decoration: none; font-size: 13.5px; font-weight: 500;
  padding: 6px 10px; border-radius: var(--radius); transition: color .15s, background .15s;
}
.navlink:hover { color: var(--ink); background: var(--surface-2); }
.navlink.active { color: var(--ink); background: var(--surface-2); }

.avatar {
  flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border-strong);
  font-weight: 600; font-size: 12.5px; color: var(--ink-2); cursor: pointer;
  transition: background .15s;
}
.avatar:hover { background: var(--surface-3); }

/* ---------- 认证页 ---------- */
.auth-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: min(100%, 380px); }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 9px; margin-bottom: 8px; }
.auth-title { text-align: center; font-size: 18px; margin-bottom: 4px; }
.auth-sub { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 24px; }

.auth-tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 22px; }
.auth-tab {
  flex: 1; padding: 9px 0; font-size: 13.5px; font-weight: 500; color: var(--muted);
  background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer;
  font-family: inherit; margin-bottom: -1px; transition: color .15s, border-color .15s;
}
.auth-tab:hover { color: var(--ink-2); }
.auth-tab.active { color: var(--ink); border-bottom-color: var(--ink); }

.auth-form { display: grid; gap: 14px; }
.auth-foot { text-align: center; margin-top: 18px; font-size: 12.5px; color: var(--faint); }

/* ---------- 网格 ---------- */
.grid { display: grid; gap: 14px; }
.grid--accounts { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid--stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

/* ---------- 账号区块 ---------- */
.acct-block { margin-bottom: 22px; }
/* 头部分成两块：左边「头像 + 名字/徽标」，右边按钮组。
   换行只发生在这两块之间 —— 以前三者平铺在同一个 flex 容器里，窄屏上中间那块会被
   压到几十像素，徽标逐字竖排、名字看着像浮在半空。flex-basis 给一个下限，
   放不下时整块按钮换行到下一排，而不是把名字那块继续挤扁。 */
.acct-block__head {
  display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap;
  padding: 0 2px 12px; margin-bottom: 12px; border-bottom: 1px solid var(--border);
}
.acct__main { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 240px; }
.acct__names { min-width: 0; }
.acct__actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.acct__ic { flex: none; width: 34px; height: 34px; border-radius: var(--radius); display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.acct__id { font-weight: 600; font-size: 15px; word-break: break-all; }
.acct__meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
/* 手机端收起时的模块摘要条；电脑端不显示（模块卡片始终展开） */
.acct-summary { display: none; }

/* 幸运星 / 奶茶 两张模块卡片 */
.module-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.module { padding: 16px; display: flex; flex-direction: column; gap: 12px; transition: border-color .15s var(--ease); }
.module:hover { border-color: var(--border-strong); }
.module__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.module__title { font-weight: 600; font-size: 14.5px; }
.module__desc { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.module__queries { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.module__queries .btn { width: 100%; }
/* 模块说明：比描述再轻一档，用来说清「这一块由面板侧脚本执行」 */
.module__note { font-size: 12px; color: var(--faint); line-height: 1.7; }
.module__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-top: 12px; border-top: 1px solid var(--border);
  /* 内容多寡不同的卡片（助力没有查询按钮）在同一行里，提交按钮仍然对齐 */
  margin-top: auto;
}
.module__env { font-size: 12px; color: var(--faint); }

/* ---------- 空态 ---------- */
.empty { text-align: center; padding: 52px 24px; }
.empty__ic { width: 40px; height: 40px; margin: 0 auto 14px; display: grid; place-items: center; color: var(--faint); }
.empty h3 { font-size: 15px; margin-bottom: 6px; }
.empty p { color: var(--muted); max-width: 42ch; margin: 0 auto 18px; font-size: 13.5px; }

/* ---------- 统计 ---------- */
.stat { padding: 16px 18px; }
.stat__label { font-size: 12.5px; color: var(--muted); }
.stat__value { font-size: 24px; font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; }

/* ---------- 模态 ---------- */
.modal-scrim {
  position: fixed; inset: 0; z-index: 60; padding: 20px;
  background: rgba(24, 24, 27, .35);
  display: grid; place-items: center;
  animation: fade .15s var(--ease) both;
}
.modal {
  width: min(100%, 440px); max-height: 88dvh; overflow: auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-modal);
  animation: modalIn .18s var(--ease) both;
}
.modal--wide { width: min(100%, 580px); }
/* 无输入框时会把焦点程序化地放到面板上（无障碍需要），但不该画出焦点框；
   面板内的可交互元素仍保留各自的 focus-visible 样式。 */
.modal:focus, .modal:focus-visible { outline: none; }
@keyframes modalIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.modal__head { display: flex; align-items: center; gap: 10px; padding: 18px 20px 0; }
.modal__title { font-size: 15px; font-weight: 600; flex: 1; }
.modal__body { padding: 16px 20px 20px; }
.modal__foot { padding: 0 20px 20px; display: flex; gap: 8px; justify-content: flex-end; }
.modal__close { margin-left: auto; color: var(--muted); }

/* ---------- 登录方式选择 ---------- */
.method-grid { display: grid; gap: 8px; }
.method-opt {
  display: flex; gap: 12px; align-items: center; padding: 14px;
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; text-align: left; width: 100%; font-family: inherit; color: var(--ink);
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.method-opt:hover { border-color: var(--border-strong); background: var(--surface-2); }
.method-opt.active { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }
.method-opt:disabled { opacity: .5; cursor: not-allowed; background: var(--surface); border-color: var(--border); }
/* 两列栅格，窄屏自动塌成一列 */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.method-opt__ic { flex: none; width: 32px; height: 32px; border-radius: var(--radius-sm); display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.method-opt b { font-size: 14px; display: block; font-weight: 500; }
.method-opt span { font-size: 12.5px; color: var(--muted); }
.method-opt__go { margin-left: auto; color: var(--faint); }
/* 选项标题里的小徽标（如扫码渠道的「推荐」）：要压过上面 .method-opt span 的灰色小字 */
.method-opt b .badge { margin-left: 6px; font-size: 11px; padding: 0 7px; vertical-align: 1px; }
.method-opt b .badge--ok { color: var(--success); }

/* ---------- 步骤 ---------- */
.steps { display: flex; gap: 4px; margin-bottom: 18px; }
.step-dot { flex: 1; height: 2px; border-radius: 1px; background: var(--surface-3); }
.step-dot.done, .step-dot.active { background: var(--ink); }

.code-input { letter-spacing: .35em; text-align: center; font-size: 18px; font-weight: 600; }

/* ---------- 二维码 ---------- */
.qr-box { display: grid; place-items: center; gap: 12px; padding: 20px; background: var(--surface-2); border-radius: var(--radius); }
.qr-box img { width: 190px; height: 190px; border-radius: var(--radius-sm); background: #fff; padding: 8px; }

/* ---------- 查询结果 ---------- */
.qr-result { display: grid; gap: 16px; }

.stat-block {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px;
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
}
.stat-block__label { font-size: 13px; color: var(--muted); }
.stat-block__value { font-size: 30px; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1; }
.stat-block__unit { font-size: 13px; color: var(--muted); }
.stat-block__side { margin-left: auto; font-size: 13px; color: var(--muted); }
.stat-block__side b { color: var(--success); font-weight: 600; }

.list-block h4 { font-size: 12.5px; font-weight: 500; color: var(--muted); margin-bottom: 8px; }
.list-block .row-item:last-child { border-bottom: none; }

.row-item {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13.5px;
}
.row-item__sub { color: var(--muted); font-size: 12px; margin-top: 1px; }
.row-item__amt { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-item__amt.plus { color: var(--success); }
.row-item__amt.minus { color: var(--muted); }
.row-item__main { min-width: 0; }

.coupon__amt { flex: none; min-width: 52px; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }

/* 券筛选：默认「全部」，由用户自己点，绝不在后台悄悄过滤 */
.filter-row { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-chip {
  padding: 4px 11px; border-radius: 999px; cursor: pointer; font-family: inherit;
  font-size: 12.5px; border: 1px solid var(--border);
  background: var(--surface); color: var(--muted);
  transition: color .15s, border-color .15s, background .15s;
}
.filter-chip:hover { color: var(--ink); border-color: var(--border-strong); }
.filter-chip.active { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.filter-chip:disabled { opacity: .4; cursor: not-allowed; }
.filter-chip .n { opacity: .65; margin-left: 3px; }

.pager { display: flex; align-items: center; justify-content: center; gap: 12px; padding-top: 4px; font-size: 13px; color: var(--muted); }

/* ---------- 物流（幸运星兑换单） ---------- */
.lg-order { display: grid; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.list-block .lg-order:last-child { border-bottom: none; }
.lg-order__name { font-weight: 500; overflow-wrap: anywhere; }
.lg-order .badge { flex: none; }
.lg-order__latest { font-size: 12.5px; color: var(--ink-2); line-height: 1.6; overflow-wrap: anywhere; }
.lg-trace {
  display: grid; gap: 10px; margin-top: 2px; padding: 12px 14px;
  border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border);
}
.lg-trace__pkg { font-size: 12.5px; color: var(--muted); }
.lg-timeline { list-style: none; margin: 0; padding: 0; }
.lg-timeline__item { position: relative; padding: 0 0 12px 18px; }
.lg-timeline__item::before {
  content: ""; position: absolute; left: 3px; top: 6px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--border-strong);
}
.lg-timeline__item::after { content: ""; position: absolute; left: 6px; top: 16px; bottom: 0; width: 1px; background: var(--border); }
.lg-timeline__item:last-child { padding-bottom: 0; }
.lg-timeline__item:last-child::after { display: none; }
.lg-timeline__item.is-latest::before { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.lg-timeline__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 13px; }
.lg-timeline__head span { font-size: 12px; }
.lg-timeline__text { margin-top: 2px; font-size: 12.5px; line-height: 1.6; color: var(--ink-2); overflow-wrap: anywhere; }

/* ---------- 兑换商城 / 定时抢兑 ---------- */
/* 余额头条：左侧「当前幸运星 + 大数字」，右侧挂今日场次摘要，
   把「有多少星 / 几点开抢」这两件用户最关心的事放在同一块里 */
.mall-head {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-2);
}
.mall-head__bal { display: flex; align-items: baseline; gap: 8px; }
.mall-head__label { font-size: 12.5px; color: var(--muted); }
.mall-head__value { font-size: 28px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: -.01em; }
.mall-head__unit { font-size: 12.5px; color: var(--muted); }
.mall-head__side { margin-left: auto; font-size: 12.5px; color: var(--muted); }

/* 右侧场次摘要：把今日场次压成一行小字，不抢余额的视觉重心 */
.mall-head__slots {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-left: auto; padding-left: 14px; border-left: 1px solid var(--border);
}
.mall-head__slots-label { font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.mall-head__slot {
  font-size: 11.5px; font-weight: 600; color: var(--ink-2);
  padding: 3px 7px; border-radius: 5px; background: var(--surface);
  border: 1px solid var(--border); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.mall-head__slot.is-next {
  color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  background: var(--accent-soft);
}
@media (max-width: 560px) {
  .mall-head__value { font-size: 24px; }
  .mall-head__slots { margin-left: 0; padding-left: 0; border-left: none; flex-basis: 100%; }
}

/* 提示卡（兑换登录就绪 / 未就绪）：图标 + 标题 + 说明 + 动作，比纯文字 note 更清楚 */
.callout { display: flex; gap: 11px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2); }
.callout__ic { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; }
.callout__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.callout__title { font-size: 13px; font-weight: 600; color: var(--ink); }
.callout__text { font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
.callout__actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 7px; }
.callout__hint { font-size: 11.5px; color: var(--muted); }
.callout--warn { background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 22%, transparent); }
.callout--warn .callout__ic { background: color-mix(in srgb, var(--warning) 14%, transparent); color: var(--warning); }
.callout--ok { background: var(--success-soft); border-color: color-mix(in srgb, var(--success) 22%, transparent); }
.callout--ok .callout__ic { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); }
.callout--ok .callout__body { flex-direction: row; align-items: center; gap: 8px; flex-wrap: wrap; }
.callout--ok .callout__title { font-weight: 500; }

/* 商品列表：整组一个边框，行内细分隔，比一堆独立大方块轻 */
.mall-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.mall-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-bottom: 1px solid var(--border); background: var(--surface);
  font-family: inherit; text-align: left; width: 100%; color: var(--ink);
  transition: background .12s var(--ease), box-shadow .12s var(--ease);
  position: relative;
}
.mall-item:last-child { border-bottom: none; }
.mall-item__body { flex: 1; min-width: 0; }
/* 窄屏：商品行让「动作」始终可见，徽标允许折行 */
@media (max-width: 560px) {
  .mall-item { gap: 9px; padding: 11px 12px; }
  .mall-item__meta { gap: 6px; row-gap: 5px; }
  .mall-item__time { font-size: 11px; padding: 3px 6px; }
  .mall-item__act .btn--sm { padding: 6px 10px; font-size: 12.5px; }
  .mall-item__wait { padding: 3px 7px; font-size: 11px; }
  .mall-item__name { font-size: 13px; }
  .mall-head { padding: 12px 13px; gap: 10px; }
}

/* 名称行：名字 + 紧跟的标签（限量）。名字不 flex:1 —— 否则标签会被推到最右，
   离商品名老远，看不出是这件商品的标记。多余空间由外层 body 吸收。 */
.mall-item__top { display: flex; align-items: center; gap: 7px; min-width: 0; }
.mall-item__name {
  font-size: 13.5px; font-weight: 500; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  flex: 0 1 auto; min-width: 0;
}
.mall-item__meta { margin-top: 5px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mall-item__cost { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
.mall-item__act { flex: none; display: flex; align-items: center; gap: 8px; }
.mall-item__lock { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.mall-item--locked { background: var(--surface); }
.mall-item--locked .mall-item__name { color: var(--ink-2); }

/* 开抢时刻徽标：把「这件商品几点开抢」做成一眼可见的独立元素，
   而不是混在灰色状态文字里（原来那行 ⏰09-01 00:00 和「差X星」挤在一起分不清主次）。 */
.mall-item__time {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 500; line-height: 1;
  padding: 4px 7px; border-radius: 5px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--ink-2);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.mall-item__time svg { opacity: .65; }
/* 每日场次：中性色，常态信息 */
.mall-item__time--daily { color: var(--ink-2); }
/* 一次性限量场次：品牌色描边，抢的就是这一场 */
.mall-item__time--seckill {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}
.mall-item__time--seckill svg { opacity: 1; }
/* 已结束 / 已过场次：压成灰，不再吸引点击 */
.mall-item__time--past { color: var(--faint); background: var(--surface); }
.mall-item__time--past svg { opacity: .4; }

/* 角标：限量秒杀 / 已抢过 */
.mall-item__tag {
  flex: none; font-size: 10.5px; font-weight: 600; line-height: 1;
  padding: 3px 6px; border-radius: 4px; letter-spacing: .02em;
}
.mall-item__tag--seckill { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.mall-item__tag--done { color: var(--muted); background: var(--surface-3); }

/* 状态文字（差X星 / 已抢过 / 可兑换） */
.mall-item__status { white-space: nowrap; }
.mall-item__status--ok { color: var(--success); font-weight: 500; }
.mall-item__status--gap { color: var(--muted); }
/* 「等开场」：未开抢但今天有场 —— 比灰色「不可兑」多一层含义（来早了 vs 抢不了） */
.mall-item__wait {
  display: inline-flex; align-items: center;
  font-size: 11.5px; font-weight: 500; color: var(--accent);
  padding: 4px 9px; border-radius: 5px; white-space: nowrap;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
}

/* 选择态（新建抢兑任务里挑商品）*/
/* 做成 <button> 时要清掉浏览器默认的上/左/右边框（否则行两侧会出现一道深色立体边），只留行间分隔线 */
button.mall-item { cursor: pointer; border: 0; border-bottom: 1px solid var(--border); }
button.mall-item:hover { background: var(--surface-2); }
button.mall-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.mall-item.selected {
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
  box-shadow: inset 3px 0 0 var(--accent);
}
.mall-item__radio { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--border-strong); display: grid; place-items: center; transition: border-color .12s, background .12s; }
.mall-item__radio svg { opacity: 0; }
button.mall-item:hover .mall-item__radio { border-color: color-mix(in srgb, var(--accent) 50%, var(--border-strong)); }
.mall-item.selected .mall-item__radio { border-color: var(--accent); background: var(--accent); color: #fff; }
.mall-item.selected .mall-item__radio svg { opacity: 1; }

/* 分段控件（每天重复 / 指定日期）*/
.seg { display: flex; padding: 3px; gap: 3px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); }
.seg button { flex: 1; padding: 7px 12px; font-size: 13px; font-family: inherit; border: none; background: none; color: var(--muted); border-radius: var(--radius-sm); cursor: pointer; transition: background .12s, color .12s; }
.seg button:hover { color: var(--ink-2); }
.seg button.active { background: var(--surface); color: var(--ink); font-weight: 500; border: 1px solid var(--border); }
.seg button:disabled { opacity: .45; cursor: not-allowed; }
.seg button:disabled:hover { color: var(--muted); }

/* 抢兑账号批量勾选：一格一个号（勾选框 + 名字 + 状态小标），窄屏自动变单列 */
.acct-pick__head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; font-size: 12.5px; color: var(--muted); }
.acct-pick__head b { color: var(--ink); font-variant-numeric: tabular-nums; }
.acct-pick__spacer { flex: 1; }
.acct-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.acct-pick__item {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  padding: 8px 10px; font-size: 13px; cursor: pointer;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
  transition: border-color .12s, background .12s;
}
.acct-pick__item:hover { border-color: var(--border-strong); }
.acct-pick__item.is-on { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.acct-pick__item input { flex: none; width: 15px; height: 15px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.acct-pick__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.acct-pick__tag { flex: none; font-size: 11px; line-height: 1.6; padding: 0 6px; border-radius: 999px; color: var(--muted); background: var(--surface-2); }
.acct-pick__tag--dup { color: var(--warning); background: var(--warning-soft); }
.acct-pick__tag--bad { color: var(--danger); background: var(--danger-soft); }

/* 抢兑任务摘要条：把当前选择归纳成一句话 */
.task-summary { font-size: 12.5px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 11px 13px; line-height: 1.65; }
.task-summary b { color: var(--accent); font-weight: 600; }
.task-summary .muted { color: var(--muted); }

/* 计划预览：把「几点抢、抢几场」做成大号时刻块，而不是埋在一句话里 */
.plan-when__row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.plan-when__label { font-size: 11.5px; color: var(--faint); }
.plan-when {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 10px; padding: 12px 14px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
}
.plan-when__time {
  display: flex; align-items: baseline; gap: 2px;
  font-size: 22px; font-weight: 700; color: var(--ink);
  font-variant-numeric: tabular-nums; letter-spacing: -.01em; line-height: 1.1;
}
.plan-when__time small { font-size: 12px; font-weight: 500; color: var(--muted); }
/* 一次性限量：品牌色 + 浅底，和每日场次区分开 */
.plan-when__time.is-seckill { color: var(--accent); }
.plan-when__time.is-seckill small { color: color-mix(in srgb, var(--accent) 70%, transparent); }
.plan-when__meta {
  display: flex; flex-direction: column; gap: 3px;
  font-size: 12px; color: var(--muted); line-height: 1.5;
  padding-left: 14px; border-left: 1px solid var(--border);
}
.plan-when__cost { color: var(--faint); font-variant-numeric: tabular-nums; }
@media (max-width: 480px) {
  .plan-when { gap: 10px; }
  .plan-when__time { font-size: 19px; }
  .plan-when__meta { padding-left: 10px; }
}

/* 定时抢兑任务卡 */
.task-card {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  transition: border-color .15s var(--ease);
}
.task-card:hover { border-color: var(--border-strong); }
.task-card__name { font-size: 14px; font-weight: 600; }
.task-card__meta { margin-top: 4px; font-size: 12.5px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.task-card__meta .k { color: var(--faint); }
.task-card__right { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.task-cards { display: flex; flex-direction: column; gap: 10px; }

/* ---------- 今日场次面板 ---------- */
/* 结构：头部（标题 + 采集时间 + 刷新按钮） / 一排场次格子 / 每格下方挂商品数
   场次是「时间轴」语义，所以做成等宽格子而不是文字徽章 —— 一眼能扫出今天有几个点。 */
.slots {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); overflow: hidden;
}
.slots__head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.slots__title { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.slots__title svg { color: var(--accent); }
.slots__meta { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.slots__spacer { flex: 1; min-width: 8px; }

/* 用 flex 而不是 grid：场次数不定（常态 4 个，大促可能 6-7 个），flex 能让它们
   自动填满整行宽度、又不会因为「只有 2 个」被拉成两根面条（max-width 兜住）。 */
.slots__grid {
  display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 16px;
}
.slot {
  flex: 1 1 108px; max-width: 210px; min-width: 0;
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  min-height: 62px; padding: 11px 13px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.slot:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); background: var(--accent-soft); }
.slot__time {
  font-size: 18px; font-weight: 650; color: var(--ink);
  font-variant-numeric: tabular-nums; letter-spacing: -.01em; line-height: 1.1;
  white-space: nowrap;
}
/* 秒用同色系但更轻，靠字号/字重拉开层次 —— 用 faint 会像「时间残缺」 */
.slot__time small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 1px; }
/* 第二行：件数 + 「下一场」标记同行，避免角标压住时间 */
.slot__foot {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--muted); white-space: nowrap;
}
.slot__count { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.slot__count b { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
.slot__flag {
  flex: none; margin-left: auto;
  font-size: 10px; font-weight: 600; color: var(--accent);
  letter-spacing: .04em; line-height: 1;
  padding: 2px 5px; border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
/* 已过的场次：整块降饱和但文字仍可读（opacity 会连带压暗文字，改用色阶） */
.slot.is-past { background: var(--surface-2); border-color: var(--border); }
.slot.is-past .slot__time { color: var(--muted); }
.slot.is-past .slot__time small { color: var(--faint); }
.slot.is-past .slot__count b { color: var(--muted); }
.slot.is-next {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background: var(--accent-soft);
}
.slot.is-next .slot__time { color: var(--accent); }
.slot.is-next .slot__time small { color: color-mix(in srgb, var(--accent) 70%, transparent); }

/* 无场次时的占位 */
.slots__empty { padding: 14px 16px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }

/* 窄屏：两列网格，别让 4 张卡挤成一条 */
@media (max-width: 560px) {
  .slots__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px; }
  .slot { max-width: none; min-height: 54px; padding: 9px 11px; gap: 4px; }
  .slot__time { font-size: 16px; }
  .slot__time small { font-size: 11px; }
  .slots__head { padding: 10px 12px; }
  /* 窄屏「下一场」只留色块不写字：3 个字 + 件数放不进 2 列，硬挤会换行撑高卡片 */
  .slot__flag {
    margin-left: auto; padding: 0; width: 5px; height: 5px; border-radius: 50%;
    background: var(--accent); overflow: hidden; text-indent: -99px;
  }
  /* 头部「采集时间」在窄屏独占一行，别和标题挤在一起 */
  .slots__meta { flex-basis: 100%; order: 3; }
  .slots__spacer { display: none; }
}

/* ---------- 批量查询 ---------- */
.bq { display: grid; gap: 12px; }
.bq-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.bq-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.bq-check input { accent-color: var(--primary); cursor: pointer; }

.bq-progress { height: 3px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bq-progress > i { display: block; height: 100%; width: 0; background: var(--primary); transition: width .3s var(--ease); }

.bq-summary__line { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* 账号多时表格横向滚动，不让弹窗整体被撑破 */
.bq-wrap { overflow-x: auto; }
.bq-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bq-table th {
  text-align: left; font-size: 12px; font-weight: 500; color: var(--muted);
  padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.bq-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.bq-table tbody tr:last-child td { border-bottom: none; }
.bq-table td.num { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.bq-table td.num.accent { color: var(--accent); }
.bq-table td.num.plus { color: var(--success); }
.bq-acct { font-weight: 500; white-space: nowrap; }
.bq-table tbody tr.clickable { cursor: pointer; }
.bq-table tbody tr.clickable:hover { background: var(--surface-2); }
.bq-expand { font-size: 12px; color: var(--muted); white-space: nowrap; }
.bq-detail > td { background: var(--surface-2); padding: 4px 10px 12px; }

/* ---------- 管理端 ---------- */
.admin-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.admin-tab {
  padding: 8px 12px; font-size: 13.5px; font-weight: 500; color: var(--muted);
  background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer;
  font-family: inherit; margin-bottom: -1px; transition: color .15s, border-color .15s;
  display: inline-flex; align-items: center; gap: 6px;
}
.admin-tab:hover { color: var(--ink-2); }
.admin-tab.active { color: var(--ink); border-bottom-color: var(--ink); }
.admin-tab .count { padding: 0 6px; border-radius: 999px; background: var(--surface-3); font-size: 11.5px; color: var(--ink-2); }

/* 站点配置：左侧分区导航，右侧只显示当前分区，一屏只看一类设置 */
.settings-layout {
  display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 24px; align-items: start;
}
.settings-nav { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 2px; }
.settings-nav__item {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 9px 12px; border: none; border-radius: var(--radius); background: none;
  font-family: inherit; font-size: 13.5px; color: var(--muted); text-align: left; cursor: pointer;
  transition: color .15s, background .15s;
}
.settings-nav__item:hover { color: var(--ink); background: var(--surface-2); }
.settings-nav__item.active { color: var(--ink); background: var(--surface-2); font-weight: 600; }
.settings-main, .settings-section { display: grid; gap: 16px; min-width: 0; }
.settings-card { padding: 20px; }
.settings-card__title { font-size: 15px; font-weight: 600; }
.settings-card__desc { font-size: 12.5px; color: var(--muted); margin-top: 4px; line-height: 1.6; }
.settings-card__body { display: grid; gap: 16px; margin-top: 16px; }
.settings-status { font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.settings-empty {
  padding: 18px; text-align: center; font-size: 13px; color: var(--muted);
  border: 1px dashed var(--border-strong); border-radius: var(--radius);
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid > .span-2 { grid-column: 1 / -1; }
/* 卡片里的子卡片：面板列表的每一项、每个提交变量 */
.sub-card {
  display: grid; gap: 14px; padding: 16px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
}
.settings-section > .sub-card { border-radius: var(--radius-lg); padding: 20px; }
.sub-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sub-card__head .row-between { flex: none; gap: 12px; }
.sub-card__title { font-size: 15px; font-weight: 600; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
/* 不常用 / 危险的操作收进折叠块 */
.settings-more { border-top: 1px solid var(--border); padding-top: 12px; }
.settings-more > summary { cursor: pointer; font-size: 13px; color: var(--muted); user-select: none; }
.settings-more > summary:hover { color: var(--ink); }
.settings-more__body { display: grid; gap: 10px; margin-top: 12px; }
@media (max-width: 760px) {
  .settings-layout { grid-template-columns: 1fr; gap: 14px; }
  .settings-nav { position: static; flex-direction: row; overflow-x: auto; padding-bottom: 2px; }
  .settings-nav__item { width: auto; white-space: nowrap; }
  .form-grid, .form-grid--3 { grid-template-columns: 1fr; }
  .sub-card__head { flex-wrap: wrap; }
}
/* 保存栏常驻底部，改完不用滚到页尾。留出底部空间，避免遮住最后一行字段 */
.settings-actions {
  position: sticky; bottom: 12px; z-index: 5;
  display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  margin-top: 16px; padding: 12px 16px;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius); box-shadow: var(--shadow-modal);
}
.settings-layout + .settings-actions { margin-bottom: 8px; }

.urow { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.urow:last-child { border-bottom: none; }
/* flex-basis 给一个不大的下限、再允许它长大：这样「名字 + 一串徽标」超宽时，
   徽标在这一块**内部**换行，按钮组照旧待在右边。
   不给 basis 的话它的假想宽度就是整段内容的宽度，一超容器，整个按钮组会被
   挤到下一行去 —— 同一张表里有的行按钮在右、有的行在左下，看着就是乱的。 */
.urow__main { display: flex; align-items: center; gap: 11px; min-width: 0; flex: 1 1 260px; }
.urow__av { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); font-weight: 600; font-size: 12.5px; color: var(--ink-2); }
.urow__name { font-weight: 500; font-size: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.urow__sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
/* margin-left:auto 保证按钮组始终靠右 —— 包括它确实放不下、独占一行的时候
   （.urow 是 space-between，单个项目会被摆到行首，看着像左对齐的孤儿） */
.urow__actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }

/* 账号授权 · 批量授权：行首勾选框 + 列表上方一条操作栏 */
.urow__check { flex: none; width: 15px; height: 15px; margin: 0; accent-color: var(--primary); cursor: pointer; }
.urow__check:disabled { cursor: not-allowed; opacity: .4; }   /* 深色主题下原生禁用态几乎看不出来 */
.urow.is-selected { background: var(--surface-2); }
.batch-bar { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 12px; }
.batch-bar__info { flex: 1; min-width: 12em; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* 管理端 · 定时列表：成功率细条（绿 = 成功、红 = 失败、底色 = 尚未执行）+ 按商品统计 */
.sched-bar { display: flex; height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.sched-bar > i { display: block; height: 100%; }
.sched-bar > .ok { background: var(--success); }
.sched-bar > .bad { background: var(--danger); }
.sched-items__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.sched-items__title { font-weight: 600; font-size: 14px; }
.sched-item {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(80px, 160px) 56px; gap: 14px; align-items: center;
  width: 100%; padding: 10px 16px; border: none; border-bottom: 1px solid var(--border);
  background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
  transition: background .15s;
}
.sched-item:last-child { border-bottom: none; }
.sched-item:hover { background: var(--surface-2); }
.sched-item.active { background: var(--surface-2); box-shadow: inset 2px 0 0 var(--ink); }
.sched-item:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.sched-item__name { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sched-item__sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.sched-item__pct { text-align: right; font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sched-msg { overflow-wrap: anywhere; }
.sched-hint { font-size: 12px; color: var(--muted); }
.sched-label { align-self: center; margin-right: 4px; font-size: 12.5px; color: var(--muted); min-width: 4.5em; }
@media (max-width: 560px) {
  .sched-item { grid-template-columns: minmax(0, 1fr) 56px; row-gap: 8px; }
  .sched-item > .sched-bar { grid-column: 1 / -1; grid-row: 2; }
}
/* 页签多了，窄屏放不下一行：横向滑动，底线改用内阴影（overflow 会裁掉页签 -1px 的下边框） */
@media (max-width: 620px) {
  .admin-tabs { overflow-x: auto; scrollbar-width: none; border-bottom: none; box-shadow: inset 0 -1px 0 var(--border); }
  .admin-tabs::-webkit-scrollbar { display: none; }
  .admin-tab { flex: none; white-space: nowrap; margin-bottom: 0; }
}

/* ---------- Toast ---------- */
.toast-host { position: fixed; top: 16px; right: 16px; z-index: 90; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  pointer-events: auto; min-width: 240px; max-width: 360px;
  display: flex; align-items: flex-start; gap: 9px; padding: 11px 13px;
  border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-modal);
  animation: toastIn .18s var(--ease) both; cursor: pointer;
}
.toast.leaving { animation: toastOut .15s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(12px); } }
.toast__ic { flex: none; margin-top: 1px; }
.toast__title { font-weight: 500; font-size: 13.5px; }
.toast__msg { font-size: 12.5px; color: var(--muted); margin-top: 1px; white-space: pre-line; }
.toast--success .toast__ic { color: var(--success); }
.toast--error .toast__ic { color: var(--danger); }
.toast--warn .toast__ic { color: var(--warning); }
.toast--info .toast__ic { color: var(--muted); }

/* ---------- 加载 ---------- */
.spinner {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid var(--border-strong); border-top-color: var(--ink);
  animation: spin .6s linear infinite;
}
.btn--primary .spinner { border-color: color-mix(in srgb, var(--primary-ink) 35%, transparent); border-top-color: var(--primary-ink); }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-center { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 40px 0; color: var(--muted); font-size: 13.5px; }

/* ---------- 工具类 ---------- */
.row { display: flex; align-items: center; gap: 8px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gap-sm { gap: 6px; }
.mt { margin-top: 14px; }
.mt-lg { margin-top: 22px; }
.text-center { text-align: center; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }

.link { color: var(--ink); cursor: pointer; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-strong); }
.link:hover { text-decoration-color: var(--ink); }
button.link { background: none; border: none; padding: 0; font-family: inherit; font-size: 13px; }
button.link:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 3px; }

.note {
  font-size: 12.5px; padding: 10px 12px; border-radius: var(--radius);
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--ink-2); line-height: 1.6;
}
.note--warn { background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 22%, transparent); color: var(--ink-2); }
.note--error { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 22%, transparent); color: var(--ink-2); }
.note--ok { background: var(--success-soft); border-color: color-mix(in srgb, var(--success) 22%, transparent); color: var(--ink-2); }

/* 报错弹窗正文：要能看全、能选中复制。
   报错里常带一长串不含空格的落地 URL，必须 anywhere 才不会把弹窗撑破。 */
.err-box {
  font-size: 13px; line-height: 1.7; color: var(--ink-2);
  padding: 12px 14px; border-radius: var(--radius);
  background: var(--danger-soft);
  border: 1px solid color-mix(in srgb, var(--danger) 22%, transparent);
  white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;
  max-height: 46vh; overflow-y: auto;
  user-select: text; -webkit-user-select: text; cursor: text;
}

/* ---------- 站点公告 ----------
 * 原来只有一行 padding + 边框，公告被塞成一个文本节点：换行被 HTML 折叠掉，
 * 整段挤成一行，也没有任何强调手段，用户扫一眼就过去了。
 *
 * 现在分两层：
 *   .announce            外框（中性色，普通公告）
 *   .announce--strong    含 !!!高亮!!! 的公告（警示色，视觉权重更高）
 * 正文用 pre-wrap 保换行，段/列表/标题各有自己的间距。
 */
.announce {
  position: relative;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 13px;
  margin-bottom: 20px;
}

/* 含高亮的公告：左侧竖条 + 浅底，一眼能看出"这条要读" */
.announce--strong {
  border-color: color-mix(in srgb, var(--accent) 34%, var(--border));
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 70%, var(--surface-2));
  padding-left: 13px;
}

.announce__head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--muted);
}
.announce--strong .announce__head { color: var(--accent); }
.announce__ic { display: inline-flex; align-items: center; }
.announce__label { line-height: 1; }

.announce__body { line-height: 1.75; }

/* 段：保留换行与连续空格，长链接也能断行 */
.announce__p,
.announce__h,
.announce__ul {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.announce__p + .announce__p,
.announce__p + .announce__ul,
.announce__ul + .announce__p,
.announce__h + .announce__p { margin-top: 6px; }

/* 【小标题】：括号内做前缀徽标，后面是标题正文 */
.announce__h {
  font-weight: 650;
  color: var(--ink);
  margin-top: 12px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
}
.announce__h:first-child { margin-top: 0; }
.announce__badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--primary-ink);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.6;
}
.announce--strong .announce__badge { background: var(--accent); }

/* 空行 → 留出段间距（原文本里的空行不再是"白丢一行"） */
.announce__gap { height: 8px; }

/* 列表 */
.announce__ul {
  margin: 6px 0 0;
  padding-left: 18px;
  list-style: disc;
}
.announce__ul li { margin-top: 3px; }
.announce__ul li::marker { color: var(--faint); }

/* **加粗** */
.announce__strong { font-weight: 650; color: var(--ink); }

/* !!!高亮!!!：底色块 + 内边距，是整条公告里最显眼的东西 */
.announce__hi {
  background: color-mix(in srgb, var(--warning) 18%, transparent);
  color: var(--ink);
  font-weight: 650;
  padding: 1px 5px;
  border-radius: var(--radius-sm);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* 收起按钮 */
.announce__close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  transition: background .16s var(--ease), color .16s var(--ease);
}
.announce__close:hover { background: var(--surface-3); color: var(--ink-2); }
.announce__close:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* 有关闭按钮时给标题让出右上角 */
.announce:has(.announce__close) .announce__head { padding-right: 22px; }

@media (max-width: 620px) {
  .announce { font-size: 12.5px; padding: 11px 12px; }
  .announce--strong { padding-left: 11px; }
}

/* ---------- 后台：公告编辑区 ----------
 * 语法提示 + 实时预览。管理员能当场看到换行/高亮的效果，
 * 不用保存后跑到前台才发现"怎么全挤成一行"。
 */
.announce-syntax {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.8;
}
.announce-syntax__title {
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 4px;
}
.announce-syntax ul {
  margin: 0;
  padding-left: 18px;
  list-style: disc;
}
.announce-syntax li { margin-top: 2px; }
.announce-syntax code {
  padding: 1px 5px;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  border: 1px solid var(--border);
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--ink-2);
}
.announce-preview {
  margin-top: 6px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--surface-3);
  border: 1px solid var(--border);
  /* 预览区自己也是"画布"，里面再放公告块 */
}
.announce-preview:empty { display: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 620px) {
  .container { width: calc(100% - 28px); }
  .topbar__inner { height: 52px; gap: 8px; }
  .navlink { padding: 6px 8px; font-size: 13px; white-space: nowrap; flex: none; }
  /* 导航链接多了（我的账号 / 定时抢兑 / 下单 / 站点管理）手机上放不下：
     导航区占满剩余宽度、可横向滑动，主题按钮和头像始终留在右侧 */
  .topbar__inner > nav { flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .topbar__inner > nav::-webkit-scrollbar { display: none; }
  .topbar__spacer { display: none; }
  .grid--accounts { grid-template-columns: 1fr; }
  .urow { align-items: flex-start; }
  /* 同 .acct__main：窄屏上名字后面跟着一串徽标，整块会占两三行，
     勾选框和头像再垂直居中就会掉到名字下方 */
  .urow__main { align-items: flex-start; }
  /* 窄屏上按钮组本来就独占一行、从左排起，不需要那个把它推到右边的 auto 外边距 */
  .urow__actions { width: 100%; justify-content: flex-start; margin-left: 0; }

  /* 账号头部：名字那块独占一行，按钮排成等宽网格另起一行。
     手机上按钮有 4–6 个（检查登录态 / 续费 / 手机号 / 删除 …），挤在一行会被压成
     一列一列的竖字；auto-fit 让它自己决定一行放几个，每个至少 96px。 */
  .acct-block__head { align-items: flex-start; }
  /* 窄屏上徽标会占两三行，名字那块因此很高。再让头像垂直居中的话，它会掉到名字
     下方、名字看着像凭空往右缩进了一截；顶对齐才跟名字那一行对得上。 */
  .acct__main { flex-basis: 100%; align-items: flex-start; }
  .acct__actions {
    width: 100%; display: grid; gap: 6px;
    /* 110px 刚够放下最长的那个标签（「续费幸运星授权」），常见手机宽度下正好三列 */
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  }
  .acct__actions .btn { width: 100%; }

  /* 模块卡片底栏：开了付费之后这一行可能是「需要幸运星授权」+「购买幸运星授权」，
     一行放不下就让按钮换到下一行，而不是把说明文字压成竖排 */
  .module__foot { flex-wrap: wrap; }

  /* 账号列表：每个号收成一张紧凑卡片，默认只看名字 + 状态 + 模块摘要，
     点名字或「展开」才出按钮和三张模块卡片 —— 滑动时一屏能看到好几个号 */
  .acct-block {
    margin-bottom: 10px; padding: 12px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  }
  .acct__main { cursor: pointer; }
  .acct-block:not(.is-open) .acct-block__head { padding-bottom: 0; margin-bottom: 0; border-bottom: none; }
  .acct-block:not(.is-open) .acct__actions,
  .acct-block:not(.is-open) .module-grid { display: none; }
  .acct-summary {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); cursor: pointer;
  }
  .acct-block.is-open .acct-summary { margin: 0 0 12px; padding-top: 0; border-top: none; }
  .acct-summary__chips { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
  .acct-summary__btns { flex: none; display: flex; gap: 6px; }
  /* 展开后操作区里已经有「重新登录」，摘要行这个就不重复摆了 */
  .acct-block.is-open .acct-summary__relogin { display: none; }
  .module-grid { gap: 10px; }
}

/* ---------- 下单页 ---------- */
.ord-acct { display: flex; align-items: center; gap: 8px; }
.ord-acct__label { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.ord-acct .select { min-width: 240px; }
.ord-flow { display: grid; gap: 14px; }
.ord-flow .steps { margin-bottom: 4px; }
/* 分步卡片头：左边「序号 + 标题/说明」，右边操作 */
.ord-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ord-card__titles { display: flex; gap: 10px; min-width: 0; flex: 1; }
.ord-step {
  flex: none; width: 22px; height: 22px; margin-top: -1px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 600;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--border);
}
.ord-step.is-done { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.mall-item:disabled { cursor: not-allowed; opacity: .55; }
.mall-item__name .badge { margin-left: 6px; vertical-align: 1px; }
.ord-tag { flex: none; font-size: 11px; line-height: 1.6; padding: 0 6px; border-radius: 999px; color: var(--accent); background: var(--accent-soft); }
.ord-tag--muted { color: var(--muted); background: var(--surface-2); }
/* 商品确认：左侧名称与门店，右侧大号券后价 */
.ord-product {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
}
.ord-product__ic {
  flex: none; width: 40px; height: 40px; border-radius: var(--radius);
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
}
.ord-product__body { flex: 1; min-width: 0; }
.ord-product__name { font-size: 14.5px; font-weight: 600; color: var(--ink); line-height: 1.45; }
.ord-product__meta { margin-top: 5px; display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.ord-product__price { flex: none; text-align: right; }
.ord-product__price b { display: block; font-size: 24px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1.1; }
.ord-product__price span { font-size: 11.5px; color: var(--faint); }
.ord-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
/* 支付结果：二维码 + 订单信息并排，窄屏上下排 */
.ord-paid { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.ord-paid .qr-box { flex: none; }
.ord-paid__info { flex: 1; min-width: 220px; display: grid; gap: 10px; }
.ord-paid__title { font-size: 15px; font-weight: 600; }
@media (max-width: 420px) {
  /* 很窄的手机上只留 logo，把宽度让给导航 */
  .brand__name { display: none; }
}
@media (max-width: 560px) {
  .ord-acct { width: 100%; }
  .ord-acct .select { min-width: 0; flex: 1; }
  .ord-product { flex-wrap: wrap; }
  .ord-product__price { width: 100%; text-align: left; padding-left: 54px; }
}

/* ---------- 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
