/* ==========================================================================
   中亚巴扎 · v10
   - 视觉精炼：更柔的阴影/边缘、统一节奏、品牌色一致性
   - 移动端体验：触控热区 ≥44px、防输入缩放（input >= 16px）、safe-area
   - 可访问性：skip-link、focus-visible、prefers-reduced-motion、role 友好
   - 骨架屏：首屏未加载完时的占位
   ========================================================================== */

:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-soft: #fbfbfd;
  --surface-tint: #f0f4f2;
  --ink: #1d1d1f;
  --ink-soft: #2c3a48;
  --muted: #6e6e73;
  --muted-2: #a1a1a6;
  --line: #e5e5ea;
  --line-strong: #d0d0d5;

  --teal: #0f766e;
  --teal-2: #14857d;
  --teal-dark: #0b5f59;
  --teal-soft: #e7f2ef;
  --amber: #f59e0b;
  --amber-2: #fbbf24;
  --red: #b4233b;
  --blue: #2563eb;

  --green-soft: #dff4ed;
  --amber-soft: #fff0cf;
  --red-soft: #fae8ec;
  --blue-soft: #dbeafe;

  --shadow-1: 0 1px 2px rgba(18, 35, 41, 0.04), 0 1px 1px rgba(18, 35, 41, 0.02);
  --shadow-2: 0 6px 18px rgba(18, 35, 41, 0.06), 0 1px 2px rgba(18, 35, 41, 0.04);
  --shadow-3: 0 18px 48px rgba(18, 35, 41, 0.12);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  font-family:
    "PingFang SC", "Hiragino Sans GB", "Source Han Sans CN",
    "Microsoft YaHei", "Heiti SC", Inter, ui-sans-serif, system-ui,
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; -webkit-text-size-adjust: 100%; }

body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: rgba(15, 118, 110, 0.22); color: var(--ink); }

button, input, textarea, select { font: inherit; color: inherit; }
button { border: 0; background: transparent; }
a { color: inherit; }

/* Focus visible：键盘可见焦点环 */
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 4px;
}
button:focus:not(:focus-visible),
input:focus:not(:focus-visible),
select:focus:not(:focus-visible),
textarea:focus:not(:focus-visible) { outline: 0; }

/* Skip link：键盘 / 屏幕阅读器跳到主内容 */
.skip-link {
  position: absolute;
  top: -64px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: top 160ms var(--ease);
}
.skip-link:focus { top: calc(12px + var(--safe-top)); }

svg { width: 20px; height: 20px; flex: 0 0 auto; }

.app-shell {
  width: min(100%, 520px);
  min-height: 100svh;
  margin: 0 auto;
  background: var(--surface-soft);
  box-shadow: 0 0 0 1px rgba(23, 33, 43, 0.04);
  position: relative;
  overflow-x: hidden;
}

.desktop-sidebar { display: none; }
.main-wrapper { display: contents; }
.topbar-desktop { display: none; }

.screen {
  min-height: 100svh;
  padding: 0 16px calc(96px + var(--safe-bottom));
}

/* 顶部 bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 12px 0 10px;
  background: rgba(247, 250, 248, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease);
}
.topbar.scrolled { border-bottom-color: var(--line); }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 4px 6px;
  border-radius: var(--radius);
}
.brand-mark, .avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--teal);
  color: #fff;
  box-shadow: 0 10px 26px rgba(15, 118, 110, 0.22);
}

.brand-mark svg,
.icon-button svg,
.nav-item svg,
.tile-icon svg,
.meta svg,
.button svg,
.section-title svg,
.small-action svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.brand-title {
  margin: 0;
  line-height: 1.05;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0;
}
.brand-subtitle {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.top-actions { display: flex; align-items: center; gap: 8px; }

/* 数据模式提示徽章（云/本地） */
.mode-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  background: var(--green-soft);
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 700;
}
.mode-chip.local { background: #f1f5f9; color: var(--muted); }
.mode-chip::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal);
}
.mode-chip.local::before { background: var(--muted-2); }

