/* ==========================================================================
   Hanumatic · หน้าแรกต้นแบบ D6 = D5 "แผงขั้นบันได" + วัตถุ 3 มิติผิวด้าน + สีระดับ ข (19 พ.ย. 2569)
   ส่วนที่ D6 เพิ่ม/เปลี่ยน อยู่ท้ายไฟล์ (หัวข้อ "D6") และตัวแปร --band / พื้นช่วง 2 · 5
   สีและฟอนต์จาก tokens.css · ค่าที่เพิ่มในไฟล์นี้ (ไม่ใช่ค่าแบรนด์ใหม่):
     - ชั้นเทาโหมดมืดตามทิศทาง: #1C1C1C (การ์ด/แผง) #2A2A2A (ช่องย่อย) #3A3A3A (เส้น) #B5B5B5 (ตัวรอง)
     - เทาพื้นช่องย่อยโหมดสว่าง #F5F5F5 (เทา ไม่ใช่สีใหม่)
     - หัวข้อช่วง 56 px (--fs-sec) ตามแบบ D5
   ห้ามพิมพ์รหัสแดงตรง ใช้ --accent / --btn-primary-bg เท่านั้น
   ========================================================================== */

:root {
  --fs-sec: 56px; --lh-sec: 1.2;
  --surface-2: #F5F5F5;
  --stair: #111111;
  --band: var(--band-indigo);   /* D6: แถบช่วง 4 ครามเข้ม (เดิมดำ) */
  --notch-h: min(240px, calc(35vw * 0.4663)); --notch-w: calc(var(--notch-h) / 0.4663);  /* D6: ย้ายจาก .s4 มาไว้ที่นี่ ให้ช่วง 3 ใช้ร่วม */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  /* 22 พ.ย. (D-20261122-07): จังหวะสปริงของแท่ง · ออกตัวทันที เลยเป้าราว 1.5% แล้วหยุดนุ่ม (รอบตรวจ 1: 4% ทำให้ข้อความไหลถอยหลังขึ้นครบ) · เบราว์เซอร์เก่าใช้เส้นโค้งแทน */
  --ease-spring: cubic-bezier(.2, .9, .25, 1);
  --t-col: 640ms;
  --gutter: clamp(16px, 5.56vw, 80px);
  --edge: max(var(--gutter), calc((100vw - 1280px) / 2));
  --tan25: 0.4663;
  --header-h: 72px;
  --hero-h: clamp(760px, calc(100svh - var(--header-h)), 960px);
  --veil: rgba(17, 17, 17, .12);
}

/* โหมดมืด: เทาแบ่งชั้น ห้ามดำล้วน */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111111;
  --surface: #1C1C1C;
  --surface-2: #2A2A2A;
  --text: #FFFFFF;
  --text-muted: #B5B5B5;
  --border: #3A3A3A;
  --border-strong: #6B6B6B;
  --accent: #F0445A;
  --btn-primary-bg: #F0445A;
  --btn-primary-text: #111111;
  --btn-primary-bg-hover: #FFFFFF;
  --btn-primary-text-hover: #111111;
  --focus-ring: #FFFFFF;
  --frame-border: #2A2A2A;
  --frame-dot: #3A3A3A;
  --stair: #6B6B6B;
  --band: var(--band-indigo);   /* D6: #111C2B */
  --veil: rgba(0, 0, 0, .15);
}

/* พื้นดำในหน้าสว่าง (แถบบริการ ท้ายเว็บ) */
.on-dark {
  color-scheme: dark;
  --text: #FFFFFF;
  --text-muted: #B5B5B5;
  --border: #3A3A3A;
  --border-strong: #6B6B6B;
  --accent: #F0445A;
  --btn-primary-bg: #F0445A;
  --btn-primary-text: #111111;
  --btn-primary-bg-hover: #FFFFFF;
  --btn-primary-text-hover: #111111;
  --focus-ring: #FFFFFF;
  --card: #1C1C1C;
  --cell: #2A2A2A;
  color: var(--text);
}
html[data-theme="dark"] .on-dark { --card: #2A2A2A; --cell: #333333; }
/* D6 รอบแก้ 1 ข้อ 4: การ์ดบนแถบคราม = ครามอ่อนกว่าแถบ 1 ขั้น · ช่องย่อยในการ์ด = สีแถบ (เข้มกว่าการ์ด 1 ขั้น) · ขอบปุ่ม/ป้ายในการ์ดใช้เทาที่ผ่าน 3:1 */
.s4 .on-dark, html[data-theme="dark"] .s4 .on-dark { --card: var(--band-indigo-card); --cell: var(--band-indigo); --border-strong: var(--band-control-line); }

/* ---------- พื้นฐาน ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body { overflow-x: clip; text-rendering: optimizeLegibility; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
.ph { display: inline-block; }
.nb { white-space: nowrap; }   /* วลีไทยไม่ขาดกลางคำ · ตัดบรรทัดได้เฉพาะตรงช่องว่าง */
h1, h2, h3, h4 { text-wrap: balance; }
p, li, dd, small { text-wrap: pretty; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: var(--border-width-strong) solid var(--focus-ring); outline-offset: 2px; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--text); color: var(--bg); text-decoration: none; border-radius: var(--radius-sm); }
.skip:focus { top: 12px; }
.wrap { max-width: 1440px; margin-inline: auto; padding-inline: var(--gutter); }
.theme-dark-only { display: none !important; }
html[data-theme="dark"] .theme-dark-only { display: block !important; }
html[data-theme="dark"] .theme-light-only { display: none !important; }

/* ---------- ชิ้นส่วนร่วม ---------- */
.story { display: flex; align-items: center; gap: var(--space-3); font-size: var(--fs-body); line-height: 1.5; font-weight: var(--fw-medium); color: var(--text); }
.story-stair { width: 38px; height: 16px; flex: none; overflow: visible; }
.story-stair path { fill: none; stroke-width: 1.5; stroke-linejoin: miter; }
.story-stair .ss-base { stroke: var(--border-strong); }
.story-stair .ss-on { stroke: var(--text); stroke-dasharray: calc(var(--n) * 8.8px - 2.8px) 200px; }
.eyebrow { display: flex; align-items: center; gap: var(--space-2); margin-top: var(--space-2); font-size: var(--fs-label); line-height: var(--lh-label); font-weight: var(--fw-regular); color: var(--text-muted); }
.eyebrow::before { content: ""; width: 8px; height: 8px; background: currentColor; }
.sec-title { margin-top: var(--space-4); font-size: clamp(32px, 3.9vw, var(--fs-sec)); line-height: var(--lh-sec); font-weight: var(--fw-medium); letter-spacing: 0; }
.lead { font-size: var(--fs-lead); line-height: var(--lh-lead); font-weight: var(--fw-lead); color: var(--text-muted); }
.lm { display: block; width: fit-content; clip-path: inset(-0.4em -0.3em -0.32em -0.3em); }  /* กรอบตัดกว้างตามตัวหนังสือ ไม่ตัดท้ายบรรทัดที่ยาวกว่ากล่อง */
.lm > span { display: inline-block; }
@media (min-width: 760px) { .lm { white-space: nowrap; } }

.btn-solid { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 48px; padding: var(--space-3) var(--space-5); border-radius: var(--radius-sm); font-family: var(--font-sans); font-size: var(--fs-body); line-height: 1.4; font-weight: var(--fw-medium); text-decoration: none; white-space: nowrap; background: var(--text); color: var(--bg); border: var(--border-width) solid var(--text); transition: background-color 180ms, color 180ms; }
.btn-solid:hover { background: transparent; color: var(--text); }
.btn-primary, .btn-secondary { transition: background-color 180ms, color 180ms, border-color 180ms; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--fs-body); line-height: 1.4; font-weight: var(--fw-medium); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; transition: text-decoration-color 180ms; }
.text-link:hover { text-decoration-thickness: 2px; }
.tag--plain::before { display: none; }

/* คานแดง: ลงจอดจากซ้ายล่างขึ้นขวาบน */
@keyframes bar-land {
  from { clip-path: polygon(0% 69.12%, 0% 69.12%, 8.85% 100%, 8.85% 100%); }
  to   { clip-path: polygon(0% 69.12%, 91.15% 0%, 100% 30.88%, 8.85% 100%); }
}
.rise-bar.land { animation: bar-land 400ms var(--ease-io) both; }

/* กรอบหน้าต่างโปรแกรม */
.window-frame__bar { position: relative; }
.sample-tag { margin-left: auto; padding: 2px var(--space-2); border: var(--border-width) solid var(--border-strong); border-radius: var(--radius-sm); font-size: 12px; line-height: 1.4; font-weight: var(--fw-medium); color: var(--text); background: var(--surface); }
img.fill { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 0 42%; margin: 0; }
img.fill--top { object-position: 0 0; }

/* ---------- หัวเว็บ ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: var(--border-width) solid transparent; transition: border-color 200ms; }
.site-header.is-scrolled { border-bottom-color: var(--border); }
.hdr { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding-inline: var(--edge); }
.hdr-left { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.logo-link { display: inline-flex; align-items: center; min-height: 44px; flex: none; }
.logo { width: 187.5px; height: 44.6px; margin-left: -9.5px; }
.logo--dark { display: none; }
html[data-theme="dark"] .logo--light { display: none; }
html[data-theme="dark"] .logo--dark { display: block; }
.progress { position: relative; width: 44px; height: 24px; margin-right: var(--space-5); flex: none; }
.progress::before, .progress i { content: ""; position: absolute; left: 2px; bottom: 3px; width: 44px; height: 1.5px; transform-origin: 0 50%; }
.progress::before { background: var(--border); transform: rotate(-25deg); }
.progress i { background: var(--text-muted); transform: rotate(-25deg) scaleX(var(--p, 0)); }
.nav ul { display: flex; gap: var(--space-6); }
.nav a { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; text-decoration: none; font-size: var(--fs-body); line-height: 1.4; }
.nav a::after, .foot-col a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 9px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: 0 50%; transition: transform 180ms var(--ease-io); }
.nav a:hover::after, .nav a:focus-visible::after { transform: scaleX(1); }
.nav a > span[aria-hidden] { font-size: 12px; color: var(--text-muted); }
.hdr-right { display: flex; align-items: center; gap: var(--space-4); flex: none; }
.lang { display: flex; align-items: center; font-size: var(--fs-small); line-height: 1; color: var(--text-muted); }
.lang a { display: inline-grid; place-items: center; min-width: 40px; min-height: 44px; text-decoration: none; }
.lang a[aria-current="true"] { color: var(--text); font-weight: var(--fw-medium); }
.lang > span { color: var(--border-strong); }
.lang--menu { display: none; }
.mode { width: 44px; height: 44px; display: grid; place-items: center; border: var(--line-strong); border-radius: var(--radius-sm); background: transparent; padding: 0; color: var(--text); cursor: pointer; transition: border-color 180ms; }
.mode:hover { border-color: var(--text); }
.mode svg path { transition: transform 420ms var(--ease-io); transform-origin: 9px 9px; }
html[data-theme="dark"] .mode svg path { transform: scaleX(-1); }
.hdr-cta { min-height: 44px; padding: var(--space-2) var(--space-5); }
.menu-btn { display: none; width: 44px; height: 44px; place-items: center; border: 0; background: transparent; padding: 0; cursor: pointer; }

@media (max-width: 1279px) {
  .nav ul { gap: var(--space-5); }
  .progress { margin-right: var(--space-3); }
}
@media (max-width: 1099px) {
  .menu-btn { display: grid; }
  .lang--hdr { display: none; }
  .nav { position: absolute; top: var(--header-h); left: 0; right: 0; display: none; padding: var(--space-3) var(--gutter) var(--space-6); background: var(--bg); border-bottom: var(--line); }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav li { border-bottom: var(--line); }
  .nav a { width: 100%; min-height: 52px; }
  .nav a::after { display: none; }
  .lang--menu { display: flex; margin-top: var(--space-3); }
}
@media (max-width: 759px) {
  :root { --header-h: 64px; }
  .logo { width: 128px; height: 30.4px; margin-left: -6.5px; }
  .progress { display: none; }
  .hdr-right { gap: var(--space-2); }
  .hdr-cta { padding: var(--space-2) var(--space-3); font-size: var(--fs-small); }
}

/* ===================== ช่วง 1 · จอแรก ===================== */
.hero { position: relative; overflow-x: clip; display: grid; grid-template-columns: 360px minmax(0, 1fr); column-gap: 30px; height: var(--hero-h); padding-left: var(--edge); }
.hero-intro { display: flex; flex-direction: column; padding: 48px 0 48px; min-width: 0; }
.slogan { margin-top: var(--space-5); font-size: clamp(56px, 6.67vw, var(--fs-display)); line-height: var(--lh-display); font-weight: var(--fw-display); letter-spacing: 0; }
.slogan-en { margin-top: var(--space-1); font-size: var(--fs-tagline-en); line-height: var(--lh-tagline-en); font-weight: var(--fw-tagline-en); color: var(--text-muted); white-space: nowrap; }
.identity { margin-top: var(--space-6); font-size: var(--fs-lead); line-height: var(--lh-lead); }
.services { margin-top: auto; border-top: var(--line-strong); padding-top: var(--space-5); }
.services p { margin: 0 0 var(--space-4); font-size: var(--fs-body); line-height: var(--lh-body); font-weight: var(--fw-medium); }
.services .btn-secondary { min-height: 44px; padding: var(--space-2) var(--space-5); }

