/* =========================================================
   SIGN VERSE — Landing Page
   Mobile-first · breakpoints: 640px, 960px
   ========================================================= */

:root {
  /* สี */
  --blue-50: #EAF2FF;
  --blue-100: #D6E6FF;
  --blue-400: #5B9BFF;
  --blue-600: #1E6FFF;
  --blue-700: #155AD6;
  --blue-900: #0B3D91;
  --blue-950: #072A66;
  --cyan-400: #22D3EE;
  --amber-400: #FBBF24;
  --amber-50: #FFF8E6;
  --amber-900: #7A5A00;
  --red-500: #EF4444;
  --red-50: #FEF2F2;
  --line: #06C755;
  --line-dark: #05A847;
  --fb: #1877F2;
  --fb-dark: #0F63D6;
  --ink: #0F172A;
  --ink-soft: #475569;
  --border: #E2E8F0;
  --white: #FFFFFF;
  --bg: #FFFFFF;

  /* ฟอนต์ */
  --font-head: "Prompt", "Sarabun", system-ui, sans-serif;
  --font-body: "Sarabun", system-ui, -apple-system, sans-serif;

  /* ระยะ / รูปทรง */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --section-y: 64px;
  --gutter: 20px;
  --container: 1200px;
  --header-h: 68px;

  --shadow-sm: 0 2px 8px rgba(15, 23, 42, .06);
  --shadow: 0 10px 30px rgba(15, 23, 42, .08);
  --shadow-lg: 0 20px 50px rgba(11, 61, 145, .18);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 76px; /* พื้นที่ให้ mobile-bar */
}
h1, h2, h3 { font-family: var(--font-head); line-height: 1.3; margin: 0 0 .5em; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--blue-400); outline-offset: 3px; border-radius: 4px; }

.icon { width: 1.25em; height: 1.25em; flex-shrink: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: 820px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  min-height: 52px;
  padding: 0 24px;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--sm { min-height: 42px; padding: 0 18px; font-size: .95rem; }
.btn--lg { min-height: 56px; padding: 0 28px; font-size: 1.05rem; }
.btn--xl { min-height: 62px; padding: 0 34px; font-size: 1.15rem; }

.btn--line { background: var(--line); color: var(--white); box-shadow: 0 8px 20px rgba(6, 199, 85, .3); }
.btn--line:hover { background: var(--line-dark); box-shadow: 0 12px 26px rgba(6, 199, 85, .38); }
.btn--outline { border-color: var(--blue-600); color: var(--blue-600); background: var(--white); }
.btn--outline:hover { background: var(--blue-50); }
.btn--white { background: var(--white); color: var(--blue-900); }
.btn--white:hover { box-shadow: 0 12px 26px rgba(0, 0, 0, .2); }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  transition: box-shadow .3s;
}
.header.is-scrolled { box-shadow: var(--shadow-sm); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }

.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); }
.logo__mark { width: auto; height: 46px; }
.logo__text { font-size: 1.2rem; font-weight: 500; letter-spacing: 1px; color: var(--ink); }
.logo__text strong { color: var(--blue-600); font-weight: 700; }
.logo--light .logo__text { color: var(--white); }
.logo--light .logo__text strong { color: var(--blue-400); }

