:root {
  color-scheme: light;
  --bg: #eef7f5;
  --surface: #ffffff;
  --surface-soft: #f7fbfa;
  --ink: #132322;
  --muted: #637170;
  --teal: #0d3f42;
  --teal-2: #0f6c6f;
  --gold: #d89b25;
  --gold-2: #f1c868;
  --green: #238a55;
  --red: #b94a42;
  --line: rgba(15, 63, 66, 0.14);
  --shadow: 0 20px 54px rgba(15, 63, 66, 0.14);
  --radius: 8px;
  --focus: 0 0 0 4px rgba(216, 155, 37, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(238, 247, 245, 0.92), rgba(247, 251, 250, 0.95)),
    radial-gradient(circle at top left, rgba(35, 138, 85, 0.14), transparent 38%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body.dialog-open {
  overflow: hidden;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  position: fixed;
  z-index: 30;
  inset: 0 0 auto 0;
  height: 66px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px clamp(14px, 3vw, 42px);
  background: rgba(247, 251, 250, 0.78);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.topbar[data-elevated="true"] {
  background: rgba(247, 251, 250, 0.94);
  border-color: var(--line);
  box-shadow: 0 12px 30px rgba(15, 63, 66, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 172px;
  gap: 10px;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(15, 63, 66, 0.16);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.02rem;
  font-weight: 900;
  letter-spacing: 0;
}

.brand small {
  margin-top: -2px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-links a {
  color: var(--teal);
  font-size: 0.9rem;
  font-weight: 850;
  padding: 10px 12px;
  border-radius: 8px;
}

.nav-links a:hover {
  background: rgba(13, 63, 66, 0.08);
}

.icon-button,
.primary-button,
.ghost-button,
.top-action,
.mini-button {
  border: 0;
  cursor: pointer;
  min-height: 42px;
  border-radius: 8px;
  font-weight: 900;
}

.icon-button {
  width: 44px;
  color: var(--teal);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 10px 22px rgba(15, 63, 66, 0.08);
}

.icon-button:hover {
  color: #fff;
  background: var(--teal);
}

.top-action {
  color: #fff;
  background: var(--teal);
  border: 1px solid rgba(13, 63, 66, 0.18);
  padding: 0 14px;
  box-shadow: 0 12px 24px rgba(13, 63, 66, 0.14);
}

.top-action:hover {
  background: var(--green);
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: rgba(13, 63, 66, 0.07);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.language-switch button {
  min-height: 34px;
  padding: 0 10px;
  color: var(--teal);
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 950;
}

.language-switch button.is-active {
  color: #fff;
  background: var(--teal);
}

.top-action-secondary {
  color: var(--teal);
  background: rgba(13, 63, 66, 0.07);
  box-shadow: none;
}

.top-action-secondary:hover {
  color: #fff;
  background: var(--teal);
}

.primary-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--teal-2));
  padding: 0 18px;
  box-shadow: 0 16px 34px rgba(13, 63, 66, 0.22);
}

.primary-button:hover {
  transform: translateY(-1px);
}

.ghost-button {
  color: var(--teal);
  background: rgba(13, 63, 66, 0.07);
  border: 1px solid var(--line);
  padding: 0 14px;
}

.mini-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  color: var(--teal);
  background: rgba(13, 63, 66, 0.07);
  border: 1px solid var(--line);
  padding: 0 12px;
  font-size: 0.84rem;
}

.mini-button[data-tone="green"] {
  color: #fff;
  background: var(--green);
  border-color: transparent;
}

.mini-button[data-tone="teal"] {
  color: #fff;
  background: var(--teal);
  border-color: transparent;
}

.hero {
  position: relative;
  min-height: 520px;
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}

.hero-media,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-media {
  z-index: -2;
  background-image: url("assets/hero-building.jpg");
  background-position: center;
  background-size: cover;
  transform: scale(1.01);
}

.hero-shade {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(4, 28, 31, 0.86) 0%, rgba(4, 28, 31, 0.58) 42%, rgba(4, 28, 31, 0.1) 78%),
    linear-gradient(180deg, rgba(4, 28, 31, 0.2) 0%, rgba(4, 28, 31, 0.46) 100%);
}

.hero-content {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 112px 0 34px;
  color: #fff;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold-2);
  font-size: 0.77rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  width: min(620px, 100%);
  margin: 0;
  font-size: 3.8rem;
  line-height: 1;
  font-weight: 950;
  letter-spacing: 0;
}

.hero-lede {
  width: min(560px, 100%);
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.18rem;
  font-weight: 650;
}

.hero-search {
  width: min(620px, 100%);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 20px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  backdrop-filter: blur(18px);
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 14px;
  color: var(--teal);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 8px;
}

.search-field input {
  width: 100%;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-weight: 800;
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-metrics span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 800;
}

.hero-metrics strong {
  color: #fff;
}

.catalog-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.catalog-section {
  padding: 30px 0 42px;
}

.catalog-titlebar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.catalog-titlebar h2 {
  margin: 0;
  color: var(--teal);
  font-size: 2.05rem;
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: 0;
}

.catalog-titlebar p {
  margin: 0;
  color: var(--muted);
  font-weight: 850;
}

.catalog-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.filters-drawer {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(15, 63, 66, 0.08);
  overflow: hidden;
}

.filters-drawer summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 50px;
  padding: 0 14px;
  color: var(--teal);
  cursor: pointer;
  list-style: none;
}

