/* =========================================================
   Thai Love Animal Foundation — Prototype Design System
   Layout concept: warm editorial — cream pages, deep-brown bands,
   organic "pebble" image corners, case cards styled like vet case tags.
   ========================================================= */
:root {
  /* Brand palette (from brief) */
  --brown-900: #4A3025;   /* Primary deep brown */
  --brown-700: #76533F;   /* Secondary warm brown */
  --terra:     #C58B62;   /* Accent soft terracotta */
  --terra-600: #A96E47;   /* Accent pressed / text-on-cream */
  --cream:     #F8F4ED;   /* Background */
  --cream-2:   #EEE7DC;   /* Secondary background */
  --ink:       #292522;   /* Text */
  --ink-2:     #5E554E;   /* Muted text */
  --olive:     #78815C;   /* Highlight */
  --white:     #FFFFFF;
  --line:      #E2D8C9;
  --urgent:    #B5452F;
  --treat:     #C58B62;
  --recover:   #78815C;
  --done:      #6E6259;
  --shadow: 0 1px 2px rgba(74,48,37,.06), 0 8px 24px rgba(74,48,37,.08);
  --shadow-lg: 0 2px 6px rgba(74,48,37,.08), 0 18px 48px rgba(74,48,37,.16);

  --font: "Plus Jakarta Sans", "Anuphan", "IBM Plex Sans Thai", system-ui, sans-serif;
  --font-th: "Anuphan", "IBM Plex Sans Thai", "Plus Jakarta Sans", system-ui, sans-serif;

  --r-sm: 10px; --r: 18px; --r-lg: 28px;
  --pebble: 32px 32px 32px 120px;
  --wrap: 1200px;
  --gutter-l: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
html[lang="th"] body { font-family: var(--font-th); }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--terra); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

h1, h2, h3, h4 { line-height: 1.25; margin: 0; text-wrap: balance; color: var(--brown-900); letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.section { padding-block: clamp(56px, 8vw, 104px); }
.section.tight { padding-block: clamp(40px, 5vw, 64px); }
.bg-white { background: var(--white); }
.bg-cream2 { background: var(--cream-2); }
.bg-brown { background: var(--brown-900); color: #F3EADF; }
.bg-brown h2, .bg-brown h3 { color: #FFF8EF; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--terra-600);
}
.bg-brown .eyebrow { color: var(--terra); }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }
.sec-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; margin-bottom: 36px; }
.sec-head .lead { max-width: 56ch; color: var(--ink-2); margin-top: 10px; }
.bg-brown .sec-head .lead { color: #D9C9B8; }

/* ---------- Demo badge ---------- */
.demo-tag {
  display: inline-flex; align-items: center; gap: 6px; font-size: .7rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--brown-700);
  background: #F3E6D6; border: 1px dashed var(--terra); border-radius: 999px; padding: 2px 10px;
  white-space: nowrap;
}
.real-tag { color: #4E5639; background: #E7EADB; border-color: var(--olive); }
.demo-bar {
  background: var(--ink); color: #EDE3D6; font-size: .8rem; text-align: center;
  padding: 6px var(--gutter-r) 6px var(--gutter-l);
}
.demo-bar b { color: var(--terra); }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--brown-900); --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--bg); color: var(--fg); border: 2px solid var(--bg);
  border-radius: 999px; padding: 12px 24px; font-weight: 700; font-size: .98rem;
  text-decoration: none; cursor: pointer; line-height: 1.2;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease, color .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(74,48,37,.22); }
