:root {
  /* FiwPang: เทาถ่าน + ทองโบราณ + ครีม */
  --bg: #f6f2ea;
  --bg-2: #efe6d4;
  --card: #ffffff;
  --line: #e6dccb;
  --text: #1b1c1f;
  --text-2: #4b4c52;
  --muted: #6f6b64;
  --accent: #1f2226;
  --accent-2: #33373d;
  --accent-soft: #f1e8d6;
  --gold: #c9a15a;
  --gold-2: #e2c98f;
  --gold-text: #8a6a2f;
  --dark: #15171a;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(27, 24, 18, .05), 0 10px 30px rgba(27, 24, 18, .07);
  --wrap: 1160px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.7 "IBM Plex Sans Thai", "Leelawadee UI", "Thonburi", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-text); }
h1, h2, h3 { line-height: 1.3; margin: 0; letter-spacing: -.01em; text-wrap: balance; }
.head p, .lead { text-wrap: pretty; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ---------- ปุ่ม ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 24px; border-radius: 14px; font: inherit; font-weight: 600;
  text-decoration: none; white-space: nowrap; border: 0; cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn.primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(21, 23, 26, .25); }
.btn.primary:hover { background: var(--accent-2); transform: translateY(-1px); }
.btn.ghost { background: #fff; color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--gold); transform: translateY(-1px); }
.btn.sm { height: 40px; padding: 0 16px; font-size: 15px; border-radius: 11px; }
.btn:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #8a6a2f; outline-offset: 3px; }

/* ---------- แถบบน ---------- */
.top { position: sticky; top: 0; z-index: 10; background: rgba(246, 242, 234, .88); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.top.scrolled { border-bottom-color: var(--line); }
.top-in { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; color: var(--text); text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand img.wm { width: auto; height: 24px; border-radius: 0; }
.top nav { display: flex; gap: 4px; margin-left: auto; }
.top nav a { color: var(--text-2); text-decoration: none; font-size: 15px; padding: 6px 12px; border-radius: 9px; }
.top nav a:hover { color: var(--text); background: var(--accent-soft); }

/* ---------- ส่วนหัว ---------- */
.hero { position: relative; padding: 96px 0 104px; overflow: hidden; background: var(--dark); color: #f3ebdd; isolation: isolate; }
.hero-bg { position: absolute; inset: 0 0 0 auto; width: min(68%, 1100px); height: 100%; object-fit: cover; object-position: right center; z-index: -1; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 38%); mask-image: linear-gradient(90deg, transparent 0, #000 38%); }
.hero .lead { color: #cfc6b6; }
.hero .fine { color: #9c958a; }
.hero .btn.ghost { background: transparent; color: #f3ebdd; border-color: rgba(243, 235, 221, .35); }
.hero .btn.ghost:hover { border-color: var(--gold-2); }
.hero .btn.primary { background: var(--gold); color: #15171a; box-shadow: 0 10px 28px rgba(201, 161, 90, .25); }
.hero .btn.primary:hover { background: var(--gold-2); }
.hero-in { display: grid; grid-template-columns: minmax(0, 560px); gap: 40px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: rgba(201, 161, 90, .14); color: var(--gold-2); font-size: 14px; font-weight: 600; }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.hero h1 { font-size: clamp(32px, 4.6vw, 52px); margin: 18px 0 18px; }
.hero h1 em { font-style: normal; color: var(--gold-2); }
.lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--text-2); max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.fine { font-size: 14px; color: var(--muted); margin-top: 14px; }

/* ---------- ภาพหน้าจอแอป ---------- */
.shot { padding: 24px 0 72px; }
.frame { background: #fff; border-radius: 20px; box-shadow: var(--shadow), 0 40px 80px -30px rgba(21, 23, 26, .28); border: 1px solid var(--line); overflow: hidden; }
.frame-bar { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px; background: #f5f0e6; border-bottom: 1px solid var(--line); }
.frame-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ddd2bf; }
.frame-bar span { margin-left: 12px; font-size: 13px; color: var(--muted); }
.caption { text-align: center; color: var(--muted); font-size: 14px; margin-top: 16px; }

/* ---------- หัวข้อส่วน ---------- */
section.block { padding: 80px 0; }
section.alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.head { max-width: 680px; margin: 0 auto 44px; text-align: center; }
.kicker { color: var(--gold-text); font-weight: 700; font-size: 14px; letter-spacing: .06em; }
.head h2 { font-size: clamp(27px, 3.3vw, 38px); margin-top: 8px; }
.head p { color: var(--text-2); margin-top: 14px; font-size: 17px; }

/* ---------- 3 ขั้นตอน ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.step img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--bg-2); }
.step-b { padding: 22px 24px 26px; }
.step-n { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--gold-2); font-weight: 700; font-size: 15px; margin-right: 8px; }
.step h3 { font-size: 21px; display: flex; align-items: center; }
.step p { color: var(--text-2); margin-top: 10px; }

/* ---------- จุดเด่น ---------- */
.feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feat { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.feat .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 14px; }
.feat .ic svg { width: 22px; height: 22px; }
.feat h3 { font-size: 18px; }
.feat p { color: var(--text-2); margin-top: 6px; font-size: 15.5px; }

/* ---------- ตัวเลือกคลิป ---------- */
.split { display: grid; grid-template-columns: 1fr 380px; gap: 48px; align-items: start; }
.styles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.style { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.style img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.style b { display: block; padding: 10px 12px 2px; font-size: 15px; }
.style span { display: block; padding: 0 12px 12px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.opts { border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow); background: #fff; position: sticky; top: 90px; }
.split h3 { font-size: 22px; margin-bottom: 6px; }
.split .sub { color: var(--text-2); margin-bottom: 22px; }
.checks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 30px; color: var(--text-2); }
.checks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a6a2f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 12px no-repeat; }

/* ---------- แพลตฟอร์ม ---------- */
.plats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.plat { border-radius: var(--radius); padding: 26px; background: #fff; border: 1px solid var(--line); }
.plat .tag { display: inline-block; font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 8px; background: var(--bg-2); color: #6e5424; }
.plat h3 { font-size: 20px; margin: 12px 0 6px; }
.plat p { color: var(--text-2); font-size: 15.5px; }

/* ---------- ดาวน์โหลด ---------- */
.dl { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.dl-card { background: var(--dark); color: #f3ebdd; border-radius: 24px; padding: 34px; position: relative; overflow: hidden; }
.dl-card::after { content: ""; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(201, 161, 90, .3), transparent 70%); }
.dl-card .app { display: flex; align-items: center; gap: 14px; position: relative; }
.dl-card .app img { width: 56px; height: 56px; border-radius: 14px; }
.dl-card h3 { font-size: 24px; }
.dl-card .meta { color: #a59e92; font-size: 14px; }
.dl-card .btn { margin-top: 26px; width: 100%; position: relative; }
.dl-card .btn.primary { background: var(--gold); color: #15171a; box-shadow: 0 10px 28px rgba(201, 161, 90, .22); }
.dl-card .btn.primary:hover { background: var(--gold-2); }
.dl-card .note a { color: var(--gold-2); }
.dl-card .note.warn { background: rgba(201, 161, 90, .1); color: #e2d3b3; }
.whatsnew { margin-top: 16px; font-size: 14px; color: #ddd4c4; position: relative; }
.whatsnew summary { cursor: pointer; color: var(--gold-2); font-weight: 600; }
.whatsnew ul { margin: 8px 0 0; padding-left: 20px; }
.whatsnew li { margin: 4px 0; }
.dl-card dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 26px 0 0; font-size: 14px; position: relative; }
.dl-card dt { color: #a59e92; }
.dl-card dd { margin: 0; overflow-wrap: anywhere; }
.dl-card code { font-size: 12px; color: #d6cdbd; word-break: break-all; }
.note { margin-top: 18px; padding: 14px 16px; border-radius: 12px; background: rgba(255, 255, 255, .07); font-size: 14px; color: #ddd4c4; position: relative; }
.install { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 12px; }
.install li { counter-increment: s; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px 16px 62px; position: relative; color: var(--text-2); }
.install li::before { content: counter(s); position: absolute; left: 18px; top: 15px; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--gold-text); display: grid; place-items: center; font-weight: 700; }
.install b { color: var(--text); }
.install code, .reqs code, .faq code { background: var(--bg-2); padding: 1px 7px; border-radius: 6px; font-size: 14px; color: #6e5424; }

/* ---------- สิ่งที่ต้องมี ---------- */
.reqs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.req { display: flex; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.req .ic { flex: none; width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.req .ic svg { width: 20px; height: 20px; }
.req b { display: block; }
.req span { color: var(--text-2); font-size: 15px; }

/* ---------- ราคา / ติดต่อ ---------- */
.price { max-width: 760px; margin: 0 auto; text-align: center; background: linear-gradient(160deg, #fff, var(--bg-2)); border: 1px solid var(--line); border-radius: 26px; padding: 44px 30px; box-shadow: var(--shadow); }
.price h2 { font-size: clamp(26px, 3vw, 34px); }
.price p { color: var(--text-2); margin: 14px auto 0; max-width: 34em; }
.price .cta { justify-content: center; }
.todo { display: inline-block; margin-top: 18px; padding: 6px 12px; border-radius: 8px; background: #fff3c4; color: #8a5a00; font-size: 14px; }

/* ---------- คำถาม ---------- */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 30px 18px 0; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 2px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { color: var(--text-2); padding-bottom: 18px; }

/* ---------- ท้ายหน้า ---------- */
footer { background: var(--dark); color: #a59e92; padding: 44px 0; font-size: 14px; }
.foot { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-start; }
footer .brand { color: #fff; }
footer p { max-width: 640px; margin-top: 10px; }
footer a { color: #f1e8d6; }

/* ---------- จอแคบ ---------- */
@media (max-width: 960px) {
  .hero-in, .dl, .split { grid-template-columns: minmax(0, 1fr); }
  .split > *, .dl > *, .hero-in > * { min-width: 0; }
  .hero { padding: 0 0 64px; }
  .hero-bg { position: relative; inset: auto; width: 100%; height: auto; aspect-ratio: 16 / 10; object-position: 78% center; -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent); mask-image: linear-gradient(180deg, #000 70%, transparent); margin-bottom: -40px; }
  .feats, .plats { grid-template-columns: repeat(2, 1fr); }
  .styles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .opts { position: static; width: 100%; max-width: min(420px, 100%); }
  .top nav a:not(.btn) { display: none; }
}
@media (max-width: 680px) {
  .wrap { padding: 0 16px; }
  .steps, .feats, .plats, .reqs { grid-template-columns: 1fr; }
  .styles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  section.block { padding: 60px 0; }
  .cta .btn { flex: 1 1 100%; }
  .frame-bar span { display: none; }
  .dl-card { padding: 26px 22px; }
  .price { padding: 34px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* ---------- เพิ่มเติม 0.5.2 ---------- */
.nw { white-space: nowrap; }
.h2s { font-size: clamp(22px, 2.6vw, 28px); margin-top: 8px; }
.mobile-note { display: none; margin-top: 18px; padding: 12px 14px; border-radius: 12px; background: rgba(201, 161, 90, .12); color: #e2d3b3; font-size: 15px; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--gold-2); text-decoration: underline; cursor: pointer; }
@media (max-width: 860px), (pointer: coarse) { .mobile-note { display: block; } }
.steps-mini { margin: 10px 0; padding-left: 22px; color: var(--text-2); }
.steps-mini li { margin: 6px 0; }
.hash { display: block; margin-top: 8px; font-size: 12px; color: #d6cdbd; word-break: break-all; }
.style b { padding: 10px 12px 12px; }
.hero h1 em { display: inline-block; }

/* ---------- ภาพแบบออกแบบเอง (ไม่ใช้ภาพจาก AI) ---------- */
.hero { background: var(--dark) url(img/arch-pattern.svg) center top / 96px 144px repeat; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--dark) 30%, rgba(21, 23, 26, .82) 55%, rgba(21, 23, 26, .55)); z-index: -1; }
.hero-in { grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 56px; }
.device { position: relative; padding: 10px 0 40px; }
.laptop .screen { background: #0e0f11; border: 1px solid #3a3d43; border-radius: 14px 14px 4px 4px; padding: 10px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8); }
.laptop .screen img { display: block; width: 100%; height: auto; border-radius: 6px; aspect-ratio: 16 / 10; object-fit: cover; object-position: left top; }
.laptop .base { height: 14px; margin: 0 -6%; background: linear-gradient(#3a3d43, #24262a); border-radius: 0 0 14px 14px; }
.device .panel { position: absolute; right: -8px; bottom: 0; width: 28%; min-width: 120px; background: #fff; border: 6px solid #0e0f11; border-radius: 18px; overflow: hidden; box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .75); }
.device .panel img { display: block; width: 100%; height: auto; }
.step-ic { height: 150px; display: grid; place-items: center; background: var(--bg-2) url(img/arch-pattern-ink.svg) center / 64px 96px; color: var(--accent); }
.step-ic svg { width: 64px; height: 64px; padding: 16px; border-radius: 20px; background: #fff; color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--gold); box-sizing: content-box; }
.style { display: flex; flex-direction: column; align-items: center; padding: 18px 10px 4px; text-align: center; }
.style-ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1.5px rgba(201, 161, 90, .6); }
.style-ic svg { width: 28px; height: 28px; }
.style b { padding: 10px 6px 12px; font-size: 14.5px; }
@media (max-width: 960px) {
  .hero { padding: 56px 0 64px; }
  .hero-in { grid-template-columns: minmax(0, 1fr); }
  .device { max-width: 560px; }
}
@media (max-width: 680px) {
  .step { display: flex; align-items: stretch; }
  .step-ic { height: auto; width: 92px; flex: none; }
  .step-ic svg { width: 30px; height: 30px; padding: 10px; border-radius: 14px; }
  .step-b { padding: 16px 18px; }
  .step h3 { font-size: 18px; }
  .step p { margin-top: 4px; font-size: 15px; }
  .feats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .feat { padding: 16px; }
  .feat h3 { font-size: 16px; }
  .feat p { font-size: 14px; }
}
