:root {
  --bg: #fbf7f4;
  --bg-soft: #f4ebe6;
  --surface: #ffffff;
  --ink: #2e2328;
  --ink-soft: #6b5a61;
  --rose: #7a4e5b;
  --rose-deep: #5c3542;
  --blush: #e9cfd3;
  --sage: #8a9a84;
  --gold: #b9925a;
  --line: #06c755;
  --line-deep: #04a846;
  --radius: 20px;
  --shadow: 0 18px 50px -20px rgba(92, 53, 66, .35);
  --serif: "Noto Serif Thai", serif;
  --sans: "Prompt", system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--sans); font-weight: 300; color: var(--ink); background: var(--bg); line-height: 1.85; font-size: 17px; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.4; color: var(--rose-deep); }
.eyebrow { display: inline-block; font-size: .85rem; letter-spacing: .08em; color: var(--gold); font-weight: 500; margin-bottom: .5rem; }
.lead { color: var(--ink-soft); font-size: 1.05rem; max-width: 680px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; padding: .85rem 1.4rem; border-radius: 999px; font-family: var(--sans); font-weight: 500; font-size: .98rem; border: 0; cursor: pointer; transition: transform .2s, background .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); }
.btn-line { background: var(--line); color: #fff; box-shadow: 0 12px 28px -10px rgba(6, 199, 85, .7); }
.btn-line:hover { background: var(--line-deep); }
.line-ico { width: 22px; height: 22px; flex: none; }

/* header */
header.top { position: sticky; top: 0; z-index: 40; background: rgba(251, 247, 244, .9); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(122, 78, 91, .08); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; font-family: var(--serif); font-weight: 700; color: var(--rose-deep); font-size: 1.1rem; }
.brand svg { width: 32px; height: 32px; }
.nav { display: flex; gap: 1.5rem; font-size: .95rem; color: var(--ink-soft); }
.nav a:hover { color: var(--rose); }
.top .btn { padding: .55rem 1rem; font-size: .9rem; }
@media (max-width: 860px) { .nav { display: none; } }

/* breadcrumb + heading */
.crumbs { font-size: .88rem; color: var(--ink-soft); padding: 1.6rem 0 0; }
.crumbs a { color: var(--rose); }
.post-head { padding: 1.4rem 0 2rem; max-width: 820px; }
.post-head h1 { font-size: clamp(1.7rem, 4.4vw, 2.6rem); margin-bottom: .8rem; }
.meta { font-size: .9rem; color: var(--ink-soft); }

/* article layout */
.post-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start; }
.toc { position: sticky; top: 90px; background: var(--surface); border: 1px solid #f0e4e0; border-radius: var(--radius); padding: 1.2rem 1.2rem 1.2rem 1.4rem; font-size: .9rem; }
.toc b { font-weight: 600; color: var(--rose-deep); display: block; margin-bottom: .4rem; }
.toc ol { padding-left: 1.1rem; display: grid; gap: .35rem; color: var(--ink-soft); line-height: 1.5; }
.toc a:hover { color: var(--rose); }
@media (max-width: 960px) {
  .post-grid { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; }
}

.content { max-width: 760px; }
.content > * + * { margin-top: 1.05rem; }
.content .intro { font-size: 1.12rem; color: var(--ink); border-left: 3px solid var(--blush); padding-left: 1.1rem; }
.content h2 { font-size: clamp(1.35rem, 3vw, 1.7rem); margin-top: 2.6rem; scroll-margin-top: 90px; }
.content h3 { font-size: 1.18rem; margin-top: 1.8rem; color: var(--rose); }
.content ul, .content ol { padding-left: 1.4rem; display: grid; gap: .45rem; }
.content li::marker { color: var(--rose); }
.content strong { font-weight: 500; color: var(--ink); }
.content a:not(.btn) { color: var(--rose); text-decoration: underline; text-decoration-color: var(--blush); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.content a:not(.btn):hover { text-decoration-color: var(--rose); }
.callout { background: var(--bg-soft); border-radius: 14px; padding: .9rem 1.1rem; font-size: .95rem; color: var(--ink-soft); }
.disclaimer { font-size: .85rem; color: var(--ink-soft); border-top: 1px solid #ecdcd8; padding-top: 1.2rem; margin-top: 2.4rem !important; }

.table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid #f0e4e0; }
table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: .95rem; min-width: 480px; }
th, td { padding: .75rem 1rem; text-align: left; border-bottom: 1px solid #f3e8e5; vertical-align: top; }
th { background: var(--bg-soft); font-weight: 500; color: var(--rose-deep); }
tr:last-child td { border-bottom: 0; }

.cta-box { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; flex-wrap: wrap; background: linear-gradient(135deg, var(--rose), var(--rose-deep)); color: #fff; border-radius: var(--radius); padding: 1.4rem 1.6rem; margin: 2rem 0 !important; }
.cta-box b { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; display: block; }
.cta-box p { color: #f1dde0; font-size: .95rem; line-height: 1.6; margin: .2rem 0 0; }
.cta-box > div { flex: 1 1 280px; }

.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid #f0e4e0; border-radius: 14px; padding: 0 1.1rem; }
.faq summary { cursor: pointer; list-style: none; padding: .9rem 0; font-weight: 500; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--rose); font-size: 1.3rem; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 1rem; color: var(--ink-soft); font-size: .95rem; }

/* cards */
.related { padding: 4rem 0 2rem; }
.related h2 { font-size: 1.5rem; margin-bottom: 1.4rem; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--surface); border: 1px solid #f0e4e0; border-radius: var(--radius); padding: 1.4rem; display: flex; flex-direction: column; gap: .35rem; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-emo { font-size: 1.8rem; width: 52px; height: 52px; border-radius: 16px; background: var(--bg-soft); display: grid; place-items: center; margin-bottom: .4rem; }
.card-cat { font-size: .8rem; color: var(--gold); font-weight: 500; }
.card b { font-family: var(--serif); font-weight: 600; color: var(--rose-deep); line-height: 1.5; }
.card p { font-size: .92rem; color: var(--ink-soft); line-height: 1.65; flex: 1; }
.card .more { color: var(--rose); font-weight: 500; font-size: .92rem; margin-top: .4rem; }
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } }
.blog-index { padding-bottom: 4rem; }

footer { background: #2a1d22; color: #c9b5ba; padding: 40px 0 110px; font-size: .9rem; margin-top: 3rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
footer b { color: #fff; font-family: var(--serif); font-weight: 600; }
footer a:hover { color: #fff; }

.sticky-line { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 50; display: none; background: var(--surface); border-radius: 18px; box-shadow: 0 10px 40px -10px rgba(0,0,0,.35); padding: 10px; gap: 10px; align-items: center; }
.sticky-line .txt { flex: 1; font-size: .85rem; line-height: 1.35; padding-left: 6px; }
.sticky-line .txt b { display: block; color: var(--rose-deep); font-weight: 600; font-size: .92rem; }
.sticky-line .btn { padding: .65rem 1rem; font-size: .92rem; }
@media (max-width: 860px) { .sticky-line { display: flex; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* area pages */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 1.6rem !important; }
.facts > div { background: var(--surface); border: 1px solid #f0e4e0; border-radius: 16px; padding: .9rem 1rem; display: flex; flex-direction: column; gap: .2rem; font-size: .92rem; line-height: 1.6; }
.facts b { color: var(--rose-deep); font-weight: 500; }
.facts span { color: var(--ink-soft); }
@media (max-width: 760px) { .facts { grid-template-columns: 1fr; } }
.foot-areas { font-size: .85rem; }
.foot-areas a { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 480px) { .brand { font-size: .98rem; line-height: 1.25; } .brand svg { width: 30px; height: 30px; flex: none; } }