.stage { position: relative; height: 100%; container-type: inline-size; --n: 7; --open-w: 390px; --top-luma: 24px; --head-h: 96px; }
.stage { --fold-w: min(140px, calc((100cqw - var(--open-w)) / (var(--n, 7) - 0.85))); }
.stairs, .panels, .pick { --fold-w: min(140px, calc((100cqw - var(--open-w)) / (var(--n, 7) - 0.85))); --step: calc(var(--fold-w) * var(--tan25)); }
.pick { position: absolute; left: 0; top: calc(var(--top-luma) + var(--step) * 2 - 46px); font-size: var(--fs-label); line-height: var(--lh-label); font-weight: var(--fw-label); color: var(--text-muted); white-space: nowrap; }
.stairs { position: absolute; inset: 0; display: flex; align-items: stretch; overflow-x: clip; }
.col { position: relative; flex: 0 0 var(--fold-w); margin: calc(var(--top-luma) + var(--step) * (var(--n, 7) - var(--k))) 0 0; padding: 0; min-width: 0; text-align: left; border: 0; border-top: var(--border-width) solid var(--stair); border-left: var(--border-width) solid var(--stair); border-radius: 0; background-color: var(--surface); cursor: pointer;
  background-image: repeating-linear-gradient(to bottom, transparent 0 calc(var(--step) - 1px), var(--border) calc(var(--step) - 1px) var(--step));
  background-repeat: no-repeat; background-size: 100% calc(var(--step) * (var(--k) - 1));
  clip-path: inset(-40px 0 0 -2px);
  transition: flex-basis var(--t-col) var(--ease-spring), background-color 220ms var(--ease-out), border-top-color 220ms var(--ease-out), transform 700ms var(--ease-out), opacity 650ms var(--ease-out); }
.col:last-child { flex: 1 0 var(--fold-w); }
/* 22 พ.ย. (D-20261122-09) แท่งบนราง (สคริปต์เปิดเฉพาะจอคอมที่ไม่ได้ขอลดการเคลื่อนไหว): แท่งกว้างคงที่ (--rw) วางด้วย translate
   แล้วเปิดหน้าต่างด้วย clip-path · เนื้อหาแบบพับกว้างคงที่ (--fw) จึงไม่จัดหน้าใหม่หรือย่อขยายระหว่างเคลื่อน */
.stairs.is-rail .col { position: absolute; left: 0; top: 0; bottom: 0; width: var(--rw); flex: none;
  transition: background-color 220ms var(--ease-out), border-top-color 220ms var(--ease-out), transform 700ms var(--ease-out), opacity 650ms var(--ease-out); }
.stairs.is-rail .tv-fold { right: auto; width: var(--fw); }
.stairs.is-rail.is-moving .col { will-change: translate, clip-path; }   /* แยกชั้นวาดเฉพาะตอนเคลื่อน */
.stairs.is-rail.is-moving ~ .panels, .stairs.is-rail.is-moving ~ .panels .tpanel:not([hidden]) { will-change: translate, clip-path; }
/* รอบตรวจราง 1 (design-critic C+) → แบบ OSAIC: ของทึบตลอด เผยด้วยหน้าต่าง ไม่จางซ้อนเป็นหมอก
   - เส้นขั้นบันไดพื้นหลังกว้างแค่ตอนพับ (--fw) ส่วนที่หน้าต่างเปิดเกินเป็นพื้นเรียบ ไม่มีเส้นขวาง
   - แท่งที่หุบ: เนื้อหาแบบพับกลับทันทีพร้อมกับที่แผงเดิมจาง (เดิมรอ 160ms จึงเป็นกล่องขาว)
   - แท่งที่กาง: เนื้อหาแบบพับหายใน 80ms แล้วหัวแผงขึ้นทันทีที่ตำแหน่งเดิม ไม่เลื่อนลง 6px (เดิมเลข 03 ซ้อนสองชั้น)
   - ป้ายสถานะบนหัวแผงขึ้นเร็วขึ้น (380 → 200ms) */
.stairs.is-rail .col { background-size: var(--fw) calc(var(--step) * (var(--k) - 1)); }
/* ภาพทีละเฟรมรอบแก้ 1: จางสลับยังเห็นตัวหนังสือสองชั้น → ไม่จางเลย: หัวแผง/เนื้อหาแบบพับสลับทันที
   แผงข้อความมีพื้นทึบบังของข้างใต้ · แผงเดิมถูกปาดออกจากขวาไปซ้าย (main.js railRender) */
