/* id-shop — ธีมพื้นดำ เส้นขอบเรืองแสง (นีออนชมพู-ฟ้า-ม่วง) */

:root {
  --pink: #f79ac8;
  --pink-hot: #ff5fb0;
  --sky: #8bcdf3;
  --sky-hot: #43b8ff;
  --lilac: #b6a0f2;
  --lilac-hot: #8b5cf6;
  --bg: #06060b;
}

/* ============================================ ตัวแปรสีของ tailwind.config (base.html)
   ค่าเป็น "R G B" ไม่มี rgb() — tailwind เอาไปต่อ alpha เอง (เช่น bg-pink/40) */
.theme-dark {
  --c-base-50: 29 29 44;   --c-base-100: 6 6 11;   --c-base-200: 16 16 25;
  --c-base-300: 26 26 40;  --c-base-400: 38 38 57;
  --c-pink-light: 51 19 42;   --c-pink: 247 154 200;  --c-pink-deep: 255 176 216;
  --c-sky-light: 12 37 54;    --c-sky: 139 205 243;   --c-sky-deep: 165 220 255;
  --c-lilac-light: 31 23 57;  --c-lilac: 182 160 242; --c-lilac-deep: 200 180 255;
  --c-ink: 236 233 247;       --c-ink-soft: 164 157 194; --c-ink-faint: 107 101 137;
}

/* หน้าร้าน: พาสเทลแบบ "ดินปั้น" ชุดเดียวกับ Table-p — พื้นสว่าง -deep จึงเป็นเฉด "เข้ม" ไว้อ่านบนพื้นขาว */
.theme-cute {
  --c-base-50: 247 242 255;  --c-base-100: 251 248 255; --c-base-200: 255 255 255;
  --c-base-300: 243 238 255; --c-base-400: 230 221 255;
  --c-pink-light: 255 227 238;  --c-pink: 255 143 184;  --c-pink-deep: 214 63 122;
  --c-sky-light: 221 238 255;   --c-sky: 127 184 240;   --c-sky-deep: 46 115 189;
  --c-lilac-light: 237 229 255; --c-lilac: 156 124 255; --c-lilac-deep: 100 69 219;
  --c-ink: 42 30 59;            --c-ink-soft: 107 95 122; --c-ink-faint: 154 144 174;
}

body {
  -webkit-font-smoothing: antialiased;
  background-color: var(--bg);
}

