/* ============================================================
   Reddit Poster - design system
   ============================================================ */
:root {
  color-scheme: dark;
  --bg: #08080f;
  --bg-glow-1: rgba(99, 102, 241, 0.18);
  --bg-glow-2: rgba(168, 85, 247, 0.12);
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --surface-solid: #12121c;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #ececf5;
  --muted: #9a9ab2;
  --muted-2: #6f6f88;
  --primary: #6366f1;
  --primary-2: #a855f7;
  --primary-soft: rgba(99, 102, 241, 0.14);
  --success: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 18px 45px -20px rgba(0, 0, 0, 0.9);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f6fb;
  --bg-glow-1: rgba(99, 102, 241, 0.14);
  --bg-glow-2: rgba(168, 85, 247, 0.1);
  --surface: rgba(255, 255, 255, 0.85);
  --surface-2: rgba(15, 15, 35, 0.04);
  --surface-solid: #ffffff;
  --border: rgba(15, 15, 40, 0.1);
  --border-strong: rgba(15, 15, 40, 0.18);
  --text: #16162a;
  --muted: #5d5d78;
  --muted-2: #8b8ba6;
  --primary-soft: rgba(99, 102, 241, 0.12);
  --shadow: 0 18px 45px -24px rgba(20, 20, 60, 0.35);
}

* { box-sizing: border-box; }

/* hidden 属性必须能盖过 .app / .auth-wrap 的 display 设置 */
[hidden] { display: none !important; }

html, body { height: 100%; }

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

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 500px at 12% -8%, var(--bg-glow-1), transparent 70%),
    radial-gradient(800px 500px at 96% 4%, var(--bg-glow-2), transparent 72%);
  z-index: 0;
}

a { color: inherit; }

/* ---------- layout ---------- */
.app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px 16px;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), transparent 65%);
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 11px;
  background: linear-gradient(140deg, var(--primary), var(--primary-2));
  display: grid; place-items: center;
  font-weight: 800; font-size: 15px; color: #fff;
  box-shadow: 0 8px 22px -10px var(--primary);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 14.5px; letter-spacing: 0.2px; }
.brand-text span { font-size: 11px; color: var(--muted-2); }

.nav { display: flex; flex-direction: column; gap: 3px; }
.nav-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted-2); padding: 6px 10px 2px; }
/* 一级分组可折叠：点标题展开下面的二级导航。外框跟侧边栏「可用积分」那张卡一模一样 */
.nav-toggle {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 11px; margin: 0; cursor: pointer; font: inherit;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.01em; color: var(--muted);
  text-align: left;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); backdrop-filter: blur(10px);
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}
.nav-toggle:hover { background: var(--surface-2); border-color: var(--border-strong); color: var(--text); }
.nav-toggle:focus-visible { border-color: rgba(99, 102, 241, 0.45); outline: none; }
.nav-toggle .chev {
  flex: none; width: 14px; height: 14px; opacity: 0.62;
  transition: transform 0.18s ease, opacity 0.14s ease;
}
.nav-toggle.open .chev { transform: rotate(90deg); }
/* 当前页就在这组里：标题一起亮，收起时也能看出自己在哪一块 */
.nav-toggle.has-active { color: var(--text); border-color: rgba(99, 102, 241, 0.32); }
.nav-toggle.has-active .chev { opacity: 1; }
.nav-sub {
  display: flex; flex-direction: column; gap: 2px;
  margin: 6px 0 6px 18px; padding-left: 9px; border-left: 1px solid var(--border);
}
.nav-sub[hidden] { display: none; }
.nav-sub a { padding: 8px 10px; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: var(--radius-sm);
  color: var(--muted); text-decoration: none; font-weight: 500;
  border: 1px solid transparent; transition: all 0.14s ease;
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active {
  background: var(--primary-soft); color: var(--text);
  border-color: rgba(99, 102, 241, 0.35);
}
.nav a .ico { width: 17px; text-align: center; font-size: 14px; opacity: 0.9; }
.nav a .pill {
  margin-left: auto; font-size: 10.5px; padding: 1px 7px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted);
}

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }

.main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 26px; border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
}
.topbar h1 { font-size: 17px; margin: 0; font-weight: 650; letter-spacing: 0.2px; }
.topbar .sub { color: var(--muted-2); font-size: 12px; margin-top: 1px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.content { padding: 24px 26px 60px; max-width: 1240px; width: 100%; }

/* ---------- primitives ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.card.tight { padding: 14px; }
.card-title { display: flex; align-items: center; gap: 8px; font-weight: 650; margin: 0 0 4px; font-size: 14.5px; }
.card-desc { color: var(--muted-2); font-size: 12.5px; margin: 0 0 14px; }

.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* 发帖 / 评论 / 充值：主栏 + 侧栏两列。以前这两列写在内联样式里，媒体查询盖不住，窄屏就被挤爆 */
.split-edit { grid-template-columns: minmax(0, 1.6fr) minmax(290px, 0.85fr); align-items: start; }
.split-topup { grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr); align-items: start; }
.sticky-col { position: sticky; top: 78px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 15px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text);
  font-family: inherit; font-size: 13px; font-weight: 550; transition: all 0.14s ease;
  white-space: nowrap;
}
.btn:hover { border-color: var(--primary); background: var(--primary-soft); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary {
  background: linear-gradient(140deg, var(--primary), var(--primary-2));
  border-color: transparent; color: #fff;
  box-shadow: 0 10px 24px -14px var(--primary);
}
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.danger:hover { border-color: var(--danger); background: rgba(239, 68, 68, 0.12); color: #fff; }
.btn.sm { padding: 6px 11px; font-size: 12px; border-radius: 9px; }
.btn.icon { padding: 8px; width: 34px; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { font-size: 12.5px; color: var(--muted); font-weight: 550; }
.field .hint { font-size: 11.5px; color: var(--muted-2); }
.field .hint.warn { color: var(--danger); }
/* 发布时段选了过去的时间：提示条标红（scheduleCard 渲染的 #xxx-slot-hint） */
[id$="-slot-hint"].warn { color: var(--danger); font-weight: 600; }
/* 正文工具栏：按钮改的是编辑区里的 DOM，提交前再同步成 Markdown */
.rich { display: flex; flex-direction: column; min-width: 0; }
.rich-bar {
  display: flex; align-items: center; gap: 2px;
  padding: 4px 6px; background: var(--surface-2);
  border: 1px solid var(--border); border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.rich-btn {
  width: 26px; height: 24px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0; font-family: inherit; font-size: 12.5px; line-height: 1;
  color: var(--muted); background: none; border: 1px solid transparent; border-radius: 6px;
  cursor: pointer; transition: color 0.14s ease, background 0.14s ease;
}
.rich-btn:hover { color: var(--text); background: var(--border); }
.rich-btn[data-md="bold"] { font-weight: 750; }
.rich-btn[data-md="italic"] { font-family: Georgia, "Times New Roman", serif; font-size: 14px; font-style: italic; }
.rich-btn svg { width: 15px; height: 15px; }
.rich-sep { width: 1px; height: 15px; margin: 0 4px; background: var(--border); }
/* 正文编辑区：所见即所得，正文里的链接直接点得动 */
.rich-input {
  position: relative;
  min-height: 118px; max-height: 460px; overflow-y: auto;
  padding: 9px 11px; font-size: 13px; line-height: 1.65;
  white-space: pre-wrap; word-break: break-word;
  color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  outline: none; transition: border 0.14s ease;
}
.rich-input:focus { border-color: var(--primary); background: var(--surface); }
.rich-input b, .rich-input strong { font-weight: 700; }
.rich-input i, .rich-input em { font-style: italic; }
.rich-input a { color: var(--primary); text-decoration: underline; cursor: pointer; }
.rich-input ul, .rich-input ol { margin: 0; padding-left: 22px; }
/* 占位符：空的时候盖在编辑区上，进英文界面时由词表替换 */
.rich-wrap { position: relative; display: flex; flex-direction: column; min-width: 0; }
.rich-ph {
  position: absolute; top: 9px; left: 11px; right: 11px;
  color: var(--muted-2); font-size: 13px; line-height: 1.65; pointer-events: none;
}
.req { color: var(--danger); margin-left: 2px; }

input, select, textarea {
  width: 100%; padding: 9px 11px; font-family: inherit; font-size: 13px;
  color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 10px; outline: none; transition: border 0.14s ease;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); background-color: var(--surface); }
textarea { resize: vertical; min-height: 110px; line-height: 1.6; }
input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: 0.75; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
select option { background-color: var(--surface-solid); color: var(--text); }

.checkbox { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); cursor: pointer; }
.checkbox input { width: 15px; height: 15px; accent-color: var(--primary); }

.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2.5px 9px;
  border-radius: 999px; font-size: 11.5px; font-weight: 600;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--muted);
  /* 表里列窄，不加这条「评论 / 失败」会被挤成上下两行 */
  white-space: nowrap;
}
.badge.ok { color: var(--success); border-color: rgba(34, 197, 94, 0.35); background: rgba(34, 197, 94, 0.1); }
.badge.warn { color: var(--warn); border-color: rgba(245, 158, 11, 0.35); background: rgba(245, 158, 11, 0.1); }
.badge.err { color: var(--danger); border-color: rgba(239, 68, 68, 0.35); background: rgba(239, 68, 68, 0.1); }
.badge.info { color: #7dd3fc; border-color: rgba(125, 211, 252, 0.3); background: rgba(125, 211, 252, 0.09); }
.badge.brand { color: #c4b5fd; border-color: rgba(168, 85, 247, 0.35); background: rgba(168, 85, 247, 0.12); }

.stat { display: flex; flex-direction: column; gap: 2px; }
.stat .k { font-size: 11.5px; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.07em; }
.stat .v { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; }
.stat .d { font-size: 11.5px; color: var(--muted-2); }
/* 可用积分卡：右侧一个充值入口图标（原来那行账号信息已去掉） */
.side-credit { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.side-topup {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 999px; color: var(--muted);
  border: 1px solid var(--border-strong); background: var(--surface-2);
  transition: color 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}
.side-topup:hover { color: var(--text); border-color: var(--primary); }
.side-topup.active { color: var(--text); border-color: rgba(99, 102, 241, 0.45); background: var(--primary-soft); }
.side-topup:focus-visible { outline: none; border-color: rgba(99, 102, 241, 0.6); }

/* 左下角的管理后台入口（只有管理员看得到，随导航一起标选中态） */
.side-admin {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: 10px; text-decoration: none;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); font-size: 13px; font-weight: 550;
  transition: color 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}
.side-admin .ico { font-size: 14px; opacity: 0.9; }
.side-admin:hover { color: var(--text); border-color: var(--primary); }
.side-admin.active { color: var(--text); border-color: rgba(99, 102, 241, 0.45); background: var(--primary-soft); }
.side-admin:focus-visible { outline: none; border-color: rgba(99, 102, 241, 0.6); }

.kv { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 7px 14px; font-size: 12.5px; }
.kv dt { color: var(--muted-2); }
.kv dd { margin: 0; overflow-wrap: anywhere; }

table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th {
  text-align: left; color: var(--muted-2); font-weight: 600; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: 0.06em; padding: 9px 12px;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr { cursor: pointer; transition: background 0.12s ease; }
tbody tr:hover { background: var(--surface-2); }
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
.cell-title { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.cell-muted { color: var(--muted-2); }
.mono { font-family: var(--mono); font-size: 12px; }

.tabs { display: inline-flex; gap: 3px; padding: 3px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); }
.tabs button {
  border: 0; background: transparent; color: var(--muted); font-family: inherit;
  font-size: 12.5px; font-weight: 550; padding: 6px 13px; border-radius: 8px; cursor: pointer;
}
.tabs button.active { background: var(--surface-solid); color: var(--text); box-shadow: var(--shadow); }

.subtabs { display: flex; gap: 16px; border-bottom: 1px solid var(--border); }
.subtabs button {
  border: 0; background: transparent; color: var(--muted); font-family: inherit; font-size: 13px;
  font-weight: 550; padding: 0 0 10px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.subtabs button.active { color: var(--text); border-bottom-color: var(--primary); }

/* 社区标签：二级导航栏式的标签条（发帖页「1 · 目标社区」内） */
.flair-nav { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.flair-title { font-size: 12.5px; color: var(--muted); font-weight: 550; }
.flair-nav .hint { font-size: 11.5px; color: var(--muted-2); }
.flair-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--border); }
.flair-tab {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: transparent; color: var(--muted); font-family: inherit;
  font-size: 12.5px; font-weight: 550; padding: 8px 11px 9px; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color 0.14s ease;
}
.flair-tab:hover { color: var(--text); }
.flair-tab.active { color: var(--text); border-bottom-color: var(--primary); }
.flair-dot { width: 9px; height: 9px; border-radius: 999px; flex: 0 0 auto; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.28); }

/* 选用社区后候选列表折叠起来，只剩这行摘要 */
.chosen-sub {
  align-items: center; margin-top: 12px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2);
}
.chosen-name { font-weight: 600; font-size: 13.5px; }
.chosen-meta { margin-left: 8px; font-size: 11.5px; color: var(--muted-2); }

.empty { text-align: center; padding: 40px 20px; color: var(--muted-2); }
.empty .big { font-size: 26px; margin-bottom: 8px; opacity: 0.7; }

.skeleton {
  border-radius: 8px; height: 14px;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface) 50%, var(--surface-2) 75%);
  background-size: 200% 100%; animation: shimmer 1.3s infinite linear;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25); border-top-color: #fff;
  animation: spin 0.7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