.stairs.is-rail .tv-fold, .stairs.is-rail .col[aria-selected="true"] .tv-fold { transition: none; }
.stairs.is-rail .tv-open, .stairs.is-rail .col[aria-selected="true"] .tv-open { transform: none; transition: none; }
.stairs.is-rail ~ .panels .tpanel { background: var(--surface); }
.stairs.is-rail ~ .panels .tpanel.is-leaving { animation: none; }
/* แท่งที่กำลังหุบ: คงหัวแผงและแผงเดิม (ทึบ) จนเกือบพับสุด แล้วสลับเป็นหน้าแบบพับในจังหวะเดียว · ไม่มีเส้นขั้นโผล่ระหว่างหุบ */
.stairs.is-rail .col.is-closing { background-image: none; }
.stairs.is-rail .col.is-closing .tv-open { opacity: 1; visibility: visible; }
.stairs.is-rail .col.is-closing .tv-open .tag { opacity: 1; transition: none; }
.stairs.is-rail .col.is-closing .tv-fold { opacity: 0; visibility: hidden; }
.stairs.is-rail .col[aria-selected="true"] .tv-open .tag { transition: opacity 200ms var(--ease-out) 200ms; }
/* แผงใหม่ทึบตั้งแต่เฟรมแรก เผยด้วยหน้าต่าง · แค่ยกตัวขึ้น 10px ไล่กันสั้น ๆ (เดิมจางจาก 0 นานเกินครึ่งวินาที) */
@keyframes rail-rise { from { transform: translateY(10px); } to { transform: none; } }
.stairs.is-rail ~ .panels .tpanel.is-entering > * { animation: rail-rise 420ms var(--ease-out) both; }
.stairs.is-rail ~ .panels .tpanel.is-entering > :nth-child(1) { animation-delay: 0ms; }
.stairs.is-rail ~ .panels .tpanel.is-entering > :nth-child(2) { animation-delay: 30ms; }
.stairs.is-rail ~ .panels .tpanel.is-entering > :nth-child(3) { animation-delay: 60ms; }
.stairs.is-rail ~ .panels .tpanel.is-entering > :nth-child(4) { animation-delay: 90ms; }
.stairs.is-rail ~ .panels .tpanel.is-entering > :nth-child(n+5) { animation-delay: 120ms; }
.col[aria-selected="true"] { flex-basis: var(--open-w); border-top: var(--border-width-strong) solid var(--text); background-image: none; cursor: default; }
.col:not([aria-selected="true"]):hover { background-color: var(--surface-2); }
/* โหมดมืด: ชี้แล้วเข้มลงหนึ่งชั้น (แดงสว่างบน #2A2A2A ได้แค่ 3.88:1 ไม่ผ่าน · บน #111111 ได้ 5.11:1) */
html[data-theme="dark"] .col:not([aria-selected="true"]):hover { background-color: var(--bg); }
.col:focus-visible { outline-offset: -4px; }
.col-bar { position: absolute; left: -1px; top: calc(var(--rise-bar-width) / -1.6266 * 0.62); z-index: 3; visibility: hidden; }
.col[aria-selected="true"] .col-bar { visibility: visible; }
.idx { display: block; font-size: var(--fs-small); line-height: 1.4; font-weight: var(--fw-medium); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.col-name { display: block; margin-top: 2px; font-size: var(--fs-tab); line-height: var(--lh-tab); font-weight: var(--fw-semibold); color: var(--text); white-space: nowrap; }
.col-for { display: block; font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.col-for .w { display: block; }
.tv-open { position: absolute; left: 0; top: 0; width: var(--open-w); height: var(--head-h); padding: var(--space-4) var(--space-5) 0; display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-3); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity 140ms, transform 140ms, visibility 0s 140ms; }
/* แท่งที่หุบกลับ: เนื้อหาแบบพับค่อยกลับมาหลังหัวแผงจางออก (ชิดซ้าย จึงไม่ทับอะไรแม้แท่งยังกว้าง) ไม่ปล่อยแท่งว่างขาว */
.tv-fold { position: absolute; inset: 0; padding: 10px var(--space-3) var(--space-6); display: flex; flex-direction: column; justify-content: space-between; transition: opacity 300ms var(--ease-out) 160ms, visibility 0s; }
.col[aria-selected="true"] .tv-open { opacity: 1; visibility: visible; transform: none; transition: opacity 320ms var(--ease-out) 40ms, transform 520ms var(--ease-spring) 40ms, visibility 0s; }
/* แท่งที่กาง: เนื้อหาแบบพับจางออกเร็ว ไม่หายวับจนแท่งว่างเปล่า */
.col[aria-selected="true"] .tv-fold { opacity: 0; visibility: hidden; transition: opacity 100ms, visibility 0s 100ms; }
/* ป้ายสถานะบนหัวแผง: ขึ้นหลังแท่งกางเกือบสุด ไม่ถูกขอบแท่งตัดครึ่งกรอบ */
.tv-open .tag { opacity: 0; transition: opacity 100ms; }
.col[aria-selected="true"] .tv-open .tag { opacity: 1; transition: opacity 260ms var(--ease-out) 380ms; }
/* จริตตอนชี้ (ก่อนสลับแผง): วัตถุในแท่งยกตัวขึ้นนิดหนึ่ง · ขยับด้วย transform อย่างเดียว ไม่ให้หน้าจัดตำแหน่งใหม่ */
.fold-obj .obj { transition: transform 560ms var(--ease-spring); }
.col:not([aria-selected="true"]):hover .fold-obj .obj { will-change: transform; }
.col:not([aria-selected="true"]):hover .fold-obj .obj { transform: translateY(-8px); }
.col:not([aria-selected="true"]):hover { border-top-color: var(--text); }
.fold-top { display: flex; flex-direction: column; gap: 2px; }
/* ป้าย "ใช้จริงในบริษัทเรา" สองบรรทัด: วางข้างเลขลำดับ ให้อยู่ในขั้นแรก ไม่ทับเส้นขั้น */
.fold-top:has(.tag--live) { flex-direction: row; align-items: flex-start; gap: var(--space-2); }
.tv-fold .tag { border: 0; padding: 0; align-self: flex-start; gap: 6px; font-size: var(--fs-small); line-height: 1.4; white-space: normal; }
.tv-fold .tag--live { color: var(--accent); align-items: flex-start; }
/* 22 พ.ย. (D-20261122-11): ป้ายของผลิตภัณฑ์ที่ข้อความยังเป็นตัวอย่าง (รอเจ้าของแก้) */
.tag--sample { color: var(--text-muted); }
/* ชื่อแนวตั้งในแท่งพับ: "Jigsaw" ตัวเล็กนำหน้าชื่อผลิตภัณฑ์ */
.fold-brand { font-size: 0.6em; font-weight: var(--fw-light); color: var(--text-muted); }
.tv-fold .tag--live::before { margin-top: 0.42em; }
.tag .tw > span { display: block; }
.fold-name { flex: 1 1 auto; display: flex; align-items: flex-end; margin: var(--space-5) 0 var(--space-4); min-height: 0; }
.fold-name span { writing-mode: vertical-rl; transform: rotate(180deg); font-size: var(--fs-h2); line-height: 1; font-weight: var(--fw-medium); white-space: nowrap; color: var(--text); }
.tv-fold .col-for { border-top: var(--line); padding-top: var(--space-3); }
.col:last-child .tv-fold > * { max-width: calc(var(--fold-w) - var(--space-3) * 2); }
/* แผงพับแคบ (จอกลาง): ป้ายและคำอธิบายในแผงพับขึ้นบรรทัดใหม่ตรงจุดตัดคำที่วางไว้ใน HTML (.brk + <wbr>) แทนที่จะถูกขอบแผงตัด · จอกว้างคงบรรทัดเดียวเหมือนเดิม */
.brk { white-space: nowrap; }
.brk wbr { display: none; }  /* Chrome ยังตัดที่ <wbr> แม้ nowrap จึงซ่อนจุดตัดไว้ก่อน */
/* 1250 = 390 (แผงเปิด) + 6.15 × 140 (แท่งพับเต็ม) ของ 7 แท่ง · เงื่อนไข container ใส่ตัวแปรไม่ได้ ถ้าเปลี่ยนจำนวนแท่งต้องแก้เลขนี้ */
@container (max-width: 1250px) {
  .brk { white-space: normal; }
  .brk wbr { display: inline; }
  .tv-fold .tag, .tv-fold .col-for, .fold-thumb-cap { min-width: 0; max-width: 100%; }
  .tv-fold { padding-inline: var(--space-2); }
  .col:last-child .tv-fold > * { max-width: calc(var(--fold-w) - var(--space-2) * 2); }
  .fold-top:has(.tag--live) { flex-direction: column; gap: 2px; }
  .tv-fold .tag { align-items: flex-start; }
  .tv-fold .tag::before { margin-top: 0.42em; }
  .tv-fold .tag--developing::before { margin-top: 0.63em; }
}

.panels { position: absolute; left: 0; top: 0; z-index: 2; width: var(--open-w); pointer-events: none;
  height: calc(100% - var(--top-luma) - var(--step) * (var(--n, 7) - var(--sel)) - var(--head-h));
  transform: translate(calc((var(--sel) - 1) * var(--fold-w) + 1px), calc(var(--top-luma) + var(--step) * (var(--n, 7) - var(--sel)) + var(--head-h)));
  /* 22 พ.ย.: ตำแหน่งสุดท้ายเปลี่ยนทันที แล้วสคริปต์ให้แผงยึดขอบแท่งทุกเฟรมระหว่างแท่งกาง (main.js หัวข้อ 3ก แท่งบนราง) จึงไม่ใส่การเลื่อนแบบ transition ที่นี่ */ }
.tpanel { position: absolute; inset: 0; display: flex; flex-direction: column; padding: var(--space-2) var(--space-5) 0; pointer-events: auto; }
.tpanel[hidden] { display: none; }
.panel-title { font-size: var(--fs-h2); line-height: var(--lh-h2); font-weight: var(--fw-medium); }
.panel-sub { margin: var(--space-3) 0 var(--space-1); font-size: var(--fs-label); line-height: var(--lh-label); font-weight: var(--fw-label); color: var(--text-muted); }
.does li, .dash-list li { position: relative; padding-left: 20px; font-size: var(--fs-body); line-height: 1.6; }
.does li::before, .dash-list li::before { content: ""; position: absolute; left: 0; top: 0.8em; width: 8px; height: 1.5px; background: var(--text); }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2) var(--space-5); margin-top: var(--space-4); }
.actions .btn-solid { min-height: 44px; padding: var(--space-2) var(--space-5); }
.tpanel .window-frame { margin-top: var(--space-4); flex: none; }
.tpanel .window-frame__bar { height: 28px; }
.tpanel .window-frame__body { flex: none; aspect-ratio: 680 / 300; background: var(--surface-2); }
/* แผง 01: ครอปจุดเดียวจากภาพจริง (การ์ดรุ่นที่ผ่านเงื่อนไข · พิกัดภาพจริง x 4–330 y 390–526) ตัวหนังสือในภาพแสดงจริงราว 13 px */
.tpanel .window-frame__body.crop-jig { aspect-ratio: 326 / 136; }
.crop-jig > img { position: absolute; left: 0; top: 0; width: calc(100% * 1290 / 326); max-width: none; height: auto; margin: 0; transform: translate(calc(-4 / 1290 * 100%), calc(-390 / 880 * 100%)); }
html[data-theme="dark"] .window-frame img, html[data-theme="dark"] .fold-thumb img { filter: brightness(.88); }
/* 6 ภาพเล็กในแผงที่พับ (ภาพตัวอย่าง ยกเว้น Jigsaw ที่เป็นภาพจริง) */
.fold-thumb { display: block; margin-top: var(--space-4); }
.fold-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 680 / 420; object-fit: cover; object-position: 0 0; border: var(--border-width) solid var(--frame-border); border-radius: var(--radius-sm); background: var(--surface-2); }
.fold-thumb-cap { display: block; margin-top: var(--space-1); font-size: var(--fs-small); line-height: 1.4; color: var(--text-muted); }
.no-shot { padding: var(--space-3) 0 var(--space-4); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.tilt { transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transform-origin: 50% 0; transition: transform 200ms var(--ease-out); }

/* เนื้อหาแผงใหม่เข้าทีหลัง 120ms */
@keyframes rise-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
/* 22 พ.ย.: เนื้อหาแผงใหม่ไล่ขึ้นทีละบรรทัดตามจังหวะแท่ง · แผงเดิมจางออกสั้น ๆ แทนการหายวับ */
.tpanel.is-entering > * { animation: rise-in 560ms var(--ease-spring) both; }
.tpanel.is-entering > :nth-child(1) { animation-delay: 70ms; }
.tpanel.is-entering > :nth-child(2) { animation-delay: 120ms; }
.tpanel.is-entering > :nth-child(3) { animation-delay: 170ms; }
.tpanel.is-entering > :nth-child(4) { animation-delay: 210ms; }
.tpanel.is-entering > :nth-child(n+5) { animation-delay: 250ms; }
@keyframes panel-out { to { opacity: 0; transform: translateY(-6px); } }
.tpanel.is-leaving { pointer-events: none; animation: panel-out 140ms var(--ease-io) both; }
@supports (transition-timing-function: linear(0, 1)) {
  :root { --ease-spring: linear(0, 0.062, 0.202, 0.366, 0.526, 0.664, 0.776, 0.861, 0.922, 0.964, 0.990, 1.005, 1.012, 1.015, 1.015, 1.013, 1.010, 1.008, 1.006, 1.004, 1.002, 1.001, 1.001, 1, 1); }
}

/* ลำดับเปิดจอแรก */
/* ลำดับเปิดจอแรก: ใช้ CSS ล้วน เล่นเองตั้งแต่เฟรมแรก ไม่ต้องรอสคริปต์ (สคริปต์ช้าหรือพัง เนื้อหาก็ยังขึ้นครบ) */
@keyframes line-up { from { transform: translateY(130%); } to { transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes col-rise { from { transform: translateY(24px); } to { transform: none; } }
@keyframes col-rise-fade { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: no-preference) {
  .js:not(.is-shot) .hero:not(.is-settled) .lm > span { animation: line-up 600ms var(--ease-out) both; }
  .js:not(.is-shot) .hero:not(.is-settled) .lm:nth-child(2) > span { animation-delay: 90ms; }
  .js:not(.is-shot) .hero:not(.is-settled) :is(.story, .slogan-en, .identity, .services, .pick) { animation: fade-in 400ms var(--ease-out) 120ms both; }
  .js:not(.is-shot) .hero:not(.is-settled) .col { animation: col-rise-fade 650ms var(--ease-out) both; animation-delay: calc(120ms + (var(--k) - 1) * 60ms); }
  .js:not(.is-shot) .hero:not(.is-settled) .col[aria-selected="true"] { animation-name: col-rise; }
  .js:not(.is-shot) .hero:not(.is-settled) #panel-1 { animation: col-rise 650ms var(--ease-out) 120ms both; }
  .js:not(.is-shot) .hero:not(.is-touched) #tab-1 .col-bar { animation: bar-land 400ms var(--ease-io) 520ms both; }
}

/* หน้าจอกลาง: ข้อความด้านบน แผงเต็มกว้างด้านล่าง */
@media (max-width: 1319px) and (min-width: 1180px) {
  .hero { grid-template-columns: 320px minmax(0, 1fr); }
  .slogan-en { font-size: 20px; }  /* คอลัมน์ข้อความแคบลงเหลือ 320 · ขนาดเดียวกับจอมือถือ ให้ประโยคอังกฤษจบในคอลัมน์ ไม่ลอดใต้แผงผลิตภัณฑ์ */
}
/* 22 พ.ย.: เคยขยายผังวางข้อความด้านบนถึงจอ 1439 แต่จอแล็ปท็อป 1366 แท่งตกใต้จอแรก (เปลี่ยนหน้าที่เจ้าของรับ) → คืนเป็น 1179 ตามเดิม รอเจ้าของเลือกวิธีแก้ตัวหนังสือในแท่งพับที่จอ 1180–1439 */
@media (max-width: 1179px) {
  .hero { display: block; height: auto; padding-top: 0; }
  .hero-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 48px; padding: 40px var(--gutter) 40px 0; }
  .hero-intro > .story, .slogan, .slogan-en { grid-column: 1; }
  .identity { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; align-self: end; }
  .services { grid-column: 2; grid-row: 3 / span 2; margin-top: var(--space-5); }
  .slogan { font-size: 72px; }
  .stage { height: calc(24px + (var(--n, 7) - 1) * min(140px, (100vw - var(--edge) - 390px) / (var(--n, 7) - 0.85)) * 0.4663 + 560px); }
}
/* มือถือ: รายการแนวตั้ง ยังเห็นขั้นบันได (เยื้องไล่ขั้น) แผงที่เลือกกางลงใต้รายการนั้น */
@media (max-width: 759px) {
  .hero { padding: 0 var(--gutter); }
  .hero-intro { display: flex; padding: 28px 0 32px; }
  .slogan { font-size: 60px; margin-top: var(--space-4); }
  .slogan-en { font-size: 20px; white-space: normal; }
  .identity { margin-top: var(--space-5); font-size: 18px; }
  .services { margin-top: var(--space-6); }
  .stage { height: auto; container-type: normal; padding-bottom: 48px; }
  .pick { position: static; margin-bottom: var(--space-7); white-space: normal; }  /* เว้นที่ให้คานแดงของแผงแรก ไม่ทับตัวหนังสือ */
  .stairs { position: relative; inset: auto; flex-direction: column; }
  .col { flex: none !important; margin: 0 0 0 calc((var(--k) - 1) * 6px); min-height: 72px; background-image: none; clip-path: none; border-right: var(--line); transition: background-color 180ms, transform 700ms var(--ease-out), opacity 650ms var(--ease-out); }
  .col:last-child { border-bottom: var(--line); }
  .col[aria-selected="true"] { border-top-width: var(--border-width-strong); }
  .tv-fold { display: none; }
  .tv-open, .col[aria-selected="true"] .tv-open { position: relative; width: auto; height: auto; padding: 14px var(--space-4); opacity: 1; visibility: visible; transform: none; transition: none; }
  .tv-open { flex-wrap: wrap; row-gap: var(--space-2); }
  .tv-open .tag { opacity: 1; transition: none; white-space: nowrap; font-size: 12px; padding: 2px var(--space-2); }
  .panels { left: var(--m-left, 0px); top: var(--m-top, 0px); width: calc(100% - var(--m-left, 0px)); height: auto; transform: none; transition: none; }
  .tpanel { position: relative; inset: auto; padding: var(--space-1) var(--space-4) var(--space-5); border-left: var(--border-width) solid var(--stair); border-right: var(--line); background: var(--surface); }
}

/* ===================== ช่วง 2 · มุมผู้ดูแล ===================== */
.sec { position: relative; }
.s2 { padding: 120px 0 120px; border-top: var(--border-width) solid var(--stair); background: var(--tint-stone); }
.s2-head { display: grid; grid-template-columns: minmax(0, 1fr) 440px; column-gap: 80px; align-items: end; }
.s2-head .lead { padding-bottom: 8px; }
.s2-story { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 64px; margin-top: var(--space-6); }
.st { display: flex; flex-direction: column; justify-content: center; min-height: 62vh; }
.st-in { position: relative; border-top: var(--line-strong); padding-top: var(--space-5); transition: border-color 300ms; }
.st.is-on .st-in { border-top: var(--border-width-strong) solid var(--text); }
.st-bar { position: absolute; left: -1px; top: calc(var(--rise-bar-width) / -1.6266 * 0.62); z-index: 3; visibility: hidden; }
.st.is-on .st-bar { visibility: visible; }
.step-no { font-size: var(--fs-h1); line-height: 1.2; font-weight: var(--fw-light); font-variant-numeric: tabular-nums; color: var(--text-muted); transition: color 300ms; }
.step-name { margin-top: var(--space-2); font-size: var(--fs-h2); line-height: var(--lh-h2); font-weight: var(--fw-semibold); color: var(--text-muted); transition: color 300ms; }
.step-desc { margin-top: var(--space-1); font-size: var(--fs-body); line-height: var(--lh-body); color: var(--text-muted); }
.st.is-on .step-no, .st.is-on .step-name { color: var(--text); }
.s2-media { position: relative; }
.s2-sticky { position: sticky; top: calc(var(--header-h) + 64px); padding-top: 18vh; }
.s2-body { aspect-ratio: 1040 / 460; flex: none; background: var(--surface-2); }
.s2-body::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10%; background: linear-gradient(to bottom, transparent, var(--surface-2)); opacity: 0; transition: opacity 420ms var(--ease-io); pointer-events: none; }
.s2-story:not([data-step="1"]) .s2-body::after { opacity: 1; }   /* ภาพตั้งค่าสูงกว่ากรอบ: จางที่ขอบล่างแทนโดนตัด */
.s2-body > .s2-img { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; object-fit: cover; object-position: 0 0; transition: opacity 420ms var(--ease-io); }  /* ชนะกฎ .window-frame__body > img ใน tokens.css (height:auto) */
.s2-img--admin { opacity: 1; }
.s2-img--setup { opacity: 0; }
.s2-story:not([data-step="1"]) .s2-img--admin { opacity: 0; }
.s2-story:not([data-step="1"]) .s2-img--setup { opacity: 1; }
.s2-veil, .s2-ring { position: absolute; inset: 0; pointer-events: none; transition: clip-path 460ms var(--ease-io); }
.s2-veil { background: var(--veil); }
.s2-ring { background: var(--text); }
html[data-theme="light"] .s2-ring { background: #111111; }
.modes { margin-top: var(--space-9); }
.modes-title { font-size: var(--fs-h2); line-height: var(--lh-h2); font-weight: var(--fw-semibold); }
.mode-cards { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); margin-top: var(--space-5); }
.mode-card { border: var(--line-strong); border-radius: var(--radius-md); padding: var(--space-6); background: var(--surface); transition: translate 200ms var(--ease-out), border-color 180ms; }
.mode-card:hover { translate: 0 -3px; border-color: var(--text); }
.mode-card h4 { font-size: var(--fs-h2); line-height: var(--lh-h2); font-weight: var(--fw-semibold); }
.mode-card dl { display: grid; grid-template-columns: 120px minmax(0, 1fr); column-gap: var(--space-5); row-gap: var(--space-3); margin-top: var(--space-4); }
.mode-card dt { font-size: var(--fs-small); line-height: 1.7; color: var(--text-muted); font-weight: var(--fw-medium); }
.mode-card dd { font-size: var(--fs-body); line-height: var(--lh-body); }
.end-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-6); }
.doc-link { display: inline-flex; align-items: center; gap: var(--space-3); min-height: 44px; font-size: var(--fs-body); line-height: 1.4; font-weight: var(--fw-medium); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.doc-link svg { flex: none; }

@media (max-width: 1179px) {
  .s2-head { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-4); }
  .s2-story { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); column-gap: 40px; }
}
@media (max-width: 759px) {
  .s2 { padding: 80px 0; }
  .s2-story { display: flex; flex-direction: column; }
  .s2-media { order: -1; }
  .s2-sticky { position: static; padding-top: 0; }
  .st { min-height: 0; padding-top: var(--space-7); }
  .st .step-no, .st .step-name { color: var(--text); }
  .mode-cards { grid-template-columns: 1fr; }
  .mode-card { padding: var(--space-5); }
  .mode-card dl { grid-template-columns: 1fr; row-gap: 2px; }
  .mode-card dd + dt { margin-top: var(--space-3); }
}

