/* ==========================================================================
   เหนือ นวดเพื่อสุขภาพ — สไตล์ฝั่งลูกค้า
   ออกแบบแบบ mobile-first ลูกค้าส่วนใหญ่จองจากมือถือ
   ========================================================================== */

:root {
  --green-900: #1d4733;
  --green-700: #2f6f4e;
  --green-500: #4c9b73;
  --green-100: #e5f1ea;
  --sand-100: #f7f4ef;
  --sand-200: #ece5da;
  --ink-900: #22201d;
  --ink-600: #5b564f;
  --ink-400: #8a847b;
  --red-600: #b3402f;
  --red-100: #fbeae7;
  --amber-100: #fdf3e0;
  --amber-700: #9a6a13;
  --blue-100: #e8f0fa;
  --blue-700: #2f5c8f;
  --white: #fff;
  /* พื้นผิวการ์ด/แผง/ช่องกรอก ฯลฯ แยกจาก --white เพราะ --white อีกครึ่งของโค้ดใช้เป็น "ตัวหนังสือ/ขอบ
     สีขาวบนพื้นเขียว/แดง" (เช่น hero, ปุ่มหลัก, footer) ซึ่งต้องขาวเสมอไม่ว่าโหมดไหน */
  --surface: #fff;
  /* สีแบรนด์ (แยกจาก --green-* ที่ยังใช้สื่อความหมายสถานะ เช่น badge/alert สำเร็จ=เขียวเสมอทุกโหมด)
     ใช้จุดที่เป็น "สีประจำแบรนด์" ล้วน ๆ — โลโก้/แถบบน/ปุ่มหลัก/ลิงก์/ไฮไลต์ตัวที่เลือกอยู่ ฯลฯ
     โหมดกลางคืนจะสลับชุดนี้เป็นโทนส้ม/อำพันแทนเขียวทั้งระบบ ส่วนสีสถานะยังเขียว/แดง/เหลืองเหมือนเดิม */
  --brand-900: var(--green-900);
  --brand-700: var(--green-700);
  --brand-500: var(--green-500);
  --brand-100: var(--green-100);
  /* ตัวหนังสือบนป้ายพื้นอ่อน (--brand-100) เช่นการ์ดที่เลือกอยู่ — โหมดกลางวันต้องเข้ม โหมดกลางคืนต้องสว่าง
     (พื้น --brand-100 เองก็สลับกลับด้านเป็นสีเข้มโปร่งแสงตอนกลางคืนด้วย) จึงแยกเป็นตัวแปรของตัวเอง
     ไม่ผูกกับ --brand-900/500 ตรง ๆ เพราะสองตัวนั้นมีบทบาทอื่น (พื้นหลัง/กราเดียนต์) ที่ไม่ได้กลับด้านตาม */
  --brand-ink: var(--green-900);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(34, 32, 29, .09), 0 6px 18px rgba(34, 32, 29, .06);
  --max-width: 1080px;
}

/* ---------- โหมดกลางคืน — อิงตามการตั้งค่าของเครื่อง/เบราว์เซอร์โดยอัตโนมัติ (ไม่มีปุ่มสลับ) ----------
   หน้าลูกค้าใช้ var(--ink-900/600/400, --sand-100/200, --white/--surface) แทบทั้งหมดอยู่แล้ว จึงแค่สลับ
   ชุดสีกลาง ๆ นี้ก็ได้ผลทั้งเว็บทันที ยกเว้น .hero/.site-footer/.linkpage-* ที่จงใจใช้พื้นเขียว/ดำเข้มอยู่แล้ว
   ไม่ว่าโหมดไหนจึงไม่ต้องแตะ ส่วน --brand-* เปลี่ยนเป็นโทนส้ม/อำพัน (สีเขียว/แดง/เหลืองที่สื่อความหมาย
   สถานะ เช่น badge/alert ยังคงเดิมทุกโหมด ไม่ปนกับสีแบรนด์เหล่านี้) */
