/* =========================================================================
   Veedu — Kerala property marketplace
   Light theme inspired by the Kerala kasavu saree: warm off-white,
   deep backwater green and a touch of gold.
   ========================================================================= */

:root {
  --bg: #faf8f3;
  --bg-2: #f3efe5;
  --surface: #ffffff;
  --ink: #10231d;
  --ink-2: #2f433c;
  --muted: #66766f;
  --line: #e6e0d2;
  --line-2: #efeae0;

  --primary: #0e6b50;
  --primary-600: #0b5a43;
  --primary-700: #094a37;
  --primary-50: #ebf5f0;
  --primary-100: #d4ebe0;

  --gold: #c99a3b;
  --gold-600: #a67c26;
  --gold-50: #fbf5e6;
  --gold-100: #f4e6c3;

  --danger: #c53030;
  --danger-50: #fdeeee;
  --success: #15803d;
  --whatsapp: #1fa855;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-xs: 0 1px 2px rgba(16, 35, 29, 0.06);
  --shadow-sm: 0 1px 3px rgba(16, 35, 29, 0.06), 0 1px 2px rgba(16, 35, 29, 0.04);
  --shadow: 0 12px 32px -14px rgba(16, 35, 29, 0.2), 0 4px 10px -6px rgba(16, 35, 29, 0.08);
  --shadow-lg: 0 32px 64px -24px rgba(16, 35, 29, 0.28), 0 8px 20px -10px rgba(16, 35, 29, 0.1);

  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --ml: "Manjari", "Noto Sans Malayalam", sans-serif;

  --header-h: 72px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
}

h1,
h2 {
  font-family: var(--display);
  font-weight: 600;
  font-optical-sizing: auto;
}

p {
  margin: 0;
}

code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.88em;
  background: rgba(16, 35, 29, 0.06);
  padding: 0.1em 0.4em;
  border-radius: 6px;
}

[lang="ml"],
.ml {
  font-family: var(--ml);
}

.icon {
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
  vertical-align: -0.2em;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

::selection {
  background: var(--primary-100);
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent);
  outline-offset: 2px;
}

/* Kasavu border: a gold band with a fine line beside it */
.kasavu {
  height: 7px;
  background: linear-gradient(to bottom, var(--gold) 0 4px, transparent 4px 5.5px, var(--gold) 5.5px 7px);
  opacity: 0.9;
}

/* ---------------- Buttons ---------------- */

.btn {
  --h: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--h);
  padding: 0 20px;
  border-radius: 12px;
  border: 1.5px solid transparent;
  font-weight: 650;
  font-size: 15px;
  letter-spacing: -0.005em;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease), background 0.2s, border-color 0.2s, color 0.2s;
  text-decoration: none;
  user-select: none;
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn[disabled] {
  opacity: 0.6;
  pointer-events: none;
}

.btn-sm {
  --h: 38px;
  padding: 0 14px;
  font-size: 14px;
  border-radius: 10px;
}

.btn-lg {
  --h: 54px;
  padding: 0 26px;
  font-size: 16px;
  border-radius: 14px;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: linear-gradient(180deg, #13805f 0%, var(--primary) 100%);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 6px 16px -6px rgba(14, 107, 80, 0.55);
}

.btn-primary:hover {
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-600) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 10px 22px -8px rgba(14, 107, 80, 0.6);
}

.btn-gold {
  background: linear-gradient(180deg, #d4a849 0%, var(--gold) 100%);
  color: #2b1f05;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 6px 16px -6px rgba(201, 154, 59, 0.6);
}

.btn-gold:hover {
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-600) 100%);
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

.btn-ghost:hover {
  border-color: #cfc7b5;
  background: #fffdf8;
}

.btn-soft {
  background: var(--primary-50);
  color: var(--primary-700);
}

.btn-soft:hover {
  background: var(--primary-100);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #a92727;
}

.btn-whatsapp {
  background: var(--whatsapp);
  color: #fff;
  box-shadow: 0 6px 16px -6px rgba(31, 168, 85, 0.55);
}

.btn-whatsapp:hover {
  background: #188f47;
}

.btn-icon {
  --h: 40px;
  width: var(--h);
  padding: 0;
  border-radius: 12px;
}

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
}

.link-btn:hover {
  text-decoration: underline;
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.5px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------------- Header ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 243, 0.82);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.site-header.scrolled {
  border-bottom-color: var(--line);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 6px 20px -16px rgba(16, 35, 29, 0.35);
}

.nav {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  flex-shrink: 0;
}

.logo-mark {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 4px 8px rgba(14, 107, 80, 0.3));
}

.brand-name {
  font-family: var(--display);
  font-size: 25px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

/* "Veedu" and "വീട്" share a baseline, so the Malayalam sits level with the English */
.brand-text {
  display: inline-flex;
  align-items: baseline;
}

.brand-sep {
  align-self: center;
  width: 1.5px;
  height: 22px;
  margin: 0 9px 0 11px;
  background: var(--line);
}

.brand-ml {
  font-size: 24px;
  line-height: 1;
  color: var(--gold-600);
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 10px;
  color: var(--ink-2);
  font-weight: 600;
  font-size: 15px;
  transition: background 0.15s, color 0.15s;
}

.nav-link .icon {
  opacity: 0.7;
}

.nav-link:hover {
  background: rgba(16, 35, 29, 0.05);
  color: var(--ink);
}

.nav-link.active {
  background: var(--primary-50);
  color: var(--primary-700);
}

.nav-link.active .icon {
  opacity: 1;
}

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

.nav-links .mobile-only {
  display: none;
}

.nav-login.is-current {
  border-color: var(--primary);
  color: var(--primary-700);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.user-menu {
  position: relative;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  font-weight: 650;
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.user-chip:hover {
  border-color: #cfc7b5;
  box-shadow: var(--shadow-sm);
}

.user-chip .icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, var(--gold-100), var(--gold));
  color: #3a2a06;
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
  flex-shrink: 0;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-lg {
  width: 56px;
  height: 56px;
  font-size: 19px;
}

.user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 250px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 8px;
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s var(--ease);
  transform-origin: top right;
}

.user-menu.open .user-dropdown {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.user-dropdown-head {
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--line-2);
  margin-bottom: 6px;
  display: grid;
}

.user-dropdown-head span {
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-dropdown a,
.user-dropdown button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 0;
  background: none;
  color: var(--ink-2);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-align: left;
}

.user-dropdown a:hover,
.user-dropdown button:hover {
  background: var(--bg);
  color: var(--ink);
}

.user-dropdown [data-signout] {
  color: var(--danger);
}

.demo-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 48px 8px 16px;
  background: var(--gold-50);
  border-bottom: 1px solid var(--gold-100);
  color: #6b4f12;
  font-size: 13.5px;
  position: relative;
  text-align: center;
}

.demo-banner > .icon {
  color: var(--gold-600);
}

.demo-banner button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: none;
  cursor: pointer;
  color: #6b4f12;
  padding: 6px;
  border-radius: 8px;
  display: grid;
}

.demo-banner button:hover {
  background: rgba(107, 79, 18, 0.08);
}

/* ---------------- Forms ---------------- */

.field {
  display: grid;
  gap: 7px;
}

