:root {
  --bg: #0a0e1a;
  --surface: #111827;
  --border: rgba(56, 189, 248, 0.16);
  --border-strong: rgba(56, 189, 248, 0.35);
  --text: #e6edf7;
  --text-dim: #8b98ad;
  --cyan: #22d3ee;
  --violet: #a78bfa;
  --danger: #f87171;
  --warn: #fbbf24;
  --green: #4ade80;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  background-image:
    radial-gradient(ellipse 60% 40% at 15% 0%, rgba(34, 211, 238, 0.08), transparent),
    radial-gradient(ellipse 50% 40% at 85% 100%, rgba(167, 139, 250, 0.07), transparent);
  background-attachment: fixed;
  min-height: 100vh;
}
.hidden { display: none !important; }

/* ---------- 登录 ---------- */
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.login-card {
  width: 340px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 36px 28px; text-align: center;
}
.login-card h1 { font-size: 18px; font-weight: 600; margin: 14px 0 2px; }
.login-card .sub { color: var(--text-dim); font-size: 12px; margin-bottom: 22px; }
.login-card input {
  width: 100%; padding: 11px 14px; margin-bottom: 12px; border-radius: 10px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.04); color: var(--text); font-size: 14px;
}
.login-card input:focus { outline: none; border-color: var(--border-strong); }
.login-card .hint { color: var(--text-dim); font-size: 11px; margin-top: 16px; }

