/* =========================================================
   Klagor Inspire — ธีม "Brand Gradient" (สีจากโลโก้: เขียวใบไม้ → น้ำเงิน บนพื้นกรมท่า)
   Breakpoints: มือถือ ≤ 640 · แท็บเล็ต 641–1024 · เดสก์ท็อป > 1024
   ========================================================= */

:root {
  --bg: #071427;
  --panel: #0B1B31;
  --panel-2: #0E2140;
  --chip: #102544;
  --line: #13284A;
  --border: #18304F;
  --border-2: #213E62;
  --border-btn: #2C4E77;
  --text: #EEF4FB;
  --text-2: #BBCADC;
  --muted: #9DAFC5;
  --subtle: #8599B2;
  --accent: #4CD68A;      /* สีเน้นแบบทึบ: ตัวอักษร เส้นขอบ ไอคอน */
  --accent-2: #4EA3FF;    /* น้ำเงินรอง: กราฟ ตัวเลขลำดับ */
  --accent-solid: #17925A; /* พื้นทึบที่ใช้ gradient ไม่ได้ (::selection, background-color) */
  --accent-fill: linear-gradient(100deg, #4FB443 0%, #17925A 50%, #1A6FD6 100%); /* ปุ่มหลัก/กล่องเด่น */
  --accent-text: linear-gradient(90deg, #8BD13F, #22A86B 50%, #3B9BFF); /* ตัวอักษรไล่สี */
  --accent-glow: 0 8px 24px rgba(30, 127, 224, .28);
  --accent-ring: rgba(76, 214, 138, .25);
  --on-accent: #FFFFFF;
  --on-danger: #071427;
  --warn: #F5B94A;        /* สถานะรอดำเนินการ */
  --danger: #FF8A7A;      /* ข้อความ error บนพื้นมืด (contrast ≥ 4.5:1) */

  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --pill: 999px;

  --container: 1280px;
  --gutter: 24px;
  --section-y: 96px;
  --header-h: 72px;
  --bar-h: 68px;

  /* ภาษาไทยใช้ Sarabun (มีหัว อ่านง่าย) · อังกฤษ/ตัวเลขในหัวข้อใช้ Space Grotesk */
  --font-display: "Space Grotesk", "Sarabun", system-ui, sans-serif;
  --font-body: "Sarabun", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (max-width: 640px) {
  :root { --section-y: 56px; --header-h: 64px; }
}

/* ---------------------------------------------------------- base */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  overflow-x: clip;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

[hidden] { display: none !important; }

img, video { display: block; max-width: 100%; height: auto; }
.icon { display: inline-block; flex: none; vertical-align: middle; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--text);
  text-wrap: balance;
}

h1 {
  font-size: clamp(38px, 5vw, 72px);
  font-weight: 700;
  line-height: 1.25; /* สเปก 1.1 — เพิ่มให้สระ/วรรณยุกต์ของ Sarabun ไม่ชนบรรทัดบน */
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(30px, 3.4vw, 48px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

h3 { font-size: 22px; font-weight: 600; line-height: 1.35; }

p { margin: 0; text-wrap: pretty; }

/* วลีที่ไม่ควรถูกตัดกลาง — บรรทัดจะตัดได้เฉพาะระหว่างวลี */
.nowrap-phrase { display: inline-block; }

a { color: inherit; }

::selection { background: var(--accent-solid); color: var(--on-accent); }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 200;
  padding: 12px 20px;
  border-radius: var(--pill);
  background: var(--accent-fill);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus-visible { top: 12px; outline-color: var(--text); }

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

.section { padding-block: var(--section-y); }
.section--line { border-top: 1px solid var(--line); }

/* ตัวอักษรไล่สีแบบวงแหวนโลโก้ — padding กันสระ/วรรณยุกต์ไทยด้านบนถูกตัด */
.text-accent {
  color: var(--accent);
  background: var(--accent-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-block: .15em;
  margin-block: -.15em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.h1-line.text-accent { width: fit-content; }
@media (forced-colors: active) { .text-accent { -webkit-text-fill-color: currentColor; background: none; } }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 20px;
  height: 1px;
  background: currentColor;
}

.lead {
  font-size: clamp(17px, 1.35vw, 19px);
  line-height: 1.7;
  color: var(--muted);
}

/* ---------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 16px 28px;
  border: 1px solid transparent;
  border-radius: var(--pill);
  font: 600 16px/1.2 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s, filter .2s, transform .2s var(--ease);
}
.btn .icon { transition: transform .25s var(--ease); }
.btn:hover .icon:last-child:not(:first-child) { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { cursor: progress; opacity: .75; }

.btn-primary { background: var(--accent-fill); color: var(--on-accent); box-shadow: var(--accent-glow); text-shadow: 0 1px 1px rgba(0, 0, 0, .18); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:focus-visible { outline-color: var(--text); }

.btn-secondary { border-color: var(--border-btn); color: var(--text); background: transparent; }
.btn-secondary:hover { border-color: var(--muted); background: var(--panel); }

.btn-dark { background: var(--bg); color: var(--text); }
.btn-dark:hover { background: var(--panel-2); }
.btn-dark:focus-visible { outline-color: var(--on-accent); }

.btn-sm { min-height: 44px; padding: 11px 20px; font-size: 15px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--accent);
  font-weight: 500;
  font-size: 16px;
  text-decoration: none;
}
.link-arrow .icon { transition: transform .25s var(--ease); }
.link-arrow:hover .icon { transform: translateX(3px); }

/* ---------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding-top: env(safe-area-inset-top);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .04em;
  white-space: nowrap;
}
.logo-mark {
  width: 32px;
  height: 32px;
  background: url("../img/logo-mark.svg") center / contain no-repeat;
  flex: none;
}

.nav-desktop { display: none; }
.nav-desktop ul { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nav-desktop a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--pill);
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color .2s, background-color .2s;
}
.nav-desktop a:hover { color: var(--text); background: var(--panel); }
.nav-desktop a[aria-current="page"] { color: var(--text); }
.nav-desktop a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--accent-fill);
}

/* เมนู "ประเมินโปรเจกต์" (Klagor AI) — เด่นกว่าเมนูอื่นเล็กน้อย */
.nav-desktop a.nav-ai { gap: 6px; border: 1px solid var(--border-2); color: var(--text); }
.nav-desktop a.nav-ai .icon { color: var(--accent); }
.nav-desktop a.nav-ai:hover, .nav-desktop a.nav-ai[aria-current="page"] { border-color: var(--accent); }
.nav-desktop a.nav-ai[aria-current="page"]::after { display: none; }
@media (min-width: 1025px) and (max-width: 1240px) {
  .nav-desktop a { padding: 0 10px; font-size: 14px; }
}

.header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.menu-toggle {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--border-2);
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.menu-toggle:hover { background: var(--panel); }
.menu-toggle .icon-close,
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (min-width: 1025px) {
  .nav-desktop { display: block; margin-left: auto; }
  .header-actions { margin-left: 16px; }
  .menu-toggle { display: none; }
}

@media (max-width: 640px) {
  .header-cta { display: none; }
  .logo { font-size: 16px; }
}

/* เมนูเต็มจอ (มือถือ / แท็บเล็ต) */
.mobile-menu {
  position: fixed;
  top: calc(var(--header-h) + env(safe-area-inset-top));
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  padding: 16px max(var(--gutter), env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu.is-open { opacity: 1; transform: none; }

.mm-list { margin: 0; padding: 0; list-style: none; }
.mm-list li { border-bottom: 1px solid var(--line); }
.mm-list a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
}
.mm-list a:hover, .mm-list a[aria-current="page"] { color: var(--accent); }
.mm-num {
  min-width: 28px;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: .04em;
}
.mm-foot { margin-top: auto; padding-top: 32px; }
.mm-actions { display: grid; gap: 12px; }
.mm-contact { margin-top: 16px; font-size: 14px; color: var(--subtle); }

@media (min-width: 641px) {
  .mm-actions { grid-template-columns: 1fr 1fr; }
}

html.menu-open, html.menu-open body { overflow: hidden; }

/* แถบปุ่มติดล่างจอ (มือถือ) */
.mobile-bar { display: none; }

@media (max-width: 640px) {
  body { padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom)); }
  .mobile-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 10px max(16px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background: var(--bg);
    border-top: 1px solid var(--line);
  }
  .mobile-bar .btn { min-height: 48px; padding: 12px 16px; font-size: 15px; }
}

/* ---------------------------------------------------------- hero */

.hero {
  padding-block: 72px var(--section-y);
  background:
    radial-gradient(640px 380px at 8% 0%, rgba(34, 168, 107, .16), transparent 70%),
    radial-gradient(720px 440px at 92% 55%, rgba(30, 127, 224, .2), transparent 70%);
}

.hero-grid { display: grid; gap: 48px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border: 1px solid var(--border-2);
  border-radius: var(--pill);
  background: var(--chip);
  color: var(--text-2);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
}
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-fill); flex: none; }

.hero h1 { margin: 28px 0 24px; }
.h1-line { display: block; }
.hero .lead { max-width: 560px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

@media (min-width: 1025px) {
  .hero { padding-top: 88px; }
  .hero-grid {
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
    align-items: center;
    gap: 56px;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .hero .lead { max-width: 640px; }
}

@media (max-width: 640px) {
  .hero { padding-top: 40px; }
  .hero h1 { margin: 22px 0 18px; }
  .hero-actions { margin-top: 28px; }
  .hero-actions .btn { flex: 1 1 auto; }
}

/* ภาพประกอบ Hero หน้าแรก: ระบบขอซื้อ (PR) + แจ้งเตือนอนุมัติบนมือถือ
   ขนาดภายในเป็น em จาก font-size ที่ผูกกับความกว้างกล่อง (cqi) — ย่อ/ขยายทั้งภาพเหมือนรูป */
.hero-ai-link { margin-top: 20px; }
.hero-visual { position: relative; container-type: inline-size; padding: 0 0 6% 17%; }
.hero-visual-frame { padding: 2.2cqi; border: 1px solid var(--border); border-radius: 4.5cqi; background: var(--panel-2); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.hero-visual-phone {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 35%;
  padding: 1.2cqi;
  border: 1px solid var(--border-2);
  border-radius: 5.5cqi;
  background: var(--panel);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
}
@media (max-width: 1024px) { .hero-visual { max-width: 720px; } }

/* --- แอปบนจอใหญ่ --- */
.prm-app { display: flex; flex-direction: column; aspect-ratio: 16 / 11; overflow: hidden; border: 1px solid var(--border-2); border-radius: 2.6cqi; background: var(--bg); font-size: 2.05cqi; line-height: 1.4; color: var(--text-2); }
.prm-app .icon { width: 1.2em; height: 1.2em; flex: none; }
.prm-bar { display: flex; align-items: center; gap: 1.2em; padding: .7em 1.1em; border-bottom: 1px solid var(--border); }
.prm-dots { display: flex; gap: .4em; }
.prm-dots i { width: .6em; height: .6em; border-radius: 50%; background: var(--border-2); }
.prm-search { display: flex; align-items: center; gap: .5em; width: 40%; margin-inline: auto; padding: .35em .9em; border: 1px solid var(--border); border-radius: var(--pill); background: var(--panel); color: var(--subtle); }
.prm-user { display: grid; place-items: center; width: 2.1em; height: 2.1em; border-radius: 50%; background: var(--chip); color: var(--text); font-size: .85em; font-weight: 600; }
.prm-body { display: grid; grid-template-columns: 24% minmax(0, 1fr); flex: 1; min-height: 0; }
.prm-side { display: flex; flex-direction: column; gap: .2em; padding: 1em .7em; border-right: 1px solid var(--border); background: var(--panel); }
.prm-brand { margin: 0 0 .6em .5em; color: var(--text); font-weight: 700; }
.prm-nav { display: flex; align-items: center; gap: .55em; padding: .45em .55em; border-radius: .6em; }
.prm-nav.is-active { background: var(--accent-ring); color: var(--text); font-weight: 600; }
.prm-nav.is-active .icon { color: var(--accent); }
.prm-main { display: flex; flex-direction: column; gap: 1em; min-width: 0; padding: 1.1em 1.2em; }
.prm-head { display: flex; align-items: center; justify-content: space-between; gap: 1em; }
.prm-title { margin: 0; color: var(--text); font-size: 1.45em; font-weight: 700; line-height: 1.2; }
.prm-sub { margin: 0; color: var(--subtle); font-size: .9em; }
.prm-btn { padding: .5em 1em; border-radius: var(--pill); background: var(--accent-fill); color: var(--on-accent); font-weight: 600; white-space: nowrap; }
.prm-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7em; }
.prm-kpis > span { display: grid; gap: .1em; padding: .6em .8em; border: 1px solid var(--border); border-radius: .8em; background: var(--panel); }
.prm-kpis small { color: var(--subtle); font-size: .85em; }
.prm-kpis b { color: var(--text); font-family: var(--font-display); font-size: 1.5em; line-height: 1.15; }
.prm-kpis > span:first-child b { color: var(--warn); }
.prm-meter { display: block; height: .35em; margin-top: .2em; border-radius: var(--pill); background: var(--border-2); overflow: hidden; }
.prm-meter i { display: block; width: 62%; height: 100%; background: var(--accent-fill); }
.prm-table { display: grid; border: 1px solid var(--border); border-radius: .8em; background: var(--panel); overflow: hidden; }
.prm-row { display: grid; grid-template-columns: 5.2em minmax(0, 1fr) auto 6.6em; align-items: center; gap: .8em; padding: .6em .9em; border-top: 1px solid var(--border); }
.prm-row:first-child { border-top: 0; }
.prm-no { color: var(--accent-2); font-family: var(--font-display); font-weight: 600; }
.prm-item { overflow: hidden; color: var(--text); text-overflow: ellipsis; white-space: nowrap; }
.prm-amt { font-family: var(--font-display); color: var(--text-2); }
.prm-st { justify-self: end; padding: .15em .7em; border: 1px solid; border-radius: var(--pill); font-size: .85em; font-weight: 600; white-space: nowrap; }
.prm-st--ok { border-color: rgba(76, 214, 138, .4); background: rgba(76, 214, 138, .1); color: var(--accent); }
.prm-st--wait { border-color: rgba(245, 185, 74, .45); background: rgba(245, 185, 74, .1); color: var(--warn); }
.prm-st--draft { border-color: var(--border-2); color: var(--subtle); }

/* --- มือถือ: หน้าจอล็อกพร้อมการแจ้งเตือน --- */
.prm-phone {
  display: flex;
  flex-direction: column;
  gap: .7em;
  aspect-ratio: 9 / 16.5;
  overflow: hidden;
  padding: .7em .7em 1em;
  border-radius: 4.4cqi;
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(34, 168, 107, .45), transparent 70%),
    radial-gradient(120% 70% at 100% 100%, rgba(30, 127, 224, .5), transparent 70%),
    var(--bg);
  font-size: 2.15cqi;
  line-height: 1.35;
  color: var(--text);
}
.prm-status { display: flex; justify-content: space-between; align-items: center; padding: 0 .5em; font-size: .85em; font-weight: 600; }
.prm-signal { display: flex; align-items: flex-end; gap: .15em; height: .8em; }
.prm-signal i { width: .25em; background: var(--text); border-radius: 1px; }
.prm-signal i:nth-child(1) { height: 40%; }
.prm-signal i:nth-child(2) { height: 70%; }
.prm-signal i:nth-child(3) { height: 100%; }
.prm-clock { margin: .2em 0 .2em; font-family: var(--font-display); font-size: 2.8em; font-weight: 600; line-height: 1; text-align: center; letter-spacing: -.02em; }
.prm-noti { padding: .7em .75em; border: 1px solid rgba(255, 255, 255, .1); border-radius: 1.1em; background: rgba(14, 33, 64, .82); box-shadow: 0 .6em 1.6em rgba(0, 0, 0, .3); animation: prm-in .6s var(--ease) both; }
.prm-noti--ok { animation-delay: .5s; }
.prm-noti--ask { animation-delay: 1.1s; }
.prm-noti-head { display: flex; align-items: center; gap: .45em; color: var(--text-2); font-size: .8em; }
.prm-app-ic { display: grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: .45em; background: var(--accent-fill); color: var(--on-accent); }
.prm-app-ic .icon { width: 1.1em; height: 1.1em; }
.prm-time { margin-left: auto; color: var(--subtle); }
.prm-noti-title { margin: .4em 0 .1em; font-weight: 700; }
.prm-noti--ok .prm-noti-title { color: var(--accent); }
.prm-noti-text { margin: 0; color: var(--text-2); font-size: .88em; }
.prm-noti-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .4em; margin-top: .6em; font-size: .85em; font-weight: 600; text-align: center; }
.prm-noti-actions span { padding: .4em .3em; border-radius: .7em; background: rgba(255, 255, 255, .08); white-space: nowrap; }
.prm-noti-actions .is-primary { background: var(--accent-fill); color: var(--on-accent); }
.prm-home { width: 36%; height: .35em; margin: auto auto 0; border-radius: var(--pill); background: rgba(255, 255, 255, .55); }
@keyframes prm-in { from { opacity: 0; transform: translateY(-.8em) scale(.96); } }
@media (prefers-reduced-motion: reduce) { .prm-noti { animation: none; } }

/* --- แอนิเมชันภาพ Hero ---
   1) เข้าฉาก: จอใหญ่เลื่อนจากขวา มือถือลอยขึ้นจากล่าง แล้วลอยขึ้นลงเบาๆ ตลอด
   2) วนทุก --prm-loop: แตะ "อนุมัติ" (≈28%) → สถานะ/ตัวเลขเปลี่ยน (≈40%) → toast บนจอใหญ่ → กลับสถานะเดิม (≈92%)
   ทุกตัวในข้อ 2 ใช้ระยะเวลาและ delay เดียวกัน จึงเดินพร้อมกันเสมอ */
.hero-visual { --prm-loop: 8s; --prm-start: 2.2s; }
.hero-visual::before {
  content: "";
  position: absolute;
  inset: 10% 5% 0 20%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(34, 168, 107, .28), rgba(30, 127, 224, .18) 55%, transparent);
  filter: blur(20px);
  animation: prm-glow 6s ease-in-out infinite alternate;
}
.hero-visual-frame { animation: prm-enter-frame .9s var(--ease) .1s both, prm-float 7s ease-in-out 1s infinite alternate; }
.hero-visual-phone { animation: prm-enter-phone .9s var(--ease) .35s both, prm-float 6s ease-in-out 1.3s infinite alternate-reverse; }
.prm-app { position: relative; }

/* สลับข้อความ 2 ชุดในช่องเดียวกัน */
.prm-swap { display: inline-grid; }
.prm-swap > * { grid-area: 1 / 1; }
.prm-swap > :first-child { animation: prm-swap-out var(--prm-loop) var(--prm-start) infinite both; }
.prm-swap > :last-child { animation: prm-swap-in var(--prm-loop) var(--prm-start) infinite both; }
.prm-st-swap { justify-self: end; justify-items: end; }
.prm-noti-title .is-done { color: var(--accent); }

/* แถว PR-0143: ส้ม (รอ) → แฟลชเขียว (อนุมัติ) */
.prm-row.is-live { animation: prm-row var(--prm-loop) var(--prm-start) infinite both; }
.prm-meter i { animation: prm-meter var(--prm-loop) var(--prm-start) infinite both; }

/* นิ้วแตะปุ่มอนุมัติ */
.prm-noti-actions .is-primary { position: relative; animation: prm-press var(--prm-loop) var(--prm-start) infinite both; }
.prm-tap {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2.4em;
  height: 2.4em;
  margin: -1.2em 0 0 -1.2em;
  border: 2px solid rgba(255, 255, 255, .9);
  border-radius: 50%;
  background: rgba(255, 255, 255, .3);
  pointer-events: none;
  animation: prm-tap var(--prm-loop) var(--prm-start) infinite both;
}

/* toast บนจอใหญ่หลังอนุมัติ */
.prm-toast {
  position: absolute;
  right: 1.2em;
  bottom: 1.1em;
  display: flex;
  align-items: center;
  gap: .55em;
  padding: .55em .9em .55em .6em;
  border: 1px solid rgba(76, 214, 138, .45);
  border-radius: .8em;
  background: var(--panel-2);
  box-shadow: 0 .8em 2em rgba(0, 0, 0, .4);
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
  animation: prm-toast var(--prm-loop) var(--prm-start) infinite both;
}

/* ปุ่มสร้างใบขอซื้อ: แสงวิ่งผ่านเป็นระยะ */
.prm-btn { position: relative; overflow: hidden; }
.prm-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: prm-shine 4.5s ease-in-out 1.5s infinite;
}