.field > label,
.label {
  font-size: 14px;
  font-weight: 650;
  color: var(--ink-2);
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.optional {
  color: var(--muted);
  font-weight: 500;
  font-size: 12.5px;
}

.input,
.select,
.textarea {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  appearance: none;
  -webkit-appearance: none;
}

.input::placeholder,
.textarea::placeholder {
  color: #9aa69f;
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: #d5cdbb;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-100);
}

.select {
  padding-right: 40px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2366766f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.textarea {
  height: auto;
  min-height: 150px;
  padding: 12px 14px;
  line-height: 1.6;
  resize: vertical;
}

.input-wrap {
  position: relative;
}

.input-wrap > .icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.input-wrap > .input {
  padding-left: 42px;
}

.input-wrap .input-action {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  display: grid;
}

.input-wrap .input-action:hover {
  color: var(--ink);
  background: var(--bg);
}

.input-addon {
  display: flex;
  align-items: stretch;
}

.input-addon .addon {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  border-right: 0;
  border-radius: 12px 0 0 12px;
  background: var(--bg);
  color: var(--muted);
  font-weight: 700;
}

.input-addon .input {
  border-radius: 0 12px 12px 0;
}

.hint {
  font-size: 13px;
  color: var(--muted);
}

.hint strong {
  color: var(--primary-700);
}

.field-error {
  font-size: 13px;
  color: var(--danger);
  font-weight: 600;
  display: none;
}

.field.invalid .input,
.field.invalid .select,
.field.invalid .textarea,
.field.invalid .dropzone {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px var(--danger-50);
}

.field.invalid .field-error {
  display: block;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 550;
  color: var(--ink-2);
  user-select: none;
}

.check input {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid #cfc7b5;
  background: var(--surface);
  display: grid;
  place-items: center;
  margin: 0;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  flex-shrink: 0;
}

.check input:checked {
  background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/14px no-repeat;
  border-color: var(--primary);
}

/* Segmented control */
.segmented {
  display: inline-flex;
  padding: 4px;
  border-radius: 12px;
  background: var(--bg-2);
  gap: 2px;
  flex-wrap: wrap;
}

.segmented label {
  position: relative;
  cursor: pointer;
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented span {
  display: inline-flex;
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 650;
  color: var(--muted);
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.segmented input:checked + span {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.segmented input:focus-visible + span {
  outline: 3px solid var(--primary-100);
}

/* Chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.chip:hover {
  border-color: #cfc7b5;
}

.chip.active,
.chip-check input:checked + .chip {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.chip-check {
  position: relative;
}

.chip-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip-check input:focus-visible + .chip {
  box-shadow: 0 0 0 4px var(--primary-100);
}

.chip-check .chip .icon {
  width: 15px;
  height: 15px;
  display: none;
}

.chip-check input:checked + .chip .icon {
  display: inline-block;
}

/* ---------------- Badges & pills ---------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.01em;
  background: var(--primary-50);
  color: var(--primary-700);
  white-space: nowrap;
}

.badge .icon {
  width: 13px;
  height: 13px;
}

.badge-gold {
  background: var(--gold-50);
  color: #7a5a14;
}

.badge-sold {
  background: #2b2b2b;
  color: #fff;
}

.badge-muted {
  background: var(--bg-2);
  color: var(--muted);
}

.badge-glass {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow-sm);
}

/* ---------------- Cards & surfaces ---------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

/* ---------------- Hero (home) ---------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 0;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(800px 420px at 12% 8%, rgba(14, 107, 80, 0.1), transparent 60%),
    radial-gradient(700px 380px at 88% 18%, rgba(201, 154, 59, 0.16), transparent 60%),
    linear-gradient(180deg, #fbfaf6 0%, #f6f2e8 100%);
}

/* Drifting contour lines (js/hero-topo.js), faded out before the backwaters art */
.hero-topo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mask-image: linear-gradient(180deg, #000 0%, #000 50%, transparent 88%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 50%, transparent 88%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 56px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-copy {
  padding-bottom: 40px;
}

.hero-ml {
  font-size: 19px;
  color: var(--gold-600);
  font-weight: 700;
  margin: 0 0 6px;
}

.hero h1 {
  font-size: clamp(40px, 5.4vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 600;
}

.hl {
  position: relative;
  display: inline-block;
  font-style: italic;
  color: var(--primary);
  white-space: nowrap;
}

/* Letters of the morphing word (js/morph-text.js) */
.mt-ch {
  display: inline-block;
  will-change: transform;
}

.hl::after {
  content: "";
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: 0.04em;
  height: 0.22em;
  background: linear-gradient(90deg, var(--gold-100), rgba(244, 230, 195, 0.4));
  z-index: -1;
  border-radius: 4px;
}

.hero-sub {
  margin-top: 22px;
  font-size: 18.5px;
  color: var(--ink-2);
  max-width: 560px;
  line-height: 1.65;
}

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

/* Kerala postcard (hero, login and sign-up pages) */
.hero-visual {
  position: relative;
  justify-self: center;
  width: min(100%, 430px);
  margin-bottom: 80px;
}

.postcard-back {
  position: absolute;
  inset: 22px -16px -16px 22px;
  border-radius: 30px;
  background: linear-gradient(135deg, var(--gold-100), #efd59b);
  transform: rotate(4deg);
  box-shadow: var(--shadow);
}

.postcard {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  background: #fbf1df;
  box-shadow: 0 0 0 6px #fff, 0 0 0 7.5px rgba(201, 154, 59, 0.75), var(--shadow-lg);
}

.postcard img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
}

.postcard::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  border-radius: 22px;
  pointer-events: none;
}

.place-chip {
  position: absolute;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-2);
  white-space: nowrap;
  animation: floaty 6s ease-in-out infinite;
}

.place-chip .dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary-50);
  color: var(--primary);
}

.place-chip .dot .icon {
  width: 14px;
  height: 14px;
}

.chip-1 {
  top: 9%;
  left: -14%;
}

.chip-2 {
  top: 47%;
  right: -4%;
  animation-delay: -2s;
}

.chip-3 {
  bottom: 9%;
  left: -10%;
  animation-delay: -4s;
}

/* Per-scene placements so labels never cover the drawing's focal points */
.place-chip.chip-mid-left {
  top: 62%;
  bottom: auto;
  left: -10%;
}

.place-chip.chip-low-right {
  top: auto;
  bottom: 3%;
  left: auto;
  right: -4%;
}

@keyframes floaty {
  50% {
    transform: translateY(-8px);
  }
}

/* Segmented switch with a sliding indicator */
.tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border-radius: 14px;
  background: var(--bg-2);
  margin: 22px 0;
}

.tabs button {
  position: relative;
  z-index: 1;
  height: 40px;
  border: 0;
  background: none;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--muted);
  cursor: pointer;
  border-radius: 10px;
  transition: color 0.2s;
}

.tabs button.active {
  color: var(--ink);
}

.tabs-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease);
}

.tabs.is-second .tabs-indicator {
  transform: translateX(100%);
}

.track-tabs {
  display: inline-grid;
  width: min(380px, 100%);
  margin: 26px 0 0;
  background: var(--surface);
  border: 1px solid var(--line);
}

.track-tabs .tabs-indicator {
  background: var(--primary);
}

.track-tabs button.active {
  color: #fff;
}


/* Login and sign-up pages */
.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: calc(100vh - var(--header-h));
}

.auth-pane {
  display: grid;
  place-items: center;
  padding: 48px 24px 64px;
}

.auth-box {
  width: min(440px, 100%);
}

.auth-box h1 {
  font-size: clamp(32px, 3.4vw, 42px);
  letter-spacing: -0.025em;
}

