/* =========================================
   安家集序 · 手机端高端极简样式
   ========================================= */

/* ---- 设计变量 ---- */
:root {
  --green:      #174f3e;
  --green2:     #236b54;
  --green3:     #368b6d;
  --mint:       #eaf2eb;
  --mint2:      #d4e6da;
  --cream:      #f9f7f2;
  --cream2:     #f2efe7;
  --card:       #ffffff;
  --ink:        #1b2621;
  --ink2:       #3d4c45;
  --muted:      #75817b;
  --line:       rgba(23, 79, 62, 0.09);
  --gold:       #c69750;
  --gold-soft:  #fbf4e7;
  --gold-line:  rgba(198, 151, 80, 0.28);
  --shadow:     0 10px 28px rgba(23, 79, 62, 0.08);
  --shadow2:    0 3px 12px rgba(23, 79, 62, 0.05);
  --radius:     18px;
  --radius-sm:  12px;
}

/* ---- 重置 ---- */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: #e4e7e2;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
h1, h2, h3, h4, p { margin: 0; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
input { font-family: inherit; }

/* ---- 通用 SVG 图标尺寸 ---- */
.ico {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.15em;
  flex-shrink: 0;
}

/* ---- 应用外壳 ---- */
.app-shell {
  max-width: 520px;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--cream);
  position: relative;
  padding-bottom: 84px;
  box-shadow: 0 0 48px rgba(17, 36, 28, 0.12);
}

/* ---- 顶部导航栏 ---- */
.topbar {
  height: 66px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--green);
}
.brand-mark {
  width: 34px;
  height: 34px;
  color: var(--green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.brand-mark svg { width: 32px; height: 32px; }
.brand b {
  display: block;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--green);
  line-height: 1.15;
}
.brand small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 2px;
  letter-spacing: 0.4px;
}
.topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.city-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  background: var(--mint);
  padding: 6px 11px;
  border-radius: 20px;
  color: var(--green);
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid var(--mint2);
}
.city-pill svg { width: 13px; height: 13px; }
.topbar-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
  padding: 6px 11px;
  border-radius: 20px;
  white-space: nowrap;
  transition: transform 0.12s, background 0.15s;
}
.topbar-share-btn:active { transform: scale(0.96); }
.topbar-share-btn svg { width: 13px; height: 13px; color: var(--gold); }

/* ---- 主内容区 ---- */
main { padding: 14px 15px 24px; }

/* ---- Hero 区块 ---- */
.hero {
  position: relative;
  border-radius: 20px;
  padding: 26px 20px 44px;
  min-height: 214px;
  background:
    linear-gradient(102deg, rgba(249, 247, 242, 0.94) 0%, rgba(249, 247, 242, 0.80) 46%, rgba(249, 247, 242, 0.16) 100%),
    url('./assets/images/hero-living.jpg') center / cover no-repeat;
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.7);
}
.hero-content { position: relative; z-index: 1; max-width: 78%; }
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--green2);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(23, 79, 62, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}
.hero h1 {
  font-size: 23px;
  line-height: 1.38;
  color: var(--green);
  font-weight: 800;
  letter-spacing: 0.4px;
  margin-bottom: 8px;
}
.slogan {
  color: var(--gold);
  font-weight: 800;
}
.hero-sub {
  color: var(--ink2);
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 14px;
  font-weight: 500;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--green);
  color: #fff;
  border-radius: 20px;
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(23, 79, 62, 0.2);
}
.hero-badge.light {
  background: rgba(255, 255, 255, 0.86);
  color: var(--green);
  border: 1px solid rgba(23, 79, 62, 0.12);
  box-shadow: none;
  backdrop-filter: blur(6px);
}

/* ---- 品类悬浮卡片（参考样图叠层设计） ---- */
.categories-card {
  position: relative;
  z-index: 2;
  margin: -24px 0 14px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  padding: 12px 10px 10px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.9);
}
.categories-rail {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -ms-overflow-style: none;
  scrollbar-width: none;
  padding: 2px 2px 4px;
}
.categories-rail::-webkit-scrollbar { display: none; }
.category {
  flex: 0 0 78px;
  scroll-snap-align: start;
  border: 0;
  background: transparent;
  border-radius: 12px;
  padding: 8px 4px 6px;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  transition: transform 0.15s, background 0.15s;
}
.category:hover { background: var(--cream); }
.category:active { transform: scale(0.94); }
.cat-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--cream);
  border: 1px solid var(--line);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}
