/* สไตล์พื้นฐานที่ submit.html ใช้ (หน้าแรกใช้ home.css; กฎของวิซาร์ดหน้าแรกเดิมถูกลบแล้ว) */
:root {
  --bg: #FBF7EE;
  --surface: #ffffff;
  --ink: #3F5A4A;
  --muted: #57725F;
  --line: #E3E9DF;
  --line-2: #CFDDD2;
  --mint: #E3F1E6;
  --sage: #EAF4E4;
  --mist: #EEF6EE;
  --leaf: #6FB58A;
  --green-t: #5A9A74;
  --green-deep: #3E7A56;
  --green-ink: #2F6B4C;
  --disabled: #B7CDBE;
  --accent: #3E7A56;
  --accent-ink: #ffffff;
  --warn: #8A5A12;
  --warn-bg: #FBF0DC;
  --danger: #b3261e;
  --display: "Kanit", "Sarabun", system-ui, sans-serif;
  --body: "Sarabun", "Noto Sans Thai", system-ui, sans-serif;
  --shadow: 0 1px 2px rgba(63, 90, 74, 0.06), 0 3px 10px rgba(63, 90, 74, 0.07);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden; /* fallback */
  overflow-x: clip; /* วงกลมตกแต่งไม่ทำให้เลื่อนข้างได้ */
}
/* วงกลมตกแต่งมุมหน้า แบบโปสเตอร์ */
body::before,
body::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
body::before {
  width: 300px;
  height: 300px;
  top: -110px;
  right: -90px;
  background: var(--mint);
}
body::after {
  width: 260px;
  height: 260px;
  left: -110px;
  bottom: -90px;
  background: var(--sage);
}
#page { position: relative; z-index: 1; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px }
.wrap { max-width: 640px; margin: 0 auto; padding: 0 16px 128px; }
.demo {
  position: relative;
  z-index: 1;
  margin: 0;
  background: var(--warn-bg);
  color: var(--warn);
  font-size: 14px;
  padding: 8px 16px;
  text-align: center;
}
header { padding: 16px 0 4px; }
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.info-btn { color: var(--green-deep); }
.brand {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  color: var(--green-deep);
}
.brand::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #6FB58A, #4C8C66);
  color: #fff;
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
}
.brand-sub { font-weight: 400; color: var(--muted); font-family: var(--body); }
h1 {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.25;
  margin: 10px 0 6px;
  text-wrap: balance;
}
h1:focus { outline: none; }
.lead { margin: 0; color: var(--muted); }
.small { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.h2 {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  margin: 18px 0 8px;
}
.optional {
  font-family: var(--body);
  font-weight: 400;
  font-size: 14px;
  color: var(--muted);
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  min-height: 48px;
  font-weight: 600;
  font-family: var(--display);
  background: var(--green-deep);
  color: var(--accent-ink);
  box-shadow: 0 4px 14px rgba(62, 122, 86, 0.3);
}
.btn.ghost {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-2);
  box-shadow: none;
}
.btn:disabled,
.btn.ghost:disabled { background: var(--disabled); color: #fff; border-color: var(--disabled); box-shadow: none; cursor: default; }
a.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
}
.link {
  border: 0;
  background: transparent;
  color: var(--green-ink);
  padding: 8px 0;
  min-height: 44px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.note {
  margin: 0;
  background: var(--mist);
  border-radius: 12px;
  padding: 12px;
}
.err { color: var(--danger); margin: 0; }
