/* AdaptiveX — shared design system (light editorial)
   ใช้ร่วมกันทุกหน้า: โทนสว่าง, เขียวแบรนด์ #19A368 เป็น accent เดียว */

:root {
  --paper: #FAFBF9;
  --sheet: #FFFFFF;
  --ink: #14201B;
  --body: #2C3833;
  --mute: #5A6660;
  --faint: #68726B;
  --line: #E3E8E4;
  --brand: #19A368;
  --brand-text: #0C6B45;   /* เขียวสำหรับตัวหนังสือบนพื้นสว่าง (contrast ≥ 4.5) */
  --brand-soft: #E7F3ED;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(20, 32, 27, .05);
  --shadow-md: 0 2px 6px rgba(20, 32, 27, .06), 0 12px 32px -12px rgba(20, 32, 27, .12);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

body { font-family: 'Noto Sans Thai', 'Jost', sans-serif; background: var(--paper); color: var(--body); }
/* พื้นกระดาษลายจุดจาง ๆ — section พื้นขาว (--sheet) จะทับเอง ทำให้สลับจังหวะกันเอง */
body { background-image: radial-gradient(rgba(20, 32, 27, .055) 1px, transparent 1.5px); background-size: 26px 26px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

.font-heading { font-family: 'Jost', 'Noto Sans Thai', sans-serif; }
.font-mono { font-family: 'JetBrains Mono', monospace; }
.logo-word { font-family: 'Jost', sans-serif; font-weight: 300; letter-spacing: .26em; color: var(--ink); }

/* ---------- Navbar ---------- */
.nav-shell { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: rgba(250, 251, 249, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); transition: transform .35s var(--ease-out); }
.nav-shell.nav-hidden { transform: translateY(-100%); }
.nav-link { position: relative; color: var(--mute); transition: color .2s ease; }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--ink); }
.nav-link::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--brand); transform: scaleX(0); transform-origin: left; transition: transform .3s ease; }
.nav-link:hover::after, .nav-link[aria-current="page"]::after { transform: scaleX(1); }

/* dropdown บริการ */
.dd { position: relative; }
/* สะพานล่องหนปิดช่องว่าง 14px ระหว่างปุ่มกับเมนู — เมาส์เลื่อนลงผ่านช่องว่างแล้ว :hover ไม่หลุด
   ส่วนที่กว้างกว่าปุ่มให้ .dd-menu::before รับต่อ (เมนูกว้าง 340px จัดกึ่งกลาง) */
.dd::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 18px; }
.dd-menu::before { content: ''; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.dd-menu { position: absolute; top: calc(100% + 14px); left: 50%; transform: translateX(-50%) translateY(6px); width: 340px; background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 8px; opacity: 0; pointer-events: none; transition: opacity .2s ease .12s, transform .25s var(--ease-out) .12s, visibility 0s linear .32s; visibility: hidden; }
.dd:hover .dd-menu, .dd:focus-within .dd-menu { opacity: 1; pointer-events: auto; visibility: visible; transform: translateX(-50%) translateY(0); transition-delay: 0s, 0s, 0s; }
/* เมนูบริการมี 11 รายการ — จัด 2 คอลัมน์ให้ไม่ยาวเกินจอ */
.dd-menu-wide { width: 640px; display: grid; grid-template-columns: 1fr 1fr; column-gap: 4px; }
.dd-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; transition: background .15s ease; }
.dd-item:hover { background: var(--brand-soft); }
.dd-item svg { flex-shrink: 0; margin-top: 2px; color: var(--brand-text); }

