/* ===========================================================
   UFARONIN — ดีไซน์ "AURORA GOLD"
   มือถือ: แอปเต็มจอ มีด็อกลอย
   เดสก์ท็อป: เต็มความกว้างจริง ไม่ใช่คอลัมน์มือถือลอยกลางจอ
   สีทั้งหมดมาจากตัวแปรที่ PHP พ่นจากหน้าแอดมิน
   =========================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: Kanit, Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.6;
  color: #ECECF1;
  background: var(--page-bg, #0a0a0c);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; border: 0; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, h4 { font-weight: 600; line-height: 1.3; margin: 0; }

::selection { background: var(--ufa-gold); color: #000; }

.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;
}

/* ---------- โทเคน ------------------------------------------------------- */

:root {
  --r-sm: .5rem;
  --r-md: .9rem;
  --r-lg: 1.25rem;
  --r-xl: 1.75rem;

  --glass: rgb(255 255 255 / .045);
  --glass-2: rgb(255 255 255 / .07);
  --line: rgb(255 255 255 / .1);
  --line-gold: rgb(var(--ufa-gold-rgb) / .32);

  --ink: #ECECF1;
  --ink-2: rgb(236 236 241 / .66);
  --ink-3: rgb(236 236 241 / .42);

  --shadow-soft: 0 10px 40px rgb(0 0 0 / .45);
  --shadow-hard: 0 24px 70px rgb(0 0 0 / .65);
  --glow: 0 0 34px rgb(var(--ufa-gold-rgb) / .3);

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --maxw: 1280px;
}

/* ---------- ฉากหลัง 3 ชั้น: ภาพ + ออโรร่า + เกรน ------------------------ */

.bg-main { position: fixed; inset: 0; z-index: -3; overflow: hidden; }
.bg-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 62%;
  transform: scale(1.06) translateZ(0);
  will-change: transform;
}
/* ม่านมืดไล่ระดับ ทำให้ตัวหนังสืออ่านออกทุกจุดของภาพ */
.bg-main::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgb(0 0 0 / .82) 0%, rgb(0 0 0 / .42) 26%, rgb(0 0 0 / .62) 62%, var(--page-bg) 100%),
    radial-gradient(120% 70% at 50% 0%, transparent 40%, rgb(0 0 0 / .55) 100%);
}

.aurora {
  position: fixed;
  inset: -20% -10% auto -10%;
  height: 120vh;
  z-index: -2;
  pointer-events: none;
  filter: blur(90px);
  opacity: .55;
}
.aurora span {
  position: absolute;
  display: block;
  border-radius: 50%;
  mix-blend-mode: screen;
  animation: drift 22s ease-in-out infinite;
}
.aurora span:nth-child(1) { width: 46vw; height: 46vw; top: 2%;  left: 6%;  background: rgb(var(--ufa-gold-rgb) / .5);  animation-duration: 26s; }
.aurora span:nth-child(2) { width: 38vw; height: 38vw; top: 26%; right: 4%; background: rgb(225 60 60 / .38);           animation-duration: 21s; animation-delay: -6s; }
.aurora span:nth-child(3) { width: 30vw; height: 30vw; top: 54%; left: 34%; background: rgb(var(--ufa-gold-mid-rgb) / .4); animation-duration: 30s; animation-delay: -12s; }

@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33%      { transform: translate3d(6vw, -5vh, 0) scale(1.14); }
  66%      { transform: translate3d(-5vw, 6vh, 0) scale(.92); }
}

/* เกรนบาง ๆ ทำให้ไล่สีไม่เป็นริ้ว และดูพรีเมียมขึ้น */
.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .22;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
}

/* ---------- โครง --------------------------------------------------------- */

/* คอลัมน์เดียวสูงเต็มจอ เพื่อให้ฟุตเตอร์ไปอยู่ก้นจอเสมอแม้เนื้อหาสั้น */
.page {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding-bottom: calc(6rem + env(safe-area-inset-bottom));
}
.shell { width: 100%; flex: 1; }

/* หน้าที่ไม่ใช่หน้าแรกไม่มีฮีโร่มากันหัวเว็บ ต้องเว้นที่ให้เมนูที่ลอยอยู่ */
.page--inner .shell { padding-top: calc(4.5rem + env(safe-area-inset-top)); }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow { max-width: 920px; }

.section { padding-block: clamp(2.25rem, 5vw, 4.5rem); }

/* ---------- หัวเว็บ ------------------------------------------------------ */