/* ===================== ช่วง 3 · รอบจริง ===================== */
.s3 { padding: 120px 0 128px; --ch: 240px; }
.s3-wrap { position: relative; display: flow-root; }
.s3-head { position: absolute; width: min(600px, 48%); z-index: 1; }
.s3-head .lead { margin-top: var(--space-4); }
.s3-stairs { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 104px; container-type: inline-size; }  /* ขั้น 3 อยู่ต่ำกว่าหัวเรื่องสองบรรทัด ไม่ชนกัน */
.rc-col { position: relative; display: flex; flex-direction: column; padding-top: calc(25cqw * 0.4663 * (4 - var(--i))); min-width: 0; }
.rc-col + .rc-col { margin-left: -1px; }
.tag-sample { position: absolute; left: 0; top: calc(25cqw * 0.4663 * 3 - 46px); }
.rc { position: relative; min-height: var(--ch); border: var(--border-width) solid var(--stair); background: var(--surface); padding: var(--space-4) var(--space-5); }
.rc.is-top { border-top-width: var(--border-width-strong); }
.rc-bar { position: absolute; left: -1px; top: calc(var(--rise-bar-width) / -1.6266 * 0.62); z-index: 3; }
.rc-no { font-size: var(--fs-small); line-height: 1.4; font-weight: var(--fw-medium); color: var(--text-muted); }
.rc-name { margin-top: 2px; font-size: var(--fs-tab); line-height: var(--lh-tab); font-weight: var(--fw-semibold); }
.rr { margin-top: var(--space-3); padding-top: var(--space-3); border-top: var(--line); }
.rr dt { font-size: var(--fs-small); line-height: 1.4; font-weight: var(--fw-semibold); }
.rr dd { margin-top: 2px; font-size: var(--fs-body); line-height: 1.5; color: var(--text-muted); }
.sig-cap { margin-top: var(--space-4); padding-left: var(--space-5); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.under { padding: var(--space-4) 0 0 var(--space-5); }
.under p { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.under .text-link { margin-top: var(--space-1); }
.sig { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 3; }
.sig path { fill: none; stroke: var(--text-muted); stroke-width: 1.5; stroke-linecap: square; }

/* ไต่ขึ้นตามแนว 25° ทีละใบ แล้วรอยแก้ต่อเป็นขั้นถัดไป */
.motion .s3-stairs:not(.is-in) .rc { opacity: 0; transform: translate(-16px, 7.46px); }
.motion .s3-stairs .rc { transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); transition-delay: calc((var(--i) - 1) * 90ms); }
.motion .s3-stairs .rc-col .rc { transition-delay: calc((var(--i) - 1) * 90ms); }
.motion .s3-stairs:not(.is-in) .tag-sample { opacity: 0; }
.motion .s3-stairs .tag-sample { transition: opacity 400ms 200ms; }
.motion .s3-stairs:not(.is-in) .sig path { stroke-dashoffset: 1; }
.sig path { stroke-dasharray: 1; stroke-dashoffset: 0; }
.motion .s3-stairs.is-in .sig-a { animation: draw 160ms linear 1000ms both; }
.motion .s3-stairs.is-in .sig-b { animation: draw 320ms var(--ease-io) 1160ms both; }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.motion .s3-stairs:not(.is-in) .rc-bar { visibility: hidden; }
.motion .s3-stairs.is-in .rc-bar { animation: bar-land 400ms var(--ease-io) 1480ms both; }
.motion .s3-stairs:not(.is-in) .sig-cap { opacity: 0; }
.motion .s3-stairs .sig-cap { transition: opacity 400ms var(--ease-out) 1880ms; }
.motion .s3-stairs:not(.is-in) .under { opacity: 0; }
.motion .s3-stairs .under { transition: opacity 500ms var(--ease-out) 600ms; }

@media (max-width: 1179px) {
  .s3 { --ch: 280px; }
  .s3-head { position: static; width: auto; max-width: 720px; }
  .s3-stairs { margin-top: var(--space-8); }
  .rc { padding: var(--space-4); }
  .sig-cap, .under { padding-left: var(--space-4); }
}
@media (max-width: 759px) {
  .s3 { padding: 80px 0; }
  .s3-stairs { display: block; container-type: normal; margin-top: var(--space-7); }
  .rc-col { padding-top: 0; margin-left: calc((var(--i) - 1) * 12px) !important; }
  .rc-col + .rc-col { margin-top: 40px; }  /* ช่องระหว่างขั้น: ที่ของคานแดงและเส้นต่อขั้น ไม่ทับข้อความ */
  .tag-sample { position: static; display: inline-flex; margin-bottom: var(--space-3); }
  .rc { min-height: 0; }
  .sig-cap, .under { padding-left: 0; }
}

/* ===================== ช่วง 4 · บริการ ===================== */
.s4 { margin-top: calc(40px - var(--notch-h)); padding: calc(var(--notch-h) + 88px) 0 112px; overflow: clip; }
.s4-band { position: absolute; inset: 0 0 -48px 0; }
.s4-band__in { position: absolute; inset: 0; background: var(--band); clip-path: polygon(0 var(--notch-h), calc(100% - var(--notch-w)) var(--notch-h), 100% 0, 100% 100%, 0 100%); transform: translateY(var(--band-par, 0px)); }
.s4-wrap { position: relative; }
.s4-top { display: grid; grid-template-columns: minmax(0, 1fr) 440px; column-gap: 80px; align-items: end; }
.s4-lead { max-width: 440px; padding-bottom: 8px; color: var(--text-muted); }
.motion .s4-top [data-reveal] { transition-delay: calc(320ms + var(--d, 0) * 80ms); }   /* รอแถบเช็ดเข้ามาก่อน ตัวขาวจึงไม่ลอยบนพื้นขาว */
.svc-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); align-items: start; margin-top: var(--space-8); }
.s3 { padding-bottom: 64px; }
.svc { position: relative; display: flex; flex-direction: column; padding: var(--space-6) var(--space-5) var(--space-5); background: var(--card); border: var(--border-width) solid var(--band-indigo-line); border-radius: var(--radius-md); overflow: hidden; transition: translate 200ms var(--ease-out), box-shadow 200ms; }
.svc::before { content: ""; position: absolute; left: 0; top: 0; width: 520px; height: 520px; pointer-events: none; opacity: 0; background: radial-gradient(circle closest-side, rgba(255, 255, 255, .07), transparent); transform: translate(calc(var(--mx, 50%) - 260px), calc(var(--my, 0px) - 260px)); transition: opacity 200ms; }
.svc:hover, .svc:focus-within { translate: 0 -4px; box-shadow: inset 0 2px 0 var(--accent); }
.svc:hover::before { opacity: 1; }
.svc > * { position: relative; }
.svc .tag { align-self: flex-start; }
.svc h3 { margin-top: var(--space-4); font-size: var(--fs-h2); line-height: var(--lh-h2); font-weight: var(--fw-semibold); }
.svc .lbl { margin-top: var(--space-4); font-size: var(--fs-small); line-height: 1.5; font-weight: var(--fw-medium); color: var(--text-muted); }
.svc .fit { margin-top: var(--space-1); font-size: var(--fs-body); line-height: var(--lh-body); }
.svc .dash-list { margin-top: var(--space-1); }
.svc .proof { margin-top: var(--space-4); padding: var(--space-2) var(--space-3); border: var(--line-strong); border-radius: var(--radius-sm); font-size: var(--fs-small); line-height: var(--lh-small); }
.svc .proof small { display: block; margin-top: 2px; color: var(--text-muted); font-size: var(--fs-small); }
.svc .uses { margin-top: var(--space-4); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.svc .sub-link { margin-top: var(--space-2); font-size: var(--fs-small); font-weight: var(--fw-regular); color: var(--text-muted); }
.svc .foot { padding-top: var(--space-4); }
.svc .foot .btn-secondary { min-height: 44px; padding: var(--space-2) var(--space-4); }

/* การ์ดวัดตัวเองสด (ช่องย่อยในการ์ด ใช้เทาชั้นถัดไป ไม่มีกรอบซ้อน) */
.live { position: relative; margin-top: var(--space-3); padding: var(--space-4); background: var(--cell); border-radius: var(--radius-sm); overflow: hidden; }
.live-title { font-size: var(--fs-body); line-height: 1.5; font-weight: var(--fw-semibold); }
.live-desc { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.live-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); margin-top: var(--space-3); }
.live-lbl { font-size: var(--fs-small); line-height: 1.4; color: var(--text-muted); }
.live-val { margin-top: var(--space-1); font-size: var(--fs-tab); line-height: 1.4; font-weight: var(--fw-medium); font-variant-numeric: tabular-nums; }
.live-val .v { font-size: var(--fs-h2); }
.live-val .vd { display: block; font-size: var(--fs-small); font-weight: var(--fw-regular); color: var(--text-muted); }
.live-none { margin-top: var(--space-3); font-size: var(--fs-body); line-height: 1.5; }
.live-none p + p { font-size: var(--fs-small); color: var(--text-muted); }
.live-sweep { position: absolute; top: -20%; bottom: -20%; left: 0; width: 1.5px; background: var(--text-muted); transform: translateX(-24px) skewX(-25deg); opacity: 0; pointer-events: none; }
.motion .svc:hover .live-sweep { animation: sweep 760ms var(--ease-io) 1; }
@keyframes sweep { 0% { opacity: .9; transform: translateX(-24px) skewX(-25deg); } 100% { opacity: .9; transform: translateX(560px) skewX(-25deg); } }