/* เมนูมือถือ */
.nav {
  position: fixed;
  inset: var(--header-h) 0 auto 0;
  background: var(--white);
  padding: 16px var(--gutter) 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: translateY(-12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, transform .25s var(--ease), visibility .25s;
}
.nav.is-open { opacity: 1; visibility: visible; transform: none; }
.nav__list { display: flex; flex-direction: column; }
.nav__link {
  display: block;
  padding: 12px 4px;
  font-family: var(--font-head);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  transition: color .2s;
}
.nav__link:hover { color: var(--blue-600); }
.nav__cta { align-self: stretch; }

.nav-toggle {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px;
  padding: 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--blue-50);
}
.nav-toggle span { display: block; height: 2px; background: var(--blue-900); border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 40px 0 64px;
  background:
    radial-gradient(60% 50% at 90% 10%, var(--blue-100) 0%, transparent 70%),
    radial-gradient(40% 40% at 0% 100%, var(--blue-50) 0%, transparent 70%),
    var(--white);
}
.hero__inner { display: grid; gap: 48px; align-items: center; }
.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--blue-50);
  color: var(--blue-700);
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: 16px;
}
.hero__title { font-size: clamp(1.9rem, 6vw, 3.2rem); font-weight: 700; margin-bottom: 16px; }
.text-gradient {
  background: linear-gradient(90deg, var(--blue-600), var(--cyan-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}
.hero__lead { font-size: 1.1rem; color: var(--ink-soft); max-width: 560px; margin-bottom: 28px; }
.hero__actions { display: flex; flex-direction: column; gap: 12px; margin-bottom: 36px; }
.hero__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.hero__stats li { display: flex; flex-direction: column; }
.hero__stats strong { font-family: var(--font-head); font-size: 1.4rem; color: var(--blue-900); line-height: 1.2; }
.hero__stats span { font-size: .85rem; color: var(--ink-soft); }

/* ภาพจำลองป้ายใน Hero */
/* การ์ด AI ออกแบบป้าย (Premium 3D Sign Studio) */
.hero__visual { min-width: 0; }
.ai-card {
  --navy: #071D43;
  --royal: #123D88;
  --electric: #1677FF;
  --cyan: #35D7F5;
  position: relative;
  padding: 20px;
  border-radius: 24px;
  background:
    radial-gradient(120% 60% at 100% 0%, rgba(22, 119, 255, .35), transparent 60%),
    linear-gradient(160deg, var(--royal), var(--navy) 55%);
  color: var(--white);
  box-shadow: 0 24px 60px rgba(7, 29, 67, .35);
  transition: box-shadow .4s var(--ease), transform .4s var(--ease);
}
.ai-card:hover { box-shadow: 0 30px 70px rgba(7, 29, 67, .45), 0 0 0 1px rgba(53, 215, 245, .25); }

.ai-card__head { display: grid; text-align: center; }
.ai-card__head .ai-card__badge { justify-self: start; }
.ai-card__deco {
  position: absolute;
  top: 18px; right: 20px;
  width: 26px; height: 26px;
  color: var(--cyan);
  filter: drop-shadow(0 0 8px rgba(53, 215, 245, .6));
}
.ai-card__badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px;
  border: 1px solid rgba(53, 215, 245, .7);
  border-radius: var(--radius-pill);
  background: rgba(22, 119, 255, .18);
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: 1.5px;
  box-shadow: 0 0 14px rgba(53, 215, 245, .25);
}
.ai-card__badge .icon { width: 1em; height: 1em; color: var(--cyan); }
.ai-card__title {
  margin: 12px 0 2px;
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 700;
  color: var(--white);
}
.ai-card__ai {
  background: linear-gradient(90deg, var(--cyan), var(--electric));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ai-card__lead { margin: 0 0 16px; color: #C9D8F2; font-size: .98rem; }

/* ฉากสตูดิโอ — ไฟหลักจากด้านบน + แสงขอบน้ำเงินบาง ๆ แบบถ่ายภาพสินค้า */
.ai-card__stage {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9.5;
  max-height: 290px;
  width: 100%;
  container-type: inline-size; /* ขนาดป้ายอิงความกว้างกรอบ ไม่ล้นทุกหน้าจอ */
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(55% 45% at 50% 0%, rgba(255, 255, 255, .16), transparent 70%),
    radial-gradient(70% 60% at 50% 45%, rgba(22, 119, 255, .28), transparent 72%),
    linear-gradient(180deg, #0C2C63 0%, var(--navy) 60%, #030F26 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), inset 0 -40px 60px rgba(0, 0, 0, .4);
}
.ai-card__stage::before { /* เงาสัมผัสพื้นใต้ป้าย */
  content: "";
  position: absolute;
  left: 18%; right: 18%;
  top: 63%;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .55), transparent);
  filter: blur(4px);
}
.ai-card__stage::after { /* พื้นสะท้อนแสง */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 36%;
  background: linear-gradient(180deg, rgba(160, 200, 255, .07), rgba(255, 255, 255, 0) 75%);
  border-top: 1px solid rgba(160, 200, 255, .14);
}

.sign3d {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: clamp(8px, 2.5vw, 16px);
  gap: min(3cqi, 18px);
  margin-top: -7%;
  -webkit-box-reflect: below 3px linear-gradient(transparent 66%, rgba(255, 255, 255, .16));
}
.sign3d::before { /* แสงฟุ้งด้านหลังป้าย (นุ่ม ไม่ใช่นีออน) */
  content: "";
  position: absolute;
  inset: -35% -10%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(110, 170, 255, .26), transparent);
  filter: blur(8px);
  animation: sign-glow 1.6s var(--ease) .2s both;
}
.sign3d__logo { position: relative; display: block; flex-shrink: 0; width: clamp(64px, 18vw, 108px); width: min(27cqi, 132px); }
.sign3d__logo img { width: 100%; height: auto; filter: drop-shadow(4px 12px 12px rgba(0, 0, 0, .5)); }
.sign3d__logo::after { /* แสงสะท้อนวิ่งผ่านโลโก้ (ใช้รูปโลโก้เป็น mask) */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .5) 50%, transparent 65%) no-repeat;
  background-size: 250% 100%;
  background-position: 130% 0;
  -webkit-mask: url("../assets/images/logo-3d.png") center / contain no-repeat;
  mask: url("../assets/images/logo-3d.png") center / contain no-repeat;
  animation: logo-sheen 1.4s var(--ease) 1s both;
  pointer-events: none;
}
.ai-card:hover .sign3d__logo::after { animation: logo-sheen 1.2s var(--ease) both; }