@media (prefers-color-scheme: dark) {
  :root {
    --sand-100: #15140f;
    --sand-200: #322f27;
    --ink-900: #f0eee7;
    --ink-600: #b7b2a6;
    --ink-400: #8f8a7e;
    --surface: #1e1d18;
    --shadow: 0 1px 3px rgba(0, 0, 0, .4), 0 6px 18px rgba(0, 0, 0, .35);
    --brand-900: #2f6f4e;
    --brand-700: #4c9b73;
    --brand-500: #4c9b73;
    --brand-100: rgba(76, 155, 115, .16);
    --brand-ink: #4c9b73;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Noto Sans Thai", "Sarabun", "Leelawadee UI", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-900);
  background: var(--sand-100);
}

h1, h2, h3 { line-height: 1.35; margin: 0 0 .5em; }

a { color: var(--brand-700); }

img { max-width: 100%; }

.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 1rem; }
.container.narrow { max-width: 640px; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--brand-700); color: var(--white); padding: .75rem 1rem;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--sand-200);
  position: sticky; top: 0;
  /* z-index ต้องสูงกว่า .site-nav-backdrop (35) เสมอ — .site-header ที่มี position:sticky
     สร้าง stacking context ของตัวเอง ทำให้ .site-nav ข้างในที่ตั้ง z-index:40 ไว้ ถูก "ขัง"
     อยู่ในชั้นของ .site-header แทนที่จะเทียบกับ .site-nav-backdrop ตรง ๆ — ถ้า .site-header
     ต่ำกว่า backdrop (เดิม 20 < 35) ฉากหลังมืดจะซ้อนทับบังคลิกลิงก์ในเมนูทั้งหมด แม้มองด้วยตา
     จะดูเหมือนเมนูอยู่ข้างหน้าก็ตาม (บั๊กจริงที่เจอ: กดลิงก์ในเมนูมือถือแล้วไม่ไปไหนเลย ทุกแพลตฟอร์ม) */
  z-index: 45;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 64px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink-900); }
.brand-mark {
  background: var(--brand-700); color: var(--white);
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; font-size: .85rem; font-weight: 700;
}
.brand-text { font-weight: 700; font-size: 1.05rem; }

.site-nav { display: flex; align-items: center; gap: 1rem; }
.site-nav a { text-decoration: none; color: var(--ink-600); padding: .35rem 0; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--brand-700); font-weight: 600; }
.nav-phone {
  background: var(--brand-100); border-radius: 999px;
  padding: .35rem .9rem !important; color: var(--brand-ink) !important;
}

/* ปุ่มแฮมเบอร์เกอร์ — ซ่อนไว้บนจอกว้าง โผล่เฉพาะจอแคบที่เมนูเต็มแถวไม่พอ (ดู @media ด้านล่าง)
   บั๊กที่พบจริงก่อนแก้: เมนู 4 ลิงก์ + ปุ่มโทร ตกลงมา 2 บรรทัดบนจอ 375px ไม่มีทางย่อเป็นเมนูพับได้เลยสักจุด */
/* เมนูมือถือทั้งหมดขับเคลื่อนด้วย checkbox + CSS (:checked, :has()) ล้วน ๆ ไม่มี JS แตะต้องเลย
   ประวัติ: เวอร์ชันก่อนหน้าใช้ JS toggle class .is-open ให้ปุ่ม/เมนู แล้วเจอบั๊กจริงข้ามแพลตฟอร์ม
   (ทั้ง iOS และ Android) ที่กดลิงก์ในเมนูแล้วไม่ไปหน้าไหนเลย ลองแก้หลายจุด (ตัด overflow-y,
   เพิ่ม touch-action) ก็ยังไม่หายขาด สุดท้ายตัด JS ออกจากเส้นทางนี้ทั้งหมดแทน — ลิงก์ในเมนูเป็น
   <a> ธรรมดาไม่มีอะไรมาแตะต้อง action ของมันเลย รับประกันว่ากดแล้วไปแน่นอนไม่ว่าเบราว์เซอร์ไหน */