.auth-box .lead {
  margin-top: 8px;
  color: var(--muted);
  font-size: 16px;
}

.auth-body {
  margin-top: 26px;
}

.auth-switch {
  margin-top: 24px;
  text-align: center;
  font-size: 15px;
  color: var(--muted);
}

.auth-switch a {
  font-weight: 700;
}

/* reCAPTCHA (App Check): the corner badge is hidden; the credit sits under the form instead */
.grecaptcha-badge {
  visibility: hidden;
}

.recaptcha-note {
  margin-top: 22px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}

.recaptcha-note a {
  color: inherit;
  text-decoration: underline;
}

.auth-art {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 56px 72px;
  border-left: 1px solid var(--line);
}

.auth-art .hero-bg {
  background: radial-gradient(600px 380px at 70% 20%, rgba(201, 154, 59, 0.18), transparent 60%), linear-gradient(170deg, #fbf7ee, #f4e8cf);
}

.auth-art .hero-visual {
  margin: 0 0 22px;
  width: min(100%, 380px);
}

.auth-art-caption {
  text-align: center;
}

.auth-art-caption .ml {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--gold-600);
}

.auth-art-caption p {
  color: var(--muted);
  margin-top: 4px;
}

.signed-in-as {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  margin-top: 22px;
  font-size: 14px;
}

.signed-in-as strong {
  display: block;
  font-size: 15px;
}

.signed-in-as span {
  color: var(--muted);
}

.signed-in-as .link-btn {
  margin-left: auto;
  font-size: 13.5px;
}

/* Country code + number */
.phone-field {
  display: flex;
}

.phone-field .select {
  width: 128px;
  flex-shrink: 0;
  border-radius: 12px 0 0 12px;
  padding-right: 32px;
  background-position: right 8px center;
  font-weight: 650;
}

.phone-field .input {
  border-radius: 0 12px 12px 0;
  margin-left: -1.5px;
}

.phone-field .select:focus,
.phone-field .input:focus {
  position: relative;
  z-index: 1;
}

.field.invalid .phone-field .select,
.field.invalid .phone-field .input {
  border-color: var(--danger);
}

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

.btn-google {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

.btn-google:hover {
  border-color: #cfc7b5;
  background: #fffdf8;
}

.btn-google .icon {
  width: 20px;
  height: 20px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

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

.form-error {
  display: none;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--danger-50);
  color: #8f1f1f;
  font-size: 14px;
  font-weight: 550;
}

.form-error.show {
  display: flex;
}

.form-error .icon {
  margin-top: 2px;
}

.form-note {
  display: none;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--primary-50);
  color: var(--primary-700);
  font-size: 14px;
  font-weight: 550;
}

.form-note.show {
  display: flex;
}

/* Hero illustration */
.hero-art {
  position: relative;
  margin-top: -110px;
  height: 230px;
  z-index: 1;
  pointer-events: none;
}

.hero-art svg {
  width: 100%;
  height: 100%;
  display: block;
}

.boat {
  animation: bob 6s ease-in-out infinite;
  transform-box: fill-box;
}

@keyframes bob {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-14px, 2px);
  }
}

.ripple {
  animation: ripple 5s ease-in-out infinite;
}

@keyframes ripple {
  0%,
  100% {
    transform: translateX(0);
    opacity: 0.7;
  }
  50% {
    transform: translateX(12px);
    opacity: 1;
  }
}

/* ---------------- Home sections ---------------- */

.section {
  padding: 96px 0;
}

.section-tight {
  padding: 64px 0;
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  max-width: 720px;
  margin-bottom: 48px;
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(32px, 3.8vw, 46px);
  margin-top: 12px;
  letter-spacing: -0.025em;
}

.section-head p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 17.5px;
}

/* ---------- How it works: the backwater route ---------- */
.route-section {
  position: relative;
  overflow: hidden;
  padding-bottom: 80px;
}

.route-head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 24px 64px;
  align-items: end;
}

.route-head h2 {
  margin-top: 12px;
  max-width: 11em;
  font-size: clamp(34px, 4.2vw, 54px);
  letter-spacing: -0.03em;
}

.route-intro p {
  color: var(--muted);
  font-size: 17px;
}

.route-intro .track-tabs {
  margin-top: 18px;
}

.track-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.track-tabs button .icon {
  width: 16px;
  height: 16px;
}

.route {
  margin-top: 36px;
}

.route-map {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.route-bank {
  fill: none;
  stroke: #e1eedc;
  stroke-width: 132;
  stroke-linecap: round;
}

.route-water {
  fill: none;
  stroke: #c6e4da;
  stroke-width: 70;
}

.route-shine {
  fill: none;
  stroke: #d8efe7;
  stroke-width: 26;
}

.route-flow {
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-dasharray: 14 30;
  stroke-linecap: round;
  opacity: 0.9;
  animation: route-flow 3.2s linear infinite;
}

@keyframes route-flow {
  to {
    stroke-dashoffset: -44;
  }
}

.route-stop .ring {
  fill: #fffdf8;
  stroke: var(--gold);
  stroke-width: 3;
  transition: fill 0.35s, stroke 0.35s;
}

.route-stop text {
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  font-size: 26px;
  fill: var(--gold-600);
  transition: fill 0.35s;
}

.route-stop .halo {
  fill: var(--gold);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.route-stop.reached .ring {
  fill: var(--primary);
  stroke: #fff;
}

.route-stop.reached text {
  fill: #fff;
}

.route-stop.reached .halo {
  animation: route-halo 2.6s ease-out infinite;
}

@keyframes route-halo {
  from {
    transform: scale(1);
    opacity: 0.45;
  }
  to {
    transform: scale(1.9);
    opacity: 0;
  }
}

.route-boat {
  filter: drop-shadow(0 6px 5px rgba(16, 35, 29, 0.18));
}

.route-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin-top: 14px;
  text-align: center;
}

.route-step {
  padding: 0 12px;
}

.route-num {
  display: none;
}

.route-label {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-600);
}

.route-step h3 {
  margin: 8px 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: -0.015em;
}

.route-step p {
  max-width: 30ch;
  margin: 0 auto;
  color: var(--muted);
}

/* Steps light up as the boat reaches them (only once the script is running). */
.route-js .route-step {
  opacity: 0.4;
  transform: translateY(10px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.route-js .route-step.reached {
  opacity: 1;
  transform: none;
}

/* ---------- Why Veedu: stamps from home ---------- */
.post-section {
  position: relative;
  background: #fbf6ea;
}

/* airmail-envelope edging, in Veedu green and kasavu gold */
.post-section::before,
.post-section::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 10px;
  background: repeating-linear-gradient(-45deg, var(--primary) 0 14px, #fbf6ea 14px 22px, var(--gold) 22px 36px, #fbf6ea 36px 44px);
}

.post-section::before {
  top: 0;
}

.post-section::after {
  bottom: 0;
}

.post-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.6fr);
  gap: 56px;
  align-items: start;
}

.post-intro {
  position: sticky;
  top: calc(var(--header-h) + 36px);
}

.post-intro h2 {
  margin-top: 12px;
  font-size: clamp(32px, 3.6vw, 46px);
  letter-spacing: -0.025em;
}

.post-intro > p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 17px;
}

.post-signoff {
  display: grid;
  gap: 2px;
  margin-top: 26px;
}

.post-signoff span {
  font-family: var(--ml);
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-700);
}

.post-signoff em {
  font-family: var(--display);
  font-size: 16px;
  color: var(--muted);
}

