:root{
  --ink:#0b1020;
  --text:#eef2ff;

  --muted:rgba(255,255,255,.82);
  --muted2:rgba(255,255,255,.70);

  --card:rgba(15,23,42,.92);
  --line:rgba(148,163,184,.55);
  --shadow:0 18px 40px rgba(15,23,42,.45);
  --radius:20px;

  --burn:#ffb020;
  --burn2:#ff6a00;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:'Noto Sans Thai','Kanit',system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  min-height:100vh;
  overflow-x:hidden;
  color:var(--text);
  background:#020617;
}

/* =========================================================
   BACKGROUND (เปลี่ยนจาก VIDEO -> IMAGE BG.PNG)
   ========================================================= */
.bg-video{display:none !important;}

.bg-image{
  position:fixed;
  inset:0;
  width:100%;
  height:100%;
  background-image:url("BG.PNG");
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
  z-index:-2;
  filter:saturate(1.05) contrast(1.05);
}

.bg-dim{
  position:fixed; inset:0;
  background:
    radial-gradient(circle at 20% 10%,
      rgba(2,6,23,.40),
      rgba(2,6,23,.62) 45%,
      rgba(2,6,23,.68)
    );
  z-index:-2;
}

#sky{position:fixed;inset:0;pointer-events:none;z-index:-1;opacity:.25}

.container h1,
.container h2,
.container h3,
.container p,
.container li,
.container .hero-sub{
  text-shadow:0 2px 10px rgba(0,0,0,.75);
}

/* =========================================================
   NAV (FIXED)
   ========================================================= */
.topnav{
  position:sticky;
  top:0;
  z-index:10;
  position:relative;               /* ให้ dropdown อิง topnav */
  backdrop-filter:blur(12px);
  background:rgba(2,6,23,.72);
  border-bottom:1px solid rgba(148,163,184,.22);
}

.topnav .wrap{
  max-width:1100px;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 14px;
  gap:10px;
  min-height:56px;                 /* ✅ ลดความสูงแถบบน */
}

.brand-mini{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:900;
  font-size:18px;
  color:#f8fafc;
  text-decoration:none;
  white-space:nowrap;              /* ✅ กันชื่อเว็บตกบรรทัด */
}

.brand-logo{
  width:28px;height:28px;
  object-fit:contain;
  display:block;
  filter:drop-shadow(0 6px 14px rgba(0,0,0,.35));
}

/* desktop links */
.nav-links{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}

/* desktop button look */
.nav-btn{
  border-radius:999px;
  border:1px solid rgba(148,163,184,.45);
  padding:7px 12px;
  font-size:13px;
  font-weight:900;
  color:#f8fafc;
  background:rgba(15,23,42,.35);
  text-decoration:none;
  cursor:pointer;
}
.nav-btn:hover{background:rgba(15,23,42,.6)}
.nav-btn.ghost{border-style:dashed;background:transparent}

/* hamburger */
.nav-toggle{
  display:none;                    /* desktop ซ่อนไว้ก่อน */
  align-items:center;
  justify-content:center;
  width:42px;
  height:38px;
  border-radius:12px;
  border:1px solid rgba(148,163,184,.45);
  background:rgba(15,23,42,.35);
  color:#fff;
  font-weight:900;
  cursor:pointer;
}
.nav-toggle:hover{background:rgba(15,23,42,.55)}

/* ✅ คุมการซ่อนด้วย hidden */
[hidden]{ display:none !important; }

/* dropdown panel (สวย + กล่องลอย) */
.nav-mobile{
  position:absolute;
  right:14px;
  top:56px;
  width:min(280px, calc(100vw - 28px));
  padding:10px;
  border-radius:16px;
  border:1px solid rgba(148,163,184,.22);
  background:rgba(2,6,23,.92);
  backdrop-filter:blur(12px);
  box-shadow:0 20px 40px rgba(0,0,0,.45);
  z-index:20;

  /* animate in */
  transform:translateY(-8px);
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease, transform .18s ease;
}

