/* ============================================================
   LG96 — lg96.bet
   งานนี้ไม่มี CSS framework ไม่มี Swiper ไม่มี AOS
   สไลด์แนวนอนใช้ scroll-snap ของ CSS ตรง ๆ accordion ใช้ <details>
   เหลือ JS แค่ reveal / filter / counter / เมนูมือถือ
   ------------------------------------------------------------
   ทิศทางงานออกแบบ: มุมคม เส้นบาง เลขกำกับหัวข้อ จัดชิดซ้าย
   สีดึงจากโลโก้ (ม่วง → ชมพู → แดง) แต่ลด saturation
   ============================================================ */

/* ── 1. ตัวแปร ───────────────────────────────────────────── */
:root {
  --void: #0e0a12;
  --panel: #16101f;
  --panel-2: #1d1528;
  --panel-3: #251c31;

  --vio: #8d6fb6;
  --mag: #c06aa4;
  --red: #c96a72;

  --pearl: #efe6f2;
  --dim: #9d92ab;
  --dimmer: #6f6579;

  --edge: rgba(198, 140, 190, 0.14);
  --edge-2: rgba(198, 140, 190, 0.3);

  --flare: linear-gradient(100deg, var(--vio) 0%, var(--mag) 55%, var(--red) 100%);

  --rail-w: 88px;
  --shell: 1180px;
  --bar-h: 64px;

  --r: 2px;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);

  --disp: "Chakra Petch", "Anuphan", system-ui, sans-serif;
  --body: "Anuphan", "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ── 2. รีเซ็ต ──────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--void);
  color: var(--pearl);
  font-family: var(--body);
  font-size: 16.5px;
  line-height: 1.85;
  overflow-x: hidden;
  /* ลายเส้นทแยงบาง ๆ ให้พื้นไม่แบน แทนการใช้ blur เงาใหญ่ */
  background-image: repeating-linear-gradient(
    115deg,
    rgba(198, 140, 190, 0.035) 0 1px,
    transparent 1px 84px
  );
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: none;
  border: 0;
}

h1,
h2,
h3,
h4 {
  font-family: var(--disp);
  font-weight: 700;
  line-height: 1.28;
  margin: 0 0 0.55em;
}

p {
  margin: 0 0 1em;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

table {
  border-collapse: collapse;
}

:focus-visible {
  outline: 2px solid var(--mag);
  outline-offset: 3px;
}

::selection {
  background: rgba(192, 106, 164, 0.35);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 300;
  padding: 0.7rem 1.2rem;
  background: var(--mag);
  color: #180d16;
  font-weight: 700;
}

.skip:focus {
  left: 0;
}

/* อ่านด้วย screen reader ได้ แต่ไม่กินพื้นที่บนจอ */
.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;
}

/* ── 3. โครงหน้า ─────────────────────────────────────────── */
.wrap {
  width: min(100% - 2.5rem, var(--shell));
  margin-inline: auto;
}

.wrap-tight {
  max-width: 780px;
}

.block {
  padding: clamp(3.5rem, 8vw, 6.5rem) 0;
  position: relative;
}

/* เส้นคั่นบาง ๆ แทนการเปลี่ยนสีพื้นสลับ section */
.block + .block::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--edge) 12%, var(--edge) 88%, transparent);
}

.block-dark {
  background: linear-gradient(180deg, rgba(22, 16, 31, 0) 0%, rgba(22, 16, 31, 0.75) 12%, rgba(22, 16, 31, 0.75) 88%, rgba(22, 16, 31, 0) 100%);
}

/* หัวข้อ section: เลขกำกับ + ชื่อ + เส้นลากไปขวา */
.sh {
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.sh__top {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}

.sh__no {
  font-family: var(--disp);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--mag);
}

.sh__kick {
  font-family: var(--disp);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dimmer);
  white-space: nowrap;
}

.sh__top::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--edge-2), transparent);
}

.sh h2 {
  max-width: 26ch;
  font-size: clamp(1.55rem, 3.4vw, 2.35rem);
}