.site-header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 60;
  padding-top: env(safe-area-inset-top);
  transition: background .3s, backdrop-filter .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgb(8 8 10 / .72);
  backdrop-filter: blur(18px) saturate(1.3);
  border-bottom-color: var(--line);
}
.site-header.is-scrolled::after {
  content: "";
  position: absolute;
  bottom: -1px; left: 0;
  width: 100%; height: 1px;
  background: linear-gradient(to right, transparent, rgb(var(--ufa-gold-rgb) / .75), transparent);
}
.site-header__inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: .7rem var(--gutter);
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
/* โลโก้เป็น flex item ถ้าไม่ล็อก flex-shrink เบราว์เซอร์จะบีบมันให้แบน
   เมื่อปุ่มข้างๆ ใส่ข้อความยาว (nowrap) — อาการ "โลโก้ลีบ" บนมือถือ */
.site-header__brand { display: inline-flex; flex: 0 0 auto; }
.site-header__logo { height: clamp(2.1rem, 4vw, 2.7rem); width: auto; flex: 0 0 auto; object-fit: contain; }
.site-header__actions { display: flex; gap: .5rem; margin-left: auto; min-width: 0; }

.nav-desktop { display: none; gap: .25rem; }
.nav-desktop a {
  position: relative;
  padding: .45rem .85rem;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 400;
  color: var(--ink-2);
  transition: color .2s, background .2s;
}
.nav-desktop a:hover { color: var(--ink); background: var(--glass); }
.nav-desktop a.is-active { color: var(--ufa-gold-bright); }
.nav-desktop a.is-active::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 2px;
  width: 16px; height: 2px;
  transform: translateX(-50%);
  border-radius: 2px;
  background: var(--ufa-gold);
  box-shadow: 0 0 10px rgb(var(--ufa-gold-rgb) / .8);
}

/* ---------- ปุ่ม --------------------------------------------------------- */

.btn-outline,
.btn-solid,
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  white-space: nowrap;
  border-radius: 999px;
  font-weight: 500;
  transition: transform .2s, box-shadow .25s, filter .2s;
}
.btn-outline {
  padding: .45rem 1rem;
  font-size: .8rem;
  border: 1px solid var(--line-gold);
  color: var(--ufa-gold-bright);
  background: rgb(var(--ufa-gold-rgb) / .05);
}
.btn-outline:hover { background: rgb(var(--ufa-gold-rgb) / .14); transform: translateY(-1px); }

.btn-solid {
  padding: .45rem 1.05rem;
  font-size: .8rem;
  font-weight: 600;
  color: #15110a;
  background: linear-gradient(135deg, var(--ufa-gold-sheen), var(--ufa-gold), var(--ufa-gold-deep));
  box-shadow: 0 4px 18px rgb(var(--ufa-gold-rgb) / .32);
}
.btn-solid:hover { transform: translateY(-1px); box-shadow: 0 8px 26px rgb(var(--ufa-gold-rgb) / .5); }

.btn-cta {
  position: relative;
  overflow: hidden;
  padding: .85rem 2.1rem;
  font-size: clamp(.9rem, 2.4vw, 1rem);
  font-weight: 600;
  color: #15110a;
  background: linear-gradient(135deg, var(--ufa-gold-sheen), var(--ufa-gold), var(--ufa-gold-deep));
  box-shadow: 0 10px 34px rgb(var(--ufa-gold-rgb) / .4);
}
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 16px 44px rgb(var(--ufa-gold-rgb) / .6); }
/* แสงกวาดผ่านปุ่ม เรียกสายตาโดยไม่ต้องกะพริบ */
.btn-cta::after {
  content: "";
  position: absolute;
  top: 0; left: -120%;
  width: 55%; height: 100%;
  transform: skewX(-22deg);
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / .55), transparent);
  animation: sweep 3.6s ease-in-out infinite;
}
@keyframes sweep {
  0%, 55% { left: -120%; }
  100%    { left: 160%; }
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .8rem 1.6rem;
  border-radius: 999px;
  font-size: .9rem;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--glass);
  backdrop-filter: blur(10px);
  transition: all .2s;
}
.btn-ghost:hover { background: var(--glass-2); border-color: var(--line-gold); transform: translateY(-2px); }

/* ---------- ฮีโร่ -------------------------------------------------------- */

.hero {
  position: relative;
  padding-top: clamp(6rem, 13vh, 9rem);
  padding-bottom: clamp(1.5rem, 4vw, 3rem);
}
.hero__grid {
  display: grid;
  gap: clamp(1.5rem, 3.5vw, 3rem);
  align-items: center;
}
.hero__side { display: grid; gap: .85rem; }
/* กันคอลัมน์กริดถูกเนื้อหาที่กว้างกว่าดันจนล้น */
.hero__grid > *,
.hero__side > * { min-width: 0; }

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .3rem .85rem .3rem .5rem;
  margin-bottom: 1rem;
  border-radius: 999px;
  border: 1px solid var(--line-gold);
  background: rgb(var(--ufa-gold-rgb) / .08);
  font-size: .72rem;
  letter-spacing: .04em;
  color: var(--ufa-gold-bright);
}
.hero__eyebrow i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgb(74 222 128 / .7);
  animation: live 2s infinite;
}
@keyframes live {
  0%   { box-shadow: 0 0 0 0 rgb(74 222 128 / .7); }
  70%  { box-shadow: 0 0 0 8px rgb(74 222 128 / 0); }
  100% { box-shadow: 0 0 0 0 rgb(74 222 128 / 0); }
}

