:root {
  --bg: #f4f7f4;
  --surface: #ffffff;
  --surface-soft: #f2f6f2;
  --surface-muted: #ebf1eb;
  --border: #e2ebe2;
  --border-strong: #cddbcd;
  --text: #1b3128;
  --text-sub: #536b5e;
  --text-muted: #82968a;
  --brand: #275844;
  --brand-hover: #1e4736;
  --brand-soft: #e4f2ea;
  --accent: #d96b43;
  --accent-soft: #fdf0eb;
  --good-bg: #e5f4ec;
  --good-text: #1d6444;
  --mid-bg: #fcf4e0;
  --mid-text: #946619;
  --warn-bg: #fcece7;
  --warn-text: #b44c2c;
  --radius-lg: 20px;
  --radius-md: 13px;
  --radius-sm: 10px;
  --shadow-xs: 0 2px 8px rgba(27, 49, 40, 0.035);
  --shadow-sm: 0 6px 20px rgba(27, 49, 40, 0.05);
  --shadow-md: 0 14px 36px rgba(27, 49, 40, 0.11);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: transform 0.12s ease, background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

button:active {
  transform: scale(0.985);
}

.hidden {
  display: none !important;
}

/* 等宽数字，保证金额列工整对齐 */
.price,
.pick-price,
.total-range,
.category-price,
.compare-v,
.rank-num {
  font-variant-numeric: tabular-nums;
}

/* 响应式整体框架 */
html,
body {
  overflow-x: clip;
  max-width: 100%;
}

.app-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 22px 104px;
  display: grid;
  grid-template-columns: 372px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 20px;
  min-width: 0;
  max-width: 100%;
}

.main-content {
  min-width: 0;
  max-width: 100%;
}

/* 治愈山水头图 */
.hero-card {
  position: relative;
  height: 148px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: 0 10px 26px rgba(39, 88, 68, 0.14);
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(16, 36, 28, 0.1) 0%, rgba(16, 36, 28, 0.78) 100%);
}

.hero-top {
  display: flex;
  justify-content: flex-end;
}

.hero-badge {
  background: rgba(255, 255, 255, 0.92);
  color: var(--brand);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
  flex-shrink: 0;
}

.brand-name {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.24);
  line-height: 1.2;
}

.brand-note {
  margin: 2px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.92);
}

/* 主模式切换 */
.main-tabs {
  display: flex;
  background: #e7efe7;
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  gap: 4px;
}

.tab-btn {
  flex: 1;
  padding: 9px 10px;
  border-radius: 9px;
  color: var(--text-sub);
  font-size: 14px;
  font-weight: 500;
}

.tab-btn.active {
  background: var(--surface);
  color: var(--brand);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(39, 88, 68, 0.09);
}

/* 通用卡片 */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field span {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
}

.money-input {
  display: flex;
  align-items: center;
  height: 44px;
  border: 1.5px solid #dce6db;
  border-radius: 11px;
  background: #f8faf8;
  padding: 0 11px;
  gap: 5px;
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.money-input:focus-within {
  border-color: var(--brand);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(39, 88, 68, 0.1);
}

.money-input .currency {
  font-style: normal;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
}

.money-input input {
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 16px;
  font-weight: 700;
  outline: none;
}

.money-input input::placeholder {
  font-weight: 400;
  color: #a1b0a6;
  font-size: 13px;
}

.preset-wrap {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 12px;
}

.preset-label {
  font-size: 11.5px;
  color: var(--text-muted);
}

.preset-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.preset-chip {
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--surface-soft);
  color: #426152;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid #dfe9df;
  text-align: center;
  white-space: nowrap;
}

.preset-chip:hover {
  background: #e6f1e9;
  border-color: #c2d7c8;
}

.preset-chip.active {
  background: var(--brand-soft);
  color: var(--brand);
  border-color: #8ebaa2;
  font-weight: 600;
}

.income-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 9px 12px;
  background: #f3f8f4;
  border: 1px solid #e3eee6;
  border-radius: 10px;
  font-size: 12px;
  color: var(--text-sub);
  cursor: pointer;
}

.income-check input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--brand);
  cursor: pointer;
}

.income-tip {
  margin-top: 12px;
  padding: 9px 12px;
  background: #edf6f1;
  color: #265f47;
  border-radius: 10px;
  font-size: 12px;
}

