:root {
  --ink: #263d38;
  --ink-soft: #526560;
  --cream: #f6f3ed;
  --paper: #fffdf9;
  --sage: #8fa89e;
  --sage-dark: #607c71;
  --orange: #e98656;
  --orange-soft: #f6d5c3;
  --line: #deded6;
  --shadow: 0 12px 40px rgba(45, 61, 56, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  background: #e8e5df;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% -10%, rgba(233, 134, 86, 0.13), transparent 35%),
    var(--cream);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.app-shell {
  position: relative;
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--cream);
  box-shadow: 0 0 60px rgba(36, 52, 48, 0.12);
}

.page {
  display: none;
  min-height: 100vh;
  padding-bottom: 92px;
}

.page.active {
  display: block;
  animation: page-in 0.28s ease;
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.home-header,
.simple-header {
  padding: 30px 22px 24px;
}

.brand-row,
.section-heading,
.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--orange);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-family: "SimSun", "STSong", serif;
  font-size: 31px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.slogan,
.simple-header > p:last-child {
  margin: 8px 0 22px;
  color: var(--ink-soft);
  font-size: 14px;
}

.round-button {
  position: relative;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.65);
}

.location-panel {
  margin-bottom: 13px;
  padding: 14px;
  border: 1px solid rgba(96, 124, 113, 0.16);
  border-radius: 16px;
  background: rgba(255, 253, 249, 0.72);
}

.location-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 11px;
}

.location-title strong {
  flex: 1;
  font-size: 12px;
}

.location-title button {
  padding: 0;
  border: 0;
  color: var(--orange);
  background: transparent;
  font-size: 10px;
}

.location-pin {
  color: var(--orange);
  font-size: 18px;
}

.location-selects {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.nearby-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 9px;
  margin-top: 10px;
}

.nearby-search-row label {
  display: grid;
  gap: 5px;
}

.nearby-search-row label > span {
  color: var(--ink-soft);
  font-size: 9px;
}

.nearby-search-row input,
.nearby-search-row select {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 11px;
}

.map-key-input {
  margin-top: 9px;
}

.commute-panel {
  margin-bottom: 13px;
  padding: 14px;
  border: 1px solid rgba(233, 134, 86, 0.2);
  border-radius: 16px;
  background: #fff8f2;
}

.workplace-input {
  width: 100%;
  height: 39px;
  padding: 0 11px;
  border: 1px solid #ead8cc;
  border-radius: 10px;
  outline: 0;
  color: var(--ink);
  background: var(--paper);
  font-size: 11px;
}

.commute-settings {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 9px;
}

.commute-settings span {
  display: block;
  margin-bottom: 4px;
  color: #8e766a;
  font-size: 8px;
}

.commute-settings input {
  width: 100%;
  height: 32px;
  padding: 0 7px;
  border: 1px solid #ead8cc;
  border-radius: 8px;
  outline: 0;
  background: var(--paper);
  font-size: 10px;
}

.estimate-note {
  margin: 8px 0 0;
  color: #9a7664;
  font-size: 8px;
  line-height: 1.5;
}

.commute-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  margin: 8px 0;
}

.commute-summary span {
  padding: 5px 6px;
  border-radius: 6px;
  color: #667872;
  background: #f0f3f1;
  font-size: 8px;
}

.school-commute-panel {
  margin-top: 9px;
  padding: 10px;
  border: 1px solid #ead8cc;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.55);
}

.commute-section-card {
  position: relative;
}

.commute-section-card.always-on {
  margin-top: 9px;
  padding: 10px;
  border: 1px solid #d9e2de;
  border-radius: 11px;
  background: rgba(235, 243, 239, 0.72);
}

.commute-section-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.commute-section-heading > b {
  display: grid;
  flex: 0 0 22px;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: var(--paper);
  background: var(--orange);
  font-size: 9px;
}

.commute-section-heading > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.commute-section-heading strong {
  font-size: 10px;
}

.commute-section-heading small {
  color: var(--ink-soft);
  font-size: 7px;
  line-height: 1.4;
}

.commute-section-heading + em,
.commute-section-heading ~ em {
  margin-left: auto;
  color: var(--sage-dark);
  font-size: 8px;
  font-style: normal;
  white-space: nowrap;
}

.commute-section-card.always-on .workplace-input {
  margin-top: 9px;
}

.school-toggle-row,
.school-type-options,
.school-trip-options {
  display: flex;
  align-items: center;
  gap: 7px;
}

