/* ============================================================
   品境 Meridia · Admin APP 设计体系 v2（浅色 · 手机优先）
   ≥480 机框预览；≥960 左侧导航
   ============================================================ */

:root {
  --bg: #f2f4f7;
  --surface: #ffffff;
  --surface-2: #eceff3;
  --ink: #12161c;
  --ink-mid: #5a6472;
  --ink-dim: #8b95a5;
  --hairline: rgba(18, 22, 28, 0.08);
  --accent: #0ca389;
  --accent-deep: #0a8a74;
  --accent-soft: rgba(12, 163, 137, 0.12);
  --accent-ring: rgba(12, 163, 137, 0.18);
  --danger: #d3382f;
  --danger-soft: #fdeceb;

  --r-card: 12px;
  --shadow-card-hover: 0 6px 20px rgba(18, 22, 28, 0.08);
  --row-hover: #f4fbf9;
  --r-input: 14px;
  --r-chip: 11px;
  --app-max: 430px;
  --page-max: 720px;

  --shadow-card: 0 1px 1px rgba(18, 22, 28, 0.03), 0 8px 24px rgba(18, 22, 28, 0.045);
  --shadow-cta: 0 8px 20px rgba(12, 163, 137, 0.26);
  --shadow-float: 0 12px 40px rgba(18, 22, 28, 0.12);

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-soft: cubic-bezier(.22, 1, .36, 1);
  --dur-press: .12s;
  --dur-ui: .2s;
  --dur-sheet: .28s;
  --focus-ring: 0 0 0 3px var(--accent-ring);

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tab-h: 64px;
  --app-pad-x: 16px;
  --app-pad-y: 12px;
  --section-gap: 18px;

  --font: -apple-system, "SF Pro Text", "PingFang SC", "HarmonyOS Sans SC",
          "MiSans", "Segoe UI", "Microsoft YaHei", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body.admin-app {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}

/* 调试工具条不参与 UI */
#think_page_trace, #think_page_trace_open { display: none !important; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}

/* ============================================================
   登录页 · 全屏 APP 构图
   ============================================================ */

.login-screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(20px + var(--safe-top)) 22px calc(24px + var(--safe-bottom));
  background:
    radial-gradient(480px 320px at 50% -80px, rgba(12, 163, 137, 0.08), transparent 70%),
    linear-gradient(180deg, #eef2f5 0%, var(--bg) 42%);
}

.login-inner {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.login-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: clamp(28px, 10vh, 72px);
  margin-bottom: clamp(20px, 5vh, 36px);
  animation: rise .5s cubic-bezier(.16, 1, .3, 1) both;
}

.login-card {
  padding: 18px 16px 16px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: calc(var(--r-card) + 2px);
  box-shadow: var(--shadow-card);
  animation: rise .5s cubic-bezier(.16, 1, .3, 1) .05s both;
}

.brand-mark { display: block; filter: drop-shadow(0 8px 16px rgba(12, 163, 137, 0.16)); }

.login-hero h1 {
  margin: 18px 0 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-indent: 0.12em; /* 抵消字距造成的偏移 */
}

.login-hero .brand-en {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.login-hero .login-tagline {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--ink-mid);
}

.login-portal-badge {
  display: inline-block;
  margin: 14px 0 0;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--accent-deep);
  background: var(--accent-soft);
}
.login-portal-badge.is-boss {
  color: #6b5a3e;
  background: rgba(180, 140, 70, 0.16);
}

.login-alert {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: var(--r-input);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 13.5px;
  line-height: 1.5;
  animation: rise .3s ease both;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-field {
  position: relative;
  display: flex;
  align-items: center;
}

.login-field .field-icon {
  position: absolute;
  left: 18px;
  width: 20px;
  height: 20px;
  color: var(--ink-dim);
  pointer-events: none;
  transition: color .18s ease;
}

.login-field input {
  width: 100%;
  height: 50px;
  padding: 0 52px;
  border: 1.5px solid transparent;
  border-radius: var(--r-input);
  background: var(--surface-2);
  font-size: 16px;
  color: var(--ink);
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.login-field input::placeholder { color: var(--ink-dim); }

.login-field input:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

.login-field input:focus ~ .field-icon,
.login-field:focus-within .field-icon { color: var(--accent); }

.eye-toggle {
  position: absolute;
  right: 8px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--ink-dim);
  border-radius: 12px;
  cursor: pointer;
}
.eye-toggle:active { transform: scale(.92); }
.eye-toggle svg { width: 21px; height: 21px; }
.eye-toggle .eye-off { display: none; }
.eye-toggle[data-on="1"] .eye-on { display: none; }
.eye-toggle[data-on="1"] .eye-off { display: block; }

.login-submit,
.form-submit {
  margin-top: 10px;
  height: 54px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 16.5px;
  font-weight: 700;
  width: 100%;
  letter-spacing: 0.14em;
  text-indent: 0.14em;
  cursor: pointer;
  box-shadow: var(--shadow-cta);
  transition: transform .12s ease, box-shadow .18s ease, filter .18s ease;
}
.form-submit {
  margin-top: 4px;
  height: 48px;
  font-size: 15.5px;
  letter-spacing: 0;
  text-indent: 0;
}
.login-submit.is-quiet {
  margin-top: 10px;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  border: 1.5px solid var(--hairline);
  letter-spacing: 0;
  text-indent: 0;
}
.login-submit:hover,
.form-submit:hover { filter: brightness(1.04); }
.login-submit:active,
.form-submit:active {
  transform: scale(.97);
  background: var(--accent-deep);
  box-shadow: 0 4px 12px rgba(12, 163, 137, 0.24);
}
.login-submit.is-quiet:hover { filter: none; background: var(--surface-2); }
.login-submit.is-quiet:active {
  background: var(--surface-2);
  box-shadow: none;
}

.login-foot {
  margin-top: auto;
  padding-top: 32px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-dim);
}

.auth-switch {
  margin: 18px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--ink-mid);
}
.auth-switch a {
  color: var(--accent-deep);
  font-weight: 700;
}

.auth-back {
  position: absolute;
  top: calc(12px + var(--safe-top));
  left: 16px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(23, 27, 33, 0.05), 0 4px 14px rgba(23, 27, 33, 0.04);
  z-index: 2;
}
.auth-back svg { width: 22px; height: 22px; margin-left: -1px; }
.auth-back:active { transform: scale(.92); background: var(--accent-soft); color: var(--accent-deep); }

.login-screen { position: relative; }
.login-hero.compact { padding-top: clamp(28px, 8vh, 64px); margin-bottom: clamp(20px, 4vh, 36px); }
.login-hero.compact h1 { font-size: 24px; letter-spacing: 0.06em; text-indent: 0.06em; }

/* ============================================================
   APP 壳 · 顶栏 / 内容 / 底部 Tab / 桌面侧栏
   ============================================================ */

.app-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(12px + var(--safe-top)) 20px 12px;
  background: rgba(244, 246, 248, 0.86);
  backdrop-filter: saturate(1.6) blur(18px);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid var(--hairline);
}

.app-avatar {
  width: 42px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  text-transform: uppercase;
}

.app-greet { flex: 1; min-width: 0; }
.app-greet .hi {
  margin: 0;
  font-size: 16.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-greet .date {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--ink-dim);
}

.icon-btn {
  width: 42px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink-mid);
  box-shadow: 0 1px 2px rgba(23, 27, 33, 0.05);
  cursor: pointer;
  transition: transform .12s ease, color .15s ease;
}
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 20px; height: 20px; }

.app-main {
  flex: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: calc(var(--app-pad-y) + var(--safe-top)) var(--app-pad-x) calc(var(--app-pad-y) + var(--tab-h) + var(--safe-bottom));
}
/* 与默认顶距统一（保留 class，避免旧页失效） */
.app-main--flush-top {
  padding-top: calc(var(--app-pad-y) + var(--safe-top));
}

/* 平板：三端统一机框预览 */
@media (min-width: 480px) and (max-width: 959px) {
  body.admin-app:not(.storefront-app) {
    background: #e4e9ef;
  }
  body.admin-app:not(.storefront-app) .app-shell {
    max-width: var(--app-max);
    margin: 0 auto;
    min-height: 100dvh;
    background: var(--bg);
    box-shadow:
      0 0 0 1px rgba(18, 22, 28, 0.06),
      0 28px 72px rgba(18, 22, 28, 0.12);
  }
  body.admin-app:not(.storefront-app) .tab-bar {
    left: 50%;
    right: auto;
    width: min(var(--app-max), 100%);
    transform: translateX(-50%);
  }
}

.section-title {
  margin: 18px 2px 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
}
.section-title:first-child { margin-top: 0; }

