/*
  Ploychao beta landing — สไตล์ทั้งหน้า (หน้าแรกและ /privacy)
  สี ขนาด และมุมตาม docs/brand/brand-guidelines-th.md และเอกสารออกแบบหน้าเว็บผู้ให้เช่า หัวข้อ 7
  หน้านี้เป็นพื้นสว่างเสมอ (หัวข้อ 9 ของคู่มือแบรนด์) จึงใช้ชุดสีสว่างชุดเดียว
  ขนาดเป็น rem เพื่อให้ขยายตามตัวอักษรที่ผู้ใช้ตั้งในเครื่อง
*/

@font-face { font-family: "IBM Plex Sans Thai Looped"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/fonts/ibm-plex-sans-thai-looped-thai-400-normal.woff2) format("woff2");
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "IBM Plex Sans Thai Looped"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/fonts/ibm-plex-sans-thai-looped-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Thai Looped"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/fonts/ibm-plex-sans-thai-looped-thai-500-normal.woff2) format("woff2");
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "IBM Plex Sans Thai Looped"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/fonts/ibm-plex-sans-thai-looped-latin-500-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Thai Looped"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/fonts/ibm-plex-sans-thai-looped-thai-600-normal.woff2) format("woff2");
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "IBM Plex Sans Thai Looped"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/fonts/ibm-plex-sans-thai-looped-latin-600-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: light;
  --pc-bg: #F5F6F8;
  --pc-surface: #FFFFFF;
  --pc-line: #E6E8EC;
  --pc-field: #868C95;
  --pc-text: #16191D;
  --pc-text-2: #5A6370;
  --pc-text-3: #656D79;
  --pc-primary: #185FA5;
  --pc-on-primary: #FFFFFF;
  --pc-accent: #185FA5;
  --pc-tint: #E6F1FB;
  --pc-tint-text: #0C447C;
  --pc-tint-line: #B5D4F4;
  --pc-warn: #7A4A00; --pc-warn-bg: #FFF4DB;
  --pc-err: #8E2A20; --pc-err-bg: #FDECEA;
  --pc-navy: #0C2D52;
  --font: "IBM Plex Sans Thai Looped", "Noto Sans Thai Looped", Tahoma, sans-serif;
  --gutter: 1rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--pc-surface); color: var(--pc-text); font: 400 1rem/1.6 var(--font); overflow-wrap: break-word; }
img, svg { max-width: 100%; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul.plain, ol.plain { list-style: none; padding: 0; }
a { color: var(--pc-accent); text-underline-offset: 0.15em; }
:focus-visible { outline: 3px solid var(--pc-accent); outline-offset: 2px; border-radius: 4px; }

h1, h2 { text-wrap: balance; }
h1 { font-size: 1.625rem; line-height: 1.3; font-weight: 500; }
h2 { font-size: 1.25rem; line-height: 1.35; font-weight: 500; }
h3 { font-size: 1.125rem; line-height: 1.4; font-weight: 500; }

.wrap { width: 100%; max-width: 70rem; margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- ปุ่ม ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 3rem; padding: 0.5rem 1.25rem;
  border: 1px solid transparent; border-radius: 8px; font: 500 1rem/1.4 var(--font); text-decoration: none; cursor: pointer; text-align: center; }
.btn--primary { background: var(--pc-primary); color: var(--pc-on-primary); }
.btn--primary:hover { background: #134E88; }
.btn--secondary { background: var(--pc-surface); color: var(--pc-accent); border-color: var(--pc-accent); }
.btn--secondary:hover { background: var(--pc-tint); }
.btn--block, .btn--block-sm { width: 100%; }
.btn[disabled] { cursor: progress; opacity: 0.9; }

/* ---------- หัวหน้า ---------- */
.site-header { background: var(--pc-surface); border-bottom: 1px solid var(--pc-line); position: sticky; top: 0; z-index: 10; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 3.5rem; }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--pc-text); text-decoration: none; min-height: 3rem; }
.brand__name { font-weight: 500; font-size: 1.125rem; }
.logo-mark { width: 1.75rem; height: 1.75rem; fill: var(--pc-primary); }
.site-header__cta { display: none; }

