/* ══════════════════════════════════════════════════════════════════════════
   HOUSING PLOTS — listing page.

   Design tokens (--text/--border/--white/--bg/--accent) all come from
   styles.css, and the card radii, pill counts and sidebar-aware .page-wrap
   are the same ones index.html uses — so this page reads as part of the
   same shop rather than a bolt-on. Plot-specific rules are namespaced `hp-`.
   ══════════════════════════════════════════════════════════════════════════ */

body {
  display: flex;
  flex-direction: column;
  font-family: 'Inter', 'Geist', 'DM Sans', sans-serif;
  background: var(--bg) !important;
  color: var(--text);
  min-height: 100vh;
}

.page-wrap {
  margin-left: var(--sidebar-w, 320px);
  flex: 1 0 auto;
  min-width: 0;
  transition: margin-left .15s cubic-bezier(.4, 0, .2, 1);
  display: flex;
  flex-direction: column;
}
@media (max-width: 1024px) { .page-wrap { margin-left: 0 !important; } }

.hp-page { padding: 24px 20px 48px; min-width: 0; }
@media (max-width: 600px) { .hp-page { padding: 16px 14px 40px; } }

/* Shared content column — same 85%/1400px rhythm as votes.html and index.html */
.hp-wrap { width: 85%; max-width: 1400px; margin: 0 auto; min-width: 0; }
@media (max-width: 1024px) { .hp-wrap { width: 100%; } }

/* ── Page header ─────────────────────────────────────────────────────────── */
.hp-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: var(--page-header-margin-top, 6px) 0 var(--page-header-margin-bottom, 12px);
}
.hp-hdr h1 {
  font-family: 'Inter', 'Geist', sans-serif;
  font-size: var(--page-title-size, 34px);
  font-weight: var(--page-title-weight, 800);
  color: var(--text);
  letter-spacing: var(--page-title-letter-spacing, -0.02em);
  margin: 0;
  line-height: var(--page-title-line-height, 1.1);
}
.hp-hdr-sub {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 4px;
}

.hp-avail-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 15px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(var(--pp-green-600-rgb), .1);
  color: var(--pp-green-700);
  border: 1px solid rgba(var(--pp-green-600-rgb), .18);
  transition: background .3s, color .3s;
  white-space: nowrap;
}
.hp-avail-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--pp-green-600); flex-shrink: 0;
}
body.dark .hp-avail-badge { background: rgba(var(--pp-green-500-rgb), .14); color: var(--pp-green-400); border-color: rgba(var(--pp-green-500-rgb), .25); }
body.dark .hp-avail-dot { background: var(--pp-green-400); }

.hp-avail-badge.none { background: rgba(0,0,0,.04); color: var(--text-muted); border-color: var(--border); }
.hp-avail-badge.none .hp-avail-dot { background: var(--text-muted); }
body.dark .hp-avail-badge.none { background: rgba(255,255,255,.05); color: var(--text-soft); border-color: var(--border); }

/* ── Hero carousel ───────────────────────────────────────────────────────── */
.hp-hero {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 21 / 8;
  min-height: 260px;
  background: #14161a;
  margin-bottom: 40px;
  border: 1px solid var(--border);
}
@media (max-width: 760px) { .hp-hero { aspect-ratio: 4 / 3; min-height: 0; border-radius: 16px; } }

.hp-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .45s ease;
}
.hp-hero-slide.active { opacity: 1; pointer-events: auto; }

.hp-hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
/* Left-weighted scrim: keeps the copy legible over any artwork without
   flattening the whole image the way a full-bleed overlay does. */
.hp-hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(8,10,14,.88) 0%, rgba(8,10,14,.72) 34%, rgba(8,10,14,.15) 70%, rgba(8,10,14,.05) 100%);
}
@media (max-width: 760px) {
  .hp-hero-scrim { background: linear-gradient(0deg, rgba(8,10,14,.92) 8%, rgba(8,10,14,.55) 55%, rgba(8,10,14,.15) 100%); }
}

.hp-hero-body {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 34px 40px;
  max-width: 620px;
}
@media (max-width: 760px) { .hp-hero-body { justify-content: flex-end; padding: 20px; max-width: none; gap: 8px; } }