.icon-button {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: transform 120ms var(--ease), box-shadow 160ms var(--ease), border-color 160ms var(--ease);
}
.icon-button:hover { border-color: var(--line-strong); box-shadow: var(--shadow-1); }
.icon-button:active { transform: scale(0.96); }

/* Hero */
.hero { padding: 32px 0 12px; }
.hero-eyebrow {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--teal);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.hero h1 {
  max-width: 14ch;
  margin: 0;
  font-size: clamp(36px, 9vw, 56px);
  line-height: 1.0;
  letter-spacing: -1px;
  font-weight: 800;
  color: var(--ink);
}
.hero-sub { margin: 12px 0 0; color: var(--muted); font-size: 17px; font-weight: 400; line-height: 1.5; }
.hero p { margin: 12px 0 0; color: var(--muted); font-size: 16px; line-height: 1.5; }
.hero-search { margin-top: 20px; }

/* 搜索框 */
.search-shell {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  margin: 18px 0 16px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-2);
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
.search-shell:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}
.search-shell svg { flex: 0 0 auto; color: var(--muted); }
.search-shell input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px; /* >=16px：iOS Safari 不会因为聚焦自动放大 */
}
.search-shell input::placeholder { color: var(--muted-2); }

/* 三宫格快捷入口 */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 18px;
}
.quick-tile {
  min-height: 108px;
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(160deg, rgba(255,255,255,0.6), rgba(255,255,255,0)) ,
    var(--surface);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform 160ms var(--ease), box-shadow 200ms var(--ease), border-color 160ms var(--ease);
}
.quick-tile:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); }
.quick-tile:active,
.card:active,
.list-row:active,
.icon-button:active { transform: scale(0.985); }

.tile-icon {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  margin-bottom: 10px;
  border-radius: 10px;
  color: var(--teal);
  background: var(--green-soft);
}
.quick-tile:nth-child(2) .tile-icon { color: var(--red); background: var(--red-soft); }
.quick-tile:nth-child(3) .tile-icon { color: #8a5b00; background: var(--amber-soft); }

.tile-title { display: block; font-weight: 800; line-height: 1.2; }
.tile-note { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.35; }

/* 数据汇总卡 */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0 18px;
}
.stat {
  padding: 12px 12px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.stat strong {
  display: block;
  font-size: 22px;
  letter-spacing: -0.5px;
  color: var(--ink);
}
.stat span { color: var(--muted); font-size: 12px; }

/* Banner */
.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0;
  padding: 18px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0%, rgba(245, 158, 11, 0.25), transparent 60%),
    linear-gradient(135deg, #15453f, #0b2e2b);
  color: #fff;
  box-shadow: var(--shadow-2);
}
.banner strong { display: block; font-size: 16px; }
.banner span { display: block; margin-top: 5px; color: rgba(255, 255, 255, 0.78); font-size: 13px; line-height: 1.45; }
.banner .button { flex: 0 0 auto; }
.upgrade-banner { margin-top: 16px; }

/* Section */
.section { margin: 22px 0 0; }
.compact-section { margin-top: 16px; }
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.section-title h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 17px;
  letter-spacing: 0;
}

.text-link {
  color: var(--teal);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
  transition: background 160ms var(--ease);
}
.text-link:hover { background: var(--teal-soft); }

/* 横向 chip 行 */
.chip-row {
  display: flex;
  gap: 8px;
  margin: 12px -16px 14px;
  padding: 0 16px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.chip-row::-webkit-scrollbar { display: none; }

.chip {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  scroll-snap-align: start;
  transition: background 140ms var(--ease), color 140ms var(--ease), border-color 140ms var(--ease), transform 140ms var(--ease);
}
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip:active { transform: scale(0.96); }
.chip.active {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.22);
}

/* 卡片 */
.card-list, .compact-list { display: grid; gap: 10px; }

.card {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  transition: transform 160ms var(--ease), box-shadow 200ms var(--ease), border-color 160ms var(--ease);
}
.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); }
.card-head { display: flex; justify-content: space-between; gap: 10px; }
.card-title { margin: 0; font-size: 16px; line-height: 1.3; letter-spacing: 0; font-weight: 800; }