/* ---------- ส่วนต่างๆ ---------- */
.section { padding-block: 2.5rem; }
.section.band { background: var(--pc-bg); }
.section > .wrap > h2 { margin-bottom: 1.25rem; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.card { background: var(--pc-surface); border: 1px solid var(--pc-line); border-radius: 10px; padding: 1.25rem; }
.card h3 { margin-bottom: 0.5rem; }
.card p { color: var(--pc-text-2); }
.caption { margin-top: 1.25rem; font-size: 0.875rem; color: var(--pc-text-3); }

/* ---------- ส่วนหัวเรื่อง ---------- */
.hero { padding-block: 2rem 2.5rem; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
.hero__text, .hero__shot { min-width: 0; }
.hero__text > * + * { margin-top: 1rem; }
.badge { display: inline-block; padding: 0.125rem 0.75rem; border-radius: 6px; background: var(--pc-tint); color: var(--pc-tint-text); font-size: 0.875rem; font-weight: 500; }
.lead { font-size: 1.0625rem; color: var(--pc-text-2); }
.note { font-size: 0.875rem; color: var(--pc-text-3); }
.hero__shot figcaption { margin-top: 0.75rem; font-size: 0.875rem; color: var(--pc-text-3); }

/* ---------- ภาพตัวอย่างหน้าจอ ---------- */
.shot { background: var(--pc-bg); border: 1px solid var(--pc-line); border-radius: 10px; padding: 0.75rem; font-size: 0.875rem; line-height: 1.5; color: var(--pc-text); user-select: none; overflow-wrap: anywhere; }
.shot p { margin: 0; color: inherit; }
.app-bar { display: flex; justify-content: space-between; gap: 0.5rem; padding-bottom: 0.5rem; margin-bottom: 0.5rem; border-bottom: 1px solid var(--pc-line); }
.app-bar__title { font-weight: 500; }
.app-bar__side { color: var(--pc-text-2); text-align: right; }
.shot__h { font-weight: 500; font-size: 1.125rem; margin-bottom: 0.5rem !important; }
.shot__room { font-size: 1.25rem; font-weight: 500; line-height: 1.3; font-variant-numeric: tabular-nums; }
.shot__sub { color: var(--pc-text-2) !important; margin-bottom: 0.5rem !important; }
.task { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; background: var(--pc-surface); border: 1px solid var(--pc-line); border-radius: 10px; padding: 0.625rem 0.75rem; margin-bottom: 0.5rem; }
.task__main { flex: 1; min-width: 0; }
.task__name { font-weight: 500; }
.task__status { color: var(--pc-text-2) !important; font-variant-numeric: tabular-nums; }
.task--active { background: var(--pc-tint); border-color: var(--pc-accent); }
.task--active .task__status { color: var(--pc-tint-text) !important; }
.task--dim { color: var(--pc-text-3); }
.task--dim .task__name { font-weight: 400; }
.task--warn { background: var(--pc-warn-bg); border-color: #E6CFA0; }
.task--warn .task__status { color: var(--pc-warn) !important; font-weight: 500; }
.bar { height: 6px; background: #fff; border-radius: 3px; margin-top: 0.375rem; overflow: hidden; }
.bar__fill { height: 100%; background: var(--pc-primary); }
.bar__fill--93 { width: 93%; }
.fake-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.25rem; padding: 0 0.875rem; border-radius: 8px; background: var(--pc-primary); color: #fff; font-weight: 500; text-align: center; }
.fake-btn--ghost { background: var(--pc-surface); color: var(--pc-accent); border: 1px solid var(--pc-accent); }
.fake-btn--wide { display: flex; margin-top: 0.75rem; }
.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); gap: 0.5rem; margin-top: 0.75rem; }
.tabs { display: flex; justify-content: space-around; border-top: 1px solid var(--pc-line); margin-top: 0.75rem; padding-top: 0.5rem; color: var(--pc-text-2); }
.tabs__on { color: var(--pc-accent); font-weight: 500; }
.meter { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem; background: var(--pc-surface); border: 1px solid var(--pc-line); border-radius: 10px; padding: 0.5rem 0.75rem; margin-bottom: 0.5rem; }
.meter__name { font-weight: 500; }
.meter__prev { color: var(--pc-text-2) !important; font-variant-numeric: tabular-nums; }
.meter__in { display: grid; justify-items: end; }
.meter__box { min-width: 4.5rem; text-align: right; border: 1px solid var(--pc-field); border-radius: 8px; padding: 0.125rem 0.625rem; font-size: 1.25rem; font-weight: 500; font-variant-numeric: tabular-nums; background: #fff; }
.meter__use { color: var(--pc-tint-text); font-size: 0.875rem; white-space: nowrap; }
.lines { background: var(--pc-surface); border: 1px solid var(--pc-line); border-radius: 10px; padding: 0.5rem 0.75rem; }
.line > :last-child { white-space: nowrap; margin-left: auto; }
.line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; padding-block: 0.25rem; font-variant-numeric: tabular-nums; }
.line--sum { border-top: 1px solid var(--pc-line); margin-top: 0.25rem; padding-top: 0.5rem; font-weight: 500; }
.lines .line--sum:first-child { border-top: 0; margin-top: 0; padding-top: 0.25rem; }
.tag { padding: 0 0.5rem; border-radius: 6px; font-size: 0.875rem; font-weight: 500; }
.tag--ok { background: #E9F5EE; color: #1E5435; }
.tag--warn { background: var(--pc-warn-bg); color: var(--pc-warn); }

/* ---------- วิธีใช้ ---------- */
.step, .beta-step { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 0.5rem; }
.step__num { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--pc-tint); color: var(--pc-tint-text); font-weight: 500; }
.step p, .beta-step p { color: var(--pc-text-2); }
.step .shot { margin-top: 0.5rem; }
.step .shot p, .card .shot p { color: var(--pc-text); }

/* ---------- รายละเอียดการใช้งาน ขั้นตอนรุ่นทดลอง ---------- */
.section-lead { color: var(--pc-text-2); margin: -0.5rem 0 1.5rem; max-width: 40rem; }
.features { display: grid; gap: 2rem; }
.feature { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: center; }
.feature__text h3 { margin-bottom: 0.5rem; }
.feature__text p { color: var(--pc-text-2); }
.cta-row { margin-top: 2rem; }
.beta-step { align-content: start; }
.ask { margin-top: 1rem; text-align: center; font-size: 0.875rem; color: var(--pc-text-3); }
.ask a { display: inline-flex; align-items: center; min-height: 2.5rem; font-weight: 500; }
.site-nav { display: none; }

/* ---------- ราคา ความมั่นใจ คำถาม ---------- */
.audience__eg { font-weight: 500; color: var(--pc-tint-text) !important; margin-bottom: 0.25rem; }
.price { display: grid; gap: 0.25rem; }
.price__free { font-size: 1.25rem; font-weight: 500; line-height: 1.35; }
.price__beyond { color: var(--pc-text-2); font-size: 1.125rem; }
.pending, mark.placeholder { background: #FFE9A8; color: #3B2A00; padding: 0 0.25rem; border-radius: 4px; font-size: 0.875rem; }
.faq { display: grid; gap: 0.5rem; max-width: 46rem; }
.faq__item { border: 1px solid var(--pc-line); border-radius: 10px; background: var(--pc-surface); }
.faq__item summary { cursor: pointer; padding: 0.75rem 1rem; min-height: 3rem; display: flex; align-items: center; font-weight: 500; list-style: none; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; margin-left: auto; padding-left: 1rem; font-size: 1.5rem; line-height: 1; color: var(--pc-accent); }
.faq__item[open] summary::after { content: "−"; }
.faq__item p { padding: 0 1rem 1rem; color: var(--pc-text-2); }

/* ---------- ฟอร์ม ---------- */
.form-card { background: var(--pc-surface); border: 1px solid var(--pc-line); border-radius: 10px; padding: 1.25rem; max-width: 30rem; margin-inline: auto; }
.form-card h2 { margin-bottom: 0.5rem; }
.form-card__lead { color: var(--pc-text-2); margin-bottom: 1.25rem; }
.field { margin: 0 0 1.25rem; border: 0; padding: 0; min-width: 0; }
.field__label { display: block; font-weight: 500; padding: 0; }
.field__hint { font-size: 0.875rem; color: var(--pc-text-3); margin-bottom: 0.25rem; }
.field__error { font-size: 0.875rem; color: var(--pc-err); font-weight: 500; margin-top: 0.25rem; }
.field__error:empty { margin: 0; } /* ต้องคงอยู่ใน DOM (ไม่ใช้ display:none) เพื่อให้โปรแกรมอ่านจอประกาศข้อความที่ใส่ภายหลัง */
.field__error--form { margin-bottom: 0.75rem; }
.field__error--form:empty { margin-bottom: 0; }
.input { width: 100%; min-height: 3rem; padding: 0.5rem 0.75rem; border: 1px solid var(--pc-field); border-radius: 8px; background: #fff; color: var(--pc-text); font: 400 1rem/1.4 var(--font); }
.input:focus-visible { outline: 3px solid var(--pc-accent); outline-offset: 1px; border-color: var(--pc-accent); }
.input[aria-invalid="true"], .consent[aria-invalid="true"] { border-color: var(--pc-err); background: var(--pc-err-bg); }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; gap: 0.375rem; min-height: 3rem; padding: 0.25rem 1rem; border: 1px solid var(--pc-field); border-radius: 8px; background: #fff; }
.chip input:checked + span { background: var(--pc-tint); border-color: var(--pc-accent); color: var(--pc-tint-text); font-weight: 500; }
.chip input:checked + span::before { content: "✓"; }
.chip input:focus-visible + span { outline: 3px solid var(--pc-accent); outline-offset: 2px; }
.consent { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.5rem; margin: -0.5rem; border: 1px solid transparent; border-radius: 8px; font-size: 1rem; color: var(--pc-text-2); cursor: pointer; }
.consent input { flex: none; width: 1.5rem; height: 1.5rem; margin: 0.125rem 0 0; accent-color: var(--pc-primary); }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.success { text-align: center; padding-block: 1rem; }
.success:focus { outline: none; }
.success__title { font-size: 1.25rem; font-weight: 500; color: var(--pc-tint-text); margin-bottom: 0.5rem; }
.nowrap { white-space: nowrap; }
.consent + .field__error { margin-top: 0.75rem; }
.success__text { font-size: 1.125rem; font-variant-numeric: tabular-nums; }
.btn .pc-spinner { color: inherit; }

/* ---------- แถบปุ่มติดล่างจอ (มือถือ) ---------- */
.sticky-cta { position: fixed; inset: auto 0 0 0; z-index: 20; background: var(--pc-surface); border-top: 1px solid var(--pc-line); padding: 0.75rem var(--gutter) calc(0.75rem + env(safe-area-inset-bottom)); }
.sticky-cta[hidden] { display: none; }

/* ---------- ท้ายหน้า ---------- */
.site-footer { background: var(--pc-navy); color: #fff; padding-block: 2rem; font-size: 0.875rem; }
.site-footer__inner > * + * { margin-top: 0.75rem; }
.site-footer a { color: #fff; }
.site-footer :focus-visible { outline-color: #fff; }
.site-footer__about { font-weight: 500; font-size: 1rem; }
.site-footer mark.placeholder { color: #3B2A00; }

/* ---------- แท็บเล็ต 768+ ---------- */
@media (min-width: 48rem) { /* 768px */
  :root { --gutter: 1.5rem; }
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--2, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem; }
  .feature:nth-child(even) .feature__text { order: 2; }
  .section { padding-block: 3.5rem; }
  .site-header__cta { display: inline-flex; }
  .btn--block-sm { width: auto; }
  .hero__shot { max-width: 32rem; }
  .sticky-cta { display: none; }
}

/* ---------- คอมพิวเตอร์ 1024+ ---------- */
@media (min-width: 64rem) {
  body { font-size: 1.0625rem; }
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.125rem; }
  .lead { font-size: 1.125rem; }
  .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .site-nav { display: flex; gap: 0.25rem; margin-inline: auto; }
  .site-nav a { display: inline-flex; align-items: center; min-height: 3rem; padding: 0 0.875rem; color: var(--pc-text-2); text-decoration: none; font-size: 1rem; font-weight: 500; border-radius: 8px; }
  .site-nav a:hover { color: var(--pc-accent); background: var(--pc-tint); }
  .hero { padding-block: 4rem 4.5rem; }
  .hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); align-items: center; gap: 4rem; }
  .hero__shot { max-width: none; }
  .section { padding-block: 4.5rem; }
}

/* ---------- พิมพ์ ---------- */
@media print {
  .site-header, .sticky-cta, .toc, .no-print { display: none !important; }
  body { font-size: 12pt; }
}

/* ---------- หน้า /privacy ---------- */
.site-header__back { display: inline-flex; align-items: center; min-height: 3rem; margin-left: auto; font-weight: 500; }
.legal { max-width: 42.5rem; margin: 0 auto; padding: 2rem var(--gutter) 3rem; }
.legal h1 { margin-bottom: 0.25rem; }
.legal__sub { color: var(--pc-text-2); margin-bottom: 1rem; }
.legal__meta { font-size: 0.875rem; color: var(--pc-text-3); margin: 0.75rem 0; }
.legal__draft { background: #FFF4DB; color: var(--pc-warn); border-radius: 8px; padding: 0.5rem 0.75rem; font-weight: 500; }
.summary { background: var(--pc-tint); border: 1px solid var(--pc-tint-line); border-radius: 10px; padding: 1.25rem; margin: 1rem 0 1.5rem; color: var(--pc-tint-text); }
.summary h2 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.summary ul { margin: 0; padding-left: 1.25rem; }
.summary li + li { margin-top: 0.375rem; }
.toc { border: 1px solid var(--pc-line); border-radius: 10px; padding: 1rem 1.25rem; margin-bottom: 2rem; }
.toc__title { font-weight: 500; margin-bottom: 0.25rem; }
.toc a { display: inline-flex; align-items: center; min-height: 2.5rem; }
.legal__section { margin-top: 2rem; }
.legal__section h2 { margin-bottom: 0.75rem; }
.legal p, .legal li { margin-top: 0.5rem; }
.legal ul { padding-left: 1.25rem; }
.legal__section > p + .btn, .legal__section .btn { margin-top: 0.5rem; }
.table-wrap { margin-top: 0.75rem; }
.legal table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 0.625rem 0.75rem; border: 1px solid var(--pc-line); }
.legal th { background: var(--pc-bg); font-weight: 500; }
.legal__meta + .summary { margin-top: 0.5rem; }
@media (max-width: 40rem) {
  .legal table, .legal tbody, .legal tr, .legal td { display: block; width: 100%; }
  .legal thead { position: absolute; left: -10000px; }
  .legal tr { border: 1px solid var(--pc-line); border-radius: 10px; margin-bottom: 0.75rem; overflow: hidden; }
  .legal td { border: 0; border-bottom: 1px solid var(--pc-line); }
  .legal td:last-child { border-bottom: 0; }
  .legal td::before { content: attr(data-label); display: block; font-size: 0.875rem; font-weight: 500; color: var(--pc-text-3); }
}
@media print {
  .site-footer { display: none !important; }
  .legal { padding: 0; max-width: none; }
  .summary { border-color: #999; background: none; color: #000; }
  a { color: #000; text-decoration: none; }
}
.legal .toc ul { padding-left: 0; }
.legal .toc li { margin-top: 0; }
