/* ঘর খুঁজুন — দেয়ালে সাঁটা টু-লেট কাগজের ভাব */

:root {
  --ink: #14203A;
  --ink-soft: #4A5570;
  --paper: #F3F1EA;
  --paper-2: #E7E3D8;
  --line: #D6D1C4;
  --tolet: #E2402F;
  --verified: #1B6E4E;
  --font-display: 'Tiro Bangla', Georgia, serif;
  --font-ui: 'Anek Bangla', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  background: var(--paper);
  background-image: repeating-linear-gradient(
    to bottom, transparent 0 31px, rgba(20,32,58,.035) 31px 32px);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.25; margin: 0; }
h1 { font-size: 24px; }
h2 { font-size: 19px; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

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

.wrap { max-width: 720px; margin: 0 auto; padding: 16px; }
.muted { color: var(--ink-soft); font-size: 14px; }
.stack > * + * { margin-top: 16px; }

.sheet {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 var(--line), 0 6px 18px -12px rgba(20,32,58,.35);
}

/* ---- বোতাম ---- */
.btn {
  display: inline-block; border: 1px solid var(--line); background: #fff;
  color: var(--ink); padding: 9px 14px; font: inherit; font-size: 15px;
  cursor: pointer; text-decoration: none;
}
.btn:active { background: var(--paper-2); }
.btn-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-block { display: block; width: 100%; text-align: center; padding: 13px; font-size: 16px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---- ফর্ম ---- */
label { display: block; font-size: 14px; color: var(--ink-soft); }
input[type=text], input[type=tel], input[type=number], input[type=date],
input[type=password], select, textarea {
  width: 100%; margin-top: 4px; padding: 10px 12px; font: inherit; font-size: 16px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 0;
}
textarea { line-height: 1.5; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checks { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.checks label { display: flex; align-items: center; gap: 7px; color: var(--ink); font-size: 15px; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--ink); }

.notice { border: 1px solid var(--tolet); background: #fff; padding: 12px; font-size: 14px; }
.notice-ok { border-color: var(--verified); }

/* ---- হেডার ---- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(243,241,234,.96); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; }
.brand { font-family: var(--font-display); font-size: 19px; text-decoration: none; }
.toolbar { display: flex; align-items: center; gap: 8px; padding: 0 16px 10px; flex-wrap: wrap; }
.toolbar .spacer { margin-left: auto; }

.segment { display: flex; border: 1px solid var(--line); background: #fff; }
.segment button { border: 0; background: none; font: inherit; font-size: 14px; padding: 7px 12px; cursor: pointer; color: var(--ink); }
.segment button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* ---- ম্যাপ ---- */
#map { width: 100%; height: calc(100dvh - 190px); min-height: 320px; }
.map-wrap { position: relative; }

.pin {
  transform: translateY(-6px); border: 1px solid var(--tolet); background: #fff;
  color: var(--ink); padding: 2px 7px; font-size: 13px; font-weight: 600;
  font-family: var(--font-ui); white-space: nowrap; position: relative;
}
.pin.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pin::after {
  content: ''; position: absolute; left: 50%; top: 100%;
  width: 1px; height: 8px; background: var(--tolet); transform: translateX(-50%);
}
.pin.is-active::after { background: var(--ink); }
.me-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--ink); border: 2px solid #fff; box-shadow: 0 0 0 5px rgba(20,32,58,.18); }

.strip {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; gap: 12px; overflow-x: auto; padding: 0 16px 16px;
  scroll-snap-type: x mandatory;
}
.strip > * { flex: 0 0 265px; scroll-snap-align: start; }

/* ---- কার্ড ---- */
.card { display: flex; gap: 12px; padding: 8px; text-decoration: none; }
.card.is-active { border-color: var(--ink); }
.card-photo {
  flex: 0 0 88px; height: 88px; background: var(--paper-2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 13px; color: var(--ink-soft); overflow: hidden;
}
.card-photo img { width: 100%; height: 100%; object-fit: cover; }
.card-body { min-width: 0; flex: 1; }
.card-title { font-family: var(--font-display); font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-rent { font-size: 16px; font-weight: 600; margin-top: 2px; }
.card-rent span { font-size: 13px; font-weight: 400; color: var(--ink-soft); }

.tag { border: 1px solid var(--line); background: #fff; padding: 3px 9px; font-size: 14px; display: inline-block; }
.tag-verified { border-color: var(--verified); color: var(--verified); font-size: 12px; padding: 1px 6px; }

/* ---- ফিল্টার শিট ---- */
.sheet-overlay { position: fixed; inset: 0; background: rgba(20,32,58,.32); z-index: 40; }
.filter-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--paper); border-top: 1px solid var(--line);
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  max-height: 85dvh; overflow-y: auto;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { border: 1px solid var(--line); background: #fff; padding: 7px 13px; font: inherit; font-size: 14px; cursor: pointer; color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
input[type=range] { width: 100%; accent-color: var(--ink); margin-top: 10px; }

/* ---- বিস্তারিত পেজ ---- */
.gallery { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.gallery img { flex: 0 0 85%; height: 230px; object-fit: cover; border: 1px solid var(--line); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.facts div { background: #fff; padding: 9px 12px; }
.facts dt { font-size: 13px; color: var(--ink-soft); }
.facts dd { margin: 2px 0 0; font-size: 15px; }
.prose { max-width: 62ch; white-space: pre-line; }

.contactbar {
  position: sticky; bottom: 0; background: rgba(243,241,234,.97); backdrop-filter: blur(6px);
  border-top: 1px solid var(--line); padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
}

.empty { padding: 20px; }
