/* IT-CIL v2 — landing page + lesson card + modal + player/quiz classes */

/* nav */
.lp-nav{ position:sticky; top:0; z-index:40; background:color-mix(in srgb,var(--paper) 86%,transparent);
  -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px); border-bottom:1px solid var(--line); }
.lp-wrap{ max-width:1160px; margin:0 auto; padding:14px 28px; }
.lp-links{ display:flex; gap:6px; }
.lp-links a{ font-size:.88rem; font-weight:500; color:var(--ink-2); text-decoration:none; padding:7px 13px; border-radius:var(--r2); transition:.15s; }
.lp-links a:hover{ background:var(--surface-2); color:var(--ink); }
.lp-links a.on{ color:var(--pine-dark); background:var(--pine-soft); font-weight:600; }
/* v1.0.6 (ข้อ 1): เมนูมือถือ nav สาธารณะ */
.lp-burger{ display:none; width:40px; height:40px; flex-shrink:0; border:1px solid var(--line); border-radius:var(--r2);
  background:var(--surface); color:var(--ink-2); align-items:center; justify-content:center; font-size:1.3rem; cursor:pointer; }
.lp-mobile-menu{ display:none; }
@media(max-width:760px){
  .lp-links{ display:none; }
  .lp-burger{ display:inline-flex; }
  .lp-mobile-menu{ display:flex; flex-direction:column; gap:2px; padding:8px 16px 14px; border-top:1px solid var(--line); background:var(--surface); }
  .lp-mobile-menu a{ padding:11px 12px; border-radius:var(--r2); text-decoration:none; color:var(--ink-2); font-weight:500; }
  .lp-mobile-menu a:hover, .lp-mobile-menu a.on{ background:var(--pine-soft); color:var(--pine-dark); }
}

/* hero */
.lp-hero{ position:relative; overflow:hidden; }
.lp-hero::before{ content:''; position:absolute; top:-180px; right:-160px; width:520px; height:520px; border-radius:50%;
  background:radial-gradient(circle, var(--pine-soft) 0%, transparent 68%); opacity:.85; z-index:0; }
.lp-hero::after{ content:''; position:absolute; bottom:-120px; left:-100px; width:360px; height:360px; border-radius:50%;
  background:radial-gradient(circle, var(--terra-soft) 0%, transparent 70%); opacity:.6; z-index:0; }
.lp-hero-grid{ position:relative; z-index:1; display:grid; grid-template-columns:1.15fr .85fr; gap:46px; align-items:center; padding-top:40px; padding-bottom:30px; }
@media(max-width:920px){ .lp-hero-grid{ grid-template-columns:1fr; gap:30px; } }
/* v1.0.6: ฮีโร่กึ่งกลางคอลัมน์เดียว + ชื่อโครงการวิจัยในฮีโร่ */
.lp-hero-center{ position:relative; z-index:1; max-width:840px; margin:0 auto; text-align:center; padding-top:52px; padding-bottom:40px; }
.lp-hero-center .lp-eyebrow{ justify-content:center; }
.lp-hero-center .lp-lede{ margin-left:auto; margin-right:auto; }
.lp-hero-center .lp-ctas{ justify-content:center; }
/* v1.1.0 (FEEDBACK): ฮีโร่แบ่งครึ่ง — โลโก้ซ้าย · ข้อความขวา (ใช้เมื่อมีโลโก้อัปโหลด) */
.lp-hero-split{ position:relative; z-index:1; display:grid; grid-template-columns:1fr 1fr; gap:44px; align-items:center;
  padding-top:52px; padding-bottom:44px; }
.lp-hero-side{ display:flex; align-items:center; justify-content:center; }
.lp-hero-logo-big{ width:min(100%, 400px); max-height:360px; object-fit:contain; display:block; }
.lp-hero-split .lp-title{ margin-left:0; margin-right:0; text-align:left; }
.lp-hero-split .lp-hero-research{ margin-left:0; margin-right:0; }
@media(max-width:860px){
  .lp-hero-split{ grid-template-columns:1fr; gap:20px; padding-top:38px; text-align:center; }
  .lp-hero-logo-big{ max-height:150px; width:auto; max-width:70%; margin:0 auto; }
  .lp-hero-split .lp-title{ text-align:center; margin-left:auto; margin-right:auto; }
  .lp-hero-split .lp-hero-research{ margin-left:auto; margin-right:auto; }
  .lp-hero-split .lp-lede{ margin-left:auto; margin-right:auto; }
  .lp-hero-split .lp-ctas{ justify-content:center; }
  .lp-hero-split .lp-hero-tag{ justify-content:center; }
}
.lp-hero-split .lp-hero-tag{ justify-content:flex-start; }
@media(max-width:860px){ .lp-hero-split .lp-hero-tag{ justify-content:center; } }

