/* =========================================================
   MY CLOVE CLUB — stylesheet
   แก้สีธีมทั้งเว็บได้ที่ :root ด้านล่างนี้จุดเดียว
   ========================================================= */
:root {
  /* พาเลตนี้อิงจาก mockup สีสันสดใสที่ user ส่งมา (ริบบิ้นชมพูสด, ตัวเลขนับถอยหลังสีม่วงคราม,
     โซนนับถอยหลังโทนลาเวนเดอร์): เข้มและอิ่มตัวขึ้นกว่าพาเลตเดิมที่หม่นมินิมอล */
  --green-dark:  #2F6B49;
  --green-mid:   #4F9268;
  --green-light: #DFF0DC;
  --green-pastel: #BEE7C9;
  --cream-bg:    #FAF6EC;
  --pink-soft:   #FBE1E8;
  --pink-mid:    #F3AFC4;
  --pink-accent: #F17CA0;
  --pink-deep:   #E0387D;
  --purple:      #4B4E9E;
  --lavender:    #EDE6F7;
  --gold:        #D7A855;
  --ink:         #3B342E;
  --white:       #FFFFFF;

  --font-display: 'Baloo 2', 'Sarabun', sans-serif;
  --font-body:    'Sarabun', sans-serif;

  --radius-lg: 22px;
  --radius-md: 14px;
  --shadow-soft: 0 6px 18px rgba(58, 46, 39, 0.08);
}

* { box-sizing: border-box; }

html { overflow-x: hidden; }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--cream-bg);
  font-family: var(--font-body);
  color: var(--ink);
  /* ลายจุดใบโคลเวอร์จางๆ เป็นลายเซ็นของธีม */
  background-image: radial-gradient(circle, rgba(47,107,73,0.07) 2px, transparent 2px);
  background-size: 26px 26px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; }


/* ---------- setup notice (shown only if config.js has placeholder values) ---------- */
.setup-notice {
  background: #FFF3CD;
  color: #7A5B00;
  text-align: center;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 2px dashed #E0B94A;
}

/* ---------- header ---------- */
.site-header {
  position: relative;
  background: var(--green-pastel);
  padding: 6px 0;
  box-shadow: 0 2px 10px rgba(47,107,73,0.12);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}
.header-spacer { min-width: 0; display: flex; align-items: center; }
.header-logo { height: 52px; width: auto; object-fit: contain; }
.header-wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.3px;
  color: var(--green-dark);
  white-space: nowrap;
}
.header-wordmark::before { content: "🍀 "; }

.main-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; justify-self: center; }
.nav-link {
  color: var(--green-dark);
  font-weight: 600;
  font-size: 12px;
  padding: 6px 16px;
  border-radius: 20px;
  background: rgba(255,255,255,0.55);
  box-shadow: var(--shadow-soft);
}
.nav-link.active { color: var(--white); background: var(--green-dark); }

.header-meta { display: flex; align-items: center; gap: 10px; justify-self: end; }
.header-right {
  text-align: right;
  color: var(--green-dark);
  line-height: 1.3;
}
.header-fanclub-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.3px;
  color: var(--green-dark);
}
.header-fanclub-name::before { content: "♡ "; color: var(--pink-accent); }

/* ---------- icon row ---------- */
.icon-row {
  max-width: 1200px;
  margin: 18px auto;
  padding: 0 24px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}
.icon-row[hidden] { display: none; margin: 0; }
.icon-item {
  width: 62px; height: 62px;
  border-radius: 50%;
  background: var(--pink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: var(--shadow-soft);
  flex-direction: column;
}
.icon-item.wide {
  width: auto;
  padding: 0 16px;
  border-radius: 30px;
  flex-direction: row;
  gap: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--green-dark);
  background: var(--green-light);
  font-size: 14px;
}

/* ---------- hero ---------- */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: stretch;
}
.card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 16px;
}
.hero-center {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--white);
  padding: 10px 10px 12px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.hero-center::before, .hero-center::after {
  content: "";
  position: absolute; top: -8px;
  width: 50px; height: 18px;
  background: repeating-linear-gradient(135deg, var(--pink-accent) 0 6px, var(--pink-mid) 6px 12px);
  opacity: 0.85;
  border-radius: 3px;
  box-shadow: var(--shadow-soft);
}
.hero-center::before { left: 18px; transform: rotate(-6deg); }
.hero-center::after { right: 18px; transform: rotate(6deg); }
.hero-photo {
  flex: 1; min-height: 0; border-radius: var(--radius-md); box-shadow: var(--shadow-soft); width: 100%; object-fit: cover; display: block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hero-photo:hover { transform: translateY(-4px) scale(1.02); box-shadow: 0 10px 24px rgba(58, 46, 39, 0.18); }
.hero-photo-caption-row {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  gap: 10px;
  margin: 8px 0 0;
}
.hero-photo-caption {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--pink-deep);
  margin: 0;
  white-space: nowrap;
}
.hero-photo-clover { height: 16px; width: auto; flex-shrink: 0; }