.postmark {
  display: block;
  width: min(100%, 300px);
  margin-top: 14px;
  color: var(--gold-600);
  opacity: 0.6;
  transform: rotate(-10deg);
  transform-origin: 20% 50%;
  mix-blend-mode: multiply;
}

.postmark .pm-ring {
  font-family: var(--font);
  font-size: 10.5px;
  font-weight: 800;
  fill: currentColor;
}

.postmark .pm-ml {
  font-family: var(--ml);
  font-size: 30px;
  font-weight: 700;
  fill: currentColor;
}

.postmark .pm-small {
  font-family: var(--font);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 3px;
  fill: currentColor;
}

.stamps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stamp-item {
  display: grid;
  gap: 18px;
  align-content: start;
}

.stamp-item:nth-child(3n + 2) {
  margin-top: 40px;
}

/* A postage stamp: perforated edges cut out of the paper itself */
.stamp {
  --r: 5px;
  width: min(100%, 196px);
  padding: 12px;
  background:
    radial-gradient(var(--r), #0000 96%, #fffdf7) round calc(-1.5 * var(--r)) calc(-1.5 * var(--r)) / calc(3 * var(--r)) calc(3 * var(--r)),
    linear-gradient(#fffdf7 0 0) no-repeat 50% / calc(100% - 3 * var(--r)) calc(100% - 3 * var(--r));
  filter: drop-shadow(0 12px 16px rgba(16, 35, 29, 0.14)) drop-shadow(0 2px 3px rgba(16, 35, 29, 0.1));
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.4s var(--ease);
}

.stamp-item:hover .stamp {
  transform: rotate(0deg) translateY(-6px) scale(1.04);
}

.stamp-face {
  padding: 7px 7px 9px;
  border: 1px solid rgba(16, 35, 29, 0.14);
}

.stamp-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--ink-2);
}

.stamp-meta b {
  font-family: var(--display);
  font-style: italic;
  font-size: 15px;
  letter-spacing: 0;
  color: var(--gold-600);
}

.stamp-art {
  display: block;
  width: 100%;
  height: auto;
}

.stamp-ml {
  font-family: var(--ml);
  font-size: 12.5px;
  font-weight: 700;
  fill: #2f433c;
}

.stamp-rupee {
  font-family: var(--font);
  font-size: 17px;
  font-weight: 800;
  fill: #7a5a14;
}

.stamp-n {
  font-family: var(--font);
  font-size: 7px;
  font-weight: 800;
  fill: #2f433c;
}

.stamp-typing circle {
  animation: stamp-typing 1.4s ease-in-out infinite;
}

.stamp-typing circle:nth-child(2) {
  animation-delay: 0.2s;
}

.stamp-typing circle:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes stamp-typing {
  0%,
  60%,
  100% {
    opacity: 0.4;
  }
  30% {
    opacity: 1;
  }
}

.stamp-caption h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: -0.01em;
}

.stamp-caption p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
}

/* ---------- Districts: illustrated map of Kerala ---------- */
.map-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 470px);
  grid-template-areas:
    "copy map"
    "list map";
  grid-template-rows: auto 1fr;
  gap: 28px 64px;
  align-items: start;
}

.map-copy {
  grid-area: copy;
}

.map-copy h2 {
  margin-top: 12px;
  font-size: clamp(32px, 3.6vw, 46px);
  letter-spacing: -0.025em;
}

.map-copy p {
  margin-top: 14px;
  max-width: 520px;
  color: var(--muted);
  font-size: 17px;
}

.district-groups {
  grid-area: list;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px 20px;
}

.district-group h3 {
  margin-bottom: 8px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-600);
}

.district-link {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 -8px;
  padding: 7px 8px;
  border-radius: 12px;
  color: var(--ink);
  transition: background 0.2s, box-shadow 0.2s;
}

.district-link .dl-num {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--primary-50);
  color: var(--primary-700);
  font-size: 11.5px;
  font-weight: 800;
  transition: background 0.2s, color 0.2s;
}

.district-link .dl-text {
  min-width: 0;
}

.district-link strong {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.district-link .dl-text span {
  font-size: 12.5px;
  color: var(--muted);
}

.district-link .icon {
  width: 15px;
  height: 15px;
  margin-left: auto;
  color: var(--primary);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s, transform 0.2s var(--ease);
}

.district-link.is-active {
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.district-link.is-active .dl-num {
  background: var(--primary);
  color: #fff;
}

.district-link.is-active .icon {
  opacity: 1;
  transform: none;
}

.map-card {
  grid-area: map;
  position: relative;
  margin: 0;
  padding: 14px;
  border-radius: 30px;
  background: #fffaf0;
  box-shadow: 0 0 0 6px #fff, 0 0 0 7.5px rgba(201, 154, 59, 0.75), var(--shadow-lg);
}

.kerala-map {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 20px;
}

.map-card figcaption {
  margin: 8px 6px -4px;
  text-align: right;
  font-family: var(--display);
  font-style: italic;
  font-size: 12px;
  color: var(--muted);
}

.map-sea {
  font-family: var(--display);
  font-style: italic;
  font-size: 21px;
  letter-spacing: 0.08em;
  fill: #8dbdb1;
}

.map-neighbour {
  font-family: var(--font);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.3em;
  fill: #a7b6af;
}

.map-compass text {
  font-family: var(--display);
  font-weight: 700;
  font-size: 11px;
  fill: var(--primary-700);
}

.map-pin {
  cursor: pointer;
}

.map-pin:focus {
  outline: none;
}

.map-pin .pin-dot {
  fill: #fffdf8;
  stroke: var(--primary);
  stroke-width: 2.2;
  transition: fill 0.2s, stroke 0.2s;
}

.map-pin .pin-num {
  font-family: var(--font);
  font-size: 10px;
  font-weight: 800;
  fill: var(--primary-700);
  pointer-events: none;
  transition: fill 0.2s;
}

.map-pin .pin-label {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  fill: var(--ink-2);
  paint-order: stroke;
  stroke: #f4faf7;
  stroke-width: 4px;
  stroke-linejoin: round;
  transition: fill 0.2s;
}

.map-pin .pin-halo {
  fill: var(--gold);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.map-pin:hover .pin-dot,
.map-pin:focus-visible .pin-dot,
.map-pin.is-active .pin-dot {
  fill: var(--primary);
  stroke: #fff;
}

.map-pin:focus-visible .pin-dot {
  stroke: var(--gold);
  stroke-width: 3;
}

.map-pin:hover .pin-num,
.map-pin:focus-visible .pin-num,
.map-pin.is-active .pin-num {
  fill: #fff;
}

.map-pin:hover .pin-label,
.map-pin:focus-visible .pin-label,
.map-pin.is-active .pin-label {
  fill: var(--primary-700);
  font-weight: 800;
}

.map-pin:hover .pin-halo,
.map-pin.is-active .pin-halo {
  animation: route-halo 1.8s ease-out infinite;
}

.cta-band {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  padding: 64px;
  background:
    radial-gradient(600px 300px at 90% 0%, rgba(201, 154, 59, 0.35), transparent 60%),
    linear-gradient(135deg, #0f7456 0%, #0a4e3b 100%);
  color: #fff;
  display: grid;
  grid-template-columns: 1.4fr auto;
  gap: 32px;
  align-items: center;
  box-shadow: var(--shadow-lg);
}

.cta-band::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  height: 7px;
  background: linear-gradient(to bottom, var(--gold) 0 4px, transparent 4px 5.5px, var(--gold) 5.5px 7px);
  opacity: 0.85;
}

.cta-band h2 {
  color: #fff;
  font-size: clamp(30px, 3.4vw, 42px);
}

.cta-band p {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 17px;
  max-width: 560px;
}

.cta-band .ml {
  color: #f1d58f;
  font-size: 18px;
  margin-bottom: 8px;
  display: block;
}

.cta-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-white {
  background: #fff;
  color: var(--primary-700);
}

.btn-white:hover {
  background: #fdf8ec;
}

.btn-outline-white {
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
  background: transparent;
}

.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

/* ---------------- Footer ---------------- */

.site-footer {
  margin-top: 80px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.home .site-footer {
  margin-top: 24px;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  padding-top: 48px;
  padding-bottom: 52px;
  flex-wrap: wrap;
}

.footer-cols {
  display: flex;
  gap: 64px;
}

.footer-cols h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 14px;
}

.footer-cols a {
  display: block;
  color: var(--ink-2);
  font-weight: 550;
  padding: 4px 0;
  font-size: 15px;
}

.footer-cols a:hover {
  color: var(--primary);
}

.footer-motto {
  display: grid;
  gap: 2px;
  margin-top: 18px;
}

.footer-motto span {
  font-family: var(--ml);
  font-size: 20px;
  font-weight: 700;
  color: var(--gold-600);
}

.footer-motto em {
  font-family: var(--display);
  font-size: 15px;
  color: var(--muted);
}

/* ---------------- App pages ---------------- */

.page-head {
  padding: 44px 0 28px;
}

.page-head h1 {
  font-size: clamp(32px, 3.6vw, 44px);
  letter-spacing: -0.025em;
}

.page-head p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 17px;
}

.page-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}

.back-link {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  font-weight: 650;
  font-size: 14.5px;
  color: var(--muted);
  margin-bottom: 16px;
}

.back-link:hover {
  color: var(--ink);
}

/* Dashboard */
.dash-hero {
  position: relative;
  padding: 48px 0 36px;
}

.dash-hero .ml {
  color: var(--gold-600);
  font-weight: 700;
  font-size: 17px;
}

.dash-hero h1 {
  font-size: clamp(34px, 4vw, 52px);
  letter-spacing: -0.03em;
  margin-top: 6px;
}

.dash-hero p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 17.5px;
}