.sh h2 em {
  font-style: normal;
  background: var(--flare);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sh__note {
  max-width: 62ch;
  margin: 0;
  color: var(--dim);
  font-size: 0.98rem;
}

/* มุมตัด — ใช้กับพาเนลหลัก ให้เข้ากับทรงเหลี่ยมของโลโก้ */
.notch {
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}

/* ── 4. แถบข้างซ้าย (เดสก์ท็อป) ──────────────────────────── */
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  display: none;
  width: var(--rail-w);
  padding: 1.1rem 0 1.4rem;
  border-right: 1px solid var(--edge);
  background: rgba(14, 10, 18, 0.72);
  backdrop-filter: blur(10px);
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.rail__badge {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  font-family: var(--disp);
  font-style: italic;
  font-weight: 700;
  font-size: 1.05rem;
  color: #180d16;
  background: var(--flare);
  clip-path: polygon(0 0, 100% 0, 100% 74%, 74% 100%, 0 100%);
}

.rail__nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: 0.15rem;
}

.rail__nav a {
  position: relative;
  display: block;
  padding: 0.42rem 0;
  font-family: var(--disp);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: center;
  color: var(--dimmer);
  transition: color 0.25s var(--ease);
}

.rail__nav a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 0;
  background: var(--flare);
  transform: translateY(-50%);
  transition: height 0.3s var(--ease);
}

.rail__nav a:hover {
  color: var(--pearl);
}

.rail__nav a.on {
  color: var(--mag);
}

.rail__nav a.on::before {
  height: 20px;
}

/* ป้ายบอกชื่อ section ตอน hover — ไม่กินพื้นที่ */
.rail__nav a span {
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) translateX(-6px);
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--edge-2);
  background: var(--panel-2);
  font-family: var(--body);
  font-size: 0.8rem;
  letter-spacing: 0;
  white-space: nowrap;
  color: var(--pearl);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
}

.rail__nav a:hover span {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.rail__age {
  font-family: var(--disp);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--dimmer);
  writing-mode: vertical-rl;
}

/* ── 5. แถบบน ────────────────────────────────────────────── */
.bar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 55;
  height: var(--bar-h);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.bar.stuck {
  background: rgba(14, 10, 18, 0.86);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--edge);
}

.bar__in {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 100%;
}

.bar__mark img {
  height: 34px;
  width: auto;
}

.bar__cta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.progress {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 70;
  height: 2px;
  background: transparent;
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--flare);
}

.burger {
  display: grid;
  place-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 1px solid var(--edge-2);
}

.burger i {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--pearl);
  transition: transform 0.28s var(--ease), opacity 0.28s var(--ease);
}

.burger[aria-expanded="true"] i:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger[aria-expanded="true"] i:nth-child(2) {
  opacity: 0;
}

.burger[aria-expanded="true"] i:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.sheet {
  position: fixed;
  inset: var(--bar-h) 0 auto 0;
  z-index: 54;
  max-height: calc(100vh - var(--bar-h));
  padding: 1rem 0 1.5rem;
  border-bottom: 1px solid var(--edge);
  background: var(--panel);
  overflow-y: auto;
  /* ต้องมี visibility ด้วย ไม่ใช่แค่เลื่อนขึ้นไปซ่อน
     เพราะแถบบนโปร่งใสตอนยังไม่ scroll แถวล่างสุดของลิ้นชักจะโผล่ทะลุมาให้เห็น */
  transform: translateY(-100%);
  visibility: hidden;
  transition: transform 0.35s var(--ease), visibility 0.35s var(--ease);
}

.sheet.open {
  transform: translateY(0);
  visibility: visible;
}

.sheet a {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  padding: 0.62rem 0;
  border-bottom: 1px solid var(--edge);
  color: var(--dim);
}

.sheet a b {
  font-family: var(--disp);
  font-size: 0.76rem;
  color: var(--mag);
}

/* ── 6. ปุ่ม ─────────────────────────────────────────────── */
.b {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.62rem 1.25rem;
  font-family: var(--disp);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease), color 0.25s var(--ease),
    border-color 0.25s var(--ease);
}

