/* LUXE PETS — application styles */

/* ==========================================================================
   1. Reset
   ========================================================================== */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 var(--s-3);
}
h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }
p  { margin: 0 0 var(--s-4); }

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

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

.skip-link {
  position: absolute; left: var(--s-4); top: -60px; z-index: 200;
  background: var(--ink); color: var(--cream);
  padding: var(--s-3) var(--s-4); border-radius: var(--r-md);
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: var(--s-4); }

/* ==========================================================================
   2. Layout
   ========================================================================== */

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--s-5); }
.wrap-narrow { max-width: var(--wrap-narrow); }

.section { padding-block: var(--s-8); }
.section-sm { padding-block: var(--s-7); }
.section-tint { background: var(--surface-2); }
.section-ink { background: var(--forest); color: var(--sand); }
.section-ink h2, .section-ink h3 { color: #fff; }

.section-head { max-width: 640px; margin-bottom: var(--s-6); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--ink-3); font-size: var(--fs-md); margin: 0; }
.section-ink .section-head p { color: rgba(255,255,255,0.72); }

.eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass-2);
  margin-bottom: var(--s-3);
}
.section-ink .eyebrow { color: var(--blush); }

.grid { display: grid; gap: var(--s-5); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); }

.stack { display: flex; flex-direction: column; gap: var(--s-4); }
.row { display: flex; align-items: center; gap: var(--s-3); }
.row-wrap { flex-wrap: wrap; }
.row-between { justify-content: space-between; }
.spacer { flex: 1; }

.muted { color: var(--ink-3); }
.small { font-size: var(--fs-sm); }
.tiny  { font-size: var(--fs-xs); }
.center { text-align: center; }
.mono { font-family: var(--font-mono); }

/* ==========================================================================
   3. Buttons
   ========================================================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  padding: 0.72rem 1.35rem;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: var(--ink); color: var(--cream);
  font-size: var(--fs-base); font-weight: 600; letter-spacing: 0.01em;
  text-align: center; white-space: nowrap;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.btn:hover:not(:disabled) { background: var(--ink-2); transform: translateY(-1px); box-shadow: var(--sh-2); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-brass { background: var(--brass); color: #fff; }
.btn-brass:hover:not(:disabled) { background: var(--brass-2); }

.btn-forest { background: var(--forest); color: #fff; }
.btn-forest:hover:not(:disabled) { background: var(--forest-2); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); border-color: var(--sand-2); }

.btn-light { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-light:hover:not(:disabled) { background: var(--sand); }

.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #8e2e26; }

.btn-sm { padding: 0.45rem 0.9rem; font-size: var(--fs-sm); }
.btn-lg { padding: 0.95rem 2rem; font-size: var(--fs-md); }
.btn-block { width: 100%; }

.btn-link {
  background: none; border: none; padding: 0;
  color: var(--brass-2); font-weight: 600; text-decoration: underline;
  text-underline-offset: 3px; border-radius: var(--r-sm);
}
.btn-link:hover { color: var(--ink); }

.btn .spin {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   4. Badges, pills, tags
   ========================================================================== */

.badge {
  display: inline-flex; align-items: center; gap: 0.35em;
  padding: 0.22em 0.7em;
  border-radius: var(--r-pill);
  background: var(--surface-3); color: var(--ink-2);
  font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: 0.03em; text-transform: uppercase; white-space: nowrap;
}
.badge-good    { background: var(--good-soft);   color: var(--good); }
.badge-warn    { background: var(--warn-soft);   color: var(--warn); }
.badge-bad     { background: var(--bad-soft);    color: var(--bad); }
.badge-info    { background: var(--info-soft);   color: var(--info); }
.badge-neutral { background: var(--surface-3);   color: var(--ink-3); }
.badge-brass   { background: var(--brass-soft);  color: var(--brass-2); }

.badge-dot::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; flex: none;
}
.badge-live::before { animation: pulse 1.8s var(--ease) infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }

.tag {
  display: inline-flex; align-items: center;
  padding: 0.3em 0.75em;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  font-size: var(--fs-sm); color: var(--ink-2);
}

.tag-list { display: flex; flex-wrap: wrap; gap: var(--s-2); list-style: none; margin: 0; padding: 0; }

/* ==========================================================================
   5. Cards & panels
   ========================================================================== */

.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
}
.card-pad { padding: var(--s-5); }

.panel {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  box-shadow: var(--sh-1);
}
.panel-tint { background: var(--surface-2); border-color: var(--line); }

.note {
  border-left: 3px solid var(--brass);
  background: var(--brass-soft);
  padding: var(--s-4);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: var(--fs-sm);
  color: var(--ink-2);
}
.note-good { border-color: var(--good); background: var(--good-soft); }
.note-warn { border-color: var(--warn); background: var(--warn-soft); }
.note-bad  { border-color: var(--bad);  background: var(--bad-soft); }
.note-info { border-color: var(--info); background: var(--info-soft); }
.note strong { color: var(--ink); }
.note :last-child { margin-bottom: 0; }