.quick-prefs {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.pref-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pref-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-sub);
  width: 40px;
  flex-shrink: 0;
}

.segment {
  display: flex;
  flex: 1;
  gap: 4px;
  background: #eef3ed;
  padding: 3px;
  border-radius: 10px;
}

.segment button {
  flex: 1;
  padding: 7px 6px;
  border-radius: 7px;
  font-size: 12px;
  color: #63796c;
  white-space: nowrap;
}

.segment button.active {
  background: #ffffff;
  color: var(--brand);
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(39, 88, 68, 0.08);
}

.form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 14px 0 12px;
}

.foot-hint {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.foot-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.text-btn {
  font-size: 12.5px;
  color: var(--brand);
  font-weight: 600;
  white-space: nowrap;
}

.text-btn:hover {
  text-decoration: underline;
}

.text-btn.muted {
  color: var(--text-muted);
  font-weight: 400;
}

.primary-btn {
  width: 100%;
  background: var(--brand);
  color: #ffffff;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(39, 88, 68, 0.22);
}

.primary-btn:hover {
  background: var(--brand-hover);
}

.secondary-btn {
  background: #eef5f0;
  color: var(--brand);
  padding: 10px 16px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 600;
}

.secondary-btn:hover {
  background: #e0eee5;
}

.error-box {
  font-size: 12px;
  color: var(--warn-text);
  background: var(--warn-bg);
  padding: 9px 12px;
  border-radius: 10px;
  margin-bottom: 10px;
}

.ranking-title {
  margin: 0;
  font-size: 16.5px;
  font-weight: 700;
}

.section-note {
  margin: 5px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.privacy-foot {
  text-align: center;
  font-size: 11.5px;
  color: #6d8174;
  margin: 10px 4px 0;
}

/* 空白引导态（桌面端与左侧表单卡片底边对齐，重心平衡） */
.start-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px 28px 30px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  min-height: 760px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.start-top {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.start-metrics {
  width: 100%;
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.start-metric {
  background: #f5f9f6;
  border: 1px solid #e4eee6;
  border-radius: 12px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.start-metric strong {
  font-size: 16px;
  font-weight: 700;
  color: var(--brand);
}

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

.start-showcase {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px dashed #e2ebe2;
  text-align: left;
}

.start-showcase-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 12px;
  text-align: center;
}

.start-city-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.start-city-card {
  background: #f7faf7;
  border: 1px solid #e3ece4;
  border-radius: 14px;
  padding: 13px 14px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.start-city-card:hover {
  border-color: #b4cbbd;
  background: #eff7f1;
  transform: translateY(-1px);
}

.start-city-tag {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--accent);
}

.start-city-card strong {
  font-size: 15px;
  color: var(--text);
}

.start-city-card em {
  font-style: normal;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--brand);
}

.start-city-card small {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

.start-logo {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  margin-bottom: 14px;
  box-shadow: 0 8px 22px rgba(39, 88, 68, 0.16);
}

.start-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--brand);
}

.start-card p {
  margin: 0 auto 22px;
  max-width: 440px;
  color: var(--text-sub);
  font-size: 13px;
}

.start-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* 智能结论摘要卡 */
.insight-card {
  background: linear-gradient(135deg, #275844 0%, #3a735b 100%);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  color: #ffffff;
  margin-bottom: 16px;
  box-shadow: 0 10px 26px rgba(39, 88, 68, 0.16);
}

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

.insight-head-main {
  flex: 1;
  min-width: 0;
}

.share-pill {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.share-pill:hover {
  background: rgba(255, 255, 255, 0.26);
}

.insight-title {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
  text-wrap: balance;
}

.insight-sub {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.85);
}

.picks-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.pick-card {
  background: rgba(255, 255, 255, 0.97);
  color: var(--text);
  border-radius: 13px;
  padding: 12px 13px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pick-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
}

.pick-tag {
  align-self: flex-start;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 4px;
}

.pick-city {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pick-district {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pick-price {
  margin-top: 6px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--brand);
}

.pick-price small {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
}

.pick-reason {
  font-size: 11px;
  color: var(--text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 搜索 + 精修自定义下拉框工具栏 */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.search-wrap {
  flex: 1 1 240px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 13px;
  height: 40px;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-wrap:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(39, 88, 68, 0.08);
}

.search-svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-wrap input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 13px;
  height: 100%;
  min-width: 0;
}

.search-wrap input::placeholder {
  color: #9baaa0;
}

.search-wrap input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.search-clear {
  font-size: 17px;
  color: var(--text-muted);
  padding: 0 4px;
  line-height: 1;
}

.region-selects {
  display: grid;
  grid-template-columns: repeat(3, minmax(104px, 1fr));
  gap: 8px;
  flex: 0 1 360px;
}

.select-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background-color: var(--surface);
  padding: 0 11px 0 12px;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.select-box:hover:not(.is-disabled) {
  border-color: var(--border-strong);
}

.select-box:focus-within:not(.is-disabled) {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(39, 88, 68, 0.08);
}

.select-box.is-disabled {
  background-color: #f3f6f3;
  border-color: #e9efe9;
  box-shadow: none;
}

.select-box.setting-select-box {
  border-radius: 10px;
  background-color: #f7faf7;
  box-shadow: none;
}

.select-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.select-box.is-disabled .select-label,
.select-box.is-disabled .select-arrow {
  color: #9eada3;
}

.select-arrow {
  width: 12px;
  height: 12px;
  color: #6c8276;
  flex-shrink: 0;
  pointer-events: none;
}

/* 原生 select 透明铺满触发区：彻底根除不同内核的丑黑三角与文字错位，同时保留完整键盘/触控体验 */
.select-box select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  margin: 0;
  padding: 0;
  border: 0;
}

.select-box.is-disabled select {
  cursor: not-allowed;
}

/* 单行快捷筛选胶囊栏（高清无模糊 + 左右智能翻页按钮 + 鼠标滚轮横滑） */
.filter-tags-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.filter-tags {
  display: flex;
  flex-wrap: nowrap;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 2px 4px;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex: 1;
  min-width: 0;
}

.filter-tags-wrap.has-prev .filter-tags {
  padding-left: 34px;
}

.filter-tags-wrap.has-next .filter-tags {
  padding-right: 34px;
}

.tags-nav {
  position: absolute;
  top: 50%;
  transform: translateY(calc(-50% - 1px));
  z-index: 3;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--brand);
  border: 1px solid var(--border-strong);
  box-shadow: 0 3px 10px rgba(27, 49, 40, 0.12);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tags-nav:hover {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
}

.tags-nav.prev {
  left: 0;
}

.tags-nav.next {
  right: 0;
}

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

.filter-chip {
  flex-shrink: 0;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.filter-chip:hover {
  border-color: #b4cbbd;
  color: var(--brand);
}

.filter-chip.active {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(39, 88, 68, 0.18);
}

.list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 2px 10px;
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 500;
}

.heading-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sort-btn {
  font-size: 12px;
  color: var(--brand);
  background: #e8f1eb;
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: 600;
}

.sort-btn:hover {
  background: #dceae1;
}

/* 城市列表 */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.rank-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 15px;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.rank-row:hover {
  border-color: #b5cebe;
  box-shadow: 0 8px 20px rgba(39, 88, 68, 0.075);
  transform: translateY(-1px);
}

.rank-num {
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 700;
  flex-shrink: 0;
}

.rank-num.top {
  background: var(--brand-soft);
  color: var(--brand);
}

.city-info {
  flex: 1;
  min-width: 0;
}

.city-title-line {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.city-name {
  font-size: 15.5px;
  font-weight: 700;
}

.mini-tag {
  font-size: 10.5px;
  padding: 1px 7px;
  border-radius: 6px;
  font-weight: 600;
}

.mini-tag.climate {
  background: #fdf1e9;
  color: #b8562f;
}

.mini-tag.coastal {
  background: #e6f3f8;
  color: #2c6f8e;
}

.mini-tag.local {
  background: #f4f0e4;
  color: #8a6c32;
}

.city-caption {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

.nowrap {
  white-space: nowrap;
}

.fit-badge {
  display: inline-block;
  margin-top: 6px;
  font-size: 11.5px;
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fit-badge.good {
  background: var(--good-bg);
  color: var(--good-text);
}

.fit-badge.mid {
  background: var(--mid-bg);
  color: var(--mid-text);
}

.fit-badge.warn {
  background: var(--warn-bg);
  color: var(--warn-text);
}

.fit-badge.neutral {
  background: var(--surface-soft);
  color: var(--text-sub);
}

.row-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.row-price {
  white-space: nowrap;
}

.price {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--brand);
}

.unit {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 2px;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fav-mini {
  width: 28px;
  height: 26px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text-muted);
  border: 1px solid #dce6dd;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fav-mini:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.fav-mini.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: #efcab6;
}

.compare-mini {
  font-size: 11.5px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text-sub);
  border: 1px solid #dce6dd;
}

.compare-mini:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.compare-mini.selected {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
}

.chevron {
  font-size: 17px;
  color: #b1bdb4;
}

.empty-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
}

.empty-box h4 {
  margin: 0 0 6px;
  color: var(--brand);
  font-size: 16px;
}

.load-more {
  width: 100%;
  margin-top: 14px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
  color: var(--brand);
  font-weight: 600;
  font-size: 13px;
}

.load-more:hover {
  background: #edf5ef;
}

.data-note {
  font-size: 11.5px;
  color: var(--text-muted);
  text-align: center;
  margin: 16px 0 0;
}

/* 页脚与回顶浮钮 */
.site-footer {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-sub);
}

.footer-brand img {
  border-radius: 5px;
}

.footer-meta {
  margin: 6px 0 0;
  font-size: 11px;
  color: var(--text-muted);
}

.back-top {
  position: fixed;
  right: 22px;
  bottom: 84px;
  z-index: 35;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--brand);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-top:hover {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
}

/* 底部悬浮对比条（轻盈毛玻璃风格） */
.compare-float {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 18px;
  width: min(560px, calc(100vw - 28px));
  z-index: 40;
  background: rgba(25, 51, 40, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 12px 32px rgba(18, 38, 29, 0.26);
}

.compare-float-left {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.compare-float-count {
  font-size: 11px;
  color: #a6cbb9;
}

.compare-float-names {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compare-float-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.compare-clear {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.74);
  padding: 6px 8px;
}

.compare-clear:hover {
  color: #ffffff;
}

.compare-go {
  background: var(--accent);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
}

/* 弹窗层 */
.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(18, 36, 29, 0.46);
  backdrop-filter: blur(3px);
}

.sheet {
  position: relative;
  width: 100%;
  max-width: 580px;
  max-height: 88vh;
  background: var(--surface);
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(18, 36, 29, 0.25);
}

.compare-sheet {
  max-width: 720px;
}

.poster-sheet {
  max-width: 480px;
}

.poster-body {
  display: block;
  background: #f5f8f5;
}

.poster-privacy {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  font-size: 12.5px;
  color: var(--text-sub);
  cursor: pointer;
}

.poster-privacy input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--brand);
  cursor: pointer;
}

.poster-preview-wrap {
  display: flex;
  justify-content: center;
  padding-bottom: 4px;
}

.poster-preview-img {
  width: 100%;
  max-width: 380px;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(27, 49, 40, 0.14);
  display: block;
}

.poster-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.poster-sub-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid #edf2ed;
}

.sheet-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.close-btn {
  font-size: 24px;
  line-height: 1;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.sheet-tabs {
  display: flex;
  border-bottom: 1px solid #edf2ed;
  padding: 0 18px;
  gap: 8px;
}

.sheet-tabs button {
  flex: 1;
  padding: 11px 6px;
  font-size: 13px;
  color: var(--text-muted);
  border-bottom: 2.5px solid transparent;
}

.sheet-tabs button.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
  font-weight: 700;
}

.sheet-body {
  padding: 16px 22px 22px;
  overflow-y: auto;
  flex: 1;
}

.sheet-actions {
  padding: 14px 22px 18px;
  border-top: 1px solid #edf2ed;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.setting-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.setting-field span {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-sub);
}

.setting-field input {
  height: 40px;
  border: 1px solid #dce6dd;
  border-radius: 10px;
  background: #f7faf7;
  padding: 0 11px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.setting-field input:focus {
  border-color: var(--brand);
  background: #ffffff;
}

.setting-field select {
  border-radius: 10px;
  background-color: #f7faf7;
  box-shadow: none;
}

.custom-exp-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e9f0e9;
}

.custom-exp-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 10px;
}

