/* AIA Insurance Online (คุณอัมพร) — Editorial นิตยสาร + แผงหมวด bento · design/design-spec.md
   สีหลักปรับได้จากหลังบ้าน (ข้อมูลร้าน → ชุดสีของเว็บ) ผ่านตัวแปร --accent / --cta / --navy */

:root {
  --navy: #10264B;
  --accent: #1F4E99;
  --cta: #C8102E;
  --ink: #333F48;
  --muted: #5B6670;
  --sky: #EAF1FA;
  --sky-2: #F4F8FD;
  --paper: #FBFAF7;
  --line: #DCE3EC;
  --white: #fff;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(16, 38, 75, .06), 0 8px 24px -12px rgba(16, 38, 75, .18);
  --shadow-lift: 0 2px 4px rgba(16, 38, 75, .06), 0 18px 40px -16px rgba(16, 38, 75, .28);
  --font: 'IBM Plex Sans Thai', 'Noto Sans Thai', system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --head-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + 16px); }
html.no-scroll { overflow: hidden; }
body {
  margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.7; color: var(--ink);
  background: var(--paper); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { color: var(--navy); line-height: 1.4; margin: 0 0 .5em; font-weight: 700; }
h2 { font-size: clamp(26px, 3.4vw, 40px); letter-spacing: -.005em; }
h3 { font-size: 20px; }
p { margin: 0 0 1em; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: 12px; top: -60px; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 12px; }
.ic { width: 22px; height: 22px; stroke-width: 1.75; flex: none; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; border-radius: 6px; }

/* ---------- ปุ่ม ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
  padding: 12px 22px; border-radius: 999px; border: 1.5px solid transparent; font: 600 16px/1.4 var(--font);
  text-decoration: none; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s;
  background: var(--accent); color: #fff;
}
.btn .ic { width: 18px; height: 18px; }
.btn-cta { background: var(--cta); color: #fff; box-shadow: 0 8px 20px -10px color-mix(in srgb, var(--cta) 80%, transparent); }
.btn-ghost { background: transparent; color: var(--navy); border-color: color-mix(in srgb, var(--navy) 25%, transparent); }
.btn-line { background: #06C755; color: #fff; }
.btn-sm { min-height: 40px; padding: 8px 18px; font-size: 15px; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
  .btn-ghost:hover { background: var(--white); }
}
.btn:disabled { opacity: .6; cursor: progress; transform: none; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--cta);
  letter-spacing: .02em; margin-bottom: 10px;
}
.eyebrow::before { content: ''; width: 28px; height: 2px; background: currentColor; border-radius: 2px; }
.lede { font-size: 18px; color: var(--muted); max-width: 62ch; }
.tag {
  display: inline-block; font-size: 14px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  background: var(--sky); color: var(--accent); white-space: nowrap;
}
.tag-new { background: #E4F5EA; color: #13703A; }
.tag-recommended { background: #FDE9EC; color: #A50D27; }
.tag-popular { background: var(--sky); color: var(--accent); }

/* ---------- หัวเว็บ + เมนูแบบประกันแบบขยาย ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.site-head.is-scrolled { border-color: var(--line); box-shadow: 0 6px 24px -18px rgba(16, 38, 75, .4); }
.head-row { display: flex; align-items: center; gap: 24px; height: var(--head-h); }
.logo { display: flex; align-items: center; flex: none; min-height: 44px; }
.logo-img { height: 38px; width: auto; }
.logo-text { font-weight: 700; color: var(--navy); }
.main-nav { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.main-nav > ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav > ul > li > a, .has-mega > button {
  display: inline-flex; align-items: center; gap: 4px; padding: 10px 12px; border-radius: 10px; color: var(--navy);
  font: 500 16px/1.4 var(--font); text-decoration: none; background: none; border: 0; cursor: pointer;
}
.has-mega > button .ic { width: 18px; height: 18px; transition: transform .2s; }
.main-nav a[aria-current="page"], .has-mega.is-current > button { color: var(--cta); }
@media (hover: hover) { .main-nav > ul > li > a:hover, .has-mega > button:hover { background: var(--sky); } }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-phone { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--navy); text-decoration: none; white-space: nowrap; }
.nav-phone .ic { width: 18px; height: 18px; color: var(--cta); }
.menu-btn { display: none; margin-left: auto; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--white); color: var(--navy); cursor: pointer; }
.menu-btn .ic-close { display: none; }

.has-mega { position: static; }
.mega {
  position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-top: 1px solid var(--line);
  box-shadow: 0 30px 60px -30px rgba(16, 38, 75, .35); opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
}
.has-mega.is-open .mega { opacity: 1; visibility: visible; transform: none; }
.has-mega.is-open > button .ic { transform: rotate(180deg); }
.mega-inner { width: min(1200px, 100% - 32px); margin: auto; padding: 28px 0 22px; display: grid; grid-template-columns: 1.6fr 1fr; gap: 32px; }
.mega-label { font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.mega-col > ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 20px; }
.mega-cat { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--navy); font-weight: 600; text-decoration: none; }
.mega-cat .ic { color: var(--accent); }
@media (hover: hover) { .mega-cat:hover { background: var(--sky); } .mega-plans a:hover { color: var(--cta); } }
.mega-plans { list-style: none; margin: 0 0 6px 42px; padding: 0; font-size: 14px; }
.mega-plans a { color: var(--muted); text-decoration: none; }
.mega-foot { grid-column: 1 / -1; display: flex; gap: 24px; border-top: 1px solid var(--line); padding-top: 16px; }
.mega-foot a { font-weight: 600; display: inline-flex; gap: 6px; align-items: center; text-decoration: none; }
.mega-foot .ic { width: 18px; height: 18px; }

/* ---------- แบนเนอร์ ---------- */
.hero { position: relative; overflow: hidden; }
.hero-track { display: flex; transition: transform .6s var(--ease); }
.hero-slide { flex: 0 0 100%; min-width: 0; }
.hero-dots { display: flex; gap: 8px; justify-content: center; padding: 8px 0 0; }
.hero-dots button { width: 10px; height: 10px; border-radius: 99px; border: 0; background: color-mix(in srgb, var(--navy) 25%, transparent); cursor: pointer; padding: 0; transition: width .3s var(--ease); }
.hero-dots button[aria-current="true"] { width: 28px; background: var(--cta); }
.display { font-size: clamp(32px, 5.2vw, 62px); line-height: 1.4; letter-spacing: -.01em; text-wrap: balance; }
.hero-sub { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.hero-split { padding: clamp(28px, 5vw, 64px) 0 clamp(36px, 5vw, 72px); }
.hero-bg { position: absolute; inset: 0; background: url(/img/bg-sky.webp) center / cover no-repeat, var(--sky); z-index: -1; }
.hero-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(251, 250, 247, .92) 0%, rgba(251, 250, 247, .55) 48%, rgba(251, 250, 247, 0) 70%); }
.hero-split .hero-slide { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: clamp(24px, 4vw, 64px); }
.hero-split .display { color: var(--navy); }
.hero-split .display::after { content: ''; display: block; width: 88px; height: 4px; border-radius: 4px; background: var(--cta); margin-top: 18px; }
.hero-portrait { position: relative; justify-self: center; width: min(420px, 100%); }
.arch {
  aspect-ratio: 4 / 5; border-radius: 999px 999px 28px 28px; overflow: hidden; background: #fff;
  box-shadow: 0 40px 80px -40px rgba(16, 38, 75, .55); border: 6px solid #fff;
}
.arch img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.agent-chip {
  position: absolute; left: -24px; bottom: 28px; display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 12px;
  background: rgba(255, 255, 255, .94); border-radius: 16px; box-shadow: var(--shadow-lift); max-width: 92%;
}
.agent-chip b { display: block; color: var(--navy); line-height: 1.4; }
.agent-chip small { color: var(--muted); font-size: 14px; line-height: 1.4; display: block; }
.nw { white-space: nowrap; }
.agent-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--cta); color: #fff; flex: none; }

