/* =========================================================================
   BLM48 Membership — 🎨 ธีมของแอปตามช่วงวัน (ธีมซิงเกิล / Magic Hour) แบบเปิด/ปิดเองตามวันที่
   (ธีมเทศกาลตามปฏิทิน วันเด็ก/ตรุษจีน/สงกรานต์/วาเลนไทน์/ลอยกระทง/ฮาโลวีน/คริสต์มาส/ปีใหม่ ถูกเอาออกแล้ว 2026-10-20)
   Loaded on every member-facing page right after glassmorphism.css:
     <link rel="stylesheet" href="assets/css/festivals.css">
     <script src="assets/js/festivals.js"></script>
   festivals.js adds html.theme-festival + html.theme-<id> only inside a
   festival's date window (see FESTIVALS in festivals.js) — outside every
   window this file does nothing.

   แต่ละธีมกำหนดแค่ชุดสี (--fx-*) ในส่วน "พาเลตต์" ด้านล่าง
   ส่วน "กฎร่วม" ใช้ตัวแปรเหล่านั้นกับทุกหน้าเหมือนกันหมด
   Content surfaces stay light so every page's existing dark text (much of it
   inline-styled) stays readable; only accents, nav bars and the backdrop change.
   ========================================================================= */

/* -------------------------------------------------------------------------
   พาเลตต์ของแต่ละธีม
     --fx-primary / -rgb   สีหลัก (ปุ่ม แท็บที่เลือก แท่งอันดับ BLM48)
     --fx-accent / -rgb    สีรอง (แท่งอันดับ NPT48 ป้าย/แท็ก)
     --fx-pale             พื้นอ่อนของปุ่ม/แท็บ   --fx-pale-border ขอบอ่อน
     --fx-bar-1/-2         ไล่สีแถบบน          --fx-bar-text/-icon สีตัวอักษร/ไอคอนบนแถบ
     --fx-tabbar           พื้นแถบเมนูล่าง      --fx-tab-muted สีแท็บที่ไม่ได้เลือก
     --fx-ink              สีตัวอักษรเข้ม       --fx-score สีคะแนนบนแท่งอันดับ
     --fx-bg-1/-2/-3       ไล่สีพื้นหลังหน้า     --fx-orb ดวงจันทร์/แสงมุมขวาบน
     --fx-decor-1/-2       ไอคอนพื้นหลังการ์ดอันดับ
     --fx-logo / --fx-heading / --fx-shop-heading   อีโมจิต่อท้ายโลโก้ / หน้าหัวข้อ
   ------------------------------------------------------------------------- */