.custom-exp-head strong {
  font-size: 13px;
  color: var(--text);
}

.custom-exp-head span {
  font-size: 11.5px;
  color: var(--text-muted);
}

.custom-exp-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.exp-chip {
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid #dce7dd;
  color: var(--brand);
  font-size: 11.5px;
  font-weight: 500;
}

.exp-chip:hover {
  background: var(--brand-soft);
  border-color: #9ec4b0;
}

.custom-exp-adder {
  display: grid;
  grid-template-columns: 1fr 96px auto;
  gap: 8px;
}

.custom-exp-adder input {
  height: 38px;
  border: 1px solid #dce6dd;
  border-radius: 10px;
  background: #f7faf7;
  padding: 0 10px;
  font-size: 13px;
  outline: none;
  min-width: 0;
}

.custom-exp-adder input:focus {
  border-color: var(--brand);
  background: #ffffff;
}

.custom-exp-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 10px;
}

.custom-exp-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: #f4f8f5;
  border: 1px solid #e1ece3;
  border-radius: 10px;
  font-size: 13px;
}

.custom-exp-item-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.custom-exp-item strong {
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}

.custom-exp-rm {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1;
  padding: 2px 4px;
}

.custom-exp-rm:hover {
  color: var(--warn-text);
}

.settings-btn-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
}

.hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: 12px 0 0;
  line-height: 1.65;
}

/* 城市风物介绍卡（详情弹窗顶部） */
.city-hero-card {
  position: relative;
  height: 176px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 12px;
  background-color: #275844;
  background-size: cover;
  background-position: center;
  box-shadow: 0 8px 22px rgba(27, 49, 40, 0.14);
}

.city-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.28s ease;
}

.city-hero-img.is-loading {
  opacity: 0;
}

.city-hero-source {
  position: absolute;
  top: 10px;
  left: 12px;
  z-index: 2;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(16, 36, 28, 0.52);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: rgba(255, 255, 255, 0.9);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.2px;
  pointer-events: auto;
}

.city-hero-overlay {
  position: absolute;
  inset: 0;
  padding: 12px 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(16, 36, 28, 0.08) 0%, rgba(16, 36, 28, 0.72) 100%);
  pointer-events: none;
}

.city-hero-badges {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.city-hero-pill {
  background: rgba(255, 255, 255, 0.9);
  color: var(--brand);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}

.city-hero-tagline {
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.city-profile-box {
  background: #f7faf7;
  border: 1px solid #e4ede4;
  border-radius: 14px;
  padding: 13px 15px;
  margin-bottom: 14px;
}

.city-facts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 11px;
}

.city-fact-item {
  background: #ffffff;
  border: 1px solid #e5efe6;
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.city-fact-k {
  font-size: 10.5px;
  color: var(--text-muted);
}

.city-fact-v {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 当前年龄行（两行紧凑排布，杜绝任何视口溢出） */
.age-row {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 9px 11px;
  border-radius: 12px;
  background: #f6f9f6;
  border: 1px solid #e4ece4;
}

.age-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.age-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  white-space: nowrap;
}

.age-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.age-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.age-chips {
  display: flex;
  gap: 5px;
  flex: 1;
  min-width: 0;
}

.age-chip {
  flex: 1;
  padding: 5px 6px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #dce6dd;
  color: var(--text-sub);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}

.age-chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
  font-weight: 600;
}

.age-input-wrap {
  display: flex;
  align-items: center;
  gap: 3px;
  width: 74px;
  height: 29px;
  padding: 0 8px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #d5e2d7;
  flex-shrink: 0;
}

.age-input-wrap input {
  width: 100%;
  min-width: 0;
  border: none;
  background: transparent;
  outline: none;
  text-align: right;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.age-input-wrap input::placeholder {
  color: #a3b2a8;
  font-weight: 400;
}

.age-input-wrap span {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* 个性化地方偏好选择区 */
.wish-box {
  margin-top: 11px;
  padding: 9px 11px;
  border-radius: 12px;
  background: #f6f9f6;
  border: 1px solid #e4ece4;
}

.wish-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.wish-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
}

.wish-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.wish-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.wish-chip {
  padding: 5px 4px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #dce6dd;
  color: var(--text-sub);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  text-align: center;
}

.wish-chip:hover {
  border-color: #b4cbbd;
  color: var(--brand);
}

.wish-chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(39, 88, 68, 0.16);
}

/* 可折叠更多生活条件 */
.more-prefs-wrap {
  margin-top: 12px;
  border-radius: 12px;
  border: 1px solid #e3ece4;
  background: #f8fbf8;
  overflow: hidden;
}

.more-prefs-toggle {
  width: 100%;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--text-sub);
  text-align: left;
}