/* เผยแถบด้วยการกวาดเฉียง */
.motion .s4-band:not(.is-in) { clip-path: polygon(0% 0%, 0% 0%, -30% 100%, -30% 100%); }
.motion .s4-band { clip-path: polygon(0% 0%, 130% 0%, 100% 100%, 0% 100%); transition: clip-path 800ms var(--ease-out); }
.motion .s4 .svc[data-reveal]:not(.is-in) { opacity: 0; transform: translateY(24px); }

@media (max-width: 1179px) {
  .s4-top { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-4); }
  .svc { padding: var(--space-5) var(--space-4) var(--space-4); }
  .live-grid { grid-template-columns: 1fr; gap: var(--space-2); }
}
@media (max-width: 959px) {
  .svc-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 759px) {
  .s4 { padding: 80px 0 72px; }
  .svc-cards { grid-template-columns: 1fr; }
  .live-grid { grid-template-columns: 1fr; }
}

/* ===================== ช่วง 5 · หลักฐาน ===================== */
.s5 { padding: 96px 0; border-bottom: var(--line); background: var(--tint-stone); }
.proofs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: var(--space-7); }
.proofs > div { position: relative; display: flex; flex-direction: column; min-height: 176px; padding: 0 var(--space-5); }
.proofs > div:first-child { padding-left: 0; }
.proofs > div + div::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--border-strong); transform-origin: 50% 0; transition: transform 450ms var(--ease-out); }
.motion .proofs:not(.is-in) > div + div::before { transform: scaleY(0); }
.proofs > div:nth-child(3)::before { transition-delay: 80ms; }
.proofs > div:nth-child(4)::before { transition-delay: 160ms; }
.proofs h3 { font-size: var(--fs-body); line-height: 1.4; font-weight: var(--fw-semibold); }
.proofs p { margin-top: var(--space-3); font-size: var(--fs-small); line-height: 1.7; color: var(--text-muted); }
.proofs p b { color: var(--text); font-weight: var(--fw-medium); }
.proofs .text-link { margin-top: auto; padding-top: var(--space-3); font-size: var(--fs-small); align-self: flex-start; }
.arrow-link .arr { display: inline-block; margin-left: 6px; text-decoration: none; transition: transform 180ms var(--ease-out); }
.arrow-link:hover .arr, .arrow-link:focus-visible .arr { transform: translate(4px, -4px); }
@media (max-width: 1023px) {
  .proofs { grid-template-columns: 1fr 1fr; row-gap: var(--space-6); }
  .proofs > div:nth-child(3) { padding-left: 0; }
  .proofs > div:nth-child(3)::before { display: none; }
}
@media (max-width: 599px) {
  .s5 { padding: 72px 0; }
  .proofs { grid-template-columns: 1fr; row-gap: 0; }
  .proofs > div { padding: var(--space-5) 0; min-height: 0; }
  .proofs > div + div::before { display: block !important; left: 0; right: 0; top: 0; bottom: auto; width: auto; height: 1px; transform-origin: 0 50%; }
  .motion .proofs:not(.is-in) > div + div::before { transform: scaleX(0); }
}