/* 统计卡 */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.stat-grid--3 {
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.stat-grid--3 .stat-card {
  padding: 12px 10px;
}
.stat-grid--3 .stat-chip {
  width: 28px;
  height: 28px;
  margin-bottom: 10px;
  border-radius: 9px;
}
.stat-grid--3 .stat-chip svg { width: 15px; height: 15px; }
.stat-grid--3 .stat-value { font-size: 20px; }
.stat-grid--3 .stat-label { font-size: 11px; }

/* 首页 · 今日英雄数字 + 扁平指标条 */
.home-today {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.home-hero {
  padding: 18px 18px 16px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}
.home-hero-label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-dim);
  letter-spacing: 0.04em;
}
.home-hero-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}
.home-hero-value {
  margin: 0;
  font-family: var(--mono);
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.home-hero-row .trend-kpi-delta {
  flex: none;
  align-self: center;
}

.home-metrics {
  display: grid;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.home-metrics--3 { grid-template-columns: repeat(3, 1fr); }
.home-metrics--2 { grid-template-columns: repeat(2, 1fr); }
.home-metrics--4 { grid-template-columns: repeat(2, 1fr); }
.home-metrics--1 { grid-template-columns: 1fr; }
.home-metric {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 14px 12px;
  color: inherit;
  min-width: 0;
  text-decoration: none;
  transition: background var(--dur-press) var(--ease-soft);
}
.home-metrics--3 .home-metric + .home-metric,
.home-metrics--2 .home-metric + .home-metric,
.home-metrics--1 .home-metric + .home-metric {
  border-left: 1px solid var(--hairline);
}
.home-metrics--4 .home-metric:nth-child(odd) {
  border-right: 1px solid var(--hairline);
}
.home-metrics--4 .home-metric:nth-child(n + 3) {
  border-top: 1px solid var(--hairline);
}
a.home-metric:active { background: var(--row-hover); }
.home-metric-value {
  margin: 0;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.home-metric-label {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-dim);
}

/* 首页 · 名录卡 */
.home-link-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 2px;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.home-link-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 12px 14px 12px 16px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}
.home-link-main { flex: 1; min-width: 0; }
.home-link-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.home-link-path {
  margin: 2px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-link-actions {
  display: flex;
  flex: none;
  gap: 4px;
  align-items: center;
}
.home-link-ttl {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink-dim);
  white-space: nowrap;
}
.home-link-ttl[hidden] { display: none !important; }

.dir-fold-gallery-link {
  margin: 0;
  padding: 0 14px;
  min-height: 44px;
  border-top: 0;
  border-bottom: 1px solid var(--hairline);
}
.dir-fold-gallery-link .home-link-title {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink-mid);
}
.dir-fold-gallery-link .home-link-path {
  display: none;
}
.contact-view {
  align-items: flex-start;
}
.contact-view .contact-text {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.contact-view .contact-empty {
  margin: 0;
  font-family: inherit;
  font-size: 14px;
  white-space: normal;
}
.form-actions-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}
#ttlPresets.form-actions-row {
  flex-wrap: wrap;
  gap: 6px;
}
.form-actions-row .btn-ghost {
  flex: 0 0 auto;
  height: 48px;
  padding: 0 16px;
}
.form-submit--inline {
  flex: 1;
  margin-top: 0;
}
.btn-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--accent-deep);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
.btn-text.is-muted { color: var(--ink-mid); font-weight: 600; }
@media (hover: hover) {
  .btn-text:hover { background: var(--accent-soft); }
}
.btn-text:active { background: var(--accent-soft); }
.btn-text:disabled,
.btn-text[aria-disabled="true"] {
  color: #b0b8c2;
  background: transparent;
  pointer-events: none;
}

/* 首页 · 近7日卡 */
.home-trend {
  margin: 0;
  padding: 16px 16px 10px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}
.home-trend-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 20px;
  margin-bottom: 10px;
}
.home-trend-kpis--1 {
  grid-template-columns: 1fr;
}
.home-trend-kpi {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 8px;
  min-width: 0;
}
.home-trend-kpi-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-dim);
}
.home-trend-kpi-value {
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.home-trend-kpi-hint {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-dim);
}
.home-trend .trend-kpi-delta {
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
}
.home-trend .home-trend-chart,
.home-trend .trend-echart {
  height: 168px;
  min-height: 168px;
}
@media (min-width: 960px) {
  .home-trend .home-trend-chart,
  .home-trend .trend-echart {
    height: 200px;
    min-height: 200px;
  }
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: 14px;
  box-shadow: var(--shadow-card);
  animation: rise .45s cubic-bezier(.16, 1, .3, 1) both;
}
.stat-card.is-muted { opacity: 0.72; }
.stat-card:nth-child(2) { animation-delay: .04s; }
.stat-card:nth-child(3) { animation-delay: .08s; }
.stat-card:nth-child(4) { animation-delay: .12s; }

.stat-chip {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 12px;
}
.stat-chip svg { width: 17px; height: 17px; }

.stat-value {
  margin: 0;
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat-value.is-empty { color: var(--ink-dim); }
.stat-value.is-text {
  font-family: var(--font);
  font-size: 22px;
  text-transform: uppercase;
}

.stat-label {
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-dim);
}

/* 快捷操作列表 */
.action-list {
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  animation: rise .45s cubic-bezier(.16, 1, .3, 1) .1s both;
}

.action-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 15px 18px;
  border: 0;
  background: transparent;
  text-align: left;
  font-size: 15px;
  color: var(--ink);
  cursor: default;
}
.action-row + .action-row { border-top: 1px solid var(--hairline); }

.action-ico {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink-mid);
}
.action-ico svg { width: 19px; height: 19px; }

.action-text { flex: 1; min-width: 0; }
.action-text .t { margin: 0; font-weight: 600; font-size: 15px; }
.action-text .d { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-dim); }

.action-soon {
  flex: none;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-dim);
  background: var(--surface-2);
  border-radius: 999px;
  padding: 4px 10px;
}

/* 底部 Tab（手机）：实色，不毛玻璃、不上投影 */
.tab-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  gap: 2px;
  padding: 8px 8px calc(8px + var(--safe-bottom));
  background: var(--surface);
  border-top: 1px solid var(--hairline);
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 7px 4px 5px;
  border: 0;
  background: transparent;
  border-radius: 14px;
  color: var(--ink-dim);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: color var(--dur-ui) var(--ease-soft), transform var(--dur-press) var(--ease-soft);
}
.tab-item svg { width: 22px; height: 22px; }
.tab-item:active { transform: scale(.94); }
.tab-item.is-active {
  color: var(--accent-deep);
  background: transparent;
  font-weight: 700;
}
.tab-item.is-active svg { stroke-width: 2.15; }
.tab-item.is-soon { opacity: .5; cursor: default; }

/* 列表页新建 FAB（底栏上方圆形 +） */
.fab-add {
  position: fixed;
  z-index: 45;
  right: 16px;
  bottom: calc(14px + var(--tab-h) + var(--safe-bottom));
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  box-shadow:
    0 4px 14px rgba(12, 163, 137, 0.28),
    0 10px 28px rgba(18, 22, 28, 0.12);
  transition: transform var(--dur-press) var(--ease-soft), background var(--dur-ui) var(--ease-soft), box-shadow var(--dur-ui) var(--ease-soft);
}
.fab-add svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.2;
}
.fab-add:active {
  transform: scale(.94);
  background: var(--accent-deep);
}
.fab-add:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 3px;
}

@media (min-width: 480px) and (max-width: 959px) {
  body.admin-app:not(.storefront-app) .fab-add {
    right: max(16px, calc(50% - var(--app-max) / 2 + 16px));
  }
}

@media (min-width: 960px) {
  .fab-add {
    right: 28px;
    bottom: calc(28px + var(--safe-bottom));
  }
}

/* 桌面 ≥960px：侧栏替换 Tab */
.side-rail { display: none; }

@media (min-width: 960px) {
  .app-shell {
    flex-direction: row;
    align-items: stretch;
  }

  .side-rail {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 232px;
    flex: none;
    position: sticky;
    top: 0;
    height: 100dvh;
    padding: 24px 16px;
    background: var(--surface);
    border-right: 1px solid var(--hairline);
  }

  .rail-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 10px 20px;
  }
  .rail-brand .brand-mark { filter: none; }
  .rail-brand .rail-zh { font-size: 16px; font-weight: 700; letter-spacing: 0.06em; }
  .rail-brand .rail-en { font-size: 11px; font-weight: 600; letter-spacing: 0.18em; color: var(--ink-dim); }

  .rail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-mid);
    transition: background .15s ease, color .15s ease;
  }
  .rail-item svg { width: 20px; height: 20px; }
  .rail-item:hover { background: var(--surface-2); color: var(--ink); }
  .rail-item.is-active { color: var(--accent-deep); background: var(--accent-soft); }
  .rail-item.is-soon { opacity: .45; cursor: default; }

  .shell-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .app-main { max-width: var(--page-max); margin: 0 auto; padding: 28px 28px 40px; }
  .app-main--flush-top { padding-top: 28px; }
  .tab-bar { display: none; }
}

/* 动效 */
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .login-hero, .login-form, .login-alert,
  .stat-card, .action-list { animation: none; }
  .login-submit:active, .icon-btn:active,
  .tab-item:active, .eye-toggle:active, .fab-add:active,
  .qty-chip:active .qty-chip-face { transform: none; }
}

/* ============================================================
   列表 / 表单 / 空状态（Phase 2）
   ============================================================ */

/* 食谱 A：页标题 + 控制条 + 标准行 */
.page-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
}
.page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 var(--section-gap);
}
.page-toolbar--end {
  justify-content: flex-end;
}
.page-toolbar .page-sub {
  margin: 0;
  flex: 1;
  min-width: 0;
}
.page-toolbar .btn-pill {
  flex: none;
  height: 36px;
  padding: 0 16px;
  font-size: 13.5px;
}

.app-section {
  margin: 0 0 var(--section-gap);
}
.app-section:last-child { margin-bottom: 0; }
/* 首块顶距只由 app-main padding 决定 */
.app-main > .app-section:first-child,
.app-main > .page-head:first-child,
.app-main > .page-control:first-child,
.app-main > .page-nav:first-child,
.app-main > .m-page-head:first-child,
.app-main > .page-toolbar:first-child,
.app-main > .toast-ok + .app-section,
.app-main > .toast-err + .app-section,
.app-main > .toast-ok + .toast-err + .app-section,
.app-main > .login-alert + .app-section {
  margin-top: 0;
}
.app-section-label {
  margin: 0 2px 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
}
.app-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.app-section-head .app-section-label { margin: 0 2px; }

.page-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--ink);
}
.page-count {
  margin: 0;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
}
.page-control {
  height: 48px;
  margin: 0 0 var(--section-gap);
}
.page-control .sf-search {
  height: 48px;
}
.page-control .sf-search input[type="search"],
.page-control .sf-search input[type="text"],
.page-control .sf-search .btn-pill,
.page-control .shop-code-search-btn {
  height: 48px;
  line-height: 48px;
}
.page-control .key-stats {
  height: 48px;
  gap: 6px;
  margin: 0;
}
.page-control .key-stat {
  height: 48px;
  padding: 0 4px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}