.more-prefs-toggle:hover {
  background: #f0f6f1;
}

.more-prefs-summary {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.more-prefs-caret {
  flex-shrink: 0;
  color: var(--brand);
  font-weight: 600;
  font-size: 11.5px;
}

.more-prefs-body {
  padding: 0 11px 11px;
  border-top: 1px solid #e7efe7;
}

.more-prefs-body .quick-prefs {
  margin-top: 10px;
}

.runway-age-line {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #dff0e5;
  color: #1c5b3e;
  font-size: 11.5px;
  font-weight: 700;
}

/* 存款年化收益条 */
.yield-box {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f2f7f3;
  border: 1px solid #dfeae1;
}

.yield-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--text-sub);
  margin-bottom: 8px;
}

.yield-monthly-tip {
  font-style: normal;
  font-weight: 700;
  color: var(--brand);
  font-size: 11.5px;
}

.yield-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.yield-chips {
  display: flex;
  gap: 5px;
  flex: 1;
}

.yield-chip {
  flex: 1;
  padding: 5px 6px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #d9e6dc;
  color: var(--text-sub);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}

.yield-chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
  font-weight: 600;
}

.yield-custom {
  display: flex;
  align-items: center;
  gap: 3px;
  background: #ffffff;
  border: 1px solid #d9e6dc;
  border-radius: 8px;
  padding: 0 7px;
  height: 29px;
  width: 62px;
  flex-shrink: 0;
}