/* ---------- ปุ่ม ---------- */
.btn-primary { display: inline-flex; align-items: center; gap: 10px; background: var(--brand); color: #0E1411; font-weight: 600; border-radius: 999px; padding: 14px 28px; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: #14915B; transform: scale(1.01); box-shadow: var(--shadow-md); }
.btn-secondary { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; border: 1px solid #C9D2CC; border-radius: 999px; padding: 13px 27px; transition: border-color .2s ease, color .2s ease, transform .2s ease; }
.btn-secondary:hover { border-color: var(--brand); color: var(--brand-text); transform: scale(1.01); }

/* ---------- โครงหน้า ---------- */
.container-x { max-width: 1200px; margin-inline: auto; padding-inline: 24px; }
@media (min-width: 1024px) { .container-x { padding-inline: 40px; } }
.section-pad { padding-block: 80px; }
@media (min-width: 1024px) { .section-pad { padding-block: 112px; } }
.eyebrow { font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: .22em; color: var(--brand-text); }
.h-display { font-family: 'Jost', 'Noto Sans Thai', sans-serif; font-weight: 700; color: var(--ink); letter-spacing: -.01em; line-height: 1.12; }

/* ---------- การ์ด / ชิป ---------- */
.card { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: transform .25s var(--ease-out), box-shadow .25s ease, border-color .25s ease; }
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #BFDACB; }
.chip { display: inline-flex; align-items: center; gap: 8px; background: var(--sheet); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--mute); transition: transform .2s var(--ease-out), border-color .2s ease, box-shadow .2s ease; }
.chip:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: var(--shadow-sm); }
/* ลิงก์ที่ลงท้ายด้วยลูกศร → ระยะห่างถ่างออกตอน hover */
.link-arrow { transition: gap .2s var(--ease-out); }
.link-arrow:hover { gap: 14px; }

/* ---------- reveal (พื้นฐาน — motion เต็มมาเฟส 4) ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); transition-delay: var(--d, 0ms); }
.reveal.revealed { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---------- Sticky CTA มือถือ (ทุกหน้า) ---------- */
.sticky-cta { position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; background: rgba(255,255,255,.95); backdrop-filter: blur(8px); border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); display: flex; gap: 10px; }
@media (min-width: 1024px) { .sticky-cta { display: none; } }
body { padding-bottom: 76px; }
@media (min-width: 1024px) { body { padding-bottom: 0; } }

/* ---------- Motion (เฟส 4) ---------- */
/* g) nav: โปร่งบน hero → ทึบ+blur เมื่อเลื่อน */
.nav-shell.nav-top { background: transparent; border-bottom-color: transparent; backdrop-filter: none; }
/* i) page transition: fade เข้า-ออก 200ms */
body { opacity: 1; transition: opacity .2s ease; }
body.page-leave { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  body.page-enter { animation: pageIn .2s ease; }
  @keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }
}
/* a) hero: บรรทัด headline เข้าทีละบรรทัด */
.hero-line { display: block; }
/* e) เส้นเชื่อม path */
.path-line { position: absolute; top: 19px; left: 40px; right: 40px; height: 2px; pointer-events: none; }
.path-line line { stroke: var(--line); stroke-width: 2; }
.path-line .path-line-draw { stroke: var(--brand); }

/* ---------- Color blocking: จังหวะสีคั่นความขาว ---------- */

/* แถบเขียวเข้มสำหรับ section จองคิว — สลับตัวแปรสีทั้งชุด inline style เดิมใช้ได้ต่อ */
.section-ink {
  background: #10382A;
  background-image: radial-gradient(rgba(255, 255, 255, .05) 1px, transparent 1.5px);
  background-size: 26px 26px;
  --ink: #F2F9F5; --body: #CFDFD5; --mute: #AFC8BA; --faint: #8FAF9E;
  --line: rgba(255, 255, 255, .16); --brand-text: #7FD7AC;
}
/* การ์ดขาวข้างใน (ฟอร์มจอง) กลับมาใช้สีปกติ */
.section-ink .card {
  --ink: #14201B; --body: #2C3833; --mute: #5A6660; --faint: #68726B;
  --line: #E3E8E4; --brand-text: #0C6B45;
}
.section-ink .card { border-color: transparent; }