.badge-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  background: #edf2f7;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.badge.hot { background: var(--amber-soft); color: #8a5b00; }
.badge.verify { background: var(--blue-soft); color: var(--blue); }
.badge.open { background: var(--green-soft); color: var(--teal); }
.badge.closed { background: #f1f5f9; color: var(--muted); }

.meta-grid, .meta-stack { display: grid; gap: 7px; margin-top: 12px; }
.meta {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}
.meta svg { flex: 0 0 auto; width: 16px; height: 16px; }

.price {
  color: var(--teal);
  font-size: 18px;
  font-weight: 850;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* 二手列表行 */
.list-row {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform 160ms var(--ease), box-shadow 200ms var(--ease), border-color 160ms var(--ease);
}
.list-row:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); }

.thumb, .detail-media {
  display: grid;
  place-items: center;
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(15, 118, 110, 0.16), rgba(245, 158, 11, 0.13)),
    #edf5f2;
  color: var(--teal);
  overflow: hidden;
}
.thumb { width: 80px; height: 80px; }
.thumb svg { width: 34px; height: 34px; }

.thumb img, .detail-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.row-body { min-width: 0; }
.row-title { display: block; margin: 1px 0 6px; font-size: 15px; line-height: 1.3; font-weight: 800; }
.row-desc {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 空状态 */
.empty {
  padding: 32px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
  text-align: center;
  display: grid;
  gap: 6px;
}
.empty strong { display: block; font-size: 15px; }
.empty span { color: var(--muted); font-size: 14px; line-height: 1.5; }

/* 详情页 */
.detail-hero {
  margin: 8px 0 16px;
  padding: 18px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}
.detail-media {
  width: 100%;
  height: 200px;
  margin-bottom: 14px;
}
.detail-media svg { width: 58px; height: 58px; }
.detail-title { margin: 0; font-size: 24px; line-height: 1.15; letter-spacing: -0.4px; font-weight: 800; }
.detail-copy { margin: 12px 0 0; color: var(--ink-soft); font-size: 15px; line-height: 1.6; }

.detail-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.detail-back {
  margin: 4px 0 0;
  padding: 6px 10px 6px 4px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.detail-back:hover { color: var(--teal); background: var(--teal-soft); }

/* 管理后台 */
.admin-tabs { margin-bottom: 14px; }
.admin-list { margin-top: 14px; }
.admin-card { cursor: default; }
.admin-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.admin-title-actions { display: flex; align-items: center; gap: 12px; }


/* 按钮 */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 12px;
  background: var(--teal);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms var(--ease), box-shadow 160ms var(--ease), background 160ms var(--ease), opacity 160ms var(--ease);
  box-shadow: 0 6px 16px rgba(15, 118, 110, 0.22);
}
.button:hover { background: var(--teal-2); }
.button:active { transform: translateY(1px); box-shadow: 0 3px 10px rgba(15, 118, 110, 0.22); }
.button[disabled] { opacity: 0.55; cursor: not-allowed; box-shadow: none; }

.button.secondary {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-1);
}
.button.secondary:hover { border-color: var(--line-strong); background: var(--surface-tint); }
.button.warning {
  background: linear-gradient(135deg, var(--amber-2), var(--amber));
  color: #2c1b00;
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.28);
}
.button.warning:hover { filter: brightness(1.04); }
.button.danger { background: var(--red); box-shadow: 0 6px 16px rgba(180, 35, 59, 0.22); }
.button.danger:hover { background: #9a1d33; }

.button.compact {
  min-height: 36px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 10px;
  box-shadow: none;
}

/* 信息行 */
.info-panel { display: grid; gap: 10px; margin-top: 12px; }
.info-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: background 160ms var(--ease), border-color 160ms var(--ease);
}
.info-line:hover { background: var(--surface-tint); border-color: var(--line-strong); }
.info-line span { min-width: 0; color: var(--muted); font-size: 13px; }
.info-line strong {
  text-align: right;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.small-action {
  display: inline-grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--teal);
  cursor: pointer;
}

