/* =====================================================================
   BASE — Typography + Reset + Body
   ===================================================================== */

*,*::before,*::after { box-sizing: border-box; }
html,body { margin: 0; padding: 0; height: 100%; }

body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg-app);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color .25s ease;
}

button { cursor: pointer; border: none; background: none; color: inherit; font: inherit; }
input, textarea, select { font: inherit; color: inherit; }
a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary-hover); }

/* Thai typography */
.th, th, [lang="th"] { font-family: var(--font-th); }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,.18); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,.32); }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); }
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.32); }

/* Headings */
h1,h2,h3,h4,h5,h6 { margin: 0 0 8px; font-weight: 700; letter-spacing: -.3px; }
h1 { font-size: 22px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }

/* Common */
.muted { color: var(--text-mute); }
.text-grad-violet {
  background: var(--grad-violet);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Utility */
.row { display: flex; }
.col { display: flex; flex-direction: column; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
