﻿/* 花名册 · 移动端 UI（Mini App 内使用，纯 CSS 变量驱动） */
:root {
  --bg: #f4f4f7;
  --card: #ffffff;
  --text: #14121c;
  --sub: #6b6b80;
  --muted: #9a9aad;
  --line: #ececf2;
  --brand: #7c3aed;
  --brand-2: #a855f7;
  --brand-soft: #f1e9ff;
  --ok: #1fb85c;
  --ok-soft: #e6f8ee;
  --warn: #f59e0b;
  --warn-soft: #fff5e2;
  --danger: #ef4444;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 2px 10px rgba(24, 16, 48, 0.06);
  --tabbar-h: 62px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC",
    "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.45;
  overscroll-behavior-y: none;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
}

.app {
  min-height: 100dvh;
  padding-top: var(--tg-safe-area-inset-top, 0px);
  padding-bottom: calc(var(--tabbar-h) + var(--tg-safe-area-inset-bottom, 0px));
}

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 8px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.brand-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-sub {
  font-size: 12px;
  color: var(--muted);
}

.city-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 600;
}

/* ---------- 搜索 hero ---------- */
.hero {
  margin: 4px 16px 0;
  padding: 18px 16px 16px;
  border-radius: 22px;
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 48%, #d8a7ff 100%);
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.25);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  right: -70px;
  top: -80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.hero-kicker {
  font-size: 12px;
  opacity: 0.85;
  margin: 0 0 6px;
}

.hero-title {
  font-size: 21px;
  font-weight: 800;
  margin: 0 0 14px;
  letter-spacing: 0.3px;
}

.search-row {
  display: flex;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--text);
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  font-family: inherit;
  background: transparent;
  color: var(--text);
}

.search-box input::placeholder {
  color: #b3b3c4;
}

.map-btn {
  flex: 0 0 auto;
  padding: 0 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

/* ---------- 筛选区 ---------- */
.filters {
  padding: 14px 16px 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.filter-row::-webkit-scrollbar {
  display: none;
}

.filter-label {
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--muted);
  width: 28px;
}

.chip {
  flex: 0 0 auto;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--card);
  color: var(--sub);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.chip.active {
  background: var(--brand-soft);
  color: var(--brand);
  border-color: rgba(124, 58, 237, 0.25);
}

.chip .num {
  font-weight: 500;
  opacity: 0.6;
  margin-left: 2px;
}

.filter-row.plain .chip {
  background: #fff;
}

/* ---------- 排序行 ---------- */
.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 8px;
}

.sort-group {
  display: flex;
  gap: 8px;
}

.sort-btn {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--card);
  font-size: 12.5px;
  color: var(--sub);
  box-shadow: var(--shadow);
}

.sort-btn.active {
  color: var(--brand);
  font-weight: 700;
}

.count {
  font-size: 12.5px;
  color: var(--muted);
}

/* ---------- 卡片列表 ---------- */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 16px;
}

.p-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow);
  position: relative;
}

.p-cover {
  position: relative;
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  color: rgba(255, 255, 255, 0.92);
  font-size: 62px;
  font-weight: 800;
  overflow: hidden;
}

.p-cover span {
  transform: translateY(-8px);
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.p-cover .veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.45) 100%);
}

.badge-live {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--ok);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(31, 184, 92, 0.35);
}

.badge-vip {
  position: absolute;
  top: 8px;
  left: 58px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 244, 214, 0.95);
  color: #a97400;
  font-size: 10.5px;
  font-weight: 700;
}

.fav {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  line-height: 1;
  color: #ff5d8f;
  backdrop-filter: blur(4px);
}

.fav.on {
  background: #ff5d8f;
  color: #fff;
}

.p-meta {
  padding: 9px 10px 11px;
}

.p-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
  font-weight: 700;
}

.p-name em {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--warn);
  background: var(--warn-soft);
  padding: 1px 6px;
  border-radius: 6px;
}

.p-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--muted);
}

.p-price {
  color: #e0475f;
  font-weight: 700;
  font-size: 12.5px;
}

/* ---------- 详情页 ---------- */
.detail {
  padding-bottom: 8px;
}

