:root {
  --ink: #161616;
  --muted: #5f5c57;
  --paper: #ffffff;
  --white: #fffcf7;
  --green: #1a6b54;
  --green-dark: #145343;
  --gold: #b8892d;
  --gold-soft: rgba(184, 137, 45, 0.22);
  --line: #e6dfd2;
  --dark: #111111;
  --max: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: "Source Sans 3", "Noto Sans SC", "Source Sans Pro", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, video, iframe, svg { max-width: 100%; }
img { height: auto; display: block; }
main { flex: 1; min-width: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.page-home .logo-banner { display: none; }
.page-home main {
  display: flex;
  flex-direction: column;
  padding: 0;
}
.home-film {
  position: relative;
  flex: 1;
  min-height: calc(100dvh - 148px);
  background: #f4f1ea;
  overflow: hidden;
}
.home-film-video,
.home-film-lockup {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
}
.home-film-video {
  object-fit: contain;
  object-position: center;
  filter: contrast(1.06) saturate(1.05);
  transition: opacity 0.4s ease;
}
.home-film-lockup {
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f1ea;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}
.home-film-lockup img {
  width: min(980px, 88vw);
  height: auto;
  max-height: min(68vh, 520px);
  object-fit: contain;
}
.home-film.is-frozen .home-film-video {
  opacity: 0;
}
.home-film.is-frozen .home-film-lockup {
  opacity: 1;
}
.home-film.is-frozen .home-sound {
  opacity: 0;
  pointer-events: none;
}
.home-sound {
  position: absolute;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 3;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(22, 22, 22, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  color: #1a6b54;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.35s ease, background 0.2s ease, border-color 0.2s ease;
}
.home-sound:hover {
  background: #fff;
  border-color: #b8892d;
  color: #b8892d;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.site-header.is-stuck {
  box-shadow: 0 8px 24px rgba(22, 22, 22, 0.06);
}
.logo-banner {
  background: #fff;
  padding: 36px 24px 8px;
  display: flex;
  justify-content: center;
}
.logo-banner a {
  display: block;
  width: min(760px, 92%);
}
.logo-banner img {
  width: 100%;
  height: auto;
}
.page-inner .logo-banner {
  padding: 28px 24px 4px;
}
.page-inner .logo-banner a {
  width: min(520px, 86%);
}
.page-home .logo-banner {
  display: none;
}
.aim-title,
.gallery-heading {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
  font-size: clamp(26px, 3vw, 36px);
  margin: 0 0 20px;
}
.gallery-heading { margin: 48px 0 20px; text-align: center; }
.split + .split { margin-top: 48px; }
.split.reverse { direction: rtl; }
.split.reverse > * { direction: ltr; }

.welcome {
  text-align: center;
  max-width: 640px;
  margin: 48px auto 56px;
}
.welcome .kicker {
  margin: 0;
  font-family: Montserrat, sans-serif;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.welcome h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(36px, 5vw, 48px);
  margin: 8px 0 16px;
  font-weight: 600;
}
.welcome p { color: var(--muted); margin: 0 0 22px; }
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  font-family: Montserrat, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  color: var(--ink);
  border-radius: 2px;
}
.btn-outline:hover { background: var(--ink); color: #fff; }

.event-feed { display: grid; gap: 22px; margin-bottom: 16px; }
.feed-card {
  display: grid;
  grid-template-columns: minmax(160px, 280px) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  border: 1px solid var(--line);
  background: #fff;
  overflow: hidden;
}
.feed-card img {
  width: 100%;
  height: auto;
  max-height: 240px;
  object-fit: contain;
  background: #faf7f0;
  align-self: stretch;
}
.feed-card img.feed-cover {
  height: 100%;
  min-height: 180px;
  max-height: none;
  object-fit: cover;
  background: #1a1a1a;
}
.feed-card > div {
  padding: 18px 22px 20px 0;
  min-width: 0;
}
.feed-card h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(20px, 2.4vw, 24px);
  margin: 0 0 8px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.feed-card p { margin: 0; color: var(--muted); font-size: 15px; }
.feed-date {
  margin: 0 0 6px;
  font-family: Montserrat, sans-serif;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.feed-card .card-link { margin-top: 12px; display: inline-block; }
.taichi h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(26px, 3vw, 36px);
  margin: 0 0 14px;
  font-weight: 600;
}
.taichi p { color: #444; margin: 0 0 24px; max-width: 760px; }
.post { max-width: 860px; }
.post > img,
.post-hero { width: 100%; margin: 8px 0 22px; }
.post-hero {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #f4f1ea;
}
.post-hero-fit {
  aspect-ratio: auto;
  max-height: 440px;
  object-fit: contain;
}
.post-kicker {
  margin: 0 0 14px;
  font-family: Montserrat, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
}
.post-body a { color: var(--green); text-decoration: underline; overflow-wrap: anywhere; }
.post-body p { margin: 0 0 14px; }
.post-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 6px 0 28px;
}
.post-gallery img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: #f4f1ea;
}
.post-gallery img.span-2 {
  grid-column: 1 / -1;
  height: 280px;
}
.post-gallery img.span-2.photo-fit {
  height: auto;
  max-height: 520px;
  object-fit: contain;
}
.nav-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  min-width: 0;
}
.brand img {
  height: 48px;
  width: auto;
  display: block;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-text strong {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--green);
}
.brand-text em {
  font-style: normal;
  font-family: Montserrat, sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7a756c;
}
.hamburger {
  display: none;
  margin-left: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}
.admin-slot {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex: 0 0 auto;
  z-index: 2;
}
.admin-btn {
  display: inline-flex;
  align-items: center;
  border: 0;
  background: none;
  cursor: pointer;
  color: #7a756c;
  font-family: Montserrat, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 8px 10px;
  min-height: 44px;
}
.admin-btn:hover { color: var(--green); }
.admin-btn-out { color: #9b1b1e; }
.admin-btn-out:hover { color: #9b1b1e; }
.admin-badge {
  display: none;
  font-family: Montserrat, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
  padding: 0 6px;
}
#admin-session {
  display: flex;
  align-items: center;
  gap: 2px;
}
body.is-admin .site-header {
  border-top: 2px solid var(--gold);
}
body.is-admin .site-header.is-stuck {
  box-shadow: 0 8px 24px rgba(22, 22, 22, 0.06);
}
.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(22, 22, 22, 0.45);
}
.admin-modal-card {
  position: relative;
  width: min(420px, 100%);
  background: #fff;
  padding: 36px 28px 28px;
  box-shadow: 0 24px 60px rgba(22, 22, 22, 0.18);
}
.admin-modal-card h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 28px;
  margin: 4px 0 10px;
  font-weight: 600;
}
.admin-modal-card > p { margin: 0 0 18px; color: var(--muted); }
.admin-modal-close {
  position: absolute;
  top: 6px;
  right: 10px;
  border: 0;
  background: none;
  color: #666;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}
.admin-panel {
  position: fixed;
  right: 0;
  bottom: 0;
  width: min(480px, 100%);
  z-index: 55;
  overflow: auto;
  background: #fff;
  box-shadow: -12px 0 40px rgba(22, 22, 22, 0.12);
  padding: 20px 22px 48px;
}
.admin-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
  position: relative;
  padding-right: 36px;
}
.admin-panel-head h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 26px;
  margin: 4px 0 0;
  font-weight: 600;
}
.admin-panel-list { margin-top: 36px; }
.admin-panel-list h3 {
  font-family: "Playfair Display", Georgia, serif;
  margin: 4px 0 16px;
  font-weight: 600;
}
.admin-panel .admin-modal-close {
  top: 12px;
  right: 12px;
}
.nav {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0;
}
.nav > li { position: relative; }
.nav a,
.nav-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 9px;
  color: #3a3a3a;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: Montserrat, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.nav a:hover,
