:root {
  color-scheme: light;
  --background: #e9e2d6;
  --surface: #f3ede3;
  --ink: #302a25;
  --muted: #6b5f54;
  --accent: #934a2c;
  --accent-hover: #783a23;
  --on-accent: #fff8ed;
  --line: #c9beb0;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--background); color: var(--ink); font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
a { -webkit-tap-highlight-color: transparent; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 6px; }
button, summary { cursor: pointer; }
button { font-family: inherit; }
button:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; font-weight: 700; }
.container { width: min(1120px, calc(100% - 96px)); margin-inline: auto; }
.skip-link { position: absolute; z-index: 5; left: 24px; top: 12px; padding: 10px 18px; background: var(--ink); color: var(--background); transform: translateY(-180%); }
.skip-link:focus { transform: none; }

.site-header { min-height: 98px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); gap: 32px; }
.wordmark { display: block; width: 160px; flex-shrink: 0; }
.wordmark img { width: 100%; height: auto; filter: invert(1) sepia(1) brightness(1.1); mix-blend-mode: multiply; }
.site-header nav { display: flex; align-items: center; gap: 34px; font-size: 14px; font-weight: 600; }
.site-header nav a { padding-block: 12px; }
.site-header nav a:hover, .site-footer nav a:hover { color: var(--accent); }
.nav-external { border-left: 1px solid var(--line); padding-left: 34px; }
.nav-external span { margin-left: 5px; }

.studio-intro { display: flex; flex-direction: column; align-items: center; gap: 24px; padding-block: 38px 32px; }
.studio-actions, .community-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.studio-actions { justify-content: center; }
.studio-logo { width: min(100%, 300px); }
.studio-logo img { width: 100%; height: auto; mix-blend-mode: multiply; }
.button { min-height: 46px; padding: 11px 20px; display: inline-flex; align-items: center; justify-content: center; gap: 24px; font-size: 13px; font-weight: 650; border: 1px solid var(--line); border-radius: 4px; transition: background-color .18s, border-color .18s; }
.button:hover { border-color: var(--accent); background: #e2d8c9; }
.button-primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.button-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.button-secondary { background: var(--surface); color: var(--ink); }
.text-link { font-size: 13px; font-weight: 650; padding-block: 8px; border-bottom: 1px solid var(--line); }
.text-link span { margin-left: 12px; }
.text-link:hover { color: var(--accent); border-color: var(--accent); }

.games-section { padding-top: 28px; padding-bottom: 48px; border-top: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 26px; }
.section-heading h2 { font-size: 30px; letter-spacing: -.7px; }
.section-heading .text-link { flex-shrink: 0; }
.game-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.game-card { min-width: 0; display: flex; flex-direction: column; }
.game-art { position: relative; display: block; aspect-ratio: 1.9; overflow: hidden; border-radius: 6px; }
.game-art img { height: 100%; width: 100%; object-fit: cover; transition: transform .3s; }
.game-art:hover img { transform: scale(1.025); }
.spells-art { background: #005563; }
.spells-art img { object-fit: contain; }
.war-art { background: #184985; }
.art-label { position: absolute; bottom: 13px; left: 14px; color: var(--on-accent); background: var(--ink); border: 1px solid #6b5f54; padding: 5px 10px; border-radius: 3px; font-size: 10px; font-weight: 700; }
.art-label span { margin-left: 6px; }
.game-copy { display: flex; flex-direction: column; flex: 1; padding-top: 18px; }
.game-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 11px; color: var(--muted); }
.status { border: 1px solid var(--line); border-radius: 20px; padding: 3px 9px; font-size: 10px; color: var(--ink); white-space: nowrap; }
.game-copy h3 { font-size: 28px; letter-spacing: -.7px; margin-block: 12px 10px; }
.game-copy p { color: var(--muted); font-size: 14px; line-height: 1.8; margin-bottom: 20px; }
.game-link { color: var(--accent); font-size: 13px; font-weight: 650; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 14px; margin-top: auto; }
.game-link:hover { color: var(--accent-hover); }

.community-wrap { background: var(--surface); border-block: 1px solid var(--line); }
.community { padding-block: 30px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.community h2 { font-size: 26px; letter-spacing: -.5px; }
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 30px; padding-block: 26px; }
.footer-name { font-family: var(--serif); font-weight: 700; font-size: 18px; }
.site-footer nav { display: flex; gap: 24px; font-size: 11px; font-weight: 600; color: var(--muted); }
.site-footer nav a { padding-block: 10px; }
.site-footer nav span { margin-left: 4px; }
.error-page { min-height: 100vh; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 20px; padding-block: 48px; }
.error-page h1 { font-size: clamp(36px, 7vw, 60px); letter-spacing: -1.5px; }
.error-page p { color: var(--muted); }
.error-page .studio-actions { margin-top: 0; }
.terms-page { max-width: 68ch; padding-block: clamp(28px, 6vw, 64px) 64px; overflow-wrap: anywhere; }
.terms-heading { padding-bottom: 20px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.terms-heading p { color: var(--muted); }
.terms-heading h1 { font-size: clamp(36px, 7vw, 56px); margin-block: 4px 12px; }
.terms-page section { margin-top: 28px; }
.terms-page h2 { font-size: 26px; margin-bottom: 10px; }
.terms-page section p + p { margin-top: 10px; }
.terms-page a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.terms-page a:hover { color: var(--accent-hover); }
.cookie-settings { padding: 10px 0; border: 0; background: transparent; color: var(--muted); font: inherit; text-decoration: underline; text-underline-offset: 3px; }
.site-footer nav { flex-wrap: wrap; }
.consent-panel { position: fixed; z-index: 10; bottom: 16px; left: 16px; width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 24px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); box-shadow: 0 4px 24px #302a2526; font-size: 14px; }
.consent-panel h2 { margin-bottom: 12px; font-size: 24px; }
.consent-panel p { margin-bottom: 12px; }
.consent-panel details { margin-block: 16px; }
.consent-panel summary { font-weight: 600; }
.consent-panel details p { margin-top: 12px; }
.consent-panel a { text-decoration: underline; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 12px; }

@media (max-width: 1050px) {
  .container { width: calc(100% - 64px); }
}
@media (max-width: 760px) {
  .container { width: calc(100% - 40px); }
  .site-header { min-height: 86px; gap: 16px; }
  .wordmark { width: 120px; }
  .site-header nav { gap: 14px; font-size: 12px; }
  .nav-external { display: none; }
  .studio-intro { padding-block: 30px; gap: 22px; }
  .studio-logo { width: min(100%, 260px); }
  .games-section { padding-top: 24px; padding-bottom: 34px; }
  .section-heading { gap: 14px; margin-bottom: 22px; }
  .section-heading h2 { font-size: 28px; }
  .game-grid { grid-template-columns: 1fr; gap: 32px; }
  .game-copy h3 { font-size: 26px; }
  .game-art { aspect-ratio: 1.75; }
  .community { align-items: flex-start; flex-direction: column; padding-block: 26px; gap: 18px; }
  .community-actions { gap: 12px; }
  .site-footer { flex-direction: column; align-items: flex-start; gap: 12px; padding-block: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