/* ==========================================================================
   6. Forms
   ========================================================================== */

.field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: var(--s-4); }
.field-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-4); }
.field-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); }

.label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
.label .req { color: var(--bad); margin-left: 2px; }
.hint { font-size: var(--fs-xs); color: var(--ink-4); }

.input, .select, .textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: var(--fs-base);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--sand-2); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brass);
  box-shadow: 0 0 0 3px rgba(179, 130, 47, 0.15);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
.textarea { min-height: 110px; resize: vertical; line-height: 1.55; }

.select {
  appearance: none;
  padding-right: 2.2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%236b5f55' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 11px;
}

.input.invalid, .select.invalid, .textarea.invalid {
  border-color: var(--bad);
  box-shadow: 0 0 0 3px rgba(168, 56, 47, 0.12);
}
.field-error { font-size: var(--fs-xs); color: var(--bad); font-weight: 600; }

/* Checkboxes and radios */
.check {
  display: flex; align-items: flex-start; gap: var(--s-3);
  padding: var(--s-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.check:hover { border-color: var(--sand-2); background: var(--surface-2); }
.check input { margin: 2px 0 0; width: 17px; height: 17px; accent-color: var(--forest); flex: none; cursor: pointer; }
.check-body { flex: 1; min-width: 0; }
.check-title { font-weight: 600; font-size: var(--fs-base); }
.check-sub { font-size: var(--fs-sm); color: var(--ink-3); }
.check:has(input:checked) { border-color: var(--forest); background: var(--forest-soft); }
.check.invalid { border-color: var(--bad); background: var(--bad-soft); }

.check-inline { display: inline-flex; align-items: center; gap: var(--s-2); cursor: pointer; font-size: var(--fs-sm); }
.check-inline input { width: 16px; height: 16px; accent-color: var(--forest); cursor: pointer; }

/* ==========================================================================
   7. Header
   ========================================================================== */

.announce {
  background: var(--forest);
  color: rgba(255,255,255,0.86);
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
  text-align: center;
  padding: 0.5rem var(--s-4);
}
.announce strong { color: #fff; }

.header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(253, 250, 245, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; gap: var(--s-5);
}

.logo { display: flex; align-items: baseline; gap: 0.45rem; flex: none; }
.logo-mark {
  font-family: var(--font-display);
  font-size: 1.4rem; font-weight: 700; letter-spacing: 0.16em;
  color: var(--ink);
}
.logo-sub {
  font-size: 0.58rem; font-weight: 700; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--brass-2);
}

.nav { display: flex; align-items: center; gap: var(--s-5); margin-left: var(--s-4); }
.nav a {
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2);
  padding: 0.4rem 0; position: relative;
  transition: color var(--dur) var(--ease);
}
.nav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--brass);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.nav a:hover, .nav a.active { color: var(--ink); }
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: var(--s-3); margin-left: auto; }

.burger {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--line); border-radius: var(--r-md);
}
.burger span {
  display: block; width: 17px; height: 1.5px; background: var(--ink);
  position: relative; transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
.burger span::before, .burger span::after {
  content: ''; position: absolute; left: 0; width: 17px; height: 1.5px; background: var(--ink);
  transition: transform var(--dur) var(--ease), top var(--dur) var(--ease);
}
.burger span::before { top: -5.5px; }
.burger span::after  { top: 5.5px; }
.burger[aria-expanded='true'] span { background: transparent; }
.burger[aria-expanded='true'] span::before { top: 0; transform: rotate(45deg); }
.burger[aria-expanded='true'] span::after  { top: 0; transform: rotate(-45deg); }

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line-soft);
  background: var(--cream);
  padding: var(--s-4) var(--s-5) var(--s-5);
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block; padding: var(--s-3) 0;
  border-bottom: 1px solid var(--line-soft);
  font-weight: 600;
}
.mobile-nav .btn { margin-top: var(--s-4); }

@media (max-width: 900px) {
  .nav { display: none; }
  .burger { display: flex; }
  .header-actions .btn:not(.burger) { display: none; }
}

/* ==========================================================================
   8. Hero
   ========================================================================== */

.hero {
  position: relative;
  padding-block: var(--s-9) var(--s-8);
  background:
    radial-gradient(1100px 520px at 78% 8%, rgba(217, 155, 134, 0.20), transparent 62%),
    radial-gradient(820px 460px at 12% 92%, rgba(179, 130, 47, 0.16), transparent 60%),
    linear-gradient(180deg, var(--sand) 0%, var(--cream) 100%);
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--s-8);
  align-items: center;
}
.hero h1 { font-size: var(--fs-4xl); margin-bottom: var(--s-4); }
.hero h1 em { font-style: italic; color: var(--brass-2); }
.hero-lede { font-size: var(--fs-md); color: var(--ink-3); max-width: 46ch; margin-bottom: var(--s-5); }