/* พื้นหลังดำ + แสงนีออนฟุ้งจากขอบบน และลายกริดเรืองแสงจาง ๆ */
.bg-grid {
  background-image:
    radial-gradient(ellipse 55% 40% at 12% -8%, rgba(255, 95, 176, 0.20), transparent 70%),
    radial-gradient(ellipse 50% 38% at 88% -8%, rgba(67, 184, 255, 0.18), transparent 70%),
    radial-gradient(ellipse 70% 45% at 50% 105%, rgba(139, 92, 246, 0.15), transparent 75%),
    linear-gradient(rgba(182, 160, 242, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(182, 160, 242, 0.055) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 46px 46px, 46px 46px;
  background-attachment: fixed;
}

/* ============================================ เส้นขอบเรืองแสง */
/* ใช้กับกล่องหลักทั้งหมด: ขอบนีออน + แสงฟุ้งออกนอก + เงาสะท้อนด้านใน */
.keycard {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(150deg, rgba(38, 30, 58, 0.85) 0%, rgba(12, 12, 22, 0.95) 55%, rgba(8, 14, 26, 0.95) 100%);
  border: 1px solid rgba(182, 160, 242, 0.42);
  box-shadow:
    0 0 0 1px rgba(255, 95, 176, 0.10),
    0 0 18px -2px rgba(139, 92, 246, 0.45),
    0 0 46px -8px rgba(255, 95, 176, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.keycard:hover {
  border-color: rgba(255, 95, 176, 0.55);
  box-shadow:
    0 0 0 1px rgba(255, 95, 176, 0.18),
    0 0 24px -2px rgba(139, 92, 246, 0.6),
    0 0 64px -8px rgba(255, 95, 176, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* เส้นนีออนไล่สีพาดขอบบน */
.keycard::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--pink-hot), var(--lilac-hot), var(--sky-hot), transparent);
  filter: blur(0.4px);
  box-shadow: 0 0 12px rgba(255, 95, 176, 0.85), 0 0 22px rgba(139, 92, 246, 0.55);
}

/* แสงกวาดผ่านหน้าบัตร */
.keycard::after {
  content: "";
  position: absolute;
  top: -60%;
  left: -40%;
  width: 45%;
  height: 220%;
  background: linear-gradient(90deg, transparent, rgba(199, 180, 255, 0.10), transparent);
  transform: rotate(18deg);
  animation: sheen 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes sheen {
  0%, 65% { left: -40%; }
  100%    { left: 130%; }
}

/* ช่องเลือกหมวดบนหน้าแรก — ขอบเรืองแสงแบบเดียวกันแต่ไม่มีแสงกวาด */
.glow-card {
  background: linear-gradient(155deg, rgba(34, 27, 54, 0.8), rgba(9, 9, 17, 0.95));
  border: 1px solid rgba(182, 160, 242, 0.4);
  box-shadow:
    0 0 16px -3px rgba(139, 92, 246, 0.45),
    0 0 40px -10px rgba(255, 95, 176, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}

.glow-card:hover {
  border-color: rgba(255, 95, 176, 0.7);
  box-shadow:
    0 0 26px -2px rgba(255, 95, 176, 0.6),
    0 0 70px -12px rgba(139, 92, 246, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ---------------------------------------------- แท็บ Creator: การ์ดเลือกแพ็ก
   กดเลือกได้ทีละใบ สถานะ "เลือกอยู่" ผูกกับ data-selected ที่ JS สลับให้
   (ปุ่มจริง ๆ ไม่ใช่ input:radio — จะได้จัดเลย์เอาต์กับแสงเรืองได้อิสระ) */
.pkg-card {
  position: relative;
  border-radius: 1.25rem;
  border: 1px solid rgba(107, 101, 137, 0.35);
  background: linear-gradient(155deg, rgba(30, 26, 48, 0.75), rgba(9, 9, 17, 0.95));
  transition: transform 0.2s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.pkg-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 95, 176, 0.55);
  box-shadow: 0 0 22px -4px rgba(255, 95, 176, 0.45);
}

.pkg-card[data-selected="true"] {
  border-color: rgba(255, 95, 176, 0.9);
  background: linear-gradient(155deg, rgba(51, 19, 42, 0.9), rgba(13, 11, 22, 0.97));
  box-shadow:
    0 0 0 1px rgba(255, 95, 176, 0.5),
    0 0 30px -6px rgba(255, 95, 176, 0.65),
    0 0 60px -14px rgba(139, 92, 246, 0.6);
}

/* เครื่องหมายถูกมุมขวาบน — โผล่มาเฉพาะตอนเลือก */
.pkg-tick {
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.pkg-card[data-selected="true"] .pkg-tick {
  opacity: 1;
  transform: scale(1);
}

/* ตต ร้าน — ของเสริม ใช้โทนฟ้าให้ต่างจากแพ็กหลัก */
.addon-card:hover {
  transform: none;
  border-color: rgba(139, 205, 243, 0.6);
  box-shadow: 0 0 22px -4px rgba(139, 205, 243, 0.4);
}

.addon-card[data-selected="true"] {
  border-color: rgba(139, 205, 243, 0.9);
  background: linear-gradient(155deg, rgba(12, 37, 54, 0.9), rgba(9, 9, 17, 0.97));
  box-shadow:
    0 0 0 1px rgba(139, 205, 243, 0.5),
    0 0 28px -6px rgba(139, 205, 243, 0.55);
}

.addon-card[data-selected="true"] .addon-box {
  border-color: rgba(139, 205, 243, 0.85);
  background: rgba(12, 37, 54, 0.9);
  color: #a5dcff;
}

/* วิธีทำ (เข้าทำให้ / กดทำเอง) — โทนม่วงให้ต่างจากแพ็กกับของเสริม */
.mode-card:hover {
  transform: none;
  border-color: rgba(182, 160, 242, 0.6);
  box-shadow: 0 0 22px -4px rgba(182, 160, 242, 0.45);
}

.mode-card[data-selected="true"] {
  border-color: rgba(182, 160, 242, 0.9);
  background: linear-gradient(155deg, rgba(31, 23, 57, 0.92), rgba(9, 9, 17, 0.97));
  box-shadow:
    0 0 0 1px rgba(182, 160, 242, 0.5),
    0 0 28px -6px rgba(182, 160, 242, 0.6);
}

.mode-card[data-selected="true"] .mode-box {
  border-color: rgba(182, 160, 242, 0.85);
  background: rgba(31, 23, 57, 0.9);
  color: #c8b4ff;
}

/* ---------------------------------------------- แถบหัวเว็บ / เมนู */
header {
  box-shadow: 0 1px 0 rgba(255, 95, 176, 0.35), 0 6px 26px -14px rgba(255, 95, 176, 0.55);
}

#sidebar {
  box-shadow:
    1px 0 0 rgba(255, 95, 176, 0.35),
    14px 0 60px -22px rgba(139, 92, 246, 0.75);
}

/* ตราตำแหน่งในเมนู ☰ — เงาใต้ตราให้ดูนูนลอยออกจากพื้นดำ */
.role-emblem {
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6));
  transition: transform 0.18s ease, filter 0.18s ease;
}

a:hover > .role-emblem {
  transform: translateY(-1px) scale(1.08);
  filter: drop-shadow(0 3px 7px rgba(67, 184, 255, 0.55));
}

/* ---------------------------------------------- ชิปบนบัตร */
.chip {
  width: 44px;
  height: 34px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--pink), var(--lilac) 50%, var(--sky));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.35),
    0 0 14px rgba(182, 160, 242, 0.75);
  position: relative;
}

.chip::before,
.chip::after {
  content: "";
  position: absolute;
  inset-inline: 6px;
  height: 1px;
  background: rgba(6, 6, 11, 0.5);
}

.chip::before { top: 11px; }
.chip::after  { top: 21px; }

/* ---------------------------------------------- ช่องแสดงไอดี/รหัสผ่าน */
.credential {
  background: rgba(8, 10, 20, 0.75);
  border: 1px solid rgba(139, 205, 243, 0.4);
  border-radius: 0.75rem;
  box-shadow: inset 0 0 18px -6px rgba(67, 184, 255, 0.5), 0 0 12px -4px rgba(67, 184, 255, 0.4);
}

.credential:focus-within {
  border-color: rgba(67, 184, 255, 0.85);
  box-shadow: inset 0 0 20px -6px rgba(67, 184, 255, 0.6), 0 0 18px -3px rgba(67, 184, 255, 0.65);
}

/* ---------------------------------------------- ปุ่มไล่สี */
.bg-gradient-to-r {
  box-shadow: 0 0 20px -4px rgba(182, 160, 242, 0.7);
}

.bg-gradient-to-r:hover {
  box-shadow: 0 0 30px -2px rgba(255, 95, 176, 0.8);
}

/* ---------------------------------------------- ฟอร์ม */
::placeholder {
  color: #5b5578;
  opacity: 1;
}

input,
select,
textarea {
  color-scheme: dark;
}

input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(182, 160, 242, 0.22), 0 0 16px -4px rgba(182, 160, 242, 0.75);
}