@keyframes prm-enter-frame { from { opacity: 0; translate: 6% 0; } }
@keyframes prm-enter-phone { from { opacity: 0; translate: 0 14%; } }
@keyframes prm-float { from { transform: translateY(0); } to { transform: translateY(-1.6cqi); } }
@keyframes prm-glow { from { opacity: .6; transform: scale(.95); } to { opacity: 1; transform: scale(1.05); } }
@keyframes prm-swap-out {
  0%, 36% { opacity: 1; transform: none; }
  40%, 88% { opacity: 0; transform: translateY(-.5em); }
  93%, 100% { opacity: 1; transform: none; }
}
@keyframes prm-swap-in {
  0%, 36% { opacity: 0; transform: translateY(.5em); }
  40%, 88% { opacity: 1; transform: none; }
  93%, 100% { opacity: 0; transform: translateY(.5em); }
}
@keyframes prm-row {
  0%, 36% { background: rgba(245, 185, 74, .07); }
  42% { background: rgba(76, 214, 138, .25); }
  56%, 88% { background: rgba(76, 214, 138, .06); }
  94%, 100% { background: rgba(245, 185, 74, .07); }
}
@keyframes prm-meter {
  0%, 38% { width: 62%; }
  46%, 88% { width: 66%; }
  95%, 100% { width: 62%; }
}
@keyframes prm-tap {
  0%, 20% { opacity: 0; transform: translate(1.6em, 1.4em) scale(.8); }
  26% { opacity: 1; transform: none; }
  29% { opacity: 1; transform: scale(.75); }
  36% { opacity: 0; transform: scale(1.7); }
  100% { opacity: 0; transform: scale(1.7); }
}
@keyframes prm-press {
  0%, 27% { transform: none; filter: none; }
  29% { transform: scale(.93); filter: brightness(1.2); }
  33%, 100% { transform: none; filter: none; }
}
@keyframes prm-toast {
  0%, 40% { opacity: 0; transform: translateY(.8em) scale(.96); }
  46%, 82% { opacity: 1; transform: none; }
  88%, 100% { opacity: 0; transform: translateY(.4em); }
}
@keyframes prm-shine {
  0%, 60% { transform: translateX(-120%); }
  85%, 100% { transform: translateX(120%); }
}

