/* app.css — หน้าตาระบบคนกลาง
   หลักคิด: คนที่เข้ามาคือคนแปลกหน้าที่กำลังจะโอนเงินให้คนที่ไม่รู้จัก
   หน้าจอจึงต้องทำสองอย่างพร้อมกัน — บอกให้ชัดว่าตอนนี้ต้องทำอะไร และดูน่าเชื่อถือพอที่จะกล้าโอน
   ปุ่มใหญ่ กดด้วยนิ้วโป้งบนมือถือได้ ตัวเลขเงินต้องใหญ่และอ่านผิดไม่ได้

   ⚠️ ห้ามเรียกฟอนต์หรือรูปจากอินเทอร์เน็ตในไฟล์นี้ (@import / url(https://...))
      CSP ของ firebase.json บล็อกไว้ หน้าจะเงียบ ๆ ไม่ขึ้นโดยไม่มีข้อความบอก
      ลวดลายทุกอย่างในไฟล์นี้จึงสร้างด้วย gradient ล้วน ไม่มีไฟล์ภาพสักไฟล์

   ธีมหลังบ้าน: ใส่ class="admin" ที่ <body> ของหน้าที่มีแต่เจ้าของเข้า
   สีหลักจะเปลี่ยนเป็นน้ำเงินเทา + มีแถบ "หลังบ้าน" บนหัว เพื่อให้บอสรู้ทันทีว่าอยู่ฝั่งไหน */

:root {
  --bg: #f2f5f7;
  --bg-2: #e8eef2;               /* ใช้ไล่สีพื้นหลังให้ไม่แบนทื่อ */
  --card: #ffffff;
  --ink: #121c26;
  --ink-2: #33424f;
  --dim: #5d6b7a;
  --line: #dfe5eb;
  --line-2: #eef2f6;
  --brand: #0f6b4f;              /* เขียวเข้ม — สื่อความปลอดภัย ไม่ใช่เขียวสดแบบร้านค้า */
  --brand-2: #14855f;            /* ตัวอ่อนกว่า ใช้ไล่สีบนปุ่ม */
  --brand-ink: #0b4f3a;          /* ตัวเข้มสุด ใช้กับตัวหนังสือบนพื้นอ่อน */
  --brand-soft: #e4f1ec;
  --accent: #0d7ea8;             /* สีคู่ ใช้เน้นตัวเลขและไอคอน ไม่ใช้ทำปุ่มหลัก */
  --accent-soft: #e3f1f7;
  --warn: #a04a17;
  --warn-soft: #fdf1e7;
  --danger: #a92018;
  --danger-soft: #fdeceb;
  --ok: #14804a;

  --shadow-1: 0 1px 2px rgba(16,32,42,.05);
  --shadow-2: 0 1px 2px rgba(16,32,42,.05), 0 6px 18px -6px rgba(16,32,42,.14);
  --shadow-3: 0 2px 4px rgba(16,32,42,.06), 0 14px 32px -12px rgba(16,32,42,.22);
  --shadow: var(--shadow-2);     /* ชื่อเดิม เผื่อมีที่ไหนเรียกอยู่ */

  --r: 16px;
  --r-sm: 12px;
  --ring: 0 0 0 3px rgba(15,107,79,.28);
}

/* ---------- ธีมหลังบ้าน (เจ้าของเท่านั้น) ----------
   ตั้งใจให้สีต่างจากฝั่งลูกค้าอย่างเห็นได้ชัด กันเปิดผิดหน้าแล้วเผลอกดปุ่มจริง */
body.admin {
  --brand: #1f4b7a;
  --brand-2: #2a5f95;
  --brand-ink: #16375a;
  --brand-soft: #e6eef6;
  --ring: 0 0 0 3px rgba(31,75,122,.28);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1319; --bg-2: #121a21; --card: #171f27; --ink: #e9eff5; --ink-2: #c2ced9;
    --dim: #94a5b5; --line: #26313c; --line-2: #1e2831;
    --brand: #45c793; --brand-2: #3bb686; --brand-ink: #8fe0be; --brand-soft: #15302a;
    --accent: #63b8d8; --accent-soft: #162c36;
    --warn: #e5a870; --warn-soft: #2b2318;
    --danger: #ef8079; --danger-soft: #2d1a19;
    --ok: #4dc98a;
    --shadow-1: none;
    --shadow-2: 0 1px 0 rgba(255,255,255,.03);
    --shadow-3: 0 10px 30px -12px rgba(0,0,0,.7);
    --ring: 0 0 0 3px rgba(69,199,147,.3);
  }
  body.admin {
    --brand: #6fa8e0; --brand-2: #5c97d2; --brand-ink: #a8ccee; --brand-soft: #16273a;
    --ring: 0 0 0 3px rgba(111,168,224,.3);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  background-image: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 240px);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: "Sarabun", "Noto Sans Thai", -apple-system, "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

/* ตัวเลขเงินต้องเรียงหลักตรงกันทุกแถว ไม่งั้นอ่านผิดหลักได้ */
.money, .rows, .sumbox b, .rowtable td, .copy, .bigin { font-variant-numeric: tabular-nums; }

/* คนที่ตั้งเครื่องให้ลดการเคลื่อนไหว ต้องไม่เจออะไรขยับ */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* กรอบโฟกัสสำหรับคนใช้คีย์บอร์ด — ห้ามเอาออก */
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

/* ---------- โครงหน้า ---------- */

header.top {
  background: var(--card);      /* ตัวสำรองสำหรับเบราว์เซอร์เก่าที่ไม่รู้จัก color-mix */
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
  padding-top: max(12px, env(safe-area-inset-top));
  display: flex; align-items: center; gap: 10px;
  position: sticky; top: 0; z-index: 20;
}
header.top .logo {
  font-weight: 800; font-size: 18px; color: var(--brand); text-decoration: none;
  letter-spacing: -.2px; display: inline-flex; align-items: center; gap: 8px;
}
/* ---------- โลโก้ MidMan ----------
   ป้ายสี่เหลี่ยมมนไล่สีเขียว มีรูปโล่กับเครื่องหมายถูกสีขาวอยู่ข้างใน
   🛑 รูปข้างในเป็น inline SVG ที่เขียนไว้ใน HTML ของแต่ละหน้า ไม่ใช่ไฟล์ภาพ
      CSP ของเว็บบล็อกรูปจากอินเทอร์เน็ตทั้งหมด ห้ามเปลี่ยนไปใช้ <img src="http...">
   ตัวป้ายกับเงาสร้างจาก gradient ล้วน ไม่มีไฟล์ประกอบสักไฟล์ */
.mark {
  width: 26px; height: 26px; border-radius: 8px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, var(--brand-2), var(--brand));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.22), 0 1px 3px rgba(0,0,0,.16);
  color: #fff;                 /* รูปข้างในวาดด้วย currentColor จึงกลายเป็นสีขาวตาม */
}
.mark svg { width: 16px; height: 16px; display: block; }

/* หน้าหลังบ้านใช้สีแบรนด์คนละชุด ป้ายโลโก้จึงเปลี่ยนตามเองโดยไม่ต้องเขียนเพิ่ม */
header.top .logo .mark { width: 24px; height: 24px; border-radius: 7px; }
header.top .logo .mark svg { width: 15px; height: 15px; }

/* ชื่อแบรนด์ท้ายหน้า — วางโลโก้ไว้ให้คนจำได้ว่ากำลังใช้บริการของใครอยู่ */
.footbrand {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 800; color: var(--brand); font-size: 15px;
  letter-spacing: -.2px; margin: 0 0 8px;
}
header.top .spacer { flex: 1; }
header.top .who { font-size: 13px; color: var(--dim); }

/* แถบบอกว่าอยู่ฝั่งหลังบ้าน — ขึ้นเฉพาะหน้าที่ body มี class admin */
body.admin header.top::after {
  content: 'หลังบ้าน';
  font-size: 11px; font-weight: 800; letter-spacing: .4px;
  color: var(--brand); background: var(--brand-soft);
  border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent);
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
  order: -1; margin-left: 2px;
}

main { max-width: 680px; margin: 0 auto; padding: 18px 16px 80px; }
main { padding-bottom: max(80px, calc(60px + env(safe-area-inset-bottom))); }

/* ---------- การ์ด ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-2);
}
.card h2 {
  margin: 0 0 12px; font-size: 17.5px; font-weight: 700;
  letter-spacing: -.2px; line-height: 1.4;
}
.card h3 {
  margin: 20px 0 8px; font-size: 13px; color: var(--dim);
  font-weight: 700; letter-spacing: .3px; text-transform: uppercase;
}

/* ---------- ปุ่ม ---------- */