.nav-toggle-checkbox {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.menu-toggle {
  display: none; background: transparent; border: 1px solid var(--sand-200);
  color: var(--ink-900); border-radius: var(--radius-sm); padding: .5rem .9rem;
  font: inherit; font-weight: 600; cursor: pointer;
}
.menu-toggle-open-label { display: none; }
.site-nav-backdrop { display: none; }

@media (max-width: 640px) {
  body:has(.nav-toggle-checkbox:checked) { overflow: hidden; }
  .menu-toggle { display: block; }
  /* .site-nav กลายเป็น position:fixed ด้านล่าง จึงหลุดจาก flex flow ของ .header-inner ไปเอง
     เหลือแค่ .brand กับ .menu-toggle 2 ตัวให้ justify-content:space-between ดันสุดซ้าย-ขวา */
  .site-nav {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: fixed; top: 0; left: 0; bottom: 0;
    width: min(280px, 82vw);
    background: var(--surface);
    padding: 4.25rem 1.25rem 1.5rem;
    box-shadow: 6px 0 24px rgba(34, 32, 29, .18);
    transform: translateX(-100%);
    transition: transform .25s ease;
    z-index: 40;
    /* ไม่ใส่ overflow-y:auto — มีแค่ 4 ลิงก์ ไม่มีทางสูงเกินจอจนต้องเลื่อนอยู่แล้ว */
  }
  body:has(.nav-toggle-checkbox:checked) .site-nav { transform: translateX(0); }
  body:has(.nav-toggle-checkbox:checked) .menu-toggle-closed-label { display: none; }
  body:has(.nav-toggle-checkbox:checked) .menu-toggle-open-label { display: inline; }
  .site-nav a {
    padding: .85rem .25rem; border-bottom: 1px solid var(--sand-200);
    touch-action: manipulation;
  }
  .nav-phone { margin-top: .85rem; text-align: center; }
  body:has(.nav-toggle-checkbox:checked) .site-nav-backdrop {
    display: block; position: fixed; inset: 0;
    background: rgba(20, 19, 17, .45); z-index: 35;
    animation: nav-backdrop-in .2s ease;
  }
  @keyframes nav-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--brand-900), var(--brand-700));
  color: var(--white); padding: 3.5rem 0; text-align: center;
}
.hero-eyebrow { letter-spacing: .18em; font-size: .8rem; opacity: .8; margin: 0 0 .5rem; }
.hero-title { font-size: clamp(1.8rem, 6vw, 2.8rem); margin-bottom: .75rem; }
.hero-sub { opacity: .92; margin: 0 auto 1rem; }
.hero-note {
  display: table; margin: 0 auto 1.5rem; padding: .35rem 1rem;
  background: var(--red-600); color: var(--white); border-radius: 999px;
  font-size: .85rem; font-weight: 700;
}

/* ---------- Sections ---------- */
.section { padding: 3rem 0; }
.section-alt { background: var(--sand-200); }
.section-title { font-size: 1.5rem; text-align: center; margin-bottom: 1.75rem; }
.page-title { font-size: 1.6rem; margin: 1.5rem 0 1rem; }
.lead { color: var(--ink-600); }
.muted { color: var(--ink-400); font-weight: 400; font-size: .9rem; }
.hint { color: var(--ink-600); font-size: .9rem; }
.empty-note { text-align: center; color: var(--ink-600); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--sand-200);
  border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow);
}
.card-title { font-size: 1.15rem; margin-bottom: .35rem; }
.card-desc { color: var(--ink-600); font-size: .93rem; margin: 0 0 1rem; }