/* แถบเขียวอ่อนคั่นกลางหน้า */
.section-tint { background: #F1F7F2; }

/* แผ่นสีรองหลัง mock ใน hero — สีแบนล้วน เอียงนิดเดียว */
.hero-backdrop { position: absolute; inset: -22px -16px -12px -16px; background: var(--brand-soft); border-radius: 28px; transform: rotate(-1.6deg); z-index: -1; }

/* ---------- ลูกเล่น: ระบบกำลังทำงานอยู่จริง ---------- */

/* จุดสถานะเขียวหน้า eyebrow — ไฟ "ระบบออนไลน์" */
.eyebrow-live { display: inline-flex; align-items: center; gap: 8px; }
.eyebrow-live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); flex-shrink: 0; }

/* เส้นเน้นลายมือใต้คำสำคัญ — วาดตัวเองตอนโหลด */
.hl-swash { position: relative; display: inline-block; white-space: nowrap; }
.hl-swash svg { position: absolute; left: -2%; bottom: -.14em; width: 104%; height: .28em; overflow: visible; pointer-events: none; }
.hl-swash path { fill: none; stroke: var(--brand); stroke-width: 7; stroke-linecap: round; opacity: .85; }

/* marquee โลโก้ช่องทาง — เลื่อนวนไม่รู้จบ hover แล้วหยุด */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.marquee-track { display: flex; width: max-content; }
.marquee-track > ul { display: flex; flex-wrap: nowrap; gap: 10px; padding-right: 10px; }

/* ปุ่มกดแล้วยุบรับนิ้วนิดเดียว */
.btn-primary:active, .btn-secondary:active { transform: scale(.97); }

/* FAQ: หัวข้อรับ hover */
details > summary { transition: color .15s ease; }
details > summary:hover { color: var(--brand-text) !important; }

/* wordmark ยักษ์ท้าย footer */
.footer-ghost { font-family: 'Jost', sans-serif; font-weight: 600; letter-spacing: .1em; font-size: clamp(56px, 12.5vw, 170px); line-height: .95; text-align: center; color: transparent; -webkit-text-stroke: 1.5px var(--line); user-select: none; transition: -webkit-text-stroke-color .4s ease; }
.footer-ghost:hover { -webkit-text-stroke-color: #BFDACB; }

@media (prefers-reduced-motion: no-preference) {
  .eyebrow-live::before { animation: liveDot 2.2s ease-in-out infinite; }
  @keyframes liveDot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }

  .hl-swash path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: swashDraw .9s var(--ease-out) 1s forwards; }
  @keyframes swashDraw { to { stroke-dashoffset: 0; } }

  .marquee-track { animation: marqueeMove 32s linear infinite; }
  .marquee:hover .marquee-track { animation-play-state: paused; }
  @keyframes marqueeMove { to { transform: translateX(-50%); } }

  /* บทสนทนาในการ์ด hero เล่นเองเป็นลูป: ทัก → ตอบ → ทักต่อ → ✓ จองคิวแล้ว */
  .chat-live > * { animation: 12s var(--ease-out) infinite; }
  .chat-live > :nth-child(1) { animation-name: chatSeq1; }
  .chat-live > :nth-child(2) { animation-name: chatSeq2; }
  .chat-live > :nth-child(3) { animation-name: chatSeq3; }
  .chat-live > :nth-child(4) { animation-name: chatSeq4; }
  @keyframes chatSeq1 { 0% { opacity: 0; transform: translateY(10px) scale(.96); } 4% { opacity: 0; transform: translateY(10px) scale(.96); } 8% { opacity: 1; transform: none; } 88% { opacity: 1; transform: none; } 94% { opacity: 0; } 100% { opacity: 0; } }
  @keyframes chatSeq2 { 0% { opacity: 0; transform: translateY(10px) scale(.96); } 17% { opacity: 0; transform: translateY(10px) scale(.96); } 21% { opacity: 1; transform: none; } 88% { opacity: 1; transform: none; } 94% { opacity: 0; } 100% { opacity: 0; } }
  @keyframes chatSeq3 { 0% { opacity: 0; transform: translateY(10px) scale(.96); } 32% { opacity: 0; transform: translateY(10px) scale(.96); } 36% { opacity: 1; transform: none; } 88% { opacity: 1; transform: none; } 94% { opacity: 0; } 100% { opacity: 0; } }
  @keyframes chatSeq4 { 0% { opacity: 0; transform: translateY(12px) scale(.92); } 46% { opacity: 0; transform: translateY(12px) scale(.92); } 51% { opacity: 1; transform: none; } 88% { opacity: 1; transform: none; } 94% { opacity: 0; } 100% { opacity: 0; } }
}