.yield-custom input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  outline: none;
  text-align: right;
}

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

.inflation-row {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px dashed #d6e4d9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.inflation-label {
  font-size: 11.5px;
  color: var(--text-sub);
  white-space: nowrap;
}

.inflation-chips {
  display: flex;
  gap: 5px;
}

.inflation-chip {
  padding: 3px 8px;
  border-radius: 7px;
  background: #ffffff;
  border: 1px solid #d9e6dc;
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 500;
}

.inflation-chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
  font-weight: 600;
}

.median-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 9px;
  border-radius: 999px;
  background: #fdf0eb;
  color: #c85a32;
  font-size: 11.5px;
  font-weight: 600;
  vertical-align: middle;
}

.social-tip-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: -8px 0 14px;
  padding: 9px 12px;
  border-radius: 11px;
  background: #fcf6ee;
  border: 1px solid #f0dfca;
  font-size: 11.5px;
  color: #7c5628;
}

.social-tip-btn {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #e4c8a6;
  color: #8f5c1f;
  font-size: 11px;
  font-weight: 600;
}

.social-tip-btn:hover {
  background: #8f5c1f;
  color: #ffffff;
  border-color: #8f5c1f;
}

/* 自定义参数显性提醒条 */
.custom-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 13px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: #edf6f0;
  border: 1px solid #d2e6d9;
  font-size: 12px;
  color: #25513f;
}

.custom-summary-text {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  line-height: 1.45;
}

.custom-summary-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.custom-summary-btn {
  flex-shrink: 0;
  padding: 4px 11px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #c6dfd0;
  color: var(--brand);
  font-size: 11.5px;
  font-weight: 600;
}

.custom-summary-btn:hover {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
}

.footer-link-btn {
  color: var(--brand);
  font-size: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.runway-sub {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 2px;
}

.detail-poster-btn {
  width: 100%;
  margin-top: 10px;
  padding: 11px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #275844 0%, #347057 100%);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(39, 88, 68, 0.2);
}

.detail-poster-btn:hover {
  filter: brightness(1.06);
}

.city-profile-intro {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-sub);
  line-height: 1.7;
}

.profile-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.profile-chip {
  font-size: 11px;
  font-weight: 600;
  color: var(--brand);
  background: #e7f3ec;
  padding: 3px 9px;
  border-radius: 8px;
}

.profile-foods {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed #dce7dd;
  font-size: 12px;
  color: var(--text-sub);
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.profile-foods strong {
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}

/* 城市详情内容 */
.detail-total {
  background: #eff6f1;
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 14px;
}

.total-label {
  font-size: 12px;
  color: var(--text-sub);
}

.total-range {
  font-size: 28px;
  font-weight: 800;
  color: var(--brand);
  margin-top: 2px;
}

.total-range small {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
}

.fit-summary-line {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--good-text);
}

