@font-face {
  font-family: "Noto Sans Thai";
  src: url("assets/fonts/NotoSansThai-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --paper: #FBF8F4;
  --mist: #F7F2EB;
  --green: #765039;
  --ink: #3E3029;
  --muted: #6F5A4D;
  --line: #E8D9CA;
  --white: #fff;
  --rose: #F5E8E5;
  --warn: #fff4d7;
  --thai: "PSL-Pojamarn", "Noto Sans Thai", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--thai);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}
button, input, textarea { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; height: auto; }
p, h1, h2, h3, dd, dt, span, strong { overflow-wrap: anywhere; }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: #fbf8f4f2;
  padding: 0 18px;
  backdrop-filter: blur(14px);
}
.brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border: 0;
  background: none;
  padding: 4px 0;
  text-decoration: none;
}
.brand img { width: 126px; height: auto; }
.mode { color: var(--muted); font-size: .67rem; font-weight: 400; letter-spacing: .11em; }
.screen { min-height: calc(100svh - 66px); }

.home-hero { display: grid; background: var(--mist); }
.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 64px 22px 46px;
}
.eyebrow {
  margin: 0 0 14px;
  color: #92704F;
  font-size: .76rem;
  font-weight: 500;
  letter-spacing: .12em;
}
.hero-copy h1, .card h1, .quiz h1, .loading h1, .section-title {
  margin: 0;
  color: var(--green);
  font-family: var(--thai);
  font-weight: 300;
  line-height: 1.28;
  letter-spacing: -.018em;
}
.result h1, .product-copy h1, .product-card h3 {
  margin: 0;
  color: var(--green);
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
}
.hero-copy h1 { max-width: 680px; font-size: clamp(2.55rem, 12vw, 5.2rem); }
.hero-copy > p:not(.eyebrow):not(.micro-note) { max-width: 570px; margin: 22px 0 28px; color: var(--muted); font-size: 1.02rem; }
.micro-note { margin: 15px 0 0; color: #806B5D; font-size: .8rem; }
.hero-image { aspect-ratio: 16/9; width: 100%; object-fit: contain; }

.btn {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--green);
  border-radius: 999px;
  padding: 12px 24px;
  background: var(--green);
  color: white;
  font-weight: 400;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
}
.btn.secondary { background: white; color: var(--green); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--green); }
.btn:focus-visible, .option:focus-within, .back:focus-visible { outline: 2px solid #B58A60; outline-offset: 3px; }

.collection, .about { padding: 82px 22px; content-visibility: auto; contain-intrinsic-size: 700px; }
.section-title { max-width: 740px; margin-bottom: 36px; font-size: clamp(2.05rem, 8vw, 3.5rem); }
.products { display: grid; gap: 24px; }
.product-card { overflow: hidden; border: 1px solid var(--line); border-radius: 26px; background: white; }
.product-card img { aspect-ratio: 4/5; width: 100%; object-fit: contain; }
.product-card div { padding: 28px 24px 32px; }
.product-card h3 { font-size: 1.5rem; letter-spacing: .01em; }
.product-brand { margin: 0 0 5px !important; color: #92704F !important; font-family: var(--thai); font-size: .72rem !important; font-weight: 400; letter-spacing: .18em; }
.product-thai-name { margin: 7px 0 0 !important; color: var(--muted) !important; font-size: .88rem !important; font-weight: 300; }
.product-card p { color: var(--muted); }
.product-price { color: var(--green) !important; font-size: 1.02rem; font-weight: 400; }
.product-card .btn { margin-top: 6px; }
.about { background: var(--green); color: #F9F2EA; }
.about h2 { color: white; }
.about > p:last-child { max-width: 760px; margin: 24px 0 0; color: #F5E9DD; font-size: 1.05rem; font-weight: 300; line-height: 1.9; }

.flow, .quiz, .result, .product { min-height: calc(100svh - 66px); background: var(--mist); padding: 26px 18px 64px; }
.card, .quiz-shell, .result-shell, .product-shell { width: min(100%, 820px); margin-inline: auto; }
.card { margin-top: 7vh; border: 1px solid var(--line); border-radius: 28px; background: white; padding: 42px 24px; text-align: center; }
.card h1, .quiz h1, .loading h1 { font-size: clamp(2rem, 8vw, 3.3rem); }
.card p { color: var(--muted); }
.actions { display: grid; gap: 10px; margin-top: 26px; }
.back { min-height: 44px; border: 0; background: transparent; color: var(--green); font-weight: 400; }
.quiz-topline { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); font-size: .82rem; }
.quiz-topline > span { max-width: 55%; text-align: right; }
.progress { height: 5px; margin-top: 10px; border-radius: 99px; background: #E6D7C7; }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.quiz-head { margin: 48px 0 32px; }
.quiz-head h1 {
  max-width: 680px;
  line-height: 1.28;
  letter-spacing: -.012em;
  overflow-wrap: normal;
  text-wrap: balance;
  word-break: normal;
}
.options { display: grid; gap: 14px; }
.option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  min-height: 94px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgb(255 255 255 / 92%);
  padding: 19px 20px;
  text-align: left;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.option:hover { border-color: #B58A60; transform: translateY(-1px); }
.option.selected { border-color: var(--green); background: #F3E8DE; box-shadow: 0 12px 30px rgb(25 77 58 / 8%); }
.option input { width: 20px; height: 20px; }
.option strong, .option span { display: block; }
.option strong { color: var(--green); font-size: 1.05rem; font-weight: 400; line-height: 1.45; }
.option span span { margin-top: 3px; color: var(--muted); font-size: .92rem; font-weight: 300; line-height: 1.6; }
.quiz-next { width: 100%; margin-top: 28px; }
.loading { padding-top: 26vh; text-align: center; }
.loading-mark { width: 72px; height: 72px; margin: 0 auto 24px; border: 1px solid var(--green); border-top-color: transparent; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.result-intro { width: min(100%, 900px); margin: 0 auto; padding: 28px 2px 34px; text-align: center; }
.result-kicker { margin: 0 0 10px; color: var(--green); font-weight: 400; }
.result-intro h1 { font-size: clamp(2.15rem, 9vw, 4.2rem); }
.result-intro .product-brand { margin-top: 18px !important; }
.result-intro > p:last-child { margin: 12px 0 0; color: var(--muted); }
.result-shell, .product-shell { overflow: hidden; border: 1px solid var(--line); border-radius: 28px; background: white; }
.result-copy, .product-copy { padding: 32px 24px 36px; }
.result-image, .product-image { width: 100%; aspect-ratio: 4/5; object-fit: contain; }
.sentence { margin: 0 0 26px; border-left: 2px solid var(--green); background: var(--mist); padding: 22px; font-family: var(--thai); font-size: 1.04rem; font-weight: 300; line-height: 1.88; }
.meta { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.meta div { min-width: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px; }
.meta dt { color: var(--muted); font-size: .75rem; font-weight: 400; }
.meta dd { margin: 4px 0 0; font-weight: 400; }
.notice { border-radius: 14px; background: var(--warn); padding: 12px; color: #73500e; font-size: .88rem; }
.preserved-result { width: min(100%, 820px); margin: 8px auto 18px; border-radius: 14px; background: #F3E8DE; padding: 11px 14px; color: var(--green); font-size: .86rem; }
.detail-grid { display: grid; gap: 1px; background: var(--line); }
.detail-grid section { background: white; padding: 26px 24px; }
.detail-grid h2 { margin: 0; font-family: var(--thai); font-size: 1.12rem; font-weight: 400; }
.detail-grid p { color: var(--muted); }
.product-copy h1 { font-size: clamp(2.2rem, 9vw, 4rem); }
.product-copy > .btn { width: 100%; margin-top: 10px; }

.order-form { display: grid; gap: 14px; }
.order-form label { display: grid; gap: 6px; text-align: left; font-weight: 400; }
.order-form input, .order-form textarea { position: relative; z-index: 1; width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 10px; background: white; padding: 11px; color: var(--ink); caret-color: var(--green); pointer-events: auto; touch-action: manipulation; user-select: text; opacity: 1; }
.order-form textarea { min-height: 90px; }
.order-summary { display: grid; gap: 1px; margin: 4px 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--line); }
.order-summary div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; background: #FFF9F2; padding: 9px 12px; text-align: left; }
.order-summary dt { color: var(--muted); }
.order-summary dd { margin: 0; color: var(--green); font-weight: 400; text-align: right; }
.test-badge { display: inline-flex; border-radius: 999px; background: var(--warn); padding: 4px 9px; color: #73500e; font-size: .72rem; font-weight: 500; letter-spacing: .08em; }

footer { display: flex; flex-direction: column; gap: 8px; background: #765039; color: #F9F2EA; padding: 34px 22px; }
.footer-wordmark { width: 148px; height: auto; margin-bottom: 6px; filter: brightness(0) invert(1); opacity: .92; }
footer span { color: #F5E9DD; font-size: .84rem; }

@media (max-width: 380px) {
  .hero-copy { padding-inline: 18px; }
  .collection, .about { padding-inline: 18px; }
  .flow, .quiz, .result, .product { padding-inline: 14px; }
  .option { padding: 17px 15px; }
  .card { padding-inline: 18px; }
  .btn { padding-inline: 18px; }
  .quiz-head { margin-block: 40px 26px; }
  .quiz h1 { font-size: clamp(1.86rem, 9vw, 2.2rem); line-height: 1.34; }
}

@media (min-width: 720px) {
  .site-header { min-height: 76px; padding: 0 42px; }
  .home-hero { grid-template-columns: .9fr 1.1fr; min-height: calc(100svh - 76px); }
  .hero-copy { padding: 76px 46px; }
  .hero-image { height: 100%; object-fit: contain; }
  .collection, .about { padding: 100px 46px; }
  .products { grid-template-columns: 1fr 1fr; }
  .flow, .quiz, .result, .product { min-height: calc(100svh - 76px); padding: 42px 46px 80px; }
  .card { padding: 52px; }
  .result-shell, .product-shell { display: grid; grid-template-columns: 1fr 1fr; width: min(100%, 1080px); }
  .result-copy, .product-copy { padding: 50px; }
  .detail-grid { grid-column: 1/-1; grid-template-columns: repeat(3, 1fr); }
  .actions.split { grid-template-columns: 1fr 1fr; }
  footer { flex-direction: row; justify-content: space-between; padding: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* MANPA 2026 repair: full original layout retained, footer & palette synced. */
.about .eyebrow {color:#E8CDAA;}
.about h2 {color:#fff9f3;}
footer.manpa-footer {display:block; padding:0; margin:0; width:100%; background:#F7F2EB; color:#50372B; border-top:1px solid #E8D9CA;}
footer.manpa-footer .manpa-footer__inner {box-sizing:border-box; width:min(100%,1280px); margin:0 auto; padding:56px 30px; display:grid; grid-template-columns:minmax(0,1.35fr) repeat(2,minmax(0,1fr)) minmax(0,1.15fr); gap:34px; align-items:start;}
footer.manpa-footer .manpa-footer__inner > * {min-width:0;}
footer.manpa-footer .manpa-footer__logo {display:block; width:130px; max-width:100%; height:auto; margin:0 0 18px; filter:none; opacity:1;}
footer.manpa-footer h2 {font-size:1.25rem; font-weight:500; line-height:1.5; margin:0 0 10px; color:#765039;}
footer.manpa-footer h3 {font:600 .85rem/1.5 Georgia,serif; letter-spacing:.04em; margin:0 0 16px; color:#765039;}
footer.manpa-footer p, footer.manpa-footer span {font-size:.85rem; line-height:1.8; color:#6F5A4D; margin:0 0 10px;}
footer.manpa-footer a {color:#5e4636; text-decoration:none; font-size:.88rem; line-height:1.7; overflow-wrap:anywhere;}
footer.manpa-footer a:hover {color:#a77a50; text-decoration:underline;}
footer.manpa-footer a:focus-visible {outline:2px solid #a77a50; outline-offset:3px;}
footer.manpa-footer .manpa-footer__menu {display:flex; flex-direction:column; align-items:flex-start; gap:10px;}
footer.manpa-footer .manpa-footer__menu p {margin:0;}
footer.manpa-footer .manpa-socials {display:flex; flex-wrap:wrap; gap:12px; align-items:center; margin:12px 0 22px;}
footer.manpa-footer .manpa-social {display:inline-flex; width:44px; height:44px; min-width:44px; min-height:44px; flex:0 0 44px; align-items:center; justify-content:center; border-radius:50%; border:1px solid #d8c5b3; background:#fff; text-decoration:none;}
footer.manpa-footer .manpa-social svg {display:block; width:20px; height:20px; max-width:20px; max-height:20px; fill:#765039; flex:none;}
footer.manpa-footer .manpa-footer__bottom {display:flex; flex-wrap:wrap; justify-content:space-between; gap:12px; padding:20px max(24px,calc((100vw - 1220px)/2)); background:#EFE5D9; border-top:1px solid #dfcdbd;}
footer.manpa-footer .manpa-footer__bottom span {font-size:.76rem; margin:0;}
@media (max-width:1000px){footer.manpa-footer .manpa-footer__inner {grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (max-width:640px){footer.manpa-footer .manpa-footer__inner {grid-template-columns:1fr; padding:36px 22px; gap:30px;}footer.manpa-footer .manpa-footer__bottom {padding:20px 22px;}footer.manpa-footer .manpa-footer__logo {width:130px;}}