.page-control .key-stat .n {
  font-size: 15px;
}
.page-control .key-stat .l {
  margin: 2px 0 0;
  font-size: 10px;
}
.list-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.list-group + .list-group {
  margin-top: 10px;
}
.list-group-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 0 2px 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
}
.list-group-count {
  font-family: var(--mono);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.dir-fold {
  margin: 0;
}
.dir-fold--prov {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.dir-fold-sum {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 14px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background var(--dur-press) var(--ease-soft);
}
.dir-fold-sum::-webkit-details-marker,
.dir-fold-sum::marker {
  display: none;
  content: "";
}
.dir-fold-chevron {
  display: flex;
  flex-shrink: 0;
  color: var(--ink-dim);
  transition: transform var(--dur-sheet) var(--ease-soft);
}
.dir-fold-chevron .pm-icon {
  width: 16px;
  height: 16px;
}
.dir-fold[open] > .dir-fold-sum > .dir-fold-chevron {
  transform: rotate(90deg);
}
.dir-fold-panel {
  overflow: hidden;
}
.dir-fold-name {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.dir-fold-count {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink-dim);
}
.dir-fold--prov[open] > .dir-fold-sum {
  border-bottom: 1px solid var(--hairline);
  background: var(--row-hover);
}
.dir-fold--prov > .dir-fold-panel > .dir-fold-body:not(.dir-fold-body--shops) {
  margin: 0;
  padding: 0;
  border-left: 0;
}
.dir-fold--city[open] {
  background: transparent;
}
.dir-fold--city + .dir-fold--city,
.dir-fold--dist + .dir-fold--dist {
  border-top: 1px solid var(--hairline);
}
.dir-fold--city > .dir-fold-sum {
  min-height: 48px;
  padding-left: 14px;
}
.dir-fold--city > .dir-fold-sum .dir-fold-name {
  font-size: 15px;
  font-weight: 650;
  color: var(--ink);
}
.dir-fold--city > .dir-fold-panel > .dir-fold-body:not(.dir-fold-body--shops) {
  margin: 0;
  padding: 0;
  border-left: 0;
}
.dir-fold--dist > .dir-fold-sum {
  min-height: 40px;
  padding-left: 4px;
}
.dir-fold--dist > .dir-fold-sum .dir-fold-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-mid);
}
.dir-fold-body--shops {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  background: transparent;
}
.dir-fold-body--shops .list-row {
  position: relative;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--hairline);
  border-radius: 0;
  box-shadow: none;
}
.dir-fold-body--shops .list-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--accent);
}
.dir-fold-body--shops .list-row:has(.status-pill.is-off)::before,
.dir-fold-body--shops .list-row:has(.status-pill.is-muted)::before {
  background: var(--ink-dim);
}
.dir-fold-body--shops .list-row.is-unlisted .list-row-title {
  color: var(--ink-mid);
  font-weight: 650;
}
.list-row[hidden],
.dir-fold[hidden],
.profile-info-row[hidden] {
  display: none !important;
}
.dir-fold-body--shops .status-pill {
  font-size: 0;
  line-height: 0;
  gap: 0;
  width: 6px;
  height: 6px;
  overflow: hidden;
  color: transparent;
}
@media (hover: hover) {
  .dir-fold-sum:hover { background: var(--row-hover); }
}
.dir-fold-sum:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
@media (prefers-reduced-motion: reduce) {
  .dir-fold-chevron,
  .dir-fold-panel {
    transition: none;
  }
}
.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  width: 100%;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  text-align: left;
  transition: background var(--dur-press) var(--ease-soft);
}
.list-row-main { flex: 1; min-width: 0; }
.list-row-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  word-break: break-word;
}
.list-row-title.mono {
  font-family: var(--mono);
  letter-spacing: 0.04em;
}
.list-row-meta {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--ink-dim);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-row.is-hit {
  background: var(--accent-soft);
  box-shadow: 0 0 0 1.5px rgba(12, 163, 137, 0.28), var(--shadow-card);
}
@media (hover: hover) {
  .list-row:hover { background: var(--row-hover); }
  .list-row.is-hit:hover { background: var(--accent-soft); }
}
.list-row:active { background: var(--row-hover); }
.list-row.is-hit:active { background: var(--accent-soft); }

.sheet-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: 14px;
}
.gallery-sheet .gallery-sheet-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}
.gallery-sheet .gallery-sheet-path {
  margin: 4px 0 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-dim);
  word-break: break-all;
}
.gallery-sheet .entity-actions {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
}
.gallery-sheet--compact {
  padding: 12px 12px;
}
.gallery-sheet--compact .gallery-sheet-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.gallery-sheet--compact .gallery-sheet-main {
  flex: 1;
  min-width: 0;
}
.gallery-sheet--compact .gallery-sheet-title {
  font-size: 14px;
}
.gallery-sheet--compact .gallery-sheet-path {
  margin: 2px 0 0;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
}
.gallery-sheet--compact .gallery-sheet-actions {
  display: flex;
  flex: none;
  gap: 6px;
  align-items: center;
}
.page-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.page-sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--ink-dim);
}

/* 子页顶栏：左上角返回 + 居中标题 */
.page-nav {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 8px;
  margin: 0 0 var(--section-gap);
  min-height: 44px;
}
.back-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(23, 27, 33, 0.05), 0 4px 14px rgba(23, 27, 33, 0.04);
  transition: transform .12s ease, background .15s ease, color .15s ease;
}
.back-btn svg {
  width: 22px;
  height: 22px;
  margin-left: -1px;
}
.back-btn:active {
  transform: scale(.92);
  background: var(--accent-soft);
  color: var(--accent-deep);
}
.page-nav-center {
  min-width: 0;
  text-align: center;
}
.page-nav-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.page-nav-sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--ink-dim);
}
.page-nav-slot {
  width: 44px;
  height: 44px;
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: none;
  white-space: nowrap;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
@media (hover: hover) {
  .btn-pill:hover { background: var(--accent-deep); }
}
.btn-pill:active { transform: scale(.97); }
.btn-pill:disabled,
.btn-pill[aria-disabled="true"] {
  background: #c9d0d6;
  pointer-events: none;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 12px;
  border: 1.4px solid var(--hairline);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
}
@media (hover: hover) {
  .btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent-deep);
    background: var(--accent-soft);
  }
}
.btn-ghost:active { transform: scale(.97); }
.btn-ghost:disabled,
.btn-ghost[aria-disabled="true"] {
  color: #b0b8c2;
  border-color: #d5dae0;
  background: transparent;
  pointer-events: none;
}

.btn-danger-outline {
  width: 100%;
  height: 48px;
  border: 1.5px solid rgba(211, 56, 47, 0.28);
  border-radius: 999px;
  background: transparent;
  color: var(--danger);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.btn-danger-outline:active { transform: scale(.98); }

.toast-ok,
.toast-err {
  position: fixed;
  left: 50%;
  bottom: calc(78px + var(--safe-bottom));
  z-index: 95;
  margin: 0;
  max-width: min(86vw, 340px);
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
  text-align: center;
  color: #fff;
  pointer-events: none;
  transform: translate(-50%, 12px);
  opacity: 0;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 28px rgba(18, 22, 28, 0.18);
  animation: pm-toast-in .22s ease forwards;
}
.toast-ok {
  background: rgba(18, 28, 26, 0.78);
}
.toast-err {
  background: rgba(140, 36, 32, 0.86);
}
.toast-ok.is-leaving,
.toast-err.is-leaving {
  animation: pm-toast-out .35s ease forwards;
}
@keyframes pm-toast-in {
  from { opacity: 0; transform: translate(-50%, 14px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes pm-toast-out {
  from { opacity: 1; transform: translate(-50%, 0); }
  to { opacity: 0; transform: translate(-50%, 8px); }
}
@media (min-width: 960px) {
  .toast-ok,
  .toast-err {
    bottom: calc(36px + var(--safe-bottom));
  }
}

.empty-state {
  margin-top: 8px;
  padding: 36px 20px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}
.empty-state--inset { margin-top: 0; }
.empty-ico {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
}
.empty-ico svg { width: 22px; height: 22px; }
.empty-t { margin: 0; font-size: 16px; font-weight: 700; }
.empty-d { margin: 6px 0 16px; font-size: 13px; color: var(--ink-dim); }

.entity-list { display: flex; flex-direction: column; gap: 8px; }
.entity-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: 14px;
  min-height: 56px;
  box-shadow: var(--shadow-card);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
@media (hover: hover) {
  .entity-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
    background: var(--row-hover);
  }
}
.entity-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.entity-main { min-width: 0; flex: 1; }
.entity-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  word-break: break-word;
}
.entity-title.mono { font-family: var(--mono); letter-spacing: 0.04em; }
.entity-meta {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--ink-dim);
  line-height: 1.4;
}
.entity-meta .slug { font-family: var(--mono); }
.entity-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
}
.entity-actions--tight { gap: 6px; }
.inline-form { display: inline; margin: 0; }

.status-pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 650;
  border-radius: 0;
  padding: 0;
  line-height: 1.2;
  background: transparent;
  color: var(--ink-mid);
}
.status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-dim);
  flex: none;
}
.status-pill.is-on { color: var(--ink-mid); }
.status-pill.is-on::before { background: var(--accent); }
.status-pill.is-off { color: var(--ink-mid); }
.status-pill.is-off::before { background: var(--ink-dim); }
.status-pill.is-muted { color: var(--ink-mid); }
.status-pill.is-muted::before { background: #c4cad2; }

.app-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: rise .4s cubic-bezier(.16, 1, .3, 1) both;
}
.app-form[hidden] {
  display: none !important;
}
.app-form:not(.m-sheet) {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}
.app-form:not(.m-sheet) .form-field input,
.app-form:not(.m-sheet) .form-field textarea,
.app-form:not(.m-sheet) .form-field select {
  background: #f2f4f7;
  border-color: transparent;
}
.app-form:not(.m-sheet) .form-field input:focus,
.app-form:not(.m-sheet) .form-field textarea:focus,
.app-form:not(.m-sheet) .form-field select:focus {
  background: #fff;
  border-color: var(--accent);
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-field[hidden] {
  display: none !important;
}
.form-field > span {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-mid);
}
.form-field > span em {
  font-style: normal;
  font-weight: 500;
  color: var(--ink-dim);
  margin-left: 6px;
}
.form-field input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-input);
  background: var(--surface);
  font-size: 16px;
  color: var(--ink);
  transition: background var(--dur-ui) var(--ease-soft), border-color var(--dur-ui) var(--ease-soft), box-shadow var(--dur-ui) var(--ease-soft);
}
.form-field input:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}
.form-field textarea,
.form-field select {
  width: 100%;
  border: 1px solid var(--hairline);
  border-radius: var(--r-input);
  background: var(--surface);
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  resize: vertical;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.form-field select {
  height: 48px;
  padding-top: 0;
  padding-bottom: 0;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink-dim) 50%),
    linear-gradient(135deg, var(--ink-dim) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  background-color: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.form-readonly {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-input);
  background: var(--bg);
  font: inherit;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}
