:root {
  --bg: #0e0e0e;
  --panel: #161616;
  --panel-2: #1d1d1d;
  --ink: #f5f1e8;
  --ink-dim: #a8a39a;
  --gold: #e7b94c;
  --gold-deep: #b8862a;
  --rust: #c4602b;
  --green: #6abf69;
  --line: rgba(231,185,76,0.18);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--ink);
  background-image:
    radial-gradient(circle at 20% 0%, rgba(231,185,76,0.06), transparent 50%),
    radial-gradient(circle at 80% 100%, rgba(196,96,43,0.05), transparent 50%);
  background-attachment: fixed;
  min-height: 100vh;
}
a { color: var(--gold); text-decoration: none; cursor: pointer; }
a:hover { text-decoration: underline; }

/* NAV */
nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(0,0,0,0.5);
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(10px);
  flex-wrap: wrap;
  gap: 10px;
}
nav .logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 24px; letter-spacing: 0.06em;
  color: var(--gold); cursor: pointer;
}
nav .logo span { color: var(--ink); }
nav .actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
nav button, .btn {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 4px;
  font: inherit; font-size: 13px;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: all .15s ease;
}
nav button.primary, .btn.primary {
  background: var(--gold); color: #111;
  border-color: var(--gold); font-weight: 600;
}
nav button:hover, .btn:hover { border-color: var(--gold); }
nav button.primary:hover, .btn.primary:hover { background: #f3c862; }
nav .who { font-size: 13px; color: var(--ink-dim); }
.unread-dot {
  display: inline-block;
  background: var(--gold); color: #111;
  border-radius: 999px;
  font-size: 11px; padding: 1px 7px;
  font-weight: 700; margin-left: 4px;
}

/* HEADER */
header.hero-head {
  border-bottom: 1px solid var(--line);
  padding: 28px 20px 24px; text-align: center;
}
header.hero-head .mark {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(36px, 6vw, 64px);
  letter-spacing: 0.04em;
  margin: 0; color: var(--gold); line-height: 1;
}
header.hero-head .mark span { color: var(--ink); }
header.hero-head .tag {
  font-family: 'DM Serif Display', serif;
  font-style: italic;
  color: var(--ink-dim);
  margin: 8px 0 0; font-size: 15px;
}
header.hero-head .rule {
  width: 50px; height: 2px; background: var(--gold); margin: 14px auto 0;
}

/* PAGES */
.page { max-width: 1100px; margin: 0 auto; padding: 24px 20px; }
.page h2 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(26px, 4vw, 38px);
  margin: 0 0 8px; font-weight: 400;
}
.page h2 em { color: var(--gold); font-style: italic; }
.page p.sub { color: var(--ink-dim); margin: 0 0 22px; font-size: 15px; }

/* FILTERS */
.filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 8px;
}
.filters input, .filters select {
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 4px;
  font: inherit; font-size: 14px;
}
.filters input:focus, .filters select:focus { outline: none; border-color: var(--gold); }
.filters input::placeholder { color: var(--ink-dim); }
.filters-extra {
  display: flex; gap: 16px; align-items: center;
  margin-top: 12px; flex-wrap: wrap;
  font-size: 13px; color: var(--ink-dim);
}
.filters-extra label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.count {
  margin: 16px 2px 0; font-size: 12px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-dim);
}
.count strong { color: var(--gold); }
@media (max-width:780px) { .filters { grid-template-columns: 1fr 1fr; } }

