@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap");

:root {
  --bg: #f4f0e8;
  --surface: #fffdf7;
  --surface-soft: #fff7e6;
  --surface-tint: #e6f4ef;
  --ink: #101828;
  --text: #16213e;
  --muted: #596274;
  --subtle: #7a8496;
  --border: rgba(22, 33, 62, 0.12);
  --primary: #2357d8;
  --primary-dark: #17327f;
  --accent: #0f9f8f;
  --accent-strong: #04786f;
  --sun: #f4b740;
  --coral: #e85d4f;
  --warning: #bb5500;
  --shadow-sm: 0 12px 28px rgba(16, 24, 40, 0.08);
  --shadow-md: 0 22px 55px rgba(16, 24, 40, 0.16);
  --shadow-pop: 0 26px 70px rgba(35, 87, 216, 0.18);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(35, 87, 216, 0.1), transparent 28%),
    linear-gradient(225deg, rgba(244, 183, 64, 0.2), transparent 32%),
    linear-gradient(180deg, #fff8e9 0%, var(--bg) 40%, #eaf4ef 100%);
  color: var(--text);
  font-family: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.42;
  background-image:
    linear-gradient(rgba(16, 24, 40, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 24, 40, 0.055) 1px, transparent 1px);
  background-size: 34px 34px;
}

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

button,
input,
select {
  font: inherit;
}

img {
  max-width: 100%;
}

.container {
  width: min(100% - 40px, var(--container));
  margin: 0 auto;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(20px, calc((100vw - var(--container)) / 2));
  background: rgba(255, 253, 247, 0.88);
  border-bottom: 1px solid rgba(22, 33, 62, 0.1);
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.logo-badge {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 0;
  border-radius: 14px;
  background:
    linear-gradient(135deg, var(--sun), #f08c68 48%, var(--primary));
  box-shadow: 0 14px 28px rgba(232, 93, 79, 0.22);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 850;
}

.site-name {
  overflow: hidden;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 850;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-btn {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.1);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.menu-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(41, 91, 219, 0.34);
  box-shadow: 0 12px 24px rgba(24, 33, 47, 0.1);
}

.menu-btn:active {
  transform: translateY(0);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.nav-roommate-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 750;
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.1);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.nav-roommate-btn svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.nav-roommate-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(41, 91, 219, 0.34);
  box-shadow: 0 12px 24px rgba(24, 33, 47, 0.1);
}

.nav-roommate-btn:active {
  transform: translateY(0);
}

.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(16, 24, 40, 0.42);
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(14px);
  transition: opacity 0.22s ease;
}

.menu-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu {
  position: fixed;
  top: 70px;
  right: 20px;
  left: auto;
  transform: translate(0, -10%) scale(0.92);
  transform-origin: top right;
  z-index: 1001;
  width: min(360px, calc(100vw - 40px));
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 26px;
  overflow-y: auto;
  background:
    linear-gradient(180deg, rgba(255, 248, 233, 0.98), rgba(230, 244, 239, 0.98));
  border: 1px solid rgba(22, 33, 62, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.26s ease, transform 0.26s ease;
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(0, 0) scale(1);
}

.menu-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(35, 87, 216, 0.16);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(244, 183, 64, 0.16));
}

.avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, #17327f, #0f9f8f);
  color: #ffffff;
  font-size: 1.25rem;
}

.profile-info {
  min-width: 0;
}

.profile-info strong,
.profile-info span {
  display: block;
}

.profile-info strong {
  overflow: hidden;
  font-size: 0.96rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-info span {
  color: var(--muted);
  font-size: 0.84rem;
}

.menu-divider {
  height: 1px;
  margin: 8px 0;
  background: var(--border);
}

.mobile-menu a {
  display: block;
  padding: 12px 10px;
  border-radius: var(--radius-md);
  color: var(--text);
  font-weight: 750;
  transition: background 0.18s ease, color 0.18s ease;
}

.mobile-menu a:hover {
  background: rgba(35, 87, 216, 0.1);
  color: var(--primary-dark);
}

.auth-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 6px;
}

.pill-btn,
.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 750;
  line-height: 1;
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.pill-btn {
  padding: 0 16px;
  border-radius: 999px;
  font-size: 0.92rem;
}

.pill-btn.primary,
.btn,
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #ffffff;
  box-shadow: 0 16px 32px rgba(35, 87, 216, 0.22);
}

.pill-btn.outline {
  border-color: rgba(35, 87, 216, 0.22);
  background: rgba(255, 255, 255, 0.78);
  color: var(--primary-dark);
}

.pill-btn:hover,
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(24, 33, 47, 0.12);
}