/* v1.1.17: ลดขนาด/ความเด่นชื่องานวิจัย ให้เด่นกว่า .lp-lede เพียงเล็กน้อย (เดิม 1.3rem/600 แย่งความสนใจจากพาดหัว)
   + white-space:pre-wrap → แอดมินกด Enter/เว้นวรรคจัดบรรทัดเองได้จากหลังบ้าน
   v1.1.17-patch2: ขนาดที่ผู้ใช้เคาะจริง → 1.24rem/500 · lh 1.45 (มือถือ 1.14rem)
   (patch1 อ่านค่าจาก prototype ผิดเป็น 1.33rem — ใหญ่เกินไป) */
.lp-hero-research{ font-size:1.24rem; color:var(--pine-dark); font-weight:500; line-height:1.45;
  margin:14px auto 0; max-width:680px; white-space:pre-wrap; }
@media(max-width:560px){ .lp-hero-research{ font-size:1.14rem; } }
.lp-eyebrow{ display:inline-flex; align-items:center; gap:7px; font-size:.74rem; font-weight:600; letter-spacing:.06em;
  color:var(--pine-dark); background:var(--pine-soft); padding:6px 13px; border-radius:var(--pill); }
.lp-eyebrow .ph{ color:var(--amber-dark); }
/* v1.1.0: จำกัดความกว้าง + text-wrap:balance ให้พาดหัวตัดบรรทัดสมดุล (เดิม "ชุมชน" ตกบรรทัดเดี่ยว)
   v1.2.0 (แก้ผลข้างเคียงจาก v1.1.17): เดิมใส่ white-space:pre-wrap ไว้ตรงนี้ทุกกรณี ซึ่งทำให้
   เบราว์เซอร์ปิด text-wrap:balance ทิ้ง → พาดหัวเลิกแตก 2 บรรทัดสมดุลเอง.
   ย้าย pre-wrap ไปอยู่ที่คลาส .is-manual ที่ blade ใส่ให้เฉพาะตอนค่ามีการขึ้นบรรทัดจริง
   → ไม่กด Enter = balance ทำงานเหมือนเดิม · กด Enter = ตัดตามที่พิมพ์ */
.lp-title{ font-size:3.1rem; line-height:1.14; margin:18px auto 0; font-weight:600; letter-spacing:-.02em; max-width:800px;
  text-wrap:balance; }
.lp-title.is-manual{ white-space:pre-wrap; }
@media(max-width:560px){ .lp-title{ font-size:2.3rem; } }
.u-pine{ color:var(--pine); } .u-terra{ color:var(--terra); position:relative; }
.u-terra::after{ content:''; position:absolute; left:0; right:0; bottom:4px; height:9px; background:var(--amber-soft); z-index:-1; border-radius:3px; }
.lp-lede{ font-size:1.04rem; color:var(--ink-2); line-height:1.7; margin:20px 0 26px; max-width:520px; }
.lp-ctas{ display:flex; gap:12px; flex-wrap:wrap; }

/* featured card */
.lp-hero-card{ position:relative; }
.lp-feat{ display:block; width:100%; text-align:left; background:var(--surface); border:1px solid var(--line);
  border-radius:var(--r4); overflow:hidden; cursor:pointer; box-shadow:var(--sh-3); transition:.22s; padding:0; }
.lp-feat:hover{ transform:translateY(-4px); box-shadow:0 18px 50px rgba(31,36,51,.16); }
.lp-feat-poster{ position:relative; aspect-ratio:16/9; overflow:hidden; display:flex; align-items:center; justify-content:center;
  background:radial-gradient(ellipse at 32% 28%, hsl(var(--hue),52%,55%) 0%, transparent 58%), linear-gradient(140deg, hsl(var(--hue),46%,32%), hsl(calc(var(--hue) + 26),50%,46%)); }
.lp-feat-cat{ position:absolute; top:13px; left:13px; background:rgba(31,36,51,.5); color:#fff; font-size:.72rem; font-weight:600;
  padding:5px 11px; border-radius:var(--pill); display:inline-flex; align-items:center; gap:6px; -webkit-backdrop-filter:blur(4px); backdrop-filter:blur(4px); }
.lp-play{ width:66px; height:66px; border-radius:50%; background:rgba(255,253,248,.95); color:var(--pine-deep);
  display:flex; align-items:center; justify-content:center; font-size:1.7rem; box-shadow:0 8px 26px rgba(0,0,0,.3); transition:.2s; }
