/* ---------- 设计令牌 ---------- */
:root {
  /* 主色：蓝 */
  --primary: #2563eb;
  --primary-deep: #1d4ed8;
  --primary-soft: #eff6ff;
  --primary-100: #dbeafe;

  /* 中性 */
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #0f172a;
  --text-2: #64748b;
  --text-3: #94a3b8;
  --line: #e8edf4;
  --line-strong: #dbe2ec;

  /* 语义 */
  --danger: #e5484d;
  --danger-soft: #fef2f2;
  --warn: #f59e0b;
  --warn-soft: #fff7ed;
  --success: #12a87a;
  --success-soft: #e8f8f1;

  /* 圆角标尺 */
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 14px;

  /* 阴影标尺 */
  --sh-1: 0 1px 2px rgba(15, 23, 42, .05);
  --sh-2: 0 1px 3px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .04);
  --sh-3: 0 4px 14px rgba(15, 23, 42, .08);
  --sh-4: 0 12px 32px rgba(15, 23, 42, .14);

  /* 侧栏 */
  --sider-w: 232px;
  --topbar-h: 60px;
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; }
html, body, #app { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }

::selection { background: rgba(37, 99, 235, .16); }

/* 统一焦点环：键盘可见、鼠标不打扰 */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: var(--r-sm); }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: #94a3b8; background-clip: content-box; }
::-webkit-scrollbar-corner { background: transparent; }

/* ---------- 布局 ---------- */
.layout { display: flex; height: 100%; }

/* 侧栏：浅色主题下走白底 + 右侧分隔线，与主区同色系。
   仅 active 项保留蓝底高亮（白底上的实心蓝胶囊辨识度足够）。 */