.hero__title {
  font-size: clamp(2rem, 6.2vw, 4.1rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.02em;
  margin-bottom: .85rem;
}
.hero__title .shine {
  background: linear-gradient(100deg, var(--ufa-gold-white) 10%, var(--ufa-gold) 34%, var(--ufa-gold-deep) 50%, var(--ufa-gold) 66%, var(--ufa-gold-white) 90%);
  background-size: 250% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 5s linear infinite;
}
@keyframes shine { to { background-position: 250% center; } }

.hero__lead {
  max-width: 46ch;
  font-size: clamp(.9rem, 2.2vw, 1.05rem);
  color: var(--ink-2);
  margin-bottom: 1.6rem;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: .7rem; margin-bottom: 1.8rem; }

.hero__stats {
  /* จำนวนช่องแก้ได้จากหลังบ้าน (1-3 ช่อง) จึงให้คอลัมน์ยืดตามจำนวนจริง */
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: .6rem;
  max-width: 460px;
}
.hero__stat {
  padding: .7rem .55rem;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(12px);
  text-align: center;
}
.hero__stat b {
  display: block;
  font-size: clamp(1rem, 3vw, 1.3rem);
  font-weight: 600;
  color: var(--ufa-gold-bright);
}
.hero__stat span { font-size: .68rem; color: var(--ink-3); }

/* ---------- สไลด์ -------------------------------------------------------- */

.slider {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-hard);
  background: rgb(0 0 0 / .3);
}
.slider__track { display: flex; transition: transform .55s cubic-bezier(.4, 0, .2, 1); will-change: transform; }
/* min-width:0 จำเป็น — ค่าเริ่มต้นของ flex item คือ auto ซึ่งกว้างเท่ารูปจริง (1140px)
   ทำให้สไลด์ไม่ยอมหดบนมือถือ แล้วดันทุกอย่างในคอลัมน์เดียวกันหลุดออกนอกจอ */
.slider__slide { flex: 0 0 100%; min-width: 0; }
.slider__slide img { width: 100%; height: auto; }
.slider__dots {
  position: absolute;
  left: 50%; bottom: .8rem;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: .35rem;
  padding: .3rem .5rem;
  border-radius: 999px;
  background: rgb(0 0 0 / .4);
  backdrop-filter: blur(8px);
}
.slider__dot {
  width: 7px; height: 7px;
  padding: 0;
  border-radius: 999px;
  background: rgb(255 255 255 / .3);
  transition: all .35s;
}
.slider__dot.is-active {
  width: 1.6rem;
  background: var(--ufa-gold);
  box-shadow: 0 0 10px rgb(var(--ufa-gold-rgb) / .8);
}
.slider__frame {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border-radius: var(--r-xl);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .08), inset 0 -70px 70px -40px rgb(0 0 0 / .8);
}

/* ---------- แถบข่าววิ่ง --------------------------------------------------- */

.notice {
  display: flex;
  align-items: center;
  gap: .75rem;
  height: 2.6rem;
  padding-right: .75rem;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgb(0 0 0 / .45);
  backdrop-filter: blur(14px);
}
.notice__icon {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  flex-shrink: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--ufa-gold), var(--ufa-gold-deep));
}
.notice__icon img { width: 1.05rem; height: 1.05rem; filter: brightness(0) invert(1); }
.notice__viewport {
  flex: 1;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.notice__belt {
  display: flex;
  width: max-content;
  animation: marquee var(--marquee-duration, 18s) linear infinite;
}
.notice:hover .notice__belt { animation-play-state: paused; }
.notice__belt span {
  padding-right: 3.5rem;
  font-size: .82rem;
  color: var(--ink-2);
  white-space: nowrap;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- แจ็กพอต ------------------------------------------------------ */

.jackpot {
  position: relative;
  padding: 1px;
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-soft), var(--glow);
}
.jackpot__ring {
  position: absolute;
  top: 50%; left: 50%;
  width: 180%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: conic-gradient(from 0deg,
    transparent 0%, var(--ufa-gold) 12%, var(--ufa-gold-white) 18%,
    var(--ufa-gold) 24%, transparent 40%, transparent 60%,
    var(--ufa-gold-mid) 72%, transparent 88%);
  animation: spin 6s linear infinite;
}
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

.jackpot__inner {
  position: relative;
  padding: clamp(1.1rem, 3vw, 1.9rem) 1rem;
  border-radius: calc(var(--r-xl) - 1px);
  background: linear-gradient(165deg, rgb(22 18 8 / .95), rgb(8 8 10 / .97));
  backdrop-filter: blur(20px);
  text-align: center;
  overflow: hidden;
}
.jackpot__inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 80% at 50% 0%, rgb(var(--ufa-gold-rgb) / .16), transparent 70%);
}
.jackpot__label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .32em;
  text-indent: .32em;
  color: var(--ufa-gold);
  margin-bottom: .5rem;
}
.jackpot__label img { width: .95rem; height: .95rem; object-fit: contain; }
.jackpot__label::before,
.jackpot__label::after {
  content: "";
  flex: 1;
  max-width: 46px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgb(var(--ufa-gold-rgb) / .6));
}
.jackpot__label::after { transform: scaleX(-1); }

