:root {
  --site-bg: #F5F2EB;
  --site-fg: #1D2924;
  --site-accent: #0F6B55;
  --site-on-accent: #FFFDF7;
  --site-surface: #FFFDF8;
  --site-muted: #6E7772;
  --site-border: #E2DCCF;
  --site-font: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --site-radius: 14px;
  --site-space: 1;
  --site-type: 1;
  --site-motion: 1;

  --ink: var(--site-fg);
  --muted: var(--site-muted);
  --line: var(--site-border);
  --surface: var(--site-surface);
  --accent: var(--site-accent);
  --accent-soft: #E7F0EB;
  --gold: #A9781F;
  --gold-soft: #F7EDDA;
  --rented: #9AA09C;
  --fee-red: #C2352B;
  --layout-studio: #2F6E8F;
  --layout-one: #C2352B;
  --layout-two: #A9781F;
  --layout-shop: #6E4B8E;
  --shadow: 0 1px 0 rgba(29, 41, 36, .04), 0 8px 24px rgba(29, 41, 36, .05);
  --serif: "Songti SC", "STSong", "Noto Serif SC", Georgia, serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(15, 107, 85, .07), transparent 42%),
    radial-gradient(circle at 92% 8%, rgba(169, 120, 31, .07), transparent 36%),
    var(--site-bg);
  color: var(--ink);
  font-family: var(--site-font);
  font-size: calc(16px * var(--site-type));
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: calc(20px * var(--site-space)) calc(18px * var(--site-space)) calc(48px * var(--site-space));
}

/* ---------- Hero ---------- */

.hero {
  padding: calc(8px * var(--site-space)) 0 calc(18px * var(--site-space));
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: calc(13px * var(--site-type));
  letter-spacing: .04em;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: .02em;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--site-on-accent);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1;
}

.today { font-variant-numeric: tabular-nums; }

.hero-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.weather {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.weather[hidden] { display: none; }

.weather-icon {
  display: inline-flex;
  width: 32px;
  height: 32px;
  color: var(--accent);
}

.weather-icon svg { width: 100%; height: 100%; }

.weather-main {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.35;
}

.weather-label {
  font-size: calc(17px * var(--site-type));
  font-weight: 600;
  letter-spacing: .04em;
}

.weather-text {
  font-size: calc(14px * var(--site-type));
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.h1-date {
  font-size: .48em;
  font-weight: 700;
  color: var(--fee-red);
  letter-spacing: 0;
  white-space: nowrap;
}

.hero-main {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-top: calc(22px * var(--site-space));
}

h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: calc(38px * var(--site-type));
  line-height: 1.15;
  letter-spacing: .02em;
}

.lede {
  margin: 10px 0 0;
  max-width: 34em;
  color: var(--muted);
  font-size: calc(14px * var(--site-type));
}

.share {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: calc(13px * var(--site-type));
  cursor: pointer;
  transition: border-color calc(180ms * var(--site-motion)), transform calc(180ms * var(--site-motion));
}

.share:hover { border-color: var(--accent); }
.share:active { transform: scale(.97); }
.share svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: calc(22px * var(--site-space));
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--site-radius);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  box-shadow: var(--shadow);
}

.summary-item {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: calc(13px * var(--site-type));
  color: var(--muted);
}

.summary-item strong {
  font-family: var(--serif);
  font-size: calc(22px * var(--site-type));
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.summary-item--vacant strong { color: var(--accent); }
.summary-item--reserved strong { color: var(--gold); }

.legend {
  display: flex;
  gap: 18px;
  margin-top: 12px;
  color: var(--muted);
  font-size: calc(12.5px * var(--site-type));
}

.legend-item { display: inline-flex; align-items: center; gap: 6px; }

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.dot--vacant { background: var(--accent); }
.dot--reserved { background: var(--gold); }
.dot--rented { background: var(--rented); }

/* ---------- Locations ---------- */

.locations {
  margin: calc(20px * var(--site-space)) 0 calc(8px * var(--site-space));
}

.loc-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.loc-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: calc(19px * var(--site-type));
  font-weight: 600;
  letter-spacing: .02em;
}

