:root {
  --red: #c14a3d;
  --red-soft: #e3aca3;
  --green: #3e8a5c;
  --green-soft: #a7cdb4;
  --yellow: #c99332;
  --yellow-soft: #e3c48c;
  --blue: #3d6e9e;
  --blue-soft: #a4c0d8;
  --bg: #fdfcfb;
  --surface: #f8f6f3;
  --surface-2: #f0ede7;
  --text: #2b2622;
  --text-dim: #6b6259;
  --border: #e2ddd4;
  --accent: #a6472e;
  --on-accent: #fdfcfb;
  --accent-soft: #f3e2da;
  --board-bg: #ece6dc;
  --cell: #fdfcfb;
  --cell-line: #ddd6c9;
  --cell-safe: #f1ebdf;
  --shadow: 0 12px 32px rgba(60, 45, 30, 0.1);
}

:root[data-theme='midnight'] {
  --red: #d97662;
  --red-soft: #e3aca3;
  --green: #5da97e;
  --green-soft: #a7cdb4;
  --yellow: #dcac52;
  --yellow-soft: #e3c48c;
  --blue: #6d97c2;
  --blue-soft: #a4c0d8;
  --bg: #191510;
  --surface: #211c16;
  --surface-2: #2a231c;
  --text: #f2ede6;
  --text-dim: #a89c8d;
  --border: #3a3129;
  --accent: #d97757;
  --on-accent: #191510;
  --accent-soft: #3a2a20;
  --board-bg: #241e17;
  --cell: #f2ede6;
  --cell-line: #d8cfc0;
  --cell-safe: #e7ded0;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

/* Information pages (about, contact, privacy, 404). These are plain static
   HTML with no app bundle, so the theme variables are written into this file
   at build time from src/ui/theme.ts: same palette, same serif/sans pairing,
   same warm clay accent as the game. */

:root {
  --font-sans:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-serif: 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --radius-sm: 10px;
  --maxw: 720px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

.page-top {
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  padding: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.btn {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1.1rem;
  font-weight: 600;
  text-decoration: none;
}

.prose {
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  padding: 1rem 1.1rem 3rem;
  flex: 1;
}

.prose h1,
.prose h2,
.prose h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.15;
  text-wrap: balance;
}

.prose h1 {
  font-size: clamp(2.25rem, 5vw + 1rem, 3.25rem);
  letter-spacing: -0.01em;
  margin: 1rem 0 1.2rem;
}

.prose h2 {
  font-size: 1.5rem;
  margin: 2.4rem 0 0.8rem;
}

.prose h3 {
  font-size: 1.125rem;
  margin: 1.6rem 0 0.5rem;
}

.prose p,
.prose li {
  max-width: 65ch;
  text-wrap: pretty;
}

.prose > p:first-of-type {
  font-size: 1.125rem;
}

.prose li + li {
  margin-top: 0.4rem;
}

.page-footer {
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.875rem;
  text-align: center;
  padding: 1.6rem 1.1rem 2.4rem;
}

.site-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  font-weight: 600;
}

.site-links a {
  text-decoration: none;
}

.site-links a:hover {
  text-decoration: underline;
}