.b-lg {
  padding: 0.85rem 1.9rem;
  font-size: 1rem;
}

.b-fill {
  color: #170c14;
  background: var(--flare);
  clip-path: polygon(0 0, 100% 0, 100% 62%, calc(100% - 12px) 100%, 0 100%);
}

.b-fill:hover {
  transform: translateY(-2px);
}

/* ประกายวิ่งผ่านปุ่มหลัก */
.b-fill::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -130%;
  width: 55%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  transition: left 0.7s var(--ease);
}

.b-fill:hover::after {
  left: 130%;
}

.b-line {
  border: 1px solid var(--edge-2);
  color: var(--pearl);
}

.b-line:hover {
  border-color: var(--mag);
  background: rgba(192, 106, 164, 0.1);
  transform: translateY(-2px);
}

.b-bare {
  padding-inline: 0.6rem;
  color: var(--dim);
}

.b-bare:hover {
  color: var(--pearl);
}

.b-line-green {
  border: 1px solid rgba(110, 190, 140, 0.4);
  color: #a7dcbb;
}

.b-line-green:hover {
  border-color: #6ebe8c;
  background: rgba(110, 190, 140, 0.12);
}

/* ── 7. Hero ─────────────────────────────────────────────── */
.hero {
  padding: calc(var(--bar-h) + clamp(2rem, 6vw, 4.5rem)) 0 clamp(2rem, 5vw, 3.5rem);
  position: relative;
  overflow: hidden;
}

/* แถบทแยงจาง ๆ หลัง hero — ยืมทรงมาจากสายฟ้าในโลโก้ */
.hero::before {
  content: "";
  position: absolute;
  inset: -30% -20% auto 40%;
  height: 150%;
  background: linear-gradient(100deg, rgba(141, 111, 182, 0.13), rgba(201, 106, 114, 0.09));
  transform: skewX(-16deg);
  pointer-events: none;
}

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center;
}

.hero__mark {
  width: min(100%, 430px);
  margin-bottom: 1.4rem;
}

.hero h1 {
  font-size: clamp(1.5rem, 3.2vw, 2.3rem);
  margin-bottom: 1rem;
}

.hero h1 b {
  display: block;
  font-weight: 700;
  background: var(--flare);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 span {
  display: block;
  font-size: 0.78em;
  font-weight: 500;
  color: var(--dim);
}

.hero__lead {
  max-width: 52ch;
  color: var(--dim);
}

.hero__lead b {
  color: var(--pearl);
  font-weight: 600;
}

.hero__act {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.5rem;
}

/* พาเนลข้อมูลด้านขวา แทนสไลด์รูป */
.board {
  border: 1px solid var(--edge-2);
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
}

.board__hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1.1rem;
  border-bottom: 1px solid var(--edge);
  font-family: var(--disp);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dimmer);
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--mag);
}

.live i {
  width: 6px;
  height: 6px;
  background: var(--mag);
  border-radius: 50%;
  animation: blink 2s var(--ease) infinite;
}

@keyframes blink {
  50% {
    opacity: 0.25;
  }
}

.board__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.board__grid > div {
  padding: 1.15rem 1.1rem;
  border-bottom: 1px solid var(--edge);
}

.board__grid > div:nth-child(odd) {
  border-right: 1px solid var(--edge);
}

.board__grid > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.board__grid strong {
  display: block;
  font-family: var(--disp);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  line-height: 1.2;
  background: var(--flare);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.board__grid small {
  font-size: 0.84rem;
  color: var(--dim);
}

/* ── 8. แถบวิ่ง ──────────────────────────────────────────── */
.ticker {
  border-top: 1px solid var(--edge);
  border-bottom: 1px solid var(--edge);
  overflow: hidden;
  background: rgba(22, 16, 31, 0.6);
}

.ticker__row {
  display: flex;
  width: max-content;
  animation: slide 38s linear infinite;
}

.ticker:hover .ticker__row {
  animation-play-state: paused;
}

.ticker__row span {
  display: inline-flex;
  align-items: center;
  gap: 1.6rem;
  padding: 0.6rem 1.6rem;
  font-family: var(--disp);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--dim);
  white-space: nowrap;
}