.loc-hint {
  color: var(--muted);
  font-size: calc(11.5px * var(--site-type));
}

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

.loc-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: var(--site-radius);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  box-shadow: var(--shadow);
}

.loc-name {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: calc(13.5px * var(--site-type));
  font-weight: 600;
}

.loc-name::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50% 50% 50% 0;
  background: var(--accent);
  transform: rotate(-45deg);
}

.loc-addr {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: calc(11.5px * var(--site-type));
  line-height: 1.5;
}

.loc-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}

.loc-map {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--site-on-accent);
  font-size: calc(11.5px * var(--site-type));
  text-decoration: none;
  transition: opacity calc(180ms * var(--site-motion));
}

.loc-map:hover { opacity: .9; }

.loc-map--amap { background: #1769C2; }
.loc-map--amap:hover { opacity: .92; }

.loc-map--baidu { background: #D6457B; }
.loc-map--baidu:hover { opacity: .92; }

.loc-copy {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: calc(11px * var(--site-type));
  cursor: pointer;
  transition: color calc(180ms * var(--site-motion)), border-color calc(180ms * var(--site-motion));
}

.loc-copy:hover { color: var(--ink); border-color: var(--accent); }

.loc-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: calc(11px * var(--site-type));
}

/* ---------- Sticky filter bar ---------- */

.sticky-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(10px * var(--site-space)) 0;
  background: color-mix(in srgb, var(--site-bg) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
  flex: 1;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  flex: none;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: calc(13.5px * var(--site-type));
  white-space: nowrap;
  cursor: pointer;
  transition: background calc(180ms * var(--site-motion)), color calc(180ms * var(--site-motion)), border-color calc(180ms * var(--site-motion));
}

.tab:hover { border-color: var(--accent); color: var(--ink); }

.tab[aria-selected="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--site-on-accent);
}

.tab .tab-count {
  margin-left: 5px;
  opacity: .72;
  font-variant-numeric: tabular-nums;
}

.filter {
  flex: none;
  padding: 8px 12px;
  border: 1px dashed color-mix(in srgb, var(--muted) 50%, transparent);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: calc(12.5px * var(--site-type));
  cursor: pointer;
  transition: all calc(180ms * var(--site-motion));
}

.filter[aria-pressed="true"] {
  border-style: solid;
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

@media (max-width: 560px) {
  .filter { display: none; }
  .filter--expand { display: inline-flex; align-items: center; }
}

/* ---------- Board ---------- */

.board { min-height: 40vh; }

.building {
  margin-top: calc(28px * var(--site-space));
}

.building-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.building-name {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
  font-family: var(--serif);
  font-size: calc(24px * var(--site-type));
  font-weight: 600;
  letter-spacing: .02em;
}

.building-name .tag {
  font-family: var(--site-font);
  font-size: calc(11.5px * var(--site-type));
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  letter-spacing: .04em;
}

.building-meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: calc(12.5px * var(--site-type));
  font-weight: 600;
}
.building-meta .meta-num {
  color: var(--fee-red);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.building-count {
  flex: none;
  text-align: right;
  white-space: nowrap;
  color: var(--muted);
  font-size: calc(12.5px * var(--site-type));
}
.building-count strong {
  display: block;
  font-family: var(--serif);
  font-size: calc(26px * var(--site-type));
  color: var(--accent);
  font-weight: 600;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.floor-group { margin-top: calc(18px * var(--site-space)); }

.floor-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: calc(12px * var(--site-type));
  letter-spacing: .08em;
}

.floor-label::after {
  content: "";
  height: 1px;
  flex: 1;
  background: color-mix(in srgb, var(--line) 80%, transparent);
}

.rooms {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 10px;
}

.room {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 118px;
  padding: 13px 13px 12px;
  border: 1px solid var(--line);
  border-radius: var(--site-radius);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(29, 41, 36, .03);
  transition: transform calc(180ms * var(--site-motion)), box-shadow calc(180ms * var(--site-motion)), border-color calc(180ms * var(--site-motion));
}

.room::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  border-radius: var(--site-radius) 0 0 var(--site-radius);
  background: var(--rented);
  opacity: .55;
}

.room--vacant::before { background: var(--accent); opacity: 1; }
.room--reserved::before { background: var(--gold); opacity: 1; }

.room--vacant:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: 0 10px 26px rgba(15, 107, 85, .10);
}