.school-toggle-row {
  justify-content: space-between;
  font-size: 10px;
}

.switch-control {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--sage-dark);
  font-size: 9px;
}

.school-commute-options {
  margin-top: 10px;
}

.commute-trip-schedule {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
}

.commute-trip-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 7px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  font-size: 9px;
}

.commute-trip-row label {
  display: flex;
  align-items: center;
  gap: 3px;
  color: var(--ink-soft);
}

.commute-trip-row input {
  width: 11px;
  height: 11px;
}

.commute-trip-row label:has(input:checked) {
  color: var(--sage-dark);
  font-weight: 700;
}

.school-trip-options,
.school-type-options {
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.school-trip-options label,
.school-type-options button {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--paper);
  font-size: 9px;
}

.school-trip-options label:has(input:checked),
.school-type-options button.active {
  border-color: var(--sage-dark);
  color: var(--paper);
  background: var(--sage-dark);
}

.school-trip-options input {
  width: 11px;
  height: 11px;
  margin-right: 3px;
}

#find-nearby-schools {
  color: var(--paper);
  background: var(--orange);
  border-color: var(--orange);
}

.school-results {
  display: grid;
  gap: 6px;
  max-height: 168px;
  margin: 8px 0;
  overflow-y: auto;
}

.school-result {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: var(--paper);
  text-align: left;
}

.school-result.selected {
  border-color: var(--orange);
  background: #fff4ed;
}

.school-result strong,
.school-result span {
  display: block;
}

.waypoint-add-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr auto;
  gap: 6px;
  margin-top: 8px;
}

.waypoint-add-row .workplace-input {
  min-width: 0;
}

.waypoint-add-row button {
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  color: var(--paper);
  background: var(--sage-dark);
  font-size: 9px;
  font-weight: 700;
}

.commute-waypoint-list {
  display: grid;
  gap: 6px;
  margin-top: 9px;
}

.commute-waypoint {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
}

.commute-waypoint > b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: var(--paper);
  background: var(--orange);
  font-size: 9px;
}

.commute-waypoint strong,
.commute-waypoint small {
  display: block;
}

.commute-waypoint strong {
  font-size: 9px;
}

.waypoint-trip-options {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.waypoint-trip-options label {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: #f7f6f1;
  font-size: 7px;
}

.waypoint-trip-options label:has(input:checked) {
  border-color: var(--sage-dark);
  color: var(--paper);
  background: var(--sage-dark);
}

.waypoint-trip-options input {
  width: 9px;
  height: 9px;
}

.commute-waypoint small {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 7px;
}

.waypoint-actions {
  display: flex;
  align-items: center;
  gap: 3px;
}

.waypoint-actions small {
  color: var(--sage-dark);
  font-size: 7px;
  white-space: nowrap;
}

.waypoint-actions button {
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink-soft);
  background: #f7f6f1;
  font-size: 9px;
}

.school-result strong {
  font-size: 10px;
}

.school-result span {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 8px;
}