.filters-drawer summary::-webkit-details-marker {
  display: none;
}

.filters-drawer summary strong {
  font-weight: 950;
}

.filters-drawer summary small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.filters-drawer[open] summary {
  border-bottom: 1px solid var(--line);
}

.filters-drawer[open] summary small {
  color: var(--green);
}

.filters {
  position: static;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.56);
}

.filter-title {
  display: none;
  align-items: center;
  gap: 8px;
  color: var(--teal);
  font-size: 1.02rem;
}

.filters label {
  display: grid;
  gap: 6px;
}

.filters label span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.filters input,
.filters select,
.message-form input,
.message-form textarea {
  width: 100%;
  min-height: 38px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  padding: 0 11px;
  font-weight: 750;
}

.message-form textarea {
  min-height: 96px;
  padding: 11px;
  resize: vertical;
}

.filters input:focus,
.filters select:focus,
.message-form input:focus,
.message-form textarea:focus,
.search-field:focus-within {
  box-shadow: var(--focus);
  border-color: rgba(216, 155, 37, 0.54);
}

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

.filters > .two-col {
  min-width: 0;
}

.catalog-main {
  min-width: 0;
}

.result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.result-bar strong {
  color: var(--teal);
  font-size: 1.4rem;
  font-weight: 950;
}

.result-bar span {
  color: var(--muted);
  font-weight: 850;
}

.source-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  color: var(--teal);
  background: rgba(216, 155, 37, 0.13);
  border: 1px solid rgba(216, 155, 37, 0.28);
  border-radius: 8px;
  font-size: 0.8rem;
}

.source-pill[data-state="live"] {
  color: #fff;
  background: var(--green);
  border-color: transparent;
}

.source-pill[data-state="demo"] {
  color: var(--teal);
  background: rgba(216, 155, 37, 0.18);
}

.source-pill[data-state="error"] {
  color: #fff;
  background: var(--red);
  border-color: transparent;
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.listing-card {
  display: grid;
  grid-template-rows: 172px 1fr;
  min-width: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(15, 63, 66, 0.1);
}

.listing-photo {
  position: relative;
  min-width: 0;
  overflow: hidden;
  cursor: pointer;
  background:
    linear-gradient(135deg, rgba(13, 63, 66, 0.82), rgba(35, 138, 85, 0.62)),
    url("assets/hero-building.jpg") center/cover;
}

.listing-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  max-width: calc(100% - 20px);
  padding: 7px 9px;
  color: #fff;
  background: rgba(13, 63, 66, 0.88);
  border-radius: 8px;
  font-size: 0.77rem;
  font-weight: 950;
  backdrop-filter: blur(8px);
}

.listing-body {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.listing-title {
  margin: 0;
  color: var(--teal);
  font-size: 1.1rem;
  line-height: 1.16;
  font-weight: 950;
  letter-spacing: 0;
}

.listing-company {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 850;
}

.company-dot {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--teal);
  background: rgba(216, 155, 37, 0.2);
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 950;
}

