:root {
  --ink: #14180f;
  --ink-soft: #2a3220;
  --paper: #f3ead3;
  --paper-deep: #e6d8b6;
  --lime: #8fe600;
  --nvi: #76b900;
  --gold: #f0c430;
  --desk: #12170e;
  --gutter: 14px;
  --stroke: 4px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", system-ui, sans-serif;
  color: var(--ink);
  background: var(--desk);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Bungee", cursive;
  letter-spacing: 0.02em;
  line-height: 0.92;
}

p {
  margin: 0;
}

/* ---------- workbench (decent, quiet) ---------- */

.bench {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(118, 185, 0, 0.16), transparent 55%),
    radial-gradient(ellipse 60% 40% at 80% 90%, rgba(240, 196, 48, 0.06), transparent 50%),
    linear-gradient(180deg, #1a2214 0%, #0e120b 100%);
}

.bench__grain {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0.6px, transparent 0.7px);
  background-size: 4px 4px;
}

.bench__glow {
  position: absolute;
  inset: auto 10% 8% 10%;
  height: 180px;
  background: radial-gradient(ellipse at center, rgba(143, 230, 0, 0.12), transparent 70%);
}

/* ---------- bound issue ---------- */

.issue {
  position: relative;
  z-index: 1;
  width: min(1080px, calc(100% - 28px));
  margin: 22px auto 48px;
  background: var(--paper);
  border: var(--stroke) solid var(--ink);
  box-shadow:
    10px 12px 0 var(--ink),
    0 0 0 10px #0b0f09;
}

.issue::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 18px;
  background:
    repeating-linear-gradient(
      180deg,
      transparent 0 22px,
      rgba(20, 24, 15, 0.08) 22px 23px
    ),
    linear-gradient(90deg, #d9c89a, var(--paper-deep));
  border-right: 3px solid var(--ink);
  pointer-events: none;
}

/* ---------- masthead ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 18px 10px 34px;
  background: var(--ink);
  color: var(--paper);
  border-bottom: var(--stroke) solid var(--ink);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  background: var(--paper);
  border: 3px solid var(--lime);
  border-radius: 50%;
}

.brand b {
  display: block;
  font-family: "Bungee", cursive;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.brand i {
  display: block;
  font-style: normal;
  font-size: 11px;
  color: var(--lime);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mast-nav {
  display: none;
  margin-left: auto;
  gap: 18px;
  font-family: "Kalam", cursive;
  font-weight: 700;
  font-size: 18px;
}

.mast-nav a:hover {
  color: var(--lime);
}

.mast-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.mast-nav + .mast-actions {
  margin-left: 0;
}

.ico,
.nav-toggle {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 3px solid var(--paper);
  background: transparent;
  color: var(--paper);
  font-size: 16px;
}

.ico:hover,
.nav-toggle:hover {
  background: var(--lime);
  color: var(--ink);
  border-color: var(--lime);
}

.btn-buy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  background: var(--lime);
  color: var(--ink);
  border: 3px solid var(--lime);
  font-family: "Bungee", cursive;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.btn-buy:hover {
  background: var(--gold);
  border-color: var(--gold);
}

.nav-toggle {
  cursor: pointer;
}

.drawer {
  display: none;
  flex-direction: column;
  gap: 0;
  background: var(--ink);
  color: var(--paper);
  border-bottom: var(--stroke) solid var(--ink);
  padding: 8px 18px 16px 34px;
}

.drawer.is-open {
  display: flex;
}

.drawer a {
  padding: 10px 0;
  font-family: "Kalam", cursive;
  font-size: 20px;
  font-weight: 700;
  border-bottom: 2px dashed rgba(243, 234, 211, 0.2);
}

.drawer a:hover {
  color: var(--lime);
}

/* ---------- pages ---------- */

.page {
  position: relative;
  padding: 28px 28px 22px 42px;
  border-bottom: var(--stroke) solid var(--ink);
}

.page:last-of-type {
  border-bottom: none;
}

.page-rule {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: "Kalam", cursive;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--ink);
}