/* 🎀 BLM48 10th Single "Sustainable" — ชมพูพาสเทล ฟ้ายามเย็นชมพู-ลาเวนเดอร์ กลีบดอกไม้ ไข่มุก ริบบิ้น */
html.theme-sustainable {
  --fx-primary: #e8749f; --fx-primary-rgb: 232, 116, 159; --fx-primary-soft: #f59fbf;
  --fx-accent: #a48ad6; --fx-accent-rgb: 164, 138, 214; --fx-candy: #f7c6d9;
  --fx-pale: #fff0f6; --fx-pale-border: #f9d7e5; --fx-pale-hover: #ffe2ee;
  --fx-bar-1: #f6b3cc; --fx-bar-2: #e98aae; --fx-bar-text: #ffffff; --fx-bar-icon: #fff4f8;
  --fx-tabbar: rgba(236, 146, 182, 0.86); --fx-tab-muted: #fbd3e3; --fx-tab-text: #c995ae;
  --fx-ink: #8c3a62; --fx-ink-rgb: 140, 58, 98; --fx-score: #b8487a; --fx-price: #c2507f;
  --fx-bg-1: #ffe9f1; --fx-bg-2: #f7ecff; --fx-bg-3: #fff5ee; --fx-bg-base: #fff3f8;
  --fx-orb: rgba(255, 226, 214, 0.9); --fx-orb-glow: rgba(255, 190, 210, 0.35);
  --fx-decor-1: #f59fbf; --fx-decor-2: #c9b6ef;
  --fx-logo: ""; --fx-heading: ""; --fx-shop-heading: ""; /* ไม่ใช้อิโมจิ (ตามคำขอ) */
}
/* 🌹 Magic Hour — ดำ-แดง ห้องโถงโกธิก พระจันทร์สีเลือด เทียน กลีบกุหลาบ (ไม่ใช้อิโมจิ) */
html.theme-magichour {
  --fx-primary: #c1121f; --fx-primary-rgb: 193, 18, 31; --fx-primary-soft: #e5383b;
  --fx-accent: #6b0f1a; --fx-accent-rgb: 107, 15, 26; --fx-candy: #d4a24c;
  --fx-pale: #fdecee; --fx-pale-border: #f3cdd2; --fx-pale-hover: #fadadd;
  --fx-bar-1: #120709; --fx-bar-2: #2a0a10; --fx-bar-text: #ffd6da; --fx-bar-icon: #f3b8bf;
  --fx-tabbar: rgba(18, 7, 9, 0.9); --fx-tab-muted: #c9a0a6; --fx-tab-text: #a8848a;
  --fx-ink: #3d0a12; --fx-ink-rgb: 61, 10, 18; --fx-score: #a4161a; --fx-price: #b5172a;
  --fx-bg-1: #1a0a0d; --fx-bg-2: #2a0a10; --fx-bg-3: #12070a; --fx-bg-base: #ffffff;
  --fx-orb: rgba(255, 90, 100, 0.55); --fx-orb-glow: rgba(193, 18, 31, 0.3);
  --fx-decor-1: #c1121f; --fx-decor-2: #d4a24c;
  --fx-logo: ""; --fx-heading: ""; --fx-shop-heading: "";
}

/* -------------------------------------------------------------------------
   กฎร่วม — ใช้ตัวแปรด้านบนกับทุกเทศกาล
   Brand tokens every page already reads (defined per page on :root —
   html.theme-festival is more specific than :root so it wins regardless of order)
   ------------------------------------------------------------------------- */
html.theme-festival {
  --primary-pink: var(--fx-primary);
  --blm-pink: var(--fx-primary);
  --blmem-pink: var(--fx-primary);
  --blm-light-pink: var(--fx-pale);
  --blmem-pink-light: var(--fx-pale);

  --glass-pink: var(--fx-primary);
  --glass-pink-soft: var(--fx-primary-soft);
  --glass-gold: var(--fx-candy);
  --glass-gold-soft: var(--fx-pale-hover);
  --glass-shadow: 0 8px 32px rgba(var(--fx-ink-rgb), 0.12), 0 1px 0 rgba(255, 255, 255, 0.45) inset;
  --glass-shadow-sm: 0 4px 16px rgba(var(--fx-ink-rgb), 0.10);
  --glass-shadow-lg: 0 20px 60px rgba(var(--fx-ink-rgb), 0.18), 0 1px 0 rgba(255, 255, 255, 0.5) inset;

  /* shop.html awning stripes */
  --soda-blue: var(--fx-accent);
  --soda-sky-pink: var(--fx-primary);
}

html.theme-festival ::selection {
  background: rgba(var(--fx-primary-rgb), 0.35);
}

/* Backdrop — covers both the gradient (glass-mesh-bg) and plain white
   (force-white-bg) page variants, plus index.html's own solid-yellow override. */
html.theme-festival body.glass-mesh-bg,
html.theme-festival body.glass-mesh-bg.force-white-bg,
html.theme-festival body.force-white-bg {
  background-color: var(--fx-bg-base) !important;
  background-image:
    radial-gradient(circle at 86% 9%, var(--fx-orb) 0 34px, var(--fx-orb-glow) 36px, transparent 120px),
    radial-gradient(circle at 10% 18%, rgba(var(--fx-accent-rgb), 0.12) 0%, transparent 42%),
    radial-gradient(circle at 92% 82%, rgba(var(--fx-primary-rgb), 0.12) 0%, transparent 45%),
    radial-gradient(circle at 8% 92%, rgba(var(--fx-accent-rgb), 0.10) 0%, transparent 40%),
    linear-gradient(180deg, var(--fx-bg-1) 0%, var(--fx-bg-2) 60%, var(--fx-bg-3) 100%) !important;
  background-attachment: fixed !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
}