/* ===================== ช่วง 6 · นัดคุย ===================== */
.s6 { padding: 120px 0; }
.s6 .lead { margin-top: var(--space-4); }
.talk { display: grid; grid-template-columns: minmax(0, 1fr) 460px; margin-top: var(--space-7); border: var(--border-width) solid var(--stair); border-radius: var(--radius-md); background: var(--surface); }
.talk-pick { padding: var(--space-7); min-width: 0; }
.topics { border: 0; margin: 0; padding: 0; min-width: 0; }
.grp-wrap + .grp-wrap { margin-top: var(--space-7); }
.grp { font-size: var(--fs-label); line-height: var(--lh-label); font-weight: var(--fw-semibold); }
.chips { position: relative; display: flex; flex-wrap: wrap; gap: var(--space-5) var(--space-3); margin-top: var(--space-6); }
.chip { position: relative; display: inline-flex; align-items: center; min-height: 48px; padding: var(--space-2) var(--space-5); border: var(--line-strong); border-radius: var(--radius-sm); font-size: var(--fs-body); line-height: 1.4; font-weight: var(--fw-medium); white-space: nowrap; cursor: pointer; transition: border-color 180ms; }
.chip:hover { border-color: var(--text); }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip:has(input:focus-visible) { outline: var(--border-width-strong) solid var(--focus-ring); outline-offset: 3px; }
.chip:has(input:checked) { border: var(--border-width-strong) solid var(--text); padding: 7px 23px; font-weight: var(--fw-semibold); }
.chip-bar { position: absolute; left: -2px; top: calc(var(--rise-bar-width) / -1.6266 * 0.62); z-index: 3; visibility: hidden; }
.chip:has(input:checked) .chip-bar { visibility: visible; }
.picked { display: none; margin-top: var(--space-2); padding-left: var(--px, 0px); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.grp-wrap.has-picked .picked { display: block; animation: rise-in 300ms var(--ease-out) both; }
.talk-next { display: flex; flex-direction: column; padding: var(--space-7); border-left: var(--border-width) solid var(--stair); }
.talk-next h3 { font-size: var(--fs-body); line-height: 1.4; font-weight: var(--fw-semibold); }
.talk-next ol { margin-top: var(--space-4); counter-reset: n; border-top: var(--line); }
.talk-next li { counter-increment: n; display: grid; grid-template-columns: 36px 1fr; padding: var(--space-3) 0; border-bottom: var(--line); font-size: var(--fs-body); line-height: 1.5; }
.talk-next li::before { content: counter(n); font-weight: var(--fw-light); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.talk-next .reply { margin-top: var(--space-4); font-size: var(--fs-body); line-height: 1.5; }
.talk-next .cta { margin-top: auto; padding-top: var(--space-6); display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-1); }
.talk-next .cta .text-link { font-size: var(--fs-small); font-weight: var(--fw-regular); color: var(--text-muted); }
.cta-next { margin-top: var(--space-2); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.magnet { transform: translate(var(--tx, 0px), var(--ty, 0px)); transition: transform 200ms var(--ease-out), background-color 180ms, color 180ms, border-color 180ms; max-width: 100%; }
.cta-txt { display: inline-block; white-space: normal; text-align: left; }
.cta-txt.out { opacity: 0; transform: translateY(-8px); transition: opacity 110ms, transform 110ms var(--ease-io); }
.cta-txt.in { animation: cta-in 110ms var(--ease-out) both; }
@keyframes cta-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 1179px) {
  .talk { grid-template-columns: 1fr; }
  .talk-next { border-left: 0; border-top: var(--border-width) solid var(--stair); }
}
@media (max-width: 759px) {
  .s6 { padding: 80px 0; }
  .talk-pick, .talk-next { padding: var(--space-5); }
  .chip { white-space: normal; }
}

/* ===================== ท้ายเว็บ ===================== */
.site-foot { background: #111111; padding: 80px 0 40px; }
html[data-theme="dark"] .site-foot { border-top: var(--border-width) solid #3A3A3A; }
.foot-story { margin-bottom: var(--space-7); }
.foot-grid { display: grid; grid-template-columns: 360px repeat(4, minmax(0, 1fr)); column-gap: var(--space-6); }
.foot-logo { width: 187.5px; height: 44.6px; margin-left: -9.5px; }
.foot-brand p { margin-top: var(--space-4); font-size: var(--fs-body); line-height: 1.5; }
.foot-brand small { display: block; margin-top: var(--space-3); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.foot-col h2 { font-size: var(--fs-small); line-height: 1.4; font-weight: var(--fw-medium); color: var(--text-muted); }
.foot-col ul { margin-top: var(--space-3); display: grid; }
.foot-col a { position: relative; display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-size: var(--fs-small); line-height: 1.5; }
.foot-col a:hover::after, .foot-col a:focus-visible::after { transform: scaleX(1); }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-8); border-top: var(--line); padding-top: var(--space-5); font-size: var(--fs-small); color: var(--text-muted); }
.foot-bottom .tools { display: flex; align-items: center; gap: var(--space-4); }
@media (max-width: 1179px) {
  .foot-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: var(--space-7); }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 759px) {
  .site-foot { padding: 64px 0 32px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- เปิดตัวเมื่อเลื่อนถึง (เล่นครั้งเดียว) ---------- */
.motion [data-reveal]:not(.is-in) { opacity: 0; transform: translateY(24px); }
.motion [data-reveal] { transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); transition-delay: calc(var(--d, 0) * 80ms); }
.motion [data-reveal]:not(.is-in) .lm > span { transform: translateY(130%); }
.motion [data-reveal] .lm > span { transition: transform 700ms var(--ease-out) 80ms; }
.motion [data-reveal] .lm + .lm > span { transition-delay: 170ms; }
/* หลังเปิดตัวจบ: กลับไปใช้จังหวะชี้เมาส์ 180–200ms */
/* C11: เปิดตัวใช้ opacity+transform (หน่วงตามลำดับ) · ชี้เมาส์ใช้ translate แยกชั้น ตอบสนอง 200ms เท่ากันตลอด */
.motion :is(.svc, .mode-card)[data-reveal] { transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out), translate 200ms var(--ease-out), box-shadow 200ms, border-color 180ms; transition-delay: var(--rd, 0ms), var(--rd, 0ms), 0s, 0s, 0s; }
.motion .mode-card[data-reveal] { --rd: calc(var(--d, 0) * 80ms); }
.motion .s4 .svc[data-reveal] { --rd: calc(240ms + var(--d, 0) * 80ms); }

/* ---------- ม่านเปลี่ยนโหมด (View Transition) ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- โหมดถ่ายภาพ: สถานะจบแล้ว ไม่ติดจอ ---------- */
.is-shot { --hero-h: 828px; scroll-behavior: auto; }
.is-shot .s2-sticky { position: static; padding-top: 0; }
.is-shot .st { min-height: 0; padding: var(--space-6) 0; }
.is-shot .st:first-child { padding-top: 0; }
.is-shot .st .step-no, .is-shot .st .step-name { color: var(--text); }
.is-shot *, .is-shot *::before, .is-shot *::after { transition: none !important; animation: none !important; }
.is-shot .rise-bar { clip-path: polygon(0% 69.12%, 91.15% 0%, 100% 30.88%, 8.85% 100%) !important; }

/* ---------- ผู้ชมขอลดการเคลื่อนไหว ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .tilt, .magnet, .fold-obj .obj { transform: none !important; }
  .s4-band__in { transform: none !important; }
  .svc::before { display: none; }
  .svc:hover, .svc:focus-within, .mode-card:hover { translate: none; }
  .s2-sticky { position: static; padding-top: 0; }
  .st { min-height: 0; padding: var(--space-6) 0; }
  .st .step-no, .st .step-name { color: var(--text); }
}

/* ---------- สัญลักษณ์สถานะชุดเดียว (สี่เหลี่ยม 8 px เส้น 1.5 px) · ต้นแบบ = โปร่ง · กำลังสร้าง = เติมครึ่ง · กำลังพัฒนา = เติมเกือบเต็ม · ใช้จริง = เติมแดง ---------- */
.tag::before { width: 8px; height: 8px; border: 1.5px solid currentColor; background: none; box-sizing: border-box; }
.tag--prototype::before { background: none; }
.tag--building::before { background: linear-gradient(to top, currentColor 50%, transparent 50%); }
.tag--developing::before { height: 8px; background: linear-gradient(to top, currentColor 78%, transparent 78%); }
.tag--live::before { border-color: var(--accent); background: var(--accent); }


/* ==========================================================================
   D6 · วัตถุ 3 มิติผิวด้าน (ภาพตัวอย่างจาก AI รอนักออกแบบ 3 มิติจริง) · รอบแก้ 1
   ภาพทุกภาพพื้นโปร่งใส ใช้ภาพเดียวกันทั้ง 2 โหมด · โหมดมืดเพิ่มเงาดำนุ่ม (--obj-shadow) ห้ามแสงเรือง
   .obj = กล่องเท่าขอบเขตเนื้อวัตถุจริงในภาพ (วัดจากช่องโปร่งใสของไฟล์ · --bx --by --bw --bh)
          ภาพเต็มวางล้นกล่องด้วยสัดส่วนเดิม → จัดวาง/ตรวจการทับ ใช้กล่องนี้ = ตัววัตถุที่เห็นจริง
   ทุกชิ้นมีพื้นรองหรือเงาสัมผัสใต้ฐาน (::before) · ทิศแสงซ้ายบนเหมือนกันทุกชิ้น → เงาเยื้องไปทางขวาเล็กน้อย
   ========================================================================== */
.obj { position: relative; display: block; aspect-ratio: var(--bw) / var(--bh); pointer-events: none; }
.obj > img, .obj > svg { position: absolute; max-width: none; margin: 0; width: calc(var(--ow) / var(--bw) * 100%); height: auto; aspect-ratio: var(--ow) / var(--oh); left: calc(var(--bx) / var(--bw) * -100%); top: calc(var(--by) / var(--bh) * -100%); }
.obj > img { filter: var(--obj-shadow); }
.obj::before { content: ""; position: absolute; left: 6%; right: -8%; bottom: -5%; height: 10%; border-radius: 50%; background: radial-gradient(closest-side, var(--obj-contact), transparent); }
.ai-note { display: block; margin-top: var(--space-2); font-size: var(--fs-small); line-height: 1.4; font-weight: var(--fw-regular); color: var(--text-muted); }
/* ภาพเต็มกว้างกว่ากล่องวัตถุ (ส่วนโปร่งใส) → ตัดแนวนอนที่ระดับช่วง ไม่ให้หน้าเลื่อนข้างได้ (clip ไม่สร้างกล่องเลื่อน · ช่วง 2 ยังติดจอได้)
   body ตัดแนวนอนไว้แล้ว แต่ค่าของ body ส่งต่อไปที่หน้าต่าง จึงยังวัดความกว้างหน้าเกินจอได้ · .hero และ .s4 ตัดไว้เองแล้ว */
.s2, .s3, .s6, .site-foot { overflow-x: clip; }

/* ---------- ช่วง 1 · แผงพับ: วัตถุย่อ สูงเท่ากันทุกแผง · เส้นขั้นบางไม่วิ่งผ่านวัตถุ ---------- */
.col { --col-bg: var(--surface); background-color: var(--col-bg); }
.col:not([aria-selected="true"]):hover { --col-bg: var(--surface-2); background-color: var(--col-bg); }
html[data-theme="dark"] .col:not([aria-selected="true"]):hover, .theme-dark .col:not([aria-selected="true"]):hover { --col-bg: var(--bg); }
/* แถบรองพื้นสีเดียวกับแผงบังเส้นขั้นตลอดช่วงวัตถุ + เว้นบนล่าง 16 จุด → เส้นจบที่ขอบแถบ ไม่ผ่านตัววัตถุ */
.fold-obj { display: block; margin: 0 calc(var(--space-3) * -1); padding: var(--space-4) var(--space-3); background: var(--col-bg); --fold-oh: clamp(96px, calc(var(--hero-h) * 0.17), 150px); transition: background-color 220ms var(--ease-out); }
.fold-obj .obj { width: min(100%, calc(var(--fold-oh) * var(--bw) / var(--bh))); }
.fold-obj .obj > img { aspect-ratio: var(--ow) / var(--oh); object-fit: fill; border: 0; border-radius: 0; background: none; }  /* ชนะกฎภาพเล็กเดิม (.fold-thumb img) */
html[data-theme="dark"] .fold-obj .obj > img, .theme-dark .fold-obj .obj > img { filter: var(--obj-shadow); }
/* ป้าย "ภาพตัวอย่าง" เดิมของ D5: คงข้อความ · เล็กสุดตามระบบ ตัวบาง สีจางที่ยังผ่าน 4.5:1 */
.fold-obj .fold-thumb-cap { margin-top: var(--space-3); font-weight: var(--fw-light); color: var(--cap-muted); }
.col:not([aria-selected="true"]):hover .fold-thumb-cap { color: var(--text-muted); }
@container (max-width: 1250px) { .fold-obj { margin-inline: calc(var(--space-2) * -1); padding-inline: var(--space-2); } }

/* ---------- ช่วง 1 · แผง Jigsaw ที่เปิด: วัตถุยืนบนขั้นที่เลือก (ภาพหน้าจอจริงในแผงคงเดิม) ---------- */
.lift-obj { --fold-w: min(140px, calc((100cqw - var(--open-w)) / (var(--n, 7) - 0.85))); --step: calc(var(--fold-w) * var(--tan25));
  --lift-h: clamp(120px, calc(var(--top-luma) + var(--step) * (var(--n, 7) - 1) - 28px), 220px);
  position: absolute; left: 0; z-index: 1; width: calc(var(--open-w) - var(--space-5)); height: var(--lift-h);
  top: calc(var(--top-luma) + var(--step) * (var(--n, 7) - 1) - var(--lift-h));
  display: flex; justify-content: flex-end; align-items: flex-end; pointer-events: none; }
.lift-obj .obj { height: 100%; width: auto; flex: none; }
.lift-obj .obj::before { bottom: -3%; height: 7%; }
.stage:not([data-sel="1"]) .lift-obj { opacity: 0; visibility: hidden; transform: translateY(12px); }
@media (prefers-reduced-motion: no-preference) {
  .motion .lift-obj { transition: opacity 300ms var(--ease-out) 140ms, transform 420ms var(--ease-out) 140ms, visibility 0s; }
  .motion .stage:not([data-sel="1"]) .lift-obj { transition: opacity 160ms, transform 160ms, visibility 0s 160ms; }
  .js:not(.is-shot) .hero:not(.is-settled) .lift-obj { animation: col-rise-fade 650ms var(--ease-out) 380ms both; }
}

/* ---------- ช่วง 1 · แผง 02–05 ที่เปิด: วัตถุใหญ่แทนภาพเทาเดิม ขนาดตามที่ว่างของแผง ---------- */
.p-obj { flex: 1 1 0; min-height: 0; container-type: size; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: var(--space-5); }
.p-obj .obj { height: min(calc(100cqh - 32px), 300px, calc(100cqw * var(--bh) / var(--bw))); width: auto; flex: none; }
.p-obj--m { display: none; }
.tpanel .p-obj .tilt { transform-origin: 50% 100%; }

/* ---------- ช่วง 2 · แผ่นฐานใต้ภาพหน้าจอ Jigsaw (ภาพหน้าจอวางเหมือนตั้งบนแผ่น) ---------- */
.s2-frame { z-index: 1; }
.s2-plinth { position: relative; width: 78%; margin: -20.5% auto 0; }   /* ขอบล่างกรอบตกราวกลางผิวบนของแผ่น (ร้อยละของความกว้างคอลัมน์) */
.s2-plinth .ai-note { text-align: right; margin-right: -14.1%; margin-top: var(--space-4); }
.motion .s2-plinth[data-reveal] { transition-delay: 0ms; }
.motion .s2-frame[data-reveal] { transition-delay: 120ms; }

/* ---------- ช่วง 3 · กองแผ่น 4 ชั้น วางพิงขอบเฉียงของแถบช่วง 4 + ช่วงเด่น "แผ่นแดงปิดรอยบาก" ----------
   ขอบล่างขวาของกอง (จากมุมล่างสุด 215,690 ถึงมุมขวา 590,533 ในภาพ 675×900) เอียงราว 23° ใกล้เส้นเฉียง 25° ของแถบ
   วางให้ระยะลอย/จมแบ่งครึ่งกันสองปลาย (ปลายละไม่เกินราว 1.75% ของความกว้างกอง) · กองแผ่นพิงแถบอยู่แล้ว จึงไม่ใส่เงาสัมผัส
   เส้นเฉียงวัดจากขอบล่างช่วง 3: สูง (--notch-h − 40px) ที่ขอบขวาจอ แล้วลดลง tan25° ไปทางซ้าย */
.s3 { --s3o-w: clamp(200px, 21vw, 300px); --s3o-r: calc(var(--edge) + 2vw); }
.s3-obj { position: absolute; z-index: 2; right: var(--s3o-r); width: var(--s3o-w);
  bottom: calc(var(--notch-h) - 38px - 0.4663 * var(--s3o-r) - 0.3415 * var(--s3o-w));
  transform: translateY(var(--band-par, 0px)); pointer-events: none; }
.s3-obj .obj::before { display: none; }
.s3-obj .ai-note { position: absolute; right: calc(100% + var(--space-3)); bottom: 30%; width: max-content; max-width: 170px; margin: 0; text-align: right; }
/* แผ่นแดงบาง เรียบเสมอผิวหน้าแผ่นบนสุด ปิดรอยบากมุมขวาหน้า (วัดจากไฟล์ภาพ: รอยบาก x 519–571 y 345–379) */
.plate { overflow: visible; }
.plate .pf-face { fill: var(--accent); }
.plate .pf-lip { fill: var(--brand-black); fill-opacity: .45; }   /* ขอบล่างบาง 2.5 จุดภาพ = ความหนาแผ่น · ดำของแบรนด์แบบโปร่ง ไม่ใช่สีใหม่ */
/* เล่นครั้งเดียวเมื่อกองแผ่นเข้าจอ: กองแผ่นขึ้นก่อน แล้วแผ่นแดงเลื่อนลงจากด้านบนวางพอดีรอยบาก */
.motion .s3-obj:not(.is-in) .obj > img, .motion .s3-obj:not(.is-in) .ai-note { opacity: 0; transform: translateY(24px); }
.motion .s3-obj .obj > img, .motion .s3-obj .ai-note { transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
.motion .s3-obj:not(.is-in) .plate { opacity: 0; transform: translateY(-32px); }
.motion .s3-obj .plate { transition: opacity 220ms linear 560ms, transform 620ms var(--ease-io) 560ms; }
/* โหมดมืด: พื้นช่วง 3 ใช้เทาชั้นการ์ด (ไม่ใช่ดำล้วน) · การ์ดในช่วงขึ้นอีก 1 ชั้น · ต่อพื้นลงไปใต้ช่วง 40 จุดให้ชนขอบแถบเฉียงพอดี */
html[data-theme="dark"] .s3, .theme-dark .s3 { background: var(--surface); }
html[data-theme="dark"] .s3 .rc, .theme-dark .s3 .rc { background: var(--surface-2); }
html[data-theme="dark"] .s3::after, .theme-dark .s3::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 40px; background: var(--surface); }
html[data-theme="dark"] .site-header, .theme-dark .site-header { background: var(--surface); }
@media (max-width: 1099px) { html[data-theme="dark"] .nav, .theme-dark .nav { background: var(--surface); } }

/* ---------- ช่วง 4 · แผ่นคราม 3 ชิ้น (บริการ 3 ตัว) ยืนบนแท่นสว่าง วางบนขอบบนของแถวการ์ดบริการ ---------- */
.svc-cards { position: relative; }
.s4-obj { position: absolute; bottom: 100%; left: 50%; translate: -50% 0; width: clamp(220px, 21vw, 300px); margin-bottom: -2px; }
.s4-stage { position: relative; display: block; }
.s4-stage .obj--s4-services { position: absolute; left: 19.84%; top: 2.81%; width: 56.77%; }   /* วางบนกลางผิวบนของแท่น (จัดจากภาพประกอบทดลอง) */
.s4-stage .obj--s4-services::before { left: 4%; right: 0; bottom: 4%; height: 22%; transform: rotate(-15deg); }
.s4-obj .ai-note { position: absolute; right: calc(100% + var(--space-3)); bottom: var(--space-2); width: max-content; max-width: 170px; margin: 0; text-align: right; }

/* ---------- ช่วง 6 · แผ่นว่างรอวาง วางบนขอบบนของกล่องเลือกหัวข้อ ---------- */
.talk { position: relative; }
.s6-obj { position: absolute; right: var(--space-7); bottom: calc(100% - 4px); width: clamp(120px, 11vw, 170px); }
.s6-obj .ai-note { position: absolute; right: calc(100% + var(--space-3)); bottom: var(--space-2); width: max-content; max-width: 200px; margin: 0; text-align: right; }

/* ---------- ท้ายเว็บ · ตัว H ยืนบนเส้นพื้นบาง ---------- */
.foot-brand { position: relative; }
.foot-obj { width: 140px; margin-top: var(--space-6); padding: 0 12px; border-bottom: var(--line); }
.foot-obj .obj { width: 100%; }
.foot-obj .ai-note { width: max-content; max-width: 240px; margin-top: var(--space-2); margin-left: -12px; }

@media (max-width: 1179px) {
  .s4-obj { left: auto; right: 0; translate: none; }
  .foot-obj { position: absolute; right: 0; top: 0; margin: 0; }
  .foot-obj .ai-note { position: absolute; right: calc(100% + var(--space-3)); bottom: 0; margin: 0; text-align: right; }
}
@media (max-width: 759px) {
  .lift-obj { display: none; }
  .p-obj { container-type: normal; flex: none; padding-bottom: 0; }
  .p-obj .obj { height: 200px; }
  .p-obj--m { display: flex; margin-top: var(--space-5); }
  .s2-plinth .ai-note { margin-right: 0; }
  .s3-obj { position: relative; right: auto; bottom: auto; width: min(280px, 76%); margin: var(--space-7) auto 0; transform: none; }
  .s3-obj .ai-note { position: static; width: auto; max-width: none; margin-top: var(--space-3); text-align: center; }
  .s4-obj { position: relative; bottom: auto; right: auto; justify-self: center; width: 240px; margin: 0 0 var(--space-3); }
  .s4-obj .ai-note { position: static; width: auto; margin-top: var(--space-2); text-align: center; }
  .talk { margin-top: calc(var(--space-7) + 56px); }   /* ที่ให้แผ่นว่างวางบนขอบกล่อง ไม่ทับคำนำ */
  .s6-obj { right: var(--space-4); width: 110px; }
  .s6-obj .ai-note { max-width: 150px; }
  .foot-obj { position: static; width: 116px; margin-top: var(--space-5); }
  .foot-obj .ai-note { position: static; width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .s3-obj { transform: none !important; }
}
/* แผงสุดท้าย (กว้างกว่าแผงพับอื่น): แถบรองพื้นยาวถึงขอบแผง เส้นขั้นจึงไม่โผล่ข้างวัตถุ */
.col:last-child .tv-fold > .fold-obj { max-width: none; }
/* หัวเว็บโหมดมืดเป็นเทาชั้นการ์ด แต่ไฟล์โลโก้ขาวมีกรอบพื้น #111111 ในตัว → ผสมแบบ "สว่างกว่า" ให้กรอบกลืนกับพื้นหัวเว็บ ตัวขาวและคานแดงคงสีเดิม (ไม่แก้ไฟล์โลโก้) */
html[data-theme="dark"] .site-header .logo--dark, .theme-dark .site-header .logo--dark { mix-blend-mode: lighten; }

/* ==========================================================================
   D6 · เรื่องเล่า แผง Jigsaw AIOS ฉบับ 2 (19 พ.ย. 2569 · ใบสั่ง STORY-JIGSAW-v2.md)
   "ดูแล้วต้องเข้าใจเองโดยไม่มีคนอธิบาย": พาดหัวเห็นตลอด · คำบรรยายตัวใหญ่ทีละประโยคแบบซับไตเติล · แถบ 3 ขั้นถาวรใต้ภาพ
   ก่อนชี้: กรอบเล็กยืนบนขอบขั้นแผง 01 + พาดหัวข้างกรอบบนพื้นหน้า (ไม่ทับภาพ)
   ชี้/แตะ/Enter: กรอบขยายเป็นเวทีทับแผงพับฝั่งขวาชั่วคราว (FLIP ด้วย transform) · มือถือ: เวทีอยู่ในแผง 01 แตะเพื่อเล่น
   วิดีโอวาดลงผืนวาด (canvas) ไม่ถูกนับเป็น LCP ใหม่ตอนชี้ · คำบรรยายบนแถบพื้นทึบ: ตัวหลักบนพื้นการ์ด ≥ 14:1 ทั้ง 2 โหมด
   ========================================================================== */
/* ---------- กรอบเล็ก (จุดเริ่ม) ---------- */
.jstory { --fold-w: min(140px, calc((100cqw - var(--open-w)) / (var(--n, 7) - 0.85))); --step: calc(var(--fold-w) * var(--tan25));
  --story-h: calc(var(--top-luma) + var(--step) * (var(--n, 7) - 1));
  position: absolute; left: 0; top: 0; z-index: 4; width: var(--open-w); height: var(--story-h); }
.stage:not([data-sel="1"]) .jstory { opacity: 0; visibility: hidden; transform: translateY(12px); }
.jstory-box { position: absolute; right: 4px; bottom: 0; height: min(calc(var(--story-h) - 8px), calc(var(--story-wmax, 200px) * 4 / 3)); aspect-ratio: 3 / 4;
  border: var(--border-width) solid var(--border); border-radius: var(--radius-lg); background: var(--surface-2); box-shadow: var(--story-shadow); overflow: hidden; }
.jstory-still { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.jstory-play, .jstage-play { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; border-radius: inherit; }
.jstory-play:focus-visible, .jstage-play:focus-visible { outline: var(--border-width-strong) solid var(--focus-ring); outline-offset: -4px; }
/* พาดหัว + "▶ ชี้เพื่อดู 12 วินาที" ข้างกรอบ บนพื้นหน้า (ทึบ) · ชิดล่างให้อยู่ใต้ข้อความ "เลือกผู้ช่วย…" */
.jstory-zone { position: absolute; left: 0; bottom: 2px; right: calc(var(--story-bw, 150px) + 4px + var(--space-3)); display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-1); text-align: right; }
.jstory-head { margin: 0; font-size: 18px; line-height: 1.3; font-weight: var(--fw-semibold); color: var(--text); text-wrap: balance; }
.jstory-hint { margin: 0; font-size: var(--fs-small); line-height: 1.4; font-weight: var(--fw-medium); color: var(--accent); }
.hint-tap { display: none; }
.jstory-note { margin: var(--space-1) 0 0; line-height: 1.35; }

/* ---------- เวที ---------- */
.jstage { position: absolute; z-index: 40; left: 0; top: 0; width: 0; height: 0; visibility: hidden; pointer-events: none; outline: none; }
.jstage.is-open { visibility: visible; pointer-events: auto; }
.jstage-card { position: absolute; inset: 0; isolation: isolate; display: grid; grid-template-columns: var(--img-w, 400px); grid-template-rows: var(--img-h, auto) auto auto auto; align-content: start; row-gap: var(--space-3); padding: var(--space-5); }
.jstage.has-list .jstage-card { grid-template-columns: var(--img-w, 400px) var(--side-w, 260px); column-gap: var(--space-5); }
/* พื้นเวทีแยกเป็นชั้นของตัวเอง → จางเข้า/ออกได้โดยภาพไม่จางตาม */
.jstage-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--surface); border: var(--border-width) solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--story-shadow); }
html[data-theme="dark"] .jstage-card::before, .theme-dark .jstage-card::before { background: var(--surface-2); }   /* มืด: ชั้นบนสุด = เทา #2A2A2A */
.jstage-head { display: none; }
.jstage-media { position: relative; grid-column: 1; width: var(--img-w, 400px); height: var(--img-h, auto); aspect-ratio: 3 / 4; border-radius: var(--radius-md); overflow: hidden; background: var(--surface-2); transform-origin: 0 0; }
.jstage-still { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; }
.jstage-still--end { opacity: 0; pointer-events: none; }
.jstage-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* ภาพ 3 มิติที่หน้าเว็บวาดสด (story3d.js) ทับภาพนิ่ง · โชว์เมื่อเริ่มเล่นแล้วเท่านั้น */
.jstage-gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; }
.jstage-media.gl-on .jstage-gl { opacity: 1; }
.jstage-media.gl-on .jstage-canvas { opacity: 0; }
/* พื้นหลังภาพ 3 มิติ: ไล่สีอ่อนจากกลาง (ภาพโปร่งพื้นหลัง จึงเปลี่ยนตามโหมดสว่าง/มืดได้) */
.jstage-media, .jstory-box { background: radial-gradient(120% 85% at 50% 30%, var(--surface), var(--surface-2)); }
.jstage-play { display: none; }
.jstage-tap { position: absolute; left: var(--space-3); bottom: var(--space-3); padding: 6px var(--space-3); font-size: var(--fs-small); line-height: 1.4; font-weight: var(--fw-medium); color: var(--text); background: var(--surface); border: var(--border-width) solid var(--border); border-radius: var(--radius-sm); }

