/*
Theme Name: Roommate Mobile Theme
Theme URI: https://example.com/
Author: Shwan
Description: A mobile-first WordPress theme for Have Room / Need Room roommate listings.
Version: 2.0.0
Text Domain: roommate-mobile-theme
*/

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

/* =========================================================
   1. ROOT VARIABLES
   ========================================================= */
:root {
  /* Core 4-color palette */
  --green:        #58CC02;
  --green-light:  #89E219;
  --charcoal:     #4B4B4B;
  --white:        #FFFFFF;

  /* Functional aliases */
  --color-primary:     var(--green);
  --color-primary-alt: var(--green-light);
  --color-dark:        var(--charcoal);
  --color-dark-deep:   #363636;

  /* Surfaces & borders */
  --color-bg:          var(--white);
  --color-surface:     var(--white);
  --color-surface-alt: #F5F5F5;
  --color-border:      #E4E4E4;

  /* Text */
  --color-text:        #1A1A1A;
  --color-text-soft:   #4B4B4B;
  --color-text-muted:  #888888;

  /* Shadows */
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 28px rgba(0,0,0,0.10);
  --shadow-lg: 0 20px 56px rgba(0,0,0,0.13);

  /* Radius */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 30px;

  --container: 1200px;

  --sp-4:  1rem;
  --sp-6:  1.5rem;
  --sp-8:  2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;

  --font: 'Poppins', 'Segoe UI', Arial, sans-serif;
  --transition: 0.2s ease;
}

/* =========================================================
   2. RESET / BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
a { color: inherit; text-decoration: none; transition: var(--transition); }
button, input, select, textarea { font: inherit; }
ul, ol { padding-left: 1.25rem; }

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  line-height: 1.2;
  font-family: var(--font);
  color: var(--color-text);
  font-weight: 700;
}

p { margin-top: 0; color: var(--color-text-soft); }
.site-main { min-height: 60vh; }
.container { width: min(100% - 2rem, var(--container)); margin-inline: auto; }

/* =========================================================
   3. UTILITY
   ========================================================= */
.archive-badge, .section-badge, .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(88,204,2,0.1);
  color: var(--charcoal);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid rgba(88,204,2,0.2);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.3rem;
  min-height: 44px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}
.btn:hover  { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
  box-shadow: 0 2px 14px rgba(88,204,2,0.30);
}
.btn-primary:hover {
  background: #4ab800;
  border-color: #4ab800;
  box-shadow: 0 6px 22px rgba(88,204,2,0.40);
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--charcoal);
  border-color: var(--color-border);
}
.btn-secondary:hover {
  background: var(--color-surface-alt);
  border-color: #BEBEBE;
  box-shadow: var(--shadow-sm);
}

.btn-outline {
  background: transparent;
  color: var(--color-text-soft);
  border-color: var(--color-border);
}
.btn-outline:hover {
  color: var(--color-text);
  border-color: var(--charcoal);
  background: rgba(0,0,0,0.03);
}

.btn[disabled], .btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  transform: none !important;
  box-shadow: none !important;
}

.section-heading { max-width: 680px; margin-bottom: var(--sp-8); }
.section-heading h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0.75rem 0 0.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.section-heading p { margin-bottom: 0; }