/* ผู้ใช้ที่ตั้งค่าลดการเคลื่อนไหว: แสดงภาพนิ่งสถานะแรก */
@media (prefers-reduced-motion: reduce) {
  .hero-visual::before, .hero-visual-frame, .hero-visual-phone, .prm-swap > *, .prm-row.is-live,
  .prm-meter i, .prm-noti-actions .is-primary, .prm-btn::after { animation: none; }
  .prm-swap > :last-child, .prm-tap, .prm-toast { animation: none; opacity: 0; }
  .prm-row.is-live { background: rgba(245, 185, 74, .07); }
}



/* ---------------------------------------------------------- Case Study: ขั้นตอน / ฟีเจอร์ / ประโยชน์ */

.flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.flow-step { position: relative; padding: 20px 18px 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
.flow-num { display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 14px; border-radius: 50%; background: var(--accent-fill); color: var(--on-accent); font: 600 15px/1 var(--font-display); }
.flow-title { color: var(--text); font-size: 17px; font-weight: 600; line-height: 1.4; }
.flow-desc { margin-top: 4px; color: var(--muted); font-size: 14px; line-height: 1.55; }
@media (min-width: 1025px) {
  .flow { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  /* เส้นเชื่อมระหว่างขั้น */
  .flow-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 38px;
    right: -13px;
    width: 14px;
    height: 2px;
    background: var(--accent);
    opacity: .6;
  }
}

.fgroups { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 20px; }
.fgroup, .benefit { padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--panel); }
.fgroup-num { color: var(--accent); font: 600 14px/1 var(--font-display); letter-spacing: .04em; }
.fgroup h3 { margin: 12px 0 6px; font-size: 21px; line-height: 1.35; }
.benefit h3 { margin-bottom: 14px; font-size: 19px; line-height: 1.35; }
.fgroup-desc { margin-bottom: 16px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.fgroup h3 + .fgroup-list { margin-top: 14px; }
.fgroup-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.fgroup-list li { display: flex; align-items: flex-start; gap: 10px; color: var(--text-2); font-size: 15px; line-height: 1.6; }
.fgroup-list .icon { flex: none; margin-top: 4px; color: var(--accent); }
.fgroup-list strong { color: var(--text); font-weight: 600; }
.benefits { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 20px; }
@media (max-width: 640px) {
  .fgroup, .benefit { padding: 22px; }
}
/* หมวดที่มีรูป: แถวเต็มความกว้าง ข้อความซ้าย รูปขวา (สลับข้างทุกแถว) */
.fgroups--media { grid-template-columns: minmax(0, 1fr); }
.fgroup--media { display: grid; gap: 28px; }
@media (min-width: 1025px) {
  .fgroup--media { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; gap: 40px; padding: 36px; }
  .fgroup--media:nth-child(even) .fgroup-text { order: 2; }
}
.fgroup-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr)); gap: 10px; }
.fgroup-shot { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 3; border: 1px solid var(--border-2); border-radius: var(--radius-sm); background: var(--panel-2); cursor: zoom-in; }
.fgroup-shot.is-main { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
.fgroup-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .4s var(--ease); }
.fgroup-shot:hover img { transform: scale(1.03); }
.fgroup-shot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 640px) {
  .fgroup-gallery { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
}

/* ดูรูปขนาดใหญ่ */
.lightbox { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(3, 9, 20, .94); color: var(--text); }
.lightbox::backdrop { background: rgba(3, 9, 20, .7); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox figure { display: grid; justify-items: center; gap: 12px; margin: 0; padding: 64px 72px 24px; max-width: 100%; }
.lightbox img { max-width: min(1400px, 100%); max-height: calc(100dvh - 140px); border-radius: var(--radius-sm); object-fit: contain; }
.lightbox figcaption { color: var(--text-2); font-size: 15px; text-align: center; }
.lightbox-btn { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--border-2); border-radius: 50%; background: var(--panel); color: var(--text); cursor: pointer; }
.lightbox-btn:hover { border-color: var(--accent); }
.lightbox-close { top: 16px; right: 16px; }
.lightbox-prev { left: 16px; top: 50%; translate: 0 -50%; }
.lightbox-next { right: 16px; top: 50%; translate: 0 -50%; }
@media (max-width: 640px) {
  .lightbox figure { padding: 72px 12px 88px; }
  .lightbox-prev, .lightbox-next { top: auto; bottom: 20px; translate: none; }
  .lightbox-prev { left: calc(50% - 60px); }
  .lightbox-next { right: calc(50% - 60px); }
}

/* ---------------------------------------------------------- หน้า /estimate */

.estimate-grid { display: grid; gap: 40px; }
@media (min-width: 1025px) { .estimate-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 64px; align-items: start; } }
.estimate-steps { display: grid; gap: 18px; margin: 36px 0 0; padding: 0; list-style: none; }
.estimate-steps li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; align-items: start; }
.estimate-step-num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-2);
  border-radius: 50%;
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 600;
}
.estimate-step-title { font-weight: 600; line-height: 1.5; }
.estimate-step-desc { color: var(--muted); font-size: 15px; line-height: 1.6; }
.estimate-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 32px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel); color: var(--text-2); font-size: 14px; line-height: 1.6; }
.estimate-note .icon { margin-top: 2px; color: var(--accent); flex: none; }