.hero-cta { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-bottom: var(--s-6); }

.hero-stats { display: flex; flex-wrap: wrap; gap: var(--s-6); }
.hero-stat strong {
  display: block; font-family: var(--font-display);
  font-size: var(--fs-xl); color: var(--ink); line-height: 1;
}
.hero-stat span { font-size: var(--fs-xs); color: var(--ink-3); letter-spacing: 0.06em; text-transform: uppercase; }

/* Collage of pet portraits beside the headline */
.hero-art { position: relative; aspect-ratio: 1 / 1; }
.hero-art figure {
  position: absolute; margin: 0;
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--sh-4);
  border: 5px solid #fff;
  transition: transform 500ms var(--ease-out);
}
.hero-art figure:hover { transform: translateY(-6px) scale(1.02); }
.hero-art figure img { width: 100%; height: 100%; object-fit: cover; }
.hero-art .a1 { width: 56%; aspect-ratio: 4/5; top: 0; left: 4%; z-index: 2; }
.hero-art .a2 { width: 44%; aspect-ratio: 1/1; top: 14%; right: 0; z-index: 3; }
.hero-art .a3 { width: 48%; aspect-ratio: 1/1; bottom: 2%; left: 0; z-index: 3; }
.hero-art .a4 { width: 52%; aspect-ratio: 4/5; bottom: 6%; right: 3%; z-index: 1; }

.hero-search {
  margin-top: var(--s-7);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: var(--s-4);
  box-shadow: var(--sh-3);
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: var(--s-3);
  align-items: end;
}
.hero-search .field { margin: 0; }

@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  /* The auto margins that centre this cancel the grid item's stretch sizing, and
     its children are all absolutely positioned, so it needs an explicit width
     or it collapses to nothing. */
  .hero-art { width: 100%; max-width: 460px; margin-inline: auto; order: -1; }
  .hero-search { grid-template-columns: repeat(2, 1fr); }
  .hero-search .btn { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .hero { padding-block: var(--s-7) var(--s-6); }
  .hero-search { grid-template-columns: 1fr; }
  .hero-stats { gap: var(--s-5); }
}

/* ==========================================================================
   9. Trust strip
   ========================================================================== */

.trust {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-5);
  padding-block: var(--s-6);
  border-block: 1px solid var(--line-soft);
}
.trust-item { display: flex; gap: var(--s-3); align-items: flex-start; }
.trust-icon {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  background: var(--brass-soft); color: var(--brass-2);
  display: grid; place-items: center;
}
.trust-item h4 { margin: 0 0 2px; font-family: var(--font-body); font-size: var(--fs-base); font-weight: 700; }
.trust-item p { margin: 0; font-size: var(--fs-sm); color: var(--ink-3); }

@media (max-width: 860px) { .trust { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .trust { grid-template-columns: 1fr; } }

/* ==========================================================================
   10. Pet cards
   ========================================================================== */

.pet-card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-1);
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), border-color var(--dur) var(--ease);
}
.pet-card:hover { transform: translateY(-4px); box-shadow: var(--sh-3); border-color: var(--line); }

.pet-media { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
.pet-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease-out); }
.pet-card:hover .pet-media img { transform: scale(1.04); }

.pet-flags { position: absolute; top: var(--s-3); left: var(--s-3); display: flex; flex-wrap: wrap; gap: var(--s-2); z-index: 2; }
.pet-flags .badge { background: rgba(255,255,255,0.94); box-shadow: var(--sh-1); }

.pet-fav {
  position: absolute; top: var(--s-3); right: var(--s-3); z-index: 2;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.94); border: none;
  display: grid; place-items: center; color: var(--ink-3);
  box-shadow: var(--sh-1);
  transition: color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.pet-fav:hover { transform: scale(1.1); color: var(--blush); }
