/* ============================================================
   印山阁管理后台 · P3.1（融合新设计系统：深金·暗夜·克制，oklch 令牌）
   令牌结构对齐 output-weiblog/tokens.css（admin 内联精简版）
   ============================================================ */
:root {
  color-scheme: dark;
  /* 主色：鎏金 */
  --gold: oklch(78% 0.13 85);
  --gold-light: oklch(83% 0.13 85);
  --gold-soft: oklch(30% 0.05 85 / 0.55);
  /* 行动色：深红（唯一主操作） */
  --red: oklch(46% 0.17 25);
  --red-hover: oklch(48% 0.17 25);
  --red-light: oklch(68% 0.18 25);
  /* 背景（sunken 沉底 / raised 抬起） */
  --bg: oklch(17% 0.015 265);
  --surface: oklch(21% 0.02 265);
  --surface-2: oklch(24% 0.02 265);
  --surface-3: oklch(26% 0.02 265);
  /* 文字 */
  --text-primary: oklch(94% 0.012 85);
  --text-secondary: oklch(78% 0.025 85);
  --text-muted: oklch(64% 0.02 85);
  /* 边框：普通 / 强 / 金 */
  --border: oklch(30% 0.02 265);
  --border-light: oklch(40% 0.025 265);
  --border-gold: oklch(70% 0.13 85 / 0.55);
  /* 阴影（暗色环境：黑 + 金色微光，克制） */
  --shadow-sm: 0 1px 2px oklch(0% 0 0 / 0.35);
  --shadow-md: 0 4px 12px oklch(0% 0 0 / 0.45);
  --shadow-lg: 0 12px 32px oklch(0% 0 0 / 0.55);
  --shadow-gold: 0 0 0 1px oklch(78% 0.13 85 / 0.35), 0 4px 16px oklch(78% 0.13 85 / 0.16);
  /* 动效：进入 200ms / 响应 100ms */
  --dur: 100ms;
  --ease: ease-out;
  --font-sans: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --font-serif: 'Noto Serif SC', 'STZhongsong', 'SimSun', serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text-primary); font-family: var(--font-sans); font-size: 15px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- 登录 ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card {
  width: 100%; max-width: 380px; text-align: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 44px 36px 32px;
}
.login-logo { font-family: var(--font-serif); font-size: 34px; font-weight: 900; color: var(--gold); letter-spacing: 10px; margin-bottom: 4px; }
.login-sub { font-size: 12px; color: var(--text-muted); letter-spacing: 3px; margin-bottom: 30px; }
.login-card input {
  width: 100%; padding: 12px 14px; margin-bottom: 16px;
  background: var(--surface-2); border: 1px solid var(--border-light); border-radius: 8px;
  color: var(--text-primary); font-size: 15px; text-align: center;
}
.login-card input:focus { border-color: var(--gold); outline: none; }
.login-hint { font-size: 12px; color: var(--text-muted); margin-top: 16px; }
.login-error { font-size: 13px; color: var(--red-light); margin-top: 10px; min-height: 18px; }

.btn-gold {
  display: inline-block; width: 100%; padding: 12px; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: oklch(17% 0.015 265); font-weight: 600; font-size: 15px; letter-spacing: 4px;
  border-radius: 8px; transition: opacity .2s;
}
.btn-gold:hover { opacity: .9; }

