:root {
  --bg: #201f1d;
  --paper: #f7f3eb;
  --surface: #fffdf7;
  --surface-2: #eee7dc;
  --line: #d7ccb9;
  --text: #1f1e1b;
  --muted: #756c61;
  --accent: #65442f;
  --accent-2: #526457;
  --accent-soft: #e7ddcf;
  --warn: #8b6037;
  --reserved: #7d7366;
  --shadow: 0 22px 55px rgba(35, 30, 23, 0.12);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  background:
    linear-gradient(90deg, rgba(32, 31, 29, 0.98) 0, rgba(32, 31, 29, 0.98) 24%, rgba(247, 243, 235, 1) 24%),
    var(--paper);
  color: var(--text);
  font-family: var(--sans);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.welcome-screen {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(320px, 0.86fr) minmax(520px, 1.14fr);
  background: var(--paper);
  color: var(--text);
}

.welcome-screen[hidden] {
  display: none;
}

.welcome-media {
  min-height: 100dvh;
  background: var(--bg);
}

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

.welcome-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  padding: clamp(28px, 5vw, 74px);
}

.welcome-card .brand-mark {
  margin-top: 0;
}

.welcome-card h1 {
  max-width: 9ch;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(52px, 7vw, 92px);
  line-height: 0.9;
  font-weight: 400;
  letter-spacing: 0;
}

.welcome-lede {
  max-width: 62ch;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.52;
}

.welcome-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
}

.welcome-grid article {
  min-height: 178px;
  background: var(--surface);
  padding: 17px;
}

.welcome-grid span {
  display: block;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.welcome-grid h2 {
  margin: 22px 0 0;
  font-size: 15px;
}

.welcome-grid p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

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

.welcome-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--muted);
  font-size: 12px;
}

.welcome-toggle input {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  min-height: 100dvh;
}

.left-rail {
  border-right: 1px solid rgba(255, 253, 247, 0.12);
  padding: 24px;
  background: var(--bg);
  color: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.brand-block h1,
.top-bar h2,
.panel h2,
.list-toolbar h3,
.detail-pane h3 {
  margin: 0;
  letter-spacing: 0;
}

.brand-block h1 {
  margin-top: 12px;
  font-family: var(--serif);
  font-size: 38px;
  line-height: 0.96;
  font-weight: 400;
  max-width: 8ch;
}

.brand-mark {
  margin: 14px 0 0;
  font-family: var(--serif);
  font-size: 37px;
  line-height: 0.94;
  letter-spacing: 0;
}

.project-state {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--accent);
  color: var(--surface);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.brand-preview {
  margin: 18px 0 0;
  border: 1px solid rgba(255, 253, 247, 0.16);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 253, 247, 0.08);
}

.brand-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
  margin: 7px 0 0;
  line-height: 1.4;
}

.left-rail .eyebrow,
.left-rail .muted,
.left-rail .field span {
  color: rgba(255, 253, 247, 0.66);
}

.panel {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.left-rail .panel {
  border-top-color: rgba(255, 253, 247, 0.16);
}

.panel-header,
.top-bar,
.list-toolbar,
.detail-header,
.metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel h2,
.list-toolbar h3 {
  font-size: 15px;
}

.top-bar h2,
.amenity-panel h2,
.empty-detail h3,
.detail-header h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: 0;
}

.filter-subsection {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 14px;
}

.filter-subsection h3 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0;
}

.text-button {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 4px 0;
  opacity: 0.78;
  transition: opacity 160ms ease;
}

.text-button:hover {
  opacity: 1;
}

.primary-button,
.ghost-button,
.icon-text-button,
.shortlist-button {
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 38px;
  padding: 0 12px;
  color: var(--text);
  background: var(--surface);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.primary-button {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--surface);
  font-weight: 700;
}

.ghost-button,
.icon-text-button {
  background: transparent;
}

.primary-button:active,
.ghost-button:active,
.icon-text-button:active,
.shortlist-button:active {
  transform: translateY(1px);
}

.icon-text-button {
  min-height: 28px;
  padding: 0 8px;
  font-size: 12px;
}

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

.field span {
  font-size: 12px;
  color: var(--muted);
}

.field input,
.field select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  padding: 0 11px;
}