.pill-btn.logout,
#logoutBtn {
  grid-column: 1 / -1;
  background: #b42318;
  color: #ffffff;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
}

.auth-card {
  width: min(100%, 500px);
  padding: 40px 36px 32px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(47, 95, 232, 0.12);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(47, 95, 232, 0.06), transparent 32%);
  pointer-events: none;
}

.auth-card h1 {
  position: relative;
  margin: 0 0 14px;
  font-size: clamp(2rem, 2.4vw, 2.8rem);
  line-height: 1.02;
}

.auth-card p {
  color: var(--muted);
  margin-bottom: 26px;
  max-width: 100%;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-form input,
.auth-form select {
  width: 100%;
  min-height: 52px;
  padding: 16px 18px;
  border: 1px solid rgba(47, 95, 232, 0.18);
  border-radius: calc(var(--radius-md) + 4px);
  background: rgba(248, 250, 255, 0.95);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.auth-form input:focus,
.auth-form select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 5px rgba(47, 95, 232, 0.12);
  transform: translateY(-1px);
}

.auth-form button {
  width: 100%;
}

.form-error {
  min-height: 1.4rem;
  color: #b42318;
  font-size: 0.95rem;
}

.secondary-text {
  margin-top: 16px;
  text-align: center;
  color: var(--subtle);
  font-size: 0.95rem;
}

.secondary-text a {
  color: var(--primary);
  font-weight: 700;
}

#googleSignInButton {
  width: 100%;
  display: flex;
  justify-content: center;
}

.google-fallback-button {
  width: 100%;
  max-width: 360px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(47, 95, 232, 0.16);
  background: #f7f9ff;
  color: var(--text);
  font-weight: 700;
  border-radius: 14px;
  cursor: not-allowed;
  letter-spacing: 0.01em;
}

.google-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: #f8f8f8;
  color: #4285f4;
  font-weight: 700;
}

.google-fallback-note {
  margin-top: 8px;
  color: var(--subtle);
  font-size: 0.9rem;
  text-align: center;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 8px;
  color: var(--subtle);
  font-size: 0.95rem;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.hero {
  position: relative;
  min-height: 350px;
  display: grid;
  align-content: center;
  margin: 20px auto 28px;
  width: min(100% - 32px, calc(var(--container) + 80px));
  padding: 62px 24px 72px;
  overflow: hidden;
  color: #ffffff;
  text-align: center;
  background:
    linear-gradient(115deg, rgba(16, 24, 40, 0.94), rgba(23, 50, 127, 0.9) 54%, rgba(4, 120, 111, 0.9)),
    linear-gradient(135deg, var(--primary-dark), var(--accent-strong));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 150px;
  background:
    linear-gradient(135deg, transparent 0 58%, rgba(244, 183, 64, 0.55) 58% 59%, transparent 59%),
    linear-gradient(45deg, rgba(255, 255, 255, 0.12), transparent 52%);
}

.hero::after {
  content: "";
  position: absolute;
  top: 28px;
  right: 28px;
  width: 120px;
  height: 120px;
  border: 18px solid rgba(244, 183, 64, 0.22);
  border-radius: 50%;
}

.hero h1 {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  margin: 0 auto 12px;
  font-size: clamp(2.15rem, 4.5vw, 4rem);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.04;
}

.hero p {
  position: relative;
  z-index: 1;
  width: min(600px, 100%);
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.1rem;
  font-weight: 600;
}

.hero-search {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 24px));
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 12px;
  margin: 22px auto 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 20px;
  background: rgba(255, 253, 247, 0.94);
  box-shadow: 0 28px 70px rgba(16, 24, 40, 0.26);
}

.trust-strip,
.card-trust,
.detail-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trust-strip {
  position: relative;
  z-index: 1;
  justify-content: center;
  margin-top: 16px;
}

.trust-strip span,
.card-trust span,
.detail-trust span {
  border: 1px solid rgba(15, 159, 143, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1;
}

.trust-strip span {
  padding: 8px 11px;
  color: rgba(255, 255, 255, 0.92);
}

.hero-search input {
  min-width: 0;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  outline: none;
  padding: 0 18px;
  font-size: 0.98rem;
  font-weight: 650;
}

.hero-search input::placeholder {
  color: var(--subtle);
}

.hero-search select {
  min-width: 0;
  width: 150px;
  height: 46px;
  border: 0;
  border-left: 1px solid rgba(16, 24, 40, 0.12);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  outline: none;
  padding: 0 28px 0 16px;
  font-size: 0.9rem;
  font-weight: 650;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 16px;
}

.hero-search select:focus {
  border-radius: 12px;
  box-shadow: 0 0 0 2px rgba(15, 159, 143, 0.28);
}

.hero-search button {
  height: 46px;
  width: 46px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--sun);
  color: #33260b;
  cursor: pointer;
  font-weight: 800;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  transition: background 0.3s ease, transform 0.2s ease;
}