.fit-summary-line.tight {
  color: var(--mid-text);
}

.fit-summary-line.short {
  color: var(--warn-text);
}

.runway-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #ecf5ef;
  border: 1px solid #d5e7db;
  border-radius: 12px;
  padding: 12px 15px;
  margin-bottom: 16px;
  font-size: 13px;
}

.runway-box strong {
  color: var(--brand);
  text-align: right;
}

.cost-bar {
  height: 11px;
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  gap: 2px;
  background: #edf2ee;
  margin-bottom: 14px;
}

.breakdown-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #eef3ee;
}

.category {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.category-name {
  font-size: 14px;
  font-weight: 600;
}

.category-pct {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 6px;
}

.category-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.category-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand);
  white-space: nowrap;
}

.detail-btn-row {
  display: flex;
  gap: 10px;
  margin: 16px 0;
}

.detail-btn-row button {
  flex: 1;
}

.source-details {
  border-top: 1px solid #edf2ed;
  padding-top: 12px;
  margin-top: 8px;
}

.source-details summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--text-sub);
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.source-details summary::after {
  content: "+";
  font-size: 16px;
}

.source-details[open] summary::after {
  content: "−";
}

.source-body {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.7;
}

.source-body h4 {
  margin: 12px 0 4px;
  font-size: 13px;
  color: var(--text);
}

.source-body a {
  color: var(--brand);
  word-break: break-all;
}

/* 横向对比网格 */
.compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.compare-col {
  background: #f8faf8;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.compare-col-head {
  padding: 14px 12px;
  background: #edf4ef;
  text-align: center;
}

.compare-city {
  font-size: 16px;
  font-weight: 700;
}

.compare-dist {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 2px;
}

.compare-rm {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.compare-rm:hover {
  color: var(--warn-text);
}

.compare-cell {
  padding: 11px 10px;
  border-top: 1px solid #e7efe7;
  text-align: center;
}

.compare-cell.best {
  background: var(--good-bg);
}

.compare-k {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.compare-v {
  display: block;
  font-size: 14px;
  font-weight: 700;
}

.compare-cell.best .compare-v {
  color: var(--good-text);
}

.compare-v.small {
  font-size: 12px;
}

/* 轻提示 */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  background: rgba(25, 51, 40, 0.94);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  box-shadow: var(--shadow-md);
}

/* 中等屏与移动端响应式布局 */
@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
    max-width: 720px;
    padding: 14px 16px 100px;
    gap: 16px;
  }

  .sidebar {
    position: static;
  }

  .start-card {
    min-height: 0;
  }

  .start-metrics {
    grid-template-columns: 1fr;
  }

  .hero-card {
    height: 132px;
  }

  .region-selects {
    flex: 1 1 100%;
  }

  .modal-layer {
    align-items: flex-end;
    padding: 0;
  }

  .sheet {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 22px 22px 0 0;
  }
}

/* 手机窄屏下：Top 3 精选卡保持紧凑横滑与柔和右边缘 */
@media (max-width: 580px) {
  .app-shell {
    padding: 12px 12px 96px;
  }

  .card {
    padding: 16px 14px;
  }

  .start-card {
    padding: 32px 16px 22px;
  }

  .start-city-grid {
    grid-template-columns: 1fr;
  }

  .insight-card {
    padding: 16px 14px;
  }

  .insight-title {
    font-size: 17px;
  }

  .picks-grid {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 0 4px 4px 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .picks-grid::-webkit-scrollbar {
    display: none;
  }

  .pick-card {
    flex: 0 0 172px;
    scroll-snap-align: start;
  }

  .region-selects {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .select-box {
    padding: 0 8px 0 9px;
  }

  .select-label {
    font-size: 12px;
  }

  .rank-row {
    padding: 12px 12px;
    gap: 10px;
  }

  .fit-badge {
    font-size: 11px;
    padding: 2px 8px;
  }

  /* 手机端回顶按钮放左下角，避免遮挡右侧 +对比 按钮 */
  .back-top {
    left: 14px;
    right: auto;
    bottom: 20px;
    width: 38px;
    height: 38px;
    font-size: 16px;
    opacity: 0.92;
  }
}