/* ---------- 主布局 ---------- */
.app-wrap { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; top: 0; bottom: 0; left: 0; width: 210px;
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 22px 0 16px;
}
.side-brand { padding: 0 22px 20px; border-bottom: 1px solid var(--border); }
.sb-name { display: block; font-family: var(--font-serif); font-size: 22px; font-weight: 700; color: var(--gold); letter-spacing: 5px; }
.sb-sub { font-size: 11px; color: var(--text-muted); letter-spacing: 2px; }
.side-nav { flex: 1; padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; }
.side-nav a {
  padding: 11px 14px; border-radius: 8px; color: var(--text-secondary);
  font-size: 14.5px; letter-spacing: 1px; transition: all .15s;
}
.side-nav a:hover { color: var(--gold); background: var(--surface-2); }
.side-nav a.active { color: var(--gold); background: var(--gold-soft); font-weight: 600; }
.side-nav a .nav-badge {
  display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 100px;
  background: var(--red); color: oklch(97% 0.01 85); font-size: 11px; line-height: 18px; vertical-align: 1px;
}
.side-footer { padding: 14px 22px 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.side-footer a { font-size: 13px; color: var(--text-muted); }
.side-footer a:hover { color: var(--gold); }
.side-footer button {
  align-self: flex-start; background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 13px; padding: 0; font-family: inherit;
}
.side-footer button:hover { color: var(--red-light); }

.main { flex: 1; margin-left: 210px; padding: 30px 36px 60px; max-width: 1120px; }

.page-title { font-family: var(--font-serif); font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.page-desc { color: var(--text-muted); font-size: 13.5px; margin-bottom: 26px; }

/* ---------- 工作台（B-02 新设计：问候 + 红色主 CTA + 大卡片导航 + 状态条） ---------- */
.hello { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.hello-title { font-family: var(--font-serif); font-size: 28px; font-weight: 700; }
.hello-sub { color: var(--text-muted); font-size: 13.5px; margin-top: 4px; }
.hello-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  border: 1px solid var(--border-light); border-radius: 12px; color: var(--text-secondary); font-size: 13.5px;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.hello-link:hover { border-color: var(--border-gold); color: var(--gold); }

.gen-hero { margin-bottom: 28px; }
.gen-hero-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  width: 100%; min-height: 96px; border: 0; border-radius: 16px; cursor: pointer;
  background: var(--red); color: oklch(97% 0.01 85);
  font-family: inherit; box-shadow: var(--shadow-md);
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.gen-hero-btn:hover:not(:disabled) { background: var(--red-hover); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.gen-hero-btn:disabled { opacity: .75; cursor: wait; }
.gen-hero-btn.generating { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: var(--shadow-md); } 50% { box-shadow: 0 4px 24px oklch(46% 0.17 25 / 0.55); } }
.brb-icon { display: block; font-size: 26px; margin-bottom: 2px; }
.brb-text { display: block; font-family: var(--font-serif); font-size: 22px; font-weight: 900; letter-spacing: 6px; }
.brb-sub { display: block; font-size: 12.5px; opacity: .82; margin-top: 3px; letter-spacing: 2px; }
.gen-note { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; color: var(--text-muted); }
.gen-status { margin-top: 10px; font-size: 14px; color: var(--text-secondary); min-height: 22px; }
.gen-status a { margin-left: 8px; }

/* 卡片导航（图标 64px，标题 ≤4 字） */
.nav-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 24px; }
.nav-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px;
  min-height: 150px; padding: 22px 16px; text-align: center; color: var(--text-primary);
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.nav-card:hover { border-color: var(--border-gold); box-shadow: var(--shadow-gold); transform: translateY(-2px); color: var(--text-primary); }
.nav-card-icon { font-size: 44px; line-height: 1; }
.nav-card-title { font-family: var(--font-serif); font-size: 16.5px; font-weight: 700; }
.nav-card-desc { font-size: 12px; color: var(--text-muted); }
.nav-card .badge { position: absolute; top: 12px; right: 12px; }

/* 快捷状态条 */
.status-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 24px; }
.status-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 64px; padding: 12px 18px; color: var(--text-primary);
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  transition: border-color var(--dur) var(--ease);
}
.status-item:hover { border-color: var(--border-gold); color: var(--text-primary); }
.status-label { flex: 1; font-size: 13.5px; color: var(--text-secondary); }
.status-num { font-family: var(--font-serif); font-size: 26px; font-weight: 700; color: var(--gold); line-height: 1.1; }
.status-num.red { color: var(--red-light); }

/* 站点入口（虚线框强调） */
.site-entry {
  display: flex; align-items: center; gap: 16px; padding: 18px 22px;
  border: 1px dashed var(--border-light); border-radius: 16px; color: var(--text-primary);
  transition: border-color var(--dur) var(--ease);
}
.site-entry:hover { border-color: var(--border-gold); color: var(--text-primary); }
.site-entry-icon { font-size: 30px; }
.site-entry-text { flex: 1; }
.site-entry-text strong { font-family: var(--font-serif); font-size: 15.5px; }
.site-entry-text p { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; }
.site-entry-arrow { color: var(--gold); font-size: 18px; }

@media (max-width: 768px) {
  .nav-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .nav-card { min-height: 130px; padding: 18px 12px; }
  .nav-card-icon { font-size: 38px; }
  .status-strip { grid-template-columns: 1fr; }
}

/* ---------- 通用组件 ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px 24px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.card-title { font-family: var(--font-serif); font-size: 17px; font-weight: 700; margin-bottom: 16px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 20px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--border-light); background: var(--surface-2); color: var(--text-primary);
  font-size: 13.5px; font-family: inherit; letter-spacing: 1px;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn:hover { border-color: var(--border-gold); color: var(--gold); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: oklch(17% 0.015 265); font-weight: 600; }
.btn.primary:hover { background: var(--gold-light); color: oklch(17% 0.015 265); box-shadow: var(--shadow-gold); }
.btn.danger { color: var(--red-light); }
.btn.danger:hover { border-color: var(--red-light); color: var(--red-light); }
.btn.mini { min-height: 36px; padding: 0 12px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

.badge { display: inline-block; padding: 2px 12px; border-radius: 100px; font-size: 12px; letter-spacing: 1px; border: 1px solid; }
.badge.available { color: var(--gold-light); border-color: var(--border-gold); background: var(--gold-soft); }
.badge.sold { color: var(--text-muted); border-color: var(--border-light); background: var(--surface-2); }
.badge.pending { color: var(--red-light); border-color: oklch(68% 0.18 25 / 0.5); background: oklch(30% 0.06 25 / 0.4); }
.badge.cat { color: var(--text-secondary); border-color: var(--border-light); background: var(--surface-2); }

/* 表单 */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.form-item { display: flex; flex-direction: column; gap: 6px; }
.form-item.full { grid-column: 1 / -1; }
.field-hint { font-size: 12px; color: var(--text-muted); line-height: 1.6; }
.form-item label { font-size: 13px; color: var(--text-secondary); }
.form-item label .req { color: var(--red-light); margin-left: 2px; }
input, select, textarea {
  background: var(--surface-2); border: 1px solid var(--border-light); border-radius: 8px;
  color: var(--text-primary); font-size: 14px; padding: 9px 12px; font-family: inherit; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); outline: none; }