/* ---------------------------------------------------------- AI card */

.ai-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
}

.ai-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.ai-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--accent-fill);
  color: var(--on-accent);
  flex: none;
}
.ai-title { font-size: 16px; font-weight: 600; line-height: 1.4; }
.ai-sub { font-size: 14px; color: var(--muted); line-height: 1.5; }

.pill-tag {
  margin-left: auto;
  align-self: flex-start;
  padding: 3px 10px;
  border: 1px solid var(--border-2);
  border-radius: var(--pill);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.field-label { display: block; margin-bottom: 8px; color: var(--text-2); font-size: 14px; font-weight: 500; }

.textarea {
  display: block;
  width: 100%;
  min-height: 100px;
  padding: 14px 16px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font-body);
  resize: vertical;
  transition: border-color .2s, box-shadow .2s;
}
.textarea::placeholder { color: var(--subtle); }
.textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }

.field-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; color: var(--subtle); font-size: 13px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip {
  min-height: 44px;
  padding: 9px 18px;
  border: 1px solid var(--border-2);
  border-radius: var(--pill);
  background: var(--chip);
  color: var(--text-2);
  font: 500 15px/1.2 var(--font-body);
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.chip:hover { border-color: var(--muted); color: var(--text); }
.chip[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }

.ai-submit { width: 100%; margin-top: 18px; }
.ai-submit.is-loading .icon { animation: spin 1s linear infinite; }

.scope {
  margin-top: 20px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-2);
}
.scope-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.scope-label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}
.scope-count { font-size: 13px; color: var(--muted); }

.scope-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.scope-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.45;
  animation: rise .35s var(--ease) both;
}
.scope-item .icon { margin-top: 2px; color: var(--accent); }
.scope-item:nth-child(2) { animation-delay: .04s; }
.scope-item:nth-child(3) { animation-delay: .08s; }
.scope-item:nth-child(4) { animation-delay: .12s; }
.scope-item:nth-child(5) { animation-delay: .16s; }
.scope-item:nth-child(6) { animation-delay: .2s; }

.scope.is-loading .scope-item {
  color: transparent;
  background: var(--chip);
  animation: pulse 1.1s ease-in-out infinite;
}
.scope.is-loading .scope-item .icon { visibility: hidden; }

.scope-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 4px 16px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}
.scope-time { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); }
.scope-time .icon { color: var(--muted); }
.scope-time strong { font-family: var(--font-display); font-weight: 600; color: var(--text); }
.scope-foot .link-arrow { font-size: 14px; }
.scope-note { margin-top: 6px; color: var(--subtle); font-size: 12.5px; line-height: 1.6; }

@media (max-width: 640px) {
  .ai-card { padding: 20px; border-radius: var(--radius); }
  .scope { padding: 16px; }
  .scope-item { padding: 9px 10px; font-size: 13.5px; }
}

/* ---------------------------------------------------------- tech strip */

.tech { padding-block: 28px; border-block: 1px solid var(--line); }
.tech-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 48px; }
.tech-label {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--subtle);
}
.tech-list { display: flex; flex-wrap: wrap; gap: 10px 36px; margin: 0; padding: 0; list-style: none; }
.tech-list li { font-family: var(--font-display); font-size: 18px; font-weight: 600; color: var(--muted); }

@media (max-width: 640px) {
  .tech-list { gap: 8px 22px; }
  .tech-list li { font-size: 16px; }
}

/* ---------------------------------------------------------- section head */

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px 32px;
  margin-bottom: 48px;
}
.section-head h2 { max-width: 760px; }

@media (max-width: 640px) {
  .section-head { margin-bottom: 32px; }
}

/* ---------------------------------------------------------- services grid */

.svc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--line);
}

.svc {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 300px;
  padding: 32px;
  background: var(--bg);
  color: inherit;
  text-decoration: none;
  transition: background-color .25s;
}
.svc:hover { background: var(--panel); }
.svc:focus-visible { outline-offset: -4px; border-radius: 4px; }

.svc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.svc-num { font-family: var(--font-display); font-size: 15px; font-weight: 600; letter-spacing: .04em; color: var(--accent); }
.svc-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--border-2);
  border-radius: 14px;
  color: var(--text);
  transition: border-color .25s, color .25s;
}
.svc:hover .svc-icon { border-color: var(--accent); color: var(--accent); }
.svc p { color: var(--muted); font-size: 16px; }
.svc-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
}
.svc-more .icon { transition: transform .25s var(--ease); }
.svc:hover .svc-more { color: var(--accent); }
.svc:hover .svc-more .icon { transform: translateX(3px); }

@media (min-width: 641px) { .svc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1025px) { .svc-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) {
  .svc { min-height: 0; padding: 24px; }
  .svc-more { margin-top: 4px; }
}

/* ---------------------------------------------------------- work cards */

.work-grid { display: grid; gap: 24px; }
@media (min-width: 641px) { .work-grid { grid-template-columns: repeat(2, 1fr); } }

.work-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
  color: inherit;
  text-decoration: none;
  transition: border-color .25s;
}
.work-card:hover { border-color: var(--border-btn); }
.work-card:focus-visible { border-radius: var(--radius-lg); }

.work-media { padding: 28px 28px 0; background: var(--panel-2); border-bottom: 1px solid var(--border); }
.work-card .mock { transition: transform .5s var(--ease); }
.work-card:hover .mock { transform: translateY(-4px); }

.work-body { display: flex; flex-direction: column; gap: 12px; flex: 1; padding: 24px 28px 20px; }
.work-body h3 { font-size: clamp(22px, 2vw, 26px); }
.work-body p { color: var(--muted); font-size: 16px; }
.work-body .link-arrow { margin-top: auto; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tag-sm {
  padding: 3px 12px;
  border: 1px solid var(--border-2);
  border-radius: var(--pill);
  background: var(--chip);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
}

@media (max-width: 640px) {
  .work-media { padding: 20px 20px 0; }
  .work-body { padding: 20px 20px 12px; }
}

/* ---------------------------------------------------------- mock screen (placeholder ภาพหน้าจอ) */

.mock {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--border-2);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  background: var(--bg);
}
.mock-bar { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.mock-bar span { width: 8px; height: 8px; border-radius: 50%; background: var(--border-2); }
.mock-body { display: grid; min-height: 0; }
.mock span { display: block; }

.mock--dashboard .mock-body { grid-template-columns: 22% 1fr; }
.mock-side { display: grid; align-content: start; gap: 9px; padding: 14px 12px; border-right: 1px solid var(--border); }
.mock-side span { height: 7px; border-radius: 4px; background: var(--chip); }
.mock-side span.is-active { width: 75%; background: var(--accent-fill); }
.mock-main { display: grid; grid-template-rows: auto 1fr auto; gap: 10px; min-height: 0; padding: 12px; }
.mock-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mock-kpis span { height: 30px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); }
.mock-chart {
  display: flex;
  align-items: flex-end;
  gap: 6%;
  min-height: 0;
  padding: 10px 12px 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}
