:root {
  --bg: #f7f3ec;
  --surface: #ffffff;
  --ink: #1f2a22;
  --muted: #697366;
  --accent: #3b6e4f;
  --accent-dark: #2a5239;
  --accent-soft: #d7e6dc;
  --border: #e3ddd1;
  --danger: #b0362b;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(31, 42, 34, 0.08);
  --container: 1180px;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
}

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 2rem);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(247, 243, 236, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem clamp(1.5rem, 4vw, 2rem);
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font-weight: 600;
}
.brand:hover, .brand:focus { text-decoration: none; color: var(--ink); }

.brand-mark {
  display: inline-flex;
  width: 2.1rem;
  height: 2.1rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1.1rem;
}

.brand-name { font-size: 1.2rem; line-height: 1; display: inline-flex; align-items: center; }

.main-nav {
  display: flex;
  gap: clamp(0.5rem, 1.5vw, 1.2rem);
  align-items: center;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--ink);
  font-weight: 500;
  padding: 0.35rem 0.4rem;
  border-radius: 6px;
}

.main-nav a:hover { background: var(--accent-soft); text-decoration: none; }

.main-nav .cta {
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
}

.main-nav .pill {
  background: var(--accent-soft);
  color: var(--accent-dark);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 1.4rem;
  cursor: pointer;
}

.inline-form { display: inline; }
.link-button {
  background: none;
  border: 0;
  color: var(--accent-dark);
  font: inherit;
  cursor: pointer;
  padding: 0;
}
.link-button.danger { color: var(--danger); }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-top: 0.8rem;
  }
  .main-nav.open { display: flex; }
  .header-inner { flex-wrap: wrap; }
}

/* ---------- Flash ---------- */

.flash-stack { margin: 1rem auto; display: flex; flex-direction: column; gap: 0.5rem; }
.flash {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: var(--accent-soft);
  border: 1px solid var(--border);
}
.flash-error { background: #fbe3df; border-color: #e8bab3; color: var(--danger); }
.flash-success { background: #def1e3; border-color: #b7d9c0; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 5rem);
  background:
    radial-gradient(ellipse at top left, #e7efe1 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, #f0ddcb 0%, transparent 55%),
    var(--bg);
  overflow: hidden;
}

.hero-with-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: clamp(380px, 60vh, 620px);
  display: flex;
  align-items: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(15, 19, 16, 0.55) 0%, rgba(15, 19, 16, 0.7) 100%);
  pointer-events: none;
  display: none;
}
.hero-with-image .hero-overlay { display: block; }

.hero-inner { position: relative; z-index: 1; }

.hero-centered .hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero-centered .hero-copy {
  max-width: 760px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-copy .eyebrow { color: var(--accent-dark); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; font-size: 0.8rem; }
.hero-copy h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.1;
  margin: 0.7rem 0 1rem;
}
.hero-copy p { color: var(--muted); font-size: 1.08rem; max-width: 60ch; }

.hero-actions { display: flex; gap: 0.8rem; margin-top: 1.5rem; flex-wrap: wrap; justify-content: center; }