/* ตอนเปิด (hidden ถูกเอาออกแล้ว) */
.nav-mobile:not([hidden]){
  opacity:1;
  transform:translateY(0);
  pointer-events:auto;
}

.nav-mobile a,
.nav-mobile button{
  display:flex;
  width:100%;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  text-align:left;

  padding:12px 12px;
  margin:6px 0;
  border-radius:14px;

  border:1px solid rgba(148,163,184,.25);
  background:rgba(15,23,42,.55);
  color:#fff;
  font-weight:900;
  font-size:14px;
  text-decoration:none;
  cursor:pointer;
}
.nav-mobile a:hover,
.nav-mobile button:hover{
  background:rgba(15,23,42,.75);
  border-color:rgba(250,204,21,.45);
}

/* ✅ สำคัญ: ขยาย breakpoint ให้ครอบคลุมจอ 768/820
   (ไม่งั้นปุ่มสามขีดไม่ขึ้น แล้ว nav-links จะห่อจนแถบบวม) */
@media (max-width:980px){
  .nav-toggle{display:inline-flex;}
  .nav-links{display:none;}
}


/* =========================================================
   HERO
   ========================================================= */
.container{max-width:1100px;margin:0 auto;padding:0 14px;position:relative;z-index:1}
.hero{padding:18px 4px 10px;text-align:center}
.hero-tag{
  display:inline-flex;align-items:center;gap:6px;
  padding:6px 12px;border-radius:999px;
  font-size:12px;font-weight:900;
  background:rgba(2,6,23,.55);
  border:1px solid rgba(248,250,252,.20);
  color:#fff;
}
.hero h1{margin:10px 0 6px;font-size:30px;letter-spacing:.02em;color:#fff}
.hero-sub{margin:0;font-size:14px;color:var(--muted);line-height:1.7;opacity:1}
.hero-note{margin-top:10px;font-size:12px;color:#fde68a}
@media(max-width:640px){ .hero h1{font-size:24px} }

/* =========================================================
   LAYOUT
   ========================================================= */
.main-layout{
  display:grid;
  grid-template-columns:minmax(0,1.2fr) minmax(0,1.8fr);
  gap:18px;
  margin:18px 0 14px;
}
@media(max-width:900px){ .main-layout{grid-template-columns:1fr} }

/* =========================================================
   CARDS
   ========================================================= */
.info-card,.incense-panel,.burn-card,.section{
  background:var(--card);
  border-radius:var(--radius);
  border:1px solid var(--line);
  box-shadow:var(--shadow);
}
.info-card{padding:16px 14px 14px}
.info-card h2{margin:0 0 8px;font-size:18px;font-weight:900;color:#fff}
.info-card p, .info-card ol{margin:0 0 8px;font-size:14px;line-height:1.75;color:#f8fafc;}
.info-card ol{margin-left:18px}
.info-card .note{margin-top:6px;font-size:12px;color:#facc15;font-weight:800}

.incense-panel{margin-top:12px;padding:14px 14px 12px}
.incense-panel h2{margin:0 0 6px;font-size:16px;font-weight:900;color:#fff}
.incense-panel p{margin:0 0 10px;font-size:13px;color:var(--muted);line-height:1.7}

/* LIST GRID */
.incense-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
@media(max-width:640px){ .incense-grid{grid-template-columns:1fr} }

.incense-card{
  position:relative;
  border-radius:16px;
  padding:12px;
  border:1px solid rgba(148,163,184,.7);
  background:radial-gradient(circle at 0 0,rgba(255,255,255,.06),transparent 55%), rgba(2,6,23,.35);
  cursor:pointer;
  display:flex;gap:12px;align-items:flex-start;
  transition:.18s;
  text-align:left;
}
.incense-card:hover{border-color:#fbbf24;box-shadow:0 0 0 1px rgba(251,191,36,.35)}
.incense-card.active{border-color:#facc15;box-shadow:0 0 0 1px rgba(250,204,21,.45),0 14px 30px rgba(0,0,0,.35)}

.incense-pill{
  width:64px;height:96px;border-radius:14px;
  background:linear-gradient(180deg,#0ea5e9,#fbbf24);
  border:1px solid rgba(0,0,0,.35);
  box-shadow:0 12px 18px rgba(0,0,0,.35);
  display:flex;align-items:center;justify-content:center;
  overflow:hidden;
}
.incense-pill img{width:42px;height:42px;object-fit:contain;filter:drop-shadow(0 6px 10px rgba(0,0,0,.45))}
.incense-card .meta-title{font-size:14px;font-weight:950;margin-bottom:2px;color:#fff}
.incense-card .meta-desc{font-size:12px;color:#e5e7eb}
.incense-card .meta-tag{font-size:12px;color:var(--muted2);margin-top:6px;line-height:1.55}

/* RIGHT */
.burn-card{padding:14px 14px 16px}
.burn-head{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between;margin-bottom:6px}
.badge{
  border-radius:999px;
  padding:6px 12px;
  background:rgba(2,6,23,.35);
  border:1px solid rgba(148,163,184,.55);
  font-size:12px;font-weight:900;color:#fff;
}
.btn{
  display:inline-flex;align-items:center;gap:6px;
  border-radius:999px;border:0;
  padding:9px 13px;
  font-size:13px;font-weight:950;
  cursor:pointer;
}
.btn-primary{
  background:linear-gradient(90deg,#fbbf24,#f97316);
  color:#111827;
  box-shadow:0 10px 18px rgba(255,255,255,.10);
}
.btn-primary:hover{filter:brightness(.98)}
.btn-ghost{
  background:transparent;
  border:1px dashed rgba(148,163,184,.7);
  color:#fff;
}
.btn-ghost:hover{background:rgba(2,6,23,.35)}
.burn-status{margin:0 0 10px;font-size:12px;color:#fff;opacity:.95}

.burn-stage{
  display:grid;
  grid-template-columns:minmax(0,0.95fr) minmax(0,1.05fr);
  gap:12px;
}
@media(max-width:760px){ .burn-stage{grid-template-columns:1fr} }

/* INCENSE AREA */
.incense-wrapper{display:flex;align-items:center;justify-content:center;padding:10px}
.incense-area{position:relative;width:170px;height:310px;display:flex;align-items:flex-end;justify-content:center}

/* =========================================================
   POT
   ========================================================= */
.incense-pot{
  position:absolute;
  left:50%;
  bottom:-10px;
  transform:translateX(-50%);
  width:210px;
  height:132px;
  pointer-events:none;
  z-index:1;
}

.incense-base.pot{
  position:absolute;
  left:50%;
  bottom:-10px;
  transform:translateX(-50%);
  width:210px;
  height:132px;
  pointer-events:none;
  z-index:1;
  border-radius:0;
  filter:drop-shadow(0 26px 26px rgba(0,0,0,.35));
}

.incense-base.pot::before{
  content:"";
  position:absolute;
  left:50%;
  top:12px;
  transform:translateX(-50%);
  width:190px;
  height:42px;
  border-radius:999px;
  background:
    radial-gradient(circle at 50% 25%, rgba(255,255,255,.55), rgba(255,255,255,0) 62%),
    linear-gradient(180deg, #ffffff, #e9eef6 55%, #cfd8e6);
  box-shadow:
    0 14px 22px rgba(0,0,0,.22),
    inset 0 2px 0 rgba(255,255,255,.85),
    inset 0 -10px 18px rgba(0,0,0,.18);
  -webkit-mask:
    radial-gradient(120px 16px at 50% 60%, #0000 63%, #000 64%) center/100% 100% no-repeat;
  mask:
    radial-gradient(120px 16px at 50% 60%, #0000 63%, #000 64%) center/100% 100% no-repeat;
}

.incense-base.pot::after{
  content:"";
  position:absolute;
  left:50%;
  top:34px;
  transform:translateX(-50%);
  width:200px;
  height:96px;
  border-radius:0 0 56px 56px;
  background:
    radial-gradient(140px 34px at 50% 0px, rgba(0,0,0,.35), rgba(0,0,0,0) 70%),
    radial-gradient(140px 70px at 50% 20%, rgba(255,255,255,.35), rgba(255,255,255,0) 65%),
    linear-gradient(180deg, #dfe7f3 0%, #cfd9e8 45%, #a8b7cc 100%);
  box-shadow:
    0 18px 34px rgba(0,0,0,.28),
    inset 0 1px 0 rgba(255,255,255,.55),
    inset 0 -18px 26px rgba(0,0,0,.22);
}

.incense-pot .pot-rim,
.incense-pot .pot-body,
.incense-pot .pot-shadow{
  display:none !important;
}

/* STICK */
.incense-stick{
  position:relative;
  width:88px;height:235px;
  border-radius:22px;
  background:linear-gradient(180deg, rgba(0,0,0,.78), rgba(2,6,23,.65) 42%, rgba(255,122,0,.25) 80%, rgba(255,122,0,.32));
  border:1px solid rgba(255,255,255,.08);
  box-shadow:0 18px 30px rgba(0,0,0,.55);
  overflow:hidden;
  margin-bottom:42px;
  z-index:2;
}

/* DIGITS */
.incense-body{
  position:absolute; inset:18px 14px 16px 14px;
  display:flex;flex-direction:column;justify-content:space-between;align-items:center;
  font-weight:1000;
  color:#ffd8a8;
}
.digit{
  font-size:34px;
  opacity:0;
  transform:translateY(6px);
  transition:opacity .45s ease, transform .45s ease, filter .45s ease;
  text-shadow:0 8px 18px rgba(0,0,0,.45);
}
.digit.show{
  opacity:1;
  transform:translateY(0);
  filter:drop-shadow(0 10px 14px rgba(0,0,0,.35));
}

/* EMBLEMS */
.incense-emblems{position:absolute;inset:0;z-index:4}
.emblem-slot{
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  width:62px;height:62px;
  border-radius:18px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  box-shadow:0 12px 18px rgba(0,0,0,.35) inset;
  object-fit:contain;
  padding:8px;
  opacity:1;
  transition:opacity .5s ease, transform .5s ease, filter .5s ease;
}
.emblem-slot[data-slot="0"]{ top:24px; }
.emblem-slot[data-slot="1"]{ top:calc(50% - 31px); }
.emblem-slot[data-slot="2"]{ bottom:24px; }

/* ASH + OVERLAY */
.ash-mask{
  position:absolute;left:0;top:0;width:100%;height:100%;
  pointer-events:none;
  background:linear-gradient(180deg, rgba(0,0,0,.65), rgba(0,0,0,.12) 55%, rgba(0,0,0,0));
  z-index:2;
}
.ash-inner{
  position:absolute;left:0;top:0;width:100%;height:100%;
  background:linear-gradient(180deg, rgba(0,0,0,.88), rgba(0,0,0,.25) 55%, rgba(0,0,0,0));
}
.incense-overlay{
  position:absolute;inset:0;
  background:linear-gradient(180deg, rgba(0,0,0,.85), rgba(0,0,0,.25) 55%, rgba(0,0,0,0));
  mix-blend-mode:multiply;
  pointer-events:none;
  z-index:1;
}

/* BURN LINE */
.burn-line{
  position:absolute;
  left:-10%;
  width:120%;
  height:28px;
  top:-40px;
  background:
    radial-gradient(circle at 20% 50%, rgba(255,255,255,.22), transparent 58%),
    linear-gradient(90deg, rgba(255,176,32,0), rgba(255,176,32,.9), rgba(255,106,0,.9), rgba(255,176,32,0));
  filter:blur(.2px);
  opacity:0;
  z-index:5;
  transform:skewY(-1deg);
  box-shadow:0 12px 30px rgba(255,140,0,.18);
}
.burn-line.on{opacity:1}

/* FLAME */
.flame{
  position:absolute;
  width:18px;height:22px;
  left:50%;
  transform:translateX(-50%);
  top:-22px;
  border-radius:50%;
  background:radial-gradient(circle at 30% 0,#fef3c7,#f97316 55%,#b91c1c 90%);
  box-shadow:0 0 14px rgba(251,191,36,.85);
  opacity:0;
  transition:opacity .25s;
}
.flame.burning{
  opacity:1;
  animation:flameWiggle .35s ease-in-out infinite alternate;
}
@keyframes flameWiggle{
  0%{transform:translateX(-50%) rotate(-3deg) scale(1);}
  100%{transform:translateX(-50%) rotate(3deg) scale(1.06);}
}

/* SMOKE */
.smoke{
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  top:-40px;
  width:120px; height:120px;
  pointer-events:none;
  opacity:0;
  transition:opacity .3s ease;
  z-index:6;
}
.smoke.on{opacity:1}
.smoke span{
  position:absolute; left:50%; top:56px;
  width:16px; height:16px;
  border-radius:999px;
  background:rgba(226,232,240,.22);
  filter:blur(.2px);
  opacity:0;
  transform:translate(-50%,0) scale(.9);
  animation:smokeUp 1.8s ease-in-out infinite;
}
.smoke span:nth-child(2){animation-delay:.25s; left:46%}
.smoke span:nth-child(3){animation-delay:.5s; left:54%}

@keyframes smokeUp{
  0%{opacity:0; transform:translate(-50%,10px) scale(.9)}
  15%{opacity:.35}
  60%{opacity:.12; transform:translate(-50%,-38px) scale(1.9)}
  100%{opacity:0; transform:translate(-50%,-58px) scale(2.4)}
}

/* RESULT PANEL */
.result-panel{
  background:rgba(2,6,23,.35);
  border-radius:16px;
  padding:12px 12px 10px;
  border:1px solid rgba(148,163,184,.55);
}
.result-panel h2{margin:0 0 8px;font-size:15px;font-weight:1000;color:#fff}
.lucky-number{
  font-size:36px;
  letter-spacing:.18em;
  font-weight:1000;
  background:linear-gradient(90deg,#facc15,#f97316);
  -webkit-background-clip:text;background-clip:text;
  color:transparent;
  margin-bottom:4px;
}
.result-meta{font-size:12px;color:var(--muted);margin-bottom:6px;line-height:1.6}
.result-meaning{font-size:13px;color:#fff;line-height:1.7;opacity:.95}
.result-actions{margin-top:10px;display:flex;flex-wrap:wrap;gap:8px}
.result-warning{margin-top:8px;font-size:11px;color:#fde68a;font-weight:800;opacity:.95}

/* inline links */
.inline-link{
  color:#fde68a;
  font-weight:900;
  text-decoration:underline;
  text-underline-offset:3px;
}
.inline-link:hover{filter:brightness(1.05)}

/* SEO SECTIONS */
.section{margin:20px 0 10px;padding:16px 14px 14px}
.section h2{margin:0 0 10px;font-size:18px;font-weight:1000;color:#fff}
.section h3{margin:12px 0 4px;font-size:15px;font-weight:950;color:#fff}
.section p{margin:0 0 8px;font-size:14px;color:#f8fafc;line-height:1.75;opacity:.98}

/* FOOTER */
.site-footer{
  margin-top:26px;
  padding:14px 14px 20px;
  background:rgba(2,6,23,.85);
  border-top:1px solid rgba(148,163,184,.18);
  font-size:12px;
  color:#e5e7eb;
}
.footer-inner{
  max-width:1100px;margin:0 auto;
  display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between;
}
.footer-links a{color:#fff;text-decoration:none;margin-left:12px;font-weight:800}
.footer-links a:hover{text-decoration:underline}

/* ❌ ปิดการแสดงผลกระถางทั้งหมด (ถ้าอยากให้โชว์ ลบ block นี้ทิ้ง) */
.incense-base.pot,
.incense-pot{
  display:none !important;
}