/* คำบรรยายแบบซับไตเติล: ทับขอบล่างของภาพบนแถบพื้นทึบ · ทีละประโยค · ตัวใหญ่ 22 (มือถือ 18) */
.jstage-subs { position: absolute; left: 0; right: 0; bottom: 0; pointer-events: none; }
.jsub { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 14px 18px 16px; font-size: 22px; line-height: 1.35; font-weight: var(--fw-medium); color: var(--text);
  background: var(--surface); border-top: var(--border-width-strong) solid var(--accent); opacity: 0; transform: translateY(8px); }
html[data-theme="dark"] .jsub, .theme-dark .jsub { background: var(--surface-2); }
.jsub.on { opacity: 1; transform: none; }
.jsub--end { pointer-events: none; }
.jsub--end:not(.on) { visibility: hidden; }
.jsub-end-t { margin: 0; font-size: 24px; line-height: 1.3; font-weight: var(--fw-semibold); }
/* ปุ่มไปต่ออยู่ในแถวที่จองไว้ใต้แถบ 3 ขั้น (ไม่ทับภาพ · ไม่ทำให้เวทีขยับตอนจบ) */
.jstage-cta { grid-column: 1; margin: 0; visibility: hidden; }
.jstage-cta .btn-solid { min-height: 44px; padding: var(--space-2) var(--space-5); }
.jstage[data-state="end"] .jstage-cta, .jstage.has-list .jstage-cta { visibility: visible; }