@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee-track { width: auto; }
  .marquee-track > ul { flex-wrap: wrap; }
  .marquee-track > ul[aria-hidden="true"] { display: none; }
}


/* ---------- กล่องแชทผู้ช่วย AdaptiveX ---------- */
.cw-launcher { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: var(--brand); color: #0E1411; box-shadow: 0 4px 14px rgba(20, 32, 27, .18), 0 12px 32px -12px rgba(20, 32, 27, .32); transition: transform .2s var(--ease-out), box-shadow .2s ease, opacity .2s ease; }
.cw-launcher::after { content: ''; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 0 rgba(25, 163, 104, .45); }
@media (prefers-reduced-motion: no-preference) {
  .cw-launcher::after { animation: cwPulse 2.8s ease-out 1.5s 3; }
}
@keyframes cwPulse { 0% { box-shadow: 0 0 0 0 rgba(25, 163, 104, .45); } 80%, 100% { box-shadow: 0 0 0 16px rgba(25, 163, 104, 0); } }
.cw-launcher:hover { transform: translateY(-2px) scale(1.04); }
.cw-launcher:active { transform: scale(.96); }
.cw-launcher svg { flex-shrink: 0; }
@media (max-width: 1023px) {
  .cw-launcher { bottom: calc(84px + env(safe-area-inset-bottom)); right: 16px; width: 54px; height: 54px; }
}
.cw-open .cw-launcher { opacity: 0; pointer-events: none; }

.cw-panel { position: fixed; right: 20px; bottom: 20px; z-index: 61; display: flex; flex-direction: column; width: 384px; max-width: calc(100vw - 32px); height: 560px; max-height: calc(100vh - 40px); background: var(--sheet); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 8px 24px rgba(20, 32, 27, .12), 0 32px 64px -24px rgba(20, 32, 27, .3); overflow: hidden; opacity: 0; transform: translateY(12px) scale(.98); transform-origin: bottom right; pointer-events: none; transition: opacity .22s ease, transform .28s var(--ease-out); }
.cw-open .cw-panel { opacity: 1; transform: none; pointer-events: auto; }
@media (max-width: 640px) {
  .cw-panel { right: 8px; left: 8px; bottom: 8px; width: auto; max-width: none; height: min(80vh, 620px); border-radius: 16px; }
}

.cw-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--paper); }
.cw-head-title { font-family: 'Jost', 'Noto Sans Thai', sans-serif; font-weight: 600; font-size: 14px; color: var(--ink); line-height: 1.25; }
.cw-head-sub { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .08em; color: var(--faint); display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.cw-head-sub::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.cw-close { margin-left: auto; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: var(--mute); transition: background .15s ease, color .15s ease; }
.cw-close:hover { background: var(--brand-soft); color: var(--ink); }

.cw-tabs { display: flex; gap: 4px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.cw-tab { flex: 1; padding: 8px 10px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--mute); transition: background .15s ease, color .15s ease; }
.cw-tab:hover { color: var(--ink); }
.cw-tab[aria-selected="true"] { background: var(--brand-soft); color: var(--brand-text); }

.cw-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px; }
.cw-msg { max-width: 88%; padding: 10px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; }
.cw-msg + .cw-msg { margin-top: 10px; }
.cw-msg-bot { background: var(--paper); border: 1px solid var(--line); color: var(--body); border-bottom-left-radius: 5px; }
.cw-msg-me { margin-left: auto; background: var(--brand-soft); color: var(--ink); border-bottom-right-radius: 5px; }
.cw-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.cw-chip { padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--sheet); font-size: 12.5px; color: var(--body); transition: border-color .18s ease, color .18s ease, transform .18s var(--ease-out); }
.cw-chip:hover { border-color: var(--brand); color: var(--brand-text); transform: translateY(-1px); }
.cw-cta { display: inline-flex; align-items: center; gap: 7px; margin-top: 11px; padding: 9px 16px; border-radius: 999px; background: var(--brand); color: #0E1411; font-size: 13px; font-weight: 600; transition: background .2s ease; }
.cw-cta:hover { background: #14915B; }
.cw-cta-line { background: #06C755; }
.cw-cta-line:hover { background: #05b34d; }

.cw-typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.cw-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
@media (prefers-reduced-motion: no-preference) {
  .cw-typing span { animation: cwBlink 1.1s ease-in-out infinite; }
  .cw-typing span:nth-child(2) { animation-delay: .18s; }
  .cw-typing span:nth-child(3) { animation-delay: .36s; }
  @keyframes cwBlink { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }
}

.cw-foot { display: flex; gap: 8px; padding: 11px; border-top: 1px solid var(--line); background: var(--paper); }
/* attribute hidden แพ้ display:flex จึงต้องบังคับ ไม่งั้นช่องพิมพ์แชทโผล่ตอนอยู่แท็บขอเดโม */
.cw-foot[hidden] { display: none !important; }
.cw-input { flex: 1; min-width: 0; padding: 11px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--sheet); font-size: 14px; color: var(--ink); font-family: inherit; }
.cw-input::placeholder { color: var(--faint); }
.cw-send { display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%; background: var(--brand); color: #0E1411; transition: background .2s ease, opacity .2s ease; }
.cw-send:hover { background: #14915B; }
.cw-send:disabled { opacity: .4; cursor: not-allowed; }

.cw-form label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.cw-form .cw-field + .cw-field { margin-top: 13px; }
.cw-form input, .cw-form textarea { width: 100%; padding: 10px 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--sheet); font-size: 13.5px; color: var(--ink); font-family: inherit; }
.cw-form textarea { resize: vertical; min-height: 62px; }
.cw-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.cw-pick label { margin: 0; }
.cw-pick input { position: absolute; opacity: 0; width: 0; height: 0; }
.cw-pick span { display: block; padding: 9px 6px; border: 1px solid var(--line); border-radius: 11px; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--mute); cursor: pointer; transition: border-color .18s ease, background .18s ease, color .18s ease; }
.cw-pick input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-text); }
.cw-pick input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.cw-note { font-size: 11.5px; line-height: 1.6; color: var(--faint); margin-top: 12px; }
.cw-done { text-align: center; padding: 28px 16px; }
.cw-done-mark { display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto 14px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-text); }
.cw-msg a { color: var(--brand-text); text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }
.cw-msg .cw-cta { color: #0E1411; text-decoration: none; word-break: normal; }
.cw-fine { padding: 0 14px 10px; background: var(--paper); font-size: 11px; line-height: 1.5; color: var(--faint); text-align: center; }
.cw-fine a { color: var(--brand-text); text-decoration: underline; text-underline-offset: 2px; }
.cw-quota { padding: 0 14px 8px; font-size: 11.5px; line-height: 1.5; color: var(--faint); text-align: center; }

/* ---------- หน้าลองสร้าง AI ของธุรกิจคุณ (/try) ---------- */
.try-step-no { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .18em; color: var(--faint); }
.try-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.try-opt { padding: 10px 17px; border: 1px solid var(--line); border-radius: 999px; background: var(--sheet); font-size: 13.5px; font-weight: 500; color: var(--body); transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s var(--ease-out); }
.try-opt:hover { border-color: var(--brand); transform: translateY(-1px); }
.try-opt[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-text); font-weight: 600; }