/* Top bars — index.html .navbar และ shop.html .top-navbar */
html.theme-festival .navbar {
  background: linear-gradient(180deg, var(--fx-bar-1) 0%, var(--fx-bar-2) 100%) !important;
  box-shadow: 0 3px 14px rgba(var(--fx-primary-rgb), 0.28) !important;
  border-bottom: 2px solid var(--fx-primary) !important;
}
html.theme-festival .navbar .logo-text,
html.theme-festival .navbar .brand {
  color: var(--fx-bar-text) !important;
  text-shadow: 0 0 10px rgba(var(--fx-primary-rgb), 0.55);
}
html.theme-festival .navbar .logo-text::after {
  content: var(--fx-logo);
}
html.theme-festival .navbar .nav-icon {
  color: var(--fx-bar-icon) !important;
}

html.theme-festival .top-navbar {
  background: linear-gradient(180deg, var(--fx-bar-1) 0%, var(--fx-bar-2) 100%);
  border-bottom: 2px solid var(--fx-primary);
  box-shadow: 0 3px 14px rgba(var(--fx-primary-rgb), 0.25);
}
html.theme-festival .top-navbar .nav-brand {
  color: var(--fx-bar-text);
  text-shadow: 0 0 10px rgba(var(--fx-primary-rgb), 0.55);
}
html.theme-festival .top-navbar .nav-brand::after {
  content: var(--fx-logo);
}
html.theme-festival .top-navbar .shop-nav-icon {
  color: var(--fx-bar-icon);
}
/* หน้าอื่นที่ใช้ .top-navbar (h1 / .nav-title + ปุ่มย้อนกลับ/ไอคอน) — ตัวอักษรเดิมสีเข้ม
   มองไม่เห็นบนแถบสีเข้มของเทศกาล เลยเปลี่ยนเป็นสีอ่อนของแถบ */
html.theme-festival .top-navbar > :is(h1, h2, .nav-title) {
  color: var(--fx-bar-text) !important;
}
html.theme-festival .top-navbar > :is(a, button) {
  color: var(--fx-bar-icon) !important;
}
html.theme-festival .top-navbar > :is(a, button) > i {
  color: inherit !important;
}
/* ปุ่มย้อนกลับที่มีวงกลมพื้นชมพูอ่อน -> วงกลมโปร่งบนแถบเข้ม */
html.theme-festival .top-navbar > .nav-back-btn {
  background: rgba(255, 255, 255, 0.12) !important;
}
html.theme-festival .cart-badge {
  background: var(--fx-primary);
}

/* 🛍️ shop.html — แท็บหมวดสีอ่อน, การ์ดสินค้าขาวมุมมน
   (เดิมการ์ดเป็นกล่องขาวเหลี่ยมบนพื้นขาว พอพื้นเปลี่ยนสีเลยเห็นเป็นบล็อกแข็งๆ) */
html.theme-festival .shop-tabs {
  background: var(--fx-bg-2);
  border-bottom-color: var(--fx-pale-border);
}
html.theme-festival .shop-tab {
  color: var(--fx-tab-text);
}
html.theme-festival .shop-tab.active {
  color: var(--fx-ink);
}
html.theme-festival .shop-tab.active::after {
  background: var(--fx-primary);
  opacity: 0.8;
}
html.theme-festival .shop-section .merch-card,
html.theme-festival .shop-section .merch-card-large {
  border-radius: 16px !important;
  padding: 8px 8px 10px !important;
  border: 1px solid var(--fx-pale-border) !important;
  box-shadow: 0 6px 18px rgba(var(--fx-ink-rgb), 0.08) !important;
}
html.theme-festival .shop-section .merch-category,
html.theme-festival .shop-section .card-tag,
html.theme-festival .shop-section .merch-badge {
  color: var(--fx-accent) !important;
}
html.theme-festival .shop-section .merch-subtitle[style*="#c53f5a"] {
  color: var(--fx-price) !important;
}
html.theme-festival .shop-section .merch-button,
html.theme-festival .shop-section .btn-token-buy {
  background: var(--fx-pale) !important;
}
html.theme-festival .shop-section .merch-button:hover,
html.theme-festival .shop-section .btn-token-buy:hover {
  background: var(--fx-pale-hover) !important;
}
html.theme-festival .shop-section .merch-button.merch-button-disabled {
  background: #f6f1ec !important;
}
html.theme-festival .shop-section .section-title:not(.fan-ticker)::before {
  content: var(--fx-shop-heading);
}

