:root {
  --paper: #fff8f4;
  --red: #d82424;
  --red-dark: #a90012;
  --ink: #171111;
  --muted: #6c5b57;
  --blue: #dcecff;
  --line: rgba(23, 17, 17, 0.14);
  --font-body: "Manrope", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Archivo", "Manrope", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 88, 78, 0.20), transparent 34rem),
    radial-gradient(circle at 88% 16%, rgba(190, 219, 255, 0.60), transparent 32rem),
    linear-gradient(180deg, #fffaf7 0%, #f9eee8 100%);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.page-shell {
  width: min(1500px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 48px;
}

.hero-panel {
  min-height: calc(100vh - 36px);
  padding: clamp(18px, 3vw, 44px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(rgba(216, 36, 36, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(216, 36, 36, 0.055) 1px, transparent 1px),
    rgba(255, 255, 255, 0.72);
  background-size: 42px 42px;
  box-shadow: 0 28px 90px rgba(106, 34, 21, 0.16);
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 900;
  letter-spacing: -0.03em;
  font-size: 22px;
}

.mark {
  width: 30px;
  height: 30px;
  background: var(--red);
  border: 2px solid var(--ink);
  transform: rotate(-8deg);
  box-shadow: 4px 4px 0 var(--ink);
}

.mode-label {
  padding: 10px 14px;
  border: 1px solid var(--ink);
  background: #fff;
  font: 850 12px/1 var(--font-body);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 rgba(23, 17, 17, 0.14);
}

.copy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.46fr);
  align-items: end;
  gap: clamp(24px, 5vw, 72px);
  margin: clamp(34px, 6vw, 74px) 0 24px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--red);
  font: 900 13px/1 var(--font-body);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  max-width: 1040px;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(54px, 8.2vw, 124px);
  line-height: 0.88;
  letter-spacing: -0.075em;
}

.lede {
  margin: 0;
  color: var(--muted);
  font: 750 clamp(16px, 1.3vw, 20px)/1.45 var(--font-body);
}

.game-shell {
  position: relative;
  overflow: hidden;
  min-height: 920px;
  border: 2px solid var(--ink);
  background: #e32225;
  box-shadow: 14px 14px 0 var(--ink);
}

.game-meta {
  position: absolute;
  z-index: 4;
  top: 18px;
  left: 18px;
  right: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  pointer-events: none;
}

.game-meta > div {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,0.56);
  background: rgba(255, 247, 240, 0.92);
  color: var(--ink);
  box-shadow: 5px 5px 0 rgba(23, 17, 17, 0.22);
}

.meta-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--red-dark);
  font: 900 10px/1 var(--font-body);
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.game-meta strong {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font: 900 16px/1 var(--font-body);
}

.pixi-stage {
  position: absolute;
  inset: 0;
}

.pixi-stage canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  touch-action: pan-y !important;
}

.explain-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.explain-grid article {
  padding: 24px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.76);
  box-shadow: 8px 8px 0 rgba(216, 36, 36, 0.12);
}

.explain-grid h2 {
  margin: 0 0 10px;
  font: 900 23px/1 var(--font-display);
  letter-spacing: -0.04em;
}

.explain-grid p {
  margin: 0;
  color: var(--muted);
  font: 750 15px/1.45 var(--font-body);
}

@media (max-width: 1024px) {
  .copy-grid { grid-template-columns: 1fr; }
  .game-shell { min-height: 1360px; box-shadow: 8px 8px 0 var(--ink); }
  .game-meta { grid-template-columns: 1fr; top: 12px; left: 12px; right: 12px; }
  .game-meta > div { padding: 10px 12px; }
  .explain-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .page-shell { width: calc(100% - 14px); padding-top: 7px; }
  .hero-panel { border-radius: 18px; padding: 14px; }
  .brand-row { align-items: flex-start; }
  .mode-label { max-width: 170px; line-height: 1.2; }
  .brand-row { display: grid; grid-template-columns: 1fr; justify-items: start; }
  .mode-label { width: min(100%, 220px); max-width: none; font-size: 10px; line-height: 1.2; }
  h1 { font-size: 42px; line-height: 0.95; max-width: 330px; overflow-wrap: normal; }
  .lede { font-size: 14px; max-width: 100%; overflow-wrap: anywhere; }
  .game-shell { min-height: 1380px; }
  .game-meta { top: 10px; left: 10px; right: 10px; gap: 8px; }
  .game-meta strong { font-size: 14px; }
}

.copy-grid > * { min-width: 0; }
.hero-panel, .game-shell, .pixi-stage { max-width: 100%; }
@media (max-width: 520px) {
  .copy-grid { overflow: hidden; }
  h1 { max-width: 100%; white-space: normal; word-break: normal; overflow-wrap: break-word; }
}

.headline-line { display: block; }
@media (max-width: 520px) {
  h1 { font-size: 44px; line-height: 0.94; }
  .headline-line { display: block; max-width: 330px; }
  .lede { max-width: 330px; }
}

@media (max-width: 1024px) {
  html,
  body {
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    background: #e32225;
  }

  .page-shell {
    width: 100%;
    min-height: 100svh;
    padding: 0;
  }

  .hero-panel {
    min-height: 0;
    height: auto;
    min-height: 100svh;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .brand-row,
  .copy-grid,
  .game-meta,
  .explain-grid {
    display: none;
  }

  .game-shell {
    width: 100%;
    height: var(--review-game-stage-height, 100svh);
    min-height: var(--review-game-stage-height, 100svh);
    max-height: none;
    border: 0;
    box-shadow: none;
    touch-action: pan-y !important;
    -webkit-overflow-scrolling: touch;
  }

  .pixi-stage canvas {
    touch-action: pan-y !important;
  }
}

.game-shell:fullscreen {
  width: 100vw;
  height: var(--review-game-stage-height, 100vh);
  min-height: var(--review-game-stage-height, 100vh);
  max-height: none;
  border: 0;
  box-shadow: none;
  overflow-y: auto;
}

.game-shell:fullscreen .game-meta {
  display: none;
}

html[data-embed="admin"],
html[data-embed="admin"] body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  background: #e32225;
}

html[data-embed="admin"] .page-shell {
  width: 100%;
  min-height: 100vh;
  padding: 0;
}

html[data-embed="admin"] .hero-panel {
  min-height: 0;
  height: auto;
  min-height: 100vh;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

html[data-embed="admin"] .brand-row,
html[data-embed="admin"] .copy-grid,
html[data-embed="admin"] .game-meta,
html[data-embed="admin"] .explain-grid {
  display: none;
}

html[data-embed="admin"] .game-shell {
  width: 100%;
  height: var(--review-game-stage-height, 100vh);
  min-height: var(--review-game-stage-height, 100vh);
  max-height: none;
  border: 0;
  box-shadow: none;
  touch-action: pan-y !important;
  -webkit-overflow-scrolling: touch;
}

html[data-embed="admin"] .pixi-stage canvas {
  touch-action: pan-y !important;
}
