:root {
  --bg: #0a0a0f;
  --bg-2: #101018;
  --surface: #15151f;
  --surface-2: #1c1c28;
  --line: #262636;
  --text: #ececf3;
  --muted: #9a9aae;
  --faint: #6b6b80;
  --accent: #8b5cf6;
  --accent-hi: #a78bfa;
  --accent-ink: #ffffff;
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --radius: 14px;
  --shadow: 0 10px 40px rgba(0, 0, 0, .45);
  --font: 'IBM Plex Sans Thai', 'Noto Sans Thai', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', Consolas, 'Courier New', monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 16px; line-height: 1.65; min-height: 100vh; display: flex; flex-direction: column;
  background-image: radial-gradient(900px 500px at 85% -10%, rgba(139, 92, 246, .16), transparent 60%),
                    radial-gradient(700px 400px at -10% 10%, rgba(139, 92, 246, .08), transparent 60%);
  background-repeat: no-repeat;
}
main { flex: 1; }
a { color: var(--accent-hi); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(30px, 5vw, 48px); font-weight: 700; }
h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 700; }
h3 { font-size: 18px; font-weight: 600; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.hidden { display: none !important; }

/* header / footer */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(10, 10, 15, .78); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo { font-weight: 700; font-size: 20px; letter-spacing: .02em; color: var(--text); white-space: nowrap; }
.logo:hover { text-decoration: none; }
.logo b { color: var(--accent); font-weight: 700; }
.nav { display: flex; gap: 20px; font-size: 15px; }
.nav a { color: var(--muted); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); text-decoration: none; }
.site-footer { border-top: 1px solid var(--line); margin-top: 80px; padding: 32px 0; color: var(--faint); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
.site-footer a { color: var(--muted); }
@media (max-width: 640px) { .nav { gap: 14px; font-size: 14px; } .nav .opt { display: none; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px;
  padding: 12px 20px; font: inherit; font-weight: 600; font-size: 16px; cursor: pointer; transition: transform .08s, background .15s, border-color .15s, opacity .15s; text-decoration: none !important; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 24px rgba(139, 92, 246, .35); }
.btn-primary:hover { background: #7c4cf0; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); }
.btn[disabled], .btn.is-disabled { opacity: .45; cursor: not-allowed; box-shadow: none; pointer-events: none; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 12px; font-size: 14px; border-radius: 8px; }

/* hero */
.hero { padding: 72px 0 40px; }
.hero p.lead { font-size: clamp(17px, 2.2vw, 20px); color: var(--muted); max-width: 640px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 13px; color: var(--muted); background: var(--bg-2); margin-bottom: 20px; }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.accent { color: var(--accent-hi); }

.trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 28px; }
.trust div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; font-size: 14px; color: var(--muted); }
.trust strong { display: block; color: var(--text); font-size: 15px; }

/* product grid */
.section { padding: 40px 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
  transition: border-color .15s, transform .15s; }
.card:hover { border-color: #3a3a52; transform: translateY(-2px); }
.card-art { aspect-ratio: 16 / 9; position: relative; display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(135deg, #1d1530, #0f0f18 60%); border-bottom: 1px solid var(--line); }
.card-art img { width: 100%; height: 100%; object-fit: cover; }
.monogram { font-size: 64px; font-weight: 700; letter-spacing: -.04em; color: transparent;
  background: linear-gradient(135deg, #fff, var(--accent-hi)); -webkit-background-clip: text; background-clip: text; }
.card-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 12px; }
.price { font-size: 26px; font-weight: 700; }
.price small { font-size: 13px; color: var(--faint); font-weight: 400; margin-left: 6px; }

/* product page */
.product { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; padding-top: 48px; align-items: start; }
@media (max-width: 900px) { .product { grid-template-columns: 1fr; } }
.buy-box { position: sticky; top: 84px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
@media (max-width: 900px) { .buy-box { position: static; } }
.buy-box .price { font-size: 34px; }
.buy-box ul { margin: 14px 0; padding-left: 20px; color: var(--muted); font-size: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); margin: 14px 0; cursor: pointer; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.divider { height: 1px; background: var(--line); margin: 18px 0; border: 0; }
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 20px 0 8px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.feature h3 { font-size: 16px; margin-bottom: 4px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 12px; }
.gallery img { border-radius: 10px; border: 1px solid var(--line); }
.prose { color: #d4d4de; }
.prose ul { padding-left: 22px; }
.prose li { margin: 4px 0; }
.prose strong { color: var(--text); }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.box + .box { margin-top: 16px; }
.trial { border-color: rgba(139, 92, 246, .45); background: linear-gradient(180deg, rgba(139, 92, 246, .10), transparent); }

/* faq */
details { border-bottom: 1px solid var(--line); padding: 14px 0; }
details summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: '+'; color: var(--accent-hi); font-weight: 700; }
details[open] summary::after { content: '−'; }
details p { margin: 10px 0 0; color: var(--muted); }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 14px; color: var(--muted); }
.input { width: 100%; background: var(--bg-2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font: inherit; }
.input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.notice { border-radius: 10px; padding: 12px 14px; font-size: 14px; margin: 12px 0; border: 1px solid var(--line); background: var(--bg-2); }
.notice.ok { border-color: rgba(52, 211, 153, .4); color: #b7f5dd; }
.notice.warn { border-color: rgba(251, 191, 36, .45); color: #fde7a8; }
.notice.bad { border-color: rgba(248, 113, 113, .45); color: #fecaca; }

/* thank-you */
.narrow { max-width: 680px; }
.state { text-align: center; padding: 56px 0 24px; }
.state .icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 18px; font-size: 30px; }
.state .icon.ok { background: rgba(52, 211, 153, .14); color: var(--ok); }
.state .icon.wait { background: rgba(139, 92, 246, .14); }
.state .icon.bad { background: rgba(248, 113, 113, .14); color: var(--bad); }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(167, 139, 250, .25); border-top-color: var(--accent-hi); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
.keycard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 16px 0; text-align: left; }
.keycard h3 { margin-bottom: 12px; }
.keyline { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
.key { flex: 1 1 260px; font-family: var(--mono); font-size: clamp(16px, 3.6vw, 20px); font-weight: 700; letter-spacing: .06em;
  background: var(--bg-2); border: 1px dashed #4a4a66; border-radius: 10px; padding: 12px 14px; text-align: center; user-select: all; word-break: break-all; }
.steps { text-align: left; color: var(--muted); padding-left: 22px; }
.steps li { margin: 6px 0; }
.legal h2 { font-size: 20px; margin-top: 32px; }
.legal { color: #d4d4de; }
.legal li { margin: 6px 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--surface-2); border: 1px solid var(--line);
  padding: 10px 16px; border-radius: 10px; font-size: 14px; box-shadow: var(--shadow); z-index: 50; }