.nav-btn:hover,
.nav a.is-active { color: var(--green); }
.nav a.nav-cta {
  margin-left: 8px;
  padding: 8px 14px;
  background: var(--green);
  color: #fff !important;
  border-radius: 999px;
  letter-spacing: 0.1em;
}
.nav a.nav-cta:hover { background: var(--green-dark); }
.dropdown {
  display: none;
  position: absolute;
  top: calc(100% - 2px);
  left: 0;
  min-width: 210px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.08);
  padding: 8px 0;
  z-index: 60;
}
.nav > li:hover > .dropdown,
.nav > li.open > .dropdown { display: block; }
.dropdown a {
  display: block;
  padding: 10px 18px;
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 15px;
  font-weight: 400;
  font-family: "Source Sans 3", "Source Sans Pro", sans-serif;
  color: #333;
}
.dropdown a:hover,
.dropdown a.is-active {
  color: var(--green);
  background: #f7f3ea;
}

.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
  background: #0d0d0d;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 12, 10, 0.82) 0%, rgba(8, 12, 10, 0.45) 46%, rgba(8, 12, 10, 0.18) 100%),
    linear-gradient(180deg, rgba(8, 12, 10, 0.15) 0%, rgba(8, 12, 10, 0.55) 100%),
    url("/images/kungfu-kids.jpg") center 30% / cover no-repeat;
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding: 64px 24px 72px;
  max-width: 720px;
  margin: 0;
}
.hero-kicker {
  margin: 0 0 12px;
  font-family: Montserrat, sans-serif;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #e3c16a;
}
.hero h1 {
  margin: 0 0 16px;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.hero p.lede {
  margin: 0 0 28px;
  max-width: 540px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn,
.btn-ghost,
.form-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  font-family: Montserrat, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 999px;
  cursor: pointer;
}
.btn {
  background: var(--green);
  color: #fff;
  border: 1px solid var(--green);
}
.btn:hover { background: var(--green-dark); }
.btn-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.65);
}
.btn-ghost:hover { border-color: #e3c16a; color: #e3c16a; }
.form-btn {
  background: var(--green);
  color: #fff;
  border: 0;
  width: fit-content;
}
.form-btn:hover { background: var(--green-dark); }

.band { padding: 80px 24px; }
.band-tight { padding: 56px 24px; }
.band-dark {
  background:
    linear-gradient(180deg, rgba(17, 17, 17, 0.78), rgba(17, 17, 17, 0.88)),
    url("/images/generational-taichi.jpg") center 40% / cover no-repeat;
  color: #fff;
}
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
  min-width: 0;
}
.section-head {
  margin: 0 0 36px;
  max-width: 680px;
}
.section-head.center,
.band-dark .section-head {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.eyebrow {
  margin: 0 0 8px;
  font-family: Montserrat, sans-serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
.section-head h2,
.page-hero h1,
.section-title {
  font-family: "Playfair Display", "Noto Sans SC", Georgia, serif;
  font-weight: 600;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.15;
  margin: 0;
}
.section-head p { margin: 12px 0 0; color: var(--muted); }
.band-dark .section-head p { color: rgba(255, 255, 255, 0.78); }
.band-dark .hero-actions { justify-content: center; margin-top: 28px; }

.page-hero {
  padding: 20px 24px 0;
  background: transparent;
}
.page-hero .wrap {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.page-hero h1 {
  padding-bottom: 18px;
  overflow-wrap: anywhere;
}

.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.card {
  background: var(--white);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(70, 50, 20, 0.05);
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
a.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 40px rgba(70, 50, 20, 0.12);
}
.card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
}
.card img[alt*="Taichi"] { object-position: center 72%; }
.card img[alt*="Defence"] { object-position: center 35%; }
.card-body { padding: 22px 22px 26px; flex: 1; display: flex; flex-direction: column; }
.card h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 24px;
  margin: 0 0 8px;
  font-weight: 600;
}
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card-link {
  margin-top: auto;
  padding-top: 16px;
  color: var(--green);
  font-family: Montserrat, sans-serif;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}

.prose {
  max-width: 760px;
  color: #444;
}
.prose p { margin: 0 0 16px; }

.cards-4,
.org-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.person, .org-item {
  background: var(--white);
  padding: 28px 24px;
  border: 1px solid var(--line);
}
.person h3, .org-item h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 22px;
  margin: 0 0 6px;
  font-weight: 600;
}
.person p, .org-item p { margin: 0; color: var(--muted); font-size: 15px; }
.person {
  text-align: center;
  border-top: 3px solid var(--gold);
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 40px;
  align-items: center;
}
.split img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border: 1px solid var(--line);
}
.donate-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--line);
  min-height: 360px;
  padding: 36px;
}
.donate-visual img,
.split .donate-visual img {
  width: min(320px, 100%);
  height: auto;
  max-height: 320px;
  object-fit: contain;
  border: 0;
}
.split-copy h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(24px, 3vw, 32px);
  margin: 0 0 12px;
  font-weight: 600;
}
.split-copy p { margin: 0 0 12px; color: var(--muted); }

