@font-face {
  /* Drop a self-hosted pixel font (e.g. Press Start 2P .woff2) at
     site-assets/fonts/press-start-2p.woff2 to enable. Falls back to
     system monospace until then — no external CDN dependency either way. */
  font-family: 'Retro';
  src: url('/site-assets/fonts/press-start-2p.woff2') format('woff2');
  font-display: swap;
}

:root {
  --ink: #141414;
  --paper: #ffffff;
  --page-bg: #f2f1ee;
  --muted: #767676;
  --muted-line: rgba(20, 20, 20, 0.16);
  font-family: 'Retro', 'Courier New', monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--page-bg);
  color: var(--ink);
  overflow-x: hidden;
  scroll-behavior: smooth;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 2rem;
  border-bottom: 2px solid var(--ink);
  background: var(--paper);
}

.logo-link {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.logo {
  font-size: 1.1rem;
  font-weight: bold;
  letter-spacing: 0.06em;
}

.logo-sub {
  font-size: 0.5rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.site-footer .logo {
  font-size: 1.3rem;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  margin-left: 1.8rem;
  font-size: 0.65rem;
  font-weight: bold;
  letter-spacing: 0.08em;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.site-nav a:hover {
  color: var(--muted);
}

.site-nav a.active {
  border-bottom-color: var(--ink);
}

.hero {
  text-align: center;
  padding: 4rem 1rem 2.6rem;
}

.hero-badge {
  display: inline-block;
  font-size: 0.55rem;
  font-weight: bold;
  letter-spacing: 0.12em;
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.6rem;
}

.hero-title {
  font-size: clamp(1.7rem, 5.2vw, 3.2rem);
  font-weight: bold;
  margin: 0;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.hero-tagline {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: bold;
  margin-top: 0.9rem;
  letter-spacing: 0.06em;
}

.hero-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  max-width: 360px;
  margin: 1.3rem auto 0;
  font-size: 0.85rem;
}

.hero-divider span {
  flex: 1;
  height: 1px;
  background: var(--muted-line);
}

.btn-play {
  margin-top: 2rem;
  background: var(--paper);
  border: 2px solid var(--ink);
  color: var(--ink);
  font-family: inherit;
  font-weight: bold;
  font-size: 0.9rem;
  padding: 0.85rem 2.3rem;
  cursor: pointer;
  letter-spacing: 0.08em;
  border-radius: 4px;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn-play:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-2px);
}

.btn-play:active {
  transform: translateY(0);
}

.about-note {
  max-width: 640px;
  margin: 0 auto 3rem;
  padding: 1.6rem 1.8rem;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
}

.about-note h2 {
  margin: 0 0 0.9rem;
  font-size: 0.85rem;
  font-weight: bold;
  letter-spacing: 0.06em;
}

.about-note p {
  margin: 0 0 0.9rem;
  font-size: 0.72rem;
  line-height: 1.8;
  color: var(--muted);
  font-family: 'Courier New', monospace;
  letter-spacing: 0.01em;
}

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

.about-note strong {
  color: var(--ink);
}

.game-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  padding: 0 1rem 3rem;
}

.game-container {
  width: 100%;
  /* Was capped at 1024px, which reads as a small fixed box on anything
     wider than a laptop screen — this lets it grow with the viewport
     instead, up to a much larger ceiling. */
  max-width: min(96vw, 1600px);
  aspect-ratio: 5 / 2;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 6px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  position: relative;
  overflow: hidden;
}

#game-canvas-mount {
  width: 100%;
  height: 100%;
}

#game-canvas-mount canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  /* The comic-art overhaul replaced the pixel-art textures with smooth
     line-art PNGs (see main.js's pixelArt: false) — image-rendering:
     pixelated here was leftover from the old art style and forced a
     blocky/crunchy upscale on top of art that's supposed to look smooth. */
  image-rendering: auto;
}

.controls-bar {
  width: 100%;
  max-width: min(96vw, 1600px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.4rem;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 0.7rem 1.2rem;
}

.controls-bar-keys {
  display: flex;
  align-items: flex-end;
  gap: 1.6rem;
}

.key-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  border: 1px solid var(--ink);
  color: var(--ink);
  padding: 0.25rem 0.4rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: bold;
  font-family: 'Retro', 'Courier New', monospace;
}

.key-label {
  font-size: 0.55rem;
  font-weight: bold;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.controls-bar-divider {
  width: 1px;
  height: 1.8rem;
  background: var(--muted-line);
}

.controls-bar-gamepad {
  font-size: 0.62rem;
  font-weight: bold;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.icon-btn {
  margin-left: auto;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.icon-btn:hover {
  background: var(--ink);
  color: var(--paper);
}

.features {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem 3.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.1rem;
}

.feature-card {
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 8px;
  padding: 1.4rem 1.3rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.feature-icon {
  color: var(--ink);
  font-size: 1.3rem;
  margin-bottom: 0.6rem;
}

.feature-card h3 {
  margin: 0 0 0.6rem;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}

.feature-card p {
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.7;
  color: var(--muted);
  font-family: 'Courier New', monospace;
  letter-spacing: 0.01em;
}

.site-footer {
  text-align: center;
  padding: 2.4rem 1rem 3rem;
  color: var(--muted);
  font-size: 0.6rem;
  line-height: 1.9;
  border-top: 2px solid var(--ink);
  background: var(--paper);
}

.site-footer .logo {
  margin-bottom: 0.5rem;
  color: var(--ink);
}

.version {
  opacity: 0.7;
}

.legal-note {
  max-width: 480px;
  margin: 1.1rem auto 0;
  opacity: 0.6;
  font-size: 0.56rem;
  line-height: 1.7;
}

@media (max-width: 600px) {
  .site-nav a {
    margin-left: 0.9rem;
  }

  .hero {
    padding: 3rem 1rem 2rem;
  }

  .controls-bar {
    justify-content: center;
  }

  .icon-btn {
    margin-left: 0;
  }
}

.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 100;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.9rem 1.1rem;
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner p {
  margin: 0;
  font-size: 0.65rem;
  line-height: 1.6;
  color: var(--muted);
  font-family: 'Courier New', monospace;
  flex: 1 1 220px;
}

.cookie-banner-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.cookie-btn {
  font-family: inherit;
  font-weight: bold;
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.cookie-btn:hover {
  background: var(--muted-line);
}

.cookie-btn-accept {
  background: var(--ink);
  color: var(--paper);
}

.cookie-btn-accept:hover {
  background: #333;
}