.try-stage { min-height: 340px; }
.try-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.try-head-name { padding-left: 10px; font-size: 13px; font-weight: 600; color: var(--ink); }
.try-voice .try-head-name { padding-left: 0; }
.try-head-badge { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--faint); }
.try-wave { margin-top: 12px; }

.try-log { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.try-bubble, .try-line, .sys-link, .sys-panel { opacity: 0; transform: translateY(8px); transition: opacity .45s var(--ease-out), transform .45s var(--ease-out); }
.try-bubble.is-in, .try-line.is-in, .sys-link.is-in, .sys-panel.is-in { opacity: 1; transform: none; }
.try-bubble { max-width: 86%; padding: 10px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.65; }
.try-bubble-c { align-self: flex-start; background: var(--paper); border: 1px solid var(--line); color: var(--body); border-bottom-left-radius: 5px; }
.try-bubble-a { align-self: flex-end; color: var(--ink); border-bottom-right-radius: 5px; }
/* บทถอดเสียง: แยกผู้พูดด้วย 3 สัญญาณพร้อมกัน — ระยะย่อหน้า แถบสีซ้าย และสีป้ายชื่อ */
.try-log-voice { gap: 9px; }
.try-line { display: flex; gap: 10px; padding: 5px 0 5px 11px; border-left: 2px solid var(--line); font-size: 13.5px; line-height: 1.7; }
.try-line-c { color: var(--mute); }
.try-line-a { margin-left: 26px; padding-right: 11px; border-left-color: var(--brand); border-radius: 0 9px 9px 0; background: var(--brand-soft); color: var(--ink); font-weight: 500; }
.try-who { flex-shrink: 0; min-width: 42px; padding-top: 3px; font-family: 'JetBrains Mono', monospace; font-size: 9.5px; letter-spacing: .1em; color: var(--faint); }
.try-line-a .try-who { color: var(--brand-text); }
@media (max-width: 480px) {
  .try-line-a { margin-left: 14px; }
  .try-who { min-width: 36px; }
}

/* ขนาดย่อ สำหรับกล่องแคบ ๆ บนหน้าแรก */
.try-line-sm { padding: 4px 0 4px 9px; gap: 7px; font-size: 12px; line-height: 1.6; }
.try-line-sm.try-line-a { margin-left: 15px; padding-right: 9px; }
.try-line-sm .try-who { min-width: 33px; padding-top: 2px; font-size: 9px; }

.try-disclaimer { margin-top: 14px; text-align: right; font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--faint); }

