/* 邯郸美食地图 · V3 赵都暖食主题 */
:root {
  --primary: #E8352E;
  --primary-dark: #C62828;
  --primary-light: #FF6B52;
  --primary-soft: rgba(232, 53, 46, 0.10);
  --primary-gradient: linear-gradient(135deg, #FF8C42 0%, #E8352E 55%, #C62828 100%);
  --accent-warm: #FF8C42;
  --accent-warm-soft: rgba(255, 140, 66, 0.12);
  --bg: #FFFBF8;
  --bg-page: #F5EDE6;
  --bg-subtle: #FFF3EB;
  --bg-warm: #FFE8DC;
  --text: #2C1810;
  --text-secondary: #6B5344;
  --text-muted: #9C8478;
  --border: rgba(232, 53, 46, 0.10);
  --border-strong: rgba(232, 53, 46, 0.22);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 8px rgba(232, 53, 46, 0.06);
  --shadow: 0 4px 20px rgba(232, 53, 46, 0.10);
  --shadow-warm: 0 6px 24px rgba(232, 53, 46, 0.14);
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --gold: #F5A623;
  --gold-soft: rgba(245, 166, 35, 0.15);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg-page);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 32px 0 48px;
  -webkit-font-smoothing: antialiased;
}

/* Shell & Tab */
.phone-shell {
  width: 375px; min-height: 812px; background: var(--bg);
  border-radius: 40px; box-shadow: var(--shadow-warm), 0 0 0 1px var(--border);
  overflow: hidden; position: relative; display: flex; flex-direction: column;
}
.phone-notch {
  height: 44px; background: var(--primary-gradient); display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; color: #fff; flex-shrink: 0; z-index: 10;
}
.notch-brand { letter-spacing: 0.02em; }
.phone-content {
  flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch;
  padding-bottom: calc(56px + var(--safe-bottom));
}
.tab-bar {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: calc(56px + var(--safe-bottom)); padding-bottom: var(--safe-bottom);
  background: var(--bg); border-top: 1px solid var(--border); display: flex; z-index: 100;
  box-shadow: 0 -4px 16px rgba(232, 53, 46, 0.06);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; font-size: 10px; color: var(--text-muted); text-decoration: none; cursor: pointer;
  transition: color 0.2s var(--ease), transform 0.15s var(--ease); position: relative;
  padding-top: 4px;
}
.tab-icon {
  width: 22px; height: 22px; color: var(--text-muted);
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}
.tab-item span { line-height: 1.1; white-space: nowrap; }
.tab-item-map span { font-size: 9px; }
.tab-item.active { color: var(--primary); font-weight: 600; }
.tab-item.active .tab-icon { color: var(--primary); transform: scale(1.06); }
.tab-item:active { opacity: 0.75; transform: scale(0.96); }

/* Page base */
.page { padding: 16px 16px 24px; animation: pageIn 0.35s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.page-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.back-btn {
  width: 36px; height: 36px; border: 1px solid var(--border); background: var(--bg);
  border-radius: 50%; font-size: 16px; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.back-btn:active { background: var(--bg-subtle); }
.back-btn-floating { position: absolute; top: 12px; left: 12px; z-index: 10; box-shadow: var(--shadow-sm); }
.detail-hero-img .back-btn-floating, .heritage-detail .detail-hero-img .back-btn-floating { top: 12px; left: 12px; }
.page-title { font-size: 17px; font-weight: 600; flex: 1; min-width: 0; }
.flex-1 { flex: 1; min-width: 0; }
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-muted); font-size: 14px; }
.empty-state .icon { font-size: 40px; margin-bottom: 12px; opacity: 0.5; }
.page-footnote {
  text-align: center; font-size: 11px; color: var(--text-muted);
  margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--border);
}

/* Search & district */
.search-row { display: flex; gap: 8px; align-items: stretch; }
.search-row .search-bar { margin-bottom: 0; }
.search-bar {
  display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.92);
  border-radius: var(--radius-sm); padding: 10px 14px; border: 1px solid rgba(255,255,255,0.6);
  box-shadow: var(--shadow-sm);
}
.search-bar:focus-within { border-color: var(--primary-light); box-shadow: 0 0 0 2px var(--primary-soft); }
.search-bar input { flex: 1; border: none; outline: none; font-size: 14px; background: transparent; font-family: inherit; }
.district-btn {
  flex-shrink: 0; padding: 10px 14px; background: rgba(255,255,255,0.92);
  border: 1px solid rgba(255,255,255,0.6); border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; color: var(--primary-dark);
  box-shadow: var(--shadow-sm);
}
.district-btn:active { background: var(--bg-warm); }
.district-picker-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 200;
  display: flex; align-items: flex-end; justify-content: center;
}
.district-picker-panel {
  background: var(--bg); width: 100%; max-width: 375px;
  border-radius: 16px 16px 0 0; padding: 20px 16px calc(24px + var(--safe-bottom));
  max-height: 70vh; overflow-y: auto; border-top: 1px solid var(--border);
}
.district-options { /* container */ }
.district-group-title { font-size: 12px; color: var(--text-muted); margin: 16px 0 6px; font-weight: 500; }
.district-option { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; cursor: pointer; margin-bottom: 2px; }
.district-option.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.district-option:active { background: var(--bg-subtle); }