.form-readonly.is-empty {
  color: var(--ink-dim);
}
.form-field select:focus {
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink-dim) 50%),
    linear-gradient(135deg, var(--ink-dim) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

/* 数量分段选择（替代原生 select 弹出层） */
.qty-chips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.qty-chip {
  position: relative;
  margin: 0;
  cursor: pointer;
}
.qty-chip input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.qty-chip .qty-chip-face {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  border-radius: var(--r-input);
  background: #f2f4f7;
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  border: 1.5px solid transparent;
  transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.qty-chip:active .qty-chip-face {
  transform: scale(.97);
}
.qty-chip input:checked + .qty-chip-face {
  background: var(--accent-soft);
  color: var(--accent-deep);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.qty-chip input:focus-visible + .qty-chip-face {
  outline: 2px solid var(--accent-deep);
  outline-offset: 2px;
}

/* 地区三栏 */
.region-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.region-cell { display: block; margin: 0; }
.region-cell input,
.region-cell select {
  width: 100%;
  height: 48px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--r-input);
  background: #f2f4f7;
  font-size: 15px;
  color: var(--ink);
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.region-cell select {
  appearance: none;
  padding-right: 28px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink-dim) 50%),
    linear-gradient(135deg, var(--ink-dim) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 8px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  background-color: #f2f4f7;
}
.region-cell input:focus,
.region-cell select:focus {
  outline: none;
  background-color: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.region-cell select:focus {
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink-dim) 50%),
    linear-gradient(135deg, var(--ink-dim) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 8px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

/* 店铺目录树：省 / 市 / 区 / 店名 */
.dir-tree {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dir-node {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform .16s ease, box-shadow .16s ease;
}
@media (hover: hover) {
  .dir-node--prov:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
  }
}
.dir-node--city,
.dir-node--dist,
.dir-node--shop {
  box-shadow: none;
  border-radius: var(--r-card);
}
.dir-kids {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 10px 10px 12px;
}
.dir-kids--shops {
  gap: 6px;
}
.dir-node--city {
  background: #f7f8fa;
  border-color: rgba(18, 22, 28, 0.06);
}
.dir-node--dist {
  background: var(--surface);
}
.dir-node--shop {
  background: var(--surface);
}
.dir-sum {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 10px 14px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.dir-sum::-webkit-details-marker { display: none; }
.dir-sum::marker { content: ''; }
.dir-chev {
  flex: none;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--ink-dim);
  border-bottom: 2px solid var(--ink-dim);
  transform: rotate(-45deg);
  transition: transform .18s ease;
  margin-top: -2px;
}
.dir-node[open] > .dir-sum > .dir-chev {
  transform: rotate(45deg);
  margin-top: 0;
}
.dir-label {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 650;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dir-node--prov > .dir-sum .dir-label {
  font-size: 15.5px;
  font-weight: 700;
}
.dir-node--shop > .dir-sum .dir-label {
  font-weight: 650;
}
.dir-count {
  flex: none;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-dim);
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.dir-sum--shop .status-pill {
  flex: none;
  margin-left: 2px;
}
@media (hover: hover) {
  .dir-sum:hover { background: var(--row-hover); }
}
.dir-shop-body {
  padding: 0 12px 12px 34px;
}
.dir-shop-meta {
  margin: 0 0 10px;
  font-size: 12.5px;
  color: var(--ink-dim);
  font-weight: 500;
}
.dir-shop-meta .slug {
  font-family: var(--mono);
  font-size: 12px;
}
.dir-shop-contact {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-2);
}
.dir-shop-contact--hit {
  margin-top: 10px;
}
.dir-shop-contact-main {
  min-width: 0;
  flex: 1;
}
.dir-shop-contact-label {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
}
.dir-shop-contact-text {
  margin: 0;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
}
.dir-shop-contact-empty {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-dim);
}
.dir-shop-contact .btn-text {
  flex: none;
  align-self: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-deep);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.dir-shop-contact .btn-text:active {
  opacity: .7;
}

/* 店铺橱窗页内预览 */
body.shop-preview-open {
  overflow: hidden;
}
.shop-preview {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.shop-preview[hidden] {
  display: none !important;
}
.shop-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 22, 28, 0.45);
}
.shop-preview-sheet {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(100%, 420px);
  height: min(92dvh, 780px);
  margin: 0 auto;
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  box-shadow: var(--shadow-float);
  overflow: hidden;
}
.shop-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: none;
  padding: 14px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--hairline);
}
.shop-preview-title {
  margin: 0;
  font-size: 15px;
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shop-preview-close {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink);
  cursor: pointer;
}
.shop-preview-close:active {
  transform: scale(.94);
}
.shop-preview-close .pm-icon {
  width: 18px;
  height: 18px;
}
.shop-preview-frame {
  flex: 1;
  min-height: 0;
  background: var(--bg);
}
.shop-preview-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: var(--bg);
}
@media (min-width: 720px) {
  .shop-preview {
    align-items: center;
    padding: 24px;
  }
  .shop-preview-sheet {
    border-radius: 20px;
    height: min(86dvh, 760px);
  }
}

body.product-peek-open { overflow: hidden; }
.product-peek {
  position: fixed;
  inset: 0;
  z-index: 190;
  display: grid;
  place-items: end center;
}
.product-peek[hidden] { display: none !important; }
.product-peek-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 22, 28, 0.46);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: pmFade var(--dur-ui) ease both;
}
.product-peek-sheet {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--app-max);
  max-height: min(86dvh, 680px);
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  box-shadow: var(--shadow-float);
  animation: pmSheetUp var(--dur-sheet) var(--ease-out) both;
}
.product-peek-sheet::before {
  content: "";
  display: block;
  width: 36px;
  height: 4px;
  margin: 10px auto 0;
  border-radius: 999px;
  background: rgba(18, 22, 28, 0.12);
  flex: none;
}
.product-peek-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: none;
  padding: 10px 16px 8px;
}
.product-peek-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-peek-close {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink);
  cursor: pointer;
}
.product-peek-close:active { transform: scale(.94); }
.product-peek-close .pm-icon { width: 18px; height: 18px; }
.product-peek-body {
  overflow: auto;
  padding: 0 20px calc(18px + var(--safe-bottom));
}
.product-peek-media {
  margin: 4px 0 12px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-2);
  aspect-ratio: 4 / 3;
}
.product-peek-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-peek-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: -4px 0 12px;
  padding-bottom: 4px;
}
.product-peek-thumb {
  flex: none;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-2);
}
.product-peek-thumb.is-on { border-color: var(--accent); }
.product-peek-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-peek-kicker,
.product-peek-status,
.product-peek-sub {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--ink-dim);
}
.product-peek-price {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 750;
}
.product-peek-pkgs {
  list-style: none;
  margin: 8px 0 12px;
  padding: 0;
}
.product-peek-pkgs li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  align-items: center;
  border-top: 1px solid var(--hairline);
  font-size: 14px;
}
.product-peek-specs {
  margin: 8px 0 12px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-mid);
  white-space: pre-wrap;
}
.product-peek-idrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--hairline);
  font-size: 13px;
  color: var(--ink-dim);
}
@media (min-width: 960px) {
  .product-peek {
    place-items: center;
    padding: 24px;
  }
  .product-peek-sheet {
    max-width: 380px;
    border-radius: 22px;
    animation: pmPop .22s cubic-bezier(.16, 1, .3, 1) both;
  }
  .product-peek-sheet::before { display: none; }
  .product-peek-body { padding-bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .product-peek-backdrop,
  .product-peek-sheet { animation: none; }
}

.dir-node--shop .entity-actions {
  margin-top: 0;
  padding-top: 10px;
  border-top: 1px solid var(--hairline);
}

.code-batch {
  margin-bottom: 0;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.code-batch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-mid);
}
.code-batch-list {
  margin: 0;
  padding: 10px 16px 14px;
  list-style: none;
  max-height: 180px;
  overflow: auto;
}
.code-batch-list li { padding: 6px 0; }
.code-batch-list code {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.04em;
}

/* 卡密管理面板 */
.key-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 0;
}
.key-stat {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
  box-shadow: var(--shadow-card);
  color: inherit;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
}
.key-stat:active { transform: scale(.96); }
.key-stat.is-on {
  background: var(--accent-soft);
  box-shadow: 0 0 0 1.5px rgba(12, 163, 137, 0.28), var(--shadow-card);
}
.key-stat.is-on .n { color: var(--accent-deep); }
.key-stat.is-on .l { color: var(--accent-deep); }
.key-stat .n {
  margin: 0;
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.key-stat .l {
  margin: 6px 0 0;
  font-size: 11.5px;
  color: var(--ink-dim);
  font-weight: 600;
}

.key-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.key-toolbar-hint {
  font-size: 12.5px;
  color: var(--ink-dim);
  font-weight: 600;
}

.key-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.key-ticket {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: 14px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.key-ticket::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--ink-dim);
  opacity: .35;
}
.key-ticket.is-on::before { background: var(--accent); opacity: 1; }
.key-ticket.is-used { opacity: .78; }
.key-ticket.is-used::before { background: var(--ink-dim); opacity: .45; }