.try-gain { display: flex; gap: 10px; font-size: 14px; line-height: 1.7; color: var(--body); }
.try-gain + .try-gain { margin-top: 10px; }
.try-gain-mark { color: var(--brand-text); flex-shrink: 0; }
.try-summary { display: inline-block; padding: 7px 15px; border-radius: 999px; background: var(--brand-soft); font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: var(--brand-text); }
.try-done { text-align: center; padding: 12px 0; }
.try-done-title { font-size: 16px; font-weight: 600; color: var(--ink); }
.try-done-note { margin-top: 8px; font-size: 13.5px; line-height: 1.7; color: var(--mute); }
@media (min-width: 1024px) { .try-sticky { position: sticky; top: 96px; } }
.try-opt { display: inline-flex; align-items: center; gap: 8px; }
.try-opt-icon, .try-head-icon { display: inline-flex; align-items: center; flex-shrink: 0; }
.try-opt-icon svg, .try-opt-icon img { width: 15px; height: 15px; }
.try-head-icon svg, .try-head-icon img { width: 17px; height: 17px; }
.try-head-name { display: inline-flex; align-items: center; gap: 9px; padding-left: 0; }

/* ---------- คลื่นเสียงแบบ ElevenLabs: แท่งบางสมมาตร + หัวอ่านกวาด ---------- */
.ev-wave { display: block; width: 100%; height: 46px; }
.ev-bars-bg rect { fill: var(--line); }
.ev-bars-fg rect { fill: var(--brand); }
.section-ink .ev-bars-bg rect { fill: rgba(255, 255, 255, .18); }