.listing-price {
  color: var(--green);
  font-size: 1.18rem;
  font-weight: 950;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.facts span {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  padding: 0 9px;
  color: var(--teal);
  background: rgba(13, 63, 66, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 850;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 36px 18px;
  text-align: center;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.empty-state > span {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: var(--teal);
  background: rgba(216, 155, 37, 0.18);
  border-radius: 50%;
  font-size: 1.8rem;
}

.empty-state h3,
.empty-state p {
  margin: 0;
}

.empty-state h3 {
  color: var(--teal);
  font-size: 1.3rem;
}

.empty-state p {
  color: var(--muted);
  font-weight: 750;
}

.listing-dialog {
  width: min(1120px, calc(100vw - 24px));
  height: min(900px, calc(100dvh - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 28px 88px rgba(2, 21, 23, 0.34);
}

#dialogContent {
  height: 100%;
  min-height: 0;
}

.my-home-dialog {
  width: min(720px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 28px 88px rgba(2, 21, 23, 0.34);
}

.contact-dialog {
  width: min(460px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 28px 88px rgba(2, 21, 23, 0.34);
}

.messages-dialog {
  width: min(760px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 28px 88px rgba(2, 21, 23, 0.34);
}

.photo-dialog {
  width: min(1180px, calc(100vw - 20px));
  height: min(920px, calc(100dvh - 20px));
  max-height: calc(100dvh - 20px);
  padding: 0;
  overflow: hidden;
  background: #061416;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  box-shadow: 0 28px 88px rgba(2, 21, 23, 0.44);
}

.listing-dialog::backdrop,
.photo-dialog::backdrop,
.contact-dialog::backdrop,
.messages-dialog::backdrop {
  background: rgba(3, 18, 20, 0.62);
  backdrop-filter: blur(4px);
}

.my-home-dialog::backdrop {
  background: rgba(3, 18, 20, 0.62);
  backdrop-filter: blur(4px);
}

.dialog-close {
  position: absolute;
  z-index: 3;
  right: 12px;
  top: 12px;
  width: 42px;
  height: 42px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1;
}

.dialog-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1fr);
  height: 100%;
  min-height: 0;
}

.dialog-media {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(13, 63, 66, 0.62), rgba(35, 138, 85, 0.36)),
    url("assets/hero-building.jpg") center/cover;
}

.dialog-gallery-main {
  position: relative;
  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: rgba(3, 18, 20, 0.12);
  border: 0;
  cursor: zoom-in;
}

.dialog-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dialog-gallery-main span {
  position: absolute;
  left: 14px;
  bottom: 14px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  color: #fff;
  background: rgba(3, 18, 20, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 900;
  backdrop-filter: blur(8px);
}

.dialog-price-panel {
  display: grid;
  gap: 3px;
  padding: 14px;
  background: #fff;
  border-top: 1px solid var(--line);
}

.dialog-price-panel span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
}

.dialog-price-panel strong {
  color: var(--green);
  font-size: 1.55rem;
  line-height: 1.08;
  font-weight: 950;
}

.dialog-thumbs {
  display: flex;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  overflow-x: auto;
  background: rgba(3, 18, 20, 0.82);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.dialog-thumb {
  width: 74px;
  height: 54px;
  flex: 0 0 auto;
  padding: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}

.dialog-thumb.is-active {
  border-color: var(--gold);
}

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

.dialog-copy {
  max-height: 100%;
  overflow: auto;
  padding: 26px;
}

.photo-dialog > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #061416;
}

.photo-nav {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 50px;
  height: 58px;
  color: #fff;
  background: rgba(3, 18, 20, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  cursor: pointer;
  transform: translateY(-50%);
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
  backdrop-filter: blur(8px);
}

.photo-prev {
  left: 12px;
}

.photo-next {
  right: 12px;
}

.photo-counter {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 14px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  color: #fff;
  background: rgba(3, 18, 20, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  transform: translateX(-50%);
  font-size: 0.86rem;
  font-weight: 900;
  backdrop-filter: blur(8px);
}

.contact-panel {
  display: grid;
  gap: 12px;
  padding: 24px;
}

.contact-panel h2 {
  margin: 0 48px 0 0;
  color: var(--teal);
  font-size: 1.65rem;
  line-height: 1.08;
  font-weight: 950;
}

.contact-number {
  display: block;
  width: 100%;
  padding: 14px;
  color: var(--teal);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 1.45rem;
  line-height: 1.15;
  font-weight: 950;
  text-align: center;
  overflow-wrap: anywhere;
}

.contact-panel p {
  margin: 0;
  color: var(--muted);
  font-weight: 780;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.dialog-copy h2 {
  margin: 0;
  color: var(--teal);
  font-size: 2.2rem;
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: 0;
}

.dialog-copy .listing-price {
  margin-top: 12px;
  font-size: 1.45rem;
}

.dialog-company-line {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 850;
}

.detail-list {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.detail-row {
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.detail-row span:first-child {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.detail-row span:last-child {
  color: var(--ink);
  font-weight: 850;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 16px 0 18px;
}

.description-box,
.company-inventory,
.message-panel,
.message-form {
  padding: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.description-box h3,
.company-inventory h3,
.message-head h3,
.message-form h3 {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 1rem;
  font-weight: 950;
}

.description-box p {
  margin: 0;
  color: var(--muted);
  font-weight: 720;
}

.company-inventory {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.company-inventory-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.company-inventory-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 820;
}

.company-blocks {
  display: grid;
  gap: 8px;
}

.company-block {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.company-block summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  color: var(--teal);
  cursor: pointer;
  font-weight: 950;
}

.company-block summary::-webkit-details-marker {
  display: none;
}

.company-block summary span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.company-home-list {
  display: grid;
  gap: 6px;
  padding: 0 10px 10px;
}

.company-home-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px;
  text-align: left;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.company-home-row:hover,
.company-home-row.is-active {
  border-color: rgba(13, 63, 66, 0.35);
  background: rgba(13, 63, 66, 0.06);
}

.company-home-row span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.company-home-row strong {
  color: var(--teal);
  font-size: 0.92rem;
  font-weight: 950;
}

.company-home-row small {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 820;
  line-height: 1.25;
}

.company-home-row b {
  color: var(--green);
  font-size: 0.92rem;
  font-weight: 950;
  white-space: nowrap;
}

.message-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.message-panel .message-form {
  margin-top: 0;
  padding: 0;
  background: transparent;
  border: 0;
}

.message-panel {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
}

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

.message-head h3 {
  margin-bottom: 2px;
}

.message-head p,
.message-state {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 780;
}

.message-state {
  padding: 14px;
  text-align: center;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.message-state[data-tone="error"] {
  color: var(--red);
}

.message-thread {
  display: grid;
  align-content: start;
  gap: 9px;
  max-height: 360px;
  min-height: 110px;
  overflow: auto;
  padding: 10px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.message-bubble {
  width: min(84%, 460px);
  justify-self: start;
  display: grid;
  gap: 5px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(15, 63, 66, 0.06);
}

.message-bubble.is-mine {
  justify-self: end;
  color: #fff;
  background: var(--teal);
  border-color: transparent;
}

.message-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.message-bubble.is-mine .message-meta {
  color: rgba(255, 255, 255, 0.76);
  justify-content: flex-end;
}

.message-meta strong {
  color: var(--teal);
}

.message-bubble.is-mine .message-meta strong {
  color: #fff;
}

.message-bubble p {
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.35;
  font-weight: 760;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message-bubble.is-mine p {
  color: #fff;
  text-align: right;
}

.message-reply-label {
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  color: #fff;
  background: var(--green);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
}

.message-delete {
  justify-self: end;
  min-height: 28px;
  padding: 0 9px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 900;
}

.message-form .primary-button {
  width: fit-content;
}

.messages-panel {
  max-height: calc(100dvh - 24px);
  overflow: auto;
  padding: 24px;
}

.messages-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.messages-panel h2 {
  margin: 0 48px 0 0;
  color: var(--teal);
  font-size: 1.9rem;
  line-height: 1.08;
  font-weight: 950;
}

.messages-status {
  min-height: 22px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.messages-status[data-tone="error"] {
  color: var(--red);
}

.messages-list {
  display: grid;
  gap: 9px;
}

.conversation-card {
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 12px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.conversation-card:hover {
  border-color: rgba(13, 63, 66, 0.28);
  box-shadow: 0 12px 24px rgba(15, 63, 66, 0.08);
}

.conversation-card strong {
  color: var(--teal);
  font-size: 1rem;
  font-weight: 950;
}

.conversation-card span,
.conversation-card small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.conversation-card p {
  margin: 4px 0;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.3;
}

.my-home-panel {
  max-height: calc(100dvh - 24px);
  overflow: auto;
  padding: 24px;
}

.my-home-panel h2 {
  margin: 0 46px 14px 0;
  color: var(--teal);
  font-size: 2rem;
  line-height: 1.08;
  font-weight: 950;
}

.my-home-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 12px;
}

.my-home-form input {
  width: 100%;
  min-height: 46px;
  color: var(--ink);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  padding: 0 12px;
  font-weight: 850;
}

.my-home-form input:focus {
  box-shadow: var(--focus);
  border-color: rgba(216, 155, 37, 0.54);
}

.my-home-status {
  min-height: 22px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.my-home-status[data-tone="error"] {
  color: var(--red);
}

.my-home-status[data-tone="ok"] {
  color: var(--green);
}

.my-home-result {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.home-summary {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.home-summary h3 {
  margin: 0;
  color: var(--teal);
  font-size: 1.25rem;
  line-height: 1.15;
  font-weight: 950;
}

.home-facts,
.money-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.home-facts span,
.money-tile {
  min-width: 0;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.home-facts small,
.money-tile small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.home-facts strong,
.money-tile strong {
  display: block;
  margin-top: 3px;
  color: var(--teal);
  font-size: 0.98rem;
  line-height: 1.18;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.money-tile[data-tone="green"] strong {
  color: var(--green);
}

.money-tile[data-tone="red"] strong {
  color: var(--red);
}

.payments-list {
  display: grid;
  gap: 8px;
}

.payments-list h3 {
  margin: 0;
  color: var(--teal);
  font-size: 1rem;
  font-weight: 950;
}

.payments-count {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
}

.payment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.payment-row strong {
  color: var(--teal);
}

.payment-row small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 22px);
  max-width: min(520px, calc(100% - 28px));
  padding: 12px 14px;
  color: #fff;
  background: var(--teal);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(2, 21, 23, 0.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  font-weight: 850;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 980px) {
  .nav-links {
    display: none;
  }

  .top-action-secondary {
    margin-left: auto;
  }

  .top-action:not(.top-action-secondary) {
    margin-left: 0;
  }

  .catalog-shell {
    grid-template-columns: 1fr;
  }

  .filters {
    position: static;
  }

  .catalog-titlebar {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 3.2rem;
  }

  .catalog-titlebar h2 {
    font-size: 1.85rem;
  }
}

@media (max-width: 720px) {
  .topbar {
    height: 66px;
    gap: 8px;
    padding: 10px 12px;
  }

  .brand {
    min-width: 0;
  }

  .brand img {
    width: 42px;
    height: 42px;
  }

  .brand small {
    display: none;
  }

  .language-switch {
    gap: 1px;
    padding: 2px;
  }

  .language-switch button {
    min-height: 32px;
    padding: 0 7px;
    font-size: 0.7rem;
  }

  .top-action {
    min-height: 40px;
    padding: 0 10px;
    font-size: 0.86rem;
  }

  .hero {
    min-height: 460px;
  }

  .hero-content {
    width: min(100% - 24px, 1180px);
    padding-top: 96px;
    padding-bottom: 24px;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero-lede {
    font-size: 1rem;
  }

  .catalog-titlebar h2 {
    font-size: 1.5rem;
  }

  .dialog-copy h2 {
    font-size: 1.65rem;
  }

  .hero-search {
    grid-template-columns: 1fr;
  }

  .hero-search .primary-button {
    width: 100%;
    min-height: 48px;
  }

  .catalog-section {
    width: min(100% - 24px, 1180px);
  }

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

  .two-col {
    grid-template-columns: 1fr;
  }

  .listing-dialog {
    height: calc(100dvh - 24px);
  }

  #dialogContent {
    overflow: auto;
  }

  .dialog-layout {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100%;
  }

  .dialog-media {
    grid-template-rows: auto auto auto;
    min-height: 0;
  }

  .dialog-gallery-main {
    height: min(46dvh, 340px);
    min-height: 260px;
  }

  .dialog-gallery-main img {
    height: 100%;
  }

  .dialog-copy {
    max-height: none;
    overflow: visible;
    padding: 18px;
  }

  .dialog-price-panel strong {
    font-size: 1.3rem;
  }

  .detail-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .my-home-panel {
    padding: 18px;
  }

  .my-home-panel h2 {
    font-size: 1.5rem;
  }

  .contact-panel {
    padding: 18px;
  }

  .contact-panel h2 {
    font-size: 1.35rem;
  }

  .contact-number {
    font-size: 1.18rem;
  }

  .messages-panel {
    padding: 18px;
  }

  .messages-panel-head,
  .message-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .messages-panel h2 {
    font-size: 1.45rem;
  }

  .message-thread {
    max-height: 320px;
  }

  .message-bubble {
    width: 92%;
  }

  .company-home-row {
    grid-template-columns: 1fr;
  }

  .company-home-row b {
    white-space: normal;
  }

  .my-home-form,
  .home-facts,
  .money-grid {
    grid-template-columns: 1fr;
  }

  .payment-row {
    grid-template-columns: 1fr;
  }

  .photo-nav {
    width: 42px;
    height: 50px;
    font-size: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