.room--rented {
  background: color-mix(in srgb, var(--surface) 55%, var(--site-bg));
  color: var(--muted);
}
.room--rented .room-no { color: var(--muted); }
.room--rented .room-price { color: var(--muted); font-size: calc(14px * var(--site-type)); font-weight: 500; }

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

.room-no {
  font-family: var(--serif);
  font-size: calc(21px * var(--site-type));
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.badge {
  flex: none;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: calc(10.5px * var(--site-type));
  letter-spacing: .04em;
  line-height: 1.6;
}
.badge--vacant { background: var(--accent-soft); color: var(--accent); }
.badge--reserved { background: var(--gold-soft); color: var(--gold); }
.badge--rented { background: #ECEBE7; color: var(--rented); }

.room-layout {
  color: var(--muted);
  font-size: calc(12.5px * var(--site-type));
  min-height: 1.4em;
}
.room-layout--studio,
.room-layout--one,
.room-layout--two,
.room-layout--shop {
  font-weight: 700;
}
.room-layout--studio { color: var(--layout-studio); }
.room-layout--one { color: var(--layout-one); }
.room-layout--two { color: var(--layout-two); }
.room-layout--shop { color: var(--layout-shop); }

.room-price {
  margin-top: auto;
  font-family: var(--serif);
  font-size: calc(20px * var(--site-type));
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.room-price .unit {
  font-family: var(--site-font);
  font-size: calc(11px * var(--site-type));
  font-weight: 400;
  color: var(--muted);
  margin-left: 2px;
}

.room-video {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  color: var(--accent);
  font-size: calc(12px * var(--site-type));
  text-decoration: none;
}
.room-video::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 7px solid currentColor;
  border-top: 4.5px solid transparent;
  border-bottom: 4.5px solid transparent;
}
.room-video:hover { text-decoration: underline; }

.room-video-flag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  color: var(--accent);
  font-size: calc(11.5px * var(--site-type));
}
.room-video-flag::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 7px solid currentColor;
  border-top: 4.5px solid transparent;
  border-bottom: 4.5px solid transparent;
}

/* ---------- States ---------- */

.loading, .empty, .error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 70px 20px;
  color: var(--muted);
  font-size: calc(14px * var(--site-type));
  text-align: center;
}

