:root {
  --cream: #fef9e8;
  --cream-deep: #f5f0e0;
  --hero: #622458;
  --hero-dark: #4a1a42;
  --accent: #2bab62;
  --accent-light: #e6f7ee;
  --glow-accent: rgba(43, 171, 98, 0.12);
  --link: #1a6fdb;
  --text: #2d2a26;
  --text-muted: #5c574f;
  --border: #e8e2d4;
  --card: #ffffff;
  --shadow: 0 4px 24px rgba(98, 36, 88, 0.08);
  --radius: 16px;
  --max-width: 720px;
}

html[data-game="sheep-heap"] {
  --accent: #2bab62;
  --accent-light: #e6f7ee;
  --glow-accent: rgba(43, 171, 98, 0.12);
}

html[data-game="fairy-bubbles"] {
  --accent: #a855f7;
  --accent-light: #f3e8ff;
  --glow-accent: rgba(168, 85, 247, 0.12);
}

html[data-game="conspiracy"] {
  --accent: #e8283c;
  --accent-light: #fde8ea;
  --glow-accent: rgba(232, 40, 60, 0.12);
}

html[data-game="pirate-warfare"] {
  --accent: #1a6fdb;
  --accent-light: #e6f0fd;
  --glow-accent: rgba(26, 111, 219, 0.12);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--cream);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, var(--glow-accent), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(98, 36, 88, 0.06), transparent);
  min-height: 100vh;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

a:hover { color: #1559b5; }

.page-header {
  background: linear-gradient(135deg, var(--hero) 0%, var(--hero-dark) 100%);
  color: #fff;
  padding: 2.5rem 1.25rem 3rem;
  text-align: center;
}

.page-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 1rem;
}

.page-header__brand a {
  color: inherit;
  text-decoration: none;
}

.page-header__brand a:hover { opacity: 1; }

.page-header h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.page-header__subtitle {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  opacity: 0.9;
}

.page-header__meta {
  margin: 1.25rem 0 0;
  display: inline-block;
  padding: 0.35rem 0.85rem;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
}

.container {
  max-width: var(--max-width);
  margin: -1.75rem auto 3rem;
  padding: 0 1.25rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.intro {
  margin: 0 0 2rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 1.0625rem;
}

.intro strong { color: var(--text); }

section {
  margin-bottom: 2rem;
}

section:last-of-type { margin-bottom: 0; }

h2 {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--hero);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

h2::before {
  content: '';
  flex-shrink: 0;
  width: 4px;
  height: 1.1em;
  background: var(--accent);
  border-radius: 2px;
}

p {
  margin: 0 0 1rem;
}

p:last-child { margin-bottom: 0; }

ul {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

li {
  margin-bottom: 0.4rem;
}

li:last-child { margin-bottom: 0; }

.callout {
  margin: 1rem 0;
  padding: 1rem 1.15rem;
  background: var(--accent-light);
  border-left: 4px solid var(--accent);
  border-radius: 0 10px 10px 0;
  font-size: 0.9375rem;
}

.callout p:last-child { margin-bottom: 0; }

.contact-box {
  margin-top: 0.5rem;
  padding: 1rem 1.15rem;
  background: var(--cream);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.contact-box a {
  font-weight: 700;
  word-break: break-all;
}

.page-footer {
  max-width: var(--max-width);
  margin: 0 auto 2.5rem;
  padding: 0 1.25rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.page-footer a { font-weight: 600; }

@media (max-width: 480px) {
  .page-header { padding: 2rem 1rem 2.5rem; }
  .card { padding: 1.25rem; }
}

@media print {
  body { background: #fff; }
  .page-header { background: #fff; color: #000; padding: 1rem 0; }
  .page-header__meta { background: #eee; color: #333; }
  .container { margin-top: 0; }
  .card { box-shadow: none; border: none; padding: 0; }
}