.bank {
  margin-top: 18px;
  padding: 18px 20px;
  background: var(--dark);
  color: #fff;
}
.bank strong {
  color: #e3c16a;
  display: block;
  font-size: clamp(15px, 4vw, 18px);
  margin: 6px 0;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

.gallery { margin-top: 8px; }
.gallery-frame {
  position: relative;
  overflow: hidden;
  background: #111;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
}
.gallery-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease;
}
.gallery-track img {
  min-width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 252, 247, 0.92);
  cursor: pointer;
  font-size: 22px;
}
.gallery-btn.prev { left: 12px; }
.gallery-btn.next { right: 12px; }
.thumbs {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 14px;
}
.thumbs button {
  border: 2px solid transparent;
  padding: 0;
  width: 68px;
  height: 48px;
  cursor: pointer;
  background: none;
}
.thumbs button.is-on { border-color: var(--gold); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }

.event-card {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 0;
  background: var(--white);
  border: 1px solid var(--line);
  overflow: hidden;
}
.event-copy { padding: 36px 32px; }
.event-copy h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 30px;
  margin: 8px 0 12px;
  font-weight: 600;
}
.video-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  height: 0;
  min-height: 0;
  background: #000;
}
.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 24px;
}
.panel {
  background: var(--white);
  padding: 32px;
  border: 1px solid var(--line);
}
form { display: grid; gap: 14px; }
label { font-size: 14px; color: var(--muted); }
input, textarea, select {
  width: 100%;
  max-width: 100%;
  border: 0;
  border-bottom: 1px solid #ddd;
  padding: 10px 0;
  background: transparent;
  font: inherit;
  font-size: 16px;
}
input:focus, textarea:focus { outline: none; border-bottom-color: var(--green); }
.contact-aside {
  background: var(--dark);
  color: #fff;
  padding: 36px 28px;
}
.contact-aside h2 {
  font-family: "Playfair Display", Georgia, serif;
  margin: 0 0 10px;
  font-weight: 600;
}
.contact-aside p { color: rgba(255, 255, 255, 0.7); }