.sign3d__text {
  display: flex;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.45rem, 6.4vw, 2.7rem);
  font-size: min(10.3cqi, 3.1rem);
  line-height: 1;
  letter-spacing: .02em;
}
.sign3d__word {
  position: relative;
  color: #F4F7FD;
  /* ความหนาตัวอักษร 8 ชั้น (ด้านข้างโลหะเงินไล่เข้มลงล่างขวา) + เงาตกกระทบบนผนัง */
  text-shadow:
    1px 1px 0 #D5DEEE,
    2px 2px 0 #B8C6DF,
    3px 3px 0 #9AAFD1,
    4px 4px 0 #7C96C2,
    5px 5px 0 #5F7DB2,
    6px 6px 0 #4565A0,
    7px 7px 0 #2F4F8C,
    8px 8px 0 #1F3D78,
    10px 14px 10px rgba(0, 0, 0, .45),
    14px 22px 26px rgba(0, 0, 0, .35);
}
.sign3d__word::after { /* ผิวหน้าโลหะเงา: ไฮไลต์ด้านบน + แถบสะท้อนกลาง */
  content: attr(data-text);
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #FFFFFF 0%, #F3F6FB 30%, #C3CEE0 48%, #E6ECF6 56%, #FFFFFF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
}
.sign3d__word--blue {
  color: var(--electric);
  text-shadow:
    1px 1px 0 #1466E0,
    2px 2px 0 #115AC8,
    3px 3px 0 #0F4FB0,
    4px 4px 0 #0D4498,
    5px 5px 0 #0B3A82,
    6px 6px 0 #09316E,
    7px 7px 0 #08285B,
    8px 8px 0 var(--navy),
    10px 14px 10px rgba(0, 0, 0, .45),
    14px 22px 26px rgba(0, 0, 0, .35);
}
.sign3d__word--blue::after { background: linear-gradient(180deg, #A9D6FF 0%, #4E9DFF 34%, #1677FF 52%, #2C86FF 62%, #6CB4FF 100%); -webkit-background-clip: text; background-clip: text; }

@keyframes sign-glow {
  from { opacity: 0; transform: scale(.85); }
  to { opacity: 1; transform: none; }
}
@keyframes logo-sheen {
  from { background-position: 130% 0; }
  to { background-position: -30% 0; }
}

/* ส่วนข้อมูลใต้ภาพ */
.ai-card__info {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  padding: 16px;
  border-radius: 18px;
  background: #F3F8FF;
  color: var(--ink);
}
.ai-card__free-title {
  display: flex; align-items: center; gap: 6px;
  margin: 0;
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--navy);
}
.ai-card__free-title .icon { color: var(--electric); }
.ai-card__free-text { margin: 2px 0 0; font-size: .9rem; color: var(--ink-soft); }
.ai-card__features { display: grid; gap: 8px; }
.ai-card__features li {
  display: flex; align-items: center; gap: 10px;
  font-size: .92rem;
  color: var(--ink-soft);
}
.ai-card__ftext { display: flex; flex-direction: column; line-height: 1.35; }
.ai-card__ftext strong { color: var(--navy); font-family: var(--font-head); font-weight: 600; }
.ai-card__ftext small { font-size: .82rem; color: var(--ink-soft); }
.ai-card__ficon {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--white);
  color: var(--electric);
  box-shadow: 0 2px 6px rgba(18, 61, 136, .12);
}
.ai-card__soon {
  margin-left: auto;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  background: rgba(22, 119, 255, .1);
  color: var(--royal);
  font-size: .72rem;
  white-space: nowrap;
}

/* ปุ่มหลัก */
.ai-card__cta {
  position: relative;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 58px;
  margin-top: 14px;
  padding: 0 24px;
  overflow: hidden;
  border: 1px solid rgba(53, 215, 245, .65);
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--navy) 0%, var(--royal) 55%, var(--electric) 100%);
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.08rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .22),
    0 0 0 4px rgba(53, 215, 245, .1),
    0 12px 28px rgba(22, 119, 255, .4);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.ai-card__cta::before { /* แสงวาวผิวปุ่ม วิ่งผ่านเมื่อ hover */
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: -60%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .22), transparent);
  transform: skewX(-20deg);
  transition: left .6s var(--ease);
}
.ai-card__cta > * { position: relative; }
.ai-card__cta:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .28),
    0 0 0 5px rgba(53, 215, 245, .2),
    0 16px 34px rgba(22, 119, 255, .52);
}
.ai-card__cta:hover::before { left: 120%; }
.ai-card__cta:active { transform: translateY(0); }
.ai-card__spark { color: var(--cyan); }
.ai-card__arrow { transition: transform .25s var(--ease); }
.ai-card__cta:hover .ai-card__arrow { transform: translateX(4px); }

@media (min-width: 640px) {
  .ai-card { padding: 24px; }
  .ai-card__info { grid-template-columns: 1fr 1.15fr; align-items: center; }
  .ai-card__features { padding-left: 14px; border-left: 1px solid #D6E4F7; }
}

/* ---------- Sections ---------- */
.section { padding: var(--section-y) 0; }
.section--tint { background: var(--blue-50); }
.section__head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.section__head--spaced { margin-top: calc(var(--section-y) * 1.1); }
.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .9rem;
  color: var(--blue-600);
  letter-spacing: .5px;
  margin-bottom: 8px;
}
.section__title { font-size: clamp(1.6rem, 4.5vw, 2.4rem); }
.section__lead { color: var(--ink-soft); margin: 0; }

.grid { display: grid; gap: 20px; }

/* ปัญหา */
.problem {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
}
.problem__icon {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--red-50);
  color: var(--red-500);
  margin-bottom: 16px;
}
.problem h3 { font-size: 1.15rem; }
.problem p { color: var(--ink-soft); margin: 0; }
.problems__answer {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin: 36px auto 0;
  padding: 16px 24px;
  max-width: 640px;
  border-radius: var(--radius-pill);
  background: var(--blue-50);
  color: var(--blue-900);
  font-family: var(--font-head);
  font-size: 1.05rem;
  text-align: center;
}
.problems__answer .icon { color: var(--line); width: 1.5em; height: 1.5em; }

/* จุดเด่น */
.feature {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature__num {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--blue-600);
  margin-bottom: 8px;
}
.feature h3 { font-size: 1.2rem; }
.feature p { color: var(--ink-soft); margin: 0; }

/* บริการ */
.service {
  display: flex; flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.service:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--blue-100); }
