/* Bright Mind · หน้าตัวอย่างสถาบันกวดวิชา (perdna) */
:root {
  --green: #22345F;   /* สีหลัก กรมท่า */
  --green-2: #34508F;
  --ink: #1F2638;
  --muted: #5E6578;
  --cream: #FCEBD7;
  --cream-2: #F7F8FB;
  --sand: #F2D2AE;
  --border: #E4E8F0;
  --gold: #A4560B;
  --line: #00873C;
  --line-d: #00722F;
  --ok: #2F7A3A;
  --warn: #A5481A;
  --note: #FFF5CF;
  --note-b: #F1D77A;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(34, 52, 95, .08);
  --dock-h: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "IBM Plex Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px; line-height: 1.6; color: var(--ink); background: #fff;
  padding-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom));
}
img { max-width: 100%; display: block; }
svg { flex: none; }
a { color: inherit; }
h1, h2, h3 { font-family: "Prompt", "IBM Plex Sans Thai", sans-serif; color: var(--green); line-height: 1.3; margin: 0; font-weight: 600; }
h1 { font-size: clamp(30px, 8.4vw, 50px); color: #fff; }
h2 { font-size: clamp(22px, 5.8vw, 30px); }
h2::after { content: ""; display: block; width: 44px; height: 3px; border-radius: 3px; background: var(--green-2); margin-top: 10px; }
h3 { font-size: 17px; }
p { margin: 0; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.sub { color: var(--muted); margin-top: 12px; }
.link { color: var(--green-2); text-decoration: underline; text-underline-offset: 3px; }
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: .02em; margin-bottom: 8px; }

.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic-line { width: 22px; height: 22px; fill: currentColor; --li: var(--line); flex: none; }

/* ปุ่ม */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border-radius: 12px; border: 1.5px solid transparent;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: background .15s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-dark { background: var(--green); color: #fff; }
.btn-dark:hover { background: #1A2849; }
.btn-line { background: var(--line); color: #fff; }
.btn-line:hover { background: var(--line-d); }
.btn-cream { background: #B05A06; color: #fff; border-color: #B05A06; }  /* ปุ่มแผนที่สีส้มตาม cover (เข้มขึ้นให้ตัวขาวอ่านชัด) */
.btn-ghost { background: #fff; color: var(--green); border-color: var(--sand); }
.btn-ghost:hover { background: var(--cream-2); }
:focus-visible { outline: 3px solid #A9BCE3; outline-offset: 2px; }

/* แถบหน้าตัวอย่าง */
.demo-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #18233F; color: #fff; font-size: 13px; padding: 8px 16px; }
.demo-explain { min-height: 36px; background: #FFD95A; color: #3A2A00; border: 0; border-radius: 999px; padding: 6px 12px; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.demo-bar .demo-sub { display: none; }
@media (min-width: 420px) { .demo-bar .demo-sub { display: inline; } }
.note { display: none; margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: var(--note); border: 1px dashed var(--note-b); color: #5A4300; font-size: 14px; }
.note::before { content: "แก้ปัญหา: "; font-weight: 600; }
body.explain .note { display: block; }

/* หัวเว็บ */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.97); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; flex-direction: column; text-decoration: none; line-height: 1; }
.brand-row { flex-direction: row; align-items: center; gap: 10px; }
.brand-icon-img { width: 48px; height: 40px; display: block; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-mark { font-family: "Prompt", sans-serif; font-weight: 600; font-size: 21px; color: var(--green); letter-spacing: 0; }
.brand-sub2 { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; color: var(--green); margin-top: 2px; }

/* รูปสำรอง */
.ph { position: relative; overflow: hidden; background: linear-gradient(135deg, #E6ECF6, #FBF4EA); margin: 0; }
.ph img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.ph-label { position: absolute; inset: 0; display: grid; place-items: center; color: #9C8F78; font-size: 14px; }

/* ฮีโร่ */
.hero { position: relative; background: #2A2620; color: #fff; }
.ph-hero { position: absolute; inset: 0; background: linear-gradient(135deg, #5A3E2B, #2A1D15); }
.ph-hero img { object-position: 60% 70%; }
.ph-hero .ph-label { color: rgba(255,255,255,.4); align-items: end; padding-bottom: 90px; }
.ph-hero::after { content: ""; position: absolute; inset: 0; z-index: 2; background: linear-gradient(180deg, rgba(30,18,10,.72) 0%, rgba(30,18,10,.35) 55%, rgba(30,18,10,.15) 100%); }
.hero-text { position: relative; z-index: 3; padding-top: 36px; padding-bottom: 96px; min-height: 340px; }
.hero .eyebrow { color: #F2D8B8; }
.hero h1 { text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.lead { font-size: 17px; margin-top: 10px; color: #F3EDE3; text-shadow: 0 1px 8px rgba(0,0,0,.4); }

.hero-card { position: relative; z-index: 4; margin-top: -64px; }
.hero-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; background: #fff; padding: 14px; border-radius: 18px; box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.hero-actions .btn { padding: 0 8px; }

.quick { list-style: none; margin: 14px 0 0; padding: 4px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.quick li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.quick li:last-child { border-bottom: 0; }
.quick .ic { color: var(--green-2); }
.q-k { color: var(--muted); min-width: 60px; }
.q-v { font-weight: 600; margin-left: auto; text-align: right; }
.q-v .link { display: inline-block; padding: 10px 0; margin: -10px 0; }
.q-v.is-open { color: var(--ok); }
.q-v.is-closed { color: var(--warn); }

.feats { list-style: none; margin: 12px 0 0; padding: 14px 8px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: var(--cream); border-radius: var(--radius); }
.feats li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; font-size: 13px; color: var(--muted); line-height: 1.35; }
.feats .ic { width: 28px; height: 28px; color: #D97A12; }
.feats strong { display: block; color: var(--green); font-size: 14px; }

/* ส่วนทั่วไป */
.section { padding: 44px 0; }
.section-tint { background: var(--cream-2); }
.two-col { display: grid; gap: 24px; }
.two-col > .note { grid-column: 1 / -1; margin-top: 0; }

/* เมนู */
.dishes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
.dish { position: relative; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; padding-bottom: 10px; }
.ph-dish { aspect-ratio: 1; }
.dish h3 { font-family: "IBM Plex Sans Thai", sans-serif; font-weight: 600; font-size: 14px; color: var(--ink); line-height: 1.35; margin: 8px 8px 2px; }
.price { font-size: 14px; font-weight: 600; color: var(--gold); margin: 0 8px; }
.tag { position: absolute; z-index: 2; top: 6px; left: 6px; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.94); color: var(--green); }
.tag-hot { background: #B3261E; color: #fff; }

.fullmenu { margin-top: 22px; background: var(--cream-2); border: 1px solid var(--border); border-radius: 18px; padding: 16px; }
.fullmenu h3 { margin-bottom: 8px; }
.fullmenu details { border-top: 1px solid var(--border); }
.fullmenu summary { cursor: pointer; padding: 13px 26px 13px 0; font-weight: 600; color: var(--green); list-style: none; position: relative; }
.fullmenu summary::-webkit-details-marker { display: none; }
.fullmenu summary::after { content: "+"; position: absolute; right: 2px; top: 10px; font-size: 20px; }
.fullmenu details[open] summary::after { content: "–"; }
.mlist { list-style: none; margin: 0 0 12px; padding: 0; }
.mlist li { display: flex; align-items: baseline; gap: 8px; padding: 5px 0; font-size: 15px; }
.mlist li::after { content: ""; order: 1; flex: 1; border-bottom: 1px dotted #CDBFA6; transform: translateY(-4px); }
.mlist b { order: 2; font-weight: 600; color: var(--gold); }
.fullmenu > .small { margin-top: 12px; }

/* จองโต๊ะ */
.book { margin-top: 20px; background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 18px; box-shadow: var(--shadow); }
.book-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: block; }
.f-label { display: block; font-weight: 600; color: var(--green); font-size: 15px; margin-bottom: 6px; }
.field input, .field select {
  width: 100%; min-height: 50px; border: 1.5px solid var(--border); border-radius: 12px; padding: 0 12px;
  font: inherit; color: var(--ink); background: #fff; -webkit-appearance: none; appearance: none;
}
.field select { padding-right: 34px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2322345F' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; }
.field-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 8px; }
.field-row .f-label { margin: 0; }
.stepper { display: flex; align-items: center; border: 1.5px solid var(--border); border-radius: 12px; overflow: hidden; }
.stepper button { width: 46px; height: 46px; border: 0; background: var(--cream); color: var(--green); cursor: pointer; display: grid; place-items: center; }
.stepper button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.stepper button:disabled { color: #C4B9A5; cursor: default; }
.stepper output { min-width: 48px; text-align: center; font-weight: 600; font-size: 18px; }
.book-hint { min-height: 22px; font-size: 14px; color: var(--green-2); margin-bottom: 10px; }
.book .btn + .small { margin-top: 10px; }

/* โซน */
.zones { display: grid; gap: 14px; margin: 20px 0 16px; }
.zone { margin: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.ph-zone { aspect-ratio: 16 / 10; }
.zone figcaption { padding: 12px 14px; }
.zone strong { display: block; color: var(--green); }
.zone span { font-size: 14px; color: var(--muted); }

/* สั่งกลับบ้าน */
.order-grid { display: grid; gap: 10px; margin-top: 18px; }
.order { display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-decoration: none; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.order strong { display: block; color: var(--ink); }
.order small { display: block; color: var(--muted); font-size: 13.5px; }
.order::after { content: "›"; margin-left: auto; font-size: 24px; color: #B9AC93; }
.order-badge { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; flex: none; }
.order-grab { background: #00824A; }
.order-lm { background: #007A3D; }
.order-call { background: var(--cream); color: var(--green); }

/* การเดินทาง */
.addr { margin-top: 16px; }
.addr-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 6px; }
.addr-actions .btn { padding: 0 10px; }
.checks { list-style: none; margin: 12px 0 0; padding: 0; }
.checks li { display: flex; gap: 10px; padding: 7px 0; font-size: 15px; }
.checks .ic { color: var(--ok); margin-top: 3px; stroke-width: 2.4; }
.ph-entrance { aspect-ratio: 4 / 3; border-radius: 18px; }

/* รีวิว */
.rating { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin-top: 16px; color: var(--muted); }
.rating strong { color: var(--green); font-size: 18px; }
.stars { display: inline-flex; gap: 2px; }
.stars svg { width: 18px; height: 18px; fill: #E0A526; stroke: none; }
.reviews { display: grid; gap: 12px; margin-top: 16px; }
.reviews blockquote { margin: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.reviews footer { margin-top: 8px; font-size: 13.5px; color: var(--muted); }

/* เวลา + แชร์ */
.hours { width: 100%; border-collapse: collapse; margin: 18px 0 12px; }
.hours th, .hours td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.hours th { font-weight: 500; }
.hours td { text-align: right; font-weight: 600; }
.hours td.closed { color: var(--warn); }
.hours tr.today { background: var(--cream); }
.hours tr.today th::after { content: " · วันนี้"; color: var(--green-2); font-size: 13px; }
.share-box { background: var(--cream); border-radius: 18px; padding: 18px; align-self: start; }
.share-box .muted { margin: 6px 0 14px; }

/* FAQ */
.faq { margin-top: 18px; display: grid; gap: 8px; }
.faq details { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 0 16px; }
.faq summary { cursor: pointer; padding: 14px 24px 14px 0; font-weight: 600; color: var(--green); list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 12px; font-size: 20px; color: var(--green-2); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 14px; color: var(--muted); }

/* perdna */
.perdna-cta { background: var(--green); color: #fff; text-align: center; }
.perdna-cta h2 { color: #fff; }
.perdna-cta h2::after { margin: 10px auto 0; background: #FFD95A; }
.perdna-cta .eyebrow { color: #FFD95A; }
.perdna-cta p:not(.eyebrow) { margin: 12px auto 20px; max-width: 520px; color: #D6DDEC; }
.perdna-cta .btn-line { background: #fff; color: var(--line); --li: #fff; }
.perdna-cta .btn-line .ic-line { color: var(--line); --li: #fff; }
.perdna-link { display: block; margin-top: 6px; padding: 10px 0; color: #fff; }

.footer { padding: 28px 0 24px; border-top: 1px solid var(--border); }
.footer p { margin-bottom: 4px; }

/* แถบปุ่มล่าง */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 8px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.97); border-top: 1px solid var(--border); box-shadow: 0 -4px 16px rgba(34,52,95,.08);
}
.dock a { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; border-radius: 12px; text-decoration: none; font-weight: 600; font-size: 15px; color: var(--green); background: var(--cream); }
.dock .dock-main { background: var(--line); color: #fff; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--dock-h) + 18px + env(safe-area-inset-bottom)); z-index: 40;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  width: max-content; max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 12px;
  background: var(--green); color: #fff; font-size: 14.5px; text-align: center; transition: .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* จอใหญ่ */
@media (min-width: 720px) {
  .dishes { grid-template-columns: repeat(6, 1fr); }
  .zones { grid-template-columns: repeat(3, 1fr); }
  .reviews { grid-template-columns: repeat(3, 1fr); }
  .order-grid { grid-template-columns: repeat(3, 1fr); }
  .book { max-width: 620px; }
}
@media (min-width: 900px) {
  .section { padding: 64px 0; }
  .hero-text { padding-top: 90px; padding-bottom: 150px; min-height: 520px; }
  .hero-text > * { max-width: 560px; }
  .ph-hero::after { background: linear-gradient(90deg, rgba(30,18,10,.78) 0%, rgba(30,18,10,.45) 45%, rgba(30,18,10,.05) 80%); }
  .hero-card { display: grid; grid-template-columns: 1.1fr 1fr; gap: 14px 20px; margin-top: -90px; }
  .hero-actions { grid-column: 1 / -1; max-width: 560px; }
  .quick, .feats { margin-top: 0; align-self: start; }
  .hero-card > .note { grid-column: 1 / -1; }
  .two-col { grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
  .dock { left: auto; right: 20px; bottom: 20px; width: 420px; border-radius: 18px; border: 1px solid var(--border); padding: 8px; }
  body { padding-bottom: 0; }
  .toast { bottom: 100px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
.btn.is-off { opacity: .5; }

/* ตารางราคาสปา */
.ptable { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 6px 0 12px; }
.ptable th, .ptable td { padding: 9px 4px; border-bottom: 1px solid var(--border); text-align: right; white-space: nowrap; }
.ptable th:first-child, .ptable td:first-child { text-align: left; white-space: normal; }
.ptable thead th { color: var(--muted); font-weight: 500; font-size: 13.5px; }
.ptable td:not(:first-child) { font-weight: 600; color: var(--gold); }
.ptable td[colspan] { text-align: center; }
.ptable td small { color: var(--muted); font-size: 12.5px; }
.field-full { margin-bottom: 12px; }
.zones + .checks { margin-top: 0; }
.dur { font-size: 12.5px; color: var(--muted); margin: 0 8px; line-height: 1.35; }

/* ฮีโร่โทนสว่าง (กวดวิชา) */
.hero-light { background: #F3F6FB; color: var(--ink); }
.hero-light .ph-hero { background: linear-gradient(135deg, #E9EFF8, #FFF6EA); }
.hero-light .ph-hero img { object-position: 78% 40%; }
.hero-light .ph-hero .ph-label { color: #8E9AB4; justify-items: end; align-items: start; padding: 24px 20px 0 0; }
.hero-light .ph-hero::after { background: linear-gradient(90deg, rgba(255,255,255,.95) 0%, rgba(255,255,255,.8) 42%, rgba(255,255,255,0) 72%); }
.hero-light h1 { color: var(--green); text-shadow: none; font-size: clamp(30px, 8.6vw, 50px); }
.hero-light .hl { color: #C66A08; }
.hero-light .eyebrow { color: var(--gold); }
.hero-light .lead { color: var(--ink); text-shadow: none; }
.hero-light .hero-text { padding-top: 28px; padding-bottom: 92px; }

/* คอร์ส (แถวเดียว 3 ช่อง ตาม cover) */
.courses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.course { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 14px 6px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.course-ic { width: 40px; height: 40px; fill: none; stroke: #D97A12; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 8px; }
.course h3 { font-size: 15.5px; }
.course-sub { color: var(--muted); font-size: 13.5px; }
.fullmenu .small + .small { margin-top: 4px; }

/* ตารางเรียน */
.sched-wrap { margin-top: 18px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.sched { width: 100%; border-collapse: collapse; font-size: 15px; }
.sched th, .sched td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.sched thead th { background: var(--green); color: #fff; font-weight: 500; font-size: 14px; }
.sched td[rowspan] { font-weight: 600; color: var(--green); background: var(--cream-2); }
.sched tr:last-child td { border-bottom: 0; }
.sched td.t { white-space: nowrap; font-variant-numeric: tabular-nums; }
.sched td[rowspan] { white-space: nowrap; }

/* ฟอร์มทดลองเรียน */
.days { border: 0; padding: 0; margin: 14px 0 16px; min-width: 0; }
.seg { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: flex; flex-direction: column; justify-content: center; height: 100%; min-height: 50px; padding: 8px 10px; border-radius: 12px; border: 1.5px solid var(--border); font-weight: 600; font-size: 15px; line-height: 1.3; background: #fff; }
.seg small { font-weight: 400; font-size: 12.5px; color: var(--muted); }
.seg input:checked + span { border-color: var(--green-2); background: #EEF2FA; color: var(--green); box-shadow: inset 0 0 0 1px var(--green-2); }
.seg input:focus-visible + span { outline: 3px solid #A9BCE3; outline-offset: 2px; }

/* ครู */
.teachers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.teacher { margin: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.ph-teacher { aspect-ratio: 4 / 5; }
.teacher figcaption { padding: 8px 8px 10px; font-size: 13px; line-height: 1.4; }
.teacher strong { display: block; color: var(--green); font-size: 13.5px; }
.teacher em { display: block; font-style: normal; font-weight: 600; color: var(--gold); font-size: 13px; }
.teacher span { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.teachers + .small { margin-top: 10px; }
.hours-h { margin-top: 22px; }

@media (min-width: 720px) {
  .teacher figcaption { padding: 12px 14px; font-size: 14px; }
}
@media (min-width: 900px) {
  .hero-light .ph-hero::after { background: linear-gradient(90deg, #fff 0%, rgba(255,255,255,.9) 38%, rgba(255,255,255,0) 62%); }
  .hero-light .hero-text { padding-top: 80px; padding-bottom: 150px; }
}