.pet-fav.on { color: #d64545; }
.pet-fav.on svg { fill: currentColor; }

.pet-body { padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-2); flex: 1; }
.pet-name { font-family: var(--font-display); font-size: var(--fs-lg); margin: 0; }
.pet-breed { font-size: var(--fs-sm); color: var(--brass-2); font-weight: 600; }
.pet-meta { font-size: var(--fs-sm); color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pet-meta span:not(:last-child)::after { content: '·'; margin-left: 0.4rem; color: var(--ink-4); }

.pet-foot {
  margin-top: auto; padding-top: var(--s-3);
  border-top: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
}
.pet-price { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 700; }
.pet-price small { display: block; font-family: var(--font-body); font-size: var(--fs-xs); color: var(--ink-4); font-weight: 400; }

.pet-card.is-reserved .pet-media::after,
.pet-card.is-adopted .pet-media::after {
  content: ''; position: absolute; inset: 0; background: rgba(253, 250, 245, 0.55);
}

/* ==========================================================================
   11. Browse page
   ========================================================================== */

.browse { display: grid; grid-template-columns: 264px 1fr; gap: var(--s-6); align-items: start; }

.filters {
  position: sticky; top: calc(var(--header-h) + var(--s-4));
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  box-shadow: var(--sh-1);
  max-height: calc(100vh - var(--header-h) - var(--s-6));
  overflow-y: auto;
}
.filter-group { padding-block: var(--s-4); border-bottom: 1px solid var(--line-soft); }
.filter-group:first-of-type { padding-top: 0; }
.filter-group:last-of-type { border-bottom: none; padding-bottom: 0; }
.filter-group h4 {
  font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-4);
  margin: 0 0 var(--s-3);
}
.filter-list { display: flex; flex-direction: column; gap: 0.55rem; max-height: 230px; overflow-y: auto; }
.filter-list .check-inline { justify-content: space-between; }
.filter-list .count { color: var(--ink-4); font-size: var(--fs-xs); }

.chip-row { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip {
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--surface); font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2);
  transition: all var(--dur) var(--ease);
}
.chip:hover { border-color: var(--brass); color: var(--ink); }
.chip.on { background: var(--forest); border-color: var(--forest); color: #fff; }

.browse-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3);
  margin-bottom: var(--s-5);
}
.browse-bar .select { width: auto; min-width: 170px; }

.filters-toggle { display: none; }

.empty {
  text-align: center; padding: var(--s-8) var(--s-5);
  border: 1px dashed var(--line); border-radius: var(--r-lg);
  color: var(--ink-3); background: var(--surface);
}
.empty h3 { color: var(--ink); }

.pagination { display: flex; justify-content: center; align-items: center; gap: var(--s-2); margin-top: var(--s-7); flex-wrap: wrap; }
.pagination button {
  min-width: 38px; height: 38px; padding-inline: 0.6rem;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); font-weight: 600; font-size: var(--fs-sm);
  transition: all var(--dur) var(--ease);
}
.pagination button:hover:not(:disabled) { border-color: var(--brass); }
.pagination button.on { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

@media (max-width: 900px) {
  .browse { grid-template-columns: 1fr; }
  .filters { position: static; max-height: none; display: none; }
  .filters.open { display: block; }
  .filters-toggle { display: inline-flex; }
}

/* ==========================================================================
   12. Pet detail
   ========================================================================== */

.crumbs { font-size: var(--fs-sm); color: var(--ink-3); padding-block: var(--s-4); }
.crumbs a:hover { color: var(--brass-2); text-decoration: underline; }
.crumbs span { margin-inline: 0.4rem; color: var(--ink-4); }

.detail { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: var(--s-7); align-items: start; }

.gallery-main {
  aspect-ratio: 4 / 3; border-radius: var(--r-xl); overflow: hidden;
  background: var(--surface-2); box-shadow: var(--sh-2); margin-bottom: var(--s-3);
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.gallery-thumbs button {
  width: 74px; aspect-ratio: 1; border-radius: var(--r-md); overflow: hidden;
  border: 2px solid transparent; background: var(--surface-2); padding: 0;
  transition: border-color var(--dur) var(--ease);
}
.gallery-thumbs button.on { border-color: var(--brass); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.detail-aside { position: sticky; top: calc(var(--header-h) + var(--s-4)); }

.price-box {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); padding: var(--s-5); box-shadow: var(--sh-2);
}
.price-main { font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: 700; line-height: 1; }
.price-split {
  display: flex; justify-content: space-between; gap: var(--s-3);
  padding-block: var(--s-3); border-bottom: 1px solid var(--line-soft); font-size: var(--fs-sm);
}
.price-split:last-of-type { border-bottom: none; }
.price-split dt { color: var(--ink-3); margin: 0; }
.price-split dd { margin: 0; font-weight: 600; }

.spec-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-4) var(--s-5); }
.spec dt { font-size: var(--fs-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 2px; }
.spec dd { margin: 0; font-weight: 600; }

.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.check-list li { display: flex; gap: var(--s-3); align-items: flex-start; font-size: var(--fs-sm); }
.check-list svg { flex: none; margin-top: 3px; color: var(--good); }

@media (max-width: 900px) {
  .detail { grid-template-columns: 1fr; gap: var(--s-6); }
  .detail-aside { position: static; }
  .spec-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   13. Steps / how it works
   ========================================================================== */

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-5); counter-reset: step; }
.step { position: relative; padding-top: var(--s-5); }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; top: 0; left: 0;
  font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 700;
  color: var(--brass); opacity: 0.55;
}
.step::after {
  content: ''; position: absolute; top: 12px; left: 46px; right: -8px; height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}
