:root {
  --bg: #0f1115;
  --panel: #171a21;
  --panel-2: #1f2430;
  --text: #f3f4f6;
  --muted: #9ca3af;
  --accent: #22c55e;
  --accent-2: #f59e0b;
  --line: rgba(255,255,255,.08);
  --danger: #ef4444;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.app { min-height: 100vh; padding-bottom: 40px; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: rgba(15,17,21,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.menu-btn, .close-btn, .admin-link {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
}
.brand h1 { margin: 0; font-size: 1.1rem; }
.brand-sub { color: var(--muted); font-size: .78rem; }
.admin-link { margin-left: auto; font-size: .85rem; }

.hero {
  padding: 24px 16px 8px;
  text-align: center;
}
.hero-hint { color: var(--accent-2); font-size: .9rem; margin: 0 0 8px; }
.hero h2 { margin: 0; font-size: 1.8rem; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 280px;
  background: var(--panel);
  transform: translateX(-100%);
  transition: transform .25s ease;
  z-index: 40;
  border-right: 1px solid var(--line);
  padding: 16px;
}
.sidebar.open { transform: translateX(0); }
.sidebar-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.region-nav { display: flex; flex-direction: column; gap: 8px; }
.region-link {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--panel-2);
  border: 1px solid transparent;
}
.region-link.active {
  border-color: var(--accent);
  background: rgba(34,197,94,.12);
}
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  opacity: 0; pointer-events: none; transition: opacity .2s;
  z-index: 30;
}
.overlay.show { opacity: 1; pointer-events: auto; }

.content { padding: 8px 16px 24px; max-width: 920px; margin: 0 auto; }
.section { margin-top: 28px; }
.section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.section h3 { margin: 0 0 12px; font-size: 1.2rem; }
.pill {
  font-size: .78rem; padding: 4px 10px; border-radius: 999px;
  background: rgba(34,197,94,.15); color: var(--accent);
}

.listing-grid { display: grid; gap: 12px; }

/* City sub-site: 3 shops per row */
.city-app {
  position: relative;
  isolation: isolate;
}
.city-app::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: var(--city-bg-image, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.city-app::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(8,12,22,.55) 0%, rgba(8,12,22,.82) 45%, rgba(8,12,22,.92) 100%);
  pointer-events: none;
}