.empty {
  background: var(--white);
  padding: 56px 24px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
}

.news-stack #wushuNews,
.news-stack #judgesNews2026 {
  padding: 0 0 32px;
  max-width: none;
}
.news-stack { min-width: 0; }

.site-footer {
  background: var(--dark);
  color: #9a9a9a;
  padding: 28px 24px calc(28px + env(safe-area-inset-bottom));
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ddd;
}
.footer-inner img { height: 36px; }

.drawer {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(88vw, 340px);
  background: #111;
  color: #f7f7f7;
  transform: translateX(-110%);
  transition: transform 0.3s ease;
  z-index: 80;
  overflow: auto;
  padding: calc(56px + env(safe-area-inset-top)) 24px calc(32px + env(safe-area-inset-bottom));
}
.drawer.open { transform: none; }
.drawer a {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 18px;
}
.drawer div a {
  font-size: 15px;
  color: #aaa;
  padding: 8px 0 8px 8px;
  border: 0;
}
.drawer-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: 0;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
}
.backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 70;
}
.backdrop.show { display: block; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
[hidden] { display: none !important; }
.form-success { display: none; padding: 16px; background: #eef7f2; }
.form-success.show { display: block; }
.form-error {
  margin: 0;
  color: #9b1b1e;
  font-size: 14px;
}
.form-ok {
  margin: 0;
  color: var(--green);
  font-size: 14px;
}

.funding-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.funding-group + .funding-group {
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}
.zh-heading {
  font-family: "Noto Sans SC", "Playfair Display", Georgia, serif;
  font-weight: 700;
}
.funding-card {
  background: var(--white);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
a.funding-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 40px rgba(70, 50, 20, 0.12);
}
.funding-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
}
.funding-body { padding: 22px 22px 26px; }
.funding-card h3 {
  font-family: "Playfair Display", "Noto Sans SC", Georgia, serif;
  font-size: clamp(22px, 3vw, 28px);
  margin: 0 0 8px;
  font-weight: 600;
}
.funding-card p { margin: 0 0 10px; color: var(--muted); }
.funding-count {
  margin: 0 0 4px !important;
  font-family: Montserrat, sans-serif;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold) !important;
  font-weight: 700;
}
.funding-card .card-link { padding-top: 8px; }
.funding-back { margin: 0 0 28px; }
.funding-detail h2 { margin-top: 0; }
.funding-total {
  margin-top: 16px !important;
  color: var(--green) !important;
  font-weight: 700;
}
.funding-log { margin-top: 56px; }
.footprints { margin-top: 64px; }
.footprint-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}
.footprint-filter {
  border: 1px solid var(--line);
  background: #fff;
  color: #3a3a3a;
  cursor: pointer;
  font-family: Montserrat, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px 14px;
}
.footprint-filter:hover { border-color: var(--green); color: var(--green); }
.footprint-filter[data-filter="youth"]:not(.is-on) { box-shadow: inset 0 -3px 0 #b8892d; }
.footprint-filter[data-filter="community"]:not(.is-on) { box-shadow: inset 0 -3px 0 #1a6b54; }
.footprint-filter[data-filter="taichi"]:not(.is-on) { box-shadow: inset 0 -3px 0 #3d7ea6; }
.footprint-filter[data-filter="defence"]:not(.is-on) { box-shadow: inset 0 -3px 0 #c45c26; }
.footprint-filter.is-on {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.footprint-map {
  height: 460px;
  width: 100%;
  border: 1px solid var(--line);
  background: #eef3f0;
  isolation: isolate;
  z-index: 1;
}
.footprint-empty {
  margin: 12px 0 0;
  color: var(--muted);
}
.foot-popup h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 18px;
  margin: 4px 0 8px;
}
.foot-popup p { margin: 0 0 8px; }
.foot-popup-kicker,
.foot-popup-amount {
  font-family: Montserrat, sans-serif;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--gold);
}
.leaflet-container { font-family: inherit; }
.record-map {
  margin-top: 14px;
  border: 0;
  background: none;
  padding: 0;
  color: var(--green);
  cursor: pointer;
  font-family: Montserrat, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.record-card.is-target {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.where-field { position: relative; }
.where-hint {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.where-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% - 8px);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(22, 22, 22, 0.1);
  z-index: 30;
  max-height: 220px;
  overflow: auto;
}
.where-option {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: 10px 12px;
  cursor: pointer;
  color: var(--ink);
  font-size: 14px;
}
.where-option:last-child { border-bottom: 0; }
.where-option:hover { background: #f6f3ec; color: var(--green); }
.funding-admin-link {
  margin: 22px 0 0;
  text-align: center;
}
.funding-admin-link a {
  color: var(--green);
  font-family: Montserrat, sans-serif;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}
.record-list { display: grid; gap: 10px; }
.record-card {
  border: 1px solid var(--line);
  background: #fff;
  padding: 0;
  overflow: hidden;
}
.record-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.record-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px 14px;
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 14px 16px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.record-summary:hover { background: #faf7f0; }
.record-amount {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--green);
  white-space: nowrap;
}
.record-amount.is-text {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 16px;
}
.record-where {
  margin: 0;
  color: #444;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  font-size: 15px;
}
.record-date {
  margin: 0;
  font-family: Montserrat, sans-serif;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
}
.record-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid #8a867e;
  border-bottom: 2px solid #8a867e;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  justify-self: end;
}
.record-card.is-open .record-chevron {
  transform: rotate(225deg);
  margin-top: 4px;
}
.record-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  padding-right: 12px;
}
.record-detail {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid var(--line);
}
.record-card.is-open .record-detail {
  display: block;
  padding-top: 14px;
}
.record-fields {
  display: grid;
  gap: 12px;
}
.record-fields span {
  display: block;
  font-family: Montserrat, sans-serif;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}
.record-fields p { margin: 0; color: #444; white-space: pre-wrap; }
.record-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin: 14px 0 4px;
}
.record-photos a { display: block; }
.record-photos img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: #f4f1ea;
}
.photo-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
  margin: 10px 0 16px;
}
.photo-chip {
  position: relative;
  border: 1px solid var(--line);
  background: #faf7f0;
}
.photo-chip img {
  display: block;
  width: 100%;
  height: 92px;
  object-fit: cover;
}
.photo-chip-remove {
  display: block;
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  background: #fff;
  color: #9b1b1e;
  cursor: pointer;
  font-size: 11px;
  font-family: Montserrat, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 6px 4px;
}
.record-edit,
.record-delete {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-family: Montserrat, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 8px 12px;
}
.record-edit:hover { border-color: var(--green); color: var(--green); }
.record-delete { color: #9b1b1e; }
.record-delete:hover { border-color: #9b1b1e; }
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.funding-admin { max-width: 760px; }
.funding-admin-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(26px, 4vw, 34px);
  margin: 8px 0 10px;
  font-weight: 600;
}
.funding-admin-lead { margin: 0 0 18px; color: var(--muted); }
.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
select:focus { outline: none; border-bottom-color: var(--green); }

@media (min-width: 1181px) {
  .brand { display: none; }
  .nav-wrap {
    display: flex;
    max-width: none;
    justify-content: flex-start;
    gap: 8px;
  }
  .nav {
    flex: 1;
    justify-content: center;
    min-width: 0;
  }
  .admin-slot {
    flex: 0 0 auto;
    position: static;
    top: auto;
    right: auto;
    transform: none;
    margin-left: 0;
  }
}
@media (max-width: 1180px) {
  .hamburger { display: inline-flex; }
  .nav { display: none; }
  .brand { display: flex; }
  .nav-wrap { justify-content: space-between; }
  .cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feed-card { grid-template-columns: 1fr; }
  .feed-card img {
    max-height: none;
    background: #fff;
  }
  .feed-card > div { padding: 16px 22px 20px; }
}
@media (max-width: 900px) {
  .cards-3, .org-grid, .split, .event-card, .contact-grid, .feed-card, .funding-grid {
    grid-template-columns: 1fr;
  }
  .split.reverse { direction: ltr; }
  .split > img {
    height: auto;
    aspect-ratio: 16 / 10;
  }
  .feed-card img {
    max-height: none;
    background: #fff;
  }
  .feed-card > div { padding: 16px 18px 20px; }
  .donate-visual {
    min-height: 0;
    padding: 28px 20px;
  }
  .band { padding: 48px 18px; }
  .band-tight { padding: 36px 18px; }
  .page-hero { padding: 8px 18px 0; }
  .logo-banner { padding: 20px 16px 4px; }
  .page-home .logo-banner { padding: 28px 16px 56px; }
  .page-inner .logo-banner a { width: min(380px, 82%); }
  .event-copy { padding: 24px 20px; }
  .panel { padding: 22px 18px; }
  .contact-aside { padding: 24px 20px; }
  .person { min-height: 0; padding: 22px 16px; }
  .hero { min-height: 72vh; align-items: center; }
  .hero-inner { padding: 72px 20px 48px; }
  .form-btn { width: 100%; max-width: 280px; }
  .form-actions .form-btn { width: auto; max-width: none; }
}
@media (min-width: 1500px) {
  .admin-badge { display: inline; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .cards-3, .cards-4, .org-grid, .funding-grid { grid-template-columns: 1fr; }
  .footer-inner {
    justify-content: center;
    text-align: center;
    flex-direction: column;
  }
  .page-hero h1,
  .section-head h2,
  .section-title {
    font-size: clamp(24px, 7.2vw, 34px);
  }
  .card img { height: 200px; }
  .thumbs button { width: 52px; height: 38px; }
  .gallery-btn {
    width: 40px;
    height: 40px;
  }
  .gallery-btn.prev { left: 8px; }
  .gallery-btn.next { right: 8px; }
  .brand img { height: 40px; }
  .welcome { margin: 32px auto 40px; }
  .welcome h2 { font-size: clamp(28px, 8vw, 40px); }
  .drawer { width: min(92vw, 360px); }
  .admin-badge { display: none; }
  .admin-btn { padding: 8px 6px; font-size: 10px; }
  .footprint-map { height: 320px; }
  .record-summary { padding: 12px; gap: 8px 10px; }
  .record-amount { font-size: 18px; }
  .record-edit, .record-delete { padding: 6px 8px; }
  .home-film { min-height: calc(100dvh - 168px); }
  .home-film-lockup img {
    width: min(920px, 90vw);
    max-height: min(52vh, 360px);
  }
  .post-gallery { grid-template-columns: 1fr; }
  .post-gallery img,
  .post-gallery img.span-2 { height: 200px; }
  .post-gallery img.span-2.photo-fit { height: auto; max-height: 360px; }
}
@media (max-width: 380px) {
  .brand-text em { letter-spacing: 0.08em; font-size: 8px; }
  .nav-wrap { gap: 10px; }
  .band, .band-tight, .page-hero { padding-left: 14px; padding-right: 14px; }
}
@media (hover: none) {
  a.card:hover,
  a.funding-card:hover {
    transform: none;
    box-shadow: none;
  }
}