.key-ticket-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding-left: 8px;
}
.key-note {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-dim);
  max-width: 55%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.key-code {
  margin: 0;
  padding-left: 8px;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  word-break: break-all;
}
.key-ticket-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 10px 0 0;
  padding-left: 8px;
  font-size: 12px;
  color: var(--ink-dim);
}
.btn-danger-soft {
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.btn-danger-soft:active { transform: scale(.97); }

.btn-copy-key {
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.btn-copy-key:active { transform: scale(.97); }

.key-ticket-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 12px;
  padding-left: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
  border-top: 1px dashed var(--hairline);
}
.key-ticket-actions .inline-form { margin-right: auto; }

/* 自绘确认弹窗 · 手机底部抽屉 / 桌面居中 */
body.pm-confirm-open { overflow: hidden; }
.pm-confirm {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: end center;
  padding: 0;
}
.pm-confirm[hidden] { display: none !important; }
.pm-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 22, 28, 0.46);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: pmFade var(--dur-ui) ease both;
}
.pm-confirm-sheet {
  position: relative;
  width: 100%;
  max-width: var(--app-max);
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  padding: 22px 20px calc(18px + var(--safe-bottom));
  box-shadow: var(--shadow-float);
  animation: pmSheetUp var(--dur-sheet) var(--ease-out) both;
}
.pm-confirm-sheet::before {
  content: "";
  display: block;
  width: 36px;
  height: 4px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: rgba(18, 22, 28, 0.12);
}
@media (min-width: 960px) {
  .pm-confirm {
    place-items: center;
    padding: 24px;
  }
  .pm-confirm-sheet {
    max-width: 360px;
    border-radius: 22px;
    padding: 22px 20px 18px;
    animation: pmPop .22s cubic-bezier(.16, 1, .3, 1) both;
  }
  .pm-confirm-sheet::before { display: none; }
}
.pm-confirm-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
}
.pm-confirm-msg {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-mid);
  text-align: center;
}
.pm-confirm-msg.is-err { color: var(--danger); }
.pm-confirm-days {
  margin: 14px 0 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.pm-confirm-days[hidden] { display: none !important; }
.pm-day-caption {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
  text-align: center;
}
.pm-day-dd {
  position: relative;
}
.pm-day-trigger {
  width: 100%;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.pm-day-trigger:active { transform: scale(.99); }
.pm-day-chev {
  width: 18px;
  height: 18px;
  color: var(--ink-dim);
  flex-shrink: 0;
}
.pm-day-menu {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 6px);
  z-index: 5;
  max-height: 220px;
  overflow: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
}
.pm-day-menu[hidden] { display: none !important; }
.pm-day-menu [role="option"] {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.pm-day-menu [role="option"]:active,
.pm-day-menu [role="option"].is-on {
  background: var(--accent-soft);
  color: var(--accent-deep);
}
.pm-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}
.pm-confirm-actions.is-alert {
  grid-template-columns: 1fr;
}
.pm-confirm-actions.is-alert .pm-confirm-cancel {
  display: none;
}
.pm-confirm-cancel,
.pm-confirm-ok {
  height: 46px;
  border: 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.pm-confirm-cancel {
  background: var(--surface-2);
  color: var(--ink-mid);
}
.pm-confirm-ok {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-cta);
}
.pm-confirm-ok.is-danger {
  background: var(--danger);
  box-shadow: 0 8px 20px rgba(211, 56, 47, 0.22);
}
.pm-confirm-cancel:active,
.pm-confirm-ok:active { transform: scale(.97); }

/* 操作抽屉 · 与确认框同一壳 */
body.pm-actions-open { overflow: hidden; }
.pm-actions {
  position: fixed;
  inset: 0;
  z-index: 190;
  display: grid;
  place-items: end center;
  padding: 0;
}
.pm-actions[hidden] { display: none !important; }
.pm-actions-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 22, 28, 0.46);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: pmFade var(--dur-ui) ease both;
}
.pm-actions-sheet {
  position: relative;
  width: 100%;
  max-width: var(--app-max);
  max-height: min(80dvh, 640px);
  overflow: auto;
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  padding: 22px 20px calc(18px + var(--safe-bottom));
  box-shadow: var(--shadow-float);
  animation: pmSheetUp var(--dur-sheet) var(--ease-out) both;
}
.pm-actions-sheet::before {
  content: "";
  display: block;
  width: 36px;
  height: 4px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: rgba(18, 22, 28, 0.12);
}
@media (min-width: 960px) {
  .pm-actions {
    place-items: center;
    padding: 24px;
  }
  .pm-actions-sheet {
    max-width: 360px;
    border-radius: 22px;
    padding: 22px 20px 18px;
    animation: pmPop .22s cubic-bezier(.16, 1, .3, 1) both;
  }
  .pm-actions-sheet::before { display: none; }
}
.pm-actions-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
}
.pm-actions-meta {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-dim);
  text-align: center;
}
.pm-actions-meta[hidden] { display: none !important; }
.pm-actions-body { margin-top: 8px; }
.pm-actions-body .dir-shop-contact {
  margin-top: 12px;
  text-align: left;
}
.pm-actions-list {
  display: flex;
  flex-direction: column;
  margin-top: 12px;
}
.pm-actions-item,
.pm-actions-item-form {
  margin: 0;
  display: block;
  width: 100%;
}
.pm-actions-item {
  min-height: 48px;
  padding: 0 4px;
  border: 0;
  border-top: 1px solid var(--hairline);
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
  transition: background var(--dur-press) var(--ease-soft);
}
a.pm-actions-item {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.pm-actions-item.is-danger,
.pm-actions-item-form .pm-actions-item.is-danger {
  color: var(--danger);
}
.pm-actions-item:active { background: var(--surface-2); }

@keyframes pmFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes pmSheetUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pmPop {
  from { opacity: 0; transform: translateY(12px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes pmSheetDown {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(28px); }
}
@keyframes pmFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .pm-confirm-backdrop,
  .pm-confirm-sheet,
  .pm-actions-backdrop,
  .pm-actions-sheet { animation: none; }
  .list-row,
  .dir-fold-sum,
  .tab-item,
  .fab-add,
  .pm-actions-item,
  .form-field input { transition: none; }
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 16px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}
.app-avatar.lg {
  width: 64px;
  height: 64px;
  font-size: 24px;
  box-shadow: 0 8px 18px rgba(12, 163, 137, 0.22);
}
.app-avatar.lg.is-edit {
  position: relative;
  padding: 0;
  overflow: visible;
  border: 0;
  cursor: pointer;
  background: #d7e2de;
}
.app-avatar.lg.is-edit img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}
.app-avatar-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 2px var(--surface);
}
.app-avatar-badge .pm-icon {
  width: 12px;
  height: 12px;
}
.avatar-sheet-actions {
  grid-template-columns: 1fr;
}
.profile-meta { min-width: 0; }
.profile-hi {
  margin: 0 0 2px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-deep);
}
.profile-name {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  word-break: break-word;
}
.profile-role { margin: 8px 0 0; }
.profile-chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.profile-info-list {
  margin-top: 0;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.profile-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  min-height: 52px;
}
.profile-info-row + .profile-info-row { border-top: 1px solid var(--hairline); }
.profile-info-row .k {
  flex: none;
  font-size: 14px;
  color: var(--ink-dim);
  font-weight: 600;
}
.profile-info-row .v {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  color: var(--ink);
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-info-row .v.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.profile-info-row .v.is-empty { color: var(--ink-dim); font-weight: 600; }
.profile-info-row .btn-text { flex: none; }
button.profile-info-row, a.profile-info-row {
  width: 100%;
  margin: 0;
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  text-align: inherit;
  text-decoration: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.profile-info-row.is-action::after {
  content: "";
  width: 7px;
  height: 7px;
  flex: none;
  border-right: 2px solid var(--ink-dim);
  border-bottom: 2px solid var(--ink-dim);
  transform: rotate(-45deg);
}
.profile-info-row.is-action:active { background: var(--row-hover); }
.help-doc {
  padding: 4px 4px 28px;
}
.help-goal,
.help-done {
  margin: 0 0 18px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
}
.help-doc .app-section-label {
  margin: 18px 0 8px;
}
.help-ol,
.help-fails {
  margin: 0;
  padding: 0 0 0 1.2em;
}
.help-ol li,
.help-fails li {
  padding: 6px 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
}
.help-fails li {
  color: var(--ink-mid);
}
.profile-edit-card {
  margin-top: 8px;
}
.profile-logout { margin-top: var(--section-gap); }
.profile-logout-row {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  color: var(--danger);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.profile-logout-row:active { background: var(--danger-soft); }

/* 快捷入口列表（首页 / 店员） */
.quick-list {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.quick-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  color: inherit;
}
.quick-row + .quick-row { border-top: 1px solid var(--hairline); }
.quick-row:active { background: rgba(18, 22, 28, 0.03); }
.quick-ico {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent-deep);
}
.quick-ico svg { width: 18px; height: 18px; }
.quick-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.quick-text .t { font-size: 15px; font-weight: 700; }
.quick-text .d { font-size: 12px; color: var(--ink-dim); font-weight: 600; }
.quick-chevron {
  flex: none;
  color: var(--ink-dim);
  font-size: 20px;
  line-height: 1;
  opacity: 0.55;
}

a.stat-card { color: inherit; }
a.action-row { cursor: pointer; }
a.action-row:active { background: var(--surface-2); }

/* 首页趋势图 */
.trend-panel {
  margin-top: 12px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: 12px 12px 10px;
  box-shadow: var(--shadow-card);
  animation: rise .45s cubic-bezier(.16, 1, .3, 1) .08s both;
}
.trend-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 4px;
}
.trend-kpis--2 {
  grid-template-columns: repeat(2, 1fr);
}
.trend-kpi {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding: 10px 10px 9px;
  border-radius: 12px;
  background: #f6f8fa;
}
.trend-kpi-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink-dim);
}
.trend-kpi-value {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.trend-kpi-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--ink-dim);
  font-weight: 600;
}
.trend-kpi-delta {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 700;
  white-space: nowrap;
}
.trend-kpi-delta.up {
  background: rgba(12, 163, 137, 0.12);
  color: var(--accent-deep);
}
.trend-kpi-delta.down {
  background: rgba(23, 27, 33, 0.06);
  color: var(--ink-mid);
}
.trend-kpi-delta.flat {
  background: var(--surface-2);
  color: var(--ink-dim);
}
.trend-stage {
  width: 100%;
  min-height: 260px;
}
.trend-echart {
  width: 100%;
  height: 280px;
  min-height: 240px;
}

@media (max-width: 480px) {
  .trend-echart { height: 232px; min-height: 210px; }
  .trend-kpis { gap: 6px; }
  .trend-kpi { padding: 9px 8px 8px; }
  .trend-kpi-value { font-size: 18px; }
}

/* ============================================================
   商家门户 + 公开橱窗
   ============================================================ */

.login-alert.ok {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

/* ---- 商家端：与三端共用 app-main 顶距，不再单独收紧 ---- */

.m-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 var(--section-gap);
}
.m-kicker {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
}
.m-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.m-sub {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--ink-dim);
  font-weight: 600;
}
.m-head-actions {
  display: flex;
  gap: 8px;
  flex: none;
  padding-top: 2px;
}
.m-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-mid);
  font-size: 12.5px;
  font-weight: 650;
  box-shadow: 0 1px 2px rgba(23, 27, 33, 0.03);
}
.m-icon-btn:active {
  background: var(--surface-2);
  transform: scale(.97);
}
.m-icon-btn.is-copied,
.copy-btn.is-copied {
  color: var(--accent-deep);
  border-color: rgba(12, 163, 137, 0.28);
  background: var(--accent-soft);
}