.ticker__row span::after {
  content: "◆";
  font-size: 0.6rem;
  color: var(--mag);
}

@keyframes slide {
  to {
    transform: translateX(-50%);
  }
}

/* ── 9. Bento จุดเด่น ────────────────────────────────────── */
.bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--edge);
  border: 1px solid var(--edge);
}

.cell {
  position: relative;
  padding: 1.65rem 1.5rem;
  background: var(--panel);
  transition: background-color 0.3s var(--ease);
}

.cell:hover {
  background: var(--panel-2);
}

/* เซลล์กว้างต้องมี 3 ใบใน 6 ใบ ไม่งั้นแถวสุดท้ายจะเหลือช่องโหว่
   (3 คอลัมน์: 6 เซลล์ + 3 ใบที่กินสองช่อง = 9 ช่อง หาร 3 ลงตัว) */
.cell--wide {
  grid-column: span 2;
}

.cell__no {
  font-family: var(--disp);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--dimmer);
}

.cell h3 {
  margin: 0.5rem 0 0.45rem;
  font-size: 1.08rem;
  color: var(--pearl);
}

.cell p {
  margin: 0;
  color: var(--dim);
  font-size: 0.94rem;
}

/* ขีดสีวิ่งขึ้นด้านซ้ายตอน hover */
.cell::before {
  content: "";
  position: absolute;
  inset: auto auto 0 0;
  width: 2px;
  height: 0;
  background: var(--flare);
  transition: height 0.35s var(--ease);
}

.cell:hover::before {
  height: 100%;
}

/* ── 10. รางเลื่อนแนวนอน (เกม) ───────────────────────────── */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.chip {
  padding: 0.4rem 1rem;
  border: 1px solid var(--edge);
  font-family: var(--disp);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--dim);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}

.chip:hover {
  color: var(--pearl);
  border-color: var(--edge-2);
}

.chip.on {
  color: #170c14;
  background: var(--flare);
  border-color: transparent;
}

.railx {
  display: flex;
  gap: 1px;
  padding-bottom: 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--edge-2) transparent;
}

.railx::-webkit-scrollbar {
  height: 3px;
}

.railx::-webkit-scrollbar-thumb {
  background: var(--edge-2);
}

.tile {
  position: relative;
  flex: 0 0 clamp(150px, 20vw, 205px);
  scroll-snap-align: start;
  border: 1px solid var(--edge);
  background: var(--panel);
  overflow: hidden;
}

.tile.off {
  display: none;
}

.tile img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.6s var(--ease), opacity 0.4s var(--ease);
}

.tile:hover img {
  transform: scale(1.06);
}

.tile__cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2.2rem 0.85rem 0.8rem;
  background: linear-gradient(to top, rgba(12, 8, 16, 0.95) 30%, transparent);
}

.tile__cap h3 {
  margin: 0;
  font-size: 0.94rem;
}

.tile__cap p {
  margin: 0.1rem 0 0;
  font-size: 0.76rem;
  color: var(--dim);
}

.railx__ctl {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.9rem;
}

.railx__ctl button {
  width: 38px;
  height: 32px;
  border: 1px solid var(--edge-2);
  color: var(--dim);
  font-size: 0.9rem;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.railx__ctl button:hover {
  color: var(--pearl);
  border-color: var(--mag);
}

.empty {
  margin: 1.5rem 0 0;
  color: var(--dim);
}

/* ── 11. ค่ายเกม ─────────────────────────────────────────── */
.studios {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1px;
  background: var(--edge);
  border: 1px solid var(--edge);
}

.studios li {
  padding: 1.05rem 0.6rem;
  background: var(--panel);
  font-family: var(--disp);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: center;
  color: var(--dim);
  transition: color 0.25s var(--ease), background-color 0.25s var(--ease);
}

.studios li:hover {
  color: var(--mag);
  background: var(--panel-2);
}

/* ── 12. รายการโปรโมชั่น ─────────────────────────────────── */
.rate {
  border-top: 1px solid var(--edge);
}

.rate details {
  border-bottom: 1px solid var(--edge);
}

.rate summary {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1.15rem 0.5rem;
  cursor: pointer;
  list-style: none;
  transition: background-color 0.25s var(--ease);
}

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

.rate summary:hover {
  background: rgba(192, 106, 164, 0.06);
}

.rate__no {
  flex: 0 0 2.4rem;
  font-family: var(--disp);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--dimmer);
}