@media (max-width: 390px) {
  .location-selects {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.location-selects label {
  min-width: 0;
}

.location-selects label span {
  display: block;
  margin: 0 0 5px 2px;
  color: #84908c;
  font-size: 9px;
}

.location-selects select {
  width: 100%;
  height: 36px;
  padding: 0 24px 0 9px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  color: var(--ink);
  background: #f7f5f0;
  font-size: 11px;
  text-overflow: ellipsis;
}

.location-selects select:focus {
  border-color: var(--sage-dark);
}

.location-selects select:disabled {
  color: #aeb5b2;
  background: #efeee9;
}

.source-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 11px;
}

.source-actions button {
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 0;
  border-radius: 9px;
  color: var(--paper);
  background: var(--sage-dark);
  font-size: 10px;
  font-weight: 700;
}

.source-actions select {
  flex: 0 0 auto;
  height: 31px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: var(--paper);
  font-size: 9px;
}

.source-actions button:disabled {
  color: #9ca5a1;
  background: #e6e6df;
}

.source-actions span {
  overflow: hidden;
  color: #84908c;
  font-size: 9px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-actions span.error {
  color: #b85c45;
}

.source-actions span.success {
  color: var(--sage-dark);
}

.unread-dot {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--cream);
  border-radius: 50%;
  background: var(--orange);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 15px;
  border: 1px solid rgba(96, 124, 113, 0.2);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.search-box input {
  width: 100%;
  height: 52px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 14px;
}

.search-icon {
  font-size: 24px;
  line-height: 1;
  transform: rotate(-20deg);
}

.clear-search {
  border: 0;
  background: transparent;
  color: #929b97;
  font-size: 22px;
}

.quick-filters,
.community-selector {
  display: flex;
  gap: 8px;
  margin-top: 15px;
  overflow-x: auto;
  scrollbar-width: none;
}

.quick-filters::-webkit-scrollbar,
.community-selector::-webkit-scrollbar {
  display: none;
}

.amenity-filters {
  display: flex;
  gap: 7px;
  margin-top: 9px;
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.amenity-filters::-webkit-scrollbar {
  display: none;
}

.amenity-filter {
  flex: 0 0 auto;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--paper);
  font-size: 10px;
}

.amenity-filter.active {
  border-color: var(--sage-dark);
  color: var(--paper);
  background: var(--sage-dark);
}

.filter-chip,
.community-chip {
  flex: 0 0 auto;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12px;
}

.filter-chip.active,
.community-chip.active {
  border-color: var(--ink);
  color: var(--paper);
  background: var(--ink);
}

.result-type-filters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 0 0 14px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f4f2ec;
}

.result-type-filter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 7px 8px;
  border: 0;
  border-radius: 10px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.result-type-filter strong {
  display: grid;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  place-items: center;
  border-radius: 999px;
  color: var(--sage-dark);
  background: rgba(255, 255, 255, 0.8);
  font-size: 9px;
}

.result-type-filter.active {
  color: var(--paper);
  background: var(--sage-dark);
  box-shadow: 0 5px 12px rgba(38, 61, 56, 0.13);
}

.result-type-filter.active strong {
  color: var(--sage-dark);
  background: var(--paper);
}

.result-distance-filters {
  display: flex;
  gap: 7px;
  margin: -5px 0 14px;
  overflow-x: auto;
  scrollbar-width: none;
}

.result-distance-filters::-webkit-scrollbar {
  display: none;
}

.distance-filter {
  flex: 0 0 auto;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--paper);
  font-size: 10px;
  cursor: pointer;
}

.distance-filter.active {
  border-color: var(--orange);
  color: var(--orange);
  background: #fff3eb;
  font-weight: 700;
}

.content-section {
  padding: 0 18px 24px;
}

.compare-hero {
  position: relative;
  display: flex;
  min-height: 172px;
  margin-bottom: 30px;
  padding: 23px 20px;
  overflow: hidden;
  border-radius: 24px;
  color: #f9f5eb;
  background: var(--ink);
}

.compare-hero > div:first-child {
  position: relative;
  z-index: 2;
  max-width: 62%;
}

.hero-label {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 8px;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 999px;
  color: #d7e3dc;
  font-size: 10px;
}

.compare-hero h2 {
  margin-bottom: 8px;
  font-family: "SimSun", serif;
  font-size: 23px;
}

.compare-hero p {
  margin-bottom: 17px;
  color: #c4d1cc;
  font-size: 12px;
  line-height: 1.6;
}

.text-button {
  padding: 0;
  border: 0;
  color: #ffd2b9;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.hero-illustration {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 45%;
  height: 100%;
}

.sun {
  position: absolute;
  top: 23px;
  right: 25px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 10px rgba(233, 134, 86, 0.12);
}

.building {
  position: absolute;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(2, 12px);
  gap: 13px;
  justify-content: center;
  padding-top: 24px;
  background: #49635a;
}

.building i {
  width: 11px;
  height: 15px;
  background: rgba(255, 222, 181, 0.62);
}

.building-back {
  right: 8px;
  width: 84px;
  height: 108px;
  opacity: 0.55;
}

.building-front {
  right: 65px;
  width: 75px;
  height: 133px;
  background: #6d877d;
}

.section-heading {
  align-items: flex-end;
  margin-bottom: 14px;
}

.section-heading h2 {
  margin: 0;
  font-family: "SimSun", serif;
  font-size: 21px;
}

.sort-button {
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 11px;
}

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

.listing-community-group {
  display: grid;
  gap: 11px;
}

.listing-community-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 3px 0;
}

.listing-community-head h3 {
  margin: 0;
  font-family: "SimSun", serif;
  font-size: 16px;
}

.listing-community-head span {
  margin-left: 6px;
  color: var(--ink-soft);
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 9px;
  font-weight: 400;
}

.listing-community-head button {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--sage-dark);
  font-size: 9px;
}

.listing-community-actions {
  display: flex;
  gap: 5px;
}

