/* Maple Lingo — หน้าเว็บ + ห้องเรียน
   CI: #0F6B3A เขียวหลัก · #2E9B62 เขียวรอง · #D62828 แดงเมเปิ้ล · #F8FBF8 ขาว · ครีม #FBF5EA
   ฟอนต์: LINE Seed Sans TH (ไทย) + Poppins (อังกฤษ/ตัวเลข) */

@font-face { font-family: 'LINE Seed Sans TH'; src: url('/fonts/LINESeedSansTH_Rg.ttf') format('truetype'); font-weight: 400 500; font-display: swap; }
@font-face { font-family: 'LINE Seed Sans TH'; src: url('/fonts/LINESeedSansTH_Bd.ttf') format('truetype'); font-weight: 600 800; font-display: swap; }

:root {
  --green: #0F6B3A; --green-2: #2E9B62; --green-soft: #E7F3EC; --green-ink: #0B4F2B;
  --red: #D62828; --red-ink: #B51F1F; --red-soft: #FDECEC;
  --paper: #F8FBF8; --cream: #FBF5EA; --white: #fff;
  --ink: #17261D; --muted: #536359; --line: #E1EAE4; --gold: #F2B632; --gold-ink: #7A5605;
  --radius: 22px; --r-sm: 14px; --shadow: 0 1px 2px rgba(15, 50, 30, .06), 0 8px 24px -8px rgba(15, 60, 35, .16);
  --shadow-lg: 0 2px 6px rgba(15, 50, 30, .06), 0 24px 48px -16px rgba(15, 60, 35, .24);
  --font: 'Poppins', 'LINE Seed Sans TH', 'Noto Sans Thai', system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.7; color: var(--ink); background: var(--paper); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-underline-offset: 3px; }
h1, h2, h3, h4 { line-height: 1.4; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.005em; text-wrap: balance; }
h1 { font-size: clamp(30px, 6.2vw, 60px); }
h2 { font-size: clamp(26px, 4vw, 42px); }
h3 { font-size: 20px; }
p { margin: 0 0 1em; text-wrap: pretty; }
button, input, select, textarea { font: inherit; color: inherit; }
.i { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg:not([class]) { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 1.8; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 760px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 99; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); }
.hp { position: absolute; left: -9999px; }
[hidden] { display: none !important; }
code { background: var(--green-soft); color: var(--green-ink); padding: 2px 8px; border-radius: 8px; font-weight: 600; }