.hero-compact { padding: 26px 0 44px; isolation: isolate; }
.hero-compact .hero-cover { position: absolute; inset: 0; z-index: -2; }
.hero-compact .hero-cover img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; }
.hero-compact::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(251, 250, 247, .95) 0%, rgba(251, 250, 247, .7) 55%, rgba(251, 250, 247, .2) 100%); }
.hero-compact .display { font-size: clamp(30px, 4.4vw, 52px); }
.cat-eyebrow .ic { width: 20px; height: 20px; }
.cat-eyebrow::before { display: none; }

.hero-full { color: #fff; }
.hero-full .hero-slide { position: relative; min-height: min(640px, 70vh); display: grid; align-items: end; }
.hero-full .hero-cover { position: absolute; inset: 0; }
.hero-full .hero-cover img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.hero-full .hero-slide::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(16, 38, 75, .85), rgba(16, 38, 75, .1) 60%); }
.hero-full .wrap { position: relative; z-index: 1; padding: 48px 0; }
.hero-full .display, .hero-full .hero-sub { color: #fff; }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }

/* ---------- ส่วนทั่วไป ---------- */
.sec { padding: clamp(56px, 8vw, 104px) 0; position: relative; }
.sec-sky { background: linear-gradient(180deg, var(--sky-2), var(--sky)); }
.sec-paper { background: var(--paper); }
.sec + .sec-paper, .sec-paper + .sec:not(.sec-sky):not(.sec-contact) { border-top: 1px solid var(--line); }
.sec-head { margin-bottom: clamp(28px, 4vw, 44px); max-width: 760px; }
.sec-head h2 { margin-bottom: 12px; }
.sec-foot { margin-top: 32px; display: flex; justify-content: center; }
.group-label { font-size: clamp(26px, 3.4vw, 40px); color: var(--navy); font-weight: 700; margin: 36px 0 16px; display: flex; align-items: center; gap: 16px; }
.group-label::after { content: ''; flex: 1 0 40px; height: 1px; background: var(--line); }

/* แผงหมวดแบบ bento */
#categories { background: url(/img/bg-sky.webp) right bottom / cover no-repeat, var(--sky); }
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.bento-tile {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 22px; min-height: 168px; border-radius: var(--radius);
  background: rgba(255, 255, 255, .86); border: 1px solid rgba(255, 255, 255, .9); text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow); transition: transform .2s var(--ease), box-shadow .2s var(--ease);
  backdrop-filter: blur(6px);
}
.bento-tile.is-last { grid-column: span var(--sd, 1); }
.bento-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--sky); color: var(--accent); margin-bottom: auto; }
.bento-name { font-weight: 700; color: var(--navy); font-size: 18px; line-height: 1.4; margin-top: 14px; }
.bento-desc { font-size: 14px; line-height: 1.55; color: inherit; opacity: .85; }
.bento-count { font-size: 14px; font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; }
.bento-count .ic { width: 16px; height: 16px; transition: transform .2s var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .bento-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
  .bento-tile:hover .bento-count .ic { transform: translateX(3px); }
}