/* When a background image is set, contrast text against it */
.hero-with-image .hero-copy .eyebrow { color: #d7e6dc; }
.hero-with-image .hero-copy h1 { color: #fff; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35); }
.hero-with-image .hero-copy p { color: rgba(255, 255, 255, 0.92); text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35); }
.hero-with-image .btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(4px);
}
.hero-with-image .btn-ghost:hover { background: rgba(255, 255, 255, 0.18); }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  border: 0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--accent-soft); text-decoration: none; }
.btn-google { background: #fff; color: var(--ink); border: 1px solid var(--border); }
.btn-google:hover { background: #f4f4f4; text-decoration: none; }
.btn-google .g-mark {
  width: 1.4rem; height: 1.4rem;
  display: inline-flex; align-items: center; justify-content: center;
  background: conic-gradient(from -45deg, #ea4335, #fbbc04, #34a853, #4285f4);
  color: #fff; border-radius: 50%; font-weight: 700; font-size: 0.85rem;
}
.btn-block { width: 100%; }
.btn.small { padding: 0.4rem 0.8rem; font-size: 0.85rem; }

/* ---------- Gradient border CTAs ---------- */

/* Default palette (overridable per-section with .cta-palette-* on a parent) */
:root {
  --cta-grad-1: #00897b;
  --cta-grad-2: #c8e6c9;
  --cta-grad-angle: 135deg;
}

/* Presets */
.cta-palette-cool       { --cta-grad-1: #2962ff; --cta-grad-2: #00e0ff; }
.cta-palette-forest     { --cta-grad-1: #2a5239; --cta-grad-2: #a3c98e; }
.cta-palette-meadow     { --cta-grad-1: #3b6e4f; --cta-grad-2: #f0c987; }
.cta-palette-sunset     { --cta-grad-1: #ff6e7f; --cta-grad-2: #ffb88c; }
.cta-palette-amber      { --cta-grad-1: #b07a2c; --cta-grad-2: #f0c987; }
.cta-palette-rose       { --cta-grad-1: #b94e6c; --cta-grad-2: #f7c1c1; }
.cta-palette-plum       { --cta-grad-1: #5d3a82; --cta-grad-2: #e0b3d6; }
.cta-palette-emerald    { --cta-grad-1: #00897b; --cta-grad-2: #c8e6c9; }
.cta-palette-mono       { --cta-grad-1: #1f2a22; --cta-grad-2: #8c9b8e; }
.cta-palette-warm-mono  { --cta-grad-1: #2a2520; --cta-grad-2: #c8b69b; }

.btn-gradient {
  border: 2px solid transparent;
  background-clip: padding-box, border-box;
  background-origin: padding-box, border-box;
  transition: filter 0.15s ease, transform 0.05s ease;
}
.btn-gradient.btn-primary {
  background-image:
    linear-gradient(var(--accent), var(--accent)),
    linear-gradient(var(--cta-grad-angle), var(--cta-grad-1) 0%, var(--cta-grad-2) 100%);
}
.btn-gradient.btn-primary:hover {
  background-image:
    linear-gradient(var(--accent-dark), var(--accent-dark)),
    linear-gradient(var(--cta-grad-angle), var(--cta-grad-1) 0%, var(--cta-grad-2) 100%);
}
.btn-gradient.btn-ghost {
  background-image:
    linear-gradient(var(--bg), var(--bg)),
    linear-gradient(var(--cta-grad-angle), var(--cta-grad-1) 0%, var(--cta-grad-2) 100%);
  color: var(--ink);
}
.btn-gradient.btn-ghost:hover {
  background-image:
    linear-gradient(var(--accent-soft), var(--accent-soft)),
    linear-gradient(var(--cta-grad-angle), var(--cta-grad-1) 0%, var(--cta-grad-2) 100%);
}
.cta-band .btn-gradient.btn-primary {
  background-image:
    linear-gradient(#fff, #fff),
    linear-gradient(var(--cta-grad-angle), var(--cta-grad-1) 0%, var(--cta-grad-2) 100%);
}
.cta-band .btn-gradient.btn-primary:hover { filter: brightness(0.95); }

/* Header pill CTA gets the same gradient border */
.main-nav .cta {
  border: 2px solid transparent;
  background-clip: padding-box, border-box;
  background-origin: padding-box, border-box;
  background-image:
    linear-gradient(var(--accent), var(--accent)),
    linear-gradient(var(--cta-grad-angle), var(--cta-grad-1) 0%, var(--cta-grad-2) 100%);
}
.main-nav .cta:hover {
  background-image:
    linear-gradient(var(--accent-dark), var(--accent-dark)),
    linear-gradient(var(--cta-grad-angle), var(--cta-grad-1) 0%, var(--cta-grad-2) 100%);
}

/* Palette gallery layout */
.palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.2rem;
}
.palette-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
}
.palette-card h3 { margin: 0 0 0.4rem; font-size: 1.05rem; }
.palette-card .palette-swatch {
  height: 8px;
  border-radius: 4px;
  margin-bottom: 0.9rem;
  background: linear-gradient(135deg, var(--cta-grad-1), var(--cta-grad-2));
}
.palette-card .palette-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.palette-card code {
  font-size: 0.78rem;
  color: var(--muted);
}

/* ---------- Sections ---------- */

.section {
  padding-top: clamp(2rem, 5vw, 3.5rem);
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
}

.section-header {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  margin-bottom: 1.5rem;
}
.section-header h2 { margin: 0; font-size: clamp(1.4rem, 3vw, 1.9rem); }
.section-link { color: var(--accent-dark); font-weight: 500; }

.grid { display: grid; gap: 1.2rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-2-stack { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .grid-3, .grid-2, .grid-2-stack { grid-template-columns: 1fr; }
}

/* Home page sections: scrollable row on mobile, capped at 3 visible on desktop */
.home-scroller > :nth-child(n+4) { display: none; }

@media (max-width: 640px) {
  .home-scroller {
    display: flex !important;
    flex-direction: row;
    grid-template-columns: none;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    gap: 0.8rem;
    margin-inline: calc(-1 * clamp(1.5rem, 4vw, 2rem));
    padding: 0 clamp(1.5rem, 4vw, 2rem) 0.6rem;
    scroll-padding-inline: clamp(1.5rem, 4vw, 2rem);
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .home-scroller::-webkit-scrollbar { display: none; }
  .home-scroller > * {
    flex: 0 0 82%;
    scroll-snap-align: start;
  }
  .home-scroller > :nth-child(n+4) { display: block; }
}

/* ---------- Cards ---------- */

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  color: inherit;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }

.card-media {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, #e7efe1, #f0ddcb);
}
.card-body {
  padding: 0.85rem 1.1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 0 0 auto;
}
.card-eyebrow { color: var(--accent-dark); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.card h3 { margin: 0; font-size: 1.05rem; line-height: 1.3; }
.card p { color: var(--muted); margin: 0; font-size: 0.88rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { color: var(--muted); font-size: 0.78rem; margin-top: 0.3rem; }

/* Story-specific tall card: image dominates ~75%, text ~25% */
.card.story .card-media { aspect-ratio: 3 / 4; }
.card.story .card-body { min-height: 0; }

/* Stay card: square overall, image 2/3, text 1/3 */
.card.stay { aspect-ratio: 1 / 1; display: flex; flex-direction: column; }
.card.stay .card-media {
  aspect-ratio: auto;
  flex: 0 0 66.666%;
  height: 100%;
  width: 100%;
  min-height: 0;
}
.card.stay .card-body {
  flex: 0 0 33.333%;
  overflow: hidden;
  padding: 0.75rem 1rem;
  gap: 0.2rem;
}
.card.stay .card-body p {
  -webkit-line-clamp: 2;
  font-size: 0.85rem;
}

.card.large .card-media { aspect-ratio: 16 / 10; }

/* ---------- Page hero ---------- */

.page-hero {
  background: linear-gradient(180deg, #eee8dd 0%, var(--bg) 100%);
  padding: clamp(2rem, 4vw, 3.5rem) 0 clamp(1rem, 3vw, 2rem);
}
.page-hero h1 { margin: 0.4rem 0 0; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.page-hero .eyebrow { color: var(--accent-dark); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.78rem; }
.page-hero .between { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }

.back-link { display: inline-block; margin-bottom: 1rem; color: var(--accent-dark); }

/* ---------- Prose ---------- */

.prose { max-width: 720px; }
.prose h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin: 0.3rem 0 1rem; }
.prose-hero { border-radius: var(--radius); margin: 1.5rem 0; }
.prose p { font-size: 1.05rem; color: var(--ink); }
.prose-body {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink);
  white-space: pre-wrap;
}

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

.stacked-form { display: flex; flex-direction: column; gap: 1rem; }
.stacked-form label { display: flex; flex-direction: column; gap: 0.35rem; }
.stacked-form label > span { font-weight: 600; font-size: 0.92rem; }
.stacked-form input,
.stacked-form select,
.stacked-form textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  font: inherit;
  color: var(--ink);
}
.stacked-form textarea { resize: vertical; min-height: 120px; }
.stacked-form input:focus,
.stacked-form select:focus,
.stacked-form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.stacked-form label.checkbox { flex-direction: row; align-items: center; gap: 0.5rem; font-weight: 500; }
.stacked-form label.checkbox input { width: auto; }

.form-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; }

.card-surface {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.card-surface h2 { margin-top: 0; }

.narrow { max-width: 640px; }

.upload-field {
  border: 1px dashed var(--border);
  padding: 1rem;
  border-radius: var(--radius);
  background: #fff;
}
.upload-field legend { font-weight: 600; padding: 0 0.5rem; }
.photo-preview { margin-top: 0.8rem; min-height: 24px; }
.photo-preview img { max-height: 180px; border-radius: 10px; }
.help-text { color: var(--muted); font-size: 0.85rem; margin: 0.6rem 0 0; }

/* ---------- Image uploader ---------- */

/* ---------- Avatars ---------- */

.avatar {
  display: inline-block;
  border-radius: 50%;
  object-fit: cover;
  background: var(--accent-soft);
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(31, 42, 34, 0.08);
}
.avatar-sm { width: 32px; height: 32px; }
.avatar-md { width: 56px; height: 56px; }
.avatar-lg { width: 96px; height: 96px; }
.avatar-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--accent-dark);
  font-size: 1.4rem;
}
.avatar-md.avatar-placeholder { font-size: 1.4rem; }
.avatar-lg.avatar-placeholder { font-size: 2.2rem; }

.profile-hero { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }

.author-strip {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0.6rem 0 1.5rem;
  font-size: 0.95rem;
}
.author-strip strong { display: block; }

/* ---------- Status pills ---------- */

.status-pill {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  margin-left: 0.4rem;
  vertical-align: middle;
}
.status-pending { background: #fef3d4; color: #6b4f0a; }
.status-approved { background: #def1e3; color: #2a5239; }
.status-rejected { background: #fbe3df; color: #b0362b; }
.status-owner { background: var(--accent); color: #fff; }

/* ---------- Approval gallery thumbnails ---------- */

.approval-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.6rem;
  margin: 0.8rem 0;
}
.approval-thumb {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  background: #f1ebe0;
  border: 1px solid var(--border);
}
.approval-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}
.approval-thumb:hover img { transform: scale(1.04); }
.approval-thumb.is-cover { outline: 2px solid var(--accent); outline-offset: -2px; }
.approval-thumb .thumb-flag {
  position: absolute;
  bottom: 6px; left: 6px;
  background: rgba(31, 42, 34, 0.85);
  color: #fff;
  padding: 2px 8px;
  font-size: 0.7rem;
  border-radius: 999px;
}

/* ---------- Approval banner ---------- */

.approval-banner {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  background: linear-gradient(135deg, #fef3d4, #f8e0a3);
  border: 1px solid #e6c66c;
  color: #4d3a08;
  padding: 1rem 1.2rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  text-decoration: none;
}
.approval-banner:hover { text-decoration: none; filter: brightness(1.02); }
.approval-banner strong { font-size: 1.05rem; }
.approval-banner .muted { color: #6b4f0a; }

/* ---------- Lead paragraph ---------- */

.prose .lead { font-size: 1.15rem; color: var(--ink); margin: 1rem 0; }

.hero-image-field {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.hero-image-field .field-label {
  font-weight: 600;
  font-size: 0.92rem;
}
.hero-image-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

/* Hidden native file input — triggered by visible label styled as button */
.upload-file-input {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
label.upload-btn {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  white-space: nowrap;
}
.hero-image-preview {
  width: 100%;
  max-width: 480px;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: block;
}

.image-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.7rem;
  margin-top: 0.8rem;
}
.image-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: #f1ebe0;
  border: 1px solid var(--border);
}
.image-tile img { width: 100%; height: 100%; object-fit: cover; }
.image-tile .tile-actions {
  position: absolute;
  top: 6px; right: 6px;
  display: flex; gap: 4px;
  opacity: 0;
  transition: opacity 0.12s ease;
}
.image-tile:hover .tile-actions, .image-tile:focus-within .tile-actions { opacity: 1; }
.tile-btn {
  width: 26px; height: 26px;
  border: 0;
  border-radius: 50%;
  background: rgba(31, 42, 34, 0.85);
  color: #fff;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
.tile-btn.danger { background: var(--danger); }
.tile-cover-flag {
  position: absolute;
  bottom: 6px; left: 6px;
  background: rgba(31, 42, 34, 0.85);
  color: #fff;
  padding: 2px 8px;
  font-size: 0.72rem;
  border-radius: 999px;
  display: none;
}
.image-tile.is-cover .tile-cover-flag { display: inline-block; }
.image-tile.is-cover { outline: 2px solid var(--accent); outline-offset: -2px; }

.tile-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; gap: 0.4rem;
  align-items: center; justify-content: center;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 0.5rem;
  text-align: center;
}
.spinner {
  width: 22px; height: 22px;
  border: 3px solid var(--accent-soft);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.image-tile.is-error { background: #fbe3df; }
.image-tile.is-error .tile-status { color: var(--danger); }

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

/* ---------- Gallery ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.7rem;
  margin: 1rem 0 2rem;
}
.gallery-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  display: block;
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}
.gallery-item:hover img { transform: scale(1.04); }
.gallery-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.65), transparent);
  color: #fff;
  padding: 0.5rem 0.7rem;
  font-size: 0.8rem;
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 19, 16, 0.92);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 95%;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.lightbox-close {
  position: absolute;
  top: 1.2rem; right: 1.4rem;
  background: transparent;
  color: #fff;
  border: 0;
  font-size: 2.2rem;
  cursor: pointer;
  line-height: 1;
}
.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  border: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  font-size: 2.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(0, 0, 0, 0.7); }
.lightbox-prev { left: 1.2rem; }
.lightbox-next { right: 1.2rem; }
@media (max-width: 600px) {
  .lightbox-prev, .lightbox-next { width: 44px; height: 44px; font-size: 1.6rem; }
  .lightbox-prev { left: 0.6rem; }
  .lightbox-next { right: 0.6rem; }
}

/* ---------- Photos: square cards (no text) on home ---------- */

.card.photo-card {
  aspect-ratio: 1 / 1;
  display: block;
  overflow: hidden;
}
.card.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}
.card.photo-card:hover img { transform: scale(1.04); }

/* ---------- Photos gallery page ---------- */

.photo-grid-section { padding-top: 1rem; padding-bottom: 2rem; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.photo-tile {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 6px;
  background: var(--accent-soft);
}
.photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}
.photo-tile:hover img { transform: scale(1.04); }

.photo-sentinel { height: 40px; }
.photo-status { text-align: center; padding: 1rem 0; }

@media (max-width: 900px) {
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  .photo-grid-section { padding-left: 0.4rem; padding-right: 0.4rem; }
  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.35rem;
  }
  .photo-tile { border-radius: 4px; }
}

/* ---------- Lightbox info panel ---------- */

.lightbox-info {
  position: absolute;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  max-width: min(680px, 90%);
  padding: 0.7rem 1rem;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border-radius: 10px;
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.4;
  backdrop-filter: blur(6px);
  pointer-events: none;
}
.lightbox-info strong { font-size: 1rem; display: block; margin-bottom: 0.15rem; }
.lightbox-author { color: rgba(255, 255, 255, 0.78); font-size: 0.82rem; }
.lightbox-description { margin: 0.45rem 0 0; }

@media (max-width: 600px) {
  .lightbox-info { bottom: 5rem; font-size: 0.85rem; padding: 0.6rem 0.85rem; }
}

/* ---------- Carousel ---------- */

.carousel {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #f1ebe0;
  margin-bottom: 1.5rem;
  outline: none;
}
.carousel-track {
  display: flex;
  transition: transform 0.35s ease;
}
.carousel-slide {
  flex: 0 0 100%;
  display: block;
  aspect-ratio: 16 / 10;
  background: #f1ebe0;
}
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  border: 0;
  width: 44px; height: 44px;
  border-radius: 50%;
  font-size: 1.8rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  line-height: 1;
}
.carousel-btn:hover { background: rgba(0, 0, 0, 0.7); }
.carousel-btn.prev { left: 0.8rem; }
.carousel-btn.next { right: 0.8rem; }
.carousel-dots {
  position: absolute;
  bottom: 0.7rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.4rem;
}
.carousel-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.carousel-dot:hover { transform: scale(1.2); }
.carousel-dot.is-active { background: #fff; transform: scale(1.25); }

/* ---------- Amenities ---------- */

.amenities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}
.amenities-grid legend { font-weight: 600; padding: 0 0.5rem; }
.amenity-check { display: flex; align-items: center; gap: 0.5rem; font-weight: 500; }
.amenity-check input { width: auto; }

.amenity-pills {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.amenity-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
}
.amenity-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

/* ---------- Comments ---------- */

.comments {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.comments h2 { margin: 0 0 1rem; font-size: 1.3rem; }
.comment-list { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.comment {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.comment-body {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.7rem 0.95rem;
}
.comment-body p { margin: 0.3rem 0 0; }
.comment-meta { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; font-size: 0.82rem; }
.comment-meta strong { font-size: 0.92rem; }
.comment-meta .small { font-size: 0.75rem; }

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.comment-form textarea {
  resize: vertical;
  min-height: 70px;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  font: inherit;
}
.comment-form button { align-self: flex-end; }

/* ---------- Tap feedback (mobile + desktop) ---------- */

* { -webkit-tap-highlight-color: transparent; }

a, button, .btn, .card, .thread-item, .gallery-item, .carousel-slide,
.carousel-btn, .image-tile, .approval-thumb, .amenity-pill, .pill,
.tile-btn, [role="button"], summary {
  transition: transform 0.08s ease, filter 0.15s ease;
}

a:active, button:active, .btn:active, .card:active, .thread-item:active,
.gallery-item:active, .carousel-slide:active, .carousel-btn:active,
.image-tile:active, .approval-thumb:active, .amenity-pill:active,
.pill:active, .tile-btn:active, [role="button"]:active, summary:active {
  transform: scale(0.96);
}


[data-zoom] { cursor: zoom-in; }
.prose-hero[data-zoom] { transition: transform 0.2s ease; }
.prose-hero[data-zoom]:hover { transform: scale(1.005); }

/* ---------- CTA band ---------- */

.cta-band { background: var(--accent); color: #fff; margin-top: 3rem; }
.cta-band-inner { text-align: center; padding: 3rem 1rem; }
.cta-band h2 { margin: 0 0 0.5rem; }
.cta-band p { margin: 0 0 1.5rem; }
.cta-band .btn-primary { background: #fff; color: var(--accent-dark); }

/* ---------- Chat ---------- */

.chat-page {
  height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
}

.chat-threaded {
  flex-direction: row;
  height: calc(100vh - 80px);
}

.chat-sidebar {
  flex: 0 0 260px;
  border-right: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.chat-sidebar-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
}
.chat-sidebar-head h2 { margin: 0; font-size: 0.95rem; }

.thread-list {
  list-style: none;
  margin: 0;
  padding: 0.4rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.thread-list li { padding: 0; }
.thread-list .muted { padding: 0.6rem 0.8rem; font-size: 0.85rem; }
.thread-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.88rem;
}
.thread-item:hover { background: var(--accent-soft); text-decoration: none; }
.thread-item.is-active { background: var(--accent); color: #fff; }
.thread-item.is-active .muted, .thread-item.is-active .thread-date { color: rgba(255, 255, 255, 0.8); }
.thread-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-date { font-size: 0.74rem; }

.chat-thread-header {
  padding: 0.55rem clamp(1rem, 2vw, 1.5rem) 0.4rem;
  align-items: center;
}
.chat-thread-header h1 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-thread-header .chat-meta { gap: 0.4rem; }
.chat-thread-header .pill { font-size: 0.72rem; padding: 0.2rem 0.6rem; }

@media (max-width: 760px) {
  .chat-threaded { flex-direction: column; }
  .chat-sidebar {
    flex: 0 0 auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    max-height: 30vh;
  }
}

.chat-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
  flex-wrap: wrap; gap: 1rem;
  flex: 0 0 auto;
}
.chat-header h1 { margin: 0.4rem 0 0; font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
.chat-meta { display: flex; gap: 0.6rem; align-items: center; }

.chat-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 1rem clamp(1rem, 2vw, 2rem) 1.5rem;
  gap: 1rem;
}

.chat-transcript {
  flex: 1;
  min-height: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.8rem 0.9rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.msg {
  max-width: 78%;
  padding: 0.45rem 0.75rem;
  border-radius: 12px;
  white-space: pre-wrap;
  font-size: 0.92rem;
  line-height: 1.4;
}
.msg-user { background: var(--accent); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg-assistant { background: #eee8dd; color: var(--ink); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.typing {
  opacity: 0.85;
  font-style: italic;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.msg-warn {
  background: #fef3d4;
  color: #4d3a08;
  border: 1px solid #e6c66c;
}

.typing-label { font-style: italic; }
.typing-dots {
  display: inline-flex;
  gap: 4px;
  margin-left: 2px;
}
.typing-dots > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.4;
  animation: typing-pulse 1.2s ease-in-out infinite;
}
.typing-dots > span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots > span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-pulse {
  0%, 60%, 100% { transform: translateY(0) scale(1); opacity: 0.35; }
  30%          { transform: translateY(-3px) scale(1.25); opacity: 1; }
}

.chat-input {
  display: flex;
  gap: 0.6rem;
  align-items: flex-end;
  flex: 0 0 auto;
}
.chat-help { flex: 0 0 auto; }
.chat-input textarea {
  flex: 1;
  min-height: 52px;
  max-height: 200px;
  padding: 0.8rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  resize: none;
  font: inherit;
  background: #fff;
}
.chat-input textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.chat-help { font-size: 0.85rem; }

.pill {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent-dark);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ---------- Auth ---------- */

.auth-shell { min-height: 70vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow);
}
.auth-card h1 { margin: 0 0 0.3rem; }
.auth-footer { text-align: center; color: var(--muted); margin-top: 1.5rem; }
.or { text-align: center; color: var(--muted); margin: 1rem 0; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; }

/* ---------- Lists ---------- */

.list { list-style: none; padding: 0; margin: 0.6rem 0 0; display: flex; flex-direction: column; gap: 0.6rem; }
.list li { border-bottom: 1px solid var(--border); padding-bottom: 0.6rem; }
.list li:last-child { border-bottom: 0; }
.list strong { display: block; }

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

.site-footer {
  border-top: 1px solid var(--border);
  background: #ece6d9;
  margin-top: 4rem;
  padding: 2rem 0;
}
.footer-inner { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.footer-inner a { display: block; color: var(--ink); padding: 0.15rem 0; }
.footer-inner a:hover { color: var(--accent-dark); }