.stats {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px 12px 12px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--primary-50);
  color: var(--primary);
}

.stat strong {
  display: block;
  font-size: 20px;
  line-height: 1.1;
}

.stat div span {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.action-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: 36px;
  border-radius: 28px;
  color: var(--ink);
  border: 1px solid var(--line);
  isolation: isolate;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.action-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.action-card.browse {
  background:
    radial-gradient(420px 260px at 100% 100%, rgba(14, 107, 80, 0.16), transparent 70%),
    linear-gradient(160deg, #f2f9f5 0%, #e3f1ea 100%);
}

.action-card.add {
  background:
    radial-gradient(420px 260px at 100% 100%, rgba(201, 154, 59, 0.24), transparent 70%),
    linear-gradient(160deg, #fdf9ef 0%, #f8edd3 100%);
}

.action-card .ac-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #17926d, var(--primary-700));
  box-shadow: 0 14px 28px -12px rgba(14, 107, 80, 0.75);
}

.action-card.add .ac-icon {
  background: linear-gradient(135deg, #ddb459, var(--gold-600));
  box-shadow: 0 14px 28px -12px rgba(166, 124, 38, 0.75);
}

.action-card .ac-icon .icon {
  width: 30px;
  height: 30px;
}

.action-card h2 {
  font-size: 32px;
  margin-top: 28px;
}

.action-card p {
  margin-top: 10px;
  color: var(--ink-2);
  font-size: 16.5px;
  max-width: 380px;
}

.action-card .ac-cta {
  margin-top: auto;
  padding-top: 28px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  color: var(--primary-700);
}

.action-card.add .ac-cta {
  color: #7a5a14;
}

.action-card .ac-cta .arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease);
}

.action-card:hover .ac-cta .arrow {
  transform: translateX(6px);
}

.action-card .ac-art {
  position: absolute;
  right: -10px;
  bottom: -10px;
  width: 230px;
  height: 230px;
  z-index: -1;
  opacity: 0.9;
}

.my-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 64px 0 20px;
  flex-wrap: wrap;
}

.my-head h2 {
  font-size: 30px;
}

.my-list {
  display: grid;
  gap: 14px;
}

.my-row {
  display: grid;
  grid-template-columns: 132px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.my-row:hover {
  box-shadow: var(--shadow);
  border-color: transparent;
}

.my-thumb {
  width: 132px;
  height: 96px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-2);
}

.my-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.my-info h3 {
  font-size: 17px;
  font-weight: 700;
  font-family: var(--font);
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.my-info h3 a {
  color: inherit;
}

.my-info h3 a:hover {
  color: var(--primary);
}

.my-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  align-items: center;
}

.my-meta .price {
  color: var(--ink);
  font-weight: 800;
  font-size: 16px;
}

.my-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.empty {
  text-align: center;
  padding: 56px 24px;
  border-radius: 24px;
  border: 1.5px dashed #d8cfbb;
  background: rgba(255, 255, 255, 0.6);
}

.empty-icon {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  background: var(--gold-50);
  color: var(--gold-600);
}

.empty-icon .icon {
  width: 32px;
  height: 32px;
}

.empty h3 {
  font-size: 22px;
  font-family: var(--display);
  font-weight: 600;
}

.empty p {
  color: var(--muted);
  margin: 8px auto 22px;
  max-width: 420px;
}

/* ---------------- Browse ---------------- */

.filters {
  position: sticky;
  top: calc(var(--header-h) + 10px);
  z-index: 20;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) repeat(5, minmax(120px, 1fr));
  gap: 10px;
}

.filters .input,
.filters .select {
  height: 46px;
  background-color: var(--bg);
  border-color: transparent;
}

.filters .input:focus,
.filters .select:focus {
  background-color: var(--surface);
  border-color: var(--primary);
}

.type-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 20px 2px 4px;
  scrollbar-width: none;
}

.type-chips::-webkit-scrollbar {
  display: none;
}

.results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 18px 0 20px;
  flex-wrap: wrap;
}

.results-count {
  font-weight: 650;
  color: var(--ink-2);
}

.results-count strong {
  color: var(--ink);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 24px;
}

.listing-card {
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
  animation: rise 0.5s var(--ease) both;
}

.listing-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-50), var(--gold-50));
}

.card-media img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.card-media .img-fallback,
.my-thumb .img-fallback {
  position: absolute;
  inset: 0;
}

.my-thumb {
  position: relative;
}

.my-thumb img {
  position: relative;
}

.listing-card:hover .card-media img {
  transform: scale(1.06);
}

.card-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(transparent, rgba(10, 30, 24, 0.5));
  pointer-events: none;
}

.card-badges {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  gap: 6px;
  z-index: 1;
}