.error strong { color: var(--ink); }

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.local-note {
  margin: 12px 0 0;
  padding: 8px 12px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

/* ---------- Footer ---------- */

.footer {
  margin-top: calc(46px * var(--site-space));
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: calc(12px * var(--site-type));
  text-align: center;
}
.footer-title {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: calc(16px * var(--site-type));
  font-weight: 700;
  color: var(--fee-red);
}
.footer p { margin: 0 0 6px; }
.footer-updated { opacity: .8; margin-top: 10px; }
.footer-admin { margin-top: 4px !important; }
.footer-admin a {
  color: var(--muted);
  font-size: calc(11px * var(--site-type));
  text-decoration: none;
  border-bottom: 1px dotted var(--line);
  padding-bottom: 1px;
}
.footer-admin a:hover { color: var(--accent); border-color: var(--accent); }

.noscript {
  padding: 20px;
  text-align: center;
  background: #FFF3CD;
}

/* ---------- Room dialog ---------- */

.room-dialog {
  width: min(440px, calc(100vw - 24px));
  max-height: calc(100vh - 48px);
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: calc(var(--site-radius) + 4px);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(29, 41, 36, .22);
  overflow: auto;
}
.room-dialog::backdrop { background: rgba(24, 34, 29, .45); }
.rd-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.rd-building { margin: 0 0 2px; color: var(--muted); font-size: calc(12.5px * var(--site-type)); letter-spacing: .04em; }
.rd-title {
  margin: 0;
  font-family: var(--serif);
  font-size: calc(30px * var(--site-type));
  font-weight: 600;
}
.rd-close {
  flex: none;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--site-bg);
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.rd-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rd-tag {
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: calc(12px * var(--site-type));
}
.rd-tag--vacant { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); background: var(--accent-soft); }
.rd-tag--reserved { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 35%, var(--line)); background: var(--gold-soft); }
.rd-price {
  margin-top: 14px;
  font-family: var(--serif);
  font-size: calc(26px * var(--site-type));
  font-weight: 600;
  color: var(--accent);
}
.rd-price .unit { margin-left: 3px; font-family: var(--site-font); font-size: calc(13px * var(--site-type)); font-weight: 400; color: var(--muted); }
.rd-fees {
  margin-top: 14px;
  padding: 10px 12px 11px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 60%, var(--site-bg));
}
.rd-fees[hidden] { display: none; }
.rd-fees-title {
  margin: 0 0 6px;
  font-size: calc(11.5px * var(--site-type));
  letter-spacing: .08em;
  color: var(--muted);
}
.rd-fees-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 18px;
  margin: 0;
}
.rd-fee {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: calc(12.5px * var(--site-type));
}
.rd-fee:last-child { grid-column: 1 / -1; }
.rd-fee dt { margin: 0; color: var(--muted); white-space: nowrap; }
.rd-fee dd { margin: 0; color: var(--ink); font-weight: 600; text-align: right; }
.rd-fee dd .meta-num { color: var(--fee-red); font-weight: 700; }
@media (max-width: 420px) {
  .rd-fees-list { grid-template-columns: 1fr; }
}
.rd-media { margin-top: 14px; }
.rd-media video {
  display: block;
  width: 100%;
  max-height: 60vh;
  border-radius: var(--site-radius);
  background: #101714;
  /* 保留微信 / iOS 的原生长按菜单，避免被当成 App 界面屏蔽 */
  -webkit-touch-callout: default;
  -webkit-user-select: auto;
  user-select: auto;
}
.rd-video-wrap { position: relative; }
.rd-video-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--site-radius);
  background: #101714;
  color: #E8E4D9;
  font-size: calc(12px * var(--site-type));
  pointer-events: none;
}
.rd-video-loading.is-error { color: #F3C6C0; }
.rd-video-actions { display: flex; gap: 8px; margin-top: 10px; }
.rd-btn {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--site-bg);
  color: var(--ink);
  font-family: inherit;
  font-size: calc(13px * var(--site-type));
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.rd-btn:active { transform: scale(.98); }
.rd-btn--primary { background: var(--accent); border-color: var(--accent); color: var(--site-on-accent); }
.rd-video-hint { margin: 8px 0 0; color: var(--muted); font-size: calc(11.5px * var(--site-type)); line-height: 1.55; }
.rd-video-tip {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px dashed color-mix(in srgb, var(--accent) 40%, var(--line));
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--ink);
  font-size: calc(12.5px * var(--site-type));
  line-height: 1.7;
  word-break: break-all;
}
.rd-video-tip b { font-weight: 700; }
.rd-video-tip a { color: var(--accent); font-weight: 600; }
.rd-video-fallback {
  display: inline-block;
  margin-top: 8px;
  color: var(--muted);
  font-size: calc(11.5px * var(--site-type));
}
.rd-placeholder {
  padding: 30px 16px;
  border: 1px dashed var(--line);
  border-radius: var(--site-radius);
  color: var(--muted);
  font-size: calc(13px * var(--site-type));
  text-align: center;
  background: var(--site-bg);
}
.rd-link {
  display: inline-block;
  margin-top: 4px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--site-on-accent);
  font-size: calc(14px * var(--site-type));
  text-decoration: none;
}
.rd-note { margin: 12px 0 0; color: var(--muted); font-size: calc(11.5px * var(--site-type)); }

/* ---------- 带客看房 / 门锁密码 ---------- */