.left-rail .field input,
.left-rail .field select {
  border-color: rgba(255, 253, 247, 0.18);
  background: rgba(255, 253, 247, 0.08);
  color: var(--surface);
}

.left-rail .field select {
  border-color: rgba(255, 253, 247, 0.28);
  background: var(--surface);
  color: var(--text);
}

.left-rail .field select option {
  background: var(--surface);
  color: var(--text);
}

.left-rail .field input::placeholder {
  color: rgba(255, 253, 247, 0.42);
}

.field.compact {
  min-width: 170px;
  margin-top: 0;
}

.range-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.tag,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 700;
  background: var(--accent);
  color: var(--surface);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-pill.reserved {
  background: #e5ddd1;
  color: var(--reserved);
}

.status-pill.sold {
  background: #eadccc;
  color: var(--warn);
}

.recommendations {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.recommendation {
  border: 1px solid rgba(255, 253, 247, 0.16);
  border-radius: 7px;
  background: rgba(255, 253, 247, 0.06);
  padding: 10px;
  transition: transform 160ms ease, background 160ms ease;
}

.recommendation:hover {
  background: rgba(255, 253, 247, 0.1);
  transform: translateY(-1px);
}

.recommendation button {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--surface);
  text-align: left;
}

.recommendation strong {
  display: block;
  font-size: 13px;
}

.recommendation span {
  display: block;
  margin-top: 3px;
  color: rgba(255, 253, 247, 0.62);
  font-size: 12px;
  line-height: 1.35;
}

.main-stage {
  min-width: 0;
  padding: 24px;
  background: var(--paper);
}

.selection-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  padding: 14px;
}

.selection-panel h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 25px;
  line-height: 1;
  font-weight: 400;
}

.selection-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.selected-units {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.selected-unit {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbf7ee;
  padding: 10px;
}

.selected-unit img,
.image-placeholder.selected-thumb {
  width: 82px;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  border: 1px solid var(--line);
  object-fit: cover;
  background: var(--surface-2);
}

.selected-unit-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.selected-unit strong {
  font-size: 14px;
}

.selected-unit p,
.selected-unit span {
  display: block;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.empty-selection {
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 14px;
}

.export-status {
  min-height: 18px;
  margin: 10px 0 0;
  color: var(--accent-2);
  font-size: 12px;
}

.top-bar {
  align-items: flex-start;
  margin-bottom: 18px;
}

.top-bar h2 {
  font-size: 36px;
  line-height: 0.98;
}

.summary-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.top-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
}

.summary-item {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 253, 247, 0.72);
  padding: 8px 10px;
  min-width: 94px;
}

.summary-item span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.summary-item strong {
  display: block;
  margin-top: 3px;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.finder-layout {
  display: grid;
  grid-template-columns: minmax(420px, 0.92fr) minmax(360px, 0.68fr);
  gap: 20px;
  align-items: start;
}

.amenity-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  padding: 14px;
}

.amenity-panel h2 {
  margin: 0;
  font-size: 17px;
}

.amenity-gallery {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.amenity-gallery figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: var(--surface);
  transition: transform 180ms ease;
}

.amenity-gallery figure:hover {
  transform: translateY(-2px);
}

.amenity-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.amenity-gallery figcaption {
  padding: 6px 7px;
  color: var(--muted);
  font-size: 11px;
  text-transform: capitalize;
}