.lp-feat:hover .lp-play{ transform:scale(1.08); }
.lp-feat-dur{ position:absolute; right:13px; bottom:13px; background:rgba(31,36,51,.7); color:#fff; font-size:.72rem; font-weight:600; padding:3px 9px; border-radius:6px; }
.lp-feat-body{ padding:16px 18px; }
.lp-feat-body h4{ font-size:1.08rem; line-height:1.35; margin-bottom:9px; }
.lp-feat-meta{ display:flex; gap:14px; font-size:.78rem; color:var(--ink-3); }
.lp-feat-meta span{ display:inline-flex; align-items:center; gap:5px; }
.lp-hero-tag{ display:flex; align-items:center; gap:8px; justify-content:center; margin-top:14px; font-size:.8rem; color:var(--ink-3); }
.lp-hero-tag .ph{ color:var(--amber-dark); }

/* flow strip */
.lp-flow{ display:flex; align-items:center; gap:8px; background:var(--surface); border:1px solid var(--line); border-radius:var(--r4); padding:18px 22px; box-shadow:var(--sh-1); }
.lp-flow-step{ display:flex; align-items:center; gap:13px; flex:1; }
.lp-flow-ic{ width:46px; height:46px; border-radius:14px; flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:1.4rem; }
.lp-flow-step b{ font-size:.98rem; }
.lp-flow-step p{ margin:2px 0 0; font-size:.78rem; color:var(--ink-3); line-height:1.4; }
.lp-flow-arr{ color:var(--ink-4); font-size:1.3rem; flex-shrink:0; }
@media(max-width:860px){ .lp-flow{ flex-direction:column; align-items:stretch; gap:14px; } .lp-flow-arr{ transform:rotate(90deg); align-self:center; } }

/* lesson grid + card */
.lp-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
@media(max-width:880px){ .lp-grid{ grid-template-columns:repeat(2,1fr); } }
@media(max-width:560px){ .lp-grid{ grid-template-columns:1fr; } }
/* v1.3.0p1: การ์ดเป็นแท็ก <a> จึงต้องปิดขีดเส้นใต้และสีลิงก์ที่ตกทอดถึงข้อความข้างใน
   ⚠️ ของเดิมไม่มีสองบรรทัดนี้ — การ์ดบทเรียนขีดเส้นใต้มาตลอดแต่ไม่มีใครสังเกต
   เพิ่งเห็นชัดตอนการ์ดข่าวย้ายมาใช้คลาสนี้ (คลาสเดิม .lp-news มี text-decoration:none อยู่) */
.lc{ display:flex; flex-direction:column; text-align:left; background:var(--surface); border:1px solid var(--line);
  border-radius:var(--r3); overflow:hidden; cursor:pointer; box-shadow:var(--sh-1); transition:.2s; padding:0;
  text-decoration:none; color:inherit; }
.lc:hover{ transform:translateY(-3px); box-shadow:var(--sh-3); border-color:color-mix(in srgb,var(--pine) 22%,var(--line)); }
.lc-poster{ position:relative; aspect-ratio:16/9; display:flex; align-items:center; justify-content:center;
  background:radial-gradient(ellipse at 30% 28%, hsl(var(--hue),50%,56%) 0%, transparent 60%), linear-gradient(140deg, hsl(var(--hue),44%,34%), hsl(calc(var(--hue) + 28),48%,48%)); }
.lc-ghost{ font-size:2.4rem; color:rgba(255,255,255,.45); position:absolute; }
.lc-play{ position:relative; z-index:1; width:46px; height:46px; border-radius:50%; background:rgba(255,253,248,.94); color:var(--pine-deep);
  display:flex; align-items:center; justify-content:center; font-size:1.15rem; opacity:0; transform:scale(.85); transition:.2s; }
.lc:hover .lc-play{ opacity:1; transform:scale(1); }
.lc-dur{ position:absolute; right:9px; bottom:9px; background:rgba(31,36,51,.72); color:#fff; font-size:.68rem; font-weight:600; padding:2px 7px; border-radius:5px; }
.lc-n{ position:absolute; left:9px; top:9px; background:rgba(255,253,248,.92); color:var(--pine-deep); font-size:.66rem; font-weight:700; padding:2px 8px; border-radius:var(--pill); }
.lc-body{ padding:13px 15px 15px; display:flex; flex-direction:column; flex:1; }
.lc-cat{ font-size:.68rem; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:var(--terra); }
.lc-title{ font-size:1rem; line-height:1.4; margin:5px 0 0; }
.lc-meta{ display:flex; align-items:center; gap:12px; margin-top:auto; padding-top:11px; font-size:.74rem; color:var(--ink-3); }
.lc-meta span{ display:inline-flex; align-items:center; gap:5px; }
.lc-quiz{ color:var(--pine)!important; font-weight:600; margin-left:auto; }
/* v1.0.6 (ข้อ 7): คำอธิบายย่อในการ์ด (2 บรรทัด) */
.lc-desc{ font-size:.82rem; color:var(--ink-3); line-height:1.5; margin:6px 0 0;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }

/* v1.0.6 (ข้อ 4): แถบชื่อโครงการวิจัยกึ่งกลาง (แทนวิดีโอแนะนำ) */
.lp-research-name{ text-align:center; padding:36px 28px 6px; }
.lp-research-name h2{ font-size:1.9rem; line-height:1.42; margin:8px auto 0; max-width:780px; }
.lp-research-abbr{ display:inline-block; margin-top:12px; font-size:.78rem; font-weight:700; letter-spacing:.05em;
  color:var(--terra); background:color-mix(in srgb,var(--terra) 12%,transparent); padding:5px 14px; border-radius:var(--pill); }
@media(max-width:560px){ .lp-research-name h2{ font-size:1.5rem; } }

/* research section */
.lp-research{ background:linear-gradient(150deg,var(--pine-dark),var(--pine-deep)); margin-top:26px; padding:42px 0; position:relative; overflow:hidden; }
.lp-research::before{ content:''; position:absolute; top:-100px; right:-80px; width:340px; height:340px; border-radius:50%; background:radial-gradient(circle,rgba(91,106,160,.18),transparent 65%); }
.lp-research-grid{ position:relative; z-index:1; display:grid; grid-template-columns:1.1fr .9fr; gap:38px; align-items:start; }
@media(max-width:880px){ .lp-research-grid{ grid-template-columns:1fr; gap:26px; } }
.lp-fund{ display:flex; flex-direction:column; gap:12px; margin-top:22px; }
.lp-fund-item{ display:flex; align-items:center; gap:13px; background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.1); border-radius:var(--r2); padding:12px 15px; }
.lp-fund-ic{ width:40px; height:40px; border-radius:11px; flex-shrink:0; background:rgba(91,106,160,.16); color:var(--amber); display:flex; align-items:center; justify-content:center; font-size:1.2rem; }
.lp-fund-item small{ display:block; font-size:.72rem; color:rgba(255,255,255,.55); }
.lp-fund-item b{ font-size:.88rem; color:#fff; font-weight:600; }
.lp-research-side{ display:flex; flex-direction:column; gap:20px; }
.lp-obj, .lp-team{ background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.1); border-radius:var(--r3); padding:18px 20px; }
.lp-obj-item{ display:flex; gap:11px; margin-bottom:11px; }
.lp-obj-item:last-child{ margin-bottom:0; }
.lp-obj-item span{ width:24px; height:24px; border-radius:50%; flex-shrink:0; background:var(--amber); color:var(--pine-deep); display:flex; align-items:center; justify-content:center; font-weight:700; font-size:.78rem; font-family:var(--serif); }
.lp-obj-item p{ margin:0; font-size:.86rem; color:rgba(255,255,255,.82); line-height:1.5; }
.lp-team-item{ display:flex; align-items:center; gap:11px; margin-bottom:12px; }
.lp-team-item:last-child{ margin-bottom:0; }
.lp-team-av{ width:38px; height:38px; border-radius:11px; flex-shrink:0; background:rgba(255,255,255,.1); color:rgba(255,255,255,.7); display:flex; align-items:center; justify-content:center; font-size:1.1rem; }
.lp-team-item b{ display:block; font-size:.86rem; color:#fff; }
.lp-team-item small{ font-size:.72rem; color:rgba(255,255,255,.55); }

/* news grid */
.lp-news-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
@media(max-width:880px){ .lp-news-grid{ grid-template-columns:1fr; } }
.lp-news{ display:flex; gap:13px; background:var(--surface); border:1px solid var(--line); border-radius:var(--r3); overflow:hidden; text-decoration:none; box-shadow:var(--sh-1); transition:.18s; padding:12px; }
.lp-news:hover{ transform:translateY(-2px); box-shadow:var(--sh-2); border-color:color-mix(in srgb,var(--pine) 22%,var(--line)); }
.lp-news-thumb{ position:relative; overflow:hidden; width:74px; height:74px; flex-shrink:0; border-radius:var(--r2); display:flex; align-items:center; justify-content:center; font-size:1.6rem; color:rgba(255,255,255,.9);
  background:linear-gradient(135deg, hsl(var(--hue),46%,36%), hsl(calc(var(--hue) + 26),50%,50%)); }
.lp-news-pin{ position:absolute; top:5px; right:5px; width:20px; height:20px; border-radius:50%; background:var(--amber); color:var(--pine-deep); display:flex; align-items:center; justify-content:center; font-size:.62rem; }
.lp-news-body{ min-width:0; display:flex; flex-direction:column; gap:4px; }
.lp-news-body h4{ font-size:.92rem; line-height:1.35; margin:2px 0; }

/* footer fund line */
.lp-foot-fund{ display:flex; gap:10px; align-items:flex-start; margin-top:24px; padding:14px 0 0; border-top:1px solid rgba(255,255,255,.12);
  font-size:.78rem; color:rgba(255,255,255,.6); line-height:1.55; }
.lp-foot-fund .ph{ color:var(--amber); flex-shrink:0; margin-top:1px; font-size:1rem; }

/* footer */
.lp-foot{ background:var(--pine-deep); color:#fff; margin-top:30px; padding:40px 0 22px; }
.lp-foot .brand-sub{ color:rgba(255,255,255,.55); }
.lp-foot .brand-name{ color:#fff; }
.lp-foot-grid{ display:grid; grid-template-columns:1.6fr 1fr 1fr 1.2fr; gap:30px; }
@media(max-width:760px){ .lp-foot-grid{ grid-template-columns:1fr 1fr; gap:24px; } }
.lp-foot h6{ font-size:.74rem; letter-spacing:.08em; text-transform:uppercase; color:var(--amber); margin:0 0 12px; font-family:var(--sans); font-weight:700; }
.lp-foot a, .lp-foot span{ display:flex; align-items:center; gap:7px; font-size:.84rem; color:rgba(255,255,255,.72); text-decoration:none; margin-bottom:9px; }
.lp-foot a:hover{ color:#fff; }
.lp-foot-bar{ display:flex; justify-content:space-between; gap:14px; flex-wrap:wrap; margin-top:26px; padding-top:18px;
  border-top:1px solid rgba(255,255,255,.12); font-size:.74rem; color:rgba(255,255,255,.5); }

/* modal */
.ov{ position:fixed; inset:0; z-index:700; background:rgba(31,36,51,.5); -webkit-backdrop-filter:blur(4px); backdrop-filter:blur(4px);
  display:flex; align-items:center; justify-content:center; padding:20px; animation:ovin .2s ease; }
@keyframes ovin{ from{opacity:0;} to{opacity:1;} }
.lm{ width:100%; max-width:430px; background:var(--surface); border-radius:var(--r4); box-shadow:var(--sh-3); overflow:hidden; animation:lmin .25s cubic-bezier(.2,.8,.3,1); }
@keyframes lmin{ from{opacity:0; transform:translateY(16px) scale(.97);} to{opacity:1; transform:none;} }
.lm-head{ display:flex; align-items:center; gap:13px; padding:20px 22px; border-bottom:1px solid var(--line-2); }
.lm-body{ padding:18px 22px 22px; display:flex; flex-direction:column; gap:11px; }
.lm-role{ display:flex; align-items:center; gap:13px; padding:13px 15px; border:1.5px solid var(--line); border-radius:var(--r3);
  background:var(--surface); cursor:pointer; transition:.15s; }
.lm-role:hover{ border-color:var(--pine); background:var(--pine-soft); transform:translateY(-1px); }
.lm-role-ic{ width:44px; height:44px; border-radius:13px; display:flex; align-items:center; justify-content:center; font-size:1.35rem; flex-shrink:0; }

/* ── player + quiz + pin (shared with student & teacher) ── */
.player{ position:relative; aspect-ratio:16/9; border-radius:var(--r3); overflow:hidden; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  background:radial-gradient(ellipse at 48% 32%, hsl(var(--hue,200),52%,46%) 0%, transparent 60%), linear-gradient(150deg,#2b3759,#3a4a77 60%,#1f2747); }
.player .pbig{ position:relative; z-index:2; width:78px; height:78px; border-radius:50%; background:rgba(255,253,248,.95); color:var(--pine-deep);
  display:flex; align-items:center; justify-content:center; font-size:2rem; box-shadow:0 10px 36px rgba(0,0,0,.4); transition:.2s; }
.player:hover .pbig{ transform:scale(1.07); }
.player .pcat{ position:absolute; left:14px; top:13px; z-index:2; background:rgba(31,36,51,.5); color:#fff; font-size:.72rem; padding:4px 11px;
  border-radius:var(--pill); display:inline-flex; gap:6px; align-items:center; }
.player .pdur{ position:absolute; right:13px; bottom:13px; z-index:2; background:rgba(31,36,51,.7); color:#fff; font-size:.72rem; font-weight:600; padding:3px 9px; border-radius:6px; }
.player .ptrack{ position:absolute; left:0; right:0; bottom:0; z-index:3; height:5px; background:rgba(255,255,255,.22); }
.player .ptrack > i{ display:block; height:100%; width:38%; background:var(--amber); }

/* Real embedded course player (v1.0.2 ล.2) — force the SDK-created iframe to fill a 16:9 box */
.course-video{ position:relative; width:100%; aspect-ratio:16/9; border-radius:var(--r3); overflow:hidden; box-shadow:var(--sh-2); background:#000; }
.course-video iframe{ position:absolute; inset:0; width:100%; height:100%; border:0; }

.chap{ display:flex; align-items:center; gap:10px; padding:11px 12px; border-radius:var(--r2); cursor:pointer; font-size:.86rem; border:1.5px solid transparent; transition:.15s; }
.chap:hover{ background:var(--surface-2); }
.chap.on{ background:var(--pine-soft); border-color:color-mix(in srgb,var(--pine) 25%,transparent); font-weight:600; }
.chap .ci{ width:26px; height:26px; border-radius:50%; flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:.72rem; font-weight:700; background:var(--paper-2); color:var(--ink-3); }
.chap.done .ci{ background:var(--ok); color:#fff; }
.chap.on .ci{ background:var(--pine); color:#fff; }
.chap .lk{ margin-left:auto; color:var(--ink-4); }

.qopt{ display:flex; align-items:center; gap:12px; padding:14px 16px; border:1.5px solid var(--line); border-radius:var(--r2);
  background:var(--surface); cursor:pointer; font-size:.92rem; transition:.15s; width:100%; text-align:left; font-family:var(--sans); color:var(--ink); }
.qopt:hover{ border-color:var(--pine); background:var(--pine-soft); }
.qopt .k{ width:30px; height:30px; border-radius:8px; background:var(--surface-2); border:1.5px solid var(--line); display:flex; align-items:center; justify-content:center; font-weight:700; flex-shrink:0; }
.qopt.sel{ border-color:var(--pine); background:var(--pine-soft); }
.qopt.sel .k{ background:var(--pine); color:#fff; border-color:var(--pine); }
.qopt.correct{ border-color:var(--ok); background:var(--ok-soft); }
.qopt.correct .k{ background:var(--ok); color:#fff; border-color:var(--ok); }
.qopt.wrong{ border-color:var(--bad); background:var(--bad-soft); }
.qopt.wrong .k{ background:var(--bad); color:#fff; border-color:var(--bad); }

.pin-row{ display:flex; gap:10px; justify-content:center; }
.pin-cell{ width:50px; height:62px; border:2px solid var(--line); border-radius:var(--r2); background:var(--surface);
  display:flex; align-items:center; justify-content:center; font-size:1.8rem; font-weight:700; font-family:var(--serif); color:var(--ink); }
.pin-cell.filled{ border-color:var(--pine); background:var(--pine-soft); }
.keypad{ display:grid; grid-template-columns:repeat(3,1fr); gap:10px; max-width:280px; margin:0 auto; }
.key{ font-family:var(--serif); font-size:1.4rem; font-weight:600; padding:14px; border-radius:var(--r2); border:1.5px solid var(--line);
  background:var(--surface); color:var(--ink); cursor:pointer; transition:.12s; }
.key:hover{ background:var(--pine-soft); border-color:var(--pine); color:var(--pine-dark); }
.key:active{ transform:scale(.95); }
.key.muted{ background:transparent; border-color:transparent; cursor:default; }
.pin-chip{ font-family:var(--serif); font-weight:700; letter-spacing:3px; font-size:1rem; background:linear-gradient(135deg,var(--amber),var(--amber-dark));
  color:#fff; padding:5px 13px; border-radius:8px; display:inline-flex; align-items:center; gap:7px; }

.ring-big{ width:96px; height:96px; border-radius:50%; margin:0 auto 16px; background:var(--pine-soft); color:var(--pine);
  display:flex; align-items:center; justify-content:center; font-size:3rem; }

/* toasts */
.toast-container{ position:fixed; bottom:22px; left:50%; transform:translateX(-50%); z-index:900; display:flex; flex-direction:column; gap:9px; align-items:center; }
.toast{ display:flex; align-items:center; gap:9px; background:var(--ink); color:var(--surface); padding:11px 17px; border-radius:var(--pill);
  font-size:.86rem; font-weight:500; box-shadow:var(--sh-3); animation:tin .25s ease; }
.toast .ph{ font-size:1.1rem; }
.toast-error{ background:var(--bad); } .toast-success{ background:var(--ok); }
@keyframes tin{ from{opacity:0; transform:translateY(10px);} to{opacity:1; transform:none;} }

/* ── v1.0.9 (A2): โลโก้กึ่งกลางฮีโร่ ── */
/* v1.1.0: ขยายโลโก้ฮีโร่ +50% (84→126px) ตามฟีดแบ็กผู้ใช้ */
.lp-hero-logo{ height:126px; max-width:345px; object-fit:contain; display:block; margin:0 auto 20px; }
@media (max-width:640px){ .lp-hero-logo{ height:96px; } }

/* ── v1.0.9 (A3): การ์ดบทเรียนเสริมหน้าแรก ── */
.lp-bonus-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:16px; }
.lp-bonus{ text-decoration:none; color:inherit; overflow:hidden; display:flex; flex-direction:column; }
.lp-bonus-thumb{ position:relative; aspect-ratio:16/9; overflow:hidden; display:flex; align-items:center; justify-content:center; }
.lp-bonus-body{ padding:12px 14px; flex:1; display:flex; flex-direction:column; gap:6px; }

/* ── v1.1.1: การ์ดทีมงาน (หน้าเกี่ยวกับเรา) — โดดเด่นขึ้น รูปวงกลม + แถบสีหัวการ์ด ── */
.team-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:18px; margin-top:6px; }
.team-card{ position:relative; text-align:center; background:#fff; border:1px solid var(--line); border-radius:20px; padding:0 20px 24px; overflow:hidden; transition:transform .2s ease, box-shadow .2s ease; }
.team-card:hover{ transform:translateY(-4px); box-shadow:0 14px 32px rgba(43,55,89,.14); }
.team-band{ height:66px; margin:0 -20px 0; background:linear-gradient(135deg,var(--plum),var(--pine)); }
.team-photo{ width:118px; height:118px; border-radius:50%; object-fit:cover; margin:-59px auto 12px; position:relative; border:4px solid #fff; box-shadow:0 4px 14px rgba(0,0,0,.12); background:var(--paper-2); display:block; }
.team-photo--ph{ display:flex; align-items:center; justify-content:center; font-size:2.6rem; color:var(--pine); }
.team-name{ font-size:1.05rem; font-weight:700; color:var(--ink); line-height:1.35; }
.team-role{ display:inline-block; margin:9px 0 5px; background:var(--pine-soft); color:var(--pine); font-size:.76rem; font-weight:700; padding:4px 13px; border-radius:999px; }
.team-unit{ font-size:.83rem; color:var(--ink-3); }

/* ═══ v1.1.4 (A): ประกาศเด้งบังหน้าแรก ═══ */
.ann-bg{ position:fixed; inset:0; z-index:150; background:rgba(31,36,51,.62);
  display:flex; align-items:center; justify-content:center; padding:20px; }
.ann-bg[hidden]{ display:none; }
.ann{ position:relative; background:var(--surface); border-radius:var(--r4); max-width:520px; width:100%;
  overflow:hidden; box-shadow:var(--sh-3); max-height:92vh; display:flex; flex-direction:column; }
.ann-img{ aspect-ratio:16/9; background:var(--pine-soft); flex:none; }
.ann-img img{ width:100%; height:100%; object-fit:cover; display:block; }
.ann-body{ padding:24px 26px; overflow-y:auto; }
.ann-tag{ display:inline-flex; align-items:center; gap:6px; font-size:.74rem; font-weight:700; letter-spacing:.3px;
  background:var(--terra-soft); color:var(--terra-dark); padding:4px 12px; border-radius:var(--pill); }
.ann h2{ font-family:var(--serif); font-size:1.4rem; margin:11px 0 8px; color:var(--pine-deep); line-height:1.45; }
.ann p{ margin:0; color:var(--ink-2); font-size:.94rem; line-height:1.8; }
.ann-foot{ padding:16px 26px 22px; display:flex; gap:10px; flex-wrap:wrap; align-items:center; border-top:1px solid var(--line-2); }
.ann-close{ position:absolute; top:14px; right:16px; z-index:2; width:34px; height:34px; border-radius:50%; border:none;
  background:rgba(255,255,255,.92); color:var(--ink); cursor:pointer; font-size:1rem;
  display:flex; align-items:center; justify-content:center; box-shadow:var(--sh-1); }
.ann-close:hover{ background:#fff; }
@media (max-width:520px){ .ann h2{ font-size:1.22rem; } .ann-body{ padding:20px; } .ann-foot{ padding:14px 20px 18px; } }

/* แถบเตือนผู้ดูแลขณะระบบปิดปรับปรุง */
.maint-strip{ background:var(--warn); color:#fff; padding:9px 18px; font-size:.85rem; font-weight:600;
  display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.maint-strip a{ color:#fff; text-decoration:underline; }
.ann-never{ margin-left:auto; background:none; border:none; padding:6px 4px; cursor:pointer;
  font-family:var(--sans); font-size:.82rem; color:var(--ink-3); text-decoration:underline; }
.ann-never:hover{ color:var(--ink-2); }

/* ═══ v1.1.8: การ์ดวิดีโอ hero (แทนโลโก้เดิม)
   v1.2.0: ยกป้าย/ชื่อคลิป/ปุ่ม ออกจากกรอบวิดีโอลงมาเป็นแถบข้อความใต้ภาพ —
   กรอบวิดีโอเหลือแค่ภาพล้วน (ตัด .hv-grad ที่เคยต้องใช้บังให้ตัวหนังสืออ่านออกทิ้ง)
   แถบล่างตั้งใจให้ "จาง" ไม่มีพื้นการ์ด/กรอบ/เงา เพื่อไม่แย่งความสนใจจากพาดหัวฝั่งขวา ═══ */
.lp-hero-video{ width:min(100%,470px); }
.hv-frame{ position:relative; aspect-ratio:16/9; border-radius:18px; overflow:hidden;
  box-shadow:0 4px 12px rgba(31,36,51,.08), 0 18px 44px rgba(31,36,51,.16); background:#0d1020; isolation:isolate; }
.hv-frame iframe{ position:absolute!important; inset:0!important; width:100%!important; height:100%!important; border:0; }
.hv-host{ position:absolute; inset:0; z-index:0; }
.hv-host > *{ position:absolute; inset:0; width:100%; height:100%; }
.hv-cover{ position:absolute; inset:0; z-index:3; background:#0d1020 center/cover no-repeat;
  opacity:0; transition:opacity .7s ease; pointer-events:none; }
.hv-cover.show{ opacity:1; }
.hv-cover::after{ content:''; position:absolute; inset:0; background:linear-gradient(120deg,rgba(20,26,52,.30),rgba(6,8,20,.55)); }

.hv-meta{ padding:0 4px; }
/* เส้นความคืบหน้าของช่วง 30 วิ (โหมดสุ่มบทเรียนเท่านั้น) */
.hv-progress{ position:relative; height:2px; border-radius:2px; background:var(--line); margin:9px 0 0; overflow:hidden; }
.hv-progress > span{ position:absolute; top:0; left:0; height:100%; width:0; background:var(--terra); border-radius:2px; }

.hv-line{ display:flex; align-items:center; gap:7px; margin-top:9px; font-size:.7rem; color:var(--ink-3); }
.hv-badge{ display:inline-flex; align-items:center; gap:5px; font-weight:600; }
.hv-badge .dot{ width:5px; height:5px; border-radius:50%; background:var(--ok); animation:hvPulse 1.8s infinite; }
@keyframes hvPulse{ 0%{ box-shadow:0 0 0 0 rgba(47,143,99,.5);} 70%{ box-shadow:0 0 0 6px rgba(47,143,99,0);} 100%{ box-shadow:0 0 0 0 rgba(47,143,99,0);} }
.hv-sep{ color:var(--ink-4); }
.hv-seg{ font-variant-numeric:tabular-nums; }
.hv-tools{ margin-left:auto; display:flex; gap:2px; }
.hv-tools button{ width:26px; height:26px; border-radius:50%; border:none; background:transparent; color:var(--ink-4);
  font-size:.95rem; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; transition:.15s; }
.hv-tools button:hover{ color:var(--pine); background:var(--pine-soft); }
.hv-mute .on{ display:none; } .hv-mute.unmuted .on{ display:block; } .hv-mute.unmuted .off{ display:none; }
.hv-mute.unmuted{ color:var(--pine-dark); background:var(--pine-soft); }

.hv-ti{ font-size:.86rem; font-weight:600; line-height:1.45; color:var(--ink-2); margin:5px 0 0;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.hv-foot{ display:flex; align-items:center; gap:10px; margin-top:3px; }
.hv-ch{ font-size:.68rem; color:var(--ink-4); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.hv-link{ margin-left:auto; flex-shrink:0; display:inline-flex; align-items:center; gap:4px;
  font-size:.72rem; font-weight:600; color:var(--terra); text-decoration:none; }
.hv-link:hover{ color:var(--terra-dark); text-decoration:underline; }

/* โหมด "วิดีโอแนะนำ" — ข้อมูลชุดเดียวกัน ต่างแค่ไม่มีช่วงสุ่ม 30 วิ */
.lp-hero-video.is-featured .hv-progress,
.lp-hero-video.is-featured .hv-seg,
.lp-hero-video.is-featured .hv-sep{ display:none; }
/* ยังไม่รู้ข้อมูลคลิป (กำลังโหลด / ดึงไม่ได้) → ซ่อนบรรทัดนั้นไว้ ไม่ทิ้งที่ว่างเปล่า */
.hv-ti:empty, .hv-ch:empty{ display:none; }
.hv-link[hidden]{ display:none; }
/* ยังไม่มีเลขช่วงเวลา → ซ่อนจุดคั่นด้วย ไม่ให้เห็น "·" ลอยเดี่ยว (เบราว์เซอร์เก่าไม่รู้จัก :has ก็แค่เห็นจุดชั่วครู่) */
.hv-line:has(.hv-seg:empty) .hv-sep{ display:none; }

@media (max-width:820px){ .lp-hero-video{ width:100%; } }