/* LISTINGS */
.listings {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  transition: transform .2s ease, border-color .2s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-2px); border-color: rgba(231,185,76,0.4); }
.card .cover {
  aspect-ratio: 4/3;
  background: var(--panel-2) center/cover no-repeat;
  position: relative;
  border-bottom: 1px solid var(--line);
}
.card .cover.placeholder {
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-dim); font-family: 'DM Serif Display', serif; font-style: italic;
}
.card .cover .heart {
  position: absolute; top: 10px; right: 10px;
  background: rgba(0,0,0,0.6);
  border: 1px solid var(--line);
  color: var(--ink);
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 16px;
}
.card .cover .heart.on { color: var(--gold); border-color: var(--gold); }
.card .body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.card .area-line {
  font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--gold);
  margin: 0 0 8px; display: flex; align-items: center; gap: 6px;
}
.card h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 19px; margin: 0 0 8px; font-weight: 400; line-height: 1.2;
}
.card .price {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px; letter-spacing: 0.02em;
  margin: 0; line-height: 1;
}
.card .price .per {
  font-family: 'Inter', sans-serif;
  font-size: 12px; color: var(--ink-dim); margin-left: 4px;
}
.card .beds { font-size: 12px; color: var(--ink-dim); margin: 4px 0 12px; }
.card .desc { color: var(--ink-dim); font-size: 13px; line-height: 1.5; margin: 0 0 12px; flex: 1; }
.badges { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.badge {
  color: var(--gold);
  border: 1px solid var(--gold-deep);
  padding: 3px 8px; border-radius: 999px;
  font-size: 10px; letter-spacing: 0.06em;
  text-transform: uppercase; font-weight: 500;
}
.badge.verified {
  background: var(--gold); color: #111;
  border-color: var(--gold); font-weight: 700;
}
.badge.featured {
  background: rgba(231,185,76,0.15);
  color: var(--gold); border-color: var(--gold);
}
.card .by { font-size: 12px; color: var(--ink-dim); margin: 0 0 12px; }
.card-actions { display: flex; gap: 6px; }
.card-actions button {
  flex: 1; background: var(--gold); color: #111;
  border: none; padding: 10px; border-radius: 4px;
  cursor: pointer; font: inherit; font-weight: 600;
  font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
}
.card-actions button:hover { background: #f3c862; }
.card-actions button.ghost {
  background: transparent; color: var(--ink-dim);
  border: 1px solid var(--line); flex: 0 0 auto; padding: 10px 12px;
}
.card-actions button.ghost:hover { color: var(--gold); border-color: var(--gold); }
.card-actions button.danger {
  background: transparent; color: var(--rust);
  border: 1px solid var(--rust); flex: 0 0 auto; padding: 10px 12px;
}
.card-actions button.danger:hover { background: var(--rust); color: #111; }
.empty {
  grid-column: 1 / -1; text-align: center; padding: 50px 20px;
  color: var(--ink-dim); font-family: 'DM Serif Display', serif;
  font-style: italic; font-size: 18px;
}

/* MODAL */
.modal-wrap {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  display: none; align-items: flex-start; justify-content: center;
  padding: 30px 16px; overflow-y: auto; z-index: 100;
  backdrop-filter: blur(4px);
}
.modal-wrap.show { display: flex; }
.modal {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 28px; width: 100%; max-width: 560px;
  position: relative;
}
.modal.wide { max-width: 800px; }
.modal h2 {
  font-family: 'DM Serif Display', serif;
  font-weight: 400; margin: 0 0 6px; font-size: 26px;
}
.modal .label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 13px; letter-spacing: 0.25em;
  color: var(--gold); margin: 0 0 4px;
}
.modal p.sub { color: var(--ink-dim); margin: 0 0 18px; font-size: 14px; }
.modal .close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none;
  color: var(--ink-dim); cursor: pointer;
  font-size: 24px; line-height: 1;
}
.modal .close:hover { color: var(--gold); }
.field { margin-bottom: 12px; }
.field label {
  display: block; font-size: 12px; color: var(--ink-dim);
  margin-bottom: 4px; letter-spacing: 0.04em;
}
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  font: inherit; font-size: 15px;
}
.field textarea { min-height: 90px; resize: vertical; font-family: inherit; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--gold); }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-dim); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
@media (max-width:560px) { .row, .row3 { grid-template-columns: 1fr; } }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 16px; }
.tag-pick {
  cursor: pointer; padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-dim);
  font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; user-select: none;
  transition: all .15s ease;
}
.tag-pick.on { background: var(--gold); color: #111; border-color: var(--gold); }
.modal button.submit {
  width: 100%; background: var(--gold); color: #111;
  border: none; padding: 13px; border-radius: 4px;
  cursor: pointer; font: inherit; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; font-size: 14px;
}
.modal button.submit:hover { background: #f3c862; }
.modal .err {
  color: var(--rust); font-size: 13px;
  margin-top: 10px; min-height: 18px;
}
.modal .switch { text-align: center; margin-top: 14px; font-size: 13px; color: var(--ink-dim); }
.contact-box {
  background: var(--panel-2);
  border: 1px solid var(--gold);
  border-radius: 4px; padding: 14px; margin-top: 8px;
}
.contact-box .v { font-family: 'Bebas Neue', sans-serif; font-size: 20px; letter-spacing: 0.04em; }
.role-toggle {
  display: flex; gap: 8px; margin-bottom: 16px;
}
.role-toggle .pill {
  flex: 1; padding: 12px; text-align: center;
  border: 1px solid var(--line); border-radius: 4px;
  cursor: pointer; font-size: 13px; color: var(--ink-dim);
  letter-spacing: 0.06em; text-transform: uppercase;
}
.role-toggle .pill.on { border-color: var(--gold); color: var(--gold); background: rgba(231,185,76,0.06); }
.help-text { font-size: 12px; color: var(--ink-dim); margin: -4px 0 8px; }

/* PHOTO MANAGER */
.photo-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px; margin-top: 10px;
}
.photo-tile {
  aspect-ratio: 1; background: var(--panel-2) center/cover;
  border-radius: 4px; border: 1px solid var(--line);
  position: relative; overflow: hidden;
}
.photo-tile .cat {
  position: absolute; left: 6px; bottom: 6px;
  background: rgba(0,0,0,0.7); color: var(--gold);
  font-size: 10px; padding: 2px 6px; border-radius: 3px;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.photo-tile .rm {
  position: absolute; top: 4px; right: 4px;
  background: rgba(0,0,0,0.8); color: var(--rust);
  border: none; border-radius: 50%;
  width: 24px; height: 24px; cursor: pointer; font-size: 14px;
}

/* LISTING DETAIL */
.detail-cover {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 4px; height: 360px; margin-bottom: 20px;
  border-radius: 6px; overflow: hidden; border: 1px solid var(--line);
}
.detail-cover > div { background: var(--panel-2) center/cover; }
.detail-cover .ph-stack { display: grid; grid-template-rows: 1fr 1fr; gap: 4px; }
.detail-cover .ph-stack > div { background: var(--panel-2) center/cover; }
.detail-cover .placeholder {
  background: var(--panel-2); display: flex; align-items: center; justify-content: center;
  color: var(--ink-dim); font-family: 'DM Serif Display', serif; font-style: italic;
}
@media (max-width:780px) {
  .detail-cover { grid-template-columns: 1fr; grid-template-rows: 1fr; height: 240px; }
  .detail-cover .detail-side, .detail-cover .ph-stack { display: none; }
}

/* INBOX */
.inbox {
  display: grid; grid-template-columns: 320px 1fr;
  gap: 16px; min-height: 500px;
}
@media (max-width:780px) { .inbox { grid-template-columns: 1fr; } }
.conv-list {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 6px; padding: 8px; max-height: 600px; overflow-y: auto;
}
.conv-item {
  padding: 12px; border-radius: 4px; cursor: pointer;
  border-bottom: 1px solid var(--line);
}
.conv-item:last-child { border-bottom: none; }
.conv-item:hover { background: var(--panel-2); }
.conv-item.on { background: var(--panel-2); border-left: 3px solid var(--gold); padding-left: 9px; }
.conv-item .ctitle { font-weight: 600; font-size: 14px; margin: 0 0 2px; }
.conv-item .csub { font-size: 12px; color: var(--ink-dim); margin: 0; }
.conv-item .clast {
  font-size: 12px; color: var(--ink-dim);
  margin: 4px 0 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.conv-thread {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 6px; padding: 16px;
  display: flex; flex-direction: column; min-height: 500px;
}
.thread-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px; margin-bottom: 10px;
}
.thread-head .t { font-weight: 600; }
.thread-head .s { font-size: 12px; color: var(--ink-dim); }
.thread-body {
  flex: 1; overflow-y: auto; padding: 10px 0;
  display: flex; flex-direction: column; gap: 8px; max-height: 420px;
}
.msg { max-width: 75%; padding: 10px 14px; border-radius: 12px; font-size: 14px; line-height: 1.45; }
.msg.me { align-self: flex-end; background: var(--gold); color: #111; border-bottom-right-radius: 4px; }
.msg.them { align-self: flex-start; background: var(--panel-2); border-bottom-left-radius: 4px; }
.msg .ts { font-size: 10px; color: rgba(0,0,0,0.5); margin-top: 4px; }
.msg.them .ts { color: var(--ink-dim); }
.thread-input { display: flex; gap: 8px; margin-top: 10px; }
.thread-input textarea {
  flex: 1; padding: 10px 12px;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 4px; color: var(--ink); font: inherit;
  min-height: 44px; max-height: 120px; resize: vertical;
}
.thread-input button {
  background: var(--gold); color: #111; border: none;
  padding: 0 18px; border-radius: 4px; cursor: pointer;
  font-weight: 600; letter-spacing: 0.04em;
}
.thread-empty {
  display: flex; align-items: center; justify-content: center;
  flex: 1; color: var(--ink-dim);
  font-family: 'DM Serif Display', serif; font-style: italic;
}

/* MAP */
#map { height: 480px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); }
.map-callout {
  background: var(--panel-2); color: var(--ink);
  border: 1px solid var(--line); padding: 12px;
  border-radius: 4px; font-size: 13px;
}
.map-callout strong { color: var(--gold); }

/* TOAST */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--gold); color: #111;
  padding: 12px 20px; border-radius: 4px;
  font-weight: 600; font-size: 14px;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 200;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  max-width: 90%; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* TABS */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tab {
  padding: 10px 18px; cursor: pointer;
  font-size: 13px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-dim);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab.on { color: var(--gold); border-bottom-color: var(--gold); }

footer {
  text-align: center; padding: 30px 20px 40px;
  color: var(--ink-dim); font-size: 12px;
  letter-spacing: 0.1em; text-transform: uppercase;
  border-top: 1px solid var(--line); margin-top: 40px;
}