.mock-chart span { flex: 1; border-radius: 3px 3px 0 0; background: var(--border-2); }
.mock-chart span:nth-child(1) { height: 35%; }
.mock-chart span:nth-child(2) { height: 55%; }
.mock-chart span:nth-child(3) { height: 42%; }
.mock-chart span:nth-child(4) { height: 70%; }
.mock-chart span:nth-child(5) { height: 58%; }
.mock-chart span:nth-child(6) { height: 85%; background: linear-gradient(#8BD13F, #22A86B); }
.mock-chart span:nth-child(3) { background: var(--accent-2); }
.mock-chart span:nth-child(7) { height: 64%; }
.mock-rows { display: grid; gap: 6px; }
.mock-rows span { height: 6px; border-radius: 3px; background: var(--chip); }
.mock-rows span:nth-child(2) { width: 82%; }
.mock-rows span:nth-child(3) { width: 64%; }

.mock--pos .mock-body { grid-template-columns: 1fr 34%; }
.mock-tiles { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: 8px; padding: 12px; }
.mock-tiles span { border: 1px solid var(--border); border-radius: 8px; background: var(--panel); }
.mock-tiles span:nth-child(2) { border-color: var(--accent); }
.mock-receipt { display: grid; align-content: start; gap: 9px; padding: 14px 12px; border-left: 1px solid var(--border); background: var(--panel); }
.mock-receipt span { height: 7px; border-radius: 4px; background: var(--chip); }
.mock-receipt span:nth-child(2) { width: 70%; }
.mock-receipt span:nth-child(4) { width: 55%; }
.mock-receipt .mock-total { height: 26px; margin-top: 10px; border-radius: 8px; background: var(--accent-fill); }

.mock-caption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 3px 10px;
  border: 1px solid var(--border-2);
  border-radius: var(--pill);
  background: var(--bg);
  color: var(--subtle);
  font-size: 12px;
  line-height: 1.6;
}

/* แชต (LINE OA) */
.mock--chat .mock-body { display: block; }
.mock-chat { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 16px 18px; }
.mock-chat .b-in, .mock-chat .b-out { height: 22px; border-radius: 12px; }
.mock-chat .b-in { align-self: flex-start; border: 1px solid var(--border); background: var(--panel-2); }
.mock-chat .b-out { align-self: flex-end; background: var(--accent-fill); }
.mock .w35 { width: 35%; }
.mock .w45 { width: 45%; }
.mock .w60 { width: 60%; }
.mock .w75 { width: 75%; }
.mock .mock-choices { display: flex; gap: 8px; }
.mock-choices i { width: 52px; height: 20px; border: 1px solid var(--accent); border-radius: var(--pill); }
.mock-choices i.is-on { background: var(--accent-fill); }

/* แอปมือถือ */
.mock--mobile .mock-body { display: flex; justify-content: center; align-items: flex-end; gap: 6%; padding-top: 16px; }
.mock .mock-phone {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 30%;
  height: 92%;
  padding: 12px 10px;
  border: 1px solid var(--border-2);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  background: var(--panel);
}
.mock-phone.is-back { height: 72%; opacity: .55; }
.mp-head { width: 40%; height: 8px; border-radius: 4px; background: var(--chip); }
.mp-hero { height: 30%; border: 1px solid var(--border); border-radius: 10px; background: var(--panel-2); }
.mp-row { height: 8px; border-radius: 4px; background: var(--chip); }
.mp-row.short { width: 60%; }
.mp-btn { height: 20px; margin-top: auto; border-radius: var(--pill); background: var(--accent-fill); }

/* อ่านเอกสาร (OCR) */
.mock--doc .mock-body { grid-template-columns: 1fr 38%; }
.mock .mock-doc { display: flex; flex-direction: column; gap: 8px; margin: 14px; padding: 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); }
.mock-doc span { height: 6px; border-radius: 3px; background: var(--chip); }
.mock-doc .d-title { width: 50%; height: 10px; }
.mock-doc .d-scan { height: 24px; border: 1.5px dashed var(--accent); background: transparent; }
.mock .mock-fields { display: flex; flex-direction: column; gap: 6px; padding: 14px 12px; border-left: 1px solid var(--border); background: var(--panel); }
.mock-fields .f-label { width: 40%; height: 5px; border-radius: 3px; background: var(--border-2); }
.mock-fields .f-val { height: 18px; margin-bottom: 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); }
.mock-fields .f-val.is-on { border-color: var(--accent); }

/* ---------------------------------------------------------- CTA band */

.cta-band { padding-bottom: var(--section-y); }
.section + .cta-band, .cta-band:first-child { padding-top: 0; }

.cta-box {
  display: grid;
  gap: 32px;
  align-items: center;
  padding: 64px;
  border-radius: var(--radius-xl);
  background: var(--accent-fill);
  color: var(--on-accent);
}
.cta-box { box-shadow: var(--accent-glow); }
.cta-box h2 { max-width: 680px; color: var(--on-accent); }
.cta-box p { max-width: 600px; margin-top: 14px; font-size: 18px; color: var(--on-accent); opacity: .78; }
.cta-box .btn { justify-self: start; }

@media (min-width: 1025px) {
  .cta-box { grid-template-columns: 1fr auto; padding: 72px; }
}
@media (max-width: 640px) {
  .cta-box { padding: 36px 24px; border-radius: var(--radius-lg); gap: 24px; }
  .cta-box p { font-size: 16px; }
  .cta-box .btn { justify-self: stretch; }
}

/* ---------------------------------------------------------- footer */

.site-footer { padding-block: 72px 24px; border-top: 1px solid var(--line); color: var(--subtle); font-size: 15px; }

.footer-grid { display: grid; gap: 40px; }
.footer-brand p { max-width: 320px; margin-top: 16px; color: var(--muted); }
.footer-brand .footer-legal { margin-top: 8px; color: var(--subtle); font-size: 14px; }

.footer-title {
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.7;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text);
}

.footer-links, .footer-contact, .footer-policy { margin: 0; padding: 0; list-style: none; }
.footer-links a, .footer-policy a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  text-decoration: none;
}
.footer-links a:hover, .footer-policy a:hover, .footer-contact a:hover { color: var(--accent); }

.footer-contact li { display: flex; align-items: center; gap: 12px; min-height: 44px; color: var(--muted); }
.footer-contact .icon { color: var(--subtle); }
.footer-contact a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 24px;
  margin-top: 56px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.footer-policy { display: flex; gap: 24px; }

@media (min-width: 641px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1025px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1.1fr 1.2fr; gap: 48px; } }
@media (max-width: 640px) { .site-footer { padding-top: 56px; } }

/* ---------------------------------------------------------- page hero / breadcrumb */

.page-hero { padding-block: 72px 72px; }
.page-hero h1 { margin-bottom: 20px; }
.page-hero .lead { max-width: 680px; }
.page-hero .lead + .btn, .page-hero .lead + .hero-actions { margin-top: 32px; }
.page-hero--split .hero-grid { align-items: center; }

@media (max-width: 640px) {
  .page-hero { padding-block: 40px 48px; }
}

.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; font-size: 14px; color: var(--subtle); }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--border-btn); }
.breadcrumb a { display: inline-block; padding-block: 10px; margin-block: -10px; color: var(--subtle); text-decoration: none; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb [aria-current] { color: var(--text-2); }

.section-note { max-width: 440px; color: var(--muted); font-size: 16px; }

/* ---------------------------------------------------------- check list */

.check-list { display: grid; gap: 14px; margin: 28px 0; padding: 0; list-style: none; }
.check-list li { display: flex; align-items: flex-start; gap: 12px; color: var(--text-2); font-size: 16px; line-height: 1.6; }
.check-dot {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border: 1px solid var(--border-2);
  border-radius: 50%;
  background: var(--chip);
  color: var(--accent);
  flex: none;
}

/* ---------------------------------------------------------- /services */

.chip-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 36px; }
a.chip { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.chip-num { font-family: var(--font-display); font-size: 13px; font-weight: 600; color: var(--accent); }

.svc-detail { padding-block: 88px; border-top: 1px solid var(--line); }
.svc-detail-grid { display: grid; gap: 40px; align-items: center; }
.svc-detail-num {
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: clamp(64px, 8vw, 112px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--accent);
}
.svc-detail h2 { margin-bottom: 16px; }
.svc-detail .lead { max-width: 580px; }
.svc-detail-media {
  overflow: hidden;
  padding: 32px 32px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel-2);
}

/* รูปจากผลงานในหน้าบริการ */
.svc-shot { margin: 0; }
.svc-shot-frame { position: relative; display: block; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--panel-2); }
.svc-shot-frame > img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center; border-radius: 12px; transition: transform .4s var(--ease); }
.svc-shot-frame:hover > img { transform: scale(1.015); }
.svc-shot.has-phone .svc-shot-frame { margin-right: 11%; margin-bottom: 7%; }
.svc-shot-phone { position: absolute; right: -10%; bottom: -12%; width: 27%; padding: 6px; border: 1px solid var(--border-2); border-radius: 22px; background: var(--panel); box-shadow: 0 20px 50px rgba(0, 0, 0, .5); }
.svc-shot-phone img { display: block; width: 100%; aspect-ratio: 9 / 17; object-fit: cover; object-position: top center; border-radius: 16px; }
.svc-shot figcaption { margin-top: 14px; color: var(--muted); font-size: 14px; }
.svc-shot.has-phone figcaption { margin-top: calc(7% + 14px); }
.svc-shot figcaption a { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-weight: 600; text-decoration: none; }
.svc-shot figcaption a:hover { text-decoration: underline; }

@media (min-width: 641px) {
  .svc-detail .check-list { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1025px) {
  .svc-detail-grid { grid-template-columns: 1fr 1fr; gap: 80px; }
  .svc-detail.is-flipped .svc-detail-copy { order: 2; }
}
@media (max-width: 640px) {
  .svc-detail { padding-block: 56px; }
  .svc-detail-media { padding: 20px 20px 0; border-radius: var(--radius); }
}

.plans { display: grid; gap: 24px; }
@media (min-width: 1025px) { .plans { grid-template-columns: repeat(3, 1fr); align-items: stretch; } }

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 36px 32px 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
}
.plan--featured { border-color: var(--accent); }
.plan-badge {
  position: absolute;
  top: -14px;
  left: 32px;
  padding: 4px 14px;
  border-radius: var(--pill);
  background: var(--accent-fill);
  color: var(--on-accent);
  font-size: 13px;
  font-weight: 600;
}
.plan h3 { font-size: 24px; }
.plan-desc { color: var(--muted); font-size: 16px; }
.plan-price {
  margin: 12px 0 4px;
  padding-block: 16px;
  border-block: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
}
.check-list--compact { gap: 12px; margin: 16px 0 28px; }
.check-list--compact li { font-size: 15px; }
.plan .btn { margin-top: auto; }
.plan-price small { color: var(--muted); font-family: var(--font-body); font-size: 15px; font-weight: 500; }
@media (min-width: 1025px) {
  .plans--1 { grid-template-columns: minmax(0, 480px); }
  .plans--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plans--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .plans--4 .plan { padding: 32px 24px 28px; }
}
@media (min-width: 641px) and (max-width: 1024px) {
  .plans--2, .plans--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.faq-layout { display: grid; gap: 40px; }
.faq-layout h2 { margin-bottom: 16px; }
@media (min-width: 1025px) { .faq-layout { grid-template-columns: 5fr 7fr; gap: 80px; align-items: start; } }

.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 44px;
  padding: 20px 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { color: var(--muted); transition: transform .25s var(--ease), color .2s; }
.faq summary:hover { color: var(--accent); }
.faq details[open] summary .icon { transform: rotate(180deg); color: var(--accent); }
.faq details p { padding: 0 40px 24px 0; color: var(--muted); }

/* ---------------------------------------------------------- /ai */

.chat-demo {
  width: 100%;
  max-width: 520px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
}
@media (min-width: 1025px) { .chat-demo { justify-self: end; } }

.chat-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); background: var(--panel-2); }
.chat-avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent-fill); color: var(--on-accent); flex: none; }
.chat-name { font-weight: 600; font-size: 16px; line-height: 1.4; }
.chat-status { color: var(--muted); font-size: 13px; line-height: 1.4; }