.listing-community-actions [data-toggle-community] {
  border-color: var(--orange);
  color: var(--orange);
}

.listing-community-cards {
  display: grid;
  gap: 11px;
}

.listing-card {
  display: grid;
  grid-template-columns: 132px 1fr;
  min-height: 132px;
  overflow: hidden;
  border: 1px solid rgba(38, 61, 56, 0.08);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 8px 30px rgba(45, 61, 56, 0.05);
}

.listing-visual {
  position: relative;
  min-height: 132px;
  overflow: hidden;
  background: var(--visual-bg);
}

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

.listing-visual.has-photo::before,
.listing-visual.has-photo::after {
  display: none;
}

.listing-visual::before,
.listing-visual::after {
  content: "";
  position: absolute;
}

.listing-visual::before {
  left: 14%;
  right: 14%;
  bottom: 0;
  height: 72%;
  border-radius: 50% 50% 0 0 / 15% 15% 0 0;
  background:
    linear-gradient(90deg, transparent 47%, rgba(38,61,56,0.12) 48% 52%, transparent 53%),
    linear-gradient(rgba(255,255,255,0.6) 48%, transparent 49%),
    var(--room-color);
  box-shadow: inset 0 0 0 8px rgba(255,255,255,0.22);
}

.listing-visual::after {
  right: 13px;
  bottom: 14px;
  width: 36px;
  height: 53px;
  border-radius: 40px 40px 8px 8px;
  background: rgba(255,255,255,0.48);
}

.listing-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 253, 249, 0.88);
  font-size: 9px;
  font-weight: 700;
}

.source-badge {
  position: absolute;
  z-index: 2;
  right: 8px;
  bottom: 8px;
  padding: 3px 6px;
  border-radius: 6px;
  color: var(--paper);
  background: rgba(38, 61, 56, 0.78);
  font-size: 8px;
}

.listing-info {
  position: relative;
  min-width: 0;
  padding: 14px 13px;
}