.service-grid, .option-grid {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.shop-slider {
  position: relative;
}
.shop-slider-track {
  display: flex;
  overflow: hidden;
  border-radius: var(--radius);
  touch-action: pan-y;
}
.shop-slider-track-inner {
  display: flex;
  width: 100%;
  transform: translateX(calc(var(--slider-index, 0) * -100%));
  transition: transform .35s ease;
}
.shop-slide {
  flex: 0 0 100%;
  min-width: 0;
}
.shop-slide-photo {
  display: block;
  width: 100%; height: 320px; object-fit: cover;
}
.shop-slider-dots {
  display: flex; justify-content: center; gap: .1rem;
  margin-top: .5rem;
}
.shop-slider-dot {
  /* จุดที่เห็นเล็ก แต่พื้นที่แตะ (tap target) ใหญ่ 44px ตามมาตรฐานมือถือ — ใช้ background-clip
     ให้วงกลมสีอยู่แค่กึ่งกลางกล่อง padding ทั้งหมดยังกดโดนได้ */
  width: 44px; height: 44px; padding: calc(44px / 2 - .28rem);
  border: 0; border-radius: 50%; background-clip: content-box;
  background-color: var(--sand-200);
  cursor: pointer;
}
.shop-slider-dot.is-active {
  /* ใช้ background-color ไม่ใช่ background (shorthand) — shorthand จะ reset
     background-clip กลับเป็น border-box ทำให้จุดที่ active กลายเป็นวงกลมใหญ่เต็ม
     พื้นที่แตะ 44px แทนที่จะเป็นจุดเล็กเหมือนจุดอื่น (บั๊กที่พบจริงบนมือถือ) */
  background-color: var(--brand-700);
  transform: scale(1.2);
}

.service-card-photo {
  display: block; width: calc(100% + 2.5rem); max-width: none;
  margin: -1.25rem -1.25rem .9rem; height: 160px;
  object-fit: cover; border-radius: var(--radius) var(--radius) 0 0;
}

.price-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.price-table th, .price-table td { padding: .45rem 0; text-align: left; }
.price-table thead th { color: var(--ink-400); font-weight: 600; font-size: .82rem; border-bottom: 1px solid var(--sand-200); }
.price-table tbody tr + tr td { border-top: 1px dashed var(--sand-200); }
.price-cell { text-align: right; font-weight: 600; white-space: nowrap; }
.option-price { font-weight: 700; color: var(--brand-700); margin: 0; }

.cta-box { text-align: center; }

/* ---------- ปุ่ม ---------- */
.btn {
  display: inline-block; border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: .7rem 1.4rem; font: inherit; font-weight: 600; cursor: pointer;
  text-decoration: none; text-align: center;
  transition: background .15s, opacity .15s, transform .1s, box-shadow .15s;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn-lg { padding: .9rem 2rem; font-size: 1.05rem; }
.btn-primary { background: var(--brand-700); color: var(--white); box-shadow: 0 2px 8px rgba(47, 111, 78, .25); }
.btn-primary:hover { background: var(--brand-900); box-shadow: 0 4px 12px rgba(47, 111, 78, .3); }
.btn-ghost { background: transparent; border-color: var(--sand-200); color: var(--ink-600); }
.btn-ghost:hover { background: var(--sand-200); }
.btn-danger { background: var(--red-600); color: var(--white); }
.btn-danger-ghost { background: transparent; border-color: var(--red-600); color: var(--red-600); }
.btn-danger-ghost:hover { background: var(--red-100); }
.btn:disabled, .btn[aria-busy="true"] { opacity: .55; cursor: not-allowed; }
/* [hidden] แพ้ .btn ที่มี display:inline-block เพราะ author style ชนะ UA style เสมอ (เหมือน .duration-choice/.modal-overlay ด้านล่าง) */
.btn[hidden] { display: none; }

/* ---------- หน้ารวมลิงก์ร้าน (links.php) ---------- */
/* ตั้งใจให้เหมือนแอปมือถือเต็มจอ ความกว้างจำกัดแม้เปิดบนแท็บเล็ต/จอใหญ่
   หน้านี้ใช้พื้นเขียว/ดำเข้มของตัวเองเสมออยู่แล้วไม่ว่าโหมดไหน (ไม่ใช่ "พื้นผิว" ที่ควรสลับตามธีม) แต่ตัว
   --ink-900/--sand-100/--sand-200 เป็นตัวแปร global ที่ถูก @media (prefers-color-scheme: dark) ทับค่าไว้
   ที่ :root ด้วย ถ้าไม่ล็อกค่าไว้ที่นี่โดยเฉพาะ พอเข้าโหมดมืด ปุ่มพื้นขาว (.linkpage-btn ใช้ var(--white)
   คงที่) จะกลายเป็นตัวหนังสือสว่างบนพื้นขาว มองไม่เห็นเลย (บั๊กที่พบจริง) และพื้นหลังไล่สีของหน้าเองก็จะ
   เพี้ยนไปด้วยเพราะ --ink-900 เป็นสีปลายไล่สี */
.linkpage-body {
  --ink-900: #22201d;
  --sand-100: #f7f4ef;
  --sand-200: #ece5da;
  margin: 0; min-height: 100vh; min-height: 100dvh;
  display: flex; justify-content: center;
  background: linear-gradient(180deg, var(--green-900), var(--ink-900)) fixed;
  background-size: cover; background-position: center;
  position: relative;
  font-family: "Noto Sans Thai", "Sarabun", "Leelawadee UI", system-ui, -apple-system, "Segoe UI", sans-serif;
}
.linkpage-overlay {
  position: fixed; inset: 0;
  background: linear-gradient(180deg, rgba(29,71,51,.75), rgba(34,32,29,.88));
  backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
}
.linkpage {
  position: relative; z-index: 1;
  width: 100%; max-width: 26rem;
  margin: 0 auto; padding: 2.5rem 1.25rem 3rem;
  text-align: center; color: var(--white);
}
.linkpage-avatar {
  width: 6.5rem; height: 6.5rem; border-radius: 50%; object-fit: cover;
  margin: 0 auto 1rem; display: block; border: 3px solid var(--white); box-shadow: var(--shadow);
}
.linkpage-name { margin: 0 0 .35rem; color: var(--white); }
.linkpage-address { color: var(--sand-100); opacity: .85; font-size: .88rem; margin: 0 0 1.75rem; }
.linkpage-list { display: flex; flex-direction: column; gap: .85rem; }
.linkpage-btn {
  display: flex; align-items: center; gap: .85rem; width: 100%;
  padding: .95rem 1.25rem; border-radius: 999px;
  background: var(--white); border: 1px solid var(--sand-200); color: var(--ink-900);
  font-weight: 600; text-decoration: none; box-shadow: var(--shadow);
  transition: transform .1s, background .15s;
}
.linkpage-btn:hover { background: var(--sand-100); }
.linkpage-btn:active { transform: scale(.98); }
.linkpage-btn-primary { background: var(--green-700); color: var(--white); border-color: var(--green-700); }
.linkpage-btn-primary:hover { background: var(--green-900); }
.linkpage-icon {
  display: flex; align-items: center; justify-content: center; flex: none;
  width: 2rem; height: 2rem; border-radius: 50%;
  background: rgba(34, 32, 29, .08);
}
.linkpage-btn-primary .linkpage-icon { background: rgba(255, 255, 255, .18); }
.linkpage-icon svg { width: 1.15rem; height: 1.15rem; }
.linkpage-label { flex: 1; text-align: center; padding-right: 2rem; }
.linkpage-back { margin-top: 2rem; }
.linkpage-back a { color: var(--sand-100); opacity: .75; font-size: .85rem; text-decoration: none; }
.linkpage-back a:hover { opacity: 1; text-decoration: underline; }

:focus-visible { outline: 3px solid var(--brand-500); outline-offset: 2px; }

/* ---------- ขั้นตอนการจอง ---------- */
.booking-page { padding-bottom: 3rem; }

.steps {
  display: flex; gap: .5rem; list-style: none; padding: 0; margin: 0 0 1.5rem;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.steps.is-scrollable {
  -webkit-mask-image: linear-gradient(to right, black calc(100% - 28px), transparent);
  mask-image: linear-gradient(to right, black calc(100% - 28px), transparent);
}
.step {
  display: flex; align-items: center; gap: .45rem; white-space: nowrap;
  color: var(--ink-400); font-size: .9rem; padding: .4rem .7rem;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--sand-200);
}
.step span {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--sand-200); color: var(--ink-600); font-size: .78rem; font-weight: 700;
}
.step.is-active {
  color: var(--brand-ink); border-color: var(--brand-500);
  box-shadow: 0 2px 8px rgba(76, 155, 115, .2);
}
.step.is-active span { background: var(--brand-700); color: var(--white); }
.step.is-done span { background: var(--brand-500); color: var(--white); font-size: 0; }
.step.is-done span::after { content: "\2713"; font-size: .78rem; }

@keyframes panel-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.panel {
  background: var(--surface); border: 1px solid var(--sand-200);
  border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow);
  animation: panel-in .3s ease;
}
.panel-title { font-size: 1.1rem; margin: 1.5rem 0 .75rem; }
.panel-title:first-child { margin-top: 0; }
.panel-actions {
  display: flex; gap: .75rem; justify-content: flex-end;
  margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--sand-200);
  flex-wrap: wrap;
}