.gallery {
  position: relative;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  background: #0d0a16;
}

.gallery::-webkit-scrollbar {
  display: none;
}

.gallery .slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  aspect-ratio: 3 / 4;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.9);
  font-size: 96px;
  font-weight: 800;
}

.gallery-top {
  position: absolute;
  top: calc(10px + var(--tg-safe-area-inset-top, 0px));
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 3;
}

.round-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 17px;
  backdrop-filter: blur(6px);
}

.counter {
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(6px);
}

.sheet {
  position: relative;
  margin-top: -18px;
  border-radius: 20px 20px 0 0;
  background: var(--card);
  padding: 16px 16px 6px;
}

.title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.d-name {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
}

.d-city {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--muted);
}

.price-plate {
  flex: 0 0 auto;
  text-align: right;
  padding: 8px 12px;
  border-radius: 12px;
  background: #fdeef0;
  color: #d93a55;
  font-weight: 800;
  line-height: 1.35;
}

.price-plate small {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: #b07780;
}

.chip-line {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.tag {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 600;
}

.tag.live { background: var(--ok-soft); color: var(--ok); }
.tag.vip { background: var(--warn-soft); color: #a97400; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 14px 0 4px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.stats b {
  display: block;
  font-size: 15px;
}

.stats span {
  font-size: 11px;
  color: var(--muted);
}

.block {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.block:last-child {
  border-bottom: none;
}

.block-title {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 8px;
}

.attrs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.attr {
  padding: 5px 10px;
  border-radius: 8px;
  background: #f6f3ff;
  color: #6b46c1;
  font-size: 11.5px;
  font-weight: 600;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: center;
  gap: 8px;
}

.meta-grid i {
  display: block;
  font-size: 15px;
  font-style: normal;
  opacity: 0.5;
}

.meta-grid b {
  font-size: 15px;
}

.meta-grid span {
  font-size: 11px;
  color: var(--muted);
}

.intro {
  margin: 0;
  color: #3a3a4a;
  font-size: 13.5px;
}

.map-card {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  position: relative;
}

.map-canvas {
  height: 130px;
  background:
    repeating-linear-gradient(0deg, #e8eef4 0 1px, transparent 1px 26px),
    repeating-linear-gradient(90deg, #e8eef4 0 1px, transparent 1px 26px),
    linear-gradient(135deg, #f6faf7, #eef4fb);
  position: relative;
}

.map-pin {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.map-pin i {
  width: 34px;
  height: 34px;
  border-radius: 50% 50% 50% 4px;
  transform: rotate(-45deg);
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 6px 14px rgba(124, 58, 237, 0.4);
}

.map-pin i span {
  transform: rotate(45deg);
}

.map-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: #fff;
  font-size: 11px;
  color: var(--muted);
}

.nav-btn {
  padding: 6px 12px;
  border-radius: 999px;
  background: #1677ff;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.empty {
  padding: 26px 12px;
  border: 1px dashed #dcdce6;
  border-radius: 14px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- 底部操作条（详情页） ---------- */
.action-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 8px;
  padding: 10px 12px calc(10px + var(--tg-safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  z-index: 40;
}

.btn {
  flex: 1;
  height: 44px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.btn-ghost {
  background: #f2eeff;
  color: #6b46c1;
}

.btn-solid {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: 0 8px 18px rgba(124, 58, 237, 0.32);
}

/* ---------- tabbar ---------- */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--tabbar-h) + var(--tg-safe-area-inset-bottom, 0px));
  padding-bottom: var(--tg-safe-area-inset-bottom, 0px);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  z-index: 30;
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font-size: 10.5px;
  color: #9a9aad;
}

.tab .ico {
  font-size: 19px;
  line-height: 1.1;
}

.tab.active {
  color: var(--brand);
  font-weight: 700;
}

/* ---------- 其他 tab 的占位 ---------- */
.page {
  padding: 16px;
}

.page-title {
  font-size: 26px;
  font-weight: 800;
  margin: 6px 0 4px;
}

.page-sub {
  color: var(--muted);
  font-size: 12.5px;
  margin: 0 0 16px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(90px + var(--tg-safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(8px);
  background: rgba(20, 18, 28, 0.9);
  color: #fff;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13px;
  opacity: 0;
  transition: all 0.22s ease;
  pointer-events: none;
  z-index: 60;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* --- 溢出修复（移动端 WebView 常见：flex/grid 子项默认 min-width:auto 撑破视口） --- */
html,
body {
  overflow-x: hidden;
}

.app {
  max-width: 100%;
  overflow-x: hidden;
}

.search-box input {
  min-width: 0;
  width: 100%;
}

.grid > *,
.filter-row > *,
.title-row > * {
  min-width: 0;
}

.p-name,
.p-sub span,
.d-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 横向滚动的筛选行右侧渐隐，暗示可以滑动 */
.filter-row {
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 88%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 0, #000 88%, transparent 100%);
}

/* ---------- 地图 ---------- */
.map-canvas { height: 150px; background: #eef1f6; }
.map-canvas .leaflet-container { font: inherit; }
.map-fail {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #8a8a9e;
  font-size: 12px;
  text-align: center;
  background:
    repeating-linear-gradient(0deg, #e8eef4 0 1px, transparent 1px 26px),
    repeating-linear-gradient(90deg, #e8eef4 0 1px, transparent 1px 26px),
    linear-gradient(135deg, #f6faf7, #eef4fb);
}
.map-fail small { font-size: 10.5px; opacity: 0.8; }

/* 基本资料四宫格：让图标/数值/标签各占一行 */
.meta-grid i,
.meta-grid b,
.meta-grid span {
  display: block;
}

/* ---------- 新版块：提示 / 骨架 / 榜单 / 报告 / 弹窗 ---------- */
.notice {
  margin: 8px 16px 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: #fff6e5;
  color: #a97400;
  font-size: 12px;
}

.p-card.skeleton {
  height: 240px;
  background: linear-gradient(90deg, #eee 25%, #f6f6f8 37%, #eee 63%);
  background-size: 400% 100%;
  animation: sk 1.2s ease infinite;
}
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.rank-list { display: flex; flex-direction: column; gap: 8px; }
.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(20, 16, 40, 0.05);
}
.rank-no { width: 28px; text-align: center; font-weight: 800; color: var(--brand); }
.rank-name { flex: 1; font-weight: 700; display: flex; flex-direction: column; }
.rank-name small { font-weight: 400; color: var(--muted); font-size: 11.5px; }
.rank-val { color: #6b46c1; font-size: 12.5px; font-weight: 700; }

.my-report {
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(20, 16, 40, 0.05);
}
.mr-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.mr-body { font-size: 13.5px; color: #3a3a4a; }
.mr-time { color: var(--muted); font-size: 11.5px; margin-top: 6px; }
.badge-status { font-size: 11px; padding: 2px 8px; border-radius: 999px; font-weight: 700; }
.badge-status.pending { background: #fff5e2; color: #b9770e; }
.badge-status.approved { background: #e7f8ee; color: #1fb85c; }
.badge-status.rejected { background: #fdeaea; color: #d0342c; }

.report-row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.report-row:last-child { border-bottom: none; }
.rr-head { display: flex; justify-content: space-between; color: #f5a623; font-size: 13px; }
.rr-time { color: var(--muted); font-size: 11.5px; }
.rr-body { font-size: 13.5px; color: #3a3a4a; margin-top: 4px; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(12, 10, 22, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 70;
  padding: 0 0 env(safe-area-inset-bottom);
}
.modal-card {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 18px 18px 0 0;
  padding: 18px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.modal-card h3 { margin: 0; font-size: 16px; }
.stars { display: flex; gap: 6px; }
.stars button {
  font-size: 26px;
  line-height: 1;
  color: #ddd;
  background: none;
  border: none;
  padding: 0;
}
.stars button.on { color: #f5a623; }
.modal-card textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  color: var(--text);
}
.modal-hint { margin: 0; font-size: 11.5px; color: var(--muted); }
.modal-actions { display: flex; gap: 8px; }
.modal-actions .btn { flex: 1; }

/* ---------- 动效层 ---------- */
.page-in {
  animation: pageIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.p-card,
.chip,
.btn,
.sort-btn,
.tab,
.round-btn,
.city-btn,
.rank-item,
.nav-btn,
.fav {
  transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  will-change: transform;
}
.p-card:active { transform: scale(0.975); }
.chip:active,
.sort-btn:active,
.tab:active,
.round-btn:active,
.fav:active,
.nav-btn:active { transform: scale(0.94); }
.btn:active { transform: scale(0.97); }
.rank-item:active { transform: scale(0.985); }

.chip.active { animation: chipPop 0.26s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes chipPop {
  0% { transform: scale(0.92); }
  60% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

.tab.active .ico { animation: tabBounce 0.32s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes tabBounce {
  0% { transform: translateY(3px) scale(0.9); }
  100% { transform: none; }
}

.p-cover img { opacity: 0; transition: opacity 0.35s ease; }
.p-cover img.loaded { opacity: 1; }

.modal { animation: fadeIn 0.18s ease both; }
.modal-card { animation: sheetUp 0.3s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes sheetUp { from { transform: translateY(28px); opacity: 0.6; } }

.stars button { transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.15s; }
.stars button.on { transform: scale(1.06); }

.detail .sheet { animation: sheetRise 0.34s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes sheetRise { from { transform: translateY(16px); opacity: 0; } }

.gallery .slide { transition: transform 0.2s ease; }

/* 我的页里的小条目 */
.menu-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  background: #fff;
  border-radius: 14px;
  margin-bottom: 8px;
  transition: transform 0.15s ease, background 0.15s;
}
.menu-row:active { transform: scale(0.985); background: #faf9ff; }
.menu-row .arrow { color: #c0c0d0; }
.menu-row .tag-new {
  font-size: 10px;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
  padding: 2px 7px;
  border-radius: 999px;
  margin-left: 8px;
  font-weight: 700;
}

/* ---------- 地图模式 / 城市弹层 / 详情骨架 ---------- */
.gallery-actions { display: flex; gap: 8px; }

.map-page-head {
  position: absolute; top: calc(10px + var(--tg-safe-area-inset-top, 0px));
  left: 12px; right: 12px; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  pointer-events: none;
}
.map-page-head > * { pointer-events: auto; }
.map-page-head > span {
  background: rgba(255,255,255,0.92); color: #14121c;
  padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  box-shadow: 0 4px 14px rgba(20,16,40,0.12);
}
.round-btn.light { background: rgba(255,255,255,0.92); color: #14121c; box-shadow: 0 4px 14px rgba(20,16,40,0.12); }

.map-page {
  position: fixed;
  left: 0; right: 0;
  top: 0;
  bottom: calc(var(--tabbar-h) + var(--tg-safe-area-inset-bottom, 0px));
  background: #eef1f6;
}
.big-map {
  position: absolute;
  inset: 0;
  background: #eef1f6;
}
.big-map .leaflet-container { width: 100%; height: 100%; }
.map-legend {
  position: fixed;
  left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabbar-h) + 16px + var(--tg-safe-area-inset-bottom, 0px));
  background: rgba(20,18,28,0.8); color: #fff;
  padding: 6px 14px; border-radius: 999px; font-size: 11.5px;
  z-index: 5; pointer-events: none;
}

.city-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.city-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; font-size: 14px; color: var(--text); font-weight: 600;
  transition: all 0.15s ease;
}
.city-item span { color: var(--muted); font-size: 12px; font-weight: 400; }
.city-item.on { background: var(--tg-theme-section-bg-color, #f3ecff); border-color: #dcc9ff; color: var(--brand); }
.city-item:active { transform: scale(0.97); }

.skeleton-detail .sk-hero {
  aspect-ratio: 3 / 4;
  background: linear-gradient(90deg, #eee 25%, #f6f6f8 37%, #eee 63%);
  background-size: 400% 100%;
  animation: sk 1.2s ease infinite;
}
.skeleton-detail .sk-line {
  height: 16px; border-radius: 8px; margin-bottom: 10px;
  background: linear-gradient(90deg, #eee 25%, #f6f6f8 37%, #eee 63%);
  background-size: 400% 100%;
  animation: sk 1.2s ease infinite;
}
.w50 { width: 50%; } .w30 { width: 30%; } .w80 { width: 80%; } .w60 { width: 60%; }

.map-swap-hint {
  position: absolute; right: 10px; top: 10px; z-index: 400;
  background: rgba(20,18,28,0.72); color: #fff;
  padding: 4px 10px; border-radius: 999px; font-size: 11px;
  pointer-events: none;
}
.map-canvas { position: relative; }



/* 地图页浮层要压住 Leaflet 的 pane（z-index 最高 800） */
.map-page-head { z-index: 1000; }
.map-legend { z-index: 1000; }
.map-page .leaflet-control-attribution { z-index: 900; }

/* ================= v1.0 结构调整 & 图标系统 ================= */
.ico { display: inline-block; vertical-align: -0.18em; flex: 0 0 auto; }
.ico.dim { opacity: 0.55; }
.ico.rot90 { transform: rotate(90deg); }

.view-root {
  min-height: 100dvh;
  padding-bottom: calc(var(--tabbar-h) + var(--tg-safe-area-inset-bottom, 0px) + 8px);
}

/* 顶栏城市按钮 */
.city-btn { display: inline-flex; align-items: center; gap: 5px; }
.city-btn .ico { opacity: 0.6; }

/* hero 地图按钮改成圆形图标按钮 */
.map-btn {
  width: 44px; height: 44px; flex: 0 0 44px;
  padding: 0; display: grid; place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
}

/* 卡片封面：真图用 cover，占位用渐变 */
.p-cover.has-photo { background-size: cover; background-position: center; }
.fav { display: grid; place-items: center; color: #ff5d8d; }
.fav .ico { pointer-events: none; }
.fav.on { color: #fff; background: #ff5d8d; }

/* 详情页图集操作按钮 */
.gallery-actions { display: flex; gap: 8px; }
.round-btn.on { color: #ff5d8d; background: rgba(255, 255, 255, 0.92); }
.round-btn { display: grid; place-items: center; }

/* 四宫格图标 */
.meta-grid .ico { display: block; margin: 0 auto 2px; opacity: 0.45; }

/* 星级（静态展示） */
.stars-static { display: inline-flex; gap: 2px; color: #dcdce6; }
.stars-static .ico.on { color: #f5a623; }

/* 提交报告的星星按钮 */
.stars button { color: #dcdce6; }
.stars button.on { color: #f5a623; transform: scale(1.04); }

/* 空状态图标 */
.empty-ico { opacity: 0.35; margin-bottom: 6px; display: flex; justify-content: center; }

/* tabbar 徽标 */
.tabbar.hidden { display: none; }
.tabbar .tab .ico { transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1); }
.tabbar .tab.active .ico { transform: translateY(-1px) scale(1.06); }

/* 榜单前三 */
.rank-item.top1 .rank-no { color: #e11d48; }
.rank-item.top2 .rank-no { color: #d97706; }
.rank-item.top3 .rank-no { color: #7c3aed; }

/* 我的页 */
.me-card {
  display: flex; align-items: center; gap: 12px;
  padding: 16px; border-radius: 18px;
  background: linear-gradient(135deg, #7c3aed, #a855f7 55%, #c084fc);
  color: #fff;
  box-shadow: 0 12px 26px rgba(124, 58, 237, 0.28);
}
.me-avatar {
  width: 52px; height: 52px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.22);
  display: grid; place-items: center;
  font-size: 22px; font-weight: 800;
}
.me-name { font-size: 17px; font-weight: 800; }
.me-sub { font-size: 12px; opacity: 0.85; margin-top: 2px; }

.menu { margin-top: 14px; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.menu-row {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; background: #fff; border: none; text-align: left;
  font-size: 14px; color: var(--text);
  border-bottom: 1px solid var(--line);
  transition: background 0.15s ease;
}
.menu-row:last-child { border-bottom: none; }
.menu-row:active { background: #faf9ff; }
.menu-row .mi { opacity: 0.5; display: flex; }
.menu-row .mt { flex: 1; }
.menu-row .mv { color: var(--muted); font-size: 13px; }
.menu-row .arrow { opacity: 0.35; }
.menu-row.static { cursor: default; }
.tag-new {
  font-style: normal; margin-left: 6px; font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 999px; color: #fff;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
}

/* 城市选择弹层 */
.city-sheet { max-height: 82vh; display: flex; flex-direction: column; }
.sheet-handle {
  width: 38px; height: 4px; border-radius: 999px;
  background: #e2e2ec; margin: 0 auto 10px;
}
.search-box.small { padding: 9px 12px; background: #f4f4f8; border-radius: 10px; }
.search-box.small input { font-size: 14px; }
.province-row {
  display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 6px;
  scrollbar-width: none; margin: 0 -4px; padding-left: 4px; padding-right: 4px;
}
.province-row::-webkit-scrollbar { display: none; }
.province-row .chip { flex: 0 0 auto; }

.city-list { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 0 8px; }
.city-group-title {
  font-size: 11.5px; color: var(--muted); margin: 10px 2px 6px; letter-spacing: 0.5px;
}
.city-item.wide { grid-column: 1 / -1; }
.city-grid .city-item { font-size: 13.5px; padding: 10px 12px; }
.city-item em { font-style: normal; font-size: 11px; color: var(--brand); background: #f1e9ff; border-radius: 999px; padding: 1px 6px; }

/* 性能：滚动区禁用 backdrop-filter（iOS WebView 上最贵的一层） */
.tabbar, .action-bar, .modal-card, .map-page-head > span, .round-btn.light {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.tabbar { background: rgba(255, 255, 255, 0.98); }
.action-bar { background: rgba(255, 255, 255, 0.98); }

/* 减少无谓的图层提升 */
.p-card, .chip, .btn, .sort-btn, .tab, .round-btn, .city-btn, .rank-item, .nav-btn, .fav {
  will-change: auto !important;
}

/* ================= v1.1 细节打磨 ================= */
/* tabbar 顶部指示条 */
.tabbar .tab { position: relative; }
.tabbar .tab::after {
  content: "";
  position: absolute; top: 0; left: 50%;
  width: 18px; height: 2.5px; border-radius: 0 0 3px 3px;
  background: currentColor;
  transform: translateX(-50%) scaleX(0);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: 0.9;
}
.tabbar .tab.active::after { transform: translateX(-50%) scaleX(1); }

/* 卡片：桌面端轻微抬起 + 图片缩放 */
.p-card { overflow: hidden; }
.p-cover { transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
@media (hover: hover) {
  .p-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(24, 16, 48, 0.12); }
  .p-card:hover .p-cover { transform: scale(1.03); }
}

/* 榜单行渐次入场 */
.rank-item { animation: fadeUp 0.32s ease both; }
.rank-item:nth-child(2) { animation-delay: 0.03s; }
.rank-item:nth-child(3) { animation-delay: 0.06s; }
.rank-item:nth-child(4) { animation-delay: 0.09s; }
.rank-item:nth-child(5) { animation-delay: 0.12s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } }

/* 骨架屏 */
.p-card.skeleton { border-radius: var(--radius); }

/* 筛选行左右渐隐（只右侧，避免左侧内容被吃掉） */
.filter-row { padding-right: 18px; }

/* ================= v1.2 细节 ================= */
.clear-btn {
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #eceaf5; color: #7c7c90;
  display: grid; place-items: center; padding: 0;
}
.search-box { gap: 8px; }

.sort-btn.reset { color: var(--brand); background: #f1e9ff; }

.rank-item.skeleton {
  height: 58px;
  background: linear-gradient(90deg, #eee 25%, #f6f6f8 37%, #eee 63%);
  background-size: 400% 100%;
  animation: sk 1.2s ease infinite;
  box-shadow: none;
}

.btn.disabled { opacity: 0.45; }

/* 我的页菜单：按钮内 span 对齐 */
.menu-row .mt em { vertical-align: 1px; }

/* tabbar 指示条微调：不要贴着边框被裁掉 */
.tabbar .tab::after { top: 3px; height: 3px; width: 16px; border-radius: 999px; }