@media (prefers-reduced-motion: no-preference) {
  .ev-sweep { animation: evSweep 4.2s cubic-bezier(.45, 0, .55, 1) infinite; }
  @keyframes evSweep {
    0%        { transform: translateX(0); }
    88%, 100% { transform: translateX(240px); }
  }
}
/* ปิด animation แล้วยังต้องเห็นว่ามีเสียงอยู่จริง */
@media (prefers-reduced-motion: reduce) {
  .ev-sweep { transform: translateX(150px); }
}

/* ---------- แยกฝั่งลูกค้า กับ ฝั่งระบบหลังบ้าน ---------- */
.side-label { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: .14em; color: var(--faint); }

/* เส้นเชื่อมจากแชทลงไปหาระบบ บอกว่าเกิดต่อเนื่องกัน ไม่ใช่สองเรื่องแยกกัน */
.sys-link { position: relative; margin: 0 auto; padding: 22px 0 10px; text-align: center; font-size: 11.5px; color: var(--mute); }
.sys-link::before { content: ''; position: absolute; top: 0; left: 50%; width: 1px; height: 16px; background: var(--line); }
.sys-link::after { content: ''; position: absolute; top: 12px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: rotate(45deg); }

/* การ์ดระบบหลังบ้าน: หน้าตาเป็นบันทึกในระบบ ไม่ใช่ฟองแชท */
.sys-panel { padding: 15px 17px; background: var(--paper); border-style: dashed; }
.sys-status { margin-top: 7px; display: flex; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink); }
.sys-status::before { content: '✓'; color: var(--brand-text); font-weight: 700; }
.sys-rows { margin-top: 8px; padding-left: 20px; }
.sys-row { position: relative; font-size: 12.5px; line-height: 1.75; color: var(--mute); }
.sys-row::before { content: ''; position: absolute; left: -13px; top: 9px; width: 5px; height: 1px; background: var(--faint); }