.unit-list-wrap,
.detail-pane {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

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

.unit-list {
  max-height: calc(100dvh - 164px);
  overflow: auto;
}

.unit-card {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  padding: 0;
  text-align: left;
  transition: background 160ms ease, transform 160ms ease;
}

.unit-card:hover,
.unit-card.active {
  background: #f3ece1;
}

.unit-open {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 12px 14px 9px;
  text-align: left;
}

.unit-open:active {
  transform: translateY(1px);
}

.shortlist-button {
  margin: 0 14px 12px 120px;
  min-height: 32px;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.shortlist-button.selected {
  border-color: var(--accent-2);
  background: var(--accent-2);
  color: var(--surface);
}

.unit-card img,
.image-placeholder.thumb {
  width: 92px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.image-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(
    135deg,
    #f3f0e8,
    #f3f0e8 10px,
    #ebe6da 10px,
    #ebe6da 20px
  );
  color: var(--muted);
  font-size: 12px;
  border: 1px solid var(--line);
}

.image-placeholder.thumb {
  border-radius: 6px;
}

.unit-card-top,
.unit-meta,
.price-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.unit-card h4 {
  margin: 0;
  font-size: 15px;
}

.price-line {
  margin-top: 8px;
}

.price-line strong {
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.unit-meta {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.feature-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.feature-chips span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent);
  padding: 0 8px;
  font-size: 11px;
}

.detail-tags {
  margin-top: 0;
}

.detail-pane {
  position: sticky;
  top: 24px;
  min-height: calc(100dvh - 48px);
  overflow: hidden;
}

.empty-detail {
  padding: 24px;
}

.empty-detail h3 {
  max-width: 22ch;
  font-size: 32px;
  line-height: 1.08;
}

.detail-media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
}

.detail-media figure {
  margin: 0;
  background: var(--surface);
}

.detail-media img,
.detail-media .image-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  display: block;
}

.detail-content {
  padding: 16px;
}

.detail-header {
  align-items: flex-start;
}

.detail-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.compact-action {
  min-height: 34px;
  white-space: nowrap;
}

.detail-header h3 {
  font-size: 32px;
  line-height: 1;
}

.detail-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  margin-top: 16px;
}

.metric {
  background: var(--surface);
  padding: 11px;
}

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

.metric strong {
  display: block;
  margin-top: 5px;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.notes-box {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 13px;
}

.notes-box h4 {
  margin: 0 0 8px;
  font-size: 14px;
}

.notes-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.light-overview {
  margin: 12px 0 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: var(--surface);
}

.light-overview img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
}

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

.light-grid figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: var(--surface);
}

.light-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.light-grid figcaption {
  padding: 6px 7px;
  color: var(--muted);
  font-size: 11px;
  text-transform: capitalize;
}

.orientation-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  margin-top: 12px;
}

.orientation-grid div {
  background: var(--surface);
  padding: 10px;
}

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

.orientation-grid strong {
  display: block;
  margin-top: 5px;
  font-size: 13px;
}

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

.render-grid figure,
.video-stack figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: var(--surface);
}

.render-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.render-grid figcaption,
.video-stack figcaption {
  padding: 6px 7px;
  color: var(--muted);
  font-size: 11px;
  text-transform: capitalize;
}

.video-stack {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.video-stack video {
  display: block;
  width: 100%;
  background: var(--surface-2);
}

.empty-list {
  padding: 28px;
  color: var(--muted);
}

@media (max-width: 1080px) {
  .welcome-screen {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .welcome-media {
    min-height: 260px;
    max-height: 34dvh;
  }

  .app-shell,
  .finder-layout {
    grid-template-columns: 1fr;
  }

  .left-rail {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 253, 247, 0.16);
  }

  .brand-block h1 {
    max-width: none;
  }

  .brand-preview {
    max-width: 360px;
  }

  .detail-pane {
    position: static;
    min-height: auto;
  }

  .unit-list {
    max-height: none;
  }
}

@media (max-width: 680px) {
  .welcome-card {
    padding: 24px 18px 32px;
  }

  .welcome-grid {
    grid-template-columns: 1fr;
  }

  .welcome-grid article {
    min-height: auto;
  }

  .welcome-actions,
  .welcome-actions button {
    width: 100%;
  }

  .left-rail,
  .main-stage {
    padding: 18px;
  }

  .top-bar,
  .top-actions,
  .list-toolbar,
  .unit-card-top,
  .price-line {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
  }

  .summary-strip {
    justify-content: flex-start;
  }

  .range-grid,
  .selected-units,
  .amenity-gallery,
  .detail-media,
  .metrics,
  .orientation-grid,
  .light-grid,
  .render-grid {
    grid-template-columns: 1fr;
  }

  .unit-card {
    display: block;
  }

  .unit-open {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 11px;
  }

  .unit-card img,
  .image-placeholder.thumb {
    width: 76px;
  }

  .shortlist-button {
    margin-left: 103px;
  }

  .selected-unit {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .selected-unit img,
  .image-placeholder.selected-thumb {
    width: 72px;
  }

  .detail-header,
  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-actions,
  .selection-actions {
    justify-items: start;
    justify-content: flex-start;
  }
}