.service__art { aspect-ratio: 16 / 7; position: relative; }
.service__art::after {
  content: "";
  position: absolute; inset: 22% 30%;
  border-radius: 8px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .15);
}
.service__art--1 { background: linear-gradient(135deg, var(--blue-900), var(--blue-600)); }
.service__art--2 { background: linear-gradient(135deg, var(--ink), var(--blue-700)); }
.service__art--2::after { inset: 32% 18%; border-radius: 4px; background: linear-gradient(90deg, var(--border), var(--white), var(--border)); }
.service__art--3 { background: linear-gradient(135deg, var(--blue-600), var(--cyan-400)); }
.service__art--3::after { inset: 14% 40%; }
.service__art--4 { background: linear-gradient(135deg, var(--blue-400), var(--blue-100)); }
.service__art--4::after { inset: 24% 38%; border-radius: 50%; }
.service__art--5 { background: linear-gradient(135deg, var(--blue-100), var(--blue-50)); }
.service__art--5::after { inset: 28% 26%; transform: rotate(-6deg); }
.service__art--6 { background: linear-gradient(135deg, var(--blue-700), var(--blue-400)); }
.service__art--6::after { inset: 20% 34%; border-radius: 4px; }
.service__body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.service h3 { font-size: 1.2rem; }
.service p { color: var(--ink-soft); }
.service__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.service__tags li {
  padding: 2px 12px;
  border-radius: var(--radius-pill);
  background: var(--blue-50);
  color: var(--blue-700);
  font-size: .85rem;
}
.service__link {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--blue-600);
}
.service__link .icon { transition: transform .2s; }
.service__link:hover .icon { transform: translateX(4px); }

/* ขั้นตอน */
.steps { display: grid; gap: 16px; counter-reset: step; }
.step {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px 24px 24px 84px;
  box-shadow: var(--shadow-sm);
}
.step__num {
  position: absolute; left: 24px; top: 24px;
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--blue-600);
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 0 0 6px var(--blue-100);
}
.step h3 { font-size: 1.1rem; margin-bottom: 4px; }
.step p { color: var(--ink-soft); margin: 0; font-size: .97rem; }

/* ผลงาน */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 28px; }
.filter {
  min-height: 42px;
  padding: 0 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--ink-soft);
  font-family: var(--font-head);
  font-weight: 500;
  transition: all .2s;
}
.filter:hover { border-color: var(--blue-400); color: var(--blue-600); }
.filter.is-active { background: var(--blue-600); border-color: var(--blue-600); color: var(--white); }

.works { display: grid; gap: 20px; grid-template-columns: 1fr; }
.work { margin: 0; }
.work.is-hidden { display: none; }
.work__thumb {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  display: grid; place-items: center;
  overflow: hidden;
  transition: transform .4s var(--ease);
}
.work:hover .work__thumb { transform: scale(1.02); }
.work__thumb span {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: 3px;
  padding: 10px 22px;
  border-radius: 10px;
}
.work__thumb--a { background: linear-gradient(145deg, var(--blue-950), var(--blue-900)); }
.work__thumb--a span { color: var(--white); text-shadow: 0 0 16px var(--blue-400); border: 2px solid var(--blue-400); }
.work__thumb--b { background: linear-gradient(145deg, var(--blue-50), var(--blue-100)); }
.work__thumb--b span { background: var(--white); color: var(--blue-900); box-shadow: var(--shadow); font-size: 1.2rem; }
.work__thumb--c { background: linear-gradient(145deg, var(--amber-400), var(--blue-400)); }
.work__thumb--c span { background: var(--white); color: var(--ink); box-shadow: var(--shadow); }
.work__thumb--d { background: linear-gradient(145deg, var(--ink-soft), var(--ink)); }
.work__thumb--d span { color: var(--border); letter-spacing: 8px; text-shadow: 0 2px 0 rgba(0, 0, 0, .4); }
.work__thumb--e { background: linear-gradient(145deg, var(--blue-600), var(--blue-900)); }
.work__thumb--e span { background: var(--white); color: var(--blue-900); }
.work__thumb--f { background: linear-gradient(145deg, var(--cyan-400), var(--blue-600)); }
.work__thumb--f span { border: 2px dashed var(--white); color: var(--white); }
/* รูปผลงานจริงจากหลังบ้าน */
.work__thumb--photo { width: 100%; padding: 0; border: 0; background: var(--blue-50); cursor: zoom-in; }
.work__thumb--photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.work__thumb--photo:focus-visible { outline: 3px solid var(--blue-400); outline-offset: 3px; }
.works__more { display: flex; justify-content: center; margin-top: 24px; }
.works__more:has(> [hidden]) { display: none; }
.work figcaption { display: flex; flex-direction: column; padding: 14px 4px 0; }
.work figcaption strong { font-family: var(--font-head); font-weight: 600; }
.work figcaption span { color: var(--ink-soft); font-size: .9rem; }

/* รีวิว */
.review {
  margin: 0;
  display: flex; flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
}
.review__stars { display: flex; gap: 2px; color: var(--amber-400); margin-bottom: 12px; }
.review p { color: var(--ink); flex: 1; }
.review__author { display: flex; align-items: center; gap: 12px; }
.review__author strong { display: block; font-family: var(--font-head); font-weight: 600; }
.review__author small { color: var(--ink-soft); font-size: .9rem; }
.avatar {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--blue-100);
  color: var(--blue-900);
  font-family: var(--font-head);
  font-weight: 600;
}

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq__item { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.faq__q {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px;
  border: 0;
  background: none;
  text-align: left;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--ink);
}
.faq__q .icon { color: var(--blue-600); transition: transform .25s var(--ease); }
.faq__q[aria-expanded="true"] .icon { transform: rotate(45deg); }
.faq__a { padding: 0 24px 20px; }
.faq__a p { margin: 0; color: var(--ink-soft); }