.rate__ttl {
  flex: 1;
  font-family: var(--disp);
  font-size: 1.02rem;
  font-weight: 600;
}

.rate__val {
  font-family: var(--disp);
  font-size: 1.02rem;
  font-weight: 700;
  background: var(--flare);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.rate__sign {
  flex: 0 0 1rem;
  color: var(--mag);
  transition: transform 0.25s var(--ease);
}

.rate details[open] .rate__sign {
  transform: rotate(45deg);
}

.rate__body {
  padding: 0 0.5rem 1.4rem 3.4rem;
  color: var(--dim);
  font-size: 0.95rem;
}

.rate__body p {
  max-width: 68ch;
}

.rate__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  margin: 0.8rem 0 1rem;
  font-family: var(--disp);
  font-size: 0.82rem;
  color: var(--pearl);
}

.rate__meta b {
  color: var(--mag);
  font-weight: 700;
}

/* ── 13. แผ่นสเปกเครดิตฟรี ───────────────────────────────── */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(1.75rem, 4vw, 3.25rem);
  align-items: start;
}

.copy h3 {
  margin: 1.9rem 0 0.5rem;
  font-size: 1.1rem;
  color: var(--pearl);
}

.copy h3:first-child {
  margin-top: 0;
}

.copy p {
  color: var(--dim);
}

.copy b {
  color: var(--pearl);
  font-weight: 600;
}

.spec {
  margin: 0;
  border: 1px solid var(--edge-2);
  background: var(--panel);
}

.spec__hd {
  padding: 0.75rem 1.15rem;
  border-bottom: 1px solid var(--edge);
  font-family: var(--disp);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dimmer);
}

.spec__row {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.75rem;
  padding: 0.95rem 1.15rem;
  border-bottom: 1px solid var(--edge);
}

.spec__row:last-of-type {
  border-bottom: 0;
}

.spec dt {
  font-family: var(--disp);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--pearl);
}

.spec dd {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--dim);
}

.spec dd b {
  display: block;
  font-family: var(--disp);
  font-size: 1.1rem;
  color: var(--mag);
}

.tip {
  margin: 1rem 0 0;
  padding: 0.9rem 1.1rem;
  border-left: 2px solid var(--red);
  background: rgba(201, 106, 114, 0.07);
  color: var(--dim);
  font-size: 0.9rem;
}

/* ── 14. ตารางเทียบ ──────────────────────────────────────── */
.tbl-scroll {
  overflow-x: auto;
  border: 1px solid var(--edge);
}

.tbl {
  width: 100%;
  min-width: 560px;
  font-size: 0.94rem;
}

.tbl th,
.tbl td {
  padding: 0.85rem 1.1rem;
  text-align: left;
  border-bottom: 1px solid var(--edge);
  vertical-align: top;
}

.tbl thead th {
  font-family: var(--disp);
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  color: var(--pearl);
  background: var(--panel-2);
  white-space: nowrap;
}

.tbl tbody th {
  font-family: var(--disp);
  font-weight: 600;
  color: var(--dim);
  white-space: nowrap;
}

.tbl td {
  color: var(--dim);
}

.tbl .yes {
  color: var(--pearl);
}

.tbl tbody tr:last-child th,
.tbl tbody tr:last-child td {
  border-bottom: 0;
}

.tbl tbody tr:hover th,
.tbl tbody tr:hover td {
  background: rgba(192, 106, 164, 0.05);
}