pre.json {
  margin: 0; padding: 14px; border-radius: var(--radius-sm); font-family: var(--mono);
  font-size: 11.5px; line-height: 1.6; background: rgba(0, 0, 0, 0.32);
  border: 1px solid var(--border); max-height: 380px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere;
}
[data-theme="light"] pre.json { background: rgba(15, 15, 40, 0.05); }

.alert { border-radius: var(--radius-sm); padding: 11px 13px; font-size: 12.5px; border: 1px solid var(--border); background: var(--surface-2); }
.alert.err { border-color: rgba(239, 68, 68, 0.4); background: rgba(239, 68, 68, 0.1); color: #fca5a5; }
.alert.ok { border-color: rgba(34, 197, 94, 0.4); background: rgba(34, 197, 94, 0.1); color: #86efac; }
.alert.warn { border-color: rgba(245, 158, 11, 0.4); background: rgba(245, 158, 11, 0.1); color: #fcd34d; }

/* ---------- subreddit result ---------- */
.sub-card { display: flex; flex-direction: column; gap: 9px; cursor: pointer; text-decoration: none; transition: transform 0.14s ease, border-color 0.14s ease; }
.sub-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.sub-head { display: flex; align-items: flex-start; gap: 10px; }
.sub-name { font-weight: 650; font-size: 14px; }
.sub-desc { color: var(--muted); font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.score-ring {
  margin-left: auto; min-width: 46px; text-align: center; font-weight: 750; font-size: 15px;
  padding: 4px 8px; border-radius: 10px; border: 1px solid var(--border);
}
.score-ring.hi { color: var(--success); border-color: rgba(34, 197, 94, 0.4); background: rgba(34, 197, 94, 0.1); }
.score-ring.mid { color: var(--warn); border-color: rgba(245, 158, 11, 0.4); background: rgba(245, 158, 11, 0.1); }
.score-ring.lo { color: var(--muted); }

/* ---------- modal / drawer / toast ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(4, 4, 10, 0.6); backdrop-filter: blur(3px);
  display: flex; justify-content: flex-end; z-index: 50; animation: fade 0.15s ease;
}
.overlay.center { justify-content: center; align-items: center; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.drawer {
  width: min(720px, 94vw); height: 100%; overflow-y: auto;
  background: var(--surface-solid); border-left: 1px solid var(--border);
  padding: 22px 24px 60px; animation: slide 0.18s ease;
}
.modal {
  width: min(560px, 92vw); background: var(--surface-solid); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); animation: pop 0.16s ease;
}
@keyframes slide { from { transform: translateX(24px); opacity: 0.4; } to { transform: none; opacity: 1; } }
@keyframes pop { from { transform: scale(0.97); opacity: 0.4; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }

.toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 9px; z-index: 80; }
.toast {
  min-width: 240px; max-width: 420px; padding: 11px 14px; border-radius: var(--radius-sm);
  background: var(--surface-solid); border: 1px solid var(--border-strong); box-shadow: var(--shadow);
  font-size: 12.5px; animation: pop 0.16s ease; overflow-wrap: anywhere;
}
.toast.ok { border-left: 3px solid var(--success); }
.toast.err { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--primary); }

/* ---------- misc ---------- */
.link { color: #a5b4fc; text-decoration: none; border-bottom: 1px dashed rgba(165, 180, 252, 0.4); }
.link:hover { color: #c7d2fe; }
.nowrap { white-space: nowrap; }
.steps { display: flex; gap: 8px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.step .n {
  width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border); font-size: 11px; font-weight: 700;
}
.step.done .n { background: rgba(34, 197, 94, 0.15); border-color: rgba(34, 197, 94, 0.4); color: var(--success); }
.step.active .n { background: var(--primary-soft); border-color: rgba(99, 102, 241, 0.5); color: #c7d2fe; }

.banner {
  display: flex; gap: 12px; align-items: center; padding: 12px 15px; border-radius: var(--radius);
  border: 1px dashed var(--border-strong); background: var(--surface); font-size: 12.5px; color: var(--muted);
}

.theme-toggle { background: transparent; border: 1px solid var(--border); border-radius: 10px; padding: 7px 10px; cursor: pointer; color: var(--muted); font-family: inherit; font-size: 13px; }
.theme-toggle:hover { border-color: var(--primary); color: var(--text); }

.pref-list { display: flex; flex-direction: column; gap: 10px; }
.pref-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
}
.pref-k { font-size: 13px; color: var(--muted); font-weight: 550; }

.mobile-bar { display: none; }
.nav-backdrop { display: none; }

/* 主栏 + 290px 侧栏一起放不下时先叠成单列，否则主栏会被侧栏挤成一条 */
@media (max-width: 1000px) {
  .split-edit, .split-topup { grid-template-columns: minmax(0, 1fr); }
  .sticky-col { position: static; top: auto; }
}
@media (max-width: 940px) {
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 780px) {
  .app { grid-template-columns: minmax(0, 1fr); min-height: 100dvh; }
  body.nav-open { overflow: hidden; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: 254px; z-index: 60; overflow-y: auto;
    height: 100dvh; background: var(--surface-solid); transform: translateX(-100%); transition: transform 0.2s ease;
  }
  body.nav-open .sidebar { transform: none; }
  /* 遮罩用真实元素而不是 body::after：.app 自带 z-index:1 会自成层叠上下文，
     挂在 body 上的 ::after 反而压住了整块 app（含侧栏的 z-index:60），
     结果就是点开菜单后遮罩盖住一切、页面点不动 */
  .nav-backdrop {
    display: block; position: fixed; inset: 0; z-index: 55;
    background: rgba(0, 0, 0, 0.5); opacity: 0; pointer-events: none;
    transition: opacity 0.2s ease;
  }
  body.nav-open .nav-backdrop { opacity: 1; pointer-events: auto; }
  .mobile-bar { display: inline-flex; }
  .content { padding: 18px 16px 60px; }
  .topbar { padding: 13px 16px; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: minmax(0, 1fr); }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .kv dt { margin-top: 6px; }
  /* 输入框字号小于 16px 时手机浏览器聚焦会自动放大整页，这里统一提到 16px */
  input, select, textarea { font-size: 16px; }
  .rich-input, .rich-ph { font-size: 16px; }
  /* 提示条左右贴边，窄屏不会顶出屏幕 */
  .toasts { left: 12px; right: 12px; bottom: 12px; }
  .toast { min-width: 0; max-width: none; }
  th, td { padding: 9px 10px; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .drawer { padding: 18px 16px 60px; }
}

/* ============================================================
   SaaS 扩展：登录页 / 计费 / 收款信息 / 状态胶囊
   ============================================================ */
.auth-wrap {
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: center;
  padding: 26px 18px; overflow-y: auto;
}
.auth-card { width: min(430px, 94vw); position: relative; }
.lang-corner { position: absolute; top: 12px; right: 12px; }
.auth-back-corner { position: absolute; top: 12px; left: 12px; }
.auth-head { text-align: center; margin-bottom: 18px; }
.auth-head .brand-mark { width: 46px; height: 46px; border-radius: 14px; font-size: 19px; margin: 0 auto 12px; }
.auth-head h2 { margin: 0 0 4px; font-size: 19px; font-weight: 680; }
.auth-head p { margin: 0; color: var(--muted-2); font-size: 12.5px; }
.tabs.full { display: flex; width: 100%; margin-bottom: 16px; }
.tabs.full button { flex: 1; padding: 8px 0; }

/* ---------- 落地页（未登录首页）：导航 / Hero / 功能 / 价格 / FAQ / 联系 ---------- */
.landing-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0 24px 32px;
}

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px 2px;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(10px);
}
.landing-brand { display: flex; align-items: center; gap: 10px; }
.landing-brand .brand-mark { width: 30px; height: 30px; border-radius: 10px; font-size: 14px; }
.landing-brand strong { font-size: 17px; font-weight: 700; letter-spacing: 0.2px; color: var(--primary); }

.landing-links { display: flex; align-items: center; gap: 2px; margin: 0 auto; }
.landing-links button {
  padding: 8px 14px;
  border: none;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.14s ease, background 0.14s ease;
}
.landing-links button:hover { color: var(--text); background: var(--surface-2); }

.landing-actions { display: flex; align-items: center; gap: 8px; }
.landing-actions .btn.primary { border-radius: 999px; padding: 8px 18px; }

.landing-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 92px 16px 78px;
  text-align: center;
}
/* 点阵装饰：中心亮、四周淡出，暗色主题下也不会显脏 */
.landing-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(color-mix(in srgb, var(--primary) 38%, transparent) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(58% 66% at 50% 46%, #000 0%, transparent 76%);
  mask-image: radial-gradient(58% 66% at 50% 46%, #000 0%, transparent 76%);
  opacity: 0.8;
}
.landing-hero > * { position: relative; z-index: 1; }

.landing-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
}
.landing-emoji { font-size: 13px; }

.landing-title {
  margin: 0;
  font-size: clamp(32px, 6vw, 62px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.6px;
}
.landing-hl {
  display: inline-block;
  margin: 0 4px;
  padding: 0 16px;
  border-radius: 12px;
  background: linear-gradient(140deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 16px 38px -18px var(--primary);
}

.landing-sub {
  margin: 0;
  max-width: 620px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.9;
}
.landing-cta { margin-top: 8px; }
.btn.lg { padding: 12px 26px; font-size: 15px; border-radius: 999px; }
.landing-arrow { font-size: 14px; }

.landing-section { width: 100%; max-width: 1040px; margin: 0 auto; padding: 52px 0; }
.landing-h2 { margin: 0; text-align: center; font-size: 25px; font-weight: 720; letter-spacing: 0.2px; }
.landing-h2-sub { margin: 8px 0 0; text-align: center; color: var(--muted-2); font-size: 13px; }

.landing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.landing-card { padding: 20px; }
.landing-ico {
  width: 38px;
  height: 38px;
  margin-bottom: 13px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 17px;
}
.landing-card-t { font-size: 15px; font-weight: 650; margin-bottom: 7px; }
.landing-card-d { color: var(--muted); font-size: 13px; line-height: 1.78; }

.landing-price { max-width: 520px; margin: 28px auto 0; padding: 6px 18px; }
.landing-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 13.5px;
}
.landing-price-row:last-child { border-bottom: none; }
.landing-price-row strong { color: var(--text); font-size: 15px; font-weight: 700; }

.landing-faq { max-width: 780px; margin: 28px auto 0; display: flex; flex-direction: column; }
/* 帮助中心：产品说明书（分栏卡片）+ 常见问题（复用落地页的折叠样式） */
.help-manual { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.help-sec { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); padding: 14px 16px; }
.help-h { font-size: 13.5px; font-weight: 650; color: var(--text); margin-bottom: 9px; }
.help-ico { margin-right: 7px; }

/* Reddit 博客：详情页的大标题 / 元信息 / 导语 */
.post-title { font-size: 22px; font-weight: 720; line-height: 1.35; margin: 0 0 10px; letter-spacing: -0.01em; }
.post-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted-2); font-size: 12px; margin-bottom: 12px; }
.post-lead { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.85; }
.help-list { margin: 0; padding-left: 17px; display: flex; flex-direction: column; gap: 7px; color: var(--muted); font-size: 12.5px; line-height: 1.65; }
.help-list li::marker { color: var(--muted-2); }
.help-faq { display: flex; flex-direction: column; }

/* Reddit 基础教程说明：顶部目录 + 单列章节卡（点目录平滑滚到对应章节） */
.guide-toc { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.guide-toc-label { font-size: 12px; color: var(--muted-2); }
.guide-jump {
  background: transparent; border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 12px; cursor: pointer; color: var(--muted);
  font-family: inherit; font-size: 12.5px; transition: color 0.14s ease, border-color 0.14s ease;
}
.guide-jump:hover { border-color: var(--primary); color: var(--text); }
.guide-jump:focus-visible { outline: none; border-color: rgba(99, 102, 241, 0.6); }
.guide-sec { scroll-margin-top: 76px; }

.faq-item {
  margin-bottom: 10px; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
  transition: border-color 0.14s ease;
}
.faq-item:hover { border-color: var(--border-strong); }
.faq-item[open] { border-color: color-mix(in srgb, var(--primary) 42%, var(--border)); background: var(--surface-2); }
.faq-q {
  display: flex; align-items: center; gap: 10px;
  padding: 15px 18px; cursor: pointer; list-style: none;
  font-size: 14px; font-weight: 620; color: var(--text);
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q:hover { color: var(--primary); }
.faq-q::after { content: "＋"; margin-left: auto; color: var(--muted-2); font-size: 15px; line-height: 1; }
.faq-item[open] .faq-q::after { content: "－"; color: var(--primary); }
.faq-a { padding: 0 18px 16px; color: var(--muted); font-size: 13px; line-height: 1.85; }
.landing-contact { max-width: 520px; margin: 28px auto 0; }

.landing-foot {
  margin-top: auto;
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-top: 1px solid var(--border);
  color: var(--muted-2);
  font-size: 12.5px;
}
.landing-foot .brand-mark { width: 24px; height: 24px; border-radius: 8px; font-size: 12px; }

@media (max-width: 900px) {
  .landing-links { display: none; }
  .landing-actions { margin-left: auto; }
  .landing-grid { grid-template-columns: minmax(0, 1fr); }
  .landing-hero { padding: 56px 6px 46px; }
  .landing-section { padding: 38px 0; }
}
.pay-box {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-2);
}
.pay-box .pay-ico { font-size: 19px; }
.pay-box .pay-meta { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.pay-box .pay-label { font-size: 11.5px; color: var(--muted-2); }
.pay-box .pay-val { font-family: var(--mono); font-size: 14px; font-weight: 700; user-select: all; overflow-wrap: anywhere; }

/* 带收款码的收款框：二维码用固定尺寸，白底以保证扫码识别率 */
.pay-box.qr { align-items: flex-start; }
.pay-box .pay-qr {
  width: 132px; height: 132px; flex: 0 0 132px; object-fit: contain;
  background: #fff; border-radius: 10px; padding: 6px; border: 1px solid var(--border-strong);
}
.pay-box .pay-hint { font-size: 11.5px; color: var(--muted-2); margin-top: 4px; }

/* 收款码点一下看完整大图（复用图片灯箱） */
.pay-qr-btn {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  flex: 0 0 auto; padding: 0; border: 0; background: none; color: var(--muted-2);
  font: inherit; cursor: zoom-in;
}
.pay-qr-btn .mono-sm { font-size: 11px; }
.pay-qr-btn:hover .pay-qr { border-color: var(--primary); }
.pay-qr-btn:hover .mono-sm { color: var(--text); }

/* 充值套餐：一档一张卡，金额由套餐决定 */
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 10px; }
.pkg-card {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  padding: 12px 14px; border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  font: inherit; text-align: left; transition: all 0.14s ease;
}
.pkg-card:hover { border-color: var(--border-strong); }
.pkg-card.active { border-color: var(--primary); background: var(--primary-soft); }
.pkg-name { font-size: 12.5px; color: var(--muted); }
.pkg-amount { font-size: 12.5px; color: var(--muted); }
.pkg-amount b { font-size: 20px; font-weight: 700; color: var(--text); }
.pkg-price { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.pkg-rate { font-size: 11.5px; color: var(--muted-2); }
.pkg-tag {
  position: absolute; top: 8px; right: 9px;
  font-size: 10.5px; padding: 1px 7px; border-radius: 999px;
  color: #c4b5fd; border: 1px solid rgba(168, 85, 247, 0.35); background: rgba(168, 85, 247, 0.12);
}
.pay-box .pay-val.empty { font-family: inherit; font-weight: 500; color: var(--muted-2); font-size: 12.5px; }

/* 后台：收款码预览 */
.qr-preview {
  width: 108px; height: 108px; flex: 0 0 108px; display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--border-strong); border-radius: 10px; background: var(--surface-2);
  font-size: 11.5px; overflow: hidden;
}
.qr-preview img { width: 100%; height: 100%; object-fit: contain; background: #fff; }

.price-tag { font-family: var(--mono); font-weight: 700; font-size: 15px; }
.balance-big { font-size: 30px; font-weight: 750; letter-spacing: -0.02em; line-height: 1.1; }
.balance-big .unit { font-size: 13px; color: var(--muted-2); font-weight: 550; margin-left: 4px; }

.delta-pos { color: var(--success); font-weight: 650; }
.delta-neg { color: #fca5a5; font-weight: 650; }

.steps-inline { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted-2); }

.stat-card { display: flex; flex-direction: column; gap: 3px; }
.stat-card .v { font-size: 23px; font-weight: 720; letter-spacing: -0.02em; }

.admin-shell { display: flex; flex-direction: column; gap: 16px; }
.mono-sm { font-family: var(--mono); font-size: 11.5px; color: var(--muted-2); }
.tight-list { display: flex; flex-direction: column; gap: 8px; }
.list-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 13px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2);
}
.list-row .grow { flex: 1; min-width: 0; }
.divider { height: 1px; background: var(--border); margin: 4px 0; }
.scroll-y { max-height: 460px; overflow-y: auto; }
.footnote { color: var(--muted-2); font-size: 11.5px; line-height: 1.7; }

/* ---------------- 媒体：拖拽 / 点击上传 + 缩略图 + 整图灯箱 ---------------- */
/* 虚线框是「拖进来或点一下」的入口，缩略图排在下面，点缩略图看整图 */
.media-field { display: flex; flex-direction: column; grid-column: 1 / -1; }
.media-box {
  display: flex; flex-direction: column; gap: 12px; padding: 13px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2);
}
.media-head { display: flex; align-items: baseline; gap: 10px; }
.media-title { font-size: 12.5px; font-weight: 600; }
.media-count { margin-left: auto; font-family: var(--mono); font-size: 12px; }
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  padding: 26px 16px; text-align: center; cursor: pointer; color: var(--muted);
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--surface);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.dropzone:hover { border-color: var(--primary); color: var(--text); }
.dropzone:focus-visible { outline: none; border-color: var(--primary); border-style: solid; }
/* 拖拽悬停时给个明确的「松手就放这儿」信号 */
.dropzone.over { border-color: var(--primary); border-style: solid; background: var(--primary-soft); color: var(--text); }
.dz-icon { width: 30px; height: 30px; }
.dz-main { font-size: 13px; color: var(--text); }
.dz-file { display: none; }
.media-warn { font-size: 12px; }
/* 联系方式按原样换行（后台是 textarea，一行一条） */
.support-note { font-size: 12.5px; line-height: 1.8; color: var(--muted); white-space: pre-line; }
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.thumb {
  position: relative; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--border-strong); background: var(--surface-2); cursor: zoom-in;
}
/* 用 contain 而不是 cover：确认「是不是这张图」时不该被裁掉边缘 */
.thumb-img { display: block; width: 100%; height: 100%; object-fit: contain; background: #0f0f18; transition: transform 0.18s ease; }
.thumb:hover .thumb-img { transform: scale(1.05); }
.thumb.bad { cursor: default; border-style: dashed; }
.thumb.bad .thumb-img { display: none; }
.thumb.bad .thumb-media, .thumb.bad .thumb-play { display: none; }
.thumb-bad {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 8px; text-align: center; font-size: 11px; line-height: 1.5; color: var(--muted-2);
}
.thumb-x {
  position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; padding: 0;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  border: none; border-radius: 50%; font-size: 11px;
  background: rgba(8, 8, 16, 0.74); color: #fff; opacity: 0.55; transition: opacity 0.15s ease, background 0.15s ease;
}
.thumb:hover .thumb-x { opacity: 1; background: var(--danger); }
.thumb-video { cursor: pointer; }
.thumb-media { display: block; width: 100%; height: 100%; object-fit: contain; background: #0f0f18; }
.thumb-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7); pointer-events: none;
}
.thumb-loading { display: flex; align-items: center; justify-content: center; cursor: default; }
.lightbox-video { max-width: 100%; max-height: 100%; border-radius: 10px; background: #000; box-shadow: var(--shadow); }

/* 灯箱背板比抽屉更暗，否则页面顶栏透出来会和工具条按钮糊在一起 */
.overlay.lightbox-overlay { background: rgba(3, 3, 8, 0.94); backdrop-filter: none; }
.lightbox { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 12px; padding: 16px; }
.lightbox-overlay .btn.ghost { color: #d9d9e4; }
.lightbox-overlay .btn.ghost:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.lightbox-bar { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.lightbox-pos { font-family: var(--mono); font-size: 12px; color: #cfcfda; background: rgba(255, 255, 255, 0.08); border-radius: 999px; padding: 4px 11px; }
.lightbox-stage { display: flex; flex: 1; min-height: 0; align-items: center; justify-content: center; cursor: zoom-out; }
.lightbox-img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  border-radius: 10px; background: #fff; box-shadow: var(--shadow);
}

/* ---------------- 查看曝光（任务列表的眼睛按钮 + 弹窗） ---------------- */
.expo-eye {
  padding: 3px 7px;
  font-size: 14px;
  line-height: 1.2;
}
.expo-modal { width: min(520px, 92vw); }
.expo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.expo-row:last-of-type { border-bottom: 0; }
.expo-label { flex: 0 0 auto; min-width: 108px; font-size: 13px; color: var(--muted); }
.expo-value { flex: 1 1 auto; min-width: 0; font-size: 14px; }
.expo-num { font-size: 18px; font-weight: 600; }
.expo-extra { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border); }

/* ---------- 手机竖屏收尾：放最后，确保不被前面的同名基础样式盖掉 ---------- */
@media (max-width: 780px) {
  /* 这几条的基础样式定义在文件后面，写在中间会被盖掉，所以放这里 */
  .auth-wrap { padding: 20px 14px; }
  .auth-card { width: 100%; }
  .help-manual { grid-template-columns: minmax(0, 1fr); }
  .post-title { font-size: 19px; }
  .landing-h2 { font-size: 21px; }
  .lightbox { padding: 10px; }
  /* 缩略图上的删除按钮在手机上要大一点才点得准 */
  .thumb-x { width: 26px; height: 26px; font-size: 12px; }
}

/* 手机（≤480px）：再收紧一档间距，把宽度让给内容 */
@media (max-width: 480px) {
  .content { padding: 14px 12px 64px; }
  .topbar { padding: 11px 12px; gap: 10px; }
  .topbar h1 { font-size: 16px; }
  .card { padding: 14px; }
  .card.tight { padding: 12px; }
  .overlay.center { padding: 14px; }
  .modal, .expo-modal { width: 100%; padding: 16px; }
  .drawer { width: 100vw; border-left: none; }
  .pkg-grid { grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); }
  .balance-big { font-size: 26px; }
  .stat .v { font-size: 19px; }
  .list-row { padding: 10px 11px; }
  .pref-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .landing-wrap { padding: 0 14px 24px; }
  .landing-hero { padding: 40px 0 34px; gap: 14px; }
  .landing-section { padding: 30px 0; }
  .landing-h2 { font-size: 19px; }
  .landing-sub { font-size: 13.5px; line-height: 1.8; }
  .landing-foot { flex-wrap: wrap; text-align: center; }
  .faq-q { padding: 13px 14px; font-size: 13.5px; }
  .faq-a { padding: 0 14px 14px; }
  .pkg-card { padding: 11px 12px; }
  .pay-box { padding: 10px 12px; }
  .lightbox-bar { flex-wrap: wrap; }
  .guide-jump { padding: 5px 10px; }
}

/* ---------------- 首页（登录后的上手引导） ---------------- */
.home-hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.home-hero-main { flex: 1 1 320px; display: flex; flex-direction: column; gap: 10px; }
.home-hello { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.home-hero-side { flex: none; display: flex; flex-direction: column; gap: 3px; min-width: 158px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); }
.home-hero-side .k { font-size: 11.5px; color: var(--muted); }
.home-hero-side .v { font-size: 24px; font-weight: 720; letter-spacing: -0.02em; }
.home-steps { display: flex; flex-direction: column; gap: 10px; }
.home-step { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 11px 13px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); }
.home-step-num { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #c7d2fe; background: var(--primary-soft); border: 1px solid rgba(99, 102, 241, 0.45); }
.home-step-body { flex: 1 1 220px; display: flex; flex-direction: column; gap: 2px; }
.home-step-body strong { font-size: 13.5px; }
.home-step-body span { font-size: 12.5px; color: var(--muted-2); }
.home-ico { font-size: 17px; line-height: 1; }
.home-tip { font-size: 12.5px; color: var(--muted-2); }
.home-notes { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: var(--muted-2); }