.hp-hero-name {
  font-size: 34px; font-weight: 800; color: #fff;
  letter-spacing: -.03em; line-height: 1.12;
}
@media (max-width: 760px) { .hp-hero-name { font-size: 23px; } }

.hp-hero-by { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.7); }
.hp-hero-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hp-hero-price {
  font-size: 27px; font-weight: 800; color: #fff;
  letter-spacing: -.02em; display: flex; align-items: baseline; gap: 9px;
}
.hp-hero-price small { font-size: 12px; font-weight: 600; color: rgba(255,255,255,.55); }
.hp-hero-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 4px; }

/* Carousel controls — arrows + dots as one cluster. housing.js hides the whole
   thing when there is only one featured plot. */
.hp-hero-nav {
  position: absolute; z-index: 5;
  bottom: 16px; right: 18px;
  display: flex; align-items: center; gap: 10px;
  padding: 5px 8px; border-radius: 50px;
  background: rgba(12,14,18,.4);
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
@media (max-width: 760px) {
  /* Copy is bottom-aligned on mobile, so move the controls out of its way. */
  .hp-hero-nav { bottom: auto; top: 12px; right: 12px; gap: 8px; }
}

.hp-hero-arrow {
  width: 26px; height: 26px; border-radius: 50%; padding: 0; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border: none; background: transparent; color: rgba(255,255,255,.75);
  cursor: pointer; transition: background .15s, color .15s, transform .12s;
}
.hp-hero-arrow:hover { background: rgba(255,255,255,.18); color: #fff; }
.hp-hero-arrow:active { transform: scale(.9); }

/* Carousel dots */
.hp-hero-dots { display: flex; align-items: center; gap: 6px; }
.hp-hero-dot {
  width: 7px; height: 7px; border-radius: 50%; padding: 0;
  border: none; background: rgba(255,255,255,.35); cursor: pointer;
  transition: background .2s, width .2s;
}
.hp-hero-dot.active { background: #fff; width: 20px; border-radius: 50px; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.hp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 18px; border-radius: 12px;
  font-family: inherit; font-size: 13.5px; font-weight: 700;
  cursor: pointer; border: 1.5px solid transparent;
  transition: transform .12s, background .15s, border-color .15s, opacity .15s;
  white-space: nowrap; text-decoration: none;
}
.hp-btn:active { transform: scale(.975); }
.hp-btn:disabled { opacity: .5; cursor: not-allowed; }

/* See .btn-primary in styles.css. The purple admin-bar variant further down is
   left alone — white on #7C3AED is 5.7:1 and already passes. */
.hp-btn-primary { background: var(--pp-green-700); color: #fff; border-color: var(--pp-green-700); }
.hp-btn-primary:hover:not(:disabled) { background: var(--pp-green-800); border-color: var(--pp-green-800); }
/* In step with the canonical primary in styles.css: white on #15803D in both themes. */
body.dark .hp-btn-primary { background: var(--pp-green-700); color: #fff; border-color: var(--pp-green-700); }
body.dark .hp-btn-primary:hover:not(:disabled) { background: var(--pp-green-800); border-color: var(--pp-green-800); }

.hp-btn-ghost-dark { background: rgba(255,255,255,.07); color: #fff; border-color: rgba(255,255,255,.35); backdrop-filter: blur(6px); }
.hp-btn-ghost-dark:hover { background: rgba(255,255,255,.16); }

.hp-btn-outline { background: transparent; color: var(--text); border-color: var(--text); }
.hp-btn-outline:hover:not(:disabled) { background: rgba(0,0,0,.05); }
body.dark .hp-btn-outline:hover:not(:disabled) { background: rgba(255,255,255,.07); }

.hp-btn-danger { background: transparent; color: #DC2626; border-color: rgba(220,38,38,.45); }
.hp-btn-danger:hover:not(:disabled) { background: rgba(220,38,38,.08); }

/* ── Pills / badges ──────────────────────────────────────────────────────── */
.hp-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border-radius: 50px;
  font-size: 11.5px; font-weight: 700; white-space: nowrap;
  border: 1px solid var(--border); color: var(--text-soft); background: var(--white);
}
.hp-pill-dark { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.28); color: #fff; }

.hp-badge-featured {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px 3px; border-radius: 50px;
  font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  background: #F5C518; color: #3A2A00; border: 1px solid rgba(0,0,0,.08);
  white-space: nowrap;
}
.hp-badge-new {
  display: inline-flex; align-items: center;
  padding: 4px 10px 3px; border-radius: 50px;
  font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  background: var(--pp-green-600); color: #fff; white-space: nowrap;
}
.hp-badge-draft {
  display: inline-flex; align-items: center;
  padding: 4px 10px 3px; border-radius: 50px;
  font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  background: #6B7280; color: #fff; white-space: nowrap;
}
.hp-badge-sold {
  display: inline-flex; align-items: center;
  padding: 4px 10px 3px; border-radius: 50px;
  font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  background: #DC2626; color: #fff; white-space: nowrap;
}

/* ── Section shell ───────────────────────────────────────────────────────── */
.hp-section { margin-bottom: 38px; }
.hp-section-hdr {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.hp-section-title {
  font-size: 18px; font-weight: 800; color: var(--text); letter-spacing: -.02em;
}
.hp-section-link {
  font-size: 12.5px; font-weight: 700; color: var(--text-soft);
  background: none; border: 1.5px solid var(--border); border-radius: 50px;
  padding: 5px 14px; cursor: pointer; transition: border-color .15s, color .15s;
  font-family: inherit;
}
.hp-section-link:hover { border-color: var(--text); color: var(--text); }

/* Panel — the light card that wraps a whole section (matches index.html) */
.hp-panel {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 20px 22px 24px;
}
@media (max-width: 600px) { .hp-panel { padding: 16px 14px 20px; border-radius: 16px; } }

/* ── Filter bar ──────────────────────────────────────────────────────────── */
.hp-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) repeat(3, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
@media (max-width: 900px) { .hp-filters { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .hp-filters { grid-template-columns: 1fr; } }

.hp-search {
  position: relative; display: flex; align-items: center;
}
.hp-search svg {
  position: absolute; left: 13px; width: 15px; height: 15px;
  color: var(--text-muted); pointer-events: none;
}
.hp-search input {
  width: 100%; padding: 11px 13px 11px 36px;
  border-radius: 10px; border: 1.5px solid var(--border);
  background: var(--bg); color: var(--text);
  font-family: inherit; font-size: 13.5px; font-weight: 500;
  outline: none; transition: border-color .15s;
}
.hp-search input::placeholder { color: var(--text-muted); font-weight: 500; }
.hp-search input:focus { border-color: var(--accent, var(--pp-green-600)); }
body.dark .hp-search input { background: #131316; }

.hp-field { position: relative; }
.hp-field-label {
  position: absolute; top: 5px; left: 13px;
  font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-muted); pointer-events: none;
}
.hp-field select {
  width: 100%; padding: 17px 30px 6px 12px;
  border-radius: 10px; border: 1.5px solid var(--border);
  background: var(--bg); color: var(--text);
  font-family: inherit; font-size: 13.5px; font-weight: 700;
  outline: none; cursor: pointer; appearance: none;
  transition: border-color .15s;
}
.hp-field select:focus { border-color: var(--accent, var(--pp-green-600)); }
.hp-field::after {
  content: ''; position: absolute; right: 13px; top: 55%;
  width: 7px; height: 7px; pointer-events: none;
  border-right: 1.8px solid var(--text-muted); border-bottom: 1.8px solid var(--text-muted);
  transform: translateY(-50%) rotate(45deg);
}
body.dark .hp-field select { background: #131316; }

/* Theme chips */
.hp-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.hp-chip {
  padding: 6px 15px; border-radius: 50px;
  border: 1.5px solid var(--border); background: transparent;
  font-family: inherit; font-size: 12.5px; font-weight: 700;
  color: var(--text-soft); cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.hp-chip:hover { border-color: var(--text-soft); color: var(--text); }
.hp-chip.active {
  background: rgba(var(--pp-green-600-rgb), .1); border-color: rgba(var(--pp-green-600-rgb), .35); color: var(--pp-green-700);
}
body.dark .hp-chip.active { background: rgba(var(--pp-green-500-rgb), .14); border-color: rgba(var(--pp-green-500-rgb), .3); color: var(--pp-green-400); }

/* ── Plot card grid ──────────────────────────────────────────────────────── */
.hp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
  gap: 16px;
}
/* Row variant — 4 fixed columns so the "Featured"/"Recently Added" strips
   keep their shape instead of reflowing to a different count than the
   browse grid directly below them. */
.hp-grid.hp-grid-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .hp-grid.hp-grid-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) {
  .hp-grid, .hp-grid.hp-grid-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

.hp-card {
  position: relative;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.hp-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover, 0 12px 28px rgba(0,0,0,.09));
  border-color: rgba(var(--pp-green-600-rgb), .45);
}
.hp-card.is-draft { border-style: dashed; opacity: .82; }

.hp-card-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #e9e7e2, #d8d5cf);
  overflow: hidden;
  text-decoration: none;
}
body.dark .hp-card-media { background: linear-gradient(135deg, #1d1d21, #141416); }
.hp-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hp-card-media-empty {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); opacity: .55;
}
.hp-card-media-empty svg { width: 30px; height: 30px; }

.hp-card-badges { position: absolute; top: 9px; left: 9px; z-index: 3; display: flex; gap: 5px; flex-wrap: wrap; max-width: calc(100% - 52px); }

.hp-card-fav {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  width: 27px; height: 27px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer; padding: 0;
  background: rgba(18,20,24,.5); color: #fff;
  backdrop-filter: blur(6px);
  transition: background .15s, color .15s, transform .12s;
}
.hp-card-fav:hover { background: rgba(18,20,24,.72); transform: scale(1.08); }
.hp-card-fav.is-fav { background: #F5C518; color: #3A2A00; }
/* Admin-only card action. Sits alongside the edit pencil and reads as neutral
   until hovered, so the destructive colour only appears on the control the
   cursor is actually on — see decorateAdminCards() in housing.js. */
.hp-card-delete:hover { background: #DC2626; color: #fff; }

.hp-card-body { padding: 11px 12px 12px; display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.hp-card-name {
  font-size: 13.5px; font-weight: 700; color: var(--text);
  line-height: 1.3; letter-spacing: -.012em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; text-decoration: none;
}
a.hp-card-name:hover { color: var(--accent, var(--pp-green-600)); }
.hp-card-meta {
  font-size: 11.5px; font-weight: 500; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hp-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-top: auto; padding-top: 8px;
}
.hp-card-price { font-size: 15px; font-weight: 800; color: var(--text); letter-spacing: -.02em; }
.hp-card-actions { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }

.hp-icon-btn {
  width: 29px; height: 29px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--border); background: transparent;
  color: var(--text-soft); cursor: pointer; padding: 0;
  transition: background .15s, color .15s, border-color .15s, transform .12s;
}
.hp-icon-btn:hover { border-color: var(--text); color: var(--text); }
.hp-icon-btn:active { transform: scale(.92); }
.hp-icon-btn:disabled { opacity: .4; cursor: not-allowed; }
.hp-icon-btn.hp-icon-cart { background: var(--accent, var(--pp-green-600)); border-color: var(--accent, var(--pp-green-600)); color: #fff; }
.hp-icon-btn.hp-icon-cart:hover:not(:disabled) { background: var(--pp-green-700); border-color: var(--pp-green-700); }
.hp-icon-btn.hp-icon-cart.in-basket { background: var(--text); border-color: var(--text); }
body.dark .hp-icon-btn.hp-icon-cart.in-basket { color: #0a0a0c; }

/* ── Horizontal scroll strip (Featured / Recently Added on narrow screens) ─ */
.hp-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .hp-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

/* ── Empty / loading states ──────────────────────────────────────────────── */
.hp-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 56px 20px; text-align: center;
}
.hp-empty-ico { font-size: 34px; opacity: .8; }
.hp-empty h3 { font-size: 16px; font-weight: 800; color: var(--text); margin: 0; }
.hp-empty p { font-size: 13px; color: var(--text-muted); margin: 0; max-width: 380px; line-height: 1.5; }

/* ── Admin bar + editor ──────────────────────────────────────────────────── */
.hp-admin-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap;
  padding: 11px 15px; margin-bottom: 18px;
  border-radius: 12px;
  background: rgba(124,58,237,.08);
  border: 1.5px solid rgba(124,58,237,.3);
  color: #5B21B6;
  font-size: 12.5px; font-weight: 700;
}
body.dark .hp-admin-bar { background: rgba(124,58,237,.16); border-color: rgba(124,58,237,.35); color: #D8C9FC; }
.hp-admin-bar .hp-btn { padding: 7px 14px; font-size: 12.5px; }
.hp-admin-bar .hp-btn-primary { background: #7C3AED; border-color: #7C3AED; }
.hp-admin-bar .hp-btn-primary:hover:not(:disabled) { background: #6D28D9; border-color: #6D28D9; }

.hp-modal-backdrop {
  position: fixed; inset: 0; z-index: 9500;
  background: rgba(10,10,14,.55);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px; overflow-y: auto;
  backdrop-filter: blur(3px);
}
.hp-modal {
  width: 100%; max-width: 720px;
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: 16px; padding: 24px;
  box-shadow: 0 24px 64px rgba(0,0,0,.28);
}
.hp-modal h2 { font-size: 19px; font-weight: 800; color: var(--text); margin: 0 0 4px; letter-spacing: -.02em; }
.hp-modal-sub { font-size: 12.5px; color: var(--text-muted); margin: 0 0 18px; }

.hp-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 620px) { .hp-form-grid { grid-template-columns: 1fr; } }
.hp-form-row { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.hp-form-row.full { grid-column: 1 / -1; }
.hp-form-row label {
  font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-muted);
}
.hp-form-row input[type=text],
.hp-form-row input[type=number],
.hp-form-row select,
.hp-form-row textarea {
  width: 100%; padding: 9px 11px;
  border-radius: 9px; border: 1.5px solid var(--border);
  background: var(--bg); color: var(--text);
  font-family: inherit; font-size: 13px; font-weight: 500;
  outline: none; transition: border-color .15s;
}
.hp-form-row textarea { resize: vertical; min-height: 76px; line-height: 1.5; }
.hp-form-row input:focus, .hp-form-row select:focus, .hp-form-row textarea:focus { border-color: #7C3AED; }
body.dark .hp-form-row input, body.dark .hp-form-row select, body.dark .hp-form-row textarea { background: #131316; }
.hp-form-hint { font-size: 11px; color: var(--text-muted); font-weight: 500; }
.hp-form-check { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--text); cursor: pointer; }
.hp-form-check input { width: 16px; height: 16px; accent-color: #7C3AED; cursor: pointer; }
.hp-modal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin-top: 20px; flex-wrap: wrap; }
.hp-modal-actions .hp-btn-primary { background: #7C3AED; border-color: #7C3AED; }
.hp-modal-actions .hp-btn-primary:hover:not(:disabled) { background: #6D28D9; border-color: #6D28D9; }
.hp-modal-err { font-size: 12.5px; font-weight: 700; color: #DC2626; margin-right: auto; }

/* Toasts: laid out and styled in ONE place, header.js (window.ppToast). */

/* ── Housing landing chooser ──────────────────────────────────────────────
   Decor vs Plots. Sits above the plot browser, which is hidden until Plots is
   picked (see #hpPlotsView in housing.html and the toggle in housing.js). */
/* The chooser's header IS .hp-hdr (see housing.html), so its title gets the
   shared page-title size/weight/spacing and sits exactly where Rewards' and
   Votes' titles do — no extra padding or margins of its own on top. */
.hp-choose { padding: 0 0 4px; }
.hp-choose-h1 {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.hp-choose-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
/* Explicit min-height rather than letting the row size itself: the Plots card
   is a <button>, and a button does not propagate its children's intrinsic size
   to an auto-sized grid row — it collapses to its own line-height and clips
   everything inside. The <a> beside it would size fine, which is exactly what
   makes the bug look like a styling accident instead of a layout rule. */
.hp-choose-card {
  --c0: #18181d; --c1: #2c2c34; --c2: rgba(255,255,255,.10);
  position: relative; overflow: hidden; isolation: isolate;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 18px 20px;
  border: none;
  border-radius: 20px;
  background: var(--c0);
  color: #fff;
  text-align: left;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
}
/* Same tile recipe as the dashboard (dashboard-v2.css .dv2-tile) and Pack
   Builder's section tiles (builder.css .bb-sec): dark in both themes, one
   diagonal gradient with the glow bottom-right, pictures tilted on the
   bottom edge. No count here, so it reads like the Referrals tile: a small
   label on top and the sentence at the bottom. */
.hp-choose--votes    { --c0: #33200a; --c1: #a8661a; --c2: rgba(255,214,140,.42); }
.hp-choose--segments { --c0: #0a2a2c; --c1: #1f7a6b; --c2: rgba(160,240,220,.4); }
.hp-choose--plots    { --c0: #12173d; --c1: #4151b8; --c2: rgba(170,190,255,.42); }
.hp-choose-bg {
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(120% 140% at 100% 100%, var(--c2), transparent 55%),
    linear-gradient(135deg, var(--c0), var(--c1));
}
.hp-choose-imgs {
  position: absolute; right: 6px; bottom: 2px; z-index: -1;
  display: flex; align-items: flex-end; pointer-events: none;
}
.hp-choose-imgs img {
  width: 64px; height: 64px; margin-left: -22px; object-fit: contain; object-position: center bottom;
  filter: drop-shadow(0 8px 12px rgba(0,0,0,.45));
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.hp-choose-imgs img:nth-child(1) { transform: rotate(-10deg) translateY(2px); }
.hp-choose-imgs img:nth-child(2) { width: 88px; height: 88px; transform: rotate(-6deg); z-index: 2; }
.hp-choose-imgs img:nth-child(3) { transform: rotate(8deg) translateY(4px); }
@media (hover: hover) {
  .hp-choose-card:hover { transform: translateY(-2px); }
  .hp-choose-card:hover .hp-choose-imgs img:nth-child(1) { transform: rotate(-14deg) translate(-4px,-2px); }
  .hp-choose-card:hover .hp-choose-imgs img:nth-child(2) { transform: rotate(0deg) translateY(-6px) scale(1.06); }
  .hp-choose-card:hover .hp-choose-imgs img:nth-child(3) { transform: rotate(12deg) translate(4px,0); }
}
.hp-choose-card:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.hp-choose-name {
  font-size: 15px; font-weight: 700; line-height: 1.2;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
.hp-choose-sub {
  margin-top: auto; max-width: 60%;
  font-size: 15px; font-weight: 600; line-height: 1.3;
  text-shadow: 0 1px 2px rgba(0,0,0,.45), 0 0 10px rgba(0,0,0,.3);
}
/* Plain small text under the sentence (the whole card is the link). */
.hp-choose-cta {
  margin-top: 8px;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255,255,255,.8);
}
.hp-choose-badge {
  font-style: normal; font-size: 10px; font-weight: 800;
  letter-spacing: .3px; text-transform: uppercase;
  padding: 2px 7px; border-radius: 20px;
  background: rgba(255,255,255,.16); color: rgba(255,255,255,.85);
}
/* Work in progress: muted, not disabled — Plots is admin-only already and
   admins still need in. */
.hp-choose-card.is-soon { filter: saturate(.55) brightness(.72); }
.hp-choose-card.is-soon:hover { filter: saturate(.8) brightness(.85); }
.hp-choose-card.is-soon .hp-choose-cta { color: rgba(255,255,255,.65); }
/* Segments has no page yet — nothing to open, so no hover lift either. */
.hp-choose-card.is-soon[aria-disabled="true"] { cursor: default; }
.hp-choose-card.is-soon[aria-disabled="true"]:hover { filter: saturate(.55) brightness(.72); transform: none; }
.hp-choose-card.is-soon[aria-disabled="true"]:hover .hp-choose-imgs img:nth-child(1) { transform: rotate(-10deg) translateY(2px); }
.hp-choose-card.is-soon[aria-disabled="true"]:hover .hp-choose-imgs img:nth-child(2) { transform: rotate(-6deg); }
.hp-choose-card.is-soon[aria-disabled="true"]:hover .hp-choose-imgs img:nth-child(3) { transform: rotate(8deg) translateY(4px); }

.hp-back-row { margin-bottom: 10px; }
.hp-back {
  font: inherit; font-size: 13px; font-weight: 800;
  color: var(--text-muted); background: none; border: 0;
  padding: 6px 0; cursor: pointer;
}
.hp-back:hover { color: var(--text); }

@media (max-width: 640px) {
  .hp-choose-grid { gap: 10px; }
  .hp-choose-card { min-height: 124px; padding: 16px 18px; border-radius: 18px; }
  .hp-choose-sub { font-size: 14px; }
  .hp-choose-imgs img { width: 56px; height: 56px; }
  .hp-choose-imgs img:nth-child(2) { width: 76px; height: 76px; }
}
