/* ============================================================================
   yim.commu.online · SalePageY1
   โทเคนประกาศครั้งเดียวที่ :root แล้ว override ที่ [data-theme="dark"]
   ⛔ ห้ามใช้ var(--x, #สีจริง) ⇒ ค่าสำรองคือค่าคงที่ที่ปลอมตัวเป็นตัวแปรธีม
   ค่าคอนทราสต์ที่คำนวณไว้อยู่ใน ../DESIGN.md
   ============================================================================ */

:root {
  /* ---- พื้น ---- */
  --paper:#fbfaf8;
  --paper-deep:#f1ece7;
  --white:#fffefd;
  --line:#e1d7cf;
  --line-soft:#ece5de;
  /* ---- ตัวอักษร ---- */
  --ink:#5a473b;          /* 8.391 บน paper */
  --muted:#6b5d53;        /* 6.071 บน paper · 5.396 บน paper-deep */
  --accent:#9d5833;       /* 5.192 บน paper · 4.615 บน paper-deep */
  /* ---- สีตกแต่งเท่านั้น ⛔ ห้ามใช้กับตัวอักษรขนาดปกติ ---- */
  --coral:#efb18d;
  --sage:#998777;
  --on-accent:#fffefd;
  /* ---- รูปทรง ---- */
  --r:14px; --r-lg:22px; --r-pill:999px;
  --shadow:0 1px 2px rgba(90,71,59,.05), 0 16px 40px rgba(90,71,59,.08);
  /* ---- ตัวอักษร ---- */
  --font-body:"Sarabun","Noto Sans Thai","Sukhumvit Set","Thonburi",system-ui,sans-serif;
  --font-display:"Anuphan","Noto Sans Thai","Sukhumvit Set","Thonburi",system-ui,sans-serif;
  --scale:1;
  /* ความสูงของแถบหัว sticky ⇒ app.js วัดสดแล้วเขียนทับค่านี้
     ⛔ ค่าคงที่ค่าเดียวครอบไม่ได้ ⇒ วัดจริงได้ 65px ถึง 175.84px ตามภาษา ขนาดอักษร และความกว้าง */
  --hdr-h:64px;
  --maxw:70rem;
  --pad:clamp(1.15rem,4vw,2.5rem);
  color-scheme:light;
}
html[data-theme="dark"]{
  --paper:#171310; --paper-deep:#241e19; --white:#1f1a16;
  --line:#3a302a; --line-soft:#2c2521;
  --ink:#f2ece5;          /* 15.747 บน paper */
  --muted:#c3b6a8;        /* 9.302 บน paper */
  --accent:#f0b791;       /* 10.454 บน paper */
  --coral:#7a4a2f; --sage:#5d5044; --on-accent:#171310;
  --shadow:0 1px 2px rgba(0,0,0,.5), 0 16px 40px rgba(0,0,0,.45);
  color-scheme:dark;
}