.m-list {
  background: var(--surface);
  border-radius: var(--r-card);
  border: 1px solid var(--hairline);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.m-row + .m-row {
  border-top: 1px solid var(--hairline);
}
.m-row-main {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 12px;
  color: inherit;
}
.m-row-main:active {
  background: rgba(23, 27, 33, 0.03);
}
.m-thumb {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-2);
  flex: none;
}
.m-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.m-thumb.is-empty {
  background:
    linear-gradient(145deg, rgba(12, 163, 137, 0.14), transparent 62%),
    var(--surface-2);
}
.m-row-body {
  flex: 1;
  min-width: 0;
}
.m-row-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.m-row-title {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.m-row-meta {
  margin: 5px 0 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-dim);
  font-weight: 550;
}
.m-dot { opacity: .55; }
.m-chevron {
  flex: none;
  color: var(--ink-dim);
  opacity: .55;
  display: grid;
  place-items: center;
}
.m-actions {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  border-top: 1px solid var(--hairline);
  background: #fbfcfd;
}
.m-actions form,
.m-actions a {
  margin: 0;
  min-width: 0;
}
.m-actions form + form,
.m-actions form + a,
.m-actions a + a {
  border-left: 1px solid var(--hairline);
}
.m-actions button,
.m-actions a {
  width: 100%;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--ink-mid);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
.m-actions form:first-child button,
.m-actions button.is-pin-on {
  color: var(--accent-deep);
}
.m-actions button:active,
.m-actions a:active {
  background: rgba(12, 163, 137, 0.06);
  color: var(--accent-deep);
}
.m-pin-tag {
  display: inline-flex;
  align-items: center;
  margin-right: 6px;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 11px;
  font-weight: 750;
  vertical-align: 1px;
}
.m-row.is-pinned {
  box-shadow: 0 0 0 1.5px rgba(12, 163, 137, 0.18), var(--shadow-card);
}

.m-sheet {
  margin: 0 0 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}
.m-sheet.app-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.m-product-form {
  display: block;
}
.m-product-form .panel-hint {
  margin: 0 0 10px;
}
.m-create-form {
  margin: 0;
}
.m-create-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}
.m-create-card .form-field {
  margin: 0;
}
.m-create-card .form-field > span {
  font-size: 12.5px;
  color: var(--ink-dim);
  font-weight: 650;
  letter-spacing: 0.02em;
}
.m-create-card .form-field input,
.m-create-card .form-field textarea {
  background: #f2f4f7;
  border-color: transparent;
}
.m-create-card .form-field input:focus,
.m-create-card .form-field textarea:focus {
  background: #fff;
  border-color: var(--accent);
}
.m-photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.m-photo-previews {
  display: contents;
}
.m-photo-grid .image-card {
  aspect-ratio: 1;
  border-radius: 12px;
}
.m-photo-add {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin: 0;
  width: 100%;
  border-radius: 12px;
  border: 1px dashed var(--hairline);
  background: #f2f4f7;
  color: var(--ink-dim);
  cursor: pointer;
  box-sizing: border-box;
}
.m-photo-add-form {
  margin: 0;
  min-width: 0;
}
.m-photo-add .pm-icon,
.m-photo-add svg {
  width: 22px;
  height: 22px;
  display: block;
}
.m-photo-add:active {
  transform: scale(.98);
}
.m-photo-add[hidden] {
  display: none !important;
}
.m-create-more {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}
.m-create-more > summary {
  list-style: none;
  cursor: pointer;
  padding: 2px 0 4px;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink-dim);
}
.m-create-more > summary::-webkit-details-marker {
  display: none;
}
.m-create-more[open] > summary {
  margin-bottom: 10px;
  color: var(--ink-mid);
}
.m-create-card .form-submit {
  margin-top: 2px;
}
#packageField.is-solo .package-row {
  grid-template-columns: 1fr;
}
#packageField.is-solo .package-title,
#packageField.is-solo .package-remove {
  display: none !important;
}
#packageField .package-head .btn-text {
  height: 32px;
  padding: 0 2px;
  font-size: 13px;
  font-weight: 650;
}
.m-sheet .form-field > span {
  font-size: 12.5px;
  color: var(--ink-dim);
  font-weight: 650;
  letter-spacing: 0.02em;
}
.m-sheet .form-field input,
.m-sheet .form-field textarea,
.m-sheet .form-field select {
  background: #f2f4f7;
  border-color: transparent;
}
.m-sheet .form-field input:focus,
.m-sheet .form-field textarea:focus,
.m-sheet .form-field select:focus {
  background: #fff;
  border-color: var(--accent);
}
.m-sheet .form-submit {
  margin-top: 4px;
}
.panel-block-first {
  margin-top: 0;
}
.need-img {
  color: #b56a00;
  font-weight: 650;
}
.upload-zone-form.is-uploading .upload-zone {
  opacity: .65;
  pointer-events: none;
}
.merchant-showcase-grid {
  margin-top: 2px;
}
.tab-clearance {
  height: calc(8px + var(--tab-h) + var(--safe-bottom));
}
.product-price {
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent-deep);
}
.status-pill.status-published { color: var(--ink-mid); background: transparent; }
.status-pill.status-published::before { background: var(--accent); }
.status-pill.status-draft { color: var(--ink-mid); background: transparent; }
.status-pill.status-draft::before { background: var(--ink-dim); }
.status-pill.status-temp_offline { color: var(--ink-mid); background: transparent; }
.status-pill.status-temp_offline::before { background: #d97706; }
.merchant-foot, .sf-foot {
  margin: 28px 0 8px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-dim);
  font-weight: 600;
}
.field-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-dim);
  font-style: normal;
  font-weight: 600;
}
.image-panel,
.panel-block {
  margin-top: 0;
  margin-bottom: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}
.image-panel-head,
.panel-block-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}
.image-panel-head h2,
.panel-block-head h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
}
.image-panel-head span,
.panel-block-head span {
  font-size: 12px;
  color: var(--ink-dim);
  font-weight: 600;
}
.panel-hint {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--ink-dim);
  font-weight: 600;
}
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.image-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-2);
}
.image-card.is-settable {
  cursor: pointer;
}
.image-card.is-settable:active {
  transform: scale(.985);
}
.image-card-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(18, 22, 28, 0.62);
  color: #fff;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.image-card-remove .pm-icon,
.image-card-remove svg {
  width: 14px;
  height: 14px;
  display: block;
  pointer-events: none;
}
.image-card-remove:active {
  transform: scale(.94);
  background: rgba(18, 22, 28, 0.82);
}
.image-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}
.image-actions {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 8px;
  font-size: 12px;
  font-weight: 700;
}
.cover-tag {
  color: var(--accent-deep);
}
.linkish {
  background: none;
  border: 0;
  padding: 0;
  color: var(--ink-mid);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.linkish.danger { color: var(--danger); }
.upload-zone-form { margin-top: 4px; }
.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 112px;
  padding: 18px 14px;
  border-radius: 16px;
  border: 1.5px dashed rgba(12, 163, 137, 0.35);
  background: var(--accent-soft);
  color: var(--accent-deep);
  cursor: pointer;
  text-align: center;
}
.upload-zone:active {
  transform: scale(.99);
}
.upload-zone-ico {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--surface);
  color: var(--accent);
}
.upload-zone-title {
  font-size: 14px;
  font-weight: 750;
}
.upload-zone-sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-dim);
}
.btn-danger-outline {
  margin-top: 16px;
  margin-bottom: 12px;
}
.btn-danger {
  width: 100%;
  border: 0;
  border-radius: var(--r-input);
  padding: 14px 16px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 15px;
  font-weight: 750;
  cursor: pointer;
}