.empty-state {
  padding: var(--sp-12);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

/* =========================================================
   4. HEADER
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow 0.3s ease;
}
.site-header.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.07); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
}

.site-branding { flex-shrink: 0; width: 300px; max-width: 300px; }
.site-logo-link { display: inline-flex; align-items: center; width: 100%; }
.site-logo-img, .site-branding img, .custom-logo-link img {
  display: block;
  width: 100%;
  max-width: 300px;
  height: auto;
  max-height: 44px;
  object-fit: contain;
  object-position: left center;
}
.site-logo-text { font-size: 1.2rem; font-weight: 800; color: var(--charcoal); letter-spacing: -0.03em; }

@media (min-width: 1024px) {
  .site-branding { width: 340px; max-width: 340px; }
  .site-logo-img, .site-branding img, .custom-logo-link img { max-width: 340px; max-height: 56px; }
  .site-header__inner { min-height: 80px; }
}
@media (max-width: 767px) {
  .site-branding { width: 190px; max-width: 190px; }
  .site-logo-img, .site-branding img, .custom-logo-link img { max-width: 190px; max-height: 42px; }
}

.footer-brand img { max-height: 40px; width: auto; }

.desktop-nav { display: none; flex: 1; justify-content: center; }
.menu { list-style: none; padding: 0; margin: 0; }
.primary-menu, .footer-menu { display: flex; align-items: center; gap: 0.15rem; }

.primary-menu a, .footer-menu a, .mobile-menu-list a {
  display: inline-block;
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--color-text-soft);
  transition: color 0.18s, background 0.18s;
}
.primary-menu a:hover, .footer-menu a:hover, .mobile-menu-list a:hover {
  color: var(--color-text);
  background: var(--color-surface-alt);
}
.primary-menu .current-menu-item > a,
.primary-menu .current-page-ancestor > a,
.primary-menu .current-menu-ancestor > a {
  color: var(--green);
  background: rgba(88,204,2,0.10);
  font-weight: 700;
}

.site-header__actions { display: flex; align-items: center; gap: 0.5rem; }
.header-btn { display: none; }

.mobile-menu-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 42px;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: 12px;
  padding: 0;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}
.mobile-menu-toggle:hover { border-color: var(--charcoal); box-shadow: var(--shadow-md); }
.mobile-menu-toggle span {
  display: block;
  width: 18px; height: 2px;
  background: var(--color-text);
  border-radius: 999px;
  position: absolute;
  transition: transform 0.32s cubic-bezier(0.23,1,0.32,1), opacity 0.22s ease, top 0.32s cubic-bezier(0.23,1,0.32,1);
  left: 50%;
  transform-origin: center;
}
.mobile-menu-toggle span:nth-child(1) { top: calc(50% - 6px); transform: translateX(-50%); }
.mobile-menu-toggle span:nth-child(2) { top: 50%; transform: translate(-50%,-50%); }
.mobile-menu-toggle span:nth-child(3) { top: calc(50% + 4px); transform: translateX(-50%); }
.mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) { top: 50%; transform: translate(-50%,-50%) rotate(45deg); }
.mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: translate(-50%,-50%) scaleX(0); }
.mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) { top: 50%; transform: translate(-50%,-50%) rotate(-45deg); }

.mobile-menu {
  border-top: 1px solid var(--color-border);
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.38s cubic-bezier(0.23,1,0.32,1), opacity 0.28s ease;
  opacity: 0;
}
.mobile-menu.is-open { max-height: 600px; opacity: 1; }
.mobile-menu[hidden] { display: block !important; }

.mobile-nav { padding: 1rem 0 1.25rem; }

.mobile-menu-list {
  display: grid; gap: 0.1rem;
  list-style: none; padding: 0; margin: 0 0 0.75rem;
}
.mobile-menu-list a {
  display: flex; align-items: center;
  padding: 0.7rem 0.5rem;
  border-radius: 10px;
  font-weight: 600; font-size: 0.95rem;
  color: var(--color-text-soft);
}
.mobile-menu-list a:hover { background: var(--color-surface-alt); color: var(--color-text); }
.mobile-menu-list .current-menu-item > a,
.mobile-menu-list .current-page-ancestor > a {
  color: var(--green);
  background: rgba(88,204,2,0.08);
  font-weight: 700;
}

.mobile-menu-actions {
  display: grid; gap: 0.55rem;
  margin-top: 0.5rem; padding-top: 0.9rem;
  border-top: 1px solid var(--color-border);
}
.mobile-menu-btn { width: 100%; justify-content: center; min-height: 46px; font-size: 0.95rem; }

/* =========================================================
   5. HERO / FRONT PAGE
   ========================================================= */
.hero-section { padding: var(--sp-12) 0 var(--sp-10); }
.hero-grid { display: grid; gap: var(--sp-8); }

.hero-content {
  background: #F7FFF0;
  border: 1px solid rgba(88,204,2,0.18);
  border-radius: var(--radius-xl);
  padding: clamp(1.5rem, 3vw, 3rem);
  box-shadow: var(--shadow-md);
}

.hero-title {
  margin: 1rem 0;
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  letter-spacing: -0.03em;
  font-weight: 800;
  max-width: 12ch;
}
.hero-description { font-size: 1.05rem; max-width: 55ch; margin-bottom: 1.5rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.5rem; }

.hero-stats { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0.85rem; }
.hero-stat {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem;
}
.hero-stat strong { display: block; font-size: 1.6rem; font-weight: 700; color: var(--green); margin-bottom: 0.15rem; }
.hero-stat span { color: var(--color-text-muted); font-size: 0.9rem; }

.hero-card__box {
  height: 100%;
  background: var(--charcoal);
  color: var(--white);
  border-radius: var(--radius-xl);
  padding: clamp(1.5rem, 3vw, 2.4rem);
  box-shadow: var(--shadow-lg);
}
.hero-card__box h2, .hero-card__box p, .hero-option h3, .hero-option p { color: inherit; }
.hero-card__options { display: grid; gap: 1rem; margin-top: 1.25rem; }

.hero-option {
  display: block;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  padding: 1.1rem;
}
.hero-option:hover { background: rgba(255,255,255,0.14); transform: translateY(-2px); }

/* =========================================================
   6. QUICK SEARCH / SECTIONS
   ========================================================= */
.quick-search-section, .listing-section, .how-it-works-section,
.cta-section, .archive-hero, .archive-filters, .archive-listings {
  padding: var(--sp-10) 0;
}

.quick-search-grid, .steps-grid { display: grid; gap: 1rem; }

.quick-search-card, .step-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.quick-search-card:hover, .step-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.step-number {
  display: inline-flex;
  width: 42px; height: 42px;
  border-radius: 999px;
  align-items: center; justify-content: center;
  background: var(--green);
  color: #fff;
  font-weight: 800; font-size: 0.9rem;
  margin-bottom: 0.9rem;
}

/* =========================================================
   7. LISTINGS
   ========================================================= */
.listing-grid { display: grid; gap: 1.25rem; }

.listing-card {
  display: flex; flex-direction: column;
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.listing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.listing-card__image-link { display: block; }
.listing-card__image { aspect-ratio: 16/10; overflow: hidden; background: var(--color-surface-alt); }
.listing-card__image img { width: 100%; height: 100%; object-fit: cover; }
.listing-card__image--placeholder { display: grid; place-items: center; color: var(--color-text-muted); font-weight: 700; }

.listing-card__content { display: flex; flex-direction: column; gap: 0.85rem; padding: 1.15rem; height: 100%; }
.listing-card__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; }
.listing-card__price { font-size: 1.05rem; font-weight: 700; color: var(--green); }
.listing-card__available { color: var(--color-text-muted); font-size: 0.88rem; }
.listing-card__title { font-size: 1.15rem; margin: 0; font-weight: 700; }
.listing-card__title a:hover { color: var(--green); }
.listing-card__address { margin: 0; color: var(--color-text-muted); font-size: 0.9rem; }

.listing-card__chips, .single-listing__chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.listing-chip {
  display: inline-flex; align-items: center;
  padding: 0.38rem 0.78rem;
  border-radius: 999px;
  background: rgba(88,204,2,0.08);
  border: 1px solid rgba(88,204,2,0.2);
  color: var(--charcoal);
  font-size: 0.82rem; font-weight: 600;
}

.listing-card__person { background: var(--color-surface-alt); border-radius: var(--radius-md); padding: 0.85rem; }
.listing-card__person strong { display: inline-block; margin-bottom: 0.4rem; font-size: 0.9rem; }
.listing-card__person ul { margin: 0; padding-left: 1rem; color: var(--color-text-soft); font-size: 0.88rem; }
.listing-card .btn { margin-top: auto; }

/* =========================================================
   8. SINGLE PAGES
   ========================================================= */
.single-page { padding: var(--sp-10) 0; }

.single-listing__header { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.5rem; }
.single-listing__header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0.75rem 0; font-weight: 800; letter-spacing: -0.02em;
}
.single-listing__price { font-size: 1.2rem; font-weight: 700; color: var(--green); }

.single-listing__media { overflow: hidden; border-radius: var(--radius-xl); margin-bottom: 1.5rem; box-shadow: var(--shadow-md); }
.single-listing__media img { width: 100%; max-height: 520px; object-fit: cover; }

.single-listing__grid { display: grid; gap: 1.25rem; }

.single-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.3rem;
  box-shadow: var(--shadow-sm);
}
.single-card h2 { margin-bottom: 1rem; font-size: 1.15rem; font-weight: 700; }

.detail-list { list-style: none; padding: 0; margin: 0; }
.detail-list li { padding: 0.65rem 0; border-bottom: 1px solid var(--color-border); color: var(--color-text-soft); font-size: 0.92rem; }
.detail-list li:last-child { border-bottom: 0; }
.entry-content > *:last-child { margin-bottom: 0; }

/* =========================================================
   9. ARCHIVE FILTERS
   ========================================================= */
.filter-form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.filter-grid { display: grid; gap: 1rem; }