*,*::before,*::after{box-sizing:border-box}
html{font-size:calc(19px * var(--scale));scroll-behavior:smooth;scroll-padding-top:calc(var(--hdr-h) + 1rem);-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{margin:0;background:var(--paper);color:var(--ink);
  font-family:var(--font-body);font-size:1.06rem;line-height:1.8;-webkit-font-smoothing:antialiased}
html[lang="en"] body{line-height:1.68}
img{max-width:100%;display:block}
h1,h2,h3{font-family:var(--font-display);line-height:1.3;margin:0;letter-spacing:0;color:var(--ink)}
/* 🔑 ฐานอักษรขึ้นจาก 17px เป็น 19px ⇒ ตัด rem ของหัวข้อลงตามส่วน
   ⇒ ตัวอักษรเนื้อความโตขึ้นจริง แต่ขนาดหัวข้อสัมบูรณ์ไม่บานตาม ⛔ ห้ามเพิ่ม rem หัวข้อกลับ */
h1{font-size:clamp(1.68rem,4.1vw,2.6rem);font-weight:700;line-height:1.22}
h2{font-size:clamp(1.3rem,2.9vw,1.82rem);font-weight:600}
h3{font-size:1rem;font-weight:600}
p{margin:0}
a{color:var(--accent)}
:focus-visible{outline:3px solid var(--accent);outline-offset:3px;border-radius:6px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.skip{position:absolute;left:.75rem;top:-3.5rem;z-index:80;background:var(--accent);color:var(--on-accent);
  padding:.65rem 1.1rem;border-radius:var(--r);text-decoration:none;transition:top .15s}
.skip:focus{top:.75rem}

section{padding-block:clamp(3rem,7vw,5.5rem)}
.band{background:var(--paper-deep)}
.wrap{width:min(100% - (var(--pad) * 2),var(--maxw));margin-inline:auto}
.narrow{max-width:44rem}
.eyebrow{font-family:var(--font-display);font-weight:600;font-size:.78rem;color:var(--accent);
  display:inline-flex;align-items:center;gap:.55rem;margin-bottom:.7rem}
.eyebrow::before{content:"";width:1.6rem;height:2px;background:var(--coral);border-radius:2px}
.section-intro{margin-bottom:2.2rem}
.section-intro p:not(.eyebrow){color:var(--muted);margin-top:.9rem;max-width:40rem}

/* ================= header ================= */
.site-header{position:sticky;top:0;z-index:50;border-bottom:1px solid var(--line);
  background:color-mix(in srgb,var(--paper) 90%,transparent);backdrop-filter:saturate(1.3) blur(10px)}
.header-row{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap;min-height:64px;padding-block:.5rem}
.brand{display:inline-flex;align-items:center;gap:.6rem;font-family:var(--font-display);font-weight:700;
  color:var(--ink);text-decoration:none;flex:0 1 auto;min-width:0}
.brand-mark{width:34px;height:34px;border-radius:var(--r-pill);background:var(--coral);color:#4a3628;
  display:grid;place-items:center;font-size:.77rem;letter-spacing:.04em;flex:0 0 auto}
html[data-theme="dark"] .brand-mark{color:#f2ece5}
.desktop-nav{display:none;gap:.2rem;margin-inline-start:auto}
.desktop-nav a{color:var(--ink);text-decoration:none;font-family:var(--font-display);font-weight:500;
  font-size:.88rem;padding:.5rem .65rem;border-radius:var(--r)}
.desktop-nav a:hover{background:var(--paper-deep);color:var(--accent)}
.tools{display:flex;align-items:center;gap:.3rem;margin-inline-start:auto}
.desktop-nav + .tools{margin-inline-start:.4rem}
.tool{min-width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center;
  border:1px solid var(--line);background:var(--white);color:var(--ink);border-radius:var(--r);
  font-family:var(--font-display);font-weight:600;font-size:.82rem;cursor:pointer;padding:0 .45rem}
.tool:hover{border-color:var(--accent);color:var(--accent)}
.tool svg{width:19px;height:19px}
html[data-theme="dark"] .i-moon,html:not([data-theme="dark"]) .i-sun{display:none}
.header-cta{display:none}
@media (min-width:900px){
  .desktop-nav{display:flex}
  .header-cta{display:inline-flex;align-items:center;gap:.4rem;min-height:44px;padding:.6rem 1.1rem;
    border-radius:var(--r-pill);background:var(--accent);color:var(--on-accent);text-decoration:none;
    font-family:var(--font-display);font-weight:600;font-size:.86rem}
}

/* ================= hero ⇒ editorial split ⛔ ไม่ใช่ใบหน้าใหญ่หลังข้อความ =================
   🔴 ⛔ ห้ามกลับไปวางตัวอักษรยาวทับภาพเต็มความกว้าง ⇒ โครงแบบนั้นถูกทิ้งทั้งก้อนแล้ว
      ⇒ ⛔ จึงไม่ต้องไปไล่คอนทราสต์ของไล่สีชุดเดิมต่อ
   ✅ ของที่ใช้อยู่ ⇒ พื้นกระดาษอุ่น · ข้อความอยู่บนพื้นทึบ · ภาพอยู่ในกรอบขนาดกลาง
   🔴 ภาพหลักคือ y1-forehead-freeze ⇒ มือทั้งสองข้าง หน้าผาก และใบหน้าอยู่ในเฟรมเดียว
   ⛔ ไม่มีข้อความพาดใบหน้าอีกแล้ว ⇒ ตัวอักษรกลับมาใช้ token ที่วัดผ่านทั้งสองธีม
   ⛔ กรอบภาพเป็นหน่วย px ⛔ ไม่ใช่ rem ⇒ กดปุ่ม A+ แล้วสัดส่วนการครอปต้องไม่เพี้ยน */
.hero{background:var(--paper-deep);padding-block:clamp(2.2rem,5vw,3.4rem)}
.hero-grid{display:grid;gap:clamp(1.7rem,4vw,3.5rem)}
.hero-content{max-width:38rem}
.hero-content .eyebrow{color:var(--accent)}
.hero-content h1{margin:.3em 0 0;max-width:16ch}
.hero-question{font-family:var(--font-display);font-size:1.1rem;line-height:1.55;color:var(--ink);
  margin:.9rem 0 0;max-width:34ch}
.hero-lead{font-size:1rem;line-height:1.75;color:var(--muted);max-width:44ch;margin:1rem 0 0}
.hero-actions{display:flex;flex-wrap:wrap;gap:.7rem;margin-top:1.7rem}
.draft-note{margin:1.6rem 0 0;padding-top:1.05rem;border-top:1px solid var(--line);
  font-size:.82rem;line-height:1.7;color:var(--muted);max-width:52ch}
.hero-media{margin:0;justify-self:center;width:100%;max-width:420px}
.hero-image{width:100%;height:auto;aspect-ratio:1/1;max-height:380px;object-fit:cover;object-position:50% 24%;
  border-radius:var(--r-lg);box-shadow:var(--shadow)}
@media (min-width:560px){
  .hero-image{aspect-ratio:4/5;max-height:520px}
}
@media (min-width:760px){
  /* คุมความกว้างของคู่ข้อความกับภาพ ⛔ ไม่ปล่อยเต็ม wrap ⇒ จอกว้างจะเกิดช่องว่างกลางที่ไม่มีหน้าที่ */
  /* ⛔ ห้ามตรึงคอลัมน์ภาพเป็น px ที่นี่ ⇒ วัดแล้วคอลัมน์ข้อความเหลือ 253px ที่จอ 768 ⇒ ฮีโร่สูงขึ้น 139px
     ✅ ใช้สัดส่วน แล้วให้ .hero-media เป็นตัวคุมความกว้างสูงสุดของกรอบภาพแทน */
  .hero-grid{grid-template-columns:minmax(0,1.05fr) minmax(0,.8fr);align-items:center;
    max-width:1060px;margin-inline:auto}
  .hero-media{justify-self:end}
  .hero-image{object-position:52% 28%}
}

.button{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;min-height:50px;
  padding:.8rem 1.4rem;border-radius:var(--r-pill);font-family:var(--font-display);font-weight:600;
  font-size:.92rem;text-decoration:none;border:1px solid transparent}
.button-primary{background:var(--accent);color:var(--on-accent)}
.button-primary:hover{filter:brightness(.94)}
.text-link{display:inline-flex;align-items:center;min-height:50px;color:var(--accent);text-decoration:underline;
  text-underline-offset:4px;font-family:var(--font-display);font-weight:500}

/* ================= intro ⇒ รายการคำถามเป็นเส้นคั่น ⛔ ไม่ใช่การ์ด ================= */
.intro-body{display:grid;gap:1.3rem;max-width:46rem}
.question-list{list-style:none;margin:0;padding:0;display:grid;gap:0}
.question-list li{padding:.85rem 0 .85rem 2.2rem;border-bottom:1px solid var(--line);position:relative;color:var(--ink)}
.question-list li::before{content:"?";position:absolute;left:0;top:.85rem;width:1.5rem;height:1.5rem;
  border-radius:var(--r-pill);background:var(--coral);color:#4a3628;display:grid;place-items:center;
  font-family:var(--font-display);font-weight:700;font-size:.8rem}
html[data-theme="dark"] .question-list li::before{color:#f2ece5}
.closing-line{font-family:var(--font-display);font-size:1.02rem;color:var(--ink);
  border-left:3px solid var(--coral);padding-left:1.1rem;margin-top:.5rem}

/* ================= split ⇒ ข้อความคู่ภาพสูง ================= */
.split-band .wrap{display:grid;gap:clamp(1.8rem,4vw,3rem)}
@media (min-width:900px){ .split-band .wrap{grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);align-items:center} }
.split-copy p{color:var(--muted);margin-top:1rem;max-width:36rem}
.image-figure{margin:0 auto;max-width:520px}
/* ภาพรอง ⇒ yim-chest-opener ⇒ ครอปด้วย CSS เท่านั้น ⛔ ไม่แตะไฟล์ภาพ */
.image-figure img{width:100%;height:auto;aspect-ratio:1/1;max-height:380px;object-fit:cover;object-position:50% 20%;
  border-radius:var(--r-lg)}
@media (min-width:560px){ .image-figure img{aspect-ratio:4/3;max-height:420px} }
@media (min-width:900px){ .image-figure{max-width:none}
  .image-figure img{aspect-ratio:5/4;max-height:480px;object-position:50% 26%} }
.image-figure figcaption{margin-top:.8rem;font-size:.82rem;color:var(--muted)}

/* ================= system ⇒ แถวเลขใหญ่ ⛔ ไม่ใช่กำแพงการ์ด ================= */
.flow-steps{display:grid;gap:0;border-top:1px solid var(--line)}
.flow-step{display:grid;grid-template-columns:auto 1fr;gap:1.1rem;align-items:start;
  padding:1.5rem 0;border-bottom:1px solid var(--line)}
.step-number{font-family:var(--font-display);font-weight:700;font-size:1.7rem;color:var(--accent);line-height:1}
.flow-step p{color:var(--muted);margin-top:.35rem}
@media (min-width:900px){
  .flow-steps{grid-template-columns:repeat(4,1fr);gap:0;border-top:none}
  .flow-step{border-bottom:none;border-left:1px solid var(--line);padding:0 1.6rem;grid-template-columns:1fr}
  .flow-step:first-child{border-left:none;padding-left:0}
  .flow-step:last-child{padding-right:0}
  .step-number{margin-bottom:.7rem}
}

/* ================= ALIVE ⇒ แถวตัวอักษร ================= */
.alive-copy{max-width:44rem;margin-bottom:2rem}
.alive-grid{display:grid;gap:0;border-top:1px solid var(--line)}
.alive-grid article{display:grid;grid-template-columns:2.6rem 1fr;gap:1rem;align-items:baseline;
  padding:1.2rem 0;border-bottom:1px solid var(--line)}
.alive-grid span{font-family:var(--font-display);font-weight:700;font-size:1.43rem;color:var(--accent)}
.alive-grid p{color:var(--muted)}
@media (min-width:1024px){
  .alive-grid{grid-template-columns:repeat(5,1fr);border-top:none}
  .alive-grid article{grid-template-columns:1fr;border-bottom:none;border-left:1px solid var(--line);padding:0 1.2rem}
  .alive-grid article:first-child{border-left:none;padding-left:0}
}

/* ================= days ⇒ เส้นเวลา ⛔ ไม่ใช่การ์ด ================= */
.days-grid{display:grid;gap:0}
.days-grid > div{display:grid;grid-template-columns:minmax(6.5rem,auto) 1fr;gap:1.2rem;align-items:start;
  padding:1.35rem 0;border-bottom:1px solid var(--line)}
.days-grid > div:first-child{border-top:1px solid var(--line)}
.days-grid strong{font-family:var(--font-display);color:var(--accent);font-weight:600}
.days-grid p{color:var(--muted);margin-top:.3rem}
@media (max-width:559px){ .days-grid > div{grid-template-columns:1fr;gap:.35rem} }

/* ================= included ⇒ รายการมีเลข 2 คอลัมน์ ================= */
.included-list{display:grid;gap:0}
.included-list > div{display:grid;grid-template-columns:2.4rem 1fr;gap:1rem;align-items:start;
  padding:1.35rem 0;border-bottom:1px solid var(--line)}
.included-list > div:first-child{border-top:1px solid var(--line)}
.included-list span{font-family:var(--font-display);font-weight:700;color:var(--accent);font-size:.96rem}
.included-list p{color:var(--muted);margin-top:.3rem}
@media (min-width:900px){
  .included-list{grid-template-columns:1fr 1fr;column-gap:3rem}
  .included-list > div:nth-child(2){border-top:1px solid var(--line)}
}

/* ================= honesty ⇒ แถบเงียบ ================= */
.honesty-band .wrap{display:grid;gap:1.2rem;max-width:52rem}
.honesty-band p{color:var(--muted);font-size:.96rem}

/* ================= enroll ================= */
.enroll-section .wrap{display:grid;gap:clamp(1.8rem,4vw,3rem)}
@media (min-width:900px){ .enroll-section .wrap{grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);align-items:center} }
.enroll-copy p{color:var(--muted);margin-top:1rem;max-width:36rem}
.price-block{background:var(--white);border:1px solid var(--line);border-radius:var(--r-lg);
  padding:clamp(1.5rem,4vw,2.2rem);box-shadow:var(--shadow);display:grid;gap:.8rem;justify-items:start}
.price-block > p:first-child{color:var(--muted)}
.price-block s{color:var(--muted)}
.price-block strong{font-family:var(--font-display);font-size:clamp(1.95rem,5.4vw,2.65rem);line-height:1;color:var(--ink)}
.price-block small{font-size:.96rem;font-weight:500;color:var(--muted)}
.price-block > p:last-of-type{font-size:.85rem;color:var(--muted)}
.price-block .button{margin-top:.4rem}

/* ================= faq ================= */
.faq-list{display:grid;gap:0;border-top:1px solid var(--line);max-width:52rem}
.faq-list details{border-bottom:1px solid var(--line)}
.faq-list summary{cursor:pointer;padding:1.15rem 2rem 1.15rem 0;min-height:44px;position:relative;
  font-family:var(--font-display);font-weight:600;color:var(--ink);list-style:none}
.faq-list summary::-webkit-details-marker{display:none}
.faq-list summary::after{content:"+";position:absolute;right:.2rem;top:1.05rem;color:var(--accent);
  font-family:var(--font-display);font-size:1.22rem;line-height:1}
.faq-list details[open] summary::after{content:"\2212"}
.faq-list p{padding:0 0 1.25rem;color:var(--muted);max-width:44rem}

/* ================= contact + footer ================= */
.contact-section .wrap{display:grid;gap:1rem;max-width:52rem}
.contact-section p{color:var(--muted)}
.preview-gap{margin-top:1.2rem;border:1px dashed var(--line);border-radius:var(--r);
  padding:1rem 1.2rem;color:var(--muted);font-size:.87rem;background:var(--paper-deep)}
.site-footer{border-top:1px solid var(--line);background:var(--paper-deep);padding-block:2rem}
.site-footer .wrap{display:flex;flex-wrap:wrap;gap:.6rem 1.5rem;justify-content:space-between;
  color:var(--muted);font-size:.84rem}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none !important;transition:none !important;scroll-behavior:auto !important}
}

