/* Da Nang Luxury Rentals — bright Da Nang sea theme.
   Sea-blue / teal, white, sand. Rounded cards, soft shadows, generous spacing.
   Responsive: 768px tablet, 480px phone (390px). No horizontal overflow. */
:root{
  --sea:#0e7aa8; --sea-deep:#0a5a7d; --sea-dark:#07334a; --teal:#12a5a0;
  --sand:#f2f9fc; --sand2:#e6f3f9; --ink:#12303f; --muted:#5b7a8a;
  --line:#d7e8f0; --bg:#ffffff; --radius:14px;
  --shadow:0 6px 24px rgba(7,51,74,.10); --shadow-lg:0 12px 36px rgba(7,51,74,.16);
}
*{box-sizing:border-box}
html{height:100%}
html,body{min-height:100%;overflow-x:hidden}
body{margin:0;display:flex;flex-direction:column;min-height:100vh;font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;color:var(--ink);background:var(--bg);line-height:1.55}
/* main is a flex item of body (column flex) AND carries .wrap's margin:0 auto.
   Auto left/right margins on a flex item disable the stretch that would
   otherwise fill the page: main shrank to its content width instead, so the
   search page (whose form content is narrow) rendered as a ~394px centred
   column on a 1920px desktop while the homepage looked fine (its content is
   wide enough to hit the 1280px cap). A definite width:100% fixes it: the
   max-width:1280px from .wrap still caps and centres it. */
main{flex:1 0 auto;width:100%}
img,iframe{max-width:100%}
a{color:var(--sea)}
h1{font-size:28px;line-height:1.25;margin:18px 0 10px}
h2{font-size:22px;margin:0 0 12px}
h3{font-size:18px}
section{margin:30px 0}
.wrap{max-width:1280px;margin:0 auto;padding:0 24px}
.muted{color:var(--muted);font-size:14px}

/* ---------- header ---------- */
header{background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:10;box-shadow:0 2px 12px rgba(7,51,74,.06)}
.head{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px 20px}
.logo{font-weight:800;color:var(--sea-deep);text-decoration:none;font-size:19px;white-space:nowrap}
.logo:hover{color:var(--sea)}
/* Header nav only — these MUST be scoped to `header nav`. The footer nav
   is also a <nav> element (.foot-nav), and the bare `nav` selectors used to
   leak into it: on phones the footer links picked up the pale button-cell
   background while keeping their white text, so they rendered as blank
   pale boxes with unreadable text (user's screenshot 2026-12-03 00:37). */
header nav{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-left:auto}
header nav>a{color:var(--ink);text-decoration:none;padding:6px 8px;border-radius:8px}
header nav>a:hover{background:var(--sand);color:var(--sea-deep)}

