:root {
  --bg: #fdf8f0; --bg2: #f5efe3; --ink: #2d2013; --ink-soft: #6b4f2e;
  --accent: #e8654a; --accent2: #f0a500; --accent3: #5a9e6f;
  --card: #fffdf7; --border: #c9a87c; --paw: #e8654a;
  --sketch: rgba(45,32,19,0.12); --shadow: rgba(45,32,19,0.15);
}
[data-theme="dark"] {
  --bg: #1a1208; --bg2: #251a0e; --ink: #f5e8cc; --ink-soft: #c9a87c;
  --accent: #ff7a5a; --accent2: #f5b820; --accent3: #6ec482;
  --card: #211810; --border: #5a3e22; --paw: #ff7a5a;
  --sketch: rgba(245,232,204,0.08); --shadow: rgba(0,0,0,0.4);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Klee One', cursive; background: var(--bg); color: var(--ink);
  min-height: 100vh; display: flex; flex-direction: column; transition: background 0.4s, color 0.4s; overflow-x: hidden;
}
body.scroll-unlocked { overflow: auto !important; overflow-x: hidden !important; }
body::before {
  content: ''; position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 9999; opacity: 0.6;
}

/* NAV */
nav {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 1rem 2rem; border-bottom: 2.5px solid var(--border);
  background: var(--bg); position: sticky; top: 0; z-index: 100;
  transition: background 0.4s; gap: 0.5rem;
}
nav::after {
  content: ''; position: absolute; bottom: -5px; left: 0; right: 0; height: 3px;
  background: repeating-linear-gradient(90deg,var(--border) 0,var(--border) 6px,transparent 6px,transparent 12px);
  opacity: 0.5;
}
.logo {
  font-family: 'Caveat', cursive; font-size: 2rem; font-weight: 700;
  color: var(--accent); letter-spacing: 1px;
  display: flex; align-items: center; gap: 0.3rem; cursor: pointer;
}
.logo span { animation: pawBounce 2s ease-in-out infinite; display: inline-block; }
@keyframes pawBounce { 0%,100%{transform:rotate(-5deg);}50%{transform:rotate(8deg) scale(1.15);} }
.nav-links { display: flex; gap: 0.35rem; align-items: center; flex-wrap: wrap; justify-content: center; }
.nav-link {
  font-family: 'Caveat', cursive; font-size: 1.1rem; font-weight: 600;
  color: var(--ink-soft); background: none; border: none; cursor: pointer;
  padding: 0.35rem 0.75rem; border-radius: 12px; transition: all 0.2s; position: relative;
}
.nav-link:hover { color: var(--accent); background: var(--sketch); }
.nav-link.active { color: var(--accent); background: var(--sketch); }
.nav-link.active::after {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 60%; height: 2.5px; background: var(--accent); border-radius: 2px;
}
.nav-donate {
  font-family: 'Caveat', cursive; font-size: 1.1rem; font-weight: 700;
  color: #fff; background: var(--accent); border: 2.5px solid var(--ink);
  cursor: pointer; padding: 0.35rem 1rem; border-radius: 12px;
  box-shadow: 3px 3px 0 var(--ink); transition: all 0.2s;
}
.nav-donate:hover { transform: translate(-1px,-1px); box-shadow: 5px 5px 0 var(--ink); }
.nav-right {
  justify-self: end; display: flex; align-items: center; gap: 0.5rem;
}
.theme-toggle {
  flex-shrink: 0;
  /* pill track */
  width: 60px;
  height: 30px;
  border-radius: 15px;
  border: 2px solid var(--border);
  background: var(--bg2);
  box-shadow: inset 0 0 4px rgba(0,0,0,0.1);
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  font-size: 0.9rem;
  transition: background 0.3s;
}

/* prevent icon text from capturing clicks */
.theme-toggle span { pointer-events: none; }

.theme-toggle::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  top: 50%;
  left: 6px;
  transform: translateY(-50%);
  background: var(--accent);
  border: 1.5px solid var(--border);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  transition: left 0.3s cubic-bezier(.34,1.56,.64,1), background 0.3s;
}

.theme-toggle:hover {
  box-shadow: inset 0 0 4px rgba(0,0,0,0.2), 0 0 0 2px var(--accent);
}

[data-theme="dark"] .theme-toggle {
  background: var(--border);
}