.sider {
  width: var(--sider-w);
  background: var(--card);
  color: var(--text-2);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid var(--line);
}
.sider-brand {
  padding: 18px 18px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  letter-spacing: .4px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.sider-brand small {
  display: block;
  font-size: 11px;
  color: var(--text-3);
  margin-top: 2px;
  font-weight: 400;
  letter-spacing: 0;
  flex: 1 1 100%;
}
.sider-logo {
  width: 30px; height: 30px;
  border-radius: 8px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 9px;
  background: #fff;
  padding: 2px;
  border: 1px solid var(--line);
}
.sider-nav { flex: 1; padding: 10px 10px 16px; overflow-y: auto; }
.sider-nav::-webkit-scrollbar-thumb { background: #cbd5e1; background-clip: content-box; }

/* 菜单项：分组内项 + 顶层独立项共用 */
.sider-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 11px;
  margin-bottom: 2px;
  border-radius: var(--r-md);
  color: var(--text-2);
  cursor: pointer;
  font-size: 13.5px;
  transition: background .15s ease, color .15s ease;
}
.sider-item:hover { background: #f1f5f9; color: var(--text); }
.sider-item.active {
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-deep) 100%);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(37, 99, 235, .26);
}
.sider-item.active:hover { color: #fff; }
.sider-ico {
  width: 18px; height: 18px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: .9;
}
.sider-ico svg { width: 18px; height: 18px; display: block; }
.sider-txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 顶层独立项（如「首页」） */
.sider-item-top { height: 40px; margin-bottom: 8px; font-weight: 500; }

/* 可折叠分组：标题行**与子项同规格**（38px / 带图标 / 正常字号），
   否则它会被当成"灰色小标题"、且左边缘与子项参差。
   展开 → 图标染主色（轻提示）；含当前页 → 整行浅蓝底高亮（父级高亮）。 */
.sider-group { margin-bottom: 2px; }
.sider-group-h {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 11px;
  margin-bottom: 2px;
  border-radius: var(--r-md);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  transition: background .15s ease, color .15s ease;
}
.sider-group-h:hover { background: #f1f5f9; }
.sider-group-h .sider-txt { flex: 1 1 auto; }
.sider-group-h.open .sider-ico { color: var(--primary); opacity: 1; }
.sider-group-h.has-active { background: var(--primary-soft); color: var(--primary); }
.sider-group-h.has-active:hover { background: var(--primary-100); }
.sider-group-h.has-active .sider-ico { color: var(--primary); opacity: 1; }

.sider-caret {
  font-size: 12px;
  line-height: 1;
  color: var(--text-3);
  transition: transform .18s ease, color .15s ease;
}
.sider-group-h:hover .sider-caret,
.sider-group-h.open .sider-caret,
.sider-group-h.has-active .sider-caret { color: currentColor; }
.sider-caret.folded { transform: rotate(-90deg); }

/* 子项缩进：图标不与父级同列、文字明显右移一级，层级一眼可辨 */
.sider-group-body { padding-left: 16px; }

.sider-foot {
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--text-3);
}

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

.topbar {
  height: var(--topbar-h);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 24px;
  justify-content: space-between;
  flex-shrink: 0;
  z-index: 5;
}
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-title {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: .2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-user { font-size: 13px; color: var(--text-2); flex-shrink: 0; display: flex; align-items: center; }
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  width: 34px; height: 34px;
  font-size: 16px;
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sider-mask { display: none; }

.content {
  flex: 1;
  overflow-y: auto;
  padding: 22px 24px 32px;
  scroll-behavior: smooth;
}

/* ---------- 卡片 / 通用控件 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--sh-2);
  margin-bottom: 16px;
}
.card-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}
.card-h .card-title {
  position: relative;
  padding-left: 11px;
}
.card-h .card-title::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 14px;
  border-radius: 2px;
  background: var(--primary);
}
.card-title { font-size: 15px; font-weight: 650; letter-spacing: .2px; }
.muted { color: var(--text-3); font-size: 12px; }

.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.between { display: flex; align-items: center; justify-content: space-between; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  line-height: 1.4;
  cursor: pointer;
  transition: background .14s ease, border-color .14s ease, box-shadow .14s ease, transform .08s ease;
  white-space: nowrap;
}
.btn:hover:not(:disabled) {
  background: var(--primary-deep);
  border-color: var(--primary-deep);
  box-shadow: 0 2px 8px rgba(37, 99, 235, .28);
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled,
.btn[disabled] { opacity: .55; cursor: not-allowed; box-shadow: none; }

.btn-ghost { background: #fff; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover:not(:disabled) {
  background: #f7f9fc;
  border-color: #c8d2e0;
  color: var(--text);
  box-shadow: var(--sh-1);
}
.btn-danger { background: var(--danger); border-color: var(--danger); }
.btn-danger:hover:not(:disabled) {
  background: #cf3a3f;
  border-color: #cf3a3f;
  box-shadow: 0 2px 8px rgba(229, 72, 77, .28);
}
.btn-sm { padding: 5px 11px; font-size: 12px; border-radius: var(--r-sm); }
.btn-link {
  background: transparent;
  color: var(--primary);
  border: none;
  padding: 5px 8px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  border-radius: var(--r-sm);
  transition: background .14s ease, color .14s ease;
}
.btn-link:hover:not(:disabled) { background: var(--primary-soft); }
.btn-link.danger { color: var(--danger); }
.btn-link.danger:hover:not(:disabled) { background: var(--danger-soft); }
.btn-link:disabled, .btn-link[disabled] { color: var(--text-3); cursor: not-allowed; background: transparent; }

/* ---------- 输入框 ---------- */
.input, .textarea, .select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color .14s ease, box-shadow .14s ease;
  font-family: inherit;
  line-height: 1.5;
}
.input::placeholder, .textarea::placeholder { color: #b3bdcc; }
.input:hover:not(:disabled), .textarea:hover:not(:disabled), .select:hover:not(:disabled) { border-color: #c3cddb; }
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .13);
}
.input:disabled, .textarea:disabled, .select:disabled {
  background: #f5f7fa;
  color: var(--text-2);
  cursor: not-allowed;
}
.textarea { min-height: 80px; resize: vertical; }
.label { font-size: 13px; color: var(--text-2); margin-bottom: 5px; }
.field { margin-bottom: 14px; }
.field .label { display: block; }

/* ---------- 表格 ---------- */
.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th, .table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  vertical-align: middle;
}
.table th {
  background: #f8fafc;
  color: var(--text-2);
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: .2px;
  white-space: nowrap;
}
.table th:first-child { border-top-left-radius: var(--r-md); }
.table th:last-child { border-top-right-radius: var(--r-md); }
.table tbody tr { transition: background .12s ease; }
.table tbody tr:hover { background: #f8fafc; }
.table tbody tr:last-child td { border-bottom: 0; }

/* ---------- 状态徽标 ---------- */
.tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.6;
  background: var(--primary-soft);
  color: var(--primary);
  white-space: nowrap;
}
.tag-green { background: var(--success-soft); color: var(--success); }
.tag-blue  { background: var(--primary-soft); color: var(--primary); }
.tag-orange { background: var(--warn-soft); color: #c2760a; }
.tag-gray { background: #f1f5f9; color: var(--text-2); }
.tag-red { background: var(--danger-soft); color: var(--danger); }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  animation: mask-in .16s ease-out;
}
.modal {
  width: 560px;
  max-width: 90vw;
  max-height: 86vh;
  background: #fff;
  border-radius: var(--r-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--sh-4);
  animation: modal-pop .18s cubic-bezier(.2, .8, .3, 1);
}
.modal-h {
  padding: 16px 20px;
  font-weight: 650;
  font-size: 15px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.modal-body { padding: 20px; overflow-y: auto; }
.modal-f {
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: #fbfcfe;
}
@keyframes mask-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-pop {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: none; }
}

/* 颜色色块预览 */
.swatch {
  display: inline-block;
  width: 36px; height: 22px;
  border-radius: 4px;
  border: 1px solid var(--line);
  vertical-align: middle;
}

/* 加载与空态 */
.loading { padding: 56px; text-align: center; color: var(--text-3); font-size: 13px; }
.loading::before {
  content: '';
  display: block;
  width: 26px; height: 26px;
  margin: 0 auto 12px;
  border-radius: 50%;
  border: 2.5px solid var(--line-strong);
  border-top-color: var(--primary);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty { padding: 60px; text-align: center; color: var(--text-3); font-size: 13px; }

/* ---------- 统计卡片 ---------- */
.stat {
  background: #fff;
  padding: 18px 20px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  border-left: 3px solid var(--primary);
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--sh-2);
  transition: box-shadow .18s ease, transform .18s ease;
}
.stat:hover { box-shadow: var(--sh-3); transform: translateY(-1px); }
.stat .v {
  font-size: 27px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.5px;
  color: var(--text);
}
.stat .k { font-size: 12.5px; color: var(--text-2); }
.stat.green { border-left-color: var(--success); }
.stat.orange { border-left-color: var(--warn); }
.stat.gray { border-left-color: var(--text-3); }
.stat.red { border-left-color: var(--danger); }

/* ---------- 图标统计卡（KPI）----------
   带「图标 + 数值 + 标签」的卡片，统计类页面首选。
   刻意另起 .kpi 而不改造 .stat：.stat 是无图标的老样式（靠左竖条区分），
   两者并存，改动 .kpi 不会波及仍在用 .stat 的页面。 */
.kpi {
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 15px 17px;
  box-shadow: var(--sh-2);
  transition: box-shadow .18s ease, transform .18s ease;
}
.kpi:hover { box-shadow: var(--sh-3); transform: translateY(-1px); }
.kpi-ico {
  width: 42px; height: 42px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.kpi-ico svg { width: 21px; height: 21px; }
.kpi-ico.blue   { background: var(--primary-soft); color: var(--primary); }
.kpi-ico.green  { background: var(--success-soft); color: var(--success); }
.kpi-ico.orange { background: var(--warn-soft);    color: #c2760a; }
.kpi-ico.gray   { background: #f1f5f9;             color: var(--text-2); }
.kpi-ico.red    { background: var(--danger-soft);  color: var(--danger); }
.kpi-body { min-width: 0; }
.kpi-v {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.4px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.kpi-v.ok  { color: var(--success); }
.kpi-v.neg { color: var(--danger); }
.kpi-k { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
/* 数值后缀单位（岁 / 天 / 单…）：比正文小、比标签深，跟数字拉开但同处一行 */
.kpi-u { margin-left: 3px; font-size: 13px; font-weight: 500; color: var(--text-2); }

/* 工具条 */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
}

/* 卡片入场：切页时轻微上浮，不影响重渲染 */
.content > .card, .content > .stat, .content > .grid-4 > .stat {
  animation: rise .22s ease-out both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- 图片上传 ---------- */
.cover-uploader { display: flex; align-items: flex-start; gap: 14px; }
.cover-preview {
  width: 140px; height: 100px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background-color: #f7f9fc;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cover-empty { font-size: 12px; color: var(--text-3); }
.cover-actions { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }

/* 详情图片网格 */
.shots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}
/* 「从图片库选」按钮：放在 .shots-grid 里但要横跨整行。
   不占满的话会被压成一个 110px 的小格，文字挤成两行。 */
.shot-lib {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 2px;
}
.shot-cell {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
}

/* 分类图标 / 封面的预览格。
   复用了 .shot-cell 的边框，但需要固定尺寸才看得出是不是图 ——
   .shot-cell 本身没有尺寸（它是给 .shot-thumb 做容器的），直接用会塌成一条线。 */
.cat-icon-cell {
  width: 44px;
  height: 44px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.cat-cover-cell {
  width: 260px;
  height: 120px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
/* 列表行里的小号封面格：.cat-cover-cell 是编辑弹窗里的大预览（260×120），
   直接塞进表格会把行撑成一条横幅，所以列表另用一个小尺寸变体。 */
.cat-cover-cell-sm {
  width: 64px;
  height: 32px;
  border-radius: 4px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* 兑换码：等宽 + 拉开字距。运营要靠肉眼逐字核对卡片和后台，
   比例字体的 0/O、1/l 看着几乎一样，等宽才不容易抄错。 */
.rc-code {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #f2f6fc;
  color: #1a1f2e;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  letter-spacing: 1px;
}
.shot-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #f7f9fc;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.cover-main-tag {
  position: absolute;
  top: 6px; left: 6px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(37, 99, 235, .92);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .5px;
}
.shot-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px;
  border-top: 1px solid var(--line);
  background: #fafbfd;
}
.shot-bar .btn-link { padding: 2px 6px; font-size: 13px; }
.shot-bar .btn-link[disabled] { color: var(--text-3); cursor: not-allowed; }
.shot-idx { font-size: 11px; color: var(--text-3); }
.shot-add {
  border: 1px dashed #c8cfdb;
  border-radius: var(--r-md);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  font-size: 13px;
  background: #fafbfd;
  cursor: pointer;
  transition: .12s;
}
.shot-add:hover { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); }

/* ---------- 移动端适配 ---------- */
@media (max-width: 900px) {
  /* 侧栏变抽屉 */
  .sider {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 1001;
    transform: translateX(-100%);
    transition: transform .22s cubic-bezier(.2, .8, .3, 1);
    box-shadow: 4px 0 24px rgba(0, 0, 0, .2);
  }
  .sider.open { transform: translateX(0); }
  .sider-mask {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .45);
    z-index: 1000;
    animation: mask-in .16s ease-out;
  }
  .menu-toggle { display: inline-flex; }

  .topbar { padding: 0 12px; }
  .content { padding: 14px 12px 28px; }
  .card { padding: 14px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

@media (max-width: 768px) {
  /* 宽表格在卡片内横向滚动，不撑破页面 */
  .card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table { min-width: 640px; }
  .table th, .table td { padding: 10px 10px; white-space: nowrap; }

  /* 工具条 / 筛选行允许换行 */
  .toolbar { flex-wrap: wrap; gap: 8px; }
  .row { gap: 8px; }

  /* 弹窗近全屏 */
  .modal-mask { align-items: flex-end; }
  .modal {
    width: 100%;
    max-width: 100vw;
    max-height: 92vh;
    border-radius: 14px 14px 0 0;
  }
  .modal-body { padding: 14px 16px; }
  .modal-h { padding: 14px 16px; }
  .modal-f { padding: 10px 16px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }

  /* 弹窗里并排的字段改为单列 */
  .modal .row > .field { flex: 1 1 100% !important; min-width: 100%; }

  /* iOS Safari：输入框字号 <16px 聚焦时会自动放大页面 */
  .input, .textarea, .select { font-size: 16px; }

  /* 顶栏精简 */
  .hide-sm { display: none; }
  .topbar-user .tag { display: none; }

  /* 统计卡片 */
  .stat .v { font-size: 22px; }

  /* 图片上传控件 */
  .cover-preview { width: 110px; height: 80px; }
  .shots-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
}

@media (max-width: 400px) {
  .grid-4 { grid-template-columns: 1fr; }
}