.step:last-child::after { display: none; }
.step h3 { font-size: var(--fs-md); margin-bottom: var(--s-2); }
.step p { font-size: var(--fs-sm); color: var(--ink-3); margin: 0; }
.section-ink .step p { color: rgba(255,255,255,0.7); }
.section-ink .step::before { color: var(--blush); opacity: 1; }
.section-ink .step::after { background: linear-gradient(90deg, rgba(255,255,255,0.22), transparent); }

@media (max-width: 860px) {
  .steps { grid-template-columns: repeat(2, 1fr); gap: var(--s-6); }
  .step::after { display: none; }
}
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }

/* ==========================================================================
   14. Breed tiles & testimonials
   ========================================================================== */

.breed-tile {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  transition: all var(--dur) var(--ease);
}
.breed-tile:hover { border-color: var(--brass); transform: translateY(-2px); box-shadow: var(--sh-2); }
.breed-tile img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none; }
.breed-tile strong { display: block; font-size: var(--fs-base); }
.breed-tile span { font-size: var(--fs-xs); color: var(--ink-4); }

.quote {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); padding: var(--s-5); box-shadow: var(--sh-1);
  display: flex; flex-direction: column; gap: var(--s-4);
}
.quote blockquote {
  margin: 0; font-family: var(--font-display); font-size: var(--fs-md);
  line-height: 1.5; color: var(--ink);
}
.quote blockquote::before { content: '\201C'; color: var(--brass); font-size: 2em; line-height: 0; vertical-align: -0.35em; margin-right: 0.1em; }
.quote-by { display: flex; align-items: center; gap: var(--s-3); margin-top: auto; }
.quote-by img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.quote-by strong { display: block; font-size: var(--fs-sm); }
.quote-by span { font-size: var(--fs-xs); color: var(--ink-4); }
.stars { color: var(--brass); letter-spacing: 0.08em; font-size: var(--fs-sm); }

/* The author's own review, so it is obvious which card is theirs. */
.quote.is-mine { border-color: var(--brass); box-shadow: 0 0 0 3px var(--brass-soft), var(--sh-1); }

/* ==========================================================================
   15. FAQ
   ========================================================================== */

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  padding: var(--s-4) 0; cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-4);
  font-weight: 600; font-size: var(--fs-md);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; flex: none; width: 11px; height: 11px;
  border-right: 1.8px solid var(--ink-3); border-bottom: 1.8px solid var(--ink-3);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform var(--dur) var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq details p { padding-bottom: var(--s-4); color: var(--ink-3); margin: 0; max-width: 72ch; }

/* ==========================================================================
   16. Footer
   ========================================================================== */

.footer { background: var(--ink); color: rgba(255,255,255,0.68); padding-block: var(--s-8) var(--s-5); margin-top: var(--s-8); }
.footer a { color: rgba(255,255,255,0.68); transition: color var(--dur) var(--ease); }
.footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: var(--s-6); margin-bottom: var(--s-7); }
.footer h4 {
  font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: #fff; margin-bottom: var(--s-4);
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; font-size: var(--fs-sm); }
.footer .logo-mark { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12); padding-top: var(--s-5);
  display: flex; flex-wrap: wrap; gap: var(--s-4); justify-content: space-between;
  font-size: var(--fs-xs);
}

@media (max-width: 860px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   17. Progress stepper (adoption flow)
   ========================================================================== */

.stepper { display: flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-6); flex-wrap: wrap; }
.stepper-item { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-sm); color: var(--ink-4); }
.stepper-num {
  width: 25px; height: 25px; border-radius: 50%;
  border: 1.5px solid var(--line); background: var(--surface);
  display: grid; place-items: center; font-size: var(--fs-xs); font-weight: 700; flex: none;
}
.stepper-item.on { color: var(--ink); font-weight: 600; }
.stepper-item.on .stepper-num { background: var(--forest); border-color: var(--forest); color: #fff; }
.stepper-item.done { color: var(--ink-3); }
.stepper-item.done .stepper-num { background: var(--good-soft); border-color: var(--good); color: var(--good); }
.stepper-sep { flex: 1; min-width: 14px; height: 1px; background: var(--line); }

@media (max-width: 720px) {
  .stepper-item span:not(.stepper-num) { display: none; }
  .stepper-sep { min-width: 18px; }
}

/* ==========================================================================
   18. Adoption terms
   ========================================================================== */

.terms-list { display: grid; gap: var(--s-4); counter-reset: clause; }
.clause {
  border: 1px solid var(--line-soft); border-radius: var(--r-lg);
  background: var(--surface); padding: var(--s-5);
}
.clause.needs-ack { border-color: var(--line); background: var(--surface); }
.clause h3 {
  font-family: var(--font-display); font-size: var(--fs-md);
  display: flex; align-items: baseline; gap: var(--s-3); margin-bottom: var(--s-3);
}
.clause h3::before {
  counter-increment: clause; content: counter(clause) '.';
  color: var(--brass); font-size: var(--fs-sm); font-weight: 700; flex: none;
}
.clause p { font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.65; margin: 0; }
.clause .check { margin-top: var(--s-4); }

.terms-scroll {
  max-height: 460px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s-5); background: var(--surface-2);
  scroll-behavior: smooth;
}