/* การ์ดแบบประกัน */
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.plan-card {
  position: relative; display: flex; flex-direction: column; gap: 8px; padding: 24px; background: var(--white);
  border-radius: var(--radius); border: 1px solid var(--line); transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
.plan-card h3, .plan-card h2 { font-size: 22px; margin: 4px 0 0; }
.plan-card h2 a { color: inherit; text-decoration: none; }
.plan-card p { color: var(--muted); font-size: 16px; margin: 0; }
.plan-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.plan-pic { margin: -24px -24px 8px; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; aspect-ratio: 16 / 9; background: var(--sky); }
.plan-pic img { width: 100%; height: 100%; object-fit: cover; }
.plan-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.plan-cat { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--accent); text-decoration: none; }
.plan-cat .ic { width: 18px; height: 18px; }
.mini { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0 0; padding-top: 12px; border-top: 1px dashed var(--line); }
.mini dt { font-size: 14px; color: var(--muted); }
.mini dd { margin: 0; font-size: 15px; font-weight: 600; color: var(--navy); line-height: 1.45; }
.more { margin-top: auto; padding-top: 10px; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--cta); }
.more .ic { width: 18px; height: 18px; transition: transform .2s var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .plan-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: transparent; }
  .plan-card:hover .more .ic { transform: translateX(4px); }
}