/* ---------- buttons ---------- */
.btn{display:inline-block;background:var(--sea);color:#fff!important;padding:10px 18px;border-radius:10px;text-decoration:none;border:1px solid var(--sea);cursor:pointer;font-size:15px;font-weight:600;white-space:nowrap}
.btn:hover{background:var(--sea-deep);border-color:var(--sea-deep)}
.btn.ghost{background:#fff;color:var(--sea-deep)!important}
.btn.ghost:hover{background:var(--sand)}
.btn.small{padding:7px 12px;font-size:14px}
.btn.light{background:#fff;color:var(--sea-deep)!important;border-color:#fff}
.btn.light:hover{background:var(--sand2)}

/* ---------- hero ---------- */
.hero{
  position:relative;overflow:hidden;
  background:linear-gradient(180deg,#bfe6f5,#eaf7ff);
  border:1px solid var(--line);border-radius:20px;
  margin:22px 0 30px;color:var(--ink);
  box-shadow:var(--shadow-lg);
}
.hero-content{padding:48px 40px 38px}
.hero h1{margin:10px 0 8px;font-size:40px;line-height:1.15;color:var(--sea-deep);max-width:720px}
.hero-sub{font-size:18px;color:var(--ink);max-width:620px;margin:0 0 10px}
.badge{display:inline-block;background:#fff;border:1px solid var(--line);border-radius:20px;padding:5px 14px;font-size:13px;font-weight:600;color:var(--sea-deep)}
.hero-search{margin-top:22px}
.hero-cta{display:flex;gap:10px;flex-wrap:wrap;margin:18px 0 0}

/* ---------- search form ---------- */
.search{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px;background:var(--sand);border:1px solid var(--line);border-radius:14px;padding:14px;margin:14px 0}
.hero .search{background:rgba(255,255,255,.97);border:none;box-shadow:0 10px 30px rgba(3,32,46,.30);margin:0}
.search input,.search select,.form input,.form select,.form textarea{width:100%;padding:10px 12px;border:1px solid var(--line);border-radius:9px;font-size:15px;font-family:inherit;background:#fff;color:var(--ink);min-width:0}
.search input:focus,.search select:focus,.form input:focus,.form select:focus,.form textarea:focus{outline:2px solid var(--sea);outline-offset:1px;border-color:var(--sea)}
.search input[name="q"]{grid-column:1/-1;font-size:16px;padding:12px 14px}
.search details{grid-column:1/-1}
.search summary{cursor:pointer;font-weight:600;color:var(--sea-deep);padding:4px 0}
.search .btn{justify-self:start;padding:11px 26px}
/* Hero search: only keyword + type + district visible; rest in <details>.
   The Search button sits on the same row as the two selects instead of
   dropping alone to a row of its own (leaving a big empty gap). */
.search-compact{grid-template-columns:repeat(3,minmax(0,1fr))}
.search-compact .btn{grid-column:3;grid-row:2;justify-self:stretch;text-align:center;align-self:center}
.more-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px;padding-top:10px}
.amen-filter{padding-top:4px}
.amen-filter-group h4{margin:12px 0 6px;font-size:13px;font-weight:700;color:var(--sea-deep);text-transform:uppercase;letter-spacing:.04em}
.amen-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:6px}
.amen-pill{display:flex;gap:7px;align-items:center;font-size:13.5px;font-weight:500;background:#fff;border:1px solid var(--line);border-radius:999px;padding:7px 12px;cursor:pointer;line-height:1.35}
.amen-pill input{width:auto;margin:0;accent-color:var(--sea);flex:none}
.amen-pill:has(input:checked){background:#e3f2f7;border-color:var(--sea);color:var(--sea-deep)}

/* ---------- Browse by project: 4-column card grid (2 rows of 4 on PC) ---------- */
.proj-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.proj-card{display:flex;flex-direction:column;align-items:flex-start;gap:4px;background:var(--sand);border:1px solid var(--line);border-radius:16px;padding:18px;text-decoration:none;color:var(--sea-deep);transition:box-shadow .15s,transform .15s,border-color .15s}
.proj-card:hover{border-color:var(--sea);box-shadow:var(--shadow);transform:translateY(-2px)}
.proj-top{display:flex;align-items:center;gap:8px}
.proj-icon{font-size:22px;line-height:1}
.proj-name{font-weight:800;font-size:17px;white-space:nowrap}
.proj-card small{color:var(--muted);font-size:13px}
.proj-meta{margin-top:8px;font-size:13px;font-weight:600;color:var(--sea-deep)}
/* Small tag pill (listing type on cards, Featured badge). Kept separate from
   the project cards and the amenity pills — sharing one .chip class for all
   three is what made the amenities list stretch into full-width rows. */
.chip{display:inline-flex;align-items:center;background:#eaf6fb;border:1px solid var(--line);border-radius:999px;padding:5px 12px;font-size:13px;font-weight:600;color:var(--sea-deep)}
.chip.feat{background:#fff3c4}

/* ---------- agent page (/seller/<id>) ---------- */
/* Header card: avatar (or initials), the agent name as set in Profile,
   verified badge, bio, stats and the same WhatsApp / Zalo / Call buttons
   as a listing — a renter landing here can contact the agent without
   opening a listing first. */
.agent-head{display:flex;gap:18px;align-items:flex-start;background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:22px;margin:18px 0 8px}
.agent-avatar{width:76px;height:76px;border-radius:50%;object-fit:cover;flex:none}
.agent-initials{display:inline-flex;align-items:center;justify-content:center;background:var(--sea);color:#fff;font-weight:800;font-size:26px}
.agent-info{flex:1;min-width:0}
.agent-info h1{margin:0 0 6px}
.agent-info h2{margin:0 0 6px;font-size:22px}
.agent-info h2 a{color:inherit;text-decoration:none}
.agent-info h2 a:hover{text-decoration:underline}
.agent-info p{margin:6px 0}
.agent-contact{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}

/* ---------- browse by type: VERTICAL cards ---------- */
/* Browse by type: one compact row of 6 (Airbnb-style strip) — icon + name
   only. The whole card is the link, so the repeated blue Browse pills and
   the descriptions are gone. */
.types{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}
.type-card{display:flex;flex-direction:column;align-items:center;text-align:center;gap:6px;border:1px solid var(--line);border-radius:var(--radius);padding:16px 10px;text-decoration:none;color:var(--ink);background:var(--sand);transition:box-shadow .15s,transform .15s}
.type-card:hover{box-shadow:var(--shadow);transform:translateY(-2px);border-color:var(--sea)}
.type-icon{font-size:28px;line-height:1}
.type-card strong{font-size:15px;line-height:1.3}
.type-card small,.type-card .type-browse{display:none}

/* ---------- guide ---------- */
.guide{background:var(--sand);border:1px solid var(--line);border-radius:16px;padding:24px}
.guide ol{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;list-style:none;padding:0;margin:0;counter-reset:step}
.guide li{background:#fff;border:1px solid var(--line);border-radius:12px;padding:16px;font-size:14px}
.guide li::before{counter-increment:step;content:counter(step);display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:50%;background:var(--sea);color:#fff;font-weight:800;font-size:15px;margin-bottom:8px}
.guide li strong{display:block;margin-bottom:4px}
.guide .btn{margin-top:14px}

/* ---------- listing cards / grid ---------- */
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:18px;margin:16px 0}
.card{border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;background:#fff;box-shadow:var(--shadow);transition:box-shadow .15s,transform .15s}
.card:hover{box-shadow:var(--shadow-lg);transform:translateY(-2px)}
.card a{text-decoration:none;color:var(--ink)}
.card img,.noimg{width:100%;height:190px;object-fit:cover;display:block;background:#cfeaf5}
.noimg{display:flex;align-items:center;justify-content:center;font-size:48px}
.card-body{padding:14px}
.card-top{display:flex;gap:6px;flex-wrap:wrap}
.card h3{margin:8px 0 4px;font-size:17px;line-height:1.35}

/* ---------- list / grid view toggle (v28) ---------- */
/* Home + search let the visitor pick: horizontal rows (the featured
   cards) or vertical cards (the 4-column grid in the reference
   screenshot). The choice is remembered (see VIEW_JS in app.py). */
.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.section-head h1{margin:0}
.view-toggle{display:inline-flex;border:1px solid var(--line);border-radius:10px;overflow:hidden;background:#fff;flex:none}
.view-toggle button{border:none;background:#fff;padding:8px 14px;font-size:14px;font-weight:600;color:var(--muted);cursor:pointer}
.view-toggle button.on{background:var(--sea-deep);color:#fff}
/* Grid view on a featured (list) grid: undo the horizontal rows. */
.grid.featured.view-grid{grid-template-columns:repeat(auto-fill,minmax(290px,1fr))}
.grid.featured.view-grid .card a{display:block}
.grid.featured.view-grid .card img,.grid.featured.view-grid .noimg{width:100%;height:190px}
.grid.featured.view-grid .card-body{padding:14px}
.grid.featured.view-grid .card h3{font-size:17px}
/* List view on a plain grid: the same horizontal rows as featured. */
.grid.view-list{grid-template-columns:1fr}
.grid.view-list .card a{display:flex}
.grid.view-list .card img,.grid.view-list .noimg{width:340px;height:250px;flex:none}
.grid.view-list .card-body{flex:1;padding:22px}
.grid.view-list .card h3{font-size:20px}
.price{font-weight:800;color:var(--sea-deep);font-size:17px}
.price.big{font-size:26px}
.specs{font-size:14px;color:var(--muted)}
/* ---------- detail gallery: one large photo + thumbnails (v27) ---------- */
/* Airbnb-style: the first photo fills the width, the rest sit in a
   thumbnail strip below; clicking a thumbnail swaps the large photo,
   clicking the large photo opens the lightbox (see below). The counter
   and the save/share buttons float over the large photo. */
.gallery-hero{position:relative;border-radius:14px;overflow:hidden;background:#dfe9ee}
.gallery-hero img#hero-img{display:block;width:100%;height:520px;object-fit:cover;cursor:zoom-in}
.gallery-thumbs{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;margin-top:8px}
.gallery-thumbs img{display:block;width:100%;height:84px;object-fit:cover;border-radius:8px;cursor:pointer;border:2px solid transparent}
.gallery-thumbs img.sel{border-color:var(--sea)}
.gallery-count{position:absolute;left:12px;bottom:12px;background:rgba(0,0,0,.65);color:#fff;font-size:13px;font-weight:600;padding:5px 10px;border-radius:999px}
.gallery-actions{position:absolute;top:12px;right:12px;display:flex;gap:8px}
.gal-btn{width:40px;height:40px;border-radius:50%;border:none;background:rgba(255,255,255,.92);color:var(--ink);font-size:18px;line-height:1;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;box-shadow:0 1px 6px rgba(0,0,0,.25)}
.gal-btn:hover{background:#fff}
.share-bar{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:14px 0}
.share-bar .share-label{font-weight:600;color:var(--sea-deep);margin-right:2px}
.share-btn{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:8px 14px;font-size:14px;font-weight:600;text-decoration:none;color:#fff;border:0;cursor:pointer;font-family:inherit}
.share-fb{background:#1877f2}.share-zalo{background:#0068ff}.share-wa{background:#25d366}.share-tg{background:#229ed9}.share-x{background:#000}
.share-copy{background:#fff;color:var(--sea-deep);border:1px solid var(--line)}
.gallery-hint{margin:8px 0 0;font-size:13px}

/* ---------- map picker (composer, v29) ---------- */
.pick-label{display:block;font-weight:600;margin:0 0 6px}
.leaflet-map.picker-map{height:320px}

/* ---------- photo lightbox (detail page) ---------- */
.lightbox{position:fixed;inset:0;background:rgba(5,25,35,.92);display:flex;align-items:center;justify-content:center;z-index:50;padding:20px}
.lightbox[hidden]{display:none}
.lightbox img{max-width:min(1100px,94vw);max-height:86vh;border-radius:12px;object-fit:contain;cursor:pointer}
.lightbox button{position:absolute;background:rgba(255,255,255,.16);color:#fff;border:1px solid rgba(255,255,255,.4);border-radius:50%;width:46px;height:46px;font-size:24px;line-height:1;cursor:pointer}
.lb-prev{left:18px}
.lb-next{right:18px}
.lb-close{top:16px;right:16px;font-size:20px}
.lb-count{position:absolute;bottom:18px;left:50%;transform:translateX(-50%);color:#fff;background:rgba(0,0,0,.5);padding:5px 14px;border-radius:999px;font-size:14px}

/* ---------- empty state ---------- */
.empty-state{text-align:center;background:var(--sand);border:1px dashed var(--sea);border-radius:18px;padding:40px 22px;margin:22px 0}
.empty-state h3{margin:10px 0 6px;font-size:21px}
.empty-state p{color:var(--muted);max-width:520px;margin:0 auto 16px}
.empty-state .empty-icon{font-size:48px}
.empty-state .btn{margin:2px}

/* ---------- tables, amenities, detail ---------- */
table.facts{border-collapse:collapse;width:100%;margin:12px 0;background:#fff}
table.facts th,table.facts td{border:1px solid var(--line);padding:9px 12px;text-align:left;font-size:15px}
table.facts th{background:var(--sand);width:22%}
/* ---------- amenities (detail page) ---------- */
/* Each group is a framed card, so the section reads as a tidy grid
   instead of loose checkmark lists (user's request 2026-12-03 13:30).
   The grid auto-fills; the tablet/phone rules below pin it to 2 / 1
   columns. */
.amen-cols{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:14px}
.amen-group-card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:16px}
.amen-group-card h4{margin:0 0 10px;color:var(--sea-deep);font-size:15px}
.amen-list{list-style:none;padding:0;margin:0;display:grid;gap:8px}
.amen-list li{display:flex;gap:8px;align-items:flex-start;font-size:14.5px;line-height:1.4}
.amen-tick{color:var(--sea);font-weight:700;flex:none}
.map{width:100%;height:340px;border:1px solid var(--line);border-radius:14px}
/* ---------- Da Nang on the map (Leaflet, like the original site) ---------- */
.map-section{border:1px solid var(--line);border-radius:16px;overflow:hidden;background:#fff}
.map-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;background:var(--sea-dark);padding:16px 20px}
.map-head h2{color:#fff;margin:0;font-size:20px}
.map-head a{color:#fff;font-weight:600;text-decoration:none;white-space:nowrap}
.map-head a:hover{text-decoration:underline}
.map-sub{background:var(--sea-dark);color:#cfe6ef;margin:0;padding:0 20px 16px;font-size:14px}
.leaflet-map{width:100%;height:420px;z-index:1}
.leaflet-div-icon{background:transparent;border:none}
.map-pin{display:inline-block;width:14px;height:14px;border-radius:50%;background:#0b5ed7;border:2.5px solid #fff;box-shadow:0 1px 6px rgba(3,32,46,.5);vertical-align:middle;margin-right:5px}
.map-label{font-weight:700;font-size:13px;color:#12303f;background:rgba(255,255,255,.88);padding:1px 6px;border-radius:8px;white-space:nowrap;vertical-align:middle}
/* Wide horizontal cards when only a few homes exist (under 4): a 4-column
   grid would leave most of the row empty and the site looks deserted. */
.grid.featured{grid-template-columns:1fr}
.grid.featured .card a{display:flex}
.grid.featured .card img,.grid.featured .noimg{width:340px;height:250px;flex:none}
.grid.featured .card-body{flex:1;padding:22px}
.grid.featured .card h3{font-size:20px}
article h2{margin-top:26px}

/* ---------- forms ---------- */
.form{max-width:660px;display:grid;gap:12px;margin:14px 0}
/* ---------- centred narrow column (account pages) ---------- */
/* Sign in / Register / Verify / Profile on PC used to sit left in the
   1280px wrap with a big empty right half (user's screenshots 2026-12-03
   10:53). The whole column — heading, text and forms — is centred instead.
   Admin keeps the plain left-aligned .form: it is a dashboard, not an
   account page. */
.narrow{max-width:660px;margin:28px auto}
.narrow .form{max-width:none}
.form label{font-weight:600;font-size:14px;display:grid;gap:5px}
.form fieldset{border:1px solid var(--line);border-radius:12px;padding:12px}
.form legend{font-weight:700;color:var(--sea-deep);padding:0 6px}
.err{color:#b00020;background:#fdecea;padding:10px 14px;border-radius:9px}
.honeypot{position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden}

/* ---------- header account dropdown ---------- */
.account-menu{position:relative}
.account-menu summary{list-style:none;cursor:pointer}
.account-menu summary::-webkit-details-marker{display:none}
.account-menu summary.btn{display:block;text-align:center}
.account-drop{position:absolute;right:0;top:calc(100% + 8px);background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow-lg);min-width:190px;padding:6px;display:grid;z-index:20}
.account-drop a{display:block;padding:10px 12px;border-radius:8px;color:var(--ink);text-decoration:none;font-weight:600}
.account-drop a:hover{background:var(--sand);color:var(--sea-deep)}

/* ---------- contact buttons (WhatsApp / Zalo / Call) ---------- */
.btn.wa{background:#25D366;border-color:#25D366;color:#fff!important}
.btn.wa:hover{background:#1fb857;border-color:#1fb857}
.btn.zalo{background:#0068FF;border-color:#0068FF;color:#fff!important}
.btn.zalo:hover{background:#0057d8;border-color:#0057d8}

/* ---------- footer ---------- */
/* Old layout (brand + nav) kept on purpose — only the alignment is fixed:
   brand on the left, links on the right, vertically centred, so the two
   sides balance instead of stacking left-aligned. */
footer{background:var(--sea-dark);color:#cfe6ef;margin-top:auto;padding:34px 0 26px}
.foot{display:flex;justify-content:space-between;align-items:center;gap:20px;flex-wrap:wrap}
.foot-brand p{margin:0;color:#cfe6ef}
.foot-brand strong{color:#fff;font-size:18px}
.foot-nav{display:flex;gap:20px;flex-wrap:wrap;align-items:center}
.foot-nav a{color:#fff;text-decoration:none;font-weight:600;white-space:nowrap}
.foot-nav a:hover{text-decoration:underline}
.foot-bottom{border-top:1px solid rgba(255,255,255,.15);margin-top:24px;padding-top:16px;text-align:center}
.foot-bottom p{margin:0;color:#9fc3d2;font-size:13px}

/* ---------- tablet ---------- */
@media(max-width:768px){
  /* Header nav wraps to its own row(s) below the logo on narrow screens:
     every item on a row shares the row equally, so no button is left
     orphaned alone on a row. */
  header nav{width:100%;gap:6px;margin-left:0}
  header nav>*{flex:1 1 0;min-width:0;justify-content:center;text-align:center}
  .hero-content{padding:36px 24px 28px}
  .hero h1{font-size:32px}
  .proj-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .amen-cols{grid-template-columns:repeat(2,minmax(0,1fr))}
  .types{grid-template-columns:repeat(3,minmax(0,1fr))}
  .guide ol{grid-template-columns:repeat(2,minmax(0,1fr))}
  .search{grid-template-columns:repeat(2,minmax(0,1fr))}
  .search-compact{grid-template-columns:repeat(3,minmax(0,1fr))}
  .map{height:300px}
  .gallery-hero img#hero-img{height:360px}
  .gallery-thumbs{grid-template-columns:repeat(4,1fr)}
  .gallery-thumbs img{height:72px}
  .leaflet-map{height:320px}
  .grid.featured .card a{flex-direction:column}
  .grid.featured .card img,.grid.featured .noimg{width:100%;height:190px}
  .grid.view-list .card a{flex-direction:column}
  .grid.view-list .card img,.grid.view-list .noimg{width:100%;height:190px}
  .foot{flex-direction:column;align-items:flex-start;gap:12px}
}

/* ---------- phone (390px) ---------- */
@media(max-width:480px){
  .wrap{padding:0 14px}
  .head{padding:10px 14px;gap:10px}
  .logo{font-size:17px}
  /* Mobile header: the text links (Homes, Search) become tappable cells
     like the buttons, so the whole nav reads as a neat button grid. */
  header nav>a{padding:9px 6px;background:var(--sand);border:1px solid var(--line);border-radius:10px;font-weight:600}
  header nav .btn{padding:9px 6px}
  /* Phone header: two nav items per row, not four in one row. The tablet
     rule shares one row equally, which squeezed "+ List a Home" and the
     account name until their text clipped ("+ List a Ho…", user screenshot
     2026-12-03 10:11). Two per row gives each ~175px on a 390px phone. */
  header nav>*{flex:1 1 40%}
  .btn{padding:10px 14px;font-size:14px}
  .btn.small{padding:7px 10px}
  h1{font-size:24px}
  .gallery-hero img#hero-img{height:260px}
  .gallery-thumbs{grid-template-columns:repeat(3,1fr)}
  .gallery-thumbs img{height:64px}
  .agent-head{padding:16px;gap:14px}
  .agent-avatar{width:64px;height:64px;font-size:22px}
  .lb-prev{left:8px}
  .lb-next{right:8px}
  .lightbox button{width:40px;height:40px}
  .hero{border-radius:16px;margin:14px 0 22px}
  .hero-content{padding:26px 18px 22px}
  .hero h1{font-size:24px}
  .hero-sub{font-size:16px}
  .hero-cta .btn{flex:1;text-align:center}
  .search{grid-template-columns:1fr;padding:12px}
  .search input[name="q"]{grid-column:1/-1}
  .search .btn{justify-self:stretch;text-align:center}
  .search-compact .btn{grid-column:auto;grid-row:auto}
  .proj-grid{gap:10px}
  .proj-card{padding:12px}
  .proj-name{font-size:15px}
  .proj-icon{font-size:19px}
  .amen-cols{grid-template-columns:1fr}
  .types{grid-template-columns:repeat(2,minmax(0,1fr))}
  .guide{padding:16px}
  .guide ol{grid-template-columns:1fr}
  .grid{grid-template-columns:1fr}
  .map{height:260px}
  .leaflet-map{height:300px}
  .map-head h2{font-size:18px}
  table.facts th,table.facts td{font-size:14px;padding:7px 8px}
  table.facts th{width:30%}
  .empty-state{padding:30px 16px}
  .foot-nav{gap:14px}
}

/* ---------- composer (List a Home) — Facebook-Marketplace style ---------- */
.composer{max-width:980px;margin:14px auto;display:grid;gap:14px}
.composer .card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:18px}
.composer h1{font-size:22px;margin:0 0 4px}
.composer h2{font-size:16px;margin:0 0 12px;color:var(--sea-deep)}
.composer-head{padding:18px}
.composer label{font-weight:600;font-size:14px;display:grid;gap:5px;margin-bottom:12px}
.composer label:last-child{margin-bottom:0}
.composer input,.composer select,.composer textarea{width:100%;padding:10px 12px;border:1px solid var(--line);border-radius:9px;font-size:15px;font-family:inherit;background:#fff;color:var(--ink);min-width:0}
.composer input:focus,.composer select:focus,.composer textarea:focus{outline:2px solid var(--sea);outline-offset:1px;border-color:var(--sea)}
.composer input[readonly]{background:#f4f6f7;color:#5b6b76}
.composer .row2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.composer .row3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px}
/* Straight rows: labels inside a row carry no bottom margin (the row gap
   already spaces rows), and every input/select is exactly 44px tall.
   Before this, the first label's 12px margin made the grid stretch the
   second label, so right-column fields sat ~5px lower and rendered ~6px
   taller than the left ones — the rows looked crooked. */
.composer .row2 label,.composer .row3 label{margin-bottom:0}
.composer input,.composer select{height:44px}
.composer fieldset{border:1px solid var(--line);border-radius:12px;padding:12px;margin:0 0 12px}
.composer legend{font-weight:700;color:var(--sea-deep);padding:0 6px;font-size:14px}
/* Amenities in the composer: compact pill grid per group, not one
   full-width row per amenity — 24 rows used to read like a scroll. The
   grid auto-fills (4 columns on PC, 2 on phones), and the .amen-chip
   rules MUST beat .composer label (display:grid, margin-bottom:12px)
   and .composer input (height:44px) on specificity — otherwise the
   checkbox stacks above the text and the pill renders ~84px tall with
   a 44px-tall checkbox (the /post bug ThuongTin screenshotted
   2026-12-03 11:53). */
.composer fieldset.amen-group{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:6px;align-items:start}
.composer fieldset.amen-group legend{grid-column:1/-1}
.composer label.amen-chip{display:flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:999px;padding:7px 11px;font-size:13.5px;font-weight:500;cursor:pointer;margin:0;background:#fff;line-height:1.35}
.composer label.amen-chip input{width:auto;height:auto;margin:0;accent-color:var(--sea);flex:none}
.composer label.amen-chip:has(input:checked){background:#e3f2f7;border-color:var(--sea);color:var(--sea-deep)}
.composer details.card summary{cursor:pointer;font-weight:700;font-size:16px;color:var(--sea-deep);list-style:none}
.composer details.card summary::-webkit-details-marker{display:none}
.composer details.card[open ] summary{margin-bottom:12px}
.dropzone{border:2px dashed #b9cdd6;border-radius:12px;padding:26px 16px;display:flex;flex-direction:column;align-items:center;gap:6px;cursor:pointer;text-align:center;background:#f7fbfd}
.dropzone:hover,.dropzone.over{border-color:var(--sea);background:#eef7fb}
.dz-plus{font-size:30px;line-height:1;color:var(--sea);font-weight:700}
.photo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;margin-top:10px}
.photo-grid:empty{display:none}
.photo-grid.small img{height:72px}
.photo-thumb{position:relative;aspect-ratio:1;border-radius:10px;overflow:hidden;background:#e8eef1}
.photo-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.photo-thumb button{position:absolute;top:5px;right:5px;width:24px;height:24px;border:none;border-radius:50%;background:rgba(0,0,0,.65);color:#fff;font-size:15px;line-height:1;cursor:pointer}
.btn.big{width:100%;padding:13px;font-size:16px;justify-content:center}

/* ---------- admin dashboard tabs ---------- */
.admin-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0 4px}
.admin-tabs button{border:1px solid var(--line);background:#fff;color:var(--sea-deep);border-radius:999px;padding:9px 16px;font-size:14px;font-weight:600;cursor:pointer;font-family:inherit}
.admin-tabs button:hover{border-color:var(--sea)}
.admin-tabs button.active{background:var(--sea);border-color:var(--sea);color:#fff}
.admin-panel{background:#fff;border:1px solid var(--line);border-radius:14px;padding:20px;margin-top:14px;overflow-x:auto}
.admin-panel[hidden]{display:none}
.admin-filters{display:flex;gap:10px;flex-wrap:wrap;align-items:flex-end;margin:0 0 12px}
.admin-filters label{display:grid;gap:4px;font-size:13px;font-weight:600;color:var(--sea-deep)}
.admin-filters select{padding:8px 10px;border:1px solid var(--line);border-radius:8px;font-size:14px;background:#fff;max-width:220px;font-family:inherit}
.admin-filters a{align-self:center}
.admin-panel h2{margin:0 0 12px;color:var(--sea-deep)}
.admin-panel .form{max-width:760px}
.admin-settings{max-width:none}
.admin-savebar{position:sticky;bottom:0;background:var(--bg);padding:12px 0;display:flex;justify-content:flex-end;border-top:1px solid var(--line);margin-top:14px;z-index:5}
@media(max-width:640px){
  .composer .row2,.composer .row3{grid-template-columns:1fr}
  .composer fieldset.amen-group{grid-template-columns:repeat(2,minmax(0,1fr));padding:8px}
  .composer label.amen-chip{font-size:13px;padding:6px 10px}
  .photo-grid{grid-template-columns:repeat(3,1fr)}
}