.page-mark {
  font-family: "Kalam", cursive;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.page-foot {
  margin-top: 18px;
  padding-top: 10px;
  border-top: 2px solid var(--ink);
  font-family: "Kalam", cursive;
  font-size: 14px;
  font-weight: 700;
}

/* ---------- cover / hero (type only) ---------- */

.page-cover {
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 22%, rgba(143, 230, 0, 0.22), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(240, 196, 48, 0.16), transparent 24%),
    linear-gradient(180deg, #f7f0dc 0%, var(--paper) 55%, #e7d7a8 100%);
}

.cover-art {
  position: absolute;
  inset: 48px 0 0 18px;
  pointer-events: none;
}

.cover-art__halftone {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image: radial-gradient(circle, var(--ink) 0.7px, transparent 0.8px);
  background-size: 7px 7px;
  mask-image: radial-gradient(circle at 50% 35%, #000 20%, transparent 70%);
}

.cover-art__rays {
  position: absolute;
  inset: -10% -20% auto;
  height: 70%;
  background: repeating-conic-gradient(
    from 0deg at 50% 50%,
    rgba(118, 185, 0, 0.08) 0 8deg,
    transparent 8deg 16deg
  );
  opacity: 0.7;
}

.cover-art__spiral {
  position: absolute;
  width: 160px;
  height: 160px;
  border: 10px solid rgba(118, 185, 0, 0.28);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 18px rgba(118, 185, 0, 0.12),
    inset 0 0 0 36px rgba(20, 24, 15, 0.08);
}

.cover-art__spiral--l {
  top: 70px;
  left: 8%;
}

.cover-art__spiral--r {
  top: 40px;
  right: 8%;
}

.cover-kicker,
.cover-symbol,
.cover-cta,
.balloon,
.serial,
.page-cover h1,
.page-cover .page-rule,
.page-cover .page-foot {
  position: relative;
  z-index: 2;
}

.cover-kicker {
  margin: 22px 0 8px;
  font-family: "Kalam", cursive;
  font-size: clamp(18px, 2.4vw, 24px);
  font-weight: 700;
}

.page-cover h1 {
  font-size: clamp(56px, 13vw, 128px);
}

.cover-line {
  display: block;
}

.cover-line--fat {
  color: var(--nvi);
  -webkit-text-stroke: 2px var(--ink);
  text-shadow: 6px 6px 0 var(--ink);
}

.cover-symbol {
  display: inline-block;
  margin: 12px 0 18px;
  padding: 4px 14px 2px;
  background: var(--ink);
  color: var(--lime);
  font-family: "Bungee", cursive;
  font-size: 22px;
}

.balloon {
  position: relative;
  max-width: 640px;
  margin: 0 0 22px;
  padding: 16px 20px 18px;
  background: #fffdf6;
  border: var(--stroke) solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
}

.balloon::after {
  content: "";
  position: absolute;
  left: 36px;
  bottom: -16px;
  width: 22px;
  height: 16px;
  background: #fffdf6;
  border-right: var(--stroke) solid var(--ink);
  border-bottom: var(--stroke) solid var(--ink);
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

.balloon p {
  font-family: "Kalam", cursive;
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 700;
  line-height: 1.35;
}

.cover-cta,
.manual-cta,
.lab-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.punch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: 3px solid var(--ink);
  font-family: "Bungee", cursive;
  font-size: 13px;
  letter-spacing: 0.03em;
  box-shadow: 4px 4px 0 var(--ink);
}

.punch:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.punch-buy {
  background: var(--lime);
}

.punch-ink {
  background: #fffdf6;
}

.serial {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  padding: 12px 14px;
  background: var(--ink);
  color: var(--paper);
}

.serial em {
  font-family: "Bungee", cursive;
  font-style: normal;
  font-size: 11px;
  color: var(--lime);
  letter-spacing: 0.1em;
}

.serial code {
  flex: 1 1 220px;
  min-width: 0;
  font-family: ui-monospace, "Cascadia Mono", monospace;
  font-size: 12px;
  word-break: break-all;
}

.serial button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 2px solid var(--lime);
  background: transparent;
  color: var(--lime);
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  cursor: pointer;
}

.serial button:hover,
.serial button.is-copied {
  background: var(--lime);
  color: var(--ink);
}

/* ---------- origin spread ---------- */

.page-origin {
  background:
    linear-gradient(90deg, rgba(20, 24, 15, 0.03) 0 40%, transparent 40%),
    var(--paper);
}

.origin-head,
.manual-head,
.lab-head {
  margin-bottom: 16px;
}

.origin-head h2,
.manual-head h2,
.lab-head h2 {
  margin-top: 4px;
  font-size: clamp(32px, 6vw, 52px);
}

.origin-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  grid-template-rows: auto 1fr;
  gap: var(--gutter);
}