.card-photos {
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.card-photos .icon {
  width: 15px;
  height: 15px;
}

.card-price-tag {
  position: absolute;
  left: 14px;
  bottom: 10px;
  z-index: 1;
  color: #fff;
  font-family: var(--display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card-title {
  font-family: var(--font);
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-loc {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 550;
}

.card-loc .icon {
  color: var(--gold-600);
}

.card-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.spec {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 10px;
  background: var(--bg);
  font-size: 13px;
  font-weight: 650;
  color: var(--ink-2);
}

.spec .icon {
  width: 15px;
  height: 15px;
  color: var(--primary);
}

.card-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line-2);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 550;
}

.card-foot .seller {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.card-foot .seller span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.listing-card.is-sold .card-media img {
  filter: grayscale(0.6);
}

.img-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--primary);
  opacity: 0.55;
}

.img-fallback .icon {
  width: 44px;
  height: 44px;
}

/* Skeletons */
.skeleton {
  border-radius: 22px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
}

.skeleton .sk-media {
  aspect-ratio: 4 / 3;
}

.skeleton .sk-line {
  height: 14px;
  border-radius: 7px;
  margin: 16px 20px 0;
}

.skeleton .sk-line.short {
  width: 45%;
  margin-bottom: 22px;
}

.shimmer,
.skeleton .sk-media,
.skeleton .sk-line {
  background: linear-gradient(90deg, #f1ede4 0%, #f8f6f0 50%, #f1ede4 100%);
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

/* ---------------- Listing detail ---------------- */

.detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.detail-head .badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.detail-head h1 {
  font-size: clamp(28px, 3.4vw, 42px);
  letter-spacing: -0.025em;
  max-width: 820px;
}

.detail-loc {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  color: var(--muted);
  font-weight: 600;
}

.detail-loc .icon {
  color: var(--gold-600);
}

.detail-price {
  text-align: right;
}

.detail-price strong {
  display: block;
  font-family: var(--display);
  font-size: clamp(32px, 3.6vw, 44px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--primary-700);
  line-height: 1.1;
}

.detail-price span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.gallery {
  display: grid;
  gap: 10px;
  height: min(540px, 60vw);
  border-radius: 26px;
  overflow: hidden;
  position: relative;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.gallery .g-item {
  border: 0;
  padding: 0;
  cursor: zoom-in;
  overflow: hidden;
  background: var(--bg-2);
  position: relative;
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease), filter 0.3s;
}

.gallery .g-item:hover img {
  transform: scale(1.04);
  filter: brightness(0.95);
}

.gallery .g-item:first-child {
  grid-row: span 2;
}

.gallery.g-1 {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}

.gallery.g-1 .g-item:first-child {
  grid-row: auto;
}

.gallery.g-2 {
  grid-template-columns: 1.5fr 1fr;
  grid-template-rows: 1fr;
}

.gallery.g-2 .g-item:first-child {
  grid-row: auto;
}

.gallery.g-3 {
  grid-template-columns: 2fr 1fr;
}

.gallery.g-4 .g-item:nth-child(2) {
  grid-column: span 2;
}

.gallery-all {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 2;
}

.gallery-empty {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  background: linear-gradient(135deg, var(--primary-50), var(--gold-50));
  display: grid;
  place-items: center;
  color: var(--primary);
  height: 320px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
  margin-top: 36px;
  align-items: start;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.fact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.fact-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--primary-50);
  color: var(--primary);
  flex-shrink: 0;
}

.fact div span {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 650;
}

.fact strong {
  font-size: 15.5px;
  font-weight: 750;
}

.detail-section {
  margin-top: 40px;
}

.detail-section h2 {
  font-size: 26px;
  margin-bottom: 16px;
}

.description {
  color: var(--ink-2);
  font-size: 16.5px;
  line-height: 1.75;
  white-space: pre-line;
}

.amenities {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}

.amenity {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--ink-2);
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.amenity .icon {
  color: #fff;
  background: var(--primary);
  border-radius: 50%;
  padding: 3px;
  width: 20px;
  height: 20px;
}

.map-frame {
  width: 100%;
  height: 340px;
  border: 0;
  border-radius: 22px;
  background: var(--bg-2);
}

.side {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  display: grid;
  gap: 16px;
}

.contact-card {
  padding: 26px;
  border-radius: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.contact-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 7px;
  background: linear-gradient(to bottom, var(--gold) 0 4px, transparent 4px 5.5px, var(--gold) 5.5px 7px);
}

.seller-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line-2);
}

.seller-row strong {
  display: block;
  font-size: 17px;
}

.seller-row div span {
  font-size: 14px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.contact-actions {
  display: grid;
  gap: 10px;
}

.contact-reveal {
  font-size: 13.5px;
  color: var(--muted);
  text-align: center;
  margin-top: 4px;
}

.safety {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  background: var(--gold-50);
  border: 1px solid var(--gold-100);
  font-size: 13.5px;
  color: #6b4f12;
}

.safety .icon {
  color: var(--gold-600);
  margin-top: 2px;
}

.owner-card {
  padding: 20px;
  border-radius: 22px;
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
}

.owner-card h3 {
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-700);
  margin-bottom: 14px;
}

.owner-card .btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.owner-card .btns .btn:last-child {
  grid-column: span 2;
}

/* Lightbox: photos grow out of their gallery slot, swipe down to close */
.lightbox {
  --lb-fade: 1;
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-rows: auto 1fr auto;
  isolation: isolate;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s 0.32s;
}

.lightbox.open {
  visibility: visible;
  pointer-events: auto;
  transition: none;
}

.lb-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(8, 18, 15, 0.95);
  opacity: 0;
  transition: opacity 0.32s var(--ease);
}

.lightbox.open .lb-backdrop {
  opacity: var(--lb-fade);
}

.lb-top,
.lb-thumbs,
.lb-prev,
.lb-next {
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}

.lightbox.open .lb-top,
.lightbox.open .lb-thumbs,
.lightbox.open .lb-prev,
.lightbox.open .lb-next {
  opacity: var(--lb-fade);
}

.lightbox.dragging .lb-backdrop,
.lightbox.dragging .lb-top,
.lightbox.dragging .lb-thumbs,
.lightbox.dragging .lb-prev,
.lightbox.dragging .lb-next {
  transition: none;
}

.lb-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  color: #fff;
  font-weight: 650;
}

.lb-hint {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
}

.lb-stage {
  position: relative;
  display: grid;
  place-items: center;
  padding: 0 80px;
  min-height: 0;
  touch-action: none;
  cursor: grab;
}

.lightbox.dragging .lb-stage {
  cursor: grabbing;
}

.lb-stage img {
  max-width: 100%;
  max-height: calc(100vh - 180px);
  max-height: calc(100dvh - 180px);
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform;
}

/* The copy of the photo that flies between the gallery and the viewer */
.lb-fly {
  position: fixed;
  z-index: 101;
  margin: 0;
  object-fit: cover;
  pointer-events: none;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.lb-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s;
}

.lb-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.lb-prev,
.lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.lb-prev {
  left: 18px;
}

.lb-next {
  right: 18px;
}

.lb-thumbs {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 16px;
  overflow-x: auto;
}

.lb-thumbs button {
  width: 72px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  opacity: 0.55;
  flex-shrink: 0;
  background: #222;
}

.lb-thumbs button.active {
  opacity: 1;
  border-color: var(--gold);
}

.lb-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------------- Add listing ---------------- */

.form-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: start;
}

.form-card {
  padding: 30px;
  border-radius: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.form-card + .form-card {
  margin-top: 20px;
}

.form-card-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 24px;
}

.form-card-num {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--primary-50);
  color: var(--primary);
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
}