.logo-mark {
  width: 52px; height: 52px; margin: 0 auto; border-radius: 14px;
  background: linear-gradient(135deg, #0e7490, #6d28d9);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px; color: #fff; letter-spacing: 1px;
}
.logo-mark.sm { width: 38px; height: 38px; font-size: 14px; border-radius: 10px; margin: 0; }

/* ---------- 顶栏 ---------- */
.topbar { border-bottom: 1px solid var(--border); background: rgba(10, 14, 26, 0.85); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 20; }
.topbar-inner { max-width: 1280px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand h1 { font-size: 16px; font-weight: 600; }
.brand .sub { font-size: 11px; color: var(--text-dim); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.tabs { display: flex; gap: 4px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 12px; padding: 4px; }
.tab {
  border: none; background: transparent; color: var(--text-dim); font-size: 13px;
  padding: 7px 18px; border-radius: 9px; cursor: pointer; transition: all .15s;
}
.tab.on { background: linear-gradient(135deg, #0891b2, #7c3aed); color: #fff; font-weight: 500; }

/* ---------- 按钮 ---------- */
.btn {
  border: 1px solid var(--border); background: rgba(255,255,255,0.03); color: var(--text);
  padding: 8px 16px; border-radius: 10px; font-size: 13px; cursor: pointer; transition: all .15s;
}
.btn:hover { border-color: var(--border-strong); }
.btn.primary { background: linear-gradient(135deg, #0891b2, #7c3aed); border: none; color: #fff; font-weight: 500; }
.btn.primary:hover { filter: brightness(1.1); }
/* 新增媒体：红色渐变（与新增达人同构） */
.btn.media { background: linear-gradient(135deg, #ef4444, #b91c1c); border: none; color: #fff; font-weight: 500; }
.btn.media:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 5px 12px; font-size: 12px; }
.btn.block { width: 100%; }
.btn.danger { color: var(--danger); border-color: rgba(248,113,113,0.35); }
.icon-btn { border: none; background: transparent; color: var(--text-dim); font-size: 22px; cursor: pointer; line-height: 1; padding: 4px 8px; }

/* ---------- 工具栏 ---------- */
.toolbar { max-width: 1280px; margin: 0 auto; padding: 16px 20px 4px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toolbar input[type="search"] {
  flex: 1 1 200px; padding: 9px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.04); color: var(--text); font-size: 13px;
}
.toolbar input:focus, .toolbar select:focus { outline: none; border-color: var(--border-strong); }
.toolbar select {
  padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 13px;
}
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 5px 13px; border-radius: 999px; font-size: 12px; cursor: pointer;
  border: 1px solid var(--border); color: var(--text-dim); background: transparent; transition: all .15s;
}
.chip.on { background: rgba(34, 211, 238, 0.14); border-color: var(--border-strong); color: var(--cyan); }

/* ---------- 选择栏 ---------- */
.select-bar {
  max-width: 1280px; margin: 8px auto 0; padding: 10px 20px;
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(34, 211, 238, 0.07); border: 1px solid var(--border);
  border-radius: 12px; font-size: 13px;
}

/* ---------- 网格卡片 ---------- */
.grid {
  max-width: 1280px; margin: 0 auto; padding: 16px 20px 60px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px;
}
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; cursor: pointer; transition: transform .15s, border-color .15s;
}
.card:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.card input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--cyan); cursor: pointer; flex-shrink: 0; }
.card-title { flex: 1; min-width: 0; }
.card-title h3 { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.card-title span { font-size: 11px; color: var(--text-dim); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-intro { color: var(--text-dim); font-size: 12px; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.plat-row { display: flex; gap: 6px; flex-wrap: wrap; }
.pf { font-size: 11px; padding: 3px 9px; border-radius: 6px; background: rgba(124, 58, 237, 0.16); color: #c4b5fd; display: inline-flex; align-items: center; gap: 3px; }
.pf b { color: #fff; font-weight: 600; margin-left: 4px; }
.card-foot { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border); }
.total { font-size: 20px; font-weight: 700; color: var(--cyan); font-family: ui-monospace, monospace; }
.total small { font-size: 11px; font-weight: 400; color: var(--text-dim); margin-left: 4px; }
.card-foot .meta { font-size: 11px; color: var(--text-dim); }
.card-foot .meta.warn { color: var(--warn); }
.empty { text-align: center; color: var(--text-dim); padding: 80px 20px; }

/* 性别 / 状态徽标 */
.gx { font-size: 10px; padding: 1px 7px; border-radius: 999px; font-weight: 500; }
.gx.m { background: rgba(56,189,248,0.15); color: #7dd3fc; }
.gx.f { background: rgba(244,114,182,0.15); color: #f9a8d4; }
.st { font-size: 11px; padding: 2px 9px; border-radius: 999px; font-weight: 500; white-space: nowrap; }
.st.ok { background: rgba(74,222,128,0.14); color: var(--green); }
.st.out { background: rgba(248,113,113,0.14); color: var(--danger); }
.st.sub { background: rgba(251,191,36,0.14); color: var(--warn); }

/* ---------- 弹窗遮罩 ---------- */
.drawer-mask, .modal-mask { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); z-index: 40; backdrop-filter: blur(3px); }

/* ---------- 达人详情（居中弹窗 + 左右悬浮导航） ---------- */
#detailMask { display: flex; align-items: center; justify-content: center; gap: 16px; }
.detail-modal { position: static; transform: none; width: min(640px, calc(100vw - 180px)); padding: 0; }
.nav-arrow {
  width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%;
  border: 1px solid var(--border-strong); background: rgba(17, 24, 39, 0.92);
  color: var(--text); font-size: 24px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding-bottom: 3px;
  transition: all .15s;
}
.nav-arrow:hover { background: linear-gradient(135deg, #0891b2, #7c3aed); color: #fff; border-color: transparent; }
.nav-arrow:disabled { opacity: 0.3; cursor: not-allowed; }
.nav-arrow:disabled:hover { background: rgba(17, 24, 39, 0.92); color: var(--text); border-color: var(--border-strong); }
.detail-head {
  position: sticky; top: 0; background: var(--surface); z-index: 2;
  padding: 20px 24px 12px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
}
.detail-title h3 { font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.detail-title .sub { color: var(--text-dim); font-size: 12px; }
.detail-pos { color: var(--cyan); font-family: ui-monospace, monospace; }
.detail-body { padding: 16px 24px 24px; }
#honorsEdit textarea {
  width: 100%; min-height: 80px; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.04);
  color: var(--text); font-size: 13px; font-family: inherit; resize: vertical;
}
#honorsEdit textarea:focus { outline: none; border-color: var(--border-strong); }
.info-line { color: var(--text-dim); font-size: 13px; margin: 2px 0; }
.info-line b { color: var(--text); font-weight: 500; }
.section-t {
  font-size: 12px; color: var(--cyan); letter-spacing: 2px; margin: 20px 0 10px;
  display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap;
}
/* 账号紧凑列表：一行 2 个，同平台就近聚合（app.js 按平台名排序） */
.acc-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 8px; }
.acc-row {
  display: flex; align-items: center; gap: 7px; padding: 7px 10px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.03);
  border-radius: 10px; font-size: 13px; min-width: 0; flex-wrap: wrap; row-gap: 4px;
}
/* 2 列网格下隐藏简介（保留 title 悬浮查看），避免挤压账号名/粉丝数 */
.acc-list .acc-intro { display: none; }
.acc-row .fans-input, .acc-row .add-platform, .acc-row .add-name, .acc-row .add-fans { padding: 4px 8px; border-radius: 8px; border: 1px solid var(--border-strong); background: rgba(255,255,255,0.06); color: var(--text); font-size: 13px; font-family: inherit; }
.acc-row .add-name { flex: 1; min-width: 80px; }
.acc-row .add-fans { width: 84px; }
.acc-row.add-form { background: rgba(34,211,238,0.06); border-color: var(--border-strong); }
.acc-pf { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; padding: 2px 8px; border-radius: 6px; flex-shrink: 0; font-weight: 500; }
.acc-pf svg, .pf svg { width: 12px; height: 12px; flex-shrink: 0; }
.acc-name { max-width: 52%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.acc-intro { flex: 1; min-width: 0; color: var(--text-dim); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-fans { font-family: ui-monospace, monospace; color: var(--cyan); font-weight: 600; flex-shrink: 0; margin-left: auto; }
.acc-row .ops { display: flex; gap: 2px; flex-shrink: 0; }
.acc-row .ops button { border: none; background: transparent; color: var(--text-dim); cursor: pointer; font-size: 12px; padding: 2px 4px; }
.acc-row .ops button:hover { color: var(--cyan); }
.drawer-btns { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.drawer-btns .btn { flex: 1; min-width: 130px; }

/* 详情内海报预览 */
.poster-preview {
  display: flex; gap: 14px; margin-top: 10px; align-items: flex-start;
  background: rgba(255,255,255,0.02); border: 1px solid var(--border); border-radius: 12px; padding: 14px;
}
#miniPoster { width: 150px; border-radius: 10px; border: 1px solid var(--border); flex-shrink: 0; }
.poster-preview .p-info { font-size: 12px; color: var(--text-dim); }
.poster-preview .p-info b { color: var(--text); }
.poster-preview .p-info p { margin: 4px 0; }

/* ---------- 弹窗 ---------- */
.modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(600px, calc(100vw - 32px)); max-height: 88vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  padding: 24px; z-index: 60;
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin: -24px -24px 16px; padding: 18px 24px; border-bottom: 1px solid var(--border); }
/* 吸顶变体：仅用于内容很长的详情弹窗（活动详情），表单弹窗不吸顶避免滚动时文字被头部切割 */
.modal-head.stay { position: sticky; top: 0; background: var(--surface); z-index: 5; }
.modal-head h3 { font-size: 15px; font-weight: 600; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 4px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: rgba(255,255,255,0.04); color: var(--text); font-size: 13px; font-family: inherit;
}
.field textarea { resize: vertical; min-height: 56px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--border-strong); }
.btn-row { display: flex; gap: 10px; margin-top: 18px; }
.btn-row .btn { flex: 1; }
.check-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-dim); margin: 12px 0; }
.check-line input { accent-color: var(--cyan); }
/* 多选职务勾选（按 党支部/协会/工会/妇联 分组） */
.chk-blocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(122px, 1fr)); gap: 4px 6px; margin-top: 4px; }
.chk-cat { grid-column: 1 / -1; font-size: 12px; color: var(--cyan); letter-spacing: 1px; margin-top: 8px; }
.chk-cat:first-child { margin-top: 0; }
.chk { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); cursor: pointer; padding: 4px 8px; border: 1px solid transparent; border-radius: 8px; }
.chk:hover { background: rgba(34, 211, 238, 0.06); border-color: var(--border); }
.chk input { width: 16px; height: 16px; accent-color: var(--cyan); flex-shrink: 0; }
/* 活动多县区多选 */
.chk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 4px 10px; margin-top: 2px; }
/* 批量添加预览表格 */
.bulk-hint { font-size: 12px; color: var(--text-dim); margin: 6px 0 8px; line-height: 1.6; }
.bulk-hint code { background: rgba(255,255,255,.06); padding: 1px 6px; border-radius: 5px; }
.bulk-ta { width: 100%; min-height: 110px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: rgba(255,255,255,.04); color: var(--text); font-size: 13px; font-family: inherit; resize: vertical; line-height: 1.7; }
.bulk-ta:focus { outline: none; border-color: var(--border-strong); }
.bulk-head-info { display: flex; justify-content: space-between; align-items: center; margin: 10px 0 6px; }
.bulk-wrap { max-height: 46vh; overflow: auto; border: 1px solid var(--border); border-radius: 10px; padding: 0 10px; margin-top: 2px; }
.bulk-row { display: grid; grid-template-columns: 20px 1.2fr 58px 1.15fr 92px 1.9fr 84px; gap: 6px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); }
.bulk-row.head { position: sticky; top: 0; background: var(--surface); font-size: 12px; color: var(--text-dim); border-bottom: 1px solid var(--border-strong); z-index: 2; }
.bulk-row input { width: 100%; padding: 6px 7px; border-radius: 8px; border: 1px solid var(--border); background: rgba(255,255,255,.04); color: var(--text); font-size: 12px; font-family: inherit; }
.bulk-row select { width: 100%; padding: 6px 4px; border-radius: 8px; border: 1px solid var(--border); background: rgba(255,255,255,.04); color: var(--text); font-size: 12px; }
.bulk-row.bad { background: rgba(248,113,113,.10); }
.bchip { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; justify-self: start; }
.bchip.add { color: var(--green); background: rgba(74,222,128,.12); }
.bchip.upd { color: var(--warn); background: rgba(251,191,36,.12); }
.bchip.bad { color: var(--danger); background: rgba(248,113,113,.12); }
.bulk-diff { grid-column: 1 / -1; font-size: 11px; color: var(--warn); padding: 0 0 5px 26px; opacity: .85; }
@media (max-width: 720px) { .bulk-row { grid-template-columns: 20px 1.3fr 58px 1.2fr; } .bulk-row .c-region, .bulk-row .c-intro, .bulk-row .bchip { display: none; } }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
/* 职务彩色胶囊徽标 */
.title-chips { margin: 2px 0 8px; line-height: 1.7; }
.title-chip { display: inline-block; font-size: 11px; padding: 1px 9px; border-radius: 999px; border: 1px solid; margin: 2px 5px 2px 0; font-weight: 600; line-height: 1.6; white-space: nowrap; }

/* 人员勾选列表 */
.pick-list {
  max-height: 260px; overflow-y: auto; border: 1px solid var(--border);
  border-radius: 12px; margin-top: 8px;
}
.pick-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 14px;
  border-bottom: 1px solid var(--border); cursor: pointer; font-size: 13px;
}
.pick-item:last-child { border-bottom: none; }
.pick-item:hover { background: rgba(34,211,238,0.05); }
.pick-item input { accent-color: var(--cyan); width: 16px; height: 16px; }
.pick-item .who { flex: 1; min-width: 0; }
.pick-item .who span { color: var(--text-dim); font-size: 11px; margin-left: 6px; }
.pick-item.dim { opacity: 0.45; }

/* 活动卡片 */
.act-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.act-head h3 { font-size: 15px; font-weight: 600; }
.act-date { font-size: 12px; color: var(--cyan); font-family: ui-monospace, monospace; }
.act-meta { font-size: 12px; color: var(--text-dim); margin-bottom: 10px; }
.part-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.part-chip { font-size: 12px; padding: 4px 10px; border-radius: 8px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); display: inline-flex; align-items: center; gap: 6px; }
.act-foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; row-gap: 6px; column-gap: 12px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border); font-size: 12px; color: var(--text-dim); }
.act-foot .hint-r { margin-left: auto; white-space: nowrap; }