/* ==========================================================================
   19. Payment method picker
   ========================================================================== */

.pay-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--s-4); }

.pay-option {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-3);
  padding: var(--s-5);
  border: 1.5px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); text-align: left;
  transition: all var(--dur) var(--ease-out);
}
.pay-option:hover:not(:disabled) { border-color: var(--ink-4); transform: translateY(-3px); box-shadow: var(--sh-3); }
.pay-option.on { border-color: var(--forest); background: var(--forest-soft); box-shadow: var(--sh-2); }
.pay-option:disabled { opacity: 0.5; cursor: not-allowed; }

.pay-logo {
  width: 46px; height: 46px; border-radius: var(--r-md);
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 1.15rem;
  box-shadow: var(--sh-1);
}
.pay-name { font-weight: 700; font-size: var(--fs-md); }
.pay-blurb { font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.45; }
.pay-option.on::after {
  content: '✓'; position: absolute; top: var(--s-3); right: var(--s-3);
  width: 21px; height: 21px; border-radius: 50%;
  background: var(--forest); color: #fff;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
}

/* --- Payment plan picker (how much to pay) ------------------------------- */

.plan-grid { display: grid; gap: var(--s-3); margin-bottom: var(--s-4); }

.plan-option {
  display: flex; align-items: center; gap: var(--s-4);
  width: 100%; padding: var(--s-4) var(--s-5);
  border: 1.5px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); text-align: left;
  transition: all var(--dur) var(--ease-out);
}
.plan-option:hover:not(.on) { border-color: var(--ink-4); transform: translateY(-2px); box-shadow: var(--sh-2); }
.plan-option.on {
  background: var(--forest); border-color: var(--forest); color: #fff;
  box-shadow: var(--sh-3);
}

.plan-radio {
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--line); background: var(--surface);
  display: grid; place-items: center;
  transition: border-color var(--dur) var(--ease);
}
.plan-option.on .plan-radio { border-color: #fff; background: transparent; }
.plan-option.on .plan-radio::after {
  content: ''; width: 10px; height: 10px; border-radius: 50%; background: #fff;
}

.plan-title { font-size: var(--fs-md); font-weight: 600; line-height: 1.3; }
.plan-title strong { font-family: var(--font-display); font-weight: 700; white-space: nowrap; }
.plan-blurb { font-size: var(--fs-sm); color: var(--ink-3); margin-top: 2px; }
.plan-option.on .plan-blurb { color: rgba(255, 255, 255, 0.78); }

.amount-due {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4);
  padding-top: var(--s-4); border-top: 2px dotted var(--line);
}
.amount-due span { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 700; }
.amount-due strong { font-family: var(--font-display); font-size: var(--fs-2xl); color: var(--forest); line-height: 1; }

@media (max-width: 480px) {
  .plan-option { padding: var(--s-4); gap: var(--s-3); }
  .plan-title { font-size: var(--fs-base); }
}

/* ==========================================================================
   20. Countdown ring
   ========================================================================== */

.countdown { display: flex; align-items: center; gap: var(--s-4); }
.ring { position: relative; width: 92px; height: 92px; flex: none; }
.ring svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.ring circle { fill: none; stroke-width: 7; stroke-linecap: round; }
.ring .track { stroke: var(--line); }
.ring .bar {
  stroke: var(--good);
  transition: stroke-dashoffset 1s linear, stroke 400ms var(--ease);
}
.ring.warn .bar { stroke: var(--warn); }
.ring.danger .bar { stroke: var(--bad); animation: throb 1.1s var(--ease) infinite; }
@keyframes throb { 0%,100% { opacity: 1; } 50% { opacity: 0.45; } }
.ring-label {
  position: absolute; inset: 0;
  display: grid; place-items: center; text-align: center;
}
.ring-time {
  font-family: var(--font-mono); font-size: 1.15rem; font-weight: 700;
  color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums;
}
.ring-cap { font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-4); margin-top: 3px; }
.ring.expired .bar { stroke: var(--bad); animation: none; }
.ring.expired .ring-time { color: var(--bad); font-size: 0.9rem; }

/* ==========================================================================
   21. Support chat
   ========================================================================== */