.listing-info h3 {
  max-width: calc(100% - 92px);
  margin-bottom: 5px;
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.listing-card-actions {
  position: absolute;
  z-index: 4;
  top: 8px;
  right: 8px;
  display: grid;
  justify-items: end;
  gap: 3px;
  width: 88px;
  pointer-events: none;
}

.favorite-button {
  position: static;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #84908c;
  font-size: 21px;
  pointer-events: auto;
}

.favorite-button.active {
  color: var(--orange);
}

.compare-select-button {
  position: static;
  max-width: 88px;
  padding: 5px 8px;
  border: 1px solid #ccd8d2;
  border-radius: 999px;
  background: #f6f8f6;
  color: var(--sage-dark);
  font-size: 8px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: auto;
}

.compare-select-button.selected {
  border-color: var(--sage-dark);
  background: var(--sage-dark);
  color: white;
}

.listing-meta {
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.6;
}

.listing-tags {
  display: flex;
  gap: 5px;
  margin-bottom: 9px;
}

.listing-tags span {
  padding: 3px 6px;
  border-radius: 5px;
  color: var(--sage-dark);
  background: #edf2ef;
  font-size: 9px;
}

.listing-amenities {
  display: flex;
  gap: 5px;
  margin: -3px 0 9px;
  overflow: hidden;
}

.listing-amenities span {
  flex: 0 0 auto;
  padding: 3px 6px;
  border: 1px solid #d8e2dc;
  border-radius: 5px;
  color: var(--sage-dark);
  font-size: 8px;
}

.listing-amenities .pending {
  color: #8b9692;
  border-style: dashed;
}

.price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.price-row strong {
  color: var(--orange);
  font-size: 17px;
}

.price-row strong small {
  font-size: 9px;
  font-weight: 500;
}

.price-row em {
  color: #8b9692;
  font-size: 9px;
  font-style: normal;
}

.simple-header {
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(38,61,56,0.08);
}

.compare-content {
  padding-top: 6px;
}

.community-comparison {
  margin-top: 18px;
}

.community-comparison + .community-comparison {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.comparison-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.comparison-title span {
  color: var(--orange);
  font-size: 9px;
  font-weight: 700;
}

.comparison-title h2 {
  margin: 3px 0 0;
  font-family: "SimSun", serif;
  font-size: 20px;
}

.comparison-title > strong {
  color: var(--ink-soft);
  font-size: 10px;
}

.compare-community-name {
  display: block;
  margin: 3px 0;
  color: var(--ink-soft);
  font-size: 8px;
}

.community-selector {
  display: flex;
  gap: 9px;
  margin: 10px 0 18px;
}

.compare-toolbar,
.house-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.compare-toolbar {
  margin-top: 16px;
}

.compare-toolbar span,
.house-picker-head span {
  display: block;
  margin-bottom: 4px;
  color: var(--orange);
  font-size: 9px;
  font-weight: 700;
}

.compare-toolbar strong,
.house-picker-head strong {
  font-size: 13px;
}

.compare-toolbar button {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 9px;
}

.compare-selection-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.selection-stat {
  padding: 11px 12px;
  border-radius: 12px;
  background: #edf2ef;
}

.selection-stat span {
  display: block;
  margin-bottom: 4px;
  color: var(--ink-soft);
  font-size: 8px;
}

.selection-stat strong {
  color: var(--sage-dark);
  font-size: 17px;
}

.selection-stat strong small {
  margin-left: 3px;
  font-size: 9px;
}

.community-chip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  padding-right: 7px;
}

.community-chip .community-name {
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font-size: inherit;
}

.community-chip .remove-community {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: inherit;
  background: rgba(255, 255, 255, 0.15);
  font-size: 14px;
  line-height: 20px;
}

.community-chip:not(.active) .remove-community {
  background: #ecece6;
}

.community-count {
  opacity: 0.72;
  font-size: 8px;
}

.house-picker {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
}

.house-picker-head {
  margin-bottom: 12px;
}

.house-picker-head em {
  color: var(--ink-soft);
  font-size: 9px;
  font-style: normal;
}

.house-choice-list {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}

.house-choice {
  display: grid;
  grid-template-columns: 20px 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid #e7e7e0;
  border-radius: 12px;
  background: #faf9f5;
  cursor: pointer;
}

.house-choice-photo {
  width: 58px;
  height: 47px;
  object-fit: cover;
  border-radius: 8px;
  background: #e2e6e2;
}

.house-choice-placeholder {
  display: grid;
  place-items: center;
  width: 58px;
  height: 47px;
  border-radius: 8px;
  color: var(--sage-dark);
  background: #e2e6e2;
  font-size: 17px;
}

.house-choice.selected {
  border-color: var(--sage-dark);
  background: #edf2ef;
}

.house-choice input {
  accent-color: var(--sage-dark);
}

.house-choice b {
  display: block;
  margin-bottom: 4px;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.house-choice small {
  color: var(--ink-soft);
  font-size: 8px;
}

.house-choice strong {
  color: var(--orange);
  font-size: 11px;
}

.compare-hint {
  margin: 10px 0 0;
  color: #8a9691;
  font-size: 9px;
  line-height: 1.6;
}

.insight-card {
  margin-bottom: 16px;
  padding: 17px;
  border-radius: 18px;
  color: #eff5f1;
  background: var(--ink);
}

.insight-card span {
  color: #b9cbc4;
  font-size: 10px;
}

.insight-card p {
  margin: 7px 0 0;
  font-size: 13px;
  line-height: 1.7;
}

.comparison-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
}

.comparison-head,
.comparison-row {
  display: grid;
  grid-template-columns: 94px repeat(var(--compare-count), 150px);
}

.comparison-scroll {
  overflow-x: auto;
  scrollbar-color: var(--sage) #ecece6;
}

.comparison-head {
  min-width: max-content;
  color: var(--paper);
  background: var(--sage-dark);
}

.comparison-head > div,
.comparison-row > div {
  padding: 13px 10px;
  border-right: 1px solid rgba(222,222,214,0.7);
  font-size: 11px;
  line-height: 1.55;
  word-break: break-word;
}

.comparison-head > div {
  min-width: 112px;
  font-weight: 700;
}

.comparison-house-head {
  position: relative;
  cursor: pointer;
}

.comparison-house-head:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: -3px;
}

.remove-comparison-button {
  position: absolute;
  top: 17px;
  right: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(38, 61, 56, 0.18);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.remove-comparison-button:hover,
.remove-comparison-button:focus-visible {
  color: var(--paper);
  background: var(--orange);
  border-color: var(--orange);
  outline: none;
}

.comparison-head > div:first-child,
.comparison-row > div:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 94px;
  box-shadow: 5px 0 10px rgba(38, 61, 56, 0.05);
}

.comparison-head > div:first-child {
  background: var(--sage-dark);
}

.comparison-row {
  min-width: max-content;
  border-bottom: 1px solid var(--line);
}