.category:hover .cat-icon {
  background: var(--mint);
  border-color: var(--mint2);
}
.cat-icon svg { width: 20px; height: 20px; }
.category span:last-child {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink2);
  white-space: nowrap;
}
.rail-hint {
  text-align: center;
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
  letter-spacing: 0.4px;
}

/* ---- 搜索框 ---- */
.searchbox {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 14px;
  margin: 12px 0 14px;
  box-shadow: var(--shadow2);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.searchbox:focus-within {
  border-color: var(--green3);
  box-shadow: 0 0 0 3px rgba(54, 139, 109, 0.12);
}
.search-icon {
  color: var(--muted);
  display: inline-flex;
  align-items: center;
}
.search-icon svg { width: 17px; height: 17px; }
.searchbox input {
  border: 0;
  outline: 0;
  flex: 1;
  background: transparent;
  font-size: 14px;
  color: var(--ink);
  min-width: 0;
}
.searchbox input::placeholder { color: #9ea8a3; }
.clear-btn {
  border: 0;
  background: var(--cream2);
  color: var(--muted);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 12px;
}
.clear-btn[hidden] { display: none; }
.clear-btn:hover { color: var(--ink); }

/* ---- Section 标题（参考样图居中线饰 & 极简对齐） ---- */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 2px 12px;
}
.section-head h2 {
  font-size: 17px;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0.3px;
}
.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 20px 0 14px;
}
.section-divider::before,
.section-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  max-width: 56px;
  background: linear-gradient(90deg, transparent, rgba(23, 79, 62, 0.28));
}
.section-divider::after {
  background: linear-gradient(90deg, rgba(23, 79, 62, 0.28), transparent);
}
.section-divider h2 {
  font-size: 16px;
  font-weight: 800;
  color: var(--green);
  letter-spacing: 1px;
}
.text-link {
  border: 0;
  background: none;
  color: var(--green2);
  font-size: 12px;
  padding: 0;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.muted-text { color: var(--muted); font-size: 12px; }

/* ---- 商家卡片 ---- */
.store-list { display: grid; gap: 12px; }
.store-card {
  display: flex;
  gap: 13px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow2);
  cursor: pointer;
  transition: transform 0.16s, box-shadow 0.16s, border-color 0.16s;
  align-items: stretch;
}
.store-card:hover, .store-card:focus-within {
  box-shadow: var(--shadow);
  border-color: var(--mint2);
  transform: translateY(-1px);
}
.store-card:active { transform: scale(0.985); }
.store-thumb {
  width: 112px;
  height: 92px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--cream2);
  flex-shrink: 0;
  border: 1px solid rgba(23, 79, 62, 0.06);
}
.small-thumb { width: 84px; height: 74px; }
.store-info {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.store-name-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.store-info h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.32;
  word-break: break-word;
}
.category-badge {
  flex-shrink: 0;
  background: var(--gold-soft);
  color: #8f6224;
  border: 1px solid var(--gold-line);
  border-radius: 20px;
  padding: 2px 9px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.category-badge.large { font-size: 12px; padding: 4px 11px; }
.store-products {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.5;
  margin: 2px 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.store-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}
.store-address {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #64736b;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.store-address svg { width: 12px; height: 12px; color: var(--green2); flex-shrink: 0; }
.enter-pill {
  flex-shrink: 0;
  background: var(--green);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.all-stores-cta {
  margin-top: 14px;
  width: 100%;
  background: var(--card);
  border: 1px solid var(--mint2);
  color: var(--green);
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: var(--shadow2);
  transition: background 0.15s, transform 0.15s;
}
.all-stores-cta:hover { background: var(--mint); }
.all-stores-cta:active { transform: scale(0.98); }

/* ---- 市场横幅 ---- */
.market-banner {
  margin-top: 18px;
  padding: 10px 14px 10px 10px;
  border-radius: var(--radius);
  background: linear-gradient(112deg, #e7f1ea 0%, #f5efe3 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(23, 79, 62, 0.1);
  box-shadow: var(--shadow2);
}
.banner-media {
  width: 82px;
  height: 58px;
  border-radius: 11px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.8);
}
.banner-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.banner-left { min-width: 0; flex: 1; }
.banner-left b {
  color: var(--green);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.banner-left b svg { width: 14px; height: 14px; flex-shrink: 0; }
.banner-left small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
  font-size: 11px;
}

/* ---- 底部提示 ---- */
.bottom-tips {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  margin-top: 18px;
  line-height: 1.6;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.bottom-tips svg { width: 13px; height: 13px; color: var(--green2); }

/* ---- 通用按钮 ---- */
.btn {
  border: 0;
  border-radius: 22px;
  padding: 11px 16px;
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: opacity 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  line-height: 1;
  white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn:active { opacity: 0.88; transform: scale(0.97); }
.btn.secondary { background: var(--mint); color: var(--green); border: 1px solid var(--mint2); }
.btn.outline {
  background: #fff;
  color: var(--green);
  border: 1px solid var(--mint2);
}
.btn.small { padding: 8px 13px; font-size: 12px; }
.btn.full-width { width: 100%; border-radius: 14px; padding: 13px 16px; }
.btn.disabled, .btn[disabled] {
  background: #e9ece9;
  color: var(--muted);
  cursor: not-allowed;
  border: 1px solid var(--line);
}

/* ---- 页面标题 ---- */
.page-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 4px 2px 14px;
}
.page-title {
  font-size: 22px;
  color: var(--green);
  font-weight: 800;
  letter-spacing: 0.5px;
}

/* ---- 筛选器 ---- */
.filters {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 0 14px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
.filter {
  white-space: nowrap;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink2);
  border-radius: 20px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
  transition: all 0.15s;
}
.filter.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  box-shadow: 0 4px 12px rgba(23, 79, 62, 0.22);
}

/* ---- 商家详情（参考样图叠层设计） ---- */
.detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 7px 13px;
  box-shadow: var(--shadow2);
}
.back-btn svg { width: 15px; height: 15px; }
.share-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow2);
}
.share-icon-btn svg { width: 16px; height: 16px; }