/* ตัวเลขแบบมาตรวัด — แต่ละหลักเลื่อนเองเวลาเปลี่ยน
   หมายเหตุ: ไล่สีต้องทาที่ "ตัวอักษรแต่ละตัว" ไม่ใช่ที่กล่องแม่
   เพราะหลักตัวเลขมี overflow:hidden + transform ซึ่งจะตัดพื้นหลังของแม่ทิ้งจนตัวเลขหาย */
.odo {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: clamp(1.9rem, 6.5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.1;
  color: var(--ufa-gold-bright);
  filter: drop-shadow(0 3px 16px rgb(var(--ufa-gold-rgb) / .4));
}
.odo__c,
.odo__d i span {
  background: linear-gradient(180deg, #fff 6%, var(--ufa-gold-bright) 44%, var(--ufa-gold-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.odo__d { display: inline-block; overflow: hidden; height: 1.1em; line-height: 1.1; }
.odo__d i { display: block; font-style: normal; transition: transform .55s cubic-bezier(.22, 1, .36, 1); }
.odo__d i span { display: block; height: 1.1em; }

.jackpot__char {
  position: absolute;
  bottom: -8%;
  width: clamp(5rem, 16vw, 8.5rem);
  opacity: .38;
  pointer-events: none;
}
.jackpot__char--l { left: -2%; }
.jackpot__char--r { right: -2%; }
.jackpot__char img { width: 100%; animation: sway 3.4s ease-in-out infinite; }
.jackpot__char--l img { transform: scaleX(-1); animation-delay: -1.7s; }
@keyframes sway {
  0%, 100% { transform: rotate(-5deg) translateY(0); }
  50%      { transform: rotate(5deg) translateY(-6px); }
}
.jackpot__char--l img { animation-name: sway-l; }
@keyframes sway-l {
  0%, 100% { transform: scaleX(-1) rotate(-5deg) translateY(0); }
  50%      { transform: scaleX(-1) rotate(5deg) translateY(-6px); }
}

/* ---------- การ์ดเข้าเล่นใหญ่ --------------------------------------------- */

.play__card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-hard);
  transition: transform .4s, box-shadow .4s, border-color .4s;
}
.play__card:hover {
  transform: translateY(-6px);
  border-color: var(--line-gold);
  box-shadow: var(--shadow-hard), var(--glow);
}
.play__card img { width: 100%; transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.play__card:hover img { transform: scale(1.06); }
.play__hover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity .35s;
  background: linear-gradient(to top, rgb(0 0 0 / .75), rgb(0 0 0 / .25));
  backdrop-filter: blur(2px);
}
.play__card:hover .play__hover { opacity: 1; }

/* ---------- หัวข้อบล็อก --------------------------------------------------- */

.block__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(1rem, 2.5vw, 1.6rem);
}
.block__title {
  position: relative;
  display: flex;
  align-items: center;
  gap: .65rem;
  font-size: clamp(1.05rem, 2.8vw, 1.6rem);
  font-weight: 600;
}
.block__title::before {
  content: "";
  width: 3px;
  height: 1.25em;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--ufa-gold-white), var(--ufa-gold-deep));
  box-shadow: 0 0 14px rgb(var(--ufa-gold-rgb) / .7);
}
.block__sub { font-size: .76rem; color: var(--ink-3); }
.block__more {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .35rem .85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: .76rem;
  color: var(--ufa-gold-bright);
  white-space: nowrap;
  transition: all .2s;
}
.block__more:hover { border-color: var(--line-gold); background: rgb(var(--ufa-gold-rgb) / .1); gap: .55rem; }

/* ---------- กริดการ์ด ----------------------------------------------------- */