/* 分段控件 */
.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.segment {
  min-height: 40px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background 160ms var(--ease), color 160ms var(--ease);
}
.segment:hover { color: var(--ink); }
.segment.active {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.22);
}

/* 名额提示条 */
.slot-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
}
.slot-notice svg { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 1px; }
.slot-notice--free {
  background: var(--green-soft);
  color: var(--teal-dark);
}
.slot-notice--free svg { color: var(--teal); }
.slot-notice--paid {
  background: var(--amber-soft);
  color: #5a3a00;
}
.slot-notice--paid svg { color: var(--amber); }
.slot-notice--paid div { display: grid; gap: 3px; }
.slot-notice--paid strong { display: block; font-size: 14px; color: #3d2800; }
.slot-notice--paid span { color: #6b4500; }

/* 发布成功页 */
.publish-success {
  margin-top: 48px;
  text-align: center;
  display: grid;
  gap: 10px;
  justify-items: center;
}
.publish-success-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--teal);
  margin-bottom: 8px;
}
.publish-success-icon svg { width: 32px; height: 32px; }
.publish-success h2 { margin: 0; font-size: 22px; letter-spacing: -0.3px; }
.publish-success p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; max-width: 28ch; }
.publish-success-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; justify-content: center; }

/* 表单 */
.form { display: grid; gap: 12px; margin-top: 16px; }
.field { display: grid; gap: 7px; }
.field label { color: var(--ink); font-size: 13px; font-weight: 800; }
.field .label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.field .label-row label { margin: 0; }
.field .field-note { color: var(--muted); font-size: 12px; font-weight: 600; }

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  background: var(--surface);
  color: var(--ink);
  font-size: 16px; /* >=16px：iOS 不放大 */
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease), background 160ms var(--ease);
}
.field input::placeholder,
.field textarea::placeholder { color: var(--muted-2); }
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}
.field input:invalid:not(:placeholder-shown):not(:focus) {
  border-color: var(--red);
  background: #fff7f8;
}
.field textarea { min-height: 110px; resize: vertical; line-height: 1.5; }

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}
.code-row .button { min-height: 48px; white-space: nowrap; }

