/* สไตล์ร่วมของหน้าเงื่อนไขและนโยบาย (ธีมเดียวกับหน้าหลัก) */
:root {
  color-scheme: dark;
  --bg: #050505;
  --frame: #0a0a0a;
  --panel: rgba(20, 20, 20, .72);
  --ink: #f4f4f5;
  --body: #d4d4d8;
  --muted: #a1a1aa;
  --faint: #71717a;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .14);
  --red: #e5242b;
  --red-hi: #ff3b3b;
  --red-soft: rgba(229, 36, 43, .14);
  --red-glow: rgba(229, 36, 43, .45);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Kanit", "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 300;
  line-height: 1.75;
  background:
    radial-gradient(60% 50% at 0% 40%, rgba(229, 36, 43, .2), transparent 70%),
    radial-gradient(50% 45% at 100% 10%, rgba(229, 36, 43, .14), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
a { color: #ff7a7a; text-underline-offset: 3px; }
a:hover { color: var(--red-hi); }
.frame {
  max-width: 1000px;
  margin: 24px auto;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background: radial-gradient(70% 30% at 50% 0%, rgba(229, 36, 43, .12), transparent 70%), var(--frame);
  box-shadow: 0 40px 120px rgba(0, 0, 0, .6);
  overflow: hidden;
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 28px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: .06em; font-size: .95rem; color: var(--ink); text-decoration: none; }
.brand svg { width: 22px; height: 22px; filter: drop-shadow(0 0 6px var(--red-glow)); }
.back {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 999px; padding: 8px 18px; font-size: .88rem; font-weight: 500;
  color: #fff; text-decoration: none;
  background: linear-gradient(180deg, var(--red-hi), var(--red));
  box-shadow: 0 8px 28px var(--red-glow), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.back:hover { color: #fff; filter: brightness(1.08); }
.back svg { width: 14px; height: 14px; }
.doc { padding: 12px 28px 48px; }
.doc-head { text-align: center; padding: 16px 0 28px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--muted);
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .03);
  border-radius: 999px; padding: 4px 14px;
}
.badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--red-hi); box-shadow: 0 0 10px var(--red-hi); }
.doc-head h1 { font-size: clamp(1.7rem, 4.4vw, 2.4rem); font-weight: 600; margin: 14px 0 6px; line-height: 1.3; }
.doc-head p { margin: 0; color: var(--muted); font-size: .9rem; }
.layout { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: start; }
.toc {
  position: sticky; top: 20px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--panel);
  padding: 16px; font-size: .85rem;
}
.toc b { display: block; font-weight: 500; color: var(--ink); margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 18px; color: var(--muted); }
.toc li { margin: 4px 0; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--red-hi); }
article {
  border: 1px solid var(--line); border-radius: 18px; background: var(--panel);
  padding: 8px 28px 28px; color: var(--body);
}
article h2 {
  font-size: 1.15rem; font-weight: 600; color: var(--ink);
  margin: 26px 0 8px; padding-top: 4px; scroll-margin-top: 20px;
}
article h2 .n { color: var(--red-hi); margin-right: 6px; }
article p, article li { margin: 6px 0; }
article ul, article ol { padding-left: 22px; }
article strong { color: var(--ink); font-weight: 500; }
.callout {
  margin: 20px 0 4px; padding: 14px 16px; border-radius: 12px;
  background: rgba(229, 36, 43, .08); border: 1px solid rgba(229, 36, 43, .3); border-left: 3px solid var(--red);
  color: var(--body);
}
.callout strong { color: #fff; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; margin: 8px 0; }
th, td { text-align: left; vertical-align: top; padding: 9px 8px; border-top: 1px solid var(--line); }
th { color: var(--faint); font-weight: 400; border-top: 0; }
.table-wrap { overflow-x: auto; }
/* ข้อมูลที่ต้องกรอกก่อนเปิดใช้จริง */
mark.fill {
  background: rgba(250, 204, 21, .14); color: #fde68a;
  border: 1px dashed rgba(250, 204, 21, .5); border-radius: 6px; padding: 0 6px;
}
footer {
  border-top: 1px solid var(--line); padding: 20px 28px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  color: var(--faint); font-size: .8rem;
}
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover, footer a[aria-current="page"] { color: var(--red-hi); }
@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  .toc { position: static; }
}
@media (max-width: 560px) {
  .frame { margin: 0; border-radius: 0; border-left: 0; border-right: 0; }
  .nav { padding: 16px; }
  .brand span { display: none; }
  .doc { padding: 8px 16px 32px; }
  article { padding: 4px 18px 22px; }
  footer { padding: 18px 16px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
