/* Shared theme for the public legal/contact pages (privacy · terms · contact).
   Same Pastel Dream tokens as index.html / how-to-play.html, plus the reading
   typography those document pages need. Kept as one external file rather than
   triplicated inline <style> blocks so the three pages cannot drift apart. */

:root {
  --color-primary: #8e4a6b;
  --color-primary-light: #b85c8a;
  --color-primary-container: #ffb7d5;
  --color-on-primary-container: #7c445e;
  --color-secondary: #674bb5;
  --color-secondary-container: #ab8ffe;
  --color-accent: #f0a93a;
  --color-bg: #f5f1ff;
  --color-surface: rgba(255, 255, 255, 0.72);
  --color-surface-strong: rgba(255, 255, 255, 0.94);
  --color-text: #20203a;
  --color-text-secondary: #6a6483;
  --color-success: #2aa98c;
  --line-green: #06c755;

  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-pill: 999px;
  --shadow-clay: 0 14px 34px -10px rgba(110, 80, 180, 0.22), 0 4px 10px -4px rgba(110, 80, 180, 0.10), inset 0 2px 0 rgba(255, 255, 255, 0.85);
  --shadow-soft: 0 10px 28px -10px rgba(110, 80, 180, 0.16);
  --tap-min: 48px;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: "IBM Plex Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--color-text);
  line-height: 1.75;
  font-size: 16px;
  background:
    radial-gradient(1000px 600px at 8% -8%, rgba(255, 200, 224, 0.6) 0%, transparent 60%),
    radial-gradient(900px 520px at 92% 4%, rgba(197, 184, 255, 0.52) 0%, transparent 60%),
    linear-gradient(180deg, var(--color-bg) 0%, #ece6ff 100%);
  background-attachment: fixed;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: var(--color-secondary); }
a:focus-visible { outline: 3px solid var(--color-secondary-container); outline-offset: 3px; border-radius: 4px; }

.wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 22px max(56px, env(safe-area-inset-bottom, 0px));
  position: relative;
  z-index: 1;
}

/* ─── Page header ─── */
.page-head { text-align: center; padding: 44px 0 26px; }
.page-head .home {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.9rem; font-weight: 600; text-decoration: none;
  color: var(--color-secondary); margin-bottom: 18px;
}
.page-head .home:hover { text-decoration: underline; }
.page-head h1 {
  font-family: "Mali", "IBM Plex Sans Thai", cursive; font-weight: 700;
  font-size: clamp(1.5rem, 5vw, 2.1rem); color: var(--color-primary);
  line-height: 1.3; margin-bottom: 8px;
}
.page-head .updated { color: var(--color-text-secondary); font-size: 0.88rem; }

/* ─── Document card ─── */
.doc {
  background: var(--color-surface-strong);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-lg);
  padding: 34px 30px;
  box-shadow: var(--shadow-clay);
  backdrop-filter: blur(14px);
}
.doc h2 {
  font-family: "Mali", "IBM Plex Sans Thai", cursive;
  font-size: 1.18rem; font-weight: 700; color: var(--color-primary);
  margin: 30px 0 10px; line-height: 1.45;
}
.doc h2:first-child { margin-top: 0; }
.doc h3 {
  font-size: 1.01rem; font-weight: 700; color: var(--color-on-primary-container);
  margin: 20px 0 6px;
}
.doc p { margin-bottom: 12px; color: var(--color-text); }
.doc ul, .doc ol { margin: 0 0 14px 1.25rem; }
.doc li { margin-bottom: 7px; }
.doc strong { color: var(--color-on-primary-container); font-weight: 700; }
.doc .muted { color: var(--color-text-secondary); font-size: 0.93rem; }
.doc hr { border: none; border-top: 1px solid rgba(142, 74, 107, 0.14); margin: 26px 0; }

/* Callout for the clauses a payment reviewer looks for first. */
.callout {
  background: rgba(255, 183, 213, 0.18);
  border: 1.5px solid rgba(255, 183, 213, 0.7);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin: 16px 0 18px;
}
.callout.info { background: rgba(103, 75, 181, 0.08); border-color: rgba(103, 75, 181, 0.22); }
.callout p:last-child, .callout ul:last-child, .callout ol:last-child { margin-bottom: 0; }

/* ─── Definition rows (contact / company identity) ─── */
.rows { display: grid; gap: 2px; }
.row {
  display: grid; grid-template-columns: 172px 1fr; gap: 10px;
  padding: 12px 0; border-bottom: 1px solid rgba(142, 74, 107, 0.1);
}
.row:last-child { border-bottom: none; }
.row dt { color: var(--color-text-secondary); font-size: 0.93rem; font-weight: 600; }
.row dd { font-weight: 600; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--tap-min); padding: 14px 26px;
  border-radius: var(--radius-pill); border: none;
  font-family: "IBM Plex Sans Thai", sans-serif; font-size: 1rem; font-weight: 700;
  text-decoration: none; cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn-line { background: var(--line-green); color: #fff; box-shadow: 0 12px 26px -8px rgba(6, 199, 85, 0.5), inset 0 2px 0 rgba(255,255,255,0.3); }
.btn-ghost { background: var(--color-surface-strong); color: var(--color-primary); border: 1.5px solid rgba(142, 74, 107, 0.2); box-shadow: var(--shadow-soft); }
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px) scale(0.98); }
.btn:focus-visible { outline: 3px solid var(--color-secondary-container); outline-offset: 3px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

/* ─── Footer ─── */
footer { text-align: center; padding: 36px 20px 8px; color: var(--color-text-secondary); }
footer .flinks { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center; margin-bottom: 14px; }
footer .flinks a { color: var(--color-secondary); font-weight: 600; font-size: 0.94rem; text-decoration: none; }
footer .flinks a:hover { text-decoration: underline; }
footer .legal { font-size: 0.82rem; opacity: 0.7; }

@media (max-width: 560px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .doc { padding: 26px 20px; border-radius: 20px; }
  .row { grid-template-columns: 1fr; gap: 2px; padding: 10px 0; }
  .btn-row .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
