* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #000;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

button { font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }

/* vertical feed: one house per screen */
#feed {
  height: 100vh;
  height: 100dvh;
  overflow-y: scroll;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
#feed::-webkit-scrollbar, .photos::-webkit-scrollbar { display: none; }

.house {
  position: relative;
  height: 100vh;
  height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
}

/* horizontal photos of one house */
.photos {
  display: flex;
  height: 100%;
  overflow-x: scroll;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.slide {
  position: relative;
  overflow: hidden;
  flex: 0 0 100%;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slide .photo { position: relative; width: 100%; height: 100%; object-fit: contain; display: block; }
/* oversized so the blur has no faded edges; the slide clips it */
.slide .backdrop {
  position: absolute;
  top: -60px;
  left: -60px;
  width: calc(100% + 120px);
  height: calc(100% + 120px);
  max-width: none;
  object-fit: cover;
  filter: blur(30px) brightness(.6);
  pointer-events: none;
}

.dots {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 58px);
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: center;
  gap: 4px;
  pointer-events: none;
}
.dot { flex: 0 1 6px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .35); }
.dot.on { background: #fff; }

.info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 60px 84px calc(env(safe-area-inset-bottom, 0px) + 36px) 16px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .85) 65%);
  text-shadow: 0 1px 3px rgba(0, 0, 0, .7);
  pointer-events: none;
}
.info h1 { margin: 6px 0 4px; font-size: 22px; line-height: 1.2; }
.info p { margin: 2px 0; font-size: 15px; }
.rent { font-size: 20px !important; font-weight: 700; }
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-shadow: none;
  background: #fff;
  color: #111;
}
.badge.vacant { background: #1fa65a; color: #fff; }

.actions {
  position: absolute;
  right: 10px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 40px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.action {
  width: 64px;
  border: 0;
  padding: 0;
  background: none;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
}
.action .icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  display: flex;
  align-items: center;
  justify-content: center;
}
.action svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.action.liked svg { fill: #ff3b5c; stroke: #ff3b5c; }

.newsletter {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  right: 12px;
  z-index: 5;
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.eho {
  position: fixed;
  left: 16px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
  z-index: 4;
  font-size: 11px;
  opacity: .8;
  pointer-events: none;
}

.notice {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.toast {
  position: fixed;
  left: 50%;
  top: calc(env(safe-area-inset-top, 0px) + 84px);
  transform: translateX(-50%);
  z-index: 20;
  max-width: 90%;
  padding: 10px 16px;
  border-radius: 10px;
  background: #fff;
  color: #111;
  font-size: 14px;
  text-align: center;
}

/* form sheet */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: rgba(0, 0, 0, .6);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.panel {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 92%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 16px calc(env(safe-area-inset-bottom, 0px) + 18px);
  border-radius: 18px 18px 0 0;
  background: #fff;
  color: #111;
}
.panel h2 { margin: 0 44px 2px 0; font-size: 20px; }
.form-house { margin: 0 0 12px; color: #555; font-size: 14px; }
.close { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border: 0; background: none; font-size: 28px; color: #111; }

form { display: flex; flex-direction: column; gap: 10px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.row { display: flex; gap: 10px; }
.row label { flex: 1; min-width: 0; }
input, select, textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  padding: 10px;
  border: 1px solid #bbb;
  border-radius: 8px;
  background: #fff;
  color: #111;
}
.consent { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; }
.consent input { width: 20px; height: 20px; flex: 0 0 20px; margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.send { border: 0; border-radius: 10px; padding: 13px; background: #111; color: #fff; font-size: 16px; font-weight: 700; }
.send:disabled { opacity: .5; }
.privacy { margin: 0; color: #666; font-size: 12px; }
.error { margin: 0; color: #b00020; font-size: 14px; }
.done { margin: 18px 0 24px; font-size: 16px; }