/* 公开橱窗 / 详情 / 总展示 */
.storefront-app {
  background: var(--bg);
  min-height: 100dvh;
}
.sf-main {
  max-width: 720px;
  margin: 0 auto;
  min-height: 100dvh;
}
.storefront-app .app-main {
  padding-bottom: calc(24px + var(--safe-bottom));
}
.sf-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 720px) {
  .sf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
}
.sf-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: none;
}
@media (hover: hover) {
  a.sf-card:hover,
  .sf-card:has(.sf-card-link):hover {
    border-color: rgba(12, 163, 137, 0.28);
  }
}
a.sf-card:active,
.sf-card-link:active {
  transform: scale(.985);
}
.sf-card--offline {
  pointer-events: none;
  user-select: none;
  background: #e8eaee;
}
.sf-card--offline .sf-card-media img {
  filter: grayscale(0.4);
  opacity: 0.78;
}
.sf-card--offline .sf-card-body span {
  color: var(--ink-dim);
}
.sf-card-resume {
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 650;
  font-style: normal;
  line-height: 1.35;
  color: #8a6a2a;
}
.sf-offline-cd {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 1;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(18, 22, 28, 0.78);
  color: #fff;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  line-height: 1;
}
.resume-cd {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.status-pill .resume-cd {
  font-size: 12px;
  color: #b56a00;
}
.sf-card-media {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--surface-2);
}
.sf-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sf-card-media.empty {
  background:
    linear-gradient(160deg, rgba(12, 163, 137, 0.14), transparent 55%),
    var(--surface-2);
}
.sf-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 10px 12px;
}
.sf-card-body strong {
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sf-card-body span {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent-deep);
}
.sf-card-link {
  display: flex;
  flex-direction: column;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.sf-card-link .sf-card-body {
  padding-bottom: 8px;
}
.sf-votes {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 6px 8px;
}
.sf-detail-head .sf-votes {
  margin-top: 14px;
  padding: 0;
  gap: 8px;
}
.sf-detail-head .vote-btn {
  min-width: 72px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--surface);
}
.sf-detail-head .vote-btn.is-on.vote-up,
.sf-detail-head .vote-btn.is-on.vote-down {
  border-color: transparent;
}
.sf-gallery {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}
.sf-gallery img {
  width: 100%;
  border-radius: var(--r-card);
  display: block;
  background: var(--surface);
}
.sf-gallery.empty {
  min-height: 200px;
  border-radius: var(--r-card);
  background: var(--surface-2);
}
.sf-grid9 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  margin: 0 0 20px;
  overflow: hidden;
  border-radius: var(--r-card);
  border: 1px solid var(--hairline);
  background: var(--surface);
}
.sf-grid9:has(.sf-grid9-cell:first-child:nth-last-child(1)) {
  grid-template-columns: 1fr;
}
.sf-grid9:has(.sf-grid9-cell:first-child:nth-last-child(2)) {
  grid-template-columns: 1fr 1fr;
}
.sf-grid9-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  cursor: zoom-in;
  background: var(--surface-2);
}
.sf-grid9:has(.sf-grid9-cell:first-child:nth-last-child(1)) .sf-grid9-cell {
  aspect-ratio: 4 / 5;
}
.sf-grid9-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .sf-grid9-cell:hover img {
    transform: scale(1.03);
  }
  .sf-grid9-cell img {
    transition: transform .28s cubic-bezier(.16, 1, .3, 1);
  }
}
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(18, 22, 28, 0.92);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  touch-action: none;
}
.lightbox.active { display: flex; }
.lightbox img {
  max-width: 92vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox .lb-close,
.lightbox .lb-nav {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.lightbox .lb-close {
  top: 18px;
  right: 18px;
}
.lightbox .lb-nav {
  top: 50%;
  transform: translateY(-50%);
}
.lightbox .lb-prev { left: 18px; }
.lightbox .lb-next { right: 18px; }
.lightbox .lb-close svg,
.lightbox .lb-nav svg {
  width: 20px;
  height: 20px;
  display: block;
  pointer-events: none;
}
.lightbox .lb-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  background: rgba(18, 22, 28, 0.4);
  padding: 4px 14px;
  border-radius: 12px;
}
@media (max-width: 480px) {
  .lightbox .lb-nav { width: 36px; height: 36px; }
  .lightbox .lb-prev { left: 8px; }
  .lightbox .lb-next { right: 8px; }
}
.sf-detail-head {
  margin-bottom: 8px;
}
.sf-detail-title {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.22;
}
.sf-detail-sub {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-mid);
  font-weight: 550;
}
.sf-package-one {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--ink-dim);
  font-weight: 600;
}
.sf-packages {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sf-packages li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 14px;
}
.sf-pkg-title {
  font-size: 14px;
  font-weight: 650;
  color: var(--ink);
}
.sf-pkg-price {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 750;
  color: var(--accent-deep);
  flex: none;
}
.package-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.package-head > span {
  font-size: 12.5px;
  color: var(--ink-dim);
  font-weight: 650;
  letter-spacing: 0.02em;
}
.package-add {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.package-add .pm-icon,
.package-add svg,
.package-remove .pm-icon,
.package-remove svg {
  width: 16px;
  height: 16px;
  display: block;
  pointer-events: none;
}
.package-add:active { transform: scale(.94); }
.package-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.package-row {
  display: grid;
  grid-template-columns: 1fr 96px 32px;
  gap: 8px;
  align-items: center;
}
.package-row input {
  height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: #f2f4f7;
  font-size: 15px;
  box-sizing: border-box;
  width: 100%;
}
.package-row input:focus {
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(12, 163, 137, 0.28);
}
.package-remove {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: rgba(18, 22, 28, 0.06);
  color: var(--ink-dim);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.package-remove[hidden] { display: none !important; }
.package-remove:active { transform: scale(.94); }
.sf-id-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  flex-wrap: wrap;
}
.sf-id-meta {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-dim);
  font-weight: 600;
}
.sf-id-meta strong {
  font-family: var(--mono);
  font-weight: 750;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.sf-id-row .btn-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-deep);
  background: none;
  border: none;
  padding: 4px 2px;
  cursor: pointer;
}
.sf-id-row .btn-text.is-copied {
  color: var(--ink-dim);
}
.sf-search {
  display: flex;
  gap: 8px;
  margin: 0;
  align-items: center;
}
.app-section--search {
  margin: 0 0 var(--section-gap);
}
.app-section--hit {
  margin: 0 0 12px;
}
.shop-hit-card {
  border-color: rgba(12, 163, 137, 0.35);
  box-shadow: 0 0 0 1.5px rgba(12, 163, 137, 0.16), var(--shadow-card);
}
.dir-node--shop.is-hit > .dir-sum--shop {
  background: var(--accent-soft);
}
.shop-code-search {
  margin: 0;
  padding: 0;
}
.dir-sum--shop .dir-id {
  margin-left: 2px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-dim);
  flex-shrink: 0;
}
.dir-sum--shop .dir-likes {
  margin-left: 2px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-deep);
  flex-shrink: 0;
}
.sf-search input[type="search"],
.sf-search input[type="text"] {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--surface);
  font-size: 15px;
  line-height: 42px;
  color: var(--ink);
  outline: none;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
}
.sf-search input[type="search"]::-webkit-search-decoration,
.sf-search input[type="search"]::-webkit-search-cancel-button,
.sf-search input[type="search"]::-webkit-search-results-button,
.sf-search input[type="search"]::-webkit-search-results-decoration {
  display: none;
  -webkit-appearance: none;
}
.sf-search input[type="search"]:focus,
.sf-search input[type="text"]:focus {
  border-color: rgba(12, 163, 137, 0.45);
  box-shadow: var(--focus-ring);
}
.sf-search .btn-pill,
.shop-code-search-btn {
  flex-shrink: 0;
  height: 42px;
  min-width: 72px;
  padding: 0 18px;
  border: 0;
  box-sizing: border-box;
  border-radius: 12px;
}
.sf-price {
  margin: 0;
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  color: var(--accent-deep);
}
.sf-specs {
  margin-top: 16px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  box-shadow: none;
}
.sf-specs h2 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 750;
}
.sf-specs-body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-mid);
  white-space: pre-wrap;
}
.sf-review {
  margin-top: 16px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}
.sf-review-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.sf-review-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.sf-review-sum {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-dim);
}
.sf-review-sum em {
  font-style: normal;
  font-variant-numeric: tabular-nums;
  color: var(--ink-mid);
}
.sf-review-open {
  height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}
.sf-review-open:active { transform: scale(.97); }
.sf-review-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}
.sf-review-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 64px;
  padding: 10px 4px 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink-dim);
  cursor: pointer;
}
.sf-review-tab strong {
  font-size: 18px;
  font-weight: 750;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.sf-review-tab span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.sf-review-tab:active { transform: scale(.97); }
.sf-review-tab.is-on {
  background: var(--surface);
  box-shadow: var(--shadow-card);
  color: var(--ink-mid);
}
.sf-review-tab.is-on[data-filter="good"] {
  background: var(--accent-soft);
  box-shadow: none;
}
.sf-review-tab.is-on[data-filter="good"] strong,
.sf-review-tab.is-on[data-filter="good"] span {
  color: var(--accent-deep);
}
.sf-review-tab.is-on[data-filter="mid"] {
  background: var(--surface-2);
  box-shadow: none;
  color: var(--ink);
}
.sf-review-tab.is-on[data-filter="bad"] {
  background: var(--danger-soft);
  box-shadow: none;
}
.sf-review-tab.is-on[data-filter="bad"] strong,
.sf-review-tab.is-on[data-filter="bad"] span {
  color: var(--danger);
}
.sf-review-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sf-review-item {
  position: relative;
  padding: 12px 12px 12px 16px;
  border-radius: 12px;
  background: var(--bg);
}
.sf-review-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 99px;
  background: #c5ccd6;
}
.sf-review-item.is-good::before { background: var(--accent); }
.sf-review-item.is-bad::before { background: var(--danger); }
.sf-review-item.is-in {
  animation: sfReviewIn .28s var(--ease-out) both;
}
.sf-review-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.sf-review-tag {
  font-size: 11px;
  font-weight: 750;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-mid);
}
.sf-review-tag.is-good {
  background: var(--accent-soft);
  color: var(--accent-deep);
}
.sf-review-tag.is-mid {
  background: var(--surface-2);
  color: var(--ink);
}
.sf-review-tag.is-bad {
  background: var(--danger-soft);
  color: var(--danger);
}
.sf-review-meta time {
  font-size: 12px;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
}
.sf-review-item p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
}
.sf-review-item p.is-muted {
  color: var(--ink-dim);
}
.sf-review-empty {
  margin: 4px 0 0;
  padding: 18px 8px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-dim);
  font-weight: 550;
}
.sf-review-sheet .sf-review-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}
.sf-grade-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.sf-grade {
  min-height: 52px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--bg);
  color: var(--ink-mid);
  font-size: 15px;
  font-weight: 750;
  cursor: pointer;
}
.sf-grade:active { transform: scale(.97); }
.sf-grade.is-on[data-grade="good"] {
  color: var(--accent-deep);
  background: var(--accent-soft);
}
.sf-grade.is-on[data-grade="mid"] {
  color: var(--ink);
  background: var(--surface-2);
}
.sf-grade.is-on[data-grade="bad"] {
  color: var(--danger);
  background: var(--danger-soft);
}
.sf-review-form textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  padding: 12px;
  border: 0;
  border-radius: 14px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
}
.sf-review-form textarea:focus {
  outline: 2px solid rgba(12, 163, 137, 0.28);
  outline-offset: 1px;
}
.sf-review-submit {
  height: 46px;
  border: 0;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 750;
  cursor: pointer;
}
.sf-review-submit:active { transform: scale(.98); }
.sf-review-submit:disabled {
  opacity: .7;
  cursor: wait;
}
.sf-review-hint {
  margin: 0;
  text-align: center;
  font-size: 12px;
  color: var(--ink-dim);
  font-weight: 550;
}
.sf-review-toast {
  position: fixed;
  left: 50%;
  bottom: calc(28px + var(--safe-bottom));
  z-index: 220;
  margin: 0;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(18, 22, 28, 0.88);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  transform: translateX(-50%) translateY(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s var(--ease-out);
}
.sf-review-toast.is-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
@keyframes sfReviewIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .sf-review-item.is-in,
  .sf-review-open,
  .sf-review-tab,
  .sf-grade,
  .sf-review-submit,
  .sf-review-toast { animation: none; transition: none; transform: none; }
}
.storefront-app .sf-review-sheet.pm-confirm {
  z-index: 400;
  place-items: end center;
  padding: 0;
}
.storefront-app .sf-review-sheet .pm-confirm-sheet {
  width: 100%;
  max-width: 720px;
  border-radius: 22px 22px 0 0;
  animation: pmSheetUp var(--dur-sheet) var(--ease-out) both;
}
.storefront-app .sf-review-sheet .pm-confirm-sheet::before { display: block; }
@media (min-width: 960px) {
  .storefront-app .sf-review-sheet.pm-confirm {
    place-items: end center;
    padding: 0;
  }
  .storefront-app .sf-review-sheet .pm-confirm-sheet {
    max-width: 720px;
    border-radius: 22px 22px 0 0;
    padding: 22px 20px calc(18px + var(--safe-bottom));
    animation: pmSheetUp var(--dur-sheet) var(--ease-out) both;
  }
  .storefront-app .sf-review-sheet .pm-confirm-sheet::before { display: block; }
  .storefront-app .sf-review-sheet.is-leaving .pm-confirm-sheet {
    animation: pmSheetDown .22s cubic-bezier(.22, 1, .36, 1) both;
  }
}
/* 总展示链接卡片 + 画廊 */
.gallery-link-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
  padding: 16px;
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  animation: rise .4s cubic-bezier(.16, 1, .3, 1) both;
}
.gallery-link-kicker {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-deep);
}
.gallery-link-desc {
  margin: 0;
  font-size: 13px;
  color: var(--ink-mid);
  font-weight: 600;
}
.gallery-link-path {
  margin: 8px 0 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-dim);
  word-break: break-all;
}
.gallery-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.gallery-copy-btn {
  width: auto;
  min-width: 148px;
  margin: 0;
  padding: 12px 16px;
}
.gallery-region {
  margin-bottom: 22px;
}
.gallery-shop-list > .gallery-region {
  margin-bottom: 0;
}
.gallery-shop-list > .gallery-region h2 {
  margin: 0;
  padding: 14px 16px 2px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
}
.gallery-shop-list > .gallery-region + .gallery-region h2 {
  border-top: 1px solid var(--hairline);
  padding-top: 14px;
}
.gallery-dir {
  margin-top: 4px;
}
.gallery-dir .dir-kids {
  padding-top: 8px;
}
.gallery-region--nested {
  margin: 0 0 14px;
  padding-left: 2px;
}
.gallery-region--nested:last-child {
  margin-bottom: 4px;
}
.gallery-region-meta {
  margin: 4px 0 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-dim);
}
.gallery-cities {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 4px 0 16px;
  padding-bottom: 2px;
}
.gallery-city {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-mid);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.gallery-city.is-on {
  background: var(--accent-soft);
  color: var(--accent-deep);
}
.gallery-region h2 {
  margin: 0 2px 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
}
.gallery-region--nested h2 {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-dim);
}
.gallery-shop-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  overflow: hidden;
}
.gallery-shop-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 16px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  border-radius: 0;
  box-shadow: none;
  color: inherit;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
  transition: background var(--dur-press) var(--ease-soft);
}
.gallery-shop-row:last-child {
  border-bottom: 0;
}
.gallery-shop-list > .gallery-region .gallery-shop-row:last-child {
  border-bottom: 0;
}
a.gallery-shop-row:active,
.gallery-shop-main:active {
  background: var(--row-hover);
}
.gallery-shop-row[hidden],
.gallery-region[hidden] {
  display: none !important;
}
.gallery-shop-main {
  flex: 1;
  min-width: 0;
  min-height: 56px;
  display: flex;
  align-items: center;
}
.gallery-shop-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  min-width: 0;
}
.gallery-shop-copy em {
  font-size: 12px;
  font-weight: 600;
  font-style: normal;
  color: var(--ink-dim);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gallery-shop-row strong {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gallery-shop-row--link .pm-icon {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--ink-dim);
}
.gallery-shop-actions {
  flex: none;
  display: flex;
  align-items: center;
  gap: 2px;
}
.vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 40px;
  height: 34px;
  padding: 0 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-dim);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.vote-btn svg,