.chat {
  display: flex; flex-direction: column;
  height: min(640px, 78vh);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); overflow: hidden; box-shadow: var(--sh-2);
}
.chat-head {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface-2);
}
.chat-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: var(--forest); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: var(--fs-sm);
}
.chat-head h3 { margin: 0; font-family: var(--font-body); font-size: var(--fs-base); font-weight: 700; }
.chat-head p { margin: 0; font-size: var(--fs-xs); color: var(--ink-3); }

.chat-log {
  flex: 1; overflow-y: auto; padding: var(--s-5);
  display: flex; flex-direction: column; gap: var(--s-4);
  background:
    radial-gradient(circle at 20% 0%, rgba(179,130,47,0.04), transparent 45%),
    var(--surface);
  scroll-behavior: smooth;
}

.msg { display: flex; flex-direction: column; gap: 0.3rem; max-width: 78%; }
.msg-user { align-self: flex-end; align-items: flex-end; }
.msg-admin { align-self: flex-start; }
.msg-system { align-self: center; max-width: 92%; align-items: center; }

.bubble {
  padding: 0.7rem 1rem;
  border-radius: var(--r-lg);
  font-size: var(--fs-base);
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.msg-user .bubble { background: var(--forest); color: #fff; border-bottom-right-radius: var(--r-sm); }
.msg-admin .bubble { background: var(--surface-2); border: 1px solid var(--line-soft); border-bottom-left-radius: var(--r-sm); }
.msg-system .bubble {
  background: var(--brass-soft); border: 1px dashed var(--line);
  color: var(--ink-2); font-size: var(--fs-sm); text-align: center;
}
.msg-time { font-size: 0.65rem; color: var(--ink-4); padding-inline: 0.4rem; }

.chat-foot { border-top: 1px solid var(--line-soft); padding: var(--s-4); background: var(--surface); }
.chat-input { display: flex; gap: var(--s-3); align-items: flex-end; }
.chat-input .textarea { min-height: 44px; max-height: 130px; border-radius: var(--r-lg); resize: none; }

.typing { display: inline-flex; gap: 4px; align-items: center; padding: 0.75rem 1rem; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-4); animation: bounce 1.3s var(--ease) infinite; }
.typing i:nth-child(2) { animation-delay: 0.18s; }
.typing i:nth-child(3) { animation-delay: 0.36s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-5px); opacity: 1; } }

/* --- Payment details card inside the chat -------------------------------- */

.pay-card {
  border: 1.5px solid var(--forest);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--sh-2);
  width: 100%;
  max-width: 430px;
}
.pay-card-head {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-4);
  color: #fff;
}
.pay-card-head strong { font-size: var(--fs-md); }
.pay-card-head span { font-size: var(--fs-xs); opacity: 0.85; display: block; }
.pay-card-body { padding: var(--s-4); display: grid; gap: var(--s-3); }

.pay-row {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding: var(--s-3);
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
}
.pay-row dt { font-size: var(--fs-xs); color: var(--ink-4); text-transform: uppercase; letter-spacing: 0.07em; margin: 0 0 2px; }
.pay-row dd { margin: 0; font-family: var(--font-mono); font-size: var(--fs-md); font-weight: 700; word-break: break-all; }
.pay-row .copy {
  flex: none; padding: 0.35rem 0.7rem;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); font-size: var(--fs-xs); font-weight: 700;
  transition: all var(--dur) var(--ease);
}
.pay-row .copy:hover { border-color: var(--forest); color: var(--forest); }
.pay-row .copy.done { background: var(--good-soft); border-color: var(--good); color: var(--good); }

.pay-amount {
  text-align: center; padding: var(--s-4);
  background: var(--forest-soft); border-radius: var(--r-md);
}
.pay-amount strong { display: block; font-family: var(--font-display); font-size: var(--fs-2xl); line-height: 1; color: var(--forest); }
.pay-amount span { font-size: var(--fs-xs); color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.08em; }

/* A closed offer keeps its details visible for the adopter's own records, but
   is visually retired. Only the ones that must not be paid get struck through. */
.pay-card.is-closed { opacity: 0.8; }
.pay-card.is-bad     { border-color: var(--bad); }
.pay-card.is-neutral { border-color: var(--line); }
.pay-card.is-good    { border-color: var(--good); opacity: 1; }
.pay-card.is-bad .pay-row dd,
.pay-card.is-neutral .pay-row dd { text-decoration: line-through; color: var(--ink-4); }

.expired-stamp {
  padding: var(--s-3) var(--s-4);
  font-size: var(--fs-sm); font-weight: 700; text-align: center;
  background: var(--bad-soft); color: var(--bad);
}
.expired-stamp.stamp-good    { background: var(--good-soft); color: var(--good); }
.expired-stamp.stamp-neutral { background: var(--surface-3); color: var(--ink-3); }

/* --- Receipt upload ------------------------------------------------------ */