.comparison-row:last-child {
  border-bottom: 0;
}

.comparison-row:nth-child(odd) > div:not(:first-child) {
  background: #faf9f5;
}

.comparison-row > div:first-child {
  color: var(--ink-soft);
  background: #f4f2ec;
  font-size: 10px;
  font-weight: 700;
}

.comparison-row > div:not(:first-child) {
  min-width: 112px;
  background: var(--paper);
}

.best-value {
  color: var(--orange);
  font-weight: 800;
}

.comparison-head small {
  display: block;
  color: #d7e3dc;
  font-size: 9px;
  font-weight: 400;
}

.view-house-detail {
  display: block;
  margin-top: 6px;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  opacity: 0.88;
}

.comparison-label-button {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: inherit;
  text-align: left;
  cursor: pointer;
}

.comparison-label-button span {
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border: 1px solid #9eaaa5;
  border-radius: 50%;
  font-size: 9px;
  line-height: 1;
}

.explainable-value {
  cursor: pointer;
  text-decoration: underline dotted #9eaaa5;
  text-underline-offset: 3px;
}

.explainable-value:hover,
.explainable-value:focus-visible {
  background: #edf2ef !important;
  outline: none;
}

.compare-head-photo,
.compare-head-placeholder {
  display: block;
  width: 100%;
  height: 76px;
  margin-bottom: 8px;
  border-radius: 9px;
}

.compare-head-photo {
  object-fit: cover;
}

.compare-head-placeholder {
  color: var(--sage-dark);
  background: #dce5e0;
  font-size: 23px;
  line-height: 76px;
  text-align: center;
}

.empty-state {
  padding: 70px 20px;
  text-align: center;
  color: var(--ink-soft);
}

.empty-state h3 {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 16px;
}

.empty-state p {
  font-size: 12px;
  line-height: 1.7;
}

.empty-mark {
  width: 58px;
  height: 58px;
  margin: 0 auto 16px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--orange);
  font-size: 28px;
  line-height: 58px;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 38px 22px 27px;
}

.profile-header h1 {
  font-size: 23px;
}

.profile-header p:last-child {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 10px;
}

.avatar {
  width: 55px;
  height: 55px;
  border-radius: 18px;
  color: var(--paper);
  background: var(--ink);
  font-family: "SimSun", serif;
  font-size: 23px;
  line-height: 55px;
  text-align: center;
}

.profile-content {
  display: grid;
  gap: 13px;
}

.profile-overview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.profile-overview button {
  padding: 13px 4px;
  border: 1px solid rgba(38, 61, 56, 0.08);
  border-radius: 15px;
  color: var(--ink);
  background: var(--paper);
}

.profile-overview strong,
.profile-overview span {
  display: block;
}

.profile-overview strong {
  margin-bottom: 4px;
  color: var(--orange);
  font-size: 19px;
}

.profile-overview span {
  color: var(--ink-soft);
  font-size: 9px;
}

.preference-card,
.profile-section,
.profile-menu,
.safety-note {
  padding: 20px;
  border: 1px solid rgba(38, 61, 56, 0.08);
  border-radius: 20px;
  background: var(--paper);
}

.preference-card h2 {
  margin: 0;
  font-size: 16px;
}

.profile-section {
  padding: 15px 17px 5px;
}

.profile-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 2px 10px;
}

.profile-section-title span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.profile-section-title small {
  color: #909995;
  font-size: 8px;
}

.outline-button {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-size: 10px;
}

.preference-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}

.preference-tags span {
  padding: 6px 9px;
  border-radius: 8px;
  color: var(--sage-dark);
  background: #edf2ef;
  font-size: 10px;
}

.profile-menu {
  padding: 0;
  border: 0;
  border-radius: 0;
}

.profile-menu button {
  display: grid;
  grid-template-columns: 28px 1fr auto 10px;
  align-items: center;
  width: 100%;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid #ecebe6;
  background: transparent;
  text-align: left;
}

.profile-menu button:last-child {
  border-bottom: 0;
}

.profile-menu b {
  font-size: 13px;
}