/* Bottom tab bar — แถบกระจกสีเข้มของเทศกาล แท็บที่เลือกเรืองสีหลัก */
html.theme-festival .bottom-tab-bar::before {
  background: var(--fx-tabbar) !important;
  border-top: 2px solid var(--fx-primary) !important;
  box-shadow: 0 -6px 26px rgba(var(--fx-primary-rgb), 0.25) !important;
}
html.theme-festival .tab-item {
  color: var(--fx-tab-muted);
}
html.theme-festival .tab-item.active {
  color: var(--fx-primary-soft);
}
html.theme-festival .tab-item.active i {
  filter: drop-shadow(0 0 8px rgba(var(--fx-primary-rgb), 0.7));
}
html.theme-festival #tab-profile-img {
  border-color: var(--fx-primary) !important;
}

/* 🌸 Sustainable: แถบเมนูล่างเป็นภาพทิวทัศน์ (สไตล์ iAM48) แทนแถบกระจก — คลื่นฟ้าลาเวนเดอร์ / คลื่นขาว /
   ทุ่งหญ้าเขียวพาสเทลมีดอกไม้จุดเล็กๆ; ไอคอน (หรือรูปไอคอนของ Champ) ลอยอยู่บนเนินเหมือนเดิม
   ใช้กับทุกหน้าที่มีแถบเมนูล่าง: หน้า Home ผ่าน .theme-sustainable, หน้าอื่นผ่าน .theme-tabbar-sustainable (festivals.js ใส่ให้) */
html.theme-sustainable .bottom-tab-bar::before,
html.theme-tabbar-sustainable .bottom-tab-bar::before {
  top: 14px !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='26' viewBox='0 0 120 26'%3E%3Cg%3E%3Ccircle cx='10' cy='16' r='2.2' fill='%23f59fbf'/%3E%3Ccircle cx='10' cy='16' r='.8' fill='%23ffd56b'/%3E%3Ccircle cx='34' cy='8' r='1.6' fill='%23bba8f0'/%3E%3Ccircle cx='52' cy='20' r='2' fill='%23ffffff'/%3E%3Ccircle cx='52' cy='20' r='.7' fill='%23ffd56b'/%3E%3Ccircle cx='75' cy='12' r='2.2' fill='%23f7b6cf'/%3E%3Ccircle cx='75' cy='12' r='.8' fill='%23ffd56b'/%3E%3Ccircle cx='96' cy='21' r='1.6' fill='%23bba8f0'/%3E%3Ccircle cx='112' cy='9' r='1.8' fill='%23ffe08a'/%3E%3C/g%3E%3C/svg%3E") left bottom / 120px 26px repeat-x,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 96' preserveAspectRatio='none'%3E%3Cpath d='M0 26C40 12 82 16 122 32C172 50 212 42 252 26C302 8 352 12 400 28V96H0Z' fill='%23d9cff0'/%3E%3Cpath d='M0 42C50 30 100 37 150 51C200 63 262 50 312 39C352 31 382 36 400 42V96H0Z' fill='%23fdf5f8'/%3E%3Cpath d='M0 58C60 44 122 50 182 63C232 73 292 60 342 53C372 49 392 52 400 55V96H0Z' fill='%23e1eac9'/%3E%3C/svg%3E") left top / 100% 96px no-repeat,
    linear-gradient(#e1eac9, #e1eac9) left 0 top 80px / 100% 100% no-repeat !important; /* ต่อทุ่งหญ้าลงไปถึงขอบจอ (safe area) โดยไม่ทาสีเหนือคลื่น */
}
/* สีใส่ตรงๆ (ไม่ใช้ --fx-*) เพราะหน้าอื่นไม่มีพาเลตต์ธีม มีแค่คลาส .theme-tabbar-sustainable */
html.theme-sustainable .tab-item,
html.theme-tabbar-sustainable .tab-item {
  color: #a27b98; /* ม่วงหม่นอ่านง่ายบนทุ่งหญ้า/คลื่นขาว */
}
html.theme-sustainable .tab-item.active,
html.theme-tabbar-sustainable .tab-item.active {
  color: #e8749f;
}
html.theme-sustainable .tab-item.active i,
html.theme-tabbar-sustainable .tab-item.active i {
  filter: drop-shadow(0 2px 6px rgba(232, 116, 159, 0.45));
}
html.theme-sustainable #tab-profile-img,
html.theme-tabbar-sustainable #tab-profile-img {
  border-color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(140, 58, 98, 0.18);
}

