:root {
  --font-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "SF Pro Text", "Arial Hebrew", system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;

  /* Light theme — warm editorial paper */
  --bg: #faf9f5;
  --surface: #ffffff;
  --surface-subtle: #f2efe7;
  --surface-hover: #eae5d9;
  --border: #e5e0d4;
  --border-strong: #d5cfc0;

  --text: #181715;
  --text-secondary: #5c5850;
  --text-muted: #8a857a;

  /* Brand & Game Accents */
  --gold: #f7da21;
  --gold-deep: #e6c20a;
  --gold-text: #946600;
  --gold-soft: rgba(247, 218, 33, 0.22);
  --gold-ink: #161513;

  --coral: #e06d53;
  --sage: #4d7c5f;
  --sage-soft: rgba(77, 124, 95, 0.14);
  --sage-text: #2e5c40;

  --exotic: #0ea5e9;
  --exotic-text: #0369a1;
  --exotic-soft: rgba(14, 165, 233, 0.14);
  --exotic-border: rgba(14, 165, 233, 0.32);

  --danger-bg: #272522;
  --danger-text: #faf9f5;

  --shadow-sm: 0 1px 2px rgba(20, 18, 14, 0.05);
  --shadow-md: 0 8px 28px rgba(20, 18, 14, 0.11);
  --shadow-card: 0 2px 10px rgba(20, 18, 14, 0.05), 0 1px 2px rgba(20, 18, 14, 0.04);
  --shadow-card-hover: 0 10px 28px rgba(20, 18, 14, 0.1), 0 2px 6px rgba(20, 18, 14, 0.05);
  --backdrop: rgba(20, 19, 17, 0.48);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --radius-pill: 999px;
}

[data-theme="dark"] {
  --bg: #141413;
  --surface: #1e1e1c;
  --surface-subtle: #262522;
  --surface-hover: #302f2b;
  --border: #2f2e2a;
  --border-strong: #42403a;

  --text: #f5f3ed;
  --text-secondary: #b0aba0;
  --text-muted: #7e7a70;

  --gold: #f7da21;
  --gold-deep: #f5c518;
  --gold-text: #f7da21;
  --gold-soft: rgba(247, 218, 33, 0.16);
  --gold-ink: #141413;

  --coral: #e87d65;
  --sage: #6fa382;
  --sage-soft: rgba(111, 163, 130, 0.18);
  --sage-text: #8cc4a0;

  --exotic: #0ea5e9;
  --exotic-text: #38bdf8;
  --exotic-soft: rgba(14, 165, 233, 0.18);
  --exotic-border: rgba(56, 189, 248, 0.35);

  --danger-bg: #f5f3ed;
  --danger-text: #141413;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 12px 36px rgba(0, 0, 0, 0.55);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.32);
  --shadow-card-hover: 0 12px 32px rgba(0, 0, 0, 0.5);
  --backdrop: rgba(0, 0, 0, 0.65);
}

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

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--exotic);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}
