/* =============================================
   SBJ Web — Theme Foundation (Warm Notebook)
   ============================================= */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* --- Colors (Warm Notebook Palette) --- */
  --bg: #fbf6eb;
  --surface: #fffdfa;
  --text: #3a2a1a;
  --muted: #8a7a6a;
  --border: #e8e0d4;
  --primary: #6a5a4a;
  --success: #7ab87a;
  --danger: #c44;
  --info: #8ab4e8;

  /* --- Typography --- */
  --font-family: 'Segoe UI', 'Noto Sans Thai', system-ui, -apple-system, sans-serif;

  /* --- Spacing & Borders --- */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* --- Shadows --- */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);

  /* --- Layout --- */
  --content-width: 1100px;
}

html {
  font-family: var(--font-family);
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}

body {
  min-height: 100dvh;
}

/* --- Shared Button System --- */
.sbj-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
  white-space: nowrap;
}

.sbj-btn:hover {
  background: #f5f0ea;
  border-color: #d4cabc;
}

.sbj-btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.sbj-btn-primary:hover {
  background: #5a4a3a;
  border-color: #5a4a3a;
}

.sbj-btn-secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.sbj-btn-secondary:hover {
  background: #f5f0ea;
}

.sbj-btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.sbj-btn-danger:hover {
  background: #b33;
}