.rd-viewing {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: var(--site-radius);
  background: linear-gradient(180deg, #F1F7F3, #FBFDFB);
}
.rd-viewing[hidden] { display: none; }
.rd-viewing-title {
  margin: 0;
  font-family: var(--serif);
  font-size: calc(17px * var(--site-type));
  font-weight: 600;
}
.rd-viewing-hint {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: calc(12px * var(--site-type));
  line-height: 1.6;
}
.rd-viewing-form { display: grid; gap: 10px; margin-top: 12px; }
.rd-viewing-form[hidden] { display: none; }
.rd-field { display: grid; gap: 5px; }
.rd-field > span {
  color: var(--muted);
  font-size: calc(12px * var(--site-type));
  font-weight: 600;
}
.rd-field select,
.rd-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #FFFDF8;
  color: var(--ink);
  font-family: inherit;
  font-size: calc(14px * var(--site-type));
}
.rd-field select:focus,
.rd-field input:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 30%, transparent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.rd-viewing-submit { width: 100%; }
.rd-btn[disabled] { opacity: .6; cursor: default; }
.rd-viewing-note {
  margin: 0;
  color: var(--muted);
  font-size: calc(11px * var(--site-type));
  line-height: 1.55;
}
.rd-viewing-msg {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #FDECEA;
  color: #A0352A;
  font-size: calc(12px * var(--site-type));
  line-height: 1.5;
}
.rd-viewing-msg[hidden] { display: none; }
.rd-code { margin-top: 12px; text-align: center; }
.rd-code[hidden] { display: none; }
.rd-code-main {
  padding: 14px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--site-on-accent);
}
.rd-code-main span {
  display: block;
  font-size: calc(11.5px * var(--site-type));
  letter-spacing: .18em;
  opacity: .72;
}
.rd-code-main strong {
  display: block;
  margin: 6px 0 4px;
  font-size: calc(40px * var(--site-type));
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1.1;
}
.rd-code-main em {
  display: block;
  font-style: normal;
  font-size: calc(11px * var(--site-type));
  opacity: .68;
}
.rd-code-actions { display: flex; gap: 8px; margin-top: 8px; }
.rd-code-image-wrap { margin-top: 12px; }
.rd-code-image-wrap[hidden] { display: none; }
.rd-code-image {
  display: block;
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(15, 107, 85, .18);
}
.rd-code-tip {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: calc(11px * var(--site-type));
  line-height: 1.55;
}

button.room {
  font: inherit;
  color: inherit;
  text-align: left;
  width: 100%;
  cursor: pointer;
}
button.room:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 560px) {
  .page { padding-left: 14px; padding-right: 14px; }
  h1 { font-size: calc(32px * var(--site-type)); }
  .h1-date { display: block; margin-top: 2px; }
  .hero-main { align-items: flex-start; }
  .share span { display: none; }
  .share { padding: 9px; }
  .rooms { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .room { min-height: 112px; padding: 12px 12px 11px; }
  .summary { gap: 8px 18px; }
  .summary-item strong { font-size: calc(20px * var(--site-type)); }
  .building-name { font-size: calc(21px * var(--site-type)); }
  .building-count strong { font-size: calc(23px * var(--site-type)); }
  .loc-hint { display: none; }
  .loc-list {
    display: flex;
    gap: 9px;
    overflow-x: auto;
    margin: 0 -14px;
    padding: 0 14px 6px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .loc-list::-webkit-scrollbar { display: none; }
  .loc-card { flex: 0 0 78%; scroll-snap-align: start; }
  .loc-note { margin-top: 4px; }
}

/* ---------- Owner edit page ---------- */

.edit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0 18px;
}

.edit-back {
  color: var(--muted);
  font-size: calc(13px * var(--site-type));
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.edit-back:hover { color: var(--accent); border-color: var(--accent); }

.eyebrow {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: calc(11.5px * var(--site-type));
  letter-spacing: .12em;
}

.login-card {
  max-width: 520px;
  margin: calc(28px * var(--site-space)) auto 0;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: calc(var(--site-radius) + 6px);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-card h1,
.editor h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: calc(30px * var(--site-type));
  font-weight: 600;
}

.login-lede {
  margin: 10px 0 20px;
  color: var(--muted);
  font-size: calc(13px * var(--site-type));
  line-height: 1.6;
}

/* Shown only when the page is opened inside another host (preview panel). */
.login-help {
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: calc(12px * var(--site-type));
  line-height: 1.6;
}
.login-help a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}

.field-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: calc(12px * var(--site-type));
}