.profile-menu em {
  max-width: 130px;
  overflow: hidden;
  color: #909995;
  font-size: 9px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-menu i {
  color: #909995;
  font-style: normal;
}

.safety-note {
  border-color: #f0d3c3;
  background: #fff7f1;
}

.safety-note strong {
  color: var(--orange);
  font-size: 12px;
}

.safety-note p {
  margin: 7px 0 0;
  color: #735b4f;
  font-size: 11px;
  line-height: 1.7;
}

.bottom-nav {
  position: fixed;
  z-index: 20;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(100%, 520px);
  height: 72px;
  margin: auto;
  padding: 8px 14px 10px;
  border-top: 1px solid rgba(38,61,56,0.09);
  background: rgba(255,253,249,0.94);
  backdrop-filter: blur(18px);
}

.nav-item {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 2px;
  border: 0;
  background: transparent;
  color: #8c9692;
}

.nav-item span {
  font-size: 20px;
  line-height: 1;
}

.nav-item b {
  font-size: 10px;
  font-weight: 500;
}

.nav-item.active {
  color: var(--ink);
}

.nav-item.active b {
  font-weight: 800;
}

.nav-count-badge {
  position: absolute;
  top: 0;
  left: calc(50% + 8px);
  display: grid;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  place-items: center;
  border: 2px solid #fffdf9;
  border-radius: 999px;
  background: #ef6b43;
  color: white;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(239, 107, 67, 0.28);
}

.sheet-backdrop {
  position: fixed;
  z-index: 30;
  inset: 0;
  background: rgba(26, 37, 34, 0.42);
  backdrop-filter: blur(2px);
}

.detail-sheet {
  position: fixed;
  z-index: 31;
  right: 0;
  bottom: 0;
  left: 0;
  width: min(100%, 520px);
  max-height: 88vh;
  margin: auto;
  padding: 9px 20px 28px;
  overflow-y: auto;
  border-radius: 28px 28px 0 0;
  background: var(--paper);
  transform: translateY(105%);
  transition: transform 0.3s ease;
}

.detail-sheet.open {
  transform: translateY(0);
}

.calculation-guide h3 {
  margin-top: 20px;
}

.formula-box {
  margin-top: 9px;
  padding: 13px 14px;
  border-left: 3px solid var(--orange);
  border-radius: 9px;
  color: var(--ink);
  background: #f4f2ec;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.7;
}

.calculation-note {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 10px;
  color: #735b4f;
  background: #fff3eb;
  font-size: 11px;
  line-height: 1.7;
}

.route-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
  margin-top: 18px;
}

.route-summary-grid > div {
  padding: 13px;
  border-radius: 12px;
  background: #edf2ef;
}

.route-summary-grid span {
  display: block;
  margin-bottom: 5px;
  color: var(--ink-soft);
  font-size: 9px;
}

.route-summary-grid strong {
  color: var(--sage-dark);
  font-size: 13px;
}

.route-map {
  margin: 14px 0 4px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #e8eeeb;
}

.route-map img {
  display: block;
  width: 100%;
  min-height: 180px;
  object-fit: cover;
  background: #e8eeeb;
}

.route-map figcaption {
  display: flex;
  justify-content: space-between;
  padding: 9px 12px;
  color: var(--ink-soft);
  background: var(--paper);
  font-size: 9px;
}

.route-step-list {
  display: grid;
  gap: 10px;
  margin-top: 11px;
}

.route-step {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  align-items: start;
}

.route-step > b {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  color: var(--paper);
  background: var(--sage-dark);
  font-size: 10px;
}

.route-step strong {
  font-size: 12px;
}

.route-step p,
.route-source-note p {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.6;
}

.sheet-handle {
  width: 42px;
  height: 4px;
  margin: 2px auto 17px;
  border-radius: 999px;
  background: var(--line);
}

.sheet-title-row {
  display: flex;
  justify-content: space-between;
  gap: 15px;
}

.sheet-title-row h2 {
  margin-bottom: 6px;
  font-family: "SimSun", serif;
  font-size: 23px;
}

.sheet-title-row p {
  color: var(--ink-soft);
  font-size: 11px;
}

.close-sheet {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  font-size: 20px;
}

.detail-price {
  margin: 15px 0;
  color: var(--orange);
  font-size: 28px;
  font-weight: 800;
}

.detail-price small {
  font-size: 11px;
}

.cost-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

.cost-grid div {
  padding: 13px;
  border-radius: 13px;
  background: #f3f3ee;
}

.cost-grid span {
  display: block;
  margin-bottom: 5px;
  color: var(--ink-soft);
  font-size: 9px;
}

.cost-grid strong {
  font-size: 14px;
}

.detail-section {
  margin-top: 20px;
}

.detail-section h3 {
  margin-bottom: 10px;
  font-size: 14px;
}

.detail-section p {
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.8;
}