.btn {
  display: block; width: 100%;
  padding: 15px 18px;
  border: 0; border-radius: var(--r-sm);
  background: linear-gradient(180deg, var(--brand-2), var(--brand));
  color: #fff;
  font: inherit; font-weight: 700; font-size: 17px;
  letter-spacing: -.1px;
  cursor: pointer;
  margin-top: 10px;
  min-height: 52px;              /* นิ้วโป้งกดโดนแน่ */
  box-shadow: var(--shadow-1);
  transition: transform .08s ease, box-shadow .15s ease, opacity .15s ease;
}
.btn:hover:not(:disabled) { box-shadow: var(--shadow-2); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn:disabled { opacity: .42; cursor: not-allowed; box-shadow: none; }

.btn.ghost {
  background: transparent; color: var(--brand);
  border: 1.5px solid color-mix(in srgb, var(--brand) 55%, transparent);
  box-shadow: none;
}
.btn.ghost:hover:not(:disabled) { background: var(--brand-soft); }
.btn.plain {
  background: transparent; color: var(--dim);
  border: 1.5px solid var(--line); box-shadow: none;
}
.btn.plain:hover:not(:disabled) { background: var(--line-2); color: var(--ink-2); }
.btn.danger { background: linear-gradient(180deg, color-mix(in srgb, var(--danger) 88%, #fff), var(--danger)); }
.btn.small { display: inline-block; width: auto; padding: 9px 14px; font-size: 14px; min-height: 0; }

.btnrow { display: flex; gap: 10px; }
.btnrow .btn { margin-top: 10px; }

/* ---------- ช่องกรอก ---------- */

label {
  display: block; font-size: 13.5px; color: var(--ink-2);
  margin: 16px 0 6px; font-weight: 700; letter-spacing: -.1px;
}
input, select, textarea {
  width: 100%; padding: 13px 14px;
  border: 1.5px solid var(--line); border-radius: var(--r-sm);
  background: var(--bg); color: var(--ink);
  font: inherit; font-size: 16px;    /* ต่ำกว่า 16px ไอโฟนจะซูมเองตอนกดพิมพ์ */
  transition: border-color .12s ease, box-shadow .12s ease, background .12s ease;
}
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--dim) 70%, transparent); }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand);
  background: var(--card); box-shadow: var(--ring);
}
textarea { min-height: 84px; resize: vertical; }
.hint { font-size: 13px; color: var(--dim); margin-top: 6px; line-height: 1.55; }

/* คำเตือนจากการกดปุ่มต้องเด่นและอยู่ใกล้ปุ่ม ไม่ใช่ถูกมองเป็นคำอธิบายจาง ๆ */
.formerr {
  margin: 0 0 14px;
  padding: 12px 14px;
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid color-mix(in srgb, var(--danger) 32%, transparent);
  border-left: 5px solid var(--danger);
  border-radius: var(--r-sm);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}

.choice { display: flex; gap: 8px; margin-top: 6px; }
.choice input { display: none; }
.choice label {
  flex: 1; margin: 0; text-align: center; padding: 13px 6px;
  border: 1.5px solid var(--line); border-radius: var(--r-sm); cursor: pointer;
  background: var(--card);
  color: var(--ink); font-weight: 700; font-size: 14px;
  transition: border-color .12s ease, background .12s ease, color .12s ease;
}
.choice label:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.choice input:checked + label {
  border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink);
  box-shadow: inset 0 0 0 1px var(--brand);
}
.choice input:focus-visible + label { box-shadow: var(--ring); }

/* ---------- ตัวเลขเงิน ---------- */

.money { font-size: 38px; font-weight: 800; letter-spacing: -1px; line-height: 1.15; }
.money .sat { color: var(--warn); }     /* ดีลเก่าที่ยังมีเศษสตางค์ติดอยู่ ต้องเด่นให้เห็น */
.money small { font-size: 16px; font-weight: 600; color: var(--dim); letter-spacing: 0; }

.rows { border-top: 1px solid var(--line); margin-top: 14px; }
.rows div {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--line-2); font-size: 15px;
}
.rows div span:first-child { color: var(--dim); }
.rows div span:last-child { text-align: right; font-weight: 600; }
.rows div.total {
  font-weight: 800; font-size: 17px; border-bottom: 0;
  border-top: 1.5px solid var(--line); margin-top: 2px; padding-top: 13px;
}
.rows div.total span:first-child { color: var(--ink); }

/* ---------- ป้ายสถานะ ---------- */

.tag {
  display: inline-block; padding: 5px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 800; letter-spacing: .1px;
  border: 1px solid transparent;
}
.tag.wait { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 22%, transparent); }
.tag.go   { background: var(--brand-soft); color: var(--brand-ink); border-color: color-mix(in srgb, var(--brand) 25%, transparent); }
.tag.done { background: var(--brand-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.tag.bad  { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 22%, transparent); }

/* ---------- กล่องเตือน ----------
   .note.bad คือสิ่งที่คนใช้จะเห็นแทนหน้าเปล่าเวลาระบบมีปัญหา ต้องเด่นพอที่จะไม่ถูกมองข้าม */

.note {
  border-radius: var(--r-sm); padding: 14px 16px; font-size: 14.5px; margin: 14px 0;
  line-height: 1.6; border: 1px solid transparent;
}
.note.warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.note.ok   { background: var(--brand-soft); color: var(--brand-ink); border-color: color-mix(in srgb, var(--brand) 30%, transparent); }
.note b { display: block; margin-bottom: 4px; font-weight: 800; }

/* ตัวแดงได้แถบหนาด้านซ้ายเพิ่ม เพราะบางทีมันขึ้นมาลำพังบนหน้าที่ว่างเปล่า */
.note.bad {
  background: var(--danger-soft); color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 32%, transparent);
  border-left: 5px solid var(--danger);
  box-shadow: var(--shadow-1);
}

/* ---------- ไทม์ไลน์ ---------- */

.steps { list-style: none; margin: 0; padding: 0; }
.steps li {
  position: relative; padding: 0 0 22px 30px; font-size: 15px;
  border-left: 2px solid var(--line); margin-left: 7px;
}
.steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps li::before {
  content: ''; position: absolute; left: -8px; top: 5px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--card); border: 2px solid var(--line);
}
.steps li.done::before { background: var(--ok); border-color: var(--ok); }
.steps li.now::before  { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.steps li.now { font-weight: 700; }
.steps li .when { display: block; font-size: 13px; color: var(--dim); font-weight: 400; margin-top: 2px; }

/* ---------- QR ---------- */

.qrbox {
  text-align: center; padding: 20px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--r); margin: 16px 0;
  box-shadow: var(--shadow-1);
}
.qrbox svg { width: 100%; max-width: 260px; height: auto; }
.qrbox .to { color: #16202a; font-size: 14px; margin-top: 12px; line-height: 1.5; }

/* ---------- รายการดีล ---------- */

.deal {
  display: block; text-decoration: none; color: inherit;
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 15px; margin-bottom: 10px;
  background: var(--card);
  transition: border-color .12s ease, box-shadow .12s ease, transform .08s ease;
}
.deal:hover { border-color: color-mix(in srgb, var(--brand) 42%, var(--line)); box-shadow: var(--shadow-2); }
.deal:active { transform: translateY(1px); }
.deal .line1 { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.deal .t { font-weight: 700; letter-spacing: -.1px; }
.deal .m { font-size: 14px; color: var(--dim); margin-top: 5px; }

/* บรรทัด "แล้วฉันต้องทำอะไร" — เข้มกว่า .m เพราะเป็นบรรทัดที่คนอ่านจริง */
.deal .act { font-size: 14px; font-weight: 600; color: var(--ink); margin-top: 7px; }

/* ใบที่ถึงคิวเรา ต้องเห็นต่างจากใบที่รอคนอื่นตั้งแต่ยังไม่ทันอ่าน */
.deal.turn { border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); border-left-width: 4px; }
.deal.turn .act { color: var(--brand-ink); }

.grouphead {
  font-size: 13px; font-weight: 700; color: var(--dim);
  margin: 16px 0 8px; letter-spacing: .2px;
}
.grouphead:first-child { margin-top: 4px; }

/* แถบกรองรายการดีล — ปุ่มจริง ไม่ใช่ลิงก์ กดด้วยคีย์บอร์ดได้ */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.chip {
  font: inherit; font-size: 14px; cursor: pointer;
  padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--dim);
}
.chip b { font-weight: 700; color: var(--ink); }
.chip:hover { border-color: color-mix(in srgb, var(--brand) 42%, var(--line)); }
.chip:focus-visible { outline: none; box-shadow: var(--ring); }
.chip.on { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 45%, transparent); color: var(--brand-ink); }
.chip.on b { color: var(--brand-ink); }

/* ---------- อื่น ๆ ---------- */

.center { text-align: center; }
.dim { color: var(--dim); }
.small { font-size: 13.5px; }
.hide { display: none !important; }
.copy {
  font-family: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
  word-break: break-all; font-size: 14px;
  background: var(--line-2); padding: 2px 7px; border-radius: 6px;
}

footer {
  text-align: center; font-size: 13px; color: var(--dim);
  padding: 28px 16px 40px;
  padding-bottom: max(40px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  margin-top: 10px;
}
footer a { color: var(--dim); }

/* ---------- ลิงก์ที่หน้าตาเป็นปุ่ม ----------
   ของเดิมเขียน style ยาว ๆ ติดไปกับแท็กทุกที่ พอแก้ทีต้องไล่แก้ทุกหน้า */
a.btn.link { text-align: center; text-decoration: none; line-height: 22px; }

/* ---------- ลิงก์ย้อนกลับหน้าแรก ----------
   เบา ๆ ไม่แย่งสายตาไปจากปุ่มที่ต้องกดจริงในหน้านั้น แต่ต้องเห็นชัดว่าเป็นของกดได้
   พื้นที่กดกว้างพอสำหรับนิ้วบนมือถือ (44px ตามคำแนะนำของทั้ง iOS และ Android) */
.backrow { margin: 0 0 10px; }
a.back {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 6px 12px; margin-left: -12px;
  font-size: 14px; font-weight: 600; color: var(--dim);
  text-decoration: none; border-radius: var(--r-sm);
  transition: color .12s ease, background .12s ease;
}
a.back:hover { color: var(--brand-ink); background: var(--brand-soft); }
a.back:focus-visible { outline: none; box-shadow: var(--ring); color: var(--brand-ink); }

/* ---------- หน้าแรก ----------
   การ์ดใบแรกคือด่านตัดสินว่าคนแปลกหน้าจะกล้าใช้บริการไหม ให้เด่นกว่าใบอื่นชัด ๆ */

.card.hero {
  padding: 26px 22px 22px;
  border-color: color-mix(in srgb, var(--brand) 28%, var(--line));
  box-shadow: var(--shadow-3);
  background:
    radial-gradient(120% 90% at 0% 0%, var(--brand-soft) 0%, transparent 58%),
    var(--card);
  position: relative; overflow: hidden;
}
/* เส้นเน้นบางบนขอบบน ให้การ์ดใบนี้ต่างจากใบอื่นโดยไม่ต้องใช้สีฉูดฉาด */
.card.hero::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2), transparent);
}
.card.hero h2 { font-size: 23px; line-height: 1.42; letter-spacing: -.4px; }
.hint.center { text-align: center; }