.filter-group label { display: inline-block; margin-bottom: 0.42rem; font-weight: 600; font-size: 0.88rem; color: var(--color-text); }
.filter-group input, .filter-group select, .filter-group textarea {
  width: 100%;
  min-height: 48px;
  border: 1.5px solid var(--color-border);
  border-radius: 12px;
  background: var(--white);
  padding: 0.75rem 0.95rem;
  color: var(--color-text);
  font-size: 0.93rem;
  font-family: var(--font);
  transition: border-color 0.18s, box-shadow 0.18s;
}
.filter-group textarea { min-height: 120px; }
.filter-group input:focus, .filter-group select:focus, .filter-group textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(88,204,2,0.14);
}

.filter-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: end; }

/* =========================================================
   10. CTA
   ========================================================= */
.cta-box {
  display: grid; gap: 1.25rem;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  background: var(--charcoal);
  color: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}
.cta-box h2, .cta-box p { color: inherit; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* =========================================================
   11. FOOTER
   ========================================================= */
.site-footer--simple { padding: 1.25rem 0; background: #222; text-align: center; }

.simple-footer {
  width: 100%;
  display: flex; align-items: center; justify-content: center;
  gap: 0.75rem; flex-wrap: wrap; text-align: center;
}

.simple-footer__text { margin: 0; color: rgba(255,255,255,0.65); font-size: 0.88rem; }

.simple-footer__social {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 999px;
}
.simple-footer__social:hover { color: var(--green); border-color: rgba(88,204,2,0.45); }

/* =========================================================
   12. MOBILE BOTTOM NAV
   ========================================================= */
.mobile-bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 999;
  display: grid; grid-template-columns: repeat(4,1fr);
  background: rgba(255,255,255,0.98);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -6px 20px rgba(0,0,0,0.07);
}
.mobile-bottom-nav__item {
  display: grid; place-items: center; gap: 0.2rem;
  padding: 0.65rem 0.4rem;
  color: var(--color-text-soft);
  font-size: 0.75rem; font-weight: 600;
}
.mobile-bottom-nav__item:hover { color: var(--green); }
.mobile-bottom-nav__icon { font-size: 1.1rem; line-height: 1; }

/* =========================================================
   13. PAGINATION
   ========================================================= */
.pagination-wrap { margin-top: 2rem; }
.pagination, .nav-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; min-height: 42px;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  font-weight: 600; font-size: 0.9rem;
}
.page-numbers.current, .page-numbers:hover {
  background: var(--green); color: #fff; border-color: var(--green);
}

/* =========================================================
   14. RESPONSIVE
   ========================================================= */
@media (min-width: 768px) {
  .header-btn { display: inline-flex; }
  .mobile-menu-toggle { display: none; }
  .mobile-menu { display: none !important; }
  .desktop-nav { display: flex; }
  .quick-search-grid, .steps-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .listing-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .filter-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: 1.2fr 0.8fr; align-items: stretch; }
  .listing-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .single-listing__header { flex-direction: row; justify-content: space-between; align-items: flex-start; }
  .single-listing__grid { grid-template-columns: minmax(0,2fr) minmax(300px,0.95fr); }
  .filter-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .filter-actions { grid-column: 1 / -1; }
}

@media (min-width: 1100px) {
  .quick-search-grid, .steps-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
}

@media (min-width: 1200px) { .mobile-bottom-nav { display: none; } }

@media (max-width: 767px) {
  .site-header__actions { gap: 0.4rem; }
  .hero-title { max-width: none; }
  .cta-actions, .hero-actions, .filter-actions { flex-direction: column; }
  .cta-actions .btn, .hero-actions .btn, .filter-actions .btn { width: 100%; }
}

/* =========================================================
   15. ACCESSIBILITY
   ========================================================= */
a:focus-visible, button:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(88,204,2,0.4);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* =========================================================
   RMT-HERO
   ========================================================= */
.rmt-hero { padding: clamp(2.5rem,6vw,4.5rem) 0 clamp(2rem,5vw,3.5rem); }

.rmt-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: rgba(88,204,2,0.10);
  border: 1px solid rgba(88,204,2,0.24);
  color: var(--charcoal);
  font-size: 0.73rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.36rem 0.88rem; border-radius: 999px; margin-bottom: 1.25rem;
}

.rmt-hero__eyebrow-dot {
  width: 7px; height: 7px; background: var(--green);
  border-radius: 50%; flex-shrink: 0;
  animation: rmt-pulse 2s ease-in-out infinite;
}
@keyframes rmt-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.65); }
}

.rmt-hero__headline {
  font-size: clamp(2.6rem,6vw,4.4rem);
  line-height: 1.05; color: var(--color-text);
  max-width: 780px; margin: 0 0 1.1rem;
  letter-spacing: -0.02em; font-weight: 800;
}
.rmt-hero__headline mark {
  background: none; color: var(--charcoal);
  position: relative; display: inline-block; padding-bottom: 2px;
}
.rmt-hero__headline mark::after {
  content: ''; position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 4px; background: var(--green);
  border-radius: 2px; opacity: 0.75;
}

.rmt-hero__sub {
  font-size: 1.05rem; color: var(--color-text-soft);
  max-width: 510px; line-height: 1.65; margin-bottom: 2rem;
}

.rmt-hero__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; margin-bottom: 1.5rem; }
@media (max-width: 640px) { .rmt-hero__grid { grid-template-columns: 1fr; } }

.rmt-card {
  display: flex; flex-direction: column; gap: 1rem;
  padding: clamp(1.3rem,3vw,1.9rem) clamp(1.2rem,3vw,1.75rem);
  border-radius: var(--radius-xl);
  border: 1.5px solid transparent;
  text-decoration: none;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  position: relative; overflow: hidden;
}
.rmt-card:hover { transform: translateY(-5px); }
.rmt-card:focus-visible { outline: 3px solid rgba(88,204,2,0.35); outline-offset: 3px; }

.rmt-card--light {
  background: var(--color-surface);
  border-color: var(--color-border);
  box-shadow: 0 3px 14px rgba(0,0,0,0.06);
}
.rmt-card--light:hover { border-color: var(--green); box-shadow: 0 12px 36px rgba(88,204,2,0.14); }

.rmt-card--dark {
  background: var(--charcoal);
  border-color: rgba(255,255,255,0.08);
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
}
.rmt-card--dark:hover { border-color: rgba(88,204,2,0.35); box-shadow: 0 18px 48px rgba(0,0,0,0.25); }

.rmt-card__icon {
  width: 50px; height: 50px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; flex-shrink: 0;
}
.rmt-card__icon--light { background: rgba(88,204,2,0.14); }
.rmt-card__icon--dark  { background: rgba(255,255,255,0.10); }

.rmt-card__meta { display: flex; flex-direction: column; gap: 0.25rem; }
.rmt-card__label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.rmt-card__label--light { color: var(--green); }
.rmt-card__label--dark  { color: rgba(255,255,255,0.55); }

