/* Design tokens */
:root {
  --primary: #10B981;
  --primary-dark: #059669;
  --primary-soft: #ECFDF5;
  --accent: #F59E0B;
  --danger: #EF4444;
  --text: #111827;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;
  --bg: #F3F4F6;
  --surface: #FFFFFF;
  --border: #E5E7EB;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.1);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --tab-height: 56px;
  --header-height: 64px;
}

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

html, body {
  height: 100%;
  margin: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', 'Microsoft YaHei', sans-serif;
  background: #E5E7EB;
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* App shell */
.app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: 430px;
  margin: 0 auto;
  background: var(--bg);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

@media (max-width: 480px) {
  .app {
    max-width: none;
    box-shadow: none;
  }
}

/* Header */
.app-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 12px;
  background: linear-gradient(135deg, var(--primary) 0%, #0EA5E9 100%);
  color: #fff;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-logo {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #fff;
  padding: 4px;
  box-sizing: border-box;
  overflow: hidden;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-text { min-width: 0; }

.brand-text h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.brand-text p {
  margin: 2px 0 0;
  font-size: 11px;
  opacity: 0.9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-chip {
  flex: 0 0 auto;
  font-size: 12px;
}

.user-chip .pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  max-width: 140px;
}

.user-chip .pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.user-chip .login-btn {
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  color: var(--primary);
  border: none;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

/* Pages */
.pages {
  flex: 1 1 auto;
  position: relative;
  overflow: hidden;
  min-height: 0;
  background: var(--bg);
}

.page {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.25, 0.8, 0.25, 1);
  pointer-events: none;
  display: flex;
  flex-direction: column;
}

.page.is-active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.page-scroll {
  padding: 16px;
  padding-bottom: calc(24px + var(--tab-height) + env(safe-area-inset-bottom));
}

/* Tab bar */
.tab-bar {
  flex: 0 0 auto;
  display: flex;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 30;
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: var(--tab-height);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.12s ease;
  position: relative;
}

.tab-item:active { transform: scale(0.96); }

.tab-item.is-active { color: var(--primary); font-weight: 600; }

.tab-item.is-active::before {
  content: '';
  position: absolute;
  top: 6px;
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--primary);
  opacity: 0.18;
}

.tab-icon {
  width: 24px;
  height: 24px;
  transition: transform 0.2s ease;
}

.tab-item.is-active .tab-icon { transform: translateY(-1px); }

/* Common cards */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text);
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-sub {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Hero */
.hero-card {
  background: linear-gradient(135deg, var(--primary) 0%, #0EA5E9 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.hero-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 10px;
}

.hero-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
}

.hero-card p {
  margin: 0;
  font-size: 14px;
  opacity: 0.92;
  line-height: 1.6;
}

.hero-actions {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-actions .login-btn {
  padding: 10px 22px;
  border-radius: 999px;
  background: #fff;
  color: var(--primary);
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s, opacity 0.2s, box-shadow 0.2s;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.hero-actions .login-btn:active { transform: scale(0.97); }

/* 浏览器/内网环境的演示登录次按钮 */
.hero-actions .login-btn-ghost {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: none;
}

/* 登录跳转中的 loading 状态 */
.hero-actions .login-btn.is-loading {
  opacity: 0.65;
  pointer-events: none;
}

/* Forms */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.field-grid.two-cols { grid-template-columns: 1fr 1fr; }

@media (max-width: 360px) {
  .field-grid.two-cols { grid-template-columns: 1fr; }
}

.field-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #FAFAFA;
  font-size: 15px;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  -webkit-appearance: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.required { color: var(--danger); }

/* Chips */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* 到访时间卡片：日期选择器与上午/下午选项之间增大间距，形成清晰视觉分隔
   （仅命中「field 后紧跟 chip-group」的到访时间区块，不影响到访事由的 chip-group） */
.card .field + .chip-group {
  margin-top: 16px;
}

.chip {
  position: relative;
  flex: 0 0 auto;
}

.chip input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.chip label {
  display: block;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #FAFAFA;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.chip label:active { transform: scale(0.96); }

.chip input:checked + label {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary);
  font-weight: 600;
}

.chip input:focus-visible + label { box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.2s, background 0.2s;
}

.btn svg { width: 18px; height: 18px; }

.btn:active { transform: scale(0.98); }

.btn-primary {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  box-shadow: 0 8px 16px rgba(16, 185, 129, 0.28);
}

.btn-primary:hover { box-shadow: 0 10px 20px rgba(16, 185, 129, 0.35); }

.btn-map {
  flex: 0 0 auto;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  background: #fff;
  color: var(--primary);
  border: none;
  border-radius: var(--radius);
  font-size: 12px;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.btn-map svg { width: 20px; height: 20px; }

.form-actions { margin: 6px 0 24px; }

.form-tip {
  margin: 10px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* Map card */
.map-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #F0FDF4 0%, #E0F2FE 100%);
  border: 1px solid rgba(16, 185, 129, 0.12);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.map-pin {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.map-pin svg { width: 22px; height: 22px; }

.map-body { flex: 1 1 auto; min-width: 0; }

.map-body h2 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.map-body p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Sort chips */
.sort-chips {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.sort-chips::-webkit-scrollbar { display: none; }

.sort-chips button {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #FAFAFA;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sort-chips button.is-active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
}

.sort-chips button:active { transform: scale(0.96); }

/* Parking list */
.parking-list { list-style: none; padding: 0; margin: 0; }

.parking-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
}

.parking-card:active { transform: scale(0.99); }

.parking-body { padding: 14px 16px 16px; }

/* 停车场图片区：有实拍图显示图片，无图/加载失败显示占位 */
.parking-photo {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
  overflow: hidden;
}

.parking-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.parking-photo-placeholder {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.parking-photo-placeholder svg { width: 36px; height: 36px; color: #A5B4FC; }

.parking-photo-placeholder span { font-size: 12px; font-weight: 500; color: #818CF8; }

.parking-photo.is-placeholder .parking-photo-placeholder { z-index: 1; }

/* 照片角标（左下角停车场名） */
.parking-photo-tag {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  max-width: calc(100% - 130px);
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  backdrop-filter: blur(4px);
}

/* 车位余量徽标（图片右上角） */
.fullness-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

/* 余量五档配色：充足/较充足/一般/紧张/紧缺 */
.fullness-badge.tone-great    { background: #16A34A; }
.fullness-badge.tone-good     { background: #65A30D; }
.fullness-badge.tone-normal   { background: #2563EB; }
.fullness-badge.tone-warn     { background: #D97706; }
.fullness-badge.tone-critical { background: #DC2626; }

/* 余量说明提示条 */
.parking-fullness-tip {
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 12px;
}

.parking-fullness-tip.tone-great    { background: #F0FDF4; color: #15803D; }
.parking-fullness-tip.tone-good     { background: #F7FEE7; color: #4D7C0F; }
.parking-fullness-tip.tone-normal   { background: #EFF6FF; color: #1D4ED8; }
.parking-fullness-tip.tone-warn     { background: #FFF7ED; color: #C2410C; }
.parking-fullness-tip.tone-critical { background: #FEF2F2; color: #B91C1C; }

.parking-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.parking-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
}

.parking-badge {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
}

.parking-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.tag {
  padding: 4px 8px;
  border-radius: 6px;
  background: #F3F4F6;
  color: var(--text-secondary);
  font-size: 12px;
}

.parking-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.meta-item { text-align: center; }

.meta-value {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.meta-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* 车位余量 1-5 格可视化（颜色随余量档位变化） */
.parking-level {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 34px;
}

.level-dots {
  display: flex;
  gap: 3px;
  justify-content: center;
}

.level-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #E5E7EB;
  border: 1px solid #D1D5DB;
  transition: background 0.2s;
}

.level-dot.is-filled {
  background: var(--tone, var(--primary));
  border-color: var(--tone, var(--primary));
}

/* 余量档位色调变量 */
.tone-great    { --tone: #16A34A; }
.tone-good     { --tone: #65A30D; }
.tone-normal   { --tone: #2563EB; }
.tone-warn     { --tone: #D97706; }
.tone-critical { --tone: #DC2626; }

.level-text {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

/* 停车费用封顶说明 */
.parking-fee-caps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.parking-fee-caps span {
  padding: 4px 8px;
  border-radius: 6px;
  background: #FFF7ED;
  color: #C2410C;
  font-size: 11px;
  font-weight: 500;
}

.parking-actions { display: flex; gap: 10px; }

.parking-actions .btn {
  flex: 1;
  padding: 10px;
  font-size: 13px;
  font-family: inherit;
  border-radius: 10px;
  cursor: pointer;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s, opacity 0.15s;
}

.parking-actions .btn:active { transform: scale(0.98); }

.btn-outline {
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-solid {
  background: var(--primary);
  color: #fff;
  border: none;
}

/* Transport */
.metro-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }

.metro-card {
  display: flex;
  align-items: stretch;
  gap: 12px;
  padding: 16px;
  background: #FAFAFA;
  border-radius: var(--radius);
}

.metro-card:last-child { padding-bottom: 16px; }

/* 线路徽章组：同一站点多条线路纵向排列，与右侧站点信息等高 */
.metro-lines {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
}

.metro-line {
  flex: 0 0 auto;
  min-width: 48px;
  padding: 7px 10px;
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  box-sizing: border-box;
}

.metro-line.line-1 { background: #E60012; }
.metro-line.line-5 { background: #0072CE; }

.metro-body { flex: 1 1 auto; min-width: 0; }

.metro-station {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.metro-detail {
  font-size: 13px;
  color: var(--text-secondary);
}

.metro-nav {
  flex: 0 0 auto;
  align-self: center;
  /* 与线路徽章等高：13px × 1.2 + 7px × 2 = 29.6px，取整 30px */
  height: 30px;
  min-width: 48px;
  padding: 0 14px;
  border-radius: 15px;
  background: var(--primary-soft);
  color: var(--primary);
  border: none;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(16, 185, 129, 0.12);
}

.bus-list { display: flex; flex-direction: column; gap: 14px; }

.bus-card {
  background: #FAFAFA;
  border-radius: var(--radius);
  overflow: hidden;
}

/* 公交站图片：以图片形式展示公交站及周边环境 */
.bus-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 7;
  background: linear-gradient(135deg, #E0F2FE 0%, #ECFDF5 100%);
  overflow: hidden;
}

.bus-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 图片加载失败时回退到渐变底色 */
.bus-photo.is-fallback img { display: none; }

.bus-photo-tag {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.bus-card .bus-stop {
  margin: 14px 14px 0;
}

.bus-stop {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 32px;
}

.bus-stop svg { width: 18px; height: 18px; color: var(--primary); }

/* 公交站距公司距离：站名行右侧独立徽标，与站名互不干扰 */
.bus-stop-name { min-width: 0; }

.bus-stop-distance {
  margin-left: auto;
  flex: 0 0 auto;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

/* 公交站照片占位：站台照片未拍摄时显示 */
.bus-photo-placeholder {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #7C8A99;
  font-size: 12px;
}

.bus-photo.is-placeholder .bus-photo-placeholder { display: flex; }

.bus-photo-placeholder svg {
  width: 26px;
  height: 26px;
  opacity: 0.7;
}

/* 公交线路数量：置于站台图片右下角，浅色浮层标签，与下方线路列表区分层级 */
.bus-photo-count {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #4B5563;
  font-size: 11px;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(17, 24, 39, 0.14);
}

.bus-lines {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 14px 14px;
}

.bus-lines span {
  padding: 5px 10px;
  border-radius: 6px;
  background: #E5E7EB;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}

/* Contact */
.contact-hero {
  text-align: center;
  background: linear-gradient(135deg, var(--primary) 0%, #0EA5E9 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.contact-avatar {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  border: 2px solid rgba(255, 255, 255, 0.5);
  padding: 8px;
  box-sizing: border-box;
  overflow: hidden;
}

.contact-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.contact-hero h2 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
}

.contact-hotline-label {
  margin: 0 0 4px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  opacity: 0.85;
  letter-spacing: 2px;
}

.contact-hero p:last-child {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  opacity: 1;
  letter-spacing: 1px;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.action-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s, box-shadow 0.15s, border-color 0.15s;
}

.action-tile svg { width: 24px; height: 24px; color: var(--primary); }

.action-tile:active { transform: scale(0.97); }

.action-tile:hover { border-color: var(--primary); }

/* 联系页快捷操作 3 项布局：复制地址横跨两列 */
.action-tile-wide { grid-column: 1 / -1; flex-direction: row; gap: 10px; padding: 14px 10px; }

.contact-detail .detail-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.contact-detail .detail-row:last-child { border-bottom: none; padding-bottom: 0; }

/* 公司环境照片：门头 + 楼下大门（照片未拍摄时显示占位） */
.company-photos-tip {
  margin: 4px 0 14px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.company-photos {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.company-photo {
  position: relative;
  aspect-ratio: 16 / 7;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, #E0F2FE 0%, #ECFDF5 100%);
}

.company-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.company-photo.is-placeholder img { display: none; }

.company-photo-tag {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.company-photo-placeholder {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #7C8A99;
  font-size: 12px;
}

.company-photo-placeholder svg {
  width: 30px;
  height: 30px;
  opacity: 0.7;
}

.company-photo.is-placeholder .company-photo-placeholder { display: flex; }

.detail-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.detail-value {
  margin: 0;
  font-size: 15px;
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
  line-height: 1.5;
}

.detail-value[href] { color: var(--primary); }

/* Toast */
.toast {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  max-width: 86%;
  padding: 12px 18px;
  border-radius: var(--radius);
  background: rgba(17, 24, 39, 0.92);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 100;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

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

.toast.success { background: rgba(5, 150, 105, 0.95); }
.toast.error { background: rgba(239, 68, 68, 0.95); }

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== Map Picker（地图选择弹层）===== */
.map-picker-mask {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(17, 24, 39, 0.5);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.22s ease;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.map-picker-mask.is-open { opacity: 1; }

/* 关键修复：CSS 的 display:flex 会覆盖 HTML hidden 属性（UA 样式 display:none），
   导致透明遮罩常驻全屏并拦截所有点击。这里强制 hidden 生效。 */
.map-picker-mask[hidden] { display: none !important; }

.map-picker {
  width: 100%;
  max-width: 560px;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  padding: 18px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform 0.24s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.18);
}

.map-picker-mask.is-open .map-picker { transform: translateY(0); }

.map-picker-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-picker-sub {
  margin: 4px 0 14px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-picker-options { display: flex; flex-direction: column; gap: 10px; }

.map-picker-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 14px;
  background: #FAFAFA;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s, border-color 0.15s;
}

.map-picker-item:active { transform: scale(0.985); border-color: var(--primary); }

.map-badge {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.badge-wechat { background: #07C160; }
.badge-amap { background: #1677FF; }
.badge-baidu { background: #2932E1; }
.badge-tencent { background: #00A6FF; }

.map-picker-name { flex: 1 1 auto; text-align: left; }

.map-picker-tag {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ECFDF5;
  color: #059669;
  font-size: 11px;
  font-weight: 600;
}

.map-picker-cancel {
  width: 100%;
  margin-top: 12px;
  padding: 13px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.map-picker-cancel:active { background: #F3F4F6; }