.vote-btn .vote-ico {
  width: 18px;
  height: 18px;
  flex: none;
  display: block;
}
.vote-btn .vote-n {
  font-style: normal;
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 0.8em;
}
.vote-btn:active:not(:disabled) {
  transform: scale(.94);
}
.vote-btn:disabled {
  cursor: wait;
  opacity: .85;
}
.sf-votes.is-locked .vote-btn:disabled,
.gallery-shop-actions.is-locked .vote-btn:disabled {
  cursor: default;
  opacity: 1;
}
.vote-btn.is-on.vote-up {
  color: var(--accent-deep);
  background: var(--accent-soft);
}
.vote-btn.is-on.vote-down {
  color: var(--danger);
  background: var(--danger-soft);
}
.gallery-enter {
  margin-left: 4px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.gallery-enter:active {
  transform: scale(.96);
}
.gallery-city-n {
  margin-right: 2px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink-mid);
  white-space: nowrap;
}

.gallery-miss {
  margin: 8px 2px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-dim);
  text-align: center;
}
.gallery-search .sf-search {
  position: relative;
}
.gallery-search .sf-search-ico {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  color: var(--ink-mid);
  pointer-events: none;
}
.gallery-search .sf-search-ico .pm-icon {
  width: 18px;
  height: 18px;
  display: block;
}
.gallery-search input[type="search"] {
  text-align: left;
  padding-left: 40px;
}
.gallery-search input[type="search"]::placeholder {
  color: var(--ink-mid);
  opacity: 1;
}
.gallery-hero {
  text-align: center;
  margin: 6px 0 18px;
  padding-top: 8px;
}
.gallery-hero-kicker {
  display: none;
}
.gallery-hero-title {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.15;
  color: var(--ink);
}
.gallery-hero-sub {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-dim);
}
.sf-expired-page {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
.sf-expired-page .gallery-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 32px 20px 24px;
  text-align: center;
}
.sf-expired-page .brand-mark {
  margin: 0 auto 22px;
}
.sf-expired-page .gallery-hero-title {
  max-width: none;
}
.sf-expired-page .merchant-foot {
  margin-top: 0;
  padding-bottom: 8px;
}
.sf-expired {
  margin-top: 0;
  padding: 40px 20px;
  box-shadow: none;
}
.sf-main:has(> .sf-expired) {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100dvh;
}

.district-shops {
  margin: 4px 0 16px;
}
.district-shop-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.district-shop-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}
.district-shop-row.is-same {
  border-color: var(--accent);
  background: #f4fbf9;
}
.district-shop-main { min-width: 0; flex: 1; }
.district-shop-name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
}
.district-shop-meta {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--ink-dim);
}
.district-shop-badge {
  font-size: 12px;
  font-weight: 650;
  color: var(--ink-mid);
  white-space: nowrap;
}
.district-shops-empty {
  margin: 0;
  font-size: 13px;
  color: var(--ink-dim);
}
.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 650;
}
.form-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.security-lock {
  min-height: calc(100dvh - var(--tab-h) - 48px);
  display: flex;
  flex-direction: column;
}
.security-lock-blank {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 24px 20px;
}
.security-lock-cover {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.security-lock-cover[data-sec-avatar] {
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.security-lock-cover .brand-mark {
  margin: 0;
  filter: drop-shadow(0 8px 16px rgba(12, 163, 137, 0.16));
}
.security-lock-cover-title {
  margin: 0;
  max-width: 16em;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.3;
  color: var(--ink);
}
.security-lock-avatar {
  cursor: pointer;
  user-select: none;
}
.security-lock-pin {
  margin-top: 0;
  padding: 0 4px 12px;
}

.sec-fold {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.sec-fold-sum {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 16px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.sec-fold-sum::-webkit-details-marker,
.sec-fold-sum::marker {
  display: none;
  content: "";
}
.sec-fold-k {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.sec-fold-v {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-dim);
}
.sec-fold-sum::after {
  content: "";
  width: 7px;
  height: 7px;
  flex: none;
  border-right: 2px solid var(--ink-dim);
  border-bottom: 2px solid var(--ink-dim);
  transform: rotate(-45deg);
  transition: transform .24s cubic-bezier(.22, 1, .36, 1);
}
.sec-fold[open] > .sec-fold-sum::after {
  transform: rotate(45deg);
}
.sec-fold-panel {
  overflow: hidden;
}
.sec-fold-body {
  display: flex;
  flex-direction: column;
  padding: 0 0 8px;
  border-top: 1px solid var(--hairline);
}
.sec-switch-row,
.sec-action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 16px;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}
.sec-action-row + .sec-action-row,
.sec-switch-row + .sec-action-row {
  border-top: 1px solid var(--hairline);
}
.sec-action-row {
  cursor: pointer;
}
.sec-action-row .sec-fold-v {
  margin-left: auto;
  max-width: 58%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sec-action-row::after {
  content: "";
  width: 7px;
  height: 7px;
  flex: none;
  border-right: 2px solid var(--ink-dim);
  border-bottom: 2px solid var(--ink-dim);
  transform: rotate(-45deg);
}
.sec-action-row:active { background: var(--row-hover); }
.sec-switch {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 46px;
  height: 28px;
  flex: none;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.sec-switch-ui {
  display: block;
  width: 46px;
  height: 28px;
  border-radius: 999px;
  background: #d5dae0;
  transition: background .2s;
}
.sec-switch-ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(18, 22, 28, 0.18);
  transition: transform .2s;
}
.sec-switch[aria-checked="true"] .sec-switch-ui {
  background: var(--accent);
}
.sec-switch[aria-checked="true"] .sec-switch-ui::after {
  transform: translateX(18px);
}
.sec-switch:focus-visible .sec-switch-ui {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.sec-hint { margin: 0 16px 12px; }
.sec-sheet .pm-confirm-sheet {
  max-height: min(88dvh, 720px);
  overflow: auto;
}
.sec-sheet.is-leaving .pm-confirm-backdrop {
  animation: pmFadeOut .18s ease both;
}
.sec-sheet.is-leaving .pm-confirm-sheet {
  animation: pmSheetDown .22s cubic-bezier(.22, 1, .36, 1) both;
}
.sec-sheet .form-field {
  margin-top: 14px;
}
.sec-sheet .form-field input,
.sec-sheet .form-field select {
  background: #f2f4f7;
  border-color: transparent;
}
.sec-sheet .form-field input:focus,
.sec-sheet .form-field select:focus {
  background: #fff;
  border-color: var(--accent);
}
@media (prefers-reduced-motion: reduce) {
  .sec-fold-sum::after,
  .sec-switch-ui,
  .sec-switch-ui::after { transition: none; }
  .sec-sheet .pm-confirm-backdrop,
  .sec-sheet .pm-confirm-sheet,
  .sec-sheet.is-leaving .pm-confirm-backdrop,
  .sec-sheet.is-leaving .pm-confirm-sheet { animation: none; }
}
