:root {
  color-scheme: dark;
  --bg: #0a0a0c;
  --surface: #141418;
  --surface-2: #1b1b21;
  --text: #f5f5f7;
  --soft: #c9c9d1;
  --muted: #a9a9b3;
  --dim: #8e8e99;
  --line: #26262d;
  --line-2: #3a3a44;
  --brand: #e3262f;
  --brand-dark: #c51f27;
  --brand-2: #ff8a00;
  --brand-ink: #ffffff;
  --ok: #46d369;
  --warn: #ffb020;
  --err: #ff4d4f;
  --blue: #1d5fe0;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.35);
  --display: "Kanit", "Noto Sans Thai", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.65 "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img, video, iframe { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .5em; font-family: var(--display); font-weight: 600; }
h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); }
code { background: var(--surface-2); padding: .1em .4em; border-radius: 6px; font-size: .92em; }
.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; transition: transform .08s, box-shadow .15s; }
.btn:hover { text-decoration: none; box-shadow: var(--shadow); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 70%, var(--brand-2))); border-color: transparent; color: var(--brand-ink); }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--err); }
.btn-sm { padding: 6px 12px; font-size: .9rem; border-radius: 9px; }
.btn-lg { padding: 14px 26px; font-size: 1.05rem; }
.btn-block { width: 100%; }
button.link { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 8px 12px; }

section.block { padding: 40px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.section-head p { margin: 0; color: var(--muted); }

/* cards */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
a.card { color: inherit; display: block; transition: transform .12s, border-color .12s; }
a.card:hover { text-decoration: none; transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.course-card { padding: 0; overflow: hidden; display: flex !important; flex-direction: column; }
.course-cover { aspect-ratio: 16/8; display: grid; place-items: center; font-size: 3.2rem; background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 22%, var(--surface)), color-mix(in srgb, var(--brand-2) 20%, var(--surface))); }
.course-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.course-body h3 { font-size: 1.08rem; margin: 0; }
.course-meta { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 10px; }
.price { font-weight: 700; font-size: 1.1rem; }
.price.free { color: var(--ok); }
.tag { display: inline-block; font-size: .78rem; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-weight: 500; }
.tag.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.tag.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.tag.err { background: color-mix(in srgb, var(--err) 14%, transparent); color: var(--err); }
.tag.brand { background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); }
.tool-card { display: flex; gap: 14px; align-items: flex-start; }
.tool-emoji { font-size: 1.8rem; width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); flex: none; }

/* page header */
.page-head { padding: 40px 0 20px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.tabs a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); background: var(--surface); font-size: .92rem; }
.tabs a.active { background: var(--text); color: var(--bg); border-color: var(--text); text-decoration: none; }

/* course detail */
.course-layout { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; padding-bottom: 48px; }
.buy-box { position: sticky; top: 84px; }
.buy-box .price { font-size: 2rem; }
@media (max-width: 900px) { .course-layout { grid-template-columns: 1fr; } .buy-box { position: static; } }
.lesson-list { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.lesson-list li { border-top: 1px solid var(--line); }
.lesson-list li:first-child { border-top: 0; }
.lesson-list a, .lesson-list span.locked { display: flex; gap: 12px; padding: 13px 16px; color: var(--text); align-items: center; }
.lesson-list a:hover { background: var(--surface-2); text-decoration: none; }
.lesson-list .current { background: color-mix(in srgb, var(--brand) 10%, transparent); }
.lesson-list .num { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: .82rem; flex: none; }
.lesson-list .num.done { background: var(--ok); color: #fff; }
.lesson-list .grow { flex: 1; min-width: 0; }
.locked { color: var(--muted) !important; }

/* learn */
.learn-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; padding: 24px 0 48px; }
@media (max-width: 900px) { .learn-layout { grid-template-columns: 1fr; } }
.video { aspect-ratio: 16/9; background: #000; border-radius: var(--radius); overflow: hidden; display: grid; place-items: center; color: #bbb; }
.video iframe, .video video { width: 100%; height: 100%; border: 0; }
.prose h2, .prose h3, .prose h4 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose { line-height: 1.8; }
.prose li { margin: .25em 0; }
.prose figure { margin: 1.4em 0; }
.prose figure img { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-2); }
.prose figcaption { margin-top: 8px; font-size: .88rem; color: var(--muted); text-align: center; }
.prose blockquote { margin: 1.2em 0; padding: 12px 16px; border-left: 4px solid var(--brand); background: color-mix(in srgb, var(--brand) 8%, transparent); border-radius: 0 10px 10px 0; }
.prose blockquote p { margin: .3em 0; }
.prose pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; overflow-x: auto; white-space: pre-wrap; word-break: break-word; }
.prose pre code { background: none; padding: 0; font-size: .9em; }
.prose .table-wrap { overflow-x: auto; margin: 1.2em 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: .94rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--surface-2); }
.progress { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }

/* forms */
.form-card { max-width: 440px; margin: 48px auto; }
label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=tel], input[type=file], select, textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--brand) 45%, transparent); border-color: var(--brand); }
textarea { min-height: 110px; resize: vertical; }
.field { margin-bottom: 14px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid .full { grid-column: 1 / -1; }

/* alerts */
.alert { padding: 12px 16px; border-radius: 12px; margin: 16px 0; border: 1px solid; }
.alert.success { background: color-mix(in srgb, var(--ok) 10%, transparent); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.alert.error { background: color-mix(in srgb, var(--err) 10%, transparent); border-color: color-mix(in srgb, var(--err) 35%, transparent); }
.alert.info { background: color-mix(in srgb, var(--brand) 9%, transparent); border-color: color-mix(in srgb, var(--brand) 30%, transparent); }

/* pricing */
.plans { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); max-width: 820px; margin: 0 auto; }
.plan.highlight { border: 2px solid var(--brand); position: relative; }
.plan .price { font-size: 2.2rem; }
.plan ul { padding-left: 0; list-style: none; }
.plan li::before { content: "✓ "; color: var(--ok); font-weight: 700; }

/* checkout / order */
.order-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 900px; margin: 32px auto 56px; }
@media (max-width: 800px) { .order-layout { grid-template-columns: 1fr; } }
.qr-box { text-align: center; }
.qr-box img { width: 260px; height: 260px; border-radius: 12px; background: #fff; padding: 8px; }
.pp-head { background: #113566; color: #fff; border-radius: 12px 12px 0 0; padding: 10px; font-weight: 700; letter-spacing: .5px; }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; padding-left: 38px; position: relative; margin-bottom: 12px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: .85rem; font-weight: 700; }
.status-big { font-size: 3rem; }
.dropzone { border: 2px dashed var(--line); border-radius: 12px; padding: 20px; text-align: center; background: var(--surface-2); cursor: pointer; }
.dropzone img { max-height: 220px; border-radius: 8px; margin-top: 10px; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface-2); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }

/* account */
.account-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.avatar { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }

/* admin */
.admin-wrap { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 24px 0 56px; }
.admin-side a { display: block; padding: 9px 12px; border-radius: 10px; color: var(--muted); font-weight: 500; }
.admin-side a.active, .admin-side a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
@media (max-width: 860px) { .admin-wrap { grid-template-columns: 1fr; } .admin-side { display: flex; overflow-x: auto; gap: 4px; } .admin-side a { white-space: nowrap; } }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-bottom: 24px; }
.kpi .label { color: var(--muted); font-size: .88rem; }
.kpi .value { font-size: 1.6rem; font-weight: 700; }
.slip-thumb { width: 64px; height: 84px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
details.inline summary { cursor: pointer; color: var(--brand); }


/* ================= Dark cinematic theme (layout inspired by streaming-style course sites) ================= */
a { color: #ff5a60; }
.btn { font-family: var(--display); font-weight: 600; border-radius: 10px; background: var(--surface-2); border-color: var(--line-2); }
.btn:hover { background: #24242c; box-shadow: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 0 18px rgba(227,38,47,.35); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: transparent; }
.btn-line { background: #06c755; border-color: #06c755; color: #fff; }
.btn-line:hover { background: #05b34c; }
.card { box-shadow: none; }
a.card:hover { border-color: var(--line-2); transform: translateY(-3px); }
.tag.brand { background: rgba(227,38,47,.16); color: #ff6b70; }
.price { font-family: var(--display); }
.tabs a.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pp-head { background: #113566; }
.container.narrow { max-width: 860px; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.accent { color: var(--brand-2); }
.block { display: block; }

/* nav */
.nav { position: sticky; top: 0; z-index: 30; background: linear-gradient(180deg, rgba(10,10,12,.92), rgba(10,10,12,.78)); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255,255,255,.06); }
.nav-inner { max-width: 1600px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 40px); height: 72px; display: flex; align-items: center; gap: clamp(16px, 2.2vw, 36px); }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--display); font-size: 1.2rem; font-weight: 700; white-space: nowrap; }
.logo:hover { text-decoration: none; }
.logo b { color: var(--text); }
.logo-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-size: .9rem; font-weight: 800; letter-spacing: .5px; box-shadow: 0 0 14px rgba(255,138,0,.35); }
.nav-links { display: flex; align-items: center; gap: clamp(14px, 1.6vw, 28px); flex: 1; min-width: 0; font-family: var(--display); font-size: 16.5px; font-weight: 500; white-space: nowrap; }
.nav-links a { display: flex; align-items: center; gap: 6px; color: #b9b9c2; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav-links a:hover, .nav-links a.active { color: #fff; text-decoration: none; }
.nav-links a.active { border-bottom-color: var(--brand); }
.nav-links .ico { font-size: .8em; opacity: .7; }
.hot { border-radius: 4px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); padding: 0 6px; font-size: 11px; font-weight: 700; line-height: 1.6; color: #fff; box-shadow: 0 0 12px rgba(255,138,0,.45); }
.nav-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.nav-text { color: #e4e4e8; padding: 8px 4px; white-space: nowrap; }
.nav-text:hover { color: #fff; text-decoration: none; }
.btn-glass { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px; border-radius: 8px; border: 1px solid rgba(255,255,255,.45); background: rgba(255,255,255,.08); color: #fff; font-family: var(--display); font-weight: 600; white-space: nowrap; backdrop-filter: blur(6px); }
.btn-glass:hover { background: rgba(255,255,255,.16); text-decoration: none; }
.btn-join { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-height: 44px; padding: 4px 16px; border-radius: 8px; border: 1px solid rgba(120,170,255,.45); background: linear-gradient(90deg, #0b3fb8, #1d5fe0); color: #fff; line-height: 1.2; white-space: nowrap; box-shadow: 0 0 18px rgba(29,95,224,.35); transition: filter .15s; }
.btn-join:hover { filter: brightness(1.12); text-decoration: none; }
.btn-join b { font-family: var(--display); font-size: 15.5px; }
.btn-join small { font-size: 11.5px; opacity: .9; }
.nav-logout { display: inline; margin: 0; }
.menu-btn { display: none; background: none; border: 0; color: #fff; font-size: 1.4rem; width: 44px; height: 44px; border-radius: 8px; cursor: pointer; }
.menu-btn:hover { background: rgba(255,255,255,.08); }
@media (max-width: 1280px) { .nav-links .ico { display: none; } .nav-links { font-size: 15.5px; } }
@media (max-width: 1140px) {
  .menu-btn { display: block; }
  .nav-links { display: none; }
  .nav-right .nav-text, .nav-right .btn-glass, .nav-logout { display: none; }
  .nav.open .nav-inner { flex-wrap: wrap; height: auto; padding-bottom: 14px; }
  .nav.open .logo { height: 72px; }
  .nav.open .nav-links { order: 5; display: flex; flex-direction: column; align-items: stretch; width: 100%; gap: 0; font-size: 17px; }
  .nav.open .nav-links a { padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .nav.open .nav-links .ico { display: inline; }
  .nav.open .nav-right { order: 6; width: 100%; flex-wrap: wrap; padding-top: 10px; }
  .nav.open .nav-right .nav-text, .nav.open .nav-right .btn-glass, .nav.open .nav-logout { display: inline-flex; }
}
@media (max-width: 520px) { .btn-join small { display: none; } .btn-join { padding: 4px 12px; } .logo b { font-size: 1rem; } }

/* hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid rgba(255,255,255,.04); }
.hero-art { position: absolute; inset: 0; pointer-events: none; }
.hero-grid { position: absolute; inset: 0 0 0 30%; background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px); background-size: 56px 56px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 35%, #000 80%, transparent); mask-image: linear-gradient(90deg, transparent, #000 35%, #000 80%, transparent); }
.hero-orb { position: absolute; border-radius: 50%; filter: blur(60px); }
.hero-orb.o1 { width: 560px; height: 560px; right: 8%; top: -160px; background: rgba(227,38,47,.32); }
.hero-orb.o2 { width: 460px; height: 460px; right: -80px; bottom: -220px; background: rgba(255,138,0,.22); }
.hero-emojis { position: absolute; right: clamp(16px, 6vw, 120px); top: 50%; transform: translateY(-50%); display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; opacity: .9; }
.hero-emojis span { display: grid; place-items: center; width: clamp(80px, 8vw, 130px); aspect-ratio: 1; font-size: clamp(2.4rem, 4vw, 4rem); border-radius: 22px; background: linear-gradient(145deg, rgba(255,255,255,.08), rgba(255,255,255,.02)); border: 1px solid rgba(255,255,255,.1); box-shadow: 0 20px 50px rgba(0,0,0,.45); }
.hero-emojis span:nth-child(even) { transform: translateY(26px); }
.hero-inner { position: relative; max-width: 1600px; margin: 0 auto; padding: clamp(36px, 6vw, 80px) clamp(16px, 3vw, 40px) 44px; }
.hero-copy { max-width: 640px; display: flex; flex-direction: column; gap: 14px; }
.hero h1 { font-size: clamp(31px, 4.4vw, 50px); font-weight: 800; line-height: 1.12; margin: 0; }
.hero-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.chips-label { font-family: var(--display); font-size: 19px; font-weight: 600; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); font-family: var(--display); font-weight: 600; backdrop-filter: blur(6px); }
.live-badge { display: inline-flex; align-items: center; gap: 12px; width: fit-content; padding: 6px 20px 6px 6px; border-radius: 999px; border: 2px solid rgba(255,59,59,.7); background: rgba(255,59,59,.18); color: #fff; font-family: var(--display); font-size: 18px; font-weight: 700; box-shadow: 0 0 22px rgba(255,59,59,.35); }
.live-badge:hover { text-decoration: none; background: rgba(255,59,59,.26); }
.live { display: inline-flex; align-items: center; gap: 8px; padding: 3px 12px; border-radius: 999px; background: #ff2d2d; font-size: 15px; font-weight: 800; letter-spacing: 1px; }
.ping { position: relative; width: 10px; height: 10px; border-radius: 50%; background: #fff; }
.ping::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #fff; animation: ping 1s cubic-bezier(0,0,.2,1) infinite; }
@keyframes ping { 75%, 100% { transform: scale(2.2); opacity: 0; } }
.hero-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-family: var(--display); }
.hero-price s { font-size: 21px; opacity: .7; }
.hero-price b { font-size: clamp(36px, 4vw, 44px); font-weight: 800; line-height: 1; }
.hero-price span { font-size: 18px; font-weight: 500; }
.hero-sub, .hero-members { color: var(--soft); margin: 0; }
.hero-members b { color: #fff; font-family: var(--display); }
.btn-go { display: inline-flex; align-items: center; gap: 12px; width: fit-content; margin-top: 6px; padding: 8px 26px 8px 8px; border-radius: 999px; background: linear-gradient(90deg, #15a34a, #1db954); color: #fff; font-family: var(--display); box-shadow: 0 0 26px rgba(34,197,94,.55); transition: transform .15s, box-shadow .15s; }
.btn-go:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 0 34px rgba(34,197,94,.75); }
.go-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #fff; color: #16a34a; font-size: 1.1rem; }
.btn-go b { display: block; font-size: 20px; line-height: 1.2; }
.btn-go small { display: block; font-size: 14px; font-weight: 600; line-height: 1.2; }
.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 30px; width: min(820px, calc(100vw - 32px)); }
.tier { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; color: #fff; border: 1px solid rgba(255,255,255,.14); background: linear-gradient(135deg, rgba(255,255,255,.1), rgba(255,255,255,.03)); backdrop-filter: blur(8px); transition: transform .15s, border-color .15s; }
.tier:hover { text-decoration: none; transform: translateY(-2px); border-color: rgba(255,255,255,.35); }
.tier-1 { border-color: rgba(70,211,105,.45); }
.tier-2 { border-color: rgba(255,138,0,.45); }
.tier-3 { border-color: rgba(120,170,255,.45); }
.tier-emoji { font-size: 1.8rem; }
.tier-txt { min-width: 0; }
.tier-txt b { display: block; font-family: var(--display); font-size: 15px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tier-txt small { color: var(--muted); }
.tier-tag { position: absolute; top: -10px; right: 10px; padding: 0 8px; border-radius: 4px; background: #16a34a; font-size: 11.5px; font-weight: 700; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.rise { animation: rise .6s cubic-bezier(.2,.7,.2,1) both; }
@media (prefers-reduced-motion: reduce) { .rise, .ping::after { animation: none; } }
@media (max-width: 1100px) { .hero-emojis { opacity: .25; } }
@media (max-width: 760px) { .hero-emojis { display: none; } .tiers { grid-template-columns: 1fr; } .hero-grid { left: 0; } }

/* horizontal shelves */
.shelf { max-width: 1600px; margin: 0 auto; padding: 34px clamp(16px, 3vw, 40px) 6px; }
.shelf-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.shelf-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: clamp(1.3rem, 2.2vw, 1.65rem); }
.shelf-head .bar { width: 4px; height: 1.1em; border-radius: 2px; background: var(--brand); }
.shelf-head a { color: var(--muted); font-family: var(--display); }
.shelf-head a:hover { color: #fff; text-decoration: none; }
.rail { --cw: calc((100% - 64px) / 5); display: grid; grid-auto-flow: column; grid-auto-columns: var(--cw); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 2px 16px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.rail > * { scroll-snap-align: start; }
@media (max-width: 1400px) { .rail { --cw: calc((100% - 48px) / 4); } }
@media (max-width: 1100px) { .rail { --cw: calc((100% - 32px) / 3); } }
@media (max-width: 760px) { .rail { --cw: calc((100% - 16px) / 1.6); } }
@media (max-width: 480px) { .rail { --cw: calc((100% - 16px) / 1.25); } }
.rail-item.numbered { position: relative; display: flex; }
.rail-item.numbered .course-card { flex: 1; }
.big-num { position: absolute; z-index: 2; left: 10px; bottom: 112px; font-family: var(--display); font-size: 4.5rem; font-weight: 800; line-height: 1; color: transparent; -webkit-text-stroke: 2px rgba(255,255,255,.85); text-shadow: 0 4px 20px rgba(0,0,0,.6); pointer-events: none; }

/* course card */
.course-card { background: var(--surface); }
.course-cover { position: relative; aspect-ratio: 16/9; font-size: 3.4rem; background: radial-gradient(120% 90% at 80% 10%, rgba(255,138,0,.28), transparent 55%), radial-gradient(100% 100% at 10% 100%, rgba(227,38,47,.35), transparent 60%), #1a1a20; }
.cover-tag { position: absolute; top: 10px; left: 10px; padding: 1px 8px; border-radius: 4px; background: var(--brand); color: #fff; font-size: 11.5px; font-weight: 700; letter-spacing: .3px; }
.cover-tag.free { background: #16a34a; }
.cover-count { position: absolute; right: 10px; bottom: 10px; padding: 1px 8px; border-radius: 4px; background: rgba(0,0,0,.65); color: #fff; font-size: 12px; }
.course-kicker { color: var(--dim); font-size: .82rem; }
.course-body h3 { font-size: 1.05rem; }

/* tool & download tiles */
.tool-tile { display: flex !important; flex-direction: column; gap: 8px; align-items: flex-start; }
.tool-tile .tool-emoji { background: linear-gradient(135deg, rgba(227,38,47,.25), rgba(255,138,0,.18)); }
.tool-tile strong { font-family: var(--display); font-size: 1.08rem; }
.tile-link { margin-top: auto; padding-top: 6px; color: var(--soft); font-size: .9rem; }
.tool-emoji { background: var(--surface-2); }
.book { display: flex !important; flex-direction: column; gap: 8px; padding: 14px; }
.book-cover { position: relative; aspect-ratio: 4/3; border-radius: 8px; display: grid; place-items: center; font-size: 2.8rem; background: linear-gradient(160deg, #23232b, #121216); border: 1px solid var(--line-2); overflow: hidden; }
.book-cover::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 10px; background: linear-gradient(90deg, rgba(0,0,0,.5), transparent); }
.book-cover em { position: absolute; left: 10px; bottom: 8px; font-style: normal; font-size: .75rem; color: var(--muted); }
.book strong { font-family: var(--display); }
.book-price { margin-top: auto; }

/* ticket */
.ticket { display: grid; grid-template-columns: 1fr 280px; border-radius: 18px; overflow: hidden; background: radial-gradient(120% 140% at 0% 0%, rgba(227,38,47,.35), transparent 55%), linear-gradient(135deg, #1a1a20, #111115); border: 1px solid var(--line-2); }
.ticket-main { padding: clamp(24px, 4vw, 44px); }
.ticket-kicker { font-family: var(--display); letter-spacing: 3px; font-size: .82rem; font-weight: 700; color: var(--brand-2); margin-bottom: 8px; }
.ticket h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.ticket-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; color: var(--soft); }
.ticket-list li::before { content: "✓  "; color: var(--ok); font-weight: 700; }
.ticket-stub { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 28px 24px; text-align: center; background: rgba(255,255,255,.04); border-left: 2px dashed rgba(255,255,255,.18); }
.ticket-stub::before, .ticket-stub::after { content: ""; position: absolute; left: -13px; width: 24px; height: 24px; border-radius: 50%; background: var(--bg); }
.ticket-stub::before { top: -12px; } .ticket-stub::after { bottom: -12px; }
.stub-price { font-family: var(--display); font-size: 2.4rem; font-weight: 800; line-height: 1.1; }
@media (max-width: 720px) { .ticket { grid-template-columns: 1fr; } .ticket-stub { border-left: 0; border-top: 2px dashed rgba(255,255,255,.18); } .ticket-stub::before, .ticket-stub::after { display: none; } }

/* faq */
.faq { display: grid; gap: 10px; margin-top: 18px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0; cursor: pointer; list-style: none; font-family: var(--display); font-weight: 500; font-size: 1.05rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); color: var(--brand); }
.faq details p { margin: 0 0 16px; color: var(--soft); }

/* contact */
.contact-box { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding: clamp(22px, 4vw, 36px); border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.contact-box h2 { margin: 0 0 4px; }
.contact-box p { margin: 0; max-width: 480px; }

/* page heads on inner pages */
.page-head h1 { font-weight: 700; }

/* footer */
footer.site { border-top: 1px solid var(--line); padding: 36px 0 24px; margin-top: 48px; color: var(--muted); font-size: .94rem; background: #08080a; }
.footer-grid { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 8px 20px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: #fff; text-decoration: none; }
.footer-copy { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .86rem; color: var(--dim); }

/* legacy CTA (still used on other pages) */
.cta { background: radial-gradient(120% 140% at 0% 0%, rgba(227,38,47,.45), transparent 60%), #16161b; border: 1px solid var(--line-2); color: #fff; border-radius: 18px; padding: 36px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.cta .btn { background: var(--brand); color: #fff; border: 0; }

/* ---------- ปุ่ม Google ---------- */
.btn-google { background: #fff; color: #1f1f1f; border-color: #dadce0; gap: 10px; }
.btn-google:hover { background: #f2f2f2; color: #1f1f1f; }
.or-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: .88rem; }
.or-divider::before, .or-divider::after { content: ""; flex: 1; height: 1px; background: var(--line-2, var(--line)); }