/* ---------- ปุ่ม ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 22px;
  border-radius: 999px; border: 2px solid transparent; font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.2;
  transition: transform .2s var(--ease), background-color .2s, box-shadow .2s, color .2s; background: var(--green); color: #fff; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }
.btn-red { background: var(--red); color: #fff; box-shadow: 0 8px 18px -8px rgba(214, 40, 40, .7); }
.btn-red:hover { background: var(--red-ink); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-ink); }
.btn-ghost { background: #fff; color: var(--green); border-color: var(--green); }
.btn-ghost:hover { background: var(--green-soft); }
.btn-white { background: #fff; color: var(--red); }
.btn-lg { min-height: 54px; padding: 12px 28px; font-size: 18px; }
.btn.sm { min-height: 38px; padding: 6px 14px; font-size: 15px; }
.btn-block { width: 100%; }
.btn .arr svg, .btn .i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn kbd { font-family: var(--font); font-size: 11px; opacity: .75; border: 1px solid currentColor; border-radius: 6px; padding: 0 5px; }
.round { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line); background: #fff; color: var(--green); display: inline-grid; place-items: center; cursor: pointer; flex: none; text-decoration: none; transition: background-color .2s, border-color .2s; }
.round:hover { border-color: var(--green-2); background: var(--green-soft); }
.linklike { background: none; border: 0; cursor: pointer; }
.pulse { animation: pulse 1.6s var(--ease) 3; }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px rgba(46, 155, 98, .2); } }

/* ---------- หัวเว็บ ---------- */
.nav { position: sticky; top: 0; z-index: 30; background: rgba(248, 251, 248, .92); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; gap: 18px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand img { width: 44px; height: 44px; }
.wm { display: flex; flex-wrap: wrap; column-gap: 6px; line-height: 1.05; font-family: 'Poppins', sans-serif; font-size: 22px; max-width: 200px; }
.wm b { font-weight: 700; } .wm .r { color: var(--red); } .wm .g { color: var(--green); }
.wm small { flex-basis: 100%; font-size: 9.5px; letter-spacing: .28em; color: var(--muted); font-weight: 600; margin-top: 3px; white-space: nowrap; }
.menu { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.menu > a { padding: 8px 12px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15.5px; white-space: nowrap; }
.menu > a:hover { background: var(--green-soft); }
.menu > a[aria-current="page"] { background: var(--green); color: #fff; }
.menu-cta { display: none; }
.nav-cta { display: flex; gap: 8px; }
.burger { display: none; margin-left: auto; width: 46px; height: 46px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; color: var(--green); place-items: center; cursor: pointer; }
.burger .i { width: 24px; height: 24px; }
@media (max-width: 1080px) {
  .nav-cta .btn-ghost { display: none; }
}
@media (max-width: 920px) {
  .burger { display: grid; }
  .nav-cta { display: none; }
  /* เมนูมือถือเต็มจอใต้หัวเว็บ — .nav มี backdrop-filter ทำให้ fixed อิงกรอบ .nav จึงกำหนดความสูงเองแทน bottom: 0 */
  .menu { position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch; background: #fff; padding: 12px 16px 20px; gap: 2px;
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: .25s var(--ease); height: calc(100vh - 72px); height: calc(100dvh - 72px); overflow: auto; overscroll-behavior: contain; }
  .menu > a { padding: 12px 14px; font-size: 17px; }
  .menu-cta { display: grid; gap: 8px; margin-top: 10px; }
  .menu-open .menu { transform: none; opacity: 1; visibility: visible; }
  .wm { font-size: 19px; }
}

/* ---------- หัวข้อของส่วน ---------- */
.sec { padding: clamp(56px, 8vw, 104px) 0; position: relative; }
.sec-head { max-width: 760px; margin: 0 auto clamp(28px, 4vw, 48px); text-align: center; }
.sec-head p { color: var(--muted); font-size: 18px; margin: 0; }
.sec-head.is-h1 h1 { font-size: clamp(32px, 5vw, 52px); color: var(--green-ink); }
main > .sec:first-child:has(.is-h1) { background: radial-gradient(60% 50% at 100% 0%, #FDE9E9 0, transparent 60%), radial-gradient(60% 50% at 0% 0%, var(--green-soft) 0, transparent 60%); }
.sec-head.light h2, .sec-head.light p { color: #fff; }
.sec-head.light p { opacity: .85; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: var(--green); border: 1.5px solid var(--green-soft);
  padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: 14.5px; margin-bottom: 18px; }
.eyebrow .i { color: var(--gold); fill: var(--gold); stroke: var(--gold-ink); stroke-width: 1; }
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); }
.page-hero { padding: clamp(44px, 7vw, 84px) 0 clamp(24px, 4vw, 40px); background:
  radial-gradient(60% 120% at 100% 0%, #FDE9E9 0, transparent 55%), radial-gradient(70% 120% at 0% 0%, var(--green-soft) 0, transparent 60%), var(--paper); text-align: center; }
.page-hero .lead { max-width: 720px; margin: 0 auto; }
.rv { opacity: 0; transform: translateY(20px); transition: opacity .55s var(--ease), transform .55s var(--ease); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; } * { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--cream); isolation: isolate; }
.hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 78% 40%; z-index: -2; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(251, 248, 240, .97) 0%, rgba(251, 248, 240, .9) 34%, rgba(251, 248, 240, .35) 56%, rgba(251, 248, 240, 0) 70%); }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 32px; align-items: end; min-height: min(760px, 88vh); padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(70px, 9vw, 120px); }
.hero-copy { align-self: center; max-width: 600px; }
.hero h1 { color: var(--green-ink); font-size: clamp(36px, 5.6vw, 64px); margin-bottom: 18px; text-wrap: wrap; }
.nw { white-space: nowrap; }
.hero .lead { color: #2F4237; max-width: 540px; margin-bottom: 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.claim-note { margin: 14px 0 0; font-size: 14px; line-height: 1.6; opacity: .78; max-width: 62ch; }
.bento-stats + .claim-note { margin: 16px 0 24px; color: #fff; opacity: .85; }
.hero-free { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 9px 16px; border-radius: 999px;
  border: 1.5px dashed var(--green); background: rgba(255,255,255,.85); color: var(--green); font-weight: 700; font-size: 15px; text-decoration: none; }
.hero-free:hover { background: #fff; }
.hero-free svg { width: 18px; height: 18px; flex: none; }
.hero-trust { display: flex; align-items: center; gap: 8px; margin-top: 22px; color: var(--green); font-weight: 600; font-size: 15px; }
.try-card { justify-self: end; width: min(420px, 100%); background: rgba(255, 255, 255, .96); border-radius: 24px; padding: 20px; box-shadow: var(--shadow-lg);
  border: 1.5px solid #fff; backdrop-filter: blur(6px); }
.try-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.try-top b { color: var(--red); font-size: 17px; }
.try-hint { color: var(--muted); font-size: 14.5px; margin: 4px 0 14px; }
.try-done { display: grid; gap: 10px; text-align: center; }
.try-done b { font-size: 22px; color: var(--green); }
.try-done p { color: var(--muted); font-size: 14.5px; margin: 0; }
.hero .wave { position: absolute; bottom: -1px; left: 0; width: 100%; height: 60px; fill: var(--paper); }
.hero-more { display: flex; gap: 12px; flex-wrap: wrap; padding-bottom: 80px; margin-top: -60px; }
.hero-chip { display: flex; gap: 10px; align-items: center; background: #fff; border-radius: 16px; padding: 8px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.hero-chip img { width: 72px; height: 44px; object-fit: cover; border-radius: 10px; }
.hero-chip small, .hero-chip em { display: block; font-size: 13px; color: var(--muted); font-style: normal; }
@media (max-width: 860px) {
  .hero::before { background: linear-gradient(180deg, rgba(251, 248, 240, .96) 0%, rgba(251, 248, 240, .85) 40%, rgba(251, 248, 240, 0) 66%); }
  .hero-bg img { object-position: 50% 100%; }
  .hero-in { grid-template-columns: 1fr; min-height: 0; padding-top: 36px; padding-bottom: 72px; gap: 22vh; }
  .try-card { justify-self: stretch; }
  .hero h1 { font-size: clamp(34px, 9vw, 46px); }
}

/* ---------- เกมฟังแล้วพิมพ์ ---------- */
.tg { position: relative; }
.tg-top { display: flex; gap: 10px; align-items: center; justify-content: space-between; font-size: 14.5px; color: var(--muted); min-height: 28px; flex-wrap: wrap; }
.tg-score { font-family: 'Poppins'; font-weight: 600; color: var(--green); }
.combo { background: var(--gold); color: #3A2900; font-family: 'Poppins'; font-weight: 700; font-size: 13px; padding: 3px 10px; border-radius: 999px; animation: pop .35s var(--ease); }
@keyframes pop { 0% { transform: scale(.6); } 70% { transform: scale(1.15); } }
.tg-flash { position: absolute; left: 50%; top: 40px; transform: translate(-50%, 8px) scale(.8); opacity: 0; pointer-events: none; z-index: 3;
  font-family: 'Poppins'; font-weight: 800; font-size: 30px; color: var(--red); text-shadow: 0 2px 0 #fff, 0 6px 18px rgba(214, 40, 40, .3); transition: .3s var(--ease); white-space: nowrap; }
.tg-flash.on { opacity: 1; transform: translate(-50%, -6px) scale(1); }
.tg-flash.p { color: var(--gold-ink); }
.slots { display: flex; flex-wrap: wrap; gap: 10px 8px; margin: 14px 0; justify-content: center; min-height: 64px; }
.slot { display: grid; justify-items: center; gap: 2px; }
.sl-word { font-family: 'Poppins'; font-weight: 600; font-size: 22px; letter-spacing: .14em; color: #9FB3A7; padding: 4px 6px 2px; border-radius: 10px; min-width: 2.2em; text-align: center; transition: background-color .2s, color .2s; }
.slot.now .sl-word { background: #FFF6DB; color: var(--gold-ink); box-shadow: inset 0 -3px 0 var(--gold); }
.slot.ok .sl-word { color: var(--green); letter-spacing: 0; background: var(--green-soft); }
.slot.hinted .sl-word { color: var(--muted); letter-spacing: 0; background: #F1F3F2; }
.sl-role { font-size: 11.5px; font-weight: 600; padding: 0 8px; border-radius: 999px; line-height: 1.7; }
/* สีบทบาทในประโยค ตามภาพที่ลูกค้าเลือก: ประธานแดง · กริยาชมพู · กรรมน้ำเงิน · ขยายเขียว · เติมเต็มม่วง · เชื่อมเทา */
.r-subj { --c: #D62839; } .r-verb { --c: #E0457B; } .r-obj { --c: #2F6FE4; } .r-mod { --c: #12925A; } .r-comp { --c: #8B5CF6; } .r-conj { --c: #6B7785; }
.sl-role { color: var(--c, var(--muted)); background: color-mix(in srgb, var(--c, #888) 11%, #fff); }
.legend { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; }
.legend span { color: var(--c); background: color-mix(in srgb, var(--c) 11%, #fff); padding: 1px 10px; border-radius: 999px; font-weight: 600; }
.tg-input, .try-input { width: 100%; font-size: 20px; padding: 12px 16px; border-radius: 14px; border: 2px solid var(--line); background: #fff; font-family: 'Poppins', var(--font); }
.tg-input:focus { border-color: var(--green-2); outline: none; box-shadow: 0 0 0 4px rgba(46, 155, 98, .15); }
.tg-input.off { border-color: #F2A3A3; }
.shake { animation: shake .36s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.tg-th { text-align: center; color: var(--muted); margin: 10px 0 0; }
.tg-tools { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
.tool { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 12px; cursor: pointer; font-size: 14.5px; color: var(--ink); }
.tool:hover { border-color: var(--green-2); background: var(--green-soft); }
.tool .i { color: var(--green); }
.tool kbd { font-size: 10.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 0 4px; font-family: 'Poppins'; }
@media (max-width: 600px) { .tool kbd { display: none; } }
.tg-answer { background: var(--green-soft); border-radius: 18px; padding: 16px; margin-top: 12px; display: grid; gap: 10px; }
.ans-sent { display: flex; gap: 10px; align-items: center; font-size: 22px; font-weight: 600; }
.ans-th { margin: 0; } .ans-note, .ans-hard { margin: 0; color: var(--muted); font-size: 15px; }
.tg-answer .btn { justify-self: start; }
.tg-sum { text-align: center; display: grid; gap: 14px; justify-items: center; }
.sum-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; width: 100%; }
.sum-grid div { background: #fff; border: 1.5px solid var(--line); border-radius: 16px; padding: 12px 6px; }
.sum-grid b { display: block; font-family: 'Poppins'; font-size: 26px; color: var(--green); }
.sum-grid span { font-size: 14px; color: var(--muted); }
.sum-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
@media (max-width: 520px) { .sum-grid { grid-template-columns: repeat(2, 1fr); } }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 12px; margin: 3px; cursor: pointer; font-family: 'Poppins', var(--font); }
.chips { display: flex; flex-wrap: wrap; }

/* คำที่กดได้ */
.clk .w { border: 0; background: none; padding: 0 1px; cursor: pointer; font: inherit; color: inherit; border-bottom: 2px dotted color-mix(in srgb, var(--c, #aaa) 55%, transparent); border-radius: 2px; }
.clk .w:hover { background: color-mix(in srgb, var(--c, #888) 12%, #fff); }
.wpop { position: absolute; z-index: 60; background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); padding: 14px 16px; width: 240px; border: 1px solid var(--line); animation: pop .25s var(--ease); }
.wpop b { font-size: 20px; font-family: 'Poppins'; margin-right: 6px; }
.wpop p { margin: 6px 0 10px; }
.pos { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--green-soft); color: var(--green); }
.p-v { background: var(--red-soft); color: var(--red-ink); } .p-adj { background: #FFF3D6; color: var(--gold-ink); } .p-pron { background: #E6EFFB; color: #1D5FB4; }

/* ---------- Bento (ทำไมเลือกเรา) ---------- */
.sec-green { background: var(--green); color: #fff; overflow: hidden; }
.bento-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); border-radius: var(--radius); padding: 20px 22px; display: grid; align-content: end; min-height: 150px; grid-column: span 3; }
.stat-0 { grid-row: span 2; background: var(--red); border-color: var(--red); min-height: 314px; }
.stat-3, .stat-4 { background: rgba(255, 255, 255, .96); color: var(--green-ink); } .stat-3 small, .stat-4 small { color: var(--muted); opacity: 1; }
.stat b { font-family: 'Poppins'; font-weight: 700; font-size: clamp(40px, 6vw, 64px); line-height: 1; }
.stat-0 b { font-size: clamp(72px, 12vw, 140px); }
.stat span { font-size: 20px; font-weight: 700; margin-top: 6px; }
.stat small { opacity: .8; font-size: 14.5px; }
.features-grid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 14px; }
@media (min-width: 901px) {
  .features-grid[style*="--cols:3"] { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .features-grid[style*="--cols:3"] > .feature { grid-column: span 2; }
  .features-grid[style*="--cols:3"] > .feature:nth-child(3n+1):nth-last-child(2),
  .features-grid[style*="--cols:3"] > .feature:nth-child(3n+1):nth-last-child(2) + .feature { grid-column: span 3; }
  .features-grid[style*="--cols:3"] > .feature:nth-child(3n+1):last-child { grid-column: 1 / -1; }
}
.feature { display: flex; gap: 14px; background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); color: var(--ink); }
.feature h3 { font-size: 18px; margin-bottom: 4px; }
.feature p { margin: 0; color: var(--muted); font-size: 15.5px; }
.feature-icon { width: 46px; height: 46px; border-radius: 14px; background: var(--red-soft); color: var(--red); display: grid; place-items: center; flex: none; }
.feature-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.on-dark .feature { background: rgba(255, 255, 255, .97); }
.leaves { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.leaves svg { position: absolute; width: 180px; height: 180px; fill: rgba(255, 255, 255, .07); stroke: none; }
.leaves svg:nth-child(1) { right: -40px; top: 20px; transform: rotate(18deg); }
.leaves svg:nth-child(2) { left: -50px; bottom: 30px; width: 240px; height: 240px; transform: rotate(-24deg); }
.leaves svg:nth-child(3) { right: 22%; bottom: -60px; width: 140px; height: 140px; transform: rotate(40deg); }
.sec-green .wrap { position: relative; z-index: 1; }
@media (max-width: 900px) {
  .bento-stats { grid-template-columns: repeat(2, 1fr); }
  .stat { grid-column: span 1; min-height: 120px; }
  .stat-0 { grid-column: span 2; grid-row: auto; min-height: 170px; }
  .features-grid { grid-template-columns: 1fr; }
}
@media (min-width: 601px) and (max-width: 900px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- 7 ส่วนต่อวัน ---------- */
.sec-leaves { background: url('/img/bg-leaves.webp') center / cover no-repeat, var(--cream); }
.steps-head { max-width: 680px; margin: 0 auto 36px; text-align: center; }
.steps-head p { color: var(--muted); font-size: 18px; }
.parts { list-style: none; padding: 0; margin: 0 0 28px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; counter-reset: p; }
.parts li { background: #fff; border-radius: 22px; padding: 18px 14px; box-shadow: var(--shadow); display: grid; gap: 6px; position: relative; transition-delay: calc(var(--i) * 60ms); }
.part-no { position: absolute; top: -12px; left: 14px; width: 30px; height: 30px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-family: 'Poppins'; font-weight: 700; font-size: 14px; box-shadow: 0 4px 10px -2px rgba(214, 40, 40, .5); }
.part-ic { width: 44px; height: 44px; border-radius: 14px; background: var(--green-soft); color: var(--green); display: grid; place-items: center; margin-top: 8px; }
.part-ic .i { width: 24px; height: 24px; }
.parts b { font-size: 17px; } .parts small { color: var(--muted); font-size: 14px; line-height: 1.5; }
.parts li:nth-child(4) { background: var(--green); color: #fff; } .parts li:nth-child(4) small { color: rgba(255, 255, 255, .85); }
.parts li:nth-child(4) .part-ic { background: rgba(255, 255, 255, .15); color: #fff; }
#seven .btn, .steps-head .btn { margin-top: 6px; }
@media (max-width: 1080px) { .parts { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 640px) { .parts { grid-template-columns: repeat(2, 1fr); } .parts li:last-child { grid-column: span 2; } }

/* ---------- หลักสูตร ---------- */
.sec-cream { background: var(--cream); }
.cur { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.cur-text p { color: var(--muted); font-size: 17.5px; }
.levels { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 10px; }
.levels li { display: flex; gap: 14px; background: #fff; border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow); align-items: flex-start; }
.levels .lv { font-family: 'Poppins'; font-weight: 700; color: #fff; background: var(--green-2); border-radius: 12px; padding: 6px 10px; flex: none; font-size: 15px; }
.levels li:nth-child(2) .lv { background: var(--green); } .levels li:nth-child(3) .lv { background: var(--red); }
.levels li:nth-child(4) .lv { background: var(--red-ink); } .levels li:nth-child(5) .lv { background: #7A1414; }
.levels b { font-size: 17px; } .levels small { color: var(--muted); }
.levels .days { display: inline-block; margin-left: 8px; font-size: 14px; background: var(--green-soft); color: var(--green); padding: 0 8px; border-radius: 999px; font-weight: 600; }
.levels p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.levels .sample i { font-style: normal; }
.levels .sample span { font-weight: 600; color: var(--ink); margin-right: 6px; }
.levels q { font-family: 'Poppins'; color: var(--green-ink); }
.units { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.unit { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: 16px; padding: 12px 14px; border: 1.5px solid var(--line); }
.unit .u-no { font-family: 'Poppins'; font-weight: 700; color: var(--red); font-size: 20px; width: 34px; flex: none; }
.unit b { display: block; font-family: 'Poppins'; font-size: 15.5px; line-height: 1.3; }
.unit small, .unit .u-days { display: block; color: var(--muted); font-size: 14px; }
.unit p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.cur-units .about-pic { margin-top: 14px; }
.cur-hero { background: radial-gradient(70% 100% at 100% 0, #FDE9E9 0, transparent 60%), radial-gradient(60% 120% at 0 0, var(--green-soft) 0, transparent 60%); }
.cur-intro { text-align: center; max-width: 760px; margin: 0 auto 32px; }
.cur-intro p { color: var(--muted); font-size: 18px; }
.cur-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.cur-stats div { background: #fff; border-radius: 20px; padding: 18px; text-align: center; box-shadow: var(--shadow); }
.cur-stats b { display: block; font-family: 'Poppins'; font-size: clamp(28px, 4vw, 44px); color: var(--red); line-height: 1.1; }
.cur-stats span { color: var(--muted); font-weight: 600; }
@media (max-width: 900px) { .cur { grid-template-columns: 1fr; } .cur-stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .units { grid-template-columns: 1fr; } .cur-stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- โปรโมชัน (ห้ามครอป แสดงตามสัดส่วนจริง) ---------- */
.promo { position: relative; }
.promo-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 32px) / var(--cols, 3)); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 2px 8px; }
.promo-track::-webkit-scrollbar { display: none; }
.promo-item { scroll-snap-align: start; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.promo-item img { width: 100%; height: auto; transition: transform .4s var(--ease); }
.promo-item:hover img { transform: scale(1.03); }
.promo-nav { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }
@media (max-width: 900px) { .promo-track { grid-auto-columns: 82%; } }

/* ---------- แพ็กเกจ ---------- */
.sec-pricing { background: linear-gradient(180deg, var(--paper), #EEF6F1); }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 380px)); gap: 20px; justify-content: center; align-items: stretch; }
.plan { position: relative; background: #fff; border-radius: 28px; padding: 30px 26px; box-shadow: var(--shadow); border: 2px solid var(--line); display: flex; flex-direction: column; }
.plan h3 { font-size: 22px; color: var(--green); }
.plan-best { border-color: var(--red); box-shadow: var(--shadow-lg); }
.plan-best h3 { color: var(--red); }
.plan-badge { position: absolute; top: -14px; right: 22px; background: var(--gold); color: #3A2900; font-weight: 700; padding: 4px 14px; border-radius: 999px; font-size: 14px; }
.price { display: flex; align-items: baseline; gap: 8px; margin: 6px 0; }
.price b { font-family: 'Poppins'; font-size: 58px; line-height: 1; color: var(--ink); letter-spacing: -.02em; }
.price span { color: var(--muted); font-weight: 600; }
.was { color: var(--muted); }
.pay-note { color: var(--muted); font-size: 15px; }
.plan ul { list-style: none; padding: 0; margin: 10px 0 22px; display: grid; gap: 8px; flex: 1; }
.plan li { display: flex; gap: 10px; align-items: flex-start; }
.plan li .i { color: var(--green-2); margin-top: 4px; stroke-width: 2.6; }
.plan-best li .i { color: var(--red); }
.compare { max-width: 820px; margin: 36px auto 0; }
.compare table { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.compare caption { font-weight: 700; font-size: 20px; padding-bottom: 12px; }
.compare th, .compare td { padding: 12px 16px; text-align: center; border-bottom: 1px solid var(--line); }
.compare thead th { background: var(--green); color: #fff; }
.compare thead th.hl { background: var(--red); }
.compare tbody th { text-align: left; font-weight: 600; }
.compare td.hl { background: #FFF7F7; font-weight: 600; }
.compare .i { color: var(--green-2); stroke-width: 2.8; margin: 0 auto; }
.fine { color: var(--muted); font-size: 14px; margin-top: 10px; }
@media (max-width: 560px) { .compare th, .compare td { padding: 10px 8px; font-size: 14.5px; } .price b { font-size: 48px; } }

/* ---------- แข่งขัน + ใบประกาศ ---------- */
.compete { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.compete.pic-left .about-pic { order: -1; }
.compete-text p { color: var(--muted); font-size: 17.5px; }
.about-pic img { border-radius: 24px; box-shadow: var(--shadow-lg); width: 100%; }
.mini-board { margin-top: 22px; background: #fff; border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.mb-head { background: #16251C; color: var(--gold); font-weight: 700; padding: 10px 16px; display: flex; gap: 8px; align-items: center; }
.mb-row { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); align-items: center; }
.mb-row b { font-family: 'Poppins'; }
.mb-rank, .rank { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-family: 'Poppins'; font-weight: 700; background: var(--green-soft); color: var(--green); }
.r1 { background: var(--gold); color: #3A2900; } .r2 { background: #E3E7E5; color: #3B4740; } .r3 { background: #F2D3B8; color: #6B3B12; }
.mb-empty { padding: 14px 16px; margin: 0; color: var(--muted); font-size: 15px; }
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.about.pic-right .about-pic { order: 2; }
@media (max-width: 860px) { .compete, .about { grid-template-columns: 1fr; } .compete .about-pic { order: -1; } }

/* ---------- ใบอนุญาต / ใบรับรอง ---------- */
.creds { columns: 3 260px; column-gap: 18px; }
.cred { break-inside: avoid; margin: 0 0 18px; }
.cred img { border-radius: 14px; width: 100%; }
.cred figcaption { padding: 10px 4px 0; }
.cred b { display: block; } .cred span { display: block; color: var(--green); font-size: 14px; font-weight: 600; }
.cred p { color: var(--muted); font-size: 14.5px; margin: 4px 0 0; }

/* ---------- FAQ ---------- */
.faq-wrap { max-width: 860px; }
.faq details { background: #fff; border-radius: 18px; margin-bottom: 10px; border: 1.5px solid var(--line); transition: border-color .2s; }
.faq details[open] { border-color: var(--green-2); }
.faq summary { cursor: pointer; padding: 18px 54px 18px 20px; font-weight: 600; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%;
  background: var(--green-soft); color: var(--green); display: grid; place-items: center; font-family: 'Poppins'; font-size: 20px; transition: transform .2s; }
.faq details[open] summary::after { content: '−'; background: var(--green); color: #fff; }
.faq-a { padding: 0 20px 18px; margin: 0; color: var(--muted); }

/* ---------- CTA ---------- */
.cta-band { position: relative; overflow: hidden; background: linear-gradient(120deg, var(--red) 0%, var(--red-ink) 44%, var(--green) 44.2%, var(--green-ink) 100%); color: #fff; padding: 110px 0 90px; text-align: center; }
.cta-band .wave.top { position: absolute; top: -1px; left: 0; width: 100%; height: 60px; fill: var(--paper); }
.cta-in { position: relative; z-index: 1; display: grid; justify-items: center; gap: 18px; }
.cta-in img { width: 84px; height: 84px; background: #fff; border-radius: 24px; padding: 10px; box-shadow: var(--shadow-lg); }
.cta-band h2 { max-width: 760px; color: #fff; margin: 0; }
.cta-sub { letter-spacing: .4em; font-size: 14px; opacity: .8; margin: 0; }
.cta-soft { background: var(--cream); color: var(--ink); } .cta-soft h2 { color: var(--green-ink); }

/* ---------- ติดต่อ / โซเชียล ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.contact-note { font-size: 18px; color: var(--muted); }
.socials { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.social { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: 18px; padding: 14px; text-decoration: none; color: var(--ink); border: 1.5px solid var(--line); transition: transform .2s, border-color .2s; }
.social:hover { transform: translateY(-3px); border-color: var(--green-2); }
.social svg { width: 40px; height: 40px; flex: none; color: var(--green); }
.social svg:not(.brand-logo) { padding: 8px; background: var(--green-soft); border-radius: 12px; }
.social b { display: block; } .social small { display: block; color: var(--muted); font-size: 13.5px; word-break: break-all; }
.addr { display: flex; gap: 10px; margin-top: 18px; color: var(--muted); }
.addr svg { width: 22px; height: 22px; flex: none; color: var(--red); }
.card-form { background: #fff; border-radius: 24px; padding: clamp(20px, 3vw, 32px); box-shadow: var(--shadow); display: grid; gap: 14px; }
.card-form label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.card-form input:not([type="checkbox"]):not([type="hidden"]), .card-form select, .card-form textarea, .co-form input:not([type="checkbox"]):not([type="hidden"]) {
  width: 100%; font-size: 16px; padding: 12px 14px; border: 1.5px solid #CCD8D0; border-radius: 12px; background: #fff; }
.card-form input:focus, .card-form select:focus, .card-form textarea:focus { outline: none; border-color: var(--green-2); box-shadow: 0 0 0 4px rgba(46, 155, 98, .15); }
.check { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; font-size: 15px !important; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--green); flex: none; font-size: 16px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.msg { margin: 0; font-size: 15px; min-height: 1em; }
.msg.ok { color: var(--green); } .msg.bad { color: var(--red); font-weight: 600; }
.bad-field input, .bad-field select, .bad-field.check { border-color: var(--red) !important; color: var(--red); }
.map-wrap { margin-top: 24px; } .map { width: 100%; height: 320px; border: 0; border-radius: 20px; }
.hours { list-style: none; padding: 0; } .hours li { display: flex; justify-content: space-between; }
@media (max-width: 820px) { .contact { grid-template-columns: 1fr; } .row2 { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .socials { grid-template-columns: 1fr; } }

/* ---------- คอร์ส ---------- */
.courses { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 400px)); gap: 22px; justify-content: center; }
.course { background: #fff; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.course-pic { position: relative; display: block; }
.course-pic img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.course-pic .tag { position: absolute; top: 12px; left: 12px; background: var(--gold); color: #3A2900; font-weight: 700; padding: 3px 12px; border-radius: 999px; font-size: 14px; }
.course-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.course-body h3 { margin: 0; font-size: 21px; } .course-body h3 a { color: var(--ink); text-decoration: none; }
.course-body .en { color: var(--green); font-family: 'Poppins'; font-weight: 600; margin: 0; }
.course-body p { color: var(--muted); margin: 0; font-size: 15.5px; }
.code { align-self: flex-start; background: var(--green-soft); color: var(--green); font-family: 'Poppins'; font-weight: 700; font-size: 14px; padding: 2px 10px; border-radius: 999px; }
.course-meta { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14.5px; color: var(--muted); }
.course-meta li { display: flex; gap: 6px; align-items: center; } .course-meta .i { color: var(--green-2); }
.course-meta.big { font-size: 16px; }
.course-foot { display: grid; gap: 12px; margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--line); }
.from small { color: var(--muted); margin-right: 6px; } .from b { font-family: 'Poppins'; font-size: 30px; color: var(--red); }
.course-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.course-btns .btn { padding: 10px 12px; }
.courses.mini { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
@media (min-width: 900px) { .courses-list .course { flex-direction: row; } .courses-list .course-pic { width: 42%; flex: none; } }
.course-hero { padding: clamp(32px, 5vw, 64px) 0; background: radial-gradient(60% 100% at 0 0, var(--green-soft), transparent 60%), var(--cream); }
.ch-in { display: grid; grid-template-columns: 1.1fr .9fr; gap: 36px; align-items: center; }
.ch-in h1 { font-size: clamp(30px, 4.6vw, 48px); color: var(--green-ink); }
.ch-in .en { font-family: 'Poppins'; font-weight: 600; color: var(--red); font-size: 20px; }
.ch-pic img { border-radius: 26px; box-shadow: var(--shadow-lg); }
.ch-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.ticks { list-style: none; padding: 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; } .ticks .i { color: var(--green-2); margin-top: 5px; stroke-width: 2.6; }
.ch-gal { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; } .ch-gal img { border-radius: 16px; }
.ch-side { background: #fff; border-radius: 24px; padding: 22px; box-shadow: var(--shadow); position: sticky; top: 90px; }
.free-list { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 8px; }
.free-list a { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--ink); padding: 8px 10px; border-radius: 12px; background: var(--paper); }
.free-list small { display: block; color: var(--muted); }
.free { background: var(--red); color: #fff; font-family: 'Poppins'; font-weight: 700; font-size: 11px; padding: 2px 7px; border-radius: 6px; }
.unit-mini { padding-left: 20px; color: var(--muted); font-size: 14.5px; font-family: 'Poppins'; margin: 0; }
@media (max-width: 900px) { .ch-in, .ch-body { grid-template-columns: 1fr; } .ch-side { position: static; } }

/* ---------- บทความ ---------- */
.articles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 22px; }
.art-card { background: #fff; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); }
.art-pic img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.art-body { padding: 18px 20px; } .art-body h2 { font-size: 20px; } .art-body h2 a { color: var(--ink); text-decoration: none; }
.art-body p { color: var(--muted); font-size: 15.5px; }
.a-wrap { max-width: 800px; }
.crumbs { font-size: 14.5px; color: var(--muted); margin-bottom: 14px; } .crumbs a { color: var(--muted); }
.a-meta { color: var(--muted); font-size: 14.5px; }
.a-cover img { border-radius: 22px; width: 100%; } .a-cover { margin: 20px 0; }
.a-lead { font-size: 19px; color: #33463A; }
.a-toc { background: var(--green-soft); border-radius: 18px; padding: 16px 20px; margin: 20px 0; }
.prose h2 { font-size: 28px; margin-top: 1.4em; } .prose h3 { margin-top: 1.2em; }
.prose ul, .prose ol { padding-left: 1.3em; } .prose li { margin-bottom: .4em; }
.prose blockquote { margin: 1.2em 0; padding: 14px 20px; border-left: 4px solid var(--red); background: var(--red-soft); border-radius: 0 14px 14px 0; }
.a-cta { background: var(--cream); border-radius: 20px; padding: 20px; margin: 24px 0; text-align: center; }
.a-embed { margin-top: 32px; }
.empty-note { color: var(--muted); text-align: center; }

/* ---------- ท้ายเว็บ ---------- */
.foot { background: #10331F; color: #DDEBE2; position: relative; padding: 90px 0 28px; margin-top: 0; }
.foot .wave { position: absolute; top: -1px; left: 0; width: 100%; height: 56px; fill: var(--paper); }
.foot-in { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
/* ลิงก์ติดต่อในหน้านโยบาย — พื้นที่กดสูง 44px บนมือถือ */
.prose a.tap { display: inline-block; padding: 10px 0; line-height: 24px; }
.foot-logo { width: 170px; height: auto; object-fit: contain; background: #fff; border-radius: 18px; padding: 10px 14px; margin-bottom: 14px; }
.foot p { color: #B8CCBF; font-size: 15px; }
.foot h3 { color: #fff; font-size: 17px; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot a { color: #DDEBE2; text-decoration: none; } .foot a:hover { color: #fff; text-decoration: underline; }
.foot-contact li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.foot-contact svg { width: 18px; height: 18px; flex: none; margin-top: 4px; color: var(--gold); }
.social-row { display: flex; gap: 8px; } .social-row a { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .1); }
.social-row svg { width: 20px; height: 20px; }
.foot-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 32px; padding-top: 18px; color: #A9BFB1; }
@media (max-width: 900px) { .foot-in { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .foot-in { grid-template-columns: 1fr; } }
/* มือถือ: ลิงก์ท้ายเว็บสูงอย่างน้อย 44px ให้นิ้วกดง่าย */
@media (max-width: 700px) {
  .foot ul { gap: 0; }
  .foot ul a, .foot-bottom a { display: inline-flex; align-items: center; min-height: 44px; }
  .foot-contact li { align-items: center; }
  .foot-contact svg { margin-top: 0; }
}

/* ปุ่มลอย LINE / Facebook (แทน Live Chat) */
.float-contact { position: fixed; right: 16px; bottom: 16px; z-index: 40; display: grid; gap: 10px; }
.fl { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 999px; padding: 6px 14px 6px 6px; box-shadow: var(--shadow-lg); text-decoration: none; color: var(--ink); font-weight: 600; font-size: 14.5px; }
.fl svg { width: 40px; height: 40px; }
@media (max-width: 700px) { .fl span { display: none; } .fl { padding: 5px; } .float-contact { bottom: 14px; right: 12px; } body:not(.is-classroom) main { padding-bottom: 40px; } }

dialog.light { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 92vh; }
dialog.light::backdrop { background: rgba(10, 30, 18, .82); }
dialog.light img { max-height: 88vh; width: auto; border-radius: 14px; }
dialog.light button { position: absolute; top: 6px; right: 6px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; font-size: 24px; cursor: pointer; }

/* ---------- สมัคร / เข้าสู่ระบบ ---------- */
.auth { padding: clamp(28px, 5vw, 64px) 0; background: radial-gradient(60% 80% at 100% 0, #FDE9E9, transparent 60%), radial-gradient(60% 80% at 0 100%, var(--green-soft), transparent 60%); }
.auth-in { display: grid; grid-template-columns: .9fr 1.1fr; gap: 28px; align-items: center; max-width: 1040px; }
.auth-side { position: relative; border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-lg); }
.auth-side img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 75%; }
.auth-side-text { position: absolute; left: 0; right: 0; top: 0; padding: 26px; background: linear-gradient(180deg, rgba(251, 248, 240, .97), rgba(251, 248, 240, 0)); display: grid; gap: 4px; }
.auth-side-text b { font-size: 26px; color: var(--green-ink); } .auth-side-text span { color: #33463A; }
.auth-form h1 { font-size: 34px; color: var(--green-ink); margin: 0; }
.parent { border: 1.5px dashed #CCD8D0; border-radius: 16px; padding: 12px 14px 14px; display: grid; gap: 10px; margin: 0; }
.parent legend { font-weight: 600; font-size: 14.5px; color: var(--red); padding: 0 6px; }
.swap { text-align: center; margin: 0; }
@media (max-width: 820px) { .auth-in { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* ---------- พื้นที่ผู้เรียน ---------- */
.member { padding: 28px 0 64px; }
.member-in { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start; }
.member-nav { background: #fff; border-radius: 24px; padding: 14px; box-shadow: var(--shadow); position: sticky; top: 88px; }
.hello { display: flex; gap: 10px; align-items: center; padding: 8px 10px 14px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.hello .i { width: 40px; height: 40px; padding: 8px; background: var(--green-soft); color: var(--green); border-radius: 50%; }
.hello small { display: block; color: var(--muted); font-family: 'Poppins'; font-size: 12.5px; }
.member-nav nav { display: grid; gap: 2px; }
.member-nav a, .member-nav .linklike { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--ink); font-size: 15.5px; text-align: left; }
.member-nav a:hover, .member-nav .linklike:hover { background: var(--green-soft); }
.member-nav a[aria-current="page"] { background: var(--green); color: #fff; }
.member-nav .i { color: inherit; }
.my-title { font-size: clamp(26px, 3.4vw, 36px); color: var(--green-ink); }
.my-h2 { font-size: 21px; margin: 28px 0 14px; }
.upgrade { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; background: #FFF8E8; border: 1.5px solid #F4D58D; border-radius: 22px; padding: 18px 22px; margin-bottom: 22px; }
.upgrade b { color: #5B3F00; } .upgrade p { margin: 2px 0 10px; color: #6C5626; font-size: 15px; }
.countdown { height: 10px; background: #F3E6C4; border-radius: 999px; overflow: hidden; max-width: 340px; }
.countdown span { display: block; height: 100%; background: linear-gradient(90deg, #C99412, var(--gold)); border-radius: inherit; }
.upgrade .left { display: block; margin-top: 6px; color: #8A5F00; }
.upgrade-cta { display: grid; gap: 6px; justify-items: end; text-align: right; } .upgrade-cta small { color: #6C5626; }
.upgrade.expired { background: var(--red-soft); border-color: #F3B4B4; }
@media (max-width: 640px) { .upgrade { grid-template-columns: 1fr; } .upgrade-cta { justify-items: stretch; text-align: left; } }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { background: #fff; border-radius: 20px; padding: 16px; box-shadow: var(--shadow); display: grid; gap: 2px; }
.kpi .i { width: 30px; height: 30px; color: var(--red); }
.kpi b { font-family: 'Poppins'; font-size: 30px; line-height: 1.2; } .kpi span { color: var(--muted); font-size: 14px; }
@media (max-width: 760px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.my-courses { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.my-course { background: #fff; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.mc-pic img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.mc-body { padding: 16px 18px 18px; display: grid; gap: 6px; }
.mc-body h3 { font-size: 18px; margin: 0; } .mc-body p { margin: 0; }
.bar { height: 10px; background: #E5EEE8; border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--green-2); border-radius: inherit; transition: width .6s var(--ease); }
.pct { font-family: 'Poppins'; font-weight: 700; color: var(--green-2); font-size: 15px; } .pct.low { color: #A07400; }
.mc-body dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: 14px; margin: 4px 0 8px; color: var(--muted); }
.mc-body dd { margin: 0; color: var(--ink); text-align: right; }
.empty-card { background: #fff; border-radius: 24px; padding: 36px 24px; text-align: center; box-shadow: var(--shadow); display: grid; justify-items: center; gap: 6px; }
.empty-card > .i { width: 48px; height: 48px; color: var(--green-2); }
.review-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.review-list a { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: 16px; padding: 12px 14px; text-decoration: none; color: var(--ink); border: 1.5px solid var(--line); }
.review-list .i { color: var(--red); width: 26px; height: 26px; } .review-list small { display: block; color: var(--muted); }
.my-links { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.tile { background: var(--green); color: #fff; border-radius: 20px; padding: 18px; text-decoration: none; display: grid; gap: 2px; }
.tile .i { width: 28px; height: 28px; color: var(--gold); } .tile small { opacity: .85; }
.tile + .tile { background: var(--red); }
.notice { display: flex; gap: 12px; align-items: flex-start; background: #EEF5FF; border: 1.5px solid #CFE0F7; border-radius: 16px; padding: 12px 16px; margin: 14px 0; font-size: 15.5px; }
.notice.ok { background: var(--green-soft); border-color: #BFE0CC; } .notice .i { margin-top: 3px; color: var(--green); }
.notice p { margin: 4px 0 10px; }
.pill { display: inline-block; font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: #EEF1EF; color: var(--muted); white-space: nowrap; }
.pill.ok { background: var(--green-soft); color: var(--green); } .pill.warn { background: #FFF1D6; color: #8A5F00; } .pill.bad { background: var(--red-soft); color: var(--red-ink); }
.table-wrap { overflow-x: auto; background: #fff; border-radius: 18px; box-shadow: var(--shadow); }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th, .tbl td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th { background: #F1F6F3; font-weight: 600; }
.tbl a { display: inline-flex; gap: 4px; align-items: center; }
.memberships { display: grid; gap: 10px; }
.ms { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr auto; gap: 10px; align-items: center; background: #fff; border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow); }
.ms.off { opacity: .7; }
@media (max-width: 700px) { .ms { grid-template-columns: 1fr; } }
.plan-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.pp { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #fff; border: 2px solid var(--line); border-radius: 16px; padding: 14px 16px; text-decoration: none; color: var(--ink); }
.pp:hover { border-color: var(--red); } .pp span { color: var(--red); font-weight: 700; margin-left: auto; }
.pay-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.pay-list li { display: flex; justify-content: space-between; gap: 12px; background: #fff; border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow); }
.pay-list small { display: block; color: var(--muted); } .pay-list .r { display: grid; justify-items: end; gap: 4px; }
.reply { display: flex; gap: 6px; color: var(--red-ink); font-size: 14.5px; margin: 6px 0 0; }
.certs { display: grid; gap: 12px; }
.cert-card { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; background: #fff; border-radius: 20px; padding: 16px 18px; box-shadow: var(--shadow); }
.cert-card > .i { width: 40px; height: 40px; color: var(--muted); } .cert-card.ok > .i { color: var(--gold-ink); }
.cert-card span { display: block; color: var(--muted); font-size: 14.5px; margin-bottom: 6px; }
@media (max-width: 600px) { .cert-card { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .member-in { grid-template-columns: 1fr; }
  .member-nav { position: static; padding: 8px; }
  .member-nav nav { display: flex; overflow-x: auto; gap: 6px; scrollbar-width: none; }
  .member-nav a, .member-nav .linklike { white-space: nowrap; padding: 8px 12px; font-size: 14.5px; }
  .hello { border: 0; padding-bottom: 6px; margin: 0; }
  .my-links { grid-template-columns: 1fr; }
}

/* ---------- ชำระเงิน ---------- */
.co-in { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.co-main h1 { font-size: clamp(24px, 3vw, 32px); color: var(--green-ink); margin: 0; }
.co-steps { padding-left: 1.2em; margin: 0; color: var(--muted); display: grid; gap: 2px; } .co-steps b { color: var(--ink); }
.pay-box { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; background: var(--paper); border-radius: 20px; padding: 18px; border: 1.5px solid var(--line); }
.qr { background: #fff; padding: 12px; border-radius: 16px; width: 244px; height: 244px; display: grid; place-items: center; box-shadow: var(--shadow); }
.qr img, .qr canvas { width: 220px !important; height: 220px !important; }
.pp-name { text-align: center; font-size: 14px; color: var(--muted); margin: 6px 0 0; }
.qr-empty { width: 220px; text-align: center; color: var(--muted); font-size: 14.5px; } .qr-empty .i { width: 40px; height: 40px; color: var(--green-2); margin: 0 auto 8px; }
.bank p { margin: 0 0 8px; } .bank small { display: block; color: var(--muted); font-size: 13.5px; }
.copy { cursor: pointer; border-bottom: 1px dashed currentColor; font-family: 'Poppins'; } .copy.copied::after { content: ' คัดลอกแล้ว'; color: var(--green); font-size: 13px; }
.amount b { font-family: 'Poppins'; font-size: 34px; color: var(--red); }
.co-form { display: grid; gap: 14px; }
.inline { display: flex; gap: 8px; } .inline input { flex: 1; }
.policy { background: var(--paper); border-radius: 14px; padding: 10px 14px; } .policy summary { cursor: pointer; font-weight: 600; }
.policy div { color: var(--muted); font-size: 14.5px; margin-top: 8px; }
.co-sum { background: #fff; border-radius: 24px; padding: 22px; box-shadow: var(--shadow); position: sticky; top: 88px; }
.co-sum h2 { font-size: 20px; }
.co-course { display: grid; gap: 8px; margin-bottom: 14px; } .co-course img { border-radius: 14px; }
.co-sum dl { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; margin: 0; }
.co-sum dd { margin: 0; font-family: 'Poppins'; text-align: right; }
.co-sum .tot { font-weight: 700; font-size: 19px; border-top: 1.5px solid var(--line); padding-top: 8px; color: var(--red); }
.co-feat { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 6px; font-size: 14.5px; }
.co-feat li { display: flex; gap: 8px; } .co-feat .i { color: var(--green-2); margin-top: 4px; }
@media (max-width: 900px) { .co-in { grid-template-columns: 1fr; } .co-sum { position: static; order: -1; } .pay-box { grid-template-columns: 1fr; justify-items: center; text-align: center; } }

/* ---------- ตารางแข่งขัน ---------- */
.board-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.seg { display: inline-flex; background: #fff; border: 1.5px solid var(--line); border-radius: 999px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.seg a, .seg button { border: 0; background: none; padding: 6px 14px; border-radius: 999px; text-decoration: none; color: var(--ink); cursor: pointer; font-weight: 500; }
.seg [aria-current="true"], .seg [aria-selected="true"] { background: #16251C; color: var(--gold); }
.board { background: #fff; border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; }
.b-head { background: #16251C; color: #fff; padding: 12px 18px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.b-head b { color: var(--gold); } .b-head span { opacity: .8; font-size: 14px; }
.board-tbl { font-family: var(--font); } .board-tbl tr.me td { background: #FFF8E3; font-weight: 600; }
.board .tbl { white-space: nowrap; } .board { overflow-x: auto; }
.gap { padding: 14px 18px; margin: 0; display: flex; gap: 8px; align-items: center; color: #8A5F00; }
.board-note { margin: 18px auto 0; max-width: 640px; text-align: center; background: #FFF1EF; color: var(--red); border-radius: 14px; padding: 14px 18px; font-size: 18px; font-weight: 600; line-height: 1.6; }
.board-note span { display: block; font-size: 16px; font-weight: 500; }
.empty-row { text-align: center !important; color: var(--muted); white-space: normal !important; }
.winners { margin-bottom: 26px; } .win-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.win { background: #fff; border-radius: 20px; padding: 16px; box-shadow: var(--shadow); display: grid; gap: 2px; text-align: center; justify-items: center; }
.win .i { width: 34px; height: 34px; color: var(--gold-ink); } .win span { color: var(--muted); font-size: 14px; } .win b { font-size: 19px; }

/* ---------- เอกสาร: ใบประกาศ / ใบเสร็จ ---------- */
.doc main { background: #E9EFEB; min-height: 70vh; padding: 24px 0 56px; }
.doc-tools { display: flex; justify-content: center; gap: 10px; margin: 0 auto 18px; flex-wrap: wrap; }
.doc-stage { overflow-x: auto; padding: 0 12px; }
.certificate { position: relative; width: 1050px; height: 742px; margin: 0 auto; background: #fff; padding: 56px 80px; text-align: center; font-family: var(--font);
  background-image: radial-gradient(60% 60% at 100% 0, #FDECEC, transparent 60%), radial-gradient(60% 60% at 0 100%, #E7F3EC, transparent 60%); box-shadow: var(--shadow-lg); }
.c-border { position: absolute; inset: 18px; border: 3px solid var(--green); border-radius: 18px; pointer-events: none; }
.c-border::after { content: ''; position: absolute; inset: 8px; border: 1.5px solid var(--gold); border-radius: 12px; }
.c-logo { width: 150px; margin: 0 auto 4px; }
.c-kicker { letter-spacing: .4em; color: var(--red); font-family: 'Poppins'; font-weight: 600; font-size: 14px; margin: 0; }
.certificate h1 { font-size: 44px; color: var(--green-ink); margin: 4px 0 10px; }
.certificate p { margin: 4px 0; font-size: 18px; }
.c-name { font-size: 40px !important; font-weight: 700; color: var(--red); border-bottom: 2px solid var(--gold); display: inline-block; padding: 0 30px 4px; margin: 8px 0 !important; }
.c-course { font-size: 24px !important; font-weight: 700; color: var(--green); } .c-course small { display: block; font-family: 'Poppins'; font-size: 16px; color: var(--muted); font-weight: 500; }
.c-sign { display: flex; justify-content: space-around; margin-top: 30px; } .c-sign div { display: grid; gap: 2px; min-width: 260px; }
.c-sign .line { display: block; height: 1px; background: var(--ink); margin-bottom: 6px; } .c-sign small { color: var(--muted); }
.c-no { font-family: 'Poppins'; font-size: 13px !important; color: var(--muted); margin-top: 18px !important; }
.c-note { font-size: 12px !important; color: var(--muted); max-width: 760px; margin: 4px auto 0 !important; }
.receipt { width: 794px; min-height: 900px; margin: 0 auto; background: #fff; padding: 48px 56px; box-shadow: var(--shadow-lg); }
.receipt header { display: flex; justify-content: space-between; align-items: center; border-bottom: 3px solid var(--green); padding-bottom: 16px; }
.receipt header img { width: 150px; } .receipt h1 { font-size: 30px; color: var(--green-ink); margin: 0; text-align: right; }
.receipt header p { text-align: right; letter-spacing: .3em; color: var(--muted); margin: 0; }
.r-meta { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; margin: 24px 0; font-size: 15px; }
.r-meta p { margin: 2px 0; color: var(--muted); } .r-meta dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; } .r-meta dd { margin: 0; }
.receipt table { width: 100%; border-collapse: collapse; } .receipt th, .receipt td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; }
.receipt td:last-child, .receipt th:last-child { text-align: right; font-family: 'Poppins'; }
.receipt thead th { background: var(--green-soft); } .receipt tfoot th { font-size: 20px; color: var(--red); border-bottom: 3px double var(--ink); }
.r-note { color: var(--muted); font-size: 14px; margin-top: 24px; }
@media print { .doc-tools, .nav, .foot, .float-contact { display: none !important; } .doc main { background: #fff; padding: 0; } .certificate, .receipt { box-shadow: none; } }

/* ---------- ห้องเรียน ---------- */
.is-classroom { background: #F1F6F3; }
.classroom { display: grid; grid-template-columns: 300px minmax(0, 1fr); grid-template-rows: auto 1fr; min-height: 100vh; background: #F1F6F3; }
.cr-top { grid-column: 1 / -1; position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #16251C; color: #fff; }
.cr-top .round { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); color: #fff; width: 40px; height: 40px; }
.cr-top .round:hover { background: rgba(255, 255, 255, .18); }
.cr-brand img { background: #fff; border-radius: 10px; padding: 3px; }
.cr-title { min-width: 0; flex: 1; display: grid; line-height: 1.35; }
.cr-title h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 16.5px; margin: 0; color: #fff; line-height: 1.35; }
.cr-title > span { font-size: 13.5px; color: #B9CEC1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-title em { font-style: normal; font-family: 'Poppins'; font-weight: 700; color: var(--gold); letter-spacing: .03em; }
.cr-title .now { color: #8FE0B3; }
.cr-arrows { display: flex; gap: 6px; }
.cr-pct { display: flex; align-items: center; gap: 8px; width: 160px; } .cr-pct .bar { flex: 1; background: rgba(255, 255, 255, .15); height: 8px; }
.cr-pct b { font-family: 'Poppins'; font-size: 14px; }
.toc { background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 60px; height: calc(100vh - 60px); overflow: hidden; }
.toc-head { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 8px; font-size: 14.5px; }
.toc-head span { color: var(--muted); font-family: 'Poppins'; }
.toc-list { overflow-y: auto; flex: 1; padding: 6px 8px 12px; }
.toc-level summary { cursor: pointer; font-weight: 700; padding: 10px 8px; position: sticky; top: 0; background: #fff; z-index: 1; font-size: 15px; }
.toc-level summary small { color: var(--muted); font-weight: 400; font-family: 'Poppins'; font-size: 12px; }
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc-unit { font-size: 12.5px; color: var(--red); font-weight: 700; padding: 10px 8px 4px; font-family: 'Poppins'; }
.toc a { display: flex; gap: 8px; align-items: flex-start; padding: 7px 8px; border-radius: 10px; text-decoration: none; color: var(--ink); font-size: 14px; line-height: 1.4; }
.toc a:hover { background: var(--green-soft); }
.toc a .ti { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #EEF2EF; font-family: 'Poppins'; font-size: 10.5px; color: var(--muted); font-style: normal; }
.toc a .ti i { font-style: normal; }
.toc a.done .ti { background: var(--green-2); color: #fff; } .toc a.done .ti .i { width: 14px; height: 14px; stroke-width: 3; }
.toc a.locked { color: #8C9A92; } .toc a.locked .ti .i { width: 12px; height: 12px; }
.toc a.cur { background: #16251C; color: #fff; } .toc a.cur .ti { background: var(--gold); color: #3A2900; }
.toc .free { margin-left: 4px; }
.toc-fold { border: 0; border-top: 1px solid var(--line); background: #fff; color: var(--red); padding: 12px; cursor: pointer; display: flex; gap: 6px; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; }
.toc-closed { grid-template-columns: 0 minmax(0, 1fr); } .toc-closed .toc { visibility: hidden; width: 0; border: 0; }
/* รอบแก้ด่วน-786: ลูกค้าขอให้เนื้อหาบทเรียนขยายเต็มพื้นที่ (เดิมจำกัด 1120/1280px เหลือขอบว่างมากบนจอใหญ่) */
.lesson { padding: 18px clamp(14px, 3vw, 36px) 40px; max-width: none; width: 100%; margin: 0; }
/* รอบแก้ด่วน-786: แท็บขั้นเรียน 1–7 ใหญ่ขึ้นและใช้สีเขียวตาม CI ให้เห็นชัด */
.parts-tabs { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.parts-tabs button { border: 2px solid var(--green); background: var(--green-soft); border-radius: 18px; padding: 12px 6px; min-height: 84px; cursor: pointer; display: grid; justify-items: center; align-content: center; gap: 2px; color: var(--green-ink); transition: border-color .2s, background-color .2s, color .2s, box-shadow .2s; }
.parts-tabs button:not([aria-selected="true"]):hover { background: #D3EBDD; }
.parts-tabs b { font-family: 'Poppins'; font-size: 28px; line-height: 1.1; color: var(--green); } .parts-tabs span { font-size: 16px; font-weight: 600; color: var(--green-ink); line-height: 1.3; text-align: center; }
.parts-tabs .done { background: #CFE8D9; border-color: var(--green-2); } .parts-tabs .done b { color: var(--green-2); }
.parts-tabs [aria-selected="true"] { border-color: var(--green-ink); background: var(--green); box-shadow: 0 6px 16px rgba(15, 107, 58, .28); }
.parts-tabs [aria-selected="true"] b, .parts-tabs [aria-selected="true"] span { color: #fff; }
@media (max-width: 700px) { .parts-tabs { grid-template-columns: repeat(7, 92px); overflow-x: auto; scrollbar-width: none; } .parts-tabs button { min-height: 74px; } .parts-tabs b { font-size: 24px; } .parts-tabs span { font-size: 14px; } }
.part-stage { background: #fff; border-radius: 24px; padding: clamp(16px, 3vw, 30px); box-shadow: var(--shadow); min-height: 360px; }
.loading { color: var(--muted); text-align: center; padding: 60px 0; }
.part-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.pno { width: 46px; height: 46px; border-radius: 14px; background: var(--red); color: #fff; display: grid; place-items: center; font-family: 'Poppins'; font-weight: 700; font-size: 22px; flex: none; }
.part-head h2 { font-size: clamp(22px, 2.6vw, 28px); margin: 0; } .part-head p { margin: 0; color: var(--muted); }
.part { display: grid; gap: 16px; }
.part .tip { background: var(--paper); border-radius: 14px; padding: 14px 18px; color: var(--ink); font-size: 20px; font-weight: 500; line-height: 1.6; margin: 0; }
@media (max-width: 719px) { .part .tip { font-size: 17px; padding: 12px 14px; } }
.part > .btn, .btn-row .btn { justify-self: start; }
.part-done { justify-self: start; margin-top: 8px; }
.part-empty { text-align: center; color: var(--muted); padding: 30px 0; display: grid; justify-items: center; gap: 8px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn-row select { padding: 10px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; min-height: 46px; }
.sub { font-size: 18px; margin: 10px 0 0; }
.cards-words { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.card-word { background: var(--paper); border-radius: 18px; padding: 10px; border: 2px solid var(--line); display: grid; gap: 8px; transition: border-color .2s; }
.card-word.hl { border-color: var(--gold); background: #FFF6DB; }
.flip { border: 0; background: #fff; border-radius: 14px; min-height: 96px; cursor: pointer; display: grid; place-items: center; box-shadow: var(--shadow); padding: 10px; }
.flip .front { font-family: 'Poppins'; font-weight: 700; font-size: 26px; color: var(--green-ink); display: grid; justify-items: center; gap: 2px; }
.flip .front .ipa { font-size: 15px; font-weight: 500; }
.flip .back { display: none; font-size: 20px; font-weight: 700; color: var(--red); }
.flipped .flip .front { display: none; } .flipped .flip .back { display: block; }
/* คำอ่าน IPA — ฟอนต์ที่มีสัญลักษณ์ IPA ครบ (ฟอนต์หลักบางตัวไม่มี ə ʊ ɚ) */
.ipa, .w-ipa { font-family: 'Noto Sans', 'Segoe UI', 'Lucida Grande', 'Arial Unicode MS', system-ui, sans-serif; font-weight: 400; color: #6B5A2E; letter-spacing: .01em; }
.wt .ipa { font-size: 13px; }
.wpop .ipa { display: inline-block; font-size: 15px; margin-right: 6px; }
.clk.with-ipa { display: inline; line-height: 2.4; }
.clk.with-ipa .w { display: inline-flex; flex-direction: column; align-items: center; vertical-align: bottom; line-height: 1.25; }
.clk.with-ipa .w-ipa { font-size: .58em; white-space: nowrap; min-height: 1.1em; }
.cw-tools { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.mic-wrap { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mic.rec { background: var(--red); color: #fff; border-color: var(--red); animation: pulse 1.2s infinite; }
.mic-out { font-size: 13.5px; font-weight: 600; } .mic-out.ok { color: var(--green); } .mic-out.mid { color: #8A5F00; } .mic-out.bad { color: var(--red); }
.word-table { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 46%), 1fr)); gap: 8px; }
.wt { display: grid; text-align: left; gap: 0; border: 1.5px solid var(--line); background: #fff; border-radius: 14px; padding: 8px 12px; cursor: pointer; }
.wt .en { font-family: 'Poppins'; font-weight: 600; color: var(--green-ink); } .wt .th { font-size: 14.5px; } .wt small { color: var(--muted); font-size: 12px; }
.wt.key { border-color: #F4D58D; background: #FFFBEF; }
.cats { font-size: 14.5px; }
.chat { display: grid; gap: 12px; }
.bubble { max-width: min(560px, 88%); background: var(--green-soft); border-radius: 20px 20px 20px 6px; padding: 12px 16px; justify-self: start; transition: box-shadow .2s, transform .2s; }
.bubble.r { justify-self: end; background: #FFF1F1; border-radius: 20px 20px 6px 20px; }
.bubble b { font-size: 13px; color: var(--muted); } .bubble .en { font-family: 'Poppins', var(--font); font-size: 19px; margin: 2px 0; font-weight: 500; }
.bubble .th { margin: 0; color: var(--muted); font-size: 15px; } .chat.no-th .th { display: none; }
.bubble.hl { box-shadow: 0 0 0 3px var(--gold); transform: scale(1.01); } .bubble.you { box-shadow: 0 0 0 3px var(--red); }
.b-tools { display: flex; gap: 6px; margin-top: 6px; align-items: center; flex-wrap: wrap; } .b-tools .round { width: 36px; height: 36px; }
.p4-top { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.sent-list { display: grid; gap: 10px; }
.sent { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; border: 1.5px solid var(--line); border-radius: 18px; padding: 12px 14px; }
.sn { width: 30px; height: 30px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: grid; place-items: center; font-family: 'Poppins'; font-weight: 700; font-size: 13px; }
.sb .clk { font-size: 19px; font-family: 'Poppins', var(--font); } .sb .th { margin: 2px 0 6px; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; } .tag { font-size: 12.5px; background: #FFF6DB; color: var(--gold-ink); padding: 2px 10px; border-radius: 999px; font-weight: 600; }
.tag.t2 { background: #E6EFFB; color: #1D5FB4; }
.sa { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
@media (max-width: 640px) { .sent { grid-template-columns: auto 1fr; } .sa { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; } }
.p4-ask { margin: 0; font-weight: 700; font-size: 17px; }
.set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 12px; margin: 14px 0 10px; }
.set-card { display: grid; gap: 4px; align-content: start; text-align: left; border: 2px solid var(--line); background: #fff; border-radius: 18px; padding: clamp(12px, 3vw, 16px); cursor: pointer; font: inherit; color: var(--ink); min-width: 0;
  transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; }
.set-card:hover { transform: translateY(-2px); border-color: var(--green-2); box-shadow: var(--shadow); }
.set-card:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.set-name { font-family: 'Poppins', var(--font); font-weight: 700; font-size: clamp(17px, 4.4vw, 20px); overflow-wrap: anywhere; color: var(--green-ink); }
.set-card small { color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.set-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); margin-top: 4px; }
.set-done { display: inline-flex; align-items: center; gap: 4px; color: var(--green); font-weight: 600; } .set-done .i { width: 15px; height: 15px; }
.set-go { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; color: var(--red); font-weight: 700; font-size: 15px; } .set-go .i { width: 16px; height: 16px; }
.set-card.all { background: var(--cream); border-color: #F1E3C6; grid-column: 1 / -1; }
.set-review { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--muted); font-size: 14.5px; margin: 0; }
.set-review .i { width: 16px; height: 16px; }
.tag.t3 { background: var(--green-soft); color: var(--green-ink); }
.p4-view { display: grid; gap: 12px; }
.p4-focus { font-weight: 500; color: var(--muted); font-size: 14.5px; }
.game-box { background: var(--paper); border-radius: 20px; padding: clamp(14px, 3vw, 24px); border: 2px solid var(--line); }
.lyrics { padding: 0; list-style: none; display: grid; gap: 6px; counter-reset: l; }
.lyrics li { padding: 10px 14px; border-radius: 14px; background: var(--paper); transition: background-color .2s, transform .2s; }
.lyrics li.hl { background: #FFF6DB; transform: translateX(6px); box-shadow: inset 4px 0 0 var(--gold); }
.lyrics .en { font-family: 'Poppins', var(--font); font-size: 19px; font-weight: 500; display: block; } .lyrics small { color: var(--muted); }
.song-game { background: var(--paper); border-radius: 20px; padding: 20px; display: grid; gap: 10px; }
.song-line { font-family: 'Poppins'; font-size: 24px; font-weight: 600; margin: 0; } .song-line .gap { color: var(--red); letter-spacing: .15em; }
.song-game .th { color: var(--muted); margin: 0; }
.story { display: grid; gap: 10px; }
.seg-line { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; padding: 12px 14px; border-radius: 16px; border: 1.5px solid var(--line); transition: background-color .2s; }
.seg-line.hl { background: #FFF6DB; border-color: #F4D58D; }
.seg-line .clk { font-size: 19px; font-family: 'Poppins', var(--font); } .seg-line .th { margin: 2px 0; color: var(--muted); } .seg-line .hard { margin: 0; font-size: 14px; color: #1D5FB4; }
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.m-col { display: grid; gap: 8px; align-content: start; }
.m-item { border: 2px solid var(--line); background: #fff; border-radius: 14px; padding: 10px 14px; cursor: pointer; text-align: left; font-size: 17px; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.m-item:not(.th) { font-family: 'Poppins'; font-weight: 600; } .m-item small { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.m-item.sel { border-color: var(--gold); background: #FFF6DB; } .m-item.ok { border-color: var(--green-2); background: var(--green-soft); color: var(--green); }
.m-item.no { border-color: var(--red); animation: shake .3s; } .m-item:disabled { cursor: default; }
.mission { background: var(--green); color: #fff; border-radius: 20px; padding: 18px 20px; } .mission h3 { color: var(--gold); }
.mission p { margin: 0 0 8px; } .mission details { margin-top: 6px; opacity: .92; } .mission summary { cursor: pointer; }
.lesson-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.btn-done { font-size: 17px; } .btn-done[aria-pressed="true"] .i { stroke-width: 3; }
.pn { display: flex; gap: 8px; flex-wrap: wrap; } .pn .btn { max-width: 340px; overflow: hidden; text-overflow: ellipsis; }
.locked-card { background: #fff; border-radius: 24px; padding: 40px 24px; text-align: center; box-shadow: var(--shadow); display: grid; justify-items: center; gap: 6px; }
.locked-card > .i { width: 48px; height: 48px; color: var(--red); }
.plans.compact { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 10px 0; }
.plan-mini { display: grid; background: var(--paper); border: 2px solid var(--line); border-radius: 16px; padding: 12px 20px; text-decoration: none; color: var(--ink); }
.plan-mini:hover { border-color: var(--red); } .plan-mini span { color: var(--red); font-family: 'Poppins'; font-weight: 700; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: #16251C; color: #fff; padding: 12px 18px; border-radius: 16px; z-index: 70; box-shadow: var(--shadow-lg); display: flex; gap: 12px; align-items: center; max-width: 92vw; animation: pop .3s var(--ease); }
.toast a { color: var(--gold); font-weight: 700; }
.classroom:fullscreen { overflow: auto; }
@media (max-width: 900px) {
  .classroom { grid-template-columns: minmax(0, 1fr); }
  .toc { position: fixed; top: 60px; left: 0; bottom: 0; width: min(320px, 86vw); height: auto; z-index: 25; box-shadow: var(--shadow-lg); transition: transform .25s var(--ease); }
  .toc-closed .toc { transform: translateX(-102%); visibility: hidden; width: min(320px, 86vw); }
  .toc-closed { grid-template-columns: minmax(0, 1fr); }
  .cr-pct { display: none; } .cr-brand { display: none; }
  .cr-title h1 { font-size: 15px; }
  .lesson { grid-column: 1 / -1; padding: 12px 12px 90px; }
  .match { grid-template-columns: 1fr 1fr; gap: 8px; } .m-item { font-size: 15px; padding: 8px 10px; }
  .lesson-foot { position: sticky; bottom: 0; background: rgba(241, 246, 243, .96); padding: 10px 0; margin: 0; flex-wrap: nowrap; }
  .pn .btn-ghost, .pn .t { display: none; }
  .lesson-foot .btn { padding: 10px 16px; font-size: 15.5px; }
}
@media (max-width: 480px) { .cr-arrows { display: none; } }

/* กันกริดถูกดันกว้างเกินจอมือถือ (เมนูเลื่อนแนวนอน / ปุ่มข้อความยาว) */
.member-in > *, .co-in > *, .ch-body > *, .cur > *, .compete > *, .contact > *, .hero-in > * { min-width: 0; }
@media (max-width: 640px) {
  .upgrade .btn, .member-main .btn, .co-main .btn, .locked-card .btn { white-space: normal; text-align: center; }
  .member-nav nav { max-width: calc(100vw - 56px); }
}

/* ---------- เข้าสู่ระบบด้วย Google / LINE ---------- */
.oauth { display: grid; gap: 8px; }
.oauth .btn { justify-content: center; gap: 10px; background: #fff; color: var(--ink); border-color: var(--line); }
.oauth .btn svg { width: 20px; height: 20px; stroke: none; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; margin: 6px 0 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.notice.bad { background: var(--red-soft); border-color: #F5C2C2; } .notice.bad .i { color: var(--red); }

/* ---------- แผงควบคุม: XP เครดิต ภารกิจ ชวนเพื่อน ---------- */
.xp-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin-top: 12px; align-items: stretch; }
.xp { background: #fff; border-radius: 20px; padding: 14px 18px; box-shadow: var(--shadow); display: grid; gap: 6px; }
.xp .bar { height: 10px; background: var(--green-soft); border-radius: 9px; overflow: hidden; } .xp .bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--green-2), var(--gold)); }
.xp small { color: var(--muted); font-size: 13.5px; }
.wallet-chip { background: #16251C; color: #fff; border-radius: 20px; padding: 12px 18px; text-decoration: none; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; }
.wallet-chip .i { grid-row: span 2; width: 30px; height: 30px; color: var(--gold); } .wallet-chip b { font-family: 'Poppins'; font-size: 22px; } .wallet-chip small { opacity: .75; font-size: 12.5px; }
.missions { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.missions li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; background: #fff; border: 1.5px solid var(--line); border-radius: 16px; padding: 10px 14px; }
.missions li.done { border-color: var(--gold); background: #FFF9E8; } .missions li.claimed { opacity: .7; }
.missions .mi { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green); }
.missions li span b { display: block; font-weight: 600; font-size: 15.5px; } .missions li span small { color: var(--muted); font-family: 'Poppins'; }
.refer { margin-top: 20px; background: var(--cream); border: 1.5px solid #EEDFC2; border-radius: 20px; padding: 16px 18px; display: grid; gap: 10px; }
.refer b { display: flex; gap: 8px; align-items: center; } .refer p { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.refer input { min-width: 0; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font-size: 16px; }
.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(170px, 46%), 1fr)); gap: 10px; }
.pack { position: relative; background: #fff; border: 2px solid var(--line); border-radius: 18px; padding: 16px; text-decoration: none; color: var(--ink); display: grid; gap: 2px; }
.pack:hover, .pack.best { border-color: var(--red); } .pack b { font-family: 'Poppins'; font-size: 20px; } .pack .bonus { color: var(--green); font-weight: 700; font-size: 14px; }
.pack .price { color: var(--red); font-weight: 700; font-family: 'Poppins'; } .pack small { color: var(--muted); font-size: 13px; }
.pack .plan-badge { position: absolute; top: -10px; right: 12px; }
td.plus { color: var(--green); font-weight: 700; font-family: 'Poppins'; } td.minus { color: var(--red); font-weight: 700; font-family: 'Poppins'; }
.ai-form { margin-top: 10px; }

/* ---------- ชุดฝึกเสริม / คำศัพท์ / วัดระดับ ---------- */
.quick-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.quick-row .tile:nth-child(3) { background: #16251C; }
.cat-chips { margin: -4px 0 16px; } .chip.on { background: #16251C; color: var(--gold); border-color: #16251C; } a.chip { text-decoration: none; color: inherit; }
.set-list { display: grid; gap: 10px; }
.set-item { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; background: #fff; border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow);
  text-decoration: none; color: var(--ink); transition: transform .2s var(--ease), box-shadow .2s; }
.set-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.set-item .si-ic { width: 46px; height: 46px; border-radius: 14px; background: var(--green-soft); color: var(--green); display: grid; place-items: center; }
.set-item .si-ic .i { width: 24px; height: 24px; } .set-item .si-b { display: grid; } .set-item .si-b small { color: var(--muted); font-size: 13.5px; } .set-item .si-b span { font-size: 15px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 46%), 1fr)); gap: 10px; margin-bottom: 18px; }
.cat { background: #fff; border: 1.5px solid var(--line); border-radius: 16px; padding: 12px 14px; text-decoration: none; color: var(--ink); display: grid; transition: border-color .2s; }
.cat:hover { border-color: var(--green-2); } .cat small { color: var(--muted); font-size: 13px; }
.practice h1 { font-size: clamp(26px, 4.5vw, 40px); } .wrap.narrow-wide { max-width: 1200px; }
.practice .crumbs { margin-bottom: 8px; }
.start-card, .placement-start, .result-card { background: #fff; border-radius: 22px; padding: 22px; box-shadow: var(--shadow); display: grid; gap: 10px; justify-items: start; }
.result-card { justify-items: center; text-align: center; } .result-card > span .i { width: 48px; height: 48px; color: var(--gold); }
.tbl-mini { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.tbl-mini div { border: 1.5px solid var(--line); border-radius: 12px; padding: 6px 12px; display: grid; text-align: center; min-width: 64px; }
.tbl-mini div.on { border-color: var(--green); background: var(--green-soft); } .tbl-mini span { font-family: 'Poppins'; }
.timer { font-family: 'Poppins'; font-weight: 700; background: #16251C; color: var(--gold); padding: 4px 14px; border-radius: 999px; }
.timer.low { background: var(--red); color: #fff; }
.fc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 46%), 1fr)); gap: 10px; }
.fc { background: var(--paper); border: 2px solid var(--line); border-radius: 18px; padding: 10px; display: grid; gap: 8px; transition: border-color .2s; }
.fc.hl { border-color: var(--gold); background: #FFF6DB; }
.fc-face { border: 0; background: #fff; border-radius: 14px; min-height: 120px; cursor: pointer; box-shadow: var(--shadow); padding: 10px; display: grid; place-items: center; text-align: center; }
.fc-front, .fc-back { display: grid; justify-items: center; gap: 2px; }
.fc-front b { font-family: 'Poppins'; font-size: 24px; color: var(--green-ink); line-height: 1.25; } .fc-front .ipa { font-size: 14px; } .fc-front small { color: var(--muted); font-size: 12.5px; }
.fc-back { display: none; } .fc-back b { color: var(--red); font-size: 19px; } .fc-back .ex { font-family: 'Poppins'; font-size: 14px; } .fc-back small { color: var(--muted); font-size: 13px; }
.fc.flipped .fc-front { display: none; } .fc.flipped .fc-back { display: grid; }
/* แก้ด่วน-781: ลูกค้าบอกตัวเล็กมองลำบาก — ขยายตัวอักษรและกล่องในตารางการ์ด (โหมดดูทั้งหมด) */
.cards-words, .fc-grid { grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 14px; }
.flip, .fc-face { min-height: 150px; }
.flip .front, .fc-front b { font-size: clamp(30px, 3.2vw, 38px); }
.flip .front .ipa, .fc-front .ipa { font-size: 19px; } .fc-front small { font-size: 16px; font-weight: 600; color: var(--gold-ink); }
.flip .back { font-size: 24px; } .fc-back b { font-size: 24px; } .fc-back .ex { font-size: 16px; } .fc-back small { font-size: 14.5px; }

/* การ์ดทีละคำ ตัวใหญ่ 1 คำ 1 หน้า กดถัดไป (ML.deck ใน game.js) */
.deck-wrap { display: grid; gap: 14px; }
.deck-switch { justify-self: start; display: inline-flex; background: var(--green-soft); border-radius: 999px; padding: 4px; gap: 4px; }
.deck-switch button { border: 0; background: transparent; border-radius: 999px; min-height: 42px; padding: 6px 16px; font: inherit; font-weight: 600; color: var(--green-ink); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.deck-switch button[aria-pressed="true"] { background: #fff; box-shadow: var(--shadow); color: var(--green); }
.deck-switch .i { width: 18px; height: 18px; }
.deck { background: linear-gradient(160deg, #FFF8E6 0%, var(--green-soft) 100%); border: 2px solid var(--line); border-radius: 28px; padding: clamp(14px, 3vw, 28px); display: grid; gap: 18px; }
.deck-stage { display: grid; justify-items: center; }
.deck-card { width: 100%; display: grid; gap: 14px; justify-items: center; text-align: center; border-radius: 24px; transition: background-color .2s, box-shadow .2s; animation: deck-in .28s var(--ease, ease-out); }
.deck-card.hl { box-shadow: 0 0 0 4px var(--gold); background: #FFF6DB; }
@keyframes deck-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .deck-card { animation: none; } }
/* แก้ด่วน-789: ลูกค้าขอให้การ์ดขยายเต็มพื้นที่ — การ์ดกว้างเต็มกรอบ สูงขึ้น รูป/คำใหญ่ขึ้น */
.deck-face { width: 100%; min-height: clamp(260px, 44vh, 480px); border: 0; background: #fff; border-radius: 24px; box-shadow: var(--shadow); padding: clamp(22px, 4vw, 44px) 16px; cursor: pointer; display: grid; justify-items: center; align-content: center; gap: 10px; font: inherit; }
.deck-img { width: clamp(180px, 30vw, 360px); height: clamp(180px, 30vw, 360px); object-fit: contain; border-radius: 20px; margin-bottom: 6px; }
.deck-letter { width: clamp(96px, 22vw, 132px); aspect-ratio: 1; border-radius: 32px; display: grid; place-items: center; font-family: 'Poppins'; font-weight: 800; font-size: clamp(56px, 13vw, 84px); line-height: 1; margin-bottom: 6px; transform: rotate(-4deg); }
.deck-letter.t-g { background: var(--green-soft); color: var(--green); } .deck-letter.t-r { background: var(--red-soft); color: var(--red); } .deck-letter.t-y { background: #FFF1C9; color: var(--gold-ink); }
.deck-ipa { font-size: clamp(24px, 4vw, 40px); }
.deck-word { font-family: 'Poppins'; font-weight: 700; font-size: clamp(56px, 10vw, 136px); line-height: 1.1; color: var(--green-ink); overflow-wrap: anywhere; }
.deck-label { font-size: clamp(20px, 4.4vw, 26px); font-weight: 700; color: var(--gold-ink); background: #FFF1C9; border-radius: 999px; padding: 4px 18px; }
.deck-th { display: grid; gap: 4px; justify-items: center; background: #fff; border: 2px dashed var(--red); border-radius: 18px; padding: 12px 20px; }
.deck-th[hidden] { display: none; }
.deck-th b { color: var(--red); font-size: clamp(26px, 6vw, 36px); } .deck-th .ex { font-family: 'Poppins'; font-size: 19px; } .deck-th small { color: var(--muted); font-size: 16px; }
.deck-hint { color: var(--muted); font-size: 15px; }
.deck-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.deck-tools .btn { min-height: 54px; padding: 10px 22px; font-size: 18px; }
.deck-tools .btn .i { width: 22px; height: 22px; }
.deck-tools .mic-out { font-size: 16px; }
.deck-bar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.deck-nav { min-height: 58px; font-size: 19px; padding: 10px 26px; }
.deck-nav:disabled { opacity: .35; cursor: default; }
.deck-mid { display: grid; justify-items: center; gap: 8px; }
.deck-count { font-weight: 700; font-size: 17px; color: var(--green-ink); }
.deck-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 0; }
.deck-dots button { min-width: 24px; height: 24px; border: 0; background: transparent; padding: 0 3px; cursor: pointer; display: grid; place-items: center; }
.deck-dots button::before { content: ''; width: 12px; height: 12px; border-radius: 999px; background: #C9D8CF; transition: width .2s, background-color .2s; }
.deck-dots button.on::before { background: var(--red); width: 28px; }
@media (max-width: 560px) {
  .deck-bar { grid-template-columns: 1fr 1fr; }
  .deck-mid { grid-column: 1 / -1; grid-row: 1; }
  .deck-nav { width: 100%; }
  .deck-face { min-height: 240px; }
}
@media (max-width: 760px) {
  .xp-row { grid-template-columns: 1fr; }
  .quick-row { grid-template-columns: 1fr; }
  .set-item { grid-template-columns: auto 1fr; } .set-item .pill { grid-column: 2; justify-self: start; }
  .refer .inline { flex-direction: column; }
}

/* แบนเนอร์ชุดฝึกเสริมในหน้าคอร์สของฉัน */
.practice-banner { margin-top: 28px; border-radius: 24px; padding: 22px; background: linear-gradient(135deg, #FFF6E6 0%, #F1F8F1 100%); border: 1px solid var(--line); }
.practice-banner .pb-head { display: grid; gap: 4px; margin-bottom: 16px; justify-items: start; }
.practice-banner h2 { margin: 0; font-size: 28px; }
.practice-banner p { margin: 0 0 6px; color: var(--muted); }
.practice-banner .quick-row { margin-bottom: 0; }

/* หน้าเลือกระดับ "ฟังให้ทัน พิมพ์ให้ถูก" — ตามเดโมลูกค้า 2026-10-30 · ฉากพื้นหลังจากฟ็อกซ์ (ไม่มีตัวหนังสือในภาพ) */
.ls { padding: 24px 0 56px; }
.ls-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow-lg);
  padding: 22px 28px 170px; text-align: center; background: #F6FBF7 url(/img/ls-bg-desktop.webp) center bottom / 100% auto no-repeat; }
.ls-hud { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; text-align: left; }
.ls-brand { display: flex; align-items: center; gap: 10px; font-size: clamp(20px, 2.2vw, 28px); color: var(--green); }
.ls-brand b { color: var(--red); } .ls-brand span { font-weight: 700; }
.ls-stats { margin-left: auto; display: flex; gap: 10px; }
.ls-stat { display: grid; grid-template-columns: auto auto; align-items: center; gap: 0 12px; min-width: 120px; padding: 6px 16px 8px; background: rgba(255,255,255,.9);
  border: 1px solid var(--line); border-radius: 14px; text-align: center; }
.ls-stat small { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); }
.ls-stat b { grid-column: 1 / -1; font-size: 26px; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.ls-combo b { grid-column: auto; padding-left: 12px; border-left: 1px solid var(--line); }
.ls-combo i { font-style: normal; font-weight: 700; font-size: 14px; color: var(--green); background: var(--green-soft); border-radius: 8px; padding: 2px 10px; }
.ls-bar { height: 10px; background: #E3EFE7; border-radius: 10px; margin: 16px 0 6px; overflow: hidden; }
.ls-bar span { display: block; height: 100%; min-width: 3.5%; background: var(--green-2); border-radius: 10px; }
.ls-prog { margin: 0; text-align: right; color: var(--muted); font-size: 14px; }
.ls-title { margin: 14px 0 8px; font-size: clamp(40px, 6.6vw, 80px); font-weight: 800; line-height: 1.2; color: var(--green); }
.ls-title em { position: relative; font-style: normal; color: var(--red); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 24' preserveAspectRatio='none'%3E%3Cpath d='M4 18C80 6 200 2 296 10' fill='none' stroke='%23D62839' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") 0 100% / 100% .22em no-repeat; padding-bottom: .14em; }
.ls-title em::after { content: ''; position: absolute; right: -.5em; top: -.05em; width: .5em; height: .5em; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg stroke='%23D62839' stroke-width='4' stroke-linecap='round'%3E%3Cpath d='M10 22 22 4'/%3E%3Cpath d='M18 30 36 22'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat; }
.ls-sub { margin: 0 0 30px; font-size: clamp(17px, 1.8vw, 22px); color: var(--ink); }
.ls-levels { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; text-align: left; }
.ls-lv { display: grid; gap: 2px; align-content: start; padding: 20px 20px 18px; border: 2px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.96); color: var(--ink);
  text-decoration: none; box-shadow: var(--shadow); transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; }
.ls-lv:hover { transform: translateY(-3px); border-color: var(--green-2); }
.ls-lv.sel { border-color: var(--green-2); background: #F3FAF5; box-shadow: 0 0 0 3px var(--green-soft), var(--shadow); }
.ls-lv:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.ls-ic { position: relative; justify-self: center; margin-bottom: 4px; }
.ls-ic .i { width: 56px; height: 56px; color: var(--green); stroke-width: 1.6; }
.ls-ic::after { content: ''; position: absolute; right: -16px; top: 0; width: 18px; height: 18px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg stroke='%23D62839' stroke-width='4' stroke-linecap='round'%3E%3Cpath d='M10 22 22 4'/%3E%3Cpath d='M18 30 36 22'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat; }
.ls-lv small { margin-top: 6px; font-size: 19px; font-weight: 700; color: var(--green); }
.ls-lv b { font-size: clamp(18px, 1.7vw, 24px); line-height: 1.25; }
.ls-days { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.ls-days .i { width: 20px; height: 20px; color: var(--green); }
.ls-done, .ls-free { font-size: 12.5px; color: var(--green); font-weight: 600; }
.ls-free { color: var(--red); }
.ls-go { position: relative; z-index: 1; margin-top: 30px; min-width: 300px; justify-content: center; font-size: 26px; padding: 14px 32px; border-radius: 16px; }
.ls-go kbd { font-family: var(--font); font-size: 14px; font-weight: 600; border: 1px solid rgba(255,255,255,.6); border-radius: 8px; padding: 2px 10px; margin-left: 10px; background: rgba(255,255,255,.12); }
.ls-keys { position: relative; z-index: 1; display: flex; justify-content: center; gap: 28px; margin: 18px 0 0; color: var(--ink); font-size: 15px; }
.ls-keys span { background: rgba(255,255,255,.88); border-radius: 10px; padding: 4px 10px; }
.ls-keys kbd { font-family: var(--font); background: #fff; color: var(--ink); border: 1px solid var(--green-2); border-bottom-width: 2px; border-radius: 6px; padding: 1px 10px; margin-right: 8px; }
@media (hover: none) { .ls-keys, .ls-go kbd { display: none; } }
@media (max-width: 1080px) { .ls-lv { padding: 16px 14px; } .ls-ic .i { width: 44px; height: 44px; } }
@media (max-width: 900px) { .ls-levels { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .ls { padding-top: 12px; }
  .ls-brand { gap: 6px; font-size: 17px; white-space: nowrap; } .ls-brand img { width: 34px; height: 34px; }
  .ls-card { padding: 16px 14px 120px; border-radius: 22px; background-image: url(/img/ls-bg-mobile.webp); }
  .ls-lv:nth-child(5):last-child { grid-column: 1 / -1; }
  .ls-stats { margin-left: 0; width: 100%; } .ls-stat { flex: 1; min-width: 0; }
  .ls-levels { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ls-lv { padding: 14px 12px; } .ls-lv b { font-size: 17px; } .ls-ic .i { width: 40px; height: 40px; }
  .ls-title em::after { display: none; } .ls-go { width: 100%; min-width: 0; }
}

/* สไลด์เลือกระดับในแท็บฝึกประโยค (ใช้การ์ดเดียวกับหน้า /learn/<คอร์ส>) */
.ls-in { margin: 4px 0 8px; box-shadow: none; }
.ls-in .ls-title { font-size: clamp(34px, 5vw, 64px); }
@media (min-width: 1100px) { .ls-in .ls-levels { gap: 12px; } .ls-in .ls-lv { padding: 16px 14px; } .ls-in .ls-ic .i { width: 46px; height: 46px; } }
.dr-back { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; color: var(--muted); font-size: 14px; }

/* ---------- เกมฟังพิมพ์ Combo (ตามเดโม) ---------- */
.cg { position: relative; display: grid; gap: 14px; background: linear-gradient(180deg, #F5FAF6 0%, #fff 70%); border: 1px solid var(--line); border-radius: 24px; padding: 18px; overflow: hidden; }
.cg::before { content: ''; position: absolute; right: -40px; top: 90px; width: 220px; height: 220px; opacity: .07; pointer-events: none;
  background: url('/img/emblem.webp') center / contain no-repeat; }
.cg-hud { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cg-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; color: var(--green); }
.cg-hud .pill { font-size: 13px; padding: 2px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--muted); }
.cg-sp { flex: 1; }
.cg-stat { display: grid; justify-items: end; line-height: 1.1; }
.cg-stat small { font-size: 12px; color: var(--muted); }
.cg-stat b { font-family: 'Poppins'; font-size: 26px; color: var(--ink); font-variant-numeric: tabular-nums; }
.cg-combo { display: flex; align-items: center; gap: 12px; padding: 6px 14px; border-radius: 14px; background: #fff; border: 1.5px solid var(--line); min-width: 130px; transition: border-color .2s, box-shadow .2s; }
.cg-combo small { display: block; font-size: 11px; letter-spacing: .08em; color: var(--muted); }
.cg-combo .m { display: inline-block; font-family: 'Poppins'; font-size: 13px; font-weight: 700; color: #fff; background: #9AA7A0; border-radius: 6px; padding: 0 8px; }
.cg-combo .n { font-family: 'Poppins'; font-weight: 800; font-size: 28px; min-width: 1.6ch; text-align: right; font-variant-numeric: tabular-nums; margin-left: auto; }
.cg-combo.t2 { border-color: var(--gold); } .cg-combo.t2 .m { background: var(--gold-ink); }
.cg-combo.t3 { border-color: var(--red); box-shadow: 0 0 18px -6px var(--red); } .cg-combo.t3 .m { background: var(--red); }
.cg-combo.t4 { border-color: var(--red); box-shadow: 0 0 26px -4px var(--red); animation: cgPulse 1s infinite; } .cg-combo.t4 .m { background: linear-gradient(90deg, var(--red), var(--gold-ink)); }
.cg-combo.bump .n { animation: cgBump .25s; }
@keyframes cgBump { 50% { transform: scale(1.35); } }
@keyframes cgPulse { 50% { box-shadow: 0 0 34px 0 rgba(214, 40, 40, .45); } }
.cg-bar { height: 6px; background: var(--green-soft); border-radius: 6px; overflow: hidden; }
.cg-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--green-2), var(--red)); transition: width .4s; }
.cg-body { display: grid; gap: 16px; align-items: start; }
.cg-body:has(.cg-side:not([hidden])) { grid-template-columns: minmax(0, 1fr) 300px; }
.cg-stage { position: relative; display: grid; justify-items: center; gap: 18px; min-height: 300px; padding: 14px 4px; cursor: text; text-align: center; }
.cg-hint { margin: 0; font-size: 15px; color: var(--red); font-weight: 500; }
.cg-inp { position: absolute; opacity: 0; width: 1px; height: 1px; left: 50%; top: 50%; font-size: 16px; pointer-events: none; }
.cg-slots { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px 26px; max-width: 100%; }
.cg .sgrp { display: grid; justify-items: center; gap: 10px; }
.cg .srow { display: flex; flex-wrap: wrap; gap: 12px 16px; justify-content: center; }
.cg .rl { font-size: 13px; font-weight: 600; color: var(--c); padding: 1px 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--c) 50%, transparent); background: color-mix(in srgb, var(--c) 10%, #fff); white-space: nowrap; }
.cg .slot { position: relative; display: flex; align-items: flex-end; justify-content: center; font-family: 'Poppins'; font-weight: 600; font-size: clamp(26px, 4.6vw, 46px);
  line-height: 1.15; min-height: 1.35em; padding-bottom: 8px; color: var(--ink); }
.cg .slot::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; border-radius: 3px; background: #D5DED8; transition: background .2s; }
.cg .slot.cur::after { background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.cg .slot.ok::after { background: var(--green-2); }
.cg .slot.given { color: #8D9A93; } .cg .slot.given::after { background: #B5C0BA; }
.cg .slot.bad { color: var(--red); animation: shake .35s; } .cg .slot.bad::after { background: var(--red); }
.cg .slot .ghost { color: #B5C0BA; }
.cg .slot .caret { display: inline-block; width: 3px; height: .9em; background: var(--gold-ink); margin: 0 0 .1em 2px; animation: cgBlink 1s steps(1) infinite; }
.cg .slot.pop { animation: cgPop .3s; }
@keyframes cgBlink { 50% { opacity: 0; } }
@keyframes cgPop { 40% { transform: translateY(-6px) scale(1.06); } }
.cg-float { position: absolute; transform: translateX(-50%); pointer-events: none; font-family: 'Poppins'; font-weight: 800; font-size: 20px; color: var(--gold-ink); animation: cgUp .9s ease-out forwards; white-space: nowrap; }
@keyframes cgUp { to { transform: translate(-50%, -30px); opacity: 0; } }
.cg-banner { position: absolute; top: 4%; left: 50%; transform: translateX(-50%); font-family: 'Poppins'; font-weight: 800; font-size: clamp(26px, 5vw, 44px); white-space: nowrap; pointer-events: none;
  background: linear-gradient(90deg, var(--red), var(--gold-ink)); -webkit-background-clip: text; background-clip: text; color: transparent; animation: cgBan 1.1s ease-out forwards; z-index: 2; }
@keyframes cgBan { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.8); } 20% { opacity: 1; transform: translate(-50%, 0) scale(1.08); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -14px); } }
.cg-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 26px 14px; max-width: 100%; }
.cg .grp { position: relative; display: flex; flex-wrap: wrap; justify-content: center; max-width: 100%; gap: 10px; padding: 14px 12px 22px; border-radius: 18px; background: #fff;
  border: 1.5px solid color-mix(in srgb, var(--c) 45%, transparent); box-shadow: 0 6px 18px -10px color-mix(in srgb, var(--c) 60%, transparent); animation: cgFade .4s both; }
.cg .grp .tag { position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%); background: var(--c); color: #fff; font-size: 12.5px; font-weight: 600; padding: 2px 14px; border-radius: 999px; white-space: nowrap; }
.cg .wd { display: grid; justify-items: center; gap: 3px; min-width: 64px; border: 0; background: none; padding: 0 4px; cursor: pointer; font: inherit; color: var(--ink); }
.cg .wd .ipa { font-family: 'Noto Sans', 'Segoe UI', sans-serif; font-size: 14px; color: var(--muted); }
.cg .wd .w { font-family: 'Poppins'; font-size: clamp(28px, 4.2vw, 44px); line-height: 1.1; font-weight: 600; }
.cg .wd .u { height: 4px; width: 100%; border-radius: 3px; background: var(--pc); }
.cg .wd .m { font-size: 15px; font-weight: 600; }
.cg .wd .p { font-size: 12px; color: var(--muted); }
.cg .wd:hover .w { color: var(--red); }
@keyframes cgFade { from { opacity: 0; transform: translateY(8px); } }
.cg-th { margin: 0; font-size: 19px; color: var(--ink); font-weight: 500; }
.cg-note { width: 100%; margin: 0; color: var(--muted); font-size: 15px; }
.cg-ctrls { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.cg-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; font: inherit; font-size: 15.5px; font-weight: 600; color: var(--ink); cursor: pointer; transition: border-color .15s, transform .1s; }
.cg-btn:hover { border-color: var(--green-2); } .cg-btn:active { transform: translateY(1px); }
.cg-btn .i { width: 18px; height: 18px; color: var(--green); }
.cg-btn.primary { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 8px 20px -10px var(--red); }
.cg-btn.primary .i { color: #fff; }
.cg-btn kbd { font-family: 'Poppins'; font-size: 11px; padding: 1px 6px; border: 1px solid currentColor; border-radius: 6px; opacity: .65; font-weight: 500; }
.cg .vsrc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: min(620px, 100%); justify-self: center; }
.cg .vbox { display: grid; justify-items: start; gap: 3px; text-align: left; padding: 11px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; opacity: .6; font: inherit; color: var(--ink); min-width: 0; transition: opacity .15s, border-color .15s; }
.cg .vbox:hover { opacity: .9; }
.cg .vbox[aria-checked="true"] { opacity: 1; border-color: var(--red); background: var(--red-soft); }
.cg .vbox .vk { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.cg .vbox .vk i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid #9AA7A0; }
.cg .vbox[aria-checked="true"] .vk i { background: var(--red); border-color: var(--red); }
.cg .vbox[aria-checked="true"] .vk::after { content: 'กำลังใช้'; font-size: 11px; font-weight: 600; color: #fff; background: var(--red); border-radius: 6px; padding: 0 7px; }
.cg .vbox b { font-family: 'Poppins'; font-size: 19px; }
.cg .vbox small { font-size: 12px; color: var(--muted); }
.cg .vbox select { font: inherit; font-size: 14px; width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; background: #fff; }
.cg-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; font-size: 13.5px; color: var(--muted); }
.cg-legend span i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 6px; vertical-align: middle; }
.cg-side { display: grid; gap: 10px; }
.cg-exam .cg-hint { color: var(--muted); }
@media (max-width: 860px) { .cg-body:has(.cg-side:not([hidden])) { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .cg { padding: 14px 12px; border-radius: 18px; } .cg-brand { font-size: 16px; } .cg-combo { min-width: 0; } .cg-stat b { font-size: 21px; }
  .cg-slots { gap: 18px 14px; } .cg .vsrc { grid-template-columns: 1fr; } .cg .grp { flex-wrap: wrap; justify-content: center; }
  .cg-btn { padding: 9px 12px; font-size: 14.5px; } .cg-btn kbd { display: none; }
}
@media (prefers-reduced-motion: reduce) { .cg *, .cg { animation: none !important; transition: none !important; } }
.fc-img, .cw-img { display: block; margin: 0 auto 6px; width: 96px; height: 96px; object-fit: contain; border-radius: 14px; }

/* ---------- นิทานแบบหนังสือภาพ: ภาพฉากเต็มเวที ข้อความ/เกมซ้อนบนภาพ ---------- */
.story-stage { position: relative; isolation: isolate; overflow: hidden; border-radius: 24px; min-height: clamp(440px, 52vw, 620px);
  display: flex; flex-direction: column; justify-content: flex-end; color: #fff; box-shadow: var(--shadow-lg);
  background: radial-gradient(120% 90% at 30% 10%, #F6E7C1 0%, #CFE6C8 45%, #2E7D4F 100%); }
.st-bg { position: absolute; inset: 0; z-index: -2; }
.st-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: kb 20s ease-in-out infinite alternate; }
.st-bg img.in { animation: kb 20s ease-in-out infinite alternate, sceneIn .9s ease both; }
@keyframes kb { from { transform: scale(1.03) translate(0, 0); } to { transform: scale(1.13) translate(-2%, -1.5%); } }
@keyframes sceneIn { from { opacity: 0; } }
.st-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(6, 26, 15, 0) 30%, rgba(6, 26, 15, .55) 62%, rgba(6, 26, 15, .86) 100%); transition: background .4s; }
.st-chip { position: absolute; top: 16px; left: 16px; padding: 4px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: #fff;
  background: rgba(6, 26, 15, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, .3); }
.st-listen { display: grid; gap: 14px; padding: 24px 28px 22px; }
.st-cap { display: grid; gap: 6px; max-width: 900px; animation: cgFade .45s both; }
.st-cap .en { margin: 0; font-family: 'Poppins', var(--font); font-size: clamp(24px, 3.2vw, 38px); font-weight: 600; line-height: 1.3; text-shadow: 0 2px 12px rgba(0, 0, 0, .45); }
.st-cap .clk .w { color: #fff; border-bottom-color: rgba(255, 255, 255, .55); }
.st-cap .clk .w:hover { background: rgba(255, 255, 255, .18); }
.st-cap .th { margin: 0; font-size: clamp(16px, 1.8vw, 20px); color: rgba(255, 255, 255, .92); text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }
.st-cap .hard { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; }
.st-cap .hard span { font-size: 14px; padding: 2px 10px; border-radius: 999px; background: rgba(242, 182, 50, .92); color: #3A2900; font-weight: 600; }
.st-dots { display: flex; gap: 6px; flex-wrap: wrap; }
.st-dots button { width: 26px; height: 6px; border-radius: 6px; border: 0; padding: 0; cursor: pointer; background: rgba(255, 255, 255, .35); }
.st-dots button.on { background: var(--gold); width: 40px; }
.st-ctrls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.st-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; font: inherit; font-weight: 600; font-size: 16px; color: #fff; cursor: pointer;
  background: rgba(255, 255, 255, .16); border: 1.5px solid rgba(255, 255, 255, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: background .2s, transform .1s; }
.st-btn:hover { background: rgba(255, 255, 255, .28); } .st-btn:active { transform: translateY(1px); }
.st-btn .i { width: 18px; height: 18px; color: #fff; }
.st-btn.round { width: 46px; height: 46px; padding: 0; justify-content: center; }
.st-btn.round.big { width: 56px; height: 56px; background: #fff; } .st-btn.round.big .i { color: var(--green); width: 24px; height: 24px; }
.st-btn.primary { background: var(--red); border-color: var(--red); margin-left: auto; box-shadow: 0 10px 24px -10px var(--red); }
.story-stage.typing { display: block; min-height: 0; padding: 0 0 16px; background: #FBF7EE; }
/* โหมดพิมพ์ (ลูกค้าทัก 2026-10-30): ภาพฉากเต็มกว้างด้านบนเห็นครบ แผงพิมพ์ทับแค่ขอบล่างของภาพ ภาพเปลี่ยนตามท่อนที่พิมพ์ */
.story-stage.typing .st-bg { position: relative; inset: auto; z-index: 0; aspect-ratio: 16 / 9; overflow: hidden; }
.story-stage.typing .st-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(251, 247, 238, 0) 62%, #FBF7EE 100%); }
.story-stage.typing .st-shade { display: none; }
.story-stage.typing.no-img .st-bg { aspect-ratio: auto; height: clamp(90px, 12vw, 150px); } /* วันที่ยังไม่มีภาพฉาก: แถบสีสั้นๆ แทนกรอบภาพว่าง */
.story-stage.typing.no-img { background: radial-gradient(120% 90% at 30% 10%, #F6E7C1 0%, #CFE6C8 45%, #FBF7EE 100%); }
.story-stage.typing .st-chip { z-index: 2; }
.st-game.cg { position: relative; z-index: 1; width: calc(100% - 32px); max-width: 960px; margin: calc(-1 * clamp(40px, 6vw, 88px)) auto 0; color: var(--ink);
  background: rgba(255, 255, 255, .96); border-color: rgba(255, 255, 255, .8); box-shadow: 0 -10px 40px -18px rgba(0, 0, 0, .35), 0 24px 48px -24px rgba(0, 0, 0, .3); }
.st-game.cg::before { display: none; }
.st-game.cg .cg-stage { min-height: 200px; }
.st-game.cg .slot { font-size: clamp(22px, 3vw, 36px); }
.st-game.cg .wd .w { font-size: clamp(22px, 2.8vw, 34px); }
.st-game.cg .cg-slots { gap: 16px 20px; }
.st-close { justify-self: start; display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; font: inherit; font-weight: 600; color: var(--green); cursor: pointer; padding: 0; }
.st-close .i { width: 18px; height: 18px; }
.story-all { margin-top: 14px; }
.story-all summary { cursor: pointer; font-weight: 600; padding: 10px 0; }
.seg-line .en { margin: 0; font-size: 18px; font-family: 'Poppins', var(--font); }
@media (max-width: 600px) {
  .story-stage { min-height: 78vh; border-radius: 18px; }
  .st-listen { padding: 18px 16px 16px; }
  .st-btn { padding: 9px 14px; font-size: 15px; } .st-btn.primary { margin-left: 0; width: 100%; justify-content: center; }
  .story-stage.typing { padding-bottom: 8px; } .story-stage.typing .st-bg { aspect-ratio: 4 / 3; } .st-game.cg { width: calc(100% - 12px); margin-top: -36px; padding: 12px; }
}
@media (prefers-reduced-motion: reduce) { .st-bg img { animation: none; } }

/* ---------- ฝึกประโยค 5 รอบ ---------- */
.p4 { --t-pre: #12925A; --t-past: #D62839; --t-fut: #E39B10; --t-pos: #2F6FE4; }
.t-pre { --tc: var(--t-pre); } .t-past { --tc: var(--t-past); } .t-fut { --tc: var(--t-fut); } .t-pos { --tc: var(--t-pos); }
.dr { display: grid; gap: 18px; }
.dr-hero { text-align: center; padding: 18px 12px 6px; border-radius: 22px; background: radial-gradient(600px 200px at 50% 0, var(--green-soft), transparent 75%); }
.dr-hero h3 { margin: 0; font-size: clamp(30px, 5vw, 48px); color: var(--green); line-height: 1.2; }
.dr-hero h3 em { font-style: normal; color: var(--red); background: linear-gradient(var(--red), var(--red)) 0 100% / 100% 3px no-repeat; }
.dr-hero p { margin: 6px 0 12px; font-size: 17px; }
.dr-lv { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: #fff; border: 1px solid var(--line); }
.dr-lv a { padding: 4px 14px; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 14.5px; }
.dr-lv a.on { background: var(--green); color: #fff; }
.dr-formula { display: grid; grid-template-columns: 170px repeat(3, minmax(0, 1fr)); gap: 10px; align-items: stretch; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.dr-formula > b { align-self: center; font-size: 17px; }
.dr-f { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: #F4F8F5; border: 1.5px solid transparent; }
.dr-f.f-aff { background: #EEF8F1; } .dr-f.f-q { background: #EEF3FD; } .dr-f.f-neg { background: #FDEFF0; }
.dr-f.on { border-color: currentColor; box-shadow: 0 6px 16px -10px currentColor; }
.dr-f.f-aff.on { color: var(--t-pre); } .dr-f.f-q.on { color: var(--t-pos); } .dr-f.f-neg.on { color: var(--t-past); }
.dr-f .fi { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; font-weight: 800; font-family: 'Poppins'; }
.dr-f.f-aff .fi { background: var(--t-pre); } .dr-f.f-q .fi { background: var(--t-pos); } .dr-f.f-neg .fi { background: var(--t-past); }
.dr-f div { display: grid; gap: 1px; color: var(--ink); }
.dr-f small { font-size: 13px; font-weight: 600; color: var(--muted); }
.dr-f b { font-family: 'Poppins'; font-size: 16px; }
.dr-f span { font-size: 13.5px; color: var(--muted); }
.dr-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.dr-card { display: grid; gap: 8px; justify-items: start; text-align: left; padding: 16px; border-radius: 18px; border: 1.5px solid color-mix(in srgb, var(--tc) 35%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--tc) 10%, #fff), #fff 70%); cursor: pointer; font: inherit; color: var(--ink); transition: transform .2s var(--ease); }
.dr-card:hover { transform: translateY(-3px); }
.dr-card .no { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--tc); color: #fff; font-weight: 700; font-family: 'Poppins'; }
.dr-card b { font-family: 'Poppins'; font-size: 19px; color: var(--tc); }
.dr-card .chips { display: flex; flex-wrap: wrap; gap: 4px; }
.dr-card .chips small { font-size: 12.5px; padding: 1px 9px; border-radius: 999px; background: #fff; border: 1px solid var(--line); }
.dr-card .cnt { font-size: 13.5px; color: var(--muted); }
.dr-track { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.dr-track .tr { display: grid; gap: 4px; justify-items: center; padding: 10px 6px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; text-align: center; }
.dr-track .tr.on { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.dr-track .tr.done { background: var(--green-soft); }
.dr-track .tr b { font-size: 14px; }
.dr-track .st { display: flex; gap: 4px; }
.dr-track .st i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-style: normal; font-size: 12px; font-weight: 700; color: var(--tc); background: color-mix(in srgb, var(--tc) 14%, #fff); }
.dr-track .st i.now { background: var(--tc); color: #fff; transform: scale(1.15); }
.dr-track .tr small { font-size: 10.5px; color: var(--muted); }
.dr-go { display: grid; justify-items: center; gap: 6px; text-align: center; }
.dr-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border-radius: 16px; background: color-mix(in srgb, var(--tc) 9%, #fff); border: 1.5px solid color-mix(in srgb, var(--tc) 30%, transparent); }
.dr-head .no { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--tc); color: #fff; font-weight: 800; font-size: 20px; font-family: 'Poppins'; }
.dr-head b { font-family: 'Poppins'; font-size: 22px; color: var(--tc); }
.dr-head .form { padding: 3px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 600; }
.dr-head .rd { margin-left: auto; color: var(--muted); font-size: 14px; }
.dr-side { display: grid; gap: 8px; align-content: start; padding: 12px; border-radius: 18px; background: #fff; border: 1px solid var(--line); }
.dr-side > b { font-size: 16px; }
.dr-compare { display: grid; gap: 14px; padding: 18px; border-radius: 18px; background: #fff; border: 1.5px solid var(--line); }
.dr-compare h3 { margin: 0; font-size: 20px; }
.dr-compare .btn { justify-self: center; }
.dr-cmp { display: grid; gap: 8px; }
.dr-cmp .row { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--tc) 8%, #fff); border-left: 5px solid var(--tc); }
.dr-cmp .tn { font-weight: 700; color: var(--tc); font-family: 'Poppins'; }
.dr-cmp .en { margin: 0; font-family: 'Poppins'; font-size: 19px; }
.dr-cmp .en b { color: var(--tc); text-decoration: underline 2px; text-underline-offset: 4px; }
.dr-cmp .th { margin: 0; color: var(--muted); font-size: 15px; }
.dr-final { text-align: left; justify-items: stretch; }
.dr-final h3, .dr-final .sum-btns { justify-self: center; }
.dr-final-round { display: grid; gap: 8px; }
@media (max-width: 860px) {
  .dr-formula { grid-template-columns: 1fr; } .dr-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dr-track { grid-template-columns: repeat(5, minmax(120px, 1fr)); overflow-x: auto; padding-bottom: 4px; }
}
@media (max-width: 560px) { .dr-cmp .row { grid-template-columns: 1fr auto; } .dr-cmp .tn { grid-column: 1 / -1; } .dr-head b { font-size: 18px; } .dr-head .rd { margin-left: 0; } }

/* ---------- Exam ระดับ ---------- */
.ex { padding: 28px 0 56px; }
.ex .wrap.narrow { max-width: 980px; }
.ex-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 10px 0 18px; }
.ex-head > div { flex: 1; } .ex-head small { color: var(--red); font-weight: 700; letter-spacing: .04em; }
.ex-head h1 { margin: 0; font-size: clamp(28px, 4vw, 40px); } .ex-head h1 span { color: var(--muted); font-size: .6em; font-weight: 500; }
.ex-badge { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; background: var(--gold); }
.ex-badge .i { width: 32px; height: 32px; color: #3A2900; }
.ex-rules { display: grid; gap: 16px; justify-items: start; padding: 22px; border-radius: 22px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.ex-rules ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ex-rules li { display: flex; gap: 10px; align-items: center; font-size: 17px; }
.ex-rules li .i { width: 22px; height: 22px; color: var(--green); flex: none; }
.ex-best { margin: 0; }
.ex-result { display: grid; gap: 10px; justify-items: center; text-align: center; padding: 32px 18px; border-radius: 22px; background: #fff; border: 1px solid var(--line); }
.ex-result.ok .ex-badge { background: var(--green); } .ex-result.ok .ex-badge .i { color: #fff; }
.ex-result h2 { margin: 6px 0 0; } .ex-score { margin: 0; font-size: 18px; } .ex-score b { font-family: 'Poppins'; font-size: 40px; color: var(--green); }
.toc-exam a { color: var(--red) !important; font-weight: 600; }
.toc-exam .i { width: 18px; height: 18px; flex: none; }
.toc-exam .pass { margin-left: auto; font-size: 11px; color: #fff; background: var(--green); border-radius: 999px; padding: 0 8px; }

/* ---------- บทนำฟรี ---------- */
.intro { padding: 28px 0 56px; }
.intro .wrap.narrow { max-width: 900px; }
.intro-head { display: grid; gap: 6px; justify-items: start; margin: 10px 0 14px; }
.intro-head h1 { margin: 0; font-size: clamp(30px, 4.6vw, 44px); }
.intro-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.intro-tabs a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--ink); font-size: 15px; }
.intro-tabs a[aria-current] { background: var(--green); border-color: var(--green); color: #fff; }
.intro-body { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 8px 26px 26px; box-shadow: var(--shadow); }
.intro-body h2 { font-size: 24px; color: var(--green); }
.intro-tbl { overflow-x: auto; margin: 10px 0 16px; }
.intro-tbl table { width: 100%; border-collapse: collapse; font-size: 16px; }
.intro-tbl th { text-align: left; background: var(--green-soft); color: var(--green-ink); padding: 8px 12px; }
.intro-tbl td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.intro-tbl td:first-child { font-family: 'Noto Sans', 'Poppins', var(--font); font-weight: 600; white-space: nowrap; }
.intro-nav { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.toc-intro summary .free { margin-left: 6px; }
@media (max-width: 560px) { .intro-body { padding: 4px 16px 18px; } .intro-tbl table { font-size: 14.5px; } }
/* รอบแก้ด่วน-778: ตารางเสียง IPA 44 เสียง — สัญลักษณ์ช่องแรกตัวใหญ่ อ่านง่ายแบบผัง Phonemic chart */
.intro-tbl.ipa-tbl td:first-child { font-size: 24px; line-height: 1.2; color: var(--green-ink); background: var(--green-soft); text-align: center; min-width: 64px; }
.intro-tbl.ipa-tbl th:first-child { text-align: center; }
.intro-tbl.ipa-tbl td:nth-child(3) { font-family: 'Noto Sans', 'Poppins', var(--font); }
.intro-body a { color: var(--green); font-weight: 700; }
.intro-body li > a { display: inline-flex; align-items: center; min-height: 44px; }
/* แบนเนอร์รูปชุดฝึก IPA (แก้ด่วน-780) */
.intro-banners { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 14px 0 18px; }
.intro-banner { display: block; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.intro-banner img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; }
.intro-banner:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
@media (hover: hover) { .intro-banner:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); } }
@media (max-width: 640px) { .intro-banners { grid-template-columns: 1fr; gap: 12px; } }
@media (prefers-reduced-motion: reduce) { .intro-banner { transition: none; } .intro-banner:hover { transform: none; } }
.intro-tabs a { min-height: 44px; display: inline-flex; align-items: center; }
.intro-head .pill { font-size: 14px; }
/* หน้าชุดฝึกเสริมเมื่อมีชุดแล้ว (ชุดฝึก IPA) — ชิปหมวดกดง่ายบนมือถือ ตัวหนังสือไม่เล็กกว่า 14px */
.cat-chips a.chip { min-height: 44px; padding: 4px 16px; }
.set-item .si-b small, .set-item .pill { font-size: 14px; }
@media (max-width: 560px) { .intro-tbl.ipa-tbl td:first-child { font-size: 20px; min-width: 52px; } }

/* รอบแก้ด่วน 2026-11-13: ป้ายคำศัพท์ใหม่/ทบทวน · ใบประกาศใต้ระดับ · ความมั่นใจใต้ราคา · ช่องยินยอม */
.levels .sample .tag-new, .levels .sample .tag-review { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 700;
  padding: 1px 9px; border-radius: 999px; margin-right: 6px; }
.levels .sample .tag-new { background: var(--green-soft); color: var(--green); }
.levels .sample .tag-review { background: #FFF4DB; color: #7A4F00; }
.levels .sample .tag-review svg { width: 13px; height: 13px; }
.lv-perks { list-style: none; padding: 0; margin: 4px 0 20px; display: grid; gap: 8px; }
.lv-perks li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.55; color: var(--ink); }
.lv-perks svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--red); }
.trust-row { list-style: none; padding: 0; margin: 22px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; font-size: 15px; font-weight: 600; color: var(--green-ink); }
.trust-row li { display: flex; align-items: center; gap: 8px; }
.trust-row svg { width: 20px; height: 20px; color: var(--green-2); flex: none; }
.fine a, form.lead .check a { color: var(--green); text-decoration: underline; }
form.lead .check { margin: 4px 0 12px; line-height: 1.55; font-size: 15px !important; }
form.lead .check input { font-size: 16px; }
.page-hero .hero-free { display: flex; width: fit-content; max-width: 100%; margin: 12px auto 4px; }
.a-cta .btn { white-space: normal; max-width: 100%; text-align: center; }
/* พื้นที่กดบนมือถืออย่างน้อย 44px (ตัวตรวจ QA) */
@media (max-width: 720px) {
  .seg a, .seg button { min-height: 44px; display: inline-flex; align-items: center; }
  .board-tools .btn.sm { min-height: 44px; }
  .crumbs a, .a-toc a, .board .gap a, .swap a, .practice .fine a { display: inline-block; padding: 12px 0; }
  .check a { display: inline-block; padding: 12px 0; margin: -12px 0; }
  .a-toc li { margin: 0; }
}
.reg-hint { margin: 6px 0 0; font-size: 14px; color: var(--muted); line-height: 1.5; }