.roommate-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.amenity-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.amenity-facts span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: #929b97;
  font-size: 9px;
}

.amenity-facts span.confirmed {
  border-style: solid;
  color: var(--sage-dark);
  background: #edf2ef;
}

.amenity-facts span.absent {
  border-style: solid;
  color: #a25546;
  background: #fff2ed;
}

.amenity-facts b {
  color: var(--ink);
  font-size: 10px;
}

.comparison-row.comparison-different > div {
  background: #fff9e8;
}

.comparison-row.comparison-different > div:first-child {
  color: #8a5d12;
  font-weight: 700;
}

.difference-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 4px;
  border-radius: 50%;
  background: #e29b35;
  vertical-align: middle;
}

.amenity-comparison {
  display: inline-flex;
  min-width: 42px;
  justify-content: center;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
}

.amenity-yes {
  color: #315e4c;
  background: #e6f1eb;
}

.amenity-no {
  color: #a14e3e;
  background: #fdebe5;
}

.amenity-unknown {
  color: #856a37;
  background: #fff3d7;
}

.amenity-summary-common,
.amenity-summary-muted {
  display: block;
  line-height: 1.65;
}

.amenity-summary-common {
  color: var(--sage-dark);
  font-weight: 700;
}

.amenity-summary-muted {
  color: #8d9692;
}

.amenity-summary-line {
  display: block;
  margin: 3px 0;
  padding: 5px 7px;
  border-radius: 7px;
  font-size: 9px;
  line-height: 1.55;
}

.amenity-summary-line b {
  margin-right: 5px;
}

.cost-exclusion-note {
  color: #a45b3f !important;
  font-weight: 700;
  line-height: 1.65;
}

.profile-listing-list,
.data-management-list,
.safety-checklist {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.profile-listing-row {
  display: grid;
  grid-template-columns: 56px 1fr 10px;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--paper);
  text-align: left;
}

.profile-listing-row img,
.profile-listing-placeholder {
  width: 56px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
}

.profile-listing-placeholder {
  color: var(--sage-dark);
  background: #e5ece8;
  line-height: 48px;
  text-align: center;
}

.profile-listing-row strong,
.profile-listing-row small {
  display: block;
}

.profile-listing-row strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-listing-row small {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 8px;
}

.profile-listing-row i {
  color: #919b96;
  font-style: normal;
}

.profile-sheet-empty {
  padding: 45px 10px;
  color: var(--ink-soft);
  font-size: 11px;
  text-align: center;
}

.safety-checklist p {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.safety-checklist b,
.safety-checklist span {
  display: block;
}

.safety-checklist b {
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 11px;
}

.safety-checklist span {
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.65;
}

.data-management-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: var(--paper);
  text-align: left;
}

.data-management-list b {
  font-size: 10px;
}

.data-management-list span {
  color: var(--ink-soft);
  font-size: 8px;
}

.data-management-list button.danger {
  color: #a34e3d;
  border-color: #ecc8bc;
  background: #fff5f1;
}

.roommate-facts span {
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink-soft);
  font-size: 10px;
}

.sheet-actions {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 10px;
  margin-top: 23px;
}

.sheet-actions button {
  height: 48px;
  border-radius: 14px;
  font-weight: 700;
}

.sheet-actions.three-actions {
  grid-template-columns: repeat(3, 1fr);
}

.sheet-actions.three-actions button {
  padding: 0 6px;
  font-size: 10px;
}

.sheet-actions button:first-child {
  border: 1px solid var(--ink);
  background: transparent;
}

.sheet-actions button:last-child {
  border: 0;
  color: var(--paper);
  background: var(--ink);
}

.source-link {
  color: var(--orange);
  font-size: 11px;
  text-decoration: none;
}

.toast {
  position: fixed;
  z-index: 40;
  right: 0;
  bottom: 90px;
  left: 0;
  width: max-content;
  max-width: calc(100% - 40px);
  margin: auto;
  padding: 10px 15px;
  border-radius: 999px;
  color: var(--paper);
  background: rgba(38,61,56,0.93);
  font-size: 11px;
  box-shadow: var(--shadow);
}

.hidden {
  display: none !important;
}

@media (min-width: 700px) {
  body {
    padding: 24px 0;
  }

  .app-shell {
    min-height: calc(100vh - 48px);
    border-radius: 28px;
  }

  .page {
    min-height: calc(100vh - 48px);
  }

  .bottom-nav {
    bottom: 24px;
    border-radius: 0 0 28px 28px;
  }
}