.detail-cover-wrap {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.detail-cover {
  width: 100%;
  height: 224px;
  object-fit: cover;
  background: var(--cream2);
}
.detail-panel {
  position: relative;
  z-index: 2;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin: -28px 8px 0;
  box-shadow: var(--shadow);
}
.detail-brand-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.brand-crest {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: linear-gradient(145deg, #f9f6ee, #edf4ef);
  border: 1px solid var(--mint2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--green);
  padding: 4px;
  text-align: center;
}
.brand-crest b {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.3px;
}
.brand-crest small {
  font-size: 8px;
  color: var(--gold);
  font-weight: 700;
  margin-top: 2px;
  letter-spacing: 0.6px;
}
.detail-head-meta { min-width: 0; flex: 1; }
.detail-name-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}
.detail-panel h1 {
  font-size: 19px;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.3;
}
.detail-sub-products {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 14px;
  background: var(--mint);
  border-radius: 12px;
  padding: 9px 8px;
}
.trust-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
}
.trust-item svg { width: 14px; height: 14px; color: var(--green2); }

/* ---- 操作按钮行 ---- */
.action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.action-row .btn { border-radius: 14px; padding: 13px 14px; }

/* ---- 内容区块 ---- */
.content-section {
  margin-top: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow2);
}
.content-section h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 12px;
}
.content-section h3 svg { width: 17px; height: 17px; color: var(--green2); }