/* 🌹 Magic Hour: แถบเมนูล่างเป็นทิวทัศน์กลางคืน (คลื่นแดงเลือดหมู / คลื่นแดงเข้ม / พื้นดำ มีกลีบกุหลาบจุดเล็กๆ)
   ใช้กับทุกหน้าที่มีแถบเมนูล่าง: หน้า Home ผ่าน .theme-magichour, หน้าอื่นผ่าน .theme-tabbar-magichour */
html.theme-magichour .bottom-tab-bar::before,
html.theme-tabbar-magichour .bottom-tab-bar::before {
  top: 14px !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='26' viewBox='0 0 120 26'%3E%3Cg fill='%23c1121f'%3E%3Cellipse cx='10' cy='16' rx='2.4' ry='1.5' transform='rotate(-25 10 16)'/%3E%3Cellipse cx='52' cy='20' rx='2' ry='1.3' transform='rotate(30 52 20)' fill='%23e5383b'/%3E%3Cellipse cx='96' cy='12' rx='2.4' ry='1.5' transform='rotate(-10 96 12)' fill='%238b0f1e'/%3E%3C/g%3E%3Ccircle cx='32' cy='9' r='1' fill='%23d4a24c'/%3E%3Ccircle cx='75' cy='19' r='1.2' fill='%23d4a24c'/%3E%3Ccircle cx='112' cy='22' r='.9' fill='%23ffd6da'/%3E%3C/svg%3E") left bottom / 120px 26px repeat-x,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 96' preserveAspectRatio='none'%3E%3Cpath d='M0 26C40 12 82 16 122 32C172 50 212 42 252 26C302 8 352 12 400 28V96H0Z' fill='%236b0f1a'/%3E%3Cpath d='M0 42C50 30 100 37 150 51C200 63 262 50 312 39C352 31 382 36 400 42V96H0Z' fill='%232a0a10'/%3E%3Cpath d='M0 58C60 44 122 50 182 63C232 73 292 60 342 53C372 49 392 52 400 55V96H0Z' fill='%23120709'/%3E%3C/svg%3E") left top / 100% 96px no-repeat,
    linear-gradient(#120709, #120709) left 0 top 80px / 100% 100% no-repeat !important;
}
html.theme-magichour .tab-item,
html.theme-tabbar-magichour .tab-item {
  color: #c4848f; /* ชมพูหม่น อ่านได้ทั้งบนพื้นแดงเข้ม/ดำ และตอนไอคอนลอยอยู่เหนือพื้นขาว */
}
html.theme-magichour .tab-item.active,
html.theme-tabbar-magichour .tab-item.active {
  color: #ff4d5e;
}
html.theme-magichour .tab-item.active i,
html.theme-tabbar-magichour .tab-item.active i {
  filter: drop-shadow(0 2px 8px rgba(255, 60, 75, 0.6));
}
html.theme-magichour #tab-profile-img,
html.theme-tabbar-magichour #tab-profile-img {
  border-color: #c1121f !important;
  box-shadow: 0 2px 10px rgba(193, 18, 31, 0.45);
}
/* ✨ ฝุ่นเวทสีทอง (แทนประกายสีขาว) */
html.theme-magichour #fx-deco .fx-sparkle {
  background: radial-gradient(circle, #fff3c4 0 30%, rgba(255, 207, 107, 0.65) 55%, transparent 72%);
  box-shadow: 0 0 8px 2px rgba(255, 214, 120, 0.75), 0 0 16px 5px rgba(212, 162, 76, 0.35);
}
/* 🕯️ เทียนลอยกลางอากาศ (festivals.js buildFloatingCandles) — ลอยหน้าป้าย Champ แต่อยู่ใต้ navbar, ไม่รับการแตะ */
#fx-candles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  z-index: 5;
  pointer-events: none;
}
#fx-candles .fx-fcandle {
  position: absolute;
  opacity: 0.92;
  filter: drop-shadow(0 0 6px rgba(255, 200, 100, 0.65));
  animation: fx-candle-float ease-in-out infinite alternate;
}
#fx-candles .fx-fcandle svg {
  display: block;
  width: 100%;
}
#fx-candles .fx-fcandle svg path:nth-of-type(1) {
  transform-origin: 12px 7px;
  animation: fx-flame-flicker 0.9s ease-in-out infinite alternate;
}
@keyframes fx-candle-float {
  from { transform: translateY(0) rotate(-2deg); }
  to   { transform: translateY(-9px) rotate(2deg); }
}
@keyframes fx-flame-flicker {
  from { transform: scale(1, 1); }
  to   { transform: scale(0.88, 1.12); }
}
@media (prefers-reduced-motion: reduce) {
  #fx-candles .fx-fcandle,
  #fx-candles .fx-fcandle svg path { animation: none; }
}