.panel {
  position: relative;
  margin: 0;
  background: #070a06;
  border: var(--stroke) solid var(--ink);
  overflow: hidden;
}

.panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.panel figcaption,
.panel-banner::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 12px;
  background: #fffdf6;
  border-top: 3px solid var(--ink);
  font-family: "Kalam", cursive;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
}

.panel-tall {
  grid-row: 1 / span 2;
  min-height: 520px;
}

.panel-lab {
  min-height: 230px;
}

.panel-copy {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px 16px;
  padding: 16px;
  background: #fffdf6;
}

.portrait {
  grid-row: 1 / span 2;
  align-self: start;
}

.portrait img {
  width: 92px;
  height: 92px;
  object-fit: contain;
  background: var(--paper);
  border: 3px solid var(--ink);
}

.panel-copy .hand,
.lab-bar .hand {
  grid-column: 2;
  font-family: "Kalam", cursive;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
}

.panel-copy p:last-child {
  grid-column: 2;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* ---------- field manual ---------- */

.page-manual {
  background:
    repeating-linear-gradient(
      180deg,
      transparent,
      transparent 31px,
      rgba(20, 24, 15, 0.05) 32px
    ),
    #efe4c4;
}

.manual-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.2fr;
  gap: var(--gutter);
  align-items: stretch;
}

.panel-gamer {
  min-height: 460px;
}

.strips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--gutter);
}

.strip {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 96px;
  padding: 12px 14px;
  background: #fffdf6;
  border: var(--stroke) solid var(--ink);
}

.strip-no {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  background: var(--ink);
  color: var(--lime);
  font-family: "Bungee", cursive;
  font-size: 20px;
}

.strip h3 {
  font-size: 16px;
  margin-bottom: 4px;
}

.strip p {
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.manual-cta {
  margin-top: 16px;
}

/* ---------- centerfold / community ---------- */

.page-lab {
  background: #11160d;
  color: var(--paper);
}

.page-lab .page-mark,
.page-lab .page-foot {
  color: var(--lime);
  border-color: rgba(143, 230, 0, 0.35);
}

.page-lab h2 {
  color: #fffdf6;
}

.panel-banner {
  min-height: 0;
}

.panel-banner img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.lab-bar {
  margin-top: var(--gutter);
  padding: 18px 18px 20px;
  background: #fffdf6;
  color: var(--ink);
  border: var(--stroke) solid var(--ink);
}

.lab-bar .hand {
  margin-bottom: 14px;
}

/* ---------- colophon ---------- */

.colophon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px 18px 34px;
  background: var(--paper-deep);
  border-top: var(--stroke) solid var(--ink);
}

.colophon .brand img {
  width: 36px;
  height: 36px;
}

.colophon p {
  font-family: "Kalam", cursive;
  font-weight: 700;
  font-size: 14px;
}

/* ---------- breakpoints ---------- */

@media (min-width: 860px) {
  .mast-nav {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }

  .drawer,
  .drawer.is-open {
    display: none;
  }
}

@media (max-width: 859px) {
  .issue {
    width: min(100% - 16px, 1080px);
    margin-top: 12px;
  }

  .issue::before {
    width: 10px;
  }

  .page {
    padding: 22px 16px 18px 22px;
  }

  .origin-grid,
  .manual-grid {
    grid-template-columns: 1fr;
  }

  .panel-tall,
  .panel-gamer,
  .panel-lab {
    min-height: 280px;
  }

  .panel-copy {
    grid-template-columns: 72px 1fr;
  }

  .portrait img {
    width: 72px;
    height: 72px;
  }

  .cover-art__spiral {
    width: 96px;
    height: 96px;
  }
}

@media (max-width: 520px) {
  .brand span {
    display: none;
  }

  .page-cover h1 {
    font-size: 48px;
  }

  .strip {
    grid-template-columns: 1fr;
  }

  .serial {
    align-items: stretch;
  }

  .panel-copy {
    grid-template-columns: 1fr;
  }

  .portrait {
    grid-row: auto;
  }
}
