/* ============================================================
   OrcaDMS — เว็บไซต์แนะนำผลิตภัณฑ์
   ชุดสี: slate (พื้น) + sky (แบรนด์) + amber (จุดเน้นเล็กๆ) — สงบตา ไม่ฉูดฉาด
   ฟอนต์: IBM Plex Sans Thai (ไทย) + Inter (ตัวเลข/อังกฤษ)
   ทุกการเคลื่อนไหวปิดเองเมื่อผู้ใช้ตั้งค่า "ลดการเคลื่อนไหว" ไว้ที่ระบบ
   ============================================================ */
:root {
  --ink: #0b1220;
  --ink-2: #101a2c;
  --paper: #f7f9fc;
  --card: #ffffff;
  --line: #e6ebf2;
  --text: #475569;
  --head: #0f172a;
  --muted: #7c8b9e;
  --brand: #0ea5e9;
  --brand-2: #38bdf8;
  --brand-deep: #0369a1;
  --amber: #f59e0b;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px rgba(15, 23, 42, .07);
  --shadow-lg: 0 24px 70px rgba(8, 20, 40, .18);
  --ease: cubic-bezier(.22, .8, .28, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: 'IBM Plex Sans Thai', 'Inter', -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3 { color: var(--head); font-weight: 600; line-height: 1.3; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(34px, 4.3vw, 50px); font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: clamp(26px, 3.2vw, 40px); }
h3 { font-size: 18px; }
p { margin: 0; }

.wrap { width: min(1180px, calc(100vw - 44px)); margin: 0 auto; }
.wrap.narrow { width: min(820px, calc(100vw - 44px)); }
.wrap.center { text-align: center; }
.section { padding: clamp(52px, 5.4vw, 80px) 0; scroll-margin-top: 76px; }
.section.dark { background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%); color: #a9b8cc; }
.section.dark h2, .section.dark h3 { color: #f1f6fb; }

/* ---------------- แถบความคืบหน้าการเลื่อน ---------------- */
.progress {
  position: fixed; inset: 0 auto auto 0; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  z-index: 60; transition: width .1s linear;
}

/* ---------------- แถบเมนู ---------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 26px;
  padding: 14px clamp(16px, 4vw, 40px);
  transition: background .35s var(--ease), box-shadow .35s var(--ease), backdrop-filter .35s;
}
.nav.stuck {
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 1px 0 rgba(15, 23, 42, .07);
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font-size: 18px; color: #fff; font-weight: 600; }
.brand img { border-radius: 7px; }
.brand b { color: var(--brand-2); font-weight: 700; }
.brand i { color: var(--amber); font-style: normal; }
.nav.stuck .brand { color: var(--head); }
.nav.stuck .brand b { color: var(--brand); }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a {
  color: rgba(255, 255, 255, .82); text-decoration: none; font-size: 14.5px;
  position: relative; padding: 4px 0;
}
.nav.stuck .nav-links a { color: var(--text); }
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 1.5px; width: 0;
  background: var(--brand); transition: width .3s var(--ease);
}
.nav-links a:hover::after { width: 100%; }

/* ---------------- ปุ่ม ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 48px; padding: 0 24px; border-radius: 999px;
  font-family: inherit; font-size: 15px; font-weight: 500; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, color .25s, border-color .25s;
}
.btn.sm { height: 38px; padding: 0 18px; font-size: 14px; }
.btn.lg { height: 54px; padding: 0 30px; font-size: 16px; }
.btn.block { width: 100%; }
.btn.primary { background: var(--brand); color: #fff; box-shadow: 0 10px 24px rgba(14, 165, 233, .28); }
.btn.primary:hover { background: var(--brand-deep); box-shadow: 0 16px 34px rgba(14, 165, 233, .34); }
.btn.ghost { border-color: rgba(255, 255, 255, .28); color: #e9f2fb; }
.btn.ghost:hover { border-color: var(--brand-2); color: #fff; }
.section:not(.dark) .btn.ghost, .plan .btn.ghost { border-color: var(--line); color: var(--head); background: #fff; }
.section:not(.dark) .btn.ghost:hover { border-color: var(--brand); color: var(--brand); }
.nav.stuck .btn.ghost { border-color: var(--line); color: var(--head); }

/* ============================ HERO ============================
   พระเอกคือหน้าต่างโปรแกรมจริง — ข้อความอยู่กลาง แล้วภาพหน้าจอเต็มความกว้างข้างล่าง
   พื้นเข้มเรียบพร้อมเส้นบรรทัดสมุดบัญชีจางๆ ไม่มีแสงเบลอ ไม่มีการ์ดลอยทับภาพ */
.hero { position: relative; padding: 92px 0 0; background: var(--ink); overflow: hidden; scroll-margin-top: 0; }
/* เส้นบรรทัดแบบสมุดแยกประเภท — นิ่งสนิท จางพอให้เป็นผิวสัมผัส ไม่ใช่ลวดลาย */
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(180deg, transparent 0 35px, rgba(148, 180, 212, .07) 35px 36px);
  mask-image: linear-gradient(180deg, transparent 0, #000 130px, #000 60%, transparent 97%);
}
.hero-inner {
  position: relative; z-index: 2;
  width: min(1180px, calc(100vw - 44px)); margin: 0 auto;
  padding-bottom: 56px;
}
.hero-copy { color: #9fb2c9; max-width: 860px; margin: 0 auto; text-align: center; }
.hero-kicker {
  display: flex; justify-content: center; align-items: center; gap: 12px;
  color: #8ea2ba; font-size: 13.5px; letter-spacing: .02em; margin-bottom: 16px;
}
.hero-kicker::before { content: ''; width: 26px; height: 2px; background: var(--amber); flex: none; }

.hero h1 { color: #fff; margin-bottom: 20px; }
.hero h1 .accent { color: var(--brand-2); }
/* คำที่ต้องการเน้นในหัวข้อของส่วนอื่นด้วย ไม่ใช่แค่ hero */
.section h2 .accent { color: var(--brand-2); }
.hero h1 .nb { white-space: nowrap; }
.lede { font-size: 17px; line-height: 1.85; max-width: 34em; }
.hero-copy .lede { margin: 0 auto; max-width: 44em; }
/* **ภาษาไทยไม่มีช่องว่างระหว่างคำ** เบราว์เซอร์จึงตัดที่พยางค์ได้ทุกที่ —
   "ออกเลขที่เอกสาร" กลายเป็น "ออกเลข / ที่เอกสาร" ซึ่งอ่านผิดความหมายทันที
   .nb คือเครื่องหมายว่า "วลีนี้ห้ามขาด" · ใช้กับหัวข้อทุกระดับ ไม่ใช่แค่ hero
   (กติกาเดียวกับที่ theme.css ของตัวโปรแกรมกันคอลัมน์ตารางไว้) */
h1 .nb, h2 .nb, h3 .nb, .lede .nb, .sub .nb, .fineprint .nb { white-space: nowrap; }
.lede b { color: #e2eefb; font-weight: 600; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero-copy .cta-row { justify-content: center; }
.cta-row.center { justify-content: center; }
.fineprint { margin-top: 20px; font-size: 13.5px; color: #7d90a8; }
.fineprint-ai { color: #fbbf24; text-decoration: none; border-bottom: 1px solid rgba(245, 158, 11, .45); }
.fineprint-ai:hover { color: #fcd34d; border-bottom-color: #fbbf24; }
.fineprint.center { text-align: center; color: var(--muted); margin-top: 30px; }

/* ---- หน้าต่างโปรแกรม ---- */
.hero-app { margin-top: 42px; }

/* ปุ่มสลับหน้าจอ — เป็นของที่ต้องมี JS จึงซ่อนไว้เมื่อไม่มีคลาส js (ภาพแรกยังแสดงตามปกติ) */
.hero-tabs { display: none; }
html.js .hero-tabs {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 18px;
}
.htab {
  display: grid; gap: 1px; text-align: left; cursor: pointer;
  padding: 9px 16px 10px; border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .03);
  font-family: inherit; transition: border-color .25s, background .25s;
}
.htab b { font-size: 13.5px; font-weight: 600; color: #c6d5e6; }
.htab span { font-size: 12px; color: #64809c; }
.htab:hover { border-color: rgba(56, 189, 248, .45); }
.htab.on { border-color: rgba(56, 189, 248, .65); background: rgba(56, 189, 248, .1); }
.htab.on b { color: #e8f5ff; }
.htab.on span { color: #8fb6d4; }

.hero-window {
  margin: 0 auto; max-width: 1060px;
  background: #0d1526; border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px;
  overflow: hidden; box-shadow: 0 34px 90px rgba(1, 6, 16, .6), 0 3px 12px rgba(1, 6, 16, .4);
}
.hw-bar {
  display: flex; align-items: center; gap: 12px; padding: 9px 14px;
  background: rgba(255, 255, 255, .045); border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.hw-dots { display: flex; gap: 6px; flex: none; }
.hw-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.hw-bar b {
  font-family: 'Inter', 'IBM Plex Sans Thai', sans-serif; font-size: 12px; font-weight: 500;
  color: #8ea2ba; letter-spacing: .02em;
}
.hw-live { margin-left: auto; font-size: 12px; color: #56708c; }
/* สัดส่วนหน้าต่างล็อกไว้เท่าภาพ (1.53) — ทั้งสี่ภาพสัดส่วนเดียวกัน สลับแล้วสูงเท่าเดิมเป๊ะ */
.hw-body { position: relative; aspect-ratio: 1800 / 1176; background: #eef2f7; }
.hw-body img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: top left; display: none;
}
.hw-body img.on { display: block; }

/* ---- สามบรรทัดความแม่นยำใต้ภาพ — ตัวหนังสือเล็ก ไม่ใช่การ์ด ไม่ลอยทับอะไร ---- */
.hero-points {
  max-width: 1060px; margin: 20px auto 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 30px;
}
.hero-points p {
  position: relative; padding-left: 20px;
  font-size: 12.5px; line-height: 1.8; color: #7d90a8;
}
.hero-points p::before {
  content: ''; position: absolute; left: 3px; top: 8px; width: 6px; height: 10px;
  border: solid var(--brand-2); border-width: 0 2px 2px 0; transform: rotate(45deg); opacity: .8;
}
.hero-points b { color: #c6d5e6; font-weight: 600; }

/* ---- ดัชนีเอกสารแบบนิ่ง (แทนแถบตัววิ่ง) ---- */
.hero-index {
  position: relative; z-index: 2; border-top: 1px solid rgba(255, 255, 255, .08);
  padding: 16px 0 20px; background: rgba(255, 255, 255, .02);
}
.hero-index .wrap { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; }
.hero-index span { color: #7d90a8; font-size: 13px; white-space: nowrap; }
.hero-index i { color: #3d5473; font-style: normal; font-size: 13px; }

/* ---- แสงออโรราเคลื่อนช้าๆ — เหลือใช้เฉพาะส่วนปิดท้ายและเมนูเต็มจอ ---- */
.aurora { position: absolute; inset: 0; overflow: hidden; }
.aurora .blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; }
.aurora .b1 { width: 620px; height: 620px; background: #0284c7; top: -180px; left: -120px; animation: drift1 22s ease-in-out infinite; }
.aurora .b2 { width: 540px; height: 540px; background: #7c3aed; top: 40px; right: -140px; opacity: .32; animation: drift2 26s ease-in-out infinite; }
.aurora.small .b1 { width: 420px; height: 420px; }
.aurora.small .b2 { width: 380px; height: 380px; }
@keyframes drift1 { 0%, 100% { transform: translate(0, 0) scale(1) } 50% { transform: translate(80px, 60px) scale(1.12) } }
@keyframes drift2 { 0%, 100% { transform: translate(0, 0) scale(1) } 50% { transform: translate(-70px, 80px) scale(1.08) } }

/* bob ยังใช้กับไอคอนแอปในส่วนเดสก์ท็อป */
@keyframes bob { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-12px) } }

/* ============================ ส่วนเนื้อหา ============================ */
.head { max-width: 760px; margin: 0 auto 38px; text-align: center; }
.kicker {
  color: var(--brand); font-size: 13px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; margin-bottom: 12px;
}
.section.dark .kicker { color: var(--brand-2); }
.head .sub { margin-top: 14px; font-size: 16.5px; }
.sub { color: var(--muted); }
.section.dark .sub { color: #8ea2ba; }

.cards { display: grid; gap: 20px; }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.cards.four { grid-template-columns: repeat(4, 1fr); }

.card, .feat, .plan {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--shadow);
}
.card .ico {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(140deg, #e0f2fe, #f1f5f9); font-size: 20px; margin-bottom: 16px;
}
.card h3, .feat h3 { margin-bottom: 8px; }
.card p, .feat p { font-size: 14.5px; line-height: 1.8; }
.feat .num {
  font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 600; letter-spacing: .1em;
  color: var(--brand); display: block; margin-bottom: 12px;
}
.feat em { color: var(--muted); font-style: normal; display: block; margin-top: 6px; font-size: 13.5px; }

.lift { transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s; }
.lift:hover { transform: translateY(-6px); box-shadow: 0 20px 48px rgba(15, 23, 42, .12); border-color: #cfe3f5; }

/* ---------------- สายเอกสาร ---------------- */
.chain { position: relative; margin: 10px 0 44px; }
.chain-steps { position: relative; z-index: 1; }
.chain-line { position: absolute; left: 0; right: 0; top: 32px; width: 100%; height: 60px; z-index: 0; }
.chain-line path { fill: none; stroke: rgba(255, 255, 255, .12); stroke-width: 2; }
.chain-line .chain-dash {
  stroke: var(--brand-2); stroke-width: 2.5; stroke-dasharray: 10 990; stroke-linecap: round;
  animation: run 6s linear infinite; filter: drop-shadow(0 0 6px rgba(56, 189, 248, .8));
}
@keyframes run { to { stroke-dashoffset: -1000 } }
.chain-steps { list-style: none; display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; padding: 0; margin: 0; position: relative; }
.step {
  text-align: center; padding: 18px 10px; border-radius: 14px;
  background: #101d31; border: 1px solid rgba(255, 255, 255, .08);
  transition: transform .45s var(--ease), background .45s, border-color .45s, box-shadow .45s;
}
.step b {
  display: block; font-family: 'Inter', sans-serif; font-size: 20px; font-weight: 700;
  color: #dbeafe; letter-spacing: .04em;
}
.step span { font-size: 13px; color: #8ea2ba; }
.step.on {
  background: #123049; border-color: rgba(56, 189, 248, .5);
  transform: translateY(-8px); box-shadow: 0 18px 40px rgba(2, 132, 199, .3);
}
.step.on b { color: #fff; }
.step.on span { color: #cfe6f8; }

.chain-notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.note {
  padding: 18px 20px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .09);
  background: rgba(255, 255, 255, .03);
}
.note b { display: block; color: #eaf3fb; font-weight: 600; margin-bottom: 4px; font-size: 15px; }
.note span { font-size: 14px; color: #8ea2ba; }

/* ---------------- ตัวเลข ---------------- */
.stats-band { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 60px 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat b {
  display: block; font-family: 'Inter', sans-serif; font-size: clamp(34px, 4vw, 52px);
  font-weight: 700; color: var(--head); line-height: 1.1; letter-spacing: -.02em;
}
.stat span { font-size: 14px; color: var(--muted); }

/* ---------------- แถบภาพหน้าจอ ----------------
   ของเดิมเลื่อนเองตามการสกรอลล์และกดอะไรไม่ได้ · ตอนนี้เป็นแถบเลื่อนของจริง
   ที่ปัด ลาก กดลูกศร และกดเปิดดูเต็มได้ — เหมือนกันทุกขนาดจอ ไม่มีโหมดพิเศษ
   ให้ต้องจำว่าจอไหนทำอะไรได้บ้าง */
.screens { overflow: hidden; }
.rail-wrap { position: relative; }
.rail {
  display: flex; align-items: stretch; gap: 20px;
  padding: 10px max(22px, calc((100vw - 1180px) / 2)) 26px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-left: max(22px, calc((100vw - 1180px) / 2));
  scrollbar-width: none; -webkit-overflow-scrolling: touch; cursor: grab;
}
.rail::-webkit-scrollbar { display: none; }
.rail:focus-visible { outline: 2px solid var(--brand); outline-offset: -4px; border-radius: 4px; }
.rail.dragging { cursor: grabbing; scroll-snap-type: none; }
.rail.dragging .frame { pointer-events: none; }

/* การ์ดคือ <button> เพราะมันกดได้จริง — ไม่ใช่ div ที่แปะ onclick แล้วคีย์บอร์ดเข้าไม่ถึง */
.frame {
  scroll-snap-align: start; flex: 0 0 clamp(268px, 34vw, 460px);
  display: flex; flex-direction: column; position: relative;
  margin: 0; padding: 0; text-align: left; font: inherit; cursor: pointer;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.frame:hover, .frame:focus-visible { transform: translateY(-6px); border-color: rgba(14,165,233,.45);
  box-shadow: 0 26px 50px -22px rgba(15,42,71,.4); outline: none; }

/* แถบหัวหน้าต่างเล็กๆ — บอกด้วยรูปทรงว่า "นี่คือหน้าจอโปรแกรมจริง" โดยไม่ต้องเขียนบอก
   (รูปเดียวกับหน้าต่างใน hero และคอนโซลของส่วน AI) */
.frame-bar { display: flex; align-items: center; gap: 6px; padding: 9px 13px; background: #f4f7fa;
  border-bottom: 1px solid var(--line); }
.frame-bar i { width: 8px; height: 8px; border-radius: 50%; background: #d3dce5; flex: none; }
.frame-bar i:first-child { background: #f8a9a2; } .frame-bar i:nth-child(2) { background: #f7d08a; }
.frame-bar em { margin-left: 6px; font-style: normal; font-size: 12px; color: #7b8ea1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.frame-img { display: block; overflow: hidden; background: #eef2f7; }
.frame-img img { display: block; width: 100%; height: clamp(190px, 21vw, 280px);
  object-fit: cover; object-position: top left;
  transition: transform .45s var(--ease); }
.frame:hover .frame-img img { transform: scale(1.035); }

.frame-cap { display: block; padding: 13px 16px 15px; border-top: 1px solid var(--line); }
.frame-cap b { display: block; font-size: 14.5px; color: var(--head); font-weight: 600; }
.frame-cap span { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.6; color: var(--muted); }

/* ป้าย "ดูเต็ม" โผล่ตอนชี้ — บอกว่ากดได้ โดยไม่กินที่ตอนไม่ได้ชี้ */
.frame-zoom {
  position: absolute; top: 46px; right: 12px; padding: 5px 11px; border-radius: 999px;
  background: rgba(11,18,32,.82); color: #fff; font-size: 12px; backdrop-filter: blur(4px);
  opacity: 0; transform: translateY(-4px); transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.frame:hover .frame-zoom, .frame:focus-visible .frame-zoom { opacity: 1; transform: none; }

/* แถบควบคุม — เส้นบอกตำแหน่ง เลขบอกว่าอยู่ภาพที่เท่าไรจากทั้งหมด และปุ่มลูกศร */
/* ปุ่มกับตัวนับทำงานด้วย JS ทั้งหมด — ปิด JS แล้วต้องไม่มีให้กด เพราะปุ่มที่กดแล้วไม่เกิดอะไร
   แย่กว่าไม่มีปุ่ม · แถบยังเลื่อนได้ตามปกติเพราะการเลื่อนเป็นของ CSS ไม่ใช่ของ JS
   (รูปเดียวกับ .hero-tabs ที่ซ่อนปุ่มสลับเมื่อไม่มี JS) */
.rail-ctl { display: none; }
html.js .rail-ctl { display: flex; align-items: center; gap: 14px; }
.rail-track { flex: 1; height: 3px; background: var(--line); border-radius: 999px; overflow: hidden; }
.rail-track i { display: block; height: 100%; width: 20%; background: var(--brand); border-radius: 999px;
  transition: width .25s var(--ease), transform .25s var(--ease); }
.rail-count { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rail-btn {
  width: 42px; height: 42px; flex: none; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--head); cursor: pointer;
  transition: border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease);
}
.rail-btn:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.rail-btn:disabled { opacity: .35; cursor: default; }

/* ---------------- ดูภาพเต็ม ---------------- */
body.lb-open { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
  background: rgba(6,12,22,.93); padding: 3vh 3vw; }
.lb[hidden] { display: none; }
.lb-box { margin: 0; max-width: min(1400px, 94vw); max-height: 94vh; display: flex; flex-direction: column; gap: 12px; }
.lb-shot { display: block; }
.lb-box img { display: block; margin: 0 auto; max-width: 100%; max-height: 80vh; object-fit: contain; border-radius: 10px;
  background: #fff; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.lb-box figcaption { text-align: center; color: #c3d3e5; font-size: 14px; }
.lb-box figcaption b { color: #fff; font-size: 15.5px; margin-right: 8px; }
.lb-hint { display: none; margin-top: 6px; font-size: 12px; color: #6f87a1; }
.lb-box figcaption em { display: block; margin-top: 5px; font-style: normal; font-size: 12.5px;
  color: #7d90a8; font-variant-numeric: tabular-nums; }
.lb-close, .lb-nav {
  position: absolute; display: grid; place-items: center; cursor: pointer; color: #cfe0ee;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 50%;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.lb-close:hover, .lb-nav:hover { background: rgba(255,255,255,.18); color: #fff; }
.lb-close { top: 18px; right: 18px; width: 46px; height: 46px; }
.lb-nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; }
.lb-nav.prev { left: 16px; } .lb-nav.next { right: 16px; }
@media (max-width: 780px) {
  .lb { padding: 0; }
  /* **ย่อภาพหน้าจอเดสก์ท็อปให้พอดีจอมือถือ = อ่านไม่ออกเหมือนเดิม** ซึ่งทำให้ปุ่ม
     "ดูเต็ม" ไม่มีความหมาย · จอแคบจึงแสดงภาพที่ความสูง 68vh ตามสัดส่วนจริง
     (กว้างเกินจอ) แล้วให้ปัดซ้ายขวาดูส่วนที่เหลือ — ตัวหนังสือจึงใหญ่พอให้อ่านออกจริง */
  .lb-box { max-width: 100vw; width: 100vw; gap: 0; }
  .lb-shot { overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
             scrollbar-width: none; padding: 0 0 10px; }
  .lb-shot::-webkit-scrollbar { display: none; }
  .lb-box img { max-width: none; width: auto; height: 68vh; max-height: none; border-radius: 0; }
  .lb-box figcaption { padding: 10px 18px 78px; }
  .lb-hint { display: block; }
  .lb-nav { top: auto; bottom: 18px; transform: none; width: 48px; height: 48px; }
  .lb-nav.prev { left: 20px; } .lb-nav.next { right: 20px; }
  .rail { gap: 14px; padding-left: 16px; padding-right: 16px; scroll-padding-left: 16px; }
  .frame { flex-basis: 84%; }
  .rail-ctl { gap: 10px; }
}

/* ---------------- ภาพหน้าจอที่วางแทรกในเนื้อหา ----------------
   ต่างจาก .frame ตรงที่ **ไม่ครอปภาพ** — ภาพพวกนี้ถูกถ่ายเฉพาะการ์ดที่ต้องการอยู่แล้ว
   ครอปเพิ่มจะกินตัวเลขที่เป็นสาระของภาพไป */
.figrow { display: grid; grid-template-columns: 1.25fr 1fr; gap: 26px; margin-top: 46px; align-items: start; }
.shotcard {
  margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; box-shadow: var(--shadow-lg);
}
.shotcard img { display: block; width: 100%; height: auto; }
.shotcard figcaption { padding: 14px 18px; font-size: 13.5px; line-height: 1.7; color: var(--muted); border-top: 1px solid var(--line); }

/* แถบเน้นหนึ่งเรื่อง: ข้อความซ้าย ภาพขวา */
.spotlight { display: grid; grid-template-columns: .95fr 1.05fr; gap: 46px; align-items: center; margin-top: 56px; }
.spotlight h3 { font-size: 26px; line-height: 1.45; margin: 6px 0 14px; }
.spotlight p { font-size: 15px; line-height: 1.9; margin-bottom: 18px; }
.spotlight .ticks li { color: var(--text); font-size: 14.5px; }
.spotlight .ticks li::before { border-color: var(--brand); }

/* ---------------- เดสก์ท็อป ---------------- */
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.split-copy .sub { margin: 16px 0 22px; font-size: 16.5px; }
.ticks { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 30px; font-size: 15px; color: #a9bbd0; }
.ticks li::before {
  content: ''; position: absolute; left: 4px; top: 9px; width: 8px; height: 14px;
  border: solid var(--brand-2); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.split-art { display: grid; place-items: center; gap: 26px; }
.floaty { animation: bob 8s ease-in-out infinite; }
.app-icon { border-radius: 30px; box-shadow: 0 30px 70px rgba(2, 132, 199, .35); }
.specs { display: grid; gap: 10px; width: 100%; }
.specs div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 14px 18px; border-radius: 12px;
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .09);
}
.specs b { color: #eaf3fb; font-weight: 600; }
.specs span { font-size: 13.5px; color: #8ea2ba; }

/* ---------------- แพ็กเกจ ---------------- */
.plans { align-items: stretch; }
.plan { display: flex; flex-direction: column; position: relative; }
.plan h3 { font-size: 16px; color: var(--muted); font-weight: 600; }
.plan .price {
  font-family: 'Inter', sans-serif; font-size: 40px; font-weight: 700; color: var(--head);
  line-height: 1.2; margin: 6px 0 18px;
}
.plan .price span { font-size: 15px; font-weight: 500; color: var(--muted); font-family: 'IBM Plex Sans Thai', sans-serif; }
.plan .price.ask { font-size: 22px; color: var(--brand-deep); font-family: 'IBM Plex Sans Thai', sans-serif; }
/* ราคาเป็นแบบซื้อขาด บรรทัดนี้พูดออกมาตรงๆ ใต้ตัวเลข ไม่ให้คนอ่านเดาว่าเป็นรายเดือน */
.plan .price-note { font-size: 12.5px; color: var(--muted); margin: -14px 0 18px; }
/* ขีดจำกัดของแพ็กเกจ (สิ่งที่ "ไม่ได้") ต้องอ่านออกว่าไม่ใช่ข้อดี — ไม่งั้นการ์ดโกหกด้วยเครื่องหมายถูก */
.plan li.off { color: var(--muted); }
.plan li.off::before {
  border: 0; content: '—'; left: 2px; top: 0; width: auto; height: auto;
  transform: none; color: var(--muted); font-weight: 600;
}
.plan li.care::before { border-color: var(--amber); }
.plan ul { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 10px; }
.plan li { position: relative; padding-left: 24px; font-size: 14.5px; }
.plan li::before {
  content: ''; position: absolute; left: 3px; top: 8px; width: 6px; height: 11px;
  border: solid var(--brand); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.plan .btn { margin-top: auto; }
.plan.featured { border-color: var(--brand); box-shadow: 0 24px 60px rgba(14, 165, 233, .18); }
.plan .tag {
  position: absolute; top: -12px; left: 24px; padding: 4px 12px; border-radius: 999px;
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 500;
}

/* ---------------- คำถามที่พบบ่อย ---------------- */
.qa { display: grid; gap: 12px; }
.qa details {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  transition: border-color .3s, box-shadow .3s;
}
.qa details[open] { border-color: #cfe3f5; box-shadow: var(--shadow); }
.qa summary {
  list-style: none; cursor: pointer; padding: 18px 22px; font-weight: 500; color: var(--head);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: ''; flex: none; width: 9px; height: 9px; border: solid var(--muted);
  border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-2px);
  transition: transform .3s var(--ease);
}
.qa details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.qa .answer { padding: 0 22px 20px; font-size: 14.5px; line-height: 1.85; animation: fadeDown .35s var(--ease); }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-6px) } to { opacity: 1; transform: none } }

/* ---------------- ปิดท้าย ---------------- */
.cta-final { position: relative; overflow: hidden; background: var(--ink); color: #a9b8cc; padding: clamp(80px, 10vw, 130px) 0; }
.cta-final h2 { color: #fff; }
.cta-final .sub { margin: 14px auto 0; max-width: 40em; }
.cta-final .wrap { position: relative; z-index: 2; }

.foot { background: #070d18; color: #6d8098; padding: 44px 0; font-size: 14px; }
.foot-inner { display: grid; gap: 10px; justify-items: center; text-align: center; }
.foot-brand { display: flex; align-items: center; gap: 9px; color: #dbe7f3; font-size: 17px; font-weight: 600; }
.foot-brand img { border-radius: 6px; }
.foot-brand b { color: var(--brand-2); }
.foot-brand i { color: var(--amber); font-style: normal; }
.foot .tiny { font-size: 12.5px; color: #4d5f76; }

/* ============================ การเผยตัวตอนเลื่อน ============================
   ซ่อนรอเผยเฉพาะเมื่อ html มีคลาส js (สคริปต์บรรทัดเดียวใน <head> เป็นคนติด) —
   เบราว์เซอร์ที่ปิด JavaScript จึงไม่มีวันเจอเนื้อหาค้างอยู่ที่ opacity 0 */
html.js [data-reveal] {
  opacity: 0; transform: translateY(22px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}
html.js [data-reveal].in { opacity: 1; transform: none; }

/* ============================ เมนูเต็มจอบนมือถือ ============================
   บนจอแคบ ลิงก์ห้าอันเรียงในแถบเดียวอ่านไม่ทันและกดยาก — เปลี่ยนเป็นปุ่มเดียวที่เปิดเมนู
   เต็มจอ ตัวอักษรใหญ่ กดง่ายด้วยนิ้วโป้ง และรายการไล่กันเข้ามาทีละอัน
   ปุ่มเป็น <button> จริง มี aria-expanded และปิดด้วย Esc ได้ — ไม่ใช่ div ที่แกล้งเป็นปุ่ม */
.burger {
  display: none; position: relative; z-index: 2;
  width: 42px; height: 42px; padding: 0; margin-left: 6px;
  border: 1px solid rgba(255, 255, 255, .22); border-radius: 12px;
  background: rgba(255, 255, 255, .06); cursor: pointer;
}
.nav.stuck .burger { border-color: var(--line); background: #fff; }
.burger span {
  position: absolute; left: 11px; width: 20px; height: 1.8px; border-radius: 2px;
  background: #fff; transition: transform .38s var(--ease), opacity .22s var(--ease), background .3s;
}
.nav.stuck .burger span { background: var(--head); }
.burger span:nth-child(1) { top: 14px; }
.burger span:nth-child(2) { top: 20px; }
.burger span:nth-child(3) { top: 26px; }
body.menu-open .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.menu-open .burger span:nth-child(2) { opacity: 0; transform: scaleX(.2); }
body.menu-open .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
/* ตอนเมนูเปิด ปุ่มปิดเป็นสี่เหลี่ยมขาวทึบ — ตัดกับพื้นหลังเข้มชัดที่สุด และบอกได้ทันทีว่ากดตรงไหนเพื่อออก */
body.menu-open .burger { background: #fff; border-color: #fff; }
body.menu-open .burger span { background: var(--head); }
body.menu-open { overflow: hidden; }
/* เปิดเมนูแล้วปุ่มบนแถบซ้ำกับปุ่มในเมนู — ซ่อนตัวบนไว้ให้เหลือทางเลือกเดียวที่ชัด */
body.menu-open .nav-cta { opacity: 0; pointer-events: none; transition: opacity .2s var(--ease); }
body.menu-open .nav { background: transparent; box-shadow: none; backdrop-filter: none; }
body.menu-open .brand { color: #fff; }
body.menu-open .brand b { color: var(--brand-2); }

.sheet {
  position: fixed; inset: 0; z-index: 45;
  display: flex; flex-direction: column; justify-content: center; gap: 28px;
  padding: 96px 24px 34px;
  background: rgba(9, 16, 28, .86);
  backdrop-filter: blur(18px) saturate(140%);
  opacity: 0; transition: opacity .34s var(--ease);
  overflow: hidden;
}
.sheet[hidden] { display: none; }
.sheet.in { opacity: 1; }
.sheet-aurora { position: absolute; inset: 0; }
.sheet-aurora .blob { position: absolute; border-radius: 50%; filter: blur(80px); }
.sheet-aurora .b1 { width: 380px; height: 380px; background: #0284c7; opacity: .34; top: -80px; left: -90px; animation: drift1 20s ease-in-out infinite; }
.sheet-aurora .b2 { width: 320px; height: 320px; background: #7c3aed; opacity: .22; bottom: -70px; right: -70px; animation: drift2 24s ease-in-out infinite; }

.sheet-links { position: relative; display: grid; gap: 4px; }
.sheet-links a {
  display: grid; grid-template-columns: 34px 1fr; align-items: baseline; gap: 4px 12px;
  padding: 14px 12px; border-radius: 14px; text-decoration: none;
  border: 1px solid transparent;
  opacity: 0; transform: translateY(14px);
  transition: opacity .45s var(--ease), transform .45s var(--ease), background .25s, border-color .25s;
  transition-delay: calc(var(--i) * 55ms);
}
.sheet.in .sheet-links a { opacity: 1; transform: none; }
.sheet-links a:active { background: rgba(255, 255, 255, .06); }
.sheet-links i {
  grid-row: span 2; font-family: 'Inter', sans-serif; font-style: normal; font-size: 12px;
  font-weight: 600; color: var(--brand-2); letter-spacing: .08em; padding-top: 6px;
}
.sheet-links b { color: #fff; font-size: 24px; font-weight: 600; line-height: 1.25; }
.sheet-links span { color: #8ea2ba; font-size: 13.5px; }
.sheet-links a.current { background: rgba(56, 189, 248, .1); border-color: rgba(56, 189, 248, .3); }
.sheet-links a.current b { color: var(--brand-2); }

.sheet-foot {
  position: relative; display: grid; gap: 14px; justify-items: center;
  opacity: 0; transform: translateY(14px);
  transition: opacity .45s var(--ease) .34s, transform .45s var(--ease) .34s;
}
.sheet.in .sheet-foot { opacity: 1; transform: none; }
.sheet-foot .btn { width: 100%; }
.sheet-mail { color: #8ea2ba; font-size: 13.5px; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.18); }

/* ลิงก์ของส่วนที่กำลังดูอยู่ — ใช้ทั้งเมนูบนและเมนูเต็มจอ */
.nav-links a.current { color: #fff; }
.nav.stuck .nav-links a.current { color: var(--brand); }
.nav-links a.current::after { width: 100%; }

/* ============================ ต่อกับ AI (REST API + MCP) ============================
   ตัวอย่างบทสนทนาเป็น HTML/CSS ล้วน ไม่ใช่ภาพ — จะได้คมทุกจอ แปลถูกทุกฟอนต์ และคนใช้
   screen reader อ่านได้ · ชื่อเครื่องมือทุกตัวเป็นชื่อจริงในระบบ ไม่ได้แต่งขึ้นมาโชว์ */
.nav-ai { display: inline-flex; align-items: center; gap: 7px; }
.nav-new, .sheet-new {
  font-style: normal; font-family: 'IBM Plex Sans Thai', sans-serif;
  font-size: 10.5px; font-weight: 700; line-height: 1.7; letter-spacing: .02em;
  color: #451a03; background: linear-gradient(120deg, #fbbf24, #f59e0b);
  border-radius: 999px; padding: 0 8px;
}
.sheet-new { font-size: 12px; vertical-align: 4px; margin-left: 8px; padding: 1px 9px; }

.ai { position: relative; overflow: hidden; }
.ai-glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(640px 420px at 82% 8%, rgba(56, 189, 248, .13), transparent 70%),
    radial-gradient(560px 420px at 10% 92%, rgba(124, 58, 237, .12), transparent 70%);
}
.ai .wrap { position: relative; z-index: 1; }
.new-badge {
  display: inline-block; margin-right: 10px; padding: 2px 11px; border-radius: 999px;
  background: linear-gradient(120deg, #fbbf24, #f59e0b); color: #451a03;
  font-weight: 700; letter-spacing: .06em;
  box-shadow: 0 0 0 0 rgba(245, 158, 11, .45);
  animation: badge-ping 3s var(--ease) infinite;
}
@keyframes badge-ping {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, .4); }
  60%, 100% { box-shadow: 0 0 0 12px rgba(245, 158, 11, 0); }
}

.ai-grid { display: grid; grid-template-columns: 1.06fr .94fr; gap: 46px; align-items: center; }

.console {
  background: #0a1424; border: 1px solid rgba(56, 189, 248, .24); border-radius: 16px;
  overflow: hidden; box-shadow: 0 30px 80px rgba(2, 132, 199, .22);
}
.console-bar {
  display: flex; gap: 6px; align-items: center; padding: 11px 14px;
  background: rgba(255, 255, 255, .04); border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.console-bar i { width: 9px; height: 9px; border-radius: 50%; background: #2c3e54; }
.console-bar i:first-child { background: #f87171; }
.console-bar i:nth-child(2) { background: #fbbf24; }
.console-bar span {
  margin-left: 10px; font-family: 'Inter', sans-serif; font-size: 12px;
  color: #64809c; letter-spacing: .05em;
}
.console-body { padding: 18px 18px 20px; display: grid; gap: 11px; }
.cline {
  border-radius: 12px; padding: 9px 14px; font-size: 14px; line-height: 1.7;
  overflow-wrap: anywhere;
}
.cline .who {
  display: block; font-size: 12px; font-weight: 600; letter-spacing: .1em;
  color: #6f87a1; margin-bottom: 1px;
}
.cline.user { justify-self: end; max-width: 88%; background: rgba(56, 189, 248, .13); border: 1px solid rgba(56, 189, 248, .3); color: #dcedfa; }
.cline.reply { max-width: 88%; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); color: #c3d3e5; }
.cline.tool {
  display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline;
  padding: 7px 14px; border: 1px dashed rgba(56, 189, 248, .38); background: transparent;
}
.tname {
  font-family: 'Inter', 'SF Mono', monospace; font-weight: 600; font-size: 12.5px;
  color: #38bdf8; background: rgba(56, 189, 248, .12); padding: 1px 9px; border-radius: 6px;
}
.cline.tool code { font-size: 12px; color: #64809c; }
.cline.denied { border: 1px solid rgba(245, 158, 11, .42); background: rgba(245, 158, 11, .08); color: #fbd9a3; font-size: 13.5px; }
.cline.denied .tname { color: #fbbf24; background: rgba(245, 158, 11, .15); margin-right: 4px; }

/* จังหวะการโผล่ทีละบรรทัด — เปิดเฉพาะเมื่อ JS ทำงานและผู้ใช้ไม่ได้ปิดการเคลื่อนไหว
   (คลาส .play ถูกติดโดย JS เท่านั้น ไม่มี JS ทุกบรรทัดจึงมองเห็นครบตั้งแต่ต้น) */
.console.play [data-cline] { opacity: 0; transform: translateY(10px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.console.play [data-cline].show { opacity: 1; transform: none; }

.ai-note { margin-top: 16px; font-size: 13.5px; line-height: 1.85; color: #7d90a8; }

.scopes { display: grid; gap: 12px; margin-bottom: 24px; }
.scope {
  position: relative; display: grid; gap: 2px; padding: 13px 18px 13px 46px;
  border-radius: 12px; background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .09);
}
.scope::before {
  content: ''; position: absolute; left: 18px; top: 21px; width: 7px; height: 13px;
  border: solid var(--brand-2); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.scope.warn::before { border-color: var(--amber); }
.scope b { color: #eaf3fb; font-size: 15px; font-weight: 600; }
.scope span { font-size: 13.5px; color: #8ea2ba; }
.scope.warn b { color: #fcd9a0; }
.ai-avail { font-size: 15px; color: #a9bbd0; }
.ai-avail b { color: #eaf3fb; }
.ai-avail a { color: var(--brand-2); }

@media (max-width: 1000px) {
  .ai-grid { grid-template-columns: 1fr; gap: 30px; }
  .cline.user, .cline.reply { max-width: 100%; }
}

/* ============================ จอเล็ก ============================
   บนจอที่ไม่กว้างพอ (แท็บเล็ตลงไป) แถวที่เป็น grid หลายคอลัมน์จะกลายเป็น "แถบปัดซ้าย-ขวา"
   แทนการเรียงต่อกันลงล่าง — หน้าที่ปัดนิ้วสามครั้ง ดีกว่าหน้าที่ต้องเลื่อนยาวสิบสี่หน้าจอ
   (วัดจริงที่ 390px: เรียงลงล่าง 11,621px → ปัดซ้าย-ขวา 6,750px คือสั้นลง 42%)

   ใช้ scroll-snap ของเบราว์เซอร์ ไม่ใช่ carousel ที่เขียนเอง: ปัดแล้วลื่นเหมือนแอปเนทีฟ
   เลื่อนด้วยแทร็กแพด/แป้นพิมพ์ได้ และไม่มี JS ตัวไหนไปแย่งการควบคุมจากนิ้วผู้ใช้ */
@media (max-width: 1000px) {
  .split { grid-template-columns: 1fr; }
  .hero { padding-top: 116px; }
  .chain-line { display: none; }
  .nav-links { display: none; }
  .burger { display: block; }

  [data-swipe] {
    display: grid !important;
    grid-auto-flow: column;
    grid-auto-columns: var(--card-w, 46%);
    grid-template-columns: none !important;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 16px;
    /* ล้นออกนอกขอบทั้งสองข้าง เพื่อให้ใบถัดไป "โผล่" ให้เห็นว่าปัดต่อได้ */
    padding: 4px 22px 8px;
    margin: 0 -22px;
  }
  [data-swipe]::-webkit-scrollbar { display: none; }
  [data-swipe] > * { scroll-snap-align: center; margin: 0; }
  [data-swipe] .lift:hover { transform: none; }

  .stats[data-swipe] { --card-w: 32%; }
  .chain-steps[data-swipe] { --card-w: 24%; }
  .specs[data-swipe] { --card-w: 44%; }

  /* จุดบอกตำแหน่งใต้แถบที่ปัดได้ — สร้างด้วย JS หนึ่งชุดต่อหนึ่งแถบ */
  .dots { display: flex; justify-content: center; gap: 7px; margin-top: 16px; }
  .dots span {
    width: 6px; height: 6px; border-radius: 50%; background: #cbd5e1; cursor: pointer;
    transition: width .3s var(--ease), background .3s;
  }
  .section.dark .dots span, .desktop .dots span { background: rgba(255, 255, 255, .24); }
  .dots span.on { width: 20px; border-radius: 3px; background: var(--brand); }
}

@media (max-width: 780px) {
  /* hero บนจอแคบ — ปุ่มสลับกลายเป็นแถบเลื่อนข้าง สามบรรทัดใต้ภาพซ้อนลงมา */
  html.js .hero-tabs {
    flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto;
    scrollbar-width: none; padding: 2px 22px 6px; margin: 0 -22px 12px;
  }
  html.js .hero-tabs::-webkit-scrollbar { display: none; }
  .htab { flex: none; padding: 8px 14px 9px; }
  .hero-points { grid-template-columns: 1fr; gap: 6px; }
  .hero-index span, .hero-index i { font-size: 12px; }
  [data-swipe] { --card-w: 82%; }
  .stats[data-swipe] { --card-w: 58%; }
  .chain-steps[data-swipe] { --card-w: 38%; }
  .specs[data-swipe] { --card-w: 68%; }

  .nav { gap: 10px; padding: 10px 16px; }
  .nav .nav-cta { margin-left: auto; height: 36px; padding: 0 16px; }

  h1 { font-size: clamp(30px, 8.5vw, 40px); }
  h2 { font-size: clamp(22px, 6.2vw, 28px); }
  /* หัวข้อและคำโปรยบนจอกว้างตั้งใจตัดบรรทัดให้สวย บนมือถือปล่อยให้ไหลเองดีกว่า */
  h2 br, .hero-copy .lede br { display: none; }
  .section { padding: 54px 0; }
  .head { margin-bottom: 30px; }
  .head .sub, .lede { font-size: 15.5px; }
  .cta-row .btn, .plan .btn { width: 100%; }
  .cta-row { flex-direction: column; }
  /* .figrow มี data-swipe อยู่แล้ว จึงกลายเป็นแถบปัดซ้าย-ขวาเองตามกติกาของทั้งหน้า
     ส่วน .spotlight เป็นข้อความคู่ภาพ ซ้อนลงมาแทน */
  .figrow[data-swipe] { --card-w: 78%; margin-top: 32px; }
  .spotlight { grid-template-columns: 1fr; gap: 22px; margin-top: 32px; }
  .spotlight h3 { font-size: 22px; }
  .plan { padding: 22px 20px; }
}

/* ============================ จอแคบ: อ่านได้จริง ไม่ใช่แค่ไม่ล้น ============================
   ตรวจด้วยการวัดที่ 320 · 360 · 390 · 414 · 768 · 1024 · 1280 · 1920 — ไม่มีจุดไหนล้นแนวนอน
   สิ่งที่แก้ตรงนี้คือสิ่งที่ "ไม่ล้น" ไม่ได้การันตี: ตัวเล็กจนอ่านไม่ออก นิ้วกดไม่โดน
   และภาพหน้าจอโปรแกรมที่ย่อจนไม่เหลือข้อมูล */
@media (max-width: 780px) {
  /* **ภาพหน้าจอที่ย่อทั้งหน้าจอเดสก์ท็อปลงมา 344px ไม่เหลือตัวเลขให้อ่านสักตัว**
     — มันกลายเป็นลวดลาย ไม่ใช่หลักฐาน · กรอบเตี้ยลงและตัดเอาเฉพาะมุมบนซ้าย
     (แถบตัวเลขสรุป) ซึ่งเป็นส่วนที่มีความหมายที่สุด แล้วมันจะใหญ่พอให้อ่านออก
     object-fit: cover + object-position: top left ทำงานให้อยู่แล้ว แค่เปลี่ยนสัดส่วนกรอบ */
  .hw-body { aspect-ratio: 10 / 7; }

  /* ป้ายเล็กๆ ในแถบหัวหน้าต่าง — บนมือถือมันแย่งที่จากชื่อหน้าจอโดยไม่ได้บอกอะไรเพิ่ม */
  .hw-live { display: none; }
  .htab span { font-size: 12px; }

  /* นิ้วโป้งกดพลาดเป็นข้อบกพร่อง ไม่ใช่เรื่องเล็ก · 44px คือขนาดที่ Apple กำหนด */
  .nav .nav-cta { height: 42px; padding: 0 18px; }
  .qa summary { padding-top: 15px; padding-bottom: 15px; }
  .burger { width: 44px; height: 44px; }
}

/* แท็บเล็ตแนวตั้ง (781-1000px): เลย์เอาต์เป็นคอลัมน์เดียวแล้ว แต่ยังกว้าง 800px —
   ปล่อยให้การ์ดสั้นๆ เรียงเดี่ยวคือทิ้งพื้นที่ครึ่งจอไปเฉยๆ · ของยาว (ticks) ยังเรียงเดี่ยว
   เพราะบรรทัดที่กว้างเกิน ~75 ตัวอักษรอ่านยากขึ้น ไม่ใช่ง่ายขึ้น */
@media (min-width: 620px) and (max-width: 1000px) {
  .lanes { grid-template-columns: 1fr 1fr; }
  .scopes { grid-template-columns: repeat(3, 1fr); }
  .scope span { font-size: 13px; }
  .hero-points { grid-template-columns: 1fr 1fr; }
  .ai-copy .ticks { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 400px) {
  /* จอ 320-400px: การ์ดในแถบปัดควรเกือบเต็มจอ ไม่งั้นเนื้อหาในการ์ดถูกบีบจนขึ้นบรรทัดถี่ */
  [data-swipe] { --card-w: 88%; }
  .stats[data-swipe] { --card-w: 64%; }
  .specs[data-swipe] { --card-w: 78%; }
  .nav { padding: 10px 14px; }

  /* ขอบซ้าย-ขวาแคบลงเพื่อให้เนื้อหากว้างขึ้นบนจอ 320px
     **ระยะนี้ผูกกันสามที่** — .wrap เว้นเท่าไร แถบปัดกับแถบปุ่มของ hero ต้องล้นออกเท่านั้น
     แก้ที่เดียวแล้วลืมอีกสองที่ = หน้าล้นแนวนอนพอดีเท่าส่วนต่าง (เจอมาแล้วตอนวัด 6px) */
  .hero-inner, .wrap { width: min(1180px, calc(100vw - 32px)); }
  [data-swipe] { padding-left: 16px; padding-right: 16px; margin-left: -16px; margin-right: -16px; }
  html.js .hero-tabs { padding-left: 16px; padding-right: 16px; margin-left: -16px; margin-right: -16px; }
}

/* นิ้วไม่ใช่เมาส์ — แท็บเล็ตกว้าง 1024px ก็ยังใช้นิ้วกด จึงตัดสินจากชนิดตัวชี้ ไม่ใช่จากความกว้าง
   (กติกาเดียวกับ --field-h ใน theme.css ของตัวโปรแกรม) */
@media (pointer: coarse) {
  .nav-links a { padding-top: 12px; padding-bottom: 12px; }
  .btn.sm { height: 42px; }
  .qa summary { padding-top: 15px; padding-bottom: 15px; }
}

/* ============================ ลดการเคลื่อนไหวตามค่าระบบ ============================
   ผู้ใช้ที่เวียนหัวกับภาพเคลื่อนไหวต้องอ่านเว็บนี้ได้เหมือนกัน — ปิดทุกอย่างที่ขยับเอง
   แต่เนื้อหายังต้องมองเห็นครบ (ไม่ใช่ค้างอยู่ที่ opacity 0) */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* ---- สองทางเลือกของส่วน AI (ยุบจากเดิมที่เป็นคนละ section) ---- */
.lanes { display: grid; gap: 12px; margin-bottom: 22px; }
.lane {
  display: block; padding: 15px 17px; border-radius: 12px; text-decoration: none;
  background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .1);
  transition: border-color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease);
}
a.lane:hover { border-color: rgba(56, 189, 248, .5); background: rgba(56, 189, 248, .08); transform: translateY(-2px); }
.lane b { display: block; color: #eaf3fb; font-size: 16px; font-weight: 600; }
.lane span { display: block; margin-top: 3px; font-size: 13.5px; color: #8ea2ba; line-height: 1.65; }
.lane em { display: inline-block; margin-top: 9px; font-style: normal; font-size: 13.5px; color: var(--brand-2); }

/* ---- ปุ่มดาวน์โหลด: บอกขนาดไฟล์ในปุ่มเลย คนจะได้รู้ก่อนกดว่ากำลังจะโหลดอะไร ---- */
.cta-row .btn small { font-size: 12.5px; opacity: .72; margin-left: 8px; font-weight: 400; }
.dl-note { margin-top: 16px; font-size: 13.5px; line-height: 1.85; color: #7d90a8; max-width: 520px; }
.dl-note b { color: #fcd9a0; }
@media (max-width: 780px) { .cta-row .btn small { display: block; margin: 2px 0 0; } .cta-row .btn { height: auto; padding: 11px 18px; } }

/* ---- ตรวจสอบไฟล์ก่อนติดตั้ง — พับไว้ ไม่กินที่ของคนที่ไม่สนใจ ---- */
.verify { margin-top: 14px; max-width: 560px; }
.verify > summary { cursor: pointer; list-style: none; font-size: 13.5px; color: var(--brand-2);
  padding: 8px 0; display: inline-flex; align-items: center; gap: 7px; }
.verify > summary::-webkit-details-marker { display: none; }
.verify > summary::before { content: '+'; width: 18px; height: 18px; flex: none; display: grid;
  place-items: center; border: 1px solid rgba(255,255,255,.22); border-radius: 5px; font-size: 13px; }
.verify[open] > summary::before { content: '−'; }
.verify-body { padding: 4px 0 6px; font-size: 13px; color: #8ea2ba; line-height: 1.8; }
.verify-body dl { margin: 12px 0; display: grid; gap: 9px; }
.verify-body dt { color: #cfe0ee; font-size: 12.5px; }
.verify-body dt span { color: #6f87a1; }
.verify-body dd { margin: 2px 0 0; font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 11.5px; color: #a9bbd0; word-break: break-all; background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09); border-radius: 6px; padding: 8px 10px; }
.verify-how { margin: 12px 0 0; font-size: 12.5px; }
.verify-how b { color: #cfe0ee; display: inline-block; min-width: 66px; }
.verify-how code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11.5px; color: #7d90a8; }
