@tailwind base;
@tailwind components;
@tailwind utilities;

@font-face {
  font-family: 'LINESeedSansTH';
  src: url('../../font/LINESeedSansTH_W_Rg.woff2') format('woff2'),
       url('../../font/LINESeedSansTH_W_Rg.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'LINESeedSansTH';
  src: url('../../font/LINESeedSansTH_W_Bd.woff2') format('woff2'),
       url('../../font/LINESeedSansTH_W_Bd.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'LINESeedSansTH';
  src: url('../../font/LINESeedSansTH_W_XBd.woff2') format('woff2'),
       url('../../font/LINESeedSansTH_W_XBd.woff') format('woff');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

body {
  font-family: 'LINESeedSansTH', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  padding-bottom: 75px; /* สำหรับ bottom menu บน mobile */
  /* ให้พื้นหลังไม่ดำทึบเกินไป (โทน charcoal อุ่น ๆ) */
  background-color: #070606;
}

/* Main background (ตามที่ต้องการ: ดำไล่ขึ้นเทาเข้ม) */
.celete-main-bg {
  background: linear-gradient(to bottom, #1b1a1ab8 0%, #3d3a2c00 30%, #000001 65%, #000000 100%);

}

@media (min-width: 768px) {
  body {
    padding-bottom: 0; /* ไม่ต้องมี padding บน desktop */
  }
}

/* Safe area สำหรับ iPhone */
.pb-safe {
  padding-bottom: env(safe-area-inset-bottom);
}

.lux-gradient {
  /* Mood & Tone แบบ Luxury: ดำอมทอง มีมิติ คล้าย reference */
  background:
    radial-gradient(900px 420px at 50% -10%, rgba(252, 246, 186, 0.18) 0%, transparent 60%),
    radial-gradient(760px 420px at 20% 25%, rgba(191, 149, 63, 0.16) 0%, transparent 62%),
    radial-gradient(760px 420px at 80% 25%, rgba(191, 149, 63, 0.14) 0%, transparent 62%),
    radial-gradient(900px 520px at 50% 120%, rgba(252, 246, 186, 0.10) 0%, transparent 65%),
    linear-gradient(180deg, rgba(16, 14, 12, 0.92) 0%, rgba(5, 5, 6, 0.98) 65%, rgba(0, 0, 0, 1) 100%);
}

.lux-border {
  border-image: linear-gradient(to right, #BF953F, #FCF6BA, #FBF5B7, #AA771C) 1;
}

.glass-dark {
  /* กล่องดำแบบหรู: ดำอมทอง อ่านง่ายขึ้น ไม่ทึบ */
  background: linear-gradient(145deg, rgba(10, 9, 8, 0.92), rgba(3, 3, 4, 0.88));
  backdrop-filter: blur(24px);
  border: 1px solid rgba(191, 149, 63, 0.20);
}

.gold-text {
  /* ทองแบบ DEZEL: เข้ม หรู */
  background: linear-gradient(to right, #BF953F, #876f30, #f3bb45, #AA771C);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 600;
}

.brand-wordmark {
  font-family: 'Cinzel', serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  /* เพิ่มประกายทองเล็กน้อย */
  text-shadow: 0 0 12px rgba(191, 149, 63, 0.18);
  font-weight: 800;
}

.brand-sub {
  font-family: 'Cinzel', serif;
  letter-spacing: 0.38em;
  font-size: 10px;
  color: #FCF6BA;
  text-transform: uppercase;
}

/* Header gradient (deep indigo/purple like reference) */
.header-gradient {
  background:
    radial-gradient(1200px 140px at 50% -60px, rgba(138, 92, 246, 0.22) 0%, transparent 60%),
    linear-gradient(180deg, rgba(30, 27, 75, 0.96) 0%, rgba(24, 21, 52, 0.98) 55%, rgba(16, 14, 35, 1) 100%);
  border-bottom: 1px solid rgba(191, 149, 63, 0.20);
}

.gold-divider {
  /* เส้นทองบาง ๆ คั่น section แบบ DEZEL */
  height: 1px;
  width: 100%;
  background: linear-gradient(to right, transparent, rgba(191, 149, 63, 0.6), rgba(252, 246, 186, 0.8), rgba(191, 149, 63, 0.6), transparent);
  margin: 1rem 0;
}

.card-lux {
  /* การ์ดโทน charcoal อุ่น + highlight ทอง */
  background: linear-gradient(160deg, rgba(14, 12, 10, 0.98), rgba(6, 6, 7, 0.98));
  border-radius: 1rem;
  border: 1px solid rgba(191, 149, 63, 0.24);
  box-shadow:
    0 18px 55px rgba(0, 0, 0, 0.88),
    inset 0 1px 0 rgba(252, 246, 186, 0.08),
    inset 0 0 0 1px rgba(191, 149, 63, 0.06);
  transition: all 0.3s ease;
}

.card-lux:hover {
  border-color: rgba(252, 246, 186, 0.35);
  box-shadow:
    0 22px 70px rgba(0, 0, 0, 0.92),
    inset 0 1px 0 rgba(252, 246, 186, 0.10),
    0 0 26px rgba(191, 149, 63, 0.14);
}

/* =========================
   Audiobook cover overlay (Play + Wave)
   ========================= */
.ebook-sample-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 9999px;
  color: #fff;
  background: linear-gradient(180deg, #34d399, #059669);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.38);
  font-size: 0.78rem;
}

.ebook-sample-badge i {
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.18));
}

.ab-cover-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 15; /* above cover image, below top-right tags (usually z-20) */
}
.ab-cover-overlay__inner {
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  bottom: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ab-audio-overlay {
  display: flex;
  align-items: center;
  gap: 1rem;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.55));
}
.ab-play {
  height: 3.75rem;
  width: 3.75rem;
  border-radius: 9999px;
  background: #FBBF24;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 30px rgba(251, 191, 36, 0.28);
  flex: 0 0 auto;
}
.ab-wave {
  height: 42px;
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
}
.ab-wavebar {
  width: 6px;
  border-radius: 9999px;
  transform-origin: bottom;
  animation: abWavePulse 1.05s ease-in-out infinite;
  opacity: 0.95;
}
.ab-wavebar--gold {
  background: linear-gradient(to top, rgba(251, 191, 36, 1), rgba(253, 224, 71, 0.95));
}
.ab-wavebar--white {
  background: linear-gradient(to top, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.65));
}
@keyframes abWavePulse {
  0%, 100% { transform: scaleY(0.25); opacity: 0.55; }
  50% { transform: scaleY(1.0); opacity: 1; }
}

/* Mobile tuning: prevent clipping on small cards */
@media (max-width: 420px) {
  .ab-cover-overlay__inner {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.85rem;
  }
  .ab-audio-overlay { gap: 0.75rem; }
  .ab-play {
    height: 3.25rem;
    width: 3.25rem;
    box-shadow: 0 12px 26px rgba(251, 191, 36, 0.26);
  }
  .ab-wave { height: 34px; gap: 0.38rem; }
  .ab-wavebar { width: 5px; }
}

@media (max-width: 360px) {
  .ab-cover-overlay__inner { left: 0.6rem; right: 0.6rem; bottom: 0.75rem; }
  .ab-play { height: 3rem; width: 3rem; }
  .ab-wave { height: 30px; gap: 0.34rem; }
  .ab-wavebar { width: 4px; }
}

/* =========================
   Admin theme switcher
   ========================= */
.admin-theme-light {
  color: #3d2b1f;
  background-color: rgb(231 220 185) !important;
}

/* override tailwind bg-black on body when admin switches to light */
.admin-theme-light.bg-black {
  background-color: rgb(231 220 185) !important; /* #e7dcb9 */
}

/* common admin form surfaces (inputs/selects/textareas often use bg-black/60) */
.admin-theme-light input,
.admin-theme-light select,
.admin-theme-light textarea {
  background-color: rgb(231 220 185) !important;
  color: #3d2b1f !important;
}

.admin-theme-light input::placeholder,
.admin-theme-light textarea::placeholder {
  color: rgba(122, 90, 58, 0.6) !important;
}

.admin-theme-light input:focus,
.admin-theme-light select:focus,
.admin-theme-light textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(191, 149, 63, 0.22);
}