/* ---------- CTA ---------- */
.cta {
  position: relative;
  overflow: hidden;
  padding: 72px 0;
  background:
    radial-gradient(50% 80% at 100% 0%, rgba(91, 155, 255, .4), transparent 70%),
    linear-gradient(135deg, var(--blue-900), var(--blue-950));
  color: var(--white);
  text-align: center;
}
.cta__title { font-size: clamp(1.7rem, 5vw, 2.6rem); font-weight: 700; }
.cta__lead { color: var(--blue-100); font-size: 1.1rem; max-width: 600px; margin: 0 auto 32px; }
.cta__actions { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.cta__actions .btn { width: 100%; max-width: 360px; }
.cta__note { margin: 20px 0 0; color: var(--blue-100); font-size: .95rem; }

/* ---------- Footer ---------- */
.footer { background: var(--blue-950); color: var(--blue-100); padding-top: 56px; }
.footer__grid { display: grid; gap: 36px; padding-bottom: 40px; }
.footer__brand p { margin-top: 16px; max-width: 340px; font-size: .95rem; }
.footer__title { color: var(--white); font-size: 1.05rem; margin-bottom: 14px; }
.footer__list { display: flex; flex-direction: column; gap: 8px; font-size: .95rem; }
.footer__list a:hover { color: var(--white); }
.footer__contact li { display: flex; align-items: center; gap: 8px; }
.footer__contact .icon { color: var(--blue-400); }
.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding-block: 20px;
  font-size: .9rem;
  text-align: center;
}
.footer__bottom p { margin: 0; }

/* ---------- Floating / Mobile bar ---------- */
.float-line {
  position: fixed;
  right: 24px; bottom: 24px;
  z-index: 40;
  display: none;
  place-items: center;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--line);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(6, 199, 85, .45);
  transition: transform .2s var(--ease);
}
.float-line:hover { transform: scale(1.08); }
.float-line .icon { width: 32px; height: 32px; }

.mobile-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 10px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 -4px 20px rgba(15, 23, 42, .08);
}
.mobile-bar .btn { min-height: 50px; padding: 0 12px; }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

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

/* =========================================================
   ≥ 640px
   ========================================================= */
@media (min-width: 640px) {
  :root { --gutter: 32px; }
  .hero__actions { flex-direction: row; flex-wrap: wrap; }
  .hero__stats strong { font-size: 1.7rem; }
  .hero__stats span { font-size: .95rem; }
  .grid--3, .grid--4, .works { grid-template-columns: repeat(2, 1fr); }
  .cta__actions { flex-direction: row; justify-content: center; }
  .cta__actions .btn { width: auto; max-width: none; }
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================
   ≥ 960px
   ========================================================= */
@media (min-width: 960px) {
  :root { --section-y: 96px; --header-h: 76px; }
  body { padding-bottom: 0; }

  .nav-toggle { display: none; }
  .nav {
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 28px;
    padding: 0;
    background: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .nav__list { flex-direction: row; gap: 4px; }
  .nav__link { border: 0; padding: 8px 12px; border-radius: var(--radius-sm); }
  .nav__link:hover { background: var(--blue-50); }
  .nav__cta { align-self: auto; }

  .hero { padding: 72px 0 104px; }
  .hero__inner { grid-template-columns: 1.1fr 1fr; gap: 56px; }

  .grid--3, .works { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
  .grid { gap: 24px; }

  .steps { grid-template-columns: repeat(5, 1fr); gap: 20px; position: relative; }
  .steps::before {
    content: "";
    position: absolute;
    top: 46px; left: 10%; right: 10%;
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--blue-400) 0 8px, transparent 8px 16px);
  }
  .step { padding: 24px 20px; text-align: center; background: var(--white); }
  .step__num { position: relative; left: auto; top: auto; margin: 0 auto 16px; }

  .cta { padding: 104px 0; }
  .footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; }

  .float-line { display: grid; }
  .mobile-bar { display: none; }
}

/* =========================================================
   AI บรีฟงานป้าย (#ai-brief)
   ========================================================= */
.btn--primary { background: var(--blue-600); color: var(--white); box-shadow: 0 8px 20px rgba(30, 111, 255, .3); }
.btn--primary:hover { background: var(--blue-700); }
.btn:disabled { opacity: .65; cursor: progress; transform: none; }

.brief { display: grid; gap: 24px; }
.brief [hidden] { display: none !important; }
.brief__form,
.brief__result {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow);
}
.brief__grid { display: grid; gap: 18px; margin-bottom: 20px; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field label,
.field legend {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: .95rem;
  padding: 0;
  margin-bottom: 6px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; line-height: 1.6; }
.field input::placeholder,
.field textarea::placeholder { color: var(--ink-soft); opacity: .7; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue-600);
  box-shadow: 0 0 0 4px var(--blue-100);
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: .95rem;
  transition: all .2s;
}
.chip:hover span { border-color: var(--blue-400); }
.chip input:checked + span { background: var(--blue-600); border-color: var(--blue-600); color: var(--white); }
.chip input:focus-visible + span { outline: 3px solid var(--blue-400); outline-offset: 2px; }

.brief__error {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--red-50);
  color: var(--red-500);
  font-size: .95rem;
}
.brief__submit { width: 100%; }