/* แถบ 3 ขั้นถาวรใต้ภาพ · ขั้นที่กำลังเล่นเป็นตัวเข้ม */
.jstage-steps { grid-column: 1; margin: 0; font-size: var(--fs-body); line-height: 1.5; color: var(--text-muted); }
.jstep { transition: color 200ms; }
.jarr { color: var(--text-muted); }
.jstage[data-step="1"] .jstep[data-step="1"], .jstage[data-step="2"] .jstep[data-step="2"], .jstage[data-step="3"] .jstep[data-step="3"] { color: var(--text); font-weight: var(--fw-semibold); }
.jstage-note { grid-column: 1; grid-row: 4; margin: 0; }
.jstage-cta { grid-row: 3; } .jstage-steps { grid-row: 2; } .jstage-media { grid-row: 1; }
/* รายการนิ่ง (ลดการเคลื่อนไหว / เน็ตช้า): คำบรรยาย 5 ประโยค + ประโยคจบ เรียงลำดับข้างภาพ */
.jstage-list { display: none; margin: 0; padding: 0 0 0 1.4em; list-style: decimal; font-size: 18px; line-height: 1.45; color: var(--text); }
.jstage-list li + li { margin-top: var(--space-3); }
.jstage-list .jlist-end { font-weight: var(--fw-semibold); }
.jstage.has-list .jstage-list { display: block; grid-column: 2; grid-row: 1 / span 4; align-self: start; }
.jstage.has-list .jsub:not(.jsub--end) { display: none; }

/* แผงด้านหลังจางลงเล็กน้อยระหว่างเปิดเวที */
.hero.jstage-open .stage > :not(.jstory) { opacity: .18; }
@media (prefers-reduced-motion: no-preference) {
  .motion .jsub { transition: opacity 320ms var(--ease-out), transform 320ms var(--ease-out); }
  /* ประโยคเก่าจางออกก่อน แล้วประโยคใหม่ค่อยขึ้น → ตัวหนังสือ 2 ประโยคไม่ซ้อนกัน */
  .motion .jsub:not(.on) { transition-duration: 140ms; }
  .motion .jsub.on { transition-delay: 140ms; }
  .motion .jstage-card::before, .motion .jstage-steps, .motion .jstage-note, .motion .jstage-list { transition: opacity 260ms var(--ease-out); }
  .motion .jstage-media.flip { transition: transform 460ms var(--ease-io); }
  .motion .hero .stage > * { transition: opacity 260ms; }
  /* 22 พ.ย.: กฎบรรทัดบนทับการเลื่อนแบบ transition ของกล่องแผงมาตั้งแต่ก่อน (แผงกระโดดไปที่ใหม่ทันที) · ตอนนี้สคริปต์เลื่อนแผงตามแท่งเองทุกเฟรมแทน */
  .js:not(.is-shot) .hero:not(.is-settled) .jstory { animation: col-rise-fade 650ms var(--ease-out) 380ms both; }
  .motion .stage .jstory { transition: opacity 300ms var(--ease-out) 260ms, transform 420ms var(--ease-out) 260ms, visibility 0s; }
  /* 22 พ.ย.: ตอนซ่อน (ชี้แท่งอื่น) จางลง 160ms แล้วค่อยซ่อน · เดิมซ่อนทันทีจึงหายวับใน 1 เฟรม */
  .motion .stage:not([data-sel="1"]) .jstory { transition: opacity 100ms linear, transform 200ms var(--ease-io), visibility 0s 100ms; }
}

/* จอคอม: พื้นเวที แถบ 3 ขั้น ป้าย และรายการ จางหายเมื่อเวทีปิด (มือถือเวทีอยู่ในแผงตลอด จึงไม่ซ่อน) */
@media (prefers-reduced-motion: no-preference) and (min-width: 760px) {
  .motion .jstage:not(.is-open) .jstage-card::before, .motion .jstage:not(.is-open) .jstage-steps, .motion .jstage:not(.is-open) .jstage-note, .motion .jstage:not(.is-open) .jstage-list { opacity: 0; }
}

/* ---------- มือถือ: เวทีอยู่ในแผง 01 (สคริปต์ย้าย) · พาดหัวเห็นตลอด · แตะเพื่อเล่น ---------- */
@media (max-width: 759px) {
  .jstory { display: none; }
  .jstage { position: relative; inset: auto; width: auto !important; height: auto !important; left: auto !important; top: auto !important; visibility: visible; pointer-events: auto; margin-top: var(--space-5); }
  .jstage-card { position: relative; display: flex; flex-direction: column; align-items: stretch; padding: 0; gap: var(--space-3); }
  .jstage-card::before { display: none; }
  .jstage-head { display: block; margin: 0; font-size: 20px; line-height: 1.35; font-weight: var(--fw-semibold); color: var(--text); }
  .jstage-media { width: 100%; height: auto; max-width: 340px; border: var(--border-width) solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--story-shadow); }
  .jstage-play { display: block; }
  .jstage:not([data-state="idle"]) .jstage-tap, .jstage.has-list .jstage-tap { display: none; }
  .jsub { font-size: 18px; padding: 10px 14px 12px; }
  .jsub-end-t { font-size: 20px; }
  .jstage.has-list .jstage-list { display: block; }
  .jstage-list { font-size: 16px; }
}
@media (hover: none) { .hint-point { display: none; } .hint-tap { display: inline; } }

/* 22 พ.ย. (D-20261122-11): ป้ายข้อความตัวอย่างเป็นกรอบเส้นประ (วางท้ายไฟล์ให้ชนะกฎ .tag::before) */
.tag--sample::before { border-style: dashed; }

/* 23 พ.ย. (D-20261123-01 · เจ้าของเลือกทาง ก): แท่งพับแคบ (7 แท่งบนแล็ปท็อป 1280/1366 · พื้นที่แท่งไม่ถึง 960 จุด)
   ซ่อนคำอธิบายสั้นใต้ชื่อ และย่อป้ายสถานะเหลือสัญลักษณ์ · คำเต็มยังอยู่ให้โปรแกรมอ่านจอ และเห็นเมื่อชี้แท่ง (แท่งกาง)
   จอ 1024 (พื้นที่ 967) และ 1440 ขึ้นไปไม่โดน · มือถือไม่ใช้หน้าแบบพับ */
@container (max-width: 960px) {
  .tv-fold .col-for { display: none; }
  .tv-fold .tag > span { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .tv-fold .tag::before, .tv-fold .tag--live::before, .tv-fold .tag--developing::before { margin-top: 0; }
}
/* 23 พ.ย.: จอ 1180 (พื้นที่แท่งไม่ถึง 820 จุด) ป้าย "ภาพ 3 มิติตัวอย่าง" ใต้การ์ดเรื่องเล่าโดนคานแดงของแท่ง 01 ทับ → เว้นซ้ายให้พ้นคาน (ตัดเป็น 2 บรรทัด) */
@container (max-width: 820px) {
  .jstory-note { padding-left: 56px; }
}