.btn:active { transform: translateY(0); }
.btn-terra { --bg: var(--terra); --fg: #fff; }
.btn-terra:hover { --bg: var(--terra-600); }
.btn-ghost { background: transparent; color: var(--brown-900); border-color: var(--brown-900); }
.btn-ghost:hover { background: var(--brown-900); color: #fff; }
.btn-light { --bg: #fff; --fg: var(--brown-900); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn-outline-light:hover { background: #fff; color: var(--brown-900); }
.btn-sm { padding: 8px 16px; font-size: .88rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.link-arrow { font-weight: 700; color: var(--brown-900); text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.link-arrow:hover { color: var(--terra-600); }
.link-arrow span { transition: transform .2s; }
.link-arrow:hover span { transform: translateX(4px); }

/* ---------- Header ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--cream); }
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: rgba(248,244,237,.92); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 6px 20px rgba(74,48,37,.06); }
.nav-row { display: flex; align-items: center; gap: 20px; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.brand img { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: #fff; }
.brand-text { line-height: 1.15; }
.brand-text b { display: block; font-size: 1rem; color: var(--brown-900); font-weight: 800; }
.brand-text small { font-size: .74rem; color: var(--ink-2); }
.main-nav { display: flex; gap: 2px; margin-left: auto; align-items: center; }
.nav-item { position: relative; }
.nav-link {
  display: inline-flex; align-items: center; gap: 4px; padding: 10px 12px; border-radius: 999px;
  font-weight: 600; font-size: .93rem; text-decoration: none; color: var(--ink); background: none; border: 0; cursor: pointer;
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active { color: var(--brown-900); background: var(--cream-2); }
.nav-link.active { box-shadow: inset 0 -2px 0 var(--terra); }
.nav-link .chev { width: 14px; height: 14px; transition: transform .2s; }
.dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 200px; background: #fff;
  border-radius: 14px; box-shadow: var(--shadow-lg); padding: 8px; opacity: 0; visibility: hidden;
  transform: translateY(6px); transition: .18s ease; border: 1px solid var(--line);
}
.nav-item:hover .dropdown, .nav-item:focus-within .dropdown { opacity: 1; visibility: visible; transform: none; }
.nav-item:hover .chev { transform: rotate(180deg); }
.dropdown a { display: block; padding: 9px 12px; border-radius: 8px; text-decoration: none; font-size: .92rem; }
.dropdown a:hover { background: var(--cream); color: var(--brown-900); }
.nav-tools { display: flex; align-items: center; gap: 10px; flex: none; }
.lang-switch { display: inline-flex; background: var(--cream-2); border-radius: 999px; padding: 3px; }
.lang-switch button {
  border: 0; background: none; padding: 6px 11px; border-radius: 999px; font-weight: 700; font-size: .8rem;
  cursor: pointer; color: var(--ink-2);
}
.lang-switch button[aria-pressed="true"] { background: var(--brown-900); color: #fff; }
.burger { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; align-items: center; justify-content: center; }
.burger svg { width: 22px; height: 22px; }

.mobile-nav {
  position: fixed; inset: 0; z-index: 80; background: rgba(41,37,34,.45); opacity: 0; visibility: hidden; transition: .25s;
}
.mobile-nav.open { opacity: 1; visibility: visible; }
.mobile-panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(380px, 88vw); background: var(--cream);
  padding: calc(18px + env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) 24px 20px;
  transform: translateX(100%); transition: transform .3s ease; overflow-y: auto; display: flex; flex-direction: column; gap: 6px;
}
.mobile-nav.open .mobile-panel { transform: none; }
.mobile-panel .m-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.mobile-panel a.m-link { display: block; padding: 12px 6px; font-weight: 700; text-decoration: none; border-bottom: 1px solid var(--line); color: var(--brown-900); }
.mobile-panel .m-sub { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0 12px; border-bottom: 1px solid var(--line); }
.mobile-panel .m-sub a { font-size: .85rem; padding: 6px 12px; background: #fff; border-radius: 999px; text-decoration: none; border: 1px solid var(--line); }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: .85rem; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.breadcrumb a { text-decoration: none; color: var(--brown-700); font-weight: 600; }
.breadcrumb a:hover { color: var(--terra-600); }
.breadcrumb .sep { opacity: .5; }
.page-hero .breadcrumb { color: #D9C9B8; }
.page-hero .breadcrumb a { color: #fff; }

/* ---------- Home hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background: #0c0907;
}
.hero-img { position: absolute; inset: 0; background-size: cover; background-position: 75% 40%; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(20,13,9,.96) 0%, rgba(40,26,19,.82) 38%, rgba(74,48,37,.15) 75%, rgba(0,0,0,0) 100%);
}
.hero-inner { position: relative; z-index: 2; padding-block: clamp(72px, 10vw, 140px) clamp(96px, 11vw, 150px); max-width: var(--wrap); margin: 0 auto; }
.hero h1 { color: #fff; max-width: 15ch; font-size: clamp(2.1rem, 5vw, 3.9rem); }
.hero h1 em { font-style: normal; color: var(--terra); }
.hero p.sub { max-width: 48ch; margin-top: 20px; font-size: 1.08rem; color: #E8DCCD; }
.hero .cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-note { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: .86rem; color: #CDBBA8; }
.hero-note span { display: inline-flex; gap: 8px; align-items: center; }
.hero-note svg { width: 16px; height: 16px; color: var(--terra); }

/* Impact strip overlapping hero */
.impact { position: relative; z-index: 3; margin-top: -64px; }
.impact-card {
  background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  display: grid; grid-template-columns: 1.15fr 2fr; overflow: hidden;
}
.impact-quote { background: var(--terra); color: #fff; padding: 32px; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.impact-quote .big { font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 800; line-height: 1.3; text-wrap: balance; }
.impact-quote .big b { font-size: 1.4em; display: inline-block; }
.impact-quote small { opacity: .9; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 26px 22px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.stat:first-child { border-left: 0; }
.stat .n { font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 800; color: var(--brown-900); font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat .l { font-size: .86rem; color: var(--ink-2); line-height: 1.4; }
.stat svg { width: 26px; height: 26px; color: var(--terra); margin-bottom: 6px; }
.stats-foot { grid-column: 1 / -1; border-top: 1px solid var(--line); padding: 10px 22px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .78rem; color: var(--ink-2); }

/* ---------- Case cards ---------- */
.grid { display: grid; gap: 24px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }

.card {
  background: #fff; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line);
  display: flex; flex-direction: column; transition: transform .25s ease, box-shadow .25s ease; min-width: 0;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card-media { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--cream-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover .card-media img { transform: scale(1.06); }
.card-media .badges { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; gap: 8px; align-items: start; }
.case-no {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: .74rem; font-weight: 700;
  background: rgba(255,255,255,.94); color: var(--brown-900); padding: 4px 9px; border-radius: 6px; letter-spacing: .04em;
  border: 1px solid rgba(74,48,37,.12);
}
.status { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; color: #fff; white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 2px rgba(255,255,255,.4); }
.status.urgent { background: var(--urgent); }
.status.urgent::before { animation: pulse 1.6s infinite; }
.status.treatment { background: var(--brown-700); }
.status.recovering { background: var(--olive); }
.status.completed { background: var(--done); }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .3 } }

.card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-title { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.card-title h3 { font-size: 1.15rem; }
.card-title h3 a { text-decoration: none; }
.card-title h3 a:hover { color: var(--terra-600); }
.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .82rem; color: var(--ink-2); }
.meta span { display: inline-flex; align-items: center; gap: 5px; }
.meta svg { width: 14px; height: 14px; color: var(--terra-600); flex: none; }
.card-desc { font-size: .9rem; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 6px; }
.card-actions .btn { flex: 1; padding-inline: 12px; }

/* Progress */
.progress-wrap { display: flex; flex-direction: column; gap: 6px; }
.progress-nums { display: flex; justify-content: space-between; align-items: baseline; font-size: .82rem; color: var(--ink-2); gap: 8px; }
.progress-nums b { color: var(--brown-900); font-size: 1rem; font-variant-numeric: tabular-nums; }
.progress { height: 10px; background: var(--cream-2); border-radius: 999px; overflow: hidden; position: relative; }
.progress > i {
  position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--terra) 0%, var(--brown-700) 100%);
  transition: width 1.4s cubic-bezier(.2,.8,.2,1);
}
.progress.full > i { background: linear-gradient(90deg, #98A177, var(--olive)); }
.progress-pct { font-weight: 700; color: var(--terra-600); font-variant-numeric: tabular-nums; }

/* ---------- Categories ---------- */
.cat-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 20px; }
.cat {
  position: relative; border-radius: var(--r-lg); overflow: hidden; min-height: 300px; color: #fff; text-decoration: none;
  display: flex; align-items: flex-end; background: var(--brown-700);
}
.cat img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease; }
.cat:hover img { transform: scale(1.07); }
.cat::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(41,26,19,.85) 100%); }
.cat-body { position: relative; z-index: 2; padding: 24px; width: 100%; display: flex; justify-content: space-between; align-items: end; gap: 12px; }
.cat-body h3 { color: #fff; font-size: 1.5rem; }
.cat-body small { color: #EADBC9; }
.cat-go { width: 46px; height: 46px; border-radius: 50%; background: #fff; color: var(--brown-900); display: grid; place-items: center; flex: none; transition: transform .25s; }
.cat:hover .cat-go { transform: rotate(-45deg); }
.cat.other { background: radial-gradient(circle at 30% 20%, #8C6A52, var(--brown-900)); }
.cat.other .paw-art { position: absolute; right: -20px; top: -10px; width: 220px; opacity: .14; color: #fff; }

/* ---------- Help ways ---------- */
.help-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.help {
  background: #fff; border-radius: var(--r-lg); padding: 30px; display: flex; flex-direction: column; gap: 14px;
  border: 1px solid var(--line); transition: transform .25s, box-shadow .25s;
}
.help:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.help .ico { width: 60px; height: 60px; border-radius: 20px 20px 20px 6px; display: grid; place-items: center; background: var(--cream-2); color: var(--brown-900); }
.help .ico svg { width: 30px; height: 30px; }
.help:nth-child(1) .ico { background: var(--terra); color: #fff; }
.help:nth-child(3) .ico { background: var(--olive); color: #fff; }
.help p { color: var(--ink-2); flex: 1; }

/* ---------- Stories ---------- */
.story-feature { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.story-photos { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.story-photos figure { margin: 0; position: relative; }
.story-photos img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: var(--r); }
.story-photos figure:first-child img { border-radius: 24px 24px 24px 90px; }
.story-photos figure:last-child { margin-top: 40px; }
.story-photos figure:last-child img { border-radius: 24px 90px 24px 24px; }
.story-photos figcaption { position: absolute; left: 12px; bottom: 12px; background: rgba(255,255,255,.95); color: var(--brown-900); font-weight: 700; font-size: .78rem; padding: 4px 10px; border-radius: 999px; }
.story-text { display: flex; flex-direction: column; gap: 16px; }
.story-text blockquote { margin: 0; padding-left: 18px; border-left: 3px solid var(--terra); color: var(--ink-2); font-size: 1.05rem; }
.mini-stories { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }

/* ---------- Adoption cards ---------- */
.pet-card { background: #fff; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; min-width: 0; }
.pet-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.pet-media { position: relative; aspect-ratio: 1/1; overflow: hidden; background: var(--cream-2); }
.pet-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.pet-card:hover .pet-media img { transform: scale(1.06); }
.pet-media .badges { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; }
.pet-status { font-size: .74rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #fff; color: var(--brown-900); }
.pet-status.available { background: var(--olive); color: #fff; }
.pet-status.pending { background: var(--terra); color: #fff; }
.pet-status.adopted { background: var(--done); color: #fff; }
.pet-body { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pet-body h3 { font-size: 1.25rem; display: flex; align-items: center; gap: 8px; }
.sex { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-size: .85rem; font-weight: 800; }
.sex.m { background: #E6EBF0; color: #3E5770; }
.sex.f { background: #F6E3DC; color: #9A4B33; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: .78rem; padding: 3px 10px; border-radius: 999px; background: var(--cream); border: 1px solid var(--line); color: var(--ink-2); }
.chip.ok { background: #EEF0E5; border-color: #CDD3B8; color: #4E5639; }

/* ---------- Donor slider ---------- */
.donors { overflow: hidden; position: relative; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.donor-track { display: flex; gap: 14px; width: max-content; animation: marquee var(--dur, 40s) linear infinite; }
.donors:hover .donor-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0) } to { transform: translateX(-50%) } }
.donor {
  display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px; padding: 8px 18px 8px 8px; white-space: nowrap; color: #F3EADF;
}
.donor .av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--terra); color: #fff; font-weight: 800; }
.donor.anon .av { background: var(--brown-700); }
.donor b { color: #fff; }
.donor .amt { color: var(--terra); font-weight: 800; font-variant-numeric: tabular-nums; }
.donor .tag { font-size: .66rem; padding: 1px 7px; border-radius: 999px; border: 1px dashed rgba(255,255,255,.4); color: #CDBBA8; }
.donor.new { border-color: var(--terra); background: rgba(197,139,98,.18); }
.donor.new .tag { border-style: solid; border-color: var(--terra); color: #fff; background: var(--terra); }
.donor-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }

/* ---------- Social ---------- */
.social-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.social {
  display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--r); background: #fff; border: 1px solid var(--line);
  text-decoration: none; transition: transform .2s, box-shadow .2s;
}
.social:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.social .s-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #fff; flex: none; }
.social .s-ico svg { width: 24px; height: 24px; }
.social b { display: block; color: var(--brown-900); }
.social small { color: var(--ink-2); font-size: .8rem; word-break: break-all; }
.social.disabled { opacity: .75; cursor: not-allowed; border-style: dashed; }
.s-fb { background: #3D5A98; } .s-ig { background: #B5527A; } .s-tt { background: #222; } .s-line { background: #3B9A4A; }

/* ---------- Footer ---------- */
.site-footer { background: #2E1F18; color: #D7C8B8; padding-block: 64px 24px; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 36px; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.site-footer a { text-decoration: none; color: #D7C8B8; }
.site-footer a:hover { color: var(--terra); }
.f-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.f-brand { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.f-brand img { width: 64px; height: 64px; border-radius: 50%; background: #fff; }
.f-brand b { color: #fff; font-size: 1.05rem; display: block; }
.bank-box { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: var(--r); padding: 16px; display: grid; gap: 6px; }
.bank-box .acc { font-size: 1.3rem; font-weight: 800; color: #fff; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.f-social { display: flex; gap: 8px; margin-top: 14px; }
.f-social a { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.08); }
.f-social a:hover { background: var(--terra); color: #fff; }
.f-social svg { width: 18px; height: 18px; }
.f-bottom { margin-top: 44px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .8rem; color: #A99887; }

/* ---------- Floating CTA ---------- */
.fab {
  position: fixed; right: calc(20px + env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 45;
  display: inline-flex; align-items: center; gap: 10px; background: var(--terra); color: #fff; border: 0; cursor: pointer;
  padding: 14px 20px 14px 16px; border-radius: 999px; font-weight: 800; box-shadow: 0 10px 30px rgba(74,48,37,.35);
  transition: transform .25s, opacity .25s;
}
.fab:hover { transform: translateY(-3px) scale(1.02); background: var(--terra-600); }
.fab svg { width: 22px; height: 22px; }
.fab.hide { opacity: 0; pointer-events: none; transform: translateY(20px); }

/* ---------- Page hero (inner) ---------- */
.page-hero { background: var(--brown-900); color: #EADBC9; position: relative; overflow: hidden; }
.page-hero .wrap { position: relative; z-index: 2; padding-block: 48px 56px; display: flex; flex-direction: column; gap: 14px; }
.page-hero h1 { color: #fff; font-size: clamp(1.9rem, 4vw, 3rem); }
.page-hero p { max-width: 60ch; color: #E2D3C2; }
.page-hero .paw-bg { position: absolute; right: -40px; bottom: -60px; width: 340px; color: rgba(255,255,255,.05); }
.page-hero.with-img { background: #1d130e; }
.page-hero.with-img .ph-img { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .45; }
.page-hero.with-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(46,31,24,.95), rgba(46,31,24,.5)); }

/* ---------- Toolbar / filters ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: .88rem; cursor: pointer; transition: .15s;
}
.seg button:hover { border-color: var(--terra); }
.seg button[aria-pressed="true"] { background: var(--brown-900); color: #fff; border-color: var(--brown-900); }
.seg button .cnt { opacity: .6; font-size: .8em; margin-left: 4px; }
.search { position: relative; flex: 1 1 260px; max-width: 360px; }
.search input { width: 100%; padding: 11px 16px 11px 42px; border-radius: 999px; border: 1px solid var(--line); background: #fff; }
.search input:focus { outline: none; border-color: var(--terra); box-shadow: 0 0 0 4px rgba(197,139,98,.2); }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-2); }
.filter-row { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; margin-bottom: 14px; }
.filter-row label.fl { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); min-width: 80px; }
.select { padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: .88rem; }
.result-count { font-size: .88rem; color: var(--ink-2); margin-bottom: 18px; }

.empty, .loading-state {
  text-align: center; padding: 60px 20px; border: 2px dashed var(--line); border-radius: var(--r-lg); background: #fff;
  display: flex; flex-direction: column; align-items: center; gap: 12px; grid-column: 1 / -1;
}
.empty svg { width: 64px; height: 64px; color: var(--terra); opacity: .7; }
.empty p { color: var(--ink-2); max-width: 40ch; }
.skeleton { background: linear-gradient(90deg, var(--cream-2) 25%, #F6F0E6 50%, var(--cream-2) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--r); }
@keyframes shimmer { from { background-position: 200% 0 } to { background-position: -200% 0 } }
.load-more { display: flex; justify-content: center; margin-top: 36px; }

/* ---------- Case detail ---------- */
.detail-hero { position: relative; background: #1d130e; }
.detail-cover { position: relative; height: clamp(280px, 46vw, 520px); overflow: hidden; }
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,0) 30%, rgba(29,19,14,.92) 100%); }
.detail-head { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; color: #fff; }
.detail-head .wrap { padding-block: 0 36px; display: flex; flex-direction: column; gap: 12px; }
.detail-head h1 { color: #fff; }
.detail-head .meta { color: #E5D6C5; }
.detail-head .meta svg { color: var(--terra); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; align-items: start; }
.panel { background: #fff; border-radius: var(--r-lg); border: 1px solid var(--line); padding: 28px; }
.panel + .panel { margin-top: 24px; }
.panel h2 { font-size: 1.4rem; margin-bottom: 16px; }
.fact-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0; border-top: 1px solid var(--line); }
.fact-list div { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; padding-right: 12px; }
.fact-list dt { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); font-weight: 700; }
.fact-list dd { margin: 0; font-weight: 600; color: var(--brown-900); }

.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: var(--cream-2); }
.timeline li { position: relative; padding: 0 0 22px 42px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline .dot { position: absolute; left: 3px; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--terra); }
.timeline li:last-child .dot { background: var(--olive); border-color: var(--olive); }
.timeline time { font-family: ui-monospace, Menlo, monospace; font-size: .8rem; font-weight: 700; color: var(--terra-600); display: block; }
.timeline p { color: var(--ink); }
.timeline .day { font-size: .72rem; color: var(--ink-2); margin-left: 8px; font-family: var(--font); font-weight: 600; }

.ba { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ba figure { margin: 0; position: relative; border-radius: var(--r); overflow: hidden; }
.ba img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.ba figcaption { position: absolute; top: 12px; left: 12px; font-weight: 800; font-size: .78rem; padding: 4px 12px; border-radius: 999px; color: #fff; background: var(--urgent); }
.ba figure:last-child figcaption { background: var(--olive); }

.gallery { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.gallery button { border: 0; padding: 0; background: var(--cream-2); border-radius: 12px; overflow: hidden; cursor: zoom-in; aspect-ratio: 1/1; position: relative; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery button:hover img { transform: scale(1.08); }
.gallery .sensitive img { filter: blur(14px) saturate(.6); }
.gallery .sensitive::after { content: attr(data-label); position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: .74rem; font-weight: 700; text-align: center; padding: 8px; background: rgba(41,26,19,.35); }
.gallery .sensitive.revealed img { filter: none; }
.gallery .sensitive.revealed::after { display: none; }

.cost-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.cost-table td { padding: 10px 0; border-bottom: 1px solid var(--line); }
.cost-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.cost-table tr.total td { border-bottom: 0; font-weight: 800; color: var(--brown-900); font-size: 1.05rem; padding-top: 14px; }

.donate-box { position: sticky; top: 100px; }
.donate-box .raised { font-size: 2rem; font-weight: 800; color: var(--brown-900); font-variant-numeric: tabular-nums; line-height: 1.1; }
.donate-box .goal { color: var(--ink-2); font-size: .9rem; }
.donate-box .stack { display: grid; gap: 10px; margin-top: 18px; }
.donor-mini { display: grid; gap: 8px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .86rem; }
.donor-mini div { display: flex; justify-content: space-between; gap: 8px; }
.closed-note { background: #EEF0E5; border: 1px solid #CDD3B8; color: #4E5639; border-radius: 12px; padding: 12px 14px; font-size: .88rem; margin-top: 14px; }

/* ---------- Animal profile ---------- */
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.pf-gallery .main { border-radius: var(--pebble); overflow: hidden; aspect-ratio: 1/1; background: var(--cream-2); }
.pf-gallery .main img { width: 100%; height: 100%; object-fit: cover; }
.pf-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.pf-thumbs button { border: 2px solid transparent; padding: 0; border-radius: 12px; overflow: hidden; cursor: pointer; aspect-ratio: 1/1; background: var(--cream-2); }
.pf-thumbs button[aria-pressed="true"] { border-color: var(--terra); }
.pf-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pf-thumbs .ph { display: grid; place-items: center; color: var(--ink-2); font-size: .68rem; text-align: center; padding: 6px; border: 2px dashed var(--line); cursor: default; }
.trait-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin: 20px 0; }
.trait { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.trait small { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); font-weight: 700; }
.trait b { color: var(--brown-900); }
.health-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.health-list li { display: flex; gap: 12px; align-items: flex-start; }
.health-list .hk { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; background: #EEF0E5; color: var(--olive); }
.health-list .hk.no { background: #F6E3DC; color: var(--urgent); }
.health-list .hk svg { width: 16px; height: 16px; }
.health-list small { display: block; color: var(--ink-2); font-size: .8rem; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .field .lbl { font-weight: 700; font-size: .88rem; color: var(--brown-900); }
.field label .opt { font-weight: 500; color: var(--ink-2); font-size: .8rem; }
.field label .req { color: var(--urgent); }
.input, .field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="number"], .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--terra); box-shadow: 0 0 0 4px rgba(197,139,98,.18); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--urgent); background: #FFF8F6; }
.field .err { color: var(--urgent); font-size: .8rem; display: none; }
.field.invalid .err { display: block; }
.radio-group { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-group label { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; font-weight: 600; font-size: .88rem; background: #fff; }
.radio-group input { accent-color: var(--brown-900); }
.radio-group label:has(input:checked) { border-color: var(--brown-900); background: var(--cream); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--brown-900); margin-top: 3px; flex: none; }
.field.invalid .check { color: var(--urgent); }
.upload {
  border: 2px dashed var(--line); border-radius: 14px; padding: 20px; text-align: center; cursor: pointer; background: var(--cream);
  display: flex; flex-direction: column; align-items: center; gap: 6px; transition: .15s; position: relative;
}
.upload:hover, .upload.drag { border-color: var(--terra); background: #FBF3EA; }
.upload svg { width: 30px; height: 30px; color: var(--terra-600); }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload small { color: var(--ink-2); }
.upload-preview { display: flex; align-items: center; gap: 12px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.upload-preview img { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; }
.upload-preview .fn { flex: 1; min-width: 0; font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-preview button { border: 0; background: var(--cream-2); border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: .8rem; }
.form-note { font-size: .82rem; color: var(--ink-2); display: flex; gap: 8px; align-items: flex-start; }
.form-note svg { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--olive); }
.form-error-banner { background: #FBEAE5; color: var(--urgent); border: 1px solid #EBC3B8; padding: 12px 14px; border-radius: 12px; font-size: .9rem; font-weight: 600; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; visibility: hidden; opacity: 0; transition: .2s; }
.modal.open { visibility: visible; opacity: 1; }
.modal-bg { position: absolute; inset: 0; background: rgba(29,19,14,.6); backdrop-filter: blur(3px); }
.modal-card {
  position: relative; background: var(--cream); width: min(640px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto;
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg); transform: translateY(20px) scale(.98); transition: transform .25s ease;
}
.modal.open .modal-card { transform: none; }
.modal-top { position: sticky; top: 0; z-index: 3; background: var(--cream); padding: 20px 24px 14px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.modal-top h2 { font-size: 1.3rem; }
.modal-top small { color: var(--ink-2); }
.x-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; display: grid; place-items: center; flex: none; }
.x-btn svg { width: 18px; height: 18px; }
.modal-body { padding: 22px 24px 26px; }
.steps { display: flex; gap: 6px; margin-top: 12px; }
.steps span { flex: 1; height: 4px; border-radius: 4px; background: var(--cream-2); transition: background .3s; }
.steps span.on { background: var(--terra); }
.step-label { font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--terra-600); }

.amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.amt-btn {
  border: 2px solid var(--line); background: #fff; border-radius: 14px; padding: 14px 8px; cursor: pointer; font-weight: 800; font-size: 1.15rem; color: var(--brown-900);
  font-variant-numeric: tabular-nums; transition: .15s; display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.amt-btn small { font-size: .7rem; font-weight: 600; color: var(--ink-2); }
.amt-btn:hover { border-color: var(--terra); }
.amt-btn[aria-pressed="true"] { border-color: var(--brown-900); background: var(--brown-900); color: #fff; }
.amt-btn[aria-pressed="true"] small { color: #E5D6C5; }
.custom-amt { position: relative; }
.custom-amt input { padding-right: 50px !important; font-weight: 700; font-size: 1.1rem; }
.custom-amt span { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--ink-2); font-weight: 700; }
.impact-hint { background: #fff; border-radius: 12px; padding: 12px 14px; font-size: .9rem; display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); }
.impact-hint svg { width: 22px; height: 22px; color: var(--terra); flex: none; }
.target-opts { display: grid; gap: 10px; }
.target-opt { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 2px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; }
.target-opt:has(input:checked) { border-color: var(--brown-900); }
.target-opt input { accent-color: var(--brown-900); width: 18px; height: 18px; }
.target-opt b { display: block; color: var(--brown-900); }
.target-opt small { color: var(--ink-2); }

.bank-card { background: var(--brown-900); color: #EADBC9; border-radius: var(--r); padding: 20px; display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; }
.bank-id { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.bank-logo { width: 40px; height: 40px; border-radius: 12px; background: #2E8B57; display: grid; place-items: center; color: #fff; }
.bank-logo svg { width: 22px; height: 22px; }
.bank-card .acc-no { font-size: 1.6rem; font-weight: 800; color: #fff; letter-spacing: .03em; font-variant-numeric: tabular-nums; }
.bank-card small { color: #CDBBA8; display: block; }
.copy-btn { margin-top: 12px; }
.copy-btn.copied { --bg: var(--olive); background: var(--olive); border-color: var(--olive); }
.qr-ph {
  width: 150px; aspect-ratio: 1/1; border-radius: 14px; background: #fff; display: grid; place-items: center; text-align: center;
  color: var(--ink-2); font-size: .7rem; font-weight: 700; padding: 12px; position: relative; border: 2px dashed var(--terra);
}
.qr-ph svg { width: 54px; height: 54px; color: var(--brown-700); margin: 0 auto 6px; opacity: .55; }
.qr-ph.real { border: 0; padding: 6px; }
.qr-ph.real img { width: 100%; height: 100%; object-fit: cover; object-position: center 38%; border-radius: 8px; }
.how-to { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.how-to li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; font-size: .92rem; }
.how-to li::before { content: counter(s); width: 26px; height: 26px; border-radius: 50%; background: var(--cream-2); color: var(--brown-900); font-weight: 800; display: grid; place-items: center; flex: none; font-size: .8rem; }
.summary-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; flex-wrap: wrap; }
.summary-bar b { font-size: 1.2rem; color: var(--brown-900); font-variant-numeric: tabular-nums; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions .btn { flex: 1; }

.success { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 10px 0; }
.success-ico { width: 84px; height: 84px; border-radius: 50%; background: var(--olive); color: #fff; display: grid; place-items: center; animation: pop .5s cubic-bezier(.2,1.4,.4,1); }
.success-ico svg { width: 42px; height: 42px; }
@keyframes pop { from { transform: scale(.3); opacity: 0 } to { transform: none; opacity: 1 } }
.receipt { width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 6px 18px; text-align: left; }
.receipt div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.receipt div:last-child { border-bottom: 0; }
.receipt span { color: var(--ink-2); }
.receipt b { color: var(--brown-900); text-align: right; }
.email-sim { width: 100%; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; font-size: .85rem; }
.email-sim .eh { background: var(--cream-2); padding: 10px 14px; display: grid; gap: 2px; }
.email-sim .eb { padding: 12px 14px; color: var(--ink-2); max-height: 160px; overflow: auto; white-space: pre-line; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 95; background: rgba(15,10,7,.92); display: grid; place-items: center; padding: 20px; visibility: hidden; opacity: 0; transition: .2s; }
.lightbox.open { visibility: visible; opacity: 1; }
.lightbox img { max-height: 86vh; max-width: 100%; border-radius: 12px; }
.lightbox .x-btn { position: absolute; top: calc(16px + env(safe-area-inset-top, 0px)); right: calc(16px + env(safe-area-inset-right, 0px)); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 30px); z-index: 99; background: var(--ink); color: #fff;
  padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: .92rem; opacity: 0; transition: .25s; pointer-events: none; display: flex; gap: 10px; align-items: center;
  max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast svg { width: 18px; height: 18px; color: #A9B386; flex: none; }

/* ---------- About ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.split .pebble { border-radius: var(--pebble); overflow: hidden; }
.split .pebble img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.prose { display: grid; gap: 14px; color: var(--ink); }
.prose p { max-width: 62ch; }
.mv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.mv { padding: 32px; border-radius: var(--r-lg); }
.mv.m { background: var(--terra); color: #fff; }
.mv.v { background: var(--brown-900); color: #EADBC9; }
.mv h3 { color: #fff; font-size: 1.5rem; margin: 10px 0; }
.mv .eyebrow { color: #fff; opacity: .85; }
.do-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.do { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 22px; display: flex; gap: 14px; align-items: flex-start; }
.do .ico { width: 46px; height: 46px; border-radius: 14px; background: var(--cream-2); display: grid; place-items: center; color: var(--brown-900); flex: none; }
.do .ico svg { width: 24px; height: 24px; }
.do p { color: var(--ink-2); font-size: .9rem; }
.process { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; counter-reset: p; }
.process li { list-style: none; position: relative; padding: 0 14px 0 0; counter-increment: p; }
.process li::before { content: counter(p, decimal-leading-zero); display: block; font-weight: 800; font-size: 2rem; color: var(--terra); line-height: 1; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.process li::after { content: ""; position: absolute; top: 16px; left: 56px; right: 18px; height: 2px; background: rgba(255,255,255,.15); }
.process li:last-child::after { display: none; }
.process h3 { font-size: 1.05rem; margin-bottom: 6px; }
.process p { font-size: .88rem; color: #D9C9B8; }
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.team { text-align: left; }
.team .ph { aspect-ratio: 4/5; border-radius: var(--r); overflow: hidden; background: var(--cream-2); display: grid; place-items: center; color: var(--ink-2); font-size: .8rem; text-align: center; border: 2px dashed var(--line); }
.team .ph img { width: 100%; height: 100%; object-fit: cover; }
.team .ph.has { border: 0; }
.team b { display: block; margin-top: 12px; color: var(--brown-900); }
.team small { color: var(--ink-2); }
.cta-band { border-radius: var(--r-lg); background: var(--terra); color: #fff; padding: clamp(28px, 5vw, 56px); display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; position: relative; overflow: hidden; }
.cta-band h2 { color: #fff; max-width: 20ch; }
.cta-band p { color: #FCEFE4; margin-top: 8px; max-width: 50ch; }
.cta-band .paw-art { position: absolute; right: 10%; top: -40px; width: 200px; color: rgba(255,255,255,.12); }
.cta-band .btns { display: flex; gap: 10px; flex-wrap: wrap; position: relative; }

/* ---------- Supplies ---------- */
.supply { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 22px; display: flex; flex-direction: column; gap: 12px; transition: transform .2s, box-shadow .2s; }
.supply:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.supply .s-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.supply .art { width: 64px; height: 64px; border-radius: 18px; background: var(--cream); display: grid; place-items: center; color: var(--brown-700); }
.supply .art svg { width: 34px; height: 34px; }
.need { font-size: .72rem; font-weight: 800; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.need.high { background: #F6E3DC; color: var(--urgent); }
.need.mid { background: #F5EADD; color: var(--terra-600); }
.need.low { background: #EEF0E5; color: #4E5639; }
.supply p { color: var(--ink-2); font-size: .9rem; }
.supply .qty { font-size: .85rem; display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 10px; }
.deliver { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.deliver > div { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: var(--r); padding: 22px; }
.deliver b { color: #fff; display: block; margin: 8px 0 4px; }
.deliver p { color: #D9C9B8; font-size: .9rem; }
.deliver svg { width: 28px; height: 28px; color: var(--terra); }

/* ---------- News ---------- */
.news-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; min-width: 0; }
.news-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.news-card .nm { aspect-ratio: 16/10; overflow: hidden; background: var(--cream-2); }
.news-card .nm img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.news-card:hover .nm img { transform: scale(1.06); }
.news-card .nb { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.news-card .nb .row { display: flex; justify-content: space-between; gap: 8px; font-size: .8rem; color: var(--ink-2); align-items: center; }
.cat-pill { font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--cream-2); color: var(--brown-900); }
.news-card h3 { font-size: 1.08rem; }
.news-card p { font-size: .9rem; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-feature { display: grid; grid-template-columns: 1.3fr 1fr; background: #fff; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); margin-bottom: 32px; }
.news-feature .nm img { width: 100%; height: 100%; object-fit: cover; min-height: 300px; }
.news-feature .nb { padding: clamp(24px, 4vw, 40px); display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.article { max-width: 760px; margin: 0 auto; }
.article .cover { border-radius: var(--r-lg); overflow: hidden; margin: 24px 0; }
.article .cover img { width: 100%; max-height: 460px; object-fit: cover; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 32px; align-items: start; }
.c-list { display: grid; gap: 12px; }
.c-item { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.c-item .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--cream-2); color: var(--brown-900); display: grid; place-items: center; flex: none; }
.c-item .ico svg { width: 22px; height: 22px; }
.c-item small { display: block; color: var(--ink-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.c-item b, .c-item a { color: var(--brown-900); font-weight: 700; word-break: break-word; }
.c-item .mini { margin-top: 6px; }
.map-ph { border-radius: var(--r-lg); overflow: hidden; position: relative; min-height: 280px; background:
  repeating-linear-gradient(0deg, transparent 0 38px, rgba(118,83,63,.08) 38px 40px),
  repeating-linear-gradient(90deg, transparent 0 38px, rgba(118,83,63,.08) 38px 40px), var(--cream-2);
  display: grid; place-items: center; text-align: center; padding: 24px; border: 1px solid var(--line); }
.map-ph .pin { width: 56px; height: 56px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--terra); display: grid; place-items: center; margin: 0 auto 14px; box-shadow: var(--shadow); }
.map-ph .pin svg { transform: rotate(45deg); width: 26px; height: 26px; color: #fff; }
.hours-ph { border: 2px dashed var(--line); border-radius: var(--r); padding: 16px; color: var(--ink-2); font-size: .9rem; background: #fff; }

/* ---------- Demo data page ---------- */
.data-table { width: 100%; border-collapse: collapse; font-size: .88rem; background: #fff; border-radius: 12px; overflow: hidden; }
.data-table th, .data-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.data-table th { background: var(--cream-2); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--brown-900); }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }

/* ---------- Reveal ---------- */
.reveal { opacity: 1; transform: none; }
.js-anim .reveal.pre { opacity: 0; transform: translateY(22px); }
.js-anim .reveal { transition: opacity .7s ease, transform .7s ease; }
.page-enter { animation: pageIn .45s ease both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .main-nav .nav-link { padding: 10px 9px; font-size: .88rem; }
  .brand-text small { display: none; }
}
@media (max-width: 1080px) {
  .main-nav { display: none; }
  .burger { display: inline-flex; }
  .nav-tools { margin-left: auto; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .detail-grid { grid-template-columns: 1fr; }
  .donate-box { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .impact-card { grid-template-columns: 1fr; }
  .process { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .process li::after { display: none; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .grid-3, .help-grid, .mini-stories, .do-grid, .deliver { grid-template-columns: 1fr 1fr; }
  .cat-grid { grid-template-columns: 1fr 1fr; }
  .cat-grid .cat:first-child { grid-column: 1 / -1; }
  .story-feature, .split, .profile-grid, .contact-grid, .news-feature, .mv-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .social-grid { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 600px) {
  .nav-row { height: 66px; gap: 10px; }
  .brand img { width: 42px; height: 42px; }
  .brand-text b { font-size: .9rem; }
  .nav-tools .btn-donate-h { display: none; }
  .grid-4, .grid-3, .grid-2, .help-grid, .mini-stories, .do-grid, .deliver, .team-grid, .cat-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .fact-list { grid-template-columns: 1fr; }
  .trait-grid { grid-template-columns: 1fr 1fr; }
  .social-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .amounts { grid-template-columns: repeat(3, 1fr); }
  .bank-card { grid-template-columns: 1fr; }
  .qr-ph { width: 100%; max-width: 220px; margin: 0 auto; }
  .modal { padding: 0; align-items: end; }
  .modal-card { border-radius: 24px 24px 0 0; max-height: 94vh; max-height: 94dvh; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .fab span.lbl { display: none; }
  .fab { padding: 16px; }
  .panel { padding: 20px; }
  .card-actions { flex-direction: column; }
  .story-photos figure:last-child { margin-top: 24px; }
  .hero::after { background: linear-gradient(180deg, rgba(20,13,9,.55) 0%, rgba(30,20,14,.9) 60%, rgba(30,20,14,.97) 100%); }
  .hero-img { background-position: 80% 30%; }
  .process { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .donor-track { animation: none; flex-wrap: wrap; width: auto; }
}

/* ---- fixes ---- */
.stats-foot { align-items: center; }
.stats-foot svg { width: 14px; height: 14px; display: inline; vertical-align: -2px; color: var(--terra-600); margin: 0; }
.pf-thumbs > * { min-width: 0; }
.pf-thumbs .ph svg { width: 22px; height: 22px; opacity: .6; }
.grid > *, .help-grid > *, .cat-grid > *, .mini-stories > * { min-width: 0; }
.closed-note svg { width: 16px; height: 16px; display: inline; vertical-align: -3px; margin-right: 4px; }
.qr-ph > div { display: flex; flex-direction: column; align-items: center; white-space: pre-line; }
.qr-ph svg { display: block; }
.pet-body .card-actions .btn { padding-inline: 10px; font-size: .84rem; white-space: nowrap; }
.pet-body .card-actions .btn svg { display: none; }

/* ---- Real QR payment card ---- */
.pay-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.qr-box { background: #fff; padding: 16px; border-radius: 16px; box-shadow: 0 0 0 1px var(--line), var(--shadow); width: 100%; max-width: 300px; }
.qr-img { display: block; width: 100%; height: auto; aspect-ratio: 1074 / 1561; image-rendering: auto; }
.qr-cap { font-size: .86rem; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; }
.qr-cap svg { width: 16px; height: 16px; color: var(--terra-600); }
.flip { transform: rotate(180deg); }
.acc-info { width: 100%; margin: 6px 0 0; border-top: 1px solid var(--line); text-align: left; }
.acc-info div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.acc-info dt { font-size: .82rem; color: var(--ink-2); flex: none; }
.acc-info dd { margin: 0; font-weight: 700; color: var(--brown-900); text-align: right; display: inline-flex; align-items: center; gap: 8px; }
.acc-info .acc-no { font-size: 1.3rem; font-weight: 800; letter-spacing: .03em; font-variant-numeric: tabular-nums; }
.bank-logo.sm { width: 26px; height: 26px; border-radius: 8px; flex: none; }
.bank-logo.sm svg { width: 15px; height: 15px; }
.pay-card .copy-btn { margin-top: 2px; }
@media (max-width: 600px) { .qr-box { max-width: 280px; } .acc-info .acc-no { font-size: 1.15rem; } }
