@font-face {
  font-family: 'PressStart';
  src: url('../assets/fonts/press-start-2p.woff2') format('woff2');
  font-display: swap;
}

:root { --trade: #1e88e5; }

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #f7f3ea;
  color: #2a2a26;
  font-family: Georgia, 'Times New Roman', serif;
  -webkit-font-smoothing: antialiased;
}

.page-header { text-align: center; padding: 18px 16px 8px; }
.page-header h1 {
  font-family: 'PressStart', monospace;
  font-size: clamp(16px, 4.5vw, 26px);
  letter-spacing: 1px;
  margin: 0 0 6px;
}
.page-header p { margin: 0; font-size: 15px; color: #5b574c; }

#game-wrap {
  position: relative;
  max-width: 520px;
  margin: 10px auto 0;
  aspect-ratio: 320 / 288;
}
#game-container { width: 100%; height: 100%; touch-action: none; }
#game-container canvas { image-rendering: pixelated; display: block; }

/* End screen overlay */
#end-overlay {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px;
  text-align: center;
  background: rgba(247, 243, 234, 0.97);
  border: 3px solid #2a2a26;
}
#end-overlay.visible { display: flex; }
.end-label { font-family: 'PressStart', monospace; font-size: 11px; margin: 0; }
#end-score { font-family: 'PressStart', monospace; font-size: 30px; margin: 0; color: var(--trade); }
#end-line { font-family: 'PressStart', monospace; font-size: 9px; margin: 0; }
#end-hook { font-size: 16px; line-height: 1.5; margin: 4px 0; white-space: pre-line; }
#end-cta {
  font-family: 'PressStart', monospace;
  font-size: 11px;
  line-height: 1.6;
  color: #f8f8f0;
  background: var(--trade);
  border: 3px solid #2a2a26;
  padding: 14px 16px;
  text-decoration: none;
  min-height: 48px;
  display: flex;
  align-items: center;
}
#end-cta:hover { filter: brightness(1.08); }
#end-share-line { font-size: 13px; color: #5b574c; margin: 2px 0 0; }
.end-actions { display: flex; gap: 10px; }
.end-actions button {
  font-family: Georgia, serif;
  font-size: 13px;
  background: #f8f8f0;
  border: 2px solid #2a2a26;
  padding: 8px 12px;
  cursor: pointer;
}

/* Below the fold */
.explainer {
  max-width: 560px;
  margin: 34px auto;
  padding: 0 20px;
  text-align: center;
}
.explainer h2 { font-size: 21px; margin-bottom: 10px; }
.explainer p { font-size: 16px; line-height: 1.6; color: #4a463c; }
.explainer-cta {
  display: inline-block;
  margin-top: 10px;
  font-family: 'PressStart', monospace;
  font-size: 10px;
  color: #2a2a26;
  background: #f2c14e;
  border: 3px solid #2a2a26;
  padding: 12px 16px;
  text-decoration: none;
}
.explainer-cta:hover { filter: brightness(1.05); }

.page-footer { text-align: center; padding: 24px 16px 30px; color: #8a857a; font-size: 13px; }