/* รายการขั้นตอนแบบย่อ ใช้บอกภาพรวมเฉย ๆ ไม่ใช่ไทม์ไลน์จริง */
.steps.tight li { padding-bottom: 13px; }

/* แถวป้ายความน่าเชื่อถือใต้ปุ่มเข้าระบบ — ใช้ในหน้าแรกเท่านั้น */
.trust { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.trust span {
  font-size: 12.5px; font-weight: 700; color: var(--brand-ink);
  background: var(--brand-soft); border-radius: 999px; padding: 6px 12px;
  border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
}

/* ---------- ตัวเลือกแบบการ์ดใหญ่ ----------
   ผู้ซื้อ/ผู้ขาย เลือกผิดคือดีลพังทั้งใบ จึงต้องกดง่ายและอ่านชัดกว่าตัวเลือกอื่น */
.choice.big label { padding: 15px 8px; font-size: 16px; line-height: 1.35; }
.choice.big label span { display: block; font-size: 12.5px; font-weight: 500; color: var(--dim); margin-top: 3px; }
.choice.big input:checked + label span { color: inherit; opacity: .85; }

/* ---------- ฟอร์มเปิดดีลแบบทีละขั้น ---------- */

.wizhead { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.wizback {
  border: 0; background: transparent; color: var(--dim);
  font: inherit; font-size: 22px; line-height: 1;
  padding: 6px 10px; margin: 0 -6px; cursor: pointer; border-radius: 10px;
  transition: background .12s ease, color .12s ease;
}
.wizback:hover { background: var(--line-2); color: var(--ink); }
.wizbar { flex: 1; height: 7px; background: var(--line); border-radius: 999px; overflow: hidden; }
.wizbar i {
  display: block; height: 100%; width: 33%; border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-2), var(--brand));
  transition: width .25s ease;
}
.wiznum { font-size: 13px; color: var(--dim); font-weight: 700; white-space: nowrap; }

.wizstep h2 { margin: 16px 0 4px; font-size: 21px; letter-spacing: -.3px; }
.bigin { font-size: 24px; font-weight: 800; letter-spacing: -.5px; }

/* ---------- ส่วนที่พับเก็บไว้ ----------
   หน้าดีลของเดิมมีการ์ดเรียงกันเจ็ดใบ คนเปิดมาแล้วไม่รู้ว่าต้องอ่านตรงไหน
   ตอนนี้เหลือกล่อง "ตอนนี้ต้องทำอะไร" กับยอดเงินที่เปิดอยู่ ที่เหลือพับไว้ให้กดดูเอง */
details.card.fold { padding: 0; }
details.card.fold > summary {
  padding: 17px 20px; font-weight: 700; font-size: 15.5px; cursor: pointer;
  list-style: none; display: flex; align-items: center; gap: 10px;
  border-radius: var(--r);
}
details.card.fold > summary:hover { background: var(--line-2); }
details.card.fold > summary::-webkit-details-marker { display: none; }
details.card.fold > summary::after {
  content: '▾'; margin-left: auto; color: var(--dim); font-size: 13px; transition: transform .18s ease;
}
details.card.fold[open] > summary::after { transform: rotate(180deg); }
details.card.fold[open] > summary { border-bottom: 1px solid var(--line); border-radius: var(--r) var(--r) 0 0; }
details.card.fold > *:not(summary) { margin-left: 20px; margin-right: 20px; }
details.card.fold > *:last-child { margin-bottom: 20px; }
details.card.fold[open] > *:not(summary):first-of-type { margin-top: 16px; }

details.more { margin-top: 18px; }
details.more > summary { font-size: 14px; color: var(--brand); cursor: pointer; font-weight: 700; }
details.more > summary:hover { text-decoration: underline; }
details.more > textarea { margin-top: 8px; }

/* จอเล็กมาก บีบระยะห่างแต่ไม่ลดขนาดปุ่มที่ต้องแตะ */
@media (max-width: 380px) {
  main { padding: 12px 12px 70px; }
  .card { padding: 16px; }
  .card.hero { padding: 22px 18px 18px; }
  .money { font-size: 32px; }
  .card.hero h2 { font-size: 21px; }
}

/* แถวลิงก์เชิญหนึ่งใบ — ดีลที่คนกลางเปิดให้จะมีสองแถว (ใบผู้ซื้อ ใบผู้ขาย)
   ต้องมีเส้นคั่นชัด ไม่งั้นคนแจกลิงก์สับสนว่าใบไหนของใคร ซึ่งคือความผิดพลาดที่แพงที่สุดในหน้านี้ */