.hero-search button:hover {
  background: #ffd36d;
  transform: scale(1.08);
}

.hero-search button:active {
  transform: scale(0.95);
}

.clear-btn {
  height: 46px;
  width: 46px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(180, 35, 24, 0.1);
  color: #b42318;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  transition: background 0.3s ease, transform 0.2s ease;
}

.clear-btn:hover {
  background: rgba(180, 35, 24, 0.2);
  transform: scale(1.08);
}

.filter-panel {
  margin: 22px auto 0;
  width: min(660px, calc(100% - 24px));
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  padding: 16px 18px 18px;
  border-radius: 20px;
  background: rgba(255, 253, 247, 0.94);
  box-shadow: 0 28px 70px rgba(16, 24, 40, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 12px;
  flex: 1 1 580px;
}

.filter-field {
  display: grid;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text);
}

.filter-field span {
  color: var(--subtle);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.filter-field input {
  height: 44px;
  width: 100%;
  border: 1px solid rgba(22, 33, 62, 0.12);
  border-radius: 14px;
  padding: 0 14px;
  background: #ffffff;
  color: var(--text);
}

.filter-field input::placeholder {
  color: var(--subtle);
}

.filter-panel .btn.outline {
  min-width: 130px;
  padding: 12px 18px;
  border: 1px solid rgba(22, 33, 62, 0.16);
  background: transparent;
  color: var(--text);
}

.filter-panel .btn.outline:hover {
  background: rgba(255, 255, 255, 0.8);
}

.clear-btn:active {
  transform: scale(0.95);
}

.apartment-grid,
#apartments {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.apartment {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(22, 33, 62, 0.12);
  border-radius: 20px;
  background:
    linear-gradient(180deg, #ffffff 0%, #fff8ea 100%);
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.1);
  display: flex;
  flex-direction: column;
  height: 100%;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.apartment:hover,
.apartment:focus-visible {
  transform: translateY(-6px);
  border-color: rgba(15, 159, 143, 0.42);
  box-shadow: 0 28px 60px rgba(16, 24, 40, 0.17);
}

.apartment:focus-visible {
  outline: 3px solid rgba(35, 87, 216, 0.35);
  outline-offset: 4px;
}

.card-image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background:
    linear-gradient(135deg, #dbe7ff, #ffe6bc 54%, #d9f3e8),
    var(--surface-soft);
}

.card-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, transparent 0 44%, rgba(255, 255, 255, 0.4) 44% 45%, transparent 45%),
    linear-gradient(45deg, rgba(16, 24, 40, 0.08), transparent 62%);
}

.card-image img,
.card-placeholder {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #f4f0e8;
}

.card-image-wrapper {
  width: 100%;
  height: 220px;
  background-color: #f3f4f6; /* light neutral letterbox background */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
}

.card-image-wrapper img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.apartment > img {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: block;
  object-fit: cover;
  background: var(--surface-soft);
}

.card-placeholder {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(35, 87, 216, 0.18), rgba(244, 183, 64, 0.22), rgba(15, 159, 143, 0.18)),
    repeating-linear-gradient(45deg, rgba(16, 24, 40, 0.045) 0 10px, transparent 10px 20px);
}

.card-placeholder-label {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(16, 24, 40, 0.72);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
}

.video-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  background: rgba(16, 24, 40, 0.55);
  color: #ffffff;
  backdrop-filter: blur(6px);
}

.video-badge svg {
  width: 16px;
  height: 16px;
  margin-left: 2px; /* optically center the play triangle */
}

.distance-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(16, 24, 40, 0.88);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.verified-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 1;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  background: rgba(15, 159, 143, 0.95);
  color: #ffffff;
  backdrop-filter: blur(6px);
}

.verified-badge svg {
  width: 12px;
  height: 12px;
}

.card-body {
  display: flex;
  min-height: 214px;
  flex-direction: column;
  padding: 18px;
}

.card-body h3,
.apartment h3 {
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.25;
  min-height: 2.7em;
}

.location,
.apartment .location {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  min-height: 2.8em;
}

.price,
.apartment .price {
  margin: 14px 0 10px;
  color: var(--accent-strong);
  font-size: 1.22rem;
  font-weight: 850;
}

.card-trust {
  margin-bottom: 16px;
}