/* Shared components from glassmorphism.css */
html.theme-festival .swal2-popup,
html.theme-festival .swal2-toast {
  border-color: var(--fx-pale-border) !important;
}
html.theme-festival .swal2-title {
  color: var(--fx-ink) !important;
}
html.theme-festival .swal2-confirm {
  background: linear-gradient(90deg, var(--fx-primary), var(--fx-primary-soft)) !important;
  box-shadow: 0 6px 18px rgba(var(--fx-primary-rgb), 0.35) !important;
}
html.theme-festival .swal2-container.swal2-backdrop-show:not(:has(.swal2-toast)),
html.theme-festival .swal2-container.swal2-backdrop-hide:not(:has(.swal2-toast)) {
  background: rgba(var(--fx-ink-rgb), 0.45) !important;
}
html.theme-festival .glass-input:focus {
  border-color: var(--fx-primary);
  box-shadow: 0 6px 18px rgba(var(--fx-primary-rgb), 0.18);
}
html.theme-festival .glass-nav {
  box-shadow: 0 -4px 24px rgba(var(--fx-accent-rgb), 0.18);
}
html.theme-festival .glass-scroll::-webkit-scrollbar-thumb {
  background: rgba(var(--fx-primary-rgb), 0.4);
}

/* Special Fans Day timeline (index + specialfansday): ใช้สีส้มพีชชุดเดียวทุกธีม (glassmorphism.css) ไม่เปลี่ยนตามธีม */

/* โพสต์ขอบคุณของ Champ */
html.theme-festival .post-card.champ-special-post .champ-post-badge {
  background: var(--fx-primary) !important;
}
html.theme-festival .post-card.champ-special-post .champ-post-star {
  background: rgba(var(--fx-accent-rgb), 0.12);
  color: var(--fx-accent);
}

/* ไอคอนพื้นหลังการ์ดอันดับ (index.html) — festivals.js สลับเป็นไอคอนของเทศกาล
   ส่วนสีทองเดิม (#ffe479 !important) เปลี่ยนเป็นสองสีของเทศกาลสลับกัน */
html.theme-festival .bg-decorations .decor-item {
  color: var(--fx-decor-1) !important;
}
html.theme-festival .bg-decorations .decor-item:nth-child(even) {
  color: var(--fx-decor-2) !important;
}

/* ไอคอนพื้นหลังแบบภาพวาด SVG หลายสี (festival.decorSvgs เช่นธีม Sustainable) */
.bg-decorations .decor-item.fx-decor-svg {
  width: 22px;
  height: 22px;
  line-height: 0;
  filter: none !important; /* index.html ใส่ blur(0.5px) ให้ไอคอนเดิม ภาพวาดเล็กๆ จะเบลอจนดูไม่ออก */
}
.bg-decorations .decor-item.fx-decor-svg svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 1px 1.5px rgba(200, 90, 140, 0.18));
}