/* Tailwind black-alpha backgrounds used heavily in admin UI (search/filter). Override to beige tone. */
.admin-theme-light .bg-black\/70,
.admin-theme-light .bg-black\/60,
.admin-theme-light .bg-black\/50,
.admin-theme-light .bg-black\/40,
.admin-theme-light .bg-black\/30,
.admin-theme-light .bg-black\/20 {
  background-color: rgb(231 220 185) !important; /* requested */
}

/* Hover states in admin still use tailwind hover:bg-black/..; keep them light */
.admin-theme-light .hover\:bg-black\/60:hover,
.admin-theme-light .hover\:bg-black\/50:hover,
.admin-theme-light .hover\:bg-black\/40:hover,
.admin-theme-light .hover\:bg-black\/30:hover,
.admin-theme-light .hover\:bg-black\/20:hover {
  background-color: rgb(245 238 214) !important; /* slightly lighter on hover */
}

.admin-theme-light .lux-gradient {
  background:
    radial-gradient(900px 420px at 50% -10%, rgba(255, 216, 120, 0.25) 0%, transparent 60%),
    radial-gradient(760px 420px at 20% 25%, rgba(191, 149, 63, 0.18) 0%, transparent 62%),
    radial-gradient(760px 420px at 80% 25%, rgba(191, 149, 63, 0.16) 0%, transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(245, 242, 232, 0.98) 70%, rgba(235, 232, 224, 1) 100%);
}

.admin-theme-light .glass-dark {
  background: linear-gradient(145deg, rgba(231, 220, 185, 0.92), rgba(245, 238, 214, 0.82));
  border: 1px solid rgba(191, 149, 63, 0.28);
  color: #5a3e1b;
}

/* Sidebar nav text: brown tone */
.admin-theme-light aside.glass-dark .text-slate-400,
.admin-theme-light aside.glass-dark .text-slate-500,
.admin-theme-light aside.glass-dark .text-slate-300 {
  color: #8B5E34 !important;
  opacity: 1;
}
.admin-theme-light aside.glass-dark nav a.text-slate-400 {
  color: #8B5E34 !important;
}
.admin-theme-light aside.glass-dark nav a:hover,
.admin-theme-light aside.glass-dark nav a.hover\:text-\[\#d4af37\]:hover {
  color: #b8860b !important;
}
/* Active menu item keeps gold */
.admin-theme-light aside.glass-dark nav a.text-\[\#d4af37\] {
  color: #9a6b2e !important;
}
.admin-theme-light aside.glass-dark .gold-text {
  color: #9a6b2e !important;
}
/* Logout link stays red on hover */
.admin-theme-light aside.glass-dark nav a.hover\:text-red-400:hover {
  color: #dc2626 !important;
}