/* ---- 图片网格 ---- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.photo-btn {
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: block;
}
.photo-item {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--cream2);
  border: 1px solid rgba(23, 79, 62, 0.06);
  transition: transform 0.2s;
}
.photo-btn:hover .photo-item { transform: scale(1.03); }
.photo-notice {
  font-size: 11px;
  color: var(--muted);
  margin-top: 10px;
  text-align: center;
}

/* ---- 产品标签 ---- */
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip {
  background: var(--gold-soft);
  color: #8f6224;
  border: 1px solid var(--gold-line);
  border-radius: 20px;
  padding: 3px 9px;
  font-size: 10.5px;
  font-weight: 600;
}
.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.product-tag {
  background: var(--cream);
  color: var(--ink2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 12.5px;
  font-weight: 600;
}

/* ---- 店铺介绍 ---- */
.intro {
  font-size: 13.5px;
  line-height: 1.85;
  color: #516059;
}

/* ---- 位置卡片 ---- */
.location-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.location-card b { color: var(--ink); font-size: 15px; display: block; margin-bottom: 3px; }
.location-card p { font-size: 12px; color: var(--muted); margin: 2px 0; }
.location-card small { font-size: 11px; color: var(--muted); }

/* ---- 相关商家横向列表 ---- */
.related-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}
.related-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  transition: transform 0.15s;
}
.related-card:active { transform: scale(0.96); }
.related-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  background: var(--cream2);
}
.related-card span {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-card small { font-size: 10px; color: var(--muted); }

/* ---- 联盟位置页 ---- */
.map-card {
  border-radius: 20px;
  background: var(--card);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.map-visual {
  width: 100%;
  height: 168px;
  object-fit: cover;
  background: var(--cream2);
}
.map-card-body { padding: 16px 18px 18px; }
.map-info h2 {
  font-size: 22px;
  color: var(--green);
  margin: 8px 0 4px;
  font-weight: 800;
}
.map-info p { font-size: 12.5px; color: var(--muted); }
.location-card-item { align-items: center; }

/* ---- 通知/说明 ---- */
.notice {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.75;
  margin-top: 16px;
  text-align: center;
  padding: 12px 14px;
  background: var(--cream2);
  border-radius: 12px;
  border: 1px solid var(--line);
}

/* ---- 空状态 ---- */
.empty {
  padding: 44px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 2;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

/* ---- 底部导航 ---- */
.bottom-nav {
  height: 66px;
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(520px, 100%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  z-index: 20;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.nav-item {
  border: 0;
  background: none;
  color: #8f9994;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-icon svg { width: 21px; height: 21px; }
.nav-item.active { color: var(--green); }
.nav-item.active .nav-icon svg { stroke-width: 2.3; }

/* ---- 全屏灯箱预览 ---- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 24, 20, 0.88);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: min(500px, 92vw);
  max-height: 76dvh;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  object-fit: contain;
  background: #fff;
}
.lightbox-caption {
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  margin-top: 12px;
  font-weight: 600;
}
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- Toast 提示 ---- */
.toast {
  position: fixed;
  bottom: 88px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: rgba(23, 45, 36, 0.94);
  color: #fff;
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s;
  white-space: nowrap;
  z-index: 999;
  backdrop-filter: blur(8px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- 媒体分享弹窗 ---- */
.share-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 24, 20, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.share-modal.open { opacity: 1; pointer-events: auto; }
.share-sheet {
  width: min(500px, 100%);
  max-height: 90dvh;
  overflow-y: auto;
  background: var(--cream);
  border-radius: 22px;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 24px 60px rgba(10, 22, 17, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.65);
  transform: translateY(18px);
  transition: transform 0.22s ease;
}
.share-modal.open .share-sheet { transform: translateY(0); }
.share-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.share-sheet-head h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--green);
}
.share-sheet-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}
.share-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink2);
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.share-poster-wrap {
  background: var(--card);
  border-radius: 16px;
  padding: 10px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow2);
  text-align: center;
}
.share-poster-img {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  border-radius: 11px;
  background: #143328;
  margin: 0 auto;
}
.share-poster-tip {
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted);
}
.share-copy-section { margin-top: 12px; }
.share-copy-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink2);
  margin-bottom: 6px;
}
.share-copy-textarea {
  width: 100%;
  min-height: 92px;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink);
  outline: none;
}
.share-copy-textarea:focus { border-color: var(--green2); }
.share-sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.share-sheet-actions .btn { min-height: 44px; font-size: 13.5px; }
.share-sheet-actions .btn.full-span { grid-column: 1 / -1; }
@media (min-width: 600px) {
  .share-modal { align-items: center; }
}

/* ---- 桌面端适配 ---- */
@media (min-width: 600px) {
  body { padding: 24px 0; background: #d5dad4; }
  .app-shell {
    border-radius: 28px;
    overflow: hidden;
    min-height: calc(100dvh - 48px);
    box-shadow: 0 24px 64px rgba(17, 36, 28, 0.18);
  }
  .bottom-nav { border-radius: 0 0 28px 28px; overflow: hidden; }
}