.city-topbar {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
}
.city-topbar-main {
  min-width: 0;
  text-align: center;
}
.city-topbar-main h1 {
  margin: 0;
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.city-topbar-main .brand-sub {
  font-size: .72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.region-picker-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(34,197,94,.45);
  background: rgba(34,197,94,.12);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  max-width: 42vw;
  white-space: nowrap;
}
.region-picker-value {
  font-weight: 700;
  font-size: .92rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.region-picker-arrow {
  color: var(--accent);
  font-size: .85rem;
  flex-shrink: 0;
}
.region-picker-btn:hover {
  border-color: var(--accent);
  background: rgba(34,197,94,.2);
}

.region-bar-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px 12px;
  max-width: 1080px;
  margin: 0 auto;
  position: sticky;
  top: 52px;
  z-index: 15;
  background: rgba(15, 17, 21, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.region-bar-top .region-link {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid transparent;
  font-size: .88rem;
  white-space: nowrap;
}
.region-bar-top .region-link.active {
  border-color: var(--accent);
  background: rgba(34, 197, 94, .15);
  color: var(--accent);
  font-weight: 700;
}

.city-hero {
  padding-top: 8px;
  padding-bottom: 4px;
}
.city-hero .hero-hint {
  margin: 0;
  font-size: .85rem;
}

.city-app .content { max-width: 1080px; }
.city-app .listing-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.city-app .listing-body { padding: 12px 12px 14px; }
.city-app .listing-body h4 {
  font-size: .92rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.city-app .listing-desc {
  font-size: .82rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.city-app .card-more {
  font-size: .78rem;
  margin-top: 8px;
}
.city-app .listing-meta { gap: 6px; margin-bottom: 6px; }
.city-app .price { font-size: .88rem; }
.city-app .tag { font-size: .72rem; }
.city-app .empty { grid-column: 1 / -1; }

@media (max-width: 720px) {
  .city-app .listing-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .city-app .listing-body { padding: 8px 8px 10px; }
  .city-app .listing-body h4 { font-size: .78rem; }
  .city-app .card-more { font-size: .72rem; margin-top: 6px; }
  .city-app .listing-desc { display: none; }
}
.listing-card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: block;
}
.listing-link {
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.listing-link:hover {
  transform: translateY(-2px);
  border-color: rgba(34,197,94,.35);
  box-shadow: 0 14px 34px rgba(0,0,0,.4);
}
.listing-link:active { transform: translateY(0); }
.card-more {
  display: inline-block;
  margin-top: 10px;
  font-size: .85rem;
  color: var(--accent);
}
.back-btn { display: inline-flex; align-items: center; }

.detail-page { max-width: 960px; }
/* v10 修复: 防水平溢出; 媒体强制自适应, 完整显示不裁切 */
html, body { overflow-x: hidden; max-width: 100%; }
/* 视频失效兜底: 普通流, 不占满整个hero大屏 */
.hero-video-fallback {
  display: none;
  align-items: center; justify-content: center;
  min-height: 220px;
  background: #111; color: #9ca3af; font-size: 14px;
  line-height: 1.6; padding: 24px; text-align: center;
}
.detail-thumb.is-failed video { opacity: .15; }
.detail-thumb.is-failed .thumb-play-icon { opacity: .35; }
.detail-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.detail-hero {
  position: relative;
  background: var(--panel-2);
  line-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
/* v10: 图片强制自适应手机, 完整显示不裁切不溢出 (竖图限高75vh) */
.detail-hero img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 75vh;
  object-fit: contain;
}
.detail-hero.is-placeholder img {
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  padding: 24px;
  background: var(--panel-2);
}
.detail-gallery {
  display: flex;
  gap: 8px;
  padding: 10px 12px 0;
  overflow-x: auto;
}
.detail-thumb {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel-2);
  cursor: pointer;
}
.detail-thumb.is-active { border-color: var(--accent); }
.detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.detail-body { padding: 18px 16px 22px; }
.detail-head h2 { margin: 0 0 10px; font-size: 1.35rem; line-height: 1.35; }
.detail-sub { color: var(--muted); font-weight: 500; font-size: 1rem; }
.detail-summary {
  color: var(--accent-2);
  margin: 0 0 16px;
  font-size: .95rem;
}
.detail-content h3 { margin: 0 0 10px; font-size: 1rem; }
.detail-text { white-space: pre-wrap; word-break: break-word; }
.detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 700;
}
.btn-primary {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #041007;
}
.btn-secondary {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
}
.badge-open {
  background: rgba(34,197,94,.15);
  color: var(--accent);
}
.listing-image {
  position: relative;
  overflow: hidden;
  background: var(--panel-2);
  line-height: 0;
}
.listing-image img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}
.listing-image.is-placeholder img {
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  padding: 18px;
  opacity: .85;
}
.listing-body { padding: 14px 16px; }
.listing-body h4 { margin: 0 0 8px; font-size: 1rem; }
.listing-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.price { color: var(--accent-2); font-weight: 700; }
.tag {
  font-size: .78rem; padding: 2px 8px; border-radius: 999px;
  background: rgba(255,255,255,.06); color: var(--muted);
}
.listing-desc { color: var(--muted); font-size: .9rem; margin: 0; }
.badge {
  display: inline-block; margin-top: 8px;
  font-size: .75rem; padding: 4px 8px; border-radius: 999px;
  background: rgba(245,158,11,.15); color: var(--accent-2);
}
.is-waiting { opacity: .85; }
.empty { color: var(--muted); padding: 24px; text-align: center; }

/* Hub — light theme (总站) */
body.hub-light {
  background: #f4f7fb;
  color: #1e293b;
}

.hub-app {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --text: #1e293b;
  --muted: #64748b;
  --accent: #16a34a;
  --accent-2: #ea580c;
  --line: rgba(15, 23, 42, 0.1);
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  min-height: 100vh;
  background: linear-gradient(180deg, #ecfdf5 0%, #f8fafc 35%, #ffffff 100%);
  color: var(--text);
}

.hub-app .topbar {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.hub-app .brand-sub { color: var(--accent-2); }
.hub-app .section h3 { color: #0f172a; }
.hub-app .prose { color: var(--muted); }
.hub-app .footer { color: var(--muted); }

.hub-topbar { justify-content: center; padding: 20px 16px; }
.hub-brand { text-align: center; }
.hub-brand h1 {
  font-size: 1.65rem;
  color: #0f172a;
  letter-spacing: 0.02em;
}
.hub-hero {
  padding: 4px 16px 24px;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.hub-intro {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.75;
  margin: 0 0 20px;
}
.hub-content { max-width: 920px; }

.hub-app .search-bar input[type="search"] {
  background: #fff;
  border: 1px solid #dbe3ee;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.hub-app .search-bar input[type="search"]:focus {
  outline: none;
  border-color: #86efac;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}
.hub-app .search-bar button {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
}

.hub-app .city-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}
.hub-app .city-card:hover {
  border-color: #86efac;
  box-shadow: 0 10px 28px rgba(22, 163, 74, 0.12);
}
.hub-app .city-name { color: #0f172a; }
.hub-app .city-arrow { color: #16a34a; font-weight: 600; }

.hub-app .pill {
  background: rgba(22, 163, 74, 0.1);
  color: #15803d;
}

.hub-app .listing-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}
.hub-app .listing-link:hover {
  border-color: #86efac;
  box-shadow: 0 10px 28px rgba(22, 163, 74, 0.1);
}
.hub-app .listing-image { background: #f1f5f9; }
.hub-app .tag {
  background: #f1f5f9;
  color: #475569;
}
.hub-app .price { color: #ea580c; }
.hub-app .card-more { color: #16a34a; }
.hub-app .search-city-tag {
  background: rgba(22, 163, 74, 0.1);
  color: #15803d;
}
.hub-app .empty {
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
}

/* Hub & Search — shared (city pages keep dark theme) */
.search-bar {
  display: flex;
  gap: 8px;
  max-width: 560px;
  margin: 0 auto;
}
.search-bar input[type="search"] {
  flex: 1;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: .95rem;
}
.search-bar button {
  border: none;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #041007;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.city-search-wrap {
  padding: 0 16px 12px;
  max-width: 920px;
  margin: 0 auto;
}

.city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.city-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .15s ease;
}
.city-card:hover {
  transform: translateY(-2px);
  border-color: rgba(34,197,94,.4);
}
.city-card.is-soon {
  cursor: not-allowed;
  opacity: .72;
  border-style: dashed;
  background: #f1f5f9;
}
.city-card.is-soon:hover {
  transform: none;
  border-color: #cbd5e1;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}
.city-arrow-muted { color: var(--muted); }
.hub-app .city-card.is-soon {
  background: #f8fafc;
}
.city-name { font-size: 1.35rem; font-weight: 700; }
.city-tagline { color: var(--muted); font-size: .85rem; }
.city-arrow { color: var(--accent); font-size: .85rem; margin-top: 4px; }

.city-badge {
  width: 100%;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  overflow: hidden;
  border-radius: 10px;
}
.city-badge-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  transition: transform .15s ease;
}
.city-card:hover .city-badge-img {
  transform: scale(1.04);
}

.hub-app .city-badge {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.hub-app .city-badge-img {
  filter: drop-shadow(0 2px 4px rgba(15, 23, 42, 0.12));
}

.search-city-tag {
  display: inline-block;
  font-size: .75rem;
  color: var(--accent);
  background: rgba(34,197,94,.12);
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.clear-search {
  margin-left: auto;
  font-size: .85rem;
  color: var(--muted);
}
.section-head { flex-wrap: wrap; }

.form-section-title {
  margin: 8px 0 0;
  font-size: 1rem;
  color: var(--accent);
}

.prose { color: var(--muted); }
.faq-list { display: grid; gap: 10px; }
.faq-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.faq-item summary { cursor: pointer; font-weight: 600; }
.faq-item p { color: var(--muted); margin: 10px 0 0; }

.contact-list { list-style: none; padding: 0; margin: 0 0 16px; color: var(--muted); }
.contact-list li { padding: 6px 0; }
.contact-form { display: grid; gap: 10px; }
.contact-form input, .contact-form textarea, .admin-form input, .admin-form textarea, .admin-form select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
}
.contact-form button, .admin-form button, .auth-card button {
  border: none;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #041007;
  font-weight: 700;
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
}
.footer { text-align: center; color: var(--muted); padding: 24px 16px; font-size: .85rem; }

.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; z-index: 50;
}
.modal.hidden { display: none; }
.modal-card {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.modal-card h3 { margin-top: 0; }
.modal-card button { width: 100%; margin-top: 12px; }

.flash {
  padding: 10px 12px; border-radius: 10px; margin-bottom: 12px;
  background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.3);
}
.flash-error { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.3); }

/* Admin */
.admin-body { background: #0b0d11; }
.admin-auth {
  min-height: 100vh; display: grid; place-items: center; padding: 20px;
}
.auth-card {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  display: grid; gap: 12px;
}
.auth-card a { color: var(--muted); font-size: .9rem; }
.admin-shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.admin-sidebar {
  background: #11151d;
  border-right: 1px solid var(--line);
  padding: 20px 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.admin-brand { font-weight: 700; margin-bottom: 10px; }
.admin-build-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(34,197,94,.18);
  color: var(--accent);
  font-size: .72rem;
  font-weight: 600;
}
.admin-sidebar a {
  padding: 10px 12px; border-radius: 10px; color: var(--muted);
}
.admin-sidebar a:hover { background: var(--panel-2); color: var(--text); }
.admin-main { padding: 24px; }
.admin-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 18px;
}
.admin-form { display: grid; gap: 12px; }
.admin-form.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.admin-form .full { grid-column: 1 / -1; }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px; text-align: left; vertical-align: top;
}
.admin-table input { min-width: 80px; }
.actions { display: flex; gap: 8px; }
button.danger, .danger { background: var(--danger) !important; color: white !important; }

/* ===== Admin listings grouped by city/region ===== */
.listing-total-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 20px;
  margin-left: 8px;
  vertical-align: middle;
}
.listing-city-group {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}
.listing-city-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #fff;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease;
}
.listing-city-header:hover {
  background: linear-gradient(135deg, #334155, #1e293b);
}
.listing-city-name {
  font-size: 1.05rem;
  font-weight: 700;
}
.listing-city-count {
  font-size: 0.8rem;
  color: #94a3b8;
  background: rgba(255,255,255,0.1);
  padding: 2px 8px;
  border-radius: 10px;
}
.listing-city-toggle {
  margin-left: auto;
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}
.listing-city-group.is-collapsed .listing-city-toggle {
  transform: rotate(-90deg);
}
.listing-city-body {
  padding: 8px;
  transition: max-height 0.3s ease;
  overflow: hidden;
}
.listing-city-group.is-collapsed .listing-city-body {
  display: none;
}
.listing-region-group {
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.listing-region-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--panel-2, #f1f5f9);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
}
.listing-region-header:hover {
  background: #e2e8f0;
}
.listing-region-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text, #0f172a);
}
.listing-region-count {
  font-size: 0.75rem;
  color: var(--muted, #64748b);
  background: rgba(0,0,0,0.05);
  padding: 1px 8px;
  border-radius: 8px;
}
.listing-region-toggle {
  margin-left: auto;
  font-size: 0.65rem;
  color: var(--muted, #64748b);
  transition: transform 0.2s ease;
}
.listing-region-group.is-collapsed .listing-region-toggle {
  transform: rotate(-90deg);
}
.listing-region-body {
  overflow-x: auto;
}
.listing-region-group.is-collapsed .listing-region-body {
  display: none;
}
.stats-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 18px;
}
.stat-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px;
}
.stat-card span { color: var(--muted); font-size: .85rem; }
.stat-card strong { display: block; font-size: 1.6rem; margin-top: 6px; }
.preview img { max-width: 220px; border-radius: 12px; }
.image-manage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}
.image-manage-title { margin: 0 0 4px; color: var(--muted); font-size: .9rem; }
.image-manage-item {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  font-size: .85rem;
}
.image-manage-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
}
.image-upload-field { display: grid; gap: 10px; }
.image-upload-slots {
  display: grid;
  gap: 10px;
}
.image-upload-slot {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
}
.image-upload-slot span {
  color: var(--muted);
  font-size: .88rem;
}
.image-upload-slot input[type="file"] {
  width: 100%;
}
.image-multi-upload {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border: 2px dashed var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  transition: border-color 0.2s ease;
}
.image-multi-upload:hover {
  border-color: var(--accent);
}
.image-multi-upload input[type="file"] {
  font-size: 0.9rem;
}
.image-multi-hint {
  color: var(--muted);
  font-size: 0.85rem;
}
.video-upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.video-upload-slot {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
}
.video-slot-label {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}
.video-upload-slot input[type="file"] {
  width: 100%;
  font-size: 0.82rem;
}
.video-manage-item video {
  width: 100%;
  border-radius: 8px;
  aspect-ratio: 16/9;
  background: #000;
}
.btn-link { margin-left: 12px; color: var(--muted); }
.admin-hint { color: var(--muted); font-size: .9rem; margin: 0 0 12px; }
.scope-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.scope-tabs a {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--muted); font-size: .88rem;
}
.scope-tabs a.active, .scope-tabs a:hover {
  background: rgba(34,197,94,.12); border-color: var(--accent); color: var(--accent);
}
.table-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.table-thumb.wide { width: 120px; height: auto; max-height: 56px; }

/* Contact QR codes */
.contact-qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
  margin: 16px 0 20px;
}
.contact-qr-grid-fixed {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 560px) {
  .contact-qr-grid-fixed {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .contact-qr-grid-fixed .contact-qr-card { padding: 8px 6px; }
  .contact-qr-grid-fixed .contact-qr-label { font-size: .82rem; }
  .contact-qr-grid-fixed .contact-qr-account { font-size: .72rem; }
}
.contact-qr-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  text-align: center;
}
.contact-qr-label {
  font-weight: 700;
  font-size: .92rem;
  margin-bottom: 10px;
  color: var(--accent);
}
.contact-qr-img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel-2);
}
.contact-qr-img img { width: 100%; height: 100%; object-fit: cover; }
.contact-qr-img.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line);
}
.contact-qr-placeholder {
  font-size: .78rem;
  color: var(--muted);
  padding: 8px;
  text-align: center;
}
.contact-qr-account-muted { color: var(--muted); opacity: .6; }
.contact-qr-account {
  margin-top: 8px;
  font-size: .82rem;
  color: var(--muted);
  word-break: break-all;
}