/* ---------- ตัวเลือกแบบการ์ด ---------- */
.choice-grid {
  display: grid; gap: .75rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.choice { position: relative; display: block; cursor: pointer; }
.choice input {
  position: absolute; opacity: 0; width: 0; height: 0;
}
.choice-body {
  position: relative;
  display: flex; flex-direction: column; gap: .2rem;
  border: 2px solid var(--sand-200); border-radius: var(--radius-sm);
  padding: .85rem 1rem; height: 100%; background: var(--surface);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.choice:hover .choice-body { border-color: var(--brand-500); }
.choice input:checked + .choice-body {
  border-color: var(--brand-700); background: var(--brand-100);
  box-shadow: 0 2px 10px rgba(47, 111, 78, .15);
  /* พื้น --brand-100 นี้ไม่ใช่พื้นการ์ด/หน้าเว็บทั่วไปที่กลับสีตามธีมแบบเดียวกับพื้นหลัง
     แต่เป็น "ป้ายไฮไลต์" ของตัวเอง (สว่างตอนกลางวัน มืดโปร่งแสงตอนกลางคืน) ตัวหนังสือข้างในจึง
     ต้องใช้ --brand-ink ไม่ใช่ปล่อยตาม --ink-900 ทั่วไป ไม่งั้นโหมดกลางคืนจะกลืนกับพื้นป้ายนี้ */
  color: var(--brand-ink);
}
.choice input:checked + .choice-body .choice-desc { color: var(--brand-ink); }
.choice input:checked + .choice-body::after {
  content: "\2713";
  position: absolute; top: -9px; right: -9px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--brand-700); color: var(--white);
  font-size: .7rem; font-weight: 700;
  display: grid; place-items: center;
  box-shadow: 0 1px 4px rgba(34, 32, 29, .25);
}
.choice input:focus-visible + .choice-body { outline: 3px solid var(--brand-500); outline-offset: 2px; }
.choice-thumb {
  display: block; width: 100%; height: 90px; object-fit: cover;
  border-radius: var(--radius-sm); margin-bottom: .5rem;
}
.choice-title { font-weight: 600; }
.choice-desc { font-size: .85rem; color: var(--ink-600); }
.choice-price { font-weight: 700; color: var(--brand-700); }
.duration-choice[hidden] { display: none; }

/* ---------- ฟอร์ม ---------- */
.field { display: block; margin-bottom: 1.15rem; }
.field-label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .95rem; }
.req { color: var(--red-600); }
.field input, .field textarea, .field select {
  width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box;
  font: inherit; padding: .7rem .85rem;
  border: 1px solid var(--sand-200); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink-900);
}
/* input[type=date] ใน webview บางตัว (เช่น เบราว์เซอร์ในแอป LINE) ไม่ยอมหด
   ตาม width:100% ของ container เอง ทำให้ล้นขอบจอ — บังคับด้วย min-width:0 ข้างบน
   และกันเผื่ออีกชั้นตรงนี้เฉพาะ type=date เพราะเจอปัญหาจริงเฉพาะช่องนี้ */