.chat-log { display: flex; flex-direction: column; gap: 12px; min-height: 300px; margin: 0; padding: 20px; list-style: none; background: var(--bg); }
.msg { display: flex; flex-direction: column; gap: 10px; max-width: 84%; animation: rise .35s var(--ease) both; transition: opacity .3s; }
.msg p { padding: 10px 16px; border-radius: 18px; font-size: 15px; line-height: 1.55; }
.msg--out { align-self: flex-end; }
.msg--out p { background: var(--accent-fill); color: var(--on-accent); border-bottom-right-radius: 6px; }
.msg--in { align-self: flex-start; }
.msg--in p { border: 1px solid var(--border); background: var(--panel-2); color: var(--text); border-bottom-left-radius: 6px; }
.msg.is-typing { opacity: 0; }

.msg-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.msg-choice {
  min-height: 44px;
  padding: 8px 18px;
  border: 1px solid var(--accent);
  border-radius: var(--pill);
  background: transparent;
  color: var(--accent);
  font: 600 15px/1 var(--font-display);
  cursor: pointer;
  transition: background-color .2s, color .2s, opacity .2s;
}
.msg-choice:hover { background: var(--chip); }
.msg-choice[aria-pressed="true"] { background: var(--accent-fill); color: var(--on-accent); }
.msg-choice:disabled { cursor: default; }
.msg-choice:disabled:not([aria-pressed="true"]) { opacity: .4; }

.chat-note { display: flex; align-items: center; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); color: var(--subtle); font-size: 13px; line-height: 1.5; }
.chat-note .icon { color: var(--muted); }

.svc--static { min-height: 0; }
.svc--static:hover { background: var(--bg); }

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
  -webkit-overflow-scrolling: touch;
}
.table-scroll:focus-visible { border-radius: var(--radius-lg); }
.data-table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 16px; }
.data-table th, .data-table td { padding: 20px 24px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.data-table tbody tr:last-child > * { border-bottom: 0; }
.data-table thead th {
  background: var(--panel-2);
  color: var(--subtle);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.th-icon { display: inline-flex; margin-right: 8px; color: var(--accent); vertical-align: -2px; }
.data-table tbody th { width: 220px; color: var(--text); font-weight: 600; white-space: nowrap; }
.data-table td { color: var(--text-2); }
.row-num { display: inline-block; margin-right: 12px; color: var(--accent); font-family: var(--font-display); font-size: 14px; font-weight: 600; }

@media (max-width: 640px) {
  .data-table th, .data-table td { padding: 16px; }
}

.card-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
}
.card-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
  border: 1px solid var(--border-2);
  border-radius: 14px;
  color: var(--accent);
}
.card p { color: var(--muted); font-size: 16px; }

@media (max-width: 640px) {
  .card { padding: 24px; }
}

/* ---------------------------------------------------------- /about */

.process { display: grid; margin: 0; padding: 0; list-style: none; }
.process-step { position: relative; padding: 0 0 36px 72px; }
.process-step::before {
  content: "";
  position: absolute;
  top: 48px;
  bottom: 0;
  left: 24px;
  width: 1px;
  background: var(--border-2);
}
.process-step:last-child { padding-bottom: 0; }
.process-step:last-child::before { display: none; }
.process-num {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--border-2);
  border-radius: 50%;
  background: var(--bg);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
}
.process-step h3 { margin: 8px 0 6px; font-size: 20px; }
.process-step p { color: var(--muted); font-size: 15px; }

@media (min-width: 1025px) {
  .process { grid-template-columns: repeat(5, 1fr); }
  .process-step { padding: 0 24px 0 0; }
  .process-step::before { top: 24px; bottom: auto; left: 48px; right: 0; width: auto; height: 1px; }
  .process-num { position: relative; margin-bottom: 20px; }
}


.about-split { display: grid; gap: 32px; }
.about-split h2 { margin-bottom: 16px; }
@media (min-width: 1025px) { .about-split { grid-template-columns: 5fr 7fr; gap: 80px; align-items: start; } }

.tech-groups, .info-list { margin: 0; }
.tech-groups > div, .info-list > div { display: grid; gap: 8px 24px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.tech-groups > div:first-child, .info-list > div:first-child { border-top: 1px solid var(--line); }
.tech-groups dt, .info-list dt {
  color: var(--subtle);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.tech-groups dd, .info-list dd { margin: 0; color: var(--text-2); }
.tech-groups dd { display: flex; flex-wrap: wrap; gap: 8px; }
@media (min-width: 641px) {
  .tech-groups > div, .info-list > div { grid-template-columns: 220px 1fr; align-items: center; }
}

.join {
  display: grid;
  gap: 32px;
  padding: 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--panel);
}
.join h2 { margin-bottom: 16px; }
.join-label { color: var(--subtle); font-size: 14px; }
.join-list { display: grid; gap: 8px; margin: 12px 0 24px; padding: 0; list-style: none; }
.join-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  color: var(--text-2);
}
.join-list .icon { color: var(--accent); }
@media (min-width: 1025px) { .join { grid-template-columns: 1.2fr 1fr; gap: 64px; align-items: center; padding: 64px; } }
@media (max-width: 640px) { .join { padding: 28px 22px; border-radius: var(--radius-lg); } }

/* ---------------------------------------------------------- /contact */

.page-hero--contact { padding-bottom: var(--section-y); }
/* คอลัมน์ซ้ายแคบกว่าหน้าอื่น — ลดขนาด H1 ไม่ให้วลีล้นจนตัดกลางคำ */
@media (min-width: 1025px) { .page-hero--contact h1 { font-size: clamp(38px, 4vw, 60px); } }

.contact-grid { display: grid; gap: 40px; grid-template-areas: "intro" "form" "info"; }
.contact-intro { grid-area: intro; }
.contact-info { grid-area: info; }
.contact-form-wrap { grid-area: form; min-width: 0; }

@media (min-width: 641px) and (max-width: 1024px) {
  .contact-info { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; align-items: start; }
  .contact-info .map { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; }
}
@media (min-width: 1025px) {
  .contact-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    grid-template-areas: "intro form" "info form";
    grid-template-rows: auto 1fr;
    gap: 40px 72px;
    align-items: start;
  }
}

.contact-list { display: grid; margin: 0 0 20px; padding: 0; list-style: none; }
.contact-list li { position: relative; display: flex; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.contact-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--accent);
  flex: none;
}
.contact-label { color: var(--subtle); font-size: 13px; line-height: 1.4; }
.contact-list a, .contact-list span { color: var(--text); font-size: 16px; text-decoration: none; }
.contact-list a::after { content: ""; position: absolute; inset: 0; }
.contact-list a:hover { color: var(--accent); }

.btn-block { width: 100%; }

.map { overflow: hidden; aspect-ratio: 16 / 10; margin-top: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel-2); }
.map iframe { display: block; width: 100%; height: 100%; border: 0; }
.map-placeholder { display: grid; place-content: center; justify-items: center; gap: 8px; height: 100%; color: var(--subtle); font-size: 14px; }
.map-load { width: 100%; padding: 16px; border: 0; background: none; font: inherit; text-align: center; cursor: pointer; }
.map-load strong { color: var(--text); font-size: 16px; }
.map-load:hover strong, .map-load:focus-visible strong { color: var(--accent); }

.lead-form { padding: 32px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--panel); scroll-margin-top: calc(var(--header-h) + 16px); }
@media (max-width: 640px) { .lead-form { padding: 22px 18px; border-radius: var(--radius); } }

.stepper { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 28px; padding: 0; list-style: none; }
.stepper li { display: flex; align-items: center; gap: 10px; padding-top: 12px; border-top: 3px solid var(--border-2); color: var(--subtle); font-size: 14px; transition: border-color .25s, color .25s; }
.stepper li.is-done { border-color: var(--accent); color: var(--text-2); }
.stepper li[aria-current="step"] { border-color: var(--accent); color: var(--text); font-weight: 600; }
.stepper-num {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--border-2);
  border-radius: 50%;
  background: var(--chip);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  flex: none;
}
.stepper li.is-done .stepper-num,
.stepper li[aria-current="step"] .stepper-num { border-color: var(--accent); background: var(--accent-fill); color: var(--on-accent); }
@media (max-width: 640px) {
  .stepper li:not([aria-current]) .stepper-label { display: none; }
}