.field-row { display: flex; gap: 8px; }

.field {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--site-bg);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}
.field:focus { outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 1px; border-color: var(--accent); }

.field-wrap {
  position: relative;
  display: flex;
  flex: 1;
  min-width: 0;
}
.field-wrap .field { padding-right: 44px; }

.field-reveal {
  position: absolute;
  top: 50%;
  right: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transform: translateY(-50%);
  transition: color calc(180ms * var(--site-motion)), background-color calc(180ms * var(--site-motion));
}
.field-reveal:hover { color: var(--ink); background: color-mix(in srgb, var(--line) 40%, transparent); }
.field-reveal:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 1px; }
.field-reveal svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.field-reveal-slash { opacity: .55; }
.field-reveal.is-on { color: var(--accent); }
.field-reveal.is-on .field-reveal-slash { opacity: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: calc(13px * var(--site-type));
  white-space: nowrap;
  cursor: pointer;
  transition: opacity calc(180ms * var(--site-motion)), border-color calc(180ms * var(--site-motion));
}
.btn-primary { background: var(--accent); color: var(--site-on-accent); }
.btn-primary:hover:not(:disabled) { opacity: .92; }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.btn-ghost:hover { border-color: var(--accent); color: var(--ink); }

.check {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  color: var(--muted);
  font-size: calc(12px * var(--site-type));
}

.form-msg {
  min-height: 1.4em;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: calc(12px * var(--site-type));
}
.form-msg.is-error { color: #B42318; }
.form-msg.is-ok { color: var(--accent); }

.editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.editor-sub {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: calc(12px * var(--site-type));
}

.edit-tabs { margin-top: 4px; }

.edit-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 6px;
}
.edit-toolbar .edit-tabs { margin-top: 0; min-width: 0; }

.edit-note {
  margin: 4px 0 14px;
  color: var(--muted);
  font-size: calc(11.5px * var(--site-type));
}

.edit-list { display: flex; flex-direction: column; gap: 8px; }