/* ── 15. ขั้นตอนสมัคร ────────────────────────────────────── */
.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--edge);
  border: 1px solid var(--edge);
}

.steps > li {
  padding: 1.7rem 1.5rem;
  background: var(--panel);
}

.steps__no {
  display: inline-block;
  margin-bottom: 0.7rem;
  font-family: var(--disp);
  font-style: italic;
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1;
  color: rgba(192, 106, 164, 0.32);
}

.steps h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.steps p {
  margin: 0;
  color: var(--dim);
  font-size: 0.94rem;
}

/* ── 16. ตารางรอบกิจกรรม ─────────────────────────────────── */
.week {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1px;
  background: var(--edge);
  border: 1px solid var(--edge);
}

.week > div {
  padding: 1.25rem 1.15rem;
  background: var(--panel);
}

.week__day {
  font-family: var(--disp);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mag);
}

.week h3 {
  margin: 0.45rem 0 0.35rem;
  font-size: 0.99rem;
}

.week p {
  margin: 0;
  color: var(--dim);
  font-size: 0.9rem;
}

/* ── 17. แถบชวนสมัคร ────────────────────────────────────── */
.strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.4rem;
  margin-top: 2.25rem;
  padding: clamp(1.4rem, 3vw, 2.1rem);
  border: 1px solid var(--edge-2);
  background: linear-gradient(100deg, rgba(141, 111, 182, 0.14), rgba(201, 106, 114, 0.1)), var(--panel);
}

.strip h3 {
  margin: 0 0 0.25rem;
  font-size: clamp(1.1rem, 2.4vw, 1.4rem);
}

.strip p {
  margin: 0;
  color: var(--dim);
  font-size: 0.94rem;
}

.strip__act {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* ── 18. บทความ (แนวนิตยสาร) ─────────────────────────────── */
.mag {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
}

.lead-post {
  border: 1px solid var(--edge);
  background: var(--panel);
}

.lead-post__thumb {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.lead-post__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.lead-post:hover .lead-post__thumb img {
  transform: scale(1.04);
}

.lead-post__body {
  padding: 1.4rem 1.5rem 1.6rem;
}

.post-kick {
  font-family: var(--disp);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mag);
}

.lead-post h3 {
  margin: 0.55rem 0 0.5rem;
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
}

.lead-post p {
  margin: 0;
  color: var(--dim);
  font-size: 0.95rem;
}

.post-list li {
  border-bottom: 1px solid var(--edge);
}

.post-list li:first-child {
  border-top: 1px solid var(--edge);
}

.post-list a {
  display: block;
  padding: 1.15rem 0.25rem;
  transition: padding-left 0.28s var(--ease), background-color 0.28s var(--ease);
}

.post-list a:hover {
  padding-left: 0.9rem;
  background: rgba(192, 106, 164, 0.05);
}

.post-list h3 {
  margin: 0.4rem 0 0.3rem;
  font-size: 1.02rem;
}

.post-list p {
  margin: 0;
  color: var(--dim);
  font-size: 0.9rem;
}

/* ── 19. FAQ ─────────────────────────────────────────────── */
.faq {
  border-top: 1px solid var(--edge);
}

.faq details {
  border-bottom: 1px solid var(--edge);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0.5rem;
  cursor: pointer;
  list-style: none;
  font-family: var(--disp);
  font-size: 1rem;
  font-weight: 600;
  transition: color 0.25s var(--ease);
}

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

.faq summary:hover {
  color: var(--mag);
}

.faq summary i {
  flex: 0 0 12px;
  font-style: normal;
  color: var(--mag);
  transition: transform 0.25s var(--ease);
}

.faq details[open] summary i {
  transform: rotate(45deg);
}

.faq__a {
  padding: 0 0.5rem 1.3rem;
  max-width: 74ch;
  color: var(--dim);
  font-size: 0.95rem;
}

.faq__a p {
  margin: 0;
}

/* ── 20. ท้ายหน้า ───────────────────────────────────────── */
.foot {
  border-top: 1px solid var(--edge);
  background: rgba(22, 16, 31, 0.6);
  padding: clamp(2.5rem, 5vw, 3.75rem) 0 calc(1.75rem + env(safe-area-inset-bottom));
}

.foot__grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1.1fr;
  gap: 2rem;
}