.card-grid { display: grid; gap: clamp(.65rem, 1.6vw, 1.1rem); }
.card-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.acard {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: rgb(12 12 14 / .55);
  backdrop-filter: blur(14px);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), border-color .3s, box-shadow .35s;
}
.acard:hover {
  transform: translateY(-6px);
  border-color: var(--line-gold);
  box-shadow: var(--shadow-soft), 0 0 26px rgb(var(--ufa-gold-rgb) / .16);
}
.acard__thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #111; }
.acard__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.acard:hover .acard__thumb img { transform: scale(1.07); }
.acard__thumb::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgb(10 10 12 / .9), transparent 55%);
}
.acard__tag {
  position: absolute;
  top: .55rem; left: .55rem;
  z-index: 2;
  padding: .12rem .55rem;
  border-radius: 999px;
  font-size: .64rem;
  font-weight: 600;
  color: #15110a;
  background: linear-gradient(135deg, var(--ufa-gold-bright), var(--ufa-gold-deep));
}
.acard__body { padding: .75rem .85rem .9rem; }
.acard__title {
  font-size: clamp(.82rem, 1.7vw, .95rem);
  font-weight: 500;
  line-height: 1.45;
  margin-bottom: .4rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.acard:hover .acard__title { color: var(--ufa-gold-bright); }
.acard__meta {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  font-size: .68rem;
  color: var(--ink-3);
}

/* ---------- โปสเตอร์หนัง -------------------------------------------------- */

.mcard {
  display: block;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgb(12 12 14 / .5);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), border-color .3s, box-shadow .35s;
}
.mcard:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--line-gold);
  box-shadow: 0 16px 40px rgb(0 0 0 / .6);
}
.mcard__poster { position: relative; aspect-ratio: 2 / 3; overflow: hidden; background: #111; }
.mcard__poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.mcard:hover .mcard__poster img { transform: scale(1.08); }
.mcard__badge {
  position: absolute;
  top: .4rem; right: .4rem;
  z-index: 2;
  padding: .1rem .45rem;
  border-radius: .35rem;
  font-size: .6rem;
  font-weight: 600;
  color: #15110a;
  background: var(--ufa-gold-bright);
}
.mcard__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity .3s;
  background: linear-gradient(to top, rgb(0 0 0 / .8), rgb(0 0 0 / .2));
}
.mcard:hover .mcard__play { opacity: 1; }
.mcard__play i {
  width: 2.6rem; height: 2.6rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-style: normal;
  font-size: .85rem;
  padding-left: 3px;
  color: #15110a;
  background: var(--ufa-gold);
  box-shadow: 0 0 24px rgb(var(--ufa-gold-rgb) / .75);
}
.mcard__name {
  padding: .5rem .55rem .65rem;
  font-size: .74rem;
  line-height: 1.35;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- แผงเนื้อหา ---------------------------------------------------- */

.panel {
  padding: clamp(1.1rem, 3vw, 2.2rem);
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: rgb(12 12 14 / .62);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
}
.panel + .section { padding-top: clamp(2rem, 4vw, 3rem); }

.crumb {
  padding-block: 1rem .4rem;
  font-size: .74rem;
  color: var(--ink-3);
}
.crumb a { color: var(--ufa-gold); }
.crumb a:hover { text-decoration: underline; }

.entry-title {
  font-size: clamp(1.3rem, 3.6vw, 2.1rem);
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: .7rem;
}
.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .9rem;
  font-size: .74rem;
  color: var(--ink-3);
  margin-bottom: 1.2rem;
}
.entry-cover { border-radius: var(--r-lg); overflow: hidden; margin-bottom: 1.3rem; }

.prose { font-size: clamp(.92rem, 1.8vw, 1rem); line-height: 1.95; color: var(--ink-2); word-break: break-word; }
.prose h2, .prose h3, .prose h4 { color: var(--ufa-gold-bright); margin: 1.7em 0 .6em; }
.prose h2 { font-size: 1.2em; }
.prose h3 { font-size: 1.08em; }
.prose p { margin: 0 0 1.1em; }
.prose a { color: var(--ufa-gold); text-decoration: underline; text-underline-offset: 3px; }
.prose img { border-radius: var(--r-md); height: auto; margin-block: .5em; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1.1em; }
.prose li { margin-bottom: .5em; }
.prose li::marker { color: var(--ufa-gold); }
.prose blockquote {
  margin: 0 0 1.1em;
  padding: .8rem 1.1rem;
  border-left: 3px solid var(--ufa-gold);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  background: rgb(255 255 255 / .04);
}
.prose table { width: 100%; border-collapse: collapse; margin-bottom: 1.1em; font-size: .88em; }
.prose th, .prose td { border: 1px solid var(--line); padding: .55rem .7rem; }
.prose th { background: rgb(255 255 255 / .05); }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--r-md); }

/* ---------- เครื่องเล่น --------------------------------------------------- */

.player {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line-gold);
  box-shadow: 0 0 40px rgb(var(--ufa-gold-rgb) / .18);
}
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player__empty { position: absolute; inset: 0; display: grid; place-items: center; font-size: .85rem; color: var(--ink-3); }