.hub-app .contact-qr-card {
  background: #fff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}
.hub-app .contact-qr-img { background: #f8fafc; }

/* ===== Unified Media Upload Section ===== */
.media-unified-section {
  padding: 14px 16px;
  background: var(--panel-2, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px;
  margin-top: 8px;
}
.media-upload-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.media-upload-slot {
  flex: 1 1 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 18px 12px;
  border: 2px dashed var(--line, #cbd5e1);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-align: center;
  position: relative;
}
.media-upload-slot:hover {
  border-color: var(--accent, #22c55e);
  background: rgba(34,197,94,0.04);
}
.media-image-slot {
  border-color: #c7d2fe;
  background: rgba(99,102,241,0.03);
}
.media-image-slot:hover {
  border-color: #6366f1;
  background: rgba(99,102,241,0.06);
}
.media-video-slot {
  border-color: #fcd34d;
  background: rgba(245,158,11,0.03);
}
.media-video-slot:hover {
  border-color: #f59e0b;
  background: rgba(245,158,11,0.06);
}
.media-slot-icon {
  font-size: 1.6rem;
  line-height: 1;
}
.media-slot-label {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text, #1e293b);
}
.media-image-slot .media-slot-label { color: #6366f1; }
.media-video-slot .media-slot-label { color: #d97706; }
.media-slot-hint {
  font-size: 0.76rem;
  color: var(--muted, #94a3b8);
}
.media-upload-slot input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.media-upload-hint {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--muted, #94a3b8);
  text-align: center;
}
.media-type-tag {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  z-index: 3;
  pointer-events: none;
}
.video-manage-item .media-type-tag {
  background: rgba(245,158,11,0.15);
  color: #b45309;
}
.image-manage-item .media-type-tag {
  background: rgba(99,102,241,0.15);
  color: #4f46e5;
}
/* Adjust sortable item for media-type-tag */
.sortable-item .media-type-tag + .sort-delete-check {
  margin-top: 14px;
}
@media (max-width: 560px) {
  .media-upload-row { flex-direction: column; }
  .media-upload-slot { flex: 1 1 auto; }
}


/* Contact QR clickable + overlay */
.contact-qr-img.is-clickable {
  cursor: pointer;
  position: relative;
  transition: transform 0.2s ease;
}
.contact-qr-img.is-clickable:active {
  transform: scale(0.97);
}
.contact-qr-img.is-clickable::after {
  content: "\1F50D";
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 1.1rem;
  opacity: 0.65;
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.3));
}

/* QR Overlay */
.qr-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.88);
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.qr-overlay.is-open { display: flex; }
.qr-overlay-backdrop { position: absolute; inset: 0; }
.qr-overlay-stage {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 20px;
}
.qr-overlay-img {
  max-width: 78vw;
  max-height: 68vh;
  width: auto;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
  -webkit-user-drag: none;
}
.qr-overlay-hint {
  color: rgba(255,255,255,0.9);
  font-size: 1.05rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.04em;
}
.qr-overlay-close {
  position: absolute;
  top: 14px;
  right: 18px;
  z-index: 10;
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  font-size: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.qr-overlay-close:hover { background: rgba(255,255,255,0.25); }
@media (max-width: 560px) {
  .qr-overlay-close { width: 40px; height: 40px; font-size: 1.6rem; top: 10px; right: 12px; }
  .qr-overlay-img { max-width: 88vw; max-height: 62vh; }
  .qr-overlay-hint { font-size: 0.92rem; }
}


/* Contact QR clickable + overlay */
.contact-qr-img.is-clickable {
  cursor: pointer;
  position: relative;
  transition: transform 0.2s ease;
}
.contact-qr-img.is-clickable:active {
  transform: scale(0.97);
}
.contact-qr-img.is-clickable::after {
  content: "\1F50D";
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 1.1rem;
  opacity: 0.65;
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.3));
}

/* QR Overlay */
.qr-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.88);
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.qr-overlay.is-open { display: flex; }
.qr-overlay-backdrop { position: absolute; inset: 0; }
.qr-overlay-stage {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 20px;
}
.qr-overlay-img {
  max-width: 78vw;
  max-height: 68vh;
  width: auto;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
  -webkit-user-drag: none;
}
.qr-overlay-hint {
  color: rgba(255,255,255,0.9);
  font-size: 1.05rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.04em;
}
.qr-overlay-close {
  position: absolute;
  top: 14px;
  right: 18px;
  z-index: 10;
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  font-size: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.qr-overlay-close:hover { background: rgba(255,255,255,0.25); }
@media (max-width: 560px) {
  .qr-overlay-close { width: 40px; height: 40px; font-size: 1.6rem; top: 10px; right: 12px; }
  .qr-overlay-img { max-width: 88vw; max-height: 62vh; }
  .qr-overlay-hint { font-size: 0.92rem; }
}


/* Reviews marquee */
.reviews-section { overflow: hidden; }
.reviews-marquee {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 10px 0;
}
.hub-app .reviews-marquee {
  background: #fff;
  border-color: #e2e8f0;
}
.reviews-marquee::before,
.reviews-marquee::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 40px;
  z-index: 2;
  pointer-events: none;
}
.reviews-marquee::before {
  left: 0;
  background: linear-gradient(90deg, var(--panel), transparent);
}
.reviews-marquee::after {
  right: 0;
  background: linear-gradient(270deg, var(--panel), transparent);
}
.hub-app .reviews-marquee::before {
  background: linear-gradient(90deg, #fff, transparent);
}
.hub-app .reviews-marquee::after {
  background: linear-gradient(270deg, #fff, transparent);
}
.reviews-track {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: reviews-scroll 40s linear infinite;
}
.reviews-marquee:hover .reviews-track {
  animation-play-state: paused;
}
.reviews-marquee.is-single::before,
.reviews-marquee.is-single::after {
  display: none;
}
.reviews-marquee.is-single .reviews-track {
  width: 100%;
  justify-content: center;
  animation: none;
}
.reviews-marquee.is-single .review-slide {
  width: min(360px, 92vw);
}
  flex: 0 0 auto;
  width: min(280px, 72vw);
}
.review-slide img {
  width: 100%;
  height: auto;
  max-height: 160px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}
.review-caption {
  margin: 6px 0 0;
  font-size: .82rem;
  color: var(--muted);
  text-align: center;
}
@keyframes reviews-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (max-width: 860px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { flex-direction: row; flex-wrap: wrap; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .admin-form.grid-2 { grid-template-columns: 1fr; }
}


/* ===== Lightbox Image Viewer ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.lightbox.is-open {
  display: flex;
}
.lightbox-backdrop {
  position: absolute;
  inset: 0;
}
.lightbox-stage {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
}
.lightbox-img {
  max-width: 92%;
  max-height: 88%;
  object-fit: contain;
  border-radius: 4px;
  transition: transform 0.2s ease;
  will-change: transform;
  -webkit-user-drag: none;
}
.lightbox-close {
  position: absolute;
  top: 12px;
  right: 16px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  font-size: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  font-size: 2.5rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.25);
}
.lightbox-prev {
  left: 16px;
}
.lightbox-next {
  right: 16px;
}
.lightbox-counter {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  color: #fff;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.12);
  padding: 6px 16px;
  border-radius: 999px;
  white-space: nowrap;
}
.lightbox-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  text-align: center;
  transition: opacity 0.4s;
  pointer-events: none;
}
@media (max-width: 560px) {
  .lightbox-nav {
    width: 44px;
    height: 44px;
    font-size: 2rem;
  }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-close {
    width: 40px;
    height: 40px;
    font-size: 1.6rem;
  }
  .lightbox-hint {
    font-size: 0.72rem;
    bottom: 16px;
  }
}


/* ===== Video Player (after images) ===== */
.detail-video-section {
  margin: 0;
  padding: 14px 12px 0;
}
.detail-video-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.detail-video-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.detail-video-title::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 16px;
  background: var(--accent);
  border-radius: 2px;
}
.detail-video-fullscreen-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}
.detail-video-fullscreen-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.detail-video-fullscreen-btn svg {
  flex-shrink: 0;
}
.detail-video-wrap {
  position: relative;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  line-height: 0;
}
.detail-video {
  display: block;
  width: 100%;
  max-height: 450px;
  object-fit: contain;
  border-radius: 10px;
}
.video-fullscreen-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 5;
}
.detail-video-wrap:hover .video-fullscreen-overlay,
.detail-video-wrap:focus-within .video-fullscreen-overlay {
  opacity: 1;
}
.video-fullscreen-overlay svg {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

/* Fullscreen video styles */
.detail-video-wrap:fullscreen {
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.detail-video-wrap:fullscreen .detail-video {
  max-height: 100vh;
  width: auto;
  max-width: 100%;
  border-radius: 0;
}
.detail-video-wrap:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.detail-video-wrap:-webkit-full-screen .detail-video {
  max-height: 100vh;
  width: auto;
  max-width: 100%;
  border-radius: 0;
}
.detail-video-wrap:fullscreen .video-fullscreen-overlay,
.detail-video-wrap:-webkit-full-screen .video-fullscreen-overlay {
  display: none;
}
.detail-video-multi {
  margin-bottom: 12px;
}
.detail-video-multi:last-child {
  margin-bottom: 0;
}

@media (max-width: 720px) {
  .detail-video {
    max-height: 280px;
  }
  .detail-video-section {
    padding: 10px 10px 0;
  }
  .video-fullscreen-overlay {
    opacity: 1;
  }
}


/* ===== Hero image click hint ===== */
/* v10: 容器自身限高75vh, 防止图片/视频把页面撑出多余纵向滚动 */
.detail-hero {
  cursor: zoom-in;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  max-height: 75vh;
}
.detail-hero::after {
  content: "\1F50D";
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 1.2rem;
  opacity: 0.6;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}
.detail-hero.is-placeholder::after {
  display: none;
}

/* ===== Hero image navigation arrows + counter ===== */
.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 4;
  transition: background 0.2s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.hero-nav:hover {
  background: rgba(0, 0, 0, 0.7);
}
.hero-nav:active {
  transform: translateY(-50%) scale(0.9);
}
.hero-prev { left: 10px; }
.hero-next { right: 10px; }

.hero-counter {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 20px;
  z-index: 4;
  pointer-events: none;
  letter-spacing: 1px;
}

@media (max-width: 720px) {
  .hero-nav {
    width: 38px;
    height: 38px;
    font-size: 1.3rem;
  }
  .hero-prev { left: 6px; }
  .hero-next { right: 6px; }
  .hero-counter {
    font-size: 0.72rem;
    padding: 3px 10px;
    bottom: 8px;
  }
}

/* ===== Mobile improvements ===== */
@media (max-width: 720px) {
  .city-app .listing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .city-app .listing-body h4 {
    font-size: 0.82rem;
  }
  .city-app .listing-desc {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.76rem;
  }
  .city-app .card-more {
    font-size: 0.72rem;
  }
  .detail-body {
    padding: 14px 14px 18px;
  }
  .detail-head h2 {
    font-size: 1.15rem;
  }
  .region-bar-top {
    padding: 8px 12px 10px;
    gap: 6px;
  }
  .region-bar-top .region-link {
    padding: 6px 12px;
    font-size: 0.82rem;
  }
  .contact-qr-grid-fixed {
    gap: 10px;
  }
  .contact-qr-card {
    padding: 8px 6px;
  }
  .contact-qr-label {
    font-size: 0.82rem;
    margin-bottom: 6px;
  }
  .hub-brand h1 {
    font-size: 1.4rem;
  }
  .hub-intro {
    font-size: 0.85rem;
    line-height: 1.65;
  }
}

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

/* ===== Smooth scrolling ===== */
html {
  scroll-behavior: smooth;
}

/* ===== Better scrollbar for region bar ===== */
.region-bar-top {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(34, 197, 94, 0.3) transparent;
}
.region-bar-top::-webkit-scrollbar {
  height: 4px;
}
.region-bar-top::-webkit-scrollbar-track {
  background: transparent;
}
.region-bar-top::-webkit-scrollbar-thumb {
  background: rgba(34, 197, 94, 0.3);
  border-radius: 2px;
}

/* ===== Detail gallery scroll ===== */
.detail-gallery {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.detail-gallery::-webkit-scrollbar {
  height: 4px;
}
.detail-gallery::-webkit-scrollbar-thumb {
  background: rgba(34, 197, 94, 0.3);
  border-radius: 2px;
}

/* ===== Admin video upload hint ===== */
.image-upload-slot input[type="file"] {
  font-size: 0.85rem;
}

/* ===== Better touch targets on mobile ===== */
@media (max-width: 560px) {
  .faq-item summary {
    padding: 4px 0;
    font-size: 0.92rem;
  }
  .faq-item p {
    font-size: 0.85rem;
  }
  .search-bar input[type="search"] {
    padding: 10px 12px;
    font-size: 0.9rem;
  }
  .search-bar button {
    padding: 10px 14px;
    font-size: 0.88rem;
  }
}


/* ===== Video Sound Control Styles ===== */
video::-webkit-media-controls-mute-button {
  display: flex !important;
  opacity: 1 !important;
}
video::-webkit-media-controls-volume-slider {
  display: flex !important;
  opacity: 1 !important;
}
video::-webkit-media-controls-volume-slider-container {
  display: flex !important;
  opacity: 1 !important;
}

.video-sound-toggle {
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(4px);
}
.video-sound-toggle:active {
  transform: scale(0.92);
}

@media (max-width: 720px) {
  .video-sound-toggle {
    opacity: 0.85 !important;
  }
}


/* ===== Unified gallery: video in hero carousel ===== */
.detail-hero .hero-media-video {
  display: block;
  width: 100%;
  max-height: 75vh;
  object-fit: contain;
  background: #000;
  border-radius: 0;
}
.detail-hero.is-video {
  cursor: default;
}
.detail-hero.is-video::after {
  display: none !important;
}
.detail-hero.is-video .hero-media-img {
  display: none !important;
}

/* Video thumbnail in gallery strip */
.detail-thumb.thumb-video {
  position: relative;
  background: #000;
}
.detail-thumb.thumb-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.thumb-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.thumb-play-icon svg {
  margin-left: 2px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}
.detail-thumb.thumb-video.is-active {
  border-color: var(--accent);
}

@media (max-width: 720px) {
  .detail-hero .hero-media-video {
    max-height: 75vh;
  }
}


/* ===== Sortable Drag-and-Drop Styles ===== */
.sortable-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  padding: 4px 0;
}

.sortable-item {
  position: relative;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s, opacity 0.2s;
  cursor: grab;
}

.sortable-item:hover {
  border-color: #6366f1;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.sortable-item.dragging {
  opacity: 0.4;
  cursor: grabbing;
}

.sortable-item.drag-over {
  border-color: #6366f1;
  border-style: dashed;
  background: #eef2ff;
}

.sort-handle {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.9);
  color: #fff;
  border-radius: 6px;
  cursor: grab;
  z-index: 5;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.sort-handle:hover {
  opacity: 1;
}

.sort-handle:active {
  cursor: grabbing;
}

.sort-order-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #6366f1;
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  z-index: 5;
}

.sort-delete-check {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #ef4444;
  font-size: 12px;
  margin: 4px 0 2px;
  cursor: pointer;
}

.sort-label {
  display: block;
  text-align: center;
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
  font-weight: 600;
}

.sort-arrows {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 4px;
}

.sort-btn {
  width: 28px;
  height: 24px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  border-radius: 4px;
  cursor: pointer;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  padding: 0;
}

.sort-btn:hover {
  background: #6366f1;
  color: #fff;
  border-color: #6366f1;
}

.sort-btn:active {
  transform: scale(0.92);
}

/* Video sortable items need more height */
.sortable-item.video-manage-item .sort-handle {
  background: rgba(245, 158, 11, 0.9);
}

.sortable-item.video-manage-item .sort-order-badge {
  background: #f59e0b;
}

.sortable-item.video-manage-item:hover {
  border-color: #f59e0b;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

.sortable-item.video-manage-item.drag-over {
  border-color: #f59e0b;
  background: #fffbeb;
}

/* Hide arrows on video items since they're taller */
.sortable-item.video-manage-item .sort-arrows {
  position: absolute;
  bottom: 38px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 6px;
  padding: 2px;
  opacity: 0;
  transition: opacity 0.2s;
}

.sortable-item.video-manage-item:hover .sort-arrows {
  opacity: 1;
}

/* Mobile: show arrows always */
@media (max-width: 720px) {
  .sortable-item.video-manage-item .sort-arrows {
    opacity: 1;
  }
}

/* === 视频播放优化样式 === */
.mens-cat-video video,
.hero-media-video,
.video-manage-item video {
  max-width: 100%;
  height: auto;
  background: #000;
  border-radius: 8px;
}

/* 视频加载占位 */
.mens-cat-video video[preload="metadata"] {
  min-height: 120px;
}

/* 视频缓冲指示器 */
.mens-cat-video {
  position: relative;
}
.mens-cat-video video:waiting {
  opacity: 0.7;
}

/* Quick Delete Media Button */
.sortable-item { position: relative; }
.quick-delete-media {
  position: absolute !important;
  top: 6px !important;
  right: 6px !important;
  z-index: 10 !important;
  background: rgba(239,68,68,0.95) !important;
  color: #fff !important;
  border: none !important;
  padding: 4px 10px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  font-size: .75rem !important;
  font-weight: 600 !important;
  transition: background 0.2s !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25) !important;
}
.quick-delete-media:hover {
  background: rgba(220,38,38,1) !important;
}
.quick-delete-media:disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
}
.quick-delete-media[style] {
  /* Override inline style to ensure visibility */
}


/* === v20 画质感知增强 (2026-08-17) ===
   内容图片/视频轻微对比+饱和增强: 低源素材观感更清晰锐利;
   精调幅度(4%/6%)不产生过饱和, 全站访客可见 */
.detail-hero img,
.detail-thumb img,
.listing-image img,
.review-slide img,
.mens-cat-image img {
  filter: contrast(1.04) saturate(1.06);
}
.mens-cat-video video,
.hero-media-video {
  filter: contrast(1.03) saturate(1.04);
}
/* 视频保持原始宽高比铺满, 消除模糊拉伸 */
.mens-cat-video video { width: 100%; height: auto; object-fit: contain; }