.foot__brand img {
  width: 190px;
  margin-bottom: 1rem;
}

.foot__brand p {
  max-width: 42ch;
  color: var(--dim);
  font-size: 0.92rem;
}

.foot h2 {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dimmer);
  margin-bottom: 0.8rem;
}

.foot__nav a {
  display: inline-block;
  padding: 0.22rem 0;
  color: var(--dim);
  font-size: 0.92rem;
  transition: color 0.25s var(--ease), transform 0.25s var(--ease);
}

.foot__nav a:hover {
  color: var(--mag);
  transform: translateX(3px);
}

.foot__contact p {
  color: var(--dim);
  font-size: 0.92rem;
}

.age {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--dim);
}

.age b {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--edge-2);
  font-family: var(--disp);
  font-size: 0.76rem;
}

.foot__end {
  margin-top: 2.25rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--edge);
}

.foot__end p {
  max-width: 74ch;
  font-size: 0.85rem;
  color: var(--dimmer);
}

/* ── 21. แถบล่างมือถือ + ปุ่มขึ้นบน ──────────────────────── */
.dock {
  display: none;
  position: fixed;
  inset: auto 0 0 0;
  z-index: 58;
  border-top: 1px solid var(--edge);
  background: rgba(14, 10, 18, 0.95);
  backdrop-filter: blur(12px);
  padding-bottom: env(safe-area-inset-bottom);
}

.dock a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  padding: 0.55rem 0.2rem;
  font-size: 0.74rem;
  color: var(--dim);
}

.dock a i {
  font-style: normal;
  font-size: 1.02rem;
}

.dock a.hot {
  color: #170c14;
  background: var(--flare);
  font-weight: 700;
}

.up {
  position: fixed;
  right: 1rem;
  bottom: 1.2rem;
  z-index: 57;
  width: 40px;
  height: 40px;
  border: 1px solid var(--edge-2);
  background: rgba(22, 16, 31, 0.9);
  color: var(--pearl);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.up:hover {
  border-color: var(--mag);
  transform: translateY(-3px);
}

/* ── 22. หน้าบทความ ─────────────────────────────────────── */
.post {
  padding: calc(var(--bar-h) + clamp(1.75rem, 4vw, 3rem)) 0 clamp(2.5rem, 6vw, 4rem);
}

.crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.1rem;
  font-size: 0.84rem;
  color: var(--dimmer);
}

.crumb li:not(:last-child)::after {
  content: "›";
  margin-left: 0.35rem;
}

.crumb a:hover {
  color: var(--mag);
}

.post h1 {
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  max-width: 30ch;
}

.post__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1rem;
  margin: 0 0 1.75rem;
  font-family: var(--disp);
  font-size: 0.82rem;
  color: var(--dimmer);
}

.post__cover {
  margin: 0 0 2rem;
  border: 1px solid var(--edge);
  overflow: hidden;
}

.post__cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.rich {
  font-size: 1.03rem;
}

.rich > p:first-of-type {
  font-size: 1.12rem;
  color: var(--pearl);
}

.rich h2 {
  margin: 2.4rem 0 0.8rem;
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
}

.rich h2::before {
  content: "";
  display: block;
  width: 34px;
  height: 2px;
  margin-bottom: 0.9rem;
  background: var(--flare);
}

.rich h3 {
  margin: 1.7rem 0 0.5rem;
  font-size: 1.05rem;
  color: var(--pearl);
}

.rich p,
.rich li {
  color: #dcd4e2;
}

.rich b,
.rich strong {
  color: var(--pearl);
}

.rich a:not(.b) {
  color: var(--mag);
  border-bottom: 1px solid rgba(192, 106, 164, 0.35);
}

.rich a:not(.b):hover {
  color: var(--red);
  border-color: var(--red);
}