.form-card-head h2 {
  font-family: var(--font);
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.form-card-head p {
  color: var(--muted);
  font-size: 14.5px;
  margin-top: 2px;
}

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

.form-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.span-2 {
  grid-column: span 2;
}

.span-all {
  grid-column: 1 / -1;
}

.type-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.type-option {
  position: relative;
  cursor: pointer;
}

.type-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.type-option span {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 16px;
  border-radius: 16px;
  border: 1.5px solid var(--line);
  font-weight: 700;
  font-size: 14.5px;
  transition: all 0.15s;
  background: var(--surface);
}

.type-option span .icon {
  width: 26px;
  height: 26px;
  color: var(--muted);
  transition: color 0.15s;
}

.type-option:hover span {
  border-color: #cfc7b5;
}

.type-option input:checked + span {
  border-color: var(--primary);
  background: var(--primary-50);
  box-shadow: 0 0 0 3px var(--primary-100);
  color: var(--primary-700);
}

.type-option input:checked + span .icon {
  color: var(--primary);
}

.type-option input:focus-visible + span {
  box-shadow: 0 0 0 4px var(--primary-100);
}

.dropzone {
  position: relative;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 6px;
  padding: 36px 20px;
  border-radius: 20px;
  border: 2px dashed #d5cbb5;
  background: linear-gradient(180deg, #fffdf8, var(--gold-50));
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.dropzone:hover,
.dropzone.drag {
  border-color: var(--primary);
  background: linear-gradient(180deg, #fff, var(--primary-50));
}

.dropzone.drag {
  transform: scale(1.01);
}

.dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dz-icon {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow);
  margin-bottom: 8px;
}

.dz-icon .icon {
  width: 28px;
  height: 28px;
}

.dropzone strong {
  font-size: 16px;
}

.dropzone strong em {
  font-style: normal;
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dropzone p {
  color: var(--muted);
  font-size: 13.5px;
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.thumbs:empty {
  display: none;
}

.thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-2);
  cursor: grab;
  border: 2px solid transparent;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  animation: rise 0.3s var(--ease) both;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.thumb.dragging {
  opacity: 0.4;
}

.thumb.drop-target {
  border-color: var(--primary);
  transform: scale(1.03);
}

.thumb.is-cover {
  border-color: var(--gold);
}

.thumb .cover-badge {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--gold);
  color: #2b1f05;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.thumb-tools {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s;
}

.thumb:hover .thumb-tools,
.thumb:focus-within .thumb-tools {
  opacity: 1;
}

.thumb-tools button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.thumb-tools button .icon {
  width: 15px;
  height: 15px;
}

.thumb-tools button:hover {
  background: #fff;
  color: var(--primary);
}

.thumb-tools button[data-remove]:hover {
  color: var(--danger);
}

/* Cover focus picker */
.focus-panel {
  margin-top: 22px;
  padding: 20px;
  border-radius: 20px;
  background: linear-gradient(180deg, #fffdf8, var(--bg));
  border: 1px solid var(--line);
  animation: rise 0.4s var(--ease) both;
}

.focus-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.focus-head h3 {
  font-size: 16px;
  font-weight: 750;
}

.focus-head p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 2px;
}

.focus-head .link-btn {
  margin-left: auto;
  font-size: 14px;
  white-space: nowrap;
}

.focus-badge {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--gold-50);
  color: var(--gold-600);
}

.focus-body {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.focus-stage-wrap {
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--bg-2);
  min-height: 160px;
}

.focus-stage {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  cursor: crosshair;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.focus-stage img {
  display: block;
  max-width: 100%;
  max-height: 340px;
  pointer-events: none;
}

.focus-frame {
  position: absolute;
  border: 2px solid #fff;
  border-radius: 6px;
  box-shadow: 0 0 0 9999px rgba(16, 35, 29, 0.42);
  pointer-events: none;
  transition: left 0.2s var(--ease), top 0.2s var(--ease), width 0.25s var(--ease), height 0.25s var(--ease);
}

.focus-dot {
  position: absolute;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: var(--gold);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  transition: transform 0.15s var(--ease);
}

.focus-dot::after {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.8);
  animation: focusPulse 2s ease-out infinite;
}

@keyframes focusPulse {
  from {
    transform: scale(0.6);
    opacity: 1;
  }
  to {
    transform: scale(1.5);
    opacity: 0;
  }
}

.focus-panel.dragging .focus-dot {
  transform: scale(1.2);
}

.focus-stage:focus-visible {
  outline: 3px solid var(--primary-100);
  outline-offset: 3px;
}

.focus-crops {
  display: grid;
  gap: 10px;
}

.focus-crop {
  display: grid;
  gap: 6px;
  padding: 6px;
  border-radius: 14px;
  border: 1.5px solid transparent;
  background: transparent;
  text-align: left;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.focus-crop:hover,
.focus-crop.active {
  border-color: var(--primary);
  background: var(--surface);
  color: var(--primary-700);
}

.focus-crop .crop {
  display: block;
  width: 100%;
  border-radius: 9px;
  overflow: hidden;
  background: var(--bg-2);
}

.focus-crop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: object-position 0.2s var(--ease);
}

.focus-panel.dragging .focus-crop img,
.focus-panel.dragging .focus-frame {
  transition: none;
}

.price-words {
  font-weight: 700;
  color: var(--primary-700);
}

.amenity-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.char-count {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 600;
}

.form-submit {
  margin-top: 20px;
  padding: 20px 24px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.form-submit p {
  color: var(--muted);
  font-size: 14px;
  max-width: 440px;
}

.form-submit .btns {
  display: flex;
  gap: 10px;
}

.preview-side {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  display: grid;
  gap: 16px;
}

.preview-label {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-label::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--whatsapp);
  box-shadow: 0 0 0 4px rgba(31, 168, 85, 0.18);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    box-shadow: 0 0 0 7px rgba(31, 168, 85, 0.05);
  }
}

.preview-side .listing-card {
  animation: none;
  pointer-events: none;
}

.tips {
  padding: 22px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.tips h3 {
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.tips ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.tips li {
  display: flex;
  gap: 10px;
  font-size: 14px;
  color: var(--ink-2);
}

.tips li .icon {
  color: var(--primary);
  margin-top: 3px;
  width: 16px;
  height: 16px;
}

/* Progress overlay */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(250, 248, 243, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

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

.overlay-card {
  width: min(380px, calc(100% - 40px));
  padding: 32px;
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  text-align: center;
  border: 1px solid var(--line);
}

.overlay-card .spinner {
  width: 44px;
  height: 44px;
  border-width: 4px;
  color: var(--primary);
  margin: 0 auto 18px;
}

.overlay-card h3 {
  font-size: 19px;
}

.overlay-card p {
  color: var(--muted);
  margin-top: 6px;
  font-size: 14.5px;
}

.progress {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-2);
  margin-top: 18px;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #1aa47c);
  transition: width 0.3s var(--ease);
}

/* ---------------- Toasts & modal ---------------- */

.toast-host {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 200;
  display: grid;
  gap: 10px;
  width: min(440px, calc(100% - 32px));
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 16px;
  background: #13241f;
  color: #fff;
  font-weight: 600;
  font-size: 14.5px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s, transform 0.25s var(--ease);
}

.toast.show {
  opacity: 1;
  transform: none;
}

.toast-success .icon {
  color: #6ee7a8;
}

.toast-error .icon {
  color: #fca5a5;
}

.toast-info .icon {
  color: #f1d58f;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(16, 35, 29, 0.4);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.2s;
}

.modal-backdrop.show {
  opacity: 1;
}

.modal {
  width: min(420px, 100%);
  padding: 28px;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transform: translateY(10px) scale(0.98);
  transition: transform 0.25s var(--ease);
}

.modal-backdrop.show .modal {
  transform: none;
}

.modal-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--primary-50);
  color: var(--primary);
  margin-bottom: 16px;
}

.modal-icon.danger {
  background: var(--danger-50);
  color: var(--danger);
}

.modal h3 {
  font-size: 20px;
}

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

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

/* Page load fade */
.app-page main {
  opacity: 0;
  transition: opacity 0.3s;
}

.app-page.ready main {
  opacity: 1;
}

.file-warning {
  position: relative;
  z-index: 60;
  padding: 14px 20px;
  background: var(--danger-50);
  border-bottom: 1px solid #f5c9c9;
  color: #8f1f1f;
  text-align: center;
  font-size: 14.5px;
}

/* ---------------- Responsive ---------------- */

@media (max-width: 1180px) {
  .filters {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .filters .search-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1080px) {
  .detail-layout,
  .form-layout {
    grid-template-columns: 1fr;
  }

  .side,
  .preview-side {
    position: static;
  }

  .preview-side {
    order: -1;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .preview-side .preview-label {
    grid-column: 1 / -1;
  }

  .post-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .map-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "copy"
      "map"
      "list";
    gap: 28px;
  }

  .map-card {
    width: min(100%, 470px);
    justify-self: center;
  }

  .post-intro {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 24px;
  }

  .post-intro > * {
    grid-column: 1;
  }

  .post-intro .postmark {
    grid-column: 2;
    grid-row: 1 / span 4;
    align-self: center;
    width: 230px;
  }
}

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .hero-copy {
    padding-bottom: 8px;
  }

  .hero-visual {
    width: min(100%, 360px);
    margin: 28px auto 56px;
  }

  .auth-layout {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .auth-art {
    display: none;
  }

  .hero-art {
    margin-top: -40px;
    height: 170px;
  }


  .cta-band {
    grid-template-columns: 1fr;
    padding: 44px 32px 56px;
  }

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

@media (max-width: 820px) {
  .nav-links {
    position: absolute;
    left: 12px;
    right: 12px;
    top: calc(100% + 6px);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 0;
    padding: 8px;
    border-radius: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.18s, transform 0.18s var(--ease);
  }

  .site-header.nav-open .nav-links {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .nav-link {
    padding: 12px 14px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links .mobile-only {
    display: flex;
  }

  .user-chip-name,
  .user-chip > .icon {
    display: none;
  }

  .user-chip {
    padding: 3px;
  }

  .brand-ml,
  .brand-sep {
    display: none;
  }

  .gallery {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 2fr 1fr;
    height: 70vw;
    border-radius: 20px;
  }

  .gallery .g-item:first-child {
    grid-column: span 2;
    grid-row: auto;
  }

  .gallery .g-item:nth-child(n + 4) {
    display: none;
  }

  .gallery.g-1,
  .gallery.g-2 {
    grid-template-rows: 1fr;
  }

  .gallery.g-2 .g-item:nth-child(2) {
    display: none;
  }

  .gallery.g-4 .g-item:nth-child(2) {
    grid-column: auto;
  }

  .detail-price {
    text-align: left;
  }

  .preview-side {
    grid-template-columns: 1fr;
  }

  .preview-side .tips {
    display: none;
  }

  .my-row {
    grid-template-columns: 96px 1fr;
  }

  .my-thumb {
    width: 96px;
    height: 80px;
  }

  .my-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .lb-stage {
    padding: 0 12px;
  }

  .lb-prev,
  .lb-next {
    top: auto;
    bottom: -64px;
    transform: none;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  .section {
    padding: 64px 0;
  }

  .hero {
    padding-top: 32px;
  }

  .hero-sub {
    font-size: 16.5px;
  }

  .hero-actions .btn {
    flex: 1 1 100%;
  }

  .nav-right .nav-login {
    display: none;
  }

  .hero-visual {
    width: min(100%, 300px);
  }

  .place-chip {
    font-size: 12px;
    padding: 6px 11px 6px 6px;
  }

  .chip-1 {
    left: -6%;
  }

  .chip-2 {
    right: -6%;
  }

  .chip-3 {
    left: -4%;
  }

  .auth-pane {
    padding: 32px 16px 48px;
    place-items: start center;
  }

  .phone-field .select {
    width: 112px;
  }


  .district-groups {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .district-link .dl-text span {
    display: none;
  }

  .filters {
    grid-template-columns: 1fr 1fr;
    position: static;
  }

  .filters [name="sort"] {
    grid-column: 1 / -1;
  }

  .home .site-footer {
    margin-top: 24px;
  }

  .form-card {
    padding: 22px 18px;
    border-radius: 22px;
  }

  .form-grid,
  .form-grid-3 {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

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

  .focus-panel {
    padding: 14px;
  }

  .focus-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .focus-crops {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
  }

  .form-submit,
  .form-submit .btns {
    flex-direction: column;
    align-items: stretch;
  }

  .action-card {
    padding: 28px;
    min-height: 260px;
  }

  .action-card .ac-art {
    width: 170px;
    height: 170px;
  }

  .cta-band {
    border-radius: 24px;
    padding: 36px 24px 52px;
  }

  .footer-cols {
    gap: 40px;
  }

  .demo-banner {
    font-size: 12.5px;
    text-align: left;
    justify-content: flex-start;
  }

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

  .thumb-tools {
    opacity: 1;
  }
}

/* Phones: the river runs down the page and the stamps sit beside their captions */
@media (max-width: 760px) {
  .route-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .route {
    margin-top: 30px;
  }

  .route-map {
    display: none;
  }

  .route-steps {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin-top: 0;
    padding-left: 66px;
    text-align: left;
  }

  .route-steps::before {
    content: "";
    position: absolute;
    left: 22px;
    top: 6px;
    bottom: 10px;
    width: 18px;
    border-radius: 999px;
    background: repeating-linear-gradient(180deg, transparent 0 9px, #fff 9px 17px) center / 2px 100% no-repeat, #c6e4da;
    box-shadow: 0 0 0 10px #e1eedc;
  }

  .route-step {
    position: relative;
    padding: 0 0 34px;
  }

  .route-step:last-child {
    padding-bottom: 0;
  }

  .route-num {
    position: absolute;
    left: -57px;
    top: -6px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 3px solid var(--gold);
    background: #fffdf8;
    font-family: var(--display);
    font-style: italic;
    font-weight: 600;
    font-size: 22px;
    color: var(--gold-600);
    transition: background 0.35s, color 0.35s, border-color 0.35s, box-shadow 0.35s;
  }

  .route-step.reached .route-num {
    border-color: #fff;
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 0 4px var(--primary-100);
  }

  .route-step h3 {
    font-size: 22px;
  }

  .route-step p {
    margin: 0;
  }

  .post-intro {
    display: block;
  }

  .post-intro .postmark {
    width: 220px;
  }

  .stamps {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .stamp-item,
  .stamp-item:nth-child(3n + 2) {
    grid-template-columns: 118px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    margin-top: 0;
  }

  .stamp {
    width: 118px;
    padding: 10px;
  }

  .stamp-face {
    padding: 5px 5px 6px;
  }

  .stamp-meta {
    font-size: 7.5px;
    margin-bottom: 4px;
  }

  .stamp-meta b {
    font-size: 12px;
  }

  .stamp-caption h3 {
    font-size: 19px;
  }

  .stamp-caption p {
    font-size: 14.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