/* หน้ารวม: ค้นหา + ตัวกรอง */
.finder { display: grid; gap: 16px; margin-bottom: 32px; }
.search { display: flex; align-items: center; gap: 10px; background: var(--white); border: 1.5px solid var(--line); border-radius: 999px; padding: 4px 8px 4px 18px; max-width: 560px; }
.search:focus-within { border-color: var(--accent); }
.search .ic { color: var(--muted); }
.search input { flex: 1; border: 0; outline: 0; background: none; font: 16px/1.5 var(--font); padding: 10px 0; min-width: 0; color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--white); border-radius: 999px; padding: 8px 14px; min-height: 44px; font: 500 15px/1.4 var(--font); color: var(--navy); cursor: pointer; }
.chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.catalog { display: grid; gap: 28px; }
.cat-block { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 22px 14px; }
.cat-block-head { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cat-block-head h3 { margin: 0; font-size: 20px; }
.cat-block-head h3 a { color: inherit; text-decoration: none; }
.cat-block-head .bento-ic { margin: 0; width: 40px; height: 40px; }
.cat-block-head .count { margin-left: auto; font-size: 14px; color: var(--muted); white-space: nowrap; }
.cat-rows { list-style: none; margin: 0; padding: 0; }
.cat-row a { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px dashed var(--line); text-decoration: none; color: var(--ink); }
.cat-row:last-child a { border-bottom: 0; }
.cat-row-name { flex: 1; min-width: 0; }
.cat-row-name b { color: var(--navy); font-size: 17px; }
.cat-row-name small { display: block; color: var(--muted); font-size: 14px; line-height: 1.5; }
.cat-row-go { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--accent); }
.cat-row-go .ic { width: 16px; height: 16px; }
.cat-row.is-ask .cat-row-go { color: var(--muted); }
@media (hover: hover) { .cat-row a:hover b { color: var(--cta); } }
.empty { text-align: center; color: var(--muted); padding: 32px 0; }

/* โปรโมชัน */
.promo-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.promo { background: var(--white); border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; }
.promo-list.is-single .promo { display: grid; grid-template-columns: 1.5fr 1fr; align-items: center; }
.promo-pic img { width: 100%; height: auto; }
.promo-body { padding: 22px 24px 26px; }
.promo-body h3 { font-size: 22px; }
.promo-body p { color: var(--muted); }
.promo-when { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--cta); margin-bottom: 8px; }
.promo-when .ic { width: 18px; height: 18px; }