/* Home */
.home-page { padding-top: 0; padding-left: 0; padding-right: 0; }
.home-page > :not(.home-hero) { padding-left: 16px; padding-right: 16px; }
.home-hero {
  background: var(--primary-gradient);
  padding: 16px 16px 0;
  margin-bottom: 4px;
  border-radius: 0 0 20px 20px;
  box-shadow: var(--shadow-warm);
}
.home-top { margin-bottom: 14px; }
.home-brand { margin-bottom: 14px; }
.home-title {
  font-family: "Noto Serif SC", serif; font-size: 24px; font-weight: 700;
  letter-spacing: 0.02em; line-height: 1.3; margin-bottom: 4px; color: #fff;
}
.home-sub { font-size: 13px; color: rgba(255,255,255,0.85); }
.quick-nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 16px; }
.quick-nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 12px 4px; font-size: 12px; font-weight: 600; color: var(--text);
  text-decoration: none; background: var(--bg); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.quick-nav-item::before {
  content: ''; width: 32px; height: 32px; border-radius: 10px; margin-bottom: 6px;
  background-size: 18px; background-repeat: no-repeat; background-position: center;
}
.nav-map::before { background-color: var(--primary-soft); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23E8352E' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z'/%3E%3C/svg%3E"); }
.nav-heritage::before { background-color: var(--gold-soft); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23F5A623' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/%3E%3C/svg%3E"); }
.nav-free-meal::before { background-color: rgba(232,53,46,0.1); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23E8352E' viewBox='0 0 24 24'%3E%3Cpath d='M20 6h-2.18c.11-.31.18-.65.18-1 0-1.66-1.34-3-3-3-1.05 0-1.96.54-2.5 1.35l-.5.67-.5-.68C10.96 2.54 10.05 2 9 2 7.34 2 6 3.34 6 5c0 .35.07.69.18 1H4c-1.11 0-1.99.89-1.99 2L2 19c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-5-2c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM9 4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm11 15H4v-2h16v2zm0-5H4V8h5.08L7 10.83 8.62 12 12 7.4l3.38 4.6L17 10.83 14.92 8H20v6z'/%3E%3C/svg%3E"); }
.nav-rank::before { background-color: var(--accent-warm-soft); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23FF8C42' viewBox='0 0 24 24'%3E%3Cpath d='M16 6l2.29 2.29-4.88 4.88-4-4L2 16.59 3.41 18l6-6 4 4 6.3-6.29L22 12V6z'/%3E%3C/svg%3E"); }
.nav-deals::before { background-color: rgba(232,53,46,0.08); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23C62828' viewBox='0 0 24 24'%3E%3Cpath d='M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zM1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49A1 1 0 0020 4H5.21l-.94-2H1zm16 16c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z'/%3E%3C/svg%3E"); }
.nav-map { color: var(--primary); }
.nav-free-meal { color: var(--primary); }
.nav-rank { color: var(--accent-warm); }
.nav-deals { color: var(--primary-dark); }
.nav-heritage { color: #B8860B; }
.quick-nav-item:active { transform: scale(0.96); box-shadow: none; }
.points-strip {
  display: flex; justify-content: space-between; align-items: center;
  margin: 0 16px 20px; padding: 14px 16px;
  background: var(--primary-gradient); border-radius: var(--radius);
  font-size: 13px; font-weight: 600; cursor: pointer; color: #fff;
  box-shadow: var(--shadow-warm);
}
.points-strip:active { opacity: 0.92; }
.points-value { font-size: 15px; font-weight: 700; }
.points-strip-links a { color: rgba(255,255,255,0.9); margin-left: 14px; font-size: 12px; text-decoration: none; font-weight: 500; }
.map-entry {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 24px; cursor: pointer; box-shadow: var(--shadow-sm);
}
.map-entry-visual {
  width: 56px; height: 56px; border-radius: var(--radius-sm); background: var(--bg-warm);
  flex-shrink: 0; border: 2px solid var(--primary-soft); overflow: hidden;
}
.map-entry-visual.cover-img { width: 56px; height: 56px; }
.map-entry-body { flex: 1; min-width: 0; }
.map-entry-body h3 { font-size: 15px; font-weight: 600; margin-bottom: 2px; color: var(--primary-dark); }
.map-entry-body p { font-size: 12px; color: var(--text-muted); }
.map-entry-arrow { font-size: 16px; color: var(--primary); flex-shrink: 0; font-weight: 700; }

/* Banner Carousel */
.banner-carousel { margin: 0 -16px 0; position: relative; }
.banner-viewport { overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow-warm); }
.banner-track { display: flex; transition: transform 0.45s var(--ease); will-change: transform; }
.banner-slide {
  flex: 0 0 100%; height: 168px; position: relative; cursor: pointer;
  background: var(--bg-warm); overflow: hidden;
}
.banner-slide-bg.cover-img { position: absolute; inset: 0; width: 100%; height: 100%; }
.banner-overlay {
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(105deg, rgba(140, 28, 19, 0.78) 0%, rgba(232, 53, 46, 0.42) 42%, transparent 72%);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 18px 20px; color: #fff;
}
.banner-tag {
  font-size: 10px; font-weight: 600; background: rgba(245, 166, 35, 0.9); color: #2C1810;
  padding: 3px 10px; border-radius: 20px; width: fit-content; margin-bottom: 8px;
}
.banner-overlay h3 { font-size: 17px; font-weight: 700; line-height: 1.35; text-shadow: 0 1px 4px rgba(0,0,0,0.2); }
.banner-cta {
  font-size: 11px; margin-top: 8px; background: rgba(255,255,255,0.22);
  display: inline-block; padding: 4px 12px; border-radius: 20px; font-weight: 500;
  backdrop-filter: blur(4px);
}
.banner-dots {
  display: flex; justify-content: center; gap: 6px; padding: 12px 0 16px;
}
.banner-dot {
  width: 6px; height: 6px; border-radius: 50%; border: none;
  background: rgba(255,255,255,0.45); cursor: pointer; padding: 0;
  transition: all 0.3s var(--ease);
}
.banner-dot.active {
  width: 20px; border-radius: 3px; background: #fff;
}

/* Sections */
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-title h2 { font-size: 16px; font-weight: 700; color: var(--primary-dark); }
.section-title a { font-size: 12px; color: var(--primary); text-decoration: none; font-weight: 500; }
.section-sub { font-size: 11px; color: var(--text-muted); font-weight: 400; margin-top: 2px; }
.section-empty { font-size: 13px; color: var(--text-muted); padding: 16px 0; }

/* Heritage scroll */
.heritage-scroll {
  display: flex; gap: 10px; overflow-x: auto; margin-bottom: 24px;
  -ms-overflow-style: none; scrollbar-width: none;
}
.heritage-scroll::-webkit-scrollbar { display: none; }
.heritage-scroll-card {
  flex: 0 0 180px; height: 120px; border-radius: var(--radius);
  overflow: hidden; position: relative; cursor: pointer; border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.heritage-scroll-bg.cover-img { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.heritage-scroll-mask {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(to top, rgba(20, 8, 6, 0.88) 0%, rgba(140, 28, 19, 0.45) 42%, transparent 68%);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 10px 12px; color: #fff;
}
.heritage-tag {
  font-size: 10px; font-weight: 600; opacity: 0.95; margin-bottom: 4px;
  background: rgba(245, 166, 35, 0.92); color: #2C1810;
  padding: 2px 8px; border-radius: 10px; width: fit-content;
}
.heritage-food-name {
  font-family: "Noto Serif SC", serif; font-size: 15px; font-weight: 700;
  line-height: 1.3; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.heritage-dish {
  font-size: 10px; opacity: 0.92; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 罡哥探店 */
.gang-scroll {
  display: flex; gap: 10px; overflow-x: auto; margin-bottom: 24px;
  -ms-overflow-style: none; scrollbar-width: none;
}
.gang-scroll::-webkit-scrollbar { display: none; }
.gang-scroll-card {
  flex: 0 0 200px; height: 128px; border-radius: var(--radius);
  overflow: hidden; position: relative; cursor: pointer; border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.gang-scroll-bg.cover-img { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.gang-scroll-mask {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(to top, rgba(20, 8, 6, 0.9) 0%, rgba(80, 30, 20, 0.4) 50%, transparent 72%);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 10px 12px; color: #fff;
}
.gang-scroll-explorer {
  display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 600; margin-bottom: 4px;
}
.gang-scroll-avatar {
  width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
  background-size: cover; background-position: center; border: 1px solid rgba(255,255,255,0.8);
}
.gang-scroll-name {
  font-size: 14px; font-weight: 700; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gang-scroll-dish { font-size: 10px; opacity: 0.9; margin-top: 2px; }
.gang-explore-page { padding-bottom: 24px; }
.gang-hero {
  text-align: center; padding: 16px; margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(232,53,46,0.08), rgba(245,166,35,0.1));
  border: 1px solid rgba(232,53,46,0.12); border-radius: var(--radius);
}
.gang-hero-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.gang-hero-desc { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.gang-explorer-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.gang-explorer-chip {
  font-size: 11px; padding: 4px 10px; border-radius: 999px;
  background: #fff; border: 1px solid var(--border); color: var(--text-secondary);
}
.gang-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; margin-bottom: 12px; cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.gang-card-cover { height: 140px; background: var(--bg-subtle); }
.gang-card-img.cover-img { width: 100%; height: 100%; }
.gang-card-body { padding: 14px; }
.gang-explorer-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.gang-explorer-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background-size: cover; background-position: center; border: 2px solid var(--gold);
}
.gang-explorer-meta { flex: 1; min-width: 0; }
.gang-explorer-meta strong { display: block; font-size: 14px; margin-bottom: 2px; }
.gang-explorer-meta span { font-size: 11px; color: var(--text-muted); }
.gang-merchant-name { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.gang-merchant-sub { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.gang-recommend-dish {
  font-size: 13px; color: var(--primary); font-weight: 600; margin-bottom: 6px;
}
.gang-quote {
  font-size: 13px; color: var(--text-secondary); line-height: 1.65;
  padding: 10px 12px; background: var(--bg-subtle); border-radius: var(--radius-sm);
  border-left: 3px solid var(--gold);
}

/* Category */
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 4px; margin-bottom: 24px; }
.cat-item { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; padding: 6px 0; }
.cat-icon-img.cover-img {
  width: 48px; height: 48px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); overflow: hidden;
  box-shadow: var(--shadow-sm); flex-shrink: 0;
}
.cat-icon-img .cover-img-el { object-fit: cover; width: 100%; height: 100%; }
.cat-item span { font-size: 11px; color: var(--text-secondary); font-weight: 500; }

/* Deals scroll */
.deal-scroll {
  display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 24px;
  -ms-overflow-style: none; scrollbar-width: none;
}
.deal-scroll::-webkit-scrollbar { display: none; }
.deal-card {
  flex: 0 0 140px; background: var(--bg); border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border); cursor: pointer;
  box-shadow: var(--shadow-sm); transition: transform 0.2s var(--ease);
}
.deal-card:active { transform: scale(0.97); }
.deal-card .deal-img { height: 88px; background: var(--bg-subtle); display: flex; align-items: center; justify-content: center; font-size: 32px; }
.deal-card .deal-body { padding: 8px 10px; }
.deal-card h4 { font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deal-merchant { font-size: 10px; color: var(--text-muted); margin: 2px 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deal-card .price { color: var(--primary); font-weight: 700; font-size: 14px; }
.deal-card .price del { font-size: 10px; color: var(--text-muted); font-weight: 400; margin-left: 4px; }

/* Merchant card */
.merchant-card {
  background: var(--bg); border-radius: var(--radius); padding: 14px; margin-bottom: 10px;
  border: 1px solid var(--border); cursor: pointer; position: relative; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.merchant-card.map-highlight { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft), var(--shadow); }

/* Rank list */
.rank-list .merchant-card {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
}
.rank-list .merchant-card.has-rank { padding-top: 12px; }
.rank-num-col {
  flex-shrink: 0; width: 40px; display: flex; align-items: center; justify-content: center;
}
.rank-num-big {
  font-family: "Noto Serif SC", serif; font-size: 28px; font-weight: 800; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.rank-card-1 .rank-num-big {
  color: #D4A017;
  text-shadow: 0 2px 10px rgba(212, 160, 23, 0.45);
}
.rank-card-2 .rank-num-big {
  color: #8B95A5;
  text-shadow: 0 2px 8px rgba(139, 149, 165, 0.35);
}
.rank-card-3 .rank-num-big {
  color: #B87333;
  text-shadow: 0 2px 8px rgba(184, 115, 51, 0.35);
}
.rank-card-n .rank-num-big {
  color: var(--text-muted); font-size: 22px; font-weight: 700;
}
.rank-card-1 { border-color: rgba(212, 160, 23, 0.35); background: linear-gradient(90deg, rgba(212,160,23,0.06) 0%, var(--bg) 28%); }
.rank-card-2 { border-color: rgba(139, 149, 165, 0.3); }
.rank-card-3 { border-color: rgba(184, 115, 51, 0.28); background: linear-gradient(90deg, rgba(184,115,51,0.05) 0%, var(--bg) 28%); }
.rank-list .merchant-row { flex: 1; min-width: 0; }

.merchant-row { display: flex; gap: 12px; }
.merchant-avatar {
  width: 64px; height: 64px; border-radius: var(--radius-sm); background: var(--bg-subtle);
  display: flex; align-items: center; justify-content: center; font-size: 28px;
  flex-shrink: 0; border: 1px solid var(--border);
}
.merchant-info { flex: 1; min-width: 0; }
.merchant-info h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.merchant-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.merchant-price { font-size: 15px; font-weight: 600; color: var(--primary); }
.merchant-price del { font-size: 12px; color: var(--text-muted); font-weight: 400; margin-left: 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.tag { font-size: 10px; padding: 2px 6px; border-radius: 4px; font-weight: 500; border: 1px solid var(--border); background: var(--bg-subtle); color: var(--text-secondary); }
.tag-cert { background: #FFF8E1; color: #92400E; border-color: #FDE68A; }
.tag-media { background: #EFF6FF; color: #1E40AF; border-color: #BFDBFE; }
.tag-ad { background: var(--primary-soft); color: var(--primary); border-color: rgba(232,53,46,0.2); }
.tag-heritage { background: var(--gold-soft); color: #B8860B; border-color: rgba(245,166,35,0.35); }
/* Category chips */
.rank-category-scroll, .deal-category-scroll {
  display: flex; gap: 8px; overflow-x: auto; margin-bottom: 16px;
  -webkit-overflow-scrolling: touch; -ms-overflow-style: none; scrollbar-width: none;
}
.rank-page .rank-category-scroll { margin-top: 4px; }
.rank-category-scroll::-webkit-scrollbar, .deal-category-scroll::-webkit-scrollbar { display: none; }
.rank-cat-chip, .deal-cat-chip {
  flex-shrink: 0; display: flex; align-items: center; gap: 6px;
  padding: 7px 14px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 20px; font-size: 12px; cursor: pointer; white-space: nowrap;
}
.rank-cat-chip.active, .deal-cat-chip.active { color: var(--primary); border-color: var(--primary); font-weight: 600; }
.rank-cat-icon, .deal-cat-icon {
  width: 20px; height: 20px; border-radius: 50%; background-size: cover; background-position: center; flex-shrink: 0;
}

/* Map page */
.map-page { padding-top: 12px; }
.map-page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.map-page-title { font-size: 20px; font-weight: 600; }
.map-page-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; line-height: 1.5; }
.map-container {
  border-radius: var(--radius); height: 260px; position: relative;
  margin-bottom: 20px; overflow: hidden; background: var(--bg-subtle); border: 1px solid var(--border);
}
.food-map-el { width: 100%; height: 100%; z-index: 1; }
.food-map-marker-wrap { background: transparent; border: none; }
.food-map-pin {
  width: 28px; height: 28px; background: var(--primary); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; border: 2px solid #fff; box-shadow: var(--shadow-sm);
}
.food-map-pin span { color: #fff; font-size: 10px; font-weight: 700; }
.map-loading, .map-error {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; background: rgba(255,255,255,0.92);
  z-index: 5; font-size: 13px; color: var(--text-muted); text-align: center; padding: 16px;
}
.map-error { display: none; }
.map-error .hint { font-size: 12px; margin-top: 8px; line-height: 1.6; }
.map-error code { background: var(--bg-subtle); padding: 2px 6px; border-radius: 4px; font-size: 11px; }
.map-error a { color: var(--primary); }
.map-popup h4 { font-size: 14px; margin: 0 0 4px; }
.map-popup p { font-size: 12px; color: var(--text-secondary); margin: 4px 0; }
.map-popup .price { color: var(--primary); font-weight: 600; }
.map-popup button {
  margin-top: 8px; padding: 6px 14px; border: none; border-radius: var(--radius-sm);
  background: var(--primary); color: #fff; font-size: 12px; cursor: pointer;
}
.food-map-popup .leaflet-popup-content { margin: 10px 12px; }
.food-map-popup .leaflet-popup-content-wrapper { border-radius: var(--radius-sm); border: 1px solid var(--border); box-shadow: var(--shadow); }

/* Deal list & detail */
.deal-list-item {
  display: flex; gap: 12px; background: var(--bg); border-radius: var(--radius);
  padding: 12px; margin-bottom: 10px; border: 1px solid var(--border); cursor: pointer;
}
.deal-list-item .deal-icon {
  width: 56px; height: 56px; background: var(--bg-subtle); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; font-size: 24px;
  flex-shrink: 0; border: 1px solid var(--border);
}
.deal-list-item .deal-info { flex: 1; min-width: 0; }
.deal-list-item h4 { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.deal-list-item p { font-size: 12px; color: var(--text-muted); }

/* 0元霸王餐 */
.free-meals-hero {
  text-align: center; padding: 16px; margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(232,53,46,0.1), rgba(245,166,35,0.12));
  border: 1px solid rgba(232,53,46,0.15); border-radius: var(--radius);
}
.free-meals-hero-title { font-size: 17px; font-weight: 700; color: var(--primary); margin-bottom: 6px; }
.free-meals-hero-desc { font-size: 12px; color: var(--text-muted); line-height: 1.6; }
.free-meal-item {
  display: flex; gap: 12px; padding: 12px; margin-bottom: 10px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  cursor: pointer; box-shadow: var(--shadow-sm);
}
.free-meal-item.sold-out { opacity: 0.65; }
.free-meal-item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.free-meal-item-head h4 { font-size: 14px; font-weight: 600; flex: 1; min-width: 0; }
.free-meal-badge {
  flex-shrink: 0; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: var(--primary); color: #fff;
}
.free-meal-item.sold-out .free-meal-badge { background: var(--text-muted); }
.free-meal-desc {
  font-size: 11px; color: var(--text-secondary); margin: 4px 0 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.free-meal-price { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.free-meal-remain { font-size: 11px; color: var(--text-muted); font-weight: 500; }
.free-meal-confirm-tag {
  display: inline-block; font-size: 11px; font-weight: 700; padding: 4px 10px;
  border-radius: 999px; background: rgba(232,53,46,0.1); color: var(--primary); margin-bottom: 12px;
}

.detail-hero-img {
  margin: -16px -16px 16px; height: 200px; background-size: cover; background-position: center;
  background-color: var(--bg-subtle); position: relative;
}
.detail-hero-img .fav-btn {
  position: absolute; top: 12px; right: 12px; z-index: 2; width: 36px; height: 36px;
  border-radius: 50%; border: 1px solid var(--border); background: var(--bg); font-size: 16px; cursor: pointer;
}
.detail-name { font-size: 20px; font-weight: 700; margin-bottom: 8px; line-height: 1.3; }
.detail-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 12px; }
.action-row { display: flex; gap: 8px; margin-bottom: 24px; }

/* Buttons */
.btn {
  padding: 10px 18px; border-radius: var(--radius-sm); border: none;
  font-size: 14px; font-weight: 500; cursor: pointer; font-family: inherit;
}
.btn-primary { background: var(--primary-gradient); color: #fff; flex: 1; box-shadow: var(--shadow-sm); }
.btn-primary:active { opacity: 0.9; }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.btn-outline { background: var(--bg); color: var(--text); border: 1px solid var(--border); flex: 1; }
.share-reward-btn { color: var(--primary); border-color: rgba(196,92,38,0.35); font-weight: 600; }

/* 团购页 · 商家信息 */
.deal-merchant-block { margin: 16px 0; }
.deal-merchant-card { padding: 14px; }
.deal-merchant-desc {
  font-size: 12px; color: var(--text-muted); line-height: 1.5; margin-top: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.deal-merchant-details {
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 10px;
}
.deal-merchant-row { display: flex; gap: 10px; font-size: 13px; line-height: 1.5; }
.deal-merchant-label { flex-shrink: 0; color: var(--text-muted); min-width: 52px; }
.deal-merchant-value { flex: 1; color: var(--text); word-break: break-all; }
.deal-merchant-phone { color: var(--primary); font-weight: 600; cursor: pointer; }
.deal-merchant-actions { display: flex; gap: 8px; margin-top: 12px; }
.deal-merchant-actions .btn { padding: 8px 6px; font-size: 12px; }

/* Coupons */
.coupon-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.coupon-tab {
  flex: 1; padding: 8px; text-align: center; font-size: 12px;
  border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--border); cursor: pointer;
}
.coupon-tab.active { color: var(--primary); border-color: var(--primary); font-weight: 600; }
.coupon-card {
  background: var(--bg); border: 1px solid var(--border); border-left: 3px solid var(--primary);
  border-radius: var(--radius); padding: 16px; margin-bottom: 10px; position: relative; overflow: hidden;
}
.coupon-card.free-meal { border-left-color: var(--gold); }
.coupon-thumb {
  position: absolute; right: 16px; top: 16px; width: 48px; height: 48px;
  border-radius: var(--radius-sm); background-size: cover; background-position: center; border: 1px solid var(--border);
}
.coupon-type-badge {
  display: inline-block; background: var(--bg-subtle); padding: 2px 8px;
  border-radius: 4px; font-size: 11px; margin-bottom: 8px; color: var(--text-secondary);
}
.coupon-code {
  font-size: 22px; font-weight: 700; letter-spacing: 3px; margin: 8px 0;
  font-family: "SF Mono", Consolas, monospace; color: var(--primary);
}
.coupon-hint { font-size: 12px; color: var(--text-muted); margin-top: 8px; }

/* Profile */
.profile-header {
  background: var(--primary-gradient); margin: 0 0 16px; padding: 24px 16px;
  display: flex; align-items: center; gap: 14px; color: #fff;
}
.avatar {
  width: 52px; height: 52px; background: rgba(255,255,255,0.25); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 24px;
  border: 2px solid rgba(255,255,255,0.5); flex-shrink: 0;
}
.avatar-img, .avatar.avatar-img { background-size: cover; background-position: center; font-size: 0; }
.profile-info h2 { font-size: 17px; font-weight: 600; margin-bottom: 2px; color: #fff; }
.profile-info p { font-size: 12px; color: rgba(255,255,255,0.85); }
.checkin-mini-card {
  display: flex; justify-content: space-between; align-items: center;
  margin: 0 16px 12px; padding: 14px 16px; background: var(--bg-subtle);
  border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; font-size: 14px; font-weight: 500;
}
.menu-list {
  margin: 0 16px; background: var(--bg); border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border);
}
.menu-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--border); cursor: pointer; font-size: 14px;
}
.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: var(--bg-subtle); }
.menu-meta { font-size: 12px; color: var(--text-muted); margin-right: auto; margin-left: 8px; }

/* Form & success */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; margin-bottom: 6px; font-weight: 500; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 14px; font-family: inherit; background: var(--bg);
}
.star-picker { display: flex; gap: 8px; font-size: 28px; cursor: pointer; }
.star-picker span { opacity: 0.25; }
.star-picker span.active { opacity: 1; color: var(--gold); }
.success-page { text-align: center; padding: 40px 20px; }
.success-icon {
  width: 64px; height: 64px; background: #ECFDF5; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 32px;
  margin: 0 auto 20px; border: 1px solid #A7F3D0;
}

/* Toast */
.hd-toast {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%) scale(0.95);
  background: rgba(17,17,17,0.88); color: #fff; padding: 12px 24px;
  border-radius: var(--radius-sm); font-size: 14px; z-index: 9999; opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.hd-toast.show { opacity: 1; transform: translate(-50%,-50%) scale(1); }

/* Points & activity */
.points-hero-card {
  background: var(--bg); border: 1px solid var(--border); padding: 24px;
  border-radius: var(--radius); text-align: center; margin-bottom: 16px;
}
.points-big { font-size: 36px; font-weight: 700; color: var(--primary); }
.activity-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.activity-entry {
  background: var(--bg); padding: 12px; border-radius: var(--radius);
  text-align: center; border: 1px solid var(--border); cursor: pointer; overflow: hidden;
}
.activity-entry-img {
  width: 100%; height: 64px; border-radius: var(--radius-sm);
  background-size: cover; background-position: center; margin-bottom: 8px; background-color: var(--bg-subtle);
}
.activity-entry h4 { font-size: 14px; font-weight: 500; }
.activity-entry p { font-size: 11px; color: var(--text-muted); }

/* 每日成语答题 */
.idiom-featured {
  position: relative; border-radius: var(--radius); overflow: hidden; margin-bottom: 16px;
  cursor: pointer; border: 1px solid var(--border); min-height: 120px;
}
.idiom-featured-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  filter: brightness(0.55);
}
.idiom-featured-body {
  position: relative; z-index: 1; padding: 18px 16px; color: #fff;
}
.idiom-featured-tag {
  display: inline-block; font-size: 10px; padding: 2px 8px; border-radius: 999px;
  background: rgba(255,255,255,0.2); margin-bottom: 8px;
}
.idiom-featured-body h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.idiom-featured-body p { font-size: 12px; opacity: 0.9; line-height: 1.5; }
.idiom-featured-btn {
  display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 600;
  background: var(--gold); color: #3d2a00; padding: 6px 14px; border-radius: 999px;
}
.idiom-quiz-page { padding-bottom: 24px; }
.idiom-quiz-hero {
  background: linear-gradient(135deg, #8b2e2e 0%, #c45c26 100%);
  color: #fff; padding: 16px; border-radius: var(--radius); margin-bottom: 16px; text-align: center;
}
.idiom-quiz-hero-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.idiom-quiz-hero-desc { font-size: 12px; opacity: 0.92; }
.idiom-quiz-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; margin-bottom: 12px;
}
.idiom-quiz-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.idiom-quiz-no {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: var(--primary); color: #fff; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.idiom-quiz-head-text { flex: 1; min-width: 0; }
.idiom-quiz-head-text h4 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.idiom-title-mask { color: var(--text); }
.idiom-title-reveal { color: var(--primary); }
.idiom-result { font-size: 11px; font-weight: 600; }
.idiom-result.ok { color: var(--success); }
.idiom-result.fail { color: var(--primary); }
.idiom-puzzle {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 6px; padding: 12px 8px; background: var(--bg-subtle); border-radius: var(--radius-sm);
  margin-bottom: 12px;
}
.idiom-fix {
  font-size: 22px; font-weight: 700; color: var(--text); font-family: "KaiTi", "STKaiti", serif;
}
.idiom-blank {
  width: 36px; height: 40px; text-align: center; font-size: 20px; font-weight: 700;
  border: 2px dashed var(--primary); border-radius: 6px; background: #fff;
  font-family: "KaiTi", "STKaiti", serif; color: var(--primary);
}
.idiom-blank:focus { outline: none; border-style: solid; box-shadow: 0 0 0 2px rgba(196,92,38,0.2); }
.idiom-blank-show {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 40px; font-size: 20px; font-weight: 700; border-radius: 6px;
  font-family: "KaiTi", "STKaiti", serif;
}
.idiom-blank-show.correct { background: rgba(34,139,34,0.12); color: var(--success); border: 1px solid var(--success); }
.idiom-blank-show.wrong { background: rgba(196,92,38,0.12); color: var(--primary); border: 1px solid var(--primary); }
.idiom-answer-hint { font-size: 14px; color: var(--success); font-weight: 600; margin-left: 2px; }
.idiom-explain { font-size: 12px; line-height: 1.65; color: var(--text-muted); }
.idiom-explain-label { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.idiom-explain-text { margin-bottom: 6px; }
.idiom-culture {
  padding: 8px 10px; background: rgba(212,168,75,0.12); border-radius: var(--radius-sm);
  border-left: 3px solid var(--gold); font-size: 11px; color: var(--text);
}
.idiom-quiz-footer { margin-top: 8px; text-align: center; }
.idiom-submit { width: 100%; padding: 14px; font-size: 15px; }
.idiom-rule-tip { font-size: 11px; color: var(--text-muted); margin-top: 10px; }
.idiom-done-banner {
  background: linear-gradient(135deg, rgba(212,168,75,0.15), rgba(196,92,38,0.1));
  border: 1px solid var(--gold); border-radius: var(--radius); padding: 16px;
}
.idiom-done-score { font-size: 15px; margin-bottom: 6px; }
.idiom-done-pts { font-size: 18px; color: var(--primary); font-weight: 700; margin-bottom: 8px; }
.idiom-done-pts strong { font-size: 24px; }
.idiom-done-tip { font-size: 11px; color: var(--text-muted); }

/* 今天吃什么 · 美食轮盘 */
.food-roulette-page { padding-bottom: 28px; }
.food-roulette-hero {
  text-align: center; margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(255,140,66,0.12), rgba(232,53,46,0.08));
  border: 1px solid rgba(232,53,46,0.15); border-radius: var(--radius); padding: 16px;
}
.food-roulette-title { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.food-roulette-desc { font-size: 12px; color: var(--text-muted); }
.roulette-stage {
  position: relative; width: 280px; height: 280px; margin: 0 auto 20px;
}
.roulette-pointer {
  position: absolute; top: -4px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0; z-index: 3;
  border-left: 12px solid transparent; border-right: 12px solid transparent;
  border-top: 22px solid var(--primary);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}
.roulette-wheel-wrap {
  width: 100%; height: 100%; border-radius: 50%;
  padding: 6px; background: linear-gradient(145deg, #fff5e6, #ffd4a8);
  box-shadow: 0 8px 24px rgba(196,92,38,0.25), inset 0 0 0 2px rgba(255,255,255,0.8);
}
.roulette-wheel {
  position: relative; width: 100%; height: 100%; border-radius: 50%;
  transform: rotate(0deg); will-change: transform;
}
.roulette-wheel-face {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.85);
}
.roulette-labels {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
}
.roulette-label {
  position: absolute; left: 50%; top: 50%; margin-left: -28px; margin-top: -10px;
  width: 56px; text-align: center; font-size: 13px; font-weight: 700; color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.35); transform-origin: center center;
}
.roulette-hub {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 56px; height: 56px; border-radius: 50%; z-index: 2;
  background: var(--primary-gradient); color: #fff; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2); border: 3px solid #fff;
}
.roulette-result {
  text-align: center; min-height: 88px; margin-bottom: 16px;
  padding: 12px; background: var(--bg); border-radius: var(--radius); border: 1px solid var(--border);
}
.roulette-result-hint { font-size: 13px; color: var(--text-muted); line-height: 1.6; }
.roulette-result-label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.roulette-result-name {
  font-size: 28px; font-weight: 800; color: var(--primary); margin-bottom: 6px;
}
.roulette-result-tip { font-size: 13px; color: var(--text-secondary); margin-bottom: 10px; }
.roulette-go-btn { width: auto; display: inline-block; padding: 8px 16px; font-size: 12px; }
.roulette-start-btn { width: 100%; padding: 14px; font-size: 16px; font-weight: 700; }

.fm-card { display: flex; gap: 12px; align-items: center; padding: 0; overflow: hidden; }
.fm-card-cover { width: 64px; height: 64px; flex-shrink: 0; background-size: cover; background-position: center; background-color: var(--bg-subtle); }
.fm-card-body { flex: 1; padding: 12px 12px 12px 0; }
.checkin-card { background: var(--bg); padding: 16px; border-radius: var(--radius); border: 1px solid var(--border); }
.lottery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.lottery-cell { background: var(--bg); padding: 16px; text-align: center; border-radius: var(--radius); border: 1px solid var(--border); font-size: 13px; font-weight: 500; }
.ledger-item { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.redeem-box { background: var(--bg-subtle); padding: 14px; border-radius: var(--radius); margin: 16px 0; border: 1px solid var(--border); }
.redeem-toggle { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; cursor: pointer; }
.review-item { background: var(--bg); border-radius: var(--radius); padding: 12px; margin-bottom: 8px; border: 1px solid var(--border); }
.review-item .stars { color: var(--gold); font-size: 12px; }
.qr-placeholder { width: 120px; height: 120px; background: var(--bg-subtle); border-radius: var(--radius-sm); margin: 12px auto; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--text-muted); border: 1px solid var(--border); }
.points-bar {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg-subtle); padding: 12px 16px; border-radius: var(--radius);
  margin-bottom: 16px; font-size: 13px; font-weight: 500; cursor: pointer; border: 1px solid var(--border);
}

/* Heritage pages */
.heritage-page {
  padding: 0; background: var(--bg);
}
.heritage-hero-full {
  position: relative; height: 200px; overflow: hidden;
  margin-bottom: 0;
}
.heritage-hero-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
}
.heritage-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(44, 24, 16, 0.82) 0%, rgba(140, 28, 19, 0.55) 45%, rgba(212, 160, 23, 0.25) 100%);
}
.heritage-back {
  background: rgba(255, 255, 255, 0.18) !important;
  border-color: rgba(255, 255, 255, 0.45) !important;
  color: #fff !important;
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}
.heritage-back:active { background: rgba(255, 255, 255, 0.28) !important; }
.heritage-hero-content {
  position: relative; z-index: 2; height: 100%;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 20px 16px 24px; color: #fff;
}
.heritage-hero-kicker {
  display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.9); margin-bottom: 8px;
  background: rgba(245, 166, 35, 0.25); border: 1px solid rgba(245, 166, 35, 0.45);
  padding: 3px 10px; border-radius: 20px; width: fit-content;
}
.heritage-hero-content h1 {
  font-family: "Noto Serif SC", serif; font-size: 28px; font-weight: 700;
  letter-spacing: 0.06em; margin-bottom: 6px; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}
.heritage-hero-content p {
  font-size: 13px; opacity: 0.92; letter-spacing: 0.08em;
}
.heritage-body { padding: 20px 16px 24px; }
.heritage-section-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.heritage-section-title { display: flex; gap: 10px; align-items: flex-start; flex: 1; min-width: 0; }
.heritage-section-line {
  width: 3px; height: 36px; border-radius: 2px; flex-shrink: 0; margin-top: 2px;
  background: linear-gradient(180deg, var(--gold) 0%, var(--primary) 100%);
}
.heritage-section-title h2 {
  font-family: "Noto Serif SC", serif; font-size: 18px; font-weight: 700;
  color: var(--primary-dark); margin-bottom: 4px;
}
.heritage-section-sub { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.heritage-link { color: var(--primary); text-decoration: none; font-weight: 500; }
.heritage-district-btn {
  flex-shrink: 0; padding: 8px 12px; font-size: 12px; font-weight: 600;
  background: var(--bg-warm); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--primary-dark); cursor: pointer;
}
.heritage-district-btn:active { background: var(--gold-soft); }
.heritage-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px;
}
.heritage-stat {
  text-align: center; padding: 12px 8px; background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.heritage-stat strong {
  display: block; font-family: "Noto Serif SC", serif;
  font-size: 20px; font-weight: 700; color: var(--primary); line-height: 1.2;
}
.heritage-stat span { font-size: 10px; color: var(--text-muted); margin-top: 2px; display: block; }
.heritage-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
.heritage-empty {
  grid-column: 1 / -1; text-align: center; padding: 40px 16px;
  color: var(--text-muted); font-size: 14px;
}
.heritage-empty .btn { margin-top: 12px; }
.heritage-card {
  height: 156px; border-radius: var(--radius); overflow: hidden; position: relative;
  cursor: pointer; border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.heritage-card:active { transform: scale(0.98); box-shadow: none; }
.heritage-card-bg.cover-img { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.heritage-card-mask {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(to top, rgba(20, 8, 6, 0.92) 0%, rgba(140, 28, 19, 0.5) 48%, transparent 72%);
  padding: 10px 12px; display: flex; flex-direction: column; justify-content: flex-end; color: #fff;
}
.heritage-card-mask .heritage-food-name {
  font-family: "Noto Serif SC", serif; font-size: 14px; font-weight: 700;
  line-height: 1.35; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.heritage-card-mask .heritage-dish {
  font-size: 10px; opacity: 0.92; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.heritage-card-mask .heritage-meta {
  font-size: 9px; opacity: 0.85; margin-top: 3px;
}
.heritage-detail .detail-hero-img { margin: -16px -16px 0; height: 200px; }
.heritage-detail-body { padding: 16px 0; }
.heritage-level {
  font-size: 10px; background: rgba(255,255,255,0.2); display: inline-block;
  padding: 2px 8px; border-radius: 4px; margin-bottom: 4px; width: fit-content;
}
.heritage-level-badge {
  display: inline-block; background: var(--gold-soft); color: #B8860B;
  font-size: 11px; padding: 4px 10px; border-radius: 20px; margin-bottom: 8px;
  border: 1px solid rgba(245, 166, 35, 0.35); font-weight: 600;
}
.heritage-craft-box {
  background: var(--bg-subtle); padding: 14px; border-radius: var(--radius);
  margin: 16px 0; border: 1px solid var(--border); border-left: 3px solid var(--gold);
}
.heritage-craft-box h4 { font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--primary-dark); }
.heritage-detail .detail-name { font-family: "Noto Serif SC", serif; }

/* Merchant mode */
.merchant-mode .merchant-header {
  background: var(--bg); margin: -16px -16px 20px; padding: 24px 16px; border-bottom: 1px solid var(--border);
}
.merchant-badge { display: inline-block; background: var(--primary-soft); color: var(--primary); font-size: 10px; padding: 2px 8px; border-radius: 4px; margin-bottom: 8px; font-weight: 600; }
.merchant-header h2 { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.merchant-header p { font-size: 13px; color: var(--text-muted); }
.merchant-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.merchant-action-card { background: var(--bg); border-radius: var(--radius); padding: 20px 16px; text-align: center; border: 1px solid var(--border); cursor: pointer; }
.merchant-action-card h3 { font-size: 14px; font-weight: 600; }
.merchant-action-card p { font-size: 11px; color: var(--text-muted); }
.verify-preview-card {
  background: var(--bg); border-radius: var(--radius); padding: 16px;
  margin-top: 16px; border: 1px solid var(--border);
}
.user-switch-list {
  background: var(--bg); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); margin-bottom: 16px;
}
.user-switch-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--border); cursor: pointer; font-size: 13px;
}
.user-switch-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background-size: cover; background-position: center; flex-shrink: 0; border: 1px solid var(--border);
}
.user-switch-item.active { background: var(--primary-soft); }

/* Cover image loading */
.cover-img, .cover-round {
  position: relative; overflow: hidden;
  background-color: var(--bg-warm); background-size: cover; background-position: center;
}
.cover-img::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(110deg, var(--bg-subtle) 25%, #fff 50%, var(--bg-subtle) 75%);
  background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite;
  z-index: 0; pointer-events: none;
}
.cover-img.img-loaded::before,
.cover-img.img-error::before { display: none; }
.cover-img-el {
  position: relative; z-index: 1; width: 100%; height: 100%;
  object-fit: cover; display: block; opacity: 1;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.merchant-avatar.cover-round, .deal-icon.cover-round { width: 64px; height: 64px; border-radius: var(--radius-sm); flex-shrink: 0; }
.deal-card .deal-img.cover-img { height: 88px; width: 100%; border-radius: 0; }
.banner-slide .cover-img-el,
.map-entry-visual.cover-img { width: 100%; height: 100%; }
.map-entry-visual.cover-img { width: 56px; height: 56px; border-radius: var(--radius-sm); flex-shrink: 0; }