textarea { resize: vertical; line-height: 1.7; }
input[type="date"] { color-scheme: dark; }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--gold); }

/* ---------- 幼犬管理 ---------- */
.puppy-row {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 18px; margin-bottom: 12px; transition: border-color .15s;
}
.puppy-row:hover { border-color: var(--border-light); }
.pr-thumb { width: 74px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); flex-shrink: 0; }
.pr-main { flex: 1; min-width: 0; }
.pr-name { font-family: var(--font-serif); font-size: 17px; font-weight: 700; }
.pr-meta { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.pr-price { font-family: var(--font-serif); color: var(--gold); font-weight: 700; font-size: 15px; flex-shrink: 0; }
.pr-actions { display: flex; gap: 8px; flex-shrink: 0; align-items: center; }

/* 健康记录行 */
.health-list { display: flex; flex-direction: column; gap: 8px; }
.health-row { display: grid; grid-template-columns: 150px 110px 1fr 34px; gap: 8px; align-items: center; }
.health-row .btn-del-row { padding: 7px; background: none; border: 1px solid var(--border); border-radius: 8px; color: var(--text-muted); cursor: pointer; }
.health-row .btn-del-row:hover { color: var(--red-light); border-color: var(--red-light); }

/* 图集勾选 */
.gallery-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px; }
.gal-item { display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: pointer; font-size: 11px; color: var(--text-muted); }
.gal-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; border: 2px solid var(--border); }
.gal-item input:checked ~ img { border-color: var(--gold); }
.gal-add {
  display: flex; align-items: center; justify-content: center; aspect-ratio: 4/3;
  border: 1px dashed var(--border-light); border-radius: 8px; color: var(--text-muted);
  cursor: pointer; font-size: 13px; margin-top: 21px;
}
.gal-add:hover { border-color: var(--gold); color: var(--gold); }

/* 图片选择器（select + 上传） */
.img-picker { display: flex; gap: 8px; }
.img-picker select { flex: 1; }
.upload-mini {
  flex-shrink: 0; padding: 9px 14px; border: 1px dashed var(--border-light); border-radius: 8px;
  color: var(--text-muted); font-size: 13px; cursor: pointer;
}
.upload-mini:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- 买家秀审核 ---------- */
.tab-bar { display: flex; gap: 8px; margin-bottom: 18px; }
.tab-btn {
  padding: 8px 20px; border-radius: 100px; border: 1px solid var(--border-light);
  background: none; color: var(--text-secondary); font-size: 14px; cursor: pointer; font-family: inherit;
}
.tab-btn.active { color: var(--gold); border-color: var(--gold); background: var(--gold-soft); font-weight: 600; }
.tab-btn .cnt { color: var(--red-light); margin-left: 4px; font-weight: 700; }