.form-step { min-width: 0; margin: 0; padding: 0; border: 0; }
.js .form-step:not(.is-active) { display: none; }
.form-step.is-active { animation: rise .35s var(--ease) both; }
.step-title { margin-bottom: 20px; padding: 0; color: var(--text); font-family: var(--font-display); font-size: 22px; font-weight: 600; line-height: 1.4; }
.step-title:focus { outline: none; }
.step-title span { display: block; margin-top: 4px; color: var(--muted); font-family: var(--font-body); font-size: 14px; font-weight: 400; }
html:not(.js) .form-step + .form-step { margin-top: 32px; }
html:not(.js) [data-next], html:not(.js) [data-prev], html:not(.js) .stepper { display: none; }

.lead-form .chips { margin-top: 0; }
.chip-check { position: relative; display: inline-flex; }
.chip-check input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.chip-check span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 9px 18px 9px 14px;
  border: 1px solid var(--border-2);
  border-radius: var(--pill);
  background: var(--chip);
  color: var(--text-2);
  font: 500 15px/1.2 var(--font-body);
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.chip-check span::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--border-btn);
  border-radius: 5px;
  background: center / 12px no-repeat;
  flex: none;
  transition: background-color .2s, border-color .2s;
}
.chip-check span:hover { border-color: var(--muted); color: var(--text); }
.chip-check input:checked + span { border-color: var(--accent); color: var(--text); }
.chip-check input:checked + span::before {
  border-color: var(--accent);
  background-color: var(--accent-solid);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
.chip-check input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }

.field { margin-bottom: 20px; }
.field-row { display: grid; gap: 0 16px; }
@media (min-width: 641px) { .field-row { grid-template-columns: 1fr 1fr; } }
.req { color: var(--accent); }

.input {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.5 var(--font-body);
  transition: border-color .2s, box-shadow .2s;
}
.input::placeholder { color: var(--subtle); }
.input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }

.select-wrap { position: relative; }
.select { padding-right: 44px; appearance: none; cursor: pointer; }
.select-wrap .icon { position: absolute; top: 50%; right: 14px; color: var(--muted); transform: translateY(-50%); pointer-events: none; }

.field-error { margin-top: 6px; color: var(--danger); font-size: 14px; line-height: 1.5; }

.refine-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 12px; }
.refine-status { color: var(--muted); font-size: 14px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.checkbox { position: relative; display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding-top: 4px; color: var(--text-2); font-size: 15px; line-height: 1.6; cursor: pointer; }
.checkbox input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.checkbox-box {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border: 1.5px solid var(--border-btn);
  border-radius: 6px;
  background: var(--bg);
  color: transparent;
  flex: none;
  transition: background-color .2s, border-color .2s;
}
.checkbox input:checked + .checkbox-box { border-color: var(--accent); background: var(--accent-fill); color: var(--on-accent); }
.checkbox input:focus-visible + .checkbox-box { outline: 2px solid var(--accent); outline-offset: 3px; }
.checkbox input[aria-invalid="true"] + .checkbox-box { border-color: var(--danger); }
.checkbox a { color: var(--accent); }

.form-nav { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; padding-top: 24px; border-top: 1px solid var(--border); }
.form-nav [data-next], .form-nav [data-submit] { margin-left: auto; }
@media (max-width: 640px) { .form-nav .btn { flex: 1 1 0; padding-inline: 16px; } }

.form-status { margin-top: 16px; padding: 14px 16px; border-radius: var(--radius-sm); font-size: 15px; }
.form-status.is-ok { border: 1px solid var(--accent); background: var(--panel-2); color: var(--text); }

.form-status.is-error { border: 1px solid var(--danger); background: var(--panel-2); color: var(--text); }

.btn-text {
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--muted);
  font: 500 14px var(--font-body);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.btn-text:hover { color: var(--text); }
.btn.is-loading .icon { animation: spin 1s linear infinite; }

/* ผลประเมินจาก AI (หน้าแรก) */
.scope-msg { margin-bottom: 12px; color: var(--text-2); font-size: 14px; line-height: 1.6; }
.scope-msg.is-error { color: var(--danger); }
.scope-summary { margin-top: 14px; color: var(--text-2); font-size: 14px; line-height: 1.6; }
.scope-questions { margin-top: 12px; padding: 12px 14px; border: 1px dashed var(--border-2); border-radius: var(--radius-sm); }
.scope-questions p { margin-bottom: 4px; color: var(--muted); font-size: 13px; }
.scope-questions ul { display: grid; gap: 4px; margin: 0; padding-left: 18px; color: var(--text-2); font-size: 14px; line-height: 1.5; }

.notice { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel); color: var(--text-2); }
.notice .icon { color: var(--accent); }

/* ---------------------------------------------------------- /work */

.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-status { margin: 16px 0 28px; color: var(--subtle); font-size: 14px; }
.work-section .work-grid { margin-bottom: 8px; }
@media (min-width: 1025px) { .work-section .work-grid { grid-template-columns: repeat(3, 1fr); } }
.work-section .work-body h3 { font-size: 21px; }

.logo-strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--line); list-style: none; }
.logo-strip li { display: grid; place-items: center; min-height: 112px; padding: 16px; background: var(--bg); color: var(--subtle); font-size: 14px; text-align: center; }
@media (min-width: 641px) { .logo-strip { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1025px) { .logo-strip { grid-template-columns: repeat(6, 1fr); } }

/* ---------------------------------------------------------- case study */

.cs-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin: 48px 0 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--border);
}
.cs-meta > div { padding: 20px 24px; background: var(--panel); }
.cs-meta dt { margin-bottom: 4px; color: var(--subtle); font-family: var(--font-display); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.cs-meta dd { margin: 0; color: var(--text); font-weight: 500; }
@media (min-width: 1025px) {
  .cs-meta { grid-template-columns: repeat(4, 1fr); }
  .cs-meta--3 { grid-template-columns: repeat(3, 1fr); }
  .cs-meta--2 { grid-template-columns: repeat(2, 1fr); }
  .cs-meta--1 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) { .cs-meta > div { padding: 16px; } }

.cs-cover-frame { padding: clamp(16px, 4vw, 48px); border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--panel-2); }
.cs-cover-frame img { width: 100%; border-radius: var(--radius); }

.mock.mock--full { border-bottom: 1px solid var(--border-2); border-radius: 14px; }

.cs-story { display: grid; gap: 48px; }
.cs-h { margin-bottom: 16px; font-size: clamp(26px, 2.6vw, 34px); }
@media (min-width: 1025px) { .cs-story { grid-template-columns: 1fr 1fr; gap: 80px; } }

.devices { display: grid; gap: 32px; align-items: end; }
.device { margin: 0; }
.device-frame { padding: 10px; border: 1px solid var(--border-2); background: var(--panel); }
.device-frame img { width: 100%; height: auto; border-radius: 10px; }
.device--desktop .device-frame { border-radius: 18px; }
.device--tablet .device-frame { padding: 14px; border-radius: 26px; }
.device--tablet .mock { aspect-ratio: 4 / 3; }
.device--phone .device-frame { max-width: 260px; margin-inline: auto; padding: 10px; border-radius: 34px; }
.device--phone .mock { aspect-ratio: 9 / 17; border-radius: 24px; }
.device--phone .mock-chat { justify-content: center; }
.device figcaption { margin-top: 12px; color: var(--subtle); font-size: 14px; text-align: center; }
@media (min-width: 641px) and (max-width: 1024px) {
  .devices { grid-template-columns: 1.5fr 1fr; }
  .device--desktop { grid-column: 1 / -1; }
}
@media (min-width: 1025px) {
  .devices { grid-template-columns: 2.1fr 1.3fr .75fr; }
  .devices--2 { grid-template-columns: 1.6fr 1fr; }
  .devices--1 { grid-template-columns: minmax(0, 900px); justify-content: center; }
}

.results { display: grid; gap: 1px; margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--line); list-style: none; }
.results li { display: flex; flex-direction: column; gap: 8px; padding: 36px 32px; background: var(--bg); }
.result-value { color: var(--accent); font-family: var(--font-display); font-size: clamp(40px, 5vw, 64px); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.result-label { color: var(--text-2); }
@media (min-width: 641px) { .results { grid-template-columns: repeat(3, 1fr); } }

.testimonial { max-width: 920px; margin: 0 auto; text-align: center; }
.testimonial-mark { display: block; height: 72px; color: var(--accent); font-family: var(--font-display); font-size: 120px; font-weight: 700; line-height: 1; }
.testimonial blockquote { margin: 0; }
.testimonial blockquote p { color: var(--text); font-size: clamp(22px, 2.4vw, 32px); font-weight: 500; line-height: 1.6; text-wrap: balance; }
.testimonial figcaption { margin-top: 24px; color: var(--muted); }

.next-project {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--panel);
  color: inherit;
  text-decoration: none;
  transition: border-color .25s;
}
.next-project:hover { border-color: var(--accent); }
.next-title { color: var(--text); font-family: var(--font-display); font-size: clamp(26px, 3vw, 40px); font-weight: 600; line-height: 1.25; }
.next-summary { margin-top: 8px; color: var(--muted); }
.next-arrow { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--accent-fill); color: var(--on-accent); flex: none; transition: transform .25s var(--ease); }
.next-project:hover .next-arrow { transform: translateX(4px); }
@media (max-width: 640px) {
  .next-project { padding: 24px; border-radius: var(--radius-lg); }
  .next-arrow { width: 48px; height: 48px; }
}