/* แท่งการ์ดอันดับ (index.html .member-card): ใช้สีประจำวงเสมอ ไม่เปลี่ยนตามธีม (ตามคำขอ)
   BLM48 เหลือง / NPT48 ฟ้า = สีเดียวกับปกติ (rgba ทับพื้นขาว) แต่ตอนมีธีมทำให้เกือบทึบ (โปร่ง ~25%)
   ให้เห็นไอคอนตกแต่งของธีมด้านหลังแท่งจางๆ แต่ไม่ชัดจนรบกวนชื่อ/คะแนน */
html.theme-festival .member-card.rank-1,
html.theme-festival .member-card.rank-2,
html.theme-festival .member-card.rank-3,
html.theme-festival .member-card.rank-other {
  background: rgba(255, 244, 201, 0.75) !important; /* สี = rgba(254, 228, 121, 0.4) บนพื้นขาว, โปร่ง 25% */
}
html.theme-festival .member-card.group-npt48.rank-1,
html.theme-festival .member-card.group-npt48.rank-2,
html.theme-festival .member-card.group-npt48.rank-3,
html.theme-festival .member-card.group-npt48.rank-other {
  background: rgba(203, 237, 254, 0.75) !important; /* สี = rgba(106, 203, 252, 0.35) บนพื้นขาว, โปร่ง 25% */
}
/* คะแนนใต้ชื่อใช้ var(--primary-pink) ซึ่งธีมเปลี่ยนเป็นสีหลักของธีม -> ล็อกกลับเป็นสีชมพูเดิม */
html.theme-festival .member-card .cookie-text {
  color: #ff85a2;
}

/* Section headings: อีโมจินำหน้า (ยกเว้น .fan-ticker ที่เลื่อนสลับข้อความอยู่ข้างใน) */
html.theme-festival .section-title:not(.fan-ticker) > span:first-child::before,
html.theme-festival .section-title:not(.fan-ticker):not(:has(> span))::before {
  content: var(--fx-heading);
}

/* -------------------------------------------------------------------------
   Floating decorations (markup injected by festivals.js)
   z-index -1 → painted above the page backdrop but behind all content,
   and pointer-events: none so it can never intercept a tap.
   ------------------------------------------------------------------------- */
#fx-deco {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

/* 🌸 Sustainable: ประกายไข่มุกวิบวับอยู่กับที่ (festival.sparkles ใน festivals.js) */
#fx-deco .fx-sparkle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0 35%, rgba(255, 255, 255, 0.6) 55%, transparent 72%);
  box-shadow: 0 0 8px 2px rgba(255, 255, 255, 0.85), 0 0 14px 4px rgba(245, 159, 191, 0.35);
  opacity: 0;
  animation: fx-twinkle ease-in-out infinite;
}
html.theme-sustainable body.glass-mesh-bg,
html.theme-sustainable body.force-white-bg {
  /* ฟ้ายามเย็นชมพู-ลาเวนเดอร์ + แสงอาทิตย์นุ่มๆ มุมขวาบน + เนินทุ่งดอกไม้จางๆ ขอบล่าง */
  background-image:
    radial-gradient(circle at 86% 9%, var(--fx-orb) 0 34px, var(--fx-orb-glow) 36px, transparent 140px),
    radial-gradient(ellipse 70% 22% at 15% 100%, rgba(244, 170, 200, 0.35) 0%, transparent 70%),
    radial-gradient(ellipse 60% 18% at 85% 100%, rgba(196, 176, 238, 0.32) 0%, transparent 70%),
    radial-gradient(circle at 10% 18%, rgba(var(--fx-accent-rgb), 0.14) 0%, transparent 42%),
    linear-gradient(180deg, #ffe4ee 0%, #fbe9f6 30%, #f4ecff 60%, #fff4ef 100%) !important;
}

@keyframes fx-twinkle {
  0%, 100% { opacity: 0; transform: scale(0.4); }
  50%      { opacity: 0.95; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  #fx-deco .fx-sparkle {
    animation: none;
    display: none;
  }
}