.rmt-card__title { font-size: clamp(1.4rem,3vw,1.65rem); line-height: 1.1; margin: 0; font-weight: 700; }
.rmt-card__title--light { color: var(--color-text); }
.rmt-card__title--dark  { color: #fff; }

.rmt-card__desc { font-size: 0.92rem; line-height: 1.6; margin: 0; flex-grow: 1; }
.rmt-card__desc--light { color: var(--color-text-soft); }
.rmt-card__desc--dark  { color: rgba(255,255,255,0.70); }

.rmt-card__cta {
  display: inline-flex; align-items: center;
  font-size: 0.88rem; font-weight: 700;
  padding: 0.58rem 1.1rem; border-radius: 999px;
  width: fit-content; margin-top: auto;
}
.rmt-card__cta--light { background: var(--green); color: #fff; }
.rmt-card__cta--dark  { background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.18); }

.rmt-hero__stats {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 0.85rem; margin-bottom: 1.25rem;
}
@media (max-width: 400px) { .rmt-hero__stats { gap: 0.5rem; } }

.rmt-stat {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem 0.9rem;
  display: flex; flex-direction: column; gap: 0.2rem;
  box-shadow: var(--shadow-sm);
}
.rmt-stat__number { font-size: clamp(1.55rem,4vw,2rem); color: var(--green); line-height: 1; font-weight: 700; }
.rmt-stat__label { font-size: 0.8rem; color: var(--color-text-muted); font-weight: 600; }

.rmt-trust {
  list-style: none; padding: 0; margin: 0;
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.65rem 1.1rem;
}
.rmt-trust__item { display: flex; align-items: center; gap: 5px; font-size: 0.8rem; color: var(--color-text-muted); font-weight: 600; }
.rmt-trust__check {
  width: 16px; height: 16px; background: var(--green); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.55rem; color: #fff; font-weight: 900; flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
  .rmt-hero__eyebrow-dot { animation: none; }
  .rmt-card, .rmt-card__cta { transition: none !important; }
}

/* =========================================================
   POST A LISTING
   ========================================================= */
.profile-post-listing { margin: 1.5rem 0; }
.profile-post-listing__subtitle { color: var(--color-text-muted); font-size: 0.875rem; margin-bottom: 1rem; }
.listing-type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.listing-type-card {
  display: flex; flex-direction: column; gap: 5px;
  padding: 1.2rem;
  background: var(--white);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none; color: inherit;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.listing-type-card:hover { border-color: var(--green); box-shadow: 0 4px 16px rgba(88,204,2,0.12); }
.listing-type-card__icon { font-size: 1.65rem; line-height: 1; }
.listing-type-card__title { font-size: 0.94rem; font-weight: 700; }
.listing-type-card__desc { font-size: 0.8rem; color: var(--color-text-muted); line-height: 1.5; }

.profile-listings__status { font-size: 0.73rem; padding: 2px 8px; border-radius: 99px; margin-left: auto; }
.profile-listings__status--publish { background: rgba(88,204,2,0.12); color: #286800; }
.profile-listings__status--pending { background: rgba(255,193,7,0.15); color: #92400e; }

/* =========================================================
   16. FRONTEND FORMS / DASHBOARD
   ========================================================= */
.post-a-room, .post-a-roommate, .dashboard-page { padding: var(--sp-10) 0 var(--sp-16); }

.par-page-header { margin-bottom: var(--sp-8); }

.par-eyebrow {
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: rgba(88,204,2,0.10);
  border: 1px solid rgba(88,204,2,0.24);
  color: var(--charcoal);
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.35rem 0.85rem; border-radius: 999px; margin-bottom: 0.9rem;
}
.par-eyebrow-dot { width: 6px; height: 6px; background: var(--green); border-radius: 50%; flex-shrink: 0; }

.par-page-header h1 { font-size: clamp(1.9rem,5vw,2.9rem); letter-spacing: -0.02em; margin: 0 0 0.5rem; font-weight: 800; }
.par-page-header > p { font-size: 1.02rem; color: var(--color-text-soft); margin: 0; }

.par-layout { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 992px) { .par-layout { grid-template-columns: minmax(0,2fr) minmax(260px,0.85fr); } }

.par-sidebar { display: flex; flex-direction: column; gap: 1.25rem; }
.par-sticky { position: sticky; top: 100px; }

.par-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.65rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.25rem;
}
.par-card__header {
  display: flex; align-items: center; gap: 0.85rem;
  margin-bottom: 1.4rem; padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}
.par-card__icon {
  width: 40px; height: 40px;
  background: rgba(88,204,2,0.12); border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.par-card__header h2 { font-size: 1.1rem; margin: 0 0 0.12rem; font-weight: 700; }
.par-card__header p { font-size: 0.82rem; color: var(--color-text-muted); margin: 0; }

.par-field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.1rem; }
.par-field:last-child { margin-bottom: 0; }
.par-field > label { font-size: 0.85rem; font-weight: 700; color: var(--color-text); }
.par-field > small { font-size: 0.78rem; color: var(--color-text-muted); }

.required { color: #e63946; }

.par-cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.par-cols-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
@media (max-width: 700px) { .par-cols-2, .par-cols-3 { grid-template-columns: 1fr; } }

.par-input, .par-select, .par-textarea {
  width: 100%; min-height: 48px;
  padding: 0.72rem 1rem;
  border: 1.5px solid var(--color-border); border-radius: var(--radius-sm);
  background: var(--white); color: var(--color-text);
  font-size: 0.93rem; font-family: var(--font);
  transition: border-color 0.18s, box-shadow 0.18s;
}
.par-textarea { min-height: 110px; resize: vertical; }
.par-input:focus, .par-select:focus, .par-textarea:focus {
  outline: none; border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(88,204,2,0.14);
}

.par-select-wrap { position: relative; }
.par-select-wrap::after {
  content: "▾"; position: absolute; right: 1rem; top: 50%;
  transform: translateY(-50%); font-size: 0.82rem;
  color: var(--color-text-muted); pointer-events: none;
}
.par-select { padding-right: 2.5rem; cursor: pointer; }

.par-check-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(155px,1fr)); gap: 0.7rem; }
.par-check {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.72rem 0.85rem;
  border: 1.5px solid var(--color-border);
  border-radius: 12px; background: var(--color-surface-alt); cursor: pointer;
}

.par-checkbox-group { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.par-checkbox-label { cursor: pointer; }
.par-checkbox-label input[type="checkbox"] { display: none; }
.par-checkbox-label span {
  display: inline-flex; align-items: center; gap: 0.38rem;
  padding: 0.46rem 1rem; border-radius: 999px;
  border: 1.5px solid var(--color-border); background: var(--color-surface);
  font-size: 0.86rem; font-weight: 600; color: var(--color-text-soft);
  transition: border-color 0.18s, background 0.18s;
}
.par-checkbox-label input[type="checkbox"]:checked + span {
  background: rgba(88,204,2,0.08); border-color: var(--green); color: var(--charcoal);
}

.par-range-wrap { display: flex; align-items: center; gap: 1rem; }
.par-range-wrap--spaced { margin-top: 0.5rem; }
.par-range { flex: 1; width: 100%; }
.par-range-val {
  min-width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: var(--green); color: #fff;
  font-weight: 700; font-size: 0.88rem; border-radius: 10px; flex-shrink: 0;
}

.par-file-input { width: 100%; }
.par-file-input-hidden { display: none; }
.par-file-btn { cursor: pointer; display: inline-block; }
.par-current-image { margin-top: 1rem; max-width: 240px; }

.par-photo-upload {
  display: flex; align-items: center; gap: 1.2rem; padding: 1rem;
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius-md); background: var(--color-surface);
}
.par-photo-upload img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 2px solid var(--color-border); flex-shrink: 0; }
.par-photo-upload__right { display: flex; flex-direction: column; gap: 0.5rem; }
.par-photo-hint { font-size: 0.78rem; color: var(--color-text-muted); }

.par-alert, .par-notice, .rmt-notice {
  padding: 0.95rem 1.15rem; border-radius: var(--radius-md); margin-bottom: 1.15rem;
}
.par-notice { display: flex; gap: 0.85rem; align-items: flex-start; font-size: 0.93rem; }
.par-notice__icon { font-size: 1.2rem; flex-shrink: 0; line-height: 1; margin-top: 1px; }
.par-alert ul, .par-notice ul { margin: 0; }
.par-alert--error, .par-notice--error, .rmt-notice--error {
  background: rgba(220,53,69,0.07); border: 1px solid rgba(220,53,69,0.22); color: #b42318;
}
.rmt-notice--success { background: rgba(88,204,2,0.08); border: 1px solid rgba(88,204,2,0.30); }
.rmt-notice p { margin: 0; font-weight: 700; }

.par-sidebar .cta-actions, .par-card .cta-actions { flex-direction: column; }
.par-sidebar .cta-actions .btn, .par-card .cta-actions .btn { width: 100%; }

.par-tip-card { background: var(--charcoal); border-radius: var(--radius-lg); padding: 1.3rem; box-shadow: var(--shadow-md); }
.par-tip-card h3 { color: #fff; font-size: 0.95rem; margin: 0 0 0.9rem; font-weight: 700; }
.par-tip-card ul, .par-tip-list { list-style: none; padding: 0; margin: 0; }
.par-tip-list { display: flex; flex-direction: column; gap: 0.7rem; }
.par-tip-list li, .par-tip-card li {
  display: flex; gap: 0.65rem;
  font-size: 0.84rem; color: rgba(255,255,255,0.75);
  align-items: flex-start; line-height: 1.5;
}
.par-tip-list li::before, .par-tip-card li::before {
  content: "✓"; width: 19px; height: 19px; background: var(--green);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem; color: #fff; font-weight: 900; flex-shrink: 0; margin-top: 1px;
}

.dashboard-summary-grid { display: grid; gap: 1rem; margin-bottom: 1rem; }
.dashboard-card-actions { flex-wrap: wrap; gap: 0.5rem; }
.dashboard-card-actions form { display: inline-flex; }

.listing-chip--draft { background: rgba(255,193,7,0.12); border-color: rgba(255,193,7,0.35); color: #92400e; }
.listing-chip--done  { background: rgba(108,117,125,0.12); border-color: rgba(108,117,125,0.30); color: #555; }

.btn--danger { border-color: rgba(220,53,69,0.35) !important; color: #dc3545 !important; }
.btn--danger:hover { background: rgba(220,53,69,0.07) !important; }

@media (min-width: 768px) { .dashboard-summary-grid { grid-template-columns: 1fr 1fr; } }

.u-mt-2 { margin-top: 0.5rem; }
.u-mt-4 { margin-top: 1rem; }
.u-mb-4 { margin-bottom: 1rem; }
.u-full-row { grid-column: 1 / -1; }
.u-hidden { display: none; }

@media (min-width: 992px) {
  .par-sidebar { position: sticky; top: 96px; align-self: start; height: fit-content; z-index: 10; }
  .par-sticky { position: static; top: auto; }
}
@media (max-width: 991px) { .par-sidebar { position: static; } .par-sticky { position: static; } }

/* =========================================================
   17. CHAT / MESSAGES
   ========================================================= */
.rmt-messages-page { padding-bottom: var(--sp-16); }
.rmt-chat-layout { display: grid; gap: 1.25rem; }

.rmt-chat-panel, .rmt-dashboard-messages {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.rmt-chat-panel { overflow: hidden; }

.rmt-chat-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 0.75rem; padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--color-border); flex-wrap: wrap;
}
.rmt-chat-header h2 { margin: 0 0 0.15rem; font-size: 1.05rem; font-weight: 700; }
.rmt-chat-header p { margin: 0; color: var(--green); font-size: 0.85rem; font-weight: 700; }
.rmt-chat-header a:not(.btn) { color: var(--green); font-weight: 700; }
.rmt-chat-header-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; flex-shrink: 0; }
.rmt-chat-header-actions .btn { padding: 0.42rem 0.82rem; font-size: 0.8rem; min-height: 34px; }

.rmt-chat-box {
  height: min(62vh,580px); overflow-y: auto; padding: 1rem;
  background: var(--color-surface-alt);
  display: flex; flex-direction: column; gap: 0.7rem;
}

.rmt-message { display: flex; }
.rmt-message--mine  { justify-content: flex-end; }
.rmt-message--theirs { justify-content: flex-start; }

.rmt-message__bubble {
  max-width: min(78%,520px); padding: 0.68rem 0.88rem;
  border-radius: 18px; border: 1px solid var(--color-border);
  background: var(--color-surface);
}
.rmt-message--mine .rmt-message__bubble {
  background: rgba(88,204,2,0.12); border-color: rgba(88,204,2,0.28);
  border-radius: 18px 18px 4px 18px;
}
.rmt-message--theirs .rmt-message__bubble { border-radius: 18px 18px 18px 4px; }
.rmt-message__bubble p { margin: 0 0 0.28rem; color: var(--color-text); line-height: 1.55; font-size: 0.93rem; }

.rmt-message__meta {
  display: flex !important; align-items: center; gap: 0.35rem;
  flex-wrap: wrap; color: var(--color-text-muted); font-size: 0.7rem;
}

.rmt-message-status {
  display: inline-flex; align-items: center; gap: 0.22rem;
  padding: 0.1rem 0.4rem; border-radius: 999px;
  font-style: normal; font-size: 0.64rem; font-weight: 700; line-height: 1.3;
}
.rmt-message-status--sent   { background: rgba(108,117,125,0.10); color: #555; }
.rmt-message-status--unread { background: rgba(255,193,7,0.15); color: #8a6500; }
.rmt-message-status--read   { background: rgba(88,204,2,0.14); color: var(--green); }

.rmt-chat-form {
  display: flex; align-items: flex-end; gap: 0.6rem;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--color-border); background: var(--color-surface);
}
.rmt-chat-form .par-textarea { flex: 1; min-height: 44px; max-height: 140px; resize: none; border-radius: var(--radius-md); font-size: 0.92rem; }
.rmt-chat-form .btn { flex-shrink: 0; align-self: flex-end; white-space: nowrap; }
.rmt-chat-empty { box-shadow: none; background: transparent; border: none; }

.rmt-dashboard-messages { padding: 0; margin-top: 1rem; }
.rmt-dashboard-messages__header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1.2rem; border-bottom: 1px solid var(--color-border);
}
.rmt-dashboard-messages__header h2, .rmt-dashboard-messages__header p { margin: 0; }
.rmt-dashboard-messages__header p { color: var(--color-text-muted); font-size: 0.88rem; }

.rmt-all-chats { padding: 0; margin-bottom: 1.25rem; }

.rmt-chat-search-wrap {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.82rem 1rem; border-bottom: 1px solid var(--color-border); position: relative;
}
.rmt-chat-search-icon { flex-shrink: 0; width: 16px; height: 16px; color: var(--color-text-muted); pointer-events: none; }
.rmt-chat-search-wrap .par-input {
  flex: 1; min-height: 40px;
  padding: 0.5rem 2.2rem 0.5rem 0.75rem;
  border-radius: 999px; border: 1px solid var(--color-border);
  font-size: 0.88rem; background: var(--color-surface-alt);
}
.rmt-chat-search-wrap .par-input:focus { background: var(--color-surface); }

.rmt-search-clear {
  position: absolute; right: 1rem; background: none; border: none;
  padding: 0; cursor: pointer; color: var(--color-text-muted);
  font-size: 1rem; line-height: 1; display: none;
  width: 20px; height: 20px; align-items: center; justify-content: center; border-radius: 50%;
}
.rmt-search-clear.visible { display: flex; }
.rmt-search-clear:hover { color: var(--color-text); background: var(--color-border); }

.rmt-conversation-list { display: grid; }
.rmt-conversation-row {
  display: grid; grid-template-columns: minmax(0,1fr) 36px;
  align-items: stretch; border-bottom: 1px solid var(--color-border);
}
.rmt-conversation-row:last-child { border-bottom: 0; }

.rmt-conversation-item { display: flex; align-items: flex-start; gap: 0.7rem; padding: 0.75rem 0.82rem; text-decoration: none; }
.rmt-conversation-item:hover { background: var(--color-surface-alt); }

.rmt-conv-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(88,204,2,0.14); border: 1px solid rgba(88,204,2,0.24);
  color: var(--charcoal); font-size: 0.78rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; text-transform: uppercase;
}

.rmt-conv-body { flex: 1; min-width: 0; }
.rmt-conv-body strong { display: block; font-size: 0.88rem; margin-bottom: 0.08rem; color: var(--color-text); }
.rmt-conv-body .rmt-conv-listing { display: block; font-size: 0.76rem; color: var(--green); font-weight: 700; margin-bottom: 0.18rem; }
.rmt-conv-body p { margin: 0; font-size: 0.8rem; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.rmt-conversation-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 0.3rem; flex-shrink: 0; padding-top: 0.2rem; }
.rmt-conversation-meta small { color: var(--color-text-muted); font-size: 0.7rem; white-space: nowrap; }

.rmt-unread-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 0.38rem;
  border-radius: 999px; background: var(--green);
  color: #fff; font-size: 0.7rem; font-weight: 700;
}

.rmt-delete-chat-form { display: flex; align-items: center; justify-content: center; border-left: 1px solid var(--color-border); }
.rmt-delete-chat-btn {
  width: 36px; height: 100%; min-height: 52px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; border-radius: 0;
  cursor: pointer; color: var(--color-text-muted);
  transition: background 0.18s, color 0.18s; padding: 0;
}
.rmt-delete-chat-btn:hover { background: rgba(220,53,69,0.07); color: #dc3545; }
.rmt-delete-chat-btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.rmt-chat-no-results { padding: 1rem; color: var(--color-text-muted); font-size: 0.88rem; text-align: center; }
.rmt-dashboard-empty { padding: 1rem 1.25rem; margin: 0; }

@media (max-width: 700px) {
  .rmt-chat-header { gap: 0.6rem; }
  .rmt-chat-header-actions .btn { flex: 1; justify-content: center; }
  .rmt-message__bubble { max-width: 90%; }
  .rmt-chat-form { flex-direction: column; align-items: stretch; gap: 0.5rem; padding: 0.75rem; }
  .rmt-chat-form .btn { width: 100%; justify-content: center; }
  .rmt-chat-form .par-textarea { min-height: 52px; }
}

/* =========================================================
   18. MOBILE POLISH
   ========================================================= */
@media (max-width: 767px) {
  html { font-size: 16px; }
  body { overflow-x: hidden; }
  .container { width: min(100% - 1.25rem, var(--container)); }

  .site-header__inner { min-height: 60px; gap: 0.7rem; }
  .site-branding { width: 175px; max-width: 175px; }
  .site-logo-img, .site-branding img, .custom-logo-link img { max-width: 175px; max-height: 40px; }
  .mobile-menu-toggle { width: 42px; height: 42px; border-radius: 13px; }

  .post-a-room, .post-a-roommate, .dashboard-page,
  .single-page, .archive-hero, .archive-filters, .archive-listings {
    padding-top: 1.5rem; padding-bottom: 5.5rem;
  }

  .par-page-header { margin-bottom: 1.15rem; }
  .par-eyebrow, .archive-badge, .section-badge, .hero-badge { font-size: 0.72rem; }
  .par-page-header h1, .single-listing__header h1 { font-size: clamp(1.85rem,9vw,2.5rem); line-height: 1.05; }
  .par-page-header > p { font-size: 0.96rem; }

  .par-card, .single-card, .quick-search-card, .step-card,
  .filter-form, .rmt-dashboard-messages, .rmt-chat-panel {
    border-radius: 20px; padding: 1rem;
  }
  .par-card { margin-bottom: 0.9rem; }
  .par-card__header { gap: 0.7rem; margin-bottom: 0.9rem; padding-bottom: 0.8rem; }
  .par-card__icon { width: 36px; height: 36px; border-radius: 10px; font-size: 0.95rem; }
  .par-card__header h2 { font-size: 0.98rem; }

  .par-layout { gap: 0.9rem; }
  .par-cols-2, .par-cols-3, .filter-grid, .dashboard-summary-grid { grid-template-columns: 1fr !important; gap: 0.82rem; }
  .par-field { margin-bottom: 0.95rem; }
  .par-field > label, .filter-group label { font-size: 0.9rem; }

  .par-input, .par-select, .par-textarea,
  .filter-group input, .filter-group select, .filter-group textarea {
    min-height: 52px; font-size: 16px; border-radius: 13px; padding: 0.78rem 0.92rem;
  }
  .par-textarea, .filter-group textarea { min-height: 130px; }

  .par-checkbox-group { display: grid; grid-template-columns: 1fr; gap: 0.5rem; }
  .par-checkbox-label span { width: 100%; justify-content: flex-start; min-height: 46px; border-radius: 13px; padding: 0.68rem 0.88rem; font-size: 0.88rem; }
  .par-check-grid { grid-template-columns: 1fr; gap: 0.55rem; }
  .par-check { min-height: 48px; border-radius: 13px; }

  .par-range-wrap { flex-direction: column; align-items: stretch; gap: 0.6rem; }
  .par-range-val { width: 100%; min-width: 100%; }

  .par-photo-upload { flex-direction: column; align-items: flex-start; gap: 0.8rem; }
  .par-photo-upload img { width: 68px; height: 68px; }
  .par-current-image { max-width: 100%; }

  .btn, .mobile-menu-btn, .par-file-btn { min-height: 48px; font-size: 0.95rem; padding: 0.78rem 1.1rem; }

  .cta-actions, .hero-actions, .filter-actions,
  .dashboard-card-actions, .mobile-menu-actions { display: grid; grid-template-columns: 1fr; gap: 0.6rem; }
  .cta-actions .btn, .hero-actions .btn, .filter-actions .btn,
  .dashboard-card-actions .btn, .dashboard-card-actions form, .dashboard-card-actions button { width: 100%; }

  .dashboard-page .par-card, .dashboard-page .rmt-dashboard-messages { padding: 1.05rem; }
  .dashboard-card-actions { margin-top: 0.7rem; }

  .listing-type-grid { grid-template-columns: 1fr; }
  .listing-type-card { padding: 0.95rem; border-radius: 17px; }
  .listing-type-card__title { font-size: 0.98rem; }
  .listing-type-card__desc { font-size: 0.84rem; }

  .listing-grid { grid-template-columns: 1fr !important; gap: 0.95rem; }
  .listing-card { border-radius: 16px; }
  .listing-card__image { aspect-ratio: 16/9; }
  .listing-card__content { padding: 0.6rem 0.7rem; gap: 0.45rem;}
  .listing-card__top {
    flex-direction: row;       /* keep price + date on one line */
    align-items: baseline;
    gap: 0.3rem;
  }

  .listing-card__price {
    font-size: 0.88rem;
  }

  .listing-card__available {
    font-size: 0.75rem;
  }

  .listing-card__title {
    font-size: 0.88rem;
    line-height: 1.25;
  }

  .listing-card__address {
    font-size: 0.75rem;
  }

  /* Chips */
  .listing-card__chips {
    gap: 0.35rem;
  }

  .listing-card__chips .listing-chip {
    font-size: 0.7rem;
    line-height: 1.25;
  }

  /* Person/preferences box */
  .listing-card__person {
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
  }
  .listing-card__person strong {
    font-size: 0.78rem;
    margin-bottom: 0.2rem;
  }
  .listing-card__person ul {
    font-size: 0.75rem;
  }

  /* CTA button */
  .listing-card .btn {
    min-height: 38px;
    font-size: 0.82rem;
    padding: 0.42rem 1rem;
  }

  .rmt-dashboard-messages__header { flex-direction: column; align-items: stretch; padding: 0.95rem; }
  .rmt-dashboard-messages__header .btn { width: 100%; }

  .rmt-conversation-row { grid-template-columns: minmax(0,1fr) 44px; }
  .rmt-conversation-item { padding: 0.82rem 0.72rem; gap: 0.6rem; }
  .rmt-conv-avatar { width: 34px; height: 34px; }
  .rmt-conversation-meta { align-items: flex-start; }

  .rmt-chat-box { height: 56vh; padding: 0.75rem; }
  .rmt-message__bubble { max-width: 92%; }

  .par-alert, .par-notice, .rmt-notice { padding: 0.82rem 0.95rem; border-radius: 15px; font-size: 0.88rem; }
  .mobile-bottom-nav__item { padding: 0.5rem 0.28rem; font-size: 0.7rem; }
}

@media (max-width: 420px) {
  .container { width: min(100% - 1rem, var(--container)); }
  .site-branding { width: 148px; max-width: 148px; }
  .site-logo-img, .site-branding img, .custom-logo-link img { max-width: 148px; max-height: 38px; }
  .par-card, .single-card, .filter-form, .rmt-dashboard-messages, .rmt-chat-panel { padding: 0.85rem; }
  .par-page-header h1, .single-listing__header h1 { font-size: 1.8rem; }
}

/* =========================================================
   19. FOOTER MODALS
   ========================================================= */
.simple-footer--with-links { justify-content: space-between; text-align: left; }
.simple-footer__left { min-width: 210px; }
.simple-footer__links { display: inline-flex; align-items: center; justify-content: center; gap: 0.7rem; flex-wrap: wrap; }

.simple-footer__link {
  appearance: none; border: 0; background: transparent;
  color: rgba(255,255,255,0.65); padding: 0; margin: 0;
  font-size: 0.8rem; font-weight: 600; line-height: 1.4; cursor: pointer;
  transition: var(--transition);
}
.simple-footer__link:hover, .simple-footer__link:focus-visible { color: var(--green); background: transparent; outline: none; }

.footer-modal-open { overflow: hidden; }
.footer-modal { position: fixed; inset: 0; z-index: 9999; display: none; }
.footer-modal.is-open { display: block; }

.footer-modal__overlay {
  position: absolute; inset: 0;
  background: rgba(17,17,17,0.55);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}

.footer-modal__dialog {
  position: relative;
  width: min(92vw,720px); max-height: min(84vh,760px);
  overflow-y: auto; margin: 7vh auto 0;
  background: var(--color-surface); color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: clamp(1.25rem,3vw,2rem);
}

.footer-modal__close {
  position: sticky; top: 0; margin-left: auto;
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid var(--color-border); border-radius: 999px;
  background: var(--color-surface-alt); color: var(--color-text);
  font-size: 1.4rem; line-height: 1; cursor: pointer; z-index: 2;
}
.footer-modal__close:hover { background: rgba(88,204,2,0.10); border-color: rgba(88,204,2,0.38); }

.footer-modal h2 { margin: 0 3rem 1rem 0; font-size: clamp(1.55rem,4vw,2.1rem); letter-spacing: -0.02em; }
.footer-modal h3 { margin: 1.2rem 0 0.4rem; font-size: 1rem; font-weight: 700; }
.footer-modal__content { font-size: 0.93rem; line-height: 1.7; }
.footer-modal__content p { margin-bottom: 0.8rem; }
.footer-modal__content ul { margin-top: 0.2rem; margin-bottom: 0.9rem; padding-left: 1.15rem; color: var(--color-text-soft); }
.footer-modal__content li { margin-bottom: 0.3rem; }

@media (max-width: 767px) {
  .site-footer--simple { padding: 1rem 0 calc(1rem + 68px); }
  .simple-footer--with-links { flex-direction: column; align-items: center; justify-content: center; gap: 0.7rem; text-align: center; }
  .simple-footer__left { min-width: 0; }
  .simple-footer__links { width: auto; flex-wrap: wrap; justify-content: center; gap: 0.7rem; }
  .simple-footer__link { width: auto; font-size: 0.78rem; }
  .footer-modal__dialog { width: min(100% - 1rem,720px); max-height: 88vh; margin-top: 5vh; border-radius: 20px; padding: 1rem; }
  .footer-modal__close { width: 38px; height: 38px; }
  .footer-modal h2 { font-size: 1.5rem; }
  .footer-modal__content { font-size: 0.9rem; }
}

/* =========================================================
   20. ARCHIVE COMPACT FILTER / MOBILE SEARCH
   ========================================================= */

/* Reduce space between archive title, search, and cards */
.archive-hero {
  padding-top: 2rem;
  padding-bottom: 0.8rem;
}

.archive-hero .section-heading {
  margin-bottom: 0;
}

.archive-hero .section-heading h1,
.archive-hero .section-heading h2 {
  margin-top: 0.55rem;
  margin-bottom: 0.35rem;
}

.archive-hero .section-heading p {
  margin-bottom: 0;
}

.archive-filters {
  padding-top: 0.6rem;
  padding-bottom: 0.85rem;
}

.archive-listings {
  padding-top: 0.85rem;
}

.filter-form {
  padding: 1rem;
  border-radius: 22px;
}

.filter-grid {
  gap: 0.75rem;
}

.filter-actions {
  gap: 0.55rem;
}

.listing-grid {
  gap: 1rem;
}

/* =========================================================
   MOBILE ARCHIVE FILTER GRID
   ========================================================= */

@media (max-width: 767px) {
  .archive-hero {
    padding-top: 1rem !important;
    padding-bottom: 0.35rem !important;
  }

  .archive-hero .section-heading {
    margin-bottom: 0;
  }

  .archive-hero .archive-badge {
    font-size: 0.64rem;
    padding: 0.24rem 0.6rem;
  }

  .archive-hero .section-heading h1,
  .archive-hero .section-heading h2 {
    font-size: clamp(1.5rem, 7vw, 2rem);
    margin: 0.38rem 0 0.22rem;
    line-height: 1.08;
  }

  .archive-hero .section-heading p {
    font-size: 0.8rem;
    line-height: 1.42;
  }

  .archive-filters {
    padding-top: 0.25rem !important;
    padding-bottom: 0.55rem !important;
  }

  .archive-listings {
    padding-top: 0.55rem !important;
  }

  .filter-form {
    padding: 0.6rem;
    border-radius: 16px;
  }

  /*
    Mobile order:
    1. Search full width
    2. Min | Max
    3. Date | Location
    4. Gender/Type | Sort
    5. Buttons
  */
  .filter-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.45rem !important;
    align-items: end;
  }

  .filter-group {
    position: relative;
    min-width: 0;
  }

  .filter-group:first-child,
  .filter-group[style*="grid-column"] {
    grid-column: 1 / -1 !important;
  }

  .filter-actions {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem !important;
  }

  .filter-group label {
    margin-bottom: 0.18rem;
    font-size: 0.68rem;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .filter-group input,
  .filter-group select,
  .filter-group textarea {
    min-height: 36px !important;
    height: 36px;
    padding: 0.4rem 0.62rem;
    border-radius: 10px;
    font-size: 0.78rem;
  }

  .filter-group input::placeholder {
    font-size: 0.76rem;
  }

  .filter-group input[type="search"] {
    padding-left: 1.95rem;
  }

  .filter-group:has(input[type="search"])::before {
    content: "⌕";
    position: absolute;
    left: 0.68rem;
    bottom: 0.44rem;
    color: var(--color-text-muted);
    font-size: 0.86rem;
    line-height: 1;
    pointer-events: none;
  }

  .filter-group:has(input[type="number"])::before {
    content: "฿";
    position: absolute;
    left: 0.66rem;
    bottom: 0.43rem;
    color: var(--color-text-muted);
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
  }

  .filter-group:has(input[type="number"]) input {
    padding-left: 1.45rem;
  }

  .filter-group:has(input[type="date"])::before {
    content: "📅";
    position: absolute;
    left: 0.62rem;
    bottom: 0.38rem;
    font-size: 0.72rem;
    line-height: 1;
    pointer-events: none;
  }

  .filter-group:has(input[type="date"]) input {
    padding-left: 1.7rem;
  }

  .filter-group select {
    padding-left: 0.62rem;
    padding-right: 1.4rem;
  }

  .filter-actions .btn {
    width: 100%;
    min-height: 36px;
    padding: 0.4rem 0.6rem;
    font-size: 0.74rem;
  }

  .filter-actions .btn-primary::before {
    content: "🔎";
  }

  .filter-actions .btn-secondary::before,
  .filter-actions .btn-outline::before {
    content: "↺";
  }

  .listing-grid {
    gap: 0.72rem;
  }

  .pagination-wrap {
    margin-top: 0.9rem;
  }
}

/* Extra small phones */
@media (max-width: 420px) {
  .archive-hero {
    padding-top: 0.85rem !important;
  }

  .filter-form {
    padding: 0.5rem;
  }

  .filter-grid {
    gap: 0.4rem !important;
  }

  .filter-group label {
    font-size: 0.64rem;
  }

  .filter-group input,
  .filter-group select,
  .filter-group textarea {
    min-height: 34px !important;
    height: 34px;
    font-size: 0.74rem;
    border-radius: 9px;
  }

  .filter-actions .btn {
    min-height: 34px;
    font-size: 0.72rem;
  }
}