.card-trust span,
.detail-trust span {
  padding: 7px 9px;
  background: rgba(15, 159, 143, 0.1);
  color: var(--accent-strong);
  font-size: 0.72rem;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: auto;
  align-items: stretch;
}

.favorite-btn {
  min-width: 110px;
  border: 1px solid rgba(22, 33, 62, 0.12);
  background: #ffffff;
  color: var(--text);
  font-weight: 700;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.favorite-btn:hover {
  background: rgba(15, 159, 143, 0.08);
  transform: translateY(-1px);
}

.favorite-btn.saved {
  background: rgba(15, 159, 143, 0.12);
  border-color: rgba(15, 159, 143, 0.25);
  color: var(--accent-strong);
}

.btn.active {
  background: rgba(15, 159, 143, 0.12);
  border-color: rgba(15, 159, 143, 0.25);
}

.card-body .btn {
  width: 100%;
  margin-top: auto;
}

.roommate-page {
  min-height: 100vh;
}

.roommate-shell {
  width: min(100% - 40px, var(--container));
  margin: 0 auto;
  padding: 52px 0 78px;
}

.roommate-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 24px;
  align-items: end;
  margin-bottom: 28px;
}

.section-kicker {
  margin-bottom: 10px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.roommate-header h1 {
  max-width: 720px;
  color: var(--ink);
  font-size: clamp(2.1rem, 5vw, 4.35rem);
  line-height: 1.02;
  font-weight: 850;
}

.roommate-header p:not(.section-kicker) {
  max-width: 680px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 1.05rem;
}

.roommate-status,
.notice-panel,
.roommate-form,
.preview-card {
  border: 1px solid rgba(22, 33, 62, 0.12);
  background: rgba(255, 253, 247, 0.92);
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.1);
}

.roommate-status {
  min-height: 104px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 20px;
  border-radius: var(--radius-md);
}

.roommate-status span,
.preview-label,
.form-section-heading span {
  color: var(--subtle);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.form-field span {
  color: rgba(16, 24, 40, 0.88);
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
}

.roommate-status strong {
  color: var(--primary-dark);
  font-size: 1.45rem;
  line-height: 1.1;
}

.notice-panel {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #fff7e6, #ffffff);
}

.roommate-login-card {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding: 28px;
  border: 1px solid rgba(22, 33, 62, 0.12);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(255, 240, 206, 0.9), rgba(230, 244, 239, 0.9)),
    var(--surface);
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.1);
}

.roommate-login-card[hidden] {
  display: none;
}

.roommate-login-card span {
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.roommate-login-card h2 {
  color: var(--ink);
  font-size: clamp(1.45rem, 3vw, 2.25rem);
  line-height: 1.12;
}

.roommate-login-card p {
  max-width: 620px;
  color: var(--muted);
}

.locked-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.locked-actions .btn {
  width: auto;
  min-width: 150px;
  padding: 0 18px;
}

.notice-panel p {
  color: var(--muted);
}

.roommate-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 24px;
  align-items: start;
}

.roommate-form {
  display: grid;
  gap: 22px;
  padding: 24px;
  border-radius: var(--radius-lg);
}

.roommate-form[hidden],
.roommate-preview[hidden] {
  display: none;
}

.roommate-form.is-disabled {
  opacity: 0.72;
}

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

.form-section-heading,
.form-field-wide {
  grid-column: 1 / -1;
}

.form-section-heading {
  display: grid;
  gap: 4px;
  padding-bottom: 2px;
}

.form-section-heading p {
  color: var(--muted);
  font-size: 0.95rem;
}

.form-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 13px 14px;
  border: 1px solid rgba(22, 33, 62, 0.14);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.form-field textarea {
  min-height: 132px;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(35, 87, 216, 0.12);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding-top: 4px;
}

.form-actions .btn {
  min-width: 148px;
  padding: 0 18px;
}

.btn.outline {
  border-color: rgba(22, 33, 62, 0.16);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  box-shadow: none;
}

.btn.danger {
  border-color: rgba(180, 35, 24, 0.3);
  color: #b42318;
}

.form-message {
  min-height: 1.4rem;
  color: var(--muted);
  font-weight: 650;
}

.form-message[data-type="success"] {
  color: var(--accent-strong);
}

.form-message[data-type="error"] {
  color: #b42318;
}

.roommate-preview {
  position: sticky;
  top: 96px;
}

.preview-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  border-radius: var(--radius-lg);
}

.preview-avatar {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary-dark), var(--accent));
  color: #ffffff;
  font-size: 1.6rem;
  font-weight: 850;
}

