/* Darkstory Mobile — mobile first (ออกแบบที่ 390px แล้วขยายขึ้น) */
:root {
  --red: #d7191f;
  --red-2: #a50f16;
  --red-3: #f0343a;
  --gold: #ffc83d;
  --gold-2: #f29a00;
  --gold-ink: #8a5600;
  --ink: #24161a;
  --ink-2: #4a3a3c;
  --paper: #fff9f1;
  --cream: #fdf0de;
  --line: #f0e0cb;
  --muted: #7d6c68;
  --sky: #e6f3ff;
  --shadow: 0 12px 32px -14px rgba(120, 30, 20, .35);
  --shadow-sm: 0 4px 14px -6px rgba(120, 30, 20, .25);
  --radius: 20px;
  --top: 60px;
  --font: 'Prompt', 'Noto Sans Thai', 'Leelawadee UI', system-ui, sans-serif;
  /* ลายเมฆจีน */
  --cloud: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='90' viewBox='0 0 180 90'%3E%3Cg fill='none' stroke='%23d7191f' stroke-opacity='.07' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M14 62c0-10 8-18 18-18 3-10 12-17 23-17 10 0 18 6 21 14 3-2 6-2 9-2 10 0 18 8 18 18'/%3E%3Cpath d='M58 62a7 7 0 1 1 7-7M96 66c8 0 14-5 14-12'/%3E%3Cpath d='M118 30c0-7 6-12 13-12 5 0 9 3 11 7 2-1 4-1 6-1 7 0 12 5 12 12'/%3E%3Cpath d='M138 37a5 5 0 1 1 5-5'/%3E%3C/g%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top) + 8px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; text-wrap: balance; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 2px; border-radius: 8px; }

.wrap { width: min(100% - 32px, 1160px); margin-inline: auto; }
.ico { width: 22px; height: 22px; flex: none; }
.ico-xs { width: 12px; height: 12px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: #fff; padding: 8px 14px; border-radius: 10px; }
.skip:focus { left: 8px; }

/* ปุ่ม */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 20px; border: 0; border-radius: 999px;
  font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn-red {
  color: #fff;
  background: linear-gradient(180deg, var(--red-3), #b5121a);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 3px 0 #7d0a10, 0 8px 18px -6px rgba(181, 18, 26, .6);
}
.btn-red:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 1px 0 #7d0a10; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }

/* ปุ่มร้านค้า (แบบ badge ทางการ: ดำ ขอบเทา) */
.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.badges-col { flex-direction: column; align-items: stretch; }
.badge {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  height: 50px; padding: 0 13px 0 10px;
  border-radius: 12px; border: 1px solid #3a3a3e;
  background: #0b0b0d; color: #fff; text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}
a.badge:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .6); }
.badge-ico { width: 24px; height: 24px; flex: none; }
.badge-txt { display: flex; flex-direction: column; line-height: 1.05; text-align: left; white-space: nowrap; }
.badge-txt small { font-size: 9.5px; font-weight: 500; letter-spacing: .02em; opacity: .9; }
.badge-txt b { font-size: 16.5px; font-weight: 600; letter-spacing: -.01em; }
.badges-col .badge { height: 54px; }
.badge-lg { height: 60px; min-width: 182px; padding: 0 16px 0 12px; }
.badge-lg .badge-ico { width: 30px; height: 30px; }
.badge-lg .badge-txt b { font-size: 21px; }
.badge.is-soon { cursor: default; }
.badge .soon {
  position: absolute; top: -9px; right: -6px;
  font-style: normal; font-size: 11px; font-weight: 700; line-height: 1;
  padding: 4px 9px; border-radius: 999px;
  color: #5a3300; background: linear-gradient(180deg, #ffe08a, var(--gold));
  box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}

/* ---------- หัวเว็บ ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  height: var(--top);
  background: rgba(255, 250, 243, .9);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid rgba(215, 25, 31, .1);
}
.topbar-in { height: 100%; display: flex; align-items: center; gap: 10px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; margin-right: auto; }
.brand-ico { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 2px 6px rgba(120, 30, 20, .3); }
.brand-txt { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-txt b { font-size: 15px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; }
.brand-txt small { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--red-2); font-weight: 600; }
.nav { display: none; }
.menu-btn {
  display: grid; place-items: center; width: 44px; height: 44px; margin-right: -8px;
  border: 0; background: none; border-radius: 12px; cursor: pointer; color: var(--ink);
}
.menu-btn .ico { width: 26px; height: 26px; }

/* เมนูมือถือ */
.drawer {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(36, 14, 16, .5);
  opacity: 0; transition: opacity .25s;
}
.drawer.is-open { opacity: 1; }
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(86vw, 360px); overflow-y: auto;
  padding: 18px 20px calc(24px + env(safe-area-inset-bottom));
  background: var(--paper) var(--cloud);
  transform: translateX(100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1);
  box-shadow: -10px 0 30px rgba(0, 0, 0, .2);
}
.drawer.is-open .drawer-panel { transform: none; }
.drawer-close {
  position: absolute; top: 10px; right: 10px; width: 44px; height: 44px;
  display: grid; place-items: center; border: 0; background: #fff; border-radius: 50%;
  box-shadow: var(--shadow-sm); cursor: pointer;
}
.drawer-logo { width: 150px; height: auto; margin: 8px auto 14px; }
.drawer-nav { display: flex; flex-direction: column; margin-bottom: 22px; }
.drawer-nav a {
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: center;
  padding: 12px 4px; border-bottom: 1px dashed var(--line); text-decoration: none;
}
.drawer-nav a span { font-size: 18px; font-weight: 700; }
.drawer-nav a small { grid-row: 2; font-size: 10.5px; letter-spacing: .24em; color: var(--gold-2); font-weight: 700; }
.drawer-nav a .ico { grid-row: 1 / 3; grid-column: 2; color: var(--red); width: 18px; height: 18px; }

/* ---------- Hero ---------- */
.hero { position: relative; background: linear-gradient(180deg, #a9d8ff 0%, #e8f5ff 60%, var(--paper) 100%); }
.hero-visual { position: relative; overflow: hidden; }
.hero-bg img {
  width: 100%; height: min(150vw, 820px);
  object-fit: cover; object-position: 50% 30%;
}
.hero-visual::after { /* ไล่สีล่างให้กลืนกับการ์ด */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 26%;
  background: linear-gradient(180deg, rgba(255, 249, 241, 0), var(--paper) 92%);
  pointer-events: none;
}
.hero-logo-wrap {
  position: absolute; inset: 0 0 auto; display: flex; justify-content: center;
  padding-top: clamp(6px, 3vw, 24px); z-index: 2;
}
.hero-logo { margin: 0; line-height: 0; }
.hero-logo img {
  width: min(44vw, 200px); height: auto;
  filter: drop-shadow(0 6px 14px rgba(80, 10, 10, .35));
  animation: logo-in .9s cubic-bezier(.2, .9, .3, 1.3) both;
}
@keyframes logo-in { from { opacity: 0; transform: scale(.85) translateY(-10px); } }

.hero-cta-wrap { position: relative; z-index: 3; margin-top: -96px; }
.hero-card {
  position: relative;
  padding: 20px 16px 16px; text-align: center;
  background: #fff; border-radius: 24px;
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.hero-card::before { /* เส้นทองบนการ์ด */
  content: ""; position: absolute; left: 22px; right: 22px; top: -1px; height: 3px; border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold-2) 50%, var(--gold) 80%, transparent);
}
.status {
  display: inline-flex; align-items: center; gap: 7px; margin-bottom: 8px;
  padding: 3px 12px 3px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; color: #1d7a3e; background: #e3f7ea;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(29, 122, 62, .18); }
.status.is-soon { color: var(--gold-ink); background: #fff1cc; }
.status.is-soon .status-dot { box-shadow: 0 0 0 3px rgba(242, 154, 0, .2); }
.tagline {
  font-size: clamp(22px, 6.2vw, 30px); font-weight: 800; line-height: 1.25; letter-spacing: -.01em;
  background: linear-gradient(180deg, var(--red-3), var(--red-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.intro { margin: 6px auto 16px; font-size: 14px; color: var(--muted); max-width: 30em; }
.free-note { margin-top: 12px; font-size: 12px; color: var(--muted); }

.hero-petals { position: absolute; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.hero-petals i {
  position: absolute; top: -20px; width: 10px; height: 8px;
  background: #ffb7c9; border-radius: 80% 0 80% 0; opacity: .85;
  animation: petal 9s linear infinite;
}
.hero-petals i:nth-child(1) { left: 8%;  animation-delay: 0s; }
.hero-petals i:nth-child(2) { left: 22%; animation-delay: 3.2s; animation-duration: 11s; }
.hero-petals i:nth-child(3) { left: 38%; animation-delay: 6s; }
.hero-petals i:nth-child(4) { left: 55%; animation-delay: 1.4s; animation-duration: 12s; }
.hero-petals i:nth-child(5) { left: 70%; animation-delay: 4.6s; }
.hero-petals i:nth-child(6) { left: 84%; animation-delay: 2.2s; animation-duration: 10s; }
.hero-petals i:nth-child(7) { left: 93%; animation-delay: 7.4s; }
.hero-petals i:nth-child(8) { left: 47%; animation-delay: 8.6s; animation-duration: 13s; }
@keyframes petal {
  0%   { transform: translate(0, 0) rotate(0); opacity: 0; }
  10%  { opacity: .9; }
  100% { transform: translate(-60px, 110vh) rotate(540deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .hero-petals { display: none; } .hero-logo img { animation: none; } }

/* แถบความน่าเชื่อถือ */
.trust {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-top: 14px;
}
.trust li {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  padding: 10px 4px; border-radius: 16px; background: rgba(255, 255, 255, .7); border: 1px solid var(--line);
}
.trust .ico { width: 30px; height: 30px; padding: 6px; border-radius: 50%; color: #fff; background: linear-gradient(180deg, var(--red-3), var(--red-2)); }
.trust span { display: flex; flex-direction: column; line-height: 1.25; }
.trust b { font-size: 12.5px; font-weight: 700; }
.trust small { font-size: 10px; color: var(--muted); white-space: nowrap; letter-spacing: -.01em; }

/* ---------- หัวข้อ section ---------- */
.sec { padding: 52px 0; position: relative; }
.sec-head { text-align: center; margin-bottom: 22px; }
.kicker {
  display: flex; justify-content: center; align-items: center; gap: 10px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .32em; color: var(--gold-2);
  padding-left: .32em;
}
.kicker::before, .kicker::after { content: ""; width: 22px; height: 2px; border-radius: 2px; background: currentColor; opacity: .7; }
.kicker-light { color: #ffd76a; }
.sec-head h2 {
  position: relative; display: inline-block;
  margin-top: 2px; padding-bottom: 14px;
  font-size: clamp(26px, 7vw, 40px); font-weight: 800; line-height: 1.2; letter-spacing: -.01em;
}
.sec-head h2::after { /* แปรงหมึกแดงใต้หัวข้อ */
  content: ""; position: absolute; left: 50%; bottom: 0; width: 96px; height: 11px; transform: translateX(-50%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12'%3E%3Cpath d='M2 7c20-5 50-6 80-4 12 1 24 2 36 1-14 3-30 5-48 5S20 9 2 7z' fill='%23d7191f'/%3E%3Ccircle cx='112' cy='9' r='1.6' fill='%23d7191f'/%3E%3C/svg%3E") center / contain no-repeat;
}
.sec-head p { margin-top: 10px; color: var(--muted); font-size: 14px; }

/* ---------- ข่าว ---------- */
.sec-news { padding-top: 40px; }
.news-card { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm); overflow: hidden; }
.tabs {
  display: flex; gap: 6px; padding: 12px 12px 10px; overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #fffaf3, #fff);
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  flex: none; height: 36px; padding: 0 16px; border: 1px solid transparent; border-radius: 999px;
  background: transparent; color: var(--muted); font-weight: 600; font-size: 14px; cursor: pointer;
}
.tabs button[aria-selected="true"] { color: #fff; background: linear-gradient(180deg, var(--red-3), var(--red-2)); box-shadow: 0 3px 8px -3px rgba(165, 15, 22, .6); }
.news-list li + li { border-top: 1px dashed var(--line); }
.news-list li[hidden] { display: none; }
.news-item {
  display: grid; grid-template-columns: auto 1fr; grid-template-areas: "chip time" "title title";
  align-items: center; gap: 6px 10px; padding: 14px 16px; text-decoration: none;
}
a.news-item:hover .news-title { color: var(--red); }
.news-item time { grid-area: time; justify-self: end; font-size: 12px; color: var(--muted); }
.news-title { grid-area: title; font-weight: 500; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chip { grid-area: chip; justify-self: start; font-size: 11.5px; font-weight: 700; padding: 2px 10px; border-radius: 7px; }
.chip-notice { color: var(--red-2); background: #ffe5e3; }
.chip-event  { color: var(--gold-ink); background: #fff0c7; }
.chip-update { color: #1d5ea8; background: #e2efff; }
.news-empty { padding: 26px 16px; text-align: center; color: var(--muted); }

/* ---------- 6 สายอาวุธ ---------- */
.sec-classes { background: linear-gradient(180deg, var(--sky) 0%, #fff6ea 70%, var(--paper) 100%); overflow: hidden; }
.sec-classes::before { content: ""; position: absolute; inset: 0; background: var(--cloud); opacity: .9; pointer-events: none; }
.cls { position: relative; }
.cls-stage {
  position: relative; aspect-ratio: 4 / 5; max-height: 74svh; margin-inline: auto;
  touch-action: pan-y; user-select: none;
}
.cls-ring {
  position: absolute; left: 50%; top: 46%; width: 92%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%;
  /* --acc = สีประจำสายที่เลือก (JS ตั้งบน .cls) */
  background:
    radial-gradient(circle, #fff 0 46%, rgba(255, 255, 255, 0) 64%),
    conic-gradient(from 0deg, #ffe7b0, color-mix(in srgb, var(--acc) 30%, #fff), #ffe7b0, color-mix(in srgb, var(--acc) 22%, #ffe0a0), #ffe7b0);
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--acc) 14%, transparent), 0 0 60px 6px color-mix(in srgb, var(--acc) 22%, transparent);
  transition: box-shadow .5s;
}
.cls-ring::after { /* ลายวงในแบบตราประทับ หมุนช้า ๆ */
  content: ""; position: absolute; inset: 7%; border-radius: 50%;
  border: 2px dashed color-mix(in srgb, var(--acc) 35%, transparent);
  animation: spin 40s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.cls-en-bg {
  position: absolute; left: 50%; top: 2%; transform: translateX(-50%);
  font-size: clamp(64px, 24vw, 170px); font-weight: 800; font-style: italic; line-height: 1; letter-spacing: -.02em;
  color: transparent; -webkit-text-stroke: 2px color-mix(in srgb, var(--acc) 22%, transparent); white-space: nowrap; pointer-events: none;
  transition: -webkit-text-stroke-color .5s;
}
.cls-art {
  position: absolute; inset: 0; margin: 0; z-index: 1;
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; transform: translateX(28px) scale(.97);
  transition: opacity .45s, transform .55s cubic-bezier(.2, .8, .2, 1);
  pointer-events: none;
}
.cls-art.is-on { opacity: 1; transform: none; }
.cls-art.from-left { transform: translateX(-28px) scale(.97); }
.cls-art img {
  height: 100%; width: auto; max-width: 100%; object-fit: contain; object-position: bottom center;
  filter: drop-shadow(0 16px 16px rgba(110, 40, 20, .2));
}
.cls-nav {
  position: absolute; top: 50%; z-index: 3; transform: translateY(-50%);
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--red);
  box-shadow: var(--shadow-sm); cursor: pointer;
}
.cls-prev { left: 0; }
.cls-next { right: 0; }
.cls-side { position: relative; z-index: 2; display: flex; flex-direction: column; }
.cls-tabs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: -30px; }
.cls-tabs button {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 0 7px; border-radius: 16px; cursor: pointer;
  background: #fff; border: 1px solid var(--line); color: var(--ink-2);
  font-size: 12.5px; font-weight: 600; line-height: 1.2;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, background .2s, color .2s;
}
.cls-tab-ico { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--cream); color: var(--red-2); }
.cls-tab-ico .ico { width: 24px; height: 24px; }
.cls-tab-name { white-space: nowrap; font-size: 12px; }
.cls-tabs button[aria-selected="true"] {
  color: #fff; border-color: transparent; transform: translateY(-4px);
  background: linear-gradient(180deg, var(--red-3), var(--red-2));
  box-shadow: 0 8px 16px -6px rgba(165, 15, 22, .6);
}
.cls-tabs button[aria-selected="true"] .cls-tab-ico { background: rgba(255, 255, 255, .16); color: var(--gold); }
.cls-info { text-align: center; padding: 20px 4px 0; animation: fade-up .45s both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } }
.cls-en { font-size: 12px; font-weight: 700; letter-spacing: .3em; color: var(--acc); }
.cls-info h3 { font-size: 30px; font-weight: 800; line-height: 1.2; }
.roles { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; }
.roles li { font-size: 12.5px; font-weight: 600; padding: 3px 12px; border-radius: 999px; color: var(--red-2); background: #fff; border: 1px solid rgba(215, 25, 31, .28); }
.cls-info p { color: var(--ink-2); max-width: 28em; margin-inline: auto; }

/* ---------- ไฮไลต์ ---------- */
.feats {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin-inline: -16px; padding: 4px 16px 18px; scroll-padding-inline: 16px;
}
.feats::-webkit-scrollbar { display: none; }
.feat {
  flex: 0 0 84%; scroll-snap-align: start;
  background: #fff; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.feat-img { margin: 0; aspect-ratio: 16 / 10; background: linear-gradient(135deg, #ffd9a8, #ffb3b0); overflow: hidden; }
.feat-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.feat:hover .feat-img img { transform: scale(1.04); }
.feat-body { padding: 14px 16px 18px; }
.feat-en { font-size: 11px; font-weight: 700; letter-spacing: .26em; color: var(--gold-2); }
.feat-body h3 { font-size: 20px; font-weight: 800; line-height: 1.3; margin-bottom: 4px; }
.feat-body p { color: var(--muted); font-size: 14px; }
.feats-dots { display: flex; justify-content: center; gap: 6px; }
.feats-dots i { width: 7px; height: 7px; border-radius: 99px; background: #e8cfb8; transition: width .25s, background .25s; }
.feats-dots i.is-on { width: 22px; background: var(--red); }

/* ---------- ดาวน์โหลด ---------- */
.dl-panel {
  position: relative; overflow: hidden; isolation: isolate;
  padding: 0 18px 26px; border-radius: 28px; text-align: center; color: #fff;
  background:
    radial-gradient(120% 70% at 50% 0%, #ff4b44 0%, rgba(255, 75, 68, 0) 60%),
    linear-gradient(160deg, #e3262d 0%, #a30d15 70%, #7b0810 100%);
  box-shadow: 0 24px 40px -22px rgba(123, 8, 16, .8);
}
.dl-panel::before { /* ลายเมฆขาวจาง */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .9;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='90' viewBox='0 0 180 90'%3E%3Cg fill='none' stroke='%23fff' stroke-opacity='.08' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M14 62c0-10 8-18 18-18 3-10 12-17 23-17 10 0 18 6 21 14 3-2 6-2 9-2 10 0 18 8 18 18'/%3E%3Cpath d='M58 62a7 7 0 1 1 7-7M96 66c8 0 14-5 14-12'/%3E%3Cpath d='M118 30c0-7 6-12 13-12 5 0 9 3 11 7 2-1 4-1 6-1 7 0 12 5 12 12'/%3E%3Cpath d='M138 37a5 5 0 1 1 5-5'/%3E%3C/g%3E%3C/svg%3E");
}
.dl-art {
  width: auto; height: 300px; margin: 18px auto -70px; position: relative; z-index: 0;
  filter: drop-shadow(0 12px 18px rgba(60, 0, 0, .45));
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 70%, transparent 100%);
}
.dl-body { position: relative; z-index: 1; }
.dl-icon { width: 84px; height: 84px; margin: 0 auto 10px; border-radius: 22px; border: 3px solid rgba(255, 255, 255, .9); box-shadow: 0 8px 18px rgba(60, 0, 0, .4); }
.dl-body h2 { font-size: clamp(28px, 8vw, 40px); font-weight: 800; line-height: 1.2; margin: 2px 0 4px; text-shadow: 0 2px 0 rgba(90, 0, 0, .35); }
.dl-body > p { color: rgba(255, 255, 255, .88); margin-bottom: 18px; }
.dl-body .free-note { color: rgba(255, 255, 255, .72); }

/* ---------- ชุมชน ---------- */
.sec-community { padding-top: 24px; }
.socials { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.soc {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 4px 12px; border-radius: 18px; text-decoration: none;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: transform .15s;
}
a.soc:hover { transform: translateY(-3px); }
.soc-ico { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; color: #fff; }
.soc-ico .ico { width: 24px; height: 24px; }
.soc-facebook .soc-ico { background: #1877f2; }
.soc-youtube .soc-ico { background: #ff0000; }
.soc-tiktok .soc-ico { background: #111; }
.soc-line .soc-ico { background: #06c755; }
.soc-line .soc-ico .ico path:last-child { fill: #06c755; }
.soc b { font-size: 13px; font-weight: 700; }
.soc small { font-size: 11px; color: var(--gold-ink); font-weight: 600; margin-top: -4px; white-space: nowrap; letter-spacing: 0; }

/* ---------- ท้ายเว็บ ---------- */
.footer {
  position: relative; margin-top: 40px; padding: 36px 0 calc(104px + env(safe-area-inset-bottom));
  background: #1f1316; color: rgba(255, 255, 255, .74); text-align: center; font-size: 13px;
}
.footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--red-2), var(--red-3), var(--gold), var(--red-3), var(--red-2)); }
.footer-logo { width: 130px; height: auto; margin: 0 auto 18px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 16px; }
.footer-links a { color: #fff; text-decoration: none; font-weight: 500; }
.footer-links a:hover { color: var(--gold); }
.footer-links .is-soon { color: rgba(255, 255, 255, .5); }
.footer-op { margin-bottom: 10px; }
.footer-op a { color: var(--gold); }
.footer-tm { font-size: 11.5px; color: rgba(255, 255, 255, .55); max-width: 46em; margin: 0 auto 8px; }
.footer-copy { font-size: 12px; }

/* ---------- แถบดาวน์โหลดลอยด้านล่าง (มือถือ) ---------- */
.sticky-dl {
  position: fixed; z-index: 40; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 10px; padding: 8px;
  background: rgba(255, 255, 255, .97); border-radius: 20px; border: 1px solid var(--line);
  box-shadow: 0 14px 30px -8px rgba(60, 10, 10, .4);
  transform: translateY(160%); transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}
.sticky-dl.is-show { transform: none; }
.sticky-dl img { width: 44px; height: 44px; border-radius: 12px; flex: none; }
.sticky-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.sticky-txt b { font-size: 14px; font-weight: 800; }
.sticky-txt small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* แสดงตอนเลื่อนถึง (JS ใส่ .rv) */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .6s, transform .6s cubic-bezier(.2, .8, .2, 1); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }

/* ---------- ลูกเล่น ---------- */
/* แถบความคืบหน้าการเลื่อน (JS ตั้ง --p 0..1) */
.scroll-bar {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
  transform-origin: 0 50%; transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, var(--red-2), var(--red-3), var(--gold));
  box-shadow: 0 0 8px rgba(255, 200, 61, .6);
}

/* hero: ซูมเข้าตอนเปิด · ประกายไฟลอย (canvas) · parallax (JS ขยับ .hero-bg) */
.hero-bg { display: block; transform-origin: 50% 0; will-change: transform; }
.hero-bg img { animation: hero-in 1.8s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes hero-in { from { transform: scale(1.08); filter: brightness(1.18) saturate(.9); } }
.hero-fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
/* แสงวิ้งวาดผ่านโลโก้ (mask ตามรูปโลโก้) */
.hero-logo { position: relative; }
.hero-logo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 46.5%, rgba(255, 255, 255, .7) 50%, transparent 53.5%) 160% 0 / 300% 100% no-repeat;
  -webkit-mask: url("../images/logo.webp") center / contain no-repeat;
  mask: url("../images/logo.webp") center / contain no-repeat;
  animation: logo-shine 6s ease-in-out 1.6s infinite;
}
@keyframes logo-shine { 0% { background-position: 160% 0; } 35%, 100% { background-position: -60% 0; } }
/* การ์ด hero ค่อย ๆ โผล่ทีละบรรทัด */
.hero-card > * { animation: fade-up .6s cubic-bezier(.2, .8, .2, 1) both; }
.hero-card > :nth-child(1) { animation-delay: .35s; }
.hero-card > :nth-child(2) { animation-delay: .45s; }
.hero-card > :nth-child(3) { animation-delay: .55s; }
.hero-card > :nth-child(4) { animation-delay: .65s; }
.hero-card > :nth-child(5) { animation-delay: .75s; }
.status-dot { animation: dot-pulse 1.8s ease-in-out infinite; }
@keyframes dot-pulse { 50% { box-shadow: 0 0 0 6px transparent; transform: scale(1.25); } }

/* แสงวิ้งผ่านปุ่ม */
.btn-red { position: relative; overflow: hidden; }
.badge::before, .btn-red::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .32) 50%, transparent 60%) 160% 0 / 300% 100% no-repeat;
  animation: btn-shine 5s ease-in-out infinite;
}
.badge + .badge::before { animation-delay: .25s; }
@keyframes btn-shine { 0%, 62% { background-position: 160% 0; } 100% { background-position: -60% 0; } }

/* 6 สายอาวุธ: เส้นแสงฟันตอนเปลี่ยนสาย · ตัวละครลอยเบา ๆ */
.cls-slash {
  position: absolute; left: -6%; top: 46%; width: 112%; height: 5px; z-index: 2; pointer-events: none;
  border-radius: 50%;
  background: linear-gradient(90deg, transparent, #fff 35%, var(--acc) 70%, transparent);
  box-shadow: 0 0 18px 4px color-mix(in srgb, var(--acc) 55%, transparent);
  transform-origin: 0 50%; transform: rotate(-22deg) scaleX(0); opacity: 0;
}
.cls-slash.go { animation: slash .55s cubic-bezier(.3, .8, .3, 1); }
@keyframes slash {
  0% { transform: rotate(-22deg) scaleX(0); opacity: 1; }
  55% { transform: rotate(-22deg) scaleX(1); opacity: 1; }
  100% { transform: rotate(-22deg) scaleX(1) translateY(-6px); opacity: 0; }
}
.cls-art.is-on img { animation: floaty 4.6s ease-in-out .6s infinite; }
@keyframes floaty { 50% { transform: translateY(-9px); } }
.cls-stage::after { /* แสงออร่าใต้เท้า */
  content: ""; position: absolute; left: 18%; right: 18%; bottom: 2%; height: 12%; z-index: 0; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--acc) 38%, transparent), transparent);
  transition: background .5s;
}
.cls-tabs button[aria-selected="true"] .cls-tab-ico { box-shadow: 0 0 0 2px color-mix(in srgb, var(--acc) 70%, #fff); }

/* เส้นพู่กันใต้หัวข้อวาดตอนเลื่อนถึง */
.sec-head.rv h2::after { transform: translateX(-50%) scaleX(0); transition: transform .7s cubic-bezier(.3, .8, .2, 1) .25s; }
.sec-head.rv.in h2::after { transform: translateX(-50%) scaleX(1); }

/* ไฮไลต์: ไอคอนขยาย + กดดูภาพเต็ม */
.feat { position: relative; }
.feat-img { position: relative; }
.feat-img img { cursor: zoom-in; }
.feat-img:not(.is-empty)::after {
  content: ""; position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; border-radius: 50%; pointer-events: none;
  background: rgba(20, 10, 12, .55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M14 4h6v6M10 20H4v-6M20 4l-7 7M4 20l7-7'/%3E%3C/svg%3E") center / 16px no-repeat;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.feat-glare { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .3s; border-radius: inherit;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .35), transparent 55%); }
.feat:hover .feat-glare { opacity: 1; }

.lightbox {
  position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(18, 8, 10, .88); opacity: 0; transition: opacity .25s;
}
.lightbox.is-open { opacity: 1; }
.lightbox figure { margin: 0; max-width: min(1200px, 100%); transform: scale(.94); transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.lightbox.is-open figure { transform: none; }
.lightbox img { width: 100%; max-height: 78vh; object-fit: contain; border-radius: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.lightbox figcaption { margin-top: 12px; text-align: center; color: #fff; font-weight: 700; font-size: 18px; }
.lightbox figcaption small { display: block; font-size: 11px; letter-spacing: .26em; color: var(--gold); font-weight: 700; }
.lightbox-close {
  position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 12px; width: 44px; height: 44px;
  display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer;
}

/* ปุ่มกลับขึ้นบน (จอคอม) */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 48px; height: 48px;
  display: none; place-items: center; border-radius: 50%; color: #fff; text-decoration: none;
  background: linear-gradient(180deg, var(--red-3), var(--red-2));
  box-shadow: 0 8px 18px -6px rgba(165, 15, 22, .7);
  opacity: 0; transform: translateY(16px); transition: opacity .3s, transform .3s; pointer-events: none;
}
.to-top.is-show { opacity: 1; transform: none; pointer-events: auto; }

@media (prefers-reduced-motion: reduce) {
  .hero-bg img, .hero-card > *, .hero-logo::after, .badge::before, .btn-red::before, .status-dot,
  .cls-art.is-on img, .cls-ring::after, .cls-slash.go { animation: none; }
  .hero-fx { display: none; }
}

/* ---------- แท็บเล็ต ---------- */
@media (min-width: 600px) {
  .news-item { grid-template-columns: auto 1fr auto; grid-template-areas: "chip title time"; padding: 16px 20px; }
  .feat { flex-basis: 46%; }
  .trust li { flex-direction: row; justify-content: center; gap: 10px; text-align: left; }
  .trust b { font-size: 14px; }
  .trust small { font-size: 12px; }
  .hero-card { max-width: 560px; margin-inline: auto; padding: 24px 24px 18px; }
  .cls-stage { aspect-ratio: 1 / 1; max-height: 560px; }
}

/* ---------- จอคอม ---------- */
@media (min-width: 900px) {
  :root { --top: 68px; }
  body { font-size: 16px; }
  .nav { display: flex; gap: 4px; margin-right: 8px; }
  .nav a { padding: 8px 14px; border-radius: 999px; text-decoration: none; font-weight: 600; color: var(--ink-2); }
  .nav a:hover { color: var(--red); background: rgba(215, 25, 31, .06); }
  .menu-btn { display: none; }
  .brand-ico { width: 44px; height: 44px; }
  .brand-txt b { font-size: 17px; }

  /* --hh = ความสูง hero · ยึดขอบบนภาพไว้เสมอ (หัวตัวละครชิดขอบบน) — จอเตี้ยกว่าภาพจะตัดเฉพาะส่วนล่าง */
  .hero { --hh: min(66.7vw, calc(100vh - var(--top)), 900px); }
  .hero-bg img { height: var(--hh); min-height: 560px; object-position: 50% 0; }
  .hero-visual::after { height: 16%; }
  .hero-logo-wrap { justify-content: flex-start; padding-top: 36px; }
  .hero-logo { width: 440px; display: flex; justify-content: center; }
  /* โลโก้ย่อตามความสูง hero ไม่ให้การ์ดดาวน์โหลดทับ (จอโน้ตบุ๊กเตี้ย) */
  .hero-logo img { width: clamp(170px, calc((var(--hh) - 350px) * 0.9), 320px); }
  .hero-cta-wrap { position: absolute; left: 0; right: 0; bottom: clamp(24px, calc(var(--hh) * 0.06), 64px); margin-top: 0; }
  .hero-card { width: 440px; max-width: none; margin: 0; padding: 22px 22px 16px; background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
  .trust { margin-top: 26px; gap: 14px; }
  .trust li { padding: 14px; }

  .sec { padding: 88px 0; }
  .sec-news { padding-top: 64px; }
  .sec-download { padding-bottom: 32px; }
  .sec-community { padding-top: 56px; }
  .sec-head { margin-bottom: 34px; }

  .cls { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
  .cls-stage { aspect-ratio: 1 / 1.02; max-height: 640px; width: 100%; }
  .cls-side { flex-direction: column; }
  .cls-tabs { order: 2; margin-top: 26px; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .cls-tabs button { flex-direction: row; justify-content: flex-start; gap: 10px; padding: 8px 12px; font-size: 15px; }
  .cls-tab-name { font-size: 15px; }
  .cls-info { order: 1; text-align: left; padding: 0; }
  .cls-info h3 { font-size: 46px; }
  .roles { justify-content: flex-start; }
  .cls-info p { margin-inline: 0; font-size: 17px; }

  .feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 0; padding: 0; overflow: visible; }
  .feats-dots { display: none; }

  .dl-panel { display: grid; grid-template-columns: 1fr 1fr; align-items: end; padding: 0 48px 0 0; text-align: left; min-height: 420px; }
  .dl-art { height: 460px; margin: 0 auto -6px; -webkit-mask-image: none; mask-image: none; }
  .dl-body { padding: 48px 0; align-self: center; }
  .dl-icon { margin: 0 0 12px; }
  .dl-body .kicker { justify-content: flex-start; padding-left: 0; }
  .dl-body .badges { justify-content: flex-start; }

  .socials { grid-template-columns: repeat(4, 180px); justify-content: center; gap: 16px; }
  .to-top { display: grid; }
  .footer { padding-bottom: 40px; }
  .sticky-dl { display: none; }
}