.field input[type="date"] { min-width: 0; width: 100%; }
.field input:focus, .field textarea:focus { border-color: var(--brand-500); }
.field textarea { resize: vertical; }
.field-error { display: block; color: var(--red-600); font-size: .87rem; margin-top: .3rem; }
.field.has-error input, .field.has-error textarea { border-color: var(--red-600); }

/* ---------- ช่วงเวลา ---------- */
.slot-grid {
  display: grid; gap: .6rem;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  min-height: 48px;
}
/* ข้อความแจ้งเตือน (เช่น "คิวเต็มแล้ว") ต้องกว้างเต็มแถว ไม่ใช่บีบอยู่ในช่องเดียวของกริดจนตัดคำมั่ว */
.slot-grid .hint, .slot-grid .alert { grid-column: 1 / -1; }
.slot {
  font: inherit; font-weight: 600; cursor: pointer;
  padding: .65rem .3rem; border-radius: var(--radius-sm);
  border: 2px solid var(--sand-200); background: var(--surface); color: var(--ink-900);
}
.slot:hover { border-color: var(--brand-500); }
.slot[aria-pressed="true"] { background: var(--brand-700); border-color: var(--brand-700); color: var(--white); }
.slot-end { display: block; font-size: .76rem; font-weight: 400; opacity: .75; }

/* ---------- สรุป ---------- */
.summary {
  display: grid; grid-template-columns: minmax(110px, auto) 1fr;
  gap: .5rem 1rem; margin: 0 0 1.25rem;
  background: var(--sand-100); border-radius: var(--radius); padding: 1.15rem;
}
.summary dt { color: var(--ink-600); font-size: .92rem; }
.summary dd { margin: 0; font-weight: 600; }
.summary .total { color: var(--brand-700); font-size: 1.2rem; }
.summary .deposit-amount { color: var(--red-600); }
.summary .discount-amount { color: var(--brand-700); }