.servers { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .9rem; }
.server-btn {
  padding: .38rem .95rem;
  border-radius: 999px;
  font-size: .78rem;
  border: 1px solid var(--line);
  color: var(--ink-2);
  background: var(--glass);
  transition: all .2s;
}
.server-btn:hover { border-color: var(--line-gold); color: var(--ufa-gold-bright); }
.server-btn.is-active {
  color: #15110a;
  font-weight: 500;
  border-color: transparent;
  background: linear-gradient(135deg, var(--ufa-gold-bright), var(--ufa-gold-deep));
}

/* ---------- โปรโมชั่น ----------------------------------------------------- */

.promo {
  overflow: hidden;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: rgb(12 12 14 / .58);
  backdrop-filter: blur(14px);
  transition: transform .35s, border-color .3s;
}
.promo:hover { transform: translateY(-4px); border-color: var(--line-gold); }
.promo__body { padding: 1rem 1.1rem 1.25rem; }
.promo__title { font-size: 1rem; font-weight: 600; color: var(--ufa-gold-bright); margin-bottom: .4rem; }
.promo__desc { font-size: .84rem; line-height: 1.8; color: var(--ink-2); margin-bottom: .9rem; white-space: pre-line; }
.promo__cta {
  display: inline-flex;
  padding: .5rem 1.5rem;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 500;
  color: #15110a;
  background: linear-gradient(135deg, var(--ufa-gold-bright), var(--ufa-gold-deep));
  transition: transform .2s, box-shadow .2s;
}
.promo__cta:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgb(var(--ufa-gold-rgb) / .45); }

/* ---------- คำถามที่พบบ่อย ------------------------------------------------ */

.faq {
  margin-bottom: .6rem;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: rgb(12 12 14 / .5);
  overflow: hidden;
  transition: border-color .25s;
}
.faq[open] { border-color: var(--line-gold); }
.faq summary {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .9rem 1.1rem;
  font-size: .9rem;
  font-weight: 400;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: "+";
  display: grid;
  place-items: center;
  width: 1.4rem; height: 1.4rem;
  flex-shrink: 0;
  border-radius: 50%;
  font-size: .95rem;
  color: var(--ufa-gold);
  background: rgb(var(--ufa-gold-rgb) / .12);
  transition: transform .3s;
}
.faq[open] summary::before { content: "−"; transform: rotate(180deg); }
.faq[open] summary { color: var(--ufa-gold-bright); }
.faq__a { padding: 0 1.1rem 1rem 3.2rem; font-size: .86rem; line-height: 1.9; color: var(--ink-2); }

/* ---------- ท้ายเว็บ ------------------------------------------------------ */

.site-footer {
  position: relative;
  margin-top: clamp(2rem, 5vw, 4rem);
  padding-top: clamp(2rem, 4vw, 3.5rem);
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgb(0 0 0 / .55));
}
.site-footer::before {
  content: "";
  position: absolute;
  top: -1px; left: 0;
  width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, rgb(var(--ufa-gold-rgb) / .5), transparent);
}
.footer__grid {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin-bottom: 1.8rem;
}
.footer__logo { height: 2.5rem; width: auto; margin-bottom: .9rem; }
.footer__about { font-size: .82rem; line-height: 1.9; color: var(--ink-3); max-width: 42ch; }
.footer__h {
  font-size: .8rem;
  font-weight: 500;
  color: var(--ufa-gold-bright);
  margin-bottom: .8rem;
  letter-spacing: .05em;
}
.footer__links { display: grid; gap: .5rem; }
.footer__links a { font-size: .82rem; color: var(--ink-3); transition: color .2s, padding-left .2s; }
.footer__links a:hover { color: var(--ufa-gold-bright); padding-left: .25rem; }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .7rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  font-size: .72rem;
  color: var(--ink-3);
}
.footer__age {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .2rem .6rem;
  border-radius: 999px;
  border: 1px solid rgb(255 120 120 / .3);
  color: #ff9a9a;
  font-size: .68rem;
}

/* ---------- ด็อกมือถือ ---------------------------------------------------- */