.ranking-decor {
  position: absolute; top: -14px; right: 22px;
  color: var(--green-mid); font-size: 22px;
  transform: rotate(12deg);
}
.ranking-title, .expect-title {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 10px 30px;
  background: linear-gradient(135deg, var(--pink-accent), var(--pink-deep));
  color: var(--white);
  font-size: clamp(13px, 4vw, 16px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  box-shadow: var(--shadow-soft);
  clip-path: polygon(2% 0%, 98% 0%, 100% 50%, 98% 100%, 2% 100%, 0% 50%);
}
.ranking-title { margin: -30px 0 0; }
.election-name {
  text-align: center;
  font-size: 11px; font-weight: 700;
  color: var(--green-mid);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin: 10px 0 0;
  overflow-wrap: break-word;
}
.ranking-sub {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(16px, 4.5vw, 22px);
  color: var(--green-dark);
  letter-spacing: 0.3px;
  margin: 8px 0 4px;
  overflow-wrap: break-word;
}
.expect-title { margin: 8px 0 8px; }
.expect-list { list-style: none; padding: 0; margin: 0 auto 16px; display: flex; flex-direction: column; gap: 10px; width: fit-content; max-width: 100%; }
.expect-list li { display: flex; align-items: center; gap: 10px; }
.expect-rank {
  width: 24px; height: 24px; border-radius: 50%; color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.expect-rank.r1 { background: var(--pink-deep); }
.expect-rank.r2 { background: var(--purple); }
.expect-rank.r3 { background: var(--green-mid); }
.expect-song { font-weight: 700; font-size: 14px; color: var(--ink); }
.expect-source { font-size: 12px; color: #888; }

/* ---------- support / donation channels (nested inside hero-right card) ---------- */
.hero-support {
  position: relative;
  margin-top: 20px; padding-top: 16px;
  border-top: 1px dashed var(--pink-mid);
  display: flex; flex-direction: column; gap: 18px;
}
.hero-support::before {
  content: "";
  position: absolute; top: -10px; left: 18px;
  width: 64px; height: 20px;
  background: repeating-linear-gradient(135deg, var(--pink-accent) 0 6px, var(--pink-mid) 6px 12px);
  opacity: 0.85;
  transform: rotate(-8deg);
  border-radius: 3px;
  box-shadow: var(--shadow-soft);
}
.support-left h3, .support-right h3 {
  width: fit-content;
  margin: 0 auto 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--pink-accent), var(--pink-deep));
  font-size: 14px;
  font-weight: 700;
  padding: 6px 18px;
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
}
.qr-row { display: flex; gap: 14px; margin-top: 4px; }
.qr-card {
  position: relative;
  background: var(--cream-bg);
  border-radius: var(--radius-md);
  padding: 12px 10px; text-align: center; flex: 1; min-width: 0;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.qr-card.pink { border: 2px solid var(--pink-mid); }
.qr-card.green { border: 2px solid var(--green-mid); }
.qr-card:hover, .qr-card:active {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 10px 24px rgba(58, 46, 39, 0.18);
}
.qr-ribbon {
  display: inline-block; font-size: 12px; font-weight: 700; color: var(--white);
  padding: 3px 12px; border-radius: 12px; margin: 4px 0 8px;
}
.qr-card.pink .qr-ribbon { background: linear-gradient(90deg, var(--pink-mid), var(--pink-accent)); }
.qr-card.green .qr-ribbon { background: linear-gradient(90deg, var(--green-pastel), var(--green-mid)); }
.qr-card img { width: 100%; border-radius: 8px; display: block; }
.qr-card.pink img { border: 2px solid var(--pink-mid); }
.qr-card.green img { border: 2px solid var(--green-mid); }
.qr-save-btn {
  display: inline-block; margin-top: 8px;
  color: var(--white); font-size: 12px; font-weight: 700;
  padding: 6px 16px;
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.qr-card.pink .qr-save-btn { background: linear-gradient(135deg, var(--pink-accent), var(--pink-deep)); }
.qr-card.green .qr-save-btn { background: var(--green-mid); }
.qr-save-btn:hover, .qr-save-btn:active {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 18px rgba(58, 46, 39, 0.2);
}

.social-list { display: flex; flex-direction: row; flex-wrap: wrap; gap: 10px; justify-content: center; }
.social-btn {
  background: var(--cream-bg); border-radius: 24px; padding: 8px 14px;
  display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.social-btn:hover, .social-btn:active {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 18px rgba(58, 46, 39, 0.2);
}
.social-icon { display: flex; width: 22px; height: 22px; flex-shrink: 0; }
.social-icon svg { width: 100%; height: 100%; display: block; border-radius: 6px; }

/* ---------- ranking ---------- */
.ranking-section {
  position: relative; width: calc(100% - 48px); max-width: 1152px; margin: 0 auto 30px; padding: 20px 24px;
  background: var(--green-light); border: 2px solid var(--green-mid); border-radius: var(--radius-lg);
  text-align: center;
}
.ranking-decor-item { position: absolute; font-size: 26px; color: var(--green-mid); opacity: 0.7; }
.ranking-decor-item.deco-2 { bottom: 20px; left: 40px; transform: rotate(10deg); }
.ranking-decor-item.deco-4 { bottom: 26px; right: 60px; color: var(--gold); font-size: 16px; transform: rotate(-8deg); }

/* สติกเกอร์ดาวหน้ายิ้ม ใช้ซ้ำได้หลายจุด */
.star-sticker { position: absolute; display: block; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.15)); }
.ranking-section .deco-star { top: 18px; right: 32px; transform: rotate(12deg); }
.donation-star { top: 14px; right: 28px; transform: rotate(10deg); }

.ranking-tape {
  position: absolute; top: -10px; left: 60px;
  width: 60px; height: 20px;
  background: repeating-linear-gradient(135deg, var(--pink-accent) 0 6px, var(--pink-mid) 6px 12px);
  opacity: 0.85; transform: rotate(-6deg); border-radius: 3px;
  box-shadow: var(--shadow-soft);
}

.ranking-section h2 {
  position: relative; display: inline-block;
  font-size: 26px; color: var(--green-dark); margin: 0 0 14px;
}
.ranking-title-clover { color: var(--green-mid); font-size: 22px; vertical-align: middle; }
.ranking-section h2::after {
  content: ""; display: block; width: 65%; margin: 8px auto 0;
  border-bottom: 2px dashed var(--green-mid); border-radius: 50%;
}
.ranking-carousel {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 16px;
  padding: 6px 4px;
}
.ranking-card {
  background: var(--white); border-radius: var(--radius-md); padding: 12px 10px 8px; min-width: 140px;
  text-align: center; box-shadow: var(--shadow-soft); position: relative; flex-shrink: 0; overflow: hidden;
  cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ranking-card:nth-child(odd) { transform: rotate(-1.5deg); }
.ranking-card:nth-child(even) { transform: rotate(1.5deg); }
.ranking-card:hover, .ranking-card:active {
  transform: translateY(-4px) scale(1.04) rotate(0deg);
  box-shadow: 0 10px 24px rgba(58, 46, 39, 0.18);
}
.ranking-card:first-child {
  background: linear-gradient(180deg, #FCE7A6, var(--white));
  border: 3px solid var(--gold);
  box-shadow: 0 0 0 3px rgba(215, 168, 85, 0.25), var(--shadow-soft);
}
.ranking-card:nth-child(2) {
  background: linear-gradient(180deg, #DCE3E8, var(--white));
  border: 3px solid #94A3AF;
  box-shadow: 0 0 0 3px rgba(148, 163, 175, 0.25), var(--shadow-soft);
}
.ranking-card:nth-child(3) {
  background: linear-gradient(180deg, #F0CBA0, var(--white));
  border: 3px solid #B8672E;
  box-shadow: 0 0 0 3px rgba(184, 103, 46, 0.25), var(--shadow-soft);
}
.ranking-card img {
  width: 86px; height: 86px; border-radius: 50%; object-fit: cover; margin: 0 auto 4px; max-width: 100%;
  border: 3px dashed var(--green-mid); padding: 3px;
}
.ranking-badge { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; min-height: 50px; margin-bottom: 2px; }
.ranking-sparkle { position: absolute; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--gold); opacity: 0.9; }
.ranking-sparkle:first-of-type { left: -10px; }
.ranking-sparkle:last-of-type { right: -10px; }
.ranking-crown { width: 34px; height: 34px; border-radius: 50%; color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; box-shadow: var(--shadow-soft); flex-shrink: 0; }
.rank-crown-icon { font-size: 16px; line-height: 1; transform: rotate(-8deg); }
.rank-crown-icon.silver { filter: grayscale(1) brightness(1.15); }
.rank-crown-icon.bronze { filter: sepia(0.9) saturate(4) hue-rotate(5deg) brightness(0.72) contrast(1.2); }
.ranking-name {
  margin: 0;
  font-weight: 700; font-size: 15px; line-height: 1.6; color: var(--pink-deep);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}
.ranking-points {
  position: relative;
  margin: 10px 0 0; padding-top: 6px;
  border-top: 1px dashed var(--pink-mid);
  display: flex; flex-direction: column; align-items: center; line-height: 1.2;
}
.ranking-points::before {
  content: "♥"; position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
  background: var(--white); color: var(--pink-accent); font-size: 11px; padding: 0 6px; line-height: 1;
}
.ranking-amount-value { font-size: 16px; font-weight: 800; color: var(--green-dark); font-family: var(--font-display); }
.ranking-amount-unit { font-size: 10px; font-weight: 700; color: var(--green-dark); opacity: 0.8; letter-spacing: 0.5px; }
.loading-text, .error-text { font-size: 14px; color: #888; margin: 20px auto; }
.error-text { color: #c0392b; }
.retry-btn {
  display: block; margin: 10px auto 0;
  background: var(--green-mid); color: var(--white);
  font-size: 12px; font-weight: 700; font-family: inherit;
  padding: 6px 18px; border: none; border-radius: 16px; cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.retry-btn:hover, .retry-btn:active { transform: translateY(-2px) scale(1.04); box-shadow: 0 8px 18px rgba(58, 46, 39, 0.2); }
.retry-btn:disabled { opacity: 0.6; cursor: default; transform: none; box-shadow: var(--shadow-soft); }


.btn-pill {
  display: inline-block; margin-top: 18px; background: var(--green-mid); color: var(--white);
  padding: 10px 24px; border-radius: 24px; font-weight: 700; font-size: 13px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-pill:hover, .btn-pill:active {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 18px rgba(58, 46, 39, 0.2);
}
.btn-pill.gold { background: var(--gold); color: var(--ink); }

/* ---------- supporters ring ---------- */
.supporters-section {
  position: relative; width: calc(100% - 48px); max-width: 1152px; margin: 0 auto 30px; padding: 20px 24px;
  background: var(--cream-bg); border: 2px solid var(--green-mid); border-radius: var(--radius-lg);
  text-align: center; overflow: hidden;
}
.supporters-count-badge {
  position: absolute; top: 14px; right: 16px;
  background: var(--white); border-radius: 20px; padding: 5px 12px;
  font-size: 12px; font-weight: 700; color: var(--green-dark); box-shadow: var(--shadow-soft);
}
.supporters-title { font-size: 16px; color: var(--green-dark); margin: 0 0 6px; padding: 0 80px; }
.supporters-ring { position: relative; width: 100%; height: 560px; margin: 4px auto; }
.supporter-name {
  position: absolute; top: 0; left: 0;
  font-size: 11px; font-weight: 600; color: var(--ink);
  white-space: nowrap; pointer-events: none;
}
.supporters-ring-outline {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  border: 1.5px dashed rgba(79, 146, 104, 0.55);
  border-radius: 50%; pointer-events: none;
}
.supporters-center-deco {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: var(--green-light); border: 3px dashed var(--white);
  border-radius: 50%; width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: var(--green-mid);
  box-shadow: 0 0 0 3px var(--green-mid), var(--shadow-soft);
}
.supporters-footnote { font-size: 11px; color: #8a8a8a; margin: 4px 0 0; }
@media (max-width: 700px) {
  .supporters-title { font-size: 14px; padding: 0 60px; }
  .supporters-count-badge { font-size: 10px; padding: 4px 9px; top: 10px; right: 10px; }
  .supporters-ring { height: 560px; }
  .supporter-name { font-size: 9px; }
  .supporters-center-deco { width: 50px; height: 50px; font-size: 18px; }
}

/* ---------- donation summary ---------- */
.donation-section {
  position: relative;
  width: calc(100% - 48px); max-width: 1152px; margin: 0 auto 30px; padding: 30px 24px;
  background: var(--white); border: 2px solid var(--pink-mid); border-radius: var(--radius-lg);
  display: flex; justify-content: center; text-align: center;
}
.donation-section::before {
  content: "🍀"; position: absolute; font-size: 22px; opacity: 0.85;
  top: 14px; left: 26px; color: var(--green-mid); transform: rotate(-12deg);
}
.donation-info { max-width: 560px; }
.donation-info h2 { color: var(--green-dark); font-size: 25px; }
.donation-info p { margin: 4px 0; font-size: 16px; color: #7a6a4a; }

.donation-caption {
  display: flex; align-items: center; gap: 10px;
  margin: 8px 0 10px;
  font-size: 15px; font-weight: 700; color: var(--green-dark);
  letter-spacing: 1px;
}
.donation-caption::before, .donation-caption::after {
  content: ""; flex: 1; border-top: 2px dashed var(--green-mid);
}

.donation-amount-box {
  position: relative;
  display: flex; width: fit-content; align-items: center; justify-content: center;
  margin: 4px auto 12px;
  padding: 4px 14px;
  background: var(--green-light);
  border: 2px dashed var(--white);
  border-radius: 16px;
  box-shadow: 0 0 0 2px var(--green-mid), var(--shadow-soft);
}
.donation-amount { margin: 0; font-family: var(--font-display); }
.donation-amount-value { font-size: 34px; font-weight: 800; color: var(--green-dark); }
.donation-amount-unit { font-size: 16px; font-weight: 800; color: var(--green-dark); margin-left: 8px; }
#donationDetailsBtn { margin-top: 8px; }

.donation-amount-sticker { position: absolute; font-size: 30px; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.15)); }
.donation-amount-sticker.clover { left: -16px; top: -14px; color: var(--green-mid); transform: rotate(-15deg); }
.donation-amount-sticker.heart { right: -12px; bottom: -12px; color: var(--pink-accent); transform: rotate(10deg); }

.donation-info #donationThanks { margin-top: 4px; font-size: 15px; color: var(--green-dark); }

/* ---------- donation details page (donation-details.html) ---------- */
.donation-details-section {
  max-width: 900px; margin: 16px auto 30px; padding: 20px 24px 26px;
  background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft);
}
.donation-back-btn { margin-top: 0; margin-bottom: 14px; }
.donation-details-section h1 {
  font-size: 20px; color: var(--green-dark); text-align: center; margin: 0 0 12px;
}
.donation-details-section h1 .nowrap-th { white-space: nowrap; }
@media (max-width: 360px) {
  .donation-details-section h1 .nowrap-th { white-space: normal; }
}
.donation-details-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 14px; margin-bottom: 6px;
  font-size: 12px; font-weight: 700; color: #999; text-transform: uppercase; letter-spacing: 0.5px;
}
.donation-details-table { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.donation-detail-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  background: var(--cream-bg); border-radius: var(--radius-md); padding: 10px 14px;
  font-size: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.donation-detail-row:hover, .donation-detail-row:active {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 18px rgba(58, 46, 39, 0.18);
}
.donation-detail-main { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; flex: 1; min-width: 0; }
.donation-detail-no { color: #999; font-weight: 700; min-width: 22px; flex-shrink: 0; }
.donation-detail-item { flex: 1; min-width: 0; color: var(--ink); font-weight: 600; }
.ranking-detail-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid var(--green-mid); }
.donation-detail-amount { color: var(--green-dark); font-weight: 700; white-space: nowrap; flex-shrink: 0; }
.donation-status {
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; flex-shrink: 0; white-space: nowrap;
}
.donation-status.done { background: var(--green-light); color: var(--green-dark); }
.donation-status.pending { background: #FFF3CD; color: #7A5B00; }
.donation-status.other { background: #eee; color: #666; }
.donation-progress { flex-basis: 100%; width: 100%; display: flex; align-items: center; gap: 8px; }
.donation-progress-track { flex: 1; height: 6px; background: #eee; border-radius: 4px; overflow: hidden; }
.donation-progress-fill { height: 100%; background: var(--gold); border-radius: 4px; }
.donation-progress-label { font-size: 11px; color: #7a6a4a; white-space: nowrap; flex-shrink: 0; }

/* ---------- countdown ---------- */
.countdown-section { width: calc(100% - 48px); max-width: 1152px; margin: 0 auto 20px; padding: 22px 24px; background: var(--lavender); border-radius: var(--radius-lg); text-align: center; }
.countdown-section p { margin: 2px 0; font-size: 14px; color: #6b5f8a; }
#countdownLabel { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--purple); }
#countdownDate { font-size: 15px; color: #6b5f8a; }
.countdown-timer { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.time-box { background: var(--white); border-radius: var(--radius-md); padding: 10px 16px; min-width: 66px; box-shadow: var(--shadow-soft); }
.time-box span { display: block; font-family: var(--font-display); font-weight: 800; font-size: 30px; color: var(--purple); }
.time-box label { font-size: 12px; color: #999; letter-spacing: 1px; }
.fighting-badge { background: var(--white); color: var(--pink-deep); font-weight: 800; font-size: 14px; padding: 10px 14px; border-radius: var(--radius-md); transform: rotate(-4deg); box-shadow: var(--shadow-soft); }

.updated-note { text-align: center; font-size: 13px; color: #8a8a8a; margin: 0 0 12px; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--green-pastel);
  padding: 10px 24px;
  box-shadow: 0 -2px 10px rgba(47,107,73,0.12);
}
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: center; color: var(--green-dark); }
.footer-inner p {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.3px;
  margin: 0;
}

/* ---------- confirm modal ---------- */
.confirm-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(59, 52, 46, 0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.confirm-overlay[hidden] { display: none; }
.confirm-box {
  position: relative;
  background: var(--white); border-radius: var(--radius-lg);
  padding: 30px 24px 20px; max-width: 320px; width: 100%; text-align: center;
  box-shadow: 0 12px 32px rgba(58, 46, 39, 0.25);
}
.confirm-decor {
  position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  font-size: 22px; color: var(--green-dark); background: var(--green-light);
  border-radius: 50%; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-soft);
}
.confirm-message {
  font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--ink);
  margin: 6px 0 20px;
}
.confirm-actions { display: flex; gap: 10px; justify-content: center; }
.confirm-actions .btn-pill { margin-top: 0; border: none; cursor: pointer; font-family: inherit; }
.confirm-cancel { background: #eee; color: var(--ink); }
.confirm-ok { background: var(--green-mid); color: var(--white); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .hero-center { order: -1; max-width: 420px; margin: 0 auto; }
}
/* พอพื้นที่ไม่พอให้ 7 การ์ดเรียงแถวเดียว (จอมือถือ) สลับเป็นผัง 1-3-3 แทน ไม่ต้องเลื่อน
   จอกลาง (แท็บเล็ต ฯลฯ) ปล่อยให้ wrap ตามธรรมชาติแทน จะได้เห็นหลายใบต่อแถวกว่าเดิม */
@media (max-width: 700px) {
  .ranking-carousel { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 16px; }
  .ranking-card { min-width: 0; width: 100%; max-width: 130px; justify-self: center; }
  .ranking-card:first-child { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .header-inner { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; }
  .header-logo { height: 30px; }
  .header-wordmark { font-size: 14px; }
  .header-right { display: none; }

  .ranking-carousel { gap: 10px; grid-template-columns: repeat(auto-fit, minmax(75px, 1fr)); }
  .ranking-card { padding: 8px 6px; max-width: 100px; }
  .ranking-card img { width: 56px; height: 56px; }
  .ranking-name { font-size: 12px; }
  .ranking-points { font-size: 10px; }

  .donation-detail-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .donation-detail-amount { margin-left: 32px; }

  .hero-photo-caption-row { gap: 6px; }
  .hero-photo-caption { font-size: 15px; }
  .hero-photo-clover { height: 11px; }
}

/* ---------- clean view (สำหรับแคปภาพไปโพสต์โซเชียล — เปิดด้วย ?clean=1) ---------- */
.screenshot-only { display: none; }
body.clean-mode .screenshot-only { display: block; }

body.clean-mode .site-header,
body.clean-mode .icon-row,
body.clean-mode .site-footer,
body.clean-mode .donation-back-btn,
body.clean-mode .retry-btn,
body.clean-mode .setup-notice { display: none !important; }

.clean-watermark {
  position: sticky;
  top: 0;
  z-index: 20;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--green-dark);
  background: var(--green-pastel);
  padding: 8px 12px;
}