.admin-theme-light .card-lux {
  background: linear-gradient(160deg, rgba(245, 238, 214, 0.92), rgba(231, 220, 185, 0.88));
  border: 1px solid rgba(191, 149, 63, 0.32);
  box-shadow:
    0 18px 55px rgba(10, 10, 10, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

/* text-slate overrides moved to comprehensive section below */
.admin-theme-light .text-slate-600,
.admin-theme-light .text-slate-700,
.admin-theme-light .text-slate-800,
.admin-theme-light .text-slate-900 {
  color: #3d2b1f !important;
  opacity: 1;
}

.admin-theme-light .border-slate-700\/60,
.admin-theme-light .border-slate-800\/80,
.admin-theme-light .border-slate-800\/70 {
  border-color: rgba(191, 149, 63, 0.24) !important;
}

/* Some pages use darker border/text combos (e.g. text-slate-700, border-slate-600/700/800). */
.admin-theme-light .border-slate-700\/70,
.admin-theme-light .border-slate-700\/60,
.admin-theme-light .border-slate-700\/40,
.admin-theme-light .border-slate-600\/30,
.admin-theme-light .border-slate-600\/40,
.admin-theme-light .border-slate-800\/60,
.admin-theme-light .border-slate-800\/50,
.admin-theme-light .border-slate-800\/40 {
  border-color: rgba(191, 149, 63, 0.24) !important;
}

/* Setting field wrapper with icon */
.admin-theme-light .setting-field-wrap {
  background-color: rgb(231 220 185);
  border-color: rgba(191, 149, 63, 0.35) !important;
}
.admin-theme-light .setting-field-wrap:focus-within {
  border-color: rgba(191, 149, 63, 0.7) !important;
  box-shadow: 0 0 0 3px rgba(191, 149, 63, 0.22);
}
.admin-theme-light .setting-field-wrap input,
.admin-theme-light .setting-field-wrap select,
.admin-theme-light .setting-field-wrap textarea {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #3d2b1f !important;
}

/* ================================================
   Admin Light Theme: Tables, Badges, Buttons, Icons
   Warm brown/gold palette
   ================================================ */

/* --- Text colors: brown tones instead of black --- */
.admin-theme-light .text-slate-100,
.admin-theme-light .text-slate-200 {
  color: #3d2b1f !important;
  opacity: 1;
}
.admin-theme-light .text-slate-300 {
  color: #5a3e1b !important;
  opacity: 1;
}
.admin-theme-light .text-slate-400 {
  color: #7a5a3a !important;
  opacity: 1;
}
.admin-theme-light .text-slate-500 {
  color: #9a7a5a !important;
  opacity: 1;
}

/* Keep sidebar overrides (they use aside-specific rules above) */

/* --- gold-text in admin --- */
.admin-theme-light .gold-text {
  background: linear-gradient(135deg, #8B5E34, #b8860b, #d4a037) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

/* --- Status badges (warm palette) --- */
.admin-theme-light .bg-emerald-200 { background-color: #d4edda !important; }
.admin-theme-light .text-emerald-900 { color: #1e5631 !important; opacity: 1; }
.admin-theme-light .border-emerald-500 { border-color: #6abf7b !important; }

.admin-theme-light .bg-amber-200 { background-color: #fef3c7 !important; }
.admin-theme-light .text-amber-900 { color: #78350f !important; opacity: 1; }
.admin-theme-light .border-amber-500 { border-color: #d4a037 !important; }
.admin-theme-light .border-amber-400 { border-color: #d4a037 !important; }
.admin-theme-light .bg-amber-100 { background-color: rgb(245 238 214) !important; }
.admin-theme-light .bg-amber-500\/15 { background-color: rgba(181, 120, 46, 0.2) !important; }
.admin-theme-light .border-amber-500\/30 { border-color: rgba(181, 120, 46, 0.45) !important; }

.admin-theme-light .bg-rose-200 { background-color: #fde2e2 !important; }
.admin-theme-light .text-rose-900 { color: #7f1d1d !important; opacity: 1; }
.admin-theme-light .border-rose-500 { border-color: #e8a0a0 !important; }

/* Admin orders — status pill + select */
.admin-order-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  padding: 0.4rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
  border: 1px solid transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.admin-order-status i {
  font-size: 0.625rem;
  flex-shrink: 0;
}

.admin-order-status--pending {
  color: #92400e;
  background: linear-gradient(180deg, #fef3c7, #fde68a);
  border-color: #d97706;
}

.admin-order-status--paid {
  color: #065f46;
  background: linear-gradient(180deg, #d1fae5, #a7f3d0);
  border-color: #059669;
}

.admin-order-status--cancelled {
  color: #991b1b;
  background: linear-gradient(180deg, #fee2e2, #fecaca);
  border-color: #ef4444;
}

.admin-order-status--unknown {
  color: #475569;
  background: #e2e8f0;
  border-color: #94a3b8;
}

.admin-order-status-select {
  min-width: 8.75rem;
  white-space: nowrap;
  appearance: none;
  padding: 0.45rem 2rem 0.45rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(191, 149, 63, 0.45);
  background-color: rgb(245 238 214);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%237a5a3a' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.55rem center;
  background-size: 1rem;
  color: #3d2b1f;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.admin-order-status-select:focus {
  outline: none;
  border-color: #d4af37;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.22);
}

.admin-order-status-select--pending {
  border-color: #d97706;
  background-color: #fef3c7;
  color: #92400e;
}

.admin-order-status-select--paid {
  border-color: #059669;
  background-color: #d1fae5;
  color: #065f46;
}

.admin-order-status-select--cancelled {
  border-color: #ef4444;
  background-color: #fee2e2;
  color: #991b1b;
}

.admin-report-chart-wrap {
  position: relative;
  width: 100%;
  height: 280px;
}

.admin-report-chart-wrap--donut {
  height: 240px;
}

@media (min-width: 1280px) {
  .admin-report-chart-wrap {
    height: 320px;
  }

  .admin-report-chart-wrap--donut {
    height: 260px;
  }
}

.admin-orders-table td,
.admin-orders-table th {
  vertical-align: top;
}

/* --- Icon flag boxes (ebooks list: featured/recommended/new) --- */
.admin-theme-light .bg-\[\#d4af37\]\/10 {
  background-color: rgba(191, 149, 63, 0.15) !important;
}
.admin-theme-light .border-\[\#d4af37\]\/30 {
  border-color: rgba(191, 149, 63, 0.4) !important;
}
.admin-theme-light .bg-rose-500\/10 {
  background-color: rgba(220, 120, 100, 0.12) !important;
}
.admin-theme-light .border-rose-500\/25 {
  border-color: rgba(200, 120, 100, 0.35) !important;
}
.admin-theme-light .bg-sky-500\/10,
.admin-theme-light .bg-sky-500\/15 {
  background-color: rgba(42, 122, 181, 0.18) !important;
}
.admin-theme-light .border-sky-500\/25,
.admin-theme-light .border-sky-500\/30 {
  border-color: rgba(42, 122, 181, 0.45) !important;
}
.admin-theme-light .text-sky-300 {
  color: #1e5a8a !important;
  opacity: 1;
}

/* Inactive icon flags */
.admin-theme-light .text-slate-500 i.fa-crown,
.admin-theme-light .text-slate-500 i.fa-star,
.admin-theme-light .text-slate-500 i.fa-sparkles,
.admin-theme-light .text-slate-500 i.fa-gift,
.admin-theme-light .text-slate-500 i.fa-calendar-check {
  color: #c4b08a !important;
}

/* --- Action buttons: warm brown theme --- */
.admin-theme-light .bg-\[\#d4af37\]\/20 {
  background-color: rgba(191, 149, 63, 0.18) !important;
}
.admin-theme-light .bg-\[\#d4af37\]\/30 {
  background-color: rgba(191, 149, 63, 0.28) !important;
}
.admin-theme-light .bg-red-900\/20,
.admin-theme-light .bg-red-900\/30 {
  background-color: rgba(180, 60, 60, 0.12) !important;
}
.admin-theme-light .text-red-400 {
  color: #b33a3a !important;
  opacity: 1;
}

/* Delete button */
.admin-theme-light button.bg-rose-200 {
  background-color: rgba(200, 100, 100, 0.15) !important;
  color: #a04040 !important;
  border-color: rgba(180, 80, 80, 0.3) !important;
}
.admin-theme-light button.bg-rose-200:hover,
.admin-theme-light .hover\:bg-rose-300:hover {
  background-color: rgba(200, 100, 100, 0.25) !important;
}

/* Toggle status button */
.admin-theme-light button.bg-amber-200 {
  background-color: rgba(191, 149, 63, 0.18) !important;
  color: #78350f !important;
}
.admin-theme-light button.bg-emerald-200 {
  background-color: rgba(72, 160, 100, 0.15) !important;
  color: #1e5631 !important;
}

/* --- Price badge --- */
.admin-theme-light span.bg-amber-200 {
  background-color: rgba(212, 175, 55, 0.2) !important;
  color: #6b3a0a !important;
}

/* --- Table background tints --- */
.admin-theme-light .bg-black\/30,
.admin-theme-light .bg-black\/40 {
  background-color: rgba(191, 149, 63, 0.08) !important;
}
.admin-theme-light .border-slate-800\/70,
.admin-theme-light .border-slate-800\/80,
.admin-theme-light .border-slate-800\/60,
.admin-theme-light .border-slate-800\/50 {
  border-color: rgba(191, 149, 63, 0.2) !important;
}
.admin-theme-light tr:hover .bg-black\/40,
.admin-theme-light .hover\:bg-black\/40:hover {
  background-color: rgba(191, 149, 63, 0.1) !important;
}

/* --- Stats cards tints --- */
.admin-theme-light .text-emerald-300 {
  color: #2d8a52 !important;
  opacity: 1;
}
.admin-theme-light .text-amber-300 {
  color: #a67c2e !important;
  opacity: 1;
}

/* --- Order status select --- */
.admin-theme-light select.bg-amber-100 {
  background-color: rgb(245 238 214) !important;
  color: #5a3e1b !important;
  border-color: rgba(191, 149, 63, 0.45) !important;
}

/* --- Modal overlays --- */
.admin-theme-light .bg-black\/70 {
  background-color: rgba(40, 30, 15, 0.6) !important;
}
.admin-theme-light .bg-black\/60 {
  background-color: rgba(191, 149, 63, 0.06) !important;
}

/* --- Ebook rating star color stays gold --- */
.admin-theme-light .text-\[\#fbbf24\] {
  color: #d4a037 !important;
  opacity: 1;
}

/* --- Dashboard specific --- */
.admin-theme-light .text-emerald-400 { color: #2d8a52 !important; opacity: 1; }
.admin-theme-light .text-rose-400 { color: #b33a3a !important; opacity: 1; }
.admin-theme-light .text-sky-400 { color: #2a7ab5 !important; opacity: 1; }
.admin-theme-light .text-amber-400 { color: #a67c2e !important; opacity: 1; }
.admin-theme-light .bg-emerald-400 { background-color: #2d8a52 !important; }
.admin-theme-light .bg-rose-400 { background-color: #c05050 !important; }
.admin-theme-light .bg-amber-400 { background-color: #d4a037 !important; }

/* Emerald/rose/amber badge combos in tables */
.admin-theme-light .bg-emerald-500\/15 { background-color: rgba(45, 138, 82, 0.12) !important; }
.admin-theme-light .border-emerald-500\/30 { border-color: rgba(45, 138, 82, 0.3) !important; }
.admin-theme-light .text-emerald-300 { color: #2d8a52 !important; opacity: 1; }
.admin-theme-light .bg-rose-500\/15 { background-color: rgba(180, 60, 60, 0.1) !important; }
.admin-theme-light .border-rose-500\/30 { border-color: rgba(180, 60, 60, 0.25) !important; }
.admin-theme-light .text-rose-300 { color: #b33a3a !important; opacity: 1; }

/* Homepage flag toggles (ebook edit/create) */
.admin-theme-light .homepage-flag-card {
  background-color: rgb(245 238 214) !important;
  border: 2px solid rgba(191, 149, 63, 0.22) !important;
}
.admin-theme-light .homepage-flag-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  border: 1px solid rgba(191, 149, 63, 0.25);
  background: rgba(255, 255, 255, 0.55);
  color: transparent;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.admin-theme-light .homepage-flag-card--gold .homepage-flag-icon { color: #a67c2e !important; }
.admin-theme-light .homepage-flag-card--rose .homepage-flag-icon { color: #b33a3a !important; }
.admin-theme-light .homepage-flag-card--sky .homepage-flag-icon { color: #1e5a8a !important; }
.admin-theme-light .homepage-flag:has(input:checked) .homepage-flag-card--gold {
  background-color: rgba(191, 149, 63, 0.22) !important;
  border-color: rgba(191, 149, 63, 0.65) !important;
  box-shadow: 0 0 0 2px rgba(191, 149, 63, 0.18);
}
.admin-theme-light .homepage-flag:has(input:checked) .homepage-flag-card--rose {
  background-color: rgba(220, 120, 100, 0.16) !important;
  border-color: rgba(200, 120, 100, 0.55) !important;
  box-shadow: 0 0 0 2px rgba(200, 120, 100, 0.16);
}
.admin-theme-light .homepage-flag:has(input:checked) .homepage-flag-card--sky {
  background-color: rgba(42, 122, 181, 0.16) !important;
  border-color: rgba(42, 122, 181, 0.55) !important;
  box-shadow: 0 0 0 2px rgba(42, 122, 181, 0.16);
}
.admin-theme-light .homepage-flag:has(input:checked) .homepage-flag-badge {
  color: #fff !important;
  border-color: transparent;
  background: linear-gradient(135deg, #d4af37, #fbbf24);
}

/* Access type radio cards (ebook edit/create) */
.access-type-card {
  background-color: rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(51, 65, 85, 0.6);
}
.access-type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.35);
  color: transparent;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.access-type-card--emerald .access-type-icon { color: #6ee7b7; }
.access-type-card--gold .access-type-icon { color: #fbbf24; }
.access-type-option:has(input:checked) .access-type-card--emerald {
  background-color: rgba(6, 78, 59, 0.15);
  border-color: rgba(52, 211, 153, 0.6);
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.12);
}
.access-type-option:has(input:checked) .access-type-card--gold {
  background-color: rgba(212, 175, 55, 0.1);
  border-color: rgba(212, 175, 55, 0.6);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.12);
}
.access-type-option:has(input:checked) .access-type-card--emerald .access-type-badge {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #34d399, #10b981);
}
.access-type-option:has(input:checked) .access-type-card--gold .access-type-badge {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #d4af37, #fbbf24);
}
.admin-theme-light .access-type-card {
  background-color: rgb(245 238 214) !important;
  border: 2px solid rgba(191, 149, 63, 0.22) !important;
}
.admin-theme-light .access-type-badge {
  border: 1px solid rgba(191, 149, 63, 0.25);
  background: rgba(255, 255, 255, 0.55);
}
.admin-theme-light .access-type-card--emerald .access-type-icon { color: #2d8a52 !important; }
.admin-theme-light .access-type-card--gold .access-type-icon { color: #a67c2e !important; }
.admin-theme-light .access-type-option:has(input:checked) .access-type-card--emerald {
  background-color: rgba(45, 138, 82, 0.16) !important;
  border-color: rgba(45, 138, 82, 0.55) !important;
  box-shadow: 0 0 0 2px rgba(45, 138, 82, 0.16);
}
.admin-theme-light .access-type-option:has(input:checked) .access-type-card--gold {
  background-color: rgba(191, 149, 63, 0.22) !important;
  border-color: rgba(191, 149, 63, 0.65) !important;
  box-shadow: 0 0 0 2px rgba(191, 149, 63, 0.18);
}
.admin-theme-light .access-type-option:has(input:checked) .access-type-card--emerald .access-type-badge {
  color: #fff !important;
  border-color: transparent;
  background: linear-gradient(135deg, #2d8a52, #34d399) !important;
}
.admin-theme-light .access-type-option:has(input:checked) .access-type-card--gold .access-type-badge {
  color: #fff !important;
  border-color: transparent;
  background: linear-gradient(135deg, #d4af37, #fbbf24) !important;
}

/* Admin collapsible sidebar */
.admin-sidebar {
  width: 16rem;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  transition: width 0.22s ease, transform 0.22s ease;
  overflow: hidden;
}

.admin-sidebar__nav {
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 55, 0.45) transparent;
}

.admin-sidebar__nav::-webkit-scrollbar {
  width: 6px;
}

.admin-sidebar__nav::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.38);
  border-radius: 999px;
}

.admin-sidebar__nav::-webkit-scrollbar-track {
  background: transparent;
}

.admin-sidebar__footer a {
  justify-content: flex-start;
}

.admin-shell--desktop-collapsed .admin-sidebar__head {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.admin-shell--desktop-collapsed .admin-sidebar__nav {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.admin-shell--desktop-collapsed .admin-sidebar__nav a,
html.admin-sidebar-collapsed-init .admin-sidebar__nav a {
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
}

.admin-shell--desktop-collapsed .admin-sidebar__footer,
html.admin-sidebar-collapsed-init .admin-sidebar__footer {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.admin-shell--desktop-collapsed .admin-sidebar__footer a,
html.admin-sidebar-collapsed-init .admin-sidebar__footer a {
  justify-content: center;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.admin-shell--desktop-collapsed .admin-sidebar__footer span,
html.admin-sidebar-collapsed-init .admin-sidebar__footer span {
  display: none;
}

.admin-main {
  margin-left: 16rem;
  transition: margin-left 0.22s ease;
}

.admin-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
}

.admin-sidebar__toggle {
  position: absolute;
  top: 5.25rem;
  right: -0.875rem;
  z-index: 45;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  background: #fff;
  color: #8b5e34;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.admin-sidebar__toggle:hover {
  border-color: rgba(212, 175, 55, 0.75);
  color: #d4af37;
}

.admin-sidebar__toggle-icon {
  transition: transform 0.22s ease;
}

html.admin-sidebar-collapsed-init .admin-shell--desktop-collapsed .admin-sidebar,
.admin-shell--desktop-collapsed .admin-sidebar {
  width: 4.75rem;
}

html.admin-sidebar-collapsed-init .admin-shell--desktop-collapsed .admin-main,
.admin-shell--desktop-collapsed .admin-main {
  margin-left: 4.75rem;
}

@media (min-width: 1024px) {
  html.admin-sidebar-collapsed-init .admin-sidebar {
    width: 4.75rem;
  }

  html.admin-sidebar-collapsed-init .admin-main {
    margin-left: 4.75rem;
  }

  html.admin-sidebar-collapsed-init .admin-sidebar__brand-text,
  html.admin-sidebar-collapsed-init .admin-sidebar__nav span,
  html.admin-sidebar-collapsed-init .admin-sidebar__section {
    display: none;
  }

  html.admin-sidebar-collapsed-init .admin-sidebar__brand {
    justify-content: center;
    width: 100%;
  }

  html.admin-sidebar-collapsed-init .admin-sidebar__head {
    justify-content: center;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  html.admin-sidebar-collapsed-init .admin-sidebar__nav a {
    justify-content: center;
    gap: 0;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  html.admin-sidebar-collapsed-init .admin-sidebar__toggle-icon {
    transform: rotate(180deg);
  }
}

html.admin-sidebar-collapsed-init .admin-shell--desktop-collapsed .admin-sidebar__brand-text,
html.admin-sidebar-collapsed-init .admin-shell--desktop-collapsed .admin-sidebar__nav span,
html.admin-sidebar-collapsed-init .admin-shell--desktop-collapsed .admin-sidebar__section,
.admin-shell--desktop-collapsed .admin-sidebar__brand-text,
.admin-shell--desktop-collapsed .admin-sidebar__nav span,
.admin-shell--desktop-collapsed .admin-sidebar__section {
  display: none;
}

html.admin-sidebar-collapsed-init .admin-shell--desktop-collapsed .admin-sidebar__brand,
.admin-shell--desktop-collapsed .admin-sidebar__brand {
  justify-content: center;
  width: 100%;
}

html.admin-sidebar-collapsed-init .admin-shell--desktop-collapsed .admin-sidebar__head,
.admin-shell--desktop-collapsed .admin-sidebar__head {
  justify-content: center;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

html.admin-sidebar-collapsed-init .admin-shell--desktop-collapsed .admin-sidebar__nav a,
.admin-shell--desktop-collapsed .admin-sidebar__nav a {
  justify-content: center;
  gap: 0;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

html.admin-sidebar-collapsed-init .admin-shell--desktop-collapsed .admin-sidebar__toggle-icon,
.admin-shell--desktop-collapsed .admin-sidebar__toggle-icon {
  transform: rotate(180deg);
}

html.admin-sidebar-collapsed-init .admin-shell--desktop-collapsed .admin-topbar__hint,
.admin-shell--desktop-collapsed .admin-topbar__hint {
  display: none;
}

.admin-shell--mobile-open .admin-sidebar-backdrop {
  display: block;
}

@media (max-width: 1023px) {
  .admin-sidebar {
    transform: translateX(-100%);
    width: 16rem;
    height: 100vh;
    height: 100dvh;
  }

  .admin-main {
    margin-left: 0;
  }

  .admin-shell--mobile-open .admin-sidebar {
    transform: translateX(0);
  }

  .admin-sidebar__toggle {
    display: none !important;
  }

  .admin-topbar__hint {
    display: none !important;
  }
}

.section-title-gold {
  /* หัวข้อ section แบบ DEZEL */
  color: #BF953F;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 1.125rem;
}

/* Search button animation */
.bg-size-200 {
  background-size: 200% 200%;
}

.bg-pos-0 {
  background-position: 0% 50%;
}

.bg-pos-100 {
  background-position: 100% 50%;
}

/* Scrollbar hide for category section */
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* ── Checkout payment UI ── */
.checkout-pay-method-grid {
  display: grid;
  gap: 0.65rem;
}

.checkout-pay-method-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.checkout-pay-method-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.checkout-pay-method-grid--1 {
  grid-template-columns: 1fr;
}

.checkout-pay-method-card {
  min-height: 6.25rem;
  padding: 1rem 0.65rem 0.85rem;
  border-width: 2px;
}

.checkout-pay-method-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  font-size: 1.35rem;
  color: #e2e8f0;
}

.checkout-pay-method-card__icon--gold,
.checkout-pay-tab--active .checkout-pay-method-card__icon {
  color: #fbbf24;
}

.checkout-pay-method-card__label {
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.checkout-pay-tab--active .checkout-pay-method-card__label {
  color: #fbbf24;
}

.checkout-pay-tab__logo--bank {
  height: 1.75rem;
  max-width: 4rem;
}

.checkout-selected-method {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 0.875rem;
  border: 1px solid rgba(212, 175, 55, 0.2);
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(0, 0, 0, 0.25));
}

.checkout-selected-method__icon {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: #fbbf24;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.checkout-selected-method__edit {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.7rem;
  border-radius: 0.625rem;
  border: 1px solid rgba(212, 175, 55, 0.25);
  background: rgba(0, 0, 0, 0.35);
  color: #d4af37;
  font-size: 0.6875rem;
  font-weight: 700;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.checkout-selected-method__edit:hover {
  border-color: rgba(212, 175, 55, 0.5);
  color: #fbbf24;
  background: rgba(212, 175, 55, 0.08);
}

.checkout-pay-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.checkout-pay-modal.hidden {
  display: none;
}

.checkout-pay-modal__panel {
  border-radius: 1rem 1rem 0 0;
  box-shadow: 0 -12px 50px rgba(0, 0, 0, 0.45);
}

@media (min-width: 640px) {
  .checkout-pay-modal__panel {
    border-radius: 1rem;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  }
}

.checkout-pay-modal__body .checkout-panel {
  border: none;
  background: transparent;
  padding: 0;
}

.checkout-pay-modal__foot {
  backdrop-filter: blur(8px);
}

.checkout-pay-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.75rem 0.5rem;
  border-radius: 0.875rem;
  border: 2px solid rgba(100, 116, 139, 0.35);
  background: rgba(0, 0, 0, 0.45);
  color: #cbd5e1;
  font-size: 0.7rem;
  font-weight: 600;
  transition: border-color 0.2s, background 0.2s, color 0.2s, transform 0.15s;
}

.checkout-pay-tab i {
  font-size: 1.1rem;
}

.checkout-pay-tab:hover {
  border-color: rgba(212, 175, 55, 0.45);
  color: #fbbf24;
}

.checkout-pay-tab--active {
  border-color: #d4af37;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.22), rgba(251, 191, 36, 0.12));
  color: #fbbf24;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.15);
}

.checkout-panel {
  border-radius: 1rem;
  border: 1px solid rgba(100, 116, 139, 0.25);
  background: rgba(0, 0, 0, 0.35);
  padding: 1rem 1.1rem;
}

.checkout-panel__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(100, 116, 139, 0.2);
}

.checkout-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.checkout-input {
  width: 100%;
  border-radius: 0.75rem;
  border: 2px solid rgba(212, 175, 55, 0.2);
  background: rgba(0, 0, 0, 0.55);
  padding: 0.65rem 0.85rem;
  font-size: 0.875rem;
  color: #f1f5f9;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.checkout-input:focus {
  outline: none;
  border-color: #d4af37;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}

.checkout-input::placeholder {
  color: #64748b;
}

.checkout-amount-hero {
  text-align: center;
  padding: 1rem;
  border-radius: 0.875rem;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(0, 0, 0, 0.2));
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.checkout-bank-card {
  border-radius: 0.875rem;
  border: 1px solid rgba(212, 175, 55, 0.15);
  background: rgba(243, 232, 255, 0.04);
  padding: 0.85rem 1rem;
}

.checkout-bank-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8rem;
}

.checkout-bank-row__label {
  color: #94a3b8;
  flex-shrink: 0;
}

.checkout-bank-row__value {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #f1f5f9;
  font-weight: 600;
  text-align: right;
  min-width: 0;
  word-break: break-all;
}

.checkout-copy-btn {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(212, 175, 55, 0.25);
  background: rgba(212, 175, 55, 0.08);
  color: #d4af37;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.checkout-copy-btn:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: rgba(212, 175, 55, 0.5);
}

.checkout-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.checkout-steps li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  color: #94a3b8;
}

.checkout-steps__num {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 9999px;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: #fbbf24;
  font-size: 0.65rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.checkout-file-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  border-radius: 0.875rem;
  border: 2px dashed rgba(212, 175, 55, 0.3);
  background: rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.checkout-file-drop:hover {
  border-color: rgba(212, 175, 55, 0.55);
  background: rgba(212, 175, 55, 0.05);
}

.checkout-panel__head--split {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.checkout-bank-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.75rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid rgba(100, 116, 139, 0.25);
}

.checkout-bank-head__logo {
  height: 2.25rem;
  max-width: 7rem;
  object-fit: contain;
  background: #fff;
  border-radius: 0.5rem;
  padding: 0.25rem 0.5rem;
  flex-shrink: 0;
}

.checkout-bank-head__fallback {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, rgba(6, 130, 68, 0.25), rgba(6, 130, 68, 0.08));
  border: 1px solid rgba(6, 130, 68, 0.35);
  color: #4ade80;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.checkout-promptpay-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.45rem;
  border-radius: 0.35rem;
  background: rgba(6, 130, 68, 0.12);
  border: 1px solid rgba(6, 130, 68, 0.3);
  color: #86efac;
  font-size: 0.7rem;
  font-weight: 700;
}

.checkout-promptpay-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #065f46, #047857);
  color: #ecfdf5;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.checkout-promptpay-mark i {
  font-size: 0.85rem;
}

.checkout-card-brands {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.checkout-card-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 1.5rem;
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(100, 116, 139, 0.3);
  font-size: 1.35rem;
  opacity: 0.55;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
}

.checkout-card-brand--active {
  opacity: 1;
  transform: scale(1.08);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.25);
  border-color: rgba(212, 175, 55, 0.45);
}

.checkout-card-brand--visa { color: #1a1f71; background: rgba(255, 255, 255, 0.92); }
.checkout-card-brand--mastercard { color: #eb001b; background: rgba(255, 255, 255, 0.92); }
.checkout-card-brand--jcb { color: #0b4ea2; background: rgba(255, 255, 255, 0.92); }
.checkout-card-brand--amex { color: #2e77bc; background: rgba(255, 255, 255, 0.92); }

.checkout-pay-tab__logo {
  height: 1.35rem;
  max-width: 3.5rem;
  object-fit: contain;
  background: #fff;
  border-radius: 0.25rem;
  padding: 0.1rem 0.25rem;
}

.checkout-pay-tab__logo--cards {
  height: 1.25rem;
  max-width: 4.5rem;
  padding: 0.12rem 0.35rem;
}

.checkout-panel__card-icon {
  height: 1.35rem;
  max-width: 4.25rem;
  object-fit: contain;
  background: #fff;
  border-radius: 0.25rem;
  padding: 0.1rem 0.3rem;
}

.checkout-card-brands__img {
  display: block;
  height: 2rem;
  width: auto;
  max-width: 7.5rem;
  object-fit: contain;
  background: #fff;
  border-radius: 0.375rem;
  padding: 0.2rem 0.45rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.checkout-input-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #d4af37;
  font-size: 0.85rem;
  pointer-events: none;
}

.checkout-input-icon--sm {
  font-size: 0.75rem;
}

.checkout-input--icon {
  padding-left: 2.35rem;
}

.checkout-input--icon-sm {
  padding-left: 2.1rem;
}

.checkout-card-form {
  padding: 1rem;
  border-radius: 0.875rem;
  border: 1px solid rgba(212, 175, 55, 0.15);
  background: rgba(0, 0, 0, 0.25);
}

.checkout-summary {
  border-radius: 1rem;
  border: 1px solid rgba(212, 175, 55, 0.25);
  background: linear-gradient(160deg, rgba(212, 175, 55, 0.08), rgba(0, 0, 0, 0.45));
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.checkout-summary__total {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(100, 116, 139, 0.25);
}

.checkout-login-notice {
  display: flex;
  gap: 0.6rem;
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.checkout-submit-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border-radius: 0.875rem;
  border: none;
  background: linear-gradient(135deg, #d4af37, #fbbf24);
  color: #000;
  font-size: 0.875rem;
  font-weight: 800;
  cursor: pointer;
  transition: filter 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.25);
}

.checkout-submit-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.checkout-back-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  border-radius: 0.875rem;
  border: 1px solid rgba(100, 116, 139, 0.4);
  background: rgba(0, 0, 0, 0.35);
  color: #cbd5e1;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.checkout-back-btn:hover {
  border-color: rgba(212, 175, 55, 0.45);
  color: #fbbf24;
}

.checkout-trust {
  font-size: 0.7rem;
  color: #94a3b8;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(100, 116, 139, 0.2);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1023px) {
  .checkout-summary {
    order: -1;
  }
}

/* Cookie consent (PDPA) */
.cookie-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  padding: 0.75rem;
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
}

@media (min-width: 768px) {
  .cookie-consent {
    padding: 1rem 1.25rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  }
}

body.cookie-banner-open .cookie-consent {
  pointer-events: auto;
}

@media (max-width: 767px) {
  body.cookie-banner-open {
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  }

  body.cookie-banner-open .cookie-consent {
    bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
  }
}

.cookie-consent__inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-radius: 1rem;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: linear-gradient(160deg, rgba(15, 14, 13, 0.98), rgba(0, 0, 0, 0.96));
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(212, 175, 55, 0.08);
  backdrop-filter: blur(12px);
}

.cookie-consent__icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: #d4af37;
  font-size: 1.1rem;
}

.cookie-consent__content {
  flex: 1 1 14rem;
  min-width: 0;
}

.cookie-consent__title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fbbf24;
  margin-bottom: 0.35rem;
}

.cookie-consent__text {
  font-size: 0.75rem;
  line-height: 1.55;
  color: #94a3b8;
  margin: 0;
}

.cookie-consent__link {
  color: #d4af37;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-consent__link:hover {
  color: #fbbf24;
}

.cookie-consent__actions {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

@media (min-width: 768px) {
  .cookie-consent__actions {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    align-self: center;
    max-width: none;
  }
}

.cookie-consent__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.9rem;
  border-radius: 0.625rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
  white-space: nowrap;
}

.cookie-consent__btn:active {
  transform: scale(0.98);
}

.cookie-consent__btn--primary {
  background: linear-gradient(135deg, #d4af37, #fbbf24);
  color: #000;
  border-color: rgba(251, 191, 36, 0.5);
}

.cookie-consent__btn--primary:hover {
  filter: brightness(1.06);
}

.cookie-consent__btn--outline {
  background: rgba(212, 175, 55, 0.08);
  color: #fbbf24;
  border-color: rgba(212, 175, 55, 0.4);
}

.cookie-consent__btn--outline:hover {
  background: rgba(212, 175, 55, 0.15);
}

.cookie-consent__btn--ghost {
  background: transparent;
  color: #94a3b8;
  border-color: rgba(100, 116, 139, 0.45);
}

.cookie-consent__btn--ghost:hover {
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.6);
}

.cookie-consent-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.cookie-consent-modal.hidden {
  display: none;
}

.cookie-consent-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.cookie-consent-modal__panel {
  position: relative;
  width: 100%;
  max-width: 32rem;
  max-height: min(90vh, 36rem);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 1rem;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: linear-gradient(165deg, #1a1918, #0a0a0a);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
}

.cookie-consent-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.25rem 0.75rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.cookie-consent-modal__title {
  font-size: 1rem;
  font-weight: 700;
  color: #fbbf24;
}

.cookie-consent-modal__sub {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.5;
}

.cookie-consent-modal__close {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.cookie-consent-modal__close:hover {
  background: rgba(212, 175, 55, 0.15);
  color: #fbbf24;
}

.cookie-consent-modal__body {
  padding: 0.75rem 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.cookie-pref {
  padding: 0.85rem 0.9rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(100, 116, 139, 0.25);
  background: rgba(0, 0, 0, 0.35);
}

.cookie-pref__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-pref__name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #e2e8f0;
}

.cookie-pref__desc {
  margin-top: 0.25rem;
  font-size: 0.7rem;
  line-height: 1.45;
  color: #94a3b8;
}

.cookie-pref__always {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.15);
}

.cookie-toggle {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  cursor: pointer;
}

.cookie-toggle__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-toggle__track {
  width: 2.75rem;
  height: 1.5rem;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.45);
  border: 1px solid rgba(100, 116, 139, 0.5);
  transition: background 0.2s, border-color 0.2s;
  position: relative;
}

.cookie-toggle__track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.cookie-toggle__input:checked + .cookie-toggle__track {
  background: rgba(212, 175, 55, 0.55);
  border-color: rgba(212, 175, 55, 0.7);
}

.cookie-toggle__input:checked + .cookie-toggle__track::after {
  transform: translateX(1.25rem);
}

.cookie-toggle__input:focus-visible + .cookie-toggle__track {
  outline: 2px solid #d4af37;
  outline-offset: 2px;
}

.cookie-consent-modal__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  padding: 0.85rem 1.25rem 1.15rem;
  border-top: 1px solid rgba(212, 175, 55, 0.15);
}

body.cookie-settings-open {
  overflow: hidden;
}

/* Articles */
.article-prose {
  font-size: 1rem;
  line-height: 1.85;
  color: #cbd5e1;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.article-prose p {
  margin-bottom: 1.25rem;
}

.article-prose p:last-child {
  margin-bottom: 0;
}

.article-lead {
  border-left: 3px solid rgba(212, 175, 55, 0.55);
  padding-left: 1rem;
}

.article-figure {
  margin: 1.5rem 0;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.2);
  background: rgba(0, 0, 0, 0.35);
}

.article-figure img {
  width: 100%;
  height: auto;
  max-height: 22rem;
  object-fit: cover;
  display: block;
}

.article-figure figcaption {
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  color: #94a3b8;
  border-top: 1px solid rgba(100, 116, 139, 0.2);
}

.article-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 0.5rem;
  border-radius: 0.625rem;
  border: 1px solid rgba(100, 116, 139, 0.35);
  background: rgba(0, 0, 0, 0.4);
  color: #cbd5e1;
  font-weight: 600;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.article-share-btn:hover {
  border-color: rgba(212, 175, 55, 0.5);
  color: #fbbf24;
  background: rgba(212, 175, 55, 0.08);
}

.article-prose__h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: #f1f5f9;
  line-height: 1.35;
  scroll-margin-top: 5rem;
}

.article-prose__h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #e2e8f0;
}

.article-prose__list {
  margin: 0 0 1.25rem 1.25rem;
  list-style: disc;
  color: #cbd5e1;
}

.article-prose__list li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.article-toc ol {
  list-style: decimal;
  padding-left: 1.25rem;
}

.article-faq__item summary::-webkit-details-marker {
  display: none;
}

/* Articles hub — news grid */
.articles-hub__filter-pill {
  display: inline-flex;
  padding: 0.45rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(100, 116, 139, 0.35);
  background: rgba(0, 0, 0, 0.35);
  color: #94a3b8;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.articles-hub__filter-pill:hover,
.articles-hub__filter-pill.is-active {
  border-color: rgba(212, 175, 55, 0.45);
  color: #fbbf24;
  background: rgba(212, 175, 55, 0.1);
}

.articles-hub__card {
  min-height: 100%;
}

.article-read-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 90;
  background: linear-gradient(90deg, #bf953f, #fbbf24, #d4af37);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.45);
  transition: width 0.08s linear;
  pointer-events: none;
}

/* E-book detail page */
.detail-page__glow {
  background:
    radial-gradient(640px 260px at 20% 0%, rgba(252, 246, 186, 0.14), transparent 65%),
    radial-gradient(560px 240px at 80% 10%, rgba(191, 149, 63, 0.14), transparent 60%);
}

.detail-share-card {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}
.detail-share-card #share-link {
  max-width: 100%;
  min-width: 0;
}

.detail-discount-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 800;
  color: #0f172a;
  background: linear-gradient(135deg, #fbbf24, #d4af37);
  box-shadow: 0 8px 20px rgba(212, 175, 55, 0.25);
}

.detail-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.65rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(212, 175, 55, 0.15);
  background: rgba(0, 0, 0, 0.35);
  color: #cbd5e1;
  font-weight: 600;
}

.detail-trust-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  padding-top: 0.25rem;
}

.detail-trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
  font-size: 0.65rem;
  line-height: 1.25;
  color: #94a3b8;
}

.detail-trust-item i {
  color: #d4af37;
  font-size: 0.85rem;
}

.detail-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(212, 175, 55, 0.2);
  background: rgba(0, 0, 0, 0.45);
  color: #cbd5e1;
  font-size: 0.6875rem;
  font-weight: 700;
}

.detail-chip--gold {
  border-color: rgba(212, 175, 55, 0.35);
  background: rgba(212, 175, 55, 0.12);
  color: #fbbf24;
}

.detail-excerpt {
  border-left: 3px solid rgba(212, 175, 55, 0.55);
  padding-left: 1rem;
}

.detail-section-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: none;
}

.detail-section-nav::-webkit-scrollbar {
  display: none;
}

.detail-section-nav__link {
  flex-shrink: 0;
  padding: 0.5rem 0.9rem;
  border-radius: 9999px;
  border: 1px solid rgba(100, 116, 139, 0.35);
  background: rgba(0, 0, 0, 0.35);
  color: #94a3b8;
  font-size: 0.8125rem;
  font-weight: 700;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.detail-section-nav__link:hover,
.detail-section-nav__link.is-active {
  border-color: rgba(212, 175, 55, 0.45);
  color: #fbbf24;
  background: rgba(212, 175, 55, 0.1);
}

.detail-section__title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: #fbbf24;
}

.detail-feature-list {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .detail-feature-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.detail-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 0.9rem;
  border-radius: 0.875rem;
  border: 1px solid rgba(212, 175, 55, 0.12);
  background: rgba(0, 0, 0, 0.3);
  color: #cbd5e1;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.detail-feature-list__icon {
  color: #d4af37;
  margin-top: 0.15rem;
}

.detail-keyword {
  display: inline-flex;
  padding: 0.3rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid rgba(212, 175, 55, 0.2);
  background: rgba(212, 175, 55, 0.08);
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 600;
}

.detail-faq-item {
  border-radius: 0.875rem;
  border: 1px solid rgba(212, 175, 55, 0.15);
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.detail-faq-item__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  cursor: pointer;
  font-weight: 700;
  color: #e2e8f0;
  list-style: none;
}

.detail-faq-item__q::-webkit-details-marker {
  display: none;
}

.detail-faq-item__q::after {
  content: '+';
  color: #d4af37;
  font-size: 1.1rem;
  font-weight: 800;
  flex-shrink: 0;
}

.detail-faq-item[open] .detail-faq-item__q::after {
  content: '−';
}

.detail-faq-item__a {
  padding: 0 1rem 1rem;
  color: #94a3b8;
  font-size: 0.9375rem;
  line-height: 1.65;
}

.detail-review-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: 0.875rem;
  border: 1px solid rgba(212, 175, 55, 0.1);
  background: rgba(0, 0, 0, 0.35);
}

.detail-review-card__avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #0f172a;
  background: linear-gradient(135deg, #fbbf24, #d4af37);
  flex-shrink: 0;
}

.detail-mobile-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  padding: 0.65rem 0.85rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
  background: rgba(8, 12, 20, 0.92);
  border-top: 1px solid rgba(212, 175, 55, 0.25);
  backdrop-filter: blur(12px);
}

.detail-mobile-bar__inner {
  max-width: 42rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.detail-mobile-bar__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 1.1rem;
  border-radius: 0.875rem;
  background: linear-gradient(135deg, #d4af37, #fbbf24);
  color: #0f172a;
  font-size: 0.875rem;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.35);
}

.invoice-pdf-modal.hidden {
  display: none;
}

.member-card-modal.hidden {
  display: none;
}

.member-card-modal__stage {
  perspective: 1200px;
}

.member-card-modal__wrap {
  animation: member-card-float-in 0.35s ease-out;
}

.member-card-modal__close {
  backdrop-filter: blur(6px);
}

.member-luxury-card--modal {
  border-radius: 1.75rem;
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(212, 175, 55, 0.22),
    0 0 48px rgba(212, 175, 55, 0.12);
  transform: rotateX(4deg) rotateY(-2deg);
  transform-style: preserve-3d;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.member-luxury-card--modal:hover {
  transform: rotateX(0deg) rotateY(0deg) translateY(-2px);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(212, 175, 55, 0.35),
    0 0 56px rgba(212, 175, 55, 0.18);
}

.member-luxury-card--modal::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.14) 0%, transparent 38%, transparent 62%, rgba(255, 255, 255, 0.06) 100%);
  z-index: 3;
}

@keyframes member-card-float-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.member-billing-card-preview {
  cursor: pointer;
}

.member-billing-card-preview:focus-visible {
  outline: 2px solid rgba(212, 175, 55, 0.65);
  outline-offset: 2px;
}

.member-billing-pending {
  margin-bottom: 0;
}

.member-billing-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .member-billing-steps {
    grid-template-columns: 1fr;
  }
}

.member-billing-steps__item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.75rem;
  color: rgb(100 116 139);
}

.member-billing-steps__item--done {
  color: rgb(167 243 208);
}

.member-billing-steps__item--current {
  color: rgb(253 230 138);
  font-weight: 600;
}

.member-billing-steps__dot {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  border: 1px solid rgb(51 65 85);
  background: rgb(15 23 42 / 0.6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
}

.member-billing-steps__item--done .member-billing-steps__dot {
  border-color: rgb(16 185 129 / 0.45);
  background: rgb(16 185 129 / 0.15);
  color: rgb(110 231 183);
}

.member-billing-steps__item--current .member-billing-steps__dot {
  border-color: rgb(245 158 11 / 0.5);
  background: rgb(245 158 11 / 0.15);
  color: rgb(253 230 138);
}

.member-billing-meta {
  border-radius: 0.85rem;
  border: 1px solid rgb(30 41 59 / 0.8);
  background: rgb(0 0 0 / 0.25);
  padding: 0.85rem 1rem;
}

.member-billing-meta__label {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(100 116 139);
  margin-bottom: 0.35rem;
}

.member-billing-meta__value {
  color: rgb(226 232 240);
  font-weight: 600;
  line-height: 1.35;
}

.member-billing-invoices table tbody tr:last-child {
  border-bottom: none;
}

.member-billing-terms {
  list-style: none;
  margin: 0;
  padding: 0;
}

.member-billing-terms li {
  display: flex;
  align-items: flex-start;
}

.invoice-pdf-modal__panel {
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

/* Member hero — premium card background */
.member-hero-card {
  position: relative;
  aspect-ratio: 4 / 1;
  min-height: 8.5rem;
}

@media (min-width: 768px) {
  .member-hero-card {
    min-height: 10.5rem;
  }
}

.member-hero-card__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.member-hero-card__actions {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
  max-width: calc(100% - 1rem);
}

.member-hero-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  line-height: 1;
  color: #e2e8f0;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(212, 175, 55, 0.35);
  backdrop-filter: blur(6px);
  transition: border-color 0.2s, color 0.2s;
}

.member-hero-card__btn:hover {
  border-color: rgba(212, 175, 55, 0.65);
  color: #fbbf24;
}

@media (max-width: 639px) {
  .member-hero-card {
    aspect-ratio: 4 / 1;
    min-height: 7.5rem;
  }

  .member-hero-card__actions {
    top: 0.5rem;
    right: 0.5rem;
  }

  .member-hero-card__btn span:not(.rounded-full) {
    display: none;
  }
}

/* Member tier status */
.member-tier-strip {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(212, 175, 55, 0.2);
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(0, 0, 0, 0.35));
}

.member-tier-strip__icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.875rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(212, 175, 55, 0.3);
  background: rgba(212, 175, 55, 0.12);
  color: #fbbf24;
}

.member-tier-strip__icon--active {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
}

.member-tier-strip__icon--expired {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
}

.member-tier-strip__icon--free {
  border-color: rgba(100, 116, 139, 0.45);
  background: rgba(100, 116, 139, 0.12);
  color: #94a3b8;
}

.member-tier-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.member-tier-badge--sm {
  font-size: 0.5625rem;
  padding: 0.2rem 0.5rem;
}

.member-tier-badge--active {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.45);
  color: #6ee7b7;
}

.member-tier-badge--expired {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fcd34d;
}

.member-tier-badge--free {
  background: rgba(100, 116, 139, 0.15);
  border-color: rgba(100, 116, 139, 0.45);
  color: #cbd5e1;
}

.member-tier-overview {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.06), rgba(0, 0, 0, 0.25));
}

/* Hero banner — 1 ช่อง = 16:9 ตามไฟล์มาตรฐาน 640×361 / 1280×722 */
.hero3-viewport {
  width: 100%;
  overflow: hidden;
}

.hero3-track {
  align-items: flex-start;
}

.hero3-item {
  aspect-ratio: 16 / 9;
  height: auto;
  background: #020617;
}

.hero3-banner-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Promo banner Celeste Academy — สัดส่วนตามไฟล์ 1024×115 */
.home-promo-banner {
  display: block;
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
  line-height: 0;
  border-radius: 0.625rem;
  background: #020617;
  border: 1px solid rgba(212, 175, 55, 0.1);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.home-promo-banner img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1024 / 115;
  object-fit: cover;
  object-position: center center;
}

.answer-block__item dt {
  color: #f1f5f9;
}

.quick-answer {
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(0, 0, 0, 0.35));
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.quick-answer__label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #d4af37;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.quick-answer__question {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 0.5rem;
}

.quick-answer__answer {
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.65;
}


/* Admin / E-flip PDF reader */
.pdf-flip-modal__panel {
  max-width: 96vw;
}

.pdf-flip-modal__panel.is-fullscreen,
.pdf-flip-modal__panel:fullscreen {
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  border-radius: 0 !important;
  border: none !important;
}

#file-preview-modal.is-flip-fullscreen > .absolute.inset-0.p-4,
#file-preview-modal.is-flip-fullscreen > .absolute.inset-0.md\:p-6,
#sample-ebook-modal.is-flip-fullscreen > .absolute.inset-0.p-4,
#sample-ebook-modal.is-flip-fullscreen > .absolute.inset-0.md\:p-6 {
  padding: 0 !important;
}

#file-preview-modal.is-flip-fullscreen .pdf-flip-modal__panel,
#sample-ebook-modal.is-flip-fullscreen .pdf-flip-modal__panel {
  width: 100vw;
  height: 100vh;
  max-width: none;
}

#file-preview-modal.is-flip-fullscreen [data-preview-close].pdf-flip-backdrop,
#sample-ebook-modal.is-flip-fullscreen [data-sample-close].pdf-flip-backdrop,
#reader-flip-modal.is-flip-fullscreen [data-reader-close].pdf-flip-backdrop {
  opacity: 0;
  pointer-events: none;
}

#reader-flip-modal.is-flip-fullscreen > .absolute.inset-0.p-4,
#reader-flip-modal.is-flip-fullscreen > .absolute.inset-0.md\:p-6 {
  padding: 0 !important;
}

#reader-flip-modal.is-flip-fullscreen .pdf-flip-modal__panel {
  width: 100vw;
  height: 100vh;
  max-width: none;
}

/* Reader corner library */
.reader-book-card .reader-book-open {
  cursor: pointer;
  border: none;
  background: transparent;
  padding: 0;
  color: inherit;
}

.reader-book-card .reader-book-open:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.reader-book-card--read {
  border-color: rgba(16, 185, 129, 0.22);
}

.reader-book-card--locked {
  opacity: 0.72;
}

.reader-book-card--locked .reader-cover-wrap {
  filter: grayscale(0.35);
}

.reader-read-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  background: rgba(16, 185, 129, 0.28);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #a7f3d0;
  font-size: 10px;
  font-weight: 700;
  backdrop-filter: blur(4px);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.12);
}

.pdf-flip-modal__body {
  position: relative;
  min-height: 0;
  background: radial-gradient(ellipse at center, rgba(30, 41, 59, 0.5) 0%, rgba(2, 6, 23, 0.95) 70%);
}

.pdf-flip-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: #cbd5e1;
  font-size: 0.875rem;
  z-index: 2;
  padding: 1.5rem;
}

.pdf-flip-loading__card {
  width: min(100%, 22rem);
  padding: 1.25rem 1.35rem 1.1rem;
  border-radius: 1rem;
  border: 1px solid rgba(212, 175, 55, 0.28);
  background: rgba(2, 6, 23, 0.82);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.pdf-flip-loading__label {
  margin: 0 0 0.85rem;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: #f8fafc;
  line-height: 1.45;
}

.pdf-flip-loading__bar {
  position: relative;
  width: 100%;
  height: 0.55rem;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.18);
  border: 1px solid rgba(212, 175, 55, 0.22);
}

.pdf-flip-loading__bar-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #b8860b 0%, #d4af37 45%, #fbbf24 100%);
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.45);
  transition: width 0.28s ease;
}

.pdf-flip-loading__pct {
  margin-top: 0.65rem;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #d4af37;
}

.pdf-flip-loading--error .pdf-flip-loading__bar-fill {
  background: linear-gradient(90deg, #991b1b 0%, #ef4444 100%);
  box-shadow: none;
}

.pdf-flip-loading--error .pdf-flip-loading__pct {
  color: #f87171;
}

.pdf-flip-host {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  overflow: hidden;
  cursor: pointer;
}

.pdf-flip-book,
.pdf-flip-book.stf__parent {
  position: relative;
  display: block;
  box-sizing: border-box;
  flex-shrink: 0;
  touch-action: pan-y;
  transform: translateZ(0);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.pdf-flip-book .stf__wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

.pdf-flip-book .stf__block {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  perspective: 2000px;
}

.pdf-flip-book .stf__item {
  display: none;
  position: absolute;
  transform-style: preserve-3d;
}

.pdf-flip-book .stf__outerShadow,
.pdf-flip-book .stf__innerShadow,
.pdf-flip-book .stf__hardShadow,
.pdf-flip-book .stf__hardInnerShadow {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
}

.pdf-flip-page,
.pdf-flip-book .stf__item.--soft,
.pdf-flip-book .stf__item.--hard {
  position: relative;
  background-color: #fff;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.pdf-flip-page--blank {
  background-color: #fff;
}

.pdf-flip-page--pending img {
  opacity: 0.55;
  filter: saturate(0.4);
}

.pdf-flip-watermark {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: hidden;
  user-select: none;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
  font-size: clamp(1rem, 3.2vw, 1.75rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(154, 123, 47, 0.14);
  line-height: 2.4;
  white-space: nowrap;
  transform: rotate(-24deg) scale(1.15);
  display: grid;
  place-content: center;
  text-align: center;
}

.pdf-flip-page img,
.pdf-flip-book .stf__item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: high-quality;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  pointer-events: none;
  user-select: none;
}

.pdf-flip-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(212, 175, 55, 0.18);
  background: rgba(0, 0, 0, 0.55);
  flex-shrink: 0;
}

.pdf-flip-toolbar__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: rgba(0, 0, 0, 0.45);
  color: #fbbf24;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.pdf-flip-toolbar__btn:hover {
  border-color: rgba(212, 175, 55, 0.65);
  color: #fde68a;
  background: rgba(212, 175, 55, 0.12);
}

.pdf-flip-toolbar__hint {
  font-size: 0.6875rem;
  color: #64748b;
  margin-left: 0.25rem;
}

.pdf-flip-toolbar__page {
  min-width: 5.5rem;
  text-align: center;
  font-size: 0.8125rem;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}

.ebook-flip-trigger {
  cursor: pointer;
  transition: color 0.2s;
}

.ebook-flip-trigger:hover {
  color: #7dd3fc;
}

.ebook-has-file #ebook-file {
  pointer-events: none;
}

.ebook-has-file #ebook-drop:hover {
  border-color: rgba(212, 175, 55, 0.55);
}

