/* United Production — สไตล์กลาง (แนว Google: ขาว สะอาด โค้งมน) */
:root {
  --green: #38512f; --green-d: #2b3f24; --green-l: #e7f0e4;
  --brown: #8c5a3c; --cream: #fef5e7;
  --ink: #202124; --mute: #5f6368; --line: #dadce0; --bg: #fff; --soft: #f8f9fa;
  --c: #1a9bd7; --m: #d6336c; --y: #f2b705; --k: #202124;
  --r: 16px; --shadow: 0 1px 2px rgba(60,64,67,.2), 0 2px 6px 2px rgba(60,64,67,.1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'Sarabun', system-ui, sans-serif; font-size: 17px; line-height: 1.65; color: var(--ink); background: var(--bg); }
h1, h2, h3, .btn, .brand, .nav a, .tag { font-family: 'Prompt', 'Sarabun', sans-serif; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--green); }
img, svg { max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.center { text-align: center; }
.mute { color: var(--mute); }

/* แถบบน */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.top.scrolled { border-color: var(--line); box-shadow: 0 1px 6px rgba(60,64,67,.12); }
.top .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 19px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand b { color: var(--brown); font-weight: 600; }
.nav { display: flex; gap: 4px; margin-left: 20px; flex: 1; }
.nav a { color: var(--mute); text-decoration: none; font-size: 15px; padding: 8px 12px; border-radius: 999px; }
.nav a:hover { background: var(--soft); color: var(--ink); }
.actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }

/* ปุ่ม */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 999px; padding: 10px 22px; font-size: 15px; font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, box-shadow .15s, transform .05s; min-height: 44px; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-d); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--green); }
.btn-ghost:hover { background: var(--green-l); }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { background: var(--soft); }
.btn-line { background: #06c755; color: #fff; }
.btn-line:hover { background: #05b34c; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ส่วนนำ */
.hero { text-align: center; padding: 56px 0 40px; position: relative; overflow: hidden; }
.hero h1 { font-size: clamp(30px, 5.2vw, 54px); letter-spacing: -.5px; max-width: 880px; margin: 18px auto 14px; }
.hero h1 em { font-style: normal; color: var(--green); }
.hero .lead { font-size: clamp(17px, 2.2vw, 20px); color: var(--mute); max-width: 640px; margin: 0 auto 28px; }
.tag { display: inline-flex; align-items: center; gap: 8px; background: var(--cream); color: var(--brown); border-radius: 999px; padding: 6px 16px; font-size: 14px; font-weight: 500; }
.ask { display: flex; align-items: center; gap: 8px; max-width: 640px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 6px 6px 22px; box-shadow: 0 1px 6px rgba(32,33,36,.14); transition: box-shadow .2s; }
.ask:focus-within { box-shadow: 0 2px 12px rgba(32,33,36,.24); }
.ask input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 17px; background: transparent; padding: 10px 0; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 18px auto 0; max-width: 700px; }
.chip { background: var(--soft); border: 1px solid transparent; border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 15px; color: var(--ink); cursor: pointer; }
.chip:hover { border-color: var(--line); background: #fff; }
.hero-art { width: min(460px, 86%); margin: 36px auto 0; display: block; }

/* ส่วนเนื้อหา */
section { padding: 64px 0; }
section.alt { background: var(--soft); }
section.dark { background: var(--green); color: #fff; }
section.dark .mute { color: #cfe0cb; }
.sec-head { max-width: 720px; margin: 0 auto 36px; text-align: center; }
.sec-head h2 { font-size: clamp(26px, 3.6vw, 36px); }
.sec-head p { color: var(--mute); margin: 0; }
section.dark .sec-head p { color: #cfe0cb; }
.grid { display: grid; gap: 18px; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 22px; transition: box-shadow .2s, transform .2s; }
.card.lift:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card h3 { font-size: 19px; margin-bottom: 6px; }
.card p { color: var(--mute); font-size: 16px; margin: 0; }
.ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 14px; background: var(--green-l); color: var(--green); }
.ico svg { width: 26px; height: 26px; }
.ico.b { background: var(--cream); color: var(--brown); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; text-align: center; }
.stats b { display: block; font-family: 'Prompt', sans-serif; font-size: clamp(28px, 4vw, 42px); font-weight: 600; color: var(--green); line-height: 1.1; }
.stats span { color: var(--mute); font-size: 15px; }
.steps { counter-reset: s; }
.step { position: relative; padding-top: 6px; }
.step::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #fff; color: var(--green); font-family: 'Prompt', sans-serif; font-weight: 600; margin-bottom: 12px; }
.step h3 { font-size: 20px; }
.timeline { max-width: 720px; margin: 0 auto; border-left: 2px solid var(--line); padding-left: 24px; }
.timeline div { position: relative; padding-bottom: 22px; }
.timeline div::before { content: ''; position: absolute; left: -31px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--brown); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--brown); }
.timeline h3 { font-size: 18px; margin-bottom: 2px; }
.timeline p { color: var(--mute); margin: 0; }
.cta { background: var(--cream); border-radius: 28px; padding: 44px 24px; text-align: center; }
.cta h2 { font-size: clamp(24px, 3.4vw, 34px); }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.contact-list li:last-child { border: 0; }
.contact-list svg { width: 22px; height: 22px; color: var(--green); flex: none; margin-top: 3px; }
.contact-list small { display: block; color: var(--mute); font-size: 14px; }
.contact-list a { color: var(--ink); text-decoration: none; font-weight: 600; }
footer { border-top: 1px solid var(--line); padding: 26px 0; color: var(--mute); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }
footer a { color: var(--mute); }

/* ฟอร์ม (สมัคร/เข้าสู่ระบบ) */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 28px 16px; background: var(--soft); }
.auth-card { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--line); border-radius: 28px; padding: 34px 30px; }
.auth-card h1 { font-size: 26px; margin: 16px 0 4px; }
.auth-card .brand { justify-content: center; }
.field { margin: 14px 0; text-align: left; }
.field label { display: block; font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.field input { width: 100%; font: inherit; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); min-height: 48px; }
.field input:focus { outline: 2px solid var(--green); outline-offset: -1px; border-color: var(--green); }
.field .hint { font-size: 14px; color: var(--mute); margin-top: 4px; }
.otp { letter-spacing: .5em; text-align: center; font-size: 26px !important; font-family: 'Prompt', monospace !important; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; text-align: left; margin: 14px 0; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--green); flex: none; }
.msg { display: none; border-radius: 12px; padding: 10px 14px; font-size: 15px; margin: 12px 0; text-align: left; }
.msg.err { display: block; background: #fce8e6; color: #b3261e; }
.msg.ok { display: block; background: var(--green-l); color: var(--green-d); }
.msg.dev { display: block; background: #fef7e0; color: #7a5b00; }
.or { display: flex; align-items: center; gap: 12px; color: var(--mute); font-size: 14px; margin: 18px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.hide { display: none !important; }

/* Dashboard */
.dash { background: var(--soft); min-height: 100vh; }
.dash main { padding: 28px 0 60px; }
.welcome { display: flex; align-items: center; gap: 20px; background: #fff; border: 1px solid var(--line); border-radius: 28px; padding: 26px; margin-bottom: 18px; }
.welcome h1 { font-size: clamp(22px, 3.4vw, 30px); margin: 0 0 4px; }
.welcome svg { width: 96px; height: 96px; flex: none; }
.badge { display: inline-block; font-family: 'Prompt', sans-serif; font-size: 12px; font-weight: 500; background: #fef7e0; color: #7a5b00; border-radius: 999px; padding: 2px 10px; margin-left: 6px; vertical-align: middle; }
.note { background: var(--cream); border-radius: var(--r); padding: 14px 18px; margin-bottom: 18px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-family: 'Prompt', sans-serif; font-weight: 600; }

@media (max-width: 900px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .g3 { grid-template-columns: 1fr; }
  .nav { display: none; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  section { padding: 44px 0; }
  .g4, .g2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 22px 12px; }
  .brand span.long { display: none; }
  .top .wrap { gap: 8px; padding: 0 12px; }
  .brand { font-size: 16px; gap: 6px; }
  .brand svg { width: 28px; height: 28px; }
  .actions { gap: 2px; }
  .actions .btn { padding: 8px 12px; font-size: 14px; min-height: 40px; }
  .welcome { flex-direction: column; text-align: center; }
  .auth-card { padding: 28px 20px; }
  .ask { padding-left: 16px; }
}
@media (prefers-reduced-motion: reduce) { svg animate, svg animateTransform, svg animateMotion { display: none; } html { scroll-behavior: auto; } }
@media (max-width: 380px) { .top .brand span { display: none; } }