/* ---------------------------------------------- สกรอลล์บาร์ */
.thin-scroll::-webkit-scrollbar { width: 6px; }
.thin-scroll::-webkit-scrollbar-track { background: transparent; }
.thin-scroll::-webkit-scrollbar-thumb {
  background: rgba(182, 160, 242, 0.5);
  border-radius: 99px;
  box-shadow: 0 0 8px rgba(182, 160, 242, 0.6);
}
.thin-scroll::-webkit-scrollbar-thumb:hover { background: rgba(255, 95, 176, 0.75); }

/* ---------------------------------------------- โมดัล */
.modal-enter {
  animation: modal-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow:
    0 0 0 1px rgba(255, 95, 176, 0.25),
    0 0 40px -6px rgba(139, 92, 246, 0.7),
    0 0 90px -20px rgba(255, 95, 176, 0.5);
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------------------------------------------- อื่น ๆ */
.pulse-dot {
  animation: pulse-dot 1.8s ease-in-out infinite;
  box-shadow: 0 0 10px currentColor;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

/* หัวข้อใหญ่เรืองแสงเบา ๆ */
h1 {
  text-shadow: 0 0 26px rgba(255, 95, 176, 0.45);
}

@media (prefers-reduced-motion: reduce) {
  .keycard::after,
  .pulse-dot,
  .modal-enter {
    animation: none;
  }
}

/* =====================================================================
   ธีมน่ารัก (theme-cute) — ทับกฎนีออนข้างบนเฉพาะหน้าร้าน
   หน้าแอดมินใส่ theme-dark จึงไม่โดนส่วนนี้เลย
   ===================================================================== */
.theme-cute {
  --clay: 0 24px 48px -22px rgba(120, 90, 200, 0.38), inset 0 -5px 0 rgba(42, 30, 59, 0.045);
  --clay-sm: 0 12px 26px -14px rgba(120, 90, 200, 0.4);
  font-family: Prompt, sans-serif;
}

.theme-cute.bg-grid {
  background-color: #fbf8ff;
  background-image:
    radial-gradient(rgba(122, 92, 240, 0.09) 1.4px, transparent 1.6px),
    linear-gradient(180deg, #f3eeff 0%, #fff1e6 55%, #eefbf3 100%);
  background-size: 24px 24px, 100% 100%;
  background-attachment: fixed;
}

.theme-cute .font-head,
.theme-cute h1,
.theme-cute h2,
.theme-cute h3 { font-family: Mitr, sans-serif; font-weight: 500; letter-spacing: 0 !important; }
.theme-cute .font-body { font-family: Prompt, sans-serif; }
/* ป้ายเล็ก/ตัวเลขใช้ Fredoka ให้กลมน่ารัก · แต่ยูส-รหัสต้องแยก l/I/1 ออก จึงยังเป็นโมโนเหมือนเดิม */
.theme-cute .font-mono { font-family: Fredoka, Prompt, sans-serif; }
.theme-cute code,
.theme-cute code.font-mono { font-family: "JetBrains Mono", monospace; }

.theme-cute h1 { text-shadow: none; }

/* ---- กล่อง: การ์ดขาว มุมมน เงานุ่ม ไม่มีเส้นนีออน */
.theme-cute .keycard,
.theme-cute .glow-card {
  background: #fff;
  border: 0;
  box-shadow: var(--clay);
}
.theme-cute .keycard { border-radius: 28px; }
.theme-cute .keycard:hover,
.theme-cute .glow-card:hover {
  border: 0;
  box-shadow: 0 30px 56px -22px rgba(120, 90, 200, 0.5), inset 0 -5px 0 rgba(42, 30, 59, 0.045);
}
/* แถบรุ้งพาสเทลหนา ๆ ขอบบน แทนเส้นเรือง */
.theme-cute .keycard::before {
  height: 7px;
  filter: none;
  box-shadow: none;
  background: linear-gradient(90deg, #ff8fb8, #b69bff 35%, #7fb8f0 65%, #7ed9b6);
}
.theme-cute .keycard::after { display: none; }

.theme-cute .pkg-card {
  background: #fff;
  border: 2px solid transparent;
  box-shadow: var(--clay-sm);
}
.theme-cute .pkg-card:hover { border-color: rgba(255, 143, 184, 0.6); box-shadow: var(--clay); }
.theme-cute .pkg-card[data-selected="true"] {
  background: #fff4f8;
  border-color: #ff8fb8;
  box-shadow: 0 0 0 4px rgba(255, 143, 184, 0.22), var(--clay);
}
.theme-cute .addon-card:hover { border-color: rgba(127, 184, 240, 0.7); }
.theme-cute .addon-card[data-selected="true"] {
  background: #f1f8ff;
  border-color: #7fb8f0;
  box-shadow: 0 0 0 4px rgba(127, 184, 240, 0.22), var(--clay);
}
.theme-cute .addon-card[data-selected="true"] .addon-box { background: #ddeeff; color: #2e73bd; border-color: #7fb8f0; }
.theme-cute .mode-card:hover { border-color: rgba(156, 124, 255, 0.6); }
.theme-cute .mode-card[data-selected="true"] {
  background: #f7f3ff;
  border-color: #9c7cff;
  box-shadow: 0 0 0 4px rgba(156, 124, 255, 0.2), var(--clay);
}
.theme-cute .mode-card[data-selected="true"] .mode-box { background: #ede5ff; color: #6445db; border-color: #9c7cff; }

.theme-cute .credential {
  background: #f7f3ff;
  border: 2px dashed rgba(156, 124, 255, 0.35);
  border-radius: 18px;
  box-shadow: none;
}
.theme-cute .credential:focus-within { border-color: #9c7cff; box-shadow: 0 0 0 4px rgba(156, 124, 255, 0.18); }

.theme-cute .chip {
  border-radius: 12px;
  background: linear-gradient(135deg, #ffd0e4, #ede5ff 50%, #ddeeff);
  box-shadow: inset 0 -3px 0 rgba(42, 30, 59, 0.08);
}
.theme-cute .chip::before,
.theme-cute .chip::after { background: rgba(42, 30, 59, 0.15); }

/* ---- หัวเว็บ / เมนูข้าง */
.theme-cute header { border-bottom: 0; box-shadow: 0 10px 30px -22px rgba(120, 90, 200, 0.55); }
.theme-cute #sidebar {
  background: rgba(247, 242, 255, 0.97);
  border-right: 0;
  border-radius: 0 28px 28px 0;
  box-shadow: 18px 0 60px -30px rgba(120, 90, 200, 0.6);
}
/* ตอนพับเมนูเก็บ เงาจะล้นเข้ามาเป็นแถบม่วงที่ขอบซ้ายของพื้นสว่าง — ปิดเงาตอนซ่อน */
.theme-cute #sidebar.-translate-x-full { box-shadow: none; }

/* ---- เมนู ☰ แบบ "เม็ดยาหลากสี" (ผู้ใช้เลือกแบบ B จาก design/sidebar-options.html)
   markup อยู่ใน base.html ช่อง {% if cute %} · หมวดละสี t0..t5 วนตามลำดับ
   กลุ่มที่กาง (data-open ที่ main.js สลับ) หรือหน้าที่อยู่ = เม็ดยาม่วงนูน ตัวหนังสือขาว */
.theme-cute #sidebar { background: #fff; border-radius: 0 32px 32px 0; }
.sbB-head { display: flex; align-items: center; gap: 12px; padding: 22px 18px 14px; }
.sbB-logo {
  display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 16px;
  background: #c6f24e; font-size: 23px; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.08);
}
/* รูปโปรไฟล์ที่หัวเมนู ☰ — แตะเพื่อเปลี่ยน */
.sbB-ava { position: relative; cursor: pointer; overflow: visible; }
.sbB-ava img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; }
.sbB-ava-cam {
  position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; border-radius: 999px;
  background: #fff; display: grid; place-items: center; font-size: 11px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}
.sbB-title { font: 500 20px/1.15 Mitr, sans-serif; color: #2a1e3b; }
.sbB-sub { font-size: 12.5px; color: #6b5f7a; }
.sbB-x {
  display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%;
  background: #f3eeff; color: #6445db; transition: transform 0.2s ease, background 0.2s ease;
}
.sbB-x:hover { background: #ede5ff; transform: rotate(90deg); }

.sbB-nav { flex: 1; overflow-y: auto; padding: 4px 16px 16px; }
.sbB-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.sbB-q {
  display: flex; align-items: center; gap: 8px; padding: 11px 12px; border-radius: 18px;
  font: 500 14px Mitr, sans-serif; color: #2a1e3b; background: #f7f3ff;
  box-shadow: inset 0 -3px 0 rgba(42, 30, 59, 0.05); transition: transform 0.15s ease;
}
.sbB-q:hover { transform: translateY(-2px); }
.sbB-q.cr { background: #fff4d6; }
.sbB-q.cd { grid-column: 1 / -1; background: #ddeeff; }
.sbB-q.is-on { box-shadow: 0 0 0 2px #9c7cff, 0 10px 20px -12px rgba(122, 92, 240, 0.7); background: #fff; color: #6445db; }

/* หัวข้อแอดมินในเมนู ☰ (เฉพาะบัญชีแอดมิน) */
.sbB-adlab { grid-column: 1 / -1; margin: 8px 4px 0; font: 600 11px Fredoka, Prompt, sans-serif; letter-spacing: 0.16em; color: #d6337a; }
.sbB-q.ad { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; background: #ffe3ee; color: #c2306f; }
.sbB-q.ad .bd { margin-left: auto; border-radius: 999px; background: #f6416c; padding: 1px 8px; font: 700 11px Fredoka, Prompt, sans-serif; color: #fff; }
.sbB-lab { margin: 4px 6px 8px; font: 600 11px Fredoka, Prompt, sans-serif; letter-spacing: 0.16em; color: #9a90ae; }

.sbB-group { margin-bottom: 6px; }
.sbB-pill {
  display: flex; align-items: center; gap: 6px; margin-bottom: 6px; padding: 4px 6px 4px 4px;
  border-radius: 999px; color: #2a1e3b;
  box-shadow: inset 0 -3px 0 rgba(42, 30, 59, 0.06);
  transition: transform 0.15s ease, background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}
.sbB-group .sbB-pill { margin-bottom: 0; }
.sbB-pill:hover { transform: translateX(3px); }
.sbB-pill.t0 { background: #ffe1cc; } .sbB-pill.t1 { background: #ddf6ec; } .sbB-pill.t2 { background: #ddeeff; }
.sbB-pill.t3 { background: #ede5ff; } .sbB-pill.t4 { background: #ffd0e4; } .sbB-pill.t5 { background: #eefbc7; }
.sbB-link { display: flex; flex: 1; align-items: center; gap: 10px; min-width: 0; padding: 6px 8px; }
.sbB-emo { font-size: 17px; line-height: 1; }
.sbB-nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 15px Mitr, sans-serif; }
.sbB-ct {
  flex: none; padding: 1px 8px; border-radius: 999px;
  font: 600 12px Fredoka, sans-serif; background: rgba(255, 255, 255, 0.7);
}
.sbB-tg {
  display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.6); color: inherit;
}
.sbB-group[data-open="true"] .sbB-pill,
.sbB-pill.is-on {
  color: #fff;
  background: linear-gradient(180deg, #a98bff, #7a5cf0);
  box-shadow: 0 12px 24px -12px rgba(122, 92, 240, 0.7), inset 0 -4px 0 rgba(0, 0, 0, 0.1);
}
.sbB-group[data-open="true"] .sbB-ct,
.sbB-group[data-open="true"] .sbB-tg { background: rgba(255, 255, 255, 0.25); color: #fff; }

.sbB-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 8px 4px 10px; }
.sbB-chip {
  display: grid; place-items: center; padding: 10px 6px; border-radius: 16px; text-align: center;
  font: 500 14px/1.3 Mitr, sans-serif; color: #6b5f7a; background: #f7f3ff;
  transition: transform 0.15s ease, background 0.15s ease;
}
.sbB-chip.wide { grid-column: 1 / -1; }
.sbB-chip:hover { transform: translateY(-2px); background: #ede5ff; color: #2a1e3b; }
.sbB-chip.is-on { background: #fff; color: #6445db; box-shadow: 0 0 0 2px #9c7cff, 0 10px 20px -12px rgba(122, 92, 240, 0.7); }

/* กางกลุ่มแล้วหมวดย่อยเด้งเข้ามาทีละปุ่ม */
.sbB-group[data-open="true"] .sbB-chip { animation: sbB-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.sbB-group[data-open="true"] .sbB-chip:nth-child(2) { animation-delay: 0.04s; }
.sbB-group[data-open="true"] .sbB-chip:nth-child(3) { animation-delay: 0.08s; }
.sbB-group[data-open="true"] .sbB-chip:nth-child(4) { animation-delay: 0.12s; }
.sbB-group[data-open="true"] .sbB-chip:nth-child(5) { animation-delay: 0.16s; }
.sbB-group[data-open="true"] .sbB-chip:nth-child(n+6) { animation-delay: 0.2s; }
@keyframes sbB-pop { from { opacity: 0; transform: scale(0.8) translateY(-4px); } }
@media (prefers-reduced-motion: reduce) {
  .sbB-group[data-open="true"] .sbB-chip { animation: none; }
  .sbB-pill, .sbB-q, .sbB-chip, .sbB-x { transition: none; }
}

.theme-cute #sidebar .sb-foot { border: 0; padding: 12px 16px 18px; }
.theme-cute #overlay,
.theme-cute #modal-backdrop { background: rgba(42, 30, 59, 0.35); }

/* ---- ปุ่มหลัก (ซื้อ / ยืนยัน / ติดต่อแอดมิน): เม็ดยาม่วงนูน แทนไล่สีเรืองแสง
   เจาะเฉพาะ a/button — เส้นคั่น h-px ที่ใช้ bg-gradient-to-r เหมือนกันต้องไม่โดน */
.theme-cute .bg-gradient-to-r { box-shadow: none; }
.theme-cute a.bg-gradient-to-r,
.theme-cute button.bg-gradient-to-r {
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, #a98bff, #7a5cf0);
  box-shadow: 0 14px 28px -12px rgba(122, 92, 240, 0.6), inset 0 -4px 0 rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.theme-cute a.bg-gradient-to-r:hover,
.theme-cute button.bg-gradient-to-r:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px -12px rgba(122, 92, 240, 0.7), inset 0 -4px 0 rgba(0, 0, 0, 0.1);
}
.theme-cute button.bg-gradient-to-r:disabled {
  background: #ede8f5;
  color: #9a90ae;
  box-shadow: none;
}

.theme-cute .modal-enter {
  border: 0;
  border-radius: 28px;
  box-shadow: 0 40px 80px -30px rgba(42, 30, 59, 0.45);
}

/* ---- สีเตือน: ชุดเดิมเป็นเฉดสว่างไว้อ่านบนพื้นดำ บนพื้นขาวต้องกลับเป็นเฉดเข้ม
   จับคลาสที่ขึ้นต้นด้วย text-… ตรง ๆ (ไม่รวม hover:text-rose-… ที่ต้องโผล่เฉพาะตอนชี้) */
.theme-cute [class^="text-rose-"],
.theme-cute [class*=" text-rose-"] { color: #c2255c; }
.theme-cute [class^="text-amber-"],
.theme-cute [class*=" text-amber-"] { color: #9a5b00; }
.theme-cute [class^="text-emerald-"],
.theme-cute [class*=" text-emerald-"] { color: #13795b; }

.theme-cute ::placeholder { color: #a79fbc; }
.theme-cute input,
.theme-cute select,
.theme-cute textarea { color-scheme: light; }
.theme-cute input:focus,
.theme-cute select:focus,
.theme-cute textarea:focus { box-shadow: 0 0 0 4px rgba(156, 124, 255, 0.2); }

.theme-cute .role-emblem { filter: drop-shadow(0 2px 3px rgba(42, 30, 59, 0.25)); }
.theme-cute .pulse-dot { box-shadow: none; }

/* ---- หน้าแรก (welcome.html) */
.cute-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px; border-radius: 999px; background: #fff;
  font: 600 13px Fredoka, Prompt, sans-serif; letter-spacing: 0.12em; color: #7a5cf0;
  box-shadow: var(--clay-sm);
}
.cute-sticker {
  position: absolute; z-index: 1;
  padding: 8px 14px; border-radius: 16px; background: #fff;
  font-size: 13px; font-weight: 500; white-space: nowrap;
  box-shadow: var(--clay-sm);
  transform: rotate(var(--tilt, 0deg));
  animation: cute-bob 5s ease-in-out infinite;
}
.cute-sticker.s2 { animation-delay: -1.6s; }
.cute-sticker.s3 { animation-delay: -3.2s; }
@keyframes cute-bob { 50% { transform: translateY(-7px) rotate(var(--tilt, 0deg)); } }

/* วงรองไอคอนหมวด — สีวนตามลำดับการ์ด (tint-0..5 จาก loop.index0 % 6) */
.cute-blob {
  display: grid; place-items: center;
  border-radius: 38% 62% 55% 45% / 45% 40% 60% 55%;
  box-shadow: inset 0 -6px 0 rgba(42, 30, 59, 0.06);
  transition: border-radius 0.5s ease, transform 0.2s ease;
}
.group:hover .cute-blob { border-radius: 55% 45% 40% 60% / 60% 55% 45% 40%; transform: scale(1.06) rotate(-4deg); }
.tint-0 { background: #ffe1cc; } .tint-1 { background: #ddf6ec; } .tint-2 { background: #ddeeff; }
.tint-3 { background: #ede5ff; } .tint-4 { background: #ffd0e4; } .tint-5 { background: #eefbc7; }

.cute-step-num {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px;
  font: 700 16px Fredoka, sans-serif; color: #2a1e3b;
  box-shadow: inset 0 -3px 0 rgba(42, 30, 59, 0.08);
}

/* ===== การ์ดหมวดหน้าแรก — รูปในกรอบสี่เหลี่ยมมน (โชว์ของที่ขาย) ===== */
/* กรอบอีโมจิ (หมวดที่ยังไม่มีรูปหมวดย่อย เช่น ไก่กรอบ) — สี่เหลี่ยมมนเท่ากับการ์ดซ้อน */
.cat-emoji {
  display: grid; place-items: center; width: 100%; aspect-ratio: 1 / 1;
  border-radius: 20px; font-size: 3rem;
  box-shadow: inset 0 -6px 0 rgba(42, 30, 59, 0.06);
  transition: transform 0.2s ease;
}
.group:hover .cat-emoji { transform: scale(1.03); }

/* การ์ดซ้อนพัด — 3 ใบซ้อนกลางกรอบ */
.cat-fan {
  position: relative; width: 100%; aspect-ratio: 1 / 1; border-radius: 20px;
  overflow: hidden; display: block;
  background: linear-gradient(135deg, #ffe8f3, #efe6ff 60%, #e6f4ff);
}
.cat-fan-card {
  position: absolute; top: 50%; left: 50%; width: 42%; aspect-ratio: 3 / 4;
  border-radius: 12px; overflow: hidden; border: 3px solid #fff;
  box-shadow: 0 6px 14px rgba(80, 40, 110, 0.28);
  transition: transform 0.3s ease;
}
.cat-fan-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-fan .f1 { transform: translate(-50%, -50%) rotate(-14deg) translateX(-62%); }
.cat-fan .f2 { transform: translate(-50%, -50%); z-index: 3; }
.cat-fan .f3 { transform: translate(-50%, -50%) rotate(14deg) translateX(62%); }
.group:hover .cat-fan .f1 { transform: translate(-50%, -50%) rotate(-18deg) translateX(-72%); }
.group:hover .cat-fan .f3 { transform: translate(-50%, -50%) rotate(18deg) translateX(72%); }
.group:hover .cat-fan .f2 { transform: translate(-50%, -52%) scale(1.04); }
.cat-fan-badge {
  position: absolute; right: 8px; bottom: 8px; z-index: 5;
  background: #fff; border-radius: 999px; padding: 3px 10px;
  font: 700 11px Prompt, sans-serif; color: var(--lilac-deep, #7c4ddb);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

/* รูปปกเดี่ยว (หมวดไม่มีหมวดย่อย เช่น ไก่กรอบ) */
.cat-cover {
  display: block; width: 100%; aspect-ratio: 1 / 1; border-radius: 20px;
  overflow: hidden; background: linear-gradient(135deg, #efe6fa, #ffe8f3);
}
.cat-cover img { width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.2s ease; }
.group:hover .cat-cover img { transform: scale(1.04); }

@media (prefers-reduced-motion: reduce) {
  .cute-sticker { animation: none; }
  .cute-blob { transition: none; }
  .cat-fan-card, .cat-emoji { transition: none; }
}

/* ================= แอดมินประจำร้าน (หน้าแรก) — ยืนบนพื้นหลัง ไม่มีกรอบ ================= */
.admin-hero { min-height: 236px; }
@media (min-width: 640px) { .admin-hero { min-height: 300px; } }
.ah-stage { position: absolute; right: -22px; top: 0; width: 62%; max-width: 400px; pointer-events: none; }
@media (min-width: 640px) { .ah-stage { right: 0; top: -10px; width: 44%; } }
/* แอดมินขนาดเต็ม (ผู้ใช้ไม่ให้ย่อ 28 ต.ค.) · เท้ายืนหลังการ์ด: การ์ดอยู่ชั้นบนกว่า */
.ah-glow { position: absolute; inset: 6% 2% 10%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,182,213,.6), rgba(214,200,255,.35) 55%, transparent 72%); filter: blur(4px); }
.ah-char { position: relative; display: block; width: 100%; height: auto; transform-origin: 50% 90%;
  filter: drop-shadow(0 14px 16px rgba(139,92,246,.25)); animation: ahFloat 3s ease-in-out infinite; }
.ah-char.swap { animation: ahSwap .45s ease-out, ahFloat 3s ease-in-out .45s infinite; }
@keyframes ahFloat { 0%,100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-10px) rotate(1.5deg); } }
@keyframes ahSwap { 0% { opacity: 0; transform: scale(.8) translateY(14px); } 100% { opacity: 1; transform: none; } }
.ah-bubble { background: #fff; border: 2px solid #f6c6dc; border-radius: 16px; padding: 7px 12px; font-size: 13px;
  box-shadow: 0 4px 0 #f3d2e2; color: var(--ink, #3b2a4d); transition: opacity .25s; }
.ah-bubble.fade { opacity: 0; }
.ah-menu-btn { display: flex; width: 100%; align-items: center; gap: 10px; margin-bottom: 10px; padding: 7px 12px 7px 8px;
  border-radius: 999px; background: linear-gradient(90deg, #ffe3ee, #efe8ff); color: #b0336a; font-weight: 600; font-size: 14px;
  box-shadow: 0 3px 0 #f1cfe0; transition: transform .15s; }
.ah-menu-btn:active { transform: scale(.98); }
.ah-menu-btn img { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff; }
.ah-sheet-wrap { position: fixed; inset: 0; z-index: 70; }
.ah-dim { position: absolute; inset: 0; background: rgba(59,42,77,.4); }
.ah-sheet { position: absolute; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto; background: #fff;
  border-radius: 26px 26px 0 0; padding: 16px 14px 22px; text-align: center; animation: ahUp .25s ease-out; }
@keyframes ahUp { from { transform: translateY(40%); opacity: .4; } to { transform: none; opacity: 1; } }
.ah-pick { position: relative; border-radius: 16px; padding: 6px 4px 8px; background: #faf6ff; border: 2px solid transparent; }
.ah-pick img { width: 100%; height: 92px; object-fit: contain; }
.ah-pick.on { border-color: #ff5fa2; background: #fff0f7; }
.ah-pick.on::after { content: "✓"; position: absolute; top: 4px; right: 6px; width: 18px; height: 18px; border-radius: 50%;
  background: #ff5fa2; color: #fff; font-size: 11px; line-height: 18px; }
.admin-emo-img { filter: drop-shadow(0 8px 10px rgba(139,92,246,.2)); }
@media (prefers-reduced-motion: reduce) { .ah-char, .ah-char.swap, .ah-sheet { animation: none; } }
.ah-badge { align-items: center; gap: 6px; width: fit-content; border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 600;
  color: #b0336a; background: linear-gradient(90deg, #ffd6e8, #e9ddff); box-shadow: 0 3px 0 #f1cfe0; }
/* มือถือ: ฟองคำพูด/ปุ่ม/ป้าย ไหลต่อกันใต้หัวข้อ — ข้อความยาวแค่ไหนก็ไม่ทับกัน */
.ah-mcol { position: relative; z-index: 20; width: 56%; margin-top: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.ah-mcol .ah-bubble { font-size: 12px; max-width: 100%; white-space: normal; overflow-wrap: anywhere; line-height: 1.45; }
.ah-mcol .ah-badge { font-size: 11px; }