.dropzone {
  border: 2px dashed var(--line); border-radius: var(--r-lg);
  padding: var(--s-6) var(--s-5); text-align: center;
  background: var(--surface-2); cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.dropzone:hover, .dropzone.drag { border-color: var(--brass); background: var(--brass-soft); }
.dropzone h4 { margin: var(--s-3) 0 var(--s-1); font-family: var(--font-body); font-size: var(--fs-base); }
.dropzone p { margin: 0; font-size: var(--fs-sm); color: var(--ink-3); }
.dropzone svg { color: var(--ink-4); margin-inline: auto; }

.preview {
  display: flex; gap: var(--s-4); align-items: center;
  padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface);
}
.preview img {
  width: 78px; height: 78px; object-fit: cover;
  border-radius: var(--r-md); border: 1px solid var(--line-soft); flex: none;
}
.preview .file-icon {
  width: 78px; height: 78px; border-radius: var(--r-md); flex: none;
  background: var(--surface-2); display: grid; place-items: center; color: var(--ink-3);
}

.receipt-item {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3); border: 1px solid var(--line-soft); border-radius: var(--r-md);
  background: var(--surface); font-size: var(--fs-sm);
}
.receipt-item img { width: 42px; height: 42px; border-radius: var(--r-sm); object-fit: cover; flex: none; }

/* --- Checkout two-column layout ----------------------------------------- */

@media (max-width: 1040px) {
  .checkout-grid { grid-template-columns: 1fr !important; }
  .checkout-grid > aside { order: -1; }
  .chat { height: min(560px, 70vh); }
}

/* ==========================================================================
   22. Toasts & modal
   ========================================================================== */

.toasts {
  position: fixed; bottom: var(--s-5); right: var(--s-5); z-index: 300;
  display: flex; flex-direction: column; gap: var(--s-3);
  max-width: min(370px, calc(100vw - 2rem));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex; gap: var(--s-3); align-items: flex-start;
  padding: var(--s-4);
  background: var(--ink); color: var(--cream);
  border-radius: var(--r-md); box-shadow: var(--sh-4);
  font-size: var(--fs-sm); line-height: 1.45;
  animation: toast-in 300ms var(--ease-out);
}
.toast.good { background: var(--good); }
.toast.bad  { background: var(--bad); }
.toast.warn { background: var(--warn); }
.toast button { background: none; border: none; color: inherit; opacity: 0.7; padding: 0; margin-left: auto; flex: none; }
.toast button:hover { opacity: 1; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(0.97); } to { opacity: 1; transform: none; } }

.modal-backdrop {
  position: fixed; inset: 0; z-index: 250;
  background: rgba(28, 23, 20, 0.55);
  backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: var(--s-5);
  animation: fade 200ms var(--ease);
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface); border-radius: var(--r-xl);
  box-shadow: var(--sh-4);
  width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto;
  animation: modal-in 250ms var(--ease-out);
}
@keyframes modal-in { from { opacity: 0; transform: translateY(18px) scale(0.97); } to { opacity: 1; transform: none; } }
.modal-head { padding: var(--s-5) var(--s-5) 0; }
.modal-body { padding: var(--s-5); }
.modal-foot { padding: 0 var(--s-5) var(--s-5); display: flex; gap: var(--s-3); justify-content: flex-end; flex-wrap: wrap; }

/* ==========================================================================
   23. Skeletons
   ========================================================================== */

.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--sand-2) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--r-md);
}
@keyframes shimmer { to { background-position: -200% 0; } }
.skeleton-card { height: 330px; border-radius: var(--r-lg); }

/* ==========================================================================
   24. Floating support button
   ========================================================================== */

.support-fab {
  position: fixed; bottom: var(--s-5); right: var(--s-5); z-index: 80;
  display: flex; align-items: center; gap: var(--s-3);
  padding: 0.8rem 1.3rem;
  background: var(--forest); color: #fff;
  border: none; border-radius: var(--r-pill);
  box-shadow: var(--sh-4); font-weight: 600; font-size: var(--fs-sm);
  transition: transform var(--dur) var(--ease-out), background var(--dur) var(--ease);
}
.support-fab:hover { transform: translateY(-2px); background: var(--forest-2); }
.support-fab .dot {
  width: 8px; height: 8px; border-radius: 50%; background: #7ee2a8;
  animation: pulse 1.8s var(--ease) infinite;
}

@media (max-width: 560px) {
  .support-fab { padding: 0.8rem; }
  .support-fab span:not(.dot) { display: none; }
  .toasts { left: var(--s-4); right: var(--s-4); bottom: var(--s-4); max-width: none; }
}

/* ==========================================================================
   25. Utility responsive
   ========================================================================== */

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .field-row, .field-row-3 { grid-template-columns: 1fr; }
  .wrap { padding-inline: var(--s-4); }
  .section { padding-block: var(--s-7); }
  .msg { max-width: 88%; }
}