[data-theme="dark"] .theme-toggle::after {
  left: calc(100% - 6px - 22px);
  background: var(--accent2);
}
.hamburger {
  display: none; flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 38px; height: 38px; background: none; border: 2px solid var(--border);
  border-radius: 10px; cursor: pointer; padding: 5px; flex-shrink: 0;
  transition: background 0.2s;
}
.hamburger:hover { background: var(--sketch); }
.hamburger span {
  display: block; width: 18px; height: 2px; background: var(--ink);
  border-radius: 2px; transition: transform 0.3s, opacity 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* PAGES */
.page { display: none; animation: fadeIn 0.4s ease; }
.page.active { display: flex; flex-direction: column; flex: 1; }
@keyframes fadeIn { from{opacity:0;transform:translateY(8px);}to{opacity:1;transform:translateY(0);} }

/* SHARED */
.section { padding: 4rem 2rem; max-width: 1100px; margin: 0 auto; }
.section-title {
  font-family: 'Caveat', cursive; font-size: 2.5rem; font-weight: 700;
  margin-bottom: 2.5rem; text-align: center; position: relative;
  display: inline-block; left: 50%; transform: translateX(-50%) rotate(-0.5deg);
}
.section-title::before { content: attr(data-emoji); margin-right: 0.5rem; }
.card {
  background: var(--card); border: 2.5px solid var(--border); border-radius: 18px;
  padding: 1.8rem; box-shadow: 5px 5px 0 var(--sketch);
  transition: transform 0.2s, box-shadow 0.2s; position: relative; overflow: hidden;
}
.card::before { content:'';position:absolute;top:0;left:0;right:0;height:4px;background:var(--accent);border-radius:2px 2px 0 0; }
.what-we-do-cards > .card:nth-child(3n+2)::before{background:var(--accent2);}
.what-we-do-cards > .card:nth-child(3n)::before{background:var(--accent3);}
.card:hover { transform:translateY(-4px) rotate(0.5deg);box-shadow:8px 8px 0 var(--sketch); }
.card-icon{font-size:2.5rem;margin-bottom:0.8rem;display:block;}
.card h3{font-family:'Caveat',cursive;font-size:1.5rem;font-weight:700;margin-bottom:0.5rem;}
.card p{font-size:0.95rem;color:var(--ink-soft);line-height:1.6;}
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:1.5rem;}
.what-we-do-cards{grid-template-columns:repeat(3,1fr);max-width:960px;margin-inline:auto;}
.tag-pill{font-family:'Caveat',cursive;font-size:0.95rem;background:var(--accent);color:#fff;padding:0.2rem 0.8rem;border-radius:8px;display:inline-block;transform:rotate(-1deg);}
.sketch-underline{position:relative;display:inline-block;}
.sketch-underline::after{content:'';position:absolute;bottom:-4px;left:0;right:0;height:4px;background:var(--accent2);border-radius:2px;transform:rotate(-0.5deg) scaleX(1.02);}
.doodle{position:absolute;pointer-events:none;}
.doodle-1{top:8%;left:5%;font-size:3rem;opacity:0.15;transform:rotate(-20deg);animation:float 4s ease-in-out infinite;}
.doodle-2{top:15%;right:8%;font-size:2rem;opacity:0.12;transform:rotate(15deg);animation:float 3.5s ease-in-out infinite 0.5s;}
.doodle-3{bottom:20%;left:8%;font-size:2.5rem;opacity:0.12;transform:rotate(-10deg);animation:float 5s ease-in-out infinite 1s;}
.doodle-4{bottom:25%;right:6%;font-size:2rem;opacity:0.12;transform:rotate(25deg);animation:float 4.5s ease-in-out infinite 0.8s;}
.doodle-5{top:50%;left:2%;font-size:1.8rem;opacity:0.1;animation:float 3s ease-in-out infinite 1.5s;}
@keyframes float{0%,100%{transform:translateY(0) rotate(-10deg);}50%{transform:translateY(-12px) rotate(-10deg);}}
.paw-trail{display:flex;gap:1.5rem;margin-top:3rem;align-items:center;justify-content:center;opacity:0.25;}
.paw-print{font-size:1.5rem;animation:pawStep 1.6s ease-in-out infinite;}
.paw-print:nth-child(2){animation-delay:0.2s;font-size:1.2rem;}
.paw-print:nth-child(3){animation-delay:0.4s;font-size:1.6rem;}
.paw-print:nth-child(4){animation-delay:0.6s;font-size:1.1rem;}
.paw-print:nth-child(5){animation-delay:0.8s;font-size:1.4rem;}
@keyframes pawStep{0%,100%{opacity:0.2;transform:scale(0.9);}50%{opacity:0.6;transform:scale(1.1);}}
.stats-strip{background:var(--bg2);border-top:2.5px solid var(--border);border-bottom:2.5px solid var(--border);padding:2rem;display:flex;justify-content:center;gap:4rem;flex-wrap:wrap;}
.stat{text-align:center;}
.stat-num{font-family:'Caveat',cursive;font-size:3rem;font-weight:700;color:var(--accent);display:block;line-height:1;}
.stat-label{font-size:0.95rem;color:var(--ink-soft);margin-top:0.3rem;}
.page-header{text-align:center;padding:4rem 2rem 2rem;max-width:720px;margin:0 auto;}
.page-header h1{font-family:'Caveat',cursive;font-size:clamp(2.5rem,6vw,4.5rem);font-weight:700;transform:rotate(-0.5deg);margin-bottom:0.8rem;line-height:1.15;}
.page-header p{font-size:1.1rem;color:var(--ink-soft);line-height:1.8;}

/* HOME */
.hero{min-height:72vh;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:3.2rem 2rem 1.6rem;position:relative;}
.hero-badge{font-family:'Caveat',cursive;font-size:1rem;color:var(--accent3);background:var(--sketch);border:2px solid var(--accent3);border-radius:20px;padding:0.3rem 1rem;margin-bottom:1.5rem;letter-spacing:1px;display:inline-block;transform:rotate(-1deg);}
.hero h1{font-family:'Caveat',cursive;font-size:clamp(3.5rem,9vw,7rem);font-weight:700;color:var(--ink);line-height:1.1;margin-bottom:1rem;}
.hero h1 .accent{color:var(--accent);}
.hero-tagline{font-size:1.3rem;color:var(--ink-soft);max-width:480px;line-height:1.7;margin-bottom:2.5rem;transform:rotate(0.3deg);}
.hero-btn{font-family:'Caveat',cursive;font-size:1.35rem;font-weight:600;background:var(--accent);color:#fff;border:3px solid var(--ink);padding:0.75rem 2.2rem;border-radius:14px;cursor:pointer;box-shadow:4px 4px 0 var(--ink);transition:all 0.2s;transform:rotate(-0.5deg);}
.hero-btn:hover{transform:rotate(-0.5deg) translate(-2px,-2px);box-shadow:6px 6px 0 var(--ink);}

/* ABOUT */
.manifesto{max-width:800px;margin:2rem auto;padding:0 2rem 4rem;}
.manifesto-block{background:var(--card);border:2.5px solid var(--border);border-radius:20px;padding:2.2rem;margin-bottom:1.5rem;box-shadow:5px 5px 0 var(--sketch);transition:transform 0.2s;}
.manifesto-block:hover{transform:rotate(0.3deg);}
.manifesto-block:nth-child(even):hover{transform:rotate(-0.3deg);}
.manifesto-block .tag{font-family:'Caveat',cursive;font-size:0.95rem;background:var(--accent);color:#fff;padding:0.2rem 0.8rem;border-radius:8px;margin-bottom:0.8rem;display:inline-block;transform:rotate(-1deg);}
.manifesto-block:nth-child(2) .tag{background:var(--accent2);color:var(--ink);}
.manifesto-block:nth-child(3) .tag{background:var(--accent3);}
.manifesto-block:nth-child(4) .tag{background:var(--ink-soft);}
.manifesto-block h3{font-family:'Caveat',cursive;font-size:1.6rem;font-weight:700;margin-bottom:0.6rem;}
.manifesto-block p{color:var(--ink-soft);line-height:1.7;font-size:1rem;}

/* DOGS — search bar */
.dogs-search-wrap{width:100%;max-width:1400px;margin:0 auto;padding:0 1.5rem 1rem;display:flex;align-items:center;gap:1rem;flex-wrap:wrap;box-sizing:border-box;}
.dogs-search{flex:1;min-width:160px;padding:0.5rem 1rem;border:2px solid var(--border);border-radius:20px;background:var(--card);color:var(--ink);font-family:'Caveat',cursive;font-size:1.1rem;outline:none;transition:border-color 0.2s;}
.dogs-search:focus{border-color:var(--accent);}
.dogs-count{font-family:'Caveat',cursive;font-size:1rem;color:var(--ink-soft);white-space:nowrap;}
/* DOGS — compact tile grid */
.dogs-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));grid-auto-rows:4px;gap:0;width:100%;max-width:1400px;margin:0.5rem auto 3rem;padding:0 1.5rem 2rem;align-items:start;box-sizing:border-box;}
.dogs-memoriam-cta { text-align:center; margin:2rem 0; }
.dogs-memoriam-cta .memoriam-cta {
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1.25rem;
  font-weight: 700;
  border: 2px solid var(--ink);
  border-radius: 12px;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.2s, box-shadow 0.2s;
}
.dogs-memoriam-cta .memoriam-cta:hover {
  transform: translateY(-2px);
  box-shadow: 5px 5px 0 var(--ink);
}
.dogs-memoriam-cta .memoriam-cta:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent);
}
.dog-card{background:var(--card);border:2px solid var(--border);border-radius:14px;overflow:hidden;box-shadow:4px 4px 0 var(--sketch);transition:transform 0.2s,box-shadow 0.2s;cursor:pointer;margin:0.375rem;}
.dog-card:hover{transform:translateY(-4px);box-shadow:6px 6px 0 var(--sketch);}
.dog-card-hidden{display:none !important;}
.dog-tile-photo{position:relative;width:100%;aspect-ratio:1/1;overflow:hidden;background:var(--bg2);}
.dog-photo{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center center;display:block;opacity:0;transition:opacity 0.35s ease;}
.dog-photo.loaded{opacity:1;}
.dog-tile-emoji{width:100%;aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;font-size:3.5rem;}
.dog-emoji-big{animation:dogWag 2s ease-in-out infinite;display:inline-block;}
@keyframes dogWag{0%,100%{transform:rotate(-5deg);}25%{transform:rotate(5deg) scaleX(1.05);}75%{transform:rotate(-3deg) scaleX(0.97);}}
.dog-card:nth-child(even) .dog-emoji-big{animation-delay:0.5s;}
.dog-tile-name{padding:0.35rem 0.5rem 0.45rem;font-family:'Caveat',cursive;font-size:0.95rem;font-weight:700;text-align:center;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.dogs-no-results{grid-column:1/-1;text-align:center;padding:3rem 2rem;font-family:'Caveat',cursive;font-size:1.5rem;color:var(--ink-soft);}
.dogs-loading{text-align:center;padding:4rem 2rem;font-family:'Caveat',cursive;font-size:1.5rem;color:var(--ink-soft);}
.dogs-error{text-align:center;padding:2rem;font-family:'Caveat',cursive;font-size:1.1rem;color:var(--accent);background:var(--card);border:2px solid var(--border);border-radius:14px;margin:1rem 2rem;}
/* DOGS — modal */
.dog-modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,0.55);z-index:1000;display:flex;align-items:center;justify-content:center;padding:1rem;backdrop-filter:blur(3px);}
.dog-modal{background:var(--card);border:2.5px solid var(--border);border-radius:24px;overflow:hidden;box-shadow:10px 10px 0 var(--sketch);max-width:420px;width:100%;max-height:90vh;overflow-y:auto;position:relative;animation:modalPop 0.2s ease;}
@keyframes modalPop{from{transform:scale(0.92);opacity:0;}to{transform:scale(1);opacity:1;}}
.dog-modal-photo{position:relative;width:100%;aspect-ratio:4/3;background:var(--bg2);overflow:hidden;}
.dog-modal-photo img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;object-position:center center;}
.dog-modal-emoji{width:100%;aspect-ratio:4/3;display:flex;align-items:center;justify-content:center;}
.dog-modal-body{padding:1.4rem 1.4rem 1.6rem;}
.dog-modal-name{font-family:'Caveat',cursive;font-size:2rem;font-weight:700;margin-bottom:0.3rem;display:flex;align-items:center;gap:0.4rem;}
.dog-modal-breed{font-size:0.85rem;color:var(--accent);background:var(--sketch);padding:0.2rem 0.6rem;border-radius:8px;display:inline-block;margin-bottom:0.8rem;font-weight:600;transform:rotate(-0.5deg);border:1.5px solid var(--border);}
.dog-modal-desc{font-size:0.95rem;color:var(--ink-soft);line-height:1.6;margin-bottom:0.8rem;}
.dog-modal-tags{display:flex;flex-wrap:wrap;gap:0.4rem;}
.dog-modal-tag{font-size:0.78rem;padding:0.2rem 0.6rem;border-radius:20px;border:1.5px solid var(--border);color:var(--ink-soft);background:var(--bg2);}
.dog-modal-status{display:flex;flex-wrap:wrap;gap:0.4rem;margin-bottom:0.8rem;}
.dog-status-badge{font-size:0.78rem;padding:0.2rem 0.7rem;border-radius:20px;border:1.5px solid;font-weight:600;}
.dog-status-sterilized{background:#e8f5e9;border-color:#4caf50;color:#2e7d32;}
.dog-status-vaccinated{background:#e3f2fd;border-color:#2196f3;color:#1565c0;}
[data-theme=dark] .dog-status-sterilized{background:#1b3a1f;border-color:#4caf50;color:#a5d6a7;}
[data-theme=dark] .dog-status-vaccinated{background:#0d2a3a;border-color:#2196f3;color:#90caf9;}
.dog-modal-close{position:absolute;top:0.75rem;right:0.75rem;background:var(--card);border:2px solid var(--border);border-radius:50%;width:2rem;height:2rem;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:0.9rem;line-height:1;z-index:1;transition:background 0.15s;}
.dog-modal-close:hover{background:var(--bg2);}

/* DOGS — filter button */
.dogs-filter-btn{display:inline-flex;align-items:center;gap:0.35rem;padding:0.5rem 1rem;border:2px solid var(--border);border-radius:20px;background:var(--card);color:var(--ink);font-family:'Caveat',cursive;font-size:1.1rem;cursor:pointer;transition:border-color 0.2s,background 0.2s,color 0.2s;white-space:nowrap;flex-shrink:0;}
.dogs-filter-btn:hover{border-color:var(--accent);background:var(--bg2);}
.dogs-filter-btn.filters-active{border-color:var(--accent);background:var(--accent);color:#fff;}
.dogs-filter-badge{display:inline-flex;align-items:center;justify-content:center;min-width:1.1rem;height:1.1rem;padding:0 0.2rem;border-radius:20px;background:var(--accent);color:#fff;font-family:sans-serif;font-size:0.72rem;font-weight:700;line-height:1;}
.dogs-filter-btn.filters-active .dogs-filter-badge{background:#fff;color:var(--accent);}

/* DOGS — filter sidebar backdrop */
.dogs-filter-backdrop{position:fixed;inset:0;background:rgba(0,0,0,0);pointer-events:none;z-index:1001;transition:background 0.3s;}
.dogs-filter-backdrop.open{background:rgba(0,0,0,0.35);pointer-events:all;}

/* DOGS — filter sidebar panel */
.dogs-filter-panel{position:fixed;top:0;right:0;height:100vh;height:100dvh;width:min(320px,90vw);background:var(--card);border-left:2px solid var(--border);box-shadow:-8px 0 32px rgba(0,0,0,0.1);transform:translateX(105%);transition:transform 0.32s cubic-bezier(0.4,0,0.2,1);z-index:1002;display:flex;flex-direction:column;overflow:hidden;}
.dogs-filter-panel.open{transform:translateX(0);}
.dogs-filter-header{display:flex;align-items:center;justify-content:space-between;padding:1.1rem 1.25rem 0.9rem;border-bottom:2px solid var(--border);flex-shrink:0;}
.dogs-filter-title{font-family:'Caveat',cursive;font-size:1.5rem;font-weight:700;color:var(--ink);}
.dogs-filter-close{background:none;border:2px solid var(--border);border-radius:50%;width:2rem;height:2rem;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:0.88rem;color:var(--ink-soft);transition:background 0.15s;flex-shrink:0;padding:0;}
.dogs-filter-close:hover{background:var(--bg2);}
.dogs-filter-body{flex:1;overflow-y:auto;padding:0.25rem 0;-webkit-overflow-scrolling:touch;}
.dogs-filter-section{padding:0.9rem 1.25rem;border-bottom:1.5px solid var(--border);}
.dogs-filter-label{font-family:'Caveat',cursive;font-size:1.05rem;font-weight:700;color:var(--ink-soft);margin-bottom:0.55rem;}
.dogs-filter-footer{padding:0.9rem 1.25rem;border-top:2px solid var(--border);flex-shrink:0;}
.dogs-filter-clear{background:none;border:none;color:var(--accent);font-family:'Caveat',cursive;font-size:1rem;cursor:pointer;padding:0;text-decoration:underline;text-underline-offset:2px;}
.dogs-filter-clear:hover{opacity:0.75;}

/* DOGS — filter location chips */
.dogs-filter-chips{display:flex;flex-wrap:wrap;gap:0.35rem;max-height:150px;overflow-y:auto;padding-right:2px;}
.dogs-filter-chip{display:inline-block;}
.dogs-filter-chip input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}
.dogs-filter-chip input:focus-visible+span{outline:2px solid var(--accent);outline-offset:1px;}
.dogs-filter-chip span{display:inline-block;padding:0.25rem 0.65rem;border:1.5px solid var(--border);border-radius:20px;font-size:0.82rem;color:var(--ink-soft);background:var(--bg2);cursor:pointer;transition:background 0.15s,border-color 0.15s,color 0.15s;user-select:none;white-space:nowrap;}
.dogs-filter-chip span:hover{border-color:var(--accent);}
.dogs-filter-chip input:checked+span{background:var(--accent);border-color:var(--accent);color:#fff;}

/* DOGS — filter toggle group (gender / sterilisation / vaccination) */
.dogs-filter-toggle-group{display:flex;gap:0.4rem;flex-wrap:wrap;}
.dogs-filter-toggle{padding:0.3rem 0.8rem;border:1.5px solid var(--border);border-radius:20px;background:var(--bg2);color:var(--ink-soft);font-family:'Caveat',cursive;font-size:0.95rem;cursor:pointer;transition:background 0.15s,border-color 0.15s,color 0.15s;}
.dogs-filter-toggle:hover{border-color:var(--accent);}
.dogs-filter-toggle.active{background:var(--accent);border-color:var(--accent);color:#fff;}

/* DOGS — age dual-range slider */
.dogs-age-slider-wrap{position:relative;height:2.4rem;margin:0.4rem 0 0.2rem;}
.dogs-age-track{position:absolute;left:9px;right:9px;top:50%;transform:translateY(-50%);height:4px;background:var(--border);border-radius:4px;pointer-events:none;}
.dogs-age-fill{position:absolute;top:0;left:0;width:100%;height:100%;background:var(--accent);border-radius:4px;}
.dogs-age-range{position:absolute;left:0;width:100%;top:50%;transform:translateY(-50%);-webkit-appearance:none;appearance:none;background:transparent;height:4px;margin:0;padding:0;pointer-events:none;outline:none;}
.dogs-age-range::-webkit-slider-runnable-track{background:transparent;height:4px;}
.dogs-age-range::-moz-range-track{background:transparent;height:4px;}
.dogs-age-range::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;pointer-events:all;width:18px;height:18px;border-radius:50%;background:var(--accent);border:2.5px solid var(--card);box-shadow:0 1px 6px rgba(0,0,0,0.25);cursor:pointer;transition:transform 0.15s;}
.dogs-age-range::-webkit-slider-thumb:hover{transform:scale(1.2);}
.dogs-age-range::-moz-range-thumb{pointer-events:all;width:14px;height:14px;border-radius:50%;background:var(--accent);border:2.5px solid var(--card);box-shadow:0 1px 6px rgba(0,0,0,0.25);cursor:pointer;}
.dogs-age-label{font-family:'Caveat',cursive;font-size:1rem;color:var(--ink-soft);text-align:center;margin-top:0.1rem;}

/* DOGS — filter sidebar: full-width on very narrow screens */
@media(max-width:400px){.dogs-filter-panel{width:100vw;border-left:none;}}

/* DEPARTMENTS */
.dept-intro{background:var(--bg2);border-top:2.5px solid var(--border);border-bottom:2.5px solid var(--border);padding:1.8rem 2rem;text-align:center;font-size:1.05rem;color:var(--ink-soft);line-height:1.7;}
.dept-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:2rem;max-width:1100px;margin:0 auto;padding:3rem 2rem 4rem;}
.dept-grid-row{grid-template-columns:repeat(4,1fr);max-width:1400px;gap:1.5rem;}
.dept-grid-row .dept-card{min-width:0;}
.dept-card{background:var(--card);border:2.5px solid var(--border);border-radius:20px;overflow:hidden;box-shadow:6px 6px 0 var(--sketch);transition:transform 0.25s,box-shadow 0.25s;}
.dept-card-link{cursor:pointer;user-select:none;}
.dept-card-link:hover{transform:translateY(-6px) rotate(0.4deg);box-shadow:10px 10px 0 var(--sketch);}
.dept-card-link:nth-child(even):hover{transform:translateY(-6px) rotate(-0.4deg);}
.dept-card-link:focus-visible{outline:3px solid var(--accent);outline-offset:3px;}
.dept-card:hover{transform:translateY(-5px) rotate(0.4deg);box-shadow:10px 10px 0 var(--sketch);}
.dept-card:nth-child(even):hover{transform:translateY(-5px) rotate(-0.4deg);}
.dept-top{padding:1.6rem 1.5rem 1.2rem;border-bottom:2px dashed var(--border);position:relative;}
.dept-card:nth-child(1) .dept-top{background:linear-gradient(135deg,#ffe8d8,#ffd8b8);}
.dept-card:nth-child(2) .dept-top{background:linear-gradient(135deg,#d8edd8,#c0ddc0);}
.dept-card:nth-child(3) .dept-top{background:linear-gradient(135deg,#fff3d0,#ffe8a8);}
.dept-card:nth-child(4) .dept-top{background:linear-gradient(135deg,#d8e8f8,#c0d8f0);}
[data-theme="dark"] .dept-card:nth-child(1) .dept-top{background:linear-gradient(135deg,#2d1208,#3d1a0d);}
[data-theme="dark"] .dept-card:nth-child(2) .dept-top{background:linear-gradient(135deg,#082d08,#0d3d0d);}
[data-theme="dark"] .dept-card:nth-child(3) .dept-top{background:linear-gradient(135deg,#2d2208,#3d2d0d);}
[data-theme="dark"] .dept-card:nth-child(4) .dept-top{background:linear-gradient(135deg,#08182d,#0d2038);}
.dept-num{font-family:'Caveat',cursive;font-size:0.85rem;font-weight:700;letter-spacing:0.1em;color:var(--ink-soft);opacity:0.6;margin-bottom:0.5rem;}
.dept-icon{font-size:2.4rem;margin-bottom:0.5rem;display:block;}
.dept-card h3{font-family:'Caveat',cursive;font-size:1.5rem;font-weight:700;color:var(--ink);margin-bottom:0.2rem;}
.dept-body{padding:1.2rem 1.5rem 1.5rem;display:flex;flex-direction:column;gap:0.8rem;}
.dept-body p{font-size:0.92rem;color:var(--ink-soft);line-height:1.65;margin:0;flex:1;}
.dept-cta{font-family:'Caveat',cursive;font-size:1.05rem;font-weight:700;color:var(--accent);letter-spacing:0.02em;align-self:flex-start;}
.dept-resp{list-style:none;display:flex;flex-direction:column;gap:0.55rem;}
.dept-resp li{font-size:0.88rem;color:var(--ink-soft);line-height:1.55;display:flex;gap:0.6rem;align-items:flex-start;}
.dept-resp li::before{content:'→';color:var(--accent);font-weight:700;flex-shrink:0;margin-top:1px;font-family:'Caveat',cursive;font-size:1rem;}

/* DEPT DETAIL PAGE */
.dept-detail-page{max-width:860px;margin:0 auto;padding-bottom:4rem;}
.dept-detail-back{padding:2rem 2rem 0;}
.dept-back-btn{font-family:'Caveat',cursive;font-size:1.1rem;font-weight:700;color:var(--accent);background:none;border:2px solid var(--border);border-radius:10px;padding:0.45rem 1.1rem;cursor:pointer;transition:background 0.18s,color 0.18s;}
.dept-back-btn:hover{background:var(--accent);color:#fff;border-color:var(--accent);}
.dept-detail-hero{padding:2.5rem 2rem 2rem;margin:1.5rem 2rem;border:2.5px solid var(--border);border-radius:20px;box-shadow:6px 6px 0 var(--sketch);}
.dept-detail-hero--01{background:linear-gradient(135deg,#ffe8d8,#ffd8b8);}
.dept-detail-hero--02{background:linear-gradient(135deg,#d8edd8,#c0ddc0);}
.dept-detail-hero--03{background:linear-gradient(135deg,#fff3d0,#ffe8a8);}
.dept-detail-hero--04{background:linear-gradient(135deg,#d8e8f8,#c0d8f0);}
[data-theme="dark"] .dept-detail-hero--01{background:linear-gradient(135deg,#2d1208,#3d1a0d);}
[data-theme="dark"] .dept-detail-hero--02{background:linear-gradient(135deg,#082d08,#0d3d0d);}
[data-theme="dark"] .dept-detail-hero--03{background:linear-gradient(135deg,#2d2208,#3d2d0d);}
[data-theme="dark"] .dept-detail-hero--04{background:linear-gradient(135deg,#08182d,#0d2038);}
.dept-detail-num{font-family:'Caveat',cursive;font-size:0.9rem;font-weight:700;letter-spacing:0.12em;color:var(--ink-soft);opacity:0.65;margin-bottom:0.5rem;}
.dept-detail-icon{font-size:3.5rem;display:block;margin-bottom:0.6rem;}
.dept-detail-title{font-family:'Caveat',cursive;font-size:2.8rem;font-weight:700;color:var(--ink);margin:0 0 0.4rem;line-height:1.1;}
.dept-detail-tagline{font-family:'Caveat',cursive;font-size:1.25rem;color:var(--ink-soft);margin:0;}
.dept-detail-content{padding:0 2rem;}
.dept-detail-section{margin-bottom:2.5rem;}
.dept-detail-section h2{font-family:'Caveat',cursive;font-size:1.7rem;font-weight:700;color:var(--ink);margin-bottom:1rem;padding-bottom:0.4rem;border-bottom:2px dashed var(--border);}
.dept-detail-section p{font-size:0.97rem;color:var(--ink-soft);line-height:1.75;margin-bottom:0.9rem;}
.dept-highlights{display:grid;grid-template-columns:repeat(3,1fr);gap:1.2rem;margin-top:0.5rem;}
.dept-highlight-card{background:var(--bg2);border:2px solid var(--border);border-radius:14px;padding:1.2rem;display:flex;flex-direction:column;gap:0.6rem;}
.dept-highlight-card .dept-highlight-icon{font-size:1.8rem;}
.dept-highlight-card strong{font-family:'Caveat',cursive;font-size:1.1rem;color:var(--ink);}
.dept-highlight-card p{font-size:0.85rem;color:var(--ink-soft);line-height:1.55;margin:0;}

/* DEPT WRITE-UP ENTRIES */
.dept-entries{display:flex;flex-direction:column;gap:0.75rem;margin-top:0.5rem;}
.dept-event-entry{background:var(--card);border:2.5px solid var(--border);border-radius:16px;padding:1.6rem 1.8rem;box-shadow:4px 4px 0 var(--sketch);}
.dept-event-entry h3{font-family:'Caveat',cursive;font-size:1.45rem;font-weight:700;color:var(--ink);margin:0 0 1rem;padding-bottom:0.35rem;border-bottom:2px dashed var(--border);}
.dept-event-entry p{font-size:0.97rem;color:var(--ink-soft);line-height:1.75;margin-bottom:0.85rem;}
.dept-event-entry p:last-of-type{margin-bottom:1.1rem;}
.dept-event-entry ul{margin:0.4rem 0 1rem 1.2rem;padding:0;}
.dept-event-entry ul li{font-size:0.95rem;color:var(--ink-soft);line-height:1.7;margin-bottom:0.35rem;}
.dept-event-entry ul li strong{font-family:'Caveat',cursive;font-size:1rem;color:var(--ink);}
.dept-event-photos{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:0.9rem;margin-top:1rem;}
.dept-photo-placeholder{background:var(--bg2);border:2px dashed var(--border);border-radius:12px;min-height:160px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0.5rem;color:var(--ink-soft);font-size:0.85rem;font-family:'Caveat',cursive;padding:1rem;}
.dept-photo-placeholder .ph-icon{font-size:1.8rem;}
.dept-photo-img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:12px;cursor:pointer;display:block;transition:transform 0.18s,box-shadow 0.18s;}
.dept-photo-img:hover{transform:scale(1.04);box-shadow:0 6px 20px rgba(0,0,0,0.18);}
.dept-amount-raised{margin-top:1.2rem;padding:0.85rem 1.2rem;background:var(--bg2);border:2.5px solid var(--accent2);border-radius:12px;font-family:'Caveat',cursive;font-size:1.15rem;font-weight:700;color:var(--ink);display:inline-block;}
.entry-collapsible{overflow:hidden;max-height:0;transition:max-height 0.45s ease;}
.read-more-btn{margin-top:1rem;padding:0.45rem 1.1rem;background:transparent;border:2px solid var(--accent);border-radius:20px;font-family:'Caveat',cursive;font-size:1rem;font-weight:600;color:var(--accent);cursor:pointer;transition:background 0.2s,color 0.2s;}
.read-more-btn:hover{background:var(--accent);color:#fff;}

/* COMPACT HORIZONTAL ENTRY CARDS */
.dept-entry-card{background:var(--card);border:2.5px solid var(--border);border-radius:14px;padding:0.85rem 1rem;box-shadow:3px 3px 0 var(--sketch);display:flex;align-items:flex-start;gap:1rem;transition:box-shadow 0.18s,transform 0.18s;}
.dept-entry-card:hover{box-shadow:5px 5px 0 var(--sketch);transform:translateY(-1px);}
.dept-entry-thumb{flex-shrink:0;width:90px;height:72px;border-radius:10px;overflow:hidden;border:2px solid var(--border);}
.dept-entry-thumb img{width:100%;height:100%;object-fit:cover;display:block;}
.dept-entry-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:0.3rem;}
.dept-entry-body h3{font-family:'Caveat',cursive;font-size:1.2rem;font-weight:700;color:var(--ink);margin:0;padding:0;}
.dept-entry-preview{font-size:0.88rem;color:var(--ink-soft);line-height:1.55;margin:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.dept-entry-btn{margin-top:0.45rem;padding:0.28rem 0.85rem;background:transparent;border:1.5px solid var(--accent);border-radius:20px;font-family:'Caveat',cursive;font-size:0.95rem;font-weight:600;color:var(--accent);cursor:pointer;transition:background 0.18s,color 0.18s;align-self:flex-start;}
.dept-entry-btn:hover{background:var(--accent);color:#fff;}

/* DEPT ENTRY DETAIL MODAL */
.dept-entry-modal-bg{display:none;position:fixed;inset:0;z-index:500;background:rgba(10,8,4,0.88);backdrop-filter:blur(6px);align-items:center;justify-content:center;padding:1.5rem;}
.dept-entry-modal-bg.open{display:flex;}
.dept-entry-modal-box{background:var(--card);border:2.5px solid var(--border);border-radius:20px;box-shadow:6px 6px 0 var(--sketch);max-width:720px;width:100%;max-height:88vh;overflow-y:auto;position:relative;padding:2.2rem 2.2rem 2rem;}
.dept-entry-modal-close{position:sticky;top:0;float:right;margin:-0.3rem -0.3rem 0.5rem 1rem;background:var(--bg2);border:2px solid var(--border);border-radius:50%;width:2rem;height:2rem;font-size:1rem;cursor:pointer;color:var(--ink);display:flex;align-items:center;justify-content:center;z-index:10;transition:background 0.18s,color 0.18s,border-color 0.18s;}
.dept-entry-modal-close:hover{background:var(--accent);color:#fff;border-color:var(--accent);}
.dept-entry-modal-content h3{font-family:'Caveat',cursive;font-size:1.6rem;font-weight:700;color:var(--ink);margin:0 0 1rem;padding-bottom:0.35rem;border-bottom:2px dashed var(--border);}
.dept-entry-modal-content p{font-size:0.97rem;color:var(--ink-soft);line-height:1.75;margin-bottom:0.85rem;}
.dept-entry-modal-content p:last-of-type{margin-bottom:0.4rem;}
.dept-entry-modal-content ul{margin:0.4rem 0 1rem 1.2rem;padding:0;}
.dept-entry-modal-content ul li{font-size:0.95rem;color:var(--ink-soft);line-height:1.7;margin-bottom:0.35rem;}
.dept-entry-modal-content ul li strong{font-family:'Caveat',cursive;font-size:1rem;color:var(--ink);}
.dept-entry-modal-content .dept-event-photos{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:0.9rem;margin-top:1rem;}

/* EVENT / DRIVE ACCORDION CARDS */
.event-cards-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:1.2rem;margin-top:0.5rem;}
.event-acc-card{background:var(--card);border:2.5px solid var(--border);border-radius:16px;overflow:hidden;box-shadow:4px 4px 0 var(--sketch);cursor:pointer;transition:box-shadow 0.2s,transform 0.2s;user-select:none;}
.event-acc-card:hover{box-shadow:7px 7px 0 var(--sketch);transform:translateY(-2px);}
.event-acc-top{display:flex;align-items:center;gap:1rem;padding:1.1rem 1.3rem;}
.event-acc-img{width:60px;height:60px;border-radius:12px;background:var(--bg2);border:2px solid var(--border);display:flex;align-items:center;justify-content:center;font-size:2rem;flex-shrink:0;overflow:hidden;}
.event-acc-img img{width:100%;height:100%;object-fit:cover;border-radius:10px;}
.event-acc-title{font-family:'Caveat',cursive;font-size:1.2rem;font-weight:700;color:var(--ink);flex:1;line-height:1.25;}
.event-acc-arrow{font-size:1rem;color:var(--ink-soft);transition:transform 0.25s;flex-shrink:0;}
.event-acc-card.open .event-acc-arrow{transform:rotate(180deg);}
.event-acc-body{max-height:0;overflow:hidden;transition:max-height 0.35s ease;}
.event-acc-card.open .event-acc-body{max-height:500px;}
.event-acc-body-inner{padding:0.9rem 1.3rem 1.2rem;border-top:2px dashed var(--border);}
.event-acc-body-inner p{font-size:0.9rem;color:var(--ink-soft);line-height:1.65;margin:0;}

/* SOCIAL CONNECT LINKS */
.social-connect-grid{display:flex;flex-direction:column;gap:0.9rem;margin-top:0.5rem;}
.social-connect-item{display:flex;align-items:center;gap:1rem;background:var(--bg2);border:2.5px solid var(--border);border-radius:14px;padding:1rem 1.3rem;text-decoration:none;color:var(--ink);transition:all 0.2s;box-shadow:3px 3px 0 var(--sketch);}
.social-connect-item:hover{transform:translate(-2px,-2px);box-shadow:6px 6px 0 var(--sketch);border-color:var(--accent);}
.social-connect-item:hover .social-connect-label{color:var(--accent);}
.social-connect-icon{font-size:1.8rem;flex-shrink:0;}
.social-connect-label{font-family:'Caveat',cursive;font-size:1.2rem;font-weight:700;}
.social-connect-sub{font-size:0.82rem;color:var(--ink-soft);margin-top:0.1rem;}
.social-connect-item.inactive{opacity:0.72;}

/* DEPT DONATE LINK */
.dept-donate-cta{background:var(--card);border:2.5px solid var(--border);border-radius:20px;padding:2rem 2.2rem;box-shadow:5px 5px 0 var(--sketch);text-align:center;}
.dept-donate-cta p{font-size:0.97rem;color:var(--ink-soft);line-height:1.72;margin-bottom:1.4rem;}
.dept-donate-btn{font-family:'Caveat',cursive;font-size:1.3rem;font-weight:700;background:var(--accent);color:#fff;border:2.5px solid var(--ink);padding:0.7rem 2rem;border-radius:14px;cursor:pointer;box-shadow:4px 4px 0 var(--ink);transition:all 0.2s;display:inline-flex;align-items:center;gap:0.5rem;}
.dept-donate-btn:hover{transform:translate(-2px,-2px);box-shadow:6px 6px 0 var(--ink);}

/* TEAM */

/* members listing & dept grid (page-specific) */
.members-list{list-style:none;padding:0;margin:0;columns:3 220px;column-gap:1.5rem;}
.members-list li{break-inside:avoid;display:flex;justify-content:space-between;align-items:center;gap:0.5rem;padding:0.55rem 0.9rem;margin-bottom:0.55rem;background:var(--card);border:2px solid var(--border);border-radius:10px;box-shadow:2px 2px 0 var(--sketch);transition:transform 0.15s;}
.members-list li:hover{transform:translateX(3px);}
.members-list .m-name{font-family:'Caveat',cursive;font-size:1.08rem;font-weight:700;color:var(--ink);}
.members-list .m-batch{font-size:0.76rem;color:var(--ink-soft);background:var(--bg2);padding:0.12rem 0.48rem;border-radius:6px;border:1.5px solid var(--border);white-space:nowrap;flex-shrink:0;}
/* dept heads grid — wider than the centered leadership grid */
.dept-heads-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:1.2rem;margin-top:0.3rem;}
@media(min-width:1200px){.dept-heads-grid{grid-template-columns:repeat(6,1fr);}}
@media(max-width:768px){.members-list{columns:2 160px;}.dept-heads-grid{grid-template-columns:repeat(2,1fr);}}
@media(max-width:480px){.members-list{columns:1;}}

.team-hero-img{max-width:90%;width:100%;height:auto;max-height:50vh;display:block;margin:0 auto;border-radius:8px;object-fit:contain;}
.team-photo-caption{padding:0.7rem 1.5rem;font-family:'Caveat',cursive;font-size:1.05rem;color:var(--ink-soft);text-align:center;border-top:none;}
/* keep old class mapped for any legacy uses */
.team-photo-wrap{max-width:900px;margin:2rem auto;padding:0 2rem;}
.team-photo-box{background:var(--card);border:2.5px solid var(--border);border-radius:20px;box-shadow:6px 6px 0 var(--sketch);overflow:hidden;padding:1rem;}
.team-desc-block{max-width:720px;margin:2rem auto;padding:0 2rem;}
.team-grid-section{max-width:1000px;margin:0 auto;padding:2rem 2rem 4rem;}
.team-grid-title{font-family:'Caveat',cursive;font-size:2rem;font-weight:700;text-align:center;margin-bottom:2rem;transform:rotate(-0.5deg);}
.team-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:1.2rem;}
.team-card{background:var(--card);border:2.5px solid var(--border);border-radius:18px;padding:1.5rem 1rem;text-align:center;box-shadow:4px 4px 0 var(--sketch);transition:transform 0.2s;}
.team-card:hover{transform:translateY(-4px) rotate(1deg);}
.team-card:nth-child(even):hover{transform:translateY(-4px) rotate(-1deg);}
.team-avatar{width:70px;height:70px;border-radius:50%;background:var(--bg2);border:3px solid var(--border);margin:0 auto 0.8rem;display:flex;align-items:center;justify-content:center;font-size:2rem;box-shadow:3px 3px 0 var(--sketch);}
.team-card h4{font-family:'Caveat',cursive;font-size:1.2rem;font-weight:700;margin-bottom:0.2rem;}
.team-card .role{font-size:0.82rem;color:var(--accent);font-weight:600;display:block;margin-bottom:0.15rem;}
.team-card .dept{font-size:0.78rem;color:var(--ink-soft);}
.team-card .batch{font-size:0.78rem;color:var(--ink-soft);display:block;}

/* TEAM TABS */
.team-tabs-wrap{position:sticky;top:62px;z-index:90;background:var(--bg);padding:0.6rem 2rem;}
.team-tabs{display:flex;gap:0.6rem;justify-content:center;flex-wrap:wrap;}
.team-tab{font-family:'Caveat',cursive;font-size:1.1rem;font-weight:700;padding:0.4rem 1.3rem;border-radius:20px;border:2px solid var(--border);background:var(--bg2);color:var(--ink-soft);cursor:pointer;transition:all 0.18s;box-shadow:2px 2px 0 var(--sketch);}
.team-tab:hover{border-color:var(--accent);color:var(--accent);transform:translateY(-1px);}
.team-tab.active{background:var(--accent);color:#fff;border-color:var(--accent);box-shadow:3px 3px 0 rgba(45,32,19,0.18);}

/* ── CINEMA STAGE ── */
.cinema-stage{max-width:1060px;margin:0 auto;padding:0 2rem 3.5rem;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;position:relative;overflow:hidden;}

/* ── LEADERSHIP CAROUSEL ── */
.cinema-carousel{width:100%;max-width:560px;position:relative;display:flex;flex-direction:column;align-items:center;}
.cinema-section-label{display:inline-block;font-family:'Caveat',cursive;font-size:1.15rem;font-weight:700;color:var(--ink-soft);background:var(--bg);padding:0.25rem 1.2rem;border:2px solid var(--border);border-radius:20px;box-shadow:2px 2px 0 var(--sketch);margin-bottom:1.4rem;z-index:2;}
.cinema-card-wrap{position:relative;width:100%;min-height:220px;display:flex;align-items:center;justify-content:center;}
.cinema-card{position:absolute;width:100%;background:var(--card);border:2.5px solid var(--border);border-radius:18px;padding:1.8rem 1.6rem;box-shadow:5px 5px 0 var(--sketch);display:flex;align-items:center;gap:1.4rem;opacity:0;transform:scale(0.92);transition:opacity 0.45s ease,transform 0.45s ease;pointer-events:none;cursor:pointer;}
.cinema-card.active{opacity:1;transform:scale(1);pointer-events:auto;position:relative;}
.cinema-card.prev-leader{border-color:var(--accent);}
.cinema-card:hover{border-color:var(--accent);box-shadow:6px 6px 0 rgba(45,32,19,0.22);}
.cinema-avatar{position:relative;width:130px;height:130px;border-radius:50%;flex-shrink:0;border:3px solid var(--border);box-shadow:3px 3px 0 var(--sketch);background:var(--ph-color,var(--bg2));overflow:hidden;display:flex;align-items:center;justify-content:center;}
.cinema-avatar-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:50%;}
.cinema-avatar-fallback{font-size:3rem;line-height:1;z-index:0;}
[data-theme="dark"] .cinema-avatar{background:var(--bg2) !important;}
.cinema-info{display:flex;flex-direction:column;min-width:0;}
.cinema-name{font-family:'Caveat',cursive;font-size:1.8rem;font-weight:700;margin:0;color:var(--ink);line-height:1.15;}
.cinema-role{font-size:0.92rem;color:var(--accent);font-weight:600;display:block;margin-top:0.2rem;}
.cinema-spirit-dog{font-size:0.8rem;color:var(--ink-soft);font-style:italic;display:block;margin-top:0.18rem;}

/* Carousel navigation */
.cinema-nav{display:flex;align-items:center;gap:0.8rem;margin-top:1.2rem;}
.cinema-nav-arrow{background:var(--card);border:2px solid var(--border);border-radius:50%;width:36px;height:36px;font-size:1.1rem;color:var(--ink-soft);cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:2px 2px 0 var(--sketch);transition:all 0.18s;}
.cinema-nav-arrow:hover{border-color:var(--accent);color:var(--accent);transform:translateY(-1px);}
.cinema-dots{display:flex;gap:0.4rem;align-items:center;}
.cinema-dot{width:10px;height:10px;border-radius:50%;background:var(--border);border:none;cursor:pointer;transition:all 0.2s;padding:0;}
.cinema-dot.active{background:var(--accent);transform:scale(1.25);}
.cinema-progress-wrap{width:100%;max-width:200px;height:3px;background:var(--border);border-radius:2px;margin-top:0.6rem;overflow:hidden;}
.cinema-progress-bar{height:100%;background:var(--accent);border-radius:2px;width:0;animation:cinemaProgress 5s linear forwards;}

/* ── CORE GRID ── */
.core-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:1rem;max-width:820px;width:100%;}
.core-grid-item{display:flex;flex-direction:column;align-items:center;gap:0.4rem;padding:0.8rem 0.5rem;background:var(--card);border:2px solid var(--border);border-radius:14px;box-shadow:3px 3px 0 var(--sketch);transition:transform 0.2s;opacity:0;animation:cinemaFadeUp 0.4s ease forwards;animation-delay:calc(var(--i) * 60ms);}
.core-grid-item:hover{transform:translateY(-3px) rotate(0.5deg);}
.core-grid-item:nth-child(even):hover{transform:translateY(-3px) rotate(-0.5deg);}
.core-avatar{position:relative;width:60px;height:60px;border-radius:50%;flex-shrink:0;border:2.5px solid var(--border);box-shadow:2px 2px 0 var(--sketch);background:var(--ph-color,var(--bg2));overflow:hidden;display:flex;align-items:center;justify-content:center;}
.core-avatar-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:50%;}
.core-avatar-fallback{font-size:1.6rem;line-height:1;z-index:0;}
[data-theme="dark"] .core-avatar{background:var(--bg2) !important;}
.core-name{font-family:'Caveat',cursive;font-size:1rem;font-weight:700;color:var(--ink);text-align:center;line-height:1.15;}
.core-spirit-dog{font-size:0.72rem;color:var(--ink-soft);text-align:center;font-style:italic;line-height:1.2;margin-top:-0.1rem;}
.core-grid-item--has-popup{cursor:pointer;}
.core-grid-item--has-popup:hover{border-color:var(--accent);}

/* ── MEMBERS WALL ── */
.members-wall{display:flex;flex-wrap:wrap;justify-content:center;gap:0.55rem;max-width:820px;width:100%;}
.member-pill{font-family:'Caveat',cursive;font-size:1.08rem;font-weight:700;color:var(--ink);background:var(--card);border:2px solid var(--border);border-radius:20px;padding:0.4rem 1rem;box-shadow:2px 2px 0 var(--sketch);transition:all 0.18s;opacity:0;animation:cinemaFadeUp 0.35s ease forwards;animation-delay:calc(var(--i) * 40ms);}
.member-pill:hover{border-color:var(--accent);color:var(--accent);transform:translateY(-2px);}

/* ── KEYFRAMES ── */
@keyframes cinemaFadeUp{from{opacity:0;transform:translateY(16px);}to{opacity:1;transform:translateY(0);}}
@keyframes cinemaProgress{from{width:0;}to{width:100%;}}

/* ── POPUP MODAL ── */
/* ── POPUP MODAL ── */
.team-popup-overlay{position:fixed;inset:0;z-index:1000;background:rgba(0,0,0,0.5);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;opacity:0;pointer-events:none;transition:opacity 0.3s;padding:1rem;}
.team-popup-overlay.active{opacity:1;pointer-events:auto;}
.team-popup-card{background:var(--card);border:2.5px solid var(--border);border-radius:24px;padding:2rem;flex:1;min-width:0;max-height:90vh;display:flex;flex-direction:row;gap:2rem;align-items:flex-start;box-shadow:8px 8px 0 var(--sketch);position:relative;transform:scale(0.92);transition:transform 0.25s;overflow:hidden;}
.team-popup-overlay.active .team-popup-card{transform:scale(1);}
.team-popup-frame{display:flex;flex-direction:row;align-items:center;gap:0.9rem;max-width:800px;width:95%;}
.team-popup-nav{flex-shrink:0;width:2.6rem;height:2.6rem;border-radius:50%;border:2px solid var(--border);background:var(--bg2);color:var(--ink);display:flex;align-items:center;justify-content:center;font-size:1.7rem;line-height:1;cursor:pointer;box-shadow:2px 2px 0 var(--sketch);transition:background 0.15s,color 0.15s,border-color 0.15s;z-index:2;}
.team-popup-nav:hover{background:var(--accent);color:#fff;border-color:var(--accent);}
.team-popup-nav[disabled]{opacity:0.45;cursor:not-allowed;}
.team-popup-close{position:absolute;top:0.8rem;right:1rem;background:none;border:none;font-size:1.6rem;color:var(--ink-soft);cursor:pointer;line-height:1;padding:0.2rem;transition:color 0.15s;z-index:2;}
.team-popup-close:hover{color:var(--accent);}
.team-popup-media{flex-shrink:0;width:240px;display:flex;flex-direction:column;align-items:center;gap:0.8rem;}
.team-popup-avatar{width:100%;aspect-ratio:3/4;border-radius:16px;border:3px solid var(--border);box-shadow:4px 4px 0 var(--sketch);background:var(--bg2);overflow:hidden;display:flex;align-items:center;justify-content:center;}
.team-popup-avatar--zoomable{cursor:zoom-in;transition:transform 0.2s,box-shadow 0.2s;}
.team-popup-avatar--zoomable:hover{transform:translateY(-2px);box-shadow:6px 6px 0 var(--sketch);}
.team-popup-avatar-img{width:100%;height:100%;object-fit:cover;border-radius:14px;}
.team-popup-emoji{font-size:3.5rem;line-height:1;}
.team-popup-img-strip{display:none;flex-direction:row;gap:0.45rem;flex-wrap:wrap;justify-content:center;}
.team-popup-img-strip.has-thumbs{display:flex;}
.popup-thumb{width:50px;height:50px;border-radius:50%;border:2px solid var(--border);overflow:hidden;cursor:pointer;padding:0;background:var(--bg2);flex-shrink:0;transition:border-color 0.18s,box-shadow 0.18s;}
.popup-thumb.active{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent);}
.popup-thumb:hover{border-color:var(--accent);}
.popup-thumb img{width:100%;height:100%;object-fit:cover;border-radius:50%;display:block;}
.team-popup-content{flex:1;min-width:0;overflow-y:auto;max-height:calc(90vh - 4rem);display:flex;flex-direction:column;gap:0.3rem;padding-top:2rem;padding-right:0.3rem;}
.team-popup-name{font-family:'Caveat',cursive;font-size:1.9rem;font-weight:700;margin:0 0 0.2rem;color:var(--ink);}
.team-popup-role{display:block;font-size:0.95rem;color:var(--accent);font-weight:600;margin-bottom:0.1rem;}
.team-popup-batch{display:block;font-size:0.82rem;color:var(--ink-soft);margin-bottom:0.5rem;}
.team-popup-spirit-dog{display:block;font-size:0.85rem;margin-bottom:0.8rem;color:var(--ink-soft);}
.team-popup-spirit-dog-label{color:var(--ink-soft);}
.team-popup-spirit-dog-link{color:var(--accent);font-weight:600;text-decoration:underline;cursor:pointer;text-underline-offset:2px;}
.team-popup-spirit-dog-link:hover{opacity:0.75;}
.team-popup-bio{font-size:0.92rem;color:var(--ink-soft);line-height:1.7;margin:0;}
@media(max-width:620px){
  .team-popup-card{flex-direction:column;padding:1.4rem 1.2rem 1.2rem;gap:1.2rem;overflow-y:auto;max-height:90vh;}
  .team-popup-frame{gap:0.5rem;width:100%;padding:0 0.25rem;}
  .team-popup-nav{width:2.1rem;height:2.1rem;font-size:1.4rem;flex-shrink:0;}
  .team-popup-media{width:100%;max-width:200px;margin:0 auto;}
  .team-popup-avatar{aspect-ratio:1/1;}
  .team-popup-content{max-height:none;overflow-y:visible;padding-top:0;padding-right:0;}
}

/* ── Cinema responsive ── */
@media(max-width:768px){
  .cinema-stage{padding:0 1.2rem 2.5rem;min-height:auto;}
  .cinema-avatar{width:100px;height:100px;}
  .cinema-name{font-size:1.5rem;}
  .cinema-card{padding:1.4rem 1.2rem;gap:1rem;}
  .cinema-nav-arrow{width:32px;height:32px;font-size:0.95rem;}
  .core-grid{grid-template-columns:repeat(auto-fill,minmax(95px,1fr));gap:0.8rem;}
  .core-avatar{width:50px;height:50px;}
}
@media(max-width:480px){
  .cinema-avatar{width:80px;height:80px;}
  .cinema-name{font-size:1.3rem;}
  .cinema-card{flex-direction:column;text-align:center;padding:1.2rem 1rem;}
  .cinema-info{align-items:center;}
  .cinema-card-wrap{min-height:260px;}
  .core-grid{grid-template-columns:repeat(auto-fill,minmax(80px,1fr));}
  .core-avatar{width:44px;height:44px;}
  .core-name{font-size:0.88rem;}
  .member-pill{font-size:0.95rem;padding:0.3rem 0.8rem;}
}

/* GALLERY */
.gallery-grid{display:grid;grid-template-columns:repeat(3,1fr);grid-auto-rows:210px;gap:1.2rem;max-width:1100px;margin:2rem auto;padding:0 2rem 4rem;}
.gallery-item{background:var(--card);border:2.5px solid var(--border);border-radius:16px;overflow:hidden;box-shadow:5px 5px 0 var(--sketch);cursor:pointer;transition:transform 0.25s,box-shadow 0.25s;position:relative;}
.gallery-item:hover{transform:translateY(-5px) rotate(0.6deg);box-shadow:8px 8px 0 var(--sketch);}
.gallery-item:nth-child(even):hover{transform:translateY(-5px) rotate(-0.6deg);}
.gallery-item:nth-child(1){grid-column:span 2;grid-row:span 2;}
.gallery-item:nth-child(5){grid-column:span 2;}
.gallery-thumb{width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-size:3.5rem;transition:transform 0.3s;}
.gallery-item:hover .gallery-thumb{transform:scale(1.08);}
.gallery-item:nth-child(1) .gallery-thumb{background:linear-gradient(135deg,#ffe0c8,#ffc8a0);font-size:6rem;}
.gallery-item:nth-child(2) .gallery-thumb{background:linear-gradient(135deg,#c8e8c8,#a8d8a8);}
.gallery-item:nth-child(3) .gallery-thumb{background:linear-gradient(135deg,#fff0c0,#ffe080);}
.gallery-item:nth-child(4) .gallery-thumb{background:linear-gradient(135deg,#e0c8f0,#d0b0e8);}
.gallery-item:nth-child(5) .gallery-thumb{background:linear-gradient(135deg,#c8e8e0,#a0d8d0);}
.gallery-item:nth-child(6) .gallery-thumb{background:linear-gradient(135deg,#f8c8c8,#f0a0a0);}
[data-theme="dark"] .gallery-item:nth-child(1) .gallery-thumb{background:linear-gradient(135deg,#3d1a0a,#4d2010);}
[data-theme="dark"] .gallery-item:nth-child(2) .gallery-thumb{background:linear-gradient(135deg,#0a2d0a,#0d3a0d);}
[data-theme="dark"] .gallery-item:nth-child(3) .gallery-thumb{background:linear-gradient(135deg,#2d2208,#3d2c0d);}
[data-theme="dark"] .gallery-item:nth-child(4) .gallery-thumb{background:linear-gradient(135deg,#1a0a2d,#200d38);}
[data-theme="dark"] .gallery-item:nth-child(5) .gallery-thumb{background:linear-gradient(135deg,#082d22,#0d3828);}
[data-theme="dark"] .gallery-item:nth-child(6) .gallery-thumb{background:linear-gradient(135deg,#2d0808,#380d0d);}
.gallery-overlay{position:absolute;inset:0;background:rgba(45,32,19,0.82);opacity:0;transition:opacity 0.3s;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#fdf8f0;padding:1.2rem;text-align:center;}
.gallery-item:hover .gallery-overlay{opacity:1;}
.gallery-overlay h4{font-family:'Caveat',cursive;font-size:1.35rem;font-weight:700;margin-bottom:0.3rem;}
.gallery-overlay p{font-size:0.82rem;opacity:0.8;margin-bottom:0.8rem;line-height:1.5;}
.gallery-view-btn{font-family:'Caveat',cursive;font-size:1rem;border:2px solid #fdf8f0;border-radius:10px;padding:0.25rem 0.9rem;color:#fdf8f0;background:transparent;cursor:pointer;}

/* MEDIA SECTION — photo & video grid */
.media-section{max-width:1200px;margin:0 auto;padding:1rem 2rem 4rem;}
.media-section-title{font-family:'Caveat',cursive;font-size:2.2rem;font-weight:700;text-align:center;margin-bottom:0.4rem;transform:rotate(-0.5deg);}
.media-section-sub{text-align:center;font-size:1rem;color:var(--ink-soft);margin-bottom:2rem;}
.media-grid{columns:4 180px;gap:0.75rem;}
.media-tile{break-inside:avoid;margin-bottom:0.75rem;position:relative;border:2px solid var(--border);border-radius:12px;overflow:hidden;cursor:pointer;box-shadow:3px 3px 0 var(--sketch);transition:transform 0.2s,box-shadow 0.2s;}
.media-tile:hover{transform:translateY(-3px) rotate(0.4deg);box-shadow:6px 6px 0 var(--sketch);}
@keyframes shimmer{0%{background-position:-600px 0;}100%{background-position:600px 0;}}
.media-tile-loading{min-height:160px;background:linear-gradient(90deg,var(--bg2) 25%,var(--border) 50%,var(--bg2) 75%);background-size:1200px 100%;animation:shimmer 1.4s ease-in-out infinite;}
.media-tile img{width:100%;height:auto;display:block;opacity:0;transition:opacity 0.5s ease;}
.media-tile img.loaded{opacity:1;}
.media-tile-overlay{position:absolute;inset:0;background:rgba(45,32,19,0.6);opacity:0;transition:opacity 0.25s;display:flex;align-items:center;justify-content:center;color:#fdf8f0;font-size:1.6rem;}
.media-tile:hover .media-tile-overlay{opacity:1;}
.video-tile{aspect-ratio:16/9;cursor:default;}
.video-tile.vt-loading{background:linear-gradient(90deg,var(--bg2) 25%,var(--border) 50%,var(--bg2) 75%);background-size:1200px 100%;animation:shimmer 1.4s ease-in-out infinite;}
.video-tile.vt-loading .vt-video{opacity:0;}
.video-tile.vt-loading .vt-enlarge-btn{display:none;}
.vt-video{width:100%;height:100%;object-fit:cover;display:block;opacity:1;transition:opacity 0.4s ease;}
.vt-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(10,8,4,0.35);transition:opacity 0.25s;}
.video-tile.playing .vt-overlay{opacity:0;pointer-events:none;}
.vt-play-btn{width:3.2rem;height:3.2rem;border-radius:50%;background:rgba(253,248,240,0.92);border:none;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:1.2rem;color:#2d2013;box-shadow:0 2px 12px rgba(0,0,0,0.4);transition:transform 0.15s,background 0.15s;padding-left:0.15rem;}
.vt-play-btn:hover{background:#fff;transform:scale(1.1);}
.vt-enlarge-btn{position:absolute;bottom:0.5rem;right:0.5rem;width:2rem;height:2rem;border-radius:8px;background:rgba(10,8,4,0.55);border:1.5px solid rgba(253,248,240,0.3);color:#fdf8f0;display:flex;align-items:center;justify-content:center;cursor:pointer;opacity:0;transition:opacity 0.2s,background 0.15s;z-index:2;}
.media-tile:hover .vt-enlarge-btn,.video-tile.playing .vt-enlarge-btn{opacity:1;}
.vt-enlarge-btn:hover{background:rgba(232,101,74,0.85);border-color:transparent;}

/* IMAGE LIGHTBOX */
.img-lightbox{display:none;position:fixed;inset:0;z-index:1300;background:rgba(10,8,4,0.95);backdrop-filter:blur(8px);align-items:center;justify-content:center;}
.img-lightbox.open{display:flex;}
.lb-inner{position:relative;max-width:90vw;max-height:90vh;display:flex;flex-direction:column;align-items:center;gap:0.6rem;}
.lb-inner img{max-width:90vw;max-height:82vh;border-radius:10px;display:block;object-fit:contain;transition:opacity 0.15s;}
.lb-counter{font-family:'Caveat',cursive;font-size:1rem;color:rgba(253,248,240,0.6);}
.lb-nav{position:fixed;top:50%;transform:translateY(-50%);background:rgba(253,248,240,0.1);border:2px solid rgba(253,248,240,0.2);border-radius:50%;width:3rem;height:3rem;display:flex;align-items:center;justify-content:center;cursor:pointer;color:#fdf8f0;font-size:2rem;line-height:1;transition:background 0.2s;z-index:1;}
.lb-nav:hover{background:rgba(253,248,240,0.25);}
.lb-prev{left:1.2rem;}
.lb-next{right:1.2rem;}
.lb-close{position:fixed;top:1rem;right:1.2rem;background:rgba(253,248,240,0.1);border:2px solid rgba(253,248,240,0.2);border-radius:50%;width:2.4rem;height:2.4rem;display:flex;align-items:center;justify-content:center;cursor:pointer;color:#fdf8f0;font-size:1.1rem;transition:background 0.2s;}
.lb-close:hover{background:rgba(253,248,240,0.25);}

/* VIDEO MODAL */
.video-modal-box{background:#000;border-radius:16px;overflow:hidden;max-width:90vw;width:860px;box-shadow:0 8px 40px rgba(0,0,0,0.7);}
.video-modal-box video{width:100%;display:block;aspect-ratio:16/9;}
.video-modal-box .modal-close{margin:0.8rem auto 0.8rem;}

/* MODAL */
.modal-bg{display:none;position:fixed;inset:0;z-index:500;background:rgba(29,20,10,0.88);backdrop-filter:blur(6px);align-items:center;justify-content:center;padding:2rem;}
.modal-bg.open{display:flex;}
.modal-box{background:var(--card);border:2.5px solid var(--border);border-radius:22px;max-width:560px;width:100%;overflow:hidden;box-shadow:8px 8px 0 rgba(45,32,19,0.3);animation:modalIn 0.3s ease;}
@keyframes modalIn{from{opacity:0;transform:scale(0.9) rotate(-1deg);}to{opacity:1;transform:scale(1) rotate(0);}}
.modal-thumb{height:240px;display:flex;align-items:center;justify-content:center;font-size:5rem;border-bottom:2px dashed var(--border);}
.modal-body{padding:1.8rem 2rem 2rem;}
.modal-body .m-tag{font-family:'Caveat',cursive;font-size:0.95rem;background:var(--accent);color:#fff;padding:0.2rem 0.8rem;border-radius:8px;display:inline-block;transform:rotate(-1deg);margin-bottom:0.7rem;}
.modal-body h3{font-family:'Caveat',cursive;font-size:1.7rem;font-weight:700;margin-bottom:0.5rem;}
.modal-body p{font-size:0.95rem;color:var(--ink-soft);line-height:1.7;}
.modal-close{font-family:'Caveat',cursive;font-size:1.1rem;font-weight:700;margin-top:1.3rem;display:block;margin-left:auto;background:var(--accent);color:#fff;border:2.5px solid var(--ink);padding:0.4rem 1.2rem;border-radius:10px;box-shadow:3px 3px 0 var(--ink);cursor:pointer;transition:all 0.2s;}
.modal-close:hover{transform:translate(-1px,-1px);box-shadow:5px 5px 0 var(--ink);}

/* DONATE */
.donate-inner{max-width:860px;margin:0 auto;padding:2rem 2rem 5rem;}
.donate-why{background:var(--card);border:2.5px solid var(--border);border-radius:20px;padding:2rem 2.2rem;box-shadow:5px 5px 0 var(--sketch);margin-bottom:2.5rem;display:flex;gap:1.5rem;align-items:flex-start;}
.donate-why .big-paw{font-size:3rem;flex-shrink:0;animation:pawBounce 2s ease-in-out infinite;}
.donate-why h3{font-family:'Caveat',cursive;font-size:1.6rem;font-weight:700;margin-bottom:0.4rem;}
.donate-why p{font-size:0.95rem;color:var(--ink-soft);line-height:1.7;}
.donate-grid{display:grid;grid-template-columns:1fr 1fr;gap:2rem;}
.donate-card{background:var(--card);border:2.5px solid var(--border);border-radius:20px;box-shadow:6px 6px 0 var(--sketch);overflow:hidden;transition:transform 0.2s;}
.donate-card:hover{transform:rotate(0.3deg);}
.donate-grid .donate-card:only-child{grid-column:1 / -1;justify-self:center;width:100%;max-width:720px;}
.donate-card-head{padding:1.5rem 1.8rem 1.2rem;border-bottom:2px dashed var(--border);}
.donate-card:nth-child(1) .donate-card-head{background:linear-gradient(135deg,#fff3d8,#ffe8a8);}
.donate-card:nth-child(2) .donate-card-head{background:linear-gradient(135deg,#d8edf8,#c0d8f0);}
[data-theme="dark"] .donate-card:nth-child(1) .donate-card-head{background:linear-gradient(135deg,#2d2208,#3d2c0d);}
[data-theme="dark"] .donate-card:nth-child(2) .donate-card-head{background:linear-gradient(135deg,#082028,#0d2a38);}
.donate-card-head h3{font-family:'Caveat',cursive;font-size:1.6rem;font-weight:700;margin-bottom:0.2rem;}
.donate-card-head p{font-size:0.88rem;color:var(--ink-soft);line-height:1.6;}
.donate-card-body{padding:1.5rem 1.8rem 2rem;}
.upi-qr-box{background:var(--bg2);border:2px dashed var(--border);border-radius:14px;padding:1.5rem;text-align:center;margin-bottom:1.2rem;display:flex;flex-direction:column;align-items:center;gap:0.7rem;}
.upi-qr-box .qr-icon{font-size:2.8rem;}
.upi-qr-box .qr-label{font-family:'Caveat',cursive;font-size:1rem;color:var(--ink-soft);}
.upi-qr-box .qr-note{font-size:0.75rem;color:var(--ink-soft);opacity:0.7;font-style:italic;}
.upi-qr-img{width:200px;height:200px;object-fit:contain;border-radius:8px;}
.upi-id-row{background:var(--bg2);border:2px solid var(--border);border-radius:12px;padding:0.8rem 1rem;display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:0.5rem;}
.upi-id-text{font-family:'Caveat',cursive;font-size:1.1rem;color:var(--ink);font-weight:600;}
.copy-btn{font-family:'Caveat',cursive;font-size:0.95rem;font-weight:700;background:var(--accent);color:#fff;border:2px solid var(--ink);border-radius:8px;padding:0.25rem 0.8rem;cursor:pointer;box-shadow:2px 2px 0 var(--ink);transition:all 0.2s;flex-shrink:0;}
.copy-btn:hover{transform:translate(-1px,-1px);box-shadow:3px 3px 0 var(--ink);}
.copy-btn.done{background:var(--accent3);}
.amount-chips{display:flex;flex-wrap:wrap;gap:0.5rem;margin-bottom:1rem;}
.chip{font-family:'Caveat',cursive;font-size:1rem;font-weight:600;background:var(--bg2);border:2px solid var(--border);border-radius:10px;padding:0.3rem 0.9rem;cursor:pointer;transition:all 0.2s;color:var(--ink);}
.chip:hover,.chip.selected{background:var(--accent);color:#fff;border-color:var(--accent);box-shadow:2px 2px 0 var(--ink);}
.amount-input-row{display:flex;gap:0.5rem;align-items:center;background:var(--bg2);border:2px solid var(--border);border-radius:12px;padding:0.5rem 0.8rem;margin-bottom:1rem;}
.amount-input-row span{font-family:'Caveat',cursive;font-size:1.2rem;color:var(--ink-soft);}
.amount-input-row input{background:transparent;border:none;outline:none;font-family:'Caveat',cursive;font-size:1.2rem;color:var(--ink);width:100%;}
.rzp-btn{width:100%;font-family:'Caveat',cursive;font-size:1.25rem;font-weight:700;background:#2563eb;color:#fff;border:2.5px solid var(--ink);border-radius:14px;padding:0.7rem 1rem;cursor:pointer;box-shadow:4px 4px 0 var(--ink);transition:all 0.2s;display:flex;align-items:center;justify-content:center;gap:0.5rem;}
.rzp-btn:hover{transform:translate(-2px,-2px);box-shadow:6px 6px 0 var(--ink);}
.rzp-note{font-size:0.75rem;color:var(--ink-soft);margin-top:0.6rem;font-style:italic;text-align:center;line-height:1.5;}

/* CONTACT */
.contact-inner{max-width:1000px;margin:0 auto;padding:2rem 2rem 5rem;}
.contact-grid{display:grid;grid-template-columns:1fr 1.4fr;gap:2.5rem;margin-top:2rem;}
.contact-info-card{background:var(--card);border:2.5px solid var(--border);border-radius:20px;padding:2rem;box-shadow:6px 6px 0 var(--sketch);}
.contact-info-card h3{font-family:'Caveat',cursive;font-size:1.6rem;font-weight:700;margin-bottom:1.5rem;}
.contact-row{display:flex;gap:1rem;align-items:flex-start;margin-bottom:1.4rem;}
.contact-icon{width:42px;height:42px;background:var(--bg2);border:2px solid var(--border);border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:1.25rem;box-shadow:2px 2px 0 var(--sketch);flex-shrink:0;}
.contact-row strong{display:block;font-family:'Caveat',cursive;font-size:1.05rem;font-weight:700;margin-bottom:0.1rem;}
.contact-row span{font-size:0.88rem;color:var(--ink-soft);}
.contact-row ul{margin:0.4rem 0 0.8rem 0;padding:0;list-style:none;}
.contact-row ul li{font-size:0.88rem;color:var(--ink-soft);margin-bottom:0.3rem;padding-left:1rem;position:relative;}
.contact-row ul li::before{content:'•';position:absolute;left:0;color:var(--accent);font-weight:bold;}
.contact-row ul{margin:0.4rem 0 0.8rem 0;padding:0;list-style:none;}
.contact-row ul li{font-size:0.88rem;color:var(--ink-soft);margin-bottom:0.3rem;padding-left:1rem;position:relative;}
.contact-row ul li::before{content:'•';position:absolute;left:0;color:var(--accent);font-weight:bold;}
.social-chips{display:flex;flex-wrap:wrap;gap:0.6rem;margin-top:1.5rem;}
.social-chip{font-family:'Caveat',cursive;font-size:1rem;font-weight:600;background:var(--bg2);border:2px solid var(--border);border-radius:20px;padding:0.35rem 0.9rem;cursor:pointer;transition:all 0.2s;color:var(--ink-soft);box-shadow:2px 2px 0 var(--sketch);text-decoration:none;display:inline-block;}
.social-chip:hover{background:var(--accent);color:#fff;border-color:var(--accent);transform:translate(-1px,-1px);box-shadow:4px 4px 0 var(--ink);}
.contact-form-card{background:var(--card);border:2.5px solid var(--border);border-radius:20px;padding:2rem 2.2rem;box-shadow:6px 6px 0 var(--sketch);}
.contact-form-card h3{font-family:'Caveat',cursive;font-size:1.6rem;font-weight:700;margin-bottom:1.5rem;}
.form-row-2{display:grid;grid-template-columns:1fr 1fr;gap:1rem;margin-bottom:1rem;}
.form-group{display:flex;flex-direction:column;gap:0.35rem;margin-bottom:1rem;}
.form-group label{font-family:'Caveat',cursive;font-size:1rem;font-weight:600;color:var(--ink-soft);}
.form-group input,.form-group select,.form-group textarea{background:var(--bg2);border:2px solid var(--border);border-radius:12px;padding:0.6rem 0.9rem;font-family:'Klee One',cursive;font-size:0.95rem;color:var(--ink);outline:none;transition:border-color 0.2s,box-shadow 0.2s;}
.form-group input:focus,.form-group select:focus,.form-group textarea:focus{border-color:var(--accent);box-shadow:3px 3px 0 var(--sketch);}
.form-group textarea{resize:vertical;min-height:100px;}
.form-submit{width:100%;font-family:'Caveat',cursive;font-size:1.3rem;font-weight:700;background:var(--accent);color:#fff;border:2.5px solid var(--ink);border-radius:14px;padding:0.7rem;cursor:pointer;box-shadow:4px 4px 0 var(--ink);transition:all 0.2s;margin-top:0.3rem;}
.form-submit:hover{transform:translate(-2px,-2px);box-shadow:6px 6px 0 var(--ink);}
.form-success{display:none;text-align:center;padding:1rem;font-family:'Caveat',cursive;font-size:1.2rem;color:var(--accent3);}
.form-error{display:none;text-align:center;padding:0.8rem 1rem;margin-top:0.8rem;font-family:'Caveat',cursive;font-size:1.05rem;color:var(--accent);background:var(--bg2);border:2px solid var(--accent);border-radius:12px;line-height:1.5;}

/* FOOTER */
footer {
  text-align: center;
  padding: 2rem 1.5rem 1.6rem;
  background: var(--bg2);
  border-top: 2px solid var(--border);
  color: var(--ink-soft);
  font-family: 'Caveat', cursive;
  position: relative;
  margin-top: auto;
  letter-spacing: 0.02em;
  line-height: 1.6;
}
footer::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent2), var(--accent3), transparent);
  opacity: 0.55;
  border-radius: 2px;
}
footer .footer-main {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.03em;
}
footer .footer-credit {
  display: block;
  font-size: 0.95rem;
  opacity: 0.55;
  font-weight: 400;
}
footer .footer-glow {
  font-weight: 700;
  opacity: 1;
}
footer .heart {
  color: var(--accent);
  animation: heartbeat 1.2s ease-in-out infinite;
  display: inline-block;
  margin: 0 0.1em;
}
footer a {
  color: var(--accent2);
  font-weight: 700;
  text-decoration: none;
  background: linear-gradient(90deg, var(--accent2) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  border-bottom: 1.5px dashed var(--accent2);
  padding-bottom: 1px;
  transition: border-color 0.2s;
}
footer a:hover {
  border-bottom: 2px solid var(--accent);
  opacity: 0.85;
}
footer .footer-sep {
  opacity: 0.45;
  margin: 0 0.35em;
  font-size: 0.95em;
}
@keyframes heartbeat{0%,100%{transform:scale(1);}50%{transform:scale(1.3);}}

/* TABLET — 4-col row collapses to 2×2 */
@media(max-width:900px) and (min-width:769px){
  .dept-grid-row{grid-template-columns:repeat(2,1fr);}
  .dept-highlights{grid-template-columns:1fr;}
  .what-we-do-cards{grid-template-columns:repeat(2,1fr);}
}

/* RESPONSIVE */
@media(max-width:768px){
  /* NAV — hamburger mode */
  nav{
    grid-template-columns: 1fr auto;
    padding: 0.85rem 1.1rem;
    position: relative;
  }
  .nav-links{
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.3rem;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 2.5px solid var(--border);
    padding: 0.9rem 1.1rem 1.1rem;
    z-index: 99;
    box-shadow: 0 8px 24px var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-link, .nav-donate {
    text-align: left;
    border-radius: 10px;
    padding: 0.6rem 0.9rem;
    font-size: 1.15rem;
  }
  .nav-donate { text-align: center; margin-top: 0.2rem; }
  .hamburger { display: flex; }

  /* HERO */
  .hero { min-height: 62vh; padding: 2.4rem 1.4rem 1.4rem; }
  .hero h1 { font-size: clamp(2.8rem,14vw,5rem); }
  .hero-tagline { font-size: 1.1rem; }

  /* SECTIONS */
  .section { padding: 2.5rem 1.2rem; }
  .page-header { padding: 2.5rem 1.2rem 1.5rem; }
  .section-title { font-size: 2rem; }

  /* STATS */
  .stats-strip { gap: 1.5rem; padding: 1.5rem 1rem; }
  .stat-num { font-size: 2.2rem; }

  /* CARDS */
  .cards { grid-template-columns: 1fr; }
  .what-we-do-cards { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .what-we-do-cards .card { padding: 1.2rem; }
  .what-we-do-cards .card-icon { font-size: 1.8rem; margin-bottom: 0.4rem; }
  .what-we-do-cards .card h3 { font-size: 1.2rem; }
  .what-we-do-cards .card p { font-size: 0.82rem; line-height: 1.5; }

  /* DOGS */
  .dogs-header { padding: 2.5rem 1.2rem 0.8rem !important; }
  .dogs-header h1 { font-size: clamp(2rem, 8vw, 3.5rem) !important; margin-bottom: 0.5rem !important; }
  .dogs-header p { font-size: 1rem !important; }
  .dogs-search-wrap { padding: 0 1.2rem 0.8rem; }
  .dogs-search { font-size: 1rem; padding: 0.45rem 0.9rem; }
  .dogs-grid {
    grid-template-columns: repeat(3, 1fr); gap: 0.5rem;
    padding: 0 1rem 2rem; margin: 0.5rem auto;
    grid-auto-rows: auto;
  }
  .dog-card { margin: 0; box-shadow: 2px 2px 0 var(--sketch); grid-row-end: auto !important; }
  .dog-card:hover { transform: none; box-shadow: 2px 2px 0 var(--sketch); }
  .dog-tile-photo { aspect-ratio: 1 / 1 !important; }
  .dog-tile-name {
    font-size: 0.85rem; padding: 0.3rem 0.4rem 0.35rem;
    white-space: normal; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; text-overflow: ellipsis; max-height: 2.4em;
  }
  .dog-tile-emoji { font-size: 2.5rem; }
  .dog-modal-overlay { padding: 0.5rem; align-items: flex-end; }
  .dog-modal {
    max-height: 85vh; border-radius: 20px 20px 10px 10px;
    box-shadow: 0 -4px 24px var(--shadow); animation: modalSlideUp 0.25s ease;
  }
  @keyframes modalSlideUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
  .dog-modal-photo { aspect-ratio: 3/2; }
  .dog-modal-body { padding: 1rem 1.2rem 1.4rem; }
  .dog-modal-name { font-size: 1.7rem; }
  .dog-modal-desc { font-size: 0.9rem; }
  .dog-modal-close { top: 0.5rem; right: 0.5rem; }

  /* DEPARTMENTS — 2×2 grid on mobile, cards stay intact */
  .dept-grid, .dept-grid-row { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; padding: 1.5rem 1rem 3rem; }
  .dept-top { padding: 1rem 0.9rem 0.8rem; }
  .dept-icon { font-size: 1.8rem; margin-bottom: 0.3rem; }
  .dept-num { font-size: 0.75rem; margin-bottom: 0.3rem; }
  .dept-card h3 { font-size: 1.15rem; }
  .dept-body { padding: 0.8rem 0.9rem; }
  .dept-body p { font-size: 0.8rem; line-height: 1.5; }
  .dept-cta { font-size: 0.9rem; }
  .dept-card { box-shadow: 3px 3px 0 var(--sketch); }
  .dept-card:hover { transform: none; box-shadow: 3px 3px 0 var(--sketch); }
  .dept-detail-hero { margin: 1rem 1.2rem; padding: 1.8rem 1.4rem; }
  .dept-detail-title { font-size: 2.1rem; }
  .dept-detail-back { padding: 1.5rem 1.2rem 0; }
  .dept-detail-content { padding: 0 1.2rem; }
  .dept-highlights { grid-template-columns: 1fr; }
  .dept-event-photos { grid-template-columns: 1fr; }
  .event-cards-grid { grid-template-columns: 1fr; }
  .dept-entry-card { gap: 0.75rem; padding: 0.75rem 0.85rem; }
  .dept-entry-thumb { width: 72px; height: 58px; }
  .dept-entry-modal-box { padding: 1.6rem 1.4rem; }
  .dept-donate-cta { padding: 1.4rem 1.2rem; }

  /* TEAM */
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid-section { padding: 1rem 1.2rem 3rem; }
  .team-photo-wrap { padding: 0 1.2rem; }
  .team-desc-block { padding: 0 1.2rem; }
  .team-section-wrap { padding: 0 1.2rem 2.5rem; }
  .team-grid-leadership { max-width: 100%; grid-template-columns: repeat(2, 1fr); }
  .team-grid-core { grid-template-columns: repeat(3, 1fr); }
  .team-members-grid { grid-template-columns: repeat(2, 1fr); }
  .team-tabs-wrap { top: 56px; padding: 0.5rem 1.2rem; }
  .team-tab { font-size: 1rem; padding: 0.35rem 1rem; }

  /* GALLERY */
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 160px;
    padding: 0 1.2rem 3rem;
  }
  .gallery-item:nth-child(1) { grid-column: span 2; }
  .gallery-item:nth-child(5) { grid-column: span 1; }

  /* MEDIA GRID */
  .media-grid { columns: 2; gap: 0.5rem; }
  .media-section { padding: 1rem 1.2rem 3rem; }
  .lb-prev { left: 0.4rem; }
  .lb-next { right: 0.4rem; }

  /* MODAL */
  .modal-bg { padding: 0.8rem; align-items: flex-end; }
  .modal-box { max-width: 100%; border-radius: 18px 18px 14px 14px; }
  .modal-thumb { height: 180px; }
  .modal-body { padding: 1.2rem 1.4rem 1.6rem; }

  /* DONATE */
  .donate-inner { padding: 1rem 1.2rem 4rem; }
  .donate-grid { grid-template-columns: 1fr; }
  .donate-why { flex-direction: column; gap: 0.8rem; }
  .donate-card-body { padding: 1.2rem 1.4rem 1.6rem; }

  /* CONTACT */
  .contact-inner { padding: 1rem 1.2rem 4rem; }
  .contact-grid { grid-template-columns: 1fr; }
  .form-row-2 { grid-template-columns: 1fr; }
  .contact-form-card { padding: 1.5rem 1.4rem; }
  .contact-info-card { padding: 1.5rem 1.4rem; }

  /* MANIFESTO */
  .manifesto { padding: 0 1.2rem 3rem; }

  /* DOODLES — hide on small screens to reduce clutter */
  .doodle { display: none; }

  /* ABOUT */
  .about-header { padding: 3rem 1.2rem 1.5rem !important; }
  .about-header h1 { font-size: clamp(2rem, 8vw, 3.5rem) !important; }
  .about-header p { font-size: 0.95rem !important; line-height: 1.7 !important; }
  .manifesto-block { padding: 1.6rem; margin-bottom: 1.2rem; }
  .manifesto-block h3 { font-size: 1.4rem; }

  /* HOME — disable hover transforms on touch */
  .card:hover { transform: none; box-shadow: 5px 5px 0 var(--sketch); }
  .hero-btn { font-size: 1.2rem; padding: 0.65rem 1.8rem; }

  /* DEPARTMENTS DETAIL */
  .dept-detail-hero { padding: 1.5rem 1.2rem; }
  .dept-detail-title { font-size: 1.9rem; }
  .dept-detail-tagline { font-size: 1.05rem; }
  .dept-detail-icon { font-size: 2.8rem; }
  .event-acc-top { padding: 0.9rem 1rem; gap: 0.7rem; }
  .event-acc-img { width: 48px; height: 48px; font-size: 1.6rem; }
  .event-acc-title { font-size: 1.05rem; }
  .event-acc-body-inner { padding: 0.7rem 1rem 1rem; }
  .social-connect-item { padding: 0.8rem 1rem; }
  .social-connect-label { font-size: 1.05rem; }
  .social-connect-sub { font-size: 0.78rem; }
  .dept-donate-cta { padding: 1.2rem 1rem; }
  .dept-donate-btn { font-size: 1.15rem; padding: 0.6rem 1.5rem; }

  /* TEAM */
  .team-grid-4col { grid-template-columns: repeat(2, 1fr); }
  .team-card { padding: 1.2rem 0.8rem; box-shadow: 3px 3px 0 var(--sketch); }
  .team-card:hover { transform: none; }
  .team-card h4 { font-size: 1.05rem; }
  .team-card .role { font-size: 0.78rem; }
  .team-photo-avatar { width: 72px; height: 72px; }
  .team-grid-leadership .team-photo-avatar { width: 82px; height: 82px; }
  .team-section-sub { font-size: 1.15rem; }

  /* DONATE */
  .donate-why { padding: 1.4rem 1.2rem; gap: 1rem; flex-direction: column; align-items: center; text-align: center; }
  .donate-why .big-paw { font-size: 2.5rem; }
  .donate-why h3 { font-size: 1.4rem; }
  .donate-card-head { padding: 1.2rem 1.2rem 1rem; }
  .donate-card-head h3 { font-size: 1.35rem; }
  .donate-card-body { padding: 1.2rem; }
  .upi-qr-img { width: 160px; height: 160px; }
  .amount-chips { gap: 0.4rem; }
  .chip { font-size: 0.95rem; padding: 0.25rem 0.7rem; }
  .rzp-btn { font-size: 1.1rem; padding: 0.6rem 0.8rem; }

  /* CONTACT */
  .contact-form-card h3, .contact-info-card h3 { font-size: 1.4rem; }
  .form-group input, .form-group select, .form-group textarea {
    font-size: 1rem; padding: 0.7rem 0.9rem;
  }
  .form-submit { font-size: 1.15rem; padding: 0.7rem; }
  .contact-icon { width: 36px; height: 36px; font-size: 1.1rem; }

  /* GALLERY LIGHTBOX */
  .lb-nav { width: 2.5rem; height: 2.5rem; font-size: 1.5rem; }
  .lb-close { width: 2.2rem; height: 2.2rem; }
  .video-modal-box { max-width: 95vw; border-radius: 12px; }

  /* IN MEMORIAM — uniform grid like dogs, no masonry */
  .memoriam-header-section { padding: 2.5rem 1.2rem 1.2rem; }
  .memoriam-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: auto !important;
    gap: 0.5rem !important;
    padding: 0 1rem 2rem;
    margin: 0.5rem auto;
  }
  .memorial-card {
    margin: 0;
    box-shadow: 2px 2px 0 var(--sketch);
    grid-row-end: auto !important;
  }
  .memorial-card .dog-tile-photo {
    aspect-ratio: 1 / 1 !important;
  }
  /* Disable hover color-reveal on touch — handled by long-press .lit class */
  .memorial-card:hover .memorial-card-inner {
    filter: grayscale(1) contrast(0.92);
  }
  .memorial-card:hover .memorial-candle {
    transform: none;
    filter: none;
    animation: candleFlicker 2.8s ease-in-out infinite;
  }
  /* Make candle tappable on mobile (larger touch target) */
  .memorial-candle {
    pointer-events: auto;
    padding: 0.5rem;
    margin: -0.5rem;
    font-size: 1.1rem;
  }

  /* TOUCH TARGETS — ensure 48px minimum */
  .nav-link, .nav-donate {
    min-height: 48px;
    display: flex;
    align-items: center;
  }
  .chip {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .team-tab {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .form-group input, .form-group select, .form-group textarea {
    min-height: 48px;
  }

  /* FOOTER */
  footer { padding: 1.5rem 1rem; }
  footer .footer-main { font-size: 1.1rem; }
  footer .footer-credit { font-size: 0.88rem; }
}

/* INTERMEDIATE — tighter gaps for small tablets / large phones */
@media(max-width:600px){
  .dept-grid, .dept-grid-row { gap: 0.6rem; padding: 1.2rem 0.8rem 2.5rem; }
  .dept-top { padding: 0.9rem 0.8rem 0.7rem; }
  .dept-icon { font-size: 1.6rem; }
  .dept-card h3 { font-size: 1.1rem; }
  .dept-body p { font-size: 0.78rem; }
  .what-we-do-cards { gap: 0.6rem; }
  .what-we-do-cards .card { padding: 1rem; }
  .what-we-do-cards .card h3 { font-size: 1.1rem; }
  .what-we-do-cards .card p { font-size: 0.8rem; }
}

@media(max-width:420px){
  .logo { font-size: 1.6rem; }
  .hero h1 { font-size: clamp(2.4rem,16vw,3.5rem); }
  .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 180px; }
  .gallery-item:nth-child(1), .gallery-item:nth-child(5) { grid-column: span 1; }
  .media-grid { columns: 1; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid-leadership { grid-template-columns: repeat(2, 1fr); }
  .team-hero-img { max-height: 35vh; }
  .team-grid-core { grid-template-columns: repeat(2, 1fr); }
  .team-members-grid { grid-template-columns: repeat(2, 1fr); }
  .team-tabs-wrap { top: 50px; padding: 0.45rem 0.8rem; }
  .team-tab { font-size: 0.95rem; padding: 0.3rem 0.85rem; }
  .stats-strip {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 0.9rem;
    padding: 1rem 0.75rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }
  .stat {
    flex: 0 0 auto;
    min-width: 118px;
    scroll-snap-align: start;
  }
  .stat-num { font-size: 1.8rem; }
  .stat-label { font-size: 0.8rem; }
  .social-chips { gap: 0.4rem; }
  .social-chip { font-size: 0.88rem; padding: 0.3rem 0.7rem; }

  /* ABOUT */
  .about-header { padding: 2rem 0.8rem 1rem !important; }
  .about-header p { font-size: 0.9rem !important; }
  .manifesto-block { padding: 1.3rem; }
  .manifesto-block .tag { font-size: 0.85rem; }

  /* HOME */
  .hero-tagline { font-size: 0.95rem; max-width: 85vw; }
  .hero-btn { font-size: 1.1rem; padding: 0.55rem 1.5rem; }
  .hero-badge { font-size: 0.85rem; padding: 0.2rem 0.7rem; }
  .what-we-do-cards { grid-template-columns: 1fr; }
  .what-we-do-cards .card { padding: 1.4rem; }
  .card-icon { font-size: 2rem; margin-bottom: 0.5rem; }
  .card h3 { font-size: 1.3rem; }
  .card p { font-size: 0.88rem; }

  /* DOGS */
  .dogs-header { padding: 2rem 0.8rem 0.6rem !important; }
  .dogs-search-wrap { padding: 0 0.8rem 0.6rem; }
  .dogs-search { font-size: 0.95rem; padding: 0.4rem 0.8rem; min-width: 120px; }
  .dogs-count { font-size: 0.9rem; }
  .dogs-grid { grid-template-columns: repeat(2, 1fr); gap: 0.4rem; padding: 0 0.6rem 2rem; }
  .dog-tile-name { font-size: 0.9rem; max-height: 2.6em; }
  .dog-modal-name { font-size: 1.5rem; }
  .dog-modal-body { padding: 0.9rem 1rem 1.2rem; }
  .dog-modal-breed { font-size: 0.8rem; }
  .dog-modal-tag { font-size: 0.72rem; padding: 0.15rem 0.5rem; }

  /* DEPARTMENTS — tighter for small phones, still 2×2 */
  .dept-grid, .dept-grid-row { gap: 0.5rem; padding: 1rem 0.6rem 2rem; }
  .dept-top { padding: 0.75rem 0.65rem 0.6rem; }
  .dept-icon { font-size: 1.4rem; margin-bottom: 0.2rem; }
  .dept-num { font-size: 0.65rem; margin-bottom: 0.2rem; }
  .dept-card h3 { font-size: 1rem; }
  .dept-body { padding: 0.6rem 0.65rem; gap: 0.5rem; }
  .dept-body p { font-size: 0.72rem; line-height: 1.45; }
  .dept-cta { font-size: 0.82rem; }
  .dept-card { border-width: 2px; border-radius: 14px; }
  .dept-detail-hero { margin: 0.8rem 0.8rem; padding: 1.4rem 1rem; }
  .dept-detail-title { font-size: 1.7rem; }
  .dept-detail-tagline { font-size: 0.95rem; }
  .dept-detail-content { padding: 0 0.8rem; }
  .dept-detail-back { padding: 1rem 0.8rem 0; }
  .dept-highlight-card { padding: 0.9rem; }
  .dept-highlight-card strong { font-size: 1rem; }
  .dept-highlight-card p { font-size: 0.8rem; }
  .dept-entry-thumb { display: none; }
  .dept-entry-modal-box { padding: 1.2rem 1rem; max-height: 92vh; }
  .event-acc-title { font-size: 0.95rem; }
  .event-acc-img { width: 40px; height: 40px; font-size: 1.3rem; border-radius: 10px; }

  /* TEAM */
  .page-header h1 { font-size: clamp(1.8rem, 8vw, 2.5rem); }
  .page-header p { font-size: 0.95rem; }
  .team-photo-caption { font-size: 0.9rem; padding: 0.5rem 1rem; }
  .team-desc-block .manifesto-block { padding: 1.3rem; }
  .team-grid-4col { grid-template-columns: repeat(2, 1fr); }
  .dept-heads-grid { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
  .team-card-photo { padding: 1rem 0.7rem 0.9rem; }
  .team-photo-avatar { width: 64px; height: 64px; }
  .team-grid-leadership .team-photo-avatar { width: 72px; height: 72px; }
  .team-card h4 { font-size: 1rem; }
  .team-card .role { font-size: 0.72rem; }
  .team-card .batch, .team-card .dept { font-size: 0.72rem; }
  .team-section-sub { font-size: 1.05rem; margin: 1.2rem 0 0.6rem; }
  .team-section-wrap { padding: 0 0.8rem 2rem; }
  .team-grid-section { padding: 0.8rem 0.8rem 2rem; }
  .members-list li { padding: 0.45rem 0.7rem; }
  .members-list .m-name { font-size: 0.95rem; }

  /* DONATE */
  .donate-inner { padding: 0.8rem 0.8rem 3rem; }
  .donate-why h3 { font-size: 1.25rem; }
  .donate-why p { font-size: 0.88rem; }
  .upi-qr-img { width: 140px; height: 140px; }
  .upi-id-row { padding: 0.6rem 0.8rem; gap: 0.6rem; }
  .upi-id-text { font-size: 0.95rem; }
  .copy-btn { font-size: 0.85rem; padding: 0.2rem 0.6rem; }
  .amount-chips { gap: 0.35rem; }
  .chip { font-size: 0.88rem; padding: 0.2rem 0.6rem; }
  .amount-input-row { padding: 0.4rem 0.6rem; }
  .rzp-btn { font-size: 1rem; }
  .donate-card-head h3 { font-size: 1.2rem; }

  /* CONTACT */
  .contact-inner { padding: 0.8rem 0.8rem 3rem; }
  .contact-info-card { padding: 1.2rem; }
  .contact-form-card { padding: 1.2rem; }
  .contact-info-card h3, .contact-form-card h3 { font-size: 1.25rem; margin-bottom: 1rem; }
  .contact-row { gap: 0.7rem; margin-bottom: 1rem; }
  .contact-icon { width: 32px; height: 32px; font-size: 1rem; }
  .contact-row strong { font-size: 0.95rem; }
  .contact-row span { font-size: 0.82rem; }
  .form-group label { font-size: 0.9rem; }
  .form-submit { font-size: 1.1rem; }

  /* GALLERY / LIGHTBOX */
  .media-section { padding: 0.5rem 0.8rem 3rem; }
  .media-section-title { font-size: 1.8rem; }
  .media-section-sub { font-size: 0.9rem; margin-bottom: 1.2rem; }
  .lb-nav { width: 2.2rem; height: 2.2rem; font-size: 1.3rem; }
  .lb-prev { left: 0.2rem; }
  .lb-next { right: 0.2rem; }

  /* FOOTER */
  footer { padding: 1.2rem 0.8rem; }
  footer .footer-main { font-size: 1rem; }
  footer .footer-credit { font-size: 0.82rem; }
  footer .footer-sep { margin: 0 0.2em; }
}

/* ═══════════════════════════════════════════════════════
   IN MEMORIAM PAGE
   Everything inside .memoriam-page-wrap renders in greyscale.
   The modal is appended to <body> (outside the wrapper),
   so it naturally shows in full colour — no extra JS needed.
   ═══════════════════════════════════════════════════════ */

/* ── Greyscale: removed from wrapper — header and card-inner handle it
   separately so the candle (outside .memorial-card-inner) can light up
   instantly while the rest of the card transitions in after a delay ── */
.memoriam-page-wrap {
  /* no filter here */
}

/* ── Page header: always greyscale ── */
.memoriam-header-section {
  filter: grayscale(1) contrast(0.92);
  text-align: center;
  padding: 4rem 2rem 1.5rem;
}
.memoriam-heading {
  font-family: 'Caveat', cursive;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  transform: rotate(-0.5deg);
  margin-bottom: 0.6rem;
  color: var(--ink);
}
.memoriam-quote {
  font-family: 'Caveat', cursive;
  font-size: 1.25rem;
  color: var(--ink-soft);
  margin: 0 auto 1rem;
}
.memoriam-rule {
  border: none;
  border-top: 1.5px solid var(--border);
  max-width: 160px;
  margin: 0 auto 1rem;
  opacity: 0.6;
}
.memoriam-subtext {
  color: var(--ink-soft);
  font-size: 1rem;
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.55;
}

/* ── Memorial grid (same masonry layout as dogs grid) ── */
.memoriam-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr));
  grid-auto-rows: 4px;
  gap: 0;
  width: 100%;
  max-width: 1200px;
  margin: 0.5rem auto 3rem;
  padding: 0.5rem 1.5rem 2rem;
  align-items: start;
  overflow-x: clip;
}

.memoriam-subsection-block {
  max-width: 1200px;
  margin: 1.2rem auto 0.8rem;
  padding: 0.5rem 1.5rem;
  text-align: center;
  filter: grayscale(1) contrast(0.92);
}

.memoriam-subsection-title {
  margin: 0.7rem 0 0.4rem;
  font-family: 'Caveat', cursive;
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-align: center;
}

.memoriam-subsection-note {
  margin: 0 auto;
  max-width: 760px;
  font-size: 0.93rem;
  line-height: 1.55;
  color: var(--ink-soft);
  text-align: center;
}

/* ── Memorial card — no filter here; candle lives at this level ── */
.memorial-card {
  position: relative;
}
.memorial-card .dog-tile-name {
  color: var(--ink);
}

/* ── Inner wrapper carries the greyscale; transitions to colour
   after the candle has had 0.4s to light up first ── */
.memorial-card-inner {
  filter: grayscale(1) contrast(0.92);
  transition: filter 1.1s ease 0.4s;
  border-radius: inherit;
  overflow: hidden;
}
.memorial-card:hover .memorial-card-inner {
  filter: grayscale(0) contrast(1);
}

/* ── Dates badge on tile ── */
.memorial-tile-dates {
  font-family: 'Caveat', cursive;
  font-size: 0.78rem;
  text-align: center;
  color: var(--ink-soft);
  padding: 0 0.5rem 0.45rem;
  opacity: 0.75;
}

/* ── Candle — sibling of .memorial-card-inner, NOT inside it.
   Free of any greyscale, so it lights up instantly on hover ── */
.memorial-candle {
  position: absolute;
  top: 0.4rem;
  right: 0.45rem;
  font-size: 1rem;
  line-height: 1;
  pointer-events: none;
  transform-origin: bottom center;
  animation: candleFlicker 2.8s ease-in-out infinite;
  /* snap immediately — candle must light before card colour arrives */
  transition: transform 0.25s ease, filter 0.3s ease;
  z-index: 1;
}
.memorial-card:hover .memorial-candle {
  transform: scale(1.6);
  filter: drop-shadow(0 0 4px rgba(255, 160, 0, 1))
          drop-shadow(0 0 12px rgba(255, 80, 0, 0.65));
  animation: candleLit 1s ease-in-out infinite;
}

@keyframes candleFlicker {
  0%,  100% { opacity: 1;    transform: scaleY(1)    rotate(0deg);   }
  20%        { opacity: 0.88; transform: scaleY(0.97) rotate(-0.4deg); }
  45%        { opacity: 0.72; transform: scaleY(0.93) rotate(0.5deg);  }
  65%        { opacity: 0.92; transform: scaleY(0.98) rotate(-0.3deg); }
  80%        { opacity: 0.80; transform: scaleY(0.95) rotate(0.2deg);  }
}

/* Brighter, livelier flicker used when the candle is lit on hover */
@keyframes candleLit {
  0%,  100% { opacity: 1;    transform: scale(1.6) scaleY(1)    rotate(0deg);    }
  25%        { opacity: 0.95; transform: scale(1.65) scaleY(1.06) rotate(-0.5deg); }
  55%        { opacity: 0.98; transform: scale(1.56) scaleY(0.96) rotate(0.4deg);  }
  80%        { opacity: 0.93; transform: scale(1.62) scaleY(1.03) rotate(-0.3deg); }
}

/* ── Nav button: memoriam gets a subdued active state ── */
#nav-memoriam.active {
  color: var(--ink-soft);
  background: var(--sketch);
}
#nav-memoriam.active::after {
  background: var(--ink-soft);
}

/* ── Memorial modal: full colour (lives outside .memoriam-page-wrap) ── */
.memorial-modal-overlay {
  /* re-asserts full colour by being outside the grayscale wrapper */
}
.memorial-modal-photo-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--bg2);
  overflow: hidden;
}
.memorial-modal-photo-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.memorial-modal-dates {
  font-family: 'Caveat', cursive;
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin-bottom: 0.75rem;
  letter-spacing: 0.03em;
}

/* ── Responsive tweaks ── */
@media (max-width: 480px) {
  .memoriam-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
    padding: 0.5rem 0.75rem 2rem;
  }
  .memoriam-subsection-block {
    padding: 0.4rem 0.75rem;
    margin: 1rem auto 0.6rem;
  }
  .memoriam-subsection-note {
    font-size: 0.9rem;
  }
  .memoriam-header-section { padding: 3rem 1.2rem 1.2rem; }
}
@media (max-width: 360px) {
  .memoriam-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.35rem;
    padding: 0.5rem 0.5rem 2rem;
  }
}

/* ── .lit state — long-press colour reveal on touch devices ── */
.memorial-card.lit .memorial-card-inner {
  filter: grayscale(0) contrast(1);
}
.memorial-card.lit .memorial-candle {
  transform: scale(1.6);
  filter: drop-shadow(0 0 4px rgba(255, 160, 0, 1))
          drop-shadow(0 0 12px rgba(255, 80, 0, 0.65));
  animation: candleLit 1s ease-in-out infinite;
}

/* ── Long-press hint toast ── */
.memoriam-hint {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--card);
  color: var(--ink);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 0.6rem 1.2rem;
  font-family: 'Caveat', cursive;
  font-size: 1.05rem;
  box-shadow: 4px 4px 0 var(--sketch);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
  z-index: 500;
  white-space: nowrap;
}
.memoriam-hint.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Landscape modal fix ── */
@media (orientation: landscape) and (max-height: 500px) {
  .dog-modal-overlay, .memorial-modal-overlay {
    align-items: center;
  }
  .dog-modal {
    max-height: 95vh;
    border-radius: 16px;
  }
  .dog-modal-photo {
    aspect-ratio: 16/9;
    max-height: 40vh;
  }
  .dog-modal-body {
    padding: 0.8rem 1rem;
  }
  .dept-entry-modal-box {
    max-height: 95vh;
  }
}