/* 参会人行 */
.mrow {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: 12px; margin-bottom: 8px; background: rgba(255,255,255,0.03);
}
.mrow .who { flex: 1; min-width: 0; }
.mrow .who p { font-size: 13px; display: flex; align-items: center; gap: 6px; }
.mrow .who span { font-size: 11px; color: var(--text-dim); }
.mrow .ops { display: flex; gap: 6px; flex-shrink: 0; }
.mrow.out-row { opacity: 0.75; border-style: dashed; }

/* ---------- 统计 ---------- */
.stat-cards { max-width: 1280px; margin: 16px auto 0; padding: 0 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; }
.stat-card .n { font-size: 30px; font-weight: 700; font-family: ui-monospace, monospace; background: linear-gradient(135deg, #22d3ee, #a78bfa); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-card .l { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.panel { max-width: 1280px; margin: 16px auto 60px; padding: 0 20px; }
.panel-inner { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px 24px; }
.section-t2 { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-size: 14px; font-weight: 600; }
.section-t2 select { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 12px; }
.rank-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rank-table th { text-align: left; color: var(--text-dim); font-weight: 500; font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.rank-table td { padding: 10px; border-bottom: 1px solid var(--border); }
.rank-table tr:last-child td { border-bottom: none; }
.rank-num { font-family: ui-monospace, monospace; font-weight: 700; color: var(--text-dim); width: 40px; }
.rank-num.top { color: var(--cyan); }
.rate-bar { background: rgba(255,255,255,0.06); border-radius: 999px; height: 6px; width: 90px; overflow: hidden; display: inline-block; vertical-align: middle; margin-right: 8px; }
.rate-bar i { display: block; height: 100%; background: linear-gradient(90deg, #22d3ee, #a78bfa); border-radius: 999px; }
.rate-num { font-family: ui-monospace, monospace; color: var(--cyan); }

/* ---------- 海报弹窗 ---------- */
.poster-modal { width: min(420px, calc(100vw - 32px)); }
#posterCanvas { width: 100%; border-radius: 14px; border: 1px solid var(--border); display: block; }

/* 活动类型标识 */
.type-badge { font-size: 11px; padding: 2px 9px; border-radius: 999px; font-weight: 500; vertical-align: middle; }
.type-badge.free { background: rgba(74,222,128,0.14); color: var(--green); }
.type-badge.pay { background: rgba(251,191,36,0.16); color: var(--warn); }
.type-badge.paid-done { background: rgba(74,222,128,0.16); color: var(--green); }
.type-badge.paid-undo { background: rgba(248,113,113,0.16); color: var(--danger); }
.fee-btn { font-family: ui-monospace, monospace; flex-shrink: 0; }
.fee-btn.has-fee { color: var(--warn); border-color: rgba(251,191,36,0.4); }
.fee-input { width: 90px; padding: 3px 8px; border-radius: 8px; border: 1px solid var(--border-strong); background: rgba(255,255,255,0.06); color: var(--text); font-family: ui-monospace, monospace; font-size: 13px; }
.logout-btn { margin-left: 6px; }

/* toast */
.toast {
  position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%);
  background: #1e293b; border: 1px solid var(--border-strong); color: var(--text);
  padding: 10px 22px; border-radius: 999px; font-size: 13px; z-index: 99;
}

/* 懒加载提示 */
.load-more { text-align: center; color: var(--text-dim); font-size: 12px; padding: 14px 0 4px; }

/* ---------- 移动端 ---------- */
@media (max-width: 820px) {
  #detailMask { gap: 0; }
  .detail-modal { width: calc(100vw - 32px); }
  .nav-arrow { position: absolute; z-index: 70; background: rgba(17, 24, 39, 0.85); }
  .nav-arrow.left { left: 8px; }
  .nav-arrow.right { right: 8px; }
}
@media (max-width: 720px) {
  /* 关键：backdrop-filter 会让内部 position:fixed 相对顶栏定位（Tab 被钉在顶部遮挡内容），手机端必须去掉 */
  .topbar { backdrop-filter: none; background: rgba(10, 14, 26, 0.97); }
  /* 顶栏：品牌 + 退出 一行；操作按钮按视图单行横向滚动 */
  .topbar-inner { padding: 10px 14px; row-gap: 8px; }
  .brand { order: 1; flex: 1; min-width: 0; }
  .logout-btn { order: 2; }
  .actions { order: 3; width: 100%; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .actions::-webkit-scrollbar { display: none; }
  .actions .btn { white-space: nowrap; flex: 0 0 auto; padding: 7px 10px; font-size: 12px; }
  .actions #addBtn, .actions #addMediaTopBtn { order: -1; }
  /* 主导航固定底部（拇指可达） */
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; order: 5;
          width: 100%; border-radius: 0; border-left: none; border-right: none; border-bottom: none;
          padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
          background: rgba(10, 14, 26, 0.97); backdrop-filter: blur(12px);
          box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.35); }
  .tab { flex: 1; padding: 10px 0; font-size: 13px; }
  .toolbar { padding: 12px 14px 2px; }
  .grid { grid-template-columns: 1fr; padding: 12px 14px calc(92px + env(safe-area-inset-bottom)); }
  .detail-body { padding: 14px 16px 20px; }
  .detail-head { padding: 16px 16px 10px; }
  .form-grid { grid-template-columns: 1fr; }
  .brand > div .sub { display: none; }
  .poster-preview { flex-direction: column; }
  #miniPoster { width: 180px; margin: 0 auto; }
  .acc-list { gap: 6px; }
  .acc-intro { display: none; }
  .acc-name { max-width: none; flex: 1; }
  .rank-table th:nth-child(4), .rank-table td:nth-child(4) { display: none; }
  /* 通用弹窗近全屏（表单/批量/活动详情），确认与海报弹窗保持居中 */
  #modal { top: 0; left: 0; transform: none; width: 100vw; max-width: 100vw;
           height: 100vh; height: 100dvh; max-height: 100dvh; border-radius: 0; border-left: none; border-right: none;
           padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .modal-head { padding: 14px 16px; }
  #modal .btn-row { position: sticky; bottom: 0; background: var(--surface); margin: 12px -24px calc(-24px - env(safe-area-inset-bottom)); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); }
}