.preview-card h2 {
  margin-top: 4px;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1.2;
}

.preview-card p {
  margin-top: 8px;
  color: var(--muted);
}

.preview-list {
  display: grid;
  gap: 12px;
}

.preview-list div {
  display: grid;
  gap: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(22, 33, 62, 0.1);
}

.preview-list dt {
  color: var(--subtle);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.preview-list dd {
  color: var(--text);
  font-weight: 750;
}

.section {
  padding: 74px 0;
}

.section-title {
  margin: 0 auto 34px;
  color: var(--text);
  font-size: clamp(1.55rem, 3vw, 2.55rem);
  font-weight: 850;
  line-height: 1.14;
  text-align: center;
}

.grid {
  display: grid;
  gap: 22px;
}

.steps-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.step-card,
.review-card {
  min-width: 0;
  border: 1px solid rgba(22, 33, 62, 0.12);
  border-radius: 20px;
  background: rgba(255, 253, 247, 0.9);
  box-shadow: 0 18px 38px rgba(16, 24, 40, 0.1);
}

.step-card {
  padding: 24px 20px;
  text-align: center;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.step-card:hover,
.step-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(16, 24, 40, 0.12);
}

.step-card:focus-visible {
  outline: 3px solid rgba(35, 87, 216, 0.35);
  outline-offset: 4px;
}

.step-card:nth-child(1) {
  background: linear-gradient(180deg, #fffdf7, #fff0ce);
}

.step-card:nth-child(2) {
  background: linear-gradient(180deg, #fffdf7, #e3f6ef);
}

.step-card:nth-child(3) {
  background: linear-gradient(180deg, #fffdf7, #e5edff);
}

.step-card:nth-child(4) {
  background: linear-gradient(180deg, #fffdf7, #ffe5df);
}

.step-card img {
  width: 58px;
  height: 58px;
  margin-bottom: 14px;
  object-fit: contain;
}

.step-card h3 {
  margin-bottom: 8px;
  font-size: 1rem;
  font-weight: 800;
}

.step-card p {
  color: var(--muted);
  font-size: 0.92rem;
}

.reviews {
  background:
    linear-gradient(180deg, rgba(16, 24, 40, 0), rgba(16, 24, 40, 0.04)),
    rgba(230, 244, 239, 0.56);
}

.reviews-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.review-card {
  padding: 24px;
  background: #ffffff;
}

.review-avatar {
  width: 52px;
  height: 52px;
  display: block;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--surface-tint);
  object-fit: cover;
}

.review-card p {
  color: #344054;
  font-size: 0.96rem;
}

.review-card strong {
  display: block;
  margin-top: 14px;
  color: var(--text);
  font-size: 0.9rem;
  font-style: normal;
}

.cta {
  padding-top: 24px;
  padding-bottom: 32px;
}

.cta-container {
  width: min(100% - 40px, var(--container));
  padding: 54px 24px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(23, 50, 127, 0.96), rgba(4, 120, 111, 0.92)),
    var(--primary-dark);
  box-shadow: var(--shadow-pop);
  text-align: center;
  color: #ffffff;
}

.cta-container h2 {
  width: min(680px, 100%);
  margin: 0 auto 20px;
  color: #ffffff;
  font-size: clamp(1.45rem, 3vw, 2.25rem);
  font-weight: 850;
  line-height: 1.15;
}

.cta-container .btn,
.cta-container .btn-primary {
  width: auto;
  padding: 0 24px;
}

.about-page {
  background:
    linear-gradient(135deg, rgba(244, 183, 64, 0.16), transparent 28%),
    linear-gradient(180deg, #fff8e9 0%, #eaf4ef 46%, #f8fafc 100%);
}

.about-hero {
  padding: 88px 0 72px;
  background:
    linear-gradient(115deg, rgba(16, 24, 40, 0.96), rgba(23, 50, 127, 0.92) 58%, rgba(4, 120, 111, 0.9)),
    var(--primary-dark);
  color: #ffffff;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.14);
}

.about-hero-inner {
  display: grid;
  gap: 18px;
}

.section-kicker {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.about-hero .section-kicker {
  color: #ffd36d;
}

.about-hero h1 {
  width: min(850px, 100%);
  font-size: clamp(2.1rem, 5vw, 4.2rem);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.04;
}

.about-hero p {
  width: min(680px, 100%);
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.08rem;
  font-weight: 600;
}

.about-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.about-hero-actions .btn.outline-light {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #ffffff;
  box-shadow: none;
}

.about-section {
  padding: 72px 0;
}

.about-band {
  background:
    linear-gradient(135deg, rgba(230, 244, 239, 0.82), rgba(255, 240, 206, 0.72));
  border-top: 1px solid rgba(22, 33, 62, 0.1);
  border-bottom: 1px solid rgba(22, 33, 62, 0.1);
}

.about-split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 42px;
  align-items: start;
}

.about-split h2,
.about-section-heading h2,
.contact-panel h2 {
  margin-top: 8px;
  color: var(--text);
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 850;
  line-height: 1.12;
}

.about-copy {
  display: grid;
  gap: 16px;
  color: var(--muted);
  font-size: 1rem;
}

.about-section-heading {
  width: min(720px, 100%);
  margin-bottom: 28px;
}

.about-section-heading p,
.contact-panel p {
  margin-top: 12px;
  color: var(--muted);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.about-card,
.benefit-item,
.contact-panel {
  border: 1px solid rgba(22, 33, 62, 0.12);
  background: rgba(255, 253, 247, 0.92);
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.1);
}

.about-card {
  padding: 24px;
  border-radius: 20px;
}

.about-card:nth-child(1) {
  background: linear-gradient(180deg, #fffdf7, #fff0ce);
}

.about-card:nth-child(2) {
  background: linear-gradient(180deg, #fffdf7, #e5edff);
}

.about-card:nth-child(3) {
  background: linear-gradient(180deg, #fffdf7, #e3f6ef);
}

.about-card h3,
.benefit-item strong {
  color: var(--text);
  font-size: 1rem;
  font-weight: 850;
}

.about-card p,
.benefit-item p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.94rem;
}

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

.benefit-item {
  padding: 22px;
  border-radius: var(--radius-md);
  border-left: 5px solid var(--accent);
}

.benefit-item:nth-child(2) {
  border-left-color: var(--sun);
}

.benefit-item:nth-child(3) {
  border-left-color: var(--primary);
}

.benefit-item:nth-child(4) {
  border-left-color: var(--coral);
}

.contact-section {
  padding-top: 20px;
}

.contact-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 34px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 240, 206, 0.88), rgba(230, 244, 239, 0.88)),
    #fffdf7;
}

.contact-button {
  flex: 0 0 auto;
  padding: 0 22px;
}

.loading {
  grid-column: 1 / -1;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #e5eaf0;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

.skeleton-card {
  min-height: 340px;
  padding: 14px;
}

.skeleton-img {
  height: 165px;
  margin-bottom: 14px;
}

.skeleton-line {
  height: 14px;
  margin-bottom: 10px;
}

.skeleton-line.short {
  width: 60%;
}

.skeleton-line.medium {
  width: 82%;
}

.detail-page {
  background:
    linear-gradient(135deg, rgba(244, 183, 64, 0.14), transparent 28%),
    linear-gradient(180deg, #fff8e9 0, #f8faf9 360px, var(--bg) 100%);
}

.top-bar {
  width: min(100% - 40px, var(--container));
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px auto 18px;
}

.top-bar h1 {
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  line-height: 1.1;
}

.back-btn {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(35, 87, 216, 0.22);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--primary-dark);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  font-weight: 750;
}

.details-card {
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(35, 87, 216, 0.08), rgba(244, 183, 64, 0.08) 220px, rgba(255, 255, 255, 0) 360px),
    var(--surface);
  box-shadow: none;
}

.details-card h2 {
  margin-bottom: 6px;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.detail-hero-image {
  width: min(100% - 40px, var(--container));
  height: 480px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(22, 33, 62, 0.12);
  border-radius: 22px;
  background: #14181f;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-hero-image img,
.detail-hero-image video,
.detail-placeholder {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}

.detail-placeholder {
  width: 100%;
  height: 100%;
  background:
    linear-gradient(135deg, rgba(35, 87, 216, 0.18), rgba(244, 183, 64, 0.22), rgba(15, 159, 143, 0.18)),
    repeating-linear-gradient(45deg, rgba(16, 24, 40, 0.045) 0 12px, transparent 12px 24px);
}

.carousel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease;
}

.carousel-slide {
  flex: 0 0 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #14181f;
}

.carousel-slide img,
.carousel-slide video {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(16, 24, 40, 0.55);
  color: #ffffff;
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s ease;
}

.carousel-btn:hover {
  background: rgba(16, 24, 40, 0.78);
}

.carousel-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.carousel-btn.prev {
  left: 14px;
}

.carousel-btn.next {
  right: 14px;
}

.carousel-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}

.carousel-dot.active {
  background: #ffffff;
  transform: scale(1.3);
}

.carousel-count {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(16, 24, 40, 0.55);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
}

.detail-content {
  width: min(100% - 40px, var(--container));
  margin: 0 auto;
  padding: 34px 0 40px;
}

.detail-loading-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(220, 227, 234, 0.9);
}

.detail-skeleton-title {
  width: min(520px, 64vw);
  height: 34px;
  margin-bottom: 12px;
}

.detail-skeleton-location {
  width: min(380px, 52vw);
  height: 18px;
}

.detail-skeleton-status {
  width: 92px;
  height: 32px;
  border-radius: 999px;
}

.detail-stat-skeleton {
  min-height: 92px;
}

.detail-loading-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

.detail-loading-chips span {
  width: 118px;
  height: 36px;
  border-radius: 999px;
}

.detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(220, 227, 234, 0.9);
}

.detail-status {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(15, 159, 143, 0.12);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 850;
}

.detail-trust {
  margin-top: 12px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 22px;
}

.detail-grid div {
  min-height: 92px;
  padding: 14px;
  border: 1px solid rgba(22, 33, 62, 0.12);
  border-left: 5px solid var(--primary);
  border-radius: var(--radius-md);
  background:
    linear-gradient(135deg, rgba(35, 87, 216, 0.08), rgba(255, 255, 255, 0) 60%),
    var(--surface);
  box-shadow: 0 14px 30px rgba(16, 24, 40, 0.09);
}

.detail-grid div:nth-child(2) {
  border-left-color: var(--sun);
}

.detail-grid div:nth-child(3) {
  border-left-color: var(--accent);
}

.detail-grid div:nth-child(4) {
  border-left-color: var(--coral);
}

.detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.detail-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: clamp(0.98rem, 1.5vw, 1.08rem);
  line-height: 1.2;
}