.rich ul,
.rich ol {
  margin: 0 0 1.2rem;
  padding-left: 1.35rem;
}

.rich ul {
  list-style: square;
}

.rich ol {
  list-style: decimal;
}

.rich li {
  margin-bottom: 0.4rem;
}

.rich li::marker {
  color: var(--mag);
}

.rich .tbl-scroll {
  margin-bottom: 1.4rem;
}

.aside {
  margin: 1.75rem 0;
  padding: 1.2rem 1.4rem;
  border: 1px solid var(--edge);
  border-left: 2px solid var(--mag);
  background: var(--panel);
  color: var(--dim);
  font-size: 0.96rem;
}

.aside p:last-child {
  margin: 0;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 2.25rem 0 0;
}

.tags li {
  padding: 0.24rem 0.75rem;
  border: 1px solid var(--edge);
  font-size: 0.8rem;
  color: var(--dimmer);
}

.next {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1px;
  margin-top: 2.5rem;
  background: var(--edge);
  border: 1px solid var(--edge);
}

.next a {
  padding: 1.15rem 1.3rem;
  background: var(--panel);
  transition: background-color 0.25s var(--ease);
}

.next a:hover {
  background: var(--panel-2);
}

.next small {
  display: block;
  font-family: var(--disp);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dimmer);
}

.next b {
  font-family: var(--disp);
  font-weight: 600;
}

/* ── 23. เผยตอนเลื่อนถึง (แทน AOS) ──────────────────────── */
.js .rv {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.js .rv.in {
  opacity: 1;
  transform: none;
}

.js img[loading="lazy"] {
  opacity: 0;
}

.js img[loading="lazy"].ok {
  opacity: 1;
}

/* ── 24. จอเล็ก ─────────────────────────────────────────── */
/* แถบข้างมีแค่หน้าแรก หน้าบทความไม่ต้องเผื่อที่ (body ไม่มีคลาส has-rail) */
@media (min-width: 1100px) {
  .has-rail .rail {
    display: flex;
  }

  body.has-rail {
    padding-left: var(--rail-w);
  }

  .has-rail .bar,
  .has-rail .progress {
    left: var(--rail-w);
  }

  .burger,
  .sheet {
    display: none;
  }
}

@media (max-width: 1099px) {
  .hero__grid,
  .split,
  .mag {
    grid-template-columns: minmax(0, 1fr);
  }

  /* 2 คอลัมน์: เลิกกินสองช่อง ไม่งั้น 6 เซลล์จะเหลือช่องโหว่แถวสุดท้าย */
  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cell--wide {
    grid-column: span 1;
  }

  .bar__cta .b-line,
  .bar__cta .b-bare {
    display: none;
  }

  .dock {
    display: flex;
  }

  body {
    padding-bottom: 66px;
  }

  .up {
    bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .foot__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .wrap {
    width: min(100% - 1.6rem, var(--shell));
  }

  body {
    font-size: 16px;
  }

  .bento,
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .cell--wide {
    grid-column: span 1;
  }

  .board__grid {
    grid-template-columns: 1fr 1fr;
  }

  .rate summary {
    flex-wrap: wrap;
    gap: 0.35rem 0.8rem;
  }

  .rate__ttl {
    flex: 1 0 100%;
    order: 2;
  }

  .rate__body {
    padding-left: 0.5rem;
  }

  .spec__row {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .strip {
    flex-direction: column;
    align-items: flex-start;
  }

  .foot__grid {
    grid-template-columns: 1fr;
    gap: 1.6rem;
  }

  .hero__act .b {
    flex: 1;
  }
}

/* ── 25. ลดการเคลื่อนไหว / พิมพ์ ────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .js .rv {
    opacity: 1;
    transform: none;
  }

  .js img[loading="lazy"] {
    opacity: 1;
  }
}

@media print {
  .rail,
  .bar,
  .dock,
  .up,
  .progress,
  .ticker {
    display: none !important;
  }

  body {
    padding: 0;
    background: #fff;
    color: #000;
  }
}