.edit-row {
  display: grid;
  grid-template-columns: 120px 1fr 150px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.edit-row.is-dirty {
  border-color: color-mix(in srgb, var(--gold) 55%, var(--line));
  background: color-mix(in srgb, var(--gold-soft) 40%, var(--surface));
}

.edit-room { display: flex; flex-direction: column; gap: 2px; }
.edit-room strong {
  font-family: var(--serif);
  font-size: calc(20px * var(--site-type));
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.room-tag {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 7px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--sans, inherit);
  font-size: calc(11px * var(--site-type));
  font-weight: 600;
  vertical-align: 3px;
  letter-spacing: 0;
}
.building-label { margin-top: 22px; }
.building-label:first-child { margin-top: 0; }
.label-count {
  color: var(--muted);
  font-size: calc(11px * var(--site-type));
  font-weight: 400;
}
.edit-room span { color: var(--muted); font-size: calc(11px * var(--site-type)); }
.edit-room .edit-layout.is-studio,
.edit-room .edit-layout.is-one,
.edit-room .edit-layout.is-two,
.edit-room .edit-layout.is-shop { font-weight: 700; }
.edit-room .edit-layout.is-studio { color: var(--layout-studio); }
.edit-room .edit-layout.is-one { color: var(--layout-one); }
.edit-room .edit-layout.is-two { color: var(--layout-two); }
.edit-room .edit-layout.is-shop { color: var(--layout-shop); }
.edit-video-actions { display: flex; align-items: center; gap: 4px; margin-top: 3px; }
.edit-video {
  padding: 3px 8px;
  border: 1px dashed color-mix(in srgb, var(--muted) 45%, var(--line));
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: calc(10.5px * var(--site-type));
  line-height: 1.5;
  white-space: nowrap;
  cursor: pointer;
}
.edit-video.has-video {
  border-style: solid;
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  background: var(--accent-soft);
  color: var(--accent);
}
.edit-video:disabled { opacity: .7; cursor: wait; }
.edit-video-remove {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #B42318;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.edit-video-remove:hover { background: #FCEDEC; }

.seg {
  display: inline-flex;
  width: fit-content;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--site-bg);
}

.seg button {
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: calc(12px * var(--site-type));
  cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.seg button[data-status="可看"][aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.seg button[data-status="定房"][aria-pressed="true"] { background: var(--gold-soft); color: var(--gold); }
.seg button[data-status="已租"][aria-pressed="true"] { background: #ECEBE7; color: var(--muted); }

.edit-price {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-self: end;
  color: var(--muted);
  font-size: calc(12px * var(--site-type));
}
.edit-price input {
  width: 82px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--site-bg);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.edit-price input:focus { outline: 2px solid color-mix(in srgb, var(--accent) 40%, transparent); border-color: var(--accent); }

.savebar {
  position: sticky;
  bottom: 12px;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: 0 10px 30px rgba(29, 41, 36, .14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.savebar-count { color: var(--muted); font-size: calc(12px * var(--site-type)); }
.savebar-count strong { color: var(--gold); }
.savebar-msg { min-height: 0; margin: 0 0 0 auto; text-align: right; line-height: 1.3; }

@media (max-width: 560px) {
  .login-card { margin-top: 12px; padding: 20px; }
  .login-card h1, .editor h1 { font-size: calc(26px * var(--site-type)); }
  .edit-row { grid-template-columns: 1fr auto; gap: 8px 10px; padding: 10px; }
  .edit-room { grid-column: 1; grid-row: 1; }
  .edit-price { grid-column: 2; grid-row: 1; }
  .seg { grid-column: 1 / -1; grid-row: 2; width: 100%; justify-content: space-between; }
  .seg button { flex: 1; }
  .savebar { bottom: 8px; }
  .editor-head { margin-bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* 复制分享链接后的轻提示 */
.copy-toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 80;
  max-width: min(86vw, 420px);
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(22, 34, 28, .94);
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.copy-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* 管理后台：页面设置 */
[hidden] { display: none !important; }

.admin-panel {
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: calc(var(--site-radius) + 2px);
  background: var(--surface);
  overflow: hidden;
}

.admin-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 13px 16px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.admin-panel-head strong {
  display: block;
  font-family: var(--serif);
  font-size: calc(17px * var(--site-type));
  font-weight: 600;
}
.admin-panel-head small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: calc(11px * var(--site-type));
}
.admin-panel-arrow {
  color: var(--muted);
  font-size: 14px;
  transition: transform calc(180ms * var(--site-motion));
}
.admin-panel-head.is-open .admin-panel-arrow { transform: rotate(180deg); }

.admin-form {
  display: grid;
  gap: 8px;
  padding: 4px 16px 16px;
  border-top: 1px solid var(--line);
}
.admin-form[hidden] { display: none; }
.admin-form .field-label { margin-top: 6px; margin-bottom: 0; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.admin-grid > div { display: grid; gap: 6px; }
.field-textarea { resize: vertical; min-height: 54px; }

.admin-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.admin-toggles .check { margin-top: 0; color: var(--ink); }

.admin-buildings {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin-bottom: 6px;
}
.admin-buildings .check { margin-top: 0; color: var(--ink); }

.admin-form-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 6px;
}
.admin-form-foot .form-msg { margin: 0 auto 0 0; }

.admin-empty { color: var(--muted); font-size: calc(12px * var(--site-type)); }

/* 公开页公告条 */
.notice {
  margin: 12px 0 0;
  padding: 9px 12px;
  border: 1px solid color-mix(in srgb, var(--gold) 32%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--gold-soft) 55%, var(--surface));
  color: var(--ink);
  font-size: calc(12.5px * var(--site-type));
  line-height: 1.6;
  white-space: pre-wrap;
}

@media (max-width: 560px) {
  .admin-grid { grid-template-columns: 1fr; }
  .admin-form-foot { flex-wrap: wrap; }
}