.tabbar {
  position: fixed;
  bottom: calc(.5rem + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 1.5rem);
  max-width: 430px;
  height: 66px;
  z-index: 55;
}
.tabbar__halo {
  position: absolute;
  top: -26px; left: 50%;
  transform: translateX(-50%);
  width: 170px; height: 110px;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgb(var(--ufa-gold-rgb) / .25), transparent 68%);
}
.tabbar__edge,
.tabbar__face { position: absolute; }
.tabbar__edge {
  inset: 0;
  border-radius: 22px;
  background: linear-gradient(180deg, rgb(var(--ufa-gold-rgb) / .85), rgb(var(--ufa-gold-rgb) / .18));
  -webkit-mask-image: radial-gradient(42px at 50% 0px, transparent 41px, #000 42px);
  mask-image: radial-gradient(42px at 50% 0px, transparent 41px, #000 42px);
}
.tabbar__face {
  inset: 1px;
  border-radius: 21px;
  background: rgb(10 10 12 / .82);
  backdrop-filter: blur(22px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .06), 0 -10px 30px rgb(0 0 0 / .6);
  -webkit-mask-image: radial-gradient(42px at 50% -1px, transparent 41px, #000 42px);
  mask-image: radial-gradient(42px at 50% -1px, transparent 41px, #000 42px);
}
.tabbar__row {
  position: relative;
  height: 100%;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-inline: .4rem;
}
.tabbar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  width: 68px;
  padding-top: 2px;
  color: var(--ink-3);
  transition: color .25s, transform .25s;
}
.tabbar__item img {
  width: 1.9rem; height: 1.9rem;
  object-fit: contain;
  transition: transform .25s, filter .25s;
  filter: grayscale(.65) brightness(.85);
}
.tabbar__item span { font-size: 11px; }
a:hover > .tabbar__item,
.tabbar__item.is-active { color: var(--ufa-gold-bright); }
.tabbar__item.is-active img { filter: none; transform: translateY(-2px) scale(1.08); }
a:hover > .tabbar__item img { filter: none; }
.tabbar__gap { width: 68px; flex-shrink: 0; }

.tabbar__center {
  position: absolute;
  left: 50%; top: -30px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.tabbar__ring {
  width: 66px; height: 66px;
  padding: 3px;
  border-radius: 50%;
  background: conic-gradient(from 140deg,
    var(--ufa-gold-darker), var(--ufa-gold-sheen), var(--ufa-gold-amber), var(--ufa-gold-white),
    var(--ufa-gold-mid), var(--ufa-gold-darker), var(--ufa-gold-soft), var(--ufa-gold-mid), var(--ufa-gold-darker));
  box-shadow: 0 0 24px rgb(var(--ufa-gold-rgb) / .55);
  transition: transform .3s;
}
.tabbar__center:hover .tabbar__ring { transform: scale(1.06) rotate(8deg); }
.tabbar__disc {
  width: 100%; height: 100%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 32%, #1c1a15, #060606);
}
.tabbar__disc img { width: 3.1rem; height: 3.1rem; object-fit: contain; }
.tabbar__center span {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ufa-gold-bright);
  text-shadow: 0 1px 4px rgb(0 0 0 / .9);
}

/* ---------- โมดัล -------------------------------------------------------- */

.modal[hidden] { display: none !important; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgb(0 0 0 / .72);
  backdrop-filter: blur(6px);
  animation: fade .25s ease;
}
@keyframes fade { from { opacity: 0; } }
.modal__panel {
  width: 100%;
  max-width: 400px;
  padding: 1.4rem;
  border-radius: var(--r-xl);
  border: 1px solid var(--line-gold);
  background: linear-gradient(165deg, #191712, #0a0a0c);
  box-shadow: var(--shadow-hard), var(--glow);
  animation: pop .3s cubic-bezier(.2, 1.2, .4, 1);
}
@keyframes pop { from { transform: translateY(16px) scale(.96); opacity: 0; } }
.modal__title { font-size: 1.05rem; font-weight: 600; color: var(--ufa-gold-bright); text-align: center; margin-bottom: .2rem; }
.modal__note { font-size: .78rem; color: var(--ink-3); text-align: center; margin-bottom: 1.1rem; }
.modal__close {
  display: block;
  width: 100%;
  margin-top: 1rem;
  padding: .6rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: .82rem;
  color: var(--ink-3);
  transition: all .2s;
}
.modal__close:hover { background: var(--glass); color: var(--ink); }

.contact-list { display: grid; gap: .55rem; }
.contact-item {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .7rem .85rem;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--glass);
  transition: all .2s;
}
.contact-item:hover { border-color: var(--line-gold); background: rgb(var(--ufa-gold-rgb) / .08); transform: translateX(3px); }
.contact-item__icon {
  display: grid;
  place-items: center;
  width: 2.3rem; height: 2.3rem;
  flex-shrink: 0;
  border-radius: .7rem;
  overflow: hidden;
  font-size: 1rem;
  font-weight: 600;
  color: #15110a;
  background: linear-gradient(135deg, var(--ufa-gold-bright), var(--ufa-gold-deep));
}
.contact-item__icon img { width: 100%; height: 100%; object-fit: cover; }
.contact-item__name { font-size: .88rem; }
.contact-item__sub { font-size: .72rem; color: var(--ink-3); }

/* ---------- ชิ้นเล็ก ------------------------------------------------------ */

.empty { padding: 3rem 1rem; text-align: center; font-size: .88rem; color: var(--ink-3); }

.pager { display: flex; justify-content: center; flex-wrap: wrap; gap: .4rem; margin-top: 2rem; }
.pager a, .pager span {
  min-width: 2.2rem;
  padding: .4rem .7rem;
  text-align: center;
  font-size: .8rem;
  border-radius: .6rem;
  border: 1px solid var(--line);
  color: var(--ink-2);
  transition: all .2s;
}
.pager a:hover { border-color: var(--line-gold); color: var(--ufa-gold-bright); }
.pager .is-current {
  color: #15110a;
  font-weight: 500;
  border-color: transparent;
  background: linear-gradient(135deg, var(--ufa-gold-bright), var(--ufa-gold-deep));
}

.searchbar { display: flex; gap: .5rem; margin-bottom: 1.1rem; }
.searchbar input {
  flex: 1;
  padding: .7rem 1.1rem;
  font: inherit;
  font-size: .88rem;
  color: var(--ink);
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgb(0 0 0 / .45);
  backdrop-filter: blur(10px);
  outline: none;
  transition: border-color .2s;
}
.searchbar input:focus { border-color: var(--line-gold); }
.searchbar input::placeholder { color: var(--ink-3); }
.searchbar button {
  padding: .7rem 1.5rem;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 500;
  color: #15110a;
  background: linear-gradient(135deg, var(--ufa-gold-bright), var(--ufa-gold-deep));
}

.chips {
  display: flex;
  gap: .4rem;
  overflow-x: auto;
  margin-bottom: 1.2rem;
  padding-bottom: .25rem;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  white-space: nowrap;
  padding: .35rem .95rem;
  border-radius: 999px;
  font-size: .78rem;
  border: 1px solid var(--line);
  color: var(--ink-2);
  background: var(--glass);
  transition: all .2s;
}
.chip:hover { border-color: var(--line-gold); color: var(--ufa-gold-bright); }
.chip.is-active {
  color: #15110a;
  font-weight: 500;
  border-color: transparent;
  background: linear-gradient(135deg, var(--ufa-gold-bright), var(--ufa-gold-deep));
}

.tagrow { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.6rem; }

.seo-text {
  font-size: .84rem;
  line-height: 2;
  color: var(--ink-3);
  padding: clamp(1rem, 2.5vw, 1.8rem);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: rgb(0 0 0 / .3);
}
.seo-text h2, .seo-text h3 { font-size: .95rem; }

.page-h1 {
  font-size: clamp(1.35rem, 3.6vw, 2.2rem);
  font-weight: 600;
  padding-block: .3rem .6rem;
}

/* ---------- แอนิเมชันตอนเลื่อน -------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s cubic-bezier(.2, .8, .2, 1), transform .7s cubic-bezier(.2, .8, .2, 1);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ===========================================================
   จุดเปลี่ยนขนาดจอ
   =========================================================== */

/* มือถือ — ปุ่มบนหัวเว็บต้องยอมหด ไม่ใช่ไปเบียดโลโก้ให้ลีบ
   (ข้อความยาวจะถูกตัดด้วย … แต่โลโก้ยังเต็มขนาดเสมอ) */
@media (max-width: 639px) {
  .site-header__inner { gap: .55rem; }
  .site-header__logo { height: 1.85rem; }
  .site-header__actions { gap: .35rem; }
  .site-header__actions > a {
    display: block;
    padding: .42rem .75rem;
    font-size: .72rem;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  /* ปุ่มทอง (ปุ่มหลัก) ได้ข้อความเต็มก่อน ปุ่มโปร่งค่อยยอมถูกตัด */
  .site-header__actions .btn-solid   { flex: 0 0 auto; max-width: 48vw; }
  .site-header__actions .btn-outline { flex: 0 1 auto; min-width: 3.5rem; }
}

/* แท็บเล็ตขึ้นไป */
@media (min-width: 640px) {
  .card-grid--2 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .card-grid--3 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .footer__grid { grid-template-columns: 1.6fr 1fr 1fr; }
  .hero__stats { max-width: none; }
}

/* เดสก์ท็อป — เลิกเป็นคอลัมน์มือถือ ใช้พื้นที่ทั้งจอ */
@media (min-width: 1024px) {
  .nav-desktop { display: flex; }

  .page { padding-bottom: 0; }
  .tabbar { display: none; }

  .hero { min-height: 92svh; display: flex; align-items: center; }
  .hero__grid { grid-template-columns: 1.05fr .95fr; }
    .hero__side { gap: 1rem; }

  .card-grid--2 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .card-grid--3 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

  .promo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
  .faq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.1rem; }

  .footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

@media (min-width: 1400px) {
  :root { --maxw: 1380px; }
}

/* จอเล็กมาก */
@media (max-width: 380px) {
  .tabbar__item span, .tabbar__center span { font-size: 10px; }
  .tabbar__item img { width: 1.7rem; height: 1.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