/* 登录 / 我的 */
.login-panel, .profile-panel {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.profile-head { display: flex; align-items: center; gap: 12px; }
.avatar {
  background: linear-gradient(135deg, var(--amber-2), var(--amber));
  color: #2c1b00;
  font-weight: 900;
  font-size: 17px;
}
.profile-name { margin: 0; font-size: 18px; font-weight: 800; }
.profile-phone { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

/* 底部导航 */
.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: min(100%, 520px);
  padding: 7px 10px calc(7px + var(--safe-bottom));
  transform: translateX(-50%);
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.nav-item {
  display: grid;
  place-items: center;
  gap: 3px;
  min-height: 54px;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: color 160ms var(--ease), background 160ms var(--ease), transform 120ms var(--ease);
}
.nav-item:active { transform: scale(0.94); }
.nav-item.active {
  color: var(--teal);
  background: var(--green-soft);
}
.nav-item.publish { color: #2c1b00; }
.nav-item.publish svg {
  padding: 4px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--amber-2), var(--amber));
  color: #2c1b00;
  width: 32px;
  height: 32px;
  box-shadow: 0 8px 18px rgba(245, 158, 11, 0.36);
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(92px + var(--safe-bottom));
  z-index: 80;
  max-width: min(88vw, 420px);
  padding: 12px 16px;
  transform: translate(-50%, 18px);
  border-radius: 12px;
  background: rgba(23, 33, 43, 0.96);
  color: #fff;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms var(--ease), transform 220ms var(--ease-out);
  box-shadow: 0 12px 36px rgba(0,0,0,0.28);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ========================================================================
   骨架屏（首屏占位 + 加载占位）
   ======================================================================== */
.boot-skeleton {
  display: grid;
  gap: 14px;
  padding: 28px 18px;
}
.boot-skeleton__bar {
  height: 14px;
  border-radius: 8px;
  background: linear-gradient(90deg, #e6efea 0%, #f4f8f6 50%, #e6efea 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}
.boot-skeleton__bar:nth-child(1) { width: 60%; height: 36px; }
.boot-skeleton__bar:nth-child(2) { width: 100%; height: 110px; border-radius: 14px; }
.boot-skeleton__bar:nth-child(3) { width: 80%; }

.skeleton-card {
  height: 96px;
  border-radius: 14px;
  background: linear-gradient(90deg, #e6efea 0%, #f4f8f6 50%, #e6efea 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ========================================================================
   桌面端容器
   ======================================================================== */
/* 中等屏幕：手机壳居中 */
@media (min-width: 760px) and (max-width: 1023px) {
  body { padding: 24px 0; }
  .app-shell {
    min-height: calc(100svh - 48px);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(18, 35, 41, 0.10), 0 0 0 1px rgba(23, 33, 43, 0.04);
  }
  .screen { min-height: calc(100svh - 48px); }
  .bottom-nav { border-radius: 0 0 22px 22px; }
}

/* 桌面端：宽布局 + 侧边栏 */
@media (min-width: 1024px) {
  body { padding: 0; background-attachment: fixed; }

  .app-shell {
    width: 100%;
    max-width: 1280px;
    min-height: 100svh;
    border-radius: 0;
    box-shadow: none;
    display: grid;
    grid-template-columns: 220px 1fr;
    grid-template-rows: 1fr;
    overflow: visible;
  }

  /* 侧边栏 */
  .desktop-sidebar {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: sticky;
    top: 0;
    height: 100svh;
    padding: 24px 16px;
    background: var(--surface);
    border-right: 1px solid var(--line);
    overflow-y: auto;
  }

  .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius);
    margin-bottom: 12px;
    text-decoration: none;
  }
  .sidebar-brand:hover { background: var(--surface-tint); }
  .sidebar-brand .brand-mark svg { width: 28px; height: 28px; }

  .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
  }

  .side-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--muted);
    cursor: pointer;
    transition: background 120ms, color 120ms;
    text-align: left;
    width: 100%;
  }
  .side-nav-item:hover { background: var(--surface-tint); color: var(--ink); }
  .side-nav-item.active { background: var(--teal-soft); color: var(--teal); }
  .side-nav-item svg { width: 18px; height: 18px; }

  .sidebar-cities {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    font-size: 0.78rem;
    color: var(--muted-2);
    margin-top: auto;
  }
  .sidebar-cities svg { width: 14px; height: 14px; flex-shrink: 0; }

  /* 메인 영역 */
  .main-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100svh;
    overflow-x: hidden;
  }

  /* 바텀 내비 숨김 */
  .bottom-nav { display: none; }

  .screen {
    flex: 1;
    min-height: auto;
    padding: 0 32px 48px;
  }

  /* 탑바: 브랜드 숨김 (사이드바에 있음) */
  .topbar { display: none; }

  /* 桌面端顶部搜索栏 */
  .topbar-desktop {
    display: flex;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 16px 0;
    background: rgba(245, 245, 247, 0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid transparent;
    transition: border-color 200ms var(--ease);
  }
  .topbar-desktop .search-shell {
    flex: 1;
    margin: 0;
    height: 44px;
    border-radius: 12px;
  }
  .topbar-desktop .button {
    min-height: 44px;
    padding: 0 18px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* 카드 그리드 다열 */
  .card-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compact-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* 桌面端 hero 更大，隐藏 hero 内搜索框（topbar 已有） */
  .hero { padding: 48px 0 32px; }
  .hero h1 { font-size: 2.4rem; }
  .hero p { font-size: 1.05rem; }
  .hero-search { display: none; }

  /* 퀵 그리드 더 넓게 */
  .quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* 窄屏：把网格降为单列 */
@media (max-width: 360px) {
  .screen { padding-left: 12px; padding-right: 12px; }
  .quick-grid,
  .stats-row,
  .detail-actions,
  .admin-actions,
  .two-col,
  .code-row {
    grid-template-columns: 1fr;
  }
  .chip-row {
    margin-left: -12px;
    margin-right: -12px;
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* ========================================================================
   尊重用户的"减少动画"偏好
   ======================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