.detail-section {
  padding-top: 20px;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

.detail-section h3 {
  margin-bottom: 12px;
  font-size: 1rem;
  font-weight: 850;
}

.amenity-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.amenity-list span {
  padding: 8px 12px;
  border: 1px solid rgba(15, 159, 143, 0.18);
  border-radius: 999px;
  background: rgba(15, 159, 143, 0.1);
  color: var(--accent-strong);
  font-size: 0.88rem;
  font-weight: 700;
}

.landlord-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border: 1px solid rgba(15, 159, 143, 0.18);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(15, 159, 143, 0.1), rgba(244, 183, 64, 0.12)),
    var(--surface);
}

.muted {
  color: var(--muted);
}

.landlord-panel-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .landlord-panel-actions {
    width: 100%;
  }

  .landlord-panel-actions .detail-action {
    width: 100%;
  }
}

.detail-action {
  width: auto;
  min-width: 160px;
  padding: 0 18px;
}

.detail-empty {
  padding: 34px 24px;
  text-align: center;
}

.detail-empty p {
  width: min(480px, 100%);
  margin: 10px auto 20px;
  color: var(--muted);
}

#map,
.details-map {
  width: min(100% - 40px, var(--container));
  height: 440px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface-soft);
  box-shadow: var(--shadow-sm);
}