.brief__result { display: flex; flex-direction: column; }
.brief__empty {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px;
  min-height: 240px;
  padding: 24px;
  border: 2px dashed var(--blue-100);
  border-radius: var(--radius-sm);
  background: var(--blue-50);
  color: var(--ink-soft);
  text-align: center;
}
.brief__empty p { margin: 0; }
.brief__empty-icon {
  display: grid; place-items: center;
  width: 56px; height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--blue-600), var(--cyan-400));
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 700;
}
.brief__output h3 {
  font-size: 1.05rem;
  color: var(--blue-900);
  margin: 20px 0 8px;
}
.brief__output h3:first-child { margin-top: 0; }
.brief__output p { color: var(--ink); }
.brief__list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.brief__list li { position: relative; padding-left: 26px; color: var(--ink); }
.brief__list li::before {
  content: "";
  position: absolute; left: 4px; top: .6em;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--blue-600);
}
.brief__list--missing li::before { background: var(--amber-400); }
.brief__send { width: 100%; margin-top: 24px; }
.brief__note { margin: 12px 0 0; font-size: .88rem; color: var(--ink-soft); text-align: center; }

@media (min-width: 640px) {
  .brief__form, .brief__result { padding: 32px; }
  .brief__grid { grid-template-columns: repeat(2, 1fr); }
  .field--full { grid-column: 1 / -1; }
}

@media (min-width: 960px) {
  .brief { grid-template-columns: 1.25fr 1fr; align-items: start; gap: 28px; }
  .brief__result { position: sticky; top: calc(var(--header-h) + 20px); min-height: 420px; }
}

/* ---------- ประเมินราคา (#ai-brief) ---------- */
.brief__group {
  margin: 8px 0 -4px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--blue-900);
}
.brief__grid > .brief__group:first-of-type { border-top: 0; padding-top: 0; }

/* ราคาประเมินทันที (ในฟอร์ม) */
.liveprice { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--blue-50); border: 1px solid var(--blue-100); }
.liveprice__label { font-family: var(--font-head); font-weight: 600; color: var(--blue-900); font-size: .95rem; }
.liveprice__value { font-family: var(--font-head); font-size: 1.15rem; color: var(--ink-soft); font-weight: 600; }
.liveprice[data-state="estimated"] .liveprice__value { font-size: 1.6rem; color: var(--blue-700); }
.liveprice[data-state="loading"] .liveprice__value { opacity: .6; }
.liveprice__note { flex-basis: 100%; color: var(--ink-soft); font-size: .85rem; }
.liveprice__note:empty { display: none; }

.quote {
  padding: 24px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--blue-900), var(--blue-950));
  color: var(--white);
}
.brief__output .quote p { color: inherit; }
.brief__output .quote .quote__label { margin: 0 0 4px; color: var(--blue-100); font-family: var(--font-head); font-weight: 500; }
.quote__price {
  margin: 0 0 16px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(2rem, 7vw, 2.6rem);
  line-height: 1.2;
}
.quote__review {
  margin: 4px 0 16px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .1);
  font-size: .98rem;
}
.quote__spec {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .15);
  font-size: .95rem;
}
.quote__spec dt { color: var(--blue-100); }
.quote__spec dd { margin: 0; text-align: right; }
.quote__note { margin: 10px 0 0; font-size: .85rem; color: var(--ink-soft); text-align: center; }