/* เกี่ยวกับตัวแทน */
.sec-about { background: linear-gradient(180deg, var(--paper) 0%, var(--white) 100%); }
.about { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px, 6vw, 88px); align-items: center; }
.about.pic-right .about-pic { order: 2; }
.about-pic { position: relative; margin: 0; }
.about-pic img { border-radius: 28px; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 15%; }
.about-pic::before { content: ''; position: absolute; inset: 24px -24px -24px 24px; border: 2px solid var(--cta); border-radius: 28px; z-index: -1; opacity: .35; }
.about-pic figcaption { position: absolute; right: -14px; bottom: 28px; background: var(--navy); color: #cfd9ea; font-size: 14px; line-height: 1.5; padding: 12px 16px; border-radius: 14px; box-shadow: var(--shadow-lift); }
.about-pic figcaption b { color: #fff; font-size: 16px; letter-spacing: .04em; }
.prose { max-width: 70ch; }
.prose.is-wide { max-width: none; }
.prose p { font-size: 17px; }
.prose h3 { margin-top: 1.4em; }
.ticks { list-style: none; padding: 0; margin: 0 0 1em; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks .ic { color: #fff; background: var(--accent); border-radius: 99px; padding: 4px; width: 24px; height: 24px; margin-top: 3px; stroke-width: 2.2; }

/* ขั้นตอน / จุดเด่น (เลขกำกับแบบนิตยสาร) */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.step { padding: 28px 24px 8px 0; position: relative; }
.step + .step { padding-left: 24px; border-left: 1px solid var(--line); }
.step-no { font-size: 15px; font-weight: 700; color: var(--cta); letter-spacing: .06em; }
.step-ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--sky); color: var(--accent); margin: 14px 0 16px; }
.step h3 { font-size: 20px; }
.step p { color: var(--muted); font-size: 16px; }

/* คำถามที่พบบ่อย */
.faq-wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(24px, 5vw, 72px); align-items: start; }
.faq-side { position: sticky; top: calc(var(--head-h) + 24px); }
.faq-ask { color: var(--muted); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; font-weight: 600; font-size: 18px; color: var(--navy); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { color: var(--accent); transition: transform .25s var(--ease); }
.faq details[open] summary .ic { transform: rotate(180deg); }
.faq-a { color: var(--muted); padding: 0 0 20px; margin: 0; white-space: pre-line; }

/* แถบชวนขอใบเสนอราคา */
.cta-band { padding: clamp(56px, 8vw, 96px) 0; text-align: center; }
.cta-dark { background: url(/img/bg-navy.webp) center / cover no-repeat, var(--navy); color: #fff; }
.cta-dark h2 { color: #fff; max-width: 22ch; margin: 0 auto 24px; font-size: clamp(28px, 4vw, 46px); }
.cta-soft { background: var(--sky); }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 16px 28px; }
.cta-phone { display: inline-flex; align-items: center; gap: 10px; color: inherit; font-size: 22px; font-weight: 700; text-decoration: none; }
.cta-dark .cta-phone .ic { color: #fff; }

/* ติดต่อ + ฟอร์ม */
.sec-contact { background: linear-gradient(180deg, var(--white), var(--sky-2)); }
.contact { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(24px, 5vw, 64px); align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 14px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list .ic { width: 44px; height: 44px; padding: 11px; border-radius: 14px; background: var(--white); color: var(--accent); box-shadow: var(--shadow); }
.contact-list small { display: block; color: var(--muted); font-size: 14px; }
.contact-list a { font-weight: 600; color: var(--navy); text-decoration: none; }
.hours-box { background: var(--white); border-radius: var(--radius); padding: 18px 22px; border: 1px solid var(--line); }
.hours-box h3 { font-size: 17px; display: flex; gap: 8px; align-items: center; }
.hours { list-style: none; margin: 0; padding: 0; }
.hours li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.hours li:last-child { border: 0; }
.closed { color: var(--cta); }
.note { color: var(--muted); }
.map-wrap { margin-top: 36px; }
.map { width: 100%; height: 360px; border: 0; border-radius: var(--radius); background: var(--sky); }

.form-card { background: var(--white); border-radius: 24px; padding: clamp(20px, 3vw, 36px); box-shadow: var(--shadow-lift); border-top: 4px solid var(--cta); }
.fld-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fld.wide { grid-column: 1 / -1; }
.fld label { font-size: 15px; font-weight: 600; color: var(--navy); }
.req { color: var(--cta); }
.fld input, .fld select, .fld textarea {
  width: 100%; font: 16px var(--font); color: var(--ink); background: var(--paper); border: 1.5px solid var(--line);
  border-radius: 12px; padding: 12px 14px; min-height: 48px; transition: border-color .2s, background .2s;
}
.fld textarea { resize: vertical; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: 0; border-color: var(--accent); background: #fff; }
.fld.bad input, .fld.bad select { border-color: var(--cta); background: #FFF6F7; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0; font-size: 14px; line-height: 1.6; color: var(--muted); cursor: pointer; }
.consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.consent.bad span { color: var(--cta); }
.lead-form .btn { width: 100%; }
.lead-form input { font-size: 16px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.msg { margin: 12px 0 0; font-size: 15px; min-height: 1.5em; }
.msg.ok { color: #13703A; font-weight: 600; }
.bad-msg { color: var(--cta); }

/* ---------- หน้าแบบประกัน ---------- */
.plan-hero { position: relative; padding: 26px 0 48px; isolation: isolate; }
.plan-hero .hero-bg { z-index: -1; }
.plan-hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
.plan-hero-side { display: grid; gap: 16px; }
.plan-hero-pic { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; background: var(--sky); }
.plan-hero-pic img { width: 100%; height: 100%; object-fit: cover; }
.plan-full { color: var(--muted); font-size: 15px; margin-top: -6px; }
.facts { margin: 0; background: rgba(255, 255, 255, .92); border-radius: 22px; padding: 10px 22px; box-shadow: var(--shadow-lift); }
.facts div { padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts div:last-child { border: 0; }
.facts dt { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.facts dt .ic { width: 18px; height: 18px; color: var(--accent); }
.facts dd { margin: 2px 0 0 26px; font-weight: 600; color: var(--navy); line-height: 1.5; }
.plan-toc { position: sticky; top: var(--head-h); z-index: 20; background: var(--white); border-block: 1px solid var(--line); }
.plan-toc .wrap { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.plan-toc .wrap::-webkit-scrollbar { display: none; }
.plan-toc a { flex: none; padding: 14px 14px; font-size: 15px; font-weight: 600; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; }
@media (hover: hover) { .plan-toc a:hover { color: var(--navy); border-color: var(--cta); } }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: start; }
.suit-card { background: var(--sky); border-radius: 24px; padding: clamp(22px, 3vw, 34px); }
.benefits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.benefit { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.benefit:last-child:nth-child(odd) { grid-column: 1 / -1; }
.benefit h3 { font-size: 19px; margin-top: 6px; }
.benefit p { color: var(--muted); margin: 0; font-size: 16px; }
.tbl { margin: 0 0 32px; }
.tbl figcaption { font-weight: 700; color: var(--navy); font-size: 18px; margin-bottom: 10px; }
.tbl-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--white); -webkit-overflow-scrolling: touch; }
.tbl table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 15px; }
.tbl th, .tbl td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl thead th { background: var(--navy); color: #fff; font-weight: 600; white-space: nowrap; position: sticky; top: 0; }
.tbl tbody th { color: var(--navy); font-weight: 600; background: var(--sky-2); white-space: nowrap; }
.tbl tbody tr:nth-child(even) td { background: #FAFCFE; }
.tbl tbody tr:last-child th, .tbl tbody tr:last-child td { border-bottom: 0; }
.tbl-note { font-size: 14px; color: var(--muted); margin: 10px 0 0; }
.example { background: var(--white); border-radius: 24px; padding: clamp(22px, 3vw, 34px); box-shadow: var(--shadow); }
.conds ul { padding-left: 1.2em; color: var(--muted); }
.conds li { margin-bottom: 8px; }
.sec-quote { background: url(/img/bg-sky.webp) center / cover no-repeat, var(--sky); }
.quote-wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(24px, 5vw, 64px); align-items: start; }
.ask-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.ask-chips a { display: inline-block; padding: 10px 16px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); color: var(--navy); font-weight: 500; text-decoration: none; }
@media (hover: hover) { .ask-chips a:hover { border-color: var(--accent); color: var(--accent); } }

/* ---------- ท้ายเว็บ ---------- */
.site-foot { background: var(--navy); color: #B9C6DA; padding: 56px 0 120px; font-size: 15px; }
.site-foot a { color: #E3EAF5; text-decoration: none; }
@media (hover: hover) { .site-foot a:hover { text-decoration: underline; } }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1.1fr 1fr .8fr; gap: 32px; }
.foot-agent { display: flex; gap: 16px; align-items: flex-start; }
.foot-photo { width: 76px; flex: none; }
.foot-photo img { border-radius: 16px; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 15%; }
.foot-name { color: #fff; font-weight: 700; font-size: 18px; margin-bottom: 4px; }
.foot-agent p { margin: 0 0 4px; line-height: 1.6; }
.foot-license { display: flex; align-items: center; gap: 6px; color: #fff; }
.foot-license .ic { width: 18px; height: 18px; color: #F29AA8; }
.foot-h { color: #fff; font-weight: 600; margin-bottom: 12px; }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-col li { display: flex; gap: 8px; align-items: flex-start; line-height: 1.6; }
.foot-col li .ic { width: 18px; height: 18px; margin-top: 4px; color: #8FA6C9; }
.social { display: flex; gap: 10px; margin-top: 16px; }
.social a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: rgba(255, 255, 255, .08); }
.social .ic { width: 20px; height: 20px; color: #fff; }
.foot-note { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 36px; padding-top: 22px; display: grid; gap: 8px; }
.foot-note p { margin: 0; font-size: 14px; line-height: 1.7; max-width: 100ch; }
.foot-note small { color: #8FA6C9; }

/* ปุ่มลอย: มือถือเป็นแถบล่าง · จอใหญ่เป็นปุ่มเรียงมุมขวา */
.float-contact { position: fixed; z-index: 40; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; }
.float-contact a { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 999px; font-weight: 600; text-decoration: none; color: #fff; box-shadow: var(--shadow-lift); }
.fc-line { background: #06C755; }
.fc-call { background: var(--navy); }

@keyframes nav-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* โหมดแก้หน้าเว็บ / อนิเมชันตอนเลื่อนถึง */
.js-reveal .reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.js-reveal .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* บทความ (เปิดเมื่อซื้อระบบบทความ) */
.a-wrap { max-width: 780px; }
.a-meta { color: var(--muted); font-size: 14px; }
.a-lead { font-size: 19px; color: var(--muted); }
.a-toc { background: var(--sky); border-radius: var(--radius); padding: 18px 22px; margin: 24px 0; }
.a-fig figcaption { font-size: 14px; color: var(--muted); }
.a-embed { margin: 40px 0; }
.a-cta { background: var(--sky); border-radius: var(--radius); padding: 24px; margin: 32px 0; text-align: center; }
dialog.light { border: 0; padding: 0; background: transparent; max-width: 92vw; }
dialog.light::backdrop { background: rgba(10, 20, 40, .85); }
dialog.light img { max-height: 86vh; border-radius: 12px; }
dialog.light button { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border-radius: 99px; border: 0; font-size: 24px; cursor: pointer; }
.gal { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 12px; }
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.quote { margin: 0; background: var(--white); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.quote blockquote { margin: 0 0 16px; font-size: 17px; }
.quote figcaption { display: flex; gap: 12px; align-items: center; }
.quote figcaption img { width: 44px; height: 44px; border-radius: 99px; object-fit: cover; }
.quote small { display: block; color: var(--muted); }

/* ---------- จอแคบ ---------- */
@media (max-width: 1100px) {
  .nav-phone { display: none; }
  .main-nav > ul > li > a, .has-mega > button { padding: 10px 8px; font-size: 15px; }
}
@media (max-width: 960px) {
  :root { --head-h: 64px; }
  .menu-btn { display: grid; place-items: center; }
  .logo-img { height: 32px; }
  .main-nav {
    position: fixed; inset: var(--head-h) 0 0; background: var(--paper); flex-direction: column; align-items: stretch; gap: 0;
    padding: 12px 16px 120px; overflow-y: auto; display: none;
  }
  .site-head.is-open .main-nav { display: flex; animation: nav-in .28s var(--ease); }
  .site-head.is-open .menu-btn .ic:not(.ic-close) { display: none; }
  .site-head.is-open .menu-btn .ic-close { display: block; }
  .main-nav > ul { flex-direction: column; align-items: stretch; }
  .main-nav > ul > li > a, .has-mega > button { width: 100%; justify-content: space-between; padding: 16px 4px; font-size: 18px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .mega { position: static; box-shadow: none; border: 0; display: none; opacity: 1; visibility: visible; transform: none; }
  .has-mega.is-open .mega { display: block; }
  .mega-inner { grid-template-columns: 1fr; padding: 8px 0 12px; width: 100%; gap: 12px; }
  .mega-plans { display: none; }
  .mega-col > ul { grid-template-columns: 1fr; }
  .nav-cta { flex-direction: column; align-items: stretch; margin-top: 20px; }
  .nav-cta .nav-phone { display: inline-flex; justify-content: center; padding: 12px; }
  .nav-cta .btn { min-height: 52px; font-size: 17px; }
  .hero-split .hero-slide { grid-template-columns: 1fr; }
  .hero-split .hero-portrait { order: -1; width: min(300px, 78%); }
  .hero-bg::after { background: linear-gradient(180deg, rgba(251, 250, 247, .2) 0%, rgba(251, 250, 247, .85) 45%, rgba(251, 250, 247, .95) 100%); }
  .agent-chip { left: 50%; transform: translateX(-50%); bottom: -18px; width: max-content; max-width: calc(100vw - 32px); }
  .hero-split .hero-text { margin-top: 18px; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento-tile.is-last { grid-column: span var(--sm, 1); }
  #categories { background: linear-gradient(rgba(234, 241, 250, .86), rgba(234, 241, 250, .86)), url(/img/bg-sky.webp) right bottom / cover no-repeat, var(--sky); }
  .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about, .contact, .faq-wrap, .two-col, .quote-wrap, .plan-hero-grid { grid-template-columns: 1fr; }
  .about-pic { max-width: 420px; }
  .faq-side { position: static; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step:nth-child(odd) { padding-left: 0; border-left: 0; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .promo-list.is-single .promo { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { width: calc(100% - 32px); }
  .hero-actions .btn { flex: 1 1 100%; }
  .bento { gap: 10px; }
  .bento-tile { padding: 16px; min-height: 150px; }
  .bento-name { font-size: 16px; }
  .bento-desc { display: none; }
  .plan-grid { grid-template-columns: 1fr; }
  .benefits { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .step, .step + .step { padding: 22px 0 6px; border-left: 0; border-bottom: 1px solid var(--line); }
  .fld-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .cat-row-go { font-size: 0; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding: 0 16px 6px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  /* ลิงก์ตัวหนังสือที่นิ้วต้องกดได้ — พื้นที่กดสูงอย่างน้อย 44px */
  .foot-col li a, .foot-note a, .crumbs a, .faq-ask a, .contact-list a, .cat-block-head h3 a, a.plan-cat, .cta-phone { display: inline-flex; align-items: center; min-height: 44px; }
  .prose a, .consent a { padding-block: 11px; } /* ลิงก์กลางประโยค: ขยายพื้นที่กดโดยไม่ดันบรรทัด */
  .cat-row-go .ic { width: 20px; height: 20px; }
  .promo-list { grid-template-columns: 1fr; }
  .about-pic figcaption { right: 8px; }
  .about-pic::before { inset: 14px -10px -14px 14px; }
  .map { height: 280px; }
  /* แถบติดต่อล่างจอบนมือถือ: LINE กับโทรเท่านั้น สูงไม่เกิน 60px */
  .float-contact { left: 0; right: 0; bottom: 0; flex-direction: row; gap: 0; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .96); box-shadow: 0 -8px 24px -12px rgba(16, 38, 75, .3); }
  .float-contact a { flex: 1; justify-content: center; border-radius: 12px; padding: 12px 8px; min-height: 44px; box-shadow: none; margin: 0 4px; }
  .site-foot { padding-bottom: 110px; }
}