/* แถบหลังบ้านแบบย่อ สำหรับกล่องแชทเล็กบนหน้าแรก */
.sys-strip { margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--line); }
.sys-strip-status { margin-top: 5px; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.sys-strip-status::before { content: '✓ '; color: var(--brand-text); }
.sys-strip-detail { margin-top: 2px; font-size: 11.5px; line-height: 1.6; color: var(--mute); }

/* ---------- แถบขอความยินยอมคุกกี้ ---------- */
.consent { position: fixed; left: 16px; bottom: 16px; z-index: 70; width: min(420px, calc(100vw - 32px)); padding: 18px 20px; background: var(--sheet); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 24px rgba(20,32,27,.12), 0 28px 56px -24px rgba(20,32,27,.28); opacity: 0; transform: translateY(14px); transition: opacity .25s ease, transform .3s var(--ease-out); }
.consent.is-in { opacity: 1; transform: none; }
.consent-text { font-size: 13px; line-height: 1.75; color: var(--body); }
.consent-link { color: var(--brand-text); text-decoration: underline; }
.consent-actions { display: flex; gap: 9px; margin-top: 14px; }
.consent-actions button { padding: 9px 18px; border-radius: 999px; font-size: 13px; font-weight: 600; transition: background .18s ease, border-color .18s ease, color .18s ease; }
.consent-yes { background: var(--brand); color: #0E1411; }
.consent-yes:hover { background: #14915B; }
.consent-no { border: 1px solid var(--line); color: var(--mute); }
.consent-no:hover { border-color: var(--brand); color: var(--brand-text); }

/* มือถือ: วางเหนือแถบ CTA ล่าง และดันปุ่มแชทขึ้นไม่ให้ทับกัน */
@media (max-width: 1023px) {
  .consent { left: 12px; right: 12px; width: auto; bottom: calc(84px + env(safe-area-inset-bottom)); }
  .has-consent-bar .cw-launcher { bottom: calc(240px + env(safe-area-inset-bottom)); }
}

/* ---------- ชวนโทรคุยกับ Voice AI ของจริง ---------- */
.calldemo { position: relative; overflow: hidden; padding: 30px 28px; border-radius: 20px; background: var(--brand-soft); border: 1px solid #BFDACB; }
@media (min-width: 640px) { .calldemo { padding: 38px 40px; } }
.calldemo-label { display: inline-flex; align-items: center; gap: 8px; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .16em; color: var(--brand-text); }
.calldemo-label::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); flex-shrink: 0; }
@media (prefers-reduced-motion: no-preference) {
  .calldemo-label::before { animation: liveDot 2.2s ease-in-out infinite; }
}
.calldemo-num { display: inline-flex; align-items: center; gap: 13px; margin-top: 14px; font-family: 'Jost', sans-serif; font-weight: 700; font-size: clamp(30px, 7vw, 46px); letter-spacing: -.01em; color: var(--ink); line-height: 1.1; transition: color .2s ease; }
.calldemo-num:hover { color: var(--brand-text); }
.calldemo-num svg { flex-shrink: 0; width: .72em; height: .72em; color: var(--brand); }
.calldemo-try { margin-top: 22px; padding-top: 20px; border-top: 1px dashed #BFDACB; }
.calldemo-try-label { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: .14em; color: var(--brand-text); }
.calldemo-list { margin-top: 11px; display: flex; flex-wrap: wrap; gap: 8px; }
.calldemo-chip { padding: 8px 15px; border-radius: 999px; background: var(--sheet); border: 1px solid #CDE3D6; font-size: 13px; color: var(--body); }
.calldemo-note { margin-top: 16px; font-size: 12.5px; line-height: 1.7; color: var(--mute); }
.try-realcall { margin-top: 14px; padding-top: 13px; border-top: 1px dashed var(--line); font-size: 13px; line-height: 1.7; color: var(--mute); }
.try-realcall-num { font-weight: 700; color: var(--brand-text); white-space: nowrap; }
.try-realcall-num:hover { text-decoration: underline; }

/* ---------- รูปถ่าย + แพ็กเกจ EV (เพิ่ม ต.ค. 2026) ---------- */
.ax-band { padding-bottom: 24px; }
.ax-photo { margin: 0; border-radius: 20px; overflow: hidden; background: var(--brand-soft); border: 1px solid var(--line); box-shadow: var(--shadow-md); aspect-ratio: 3 / 2; }
.ax-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ax-photo-wide { aspect-ratio: 21 / 8; }
@media (max-width: 639px) { .ax-photo-wide { aspect-ratio: 3 / 2; } }
.ax-list { display: grid; gap: 12px; }
.ax-list li { position: relative; padding-left: 26px; line-height: 1.65; color: var(--mute); }
.ax-list li::before { content: ''; position: absolute; left: 2px; top: .55em; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--brand); }
.ax-list b { color: var(--ink); font-weight: 600; }
.ax-list-sm { gap: 8px; margin-top: 14px; }
.ax-list-sm li { font-size: 14px; }
.ax-plan { position: relative; display: flex; flex-direction: column; background: var(--sheet); border: 1px solid var(--line); border-radius: 18px; padding: 26px 24px; box-shadow: var(--shadow-sm); }
.ax-plan-pop { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow-md); }
.ax-badge { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .14em; padding: 5px 10px; border-radius: 999px; background: var(--brand); color: #0E1411; white-space: nowrap; }
.ax-price { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; padding: 16px 0; border-block: 1px solid var(--line); }
.ax-price-num { font-family: 'Jost', 'Noto Sans Thai', sans-serif; font-size: 28px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.ax-price-unit { font-size: 12px; color: var(--faint); margin-left: 3px; }
.ax-price-lbl { font-size: 12px; color: var(--mute); margin-top: 2px; }
.ax-plan-tag { margin-top: 16px; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .1em; color: var(--brand-text); }
.ax-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.ax-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 14px; }
.ax-table th { text-align: left; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .12em; font-weight: 500; color: var(--faint); padding: 14px 18px; border-bottom: 1px solid var(--line); }
.ax-table td { padding: 14px 18px; color: var(--mute); border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.6; }
.ax-table tr:last-child td { border-bottom: 0; }
.ax-table b { color: var(--ink); font-weight: 600; }