/* ================= ลงทะเบียน · QR ================= */
/* ⛔ ใช้โทเคนเท่านั้น ⛔ ห้ามใช้ var(--x, #สีจริง) ⇒ ค่าสำรองที่เป็นสีจริงคือค่าคงที่ปลอมตัว */
.contact-section .wrap{max-width:var(--maxw)}
.registration{display:grid;gap:clamp(1.6rem,4vw,2.6rem);margin-top:1.4rem}
@media (min-width:900px){ .registration{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start} }
.pay-copy p{color:var(--muted)}
.pay-amount{font-family:var(--font-display);font-weight:600;font-size:1.12rem;color:var(--ink)}
.pay-account strong{font-family:var(--font-display);font-size:1.28rem;letter-spacing:.02em;color:var(--ink)}
.line-id strong{font-family:var(--font-display);font-size:1.12rem;color:var(--accent)}
.qr-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(.8rem,2.5vw,1.2rem)}
.qr-slot{margin:0;padding:clamp(.7rem,2vw,1rem);background:var(--white);
  border:1px solid var(--line);border-radius:var(--r);text-align:center}
.qr-slot img{width:100%;height:auto;border-radius:calc(var(--r) - 6px)}
.qr-slot figcaption{margin-top:.6rem;color:var(--muted);font-size:.82rem;line-height:1.6}
.qr-link{display:block;border-radius:calc(var(--r) - 6px)}
.qr-link:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
@media (max-width:480px){ .qr-grid{grid-template-columns:1fr} }
/* 🔧 วัดแล้วพบว่า p ถูกรีเซ็ต margin เป็น 0 ⇒ ย่อหน้าทั้ง 5 ในกล่องโอนเงินติดกันหมด
   ใช้ค่า .9rem ตัวเดียวกับที่ .section-intro p:not(.eyebrow) ใช้อยู่แล้ว ⛔ ไม่ใช่ค่าใหม่ */
.pay-copy p + p{margin-top:.9rem}