/* ---------------------------------------------------------- thanks */

.thanks { padding-block: 96px; }
.thanks-box { max-width: 720px; margin: 0 auto; text-align: center; }
.thanks-box .lead { margin-inline: auto; }
.thanks-box .hero-actions { justify-content: center; }
.thanks-icon { display: inline-grid; place-items: center; width: 72px; height: 72px; margin-bottom: 28px; border-radius: 50%; background: var(--accent-fill); color: var(--on-accent); }

/* ---------------------------------------------------------- แชทบนเว็บ (ปุ่มลอยมุมขวาล่าง) */

.line-chat {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 85;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
html.menu-open .line-chat { display: none; }

.lc-fab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 22px 0 16px;
  border: 0;
  border-radius: var(--pill);
  background: var(--accent-fill);
  color: var(--on-accent);
  font: 600 16px/1 var(--font-body);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
  transition: transform .2s var(--ease), filter .2s;
}
.lc-fab:hover { filter: brightness(1.06); transform: translateY(-2px); }
.lc-fab:focus-visible { outline-color: var(--text); }
.lc-fab-icon { display: grid; place-items: center; }
.lc-fab .icon-x, .lc-fab[aria-expanded="true"] .icon-chat { display: none; }
.lc-fab[aria-expanded="true"] .icon-x { display: block; }
.lc-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border: 2px solid var(--bg);
  border-radius: var(--pill);
  background: var(--danger);
  color: var(--on-accent);
  font: 700 12px/1 var(--font-display);
}

.lc-panel {
  display: flex;
  flex-direction: column;
  width: min(380px, calc(100vw - 40px));
  height: min(600px, calc(100vh - 120px));
  height: min(600px, calc(100dvh - 120px));
  overflow: hidden;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .55);
  transform-origin: bottom right;
  animation: lc-in .22s var(--ease) both;
}
.lc-panel[hidden] { display: none; }
@keyframes lc-in { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }

.lc-head { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--border); background: var(--panel-2); flex: none; }
.lc-avatar { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--border-2); border-radius: 50%; background: var(--bg); flex: none; }
.lc-avatar .logo-mark { width: 18px; height: 18px; border-radius: 5px; }
.lc-name { font-weight: 600; line-height: 1.4; }
.lc-status { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.lc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-btn); flex: none; }
.lc-dot.is-online { background: var(--accent-fill); }
.lc-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.lc-close:hover { background: var(--chip); color: var(--text); }

.lc-log { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px; }
.lc-log .msg { max-width: 86%; gap: 4px; }
.lc-log .msg p { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-time { color: var(--subtle); font-size: 11px; line-height: 1.2; }
.msg--out .msg-time { align-self: flex-end; }

.lc-intro { padding: 0 16px 10px; background: var(--bg); flex: none; }
.lc-topics { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin: 0; padding: 0; list-style: none; }
.lc-topic {
  min-height: 40px;
  padding: 6px 14px;
  border: 1px solid var(--accent);
  border-radius: var(--pill);
  background: transparent;
  color: var(--accent);
  font: 500 14px/1.3 var(--font-body);
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
.lc-topic:hover { background: var(--accent-fill); color: var(--on-accent); }

.lc-compose { display: grid; gap: 8px; padding: 12px; border-top: 1px solid var(--border); background: var(--panel); flex: none; }
.lc-who { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lc-who[hidden] { display: none; }
.lc-who .input { min-height: 40px; padding: 8px 12px; font-size: 14px; }
.lc-input-row { display: flex; align-items: flex-end; gap: 8px; }
.lc-textarea { min-height: 44px; max-height: 140px; padding: 10px 14px; overflow-y: hidden; resize: none; border-radius: 22px; line-height: 1.5; }
.lc-send {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--accent-fill);
  color: var(--on-accent);
  cursor: pointer;
  flex: none;
}
.lc-send:disabled { opacity: .5; cursor: progress; }
.lc-send:focus-visible { outline-color: var(--text); }
.lc-error { color: var(--danger); font-size: 13px; line-height: 1.5; }
.lc-consent { color: var(--subtle); font-size: 12px; line-height: 1.5; }
.lc-consent a { color: var(--muted); }
.lc-consent a:hover { color: var(--accent); }

/* มือถือ: หน้าต่างแชทเต็มความกว้างแบบ bottom sheet · ปุ่มลอยอยู่เหนือแถบปุ่มล่างจอ */
@media (max-width: 640px) {
  .line-chat { right: max(16px, env(safe-area-inset-right)); bottom: calc(var(--bar-h) + 12px + env(safe-area-inset-bottom)); }
  .lc-fab { width: 56px; padding: 0; justify-content: center; }
  .lc-fab-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .lc-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 88vh;
    height: 88dvh;
    padding-bottom: env(safe-area-inset-bottom);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    transform-origin: bottom center;
  }
  .line-chat:has(.lc-panel:not([hidden])) .lc-fab { display: none; }
  .lc-textarea { font-size: 16px; } /* กัน iOS ซูมตอนแตะช่องพิมพ์ */
}

@media print { .line-chat { display: none; } }

/* ---------------------------------------------------------- prose (privacy) */

.prose { max-width: 760px; }
.prose h2 { margin: 40px 0 12px; font-size: 24px; }
.prose h2:first-of-type { margin-top: 32px; }
.prose p { color: var(--text-2); }

/* ---------------------------------------------------------- บทความ /blog */

.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 20px; }
.post-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--panel); color: inherit; text-decoration: none; transition: border-color .2s, transform .3s var(--ease); }
.post-card:hover { border-color: var(--border-2); transform: translateY(-3px); }
.post-card-media { aspect-ratio: 16 / 9; background: var(--panel-2); overflow: hidden; }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.post-card-ph { display: grid; place-items: center; height: 100%; color: var(--accent); }
.post-card-body { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 22px 24px 24px; }
.post-card-body h3 { font-size: 20px; line-height: 1.4; }
.post-card-body p { color: var(--muted); font-size: 15px; }
.post-card-body .svc-more { margin-top: auto; padding-top: 8px; }
.post-meta { color: var(--subtle); font-size: 14px; }
.post-hero .post-meta { margin-top: 18px; }
.post-cover img { width: 100%; height: auto; max-height: 560px; object-fit: cover; object-position: top center; border: 1px solid var(--border); border-radius: var(--radius-xl); }
.post-layout { display: grid; gap: 40px; }
@media (min-width: 1025px) { .post-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 64px; align-items: start; } .post-aside { position: sticky; top: calc(var(--header-h) + 24px); } }
.post-body { font-size: 17px; line-height: 1.85; }
.post-body h2:first-child { margin-top: 0; }
.post-body h3 { margin: 28px 0 8px; font-size: 20px; }
.post-body p, .post-body ul, .post-body ol { margin: 0 0 18px; }
.post-body ul, .post-body ol { padding-left: 22px; color: var(--text-2); }
.post-body li { margin-bottom: 6px; }
.post-body li::marker { color: var(--accent); }
.post-body strong { color: var(--text); }
.post-body a { color: var(--accent); }
.post-body blockquote { margin: 0 0 18px; padding: 14px 18px; border-left: 3px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--panel); color: var(--text); }
.post-figure { margin: 8px 0 24px; }
.post-figure img { width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.post-figure figcaption { margin-top: 8px; color: var(--subtle); font-size: 14px; text-align: center; }
.post-aside { display: grid; gap: 16px; }
.post-related, .post-ask { display: grid; gap: 10px; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); color: inherit; text-decoration: none; }
.post-related .eyebrow { margin: 0; }
.post-related img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: var(--radius-sm); }
.post-related:hover { border-color: var(--border-2); }
.post-ask p { color: var(--muted); font-size: 15px; }
.post-ask .btn { justify-self: start; }

/* ---------------------------------------------------------- motion */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: .08s; }
.js .reveal.d2 { transition-delay: .16s; }
.js .reveal.d3 { transition-delay: .24s; }

@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 50% { opacity: .45; } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------- แถบแจ้งคุกกี้ */
.link-button { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; cursor: pointer; }
.link-button:hover, .link-button:focus-visible { color: var(--accent); }

.cookie-banner { position: fixed; z-index: 95; right: 16px; bottom: 16px; left: 16px; max-width: 760px; margin-inline: auto; padding: 20px 24px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--panel); box-shadow: 0 16px 48px rgb(0 0 0 / 0.35); }
.cookie-banner[hidden] { display: none; }
.cookie-inner { display: grid; gap: 16px; }
.cookie-title { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; color: var(--text); font-size: 17px; }
.cookie-title .icon { color: var(--accent); }
.cookie-body p { margin: 0; color: var(--text-2); font-size: 15px; line-height: 1.6; }
.cookie-body a { color: var(--accent); }
.cookie-options { display: grid; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.cookie-options[hidden] { display: none; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cookie-actions .btn { min-height: 44px; }
.cookie-actions [hidden] { display: none; }
@media (max-width: 640px) {
  .cookie-banner { right: 8px; bottom: calc(var(--bar-h) + 8px + env(safe-area-inset-bottom)); left: 8px; padding: 16px; max-height: calc(100vh - 120px); overflow-y: auto; }
  .cookie-actions .btn { flex: 1 1 auto; }
}