.review-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 22px 24px; margin-bottom: 16px; }
.review-meta { font-size: 12.5px; color: var(--text-muted); margin-bottom: 14px; }
.review-photos { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.review-photo { position: relative; cursor: pointer; }
.review-photo img { width: 110px; height: 82px; object-fit: cover; border-radius: 8px; border: 2px solid var(--border); }
.review-photo input { position: absolute; top: 6px; left: 6px; }
.review-photo.sel img { border-color: var(--gold); }
.review-actions { display: flex; gap: 10px; margin-top: 16px; }
.story-mini { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; align-items: center; }
.story-mini img { width: 96px; height: 70px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.story-mini .sm-body { flex: 1; min-width: 0; }
.story-mini .sm-quote { font-size: 13px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.story-mini .sm-meta { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

/* ---------- 日志 ---------- */
.publish-form { background: var(--surface); border: 1px solid var(--border-gold); border-radius: 16px; padding: 22px 24px; margin-bottom: 22px; }
.publish-form .card-title { color: var(--gold); }
.journal-row { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 18px; margin-bottom: 10px; }
.jr-img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.jr-body { flex: 1; min-width: 0; }
.jr-title { font-size: 14.5px; font-weight: 600; }
.jr-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ---------- 设置 ---------- */
.settings-form { max-width: 640px; }
.save-bar { display: flex; gap: 12px; margin-top: 22px; align-items: center; }
.save-tip { font-size: 13px; color: var(--text-muted); }
.settings-tip { font-size: 12.5px; color: var(--text-muted); margin-top: 12px; }

/* 主题选择器（目录由 /api/platform/meta 提供，19 套分组展示） */
.theme-group-title { font-size: 12px; color: var(--text-muted); letter-spacing: 1px; margin: 14px 0 8px; }
.theme-group-title:first-child { margin-top: 0; }
.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 768px) { .theme-grid { grid-template-columns: repeat(2, 1fr); } }
.theme-opt { cursor: pointer; }
.theme-opt input { position: absolute; opacity: 0; pointer-events: none; }
.theme-card { border: 1px solid var(--border-light); border-radius: 10px; overflow: hidden; transition: border-color .15s; }
.theme-opt input:checked + .theme-card { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.theme-swatch { height: 40px; display: flex; align-items: center; justify-content: flex-end; padding: 8px 10px; }
.swatch-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid oklch(80% 0 0 / 0.35); }
.theme-meta { padding: 6px 10px 5px; background: var(--surface-2); }
.theme-name { font-size: 12px; font-weight: 600; line-height: 1.4; }
.theme-desc { font-size: 11px; color: var(--text-muted); line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 设置子页签（站点主题 / 基础设置） ---------- */
.settings-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border-light); margin-bottom: 20px; max-width: 640px; }
.settings-tab {
  border: none; background: none; cursor: pointer; padding: 10px 20px; min-height: 44px;
  font-size: 14.5px; font-weight: 600; color: var(--text-muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px; border-radius: 0;
}
.settings-tab.on { color: var(--gold); border-bottom-color: var(--gold); }

/* 物种切换 */
.species-toggle { display: flex; gap: 10px; }
.species-btn {
  flex: 1; min-height: 56px; font-size: 16px; font-weight: 700; cursor: pointer;
  border: 1px solid var(--border-light); background: var(--surface-2); border-radius: 12px;
  color: var(--text-secondary); transition: all .15s;
}
.species-btn.on { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 0 1px var(--gold); background: var(--surface); }

/* 品种 chips */
.breed-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.breed-chip {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px;
  border: 1px solid var(--border-light); border-radius: 100px; background: var(--surface-2);
  font-size: 13.5px; color: var(--text-secondary); cursor: default;
}
button.breed-chip { cursor: pointer; transition: all .15s; }
button.breed-chip:hover { border-color: var(--gold); }
button.breed-chip.on { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 0 1px var(--gold); background: var(--surface); }
.custom-breed-row { display: flex; gap: 10px; margin-top: 14px; }
.custom-breed-row input { flex: 1; min-width: 0; }

/* 方案卡（品种色名 + 三页预览 + 一键应用） */
.scheme-list { display: flex; flex-direction: column; gap: 12px; }
.scheme-custom-note { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.scheme-card {
  display: flex; gap: 16px; align-items: flex-start; padding: 16px;
  border: 1px solid var(--border-light); border-radius: 12px; background: var(--surface-2);
}
.scheme-card.current { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.scheme-meta { flex: 1; min-width: 0; }
.scheme-name { font-size: 15px; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.scheme-badge { font-size: 11px; font-weight: 600; color: var(--gold); border: 1px solid var(--gold); padding: 1px 8px; border-radius: 100px; }
.scheme-badge.arch { color: var(--text-muted); border-color: var(--border-light); }

/* 微型站点缩略图（--m-bg 底色 / --m-ac 强调色，结构随布局原型变化） */
.scheme-mock {
  width: 168px; border-radius: 8px; overflow: hidden; padding: 10px 12px; background: var(--m-bg);
  display: flex; flex-direction: column; gap: 8px; flex-shrink: 0;
}
.m-hero { height: 22px; border-radius: 3px; background: color-mix(in srgb, var(--m-ac) 26%, var(--m-bg)); position: relative; }
.m-hero::after { content: ''; position: absolute; left: 8px; bottom: 5px; width: 34%; height: 4px; border-radius: 2px; background: var(--m-ac); opacity: .8; }
.m-body { display: flex; flex-direction: column; gap: 6px; }
.m-thumb { border-radius: 3px; background: color-mix(in srgb, var(--m-ac) 45%, var(--m-bg)); flex-shrink: 0; }
.m-line { border-radius: 2px; background: color-mix(in srgb, var(--m-ac) 55%, var(--m-bg)); }
.m-line.dim { opacity: .45; }
.arch-roster .m-row { display: flex; gap: 8px; align-items: center; }
.arch-roster .m-thumb { width: 26px; height: 20px; }
.arch-roster .m-lines { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.arch-roster .m-line { height: 4px; }
.arch-gallery .m-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.arch-gallery .m-cell { display: flex; flex-direction: column; gap: 5px; }
.arch-gallery .m-thumb { height: 26px; border-radius: 4px; }
.arch-gallery .m-line { height: 4px; }
.arch-social .m-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.arch-social .m-cell { display: flex; flex-direction: column; gap: 4px; }
.arch-social .m-thumb { height: 22px; border-radius: 6px; }
.arch-social .m-line { height: 3px; }
.arch-magazine .m-body { max-width: 62%; margin: 0 auto; width: 100%; }
.arch-magazine .m-thumb { height: 24px; border-radius: 0; }
.arch-magazine .m-line { height: 3px; }
.arch-magazine .m-hero { border-radius: 0; }
.arch-classic .m-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.arch-classic .m-cell { display: flex; flex-direction: column; gap: 4px; }
.arch-classic .m-thumb { height: 22px; }
.arch-classic .m-line { height: 3px; }
.scheme-desc { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; line-height: 1.5; }
.scheme-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.scheme-actions .btn { min-height: 44px; padding: 0 16px; font-size: 13.5px; }
.scheme-actions .btn.preview { background: var(--surface); border: 1px solid var(--border-light); color: var(--text-secondary); border-radius: 8px; }
.scheme-actions .btn.preview:hover { border-color: var(--gold); color: var(--gold); }

/* 高级主题折叠 */
.advanced-themes summary { cursor: pointer; color: var(--text-muted); font-size: 13px; padding: 2px 0; user-select: none; }
.advanced-themes[open] summary { margin-bottom: 10px; color: var(--text-secondary); }
.advanced-themes .theme-group-title { margin-top: 8px; }

@media (max-width: 768px) {
  .species-toggle { flex-direction: row; }
  .scheme-card { flex-direction: column; }
  .scheme-mock { width: 100%; }
  .scheme-actions { display: grid; grid-template-columns: repeat(4, 1fr); }
  .scheme-actions .btn { width: 100%; padding: 0 6px; font-size: 12.5px; }
  .custom-breed-row { flex-direction: column; }
  .settings-tab { flex: 1; padding: 10px 8px; }
}

/* 品种同步 */
.breed-sync-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.breed-name { font-family: var(--font-serif); font-size: 19px; font-weight: 700; color: var(--gold); }
.breed-slug { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.sync-status { font-size: 13px; color: var(--text-secondary); margin-top: 12px; min-height: 18px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; top: 22px; left: 50%; transform: translateX(-50%);
  background: var(--surface-3); color: var(--text-primary); border: 1px solid var(--gold);
  padding: 11px 26px; border-radius: 100px; font-size: 14px; z-index: 200;
  box-shadow: var(--shadow-lg); max-width: 80vw;
}
.toast.error { border-color: var(--red-light); color: var(--red-light); }

/* ---------- 三步流（传照片 → 填信息 → 确认发布） ---------- */
.wizard-steps { display: flex; gap: 8px; margin-bottom: 22px; }
.wizard-step {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-height: 72px; padding: 12px 8px; cursor: pointer; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-muted); transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.wizard-step.on { border-color: var(--border-gold); color: var(--text-primary); }
.wizard-step.on .ws-label { color: var(--gold); font-weight: 600; }
.ws-dot { font-size: 26px; line-height: 1; }
.ws-label { font-size: 13px; }
.wizard-panel { display: none; }
.wizard-panel.on { display: block; }
.wiz-tip { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; line-height: 1.6; }
.wiz-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 4px; }
.wiz-nav .btn.primary { min-width: 160px; }
.wiz-advanced summary { cursor: pointer; color: var(--text-secondary); font-size: 14px; user-select: none; }
.wiz-advanced[open] summary { margin-bottom: 6px; }
.health-edit-block { margin-top: 16px; display: flex; flex-direction: column; }
.health-edit-block > label { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }

/* 第 1 步：封面大图上传区 */
.cover-drop {
  position: relative; border: 2px dashed var(--border-light); border-radius: 16px;
  overflow: hidden; cursor: pointer; aspect-ratio: 4 / 3; max-height: 380px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); transition: border-color var(--dur) var(--ease);
}
.cover-drop:hover { border-color: var(--border-gold); }
.cover-drop img { width: 100%; height: 100%; object-fit: cover; }
.cover-drop-tip {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  padding: 8px 20px; border-radius: 100px; font-size: 13px;
  background: oklch(0% 0 0 / 0.6); color: oklch(97% 0.01 85); backdrop-filter: blur(4px);
}
.cover-drop img:not([style*="none"]) + .cover-drop-tip { display: none; }

/* 第 3 步：买家视角预览卡 */
.pv-puppy-card {
  max-width: 420px; border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
  background: var(--surface-2);
}
.pvpc-cover { aspect-ratio: 4 / 3; background: var(--surface-3); display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 13px; }
.pvpc-cover img { width: 100%; height: 100%; object-fit: cover; }
.pvpc-body { padding: 16px 18px; }
.pvpc-name-row { display: flex; justify-content: space-between; align-items: baseline; }
.pvpc-name { font-family: var(--font-serif); font-size: 20px; font-weight: 700; }
.pvpc-gender { font-size: 13px; color: var(--text-secondary); }
.pvpc-meta { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; }
.pvpc-price { font-family: var(--font-serif); color: var(--gold); font-weight: 700; font-size: 17px; margin-top: 10px; }

/* ---------- 状态矩阵：骨架屏 / 空态 / 错误 ---------- */
.skel-wrap { display: flex; flex-direction: column; gap: 14px; }
.skeleton {
  border-radius: 12px; background: var(--surface-2);
  animation: skeleton-pulse 1.6s ease-in-out infinite;
}
@keyframes skeleton-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
.empty-state {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 48px 24px; text-align: center; border: 1px dashed var(--border-light); border-radius: 16px;
}
.empty-state .es-icon { font-size: 44px; }
.empty-state .es-title { font-family: var(--font-serif); font-size: 17px; font-weight: 700; }
.empty-state .es-desc { font-size: 13.5px; color: var(--text-muted); line-height: 1.7; max-width: 320px; }
.error-state {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 48px 24px; text-align: center; border: 1px solid var(--red-light); border-radius: 16px;
}
.error-state .es-icon { font-size: 40px; }
.error-state .es-title { font-size: 16px; font-weight: 600; color: var(--red-light); }
.error-state .es-desc { font-size: 13.5px; color: var(--text-secondary); line-height: 1.7; }

/* ---------- 站点开放状态条（工作台 · 开放/筹备中开关） ---------- */
.vis-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 18px; margin-bottom: 22px;
  border: 1px solid var(--border); border-radius: 14px; background: var(--surface);
  font-size: 13.5px; color: var(--text-secondary);
}
.vis-bar .vis-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.vis-bar.open .vis-dot { background: #58c472; box-shadow: 0 0 8px rgba(88,196,114,.5); }
.vis-bar.prep .vis-dot { background: #e0a83e; box-shadow: 0 0 8px rgba(224,168,62,.5); }
.vis-bar .vis-text { line-height: 1.5; }
.vis-bar .btn { flex-shrink: 0; }
@media (max-width: 768px) {
  .vis-bar { flex-wrap: wrap; padding: 12px 14px; }
  .vis-bar .btn { margin-left: 0; width: 100%; }
}

/* ---------- 套餐与用量（设置页签） ---------- */
.plan-current { margin-bottom: 22px; }
.plan-cur-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.plan-price { font-size: 22px; font-weight: 700; color: var(--gold); white-space: nowrap; }
.quota-bar { margin-top: 18px; padding: 16px 18px; border: 1px solid var(--border-light); border-radius: 12px; background: var(--surface-2); }
.quota-head { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--text-secondary); margin-bottom: 10px; }
.quota-head b { color: var(--text); font-family: var(--font-mono, monospace); }
.quota-track { height: 8px; border-radius: 100px; background: var(--border-light); overflow: hidden; }
.quota-fill { height: 100%; border-radius: 100px; background: var(--gold); transition: width .4s ease; }
.quota-bar.warn .quota-fill { background: #e0a83e; }
.quota-bar.danger .quota-fill { background: var(--red-light, #e05c5c); }
.quota-tip { margin-top: 10px; font-size: 12.5px; color: var(--text-muted); line-height: 1.6; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 14px; }
.plan-card {
  position: relative; display: flex; flex-direction: column; gap: 8px;
  padding: 20px 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2);
}
.plan-card.cur { border-color: var(--gold); }
.plan-badge {
  position: absolute; top: -10px; right: 12px; padding: 2px 10px;
  font-size: 11px; color: var(--bg, #141210); background: var(--gold); border-radius: 100px;
}
.plan-name { font-size: 16px; font-weight: 700; }
.plan-quota { font-size: 13px; color: var(--gold-light, var(--gold)); }
.plan-desc { font-size: 12.5px; color: var(--text-muted); line-height: 1.6; min-height: 40px; }
.plan-card .btn { margin-top: auto; }
.plan-upgrade.done { opacity: 0.85; pointer-events: none; }

/* pending 状态卡 */
.plan-card.pending { border-color: var(--gold-light, var(--gold)); box-shadow: 0 0 0 1px var(--gold-light, var(--gold)) inset; }
.plan-badge.pending { background: var(--gold); color: #1a160e; }
.plan-pending {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: 12px; background: var(--surface-2);
  border: 1px solid var(--gold); margin-bottom: 16px;
}
.plan-pending-icon { font-size: 24px; flex-shrink: 0; }
.plan-pending-title { font-size: 14.5px; font-weight: 600; margin-bottom: 4px; }
.plan-pending-desc { font-size: 12.5px; color: var(--text-muted); line-height: 1.7; }
.btn.loading { opacity: 0.6; pointer-events: none; }

/* ---------- 关于我们管理页签 ---------- */
.about-admin-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.about-admin-item { display: flex; gap: 8px; align-items: flex-start; padding: 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.about-admin-form { display: flex; flex-direction: column; gap: 6px; }
.about-admin-form label { font-size: 12.5px; color: var(--text-muted); margin-top: 6px; }
.about-admin-form label:first-child { margin-top: 0; }
.about-input { font-size: 13.5px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); width: 100%; }
.about-input:focus { border-color: var(--gold); outline: none; }
.about-admin-del { flex-shrink: 0; min-height: 36px; padding: 6px 12px; font-size: 12px; color: var(--red-light); border-color: var(--red-light); }

/* ---------- FAQ 管理页签 ---------- */
.faq-admin-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.faq-admin-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.faq-admin-item {
  padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2);
  display: flex; flex-direction: column; gap: 8px;
}
.faq-admin-meta { display: flex; align-items: center; gap: 8px; }
.faq-admin-tag { font-size: 11px; padding: 2px 8px; border-radius: 4px; }
.faq-admin-tag.default { background: var(--surface); color: var(--text-muted); border: 1px solid var(--border-light); }
.faq-admin-tag.modified { background: rgba(212,175,55,.15); color: var(--gold); border: 1px solid rgba(212,175,55,.3); }
.faq-admin-tag.new { background: rgba(76,175,80,.15); color: #66bb6a; border: 1px solid rgba(76,175,80,.3); }
.faq-admin-id { font-size: 11px; color: var(--text-muted); font-family: monospace; }
.faq-admin-q { font-size: 15px; font-weight: 600; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); width: 100%; }
.faq-admin-a { font-size: 13px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text-secondary); line-height: 1.6; width: 100%; resize: vertical; }
.faq-admin-actions { display: flex; gap: 8px; }
.faq-admin-actions .btn { min-height: 36px; padding: 6px 14px; font-size: 13px; }

/* ---------- 升级确认弹窗 ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(10, 8, 6, 0.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; animation: modal-fade .2s ease;
}
.modal-overlay.hidden { display: none; }
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  max-width: 460px; width: 100%; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: modal-slide .25s var(--ease, ease);
}
@keyframes modal-slide { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px; border-bottom: 1px solid var(--border-light);
}
.modal-head h3 { font-size: 17px; font-weight: 700; }
.modal-close {
  width: 32px; height: 32px; border: none; border-radius: 8px;
  background: transparent; color: var(--text-muted); font-size: 22px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background .15s;
}
.modal-close:hover { background: var(--surface-2); }
.modal-body { padding: 20px; }
.modal-foot {
  display: flex; gap: 12px; padding: 16px 20px 20px;
  border-top: 1px solid var(--border-light);
}
.modal-foot .btn { flex: 1; min-height: 44px; }

/* 升级对比 */
.upgrade-compare {
  display: flex; align-items: center; gap: 12px; margin-bottom: 18px;
}
.upgrade-side {
  flex: 1; text-align: center; padding: 16px 12px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2);
}
.upgrade-side.target { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.upgrade-label { font-size: 11px; color: var(--text-muted); letter-spacing: 2px; }
.upgrade-name { font-size: 16px; font-weight: 700; margin: 6px 0 4px; }
.upgrade-quota { font-size: 13px; color: var(--gold-light, var(--gold)); margin-bottom: 4px; }
.upgrade-price { font-size: 15px; font-weight: 700; color: var(--gold); }
.upgrade-arrow { font-size: 22px; color: var(--text-muted); flex-shrink: 0; }
.upgrade-gain {
  text-align: center; font-size: 13.5px; color: var(--text-secondary);
  padding: 10px 14px; border-radius: 10px; background: var(--surface-2); margin-bottom: 14px;
}
.upgrade-gain b { color: var(--gold); font-size: 16px; }
.upgrade-note { font-size: 12.5px; color: var(--text-muted); line-height: 1.7; }

@media (max-width: 480px) {
  .modal-card { max-width: 100%; }
  .upgrade-compare { gap: 8px; }
  .upgrade-side { padding: 12px 8px; }
  .upgrade-arrow { font-size: 18px; }
  .modal-foot { flex-direction: column-reverse; gap: 8px; }
}

/* ---------- 邀请卡片（买家秀审核 · 新家来信征集） ---------- */
.invite-card { margin-bottom: 22px; }
.invite-box { display: flex; gap: 14px; align-items: stretch; flex-wrap: wrap; margin-top: 14px; }
.invite-text {
  flex: 1; min-width: 260px; padding: 14px 16px; border-radius: 12px;
  background: var(--surface-2); border: 1px dashed var(--border-light);
  font-size: 13.5px; line-height: 1.8; color: var(--text-secondary);
}
.invite-actions { display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 768px) {
  .invite-actions { flex-direction: row; width: 100%; }
  .invite-actions .btn { flex: 1; }
}

/* ---------- 移动端布局（≤768px：顶栏 + 底部 Tab，PC 布局不变） ---------- */
.mobile-header, .tabbar { display: none; }

@media (max-width: 860px) {
  /* 平板过渡区间：沿用侧栏横排布局 */
  .app-wrap { flex-direction: column; }
  .sidebar { position: static; width: 100%; flex-direction: row; align-items: center; padding: 10px 16px; gap: 12px; flex-wrap: wrap; }
  .side-brand { border-bottom: none; padding: 0; }
  .side-nav { flex-direction: row; padding: 0; flex-wrap: wrap; }
  .side-nav a { padding: 7px 12px; font-size: 13px; }
  .side-footer { border-top: none; padding: 0; flex-direction: row; }
  .main { margin-left: 0; padding: 20px 16px 50px; }
}

@media (max-width: 768px) {
  /* 侧边栏彻底隐藏，改用底部 Tab */
  .sidebar { display: none; }
  .app-wrap { flex-direction: column; }

  /* 顶栏 */
  .mobile-header {
    display: flex; position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    height: 52px; align-items: center; justify-content: space-between;
    padding: 0 16px; background: var(--surface);
    border-bottom: 1px solid var(--border);
  }
  .mh-title {
    font-family: var(--font-serif); font-size: 17px; font-weight: 700;
    color: var(--gold); letter-spacing: 2px;
  }
  .mh-link { font-size: 13px; color: var(--text-muted); }

  /* 底部 Tab 栏 */
  .tabbar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
    background: var(--surface); border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; min-height: 52px; position: relative;
    color: var(--text-muted); text-decoration: none; -webkit-tap-highlight-color: transparent;
  }
  .tabbar a.active { color: var(--gold); }
  .tb-icon { font-size: 20px; line-height: 1; }
  .tb-label { font-size: 10.5px; letter-spacing: 1px; }
  .tb-badge {
    position: absolute; top: 5px; right: 50%; margin-right: -26px;
    min-width: 17px; height: 17px; padding: 0 5px; border-radius: 100px;
    background: var(--red); color: #fff; font-size: 11px; font-weight: 700;
    line-height: 17px; text-align: center;
  }

  /* 主内容：避开顶栏与 Tab 栏 */
  .main { margin-left: 0; padding: 66px 14px calc(76px + env(safe-area-inset-bottom)); max-width: 100%; }
  .page-title { font-size: 21px; }
  .page-desc { font-size: 12.5px; margin-bottom: 18px; }

  /* 触控友好：按钮与输入 */
  .btn { min-height: 44px; padding: 10px 18px; font-size: 14px; }
  .btn.mini { min-height: 40px; padding: 8px 13px; }
  input, select, textarea { min-height: 44px; font-size: 15px; }  /* 15px 防 iOS 聚焦缩放 */
  .login-card { padding: 36px 24px 28px; }
  .login-card input { min-height: 48px; }
  .btn-gold { min-height: 48px; }

  /* 卡片与栅格 */
  .card, .review-card, .publish-form { padding: 16px 16px; border-radius: 10px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-num { font-size: 26px; }
  .form-grid { grid-template-columns: 1fr; }
  .toolbar { margin-bottom: 14px; }

  /* 一键生成按钮 */
  .big-red-btn { padding: 22px 16px; border-radius: 12px; }
  .brb-text { font-size: 19px; letter-spacing: 4px; }

  /* 幼犬列表：竖屏堆叠 */
  .puppy-row { flex-wrap: wrap; gap: 10px 12px; padding: 12px 14px; }
  .pr-thumb { width: 100%; height: 170px; }  /* 手机上放大封面，点起来直观 */
  .pr-main { flex-basis: 100%; }
  .pr-price { font-size: 16px; }
  .pr-actions { flex-basis: 100%; justify-content: space-between; }
  .pr-actions .btn { flex: 1; }

  /* 健康记录行 */
  .health-row { grid-template-columns: 1fr 1fr; }

  /* 买家秀审核 */
  .review-photos img { width: 31vw; height: 23vw; max-width: 110px; max-height: 82px; }
  .review-actions { gap: 8px; }
  .review-actions .btn { flex: 1; }
  .tab-bar { gap: 6px; margin-bottom: 14px; overflow-x: auto; }
  .tab-btn { padding: 8px 14px; font-size: 13px; white-space: nowrap; }

  /* 日志 */
  .journal-row { padding: 11px 14px; }

  /* Toast 位置避开顶栏 */
  .toast { top: 60px; }

  /* 关于我们管理：横向项竖向堆叠 */
  .about-admin-item { flex-wrap: wrap; }
  .about-admin-item > * { flex: 1 1 100%; }
  .about-admin-del { flex: 0 0 auto; align-self: flex-end; }

  /* FAQ 管理：触控友好 */
  .faq-admin-actions .btn { min-height: 44px; }

  /* 套餐升级弹窗：全宽 */
  .upgrade-side { flex: 1 1 100%; }
  .upgrade-arrow { transform: rotate(90deg); }
}