.chip {
  display: inline-block; background: var(--brand-100); color: var(--brand-ink);
  border-radius: 999px; padding: .15rem .7rem; font-size: .85rem;
  margin: 0 .3rem .3rem 0; font-weight: 500;
}

/* ---------- คูปองส่วนลด ---------- */
.coupon-input-row { display: flex; gap: .6rem; }
.coupon-input-row input { flex: 1; }

/* ---------- เข้าคิวรอ ---------- */
.waitlist-panel { margin-top: 1rem; }

/* ---------- แจ้งเตือน ---------- */
.alert {
  border-radius: var(--radius-sm); padding: .9rem 1.1rem;
  margin: 1rem 0; border: 1px solid transparent;
}
.alert-error   { background: var(--red-100);   border-color: #eec6bf; color: var(--red-600); }
.alert-success { background: var(--green-100); border-color: #bcdcc9; color: var(--green-900); }
.alert-info    { background: var(--blue-100);  border-color: #c6d8ec; color: var(--blue-700); }
.alert-warning { background: var(--amber-100); border-color: #ecd9ac; color: var(--amber-700); }

/* ---------- หน้ารายละเอียดการจอง ---------- */
.booking-code { color: var(--ink-600); font-size: .95rem; margin-bottom: .25rem; }

.status-badge {
  display: inline-block; border-radius: 999px; padding: .3rem 1rem;
  font-weight: 700; font-size: .9rem; margin: 0 0 1.25rem;
}
.status-pending    { background: var(--amber-100); color: var(--amber-700); }
.status-confirmed  { background: var(--green-100); color: var(--green-900); }
.status-travelling { background: var(--blue-100);  color: var(--blue-700); }
.status-arrived    { background: var(--blue-100);  color: var(--blue-700); }
.status-in_service { background: #ece2f7; color: #5c3d8a; }
.status-completed  { background: var(--sand-200); color: var(--ink-600); }
.status-cancelled  { background: var(--red-100); color: var(--red-600); }
.status-no_show    { background: var(--red-100); color: var(--red-600); }

.detail-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin: 1.5rem 0; }

.success-page { text-align: center; }
.success-mark {
  width: 68px; height: 68px; margin: 1rem auto; border-radius: 50%;
  background: var(--green-100); color: var(--green-700);
  display: grid; place-items: center; font-size: 2.2rem; font-weight: 700;
}
.success-page .summary { text-align: left; }

.cancel-form { margin-top: 1.5rem; }

/* ---------- เนื้อหาแบบบทความ ---------- */
.prose h2 { font-size: 1.15rem; margin-top: 2rem; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: .4rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--brand-900); color: #d9e6de; margin-top: 3rem; padding: 2.5rem 0 1.5rem;
}
.footer-grid {
  display: grid; gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.footer-title { font-size: 1rem; color: var(--white); margin-bottom: .75rem; }
.footer-line { margin: .2rem 0; font-size: .92rem; }
.footer-social { display: flex; gap: .55rem; margin-top: .85rem; }
.footer-social-link {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255, 255, 255, .1); color: var(--white);
  transition: background .15s ease;
}
.footer-social-link:hover { background: rgba(255, 255, 255, .22); }
.footer-social-link svg { width: 17px; height: 17px; }
.site-footer a { color: #b9d6c6; }
.footer-credentials { display: flex; flex-wrap: wrap; gap: 1.1rem; }
.footer-credential-item { display: flex; flex-direction: column; align-items: center; width: 128px; text-decoration: none; gap: .4rem; }
.footer-license-thumb {
  display: block; width: 128px; border-radius: var(--radius-sm);
  overflow: hidden; border: 1px solid rgba(255, 255, 255, .3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
  transition: transform .15s ease;
}
.footer-credential-item:hover .footer-license-thumb { transform: translateY(-3px); }
.footer-license-thumb img { display: block; width: 100%; height: auto; }
.footer-credential-label { font-size: .82rem; color: #b9d6c6; text-align: center; }
.copyright {
  text-align: center; font-size: .85rem; opacity: .7;
  margin: 2rem 0 0; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, .12);
}

@media (max-width: 480px) {
  .panel { padding: 1.15rem; }
  .panel-actions .btn { flex: 1 1 auto; }
  .summary { grid-template-columns: 1fr; gap: .15rem .5rem; }
  .summary dd { margin-bottom: .6rem; }
}

/* ---------- แถบหัวแบบย่อของหน้า Booking Flow (ไม่มี navigation หลัก) ---------- */
.booking-flow-bar {
  background: var(--surface); border-bottom: 1px solid var(--sand-200);
  position: sticky; top: 0; z-index: 20;
}
.booking-flow-bar-inner { display: flex; align-items: center; min-height: 56px; }
.brand-sm .brand-mark { width: 32px; height: 32px; font-size: .75rem; }
.brand-sm .brand-text { font-size: .95rem; }
.booking-flow-main { display: block; }

.btn-block { width: 100%; }

/* ---------- มัดจำ / แจ้งเตือนไม่คืนเงิน ---------- */
.deposit-notice { font-size: .93rem; line-height: 1.6; }

/* ---------- สถานะเพิ่มเติม (ระบบมัดจำ) ---------- */
.status-pending_payment   { background: var(--amber-100); color: var(--amber-700); }
.status-payment_submitted { background: var(--blue-100);  color: var(--blue-700); }
.status-rejected          { background: var(--red-100);   color: var(--red-600); }
.status-expired           { background: var(--sand-200);  color: var(--ink-600); }

/* ---------- แถบไทม์ไลน์สถานะ (หน้ารายละเอียดคิวของลูกค้า) ---------- */
/* ---------- อัปโหลดสลิป ---------- */
.slip-picker {
  border: 2px dashed var(--sand-200); border-radius: var(--radius);
  padding: 1.1rem; text-align: center; transition: border-color .15s, background .15s;
}
.slip-picker:hover { border-color: var(--brand-500); background: var(--brand-100); }
.slip-picker input[type="file"] {
  display: block; margin: .6rem auto 0; max-width: 100%;
}
.slip-picker input[type="file"]::file-selector-button {
  font: inherit; font-weight: 600; cursor: pointer;
  padding: .55rem 1.1rem; margin-right: .75rem;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  background: var(--brand-700); color: var(--white);
  transition: background .15s;
}
.slip-picker input[type="file"]::file-selector-button:hover { background: var(--brand-900); }
.slip-preview-img {
  display: block; max-width: 100%; max-height: 360px; margin: .75rem 0;
  border-radius: var(--radius); border: 1px solid var(--sand-200); object-fit: contain;
}
.payment-qr {
  display: block; max-width: 240px; margin: 1rem auto; border-radius: var(--radius);
  border: 1px solid var(--sand-200);
}

/* ---------- รีวิวจากลูกค้า (ภาพแคปหน้าจอแชท) ---------- */
.review-gallery { columns: 2; column-gap: 1rem; }
@media (min-width: 640px) { .review-gallery { columns: 3; } }
@media (min-width: 960px) { .review-gallery { columns: 4; } }
.review-card {
  display: block; margin: 0 0 1rem; break-inside: avoid;
  border-radius: var(--radius); overflow: hidden; text-decoration: none;
  background: var(--surface); border: 1px solid var(--sand-200); box-shadow: var(--shadow);
}
.review-photo { display: block; width: 100%; height: auto; }
.review-caption { margin: 0; padding: .5rem .75rem; font-size: .82rem; color: var(--ink-600); }

/* ---------- ป๊อปอัปเงื่อนไขการรับบริการ (ก่อนชำระเงินมัดจำ) ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(20, 19, 17, .55);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
/* [hidden] แพ้ .modal-overlay ที่มี display:flex เพราะ specificity เท่ากันแต่ author style
   ชนะ UA stylesheet เสมอ — ถ้าไม่ประกาศทับตรงนี้ modal.hidden=true จะไม่ซ่อนจริง
   (บั๊กที่พบจริง: กดปุ่ม "รับทราบ" แล้ว modal ยังค้างอยู่บนจอ) */
.modal-overlay[hidden] { display: none; }
.modal-box {
  background: var(--surface); border-radius: var(--radius);
  max-width: 32rem; width: 100%; max-height: 85vh; overflow-y: auto;
  padding: 1.5rem; box-shadow: var(--shadow);
}
.modal-box h2 { font-size: 1.25rem; margin: 0 0 .85rem; }
.modal-box h3 { font-size: 1rem; margin: 1rem 0 .4rem; }
.modal-box ul { margin: 0 0 .5rem; padding-left: 1.2rem; }
.modal-box li { margin-bottom: .3rem; }
.modal-box .alert { margin: 1rem 0; }
.modal-box .btn { margin-top: .5rem; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