.map-section {
  width: 100%;
  padding: 42px 0;
  background:
    linear-gradient(180deg, rgba(255, 248, 233, 0), rgba(230, 244, 239, 0.72)),
    #fffdf7;
}

.map-loading {
  position: relative;
}

.leaflet-container {
  cursor: grab;
}

.leaflet-control-zoom a {
  color: var(--primary-dark);
  font-weight: 850;
}

.detail-roommate {
  width: 100%;
  padding: 56px 0 72px;
  background:
    linear-gradient(135deg, rgba(16, 24, 40, 0.96), rgba(23, 50, 127, 0.9) 58%, rgba(4, 120, 111, 0.9)),
    var(--primary-dark);
  color: #ffffff;
}

.roommate-coming-inner {
  width: min(100% - 40px, var(--container));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin: 0 auto;
}

.detail-roommate .section-kicker {
  display: inline-flex;
  margin-bottom: 10px;
  color: #b7f7c8;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.detail-roommate h2 {
  max-width: 620px;
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  line-height: 1.12;
}

.detail-roommate p {
  max-width: 680px;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.78);
}

.detail-roommate .pill-btn {
  flex: 0 0 auto;
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

@media (max-width: 760px) {
  .container,
  .cta-container,
  #map,
  .details-map,
  .detail-hero-image,
  .detail-content,
  .roommate-coming-inner,
  .top-bar {
    width: min(100% - 28px, var(--container));
  }

  .detail-hero-image {
    height: 320px;
  }

  .roommate-shell {
    width: min(100% - 28px, var(--container));
    padding: 34px 0 56px;
  }

  .roommate-header,
  .roommate-layout,
  .form-section {
    grid-template-columns: 1fr;
  }

  .roommate-header {
    align-items: start;
  }

  .roommate-preview {
    position: static;
  }

  .notice-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .notice-panel .btn {
    width: 100%;
  }

  .roommate-form {
    padding: 18px;
  }

  .form-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .form-actions .btn {
    width: 100%;
  }

  .details-card {
    width: 100%;
  }

  .navbar {
    height: 64px;
    padding: 0 14px;
  }

  .site-name {
    font-size: 1rem;
  }

  .hero {
    min-height: 260px;
    padding: 36px 18px 52px;
  }

  .hero h1 {
    font-size: clamp(1.4rem, 4vw, 2.5rem);
    margin-bottom: 10px;
  }

  .hero p {
    font-size: 0.9rem;
  }

  .hero-search {
    display: flex;
    flex-wrap: wrap;
    grid-template-columns: unset;
    border-radius: var(--radius-lg);
  }

  .hero-search input {
    flex: 1 1 100%;
    width: 100%;
  }

  .hero-search select {
    flex: 1 1 auto;
    width: auto;
    border-left: 0;
    border-top: 1px solid rgba(16, 24, 40, 0.12);
  }

  .hero-search button,
  .clear-btn {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .filter-panel {
    width: min(100%, calc(100% - 28px));
    margin: 18px auto 0;
  }

  .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section {
    padding: 54px 0;
  }

  .card-body {
    padding: 12px;
  }

  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-heading,
  .landlord-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .roommate-coming-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-action {
    width: 100%;
  }

  .auth-actions {
    grid-template-columns: 1fr;
  }

  .reviews-grid {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    gap: 14px;
    padding-bottom: 8px;
  }

  .review-card {
    flex: 0 0 calc(100vw - 56px);
    scroll-snap-align: start;
    padding: 16px 14px;
  }

  .about-hero {
    padding: 58px 0 50px;
  }

  .about-section {
    padding: 52px 0;
  }

  .about-split {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 24px;
  }

  .about-grid,
  .benefit-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-panel {
    align-items: center;
    flex-direction: row;
    padding: 28px;
  }

  .contact-button {
    width: auto;
  }
}

@media (max-width: 480px) {
  .nav-roommate-btn {
    width: 44px;
    padding: 0;
    justify-content: center;
  }

  .nav-roommate-btn span {
    display: none;
  }
}

@media (max-width: 430px) {
  .hero {
    min-height: 240px;
    padding: 32px 14px 48px;
  }

  .hero h1 {
    font-size: 1.6rem;
    margin-bottom: 8px;
  }

  .hero p {
    font-size: 0.85rem;
  }

  .detail-hero-image {
    height: 240px;
  }

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

  .apartment-grid,
  #apartments {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .card-body {
    min-height: 286px;
    padding: 10px 12px 12px;
    gap: 2px;
  }

  .card-body h3,
  .apartment h3 {
    font-size: 0.9rem;
    min-height: 3.45em;
    margin-bottom: 4px;
  }

  .location,
  .apartment .location {
    font-size: 0.8rem;
    min-height: 4.2em;
    margin-top: 0;
  }

  .price,
  .apartment .price {
    margin: 4px 0 4px;
    font-size: 0.95rem;
  }

  .card-trust {
    align-content: flex-start;
    min-height: 60px;
    margin-bottom: 10px;
  }

  .card-trust span {
    padding: 6px 8px;
    font-size: 0.66rem;
  }

  .card-body .btn {
    min-height: 38px;
    font-size: 0.85rem;
    padding: 0 12px;
  }

  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .step-card,
  .review-card {
    padding: 16px 12px;
  }

  .step-card h3 {
    font-size: 0.9rem;
  }

  .step-card p,
  .review-card p {
    font-size: 0.8rem;
  }

  .step-card img {
    width: 44px;
    height: 44px;
    margin-bottom: 10px;
  }

  .review-avatar {
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
  }

  .filter-panel {
    width: 100%;
    padding: 0 14px;
  }

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

  .about-split {
    grid-template-columns: 1fr;
  }

  .about-grid,
  .benefit-list {
    grid-template-columns: 1fr;
  }

  .contact-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .contact-button {
    width: 100%;
  }

  .card-actions {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .favorite-btn {
    min-width: 0;
    font-size: 0.8rem;
    padding: 0 8px;
  }
}
.password-container {
  position: relative;
  width: 100%;
}

.password-container input {
  width: 100%;
  box-sizing: border-box;
  padding-right: 45px;
}

.toggle-password {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  user-select: none;
  font-size: 18px;
}