.promo {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.promo__title { margin: 0 0 4px; font-family: var(--font-head); font-weight: 600; color: var(--ink); }
.promo__text { margin: 0; font-size: .95rem; color: var(--ink-soft); }
.promo--quality { background: var(--blue-50); border-color: var(--blue-100); }
.promo--offer { background: var(--white); border: 2px dashed var(--line); }

.brief__ai { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.brief__ai h3:first-child { margin-top: 0; }

/* =========================================================
   บัญชีลูกค้า / Login Modal / AI ออกแบบภาพป้าย
   ========================================================= */
.nav__login {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--blue-900);
  font-family: var(--font-head);
  font-weight: 500;
  font-size: .92rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav__login:hover { border-color: var(--blue-400); }
@media (min-width: 960px) { .nav__login { max-width: 140px; } }
/* ชื่อสมาชิก (ชื่อ LINE หรือเบอร์ที่ปิดบัง) */
.nav__user { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-soft); font-size: .9rem; }
/* เดสก์ท็อป: ซ่อนในแถบเมนู (กันเมนูตกบรรทัด) — ชื่อแสดงที่ปุ่มออกจากระบบ (title) และในส่วนออกแบบ AI */
@media (min-width: 960px) { .nav__user { display: none; } }

.has-modal { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(7, 29, 67, .55); backdrop-filter: blur(4px); }
.modal__box {
  position: relative;
  width: min(440px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 32px 24px 24px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 30px 80px rgba(7, 29, 67, .35);
  text-align: center;
}
.modal__box--zoom { width: min(1100px, 100%); padding: 44px 12px 12px; background: #0B1730; }
.modal__box--zoom img { width: 100%; height: auto; border-radius: 12px; }
.modal__cap { margin: 8px 0 0; color: #C9D8F2; font-size: .9rem; }
.modal__close {
  position: absolute; top: 10px; right: 12px;
  width: 36px; height: 36px;
  border: 0; border-radius: 50%;
  background: var(--blue-50); color: var(--blue-900);
  font-size: 1.4rem; line-height: 1;
}
.modal__logo { width: 64px; height: auto; margin: 0 auto 8px; }
.modal__title { font-size: 1.35rem; margin: 0 0 8px; color: var(--ink); }
.modal__text { color: var(--ink-soft); margin: 0 0 20px; }
.modal__providers { display: grid; gap: 10px; }
.provider {
  min-height: 50px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--white);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.provider:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.provider--line { background: var(--line); border-color: var(--line); color: var(--white); }
.provider--facebook { background: var(--fb); border-color: var(--fb); color: var(--white); }
.provider { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 0 20px; cursor: pointer; }
.provider__icon { width: 22px; height: 22px; flex: none; }
.provider--line:hover { background: var(--line-dark); border-color: var(--line-dark); }
.provider--phone { border: 2px solid var(--blue-600); color: var(--blue-700); }
.provider--facebook:hover { background: var(--fb-dark); border-color: var(--fb-dark); }
.provider--soon, .provider--soon:hover { flex-wrap: wrap; row-gap: 2px; padding-block: 8px; border-color: var(--border); color: var(--ink-soft); background: var(--bg); cursor: not-allowed; transform: none; box-shadow: none; }
.provider__soon { flex-basis: 100%; font-family: var(--font-body); font-weight: 500; font-size: .8rem; color: var(--amber-900); }
.provider--phone:hover { background: var(--blue-50); }
/* เบอร์โทร + OTP */
.otp { text-align: left; }
.otp__step { display: grid; gap: 10px; }
.otp__label { font-family: var(--font-head); font-weight: 600; color: var(--ink); }
.otp__input { width: 100%; min-height: 52px; padding: 0 16px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font: inherit; font-size: 1.1rem; color: var(--ink); background: var(--white); }
.otp__input:focus { outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 4px var(--blue-100); }
.otp__input--code { text-align: center; letter-spacing: .5em; font-family: var(--font-head); font-size: 1.5rem; font-weight: 600; }
.otp__hint, .otp__sent { margin: 0; color: var(--ink-soft); font-size: .9rem; }
.otp__sent { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--blue-50); color: var(--blue-900); }
.otp__btn { width: 100%; margin-top: 4px; }
.otp__btn:disabled { opacity: .6; cursor: progress; }
.otp__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.otp__link { border: 0; background: none; padding: 6px 0; color: var(--blue-600); font-family: var(--font-head); font-weight: 500; cursor: pointer; }
.otp__link:disabled { color: var(--ink-soft); cursor: default; }
.otp__turnstile { min-height: 65px; }
.otp .modal__back { display: block; margin: 14px auto 0; }
.modal__privacy { margin: 0 0 8px; font-size: .8rem; color: var(--ink-soft); }
.modal__privacy a { color: var(--blue-600); margin: 0 2px; }
.modal__pending { margin: 0; padding: 12px; border-radius: var(--radius-sm); background: var(--blue-50); color: var(--blue-900); font-size: .95rem; }
.modal__foot { margin: 16px 0 8px; font-size: .88rem; color: var(--ink-soft); }
.modal__back { border: 0; background: none; color: var(--blue-600); font-family: var(--font-head); font-weight: 500; text-decoration: underline; }
.modal__cta { width: 100%; margin-top: 10px; }

.aidesign {
  grid-column: 1 / -1;
  margin-top: 28px;
  padding: 24px 20px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.aidesign__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.aidesign__title { font-size: 1.35rem; margin: 2px 0 4px; }
.aidesign__lead { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.aidesign__quota { align-self: start; margin: 0; padding: 6px 14px; border-radius: var(--radius-pill); background: var(--blue-50); color: var(--blue-900); font-family: var(--font-head); font-weight: 600; font-size: .9rem; }
.aidesign__block { margin-top: 20px; }
.aidesign__block h4 { margin: 0 0 10px; font-family: var(--font-head); font-size: 1rem; }
.aidesign__block h4 small { color: var(--ink-soft); font-weight: 400; }
.aidesign__uploads { display: grid; gap: 4px; }
.aidesign__notice { margin: 16px 0 0; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--blue-50); color: var(--blue-900); }
.aidesign__go { width: 100%; margin-top: 20px; }
.aidesign__go:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
/* โหมดทดสอบ AI ของเจ้าของเว็บ */
.aitest { margin: 0 0 20px; padding: 14px 16px; border: 1px dashed var(--amber-400); border-radius: var(--radius-sm); background: var(--amber-50); }
.aitest__label { display: block; margin-bottom: 8px; font-family: var(--font-head); font-weight: 600; color: var(--amber-900); }
.aitest__row { display: flex; flex-wrap: wrap; gap: 8px; }
.aitest__input { flex: 1 1 200px; min-height: 46px; padding: 0 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font: inherit; }
.aitest__active { margin: 0; color: var(--amber-900); font-weight: 600; }
.aidesign__privacy { margin: 12px 0 0; color: var(--ink-soft); font-size: .88rem; }
/* สถานะระบบ AI (มาจาก Server) */
.aistatus { margin: 0 0 20px; padding: 12px 16px; border-radius: var(--radius-sm); border-left: 4px solid var(--blue-600); background: var(--blue-50); color: var(--blue-900); font-size: .95rem; }
.aistatus[data-state="coming_soon"] { border-left-color: var(--amber-400); background: var(--amber-50); color: var(--amber-900); }
.aistatus[data-state="mock_test"] { border-left-color: var(--amber-400); background: var(--amber-50); color: var(--amber-900); font-weight: 600; }
.aistatus[data-state="ready"] { border-left-color: var(--line); }
.airesult__preview { margin: 0 0 12px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--amber-50); color: var(--amber-900); border: 1px dashed var(--amber-400); font-family: var(--font-head); font-weight: 600; text-align: center; }
.aidesign__turnstile { margin-top: 16px; }

.refgal__empty { margin: 0; padding: 18px; border: 2px dashed var(--blue-100); border-radius: var(--radius-sm); color: var(--ink-soft); text-align: center; }
.refgal__albums { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.refgal__album { min-height: 38px; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--white); font-size: .9rem; }
.refgal__album.is-active { background: var(--blue-600); border-color: var(--blue-600); color: var(--white); }
.refgal__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.refgal__more { margin-top: 12px; }
.refcard { position: relative; }
.refcard__pick { display: block; width: 100%; padding: 0; border: 3px solid transparent; border-radius: 12px; overflow: hidden; background: var(--blue-50); }
.refcard__pick img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.refcard__pick[aria-pressed="true"] { border-color: var(--blue-600); }
.refcard__pick[aria-pressed="true"]::after {
  content: "✓";
  position: absolute; top: 8px; left: 8px;
  display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--blue-600); color: var(--white); font-weight: 700;
}
.refcard__zoom { position: absolute; top: 8px; right: 8px; padding: 2px 10px; border: 0; border-radius: var(--radius-pill); background: rgba(7, 29, 67, .7); color: var(--white); font-size: .8rem; }
.refcard__cap { display: block; margin-top: 4px; font-size: .85rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.refpicked { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; font-size: .9rem; }
.refpicked__chip { padding: 4px 12px; border: 0; border-radius: var(--radius-pill); background: var(--blue-50); color: var(--blue-900); }
.refpicked__clear { border: 0; background: none; color: var(--red-500); text-decoration: underline; }

.dropzone { display: flex; align-items: center; justify-content: center; min-height: 64px; border: 2px dashed var(--blue-100); border-radius: var(--radius-sm); color: var(--blue-700); font-family: var(--font-head); cursor: pointer; }
.dropzone:hover { border-color: var(--blue-400); background: var(--blue-50); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone:focus-within { outline: 3px solid var(--blue-400); outline-offset: 2px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.thumbs__item { position: relative; width: 84px; height: 84px; }
.thumbs__item img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.thumbs__item button { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: var(--ink); color: var(--white); line-height: 1; }

.aisteps { display: grid; gap: 6px; margin: 16px 0 0; padding: 0; list-style: none; }
.aisteps li { position: relative; padding-left: 28px; color: var(--ink-soft); }
.aisteps li::before { content: ""; position: absolute; left: 4px; top: .45em; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--border); }
.aisteps li.is-active { color: var(--blue-900); font-weight: 600; }
.aisteps li.is-active::before { border-color: var(--blue-600); border-top-color: transparent; animation: spin 1s linear infinite; }
.aisteps li.is-done { color: var(--ink); }
.aisteps li.is-done::before { background: var(--line); border-color: var(--line); }
@keyframes spin { to { transform: rotate(360deg); } }

.airesult { margin-top: 24px; }
.airesult__tabs { display: flex; gap: 6px; padding: 4px; border-radius: var(--radius-pill); background: var(--blue-50); }
.airesult__tab { flex: 1; min-height: 42px; border: 0; border-radius: var(--radius-pill); background: none; font-family: var(--font-head); font-weight: 600; color: var(--blue-900); }
.airesult__tab.is-active { background: var(--white); box-shadow: var(--shadow-sm); }
.airesult__panel { margin-top: 14px; }
.airesult__view { border-radius: 14px; overflow: hidden; background: #8E9299; }
.airesult__view canvas, .airesult__view img { display: block; width: 100%; height: auto; }
.airesult__cap { margin: 8px 0 0; font-size: .82rem; color: var(--ink-soft); text-align: center; }
.airesult__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.airesult__actions .btn { flex: 1 1 140px; min-height: 46px; }
.airesult__warn { margin: 16px 0 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--amber-50); color: var(--amber-900); font-size: .9rem; }
.airesult__line { width: 100%; margin-top: 14px; }

@media (min-width: 640px) {
  .aidesign { padding: 32px; }
  .aidesign__uploads { grid-template-columns: 1fr 1fr; gap: 20px; }
  .refgal__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .refgal__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* คำขอสั่งผลิต */
.order { margin-top: 16px; padding: 18px; border-radius: var(--radius); border: 2px solid var(--line); background: #F2FCF6; }
.order__no { margin: 0 0 8px; font-family: var(--font-head); font-size: 1.05rem; }
.order__no strong { color: var(--blue-900); letter-spacing: .5px; }
.order__steps { margin: 0 0 12px; padding-left: 20px; color: var(--ink-soft); font-size: .95rem; }
.order__text { margin: 0; padding: 12px; max-height: 220px; overflow: auto; white-space: pre-wrap; border-radius: var(--radius-sm); background: var(--white); border: 1px solid var(--border); font-family: var(--font-body); font-size: .9rem; }
.order__actions { display: grid; gap: 10px; margin-top: 12px; }
@media (min-width: 640px) { .order__actions { grid-template-columns: 2fr 1fr; } }
.order__status { margin: 0 0 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--white); font-size: .92rem; color: var(--ink); }
.order__status[data-state="sent"] { background: #E8F8EF; color: #166534; }
.order__status[data-state="failed"] { background: var(--red-50); color: var(--red-500); }

/* ========== หน้านโยบายความเป็นส่วนตัว ========== */
.policy__box { max-width: 820px; }
.policy__back { display: inline-block; margin-bottom: 20px; color: var(--blue-600); font-family: var(--font-head); font-weight: 500; }
.policy__lead { color: var(--ink-soft); font-size: 1.05rem; }
.policy h2 { margin: 32px 0 10px; font-size: 1.2rem; color: var(--blue-900); }
.policy ul { padding-left: 1.2em; display: grid; gap: 6px; }
.policy__updated { margin-top: 32px; color: var(--ink-soft); font-size: .9rem; }