.invrow { padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: var(--shadow-1); overflow: hidden; }
.invrow + .invrow { margin-top: 14px; }
.invite-role { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 14px; padding:16px 18px 14px; background:linear-gradient(135deg,var(--brand-soft),#fff 72%); border-bottom:1px solid color-mix(in srgb,var(--brand) 15%,var(--line)); }
.invite-role>div { display:grid; gap:1px; }
.invite-role span { color:var(--brand-ink); font-size:18px; font-weight:800; }
.invite-role .invite-kicker { color:var(--dim); font-size:11px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; }
.invite-role b { flex:0 0 auto; padding:5px 9px; border-radius:999px; background:#eaf8f2; font-size:12px; color:var(--ok); }
.invite-explain { margin:0; padding:13px 18px; color:var(--dim); font-size:13px; line-height:1.65; border-bottom:1px solid var(--line-2); }
.invite-explain strong { color:var(--ink-2); }

/* ปุ่มส่งลิงก์รายแอป (บอสสั่งเอง 7 ก.ย. 2569)
   แผงแชร์ของเครื่องบนแมคไม่มี LINE / Discord / Facebook / IG ให้เลือกเลย
   จึงต้องมีปุ่มของแต่ละแอปอยู่บนหน้าจอเอง ไม่ใช่ฝากความหวังไว้กับแผงของระบบ
   🚨 สีแบรนด์ส่งมาทางตัวแปร --app ที่แท็ก ไม่ได้เขียนสีตายไว้ในไฟล์นี้
      เพิ่มแอปใหม่ใน deal.js ได้เลยโดยไม่ต้องแตะ CSS */
.invite-send { padding:16px 18px 0; }
.invite-step { display:flex; align-items:center; gap:8px; margin:0 0 10px; color:var(--ink-2); font-size:13px; font-weight:800; }
.invite-step span, .invite-copy-num { display:inline-grid; place-items:center; width:21px; height:21px; border-radius:50%; background:var(--brand); color:#fff; font-size:12px; line-height:1; }
.invite-copy { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:14px 0; padding:12px; border:1px solid var(--line); border-radius:12px; background:#fafcff; }
.invite-copy>div { display:grid; gap:2px; font-size:13px; color:var(--ink-2); }
.invite-copy>div>b { display:flex; align-items:center; gap:7px; }
.invite-copy>div>span { color:var(--dim); font-size:12px; line-height:1.45; }
.invite-copy .btn { flex:0 0 auto; min-height:44px; padding:9px 12px; font-size:12px; }
.invite-wait { display:grid; grid-template-columns:auto minmax(0,1fr); gap:10px 12px; align-items:start; margin:16px 18px; padding:17px; border:1px solid #bce8d7; border-radius:14px; background:linear-gradient(135deg,#f1fcf7,#fff); }
.invite-wait-icon { display:grid; place-items:center; width:30px; height:30px; border-radius:50%; background:var(--ok); color:#fff; font-size:17px; font-weight:800; }
.invite-wait strong { display:block; color:#17684f; font-size:15px; }
.invite-wait p { margin:3px 0 0; color:var(--ink-2); font-size:13px; line-height:1.55; }
.invite-wait .invite-next { margin-top:9px; padding-top:9px; border-top:1px solid #d6f1e4; color:#17684f; }
.invite-resend { grid-column:2; justify-self:start; min-height:34px; margin-top:2px; padding:5px 0; border:0; background:transparent; color:var(--brand-ink); font:inherit; font-size:12px; font-weight:700; text-decoration:underline; text-underline-offset:3px; cursor:pointer; }
.inv-copytext { background:var(--brand); color:#fff; box-shadow:0 8px 18px color-mix(in srgb,var(--brand) 24%,transparent); }
.inv-copytext:hover:not(:disabled) { background:var(--brand-2); transform:translateY(-1px); }
.inv-native { color:var(--brand-ink); border-color:color-mix(in srgb,var(--brand) 35%,var(--line)); }
.shareapps {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px; margin-bottom: 10px;
}
.shapp {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 46px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: #fff; color: var(--ink); text-decoration: none;
  font: inherit; font-size: 14px; font-weight: 600; line-height: 1.2; text-align: center; cursor:pointer;
}
.shapp:hover { border-color: var(--app); background: color-mix(in srgb,var(--app) 7%,#fff); }
.shapp:focus-visible { outline: none; box-shadow: var(--ring); }
.shapp svg { width: 19px; height: 19px; flex: 0 0 auto; fill: var(--app); }
.shnote {
  margin: 0 0 8px; padding: 8px 10px; border-radius: var(--r-sm);
  background: var(--brand-soft); color: var(--brand-ink); font-size: 13.5px;
}
.invite-more, .invite-link { margin:0; border-top:1px solid var(--line); }
.invite-more summary { min-height:44px; padding:10px 13px; cursor:pointer; list-style:none; color:var(--ink-2); font-size:13px; font-weight:700; }
.invite-more summary::-webkit-details-marker { display:none; }
.invite-more summary::after { content:'⌄'; float:right; color:var(--dim); }
.invite-more[open] summary { border-bottom:1px solid var(--line); background:var(--line-2); }
.invite-more[open] summary::after { transform:rotate(180deg); }
.shareapps-more { padding:10px; margin:0; }
.invite-more .inv-native { width:calc(100% - 20px); margin:0 10px 12px; }
.invite-link summary { min-height:44px; padding:12px 18px; cursor:pointer; color:var(--dim); font-size:12px; list-style:none; }
.invite-link summary::-webkit-details-marker { display:none; }
.invite-link summary::after { content:'⌄'; float:right; }
.invite-link[open] summary { background:var(--line-2); color:var(--ink-2); }
.invite-link[open] summary::after { transform:rotate(180deg); }
.inv-link { width:100%; min-height:42px; border:0; background:transparent; color:var(--brand-ink); font:inherit; font-size:13px; font-weight:700; cursor:pointer; }
.inv-link:hover { text-decoration:underline; }
.invite-url { margin:0 18px 14px; padding:8px 10px; border-radius:8px; background:var(--line-2); font-size:11px; overflow-wrap:anywhere; }
@media (max-width:480px) { .shareapps{grid-template-columns:repeat(2,minmax(0,1fr));}.invite-copy{align-items:stretch;flex-direction:column;}.invite-copy .btn{width:100%;}.invite-role b{width:100%;text-align:center;}.invite-wait{margin:14px; padding:14px;}.invite-wait strong{font-size:14px;} }

/* ช่องติ๊กยืนยันในกล่องเตือน (หลังบ้าน: ปล่อยเงินทั้งที่ผู้ซื้อไม่ได้กดยืนยัน)
   ต้องกดง่ายด้วยนิ้วโป้ง และต้องอยู่ในกล่องเตือนไม่ใช่ลอยอยู่ข้างนอก */
.ackline {
  display: flex; align-items: flex-start; gap: 9px;
  margin: 10px 0 0; padding: 10px; min-height: 44px;
  background: #fff; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.ackline input { width: 20px; height: 20px; flex: 0 0 auto; margin: 0; }


/* ---------- หน้าสรุปรายได้รายเดือน (report.html) ----------
   หน้านี้เจ้าของเปิดคนเดียวเพื่อดูว่าเดือนนี้ได้ค่าบริการเท่าไหร่ ไว้ยื่นภาษี
   ตัวเลขต้องอ่านจบในแวบเดียวบนมือถือ ไม่ต้องเพ่ง */

/* แถวเลือกเดือน/ปี — ปุ่มปกติกินเต็มบรรทัด ตรงนี้ให้หดพอดีตัวจะได้อยู่แถวเดียวกับช่องเลือก */
.monthpick { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.monthpick h2 { width: 100%; margin-bottom: 4px; }
.monthpick label { font-size: 14px; color: var(--dim); margin: 0; }
.monthpick select {
  padding: 11px 12px; font-size: 16px; font-family: inherit;
  color: var(--ink); background: var(--card);
  border: 1.5px solid var(--line); border-radius: var(--r-sm);
  width: auto;
}
.monthpick .btn { width: auto; margin-top: 0; padding: 11px 20px; min-height: 0; }
.monthpick .hint { width: 100%; margin-top: 2px; }

/* กล่องตัวเลขสรุป — มือถือ 2 ช่อง จอใหญ่ 4 ช่อง */
.sumgrid {
  display: grid; gap: 10px; margin-bottom: 14px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 700px) { .sumgrid { grid-template-columns: repeat(4, 1fr); } }

.sumbox {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 15px; box-shadow: var(--shadow-1);
  display: flex; flex-direction: column; gap: 6px;
}
.sumbox span { font-size: 12.5px; color: var(--dim); line-height: 1.35; font-weight: 600; }
.sumbox b { font-size: 23px; line-height: 1.15; letter-spacing: -.5px; font-weight: 800; }

/* ช่อง "รายได้ค่าบริการรวม" คือตัวเลขที่เจ้าของเปิดหน้านี้มาเพื่อดู ทำให้เด่นกว่าเพื่อน
   เบราว์เซอร์เก่าที่ยังไม่รู้จัก :has() จะข้ามกฎนี้ไปเฉย ๆ หน้าไม่พัง แค่ไม่เด่น */
.sumbox:has(#totalFee) {
  border-color: color-mix(in srgb, var(--brand) 45%, transparent);
  background: linear-gradient(160deg, var(--brand-soft), var(--card) 130%);
  box-shadow: var(--shadow-2);
}
.sumbox:has(#totalFee) b { color: var(--brand); font-size: 27px; }

/* ตารางรายดีล — เลื่อนแนวนอนในกล่องตัวเอง ห้ามให้ทั้งหน้าเลื่อนตาม */
.rowtable { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rowtable table { border-collapse: collapse; width: 100%; font-size: 14px; }
.rowtable th, .rowtable td {
  text-align: left; padding: 11px 12px; white-space: nowrap;
  border-bottom: 1px solid var(--line-2);
}
.rowtable th {
  font-size: 12px; color: var(--dim); font-weight: 800;
  letter-spacing: .3px; text-transform: uppercase;
  border-bottom-color: var(--line);
}
.rowtable tbody tr:last-child td { border-bottom: 0; }


/* ══════════════════════════════════════════════════════════════════════
   หน้าแรกแบบเล่าเรื่อง (28 ส.ค. 2569)
   บอสสั่ง "ทันสมัยกว่านี้ น่าเชื่อถือกว่านี้ ใช้ง่ายกว่านี้ แบบ fastwork bitkub"

   หลักคิด: หน้าแรกเดิมคือการ์ดสี่ใบเรียงกันให้อ่านเอง คนแปลกหน้าที่กำลังกลัวโดนโกง
   เปิดมาแล้วไม่รู้จะเริ่มตรงไหน ตอนนี้เรียงเป็นฉาก — เห็นปุ่มก่อน แล้วค่อยเล่าทีละเรื่อง
   จนถึงคำถามที่ค้างในใจ แล้วปิดด้วยปุ่มอีกครั้ง

   🛑 ทุกอย่างในนี้วาดด้วย gradient กับ inline SVG ในไฟล์ HTML เท่านั้น
      ห้ามเรียกฟอนต์หรือรูปจากอินเทอร์เน็ต CSP บล็อก หน้าจะเงียบโดยไม่มีข้อความบอก
   ══════════════════════════════════════════════════════════════════════ */

/* ---------- เมนูบนหัว ----------
   จอเล็กซ่อนไว้ เพราะปุ่มเข้าระบบสำคัญกว่าเมนู */
.topnav { display: none; gap: 4px; }
@media (min-width: 620px) { .topnav { display: flex; } }
.topnav a, .topnav .nav-start {
  color: var(--dim); text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 7px 11px; border-radius: 9px;
  transition: background .12s ease, color .12s ease;
}
.topnav a:hover, .topnav .nav-start:hover { background: var(--line-2); color: var(--ink); }

/* ---------- ฮีโร่ ----------
   กินเต็มขอบจอบนมือถือ (ลบระยะ padding ของ main ออกด้วยระยะติดลบ)
   จอใหญ่หดกลับเป็นแผ่นมุมมนลอยอยู่กลางหน้า */
.pagehero {
  position: relative; overflow: hidden;
  margin: -18px -16px 18px;
  padding: 34px 20px 26px;
  border-bottom: 1px solid var(--line);
  background: var(--brand-soft);
  background:
    radial-gradient(90% 120% at 8% -10%, var(--brand-soft) 0%, transparent 62%),
    radial-gradient(70% 90% at 100% 0%, var(--accent-soft) 0%, transparent 58%),
    linear-gradient(180deg, var(--card) 0%, var(--bg) 100%);
}
@media (min-width: 620px) {
  .pagehero {
    margin: 0 0 20px; padding: 44px 34px 32px;
    border: 1px solid var(--line); border-radius: 26px;
    box-shadow: var(--shadow-3);
  }
}
/* เส้นบางบนขอบบน ทำให้แผ่นฮีโร่มีที่สิ้นสุดชัดโดยไม่ต้องใช้สีจัด */
.pagehero::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--accent), transparent);
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 800; letter-spacing: .2px;
  color: var(--brand-ink); background: var(--card);
  border: 1px solid var(--line);
  padding: 6px 13px 6px 9px; border-radius: 999px;
  box-shadow: var(--shadow-1); margin-bottom: 14px;
}
.eyebrow svg { width: 15px; height: 15px; flex: 0 0 auto; }

.pagehero h1 {
  margin: 0 0 12px; font-size: 30px; line-height: 1.32;
  letter-spacing: -.7px; font-weight: 800;
}
@media (min-width: 620px) { .pagehero h1 { font-size: 38px; line-height: 1.28; } }
@media (max-width: 380px)  { .pagehero h1 { font-size: 26px; } }

.pagehero .lead {
  margin: 0 0 20px; font-size: 16.5px; line-height: 1.7; color: var(--ink-2);
  max-width: 34em;
}
.pagehero .btn { max-width: 420px; }
.pagehero .hint { max-width: 420px; }

/* ---------- แผนภาพเงินเดินทาง ----------
   ประโยคว่า "เราถือเงินไว้ก่อน" อ่านแล้วยังนึกภาพไม่ออก อันนี้ทำให้เห็นใน 2 วินาที */
.flowmap {
  display: grid; grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: start; gap: 4px;
  margin: 22px 0 4px; padding: 16px 10px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-1);
}
.flowmap .node { text-align: center; font-size: 12.5px; line-height: 1.4; color: var(--dim); font-weight: 700; }
.flowmap .node b { display: block; font-size: 13.5px; color: var(--ink); margin-top: 5px; font-weight: 800; }
.flowmap .ic {
  width: 42px; height: 42px; margin: 0 auto; border-radius: 13px;
  display: grid; place-items: center;
  background: var(--line-2); color: var(--dim);
  border: 1px solid var(--line);
}
.flowmap .ic svg { width: 21px; height: 21px; }
/* ช่องกลางคือจุดขายของทั้งบริการ ต้องเด่นกว่าอีกสองช่องชัด ๆ */
.flowmap .node.mid .ic {
  background: linear-gradient(150deg, var(--brand-2), var(--brand));
  border-color: transparent; color: #fff;
  box-shadow: 0 6px 16px -6px rgba(15,107,79,.55);
}
.flowmap .node.mid b { color: var(--brand-ink); }
.flowmap .arrow { align-self: center; color: var(--line); display: grid; place-items: center; padding-bottom: 18px; }
.flowmap .arrow svg { width: 18px; height: 18px; }
@media (max-width: 380px) {
  .flowmap { padding: 14px 4px; gap: 0; }
  .flowmap .node { font-size: 11.5px; }
  .flowmap .node b { font-size: 12.5px; }
}

/* ---------- แถบตัวเลข ----------
   ⚠️ ห้ามใส่ตัวเลขที่ยังไม่จริง เช่น "ให้บริการมาแล้ว 10,000 ดีล"
      ตัวเลขในแถบนี้ต้องเป็นเงื่อนไขบริการที่ตรวจสอบได้จาก config.js เท่านั้น */
.statbar {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin: 0 0 22px;
}
.statbar div {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 13px 10px; text-align: center; box-shadow: var(--shadow-1);
}
.statbar b {
  display: block; font-size: 19px; font-weight: 800; letter-spacing: -.5px;
  color: var(--brand); line-height: 1.2;
}
.statbar span { display: block; font-size: 11.5px; color: var(--dim); margin-top: 4px; line-height: 1.35; font-weight: 600; }
@media (max-width: 380px) { .statbar b { font-size: 17px; } .statbar span { font-size: 11px; } }

/* ---------- หัวข้อแต่ละฉาก ---------- */
.sect { margin: 34px 0 18px; }
.sect .kicker {
  font-size: 12px; font-weight: 800; letter-spacing: 1.1px; text-transform: uppercase;
  color: var(--accent); margin: 0 0 6px;
}
.sect h2 { margin: 0 0 6px; font-size: 24px; line-height: 1.35; letter-spacing: -.5px; font-weight: 800; }
.sect p { margin: 0; color: var(--dim); font-size: 15px; line-height: 1.65; }

/* ---------- วิธีใช้ แบบการ์ดมีเลข ---------- */
.howlist { display: grid; gap: 10px; }
@media (min-width: 620px) { .howlist { grid-template-columns: 1fr 1fr; } }
.howlist li {
  list-style: none; position: relative;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px 16px 16px 58px; box-shadow: var(--shadow-1);
  font-size: 15px; line-height: 1.55;
}
.howlist li b { display: block; font-weight: 800; margin-bottom: 3px; letter-spacing: -.1px; }
.howlist li span { color: var(--dim); font-size: 14px; }
.howlist li::before {
  counter-increment: how; content: counter(how);
  position: absolute; left: 15px; top: 15px;
  width: 30px; height: 30px; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 800; color: #fff;
  background: linear-gradient(150deg, var(--brand-2), var(--brand));
  box-shadow: 0 4px 10px -4px rgba(15,107,79,.6);
}
.howlist { counter-reset: how; padding: 0; margin: 0; }
/* ขั้นที่เงินยังอยู่กับเราเป็นขั้นที่คนกังวลที่สุด ทำให้ต่างจากใบอื่น */
.howlist li.key {
  border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
  background: linear-gradient(160deg, var(--brand-soft), var(--card) 70%);
}

/* ---------- การ์ดราคา ---------- */
.pricegrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 620px) { .pricegrid { grid-template-columns: repeat(4, 1fr); } }
.pricecard {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 15px 13px; box-shadow: var(--shadow-1);
  display: flex; flex-direction: column; gap: 3px;
}
.pricecard .rng { font-size: 12.5px; color: var(--dim); font-weight: 700; line-height: 1.35; }
.pricecard .amt {
  font-size: 27px; font-weight: 800; letter-spacing: -1px; color: var(--brand);
  font-variant-numeric: tabular-nums; line-height: 1.15; margin-top: 4px;
}
.pricecard .amt small { font-size: 14px; font-weight: 700; letter-spacing: 0; color: var(--dim); margin-left: 3px; }

/* ---------- เครื่องคิดค่าบริการหน้าแรก ----------
   ไอเดียนี้มาจากกล่องคำนวณราคาของ Fastwork — ตอบคำถาม "แล้วต้องจ่ายเท่าไหร่"
   ได้ตั้งแต่ยังไม่ต้องเข้าระบบ ซึ่งเป็นด่านที่คนถอยกลับมากที่สุด */
.calc {
  background:
    radial-gradient(100% 130% at 100% 0%, var(--accent-soft) 0%, transparent 60%),
    var(--card);
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px; box-shadow: var(--shadow-2); margin-top: 12px;
}
.calc label { margin-top: 0; }
.calc .rows { margin-top: 12px; }
.calc .rows div:first-child { border-top: 0; }

/* ---------- เหตุผลที่เชื่อถือได้ ---------- */
.featgrid { display: grid; gap: 10px; }
@media (min-width: 620px) { .featgrid { grid-template-columns: 1fr 1fr; } }
.feat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px; box-shadow: var(--shadow-1);
  display: flex; gap: 13px; align-items: flex-start;
}
.feat .fic {
  width: 38px; height: 38px; flex: 0 0 auto; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand);
  border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
}
.feat .fic svg { width: 19px; height: 19px; }
.feat b { display: block; font-size: 15.5px; font-weight: 800; letter-spacing: -.15px; margin-bottom: 3px; }
.feat p { margin: 0; font-size: 14px; color: var(--dim); line-height: 1.6; }

/* ---------- คำถามที่พบบ่อย ----------
   คำถามในนี้คือสิ่งที่คนกลัวโดนโกงคิดอยู่จริง ๆ ตอบตรง ๆ ดีกว่าปล่อยให้เขาเดาเอง */
.faq { display: grid; gap: 8px; }
.faq details {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm);
  box-shadow: var(--shadow-1); overflow: hidden;
}
.faq summary {
  padding: 15px 16px; font-weight: 700; font-size: 15px; cursor: pointer;
  list-style: none; display: flex; align-items: center; gap: 10px; line-height: 1.5;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; margin-left: auto; flex: 0 0 auto;
  color: var(--brand); font-size: 20px; font-weight: 700; line-height: 1;
  transition: transform .18s ease;
}
.faq details[open] summary::after { content: '\2212'; }
.faq summary:hover { background: var(--line-2); }
.faq details[open] summary { border-bottom: 1px solid var(--line-2); }
.faq details > p { margin: 0; padding: 14px 16px 16px; font-size: 14.5px; line-height: 1.7; color: var(--ink-2); }

/* ---------- แถบปิดท้าย ---------- */
.ctaband {
  margin-top: 28px; padding: 26px 20px; border-radius: var(--r);
  text-align: center; color: #fff;
  background: linear-gradient(150deg, var(--brand-2), var(--brand) 70%, var(--brand-ink));
  box-shadow: var(--shadow-3);
}
.ctaband h2 { margin: 0 0 8px; font-size: 21px; letter-spacing: -.4px; line-height: 1.4; }
.ctaband p { margin: 0 0 16px; font-size: 14.5px; line-height: 1.6; opacity: .92; }
.ctaband .btn {
  background: #fff; color: var(--brand-ink); max-width: 380px; margin: 0 auto;
  box-shadow: 0 6px 18px -6px rgba(0,0,0,.35);
}
.ctaband .btn:hover:not(:disabled) { background: #fff; }
.ctaband a { color: #fff; }

/* ---------- พื้นที่ทำงาน: หน้าดีลและหลังบ้าน ----------
   หน้าสาธารณะต้องอ่านง่ายบนมือถือ ส่วนหน้าดีลกับหลังบ้านมักเปิดบนจอใหญ่
   จึงขยายเฉพาะสองส่วนนี้เมื่อมีพื้นที่ โดยไม่บีบฟอร์มหรือปุ่มบนมือถือ */
#dealBody > .card:first-child {
  background:
    radial-gradient(100% 140% at 0% 0%, var(--brand-soft) 0%, transparent 60%),
    var(--card);
  border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
  box-shadow: var(--shadow-3);
}
#dealBody > .card:first-child .tag { box-shadow: var(--shadow-1); }

@media (min-width: 820px) {
  /* รายงานอ่านตารางได้เต็มขึ้น และคิวงานเห็นภาพรวมโดยไม่ต้องเลื่อนยาว */
  body.admin main { max-width: 960px; }
  body.admin #queues {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
  }
  body.admin #queues > .card { margin-bottom: 0; }
  body.admin #queues > .card:first-child {
    grid-column: 1 / -1;
    background:
      radial-gradient(95% 130% at 0% 0%, var(--brand-soft) 0%, transparent 62%),
      var(--card);
    border-color: color-mix(in srgb, var(--brand) 28%, var(--line));
    box-shadow: var(--shadow-3);
  }
  body.admin #queues > .card h2 { font-size: 18px; }
}

/* ---------- ปุ่มติดขอบล่างบนมือถือ ----------
   หน้าแรกยาวขึ้นกว่าเดิมมาก ถ้าไม่มีตัวนี้คนเลื่อนอ่านไปกลางทางแล้วต้องเลื่อนกลับขึ้นไปหาปุ่ม
   จอใหญ่ไม่ต้องมี เพราะปุ่มบนหัวเห็นอยู่แล้ว */
.stickycta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: 10px 14px; padding-bottom: max(10px, env(safe-area-inset-bottom));
  background: var(--card);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px -12px rgba(16,32,42,.3);
}
.stickycta .btn { margin-top: 0; min-height: 48px; font-size: 16px; }
@media (min-width: 620px) { .stickycta { display: none !important; } }

/* ---------- ส่วนที่เข้าระบบแล้ว ----------
   คนที่เข้าระบบแล้วไม่ต้องอ่านโฆษณาอีก ต้องการปุ่มเปิดดีลกับรายการดีลเท่านั้น */
.welcome {
  background:
    radial-gradient(110% 130% at 0% 0%, var(--brand-soft) 0%, transparent 60%),
    var(--card);
  border-color: color-mix(in srgb, var(--brand) 26%, var(--line));
  box-shadow: var(--shadow-3);
}
.welcome h2 { font-size: 21px; letter-spacing: -.4px; }

/* MidMan Platform — shared foundation and responsive public experience. */
@font-face{font-family:PlexThai;src:url('../fonts/plex-thai-regular.ttf') format('truetype');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:PlexThai;src:url('../fonts/plex-thai-semibold.ttf') format('truetype');font-weight:500 600;font-style:normal;font-display:swap}
@font-face{font-family:PlexThai;src:url('../fonts/plex-thai-bold.ttf') format('truetype');font-weight:700 900;font-style:normal;font-display:swap}
:root{color-scheme:light;--bg:#f5f7fa;--bg-2:#ecf1f6;--card:#fff;--ink:#142432;--ink-2:#364956;--dim:#637481;--line:#dce4e9;--line-2:#edf1f4;--brand:#285bd4;--brand-2:#3568e8;--brand-ink:#204ba8;--brand-soft:#edf3ff;--accent:#285bd4;--accent-soft:#edf3ff;--warn:#965016;--warn-soft:#fff3e5;--danger:#b2302a;--danger-soft:#fff0ee;--ok:#0b7551;--r:18px;--r-sm:10px;--shadow-1:0 2px 4px #0b243205;--shadow-2:0 5px 20px #0b243209;--shadow-3:0 16px 45px #0b243212;--ring:0 0 0 3px #3568e840}
body.admin{--bg:#f3f6fa;--bg-2:#eaf0f7;--brand:#285a88;--brand-2:#346b9d;--brand-ink:#193d60;--brand-soft:#e7eff8;--ring:0 0 0 3px #244f7c40}
html{scroll-padding-top:100px}
body{background:var(--bg);font-family:PlexThai,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;font-size:16px;line-height:1.7}
button,input,select,textarea{font-family:inherit}
header.top{min-height:80px;padding:15px max(24px,calc((100vw - 1200px)/2));background:#fffffff2;border-bottom:1px solid #e5eaee;gap:20px}
header.top .logo{font-size:26px;letter-spacing:-1px;color:#142c50;gap:10px}
header.top .logo .mark{width:37px;height:39px;border-radius:11px;background:#285bd4;box-shadow:none}
header.top .logo .mark svg{width:25px;height:25px}
.topnav{display:flex;align-items:center;gap:14px}
.topnav a,.topnav .nav-start{padding:9px 10px;font-size:14px;color:#455967;text-decoration:none;border-radius:7px}
.topnav a:hover,.topnav .nav-start:hover{color:var(--brand);background:var(--brand-soft)}
.topnav .nav-start{margin-left:12px;padding:10px 22px;background:#142c50;color:#fff;font:inherit;font-size:14px;font-weight:600;line-height:1.7;border:0;cursor:pointer}
.mobile-menu{display:none}
.who{max-width:200px;overflow-wrap:anywhere}
main{max-width:760px;padding:30px 20px 80px}
body.home main{max-width:1248px;padding:32px 24px 80px}
body.home{background:#fff}
body.home:has(#secIntro.hide){background:var(--bg)}
#secHome,#secNew{max-width:760px;margin-inline:auto}
.pagehero{position:relative;isolation:isolate;overflow:hidden;display:grid;grid-template-columns:1.1fr 1fr;align-items:center;gap:54px;padding:58px 52px;margin:0;border:0;border-radius:24px;background:radial-gradient(ellipse at 95% 85%,#315f9b4d,transparent 55%),#10233f;color:#fff;box-shadow:none}
.pagehero::before{inset:auto -20% -430px auto;width:800px;height:800px;border:1px solid #a0bfff1a;border-radius:50%;background:none;pointer-events:none}
.hero-orbit{position:absolute;z-index:-1;width:900px;height:900px;right:-250px;bottom:-630px;border:1px solid #a0bfff27;border-radius:50%;box-shadow:0 0 0 100px #a0bfff08;pointer-events:none}
.hero-copy{min-width:0;position:relative;z-index:1}
.pagehero .eyebrow{margin:0 0 25px;padding:0;background:none;border:0;box-shadow:none;color:#b6c8e0;font-size:11px;letter-spacing:1.4px;font-weight:500;gap:9px}
.eyebrow-dot{width:7px;height:7px;background:#97baff;border-radius:50%}
.pagehero h1{margin:0 0 26px;max-width:580px;font-size:clamp(40px,4.4vw,61px);font-weight:600;line-height:1.28;letter-spacing:-2px;color:white}
.hero-highlight{display:block;color:#a6c6ff;position:relative;width:fit-content;white-space:nowrap}
.hero-highlight svg{position:absolute;width:100%;height:15px;bottom:-7px;left:0;fill:none;stroke:#799fff;stroke-width:2.5;opacity:.65}
.pagehero .lead{margin:0 0 28px;font-size:15px;line-height:1.9;color:#c3cfe0;max-width:410px}
.hero-actions{display:flex;align-items:center;gap:22px;flex-wrap:wrap}
.hero-actions .btn{width:auto;min-height:52px;margin:0;padding:13px 22px;background:#3568e8;color:#ffffff;font-size:15px;border-radius:9px;box-shadow:none}
.start-deal{display:inline-flex!important;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:76px!important;padding:13px 28px!important;line-height:1.2!important}
.start-deal-main{font-size:22px;font-weight:700}
.start-deal-help{font-size:12px;font-weight:400;opacity:.88}
.stickycta .start-deal{width:100%;min-height:58px!important;padding:7px 18px!important}
.stickycta .start-deal-main{font-size:20px}
.hero-actions .btn:hover:not(:disabled){background:#4779f4;box-shadow:0 4px 20px #6592ff26}
.hero-secondary{color:#fff;font-size:14px;text-decoration:none;white-space:nowrap;padding:12px 0}
.hero-secondary span{margin-left:8px;color:#8fb1f3}
.hero-caption{font-size:11px;color:#a9bbd4;margin:12px 0 0}
.hero-points{display:flex;flex-wrap:wrap;gap:18px;margin-top:32px;font-size:12px;color:#c7d5e9}
.hero-points i{font-style:normal;color:#a2bfff;margin-right:6px}
#authMsg:empty{display:none}
.pagehero #authMsg:not(:empty){padding:12px 14px;margin:15px 0;background:#fff0ee;color:#9c2521;border:1px solid #ecbcb7;border-radius:8px;font-size:14px;max-width:none}
.hero-tool{position:relative;z-index:1;background:#fff;color:var(--ink);border:1px solid #ffffff7a;border-radius:18px;box-shadow:0 24px 70px #020c1733;min-width:0;overflow:hidden}
.tool-topline{display:flex;justify-content:space-between;align-items:center;gap:10px;border-bottom:1px solid var(--line-2);padding:16px 22px;font-size:12px;font-weight:600}
.tool-topline>span:first-child{display:flex;gap:8px;align-items:center}
.mini-mark{width:25px;height:25px;display:grid;place-items:center;background:#eaf0ff;color:#285bd4;border-radius:7px;font-size:15px;font-weight:700}
.tool-tag{font-size:10px;font-weight:400;background:#f1f4f7;color:#64737d;border-radius:5px;padding:3px 7px;white-space:nowrap}
.hero-tool .calc{padding:23px 25px 15px;margin:0;max-width:none;background:#fff;border:0;box-shadow:none;border-radius:0}
.calc-heading h2{font-size:20px;margin:0 0 4px;letter-spacing:-.5px;line-height:1.5}
.calc-heading p{font-size:12px;margin:0;color:var(--dim)}
.hero-tool label,.payer-label{font-size:12px;color:#526572;font-weight:500;margin-top:20px;display:block}
.amount-shell{position:relative}
.amount-shell .bigin{font-size:31px;font-weight:600;text-align:left;padding:10px 62px 10px 15px;letter-spacing:-.7px;background:#fff;border:1.5px solid #b9c9e3;border-radius:9px;line-height:1.5}
.amount-shell>span{position:absolute;right:17px;top:50%;transform:translateY(-50%);font-size:12px;color:#5b6f90;pointer-events:none}
.hero-tool .choice{background:#f1f5f7;border:1px solid #e6ecef;border-radius:9px;padding:4px;gap:4px}
.hero-tool .choice label{font-size:12px;padding:8px 4px;margin:0;border:1px solid transparent;background:transparent;border-radius:6px;box-shadow:none;color:#596b76;line-height:1.5}
.hero-tool .choice input:checked+label{background:#fff;border-color:#dce6e0;color:#285bd4;box-shadow:0 1px 5px #0c2b3410}
#calcOut{min-height:168px}
#calcOut .rows{border-top:0;margin-top:14px}
#calcOut .rows div{font-size:12px;padding:8px 0;line-height:1.5;gap:14px}
#calcOut .rows div.total{font-size:13px;padding:11px 12px;margin:6px -12px 0;background:#eaf7ef;border:0;border-radius:7px}
#calcOut .rows div.total span:last-child{color:#08744c;font-size:18px;font-weight:600;white-space:nowrap}
#calcOut .rows div:last-child{border-bottom:0}
#calcOut .hint{font-size:12px;padding:10px 0;color:var(--dim)}
.calc-details{display:flex;justify-content:space-between;text-decoration:none;font-size:11px;color:#285bd4;border-top:1px solid var(--line-2);padding-top:10px}
.tool-foot{display:flex;justify-content:center;gap:7px;align-items:center;background:#f7faf9;padding:11px 15px;color:#52675c;font-size:10px;border-top:1px solid #edf2ef}
.tool-foot svg{width:13px;height:13px}
.statbar{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;margin:0 0 48px;padding:26px 0;border-bottom:1px solid var(--line)}
.statbar div{display:flex;align-items:center;justify-content:center;gap:12px;background:none;border:0;border-radius:0;box-shadow:none;padding:3px 14px}
.statbar div+div{border-left:1px solid var(--line)}
.statbar b{font-size:23px;color:#19365c;line-height:1.35;white-space:nowrap}
.statbar span{font-size:11px;max-width:105px;text-align:left;line-height:1.6;color:var(--dim)}
.usecases{display:grid;grid-template-columns:1.15fr repeat(3,1fr);gap:14px;align-items:stretch;margin:0 0 60px}
.usecase-intro{padding:14px 14px 14px 0;align-self:center}
.usecase-intro small,.section-index{color:#285bd4;font-size:11px;letter-spacing:1px;font-weight:600}
.usecase-intro h2{font-size:24px;line-height:1.5;margin:8px 0;letter-spacing:-.6px}
.usecase{display:flex;flex-direction:column;text-decoration:none;position:relative;min-width:0;gap:6px;padding:22px;background:#f5f7fa;border:1px solid #ecf0f3;border-radius:14px;color:#243a48;transition:border-color .2s,transform .2s}
.usecase:hover{border-color:#a6bceb;transform:translateY(-3px)}
.usecase svg{width:29px;height:29px;stroke:#285bd4;margin-bottom:15px}
.usecase b{font-size:15px;font-weight:600}
.usecase span{font-size:11px;color:var(--dim);padding-right:8px}
.usecase:after{content:'↗';position:absolute;top:20px;right:20px;color:#799489;font-size:15px}
.sect{margin:64px 0 25px;text-align:left;position:relative}
.sect .kicker{color:#285bd4;font-size:11px;letter-spacing:1px;font-weight:600;margin:0 0 8px}
.sect h2{font-size:clamp(25px,2.7vw,34px);letter-spacing:-.9px;line-height:1.5;font-weight:600;margin:0 0 8px}
.sect p{font-size:14px;color:var(--dim);line-height:1.8}
#how{border-top:1px solid var(--line);padding-top:50px}
.howlist{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;padding:0;border:1px solid var(--line);border-radius:16px;overflow:hidden;background:#fff}
.howlist li{padding:72px 20px 24px;box-shadow:none;border:0;border-radius:0;min-width:0;background:none;margin:0}
.howlist li+li{border-left:1px solid var(--line)}
.howlist li::before{top:23px;left:20px;width:31px;height:31px;border-radius:9px;background:#edf2fc;color:#285bd4;box-shadow:none;font-size:13px}
.howlist li.key{background:#f0f5ff;border:0;border-left:1px solid var(--line)}
.howlist li.key::before{background:#285bd4;color:white}
.howlist li b{font-size:14px;line-height:1.7;font-weight:600;margin-bottom:9px}
.howlist li span{font-size:12px;line-height:1.8}
.pricegrid{gap:16px;grid-template-columns:repeat(3,minmax(0,1fr))}
.pricecard{padding:26px 24px;border-radius:14px;box-shadow:none;background:#f7f9fb;border:1px solid #e5ebef;text-align:left}
.pricecard:first-child{background:#f0f5ff;border-color:#c1d1ee}
.pricecard .rng{font-size:13px;color:#596e7a;line-height:1.6}
.pricecard .amt{color:#19365c;font-size:37px;line-height:1.5;font-weight:600;letter-spacing:-1px}
.pricecard .amt small{font-size:12px;letter-spacing:0;margin-left:6px}
#publicLimit{margin:15px 0 0;font-size:12px}
.fee-recalculate{display:inline-flex;gap:14px;color:#285bd4;font-size:13px;font-weight:500;margin-top:18px;text-decoration:none}
.featgrid{gap:16px}
.feat{padding:29px;border:1px solid #e6ecef;background:#fff;border-radius:14px;box-shadow:none;gap:17px}
.feat .fic{width:44px;height:44px;border-radius:12px;border:0;background:#edf3ff;color:#285bd4}
.feat b{font-size:16px;font-weight:600;margin-bottom:8px;line-height:1.5}
.feat p{font-size:13px;line-height:1.9}
#officialAccount{margin-top:22px!important;padding:20px 24px;font-size:13px;border:1px solid #cbded0;background:#f2f8f3;color:#315b45}
.faq{max-width:880px;gap:0;border-top:1px solid var(--line)}
.faq details{background:#fff;border:0;border-bottom:1px solid var(--line);border-radius:0;box-shadow:none}
.faq summary{padding:23px 4px;font-size:15px;font-weight:500}
.faq summary::after{font-size:22px;margin-right:8px;color:#5a7365}
.faq summary:hover{background:#f7faf8}
.faq details>p{padding:0 25px 24px 4px;color:var(--dim);font-size:13px;line-height:1.9}
.learn-more{margin-top:52px;border:1px solid var(--line);border-radius:16px;background:#f8fafc;overflow:hidden}
.learn-more>summary{list-style:none;cursor:pointer;padding:20px 24px;font-size:16px;font-weight:600;color:#193b68;display:flex;align-items:center;gap:12px}
.learn-more>summary::-webkit-details-marker{display:none}
.learn-more>summary::after{content:'+';margin-left:auto;font-size:24px;line-height:1;color:#285bd4}
.learn-more[open]>summary::after{content:'−'}
.learn-more[open]>summary{border-bottom:1px solid var(--line);background:#fff}
.learn-more>.sect,.learn-more>.featgrid,.learn-more>.note,.learn-more>.faq{margin-left:24px;margin-right:24px}
.learn-more>.faq{margin-bottom:28px}
.compact-sect{margin-top:28px}
.ctaband{margin-top:64px;padding:40px 44px;background:radial-gradient(ellipse at 100% 100%,#234b80,transparent 60%),#10233f;border:0;border-radius:18px;box-shadow:none;display:grid;grid-template-columns:1fr auto;text-align:left;gap:0 30px;align-items:center}
.ctaband h2{font-size:28px;font-weight:600;grid-column:1;line-height:1.5;margin-bottom:6px}
.ctaband p{font-size:13px;color:#c2d0e3;margin:0;grid-column:1}
.ctaband .btn{grid-column:2;grid-row:1/3;margin:0;background:#3568e8;color:#ffffff;font-size:14px;min-width:220px;border-radius:9px;padding:13px 20px;box-shadow:none}
.ctaband .start-deal{min-width:260px}
.ctaband .btn:hover:not(:disabled){background:#4779f4}
.btn{border-radius:10px;font-weight:600;box-shadow:none;font-size:16px;transition:transform .15s,box-shadow .15s,background .15s}
.btn:hover:not(:disabled){box-shadow:0 4px 12px #0b423216}
.btn.small{min-height:44px}
.card{box-shadow:var(--shadow-2);padding:25px;border-radius:16px}
.card h2{font-weight:600;font-size:20px;line-height:1.6}
.card h3{font-weight:600}
.welcome{border:1px solid #c3d2ec;background:linear-gradient(120deg,#eef4ff,#fff)}
.welcome h2{font-size:27px}
.deal{border-radius:12px;padding:19px}
.deal .t{font-weight:600}
.deal .line1{flex-wrap:wrap}
.tag{font-size:12px;font-weight:600;padding:5px 10px;border-radius:7px}
.money{font-size:42px;letter-spacing:-1.5px;font-weight:600}
input,select,textarea{background:#fafcfd;border-radius:9px;border-width:1px}
.choice{position:relative}
.choice input{display:block;position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%)}
.choice input:focus-visible+label{outline:2px solid var(--brand);outline-offset:3px}
.choice label{font-weight:500}
.rows div{align-items:center}
.wizline{height:5px}
.wizhead{margin-bottom:24px}
footer{background:#f7f9fa;border-top:1px solid var(--line);padding:32px 24px max(35px,env(safe-area-inset-bottom));color:#596975;font-size:12px}
.footbrand{font-size:22px;color:#19365c;display:flex;justify-content:center;gap:10px;margin-bottom:10px}
.footbrand .mark{width:28px;height:30px;box-shadow:none}
.footnote{font-size:11px;color:#596975;margin:8px 0 0}
input::placeholder,textarea::placeholder{color:#637481;opacity:1}
.stickycta{box-shadow:0 -5px 18px #12382509;background:#ffffffef}
.stickycta .btn{background:#285bd4;color:#fff}
.mobile-menu summary{list-style:none;cursor:pointer;font-size:20px;min-width:42px;min-height:44px;display:grid;place-items:center;border:1px solid var(--line);border-radius:8px}
.mobile-menu summary::-webkit-details-marker{display:none}
.mobile-menu nav{position:absolute;top:calc(100% + 8px);right:0;width:230px;padding:8px;display:grid;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow-3);z-index:40}
.mobile-menu nav a{padding:12px 14px;color:var(--ink);text-decoration:none;font-size:14px;border-radius:7px}
.mobile-menu nav a:hover{background:var(--brand-soft)}
@media(min-width:820px){#secHome{display:grid;grid-template-columns:1fr 1fr;gap:20px;max-width:1100px}#secHome>.card{margin:0}#secHome>.card:nth-child(2){grid-column:2;grid-row:1/3}#secHome>.center{grid-column:1/-1}body.admin main{max-width:1080px}}
@media(max-width:1100px){.pagehero{padding:42px 34px;gap:30px}.pagehero h1{font-size:49px}.hero-actions{gap:15px}.topnav{gap:2px}.statbar div{flex-direction:column;gap:5px}.statbar span{text-align:center;max-width:none}.usecases{grid-template-columns:repeat(3,1fr)}.usecase-intro{grid-column:1/-1;padding:0}.usecase-intro h2 br{display:none}}
@media(max-width:850px){.pagehero{grid-template-columns:1fr 1fr;padding:32px 24px;gap:25px}.pagehero h1{font-size:39px;letter-spacing:-1.3px}.pagehero .lead{font-size:13px}.hero-actions{gap:10px}.hero-actions .btn{font-size:13px;padding:12px 15px}.hero-secondary{font-size:12px}.hero-points{gap:9px;font-size:10px}.hero-tool .calc{padding:20px 18px 15px}.tool-topline{padding:13px 16px}.tool-tag{display:none}.calc-heading h2{font-size:17px}.topnav a,.topnav .nav-start{font-size:12px;padding:8px}.topnav .nav-start{margin-left:4px;padding:10px 14px}.howlist{grid-template-columns:1fr}.howlist li{padding:20px 22px 20px 68px}.howlist li+li,.howlist li.key{border-left:0;border-top:1px solid var(--line)}.howlist li::before{left:20px;top:23px}.howlist li b{margin-bottom:4px}.usecase{padding:20px}.ctaband{padding:32px;grid-template-columns:1fr}.ctaband .btn{grid-row:auto;grid-column:1;margin:22px 0 0;min-width:0;max-width:300px;width:100%}}
@media(max-width:700px){header.top{min-height:68px;padding:12px 18px;gap:10px}header.top .logo{font-size:23px}header.top .logo .mark{width:31px;height:33px}header.top .logo .mark svg{width:22px;height:22px}.topnav{display:none}.mobile-menu{display:block;position:relative}.home:has(#secIntro.hide) .mobile-menu{display:none}.who{font-size:11px!important;max-width:110px}body.home main{padding:16px 16px 65px}.pagehero{grid-template-columns:1fr;padding:30px 24px;gap:30px;border-radius:18px}.pagehero h1{font-size:44px;letter-spacing:-1.3px;line-height:1.27;margin-bottom:23px}.pagehero .eyebrow{font-size:9px;letter-spacing:1px;margin-bottom:20px}.pagehero .lead{font-size:14px;max-width:none;margin-bottom:23px}.hero-actions{gap:20px}.hero-actions .btn{font-size:14px;padding:13px 18px}.hero-actions .start-deal{width:100%;min-height:80px!important}.hero-secondary{font-size:12px}.hero-caption{font-size:10px;line-height:1.8}.hero-points{margin-top:20px;font-size:11px;gap:16px}.hero-tool .calc{padding:20px}.tool-topline{padding:14px 20px}.tool-tag{display:block}.calc-heading h2{font-size:19px}.statbar{margin-bottom:32px;padding:22px 0}.statbar div{padding:0 5px}.statbar b{font-size:20px}.statbar span{font-size:10px}.usecases{gap:10px;margin-bottom:38px}.usecase-intro h2{font-size:23px;margin-bottom:8px}.usecase{padding:15px 12px;border-radius:11px}.usecase svg{width:25px;height:25px;margin-bottom:10px}.usecase b{font-size:12px}.usecase span{font-size:10px;padding:0}.usecase:after{top:12px;right:10px;font-size:12px}.sect{margin:40px 0 20px}#how{padding-top:32px}.sect h2{font-size:26px;line-height:1.5}.sect p{font-size:13px}.pricegrid{gap:10px}.pricecard{padding:20px 15px}.pricecard .amt{font-size:31px}.pricecard .rng{font-size:11px}.pricecard .amt small{font-size:11px}.learn-more{margin-top:38px}.learn-more>summary{padding:18px;font-size:14px}.learn-more>.sect,.learn-more>.featgrid,.learn-more>.note,.learn-more>.faq{margin-left:16px;margin-right:16px}.featgrid{grid-template-columns:1fr;gap:12px}.feat{padding:18px}.feat b{font-size:15px}.feat p{font-size:12px}.faq summary{font-size:14px;padding:18px 2px}.ctaband{margin-top:38px;padding:28px 24px}.ctaband h2{font-size:25px}.ctaband p{font-size:12px}.ctaband .btn{max-width:none}footer{padding-bottom:max(110px,calc(90px + env(safe-area-inset-bottom)))}.card{padding:20px}.money{font-size:36px}}
@media(max-width:380px){body.home main{padding-inline:12px}.pagehero{padding:26px 18px}.pagehero h1{font-size:38px}.hero-actions{gap:14px}.hero-actions .btn{font-size:13px;padding-inline:14px}.hero-secondary{font-size:11px}.hero-tool .calc{padding:18px 15px}.tool-topline{padding:13px 15px;font-size:11px}.tool-tag{font-size:9px}.calc-heading h2{font-size:17px}.statbar b{font-size:17px}.usecase{padding:14px 10px}.usecase b{font-size:11px}.usecase span{font-size:9px}}
@media(max-width:700px){.pricegrid{grid-template-columns:1fr}.pricecard{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:17px 20px}.pricecard .rng{max-width:44%;font-size:12px}.pricecard .amt{font-size:26px;white-space:nowrap}.pricecard .amt small{font-size:10px}.pricecard .amt{margin:0}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important;scroll-behavior:auto!important}}

/* หัวข้อแถบสถานะพัสดุ และข้อความสำเร็จรูปให้คนกลางคัดลอกส่งเอง (7 ก.ย. 2569) */
.tracktitle{font-size:15px;font-weight:700;margin:18px 0 8px}
.notemsg{white-space:pre-wrap;word-break:break-word;background:var(--soft,#f7f9fc);border:1px solid var(--line,#e2e8f2);border-radius:10px;padding:12px 14px;font:inherit;font-size:13px;line-height:1.75;margin:10px 0}

/* ห้องคุยในดีล: ทำให้อ่านบทสนทนาย้อนหลังง่าย แต่ไม่เหมือนแชทเล่น เพราะทุกข้อความเป็นหลักฐาน */
.chat-proof{display:inline-block;margin-left:7px;padding:2px 7px;border-radius:99px;background:var(--brand-soft);color:var(--brand-ink);font-size:11px;font-weight:700;vertical-align:middle}
.chat-list{max-height:360px;overflow-y:auto;margin:12px 0 16px;padding:2px 2px 2px 0}
.chat-empty{margin:4px 0;padding:14px;border:1px dashed var(--line);border-radius:10px;text-align:center}
.chat-message{margin:0 0 10px;padding:12px 14px;border:1px solid var(--line);border-radius:11px;background:var(--soft);word-break:break-word}
.chat-message>div{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:5px}
.chat-message b{font-size:13px;color:var(--brand-ink)}
.chat-message time{font-size:11px;color:var(--dim);white-space:nowrap}
.chat-message p{margin:0;white-space:pre-wrap;font-size:14px;line-height:1.65}
.chat-midman{border-left:4px solid var(--brand);background:var(--brand-soft)}
.chat-midman b{color:var(--brand)}
.chat-limit{margin:5px 0 10px;text-align:right}
#dChat .note{margin:8px 0}
@media(max-width:700px){.chat-list{max-height:300px}.chat-message{padding:11px 12px}.chat-message>div{align-items:flex-start;flex-direction:column;gap:1px}.chat-message p{font-size:13px}}
